player-map 1.0.17 → 1.0.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.umd.js CHANGED
@@ -27,9 +27,9 @@ Check the top-level render call using <`+de+">.")}return ee}}function Ai(N,ee){{
27
27
  <%s {...props} />
28
28
  React keys must be passed directly to JSX without using spread:
29
29
  let props = %s;
30
- <%s key={someKey} {...props} />`,Ze,Ae,it,Ae),bo[Ae+Ze]=!0}}return N===n?ln(ie):Nr(ie),ie}}function $n(N,ee,de){return xo(N,ee,de,!0)}function Pl(N,ee,de){return xo(N,ee,de,!1)}var jc=Pl,Vc=$n;qc.Fragment=n,qc.jsx=jc,qc.jsxs=Vc}()),qc}process.env.NODE_ENV==="production"?ty.exports=OO():ty.exports=DO();var I=ty.exports;const bT="data:image/svg+xml,%3csvg%20width='300'%20height='50'%20viewBox='0%200%20500%2084'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3crect%20width='500'%20height='84'%20fill='url(%23pattern0_10_2)'/%3e%3cdefs%3e%3cpattern%20id='pattern0_10_2'%20patternContentUnits='objectBoundingBox'%20width='1'%20height='1'%3e%3cuse%20xlink:href='%23image0_10_2'%20transform='scale(0.002%200.0119048)'/%3e%3c/pattern%3e%3cimage%20id='image0_10_2'%20width='500'%20height='84'%20preserveAspectRatio='none'%20xlink:href='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAfQAAABUCAYAAAB0vcXQAAAAAXNSR0IArs4c6QAAIABJREFUeF7tXQeYJFW5vfdWro4zw2wgioCoJEUMwDOsGEAFFR/6RFEREAH1IUpQQaIEFcWEiiAGVIKib0URFFBEfQbQJ+CCgODCssvuhE5VXfm+PjVVQ01vz0x3T/eE3arvQ2S6wr3/Def+6fyULPC1YcOGjKZpewiC8JwgCPZkjD07CIIVlNICISRPCMG/JUJImVJa4ZzXov//YBAED3iet0bTtPtVVX2MUore8AXuUv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pgXzBugJrZ0ahrE3pfQNCIjzff+lbOIKA96RhjbbFfGwE9Ri55xfq2nakXG0esN/r61bt25o++23B8nNwkh1tg6kv6cSSCWQSiCVwFYlgafBqH+wNO+A3jyCyFE3TXMPx3H2lCRpz6gO8yDnHJr4UKPgC4LjUCcXjviaKIp1z/PWIijOdd1/EULuKRaLv5rRlN4/+W1VEzLtbCqBVAKpBFIJLF4J/D/xclRhztyp5QAAAABJRU5ErkJggg=='/%3e%3c/defs%3e%3c/svg%3e",xT="data:image/svg+xml,%3csvg%20width='45'%20height='44'%20viewBox='0%200%2045%2044'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M22.0836%2026.4C24.5136%2026.4%2026.4836%2024.4301%2026.4836%2022C26.4836%2019.57%2024.5136%2017.6%2022.0836%2017.6C19.6535%2017.6%2017.6836%2019.57%2017.6836%2022C17.6836%2024.4301%2019.6535%2026.4%2022.0836%2026.4Z'%20fill='black'/%3e%3cpath%20d='M22.0844%2028.6C31.8046%2028.6%2039.6844%2025.6451%2039.6844%2022C39.6844%2018.3549%2031.8046%2015.4%2022.0844%2015.4C12.3642%2015.4%204.48438%2018.3549%204.48438%2022C4.48438%2025.6451%2012.3642%2028.6%2022.0844%2028.6Z'%20stroke='black'%20stroke-width='0.72'/%3e%3cpath%20d='M16.3685%2025.3C21.2286%2033.7179%2027.7275%2039.0645%2030.8842%2037.242C34.041%2035.4195%2032.6601%2027.1179%2027.8%2018.7C22.9399%2010.282%2016.441%204.93539%2013.2842%206.75793C10.1275%208.58047%2011.5084%2016.882%2016.3685%2025.3Z'%20stroke='black'%20stroke-width='0.72'/%3e%3cpath%20d='M16.3681%2018.7C11.508%2027.1179%2010.1271%2035.4195%2013.2838%2037.242C16.4406%2039.0646%2022.9395%2033.7179%2027.7996%2025.3C32.6597%2016.882%2034.0406%208.58048%2030.8838%206.75794C27.7271%204.9354%2021.2282%2010.282%2016.3681%2018.7Z'%20stroke='black'%20stroke-width='0.72'/%3e%3cpath%20d='M39.6844%2024.2C40.8994%2024.2%2041.8844%2023.215%2041.8844%2022C41.8844%2020.785%2040.8994%2019.8%2039.6844%2019.8C38.4693%2019.8%2037.4844%2020.785%2037.4844%2022C37.4844%2023.215%2038.4693%2024.2%2039.6844%2024.2Z'%20fill='black'/%3e%3cpath%20d='M13.284%2029.92C14.499%2029.92%2015.484%2028.935%2015.484%2027.72C15.484%2026.505%2014.499%2025.52%2013.284%2025.52C12.069%2025.52%2011.084%2026.505%2011.084%2027.72C11.084%2028.935%2012.069%2029.92%2013.284%2029.92Z'%20fill='black'/%3e%3cpath%20d='M13.284%2018.48C14.499%2018.48%2015.484%2017.495%2015.484%2016.28C15.484%2015.065%2014.499%2014.08%2013.284%2014.08C12.069%2014.08%2011.084%2015.065%2011.084%2016.28C11.084%2017.495%2012.069%2018.48%2013.284%2018.48Z'%20fill='black'/%3e%3c/svg%3e",iy=({walletConnected:r,walletAddress:e,wagmiConfig:i,walletHooks:n,onClose:s,isOpen:a,onCreatePlayer:o})=>{r&&(e||r.account&&r.account.address);const l=()=>{o&&o()};return I.jsxs("div",{className:"relative flex flex-col w-full items-center py-6",children:[I.jsx("div",{style:{position:"absolute",top:"0",left:"0",width:"100%",height:"20px",backgroundColor:"#FFD32A",borderTopLeftRadius:"20px",borderTopRightRadius:"20px"}}),I.jsx("div",{style:{position:"absolute",bottom:"0",left:"0",width:"100%",height:"20px",backgroundColor:"#FFD32A",borderBottomLeftRadius:"20px",borderBottomRightRadius:"20px"}}),I.jsx("img",{src:bT,alt:"Intuition Logo",style:{width:"350px",marginTop:"20px"}}),I.jsx("h2",{style:{fontSize:"1.0em",margin:"0 0 20px 0",color:"#FFD32A",fontWeight:"bold"},children:"BOSS FIGHTERS COMMUNITY PLAYER MAP"}),I.jsxs("div",{className:"flex flex-col gap-2 w-5/6 mx-auto text-base",children:[I.jsx("p",{children:"At first, there was nothing. And then, suddenly, the whole community appeared !"}),I.jsx("p",{children:"Everything of which the Boss Fighters community would one day be composed, would be born in an instant."}),I.jsx("p",{children:"A single species of condensed matter, exploding in a vast universe."}),I.jsx("p",{children:"Although energy would neither be created nor destroyed, the interaction between these newly-created atoms would continue to create something beautiful..."}),I.jsx("p",{children:"What had been separate would become whole again. And what would be created in the process would be even more beautiful than what came before..."}),I.jsx("p",{children:"Our story begins with the atom. The cornerstone of our ecosystem."}),I.jsx("p",{children:'And our "atoms" start with you !'})]}),I.jsxs("div",{className:"flex flex-col gap-2 w-5/6 mx-auto text-base text-left border-2 border-yellow-400 rounded-xl p-4 my-6",children:[I.jsxs("p",{children:[I.jsx("span",{style:{color:"#FFD32A"},children:"Claims"})," in Intuition, also referred to as ",I.jsx("span",{style:{color:"#FFD32A"},children:'"Triples"'})," structured in Semantic Triple format :"]}),I.jsxs("p",{children:["[",I.jsx("span",{style:{color:"#FFD32A"},children:"Subject"}),"] ⇒ [",I.jsx("span",{style:{color:"#FFD32A"},children:"Predicate"}),"] ⇒ [",I.jsx("span",{style:{color:"#FFD32A"},children:"Object"}),"] (For example, a triple could be : [SciFi] [is] [strong Boss])"]}),I.jsx("p",{children:"This keeps our attestations tidy !"})]}),I.jsxs("div",{className:"flex flex-col items-center gap-2 w-5/6 mx-auto text-base",children:[I.jsxs("p",{children:["You need to connect your ",I.jsx("span",{style:{color:"#FFD32A"},children:"wallet (ETH - Base network)"})," and pay ",I.jsx("span",{style:{color:"#FFD32A"},children:"0.0001 ETH (less than $0.40)"})," to create your player !"]}),I.jsxs("button",{className:"max-w-xs justify-center whitespace-nowrap rounded-md text-sm focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 bg-primary text-background shadow hover:bg-primary/90 font-bold uppercase h-12 px-4 py-2 flex items-center transition-transform duration-200 hover:scale-105 mt-4 mb-8",onClick:l,children:[I.jsx("img",{src:xT,alt:"Atom",style:{width:"44px",marginRight:"10px"}}),"CREATE YOUR PLAYER"]})]})]})};function LO(r,e){const i=r.exec(e);return i==null?void 0:i.groups}const _T=/^tuple(?<array>(\[(\d*)\])*)$/;function ry(r){let e=r.type;if(_T.test(r.type)&&"components"in r){e="(";const i=r.components.length;for(let s=0;s<i;s++){const a=r.components[s];e+=ry(a),s<i-1&&(e+=", ")}const n=LO(_T,r.type);return e+=`)${(n==null?void 0:n.array)??""}`,ry({...r,type:e})}return"indexed"in r&&r.indexed&&(e=`${e} indexed`),r.name?`${e} ${r.name}`:e}function Xc(r){let e="";const i=r.length;for(let n=0;n<i;n++){const s=r[n];e+=ry(s),n!==i-1&&(e+=", ")}return e}function kO(r){var e;return r.type==="function"?`function ${r.name}(${Xc(r.inputs)})${r.stateMutability&&r.stateMutability!=="nonpayable"?` ${r.stateMutability}`:""}${(e=r.outputs)!=null&&e.length?` returns (${Xc(r.outputs)})`:""}`:r.type==="event"?`event ${r.name}(${Xc(r.inputs)})`:r.type==="error"?`error ${r.name}(${Xc(r.inputs)})`:r.type==="constructor"?`constructor(${Xc(r.inputs)})${r.stateMutability==="payable"?" payable":""}`:r.type==="fallback"?`fallback() external${r.stateMutability==="payable"?" payable":""}`:"receive() external payable"}function ny(r,{strict:e=!0}={}){return!r||typeof r!="string"?!1:e?/^0x[0-9a-fA-F]*$/.test(r):r.startsWith("0x")}function TT(r){return ny(r,{strict:!1})?Math.ceil((r.length-2)/2):r.length}const wT="2.38.0";let Yc={getDocsUrl:({docsBaseUrl:r,docsPath:e="",docsSlug:i})=>e?`${r??"https://viem.sh"}${e}${i?`#${i}`:""}`:void 0,version:`viem@${wT}`};class cn extends Error{constructor(e,i={}){var l;const n=(()=>{var u;return i.cause instanceof cn?i.cause.details:(u=i.cause)!=null&&u.message?i.cause.message:i.details})(),s=i.cause instanceof cn&&i.cause.docsPath||i.docsPath,a=(l=Yc.getDocsUrl)==null?void 0:l.call(Yc,{...i,docsPath:s}),o=[e||"An error occurred.","",...i.metaMessages?[...i.metaMessages,""]:[],...a?[`Docs: ${a}`]:[],...n?[`Details: ${n}`]:[],...Yc.version?[`Version: ${Yc.version}`]:[]].join(`
30
+ <%s key={someKey} {...props} />`,Ze,Ae,it,Ae),bo[Ae+Ze]=!0}}return N===n?ln(ie):Nr(ie),ie}}function $n(N,ee,de){return xo(N,ee,de,!0)}function Pl(N,ee,de){return xo(N,ee,de,!1)}var jc=Pl,Vc=$n;qc.Fragment=n,qc.jsx=jc,qc.jsxs=Vc}()),qc}process.env.NODE_ENV==="production"?ty.exports=OO():ty.exports=DO();var I=ty.exports;const bT="data:image/svg+xml,%3csvg%20width='300'%20height='50'%20viewBox='0%200%20500%2084'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3crect%20width='500'%20height='84'%20fill='url(%23pattern0_10_2)'/%3e%3cdefs%3e%3cpattern%20id='pattern0_10_2'%20patternContentUnits='objectBoundingBox'%20width='1'%20height='1'%3e%3cuse%20xlink:href='%23image0_10_2'%20transform='scale(0.002%200.0119048)'/%3e%3c/pattern%3e%3cimage%20id='image0_10_2'%20width='500'%20height='84'%20preserveAspectRatio='none'%20xlink:href='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAfQAAABUCAYAAAB0vcXQAAAAAXNSR0IArs4c6QAAIABJREFUeF7tXQeYJFW5vfdWro4zw2wgioCoJEUMwDOsGEAFFR/6RFEREAH1IUpQQaIEFcWEiiAGVIKib0URFFBEfQbQJ+CCgODCssvuhE5VXfm+PjVVQ01vz0x3T/eE3arvQ2S6wr3/Def+6fyULPC1YcOGjKZpewiC8JwgCPZkjD07CIIVlNICISRPCMG/JUJImVJa4ZzXov//YBAED3iet0bTtPtVVX2MUore8AXuUvr5VAKpBFIJpBJYaAkADjpGg64eWuieTn4/RMD5vsrl8m6CILyRc/56wsl/EEoEQkhXbclms8S2beL7/oZ6vf6rTCbzy2q1euuyZcs2RO/seEh7Io+lPS96IoIt9SWLeWgXc9u21PmwNPqVzoylMU5za2VXINrNJyuVyrMppScSQt5KCFk+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IijOdd1/EULuKRaLv5rRlN4/+W1VEzLtbCqBVAKpBFIJLF4J/D/xclRhztyp5QAAAABJRU5ErkJggg=='/%3e%3c/defs%3e%3c/svg%3e",xT="data:image/svg+xml,%3csvg%20width='45'%20height='44'%20viewBox='0%200%2045%2044'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M22.0836%2026.4C24.5136%2026.4%2026.4836%2024.4301%2026.4836%2022C26.4836%2019.57%2024.5136%2017.6%2022.0836%2017.6C19.6535%2017.6%2017.6836%2019.57%2017.6836%2022C17.6836%2024.4301%2019.6535%2026.4%2022.0836%2026.4Z'%20fill='black'/%3e%3cpath%20d='M22.0844%2028.6C31.8046%2028.6%2039.6844%2025.6451%2039.6844%2022C39.6844%2018.3549%2031.8046%2015.4%2022.0844%2015.4C12.3642%2015.4%204.48438%2018.3549%204.48438%2022C4.48438%2025.6451%2012.3642%2028.6%2022.0844%2028.6Z'%20stroke='black'%20stroke-width='0.72'/%3e%3cpath%20d='M16.3685%2025.3C21.2286%2033.7179%2027.7275%2039.0645%2030.8842%2037.242C34.041%2035.4195%2032.6601%2027.1179%2027.8%2018.7C22.9399%2010.282%2016.441%204.93539%2013.2842%206.75793C10.1275%208.58047%2011.5084%2016.882%2016.3685%2025.3Z'%20stroke='black'%20stroke-width='0.72'/%3e%3cpath%20d='M16.3681%2018.7C11.508%2027.1179%2010.1271%2035.4195%2013.2838%2037.242C16.4406%2039.0646%2022.9395%2033.7179%2027.7996%2025.3C32.6597%2016.882%2034.0406%208.58048%2030.8838%206.75794C27.7271%204.9354%2021.2282%2010.282%2016.3681%2018.7Z'%20stroke='black'%20stroke-width='0.72'/%3e%3cpath%20d='M39.6844%2024.2C40.8994%2024.2%2041.8844%2023.215%2041.8844%2022C41.8844%2020.785%2040.8994%2019.8%2039.6844%2019.8C38.4693%2019.8%2037.4844%2020.785%2037.4844%2022C37.4844%2023.215%2038.4693%2024.2%2039.6844%2024.2Z'%20fill='black'/%3e%3cpath%20d='M13.284%2029.92C14.499%2029.92%2015.484%2028.935%2015.484%2027.72C15.484%2026.505%2014.499%2025.52%2013.284%2025.52C12.069%2025.52%2011.084%2026.505%2011.084%2027.72C11.084%2028.935%2012.069%2029.92%2013.284%2029.92Z'%20fill='black'/%3e%3cpath%20d='M13.284%2018.48C14.499%2018.48%2015.484%2017.495%2015.484%2016.28C15.484%2015.065%2014.499%2014.08%2013.284%2014.08C12.069%2014.08%2011.084%2015.065%2011.084%2016.28C11.084%2017.495%2012.069%2018.48%2013.284%2018.48Z'%20fill='black'/%3e%3c/svg%3e",iy=({walletConnected:r,walletAddress:e,wagmiConfig:i,walletHooks:n,onClose:s,isOpen:a,onCreatePlayer:o})=>{r&&(e||r.account&&r.account.address);const l=()=>{o&&o()};return I.jsxs("div",{style:{width:"80%",display:"flex",flexDirection:"column",margin:"auto",padding:"20px",alignItems:"center"},children:[I.jsx("div",{style:{position:"absolute",top:"0",left:"10%",width:"80%",height:"20px",backgroundColor:"#FFD32A",borderTopLeftRadius:"20px",borderTopRightRadius:"20px"}}),I.jsx("div",{style:{position:"absolute",bottom:"0",left:"10%",width:"80%",height:"20px",backgroundColor:"#FFD32A",borderBottomLeftRadius:"20px",borderBottomRightRadius:"20px"}}),I.jsx("img",{src:bT,alt:"Intuition Logo",style:{width:"350px",marginTop:"20px"},className:"mx-auto block"}),I.jsx("h2",{style:{fontSize:"1.0em",margin:"0 0 20px 0",color:"#FFD32A",fontWeight:"bold",textAlign:"center"},className:"w-full text-center",children:"BOSS FIGHTERS COMMUNITY PLAYER MAP"}),I.jsxs("div",{className:"flex flex-col gap-2 w-5/6 mx-auto text-base text-left",children:[I.jsx("p",{children:"At first, there was nothing. And then, suddenly, the whole community appeared !"}),I.jsx("p",{children:"Everything of which the Boss Fighters community would one day be composed, would be born in an instant."}),I.jsx("p",{children:"A single species of condensed matter, exploding in a vast universe."}),I.jsx("p",{children:"Although energy would neither be created nor destroyed, the interaction between these newly-created atoms would continue to create something beautiful..."}),I.jsx("p",{children:"What had been separate would become whole again. And what would be created in the process would be even more beautiful than what came before..."}),I.jsx("p",{children:"Our story begins with the atom. The cornerstone of our ecosystem."}),I.jsx("p",{children:'And our "atoms" start with you !'})]}),I.jsxs("div",{className:"flex flex-col gap-2 w-5/6 mx-auto text-base text-left border-2 rounded-xl p-4 my-6",style:{borderColor:"#FFD32A",borderStyle:"solid",borderWidth:2,borderRadius:10},children:[I.jsxs("p",{children:[I.jsx("span",{style:{color:"#FFD32A"},children:"Claims"})," in Intuition, also referred to as ",I.jsx("span",{style:{color:"#FFD32A"},children:'"Triples"'})," ","structured in Semantic Triple format :"]}),I.jsxs("p",{children:["[",I.jsx("span",{style:{color:"#FFD32A"},children:"Subject"}),"] ⇒ [",I.jsx("span",{style:{color:"#FFD32A"},children:"Predicate"}),"] ⇒ [",I.jsx("span",{style:{color:"#FFD32A"},children:"Object"}),"] (For example, a triple could be : [SciFi] [is] [strong Boss])"]}),I.jsx("p",{children:"This keeps our attestations tidy !"})]}),I.jsxs("div",{className:"flex flex-col items-center gap-2 w-5/6 mx-auto text-base",children:[I.jsxs("p",{children:["You need to connect your"," ",I.jsx("span",{style:{color:"#FFD32A"},children:"wallet (ETH - Base network)"})," ","and pay"," ",I.jsx("span",{style:{color:"#FFD32A"},children:"0.0001 ETH (less than $0.40)"})," ","to create your player !"]}),I.jsxs("button",{style:{display:"flex",alignItems:"center",justifyContent:"center",whiteSpace:"nowrap",borderRadius:"6px",fontSize:"14px",outline:"none",border:"none",cursor:"pointer",backgroundColor:"#FFD32A",color:"#000000",boxShadow:"0 1px 3px rgba(0, 0, 0, 0.1)",fontWeight:"bold",textTransform:"uppercase",height:"48px",padding:"8px 16px",marginTop:"16px",marginBottom:"32px",marginLeft:"auto",marginRight:"auto",transition:"transform 0.2s, background-color 0.2s"},onMouseEnter:u=>{u.currentTarget.style.transform="scale(1.05)",u.currentTarget.style.backgroundColor="#FFED4E"},onMouseLeave:u=>{u.currentTarget.style.transform="scale(1)",u.currentTarget.style.backgroundColor="#FFD32A"},onClick:l,children:[I.jsx("img",{src:xT,alt:"Atom",style:{width:"44px",marginRight:"10px"}}),"CREATE YOUR PLAYER"]})]})]})};function LO(r,e){const i=r.exec(e);return i==null?void 0:i.groups}const _T=/^tuple(?<array>(\[(\d*)\])*)$/;function ry(r){let e=r.type;if(_T.test(r.type)&&"components"in r){e="(";const i=r.components.length;for(let s=0;s<i;s++){const a=r.components[s];e+=ry(a),s<i-1&&(e+=", ")}const n=LO(_T,r.type);return e+=`)${(n==null?void 0:n.array)??""}`,ry({...r,type:e})}return"indexed"in r&&r.indexed&&(e=`${e} indexed`),r.name?`${e} ${r.name}`:e}function Xc(r){let e="";const i=r.length;for(let n=0;n<i;n++){const s=r[n];e+=ry(s),n!==i-1&&(e+=", ")}return e}function kO(r){var e;return r.type==="function"?`function ${r.name}(${Xc(r.inputs)})${r.stateMutability&&r.stateMutability!=="nonpayable"?` ${r.stateMutability}`:""}${(e=r.outputs)!=null&&e.length?` returns (${Xc(r.outputs)})`:""}`:r.type==="event"?`event ${r.name}(${Xc(r.inputs)})`:r.type==="error"?`error ${r.name}(${Xc(r.inputs)})`:r.type==="constructor"?`constructor(${Xc(r.inputs)})${r.stateMutability==="payable"?" payable":""}`:r.type==="fallback"?`fallback() external${r.stateMutability==="payable"?" payable":""}`:"receive() external payable"}function ny(r,{strict:e=!0}={}){return!r||typeof r!="string"?!1:e?/^0x[0-9a-fA-F]*$/.test(r):r.startsWith("0x")}function TT(r){return ny(r,{strict:!1})?Math.ceil((r.length-2)/2):r.length}const wT="2.37.7";let Yc={getDocsUrl:({docsBaseUrl:r,docsPath:e="",docsSlug:i})=>e?`${r??"https://viem.sh"}${e}${i?`#${i}`:""}`:void 0,version:`viem@${wT}`};class cn extends Error{constructor(e,i={}){var l;const n=(()=>{var u;return i.cause instanceof cn?i.cause.details:(u=i.cause)!=null&&u.message?i.cause.message:i.details})(),s=i.cause instanceof cn&&i.cause.docsPath||i.docsPath,a=(l=Yc.getDocsUrl)==null?void 0:l.call(Yc,{...i,docsPath:s}),o=[e||"An error occurred.","",...i.metaMessages?[...i.metaMessages,""]:[],...a?[`Docs: ${a}`]:[],...n?[`Details: ${n}`]:[],...Yc.version?[`Version: ${Yc.version}`]:[]].join(`
31
31
  `);super(o,i.cause?{cause:i.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.details=n,this.docsPath=s,this.metaMessages=i.metaMessages,this.name=i.name??this.name,this.shortMessage=e,this.version=wT}walk(e){return ST(this,e)}}function ST(r,e){return e!=null&&e(r)?r:r&&typeof r=="object"&&"cause"in r&&r.cause!==void 0?ST(r.cause,e):e?null:r}class UO extends cn{constructor({expectedLength:e,givenLength:i}){super(["ABI encoding params/values length mismatch.",`Expected length (params): ${e}`,`Given length (values): ${i}`].join(`
32
- `),{name:"AbiEncodingLengthMismatchError"})}}class FO extends cn{constructor({expectedSize:e,givenSize:i}){super(`Expected bytes${e}, got bytes${i}.`,{name:"BytesSizeMismatchError"})}}class BO extends cn{constructor(e){super(`Type "${e}" is not supported for packed encoding.`,{name:"UnsupportedPackedAbiType"})}}class ET extends cn{constructor({size:e,targetSize:i,type:n}){super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} size (${e}) exceeds padding size (${i}).`,{name:"SizeExceedsPaddingSizeError"})}}function Ss(r,{dir:e,size:i=32}={}){return typeof r=="string"?zO(r,{dir:e,size:i}):jO(r,{dir:e,size:i})}function zO(r,{dir:e,size:i=32}={}){if(i===null)return r;const n=r.replace("0x","");if(n.length>i*2)throw new ET({size:Math.ceil(n.length/2),targetSize:i,type:"hex"});return`0x${n[e==="right"?"padEnd":"padStart"](i*2,"0")}`}function jO(r,{dir:e,size:i=32}={}){if(i===null)return r;if(r.length>i)throw new ET({size:r.length,targetSize:i,type:"bytes"});const n=new Uint8Array(i);for(let s=0;s<i;s++){const a=e==="right";n[a?s:i-s-1]=r[a?s:r.length-s-1]}return n}class VO extends cn{constructor({max:e,min:i,signed:n,size:s,value:a}){super(`Number "${a}" is not in safe ${s?`${s*8}-bit ${n?"signed":"unsigned"} `:""}integer range ${e?`(${i} to ${e})`:`(above ${i})`}`,{name:"IntegerOutOfRangeError"})}}class GO extends cn{constructor({givenSize:e,maxSize:i}){super(`Size cannot exceed ${i} bytes. Given size: ${e} bytes.`,{name:"SizeOverflowError"})}}function Kc(r,{size:e}){if(TT(r)>e)throw new GO({givenSize:TT(r),maxSize:e})}const HO=Array.from({length:256},(r,e)=>e.toString(16).padStart(2,"0"));function MT(r,e={}){return typeof r=="number"||typeof r=="bigint"?sy(r,e):typeof r=="string"?RT(r,e):typeof r=="boolean"?AT(r,e):CT(r,e)}function AT(r,e={}){const i=`0x${Number(r)}`;return typeof e.size=="number"?(Kc(i,{size:e.size}),Ss(i,{size:e.size})):i}function CT(r,e={}){let i="";for(let s=0;s<r.length;s++)i+=HO[r[s]];const n=`0x${i}`;return typeof e.size=="number"?(Kc(n,{size:e.size}),Ss(n,{dir:"right",size:e.size})):n}function sy(r,e={}){const{signed:i,size:n}=e,s=BigInt(r);let a;n?i?a=(1n<<BigInt(n)*8n-1n)-1n:a=2n**(BigInt(n)*8n)-1n:typeof r=="number"&&(a=BigInt(Number.MAX_SAFE_INTEGER));const o=typeof a=="bigint"&&i?-a-1n:0;if(a&&s>a||s<o){const u=typeof r=="bigint"?"n":"";throw new VO({max:a?`${a}${u}`:void 0,min:`${o}${u}`,signed:i,size:n,value:`${r}${u}`})}const l=`0x${(i&&s<0?(1n<<BigInt(n*8))+BigInt(s):s).toString(16)}`;return n?Ss(l,{size:n}):l}const WO=new TextEncoder;function RT(r,e={}){const i=WO.encode(r);return CT(i,e)}const qO=new TextEncoder;function NT(r,e={}){return typeof r=="number"||typeof r=="bigint"?YO(r,e):typeof r=="boolean"?XO(r,e):ny(r)?IT(r,e):OT(r,e)}function XO(r,e={}){const i=new Uint8Array(1);return i[0]=Number(r),typeof e.size=="number"?(Kc(i,{size:e.size}),Ss(i,{size:e.size})):i}const Es={zero:48,nine:57,A:65,F:70,a:97,f:102};function PT(r){if(r>=Es.zero&&r<=Es.nine)return r-Es.zero;if(r>=Es.A&&r<=Es.F)return r-(Es.A-10);if(r>=Es.a&&r<=Es.f)return r-(Es.a-10)}function IT(r,e={}){let i=r;e.size&&(Kc(i,{size:e.size}),i=Ss(i,{dir:"right",size:e.size}));let n=i.slice(2);n.length%2&&(n=`0${n}`);const s=n.length/2,a=new Uint8Array(s);for(let o=0,l=0;o<s;o++){const u=PT(n.charCodeAt(l++)),c=PT(n.charCodeAt(l++));if(u===void 0||c===void 0)throw new cn(`Invalid byte sequence ("${n[l-2]}${n[l-1]}" in "${n}").`);a[o]=u*16+c}return a}function YO(r,e){const i=sy(r,e);return IT(i)}function OT(r,e={}){const i=qO.encode(r);return typeof e.size=="number"?(Kc(i,{size:e.size}),Ss(i,{dir:"right",size:e.size})):i}const ap=BigInt(2**32-1),DT=BigInt(32);function KO(r,e=!1){return e?{h:Number(r&ap),l:Number(r>>DT&ap)}:{h:Number(r>>DT&ap)|0,l:Number(r&ap)|0}}function ZO(r,e=!1){const i=r.length;let n=new Uint32Array(i),s=new Uint32Array(i);for(let a=0;a<i;a++){const{h:o,l}=KO(r[a],e);[n[a],s[a]]=[o,l]}return[n,s]}const QO=(r,e,i)=>r<<i|e>>>32-i,$O=(r,e,i)=>e<<i|r>>>32-i,JO=(r,e,i)=>e<<i-32|r>>>64-i,eD=(r,e,i)=>r<<i-32|e>>>64-i;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function tD(r){return r instanceof Uint8Array||ArrayBuffer.isView(r)&&r.constructor.name==="Uint8Array"}function LT(r){if(!Number.isSafeInteger(r)||r<0)throw new Error("positive integer expected, got "+r)}function op(r,...e){if(!tD(r))throw new Error("Uint8Array expected");if(e.length>0&&!e.includes(r.length))throw new Error("Uint8Array expected of length "+e+", got length="+r.length)}function kT(r,e=!0){if(r.destroyed)throw new Error("Hash instance has been destroyed");if(e&&r.finished)throw new Error("Hash#digest() has already been called")}function iD(r,e){op(r);const i=e.outputLen;if(r.length<i)throw new Error("digestInto() expects output buffer of length at least "+i)}function rD(r){return new Uint32Array(r.buffer,r.byteOffset,Math.floor(r.byteLength/4))}function UT(...r){for(let e=0;e<r.length;e++)r[e].fill(0)}const nD=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function sD(r){return r<<24&4278190080|r<<8&16711680|r>>>8&65280|r>>>24&255}function aD(r){for(let e=0;e<r.length;e++)r[e]=sD(r[e]);return r}const FT=nD?r=>r:aD;function oD(r){if(typeof r!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(r))}function BT(r){return typeof r=="string"&&(r=oD(r)),op(r),r}class lD{}function uD(r){const e=n=>r().update(BT(n)).digest(),i=r();return e.outputLen=i.outputLen,e.blockLen=i.blockLen,e.create=()=>r(),e}const cD=BigInt(0),Zc=BigInt(1),hD=BigInt(2),dD=BigInt(7),pD=BigInt(256),fD=BigInt(113),zT=[],jT=[],VT=[];for(let r=0,e=Zc,i=1,n=0;r<24;r++){[i,n]=[n,(2*i+3*n)%5],zT.push(2*(5*n+i)),jT.push((r+1)*(r+2)/2%64);let s=cD;for(let a=0;a<7;a++)e=(e<<Zc^(e>>dD)*fD)%pD,e&hD&&(s^=Zc<<(Zc<<BigInt(a))-Zc);VT.push(s)}const GT=ZO(VT,!0),mD=GT[0],gD=GT[1],HT=(r,e,i)=>i>32?JO(r,e,i):QO(r,e,i),WT=(r,e,i)=>i>32?eD(r,e,i):$O(r,e,i);function yD(r,e=24){const i=new Uint32Array(10);for(let n=24-e;n<24;n++){for(let o=0;o<10;o++)i[o]=r[o]^r[o+10]^r[o+20]^r[o+30]^r[o+40];for(let o=0;o<10;o+=2){const l=(o+8)%10,u=(o+2)%10,c=i[u],h=i[u+1],d=HT(c,h,1)^i[l],p=WT(c,h,1)^i[l+1];for(let f=0;f<50;f+=10)r[o+f]^=d,r[o+f+1]^=p}let s=r[2],a=r[3];for(let o=0;o<24;o++){const l=jT[o],u=HT(s,a,l),c=WT(s,a,l),h=zT[o];s=r[h],a=r[h+1],r[h]=u,r[h+1]=c}for(let o=0;o<50;o+=10){for(let l=0;l<10;l++)i[l]=r[o+l];for(let l=0;l<10;l++)r[o+l]^=~i[(l+2)%10]&i[(l+4)%10]}r[0]^=mD[n],r[1]^=gD[n]}UT(i)}class ay extends lD{constructor(e,i,n,s=!1,a=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=e,this.suffix=i,this.outputLen=n,this.enableXOF=s,this.rounds=a,LT(n),!(0<e&&e<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=rD(this.state)}clone(){return this._cloneInto()}keccak(){FT(this.state32),yD(this.state32,this.rounds),FT(this.state32),this.posOut=0,this.pos=0}update(e){kT(this),e=BT(e),op(e);const{blockLen:i,state:n}=this,s=e.length;for(let a=0;a<s;){const o=Math.min(i-this.pos,s-a);for(let l=0;l<o;l++)n[this.pos++]^=e[a++];this.pos===i&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:e,suffix:i,pos:n,blockLen:s}=this;e[n]^=i,i&128&&n===s-1&&this.keccak(),e[s-1]^=128,this.keccak()}writeInto(e){kT(this,!1),op(e),this.finish();const i=this.state,{blockLen:n}=this;for(let s=0,a=e.length;s<a;){this.posOut>=n&&this.keccak();const o=Math.min(n-this.posOut,a-s);e.set(i.subarray(this.posOut,this.posOut+o),s),this.posOut+=o,s+=o}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return LT(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(iD(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,UT(this.state)}_cloneInto(e){const{blockLen:i,suffix:n,outputLen:s,rounds:a,enableXOF:o}=this;return e||(e=new ay(i,n,s,o,a)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=a,e.suffix=n,e.outputLen=s,e.enableXOF=o,e.destroyed=this.destroyed,e}}const vD=(r,e,i)=>uD(()=>new ay(e,r,i)),bD=vD(1,136,256/8);function oy(r,e){const i=e||"hex",n=bD(ny(r,{strict:!1})?NT(r):r);return i==="bytes"?n:MT(n)}const xD=r=>oy(NT(r));function _D(r){return xD(r)}function TD(r){let e=!0,i="",n=0,s="",a=!1;for(let o=0;o<r.length;o++){const l=r[o];if(["(",")",","].includes(l)&&(e=!0),l==="("&&n++,l===")"&&n--,!!e){if(n===0){if(l===" "&&["event","function",""].includes(s))s="";else if(s+=l,l===")"){a=!0;break}continue}if(l===" "){r[o-1]!==","&&i!==","&&i!==",("&&(i="",e=!1);continue}s+=l,i+=l}}if(!a)throw new cn("Unable to normalize signature.");return s}const wD=r=>{const e=typeof r=="string"?r:kO(r);return TD(e)};function SD(r){return _D(wD(r))}const ED=SD;class MD extends cn{constructor({address:e}){super(`Address "${e}" is invalid.`,{metaMessages:["- Address must be a hex value of 20 bytes (40 hex characters).","- Address must match its checksum counterpart."],name:"InvalidAddressError"})}}class qT extends Map{constructor(e){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=e}get(e){const i=super.get(e);return super.has(e)&&i!==void 0&&(this.delete(e),super.set(e,i)),i}set(e,i){if(super.set(e,i),this.maxSize&&this.size>this.maxSize){const n=this.keys().next().value;n&&this.delete(n)}return this}}const ly=new qT(8192);function AD(r,e){if(ly.has(`${r}.${e}`))return ly.get(`${r}.${e}`);const i=r.substring(2).toLowerCase(),n=oy(OT(i),"bytes"),s=i.split("");for(let o=0;o<40;o+=2)n[o>>1]>>4>=8&&s[o]&&(s[o]=s[o].toUpperCase()),(n[o>>1]&15)>=8&&s[o+1]&&(s[o+1]=s[o+1].toUpperCase());const a=`0x${s.join("")}`;return ly.set(`${r}.${e}`,a),a}const CD=/^0x[a-fA-F0-9]{40}$/,uy=new qT(8192);function RD(r,e){const{strict:i=!0}={},n=`${r}.${i}`;if(uy.has(n))return uy.get(n);const s=CD.test(r)?r.toLowerCase()===r?!0:i?AD(r)===r:!0:!1;return uy.set(n,s),s}function XT(r){return`0x${r.reduce((e,i)=>e+i.replace("0x",""),"")}`}const ND=/^(.*)\[([0-9]*)\]$/,PD=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,ID=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;function OD(r,e){if(r.length!==e.length)throw new UO({expectedLength:r.length,givenLength:e.length});const i=[];for(let n=0;n<r.length;n++){const s=r[n],a=e[n];i.push(YT(s,a))}return XT(i)}function YT(r,e,i=!1){if(r==="address"){const o=e;if(!RD(o))throw new MD({address:o});return Ss(o.toLowerCase(),{size:i?32:null})}if(r==="string")return RT(e);if(r==="bytes")return e;if(r==="bool")return Ss(AT(e),{size:i?32:1});const n=r.match(ID);if(n){const[o,l,u="256"]=n,c=Number.parseInt(u,10)/8;return sy(e,{size:i?32:c,signed:l==="int"})}const s=r.match(PD);if(s){const[o,l]=s;if(Number.parseInt(l,10)!==(e.length-2)/2)throw new FO({expectedSize:Number.parseInt(l,10),givenSize:(e.length-2)/2});return Ss(e,{dir:"right",size:i?32:null})}const a=r.match(ND);if(a&&Array.isArray(e)){const[o,l]=a,u=[];for(let c=0;c<e.length;c++)u.push(YT(l,e[c],!0));return u.length===0?"0x":XT(u)}throw new BO(r)}const wo="0xB92EA1B47E4ABD0a520E9138BB59dBd1bC6C475B",DD=13579,KT=BigInt("10000000000000000"),ZT=BigInt("10000000000000000"),Ll=[{type:"function",name:"BURN_ADDRESS",inputs:[],outputs:[{name:"",type:"address",internalType:"address"}],stateMutability:"view"},{type:"function",name:"CONTROLLER_ROLE",inputs:[],outputs:[{name:"",type:"bytes32",internalType:"bytes32"}],stateMutability:"view"},{type:"function",name:"COUNTER_SALT",inputs:[],outputs:[{name:"",type:"bytes32",internalType:"bytes32"}],stateMutability:"view"},{type:"function",name:"DEFAULT_ADMIN_ROLE",inputs:[],outputs:[{name:"",type:"bytes32",internalType:"bytes32"}],stateMutability:"view"},{type:"function",name:"MAX_BATCH_SIZE",inputs:[],outputs:[{name:"",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"function",name:"MIGRATOR_ROLE",inputs:[],outputs:[{name:"",type:"bytes32",internalType:"bytes32"}],stateMutability:"view"},{type:"function",name:"ONE_SHARE",inputs:[],outputs:[{name:"",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"function",name:"_maxRedeem",inputs:[{name:"sender",type:"address",internalType:"address"},{name:"termId",type:"bytes32",internalType:"bytes32"},{name:"curveId",type:"uint256",internalType:"uint256"}],outputs:[{name:"",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"function",name:"accumulatedAtomWalletDepositFees",inputs:[{name:"atomWallet",type:"address",internalType:"address"}],outputs:[{name:"accumulatedFees",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"function",name:"accumulatedProtocolFees",inputs:[{name:"epoch",type:"uint256",internalType:"uint256"}],outputs:[{name:"accumulatedFees",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"function",name:"approve",inputs:[{name:"sender",type:"address",internalType:"address"},{name:"approvalType",type:"uint8",internalType:"enum IMultiVault.ApprovalTypes"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"atom",inputs:[{name:"atomId",type:"bytes32",internalType:"bytes32"}],outputs:[{name:"data",type:"bytes",internalType:"bytes"}],stateMutability:"view"},{type:"function",name:"atomConfig",inputs:[],outputs:[{name:"atomCreationProtocolFee",type:"uint256",internalType:"uint256"},{name:"atomWalletDepositFee",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"function",name:"atomDepositFractionAmount",inputs:[{name:"assets",type:"uint256",internalType:"uint256"}],outputs:[{name:"",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"function",name:"batchSetAtomData",inputs:[{name:"creators",type:"address[]",internalType:"address[]"},{name:"atomDataArray",type:"bytes[]",internalType:"bytes[]"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"batchSetTripleData",inputs:[{name:"creators",type:"address[]",internalType:"address[]"},{name:"tripleAtomIds",type:"bytes32[3][]",internalType:"bytes32[3][]"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"batchSetUserBalances",inputs:[{name:"params",type:"tuple",internalType:"struct MultiVaultMigrationMode.BatchSetUserBalancesParams",components:[{name:"termIds",type:"bytes32[]",internalType:"bytes32[]"},{name:"bondingCurveId",type:"uint256",internalType:"uint256"},{name:"user",type:"address",internalType:"address"},{name:"userBalances",type:"uint256[]",internalType:"uint256[]"}]}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"batchSetVaultTotals",inputs:[{name:"termIds",type:"bytes32[]",internalType:"bytes32[]"},{name:"bondingCurveId",type:"uint256",internalType:"uint256"},{name:"vaultTotals",type:"tuple[]",internalType:"struct MultiVaultMigrationMode.VaultTotals[]",components:[{name:"totalAssets",type:"uint256",internalType:"uint256"},{name:"totalShares",type:"uint256",internalType:"uint256"}]}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"bondingCurveConfig",inputs:[],outputs:[{name:"registry",type:"address",internalType:"address"},{name:"defaultCurveId",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"function",name:"calculateAtomId",inputs:[{name:"data",type:"bytes",internalType:"bytes"}],outputs:[{name:"id",type:"bytes32",internalType:"bytes32"}],stateMutability:"pure"},{type:"function",name:"calculateCounterTripleId",inputs:[{name:"subjectId",type:"bytes32",internalType:"bytes32"},{name:"predicateId",type:"bytes32",internalType:"bytes32"},{name:"objectId",type:"bytes32",internalType:"bytes32"}],outputs:[{name:"",type:"bytes32",internalType:"bytes32"}],stateMutability:"pure"},{type:"function",name:"calculateTripleId",inputs:[{name:"subjectId",type:"bytes32",internalType:"bytes32"},{name:"predicateId",type:"bytes32",internalType:"bytes32"},{name:"objectId",type:"bytes32",internalType:"bytes32"}],outputs:[{name:"",type:"bytes32",internalType:"bytes32"}],stateMutability:"pure"},{type:"function",name:"claimAtomWalletDepositFees",inputs:[{name:"termId",type:"bytes32",internalType:"bytes32"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"computeAtomWalletAddr",inputs:[{name:"atomId",type:"bytes32",internalType:"bytes32"}],outputs:[{name:"",type:"address",internalType:"address"}],stateMutability:"view"},{type:"function",name:"convertToAssets",inputs:[{name:"termId",type:"bytes32",internalType:"bytes32"},{name:"bondingCurveId",type:"uint256",internalType:"uint256"},{name:"shares",type:"uint256",internalType:"uint256"}],outputs:[{name:"",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"function",name:"convertToShares",inputs:[{name:"termId",type:"bytes32",internalType:"bytes32"},{name:"curveId",type:"uint256",internalType:"uint256"},{name:"assets",type:"uint256",internalType:"uint256"}],outputs:[{name:"",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"function",name:"createAtoms",inputs:[{name:"data",type:"bytes[]",internalType:"bytes[]"},{name:"assets",type:"uint256[]",internalType:"uint256[]"}],outputs:[{name:"",type:"bytes32[]",internalType:"bytes32[]"}],stateMutability:"payable"},{type:"function",name:"createTriples",inputs:[{name:"subjectIds",type:"bytes32[]",internalType:"bytes32[]"},{name:"predicateIds",type:"bytes32[]",internalType:"bytes32[]"},{name:"objectIds",type:"bytes32[]",internalType:"bytes32[]"},{name:"assets",type:"uint256[]",internalType:"uint256[]"}],outputs:[{name:"",type:"bytes32[]",internalType:"bytes32[]"}],stateMutability:"payable"},{type:"function",name:"currentEpoch",inputs:[],outputs:[{name:"",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"function",name:"currentSharePrice",inputs:[{name:"termId",type:"bytes32",internalType:"bytes32"},{name:"curveId",type:"uint256",internalType:"uint256"}],outputs:[{name:"",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"function",name:"deposit",inputs:[{name:"receiver",type:"address",internalType:"address"},{name:"termId",type:"bytes32",internalType:"bytes32"},{name:"curveId",type:"uint256",internalType:"uint256"},{name:"minShares",type:"uint256",internalType:"uint256"}],outputs:[{name:"",type:"uint256",internalType:"uint256"}],stateMutability:"payable"},{type:"function",name:"depositBatch",inputs:[{name:"receiver",type:"address",internalType:"address"},{name:"termIds",type:"bytes32[]",internalType:"bytes32[]"},{name:"curveIds",type:"uint256[]",internalType:"uint256[]"},{name:"assets",type:"uint256[]",internalType:"uint256[]"},{name:"minShares",type:"uint256[]",internalType:"uint256[]"}],outputs:[{name:"shares",type:"uint256[]",internalType:"uint256[]"}],stateMutability:"payable"},{type:"function",name:"entryFeeAmount",inputs:[{name:"assets",type:"uint256",internalType:"uint256"}],outputs:[{name:"",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"function",name:"exitFeeAmount",inputs:[{name:"assets",type:"uint256",internalType:"uint256"}],outputs:[{name:"",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"function",name:"generalConfig",inputs:[],outputs:[{name:"admin",type:"address",internalType:"address"},{name:"protocolMultisig",type:"address",internalType:"address"},{name:"feeDenominator",type:"uint256",internalType:"uint256"},{name:"trustBonding",type:"address",internalType:"address"},{name:"minDeposit",type:"uint256",internalType:"uint256"},{name:"minShare",type:"uint256",internalType:"uint256"},{name:"atomDataMaxLength",type:"uint256",internalType:"uint256"},{name:"decimalPrecision",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"function",name:"getAtom",inputs:[{name:"atomId",type:"bytes32",internalType:"bytes32"}],outputs:[{name:"data",type:"bytes",internalType:"bytes"}],stateMutability:"view"},{type:"function",name:"getAtomConfig",inputs:[],outputs:[{name:"",type:"tuple",internalType:"struct AtomConfig",components:[{name:"atomCreationProtocolFee",type:"uint256",internalType:"uint256"},{name:"atomWalletDepositFee",type:"uint256",internalType:"uint256"}]}],stateMutability:"view"},{type:"function",name:"getAtomCost",inputs:[],outputs:[{name:"",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"function",name:"getAtomCreationCost",inputs:[],outputs:[{name:"",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"function",name:"getAtomWarden",inputs:[],outputs:[{name:"",type:"address",internalType:"address"}],stateMutability:"view"},{type:"function",name:"getBondingCurveConfig",inputs:[],outputs:[{name:"",type:"tuple",internalType:"struct BondingCurveConfig",components:[{name:"registry",type:"address",internalType:"address"},{name:"defaultCurveId",type:"uint256",internalType:"uint256"}]}],stateMutability:"view"},{type:"function",name:"getCounterIdFromTripleId",inputs:[{name:"tripleId",type:"bytes32",internalType:"bytes32"}],outputs:[{name:"",type:"bytes32",internalType:"bytes32"}],stateMutability:"pure"},{type:"function",name:"getDefaultCurveId",inputs:[],outputs:[{name:"",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"function",name:"getGeneralConfig",inputs:[],outputs:[{name:"",type:"tuple",internalType:"struct GeneralConfig",components:[{name:"admin",type:"address",internalType:"address"},{name:"protocolMultisig",type:"address",internalType:"address"},{name:"feeDenominator",type:"uint256",internalType:"uint256"},{name:"trustBonding",type:"address",internalType:"address"},{name:"minDeposit",type:"uint256",internalType:"uint256"},{name:"minShare",type:"uint256",internalType:"uint256"},{name:"atomDataMaxLength",type:"uint256",internalType:"uint256"},{name:"decimalPrecision",type:"uint256",internalType:"uint256"}]}],stateMutability:"view"},{type:"function",name:"getRoleAdmin",inputs:[{name:"role",type:"bytes32",internalType:"bytes32"}],outputs:[{name:"",type:"bytes32",internalType:"bytes32"}],stateMutability:"view"},{type:"function",name:"getShares",inputs:[{name:"account",type:"address",internalType:"address"},{name:"termId",type:"bytes32",internalType:"bytes32"},{name:"curveId",type:"uint256",internalType:"uint256"}],outputs:[{name:"",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"function",name:"getTotalUtilizationForEpoch",inputs:[{name:"epoch",type:"uint256",internalType:"uint256"}],outputs:[{name:"",type:"int256",internalType:"int256"}],stateMutability:"view"},{type:"function",name:"getTriple",inputs:[{name:"tripleId",type:"bytes32",internalType:"bytes32"}],outputs:[{name:"",type:"bytes32",internalType:"bytes32"},{name:"",type:"bytes32",internalType:"bytes32"},{name:"",type:"bytes32",internalType:"bytes32"}],stateMutability:"view"},{type:"function",name:"getTripleConfig",inputs:[],outputs:[{name:"",type:"tuple",internalType:"struct TripleConfig",components:[{name:"tripleCreationProtocolFee",type:"uint256",internalType:"uint256"},{name:"totalAtomDepositsOnTripleCreation",type:"uint256",internalType:"uint256"},{name:"atomDepositFractionForTriple",type:"uint256",internalType:"uint256"}]}],stateMutability:"view"},{type:"function",name:"getTripleCost",inputs:[],outputs:[{name:"",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"function",name:"getTripleIdFromCounterId",inputs:[{name:"counterId",type:"bytes32",internalType:"bytes32"}],outputs:[{name:"",type:"bytes32",internalType:"bytes32"}],stateMutability:"view"},{type:"function",name:"getUserUtilizationForEpoch",inputs:[{name:"user",type:"address",internalType:"address"},{name:"epoch",type:"uint256",internalType:"uint256"}],outputs:[{name:"",type:"int256",internalType:"int256"}],stateMutability:"view"},{type:"function",name:"getVault",inputs:[{name:"termId",type:"bytes32",internalType:"bytes32"},{name:"curveId",type:"uint256",internalType:"uint256"}],outputs:[{name:"",type:"uint256",internalType:"uint256"},{name:"",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"function",name:"getVaultFees",inputs:[],outputs:[{name:"",type:"tuple",internalType:"struct VaultFees",components:[{name:"entryFee",type:"uint256",internalType:"uint256"},{name:"exitFee",type:"uint256",internalType:"uint256"},{name:"protocolFee",type:"uint256",internalType:"uint256"}]}],stateMutability:"view"},{type:"function",name:"getVaultType",inputs:[{name:"termId",type:"bytes32",internalType:"bytes32"}],outputs:[{name:"",type:"uint8",internalType:"enum IMultiVault.VaultType"}],stateMutability:"view"},{type:"function",name:"getWalletConfig",inputs:[],outputs:[{name:"",type:"tuple",internalType:"struct WalletConfig",components:[{name:"permit2",type:"address",internalType:"contract IPermit2"},{name:"entryPoint",type:"address",internalType:"address"},{name:"atomWarden",type:"address",internalType:"address"},{name:"atomWalletBeacon",type:"address",internalType:"address"},{name:"atomWalletFactory",type:"address",internalType:"address"}]}],stateMutability:"view"},{type:"function",name:"grantRole",inputs:[{name:"role",type:"bytes32",internalType:"bytes32"},{name:"account",type:"address",internalType:"address"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"hasRole",inputs:[{name:"role",type:"bytes32",internalType:"bytes32"},{name:"account",type:"address",internalType:"address"}],outputs:[{name:"",type:"bool",internalType:"bool"}],stateMutability:"view"},{type:"function",name:"initialize",inputs:[{name:"_generalConfig",type:"tuple",internalType:"struct GeneralConfig",components:[{name:"admin",type:"address",internalType:"address"},{name:"protocolMultisig",type:"address",internalType:"address"},{name:"feeDenominator",type:"uint256",internalType:"uint256"},{name:"trustBonding",type:"address",internalType:"address"},{name:"minDeposit",type:"uint256",internalType:"uint256"},{name:"minShare",type:"uint256",internalType:"uint256"},{name:"atomDataMaxLength",type:"uint256",internalType:"uint256"},{name:"decimalPrecision",type:"uint256",internalType:"uint256"}]},{name:"_atomConfig",type:"tuple",internalType:"struct AtomConfig",components:[{name:"atomCreationProtocolFee",type:"uint256",internalType:"uint256"},{name:"atomWalletDepositFee",type:"uint256",internalType:"uint256"}]},{name:"_tripleConfig",type:"tuple",internalType:"struct TripleConfig",components:[{name:"tripleCreationProtocolFee",type:"uint256",internalType:"uint256"},{name:"totalAtomDepositsOnTripleCreation",type:"uint256",internalType:"uint256"},{name:"atomDepositFractionForTriple",type:"uint256",internalType:"uint256"}]},{name:"_walletConfig",type:"tuple",internalType:"struct WalletConfig",components:[{name:"permit2",type:"address",internalType:"contract IPermit2"},{name:"entryPoint",type:"address",internalType:"address"},{name:"atomWarden",type:"address",internalType:"address"},{name:"atomWalletBeacon",type:"address",internalType:"address"},{name:"atomWalletFactory",type:"address",internalType:"address"}]},{name:"_vaultFees",type:"tuple",internalType:"struct VaultFees",components:[{name:"entryFee",type:"uint256",internalType:"uint256"},{name:"exitFee",type:"uint256",internalType:"uint256"},{name:"protocolFee",type:"uint256",internalType:"uint256"}]},{name:"_bondingCurveConfig",type:"tuple",internalType:"struct BondingCurveConfig",components:[{name:"registry",type:"address",internalType:"address"},{name:"defaultCurveId",type:"uint256",internalType:"uint256"}]}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"isAtom",inputs:[{name:"atomId",type:"bytes32",internalType:"bytes32"}],outputs:[{name:"",type:"bool",internalType:"bool"}],stateMutability:"view"},{type:"function",name:"isCounterTriple",inputs:[{name:"termId",type:"bytes32",internalType:"bytes32"}],outputs:[{name:"",type:"bool",internalType:"bool"}],stateMutability:"view"},{type:"function",name:"isTermCreated",inputs:[{name:"id",type:"bytes32",internalType:"bytes32"}],outputs:[{name:"",type:"bool",internalType:"bool"}],stateMutability:"view"},{type:"function",name:"isTriple",inputs:[{name:"termId",type:"bytes32",internalType:"bytes32"}],outputs:[{name:"",type:"bool",internalType:"bool"}],stateMutability:"view"},{type:"function",name:"lastActiveEpoch",inputs:[{name:"user",type:"address",internalType:"address"}],outputs:[{name:"epoch",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"function",name:"pause",inputs:[],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"paused",inputs:[],outputs:[{name:"",type:"bool",internalType:"bool"}],stateMutability:"view"},{type:"function",name:"personalUtilization",inputs:[{name:"user",type:"address",internalType:"address"},{name:"epoch",type:"uint256",internalType:"uint256"}],outputs:[{name:"utilizationAmount",type:"int256",internalType:"int256"}],stateMutability:"view"},{type:"function",name:"previewAtomCreate",inputs:[{name:"termId",type:"bytes32",internalType:"bytes32"},{name:"curveId",type:"uint256",internalType:"uint256"},{name:"assets",type:"uint256",internalType:"uint256"}],outputs:[{name:"shares",type:"uint256",internalType:"uint256"},{name:"assetsAfterFixedFees",type:"uint256",internalType:"uint256"},{name:"assetsAfterFees",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"function",name:"previewDeposit",inputs:[{name:"termId",type:"bytes32",internalType:"bytes32"},{name:"curveId",type:"uint256",internalType:"uint256"},{name:"assets",type:"uint256",internalType:"uint256"}],outputs:[{name:"shares",type:"uint256",internalType:"uint256"},{name:"assetsAfterFees",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"function",name:"previewRedeem",inputs:[{name:"termId",type:"bytes32",internalType:"bytes32"},{name:"curveId",type:"uint256",internalType:"uint256"},{name:"assets",type:"uint256",internalType:"uint256"}],outputs:[{name:"shares",type:"uint256",internalType:"uint256"},{name:"assetsAfterFees",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"function",name:"previewTripleCreate",inputs:[{name:"termId",type:"bytes32",internalType:"bytes32"},{name:"curveId",type:"uint256",internalType:"uint256"},{name:"assets",type:"uint256",internalType:"uint256"}],outputs:[{name:"shares",type:"uint256",internalType:"uint256"},{name:"assetsAfterFixedFees",type:"uint256",internalType:"uint256"},{name:"assetsAfterFees",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"function",name:"protocolFeeAmount",inputs:[{name:"assets",type:"uint256",internalType:"uint256"}],outputs:[{name:"",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"function",name:"redeem",inputs:[{name:"receiver",type:"address",internalType:"address"},{name:"termId",type:"bytes32",internalType:"bytes32"},{name:"curveId",type:"uint256",internalType:"uint256"},{name:"shares",type:"uint256",internalType:"uint256"},{name:"minAssets",type:"uint256",internalType:"uint256"}],outputs:[{name:"",type:"uint256",internalType:"uint256"}],stateMutability:"nonpayable"},{type:"function",name:"redeemBatch",inputs:[{name:"receiver",type:"address",internalType:"address"},{name:"termIds",type:"bytes32[]",internalType:"bytes32[]"},{name:"curveIds",type:"uint256[]",internalType:"uint256[]"},{name:"shares",type:"uint256[]",internalType:"uint256[]"},{name:"minAssets",type:"uint256[]",internalType:"uint256[]"}],outputs:[{name:"received",type:"uint256[]",internalType:"uint256[]"}],stateMutability:"nonpayable"},{type:"function",name:"renounceRole",inputs:[{name:"role",type:"bytes32",internalType:"bytes32"},{name:"callerConfirmation",type:"address",internalType:"address"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"revokeRole",inputs:[{name:"role",type:"bytes32",internalType:"bytes32"},{name:"account",type:"address",internalType:"address"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"setAtomConfig",inputs:[{name:"_atomConfig",type:"tuple",internalType:"struct AtomConfig",components:[{name:"atomCreationProtocolFee",type:"uint256",internalType:"uint256"},{name:"atomWalletDepositFee",type:"uint256",internalType:"uint256"}]}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"setBondingCurveConfig",inputs:[{name:"_bondingCurveConfig",type:"tuple",internalType:"struct BondingCurveConfig",components:[{name:"registry",type:"address",internalType:"address"},{name:"defaultCurveId",type:"uint256",internalType:"uint256"}]}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"setGeneralConfig",inputs:[{name:"_generalConfig",type:"tuple",internalType:"struct GeneralConfig",components:[{name:"admin",type:"address",internalType:"address"},{name:"protocolMultisig",type:"address",internalType:"address"},{name:"feeDenominator",type:"uint256",internalType:"uint256"},{name:"trustBonding",type:"address",internalType:"address"},{name:"minDeposit",type:"uint256",internalType:"uint256"},{name:"minShare",type:"uint256",internalType:"uint256"},{name:"atomDataMaxLength",type:"uint256",internalType:"uint256"},{name:"decimalPrecision",type:"uint256",internalType:"uint256"}]}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"setTermCount",inputs:[{name:"_termCount",type:"uint256",internalType:"uint256"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"setTripleConfig",inputs:[{name:"_tripleConfig",type:"tuple",internalType:"struct TripleConfig",components:[{name:"tripleCreationProtocolFee",type:"uint256",internalType:"uint256"},{name:"totalAtomDepositsOnTripleCreation",type:"uint256",internalType:"uint256"},{name:"atomDepositFractionForTriple",type:"uint256",internalType:"uint256"}]}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"setVaultFees",inputs:[{name:"_vaultFees",type:"tuple",internalType:"struct VaultFees",components:[{name:"entryFee",type:"uint256",internalType:"uint256"},{name:"exitFee",type:"uint256",internalType:"uint256"},{name:"protocolFee",type:"uint256",internalType:"uint256"}]}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"setWalletConfig",inputs:[{name:"_walletConfig",type:"tuple",internalType:"struct WalletConfig",components:[{name:"permit2",type:"address",internalType:"contract IPermit2"},{name:"entryPoint",type:"address",internalType:"address"},{name:"atomWarden",type:"address",internalType:"address"},{name:"atomWalletBeacon",type:"address",internalType:"address"},{name:"atomWalletFactory",type:"address",internalType:"address"}]}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"supportsInterface",inputs:[{name:"interfaceId",type:"bytes4",internalType:"bytes4"}],outputs:[{name:"",type:"bool",internalType:"bool"}],stateMutability:"view"},{type:"function",name:"totalTermsCreated",inputs:[],outputs:[{name:"",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"function",name:"totalUtilization",inputs:[{name:"epoch",type:"uint256",internalType:"uint256"}],outputs:[{name:"utilizationAmount",type:"int256",internalType:"int256"}],stateMutability:"view"},{type:"function",name:"triple",inputs:[{name:"tripleId",type:"bytes32",internalType:"bytes32"}],outputs:[{name:"",type:"bytes32",internalType:"bytes32"},{name:"",type:"bytes32",internalType:"bytes32"},{name:"",type:"bytes32",internalType:"bytes32"}],stateMutability:"view"},{type:"function",name:"tripleConfig",inputs:[],outputs:[{name:"tripleCreationProtocolFee",type:"uint256",internalType:"uint256"},{name:"totalAtomDepositsOnTripleCreation",type:"uint256",internalType:"uint256"},{name:"atomDepositFractionForTriple",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"function",name:"unpause",inputs:[],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"vaultFees",inputs:[],outputs:[{name:"entryFee",type:"uint256",internalType:"uint256"},{name:"exitFee",type:"uint256",internalType:"uint256"},{name:"protocolFee",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"function",name:"walletConfig",inputs:[],outputs:[{name:"permit2",type:"address",internalType:"contract IPermit2"},{name:"entryPoint",type:"address",internalType:"address"},{name:"atomWarden",type:"address",internalType:"address"},{name:"atomWalletBeacon",type:"address",internalType:"address"},{name:"atomWalletFactory",type:"address",internalType:"address"}],stateMutability:"view"},{type:"event",name:"ApprovalTypeUpdated",inputs:[{name:"sender",type:"address",indexed:!0,internalType:"address"},{name:"receiver",type:"address",indexed:!0,internalType:"address"},{name:"approvalType",type:"uint8",indexed:!1,internalType:"enum IMultiVault.ApprovalTypes"}],anonymous:!1},{type:"event",name:"AtomCreated",inputs:[{name:"creator",type:"address",indexed:!0,internalType:"address"},{name:"termId",type:"bytes32",indexed:!0,internalType:"bytes32"},{name:"atomData",type:"bytes",indexed:!1,internalType:"bytes"},{name:"atomWallet",type:"address",indexed:!1,internalType:"address"}],anonymous:!1},{type:"event",name:"AtomDepositFractionDeposited",inputs:[{name:"termId",type:"bytes32",indexed:!0,internalType:"bytes32"},{name:"sender",type:"address",indexed:!0,internalType:"address"},{name:"amount",type:"uint256",indexed:!1,internalType:"uint256"}],anonymous:!1},{type:"event",name:"AtomWalletDepositFeeCollected",inputs:[{name:"termId",type:"bytes32",indexed:!0,internalType:"bytes32"},{name:"sender",type:"address",indexed:!0,internalType:"address"},{name:"amount",type:"uint256",indexed:!1,internalType:"uint256"}],anonymous:!1},{type:"event",name:"AtomWalletDepositFeesClaimed",inputs:[{name:"termId",type:"bytes32",indexed:!0,internalType:"bytes32"},{name:"atomWalletOwner",type:"address",indexed:!0,internalType:"address"},{name:"feesClaimed",type:"uint256",indexed:!0,internalType:"uint256"}],anonymous:!1},{type:"event",name:"ConfigSynced",inputs:[{name:"caller",type:"address",indexed:!0,internalType:"address"}],anonymous:!1},{type:"event",name:"Deposited",inputs:[{name:"sender",type:"address",indexed:!0,internalType:"address"},{name:"receiver",type:"address",indexed:!0,internalType:"address"},{name:"termId",type:"bytes32",indexed:!0,internalType:"bytes32"},{name:"curveId",type:"uint256",indexed:!1,internalType:"uint256"},{name:"assets",type:"uint256",indexed:!1,internalType:"uint256"},{name:"assetsAfterFees",type:"uint256",indexed:!1,internalType:"uint256"},{name:"shares",type:"uint256",indexed:!1,internalType:"uint256"},{name:"totalShares",type:"uint256",indexed:!1,internalType:"uint256"},{name:"vaultType",type:"uint8",indexed:!1,internalType:"enum IMultiVault.VaultType"}],anonymous:!1},{type:"event",name:"EntryFeeCollected",inputs:[{name:"termId",type:"bytes32",indexed:!0,internalType:"bytes32"},{name:"curveId",type:"uint256",indexed:!0,internalType:"uint256"},{name:"sender",type:"address",indexed:!0,internalType:"address"},{name:"amount",type:"uint256",indexed:!1,internalType:"uint256"}],anonymous:!1},{type:"event",name:"ExitFeeCollected",inputs:[{name:"termId",type:"bytes32",indexed:!0,internalType:"bytes32"},{name:"curveId",type:"uint256",indexed:!0,internalType:"uint256"},{name:"sender",type:"address",indexed:!0,internalType:"address"},{name:"amount",type:"uint256",indexed:!1,internalType:"uint256"}],anonymous:!1},{type:"event",name:"Initialized",inputs:[{name:"version",type:"uint64",indexed:!1,internalType:"uint64"}],anonymous:!1},{type:"event",name:"Paused",inputs:[{name:"account",type:"address",indexed:!1,internalType:"address"}],anonymous:!1},{type:"event",name:"PersonalUtilizationAdded",inputs:[{name:"user",type:"address",indexed:!0,internalType:"address"},{name:"epoch",type:"uint256",indexed:!0,internalType:"uint256"},{name:"valueAdded",type:"int256",indexed:!0,internalType:"int256"},{name:"personalUtilization",type:"int256",indexed:!1,internalType:"int256"}],anonymous:!1},{type:"event",name:"PersonalUtilizationRemoved",inputs:[{name:"user",type:"address",indexed:!0,internalType:"address"},{name:"epoch",type:"uint256",indexed:!0,internalType:"uint256"},{name:"valueRemoved",type:"int256",indexed:!0,internalType:"int256"},{name:"personalUtilization",type:"int256",indexed:!1,internalType:"int256"}],anonymous:!1},{type:"event",name:"ProtocolFeeAccrued",inputs:[{name:"epoch",type:"uint256",indexed:!0,internalType:"uint256"},{name:"amount",type:"uint256",indexed:!1,internalType:"uint256"}],anonymous:!1},{type:"event",name:"ProtocolFeeTransferred",inputs:[{name:"epoch",type:"uint256",indexed:!0,internalType:"uint256"},{name:"destination",type:"address",indexed:!0,internalType:"address"},{name:"amount",type:"uint256",indexed:!1,internalType:"uint256"}],anonymous:!1},{type:"event",name:"Redeemed",inputs:[{name:"sender",type:"address",indexed:!0,internalType:"address"},{name:"receiver",type:"address",indexed:!0,internalType:"address"},{name:"termId",type:"bytes32",indexed:!0,internalType:"bytes32"},{name:"curveId",type:"uint256",indexed:!1,internalType:"uint256"},{name:"shares",type:"uint256",indexed:!1,internalType:"uint256"},{name:"totalShares",type:"uint256",indexed:!1,internalType:"uint256"},{name:"assets",type:"uint256",indexed:!1,internalType:"uint256"},{name:"fees",type:"uint256",indexed:!1,internalType:"uint256"},{name:"vaultType",type:"uint8",indexed:!1,internalType:"enum IMultiVault.VaultType"}],anonymous:!1},{type:"event",name:"RoleAdminChanged",inputs:[{name:"role",type:"bytes32",indexed:!0,internalType:"bytes32"},{name:"previousAdminRole",type:"bytes32",indexed:!0,internalType:"bytes32"},{name:"newAdminRole",type:"bytes32",indexed:!0,internalType:"bytes32"}],anonymous:!1},{type:"event",name:"RoleGranted",inputs:[{name:"role",type:"bytes32",indexed:!0,internalType:"bytes32"},{name:"account",type:"address",indexed:!0,internalType:"address"},{name:"sender",type:"address",indexed:!0,internalType:"address"}],anonymous:!1},{type:"event",name:"RoleRevoked",inputs:[{name:"role",type:"bytes32",indexed:!0,internalType:"bytes32"},{name:"account",type:"address",indexed:!0,internalType:"address"},{name:"sender",type:"address",indexed:!0,internalType:"address"}],anonymous:!1},{type:"event",name:"SharePriceChanged",inputs:[{name:"termId",type:"bytes32",indexed:!0,internalType:"bytes32"},{name:"curveId",type:"uint256",indexed:!0,internalType:"uint256"},{name:"sharePrice",type:"uint256",indexed:!1,internalType:"uint256"},{name:"totalAssets",type:"uint256",indexed:!1,internalType:"uint256"},{name:"totalShares",type:"uint256",indexed:!1,internalType:"uint256"},{name:"vaultType",type:"uint8",indexed:!1,internalType:"enum IMultiVault.VaultType"}],anonymous:!1},{type:"event",name:"SharesPullApproval",inputs:[{name:"accountFrom",type:"address",indexed:!0,internalType:"address"},{name:"accountTo",type:"address",indexed:!0,internalType:"address"},{name:"status",type:"bool",indexed:!1,internalType:"bool"}],anonymous:!1},{type:"event",name:"TermCountSet",inputs:[{name:"termCount",type:"uint256",indexed:!1,internalType:"uint256"}],anonymous:!1},{type:"event",name:"TokensRecovered",inputs:[{name:"token",type:"address",indexed:!0,internalType:"address"},{name:"recipient",type:"address",indexed:!0,internalType:"address"},{name:"amount",type:"uint256",indexed:!0,internalType:"uint256"}],anonymous:!1},{type:"event",name:"TotalUtilizationAdded",inputs:[{name:"epoch",type:"uint256",indexed:!0,internalType:"uint256"},{name:"valueAdded",type:"int256",indexed:!0,internalType:"int256"},{name:"totalUtilization",type:"int256",indexed:!0,internalType:"int256"}],anonymous:!1},{type:"event",name:"TotalUtilizationRemoved",inputs:[{name:"epoch",type:"uint256",indexed:!0,internalType:"uint256"},{name:"valueRemoved",type:"int256",indexed:!0,internalType:"int256"},{name:"totalUtilization",type:"int256",indexed:!0,internalType:"int256"}],anonymous:!1},{type:"event",name:"TripleCreated",inputs:[{name:"creator",type:"address",indexed:!0,internalType:"address"},{name:"termId",type:"bytes32",indexed:!0,internalType:"bytes32"},{name:"subjectId",type:"bytes32",indexed:!1,internalType:"bytes32"},{name:"predicateId",type:"bytes32",indexed:!1,internalType:"bytes32"},{name:"objectId",type:"bytes32",indexed:!1,internalType:"bytes32"}],anonymous:!1},{type:"event",name:"Unpaused",inputs:[{name:"account",type:"address",indexed:!1,internalType:"address"}],anonymous:!1},{type:"event",name:"WalletMigrated",inputs:[{name:"termId",type:"bytes32",indexed:!0,internalType:"bytes32"},{name:"curveId",type:"uint256",indexed:!0,internalType:"uint256"},{name:"oldWallet",type:"address",indexed:!0,internalType:"address"},{name:"newWallet",type:"address",indexed:!1,internalType:"address"},{name:"sharesMigrated",type:"uint256",indexed:!1,internalType:"uint256"}],anonymous:!1},{type:"event",name:"WrappedERC20Registered",inputs:[{name:"termId",type:"bytes32",indexed:!0,internalType:"bytes32"},{name:"curveId",type:"uint256",indexed:!0,internalType:"uint256"},{name:"wrappedERC20",type:"address",indexed:!0,internalType:"address"}],anonymous:!1},{type:"event",name:"WrapperTransfer",inputs:[{name:"from",type:"address",indexed:!0,internalType:"address"},{name:"to",type:"address",indexed:!0,internalType:"address"},{name:"termId",type:"bytes32",indexed:!0,internalType:"bytes32"},{name:"curveId",type:"uint256",indexed:!1,internalType:"uint256"},{name:"shares",type:"uint256",indexed:!1,internalType:"uint256"}],anonymous:!1},{type:"error",name:"AccessControlBadConfirmation",inputs:[]},{type:"error",name:"AccessControlUnauthorizedAccount",inputs:[{name:"account",type:"address",internalType:"address"},{name:"neededRole",type:"bytes32",internalType:"bytes32"}]},{type:"error",name:"AtomDoesNotExist",inputs:[{name:"termId",type:"bytes32",internalType:"bytes32"}]},{type:"error",name:"EnforcedPause",inputs:[]},{type:"error",name:"ExpectedPause",inputs:[]},{type:"error",name:"FailedCall",inputs:[]},{type:"error",name:"InsufficientBalance",inputs:[{name:"balance",type:"uint256",internalType:"uint256"},{name:"needed",type:"uint256",internalType:"uint256"}]},{type:"error",name:"InvalidInitialization",inputs:[]},{type:"error",name:"MultiVault_ActionExceedsMaxAssets",inputs:[]},{type:"error",name:"MultiVault_ArraysNotSameLength",inputs:[]},{type:"error",name:"MultiVault_AtomDataTooLong",inputs:[]},{type:"error",name:"MultiVault_AtomDoesNotExist",inputs:[{name:"atomId",type:"bytes32",internalType:"bytes32"}]},{type:"error",name:"MultiVault_AtomExists",inputs:[{name:"atomData",type:"bytes",internalType:"bytes"}]},{type:"error",name:"MultiVault_BurnFromZeroAddress",inputs:[]},{type:"error",name:"MultiVault_BurnInsufficientBalance",inputs:[]},{type:"error",name:"MultiVault_CannotApproveOrRevokeSelf",inputs:[]},{type:"error",name:"MultiVault_DepositBelowMinimumDeposit",inputs:[]},{type:"error",name:"MultiVault_DepositOrRedeemZeroShares",inputs:[]},{type:"error",name:"MultiVault_EmptyArray",inputs:[]},{type:"error",name:"MultiVault_InsufficientAssets",inputs:[]},{type:"error",name:"MultiVault_InsufficientBalance",inputs:[]},{type:"error",name:"MultiVault_InsufficientRemainingSharesInVault",inputs:[{name:"remainingShares",type:"uint256",internalType:"uint256"}]},{type:"error",name:"MultiVault_InsufficientSharesInVault",inputs:[]},{type:"error",name:"MultiVault_InvalidArrayLength",inputs:[]},{type:"error",name:"MultiVault_InvalidBondingCurveId",inputs:[]},{type:"error",name:"MultiVault_NoAtomDataProvided",inputs:[]},{type:"error",name:"MultiVault_OnlyAssociatedAtomWallet",inputs:[]},{type:"error",name:"MultiVault_RedeemerNotApproved",inputs:[]},{type:"error",name:"MultiVault_SenderNotApproved",inputs:[]},{type:"error",name:"MultiVault_SlippageExceeded",inputs:[]},{type:"error",name:"MultiVault_TermDoesNotExist",inputs:[]},{type:"error",name:"MultiVault_TripleExists",inputs:[{name:"termId",type:"bytes32",internalType:"bytes32"},{name:"subjectId",type:"bytes32",internalType:"bytes32"},{name:"predicateId",type:"bytes32",internalType:"bytes32"},{name:"objectId",type:"bytes32",internalType:"bytes32"}]},{type:"error",name:"MultiVault_ZeroAddress",inputs:[]},{type:"error",name:"MultiVault_ZeroValue",inputs:[]},{type:"error",name:"NotInitializing",inputs:[]},{type:"error",name:"ReentrancyGuardReentrantCall",inputs:[]},{type:"error",name:"TermDoesNotExist",inputs:[{name:"termId",type:"bytes32",internalType:"bytes32"}]},{type:"error",name:"TripleDoesNotExist",inputs:[{name:"termId",type:"bytes32",internalType:"bytes32"}]}];function QT(r,e){return function(){return r.apply(e,arguments)}}const{toString:LD}=Object.prototype,{getPrototypeOf:cy}=Object,{iterator:lp,toStringTag:$T}=Symbol,up=(r=>e=>{const i=LD.call(e);return r[i]||(r[i]=i.slice(8,-1).toLowerCase())})(Object.create(null)),Sn=r=>(r=r.toLowerCase(),e=>up(e)===r),cp=r=>e=>typeof e===r,{isArray:kl}=Array,Ul=cp("undefined");function Qc(r){return r!==null&&!Ul(r)&&r.constructor!==null&&!Ul(r.constructor)&&Pr(r.constructor.isBuffer)&&r.constructor.isBuffer(r)}const JT=Sn("ArrayBuffer");function kD(r){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(r):e=r&&r.buffer&&JT(r.buffer),e}const UD=cp("string"),Pr=cp("function"),ew=cp("number"),$c=r=>r!==null&&typeof r=="object",FD=r=>r===!0||r===!1,hp=r=>{if(up(r)!=="object")return!1;const e=cy(r);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!($T in r)&&!(lp in r)},BD=r=>{if(!$c(r)||Qc(r))return!1;try{return Object.keys(r).length===0&&Object.getPrototypeOf(r)===Object.prototype}catch{return!1}},zD=Sn("Date"),jD=Sn("File"),VD=Sn("Blob"),GD=Sn("FileList"),HD=r=>$c(r)&&Pr(r.pipe),WD=r=>{let e;return r&&(typeof FormData=="function"&&r instanceof FormData||Pr(r.append)&&((e=up(r))==="formdata"||e==="object"&&Pr(r.toString)&&r.toString()==="[object FormData]"))},qD=Sn("URLSearchParams"),[XD,YD,KD,ZD]=["ReadableStream","Request","Response","Headers"].map(Sn),QD=r=>r.trim?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Jc(r,e,{allOwnKeys:i=!1}={}){if(r===null||typeof r>"u")return;let n,s;if(typeof r!="object"&&(r=[r]),kl(r))for(n=0,s=r.length;n<s;n++)e.call(null,r[n],n,r);else{if(Qc(r))return;const a=i?Object.getOwnPropertyNames(r):Object.keys(r),o=a.length;let l;for(n=0;n<o;n++)l=a[n],e.call(null,r[l],l,r)}}function tw(r,e){if(Qc(r))return null;e=e.toLowerCase();const i=Object.keys(r);let n=i.length,s;for(;n-- >0;)if(s=i[n],e===s.toLowerCase())return s;return null}const So=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,iw=r=>!Ul(r)&&r!==So;function hy(){const{caseless:r,skipUndefined:e}=iw(this)&&this||{},i={},n=(s,a)=>{const o=r&&tw(i,a)||a;hp(i[o])&&hp(s)?i[o]=hy(i[o],s):hp(s)?i[o]=hy({},s):kl(s)?i[o]=s.slice():(!e||!Ul(s))&&(i[o]=s)};for(let s=0,a=arguments.length;s<a;s++)arguments[s]&&Jc(arguments[s],n);return i}const $D=(r,e,i,{allOwnKeys:n}={})=>(Jc(e,(s,a)=>{i&&Pr(s)?r[a]=QT(s,i):r[a]=s},{allOwnKeys:n}),r),JD=r=>(r.charCodeAt(0)===65279&&(r=r.slice(1)),r),eL=(r,e,i,n)=>{r.prototype=Object.create(e.prototype,n),r.prototype.constructor=r,Object.defineProperty(r,"super",{value:e.prototype}),i&&Object.assign(r.prototype,i)},tL=(r,e,i,n)=>{let s,a,o;const l={};if(e=e||{},r==null)return e;do{for(s=Object.getOwnPropertyNames(r),a=s.length;a-- >0;)o=s[a],(!n||n(o,r,e))&&!l[o]&&(e[o]=r[o],l[o]=!0);r=i!==!1&&cy(r)}while(r&&(!i||i(r,e))&&r!==Object.prototype);return e},iL=(r,e,i)=>{r=String(r),(i===void 0||i>r.length)&&(i=r.length),i-=e.length;const n=r.indexOf(e,i);return n!==-1&&n===i},rL=r=>{if(!r)return null;if(kl(r))return r;let e=r.length;if(!ew(e))return null;const i=new Array(e);for(;e-- >0;)i[e]=r[e];return i},nL=(r=>e=>r&&e instanceof r)(typeof Uint8Array<"u"&&cy(Uint8Array)),sL=(r,e)=>{const n=(r&&r[lp]).call(r);let s;for(;(s=n.next())&&!s.done;){const a=s.value;e.call(r,a[0],a[1])}},aL=(r,e)=>{let i;const n=[];for(;(i=r.exec(e))!==null;)n.push(i);return n},oL=Sn("HTMLFormElement"),lL=r=>r.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(i,n,s){return n.toUpperCase()+s}),rw=(({hasOwnProperty:r})=>(e,i)=>r.call(e,i))(Object.prototype),uL=Sn("RegExp"),nw=(r,e)=>{const i=Object.getOwnPropertyDescriptors(r),n={};Jc(i,(s,a)=>{let o;(o=e(s,a,r))!==!1&&(n[a]=o||s)}),Object.defineProperties(r,n)},cL=r=>{nw(r,(e,i)=>{if(Pr(r)&&["arguments","caller","callee"].indexOf(i)!==-1)return!1;const n=r[i];if(Pr(n)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+i+"'")})}})},hL=(r,e)=>{const i={},n=s=>{s.forEach(a=>{i[a]=!0})};return kl(r)?n(r):n(String(r).split(e)),i},dL=()=>{},pL=(r,e)=>r!=null&&Number.isFinite(r=+r)?r:e;function fL(r){return!!(r&&Pr(r.append)&&r[$T]==="FormData"&&r[lp])}const mL=r=>{const e=new Array(10),i=(n,s)=>{if($c(n)){if(e.indexOf(n)>=0)return;if(Qc(n))return n;if(!("toJSON"in n)){e[s]=n;const a=kl(n)?[]:{};return Jc(n,(o,l)=>{const u=i(o,s+1);!Ul(u)&&(a[l]=u)}),e[s]=void 0,a}}return n};return i(r,0)},gL=Sn("AsyncFunction"),yL=r=>r&&($c(r)||Pr(r))&&Pr(r.then)&&Pr(r.catch),sw=((r,e)=>r?setImmediate:e?((i,n)=>(So.addEventListener("message",({source:s,data:a})=>{s===So&&a===i&&n.length&&n.shift()()},!1),s=>{n.push(s),So.postMessage(i,"*")}))(`axios@${Math.random()}`,[]):i=>setTimeout(i))(typeof setImmediate=="function",Pr(So.postMessage)),vL=typeof queueMicrotask<"u"?queueMicrotask.bind(So):typeof process<"u"&&process.nextTick||sw,he={isArray:kl,isArrayBuffer:JT,isBuffer:Qc,isFormData:WD,isArrayBufferView:kD,isString:UD,isNumber:ew,isBoolean:FD,isObject:$c,isPlainObject:hp,isEmptyObject:BD,isReadableStream:XD,isRequest:YD,isResponse:KD,isHeaders:ZD,isUndefined:Ul,isDate:zD,isFile:jD,isBlob:VD,isRegExp:uL,isFunction:Pr,isStream:HD,isURLSearchParams:qD,isTypedArray:nL,isFileList:GD,forEach:Jc,merge:hy,extend:$D,trim:QD,stripBOM:JD,inherits:eL,toFlatObject:tL,kindOf:up,kindOfTest:Sn,endsWith:iL,toArray:rL,forEachEntry:sL,matchAll:aL,isHTMLForm:oL,hasOwnProperty:rw,hasOwnProp:rw,reduceDescriptors:nw,freezeMethods:cL,toObjectSet:hL,toCamelCase:lL,noop:dL,toFiniteNumber:pL,findKey:tw,global:So,isContextDefined:iw,isSpecCompliantForm:fL,toJSONObject:mL,isAsyncFn:gL,isThenable:yL,setImmediate:sw,asap:vL,isIterable:r=>r!=null&&Pr(r[lp])};function St(r,e,i,n,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=r,this.name="AxiosError",e&&(this.code=e),i&&(this.config=i),n&&(this.request=n),s&&(this.response=s,this.status=s.status?s.status:null)}he.inherits(St,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:he.toJSONObject(this.config),code:this.code,status:this.status}}});const aw=St.prototype,ow={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(r=>{ow[r]={value:r}}),Object.defineProperties(St,ow),Object.defineProperty(aw,"isAxiosError",{value:!0}),St.from=(r,e,i,n,s,a)=>{const o=Object.create(aw);he.toFlatObject(r,o,function(h){return h!==Error.prototype},c=>c!=="isAxiosError");const l=r&&r.message?r.message:"Error",u=e==null&&r?r.code:e;return St.call(o,l,u,i,n,s),r&&o.cause==null&&Object.defineProperty(o,"cause",{value:r,configurable:!0}),o.name=r&&r.name||"Error",a&&Object.assign(o,a),o};const bL=null;function dy(r){return he.isPlainObject(r)||he.isArray(r)}function lw(r){return he.endsWith(r,"[]")?r.slice(0,-2):r}function uw(r,e,i){return r?r.concat(e).map(function(s,a){return s=lw(s),!i&&a?"["+s+"]":s}).join(i?".":""):e}function xL(r){return he.isArray(r)&&!r.some(dy)}const _L=he.toFlatObject(he,{},null,function(e){return/^is[A-Z]/.test(e)});function dp(r,e,i){if(!he.isObject(r))throw new TypeError("target must be an object");e=e||new FormData,i=he.toFlatObject(i,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,v){return!he.isUndefined(v[y])});const n=i.metaTokens,s=i.visitor||h,a=i.dots,o=i.indexes,u=(i.Blob||typeof Blob<"u"&&Blob)&&he.isSpecCompliantForm(e);if(!he.isFunction(s))throw new TypeError("visitor must be a function");function c(m){if(m===null)return"";if(he.isDate(m))return m.toISOString();if(he.isBoolean(m))return m.toString();if(!u&&he.isBlob(m))throw new St("Blob is not supported. Use a Buffer instead.");return he.isArrayBuffer(m)||he.isTypedArray(m)?u&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function h(m,y,v){let g=m;if(m&&!v&&typeof m=="object"){if(he.endsWith(y,"{}"))y=n?y:y.slice(0,-2),m=JSON.stringify(m);else if(he.isArray(m)&&xL(m)||(he.isFileList(m)||he.endsWith(y,"[]"))&&(g=he.toArray(m)))return y=lw(y),g.forEach(function(x,b){!(he.isUndefined(x)||x===null)&&e.append(o===!0?uw([y],b,a):o===null?y:y+"[]",c(x))}),!1}return dy(m)?!0:(e.append(uw(v,y,a),c(m)),!1)}const d=[],p=Object.assign(_L,{defaultVisitor:h,convertValue:c,isVisitable:dy});function f(m,y){if(!he.isUndefined(m)){if(d.indexOf(m)!==-1)throw Error("Circular reference detected in "+y.join("."));d.push(m),he.forEach(m,function(g,_){(!(he.isUndefined(g)||g===null)&&s.call(e,g,he.isString(_)?_.trim():_,y,p))===!0&&f(g,y?y.concat(_):[_])}),d.pop()}}if(!he.isObject(r))throw new TypeError("data must be an object");return f(r),e}function cw(r){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(r).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function py(r,e){this._pairs=[],r&&dp(r,this,e)}const hw=py.prototype;hw.append=function(e,i){this._pairs.push([e,i])},hw.toString=function(e){const i=e?function(n){return e.call(this,n,cw)}:cw;return this._pairs.map(function(s){return i(s[0])+"="+i(s[1])},"").join("&")};function TL(r){return encodeURIComponent(r).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function dw(r,e,i){if(!e)return r;const n=i&&i.encode||TL;he.isFunction(i)&&(i={serialize:i});const s=i&&i.serialize;let a;if(s?a=s(e,i):a=he.isURLSearchParams(e)?e.toString():new py(e,i).toString(n),a){const o=r.indexOf("#");o!==-1&&(r=r.slice(0,o)),r+=(r.indexOf("?")===-1?"?":"&")+a}return r}class pw{constructor(){this.handlers=[]}use(e,i,n){return this.handlers.push({fulfilled:e,rejected:i,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){he.forEach(this.handlers,function(n){n!==null&&e(n)})}}const fw={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},wL={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:py,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},fy=typeof window<"u"&&typeof document<"u",my=typeof navigator=="object"&&navigator||void 0,SL=fy&&(!my||["ReactNative","NativeScript","NS"].indexOf(my.product)<0),EL=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",ML=fy&&window.location.href||"http://localhost",ar={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:fy,hasStandardBrowserEnv:SL,hasStandardBrowserWebWorkerEnv:EL,navigator:my,origin:ML},Symbol.toStringTag,{value:"Module"})),...wL};function AL(r,e){return dp(r,new ar.classes.URLSearchParams,{visitor:function(i,n,s,a){return ar.isNode&&he.isBuffer(i)?(this.append(n,i.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)},...e})}function CL(r){return he.matchAll(/\w+|\[(\w*)]/g,r).map(e=>e[0]==="[]"?"":e[1]||e[0])}function RL(r){const e={},i=Object.keys(r);let n;const s=i.length;let a;for(n=0;n<s;n++)a=i[n],e[a]=r[a];return e}function mw(r){function e(i,n,s,a){let o=i[a++];if(o==="__proto__")return!0;const l=Number.isFinite(+o),u=a>=i.length;return o=!o&&he.isArray(s)?s.length:o,u?(he.hasOwnProp(s,o)?s[o]=[s[o],n]:s[o]=n,!l):((!s[o]||!he.isObject(s[o]))&&(s[o]=[]),e(i,n,s[o],a)&&he.isArray(s[o])&&(s[o]=RL(s[o])),!l)}if(he.isFormData(r)&&he.isFunction(r.entries)){const i={};return he.forEachEntry(r,(n,s)=>{e(CL(n),s,i,0)}),i}return null}function NL(r,e,i){if(he.isString(r))try{return(e||JSON.parse)(r),he.trim(r)}catch(n){if(n.name!=="SyntaxError")throw n}return(i||JSON.stringify)(r)}const eh={transitional:fw,adapter:["xhr","http","fetch"],transformRequest:[function(e,i){const n=i.getContentType()||"",s=n.indexOf("application/json")>-1,a=he.isObject(e);if(a&&he.isHTMLForm(e)&&(e=new FormData(e)),he.isFormData(e))return s?JSON.stringify(mw(e)):e;if(he.isArrayBuffer(e)||he.isBuffer(e)||he.isStream(e)||he.isFile(e)||he.isBlob(e)||he.isReadableStream(e))return e;if(he.isArrayBufferView(e))return e.buffer;if(he.isURLSearchParams(e))return i.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let l;if(a){if(n.indexOf("application/x-www-form-urlencoded")>-1)return AL(e,this.formSerializer).toString();if((l=he.isFileList(e))||n.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return dp(l?{"files[]":e}:e,u&&new u,this.formSerializer)}}return a||s?(i.setContentType("application/json",!1),NL(e)):e}],transformResponse:[function(e){const i=this.transitional||eh.transitional,n=i&&i.forcedJSONParsing,s=this.responseType==="json";if(he.isResponse(e)||he.isReadableStream(e))return e;if(e&&he.isString(e)&&(n&&!this.responseType||s)){const o=!(i&&i.silentJSONParsing)&&s;try{return JSON.parse(e,this.parseReviver)}catch(l){if(o)throw l.name==="SyntaxError"?St.from(l,St.ERR_BAD_RESPONSE,this,null,this.response):l}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ar.classes.FormData,Blob:ar.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};he.forEach(["delete","get","head","post","put","patch"],r=>{eh.headers[r]={}});const PL=he.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),IL=r=>{const e={};let i,n,s;return r&&r.split(`
32
+ `),{name:"AbiEncodingLengthMismatchError"})}}class FO extends cn{constructor({expectedSize:e,givenSize:i}){super(`Expected bytes${e}, got bytes${i}.`,{name:"BytesSizeMismatchError"})}}class BO extends cn{constructor(e){super(`Type "${e}" is not supported for packed encoding.`,{name:"UnsupportedPackedAbiType"})}}class ET extends cn{constructor({size:e,targetSize:i,type:n}){super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} size (${e}) exceeds padding size (${i}).`,{name:"SizeExceedsPaddingSizeError"})}}function Ss(r,{dir:e,size:i=32}={}){return typeof r=="string"?zO(r,{dir:e,size:i}):jO(r,{dir:e,size:i})}function zO(r,{dir:e,size:i=32}={}){if(i===null)return r;const n=r.replace("0x","");if(n.length>i*2)throw new ET({size:Math.ceil(n.length/2),targetSize:i,type:"hex"});return`0x${n[e==="right"?"padEnd":"padStart"](i*2,"0")}`}function jO(r,{dir:e,size:i=32}={}){if(i===null)return r;if(r.length>i)throw new ET({size:r.length,targetSize:i,type:"bytes"});const n=new Uint8Array(i);for(let s=0;s<i;s++){const a=e==="right";n[a?s:i-s-1]=r[a?s:r.length-s-1]}return n}class VO extends cn{constructor({max:e,min:i,signed:n,size:s,value:a}){super(`Number "${a}" is not in safe ${s?`${s*8}-bit ${n?"signed":"unsigned"} `:""}integer range ${e?`(${i} to ${e})`:`(above ${i})`}`,{name:"IntegerOutOfRangeError"})}}class GO extends cn{constructor({givenSize:e,maxSize:i}){super(`Size cannot exceed ${i} bytes. Given size: ${e} bytes.`,{name:"SizeOverflowError"})}}function Kc(r,{size:e}){if(TT(r)>e)throw new GO({givenSize:TT(r),maxSize:e})}const HO=Array.from({length:256},(r,e)=>e.toString(16).padStart(2,"0"));function MT(r,e={}){return typeof r=="number"||typeof r=="bigint"?sy(r,e):typeof r=="string"?RT(r,e):typeof r=="boolean"?AT(r,e):CT(r,e)}function AT(r,e={}){const i=`0x${Number(r)}`;return typeof e.size=="number"?(Kc(i,{size:e.size}),Ss(i,{size:e.size})):i}function CT(r,e={}){let i="";for(let s=0;s<r.length;s++)i+=HO[r[s]];const n=`0x${i}`;return typeof e.size=="number"?(Kc(n,{size:e.size}),Ss(n,{dir:"right",size:e.size})):n}function sy(r,e={}){const{signed:i,size:n}=e,s=BigInt(r);let a;n?i?a=(1n<<BigInt(n)*8n-1n)-1n:a=2n**(BigInt(n)*8n)-1n:typeof r=="number"&&(a=BigInt(Number.MAX_SAFE_INTEGER));const o=typeof a=="bigint"&&i?-a-1n:0;if(a&&s>a||s<o){const u=typeof r=="bigint"?"n":"";throw new VO({max:a?`${a}${u}`:void 0,min:`${o}${u}`,signed:i,size:n,value:`${r}${u}`})}const l=`0x${(i&&s<0?(1n<<BigInt(n*8))+BigInt(s):s).toString(16)}`;return n?Ss(l,{size:n}):l}const WO=new TextEncoder;function RT(r,e={}){const i=WO.encode(r);return CT(i,e)}const qO=new TextEncoder;function NT(r,e={}){return typeof r=="number"||typeof r=="bigint"?YO(r,e):typeof r=="boolean"?XO(r,e):ny(r)?IT(r,e):OT(r,e)}function XO(r,e={}){const i=new Uint8Array(1);return i[0]=Number(r),typeof e.size=="number"?(Kc(i,{size:e.size}),Ss(i,{size:e.size})):i}const Es={zero:48,nine:57,A:65,F:70,a:97,f:102};function PT(r){if(r>=Es.zero&&r<=Es.nine)return r-Es.zero;if(r>=Es.A&&r<=Es.F)return r-(Es.A-10);if(r>=Es.a&&r<=Es.f)return r-(Es.a-10)}function IT(r,e={}){let i=r;e.size&&(Kc(i,{size:e.size}),i=Ss(i,{dir:"right",size:e.size}));let n=i.slice(2);n.length%2&&(n=`0${n}`);const s=n.length/2,a=new Uint8Array(s);for(let o=0,l=0;o<s;o++){const u=PT(n.charCodeAt(l++)),c=PT(n.charCodeAt(l++));if(u===void 0||c===void 0)throw new cn(`Invalid byte sequence ("${n[l-2]}${n[l-1]}" in "${n}").`);a[o]=u*16+c}return a}function YO(r,e){const i=sy(r,e);return IT(i)}function OT(r,e={}){const i=qO.encode(r);return typeof e.size=="number"?(Kc(i,{size:e.size}),Ss(i,{dir:"right",size:e.size})):i}const ap=BigInt(2**32-1),DT=BigInt(32);function KO(r,e=!1){return e?{h:Number(r&ap),l:Number(r>>DT&ap)}:{h:Number(r>>DT&ap)|0,l:Number(r&ap)|0}}function ZO(r,e=!1){const i=r.length;let n=new Uint32Array(i),s=new Uint32Array(i);for(let a=0;a<i;a++){const{h:o,l}=KO(r[a],e);[n[a],s[a]]=[o,l]}return[n,s]}const QO=(r,e,i)=>r<<i|e>>>32-i,$O=(r,e,i)=>e<<i|r>>>32-i,JO=(r,e,i)=>e<<i-32|r>>>64-i,eD=(r,e,i)=>r<<i-32|e>>>64-i;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function tD(r){return r instanceof Uint8Array||ArrayBuffer.isView(r)&&r.constructor.name==="Uint8Array"}function LT(r){if(!Number.isSafeInteger(r)||r<0)throw new Error("positive integer expected, got "+r)}function op(r,...e){if(!tD(r))throw new Error("Uint8Array expected");if(e.length>0&&!e.includes(r.length))throw new Error("Uint8Array expected of length "+e+", got length="+r.length)}function kT(r,e=!0){if(r.destroyed)throw new Error("Hash instance has been destroyed");if(e&&r.finished)throw new Error("Hash#digest() has already been called")}function iD(r,e){op(r);const i=e.outputLen;if(r.length<i)throw new Error("digestInto() expects output buffer of length at least "+i)}function rD(r){return new Uint32Array(r.buffer,r.byteOffset,Math.floor(r.byteLength/4))}function UT(...r){for(let e=0;e<r.length;e++)r[e].fill(0)}const nD=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function sD(r){return r<<24&4278190080|r<<8&16711680|r>>>8&65280|r>>>24&255}function aD(r){for(let e=0;e<r.length;e++)r[e]=sD(r[e]);return r}const FT=nD?r=>r:aD;function oD(r){if(typeof r!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(r))}function BT(r){return typeof r=="string"&&(r=oD(r)),op(r),r}class lD{}function uD(r){const e=n=>r().update(BT(n)).digest(),i=r();return e.outputLen=i.outputLen,e.blockLen=i.blockLen,e.create=()=>r(),e}const cD=BigInt(0),Zc=BigInt(1),hD=BigInt(2),dD=BigInt(7),pD=BigInt(256),fD=BigInt(113),zT=[],jT=[],VT=[];for(let r=0,e=Zc,i=1,n=0;r<24;r++){[i,n]=[n,(2*i+3*n)%5],zT.push(2*(5*n+i)),jT.push((r+1)*(r+2)/2%64);let s=cD;for(let a=0;a<7;a++)e=(e<<Zc^(e>>dD)*fD)%pD,e&hD&&(s^=Zc<<(Zc<<BigInt(a))-Zc);VT.push(s)}const GT=ZO(VT,!0),mD=GT[0],gD=GT[1],HT=(r,e,i)=>i>32?JO(r,e,i):QO(r,e,i),WT=(r,e,i)=>i>32?eD(r,e,i):$O(r,e,i);function yD(r,e=24){const i=new Uint32Array(10);for(let n=24-e;n<24;n++){for(let o=0;o<10;o++)i[o]=r[o]^r[o+10]^r[o+20]^r[o+30]^r[o+40];for(let o=0;o<10;o+=2){const l=(o+8)%10,u=(o+2)%10,c=i[u],h=i[u+1],d=HT(c,h,1)^i[l],p=WT(c,h,1)^i[l+1];for(let f=0;f<50;f+=10)r[o+f]^=d,r[o+f+1]^=p}let s=r[2],a=r[3];for(let o=0;o<24;o++){const l=jT[o],u=HT(s,a,l),c=WT(s,a,l),h=zT[o];s=r[h],a=r[h+1],r[h]=u,r[h+1]=c}for(let o=0;o<50;o+=10){for(let l=0;l<10;l++)i[l]=r[o+l];for(let l=0;l<10;l++)r[o+l]^=~i[(l+2)%10]&i[(l+4)%10]}r[0]^=mD[n],r[1]^=gD[n]}UT(i)}class ay extends lD{constructor(e,i,n,s=!1,a=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=e,this.suffix=i,this.outputLen=n,this.enableXOF=s,this.rounds=a,LT(n),!(0<e&&e<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=rD(this.state)}clone(){return this._cloneInto()}keccak(){FT(this.state32),yD(this.state32,this.rounds),FT(this.state32),this.posOut=0,this.pos=0}update(e){kT(this),e=BT(e),op(e);const{blockLen:i,state:n}=this,s=e.length;for(let a=0;a<s;){const o=Math.min(i-this.pos,s-a);for(let l=0;l<o;l++)n[this.pos++]^=e[a++];this.pos===i&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:e,suffix:i,pos:n,blockLen:s}=this;e[n]^=i,i&128&&n===s-1&&this.keccak(),e[s-1]^=128,this.keccak()}writeInto(e){kT(this,!1),op(e),this.finish();const i=this.state,{blockLen:n}=this;for(let s=0,a=e.length;s<a;){this.posOut>=n&&this.keccak();const o=Math.min(n-this.posOut,a-s);e.set(i.subarray(this.posOut,this.posOut+o),s),this.posOut+=o,s+=o}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return LT(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(iD(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,UT(this.state)}_cloneInto(e){const{blockLen:i,suffix:n,outputLen:s,rounds:a,enableXOF:o}=this;return e||(e=new ay(i,n,s,o,a)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=a,e.suffix=n,e.outputLen=s,e.enableXOF=o,e.destroyed=this.destroyed,e}}const vD=(r,e,i)=>uD(()=>new ay(e,r,i)),bD=vD(1,136,256/8);function oy(r,e){const i=e||"hex",n=bD(ny(r,{strict:!1})?NT(r):r);return i==="bytes"?n:MT(n)}const xD=r=>oy(NT(r));function _D(r){return xD(r)}function TD(r){let e=!0,i="",n=0,s="",a=!1;for(let o=0;o<r.length;o++){const l=r[o];if(["(",")",","].includes(l)&&(e=!0),l==="("&&n++,l===")"&&n--,!!e){if(n===0){if(l===" "&&["event","function",""].includes(s))s="";else if(s+=l,l===")"){a=!0;break}continue}if(l===" "){r[o-1]!==","&&i!==","&&i!==",("&&(i="",e=!1);continue}s+=l,i+=l}}if(!a)throw new cn("Unable to normalize signature.");return s}const wD=r=>{const e=typeof r=="string"?r:kO(r);return TD(e)};function SD(r){return _D(wD(r))}const ED=SD;class MD extends cn{constructor({address:e}){super(`Address "${e}" is invalid.`,{metaMessages:["- Address must be a hex value of 20 bytes (40 hex characters).","- Address must match its checksum counterpart."],name:"InvalidAddressError"})}}class qT extends Map{constructor(e){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=e}get(e){const i=super.get(e);return super.has(e)&&i!==void 0&&(this.delete(e),super.set(e,i)),i}set(e,i){if(super.set(e,i),this.maxSize&&this.size>this.maxSize){const n=this.keys().next().value;n&&this.delete(n)}return this}}const ly=new qT(8192);function AD(r,e){if(ly.has(`${r}.${e}`))return ly.get(`${r}.${e}`);const i=r.substring(2).toLowerCase(),n=oy(OT(i),"bytes"),s=i.split("");for(let o=0;o<40;o+=2)n[o>>1]>>4>=8&&s[o]&&(s[o]=s[o].toUpperCase()),(n[o>>1]&15)>=8&&s[o+1]&&(s[o+1]=s[o+1].toUpperCase());const a=`0x${s.join("")}`;return ly.set(`${r}.${e}`,a),a}const CD=/^0x[a-fA-F0-9]{40}$/,uy=new qT(8192);function RD(r,e){const{strict:i=!0}={},n=`${r}.${i}`;if(uy.has(n))return uy.get(n);const s=CD.test(r)?r.toLowerCase()===r?!0:i?AD(r)===r:!0:!1;return uy.set(n,s),s}function XT(r){return`0x${r.reduce((e,i)=>e+i.replace("0x",""),"")}`}const ND=/^(.*)\[([0-9]*)\]$/,PD=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,ID=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;function OD(r,e){if(r.length!==e.length)throw new UO({expectedLength:r.length,givenLength:e.length});const i=[];for(let n=0;n<r.length;n++){const s=r[n],a=e[n];i.push(YT(s,a))}return XT(i)}function YT(r,e,i=!1){if(r==="address"){const o=e;if(!RD(o))throw new MD({address:o});return Ss(o.toLowerCase(),{size:i?32:null})}if(r==="string")return RT(e);if(r==="bytes")return e;if(r==="bool")return Ss(AT(e),{size:i?32:1});const n=r.match(ID);if(n){const[o,l,u="256"]=n,c=Number.parseInt(u,10)/8;return sy(e,{size:i?32:c,signed:l==="int"})}const s=r.match(PD);if(s){const[o,l]=s;if(Number.parseInt(l,10)!==(e.length-2)/2)throw new FO({expectedSize:Number.parseInt(l,10),givenSize:(e.length-2)/2});return Ss(e,{dir:"right",size:i?32:null})}const a=r.match(ND);if(a&&Array.isArray(e)){const[o,l]=a,u=[];for(let c=0;c<e.length;c++)u.push(YT(l,e[c],!0));return u.length===0?"0x":XT(u)}throw new BO(r)}const wo="0x2Ece8D4dEdcB9918A398528f3fa4688b1d2CAB91",DD=13579,KT=BigInt("10000000000000000"),ZT=BigInt("10000000000000000"),Ll=[{type:"function",name:"BURN_ADDRESS",inputs:[],outputs:[{name:"",type:"address",internalType:"address"}],stateMutability:"view"},{type:"function",name:"CONTROLLER_ROLE",inputs:[],outputs:[{name:"",type:"bytes32",internalType:"bytes32"}],stateMutability:"view"},{type:"function",name:"COUNTER_SALT",inputs:[],outputs:[{name:"",type:"bytes32",internalType:"bytes32"}],stateMutability:"view"},{type:"function",name:"DEFAULT_ADMIN_ROLE",inputs:[],outputs:[{name:"",type:"bytes32",internalType:"bytes32"}],stateMutability:"view"},{type:"function",name:"MAX_BATCH_SIZE",inputs:[],outputs:[{name:"",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"function",name:"MIGRATOR_ROLE",inputs:[],outputs:[{name:"",type:"bytes32",internalType:"bytes32"}],stateMutability:"view"},{type:"function",name:"ONE_SHARE",inputs:[],outputs:[{name:"",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"function",name:"_maxRedeem",inputs:[{name:"sender",type:"address",internalType:"address"},{name:"termId",type:"bytes32",internalType:"bytes32"},{name:"curveId",type:"uint256",internalType:"uint256"}],outputs:[{name:"",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"function",name:"accumulatedAtomWalletDepositFees",inputs:[{name:"atomWallet",type:"address",internalType:"address"}],outputs:[{name:"accumulatedFees",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"function",name:"accumulatedProtocolFees",inputs:[{name:"epoch",type:"uint256",internalType:"uint256"}],outputs:[{name:"accumulatedFees",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"function",name:"approve",inputs:[{name:"sender",type:"address",internalType:"address"},{name:"approvalType",type:"uint8",internalType:"enum IMultiVault.ApprovalTypes"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"atom",inputs:[{name:"atomId",type:"bytes32",internalType:"bytes32"}],outputs:[{name:"data",type:"bytes",internalType:"bytes"}],stateMutability:"view"},{type:"function",name:"atomConfig",inputs:[],outputs:[{name:"atomCreationProtocolFee",type:"uint256",internalType:"uint256"},{name:"atomWalletDepositFee",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"function",name:"atomDepositFractionAmount",inputs:[{name:"assets",type:"uint256",internalType:"uint256"}],outputs:[{name:"",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"function",name:"batchSetAtomData",inputs:[{name:"creators",type:"address[]",internalType:"address[]"},{name:"atomDataArray",type:"bytes[]",internalType:"bytes[]"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"batchSetTripleData",inputs:[{name:"creators",type:"address[]",internalType:"address[]"},{name:"tripleAtomIds",type:"bytes32[3][]",internalType:"bytes32[3][]"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"batchSetUserBalances",inputs:[{name:"params",type:"tuple",internalType:"struct MultiVaultMigrationMode.BatchSetUserBalancesParams",components:[{name:"termIds",type:"bytes32[]",internalType:"bytes32[]"},{name:"bondingCurveId",type:"uint256",internalType:"uint256"},{name:"user",type:"address",internalType:"address"},{name:"userBalances",type:"uint256[]",internalType:"uint256[]"}]}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"batchSetVaultTotals",inputs:[{name:"termIds",type:"bytes32[]",internalType:"bytes32[]"},{name:"bondingCurveId",type:"uint256",internalType:"uint256"},{name:"vaultTotals",type:"tuple[]",internalType:"struct MultiVaultMigrationMode.VaultTotals[]",components:[{name:"totalAssets",type:"uint256",internalType:"uint256"},{name:"totalShares",type:"uint256",internalType:"uint256"}]}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"bondingCurveConfig",inputs:[],outputs:[{name:"registry",type:"address",internalType:"address"},{name:"defaultCurveId",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"function",name:"calculateAtomId",inputs:[{name:"data",type:"bytes",internalType:"bytes"}],outputs:[{name:"id",type:"bytes32",internalType:"bytes32"}],stateMutability:"pure"},{type:"function",name:"calculateCounterTripleId",inputs:[{name:"subjectId",type:"bytes32",internalType:"bytes32"},{name:"predicateId",type:"bytes32",internalType:"bytes32"},{name:"objectId",type:"bytes32",internalType:"bytes32"}],outputs:[{name:"",type:"bytes32",internalType:"bytes32"}],stateMutability:"pure"},{type:"function",name:"calculateTripleId",inputs:[{name:"subjectId",type:"bytes32",internalType:"bytes32"},{name:"predicateId",type:"bytes32",internalType:"bytes32"},{name:"objectId",type:"bytes32",internalType:"bytes32"}],outputs:[{name:"",type:"bytes32",internalType:"bytes32"}],stateMutability:"pure"},{type:"function",name:"claimAtomWalletDepositFees",inputs:[{name:"termId",type:"bytes32",internalType:"bytes32"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"computeAtomWalletAddr",inputs:[{name:"atomId",type:"bytes32",internalType:"bytes32"}],outputs:[{name:"",type:"address",internalType:"address"}],stateMutability:"view"},{type:"function",name:"convertToAssets",inputs:[{name:"termId",type:"bytes32",internalType:"bytes32"},{name:"bondingCurveId",type:"uint256",internalType:"uint256"},{name:"shares",type:"uint256",internalType:"uint256"}],outputs:[{name:"",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"function",name:"convertToShares",inputs:[{name:"termId",type:"bytes32",internalType:"bytes32"},{name:"curveId",type:"uint256",internalType:"uint256"},{name:"assets",type:"uint256",internalType:"uint256"}],outputs:[{name:"",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"function",name:"createAtoms",inputs:[{name:"data",type:"bytes[]",internalType:"bytes[]"},{name:"assets",type:"uint256[]",internalType:"uint256[]"}],outputs:[{name:"",type:"bytes32[]",internalType:"bytes32[]"}],stateMutability:"payable"},{type:"function",name:"createTriples",inputs:[{name:"subjectIds",type:"bytes32[]",internalType:"bytes32[]"},{name:"predicateIds",type:"bytes32[]",internalType:"bytes32[]"},{name:"objectIds",type:"bytes32[]",internalType:"bytes32[]"},{name:"assets",type:"uint256[]",internalType:"uint256[]"}],outputs:[{name:"",type:"bytes32[]",internalType:"bytes32[]"}],stateMutability:"payable"},{type:"function",name:"currentEpoch",inputs:[],outputs:[{name:"",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"function",name:"currentSharePrice",inputs:[{name:"termId",type:"bytes32",internalType:"bytes32"},{name:"curveId",type:"uint256",internalType:"uint256"}],outputs:[{name:"",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"function",name:"deposit",inputs:[{name:"receiver",type:"address",internalType:"address"},{name:"termId",type:"bytes32",internalType:"bytes32"},{name:"curveId",type:"uint256",internalType:"uint256"},{name:"minShares",type:"uint256",internalType:"uint256"}],outputs:[{name:"",type:"uint256",internalType:"uint256"}],stateMutability:"payable"},{type:"function",name:"depositBatch",inputs:[{name:"receiver",type:"address",internalType:"address"},{name:"termIds",type:"bytes32[]",internalType:"bytes32[]"},{name:"curveIds",type:"uint256[]",internalType:"uint256[]"},{name:"assets",type:"uint256[]",internalType:"uint256[]"},{name:"minShares",type:"uint256[]",internalType:"uint256[]"}],outputs:[{name:"shares",type:"uint256[]",internalType:"uint256[]"}],stateMutability:"payable"},{type:"function",name:"entryFeeAmount",inputs:[{name:"assets",type:"uint256",internalType:"uint256"}],outputs:[{name:"",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"function",name:"exitFeeAmount",inputs:[{name:"assets",type:"uint256",internalType:"uint256"}],outputs:[{name:"",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"function",name:"generalConfig",inputs:[],outputs:[{name:"admin",type:"address",internalType:"address"},{name:"protocolMultisig",type:"address",internalType:"address"},{name:"feeDenominator",type:"uint256",internalType:"uint256"},{name:"trustBonding",type:"address",internalType:"address"},{name:"minDeposit",type:"uint256",internalType:"uint256"},{name:"minShare",type:"uint256",internalType:"uint256"},{name:"atomDataMaxLength",type:"uint256",internalType:"uint256"},{name:"decimalPrecision",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"function",name:"getAtom",inputs:[{name:"atomId",type:"bytes32",internalType:"bytes32"}],outputs:[{name:"data",type:"bytes",internalType:"bytes"}],stateMutability:"view"},{type:"function",name:"getAtomConfig",inputs:[],outputs:[{name:"",type:"tuple",internalType:"struct AtomConfig",components:[{name:"atomCreationProtocolFee",type:"uint256",internalType:"uint256"},{name:"atomWalletDepositFee",type:"uint256",internalType:"uint256"}]}],stateMutability:"view"},{type:"function",name:"getAtomCost",inputs:[],outputs:[{name:"",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"function",name:"getAtomCreationCost",inputs:[],outputs:[{name:"",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"function",name:"getAtomWarden",inputs:[],outputs:[{name:"",type:"address",internalType:"address"}],stateMutability:"view"},{type:"function",name:"getBondingCurveConfig",inputs:[],outputs:[{name:"",type:"tuple",internalType:"struct BondingCurveConfig",components:[{name:"registry",type:"address",internalType:"address"},{name:"defaultCurveId",type:"uint256",internalType:"uint256"}]}],stateMutability:"view"},{type:"function",name:"getCounterIdFromTripleId",inputs:[{name:"tripleId",type:"bytes32",internalType:"bytes32"}],outputs:[{name:"",type:"bytes32",internalType:"bytes32"}],stateMutability:"pure"},{type:"function",name:"getDefaultCurveId",inputs:[],outputs:[{name:"",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"function",name:"getGeneralConfig",inputs:[],outputs:[{name:"",type:"tuple",internalType:"struct GeneralConfig",components:[{name:"admin",type:"address",internalType:"address"},{name:"protocolMultisig",type:"address",internalType:"address"},{name:"feeDenominator",type:"uint256",internalType:"uint256"},{name:"trustBonding",type:"address",internalType:"address"},{name:"minDeposit",type:"uint256",internalType:"uint256"},{name:"minShare",type:"uint256",internalType:"uint256"},{name:"atomDataMaxLength",type:"uint256",internalType:"uint256"},{name:"decimalPrecision",type:"uint256",internalType:"uint256"}]}],stateMutability:"view"},{type:"function",name:"getRoleAdmin",inputs:[{name:"role",type:"bytes32",internalType:"bytes32"}],outputs:[{name:"",type:"bytes32",internalType:"bytes32"}],stateMutability:"view"},{type:"function",name:"getShares",inputs:[{name:"account",type:"address",internalType:"address"},{name:"termId",type:"bytes32",internalType:"bytes32"},{name:"curveId",type:"uint256",internalType:"uint256"}],outputs:[{name:"",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"function",name:"getTotalUtilizationForEpoch",inputs:[{name:"epoch",type:"uint256",internalType:"uint256"}],outputs:[{name:"",type:"int256",internalType:"int256"}],stateMutability:"view"},{type:"function",name:"getTriple",inputs:[{name:"tripleId",type:"bytes32",internalType:"bytes32"}],outputs:[{name:"",type:"bytes32",internalType:"bytes32"},{name:"",type:"bytes32",internalType:"bytes32"},{name:"",type:"bytes32",internalType:"bytes32"}],stateMutability:"view"},{type:"function",name:"getTripleConfig",inputs:[],outputs:[{name:"",type:"tuple",internalType:"struct TripleConfig",components:[{name:"tripleCreationProtocolFee",type:"uint256",internalType:"uint256"},{name:"totalAtomDepositsOnTripleCreation",type:"uint256",internalType:"uint256"},{name:"atomDepositFractionForTriple",type:"uint256",internalType:"uint256"}]}],stateMutability:"view"},{type:"function",name:"getTripleCost",inputs:[],outputs:[{name:"",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"function",name:"getTripleIdFromCounterId",inputs:[{name:"counterId",type:"bytes32",internalType:"bytes32"}],outputs:[{name:"",type:"bytes32",internalType:"bytes32"}],stateMutability:"view"},{type:"function",name:"getUserUtilizationForEpoch",inputs:[{name:"user",type:"address",internalType:"address"},{name:"epoch",type:"uint256",internalType:"uint256"}],outputs:[{name:"",type:"int256",internalType:"int256"}],stateMutability:"view"},{type:"function",name:"getVault",inputs:[{name:"termId",type:"bytes32",internalType:"bytes32"},{name:"curveId",type:"uint256",internalType:"uint256"}],outputs:[{name:"",type:"uint256",internalType:"uint256"},{name:"",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"function",name:"getVaultFees",inputs:[],outputs:[{name:"",type:"tuple",internalType:"struct VaultFees",components:[{name:"entryFee",type:"uint256",internalType:"uint256"},{name:"exitFee",type:"uint256",internalType:"uint256"},{name:"protocolFee",type:"uint256",internalType:"uint256"}]}],stateMutability:"view"},{type:"function",name:"getVaultType",inputs:[{name:"termId",type:"bytes32",internalType:"bytes32"}],outputs:[{name:"",type:"uint8",internalType:"enum IMultiVault.VaultType"}],stateMutability:"view"},{type:"function",name:"getWalletConfig",inputs:[],outputs:[{name:"",type:"tuple",internalType:"struct WalletConfig",components:[{name:"permit2",type:"address",internalType:"contract IPermit2"},{name:"entryPoint",type:"address",internalType:"address"},{name:"atomWarden",type:"address",internalType:"address"},{name:"atomWalletBeacon",type:"address",internalType:"address"},{name:"atomWalletFactory",type:"address",internalType:"address"}]}],stateMutability:"view"},{type:"function",name:"grantRole",inputs:[{name:"role",type:"bytes32",internalType:"bytes32"},{name:"account",type:"address",internalType:"address"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"hasRole",inputs:[{name:"role",type:"bytes32",internalType:"bytes32"},{name:"account",type:"address",internalType:"address"}],outputs:[{name:"",type:"bool",internalType:"bool"}],stateMutability:"view"},{type:"function",name:"initialize",inputs:[{name:"_generalConfig",type:"tuple",internalType:"struct GeneralConfig",components:[{name:"admin",type:"address",internalType:"address"},{name:"protocolMultisig",type:"address",internalType:"address"},{name:"feeDenominator",type:"uint256",internalType:"uint256"},{name:"trustBonding",type:"address",internalType:"address"},{name:"minDeposit",type:"uint256",internalType:"uint256"},{name:"minShare",type:"uint256",internalType:"uint256"},{name:"atomDataMaxLength",type:"uint256",internalType:"uint256"},{name:"decimalPrecision",type:"uint256",internalType:"uint256"}]},{name:"_atomConfig",type:"tuple",internalType:"struct AtomConfig",components:[{name:"atomCreationProtocolFee",type:"uint256",internalType:"uint256"},{name:"atomWalletDepositFee",type:"uint256",internalType:"uint256"}]},{name:"_tripleConfig",type:"tuple",internalType:"struct TripleConfig",components:[{name:"tripleCreationProtocolFee",type:"uint256",internalType:"uint256"},{name:"totalAtomDepositsOnTripleCreation",type:"uint256",internalType:"uint256"},{name:"atomDepositFractionForTriple",type:"uint256",internalType:"uint256"}]},{name:"_walletConfig",type:"tuple",internalType:"struct WalletConfig",components:[{name:"permit2",type:"address",internalType:"contract IPermit2"},{name:"entryPoint",type:"address",internalType:"address"},{name:"atomWarden",type:"address",internalType:"address"},{name:"atomWalletBeacon",type:"address",internalType:"address"},{name:"atomWalletFactory",type:"address",internalType:"address"}]},{name:"_vaultFees",type:"tuple",internalType:"struct VaultFees",components:[{name:"entryFee",type:"uint256",internalType:"uint256"},{name:"exitFee",type:"uint256",internalType:"uint256"},{name:"protocolFee",type:"uint256",internalType:"uint256"}]},{name:"_bondingCurveConfig",type:"tuple",internalType:"struct BondingCurveConfig",components:[{name:"registry",type:"address",internalType:"address"},{name:"defaultCurveId",type:"uint256",internalType:"uint256"}]}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"isAtom",inputs:[{name:"atomId",type:"bytes32",internalType:"bytes32"}],outputs:[{name:"",type:"bool",internalType:"bool"}],stateMutability:"view"},{type:"function",name:"isCounterTriple",inputs:[{name:"termId",type:"bytes32",internalType:"bytes32"}],outputs:[{name:"",type:"bool",internalType:"bool"}],stateMutability:"view"},{type:"function",name:"isTermCreated",inputs:[{name:"id",type:"bytes32",internalType:"bytes32"}],outputs:[{name:"",type:"bool",internalType:"bool"}],stateMutability:"view"},{type:"function",name:"isTriple",inputs:[{name:"termId",type:"bytes32",internalType:"bytes32"}],outputs:[{name:"",type:"bool",internalType:"bool"}],stateMutability:"view"},{type:"function",name:"lastActiveEpoch",inputs:[{name:"user",type:"address",internalType:"address"}],outputs:[{name:"epoch",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"function",name:"pause",inputs:[],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"paused",inputs:[],outputs:[{name:"",type:"bool",internalType:"bool"}],stateMutability:"view"},{type:"function",name:"personalUtilization",inputs:[{name:"user",type:"address",internalType:"address"},{name:"epoch",type:"uint256",internalType:"uint256"}],outputs:[{name:"utilizationAmount",type:"int256",internalType:"int256"}],stateMutability:"view"},{type:"function",name:"previewAtomCreate",inputs:[{name:"termId",type:"bytes32",internalType:"bytes32"},{name:"curveId",type:"uint256",internalType:"uint256"},{name:"assets",type:"uint256",internalType:"uint256"}],outputs:[{name:"shares",type:"uint256",internalType:"uint256"},{name:"assetsAfterFixedFees",type:"uint256",internalType:"uint256"},{name:"assetsAfterFees",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"function",name:"previewDeposit",inputs:[{name:"termId",type:"bytes32",internalType:"bytes32"},{name:"curveId",type:"uint256",internalType:"uint256"},{name:"assets",type:"uint256",internalType:"uint256"}],outputs:[{name:"shares",type:"uint256",internalType:"uint256"},{name:"assetsAfterFees",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"function",name:"previewRedeem",inputs:[{name:"termId",type:"bytes32",internalType:"bytes32"},{name:"curveId",type:"uint256",internalType:"uint256"},{name:"assets",type:"uint256",internalType:"uint256"}],outputs:[{name:"shares",type:"uint256",internalType:"uint256"},{name:"assetsAfterFees",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"function",name:"previewTripleCreate",inputs:[{name:"termId",type:"bytes32",internalType:"bytes32"},{name:"curveId",type:"uint256",internalType:"uint256"},{name:"assets",type:"uint256",internalType:"uint256"}],outputs:[{name:"shares",type:"uint256",internalType:"uint256"},{name:"assetsAfterFixedFees",type:"uint256",internalType:"uint256"},{name:"assetsAfterFees",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"function",name:"protocolFeeAmount",inputs:[{name:"assets",type:"uint256",internalType:"uint256"}],outputs:[{name:"",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"function",name:"redeem",inputs:[{name:"receiver",type:"address",internalType:"address"},{name:"termId",type:"bytes32",internalType:"bytes32"},{name:"curveId",type:"uint256",internalType:"uint256"},{name:"shares",type:"uint256",internalType:"uint256"},{name:"minAssets",type:"uint256",internalType:"uint256"}],outputs:[{name:"",type:"uint256",internalType:"uint256"}],stateMutability:"nonpayable"},{type:"function",name:"redeemBatch",inputs:[{name:"receiver",type:"address",internalType:"address"},{name:"termIds",type:"bytes32[]",internalType:"bytes32[]"},{name:"curveIds",type:"uint256[]",internalType:"uint256[]"},{name:"shares",type:"uint256[]",internalType:"uint256[]"},{name:"minAssets",type:"uint256[]",internalType:"uint256[]"}],outputs:[{name:"received",type:"uint256[]",internalType:"uint256[]"}],stateMutability:"nonpayable"},{type:"function",name:"renounceRole",inputs:[{name:"role",type:"bytes32",internalType:"bytes32"},{name:"callerConfirmation",type:"address",internalType:"address"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"revokeRole",inputs:[{name:"role",type:"bytes32",internalType:"bytes32"},{name:"account",type:"address",internalType:"address"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"setAtomConfig",inputs:[{name:"_atomConfig",type:"tuple",internalType:"struct AtomConfig",components:[{name:"atomCreationProtocolFee",type:"uint256",internalType:"uint256"},{name:"atomWalletDepositFee",type:"uint256",internalType:"uint256"}]}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"setBondingCurveConfig",inputs:[{name:"_bondingCurveConfig",type:"tuple",internalType:"struct BondingCurveConfig",components:[{name:"registry",type:"address",internalType:"address"},{name:"defaultCurveId",type:"uint256",internalType:"uint256"}]}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"setGeneralConfig",inputs:[{name:"_generalConfig",type:"tuple",internalType:"struct GeneralConfig",components:[{name:"admin",type:"address",internalType:"address"},{name:"protocolMultisig",type:"address",internalType:"address"},{name:"feeDenominator",type:"uint256",internalType:"uint256"},{name:"trustBonding",type:"address",internalType:"address"},{name:"minDeposit",type:"uint256",internalType:"uint256"},{name:"minShare",type:"uint256",internalType:"uint256"},{name:"atomDataMaxLength",type:"uint256",internalType:"uint256"},{name:"decimalPrecision",type:"uint256",internalType:"uint256"}]}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"setTermCount",inputs:[{name:"_termCount",type:"uint256",internalType:"uint256"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"setTripleConfig",inputs:[{name:"_tripleConfig",type:"tuple",internalType:"struct TripleConfig",components:[{name:"tripleCreationProtocolFee",type:"uint256",internalType:"uint256"},{name:"totalAtomDepositsOnTripleCreation",type:"uint256",internalType:"uint256"},{name:"atomDepositFractionForTriple",type:"uint256",internalType:"uint256"}]}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"setVaultFees",inputs:[{name:"_vaultFees",type:"tuple",internalType:"struct VaultFees",components:[{name:"entryFee",type:"uint256",internalType:"uint256"},{name:"exitFee",type:"uint256",internalType:"uint256"},{name:"protocolFee",type:"uint256",internalType:"uint256"}]}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"setWalletConfig",inputs:[{name:"_walletConfig",type:"tuple",internalType:"struct WalletConfig",components:[{name:"permit2",type:"address",internalType:"contract IPermit2"},{name:"entryPoint",type:"address",internalType:"address"},{name:"atomWarden",type:"address",internalType:"address"},{name:"atomWalletBeacon",type:"address",internalType:"address"},{name:"atomWalletFactory",type:"address",internalType:"address"}]}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"supportsInterface",inputs:[{name:"interfaceId",type:"bytes4",internalType:"bytes4"}],outputs:[{name:"",type:"bool",internalType:"bool"}],stateMutability:"view"},{type:"function",name:"totalTermsCreated",inputs:[],outputs:[{name:"",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"function",name:"totalUtilization",inputs:[{name:"epoch",type:"uint256",internalType:"uint256"}],outputs:[{name:"utilizationAmount",type:"int256",internalType:"int256"}],stateMutability:"view"},{type:"function",name:"triple",inputs:[{name:"tripleId",type:"bytes32",internalType:"bytes32"}],outputs:[{name:"",type:"bytes32",internalType:"bytes32"},{name:"",type:"bytes32",internalType:"bytes32"},{name:"",type:"bytes32",internalType:"bytes32"}],stateMutability:"view"},{type:"function",name:"tripleConfig",inputs:[],outputs:[{name:"tripleCreationProtocolFee",type:"uint256",internalType:"uint256"},{name:"totalAtomDepositsOnTripleCreation",type:"uint256",internalType:"uint256"},{name:"atomDepositFractionForTriple",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"function",name:"unpause",inputs:[],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"vaultFees",inputs:[],outputs:[{name:"entryFee",type:"uint256",internalType:"uint256"},{name:"exitFee",type:"uint256",internalType:"uint256"},{name:"protocolFee",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"function",name:"walletConfig",inputs:[],outputs:[{name:"permit2",type:"address",internalType:"contract IPermit2"},{name:"entryPoint",type:"address",internalType:"address"},{name:"atomWarden",type:"address",internalType:"address"},{name:"atomWalletBeacon",type:"address",internalType:"address"},{name:"atomWalletFactory",type:"address",internalType:"address"}],stateMutability:"view"},{type:"event",name:"ApprovalTypeUpdated",inputs:[{name:"sender",type:"address",indexed:!0,internalType:"address"},{name:"receiver",type:"address",indexed:!0,internalType:"address"},{name:"approvalType",type:"uint8",indexed:!1,internalType:"enum IMultiVault.ApprovalTypes"}],anonymous:!1},{type:"event",name:"AtomCreated",inputs:[{name:"creator",type:"address",indexed:!0,internalType:"address"},{name:"termId",type:"bytes32",indexed:!0,internalType:"bytes32"},{name:"atomData",type:"bytes",indexed:!1,internalType:"bytes"},{name:"atomWallet",type:"address",indexed:!1,internalType:"address"}],anonymous:!1},{type:"event",name:"AtomDepositFractionDeposited",inputs:[{name:"termId",type:"bytes32",indexed:!0,internalType:"bytes32"},{name:"sender",type:"address",indexed:!0,internalType:"address"},{name:"amount",type:"uint256",indexed:!1,internalType:"uint256"}],anonymous:!1},{type:"event",name:"AtomWalletDepositFeeCollected",inputs:[{name:"termId",type:"bytes32",indexed:!0,internalType:"bytes32"},{name:"sender",type:"address",indexed:!0,internalType:"address"},{name:"amount",type:"uint256",indexed:!1,internalType:"uint256"}],anonymous:!1},{type:"event",name:"AtomWalletDepositFeesClaimed",inputs:[{name:"termId",type:"bytes32",indexed:!0,internalType:"bytes32"},{name:"atomWalletOwner",type:"address",indexed:!0,internalType:"address"},{name:"feesClaimed",type:"uint256",indexed:!0,internalType:"uint256"}],anonymous:!1},{type:"event",name:"ConfigSynced",inputs:[{name:"caller",type:"address",indexed:!0,internalType:"address"}],anonymous:!1},{type:"event",name:"Deposited",inputs:[{name:"sender",type:"address",indexed:!0,internalType:"address"},{name:"receiver",type:"address",indexed:!0,internalType:"address"},{name:"termId",type:"bytes32",indexed:!0,internalType:"bytes32"},{name:"curveId",type:"uint256",indexed:!1,internalType:"uint256"},{name:"assets",type:"uint256",indexed:!1,internalType:"uint256"},{name:"assetsAfterFees",type:"uint256",indexed:!1,internalType:"uint256"},{name:"shares",type:"uint256",indexed:!1,internalType:"uint256"},{name:"totalShares",type:"uint256",indexed:!1,internalType:"uint256"},{name:"vaultType",type:"uint8",indexed:!1,internalType:"enum IMultiVault.VaultType"}],anonymous:!1},{type:"event",name:"EntryFeeCollected",inputs:[{name:"termId",type:"bytes32",indexed:!0,internalType:"bytes32"},{name:"curveId",type:"uint256",indexed:!0,internalType:"uint256"},{name:"sender",type:"address",indexed:!0,internalType:"address"},{name:"amount",type:"uint256",indexed:!1,internalType:"uint256"}],anonymous:!1},{type:"event",name:"ExitFeeCollected",inputs:[{name:"termId",type:"bytes32",indexed:!0,internalType:"bytes32"},{name:"curveId",type:"uint256",indexed:!0,internalType:"uint256"},{name:"sender",type:"address",indexed:!0,internalType:"address"},{name:"amount",type:"uint256",indexed:!1,internalType:"uint256"}],anonymous:!1},{type:"event",name:"Initialized",inputs:[{name:"version",type:"uint64",indexed:!1,internalType:"uint64"}],anonymous:!1},{type:"event",name:"Paused",inputs:[{name:"account",type:"address",indexed:!1,internalType:"address"}],anonymous:!1},{type:"event",name:"PersonalUtilizationAdded",inputs:[{name:"user",type:"address",indexed:!0,internalType:"address"},{name:"epoch",type:"uint256",indexed:!0,internalType:"uint256"},{name:"valueAdded",type:"int256",indexed:!0,internalType:"int256"},{name:"personalUtilization",type:"int256",indexed:!1,internalType:"int256"}],anonymous:!1},{type:"event",name:"PersonalUtilizationRemoved",inputs:[{name:"user",type:"address",indexed:!0,internalType:"address"},{name:"epoch",type:"uint256",indexed:!0,internalType:"uint256"},{name:"valueRemoved",type:"int256",indexed:!0,internalType:"int256"},{name:"personalUtilization",type:"int256",indexed:!1,internalType:"int256"}],anonymous:!1},{type:"event",name:"ProtocolFeeAccrued",inputs:[{name:"epoch",type:"uint256",indexed:!0,internalType:"uint256"},{name:"amount",type:"uint256",indexed:!1,internalType:"uint256"}],anonymous:!1},{type:"event",name:"ProtocolFeeTransferred",inputs:[{name:"epoch",type:"uint256",indexed:!0,internalType:"uint256"},{name:"destination",type:"address",indexed:!0,internalType:"address"},{name:"amount",type:"uint256",indexed:!1,internalType:"uint256"}],anonymous:!1},{type:"event",name:"Redeemed",inputs:[{name:"sender",type:"address",indexed:!0,internalType:"address"},{name:"receiver",type:"address",indexed:!0,internalType:"address"},{name:"termId",type:"bytes32",indexed:!0,internalType:"bytes32"},{name:"curveId",type:"uint256",indexed:!1,internalType:"uint256"},{name:"shares",type:"uint256",indexed:!1,internalType:"uint256"},{name:"totalShares",type:"uint256",indexed:!1,internalType:"uint256"},{name:"assets",type:"uint256",indexed:!1,internalType:"uint256"},{name:"fees",type:"uint256",indexed:!1,internalType:"uint256"},{name:"vaultType",type:"uint8",indexed:!1,internalType:"enum IMultiVault.VaultType"}],anonymous:!1},{type:"event",name:"RoleAdminChanged",inputs:[{name:"role",type:"bytes32",indexed:!0,internalType:"bytes32"},{name:"previousAdminRole",type:"bytes32",indexed:!0,internalType:"bytes32"},{name:"newAdminRole",type:"bytes32",indexed:!0,internalType:"bytes32"}],anonymous:!1},{type:"event",name:"RoleGranted",inputs:[{name:"role",type:"bytes32",indexed:!0,internalType:"bytes32"},{name:"account",type:"address",indexed:!0,internalType:"address"},{name:"sender",type:"address",indexed:!0,internalType:"address"}],anonymous:!1},{type:"event",name:"RoleRevoked",inputs:[{name:"role",type:"bytes32",indexed:!0,internalType:"bytes32"},{name:"account",type:"address",indexed:!0,internalType:"address"},{name:"sender",type:"address",indexed:!0,internalType:"address"}],anonymous:!1},{type:"event",name:"SharePriceChanged",inputs:[{name:"termId",type:"bytes32",indexed:!0,internalType:"bytes32"},{name:"curveId",type:"uint256",indexed:!0,internalType:"uint256"},{name:"sharePrice",type:"uint256",indexed:!1,internalType:"uint256"},{name:"totalAssets",type:"uint256",indexed:!1,internalType:"uint256"},{name:"totalShares",type:"uint256",indexed:!1,internalType:"uint256"},{name:"vaultType",type:"uint8",indexed:!1,internalType:"enum IMultiVault.VaultType"}],anonymous:!1},{type:"event",name:"SharesPullApproval",inputs:[{name:"accountFrom",type:"address",indexed:!0,internalType:"address"},{name:"accountTo",type:"address",indexed:!0,internalType:"address"},{name:"status",type:"bool",indexed:!1,internalType:"bool"}],anonymous:!1},{type:"event",name:"TermCountSet",inputs:[{name:"termCount",type:"uint256",indexed:!1,internalType:"uint256"}],anonymous:!1},{type:"event",name:"TokensRecovered",inputs:[{name:"token",type:"address",indexed:!0,internalType:"address"},{name:"recipient",type:"address",indexed:!0,internalType:"address"},{name:"amount",type:"uint256",indexed:!0,internalType:"uint256"}],anonymous:!1},{type:"event",name:"TotalUtilizationAdded",inputs:[{name:"epoch",type:"uint256",indexed:!0,internalType:"uint256"},{name:"valueAdded",type:"int256",indexed:!0,internalType:"int256"},{name:"totalUtilization",type:"int256",indexed:!0,internalType:"int256"}],anonymous:!1},{type:"event",name:"TotalUtilizationRemoved",inputs:[{name:"epoch",type:"uint256",indexed:!0,internalType:"uint256"},{name:"valueRemoved",type:"int256",indexed:!0,internalType:"int256"},{name:"totalUtilization",type:"int256",indexed:!0,internalType:"int256"}],anonymous:!1},{type:"event",name:"TripleCreated",inputs:[{name:"creator",type:"address",indexed:!0,internalType:"address"},{name:"termId",type:"bytes32",indexed:!0,internalType:"bytes32"},{name:"subjectId",type:"bytes32",indexed:!1,internalType:"bytes32"},{name:"predicateId",type:"bytes32",indexed:!1,internalType:"bytes32"},{name:"objectId",type:"bytes32",indexed:!1,internalType:"bytes32"}],anonymous:!1},{type:"event",name:"Unpaused",inputs:[{name:"account",type:"address",indexed:!1,internalType:"address"}],anonymous:!1},{type:"event",name:"WalletMigrated",inputs:[{name:"termId",type:"bytes32",indexed:!0,internalType:"bytes32"},{name:"curveId",type:"uint256",indexed:!0,internalType:"uint256"},{name:"oldWallet",type:"address",indexed:!0,internalType:"address"},{name:"newWallet",type:"address",indexed:!1,internalType:"address"},{name:"sharesMigrated",type:"uint256",indexed:!1,internalType:"uint256"}],anonymous:!1},{type:"event",name:"WrappedERC20Registered",inputs:[{name:"termId",type:"bytes32",indexed:!0,internalType:"bytes32"},{name:"curveId",type:"uint256",indexed:!0,internalType:"uint256"},{name:"wrappedERC20",type:"address",indexed:!0,internalType:"address"}],anonymous:!1},{type:"event",name:"WrapperTransfer",inputs:[{name:"from",type:"address",indexed:!0,internalType:"address"},{name:"to",type:"address",indexed:!0,internalType:"address"},{name:"termId",type:"bytes32",indexed:!0,internalType:"bytes32"},{name:"curveId",type:"uint256",indexed:!1,internalType:"uint256"},{name:"shares",type:"uint256",indexed:!1,internalType:"uint256"}],anonymous:!1},{type:"error",name:"AccessControlBadConfirmation",inputs:[]},{type:"error",name:"AccessControlUnauthorizedAccount",inputs:[{name:"account",type:"address",internalType:"address"},{name:"neededRole",type:"bytes32",internalType:"bytes32"}]},{type:"error",name:"AtomDoesNotExist",inputs:[{name:"termId",type:"bytes32",internalType:"bytes32"}]},{type:"error",name:"EnforcedPause",inputs:[]},{type:"error",name:"ExpectedPause",inputs:[]},{type:"error",name:"FailedCall",inputs:[]},{type:"error",name:"InsufficientBalance",inputs:[{name:"balance",type:"uint256",internalType:"uint256"},{name:"needed",type:"uint256",internalType:"uint256"}]},{type:"error",name:"InvalidInitialization",inputs:[]},{type:"error",name:"MultiVault_ActionExceedsMaxAssets",inputs:[]},{type:"error",name:"MultiVault_ArraysNotSameLength",inputs:[]},{type:"error",name:"MultiVault_AtomDataTooLong",inputs:[]},{type:"error",name:"MultiVault_AtomDoesNotExist",inputs:[{name:"atomId",type:"bytes32",internalType:"bytes32"}]},{type:"error",name:"MultiVault_AtomExists",inputs:[{name:"atomData",type:"bytes",internalType:"bytes"}]},{type:"error",name:"MultiVault_BurnFromZeroAddress",inputs:[]},{type:"error",name:"MultiVault_BurnInsufficientBalance",inputs:[]},{type:"error",name:"MultiVault_CannotApproveOrRevokeSelf",inputs:[]},{type:"error",name:"MultiVault_DepositBelowMinimumDeposit",inputs:[]},{type:"error",name:"MultiVault_DepositOrRedeemZeroShares",inputs:[]},{type:"error",name:"MultiVault_EmptyArray",inputs:[]},{type:"error",name:"MultiVault_InsufficientAssets",inputs:[]},{type:"error",name:"MultiVault_InsufficientBalance",inputs:[]},{type:"error",name:"MultiVault_InsufficientRemainingSharesInVault",inputs:[{name:"remainingShares",type:"uint256",internalType:"uint256"}]},{type:"error",name:"MultiVault_InsufficientSharesInVault",inputs:[]},{type:"error",name:"MultiVault_InvalidArrayLength",inputs:[]},{type:"error",name:"MultiVault_InvalidBondingCurveId",inputs:[]},{type:"error",name:"MultiVault_NoAtomDataProvided",inputs:[]},{type:"error",name:"MultiVault_OnlyAssociatedAtomWallet",inputs:[]},{type:"error",name:"MultiVault_RedeemerNotApproved",inputs:[]},{type:"error",name:"MultiVault_SenderNotApproved",inputs:[]},{type:"error",name:"MultiVault_SlippageExceeded",inputs:[]},{type:"error",name:"MultiVault_TermDoesNotExist",inputs:[]},{type:"error",name:"MultiVault_TripleExists",inputs:[{name:"termId",type:"bytes32",internalType:"bytes32"},{name:"subjectId",type:"bytes32",internalType:"bytes32"},{name:"predicateId",type:"bytes32",internalType:"bytes32"},{name:"objectId",type:"bytes32",internalType:"bytes32"}]},{type:"error",name:"MultiVault_ZeroAddress",inputs:[]},{type:"error",name:"MultiVault_ZeroValue",inputs:[]},{type:"error",name:"NotInitializing",inputs:[]},{type:"error",name:"ReentrancyGuardReentrantCall",inputs:[]},{type:"error",name:"TermDoesNotExist",inputs:[{name:"termId",type:"bytes32",internalType:"bytes32"}]},{type:"error",name:"TripleDoesNotExist",inputs:[{name:"termId",type:"bytes32",internalType:"bytes32"}]}];function QT(r,e){return function(){return r.apply(e,arguments)}}const{toString:LD}=Object.prototype,{getPrototypeOf:cy}=Object,{iterator:lp,toStringTag:$T}=Symbol,up=(r=>e=>{const i=LD.call(e);return r[i]||(r[i]=i.slice(8,-1).toLowerCase())})(Object.create(null)),Sn=r=>(r=r.toLowerCase(),e=>up(e)===r),cp=r=>e=>typeof e===r,{isArray:kl}=Array,Ul=cp("undefined");function Qc(r){return r!==null&&!Ul(r)&&r.constructor!==null&&!Ul(r.constructor)&&Pr(r.constructor.isBuffer)&&r.constructor.isBuffer(r)}const JT=Sn("ArrayBuffer");function kD(r){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(r):e=r&&r.buffer&&JT(r.buffer),e}const UD=cp("string"),Pr=cp("function"),ew=cp("number"),$c=r=>r!==null&&typeof r=="object",FD=r=>r===!0||r===!1,hp=r=>{if(up(r)!=="object")return!1;const e=cy(r);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!($T in r)&&!(lp in r)},BD=r=>{if(!$c(r)||Qc(r))return!1;try{return Object.keys(r).length===0&&Object.getPrototypeOf(r)===Object.prototype}catch{return!1}},zD=Sn("Date"),jD=Sn("File"),VD=Sn("Blob"),GD=Sn("FileList"),HD=r=>$c(r)&&Pr(r.pipe),WD=r=>{let e;return r&&(typeof FormData=="function"&&r instanceof FormData||Pr(r.append)&&((e=up(r))==="formdata"||e==="object"&&Pr(r.toString)&&r.toString()==="[object FormData]"))},qD=Sn("URLSearchParams"),[XD,YD,KD,ZD]=["ReadableStream","Request","Response","Headers"].map(Sn),QD=r=>r.trim?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Jc(r,e,{allOwnKeys:i=!1}={}){if(r===null||typeof r>"u")return;let n,s;if(typeof r!="object"&&(r=[r]),kl(r))for(n=0,s=r.length;n<s;n++)e.call(null,r[n],n,r);else{if(Qc(r))return;const a=i?Object.getOwnPropertyNames(r):Object.keys(r),o=a.length;let l;for(n=0;n<o;n++)l=a[n],e.call(null,r[l],l,r)}}function tw(r,e){if(Qc(r))return null;e=e.toLowerCase();const i=Object.keys(r);let n=i.length,s;for(;n-- >0;)if(s=i[n],e===s.toLowerCase())return s;return null}const So=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,iw=r=>!Ul(r)&&r!==So;function hy(){const{caseless:r,skipUndefined:e}=iw(this)&&this||{},i={},n=(s,a)=>{const o=r&&tw(i,a)||a;hp(i[o])&&hp(s)?i[o]=hy(i[o],s):hp(s)?i[o]=hy({},s):kl(s)?i[o]=s.slice():(!e||!Ul(s))&&(i[o]=s)};for(let s=0,a=arguments.length;s<a;s++)arguments[s]&&Jc(arguments[s],n);return i}const $D=(r,e,i,{allOwnKeys:n}={})=>(Jc(e,(s,a)=>{i&&Pr(s)?r[a]=QT(s,i):r[a]=s},{allOwnKeys:n}),r),JD=r=>(r.charCodeAt(0)===65279&&(r=r.slice(1)),r),eL=(r,e,i,n)=>{r.prototype=Object.create(e.prototype,n),r.prototype.constructor=r,Object.defineProperty(r,"super",{value:e.prototype}),i&&Object.assign(r.prototype,i)},tL=(r,e,i,n)=>{let s,a,o;const l={};if(e=e||{},r==null)return e;do{for(s=Object.getOwnPropertyNames(r),a=s.length;a-- >0;)o=s[a],(!n||n(o,r,e))&&!l[o]&&(e[o]=r[o],l[o]=!0);r=i!==!1&&cy(r)}while(r&&(!i||i(r,e))&&r!==Object.prototype);return e},iL=(r,e,i)=>{r=String(r),(i===void 0||i>r.length)&&(i=r.length),i-=e.length;const n=r.indexOf(e,i);return n!==-1&&n===i},rL=r=>{if(!r)return null;if(kl(r))return r;let e=r.length;if(!ew(e))return null;const i=new Array(e);for(;e-- >0;)i[e]=r[e];return i},nL=(r=>e=>r&&e instanceof r)(typeof Uint8Array<"u"&&cy(Uint8Array)),sL=(r,e)=>{const n=(r&&r[lp]).call(r);let s;for(;(s=n.next())&&!s.done;){const a=s.value;e.call(r,a[0],a[1])}},aL=(r,e)=>{let i;const n=[];for(;(i=r.exec(e))!==null;)n.push(i);return n},oL=Sn("HTMLFormElement"),lL=r=>r.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(i,n,s){return n.toUpperCase()+s}),rw=(({hasOwnProperty:r})=>(e,i)=>r.call(e,i))(Object.prototype),uL=Sn("RegExp"),nw=(r,e)=>{const i=Object.getOwnPropertyDescriptors(r),n={};Jc(i,(s,a)=>{let o;(o=e(s,a,r))!==!1&&(n[a]=o||s)}),Object.defineProperties(r,n)},cL=r=>{nw(r,(e,i)=>{if(Pr(r)&&["arguments","caller","callee"].indexOf(i)!==-1)return!1;const n=r[i];if(Pr(n)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+i+"'")})}})},hL=(r,e)=>{const i={},n=s=>{s.forEach(a=>{i[a]=!0})};return kl(r)?n(r):n(String(r).split(e)),i},dL=()=>{},pL=(r,e)=>r!=null&&Number.isFinite(r=+r)?r:e;function fL(r){return!!(r&&Pr(r.append)&&r[$T]==="FormData"&&r[lp])}const mL=r=>{const e=new Array(10),i=(n,s)=>{if($c(n)){if(e.indexOf(n)>=0)return;if(Qc(n))return n;if(!("toJSON"in n)){e[s]=n;const a=kl(n)?[]:{};return Jc(n,(o,l)=>{const u=i(o,s+1);!Ul(u)&&(a[l]=u)}),e[s]=void 0,a}}return n};return i(r,0)},gL=Sn("AsyncFunction"),yL=r=>r&&($c(r)||Pr(r))&&Pr(r.then)&&Pr(r.catch),sw=((r,e)=>r?setImmediate:e?((i,n)=>(So.addEventListener("message",({source:s,data:a})=>{s===So&&a===i&&n.length&&n.shift()()},!1),s=>{n.push(s),So.postMessage(i,"*")}))(`axios@${Math.random()}`,[]):i=>setTimeout(i))(typeof setImmediate=="function",Pr(So.postMessage)),vL=typeof queueMicrotask<"u"?queueMicrotask.bind(So):typeof process<"u"&&process.nextTick||sw,he={isArray:kl,isArrayBuffer:JT,isBuffer:Qc,isFormData:WD,isArrayBufferView:kD,isString:UD,isNumber:ew,isBoolean:FD,isObject:$c,isPlainObject:hp,isEmptyObject:BD,isReadableStream:XD,isRequest:YD,isResponse:KD,isHeaders:ZD,isUndefined:Ul,isDate:zD,isFile:jD,isBlob:VD,isRegExp:uL,isFunction:Pr,isStream:HD,isURLSearchParams:qD,isTypedArray:nL,isFileList:GD,forEach:Jc,merge:hy,extend:$D,trim:QD,stripBOM:JD,inherits:eL,toFlatObject:tL,kindOf:up,kindOfTest:Sn,endsWith:iL,toArray:rL,forEachEntry:sL,matchAll:aL,isHTMLForm:oL,hasOwnProperty:rw,hasOwnProp:rw,reduceDescriptors:nw,freezeMethods:cL,toObjectSet:hL,toCamelCase:lL,noop:dL,toFiniteNumber:pL,findKey:tw,global:So,isContextDefined:iw,isSpecCompliantForm:fL,toJSONObject:mL,isAsyncFn:gL,isThenable:yL,setImmediate:sw,asap:vL,isIterable:r=>r!=null&&Pr(r[lp])};function St(r,e,i,n,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=r,this.name="AxiosError",e&&(this.code=e),i&&(this.config=i),n&&(this.request=n),s&&(this.response=s,this.status=s.status?s.status:null)}he.inherits(St,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:he.toJSONObject(this.config),code:this.code,status:this.status}}});const aw=St.prototype,ow={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(r=>{ow[r]={value:r}}),Object.defineProperties(St,ow),Object.defineProperty(aw,"isAxiosError",{value:!0}),St.from=(r,e,i,n,s,a)=>{const o=Object.create(aw);he.toFlatObject(r,o,function(h){return h!==Error.prototype},c=>c!=="isAxiosError");const l=r&&r.message?r.message:"Error",u=e==null&&r?r.code:e;return St.call(o,l,u,i,n,s),r&&o.cause==null&&Object.defineProperty(o,"cause",{value:r,configurable:!0}),o.name=r&&r.name||"Error",a&&Object.assign(o,a),o};const bL=null;function dy(r){return he.isPlainObject(r)||he.isArray(r)}function lw(r){return he.endsWith(r,"[]")?r.slice(0,-2):r}function uw(r,e,i){return r?r.concat(e).map(function(s,a){return s=lw(s),!i&&a?"["+s+"]":s}).join(i?".":""):e}function xL(r){return he.isArray(r)&&!r.some(dy)}const _L=he.toFlatObject(he,{},null,function(e){return/^is[A-Z]/.test(e)});function dp(r,e,i){if(!he.isObject(r))throw new TypeError("target must be an object");e=e||new FormData,i=he.toFlatObject(i,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,v){return!he.isUndefined(v[y])});const n=i.metaTokens,s=i.visitor||h,a=i.dots,o=i.indexes,u=(i.Blob||typeof Blob<"u"&&Blob)&&he.isSpecCompliantForm(e);if(!he.isFunction(s))throw new TypeError("visitor must be a function");function c(m){if(m===null)return"";if(he.isDate(m))return m.toISOString();if(he.isBoolean(m))return m.toString();if(!u&&he.isBlob(m))throw new St("Blob is not supported. Use a Buffer instead.");return he.isArrayBuffer(m)||he.isTypedArray(m)?u&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function h(m,y,v){let g=m;if(m&&!v&&typeof m=="object"){if(he.endsWith(y,"{}"))y=n?y:y.slice(0,-2),m=JSON.stringify(m);else if(he.isArray(m)&&xL(m)||(he.isFileList(m)||he.endsWith(y,"[]"))&&(g=he.toArray(m)))return y=lw(y),g.forEach(function(x,b){!(he.isUndefined(x)||x===null)&&e.append(o===!0?uw([y],b,a):o===null?y:y+"[]",c(x))}),!1}return dy(m)?!0:(e.append(uw(v,y,a),c(m)),!1)}const d=[],p=Object.assign(_L,{defaultVisitor:h,convertValue:c,isVisitable:dy});function f(m,y){if(!he.isUndefined(m)){if(d.indexOf(m)!==-1)throw Error("Circular reference detected in "+y.join("."));d.push(m),he.forEach(m,function(g,_){(!(he.isUndefined(g)||g===null)&&s.call(e,g,he.isString(_)?_.trim():_,y,p))===!0&&f(g,y?y.concat(_):[_])}),d.pop()}}if(!he.isObject(r))throw new TypeError("data must be an object");return f(r),e}function cw(r){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(r).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function py(r,e){this._pairs=[],r&&dp(r,this,e)}const hw=py.prototype;hw.append=function(e,i){this._pairs.push([e,i])},hw.toString=function(e){const i=e?function(n){return e.call(this,n,cw)}:cw;return this._pairs.map(function(s){return i(s[0])+"="+i(s[1])},"").join("&")};function TL(r){return encodeURIComponent(r).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function dw(r,e,i){if(!e)return r;const n=i&&i.encode||TL;he.isFunction(i)&&(i={serialize:i});const s=i&&i.serialize;let a;if(s?a=s(e,i):a=he.isURLSearchParams(e)?e.toString():new py(e,i).toString(n),a){const o=r.indexOf("#");o!==-1&&(r=r.slice(0,o)),r+=(r.indexOf("?")===-1?"?":"&")+a}return r}class pw{constructor(){this.handlers=[]}use(e,i,n){return this.handlers.push({fulfilled:e,rejected:i,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){he.forEach(this.handlers,function(n){n!==null&&e(n)})}}const fw={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},wL={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:py,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},fy=typeof window<"u"&&typeof document<"u",my=typeof navigator=="object"&&navigator||void 0,SL=fy&&(!my||["ReactNative","NativeScript","NS"].indexOf(my.product)<0),EL=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",ML=fy&&window.location.href||"http://localhost",ar={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:fy,hasStandardBrowserEnv:SL,hasStandardBrowserWebWorkerEnv:EL,navigator:my,origin:ML},Symbol.toStringTag,{value:"Module"})),...wL};function AL(r,e){return dp(r,new ar.classes.URLSearchParams,{visitor:function(i,n,s,a){return ar.isNode&&he.isBuffer(i)?(this.append(n,i.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)},...e})}function CL(r){return he.matchAll(/\w+|\[(\w*)]/g,r).map(e=>e[0]==="[]"?"":e[1]||e[0])}function RL(r){const e={},i=Object.keys(r);let n;const s=i.length;let a;for(n=0;n<s;n++)a=i[n],e[a]=r[a];return e}function mw(r){function e(i,n,s,a){let o=i[a++];if(o==="__proto__")return!0;const l=Number.isFinite(+o),u=a>=i.length;return o=!o&&he.isArray(s)?s.length:o,u?(he.hasOwnProp(s,o)?s[o]=[s[o],n]:s[o]=n,!l):((!s[o]||!he.isObject(s[o]))&&(s[o]=[]),e(i,n,s[o],a)&&he.isArray(s[o])&&(s[o]=RL(s[o])),!l)}if(he.isFormData(r)&&he.isFunction(r.entries)){const i={};return he.forEachEntry(r,(n,s)=>{e(CL(n),s,i,0)}),i}return null}function NL(r,e,i){if(he.isString(r))try{return(e||JSON.parse)(r),he.trim(r)}catch(n){if(n.name!=="SyntaxError")throw n}return(i||JSON.stringify)(r)}const eh={transitional:fw,adapter:["xhr","http","fetch"],transformRequest:[function(e,i){const n=i.getContentType()||"",s=n.indexOf("application/json")>-1,a=he.isObject(e);if(a&&he.isHTMLForm(e)&&(e=new FormData(e)),he.isFormData(e))return s?JSON.stringify(mw(e)):e;if(he.isArrayBuffer(e)||he.isBuffer(e)||he.isStream(e)||he.isFile(e)||he.isBlob(e)||he.isReadableStream(e))return e;if(he.isArrayBufferView(e))return e.buffer;if(he.isURLSearchParams(e))return i.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let l;if(a){if(n.indexOf("application/x-www-form-urlencoded")>-1)return AL(e,this.formSerializer).toString();if((l=he.isFileList(e))||n.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return dp(l?{"files[]":e}:e,u&&new u,this.formSerializer)}}return a||s?(i.setContentType("application/json",!1),NL(e)):e}],transformResponse:[function(e){const i=this.transitional||eh.transitional,n=i&&i.forcedJSONParsing,s=this.responseType==="json";if(he.isResponse(e)||he.isReadableStream(e))return e;if(e&&he.isString(e)&&(n&&!this.responseType||s)){const o=!(i&&i.silentJSONParsing)&&s;try{return JSON.parse(e,this.parseReviver)}catch(l){if(o)throw l.name==="SyntaxError"?St.from(l,St.ERR_BAD_RESPONSE,this,null,this.response):l}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ar.classes.FormData,Blob:ar.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};he.forEach(["delete","get","head","post","put","patch"],r=>{eh.headers[r]={}});const PL=he.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),IL=r=>{const e={};let i,n,s;return r&&r.split(`
33
33
  `).forEach(function(o){s=o.indexOf(":"),i=o.substring(0,s).trim().toLowerCase(),n=o.substring(s+1).trim(),!(!i||e[i]&&PL[i])&&(i==="set-cookie"?e[i]?e[i].push(n):e[i]=[n]:e[i]=e[i]?e[i]+", "+n:n)}),e},gw=Symbol("internals");function th(r){return r&&String(r).trim().toLowerCase()}function pp(r){return r===!1||r==null?r:he.isArray(r)?r.map(pp):String(r)}function OL(r){const e=Object.create(null),i=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=i.exec(r);)e[n[1]]=n[2];return e}const DL=r=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(r.trim());function gy(r,e,i,n,s){if(he.isFunction(n))return n.call(this,e,i);if(s&&(e=i),!!he.isString(e)){if(he.isString(n))return e.indexOf(n)!==-1;if(he.isRegExp(n))return n.test(e)}}function LL(r){return r.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,i,n)=>i.toUpperCase()+n)}function kL(r,e){const i=he.toCamelCase(" "+e);["get","set","has"].forEach(n=>{Object.defineProperty(r,n+i,{value:function(s,a,o){return this[n].call(this,e,s,a,o)},configurable:!0})})}let Ir=class{constructor(e){e&&this.set(e)}set(e,i,n){const s=this;function a(l,u,c){const h=th(u);if(!h)throw new Error("header name must be a non-empty string");const d=he.findKey(s,h);(!d||s[d]===void 0||c===!0||c===void 0&&s[d]!==!1)&&(s[d||u]=pp(l))}const o=(l,u)=>he.forEach(l,(c,h)=>a(c,h,u));if(he.isPlainObject(e)||e instanceof this.constructor)o(e,i);else if(he.isString(e)&&(e=e.trim())&&!DL(e))o(IL(e),i);else if(he.isObject(e)&&he.isIterable(e)){let l={},u,c;for(const h of e){if(!he.isArray(h))throw TypeError("Object iterator must return a key-value pair");l[c=h[0]]=(u=l[c])?he.isArray(u)?[...u,h[1]]:[u,h[1]]:h[1]}o(l,i)}else e!=null&&a(i,e,n);return this}get(e,i){if(e=th(e),e){const n=he.findKey(this,e);if(n){const s=this[n];if(!i)return s;if(i===!0)return OL(s);if(he.isFunction(i))return i.call(this,s,n);if(he.isRegExp(i))return i.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,i){if(e=th(e),e){const n=he.findKey(this,e);return!!(n&&this[n]!==void 0&&(!i||gy(this,this[n],n,i)))}return!1}delete(e,i){const n=this;let s=!1;function a(o){if(o=th(o),o){const l=he.findKey(n,o);l&&(!i||gy(n,n[l],l,i))&&(delete n[l],s=!0)}}return he.isArray(e)?e.forEach(a):a(e),s}clear(e){const i=Object.keys(this);let n=i.length,s=!1;for(;n--;){const a=i[n];(!e||gy(this,this[a],a,e,!0))&&(delete this[a],s=!0)}return s}normalize(e){const i=this,n={};return he.forEach(this,(s,a)=>{const o=he.findKey(n,a);if(o){i[o]=pp(s),delete i[a];return}const l=e?LL(a):String(a).trim();l!==a&&delete i[a],i[l]=pp(s),n[l]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const i=Object.create(null);return he.forEach(this,(n,s)=>{n!=null&&n!==!1&&(i[s]=e&&he.isArray(n)?n.join(", "):n)}),i}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,i])=>e+": "+i).join(`
34
34
  `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...i){const n=new this(e);return i.forEach(s=>n.set(s)),n}static accessor(e){const n=(this[gw]=this[gw]={accessors:{}}).accessors,s=this.prototype;function a(o){const l=th(o);n[l]||(kL(s,o),n[l]=!0)}return he.isArray(e)?e.forEach(a):a(e),this}};Ir.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),he.reduceDescriptors(Ir.prototype,({value:r},e)=>{let i=e[0].toUpperCase()+e.slice(1);return{get:()=>r,set(n){this[i]=n}}}),he.freezeMethods(Ir);function yy(r,e){const i=this||eh,n=e||i,s=Ir.from(n.headers);let a=n.data;return he.forEach(r,function(l){a=l.call(i,a,s.normalize(),e?e.status:void 0)}),s.normalize(),a}function yw(r){return!!(r&&r.__CANCEL__)}function Fl(r,e,i){St.call(this,r??"canceled",St.ERR_CANCELED,e,i),this.name="CanceledError"}he.inherits(Fl,St,{__CANCEL__:!0});function vw(r,e,i){const n=i.config.validateStatus;!i.status||!n||n(i.status)?r(i):e(new St("Request failed with status code "+i.status,[St.ERR_BAD_REQUEST,St.ERR_BAD_RESPONSE][Math.floor(i.status/100)-4],i.config,i.request,i))}function UL(r){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(r);return e&&e[1]||""}function FL(r,e){r=r||10;const i=new Array(r),n=new Array(r);let s=0,a=0,o;return e=e!==void 0?e:1e3,function(u){const c=Date.now(),h=n[a];o||(o=c),i[s]=u,n[s]=c;let d=a,p=0;for(;d!==s;)p+=i[d++],d=d%r;if(s=(s+1)%r,s===a&&(a=(a+1)%r),c-o<e)return;const f=h&&c-h;return f?Math.round(p*1e3/f):void 0}}function BL(r,e){let i=0,n=1e3/e,s,a;const o=(c,h=Date.now())=>{i=h,s=null,a&&(clearTimeout(a),a=null),r(...c)};return[(...c)=>{const h=Date.now(),d=h-i;d>=n?o(c,h):(s=c,a||(a=setTimeout(()=>{a=null,o(s)},n-d)))},()=>s&&o(s)]}const fp=(r,e,i=3)=>{let n=0;const s=FL(50,250);return BL(a=>{const o=a.loaded,l=a.lengthComputable?a.total:void 0,u=o-n,c=s(u),h=o<=l;n=o;const d={loaded:o,total:l,progress:l?o/l:void 0,bytes:u,rate:c||void 0,estimated:c&&l&&h?(l-o)/c:void 0,event:a,lengthComputable:l!=null,[e?"download":"upload"]:!0};r(d)},i)},bw=(r,e)=>{const i=r!=null;return[n=>e[0]({lengthComputable:i,total:r,loaded:n}),e[1]]},xw=r=>(...e)=>he.asap(()=>r(...e)),zL=ar.hasStandardBrowserEnv?((r,e)=>i=>(i=new URL(i,ar.origin),r.protocol===i.protocol&&r.host===i.host&&(e||r.port===i.port)))(new URL(ar.origin),ar.navigator&&/(msie|trident)/i.test(ar.navigator.userAgent)):()=>!0,jL=ar.hasStandardBrowserEnv?{write(r,e,i,n,s,a){const o=[r+"="+encodeURIComponent(e)];he.isNumber(i)&&o.push("expires="+new Date(i).toGMTString()),he.isString(n)&&o.push("path="+n),he.isString(s)&&o.push("domain="+s),a===!0&&o.push("secure"),document.cookie=o.join("; ")},read(r){const e=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(r){this.write(r,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function VL(r){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(r)}function GL(r,e){return e?r.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):r}function _w(r,e,i){let n=!VL(e);return r&&(n||i==!1)?GL(r,e):e}const Tw=r=>r instanceof Ir?{...r}:r;function Eo(r,e){e=e||{};const i={};function n(c,h,d,p){return he.isPlainObject(c)&&he.isPlainObject(h)?he.merge.call({caseless:p},c,h):he.isPlainObject(h)?he.merge({},h):he.isArray(h)?h.slice():h}function s(c,h,d,p){if(he.isUndefined(h)){if(!he.isUndefined(c))return n(void 0,c,d,p)}else return n(c,h,d,p)}function a(c,h){if(!he.isUndefined(h))return n(void 0,h)}function o(c,h){if(he.isUndefined(h)){if(!he.isUndefined(c))return n(void 0,c)}else return n(void 0,h)}function l(c,h,d){if(d in e)return n(c,h);if(d in r)return n(void 0,c)}const u={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:l,headers:(c,h,d)=>s(Tw(c),Tw(h),d,!0)};return he.forEach(Object.keys({...r,...e}),function(h){const d=u[h]||s,p=d(r[h],e[h],h);he.isUndefined(p)&&d!==l||(i[h]=p)}),i}const ww=r=>{const e=Eo({},r);let{data:i,withXSRFToken:n,xsrfHeaderName:s,xsrfCookieName:a,headers:o,auth:l}=e;if(e.headers=o=Ir.from(o),e.url=dw(_w(e.baseURL,e.url,e.allowAbsoluteUrls),r.params,r.paramsSerializer),l&&o.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):""))),he.isFormData(i)){if(ar.hasStandardBrowserEnv||ar.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(he.isFunction(i.getHeaders)){const u=i.getHeaders(),c=["content-type","content-length"];Object.entries(u).forEach(([h,d])=>{c.includes(h.toLowerCase())&&o.set(h,d)})}}if(ar.hasStandardBrowserEnv&&(n&&he.isFunction(n)&&(n=n(e)),n||n!==!1&&zL(e.url))){const u=s&&a&&jL.read(a);u&&o.set(s,u)}return e},HL=typeof XMLHttpRequest<"u"&&function(r){return new Promise(function(i,n){const s=ww(r);let a=s.data;const o=Ir.from(s.headers).normalize();let{responseType:l,onUploadProgress:u,onDownloadProgress:c}=s,h,d,p,f,m;function y(){f&&f(),m&&m(),s.cancelToken&&s.cancelToken.unsubscribe(h),s.signal&&s.signal.removeEventListener("abort",h)}let v=new XMLHttpRequest;v.open(s.method.toUpperCase(),s.url,!0),v.timeout=s.timeout;function g(){if(!v)return;const x=Ir.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders()),T={data:!l||l==="text"||l==="json"?v.responseText:v.response,status:v.status,statusText:v.statusText,headers:x,config:r,request:v};vw(function(M){i(M),y()},function(M){n(M),y()},T),v=null}"onloadend"in v?v.onloadend=g:v.onreadystatechange=function(){!v||v.readyState!==4||v.status===0&&!(v.responseURL&&v.responseURL.indexOf("file:")===0)||setTimeout(g)},v.onabort=function(){v&&(n(new St("Request aborted",St.ECONNABORTED,r,v)),v=null)},v.onerror=function(b){const T=b&&b.message?b.message:"Network Error",E=new St(T,St.ERR_NETWORK,r,v);E.event=b||null,n(E),v=null},v.ontimeout=function(){let b=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const T=s.transitional||fw;s.timeoutErrorMessage&&(b=s.timeoutErrorMessage),n(new St(b,T.clarifyTimeoutError?St.ETIMEDOUT:St.ECONNABORTED,r,v)),v=null},a===void 0&&o.setContentType(null),"setRequestHeader"in v&&he.forEach(o.toJSON(),function(b,T){v.setRequestHeader(T,b)}),he.isUndefined(s.withCredentials)||(v.withCredentials=!!s.withCredentials),l&&l!=="json"&&(v.responseType=s.responseType),c&&([p,m]=fp(c,!0),v.addEventListener("progress",p)),u&&v.upload&&([d,f]=fp(u),v.upload.addEventListener("progress",d),v.upload.addEventListener("loadend",f)),(s.cancelToken||s.signal)&&(h=x=>{v&&(n(!x||x.type?new Fl(null,r,v):x),v.abort(),v=null)},s.cancelToken&&s.cancelToken.subscribe(h),s.signal&&(s.signal.aborted?h():s.signal.addEventListener("abort",h)));const _=UL(s.url);if(_&&ar.protocols.indexOf(_)===-1){n(new St("Unsupported protocol "+_+":",St.ERR_BAD_REQUEST,r));return}v.send(a||null)})},WL=(r,e)=>{const{length:i}=r=r?r.filter(Boolean):[];if(e||i){let n=new AbortController,s;const a=function(c){if(!s){s=!0,l();const h=c instanceof Error?c:this.reason;n.abort(h instanceof St?h:new Fl(h instanceof Error?h.message:h))}};let o=e&&setTimeout(()=>{o=null,a(new St(`timeout ${e} of ms exceeded`,St.ETIMEDOUT))},e);const l=()=>{r&&(o&&clearTimeout(o),o=null,r.forEach(c=>{c.unsubscribe?c.unsubscribe(a):c.removeEventListener("abort",a)}),r=null)};r.forEach(c=>c.addEventListener("abort",a));const{signal:u}=n;return u.unsubscribe=()=>he.asap(l),u}},qL=function*(r,e){let i=r.byteLength;if(i<e){yield r;return}let n=0,s;for(;n<i;)s=n+e,yield r.slice(n,s),n=s},XL=async function*(r,e){for await(const i of YL(r))yield*qL(i,e)},YL=async function*(r){if(r[Symbol.asyncIterator]){yield*r;return}const e=r.getReader();try{for(;;){const{done:i,value:n}=await e.read();if(i)break;yield n}}finally{await e.cancel()}},Sw=(r,e,i,n)=>{const s=XL(r,e);let a=0,o,l=u=>{o||(o=!0,n&&n(u))};return new ReadableStream({async pull(u){try{const{done:c,value:h}=await s.next();if(c){l(),u.close();return}let d=h.byteLength;if(i){let p=a+=d;i(p)}u.enqueue(new Uint8Array(h))}catch(c){throw l(c),c}},cancel(u){return l(u),s.return()}},{highWaterMark:2})},Ew=64*1024,{isFunction:mp}=he,KL=(({Request:r,Response:e})=>({Request:r,Response:e}))(he.global),{ReadableStream:Mw,TextEncoder:Aw}=he.global,Cw=(r,...e)=>{try{return!!r(...e)}catch{return!1}},ZL=r=>{r=he.merge.call({skipUndefined:!0},KL,r);const{fetch:e,Request:i,Response:n}=r,s=e?mp(e):typeof fetch=="function",a=mp(i),o=mp(n);if(!s)return!1;const l=s&&mp(Mw),u=s&&(typeof Aw=="function"?(m=>y=>m.encode(y))(new Aw):async m=>new Uint8Array(await new i(m).arrayBuffer())),c=a&&l&&Cw(()=>{let m=!1;const y=new i(ar.origin,{body:new Mw,method:"POST",get duplex(){return m=!0,"half"}}).headers.has("Content-Type");return m&&!y}),h=o&&l&&Cw(()=>he.isReadableStream(new n("").body)),d={stream:h&&(m=>m.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(m=>{!d[m]&&(d[m]=(y,v)=>{let g=y&&y[m];if(g)return g.call(y);throw new St(`Response type '${m}' is not supported`,St.ERR_NOT_SUPPORT,v)})});const p=async m=>{if(m==null)return 0;if(he.isBlob(m))return m.size;if(he.isSpecCompliantForm(m))return(await new i(ar.origin,{method:"POST",body:m}).arrayBuffer()).byteLength;if(he.isArrayBufferView(m)||he.isArrayBuffer(m))return m.byteLength;if(he.isURLSearchParams(m)&&(m=m+""),he.isString(m))return(await u(m)).byteLength},f=async(m,y)=>{const v=he.toFiniteNumber(m.getContentLength());return v??p(y)};return async m=>{let{url:y,method:v,data:g,signal:_,cancelToken:x,timeout:b,onDownloadProgress:T,onUploadProgress:E,responseType:M,headers:C,withCredentials:S="same-origin",fetchOptions:w}=ww(m),R=e||fetch;M=M?(M+"").toLowerCase():"text";let O=WL([_,x&&x.toAbortSignal()],b),P=null;const A=O&&O.unsubscribe&&(()=>{O.unsubscribe()});let D;try{if(E&&c&&v!=="get"&&v!=="head"&&(D=await f(C,g))!==0){let B=new i(y,{method:"POST",body:g,duplex:"half"}),q;if(he.isFormData(g)&&(q=B.headers.get("content-type"))&&C.setContentType(q),B.body){const[H,z]=bw(D,fp(xw(E)));g=Sw(B.body,Ew,H,z)}}he.isString(S)||(S=S?"include":"omit");const L=a&&"credentials"in i.prototype,W={...w,signal:O,method:v.toUpperCase(),headers:C.normalize().toJSON(),body:g,duplex:"half",credentials:L?S:void 0};P=a&&new i(y,W);let G=await(a?R(P,w):R(y,W));const Y=h&&(M==="stream"||M==="response");if(h&&(T||Y&&A)){const B={};["status","statusText","headers"].forEach(Z=>{B[Z]=G[Z]});const q=he.toFiniteNumber(G.headers.get("content-length")),[H,z]=T&&bw(q,fp(xw(T),!0))||[];G=new n(Sw(G.body,Ew,H,()=>{z&&z(),A&&A()}),B)}M=M||"text";let F=await d[he.findKey(d,M)||"text"](G,m);return!Y&&A&&A(),await new Promise((B,q)=>{vw(B,q,{data:F,headers:Ir.from(G.headers),status:G.status,statusText:G.statusText,config:m,request:P})})}catch(L){throw A&&A(),L&&L.name==="TypeError"&&/Load failed|fetch/i.test(L.message)?Object.assign(new St("Network Error",St.ERR_NETWORK,m,P),{cause:L.cause||L}):St.from(L,L&&L.code,m,P)}}},QL=new Map,Rw=r=>{let e=r?r.env:{};const{fetch:i,Request:n,Response:s}=e,a=[n,s,i];let o=a.length,l=o,u,c,h=QL;for(;l--;)u=a[l],c=h.get(u),c===void 0&&h.set(u,c=l?new Map:ZL(e)),h=c;return c};Rw();const vy={http:bL,xhr:HL,fetch:{get:Rw}};he.forEach(vy,(r,e)=>{if(r){try{Object.defineProperty(r,"name",{value:e})}catch{}Object.defineProperty(r,"adapterName",{value:e})}});const Nw=r=>`- ${r}`,$L=r=>he.isFunction(r)||r===null||r===!1,Pw={getAdapter:(r,e)=>{r=he.isArray(r)?r:[r];const{length:i}=r;let n,s;const a={};for(let o=0;o<i;o++){n=r[o];let l;if(s=n,!$L(n)&&(s=vy[(l=String(n)).toLowerCase()],s===void 0))throw new St(`Unknown adapter '${l}'`);if(s&&(he.isFunction(s)||(s=s.get(e))))break;a[l||"#"+o]=s}if(!s){const o=Object.entries(a).map(([u,c])=>`adapter ${u} `+(c===!1?"is not supported by the environment":"is not available in the build"));let l=i?o.length>1?`since :
35
35
  `+o.map(Nw).join(`
@@ -4215,7 +4215,7 @@ void main() {
4215
4215
 
4216
4216
  }
4217
4217
 
4218
- }`;class fj{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(e,i,n){if(this.texture===null){const s=new hn,a=e.properties.get(s);a.__webglTexture=i.texture,(i.depthNear!=n.depthNear||i.depthFar!=n.depthFar)&&(this.depthNear=i.depthNear,this.depthFar=i.depthFar),this.texture=s}}getMesh(e){if(this.texture!==null&&this.mesh===null){const i=e.cameras[0].viewport,n=new ns({vertexShader:dj,fragmentShader:pj,uniforms:{depthColor:{value:this.texture},depthWidth:{value:i.z},depthHeight:{value:i.w}}});this.mesh=new Dr(new yh(20,20),n)}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}}class mj extends Oo{constructor(e,i){super();const n=this;let s=null,a=1,o=null,l="local-floor",u=1,c=null,h=null,d=null,p=null,f=null,m=null;const y=new fj,v=i.getContextAttributes();let g=null,_=null;const x=[],b=[],T=new ke;let E=null;const M=new fn;M.viewport=new Ni;const C=new fn;C.viewport=new Ni;const S=[M,C],w=new cj;let R=null,O=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(z){let Z=x[z];return Z===void 0&&(Z=new Av,x[z]=Z),Z.getTargetRaySpace()},this.getControllerGrip=function(z){let Z=x[z];return Z===void 0&&(Z=new Av,x[z]=Z),Z.getGripSpace()},this.getHand=function(z){let Z=x[z];return Z===void 0&&(Z=new Av,x[z]=Z),Z.getHandSpace()};function P(z){const Z=b.indexOf(z.inputSource);if(Z===-1)return;const se=x[Z];se!==void 0&&(se.update(z.inputSource,z.frame,c||o),se.dispatchEvent({type:z.type,data:z.inputSource}))}function A(){s.removeEventListener("select",P),s.removeEventListener("selectstart",P),s.removeEventListener("selectend",P),s.removeEventListener("squeeze",P),s.removeEventListener("squeezestart",P),s.removeEventListener("squeezeend",P),s.removeEventListener("end",A),s.removeEventListener("inputsourceschange",D);for(let z=0;z<x.length;z++){const Z=b[z];Z!==null&&(b[z]=null,x[z].disconnect(Z))}R=null,O=null,y.reset(),e.setRenderTarget(g),f=null,p=null,d=null,s=null,_=null,H.stop(),n.isPresenting=!1,e.setPixelRatio(E),e.setSize(T.width,T.height,!1),n.dispatchEvent({type:"sessionend"})}this.setFramebufferScaleFactor=function(z){a=z,n.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(z){l=z,n.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return c||o},this.setReferenceSpace=function(z){c=z},this.getBaseLayer=function(){return p!==null?p:f},this.getBinding=function(){return d},this.getFrame=function(){return m},this.getSession=function(){return s},this.setSession=async function(z){if(s=z,s!==null){if(g=e.getRenderTarget(),s.addEventListener("select",P),s.addEventListener("selectstart",P),s.addEventListener("selectend",P),s.addEventListener("squeeze",P),s.addEventListener("squeezestart",P),s.addEventListener("squeezeend",P),s.addEventListener("end",A),s.addEventListener("inputsourceschange",D),v.xrCompatible!==!0&&await i.makeXRCompatible(),E=e.getPixelRatio(),e.getSize(T),s.renderState.layers===void 0){const Z={antialias:v.antialias,alpha:!0,depth:v.depth,stencil:v.stencil,framebufferScaleFactor:a};f=new XRWebGLLayer(s,i,Z),s.updateRenderState({baseLayer:f}),e.setPixelRatio(1),e.setSize(f.framebufferWidth,f.framebufferHeight,!1),_=new Ca(f.framebufferWidth,f.framebufferHeight,{format:An,type:Ns,colorSpace:e.outputColorSpace,stencilBuffer:v.stencil})}else{let Z=null,se=null,le=null;v.depth&&(le=v.stencil?i.DEPTH24_STENCIL8:i.DEPTH_COMPONENT24,Z=v.stencil?$l:Ql,se=v.stencil?Zl:Io);const fe={colorFormat:i.RGBA8,depthFormat:le,scaleFactor:a};d=new XRWebGLBinding(s,i),p=d.createProjectionLayer(fe),s.updateRenderState({layers:[p]}),e.setPixelRatio(1),e.setSize(p.textureWidth,p.textureHeight,!1),_=new Ca(p.textureWidth,p.textureHeight,{format:An,type:Ns,depthTexture:new WE(p.textureWidth,p.textureHeight,se,void 0,void 0,void 0,void 0,void 0,void 0,Z),stencilBuffer:v.stencil,colorSpace:e.outputColorSpace,samples:v.antialias?4:0,resolveDepthBuffer:p.ignoreDepthValues===!1})}_.isXRRenderTarget=!0,this.setFoveation(u),c=null,o=await s.requestReferenceSpace(l),H.setContext(s),H.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}},this.getEnvironmentBlendMode=function(){if(s!==null)return s.environmentBlendMode},this.getDepthTexture=function(){return y.getDepthTexture()};function D(z){for(let Z=0;Z<z.removed.length;Z++){const se=z.removed[Z],le=b.indexOf(se);le>=0&&(b[le]=null,x[le].disconnect(se))}for(let Z=0;Z<z.added.length;Z++){const se=z.added[Z];let le=b.indexOf(se);if(le===-1){for(let _e=0;_e<x.length;_e++)if(_e>=b.length){b.push(se),le=_e;break}else if(b[_e]===null){b[_e]=se,le=_e;break}if(le===-1)break}const fe=x[le];fe&&fe.connect(se)}}const L=new K,W=new K;function G(z,Z,se){L.setFromMatrixPosition(Z.matrixWorld),W.setFromMatrixPosition(se.matrixWorld);const le=L.distanceTo(W),fe=Z.projectionMatrix.elements,_e=se.projectionMatrix.elements,Re=fe[14]/(fe[10]-1),nt=fe[14]/(fe[10]+1),ge=(fe[9]+1)/fe[5],gt=(fe[9]-1)/fe[5],$=(fe[8]-1)/fe[0],Ht=(_e[8]+1)/_e[0],$e=Re*$,xt=Re*Ht,Be=le/(-$+Ht),Ct=Be*-$;if(Z.matrixWorld.decompose(z.position,z.quaternion,z.scale),z.translateX(Ct),z.translateZ(Be),z.matrixWorld.compose(z.position,z.quaternion,z.scale),z.matrixWorldInverse.copy(z.matrixWorld).invert(),fe[10]===-1)z.projectionMatrix.copy(Z.projectionMatrix),z.projectionMatrixInverse.copy(Z.projectionMatrixInverse);else{const st=Re+Be,j=nt+Be,k=$e-Ct,ce=xt+(le-Ct),we=ge*nt/j*st,Ce=gt*nt/j*st;z.projectionMatrix.makePerspective(k,ce,we,Ce,st,j),z.projectionMatrixInverse.copy(z.projectionMatrix).invert()}}function Y(z,Z){Z===null?z.matrixWorld.copy(z.matrix):z.matrixWorld.multiplyMatrices(Z.matrixWorld,z.matrix),z.matrixWorldInverse.copy(z.matrixWorld).invert()}this.updateCamera=function(z){if(s===null)return;let Z=z.near,se=z.far;y.texture!==null&&(y.depthNear>0&&(Z=y.depthNear),y.depthFar>0&&(se=y.depthFar)),w.near=C.near=M.near=Z,w.far=C.far=M.far=se,(R!==w.near||O!==w.far)&&(s.updateRenderState({depthNear:w.near,depthFar:w.far}),R=w.near,O=w.far),M.layers.mask=z.layers.mask|2,C.layers.mask=z.layers.mask|4,w.layers.mask=M.layers.mask|C.layers.mask;const le=z.parent,fe=w.cameras;Y(w,le);for(let _e=0;_e<fe.length;_e++)Y(fe[_e],le);fe.length===2?G(w,M,C):w.projectionMatrix.copy(M.projectionMatrix),F(z,w,le)};function F(z,Z,se){se===null?z.matrix.copy(Z.matrixWorld):(z.matrix.copy(se.matrixWorld),z.matrix.invert(),z.matrix.multiply(Z.matrixWorld)),z.matrix.decompose(z.position,z.quaternion,z.scale),z.updateMatrixWorld(!0),z.projectionMatrix.copy(Z.projectionMatrix),z.projectionMatrixInverse.copy(Z.projectionMatrixInverse),z.isPerspectiveCamera&&(z.fov=uh*2*Math.atan(1/z.projectionMatrix.elements[5]),z.zoom=1)}this.getCamera=function(){return w},this.getFoveation=function(){if(!(p===null&&f===null))return u},this.setFoveation=function(z){u=z,p!==null&&(p.fixedFoveation=z),f!==null&&f.fixedFoveation!==void 0&&(f.fixedFoveation=z)},this.hasDepthSensing=function(){return y.texture!==null},this.getDepthSensingMesh=function(){return y.getMesh(w)};let B=null;function q(z,Z){if(h=Z.getViewerPose(c||o),m=Z,h!==null){const se=h.views;f!==null&&(e.setRenderTargetFramebuffer(_,f.framebuffer),e.setRenderTarget(_));let le=!1;se.length!==w.cameras.length&&(w.cameras.length=0,le=!0);for(let _e=0;_e<se.length;_e++){const Re=se[_e];let nt=null;if(f!==null)nt=f.getViewport(Re);else{const gt=d.getViewSubImage(p,Re);nt=gt.viewport,_e===0&&(e.setRenderTargetTextures(_,gt.colorTexture,p.ignoreDepthValues?void 0:gt.depthStencilTexture),e.setRenderTarget(_))}let ge=S[_e];ge===void 0&&(ge=new fn,ge.layers.enable(_e),ge.viewport=new Ni,S[_e]=ge),ge.matrix.fromArray(Re.transform.matrix),ge.matrix.decompose(ge.position,ge.quaternion,ge.scale),ge.projectionMatrix.fromArray(Re.projectionMatrix),ge.projectionMatrixInverse.copy(ge.projectionMatrix).invert(),ge.viewport.set(nt.x,nt.y,nt.width,nt.height),_e===0&&(w.matrix.copy(ge.matrix),w.matrix.decompose(w.position,w.quaternion,w.scale)),le===!0&&w.cameras.push(ge)}const fe=s.enabledFeatures;if(fe&&fe.includes("depth-sensing")){const _e=d.getDepthInformation(se[0]);_e&&_e.isValid&&_e.texture&&y.init(e,_e,s.renderState)}}for(let se=0;se<x.length;se++){const le=b[se],fe=x[se];le!==null&&fe!==void 0&&fe.update(le,Z,c||o)}B&&B(z,Z),Z.detectedPlanes&&n.dispatchEvent({type:"planesdetected",data:Z}),m=null}const H=new UE;H.setAnimationLoop(q),this.setAnimationLoop=function(z){B=z},this.dispose=function(){}}}const Ho=new Oa,gj=new si;function yj(r,e){function i(v,g){v.matrixAutoUpdate===!0&&v.updateMatrix(),g.value.copy(v.matrix)}function n(v,g){g.color.getRGB(v.fogColor.value,PE(r)),g.isFog?(v.fogNear.value=g.near,v.fogFar.value=g.far):g.isFogExp2&&(v.fogDensity.value=g.density)}function s(v,g,_,x,b){g.isMeshBasicMaterial||g.isMeshLambertMaterial?a(v,g):g.isMeshToonMaterial?(a(v,g),d(v,g)):g.isMeshPhongMaterial?(a(v,g),h(v,g)):g.isMeshStandardMaterial?(a(v,g),p(v,g),g.isMeshPhysicalMaterial&&f(v,g,b)):g.isMeshMatcapMaterial?(a(v,g),m(v,g)):g.isMeshDepthMaterial?a(v,g):g.isMeshDistanceMaterial?(a(v,g),y(v,g)):g.isMeshNormalMaterial?a(v,g):g.isLineBasicMaterial?(o(v,g),g.isLineDashedMaterial&&l(v,g)):g.isPointsMaterial?u(v,g,_,x):g.isSpriteMaterial?c(v,g):g.isShadowMaterial?(v.color.value.copy(g.color),v.opacity.value=g.opacity):g.isShaderMaterial&&(g.uniformsNeedUpdate=!1)}function a(v,g){v.opacity.value=g.opacity,g.color&&v.diffuse.value.copy(g.color),g.emissive&&v.emissive.value.copy(g.emissive).multiplyScalar(g.emissiveIntensity),g.map&&(v.map.value=g.map,i(g.map,v.mapTransform)),g.alphaMap&&(v.alphaMap.value=g.alphaMap,i(g.alphaMap,v.alphaMapTransform)),g.bumpMap&&(v.bumpMap.value=g.bumpMap,i(g.bumpMap,v.bumpMapTransform),v.bumpScale.value=g.bumpScale,g.side===gr&&(v.bumpScale.value*=-1)),g.normalMap&&(v.normalMap.value=g.normalMap,i(g.normalMap,v.normalMapTransform),v.normalScale.value.copy(g.normalScale),g.side===gr&&v.normalScale.value.negate()),g.displacementMap&&(v.displacementMap.value=g.displacementMap,i(g.displacementMap,v.displacementMapTransform),v.displacementScale.value=g.displacementScale,v.displacementBias.value=g.displacementBias),g.emissiveMap&&(v.emissiveMap.value=g.emissiveMap,i(g.emissiveMap,v.emissiveMapTransform)),g.specularMap&&(v.specularMap.value=g.specularMap,i(g.specularMap,v.specularMapTransform)),g.alphaTest>0&&(v.alphaTest.value=g.alphaTest);const _=e.get(g),x=_.envMap,b=_.envMapRotation;x&&(v.envMap.value=x,Ho.copy(b),Ho.x*=-1,Ho.y*=-1,Ho.z*=-1,x.isCubeTexture&&x.isRenderTargetTexture===!1&&(Ho.y*=-1,Ho.z*=-1),v.envMapRotation.value.setFromMatrix4(gj.makeRotationFromEuler(Ho)),v.flipEnvMap.value=x.isCubeTexture&&x.isRenderTargetTexture===!1?-1:1,v.reflectivity.value=g.reflectivity,v.ior.value=g.ior,v.refractionRatio.value=g.refractionRatio),g.lightMap&&(v.lightMap.value=g.lightMap,v.lightMapIntensity.value=g.lightMapIntensity,i(g.lightMap,v.lightMapTransform)),g.aoMap&&(v.aoMap.value=g.aoMap,v.aoMapIntensity.value=g.aoMapIntensity,i(g.aoMap,v.aoMapTransform))}function o(v,g){v.diffuse.value.copy(g.color),v.opacity.value=g.opacity,g.map&&(v.map.value=g.map,i(g.map,v.mapTransform))}function l(v,g){v.dashSize.value=g.dashSize,v.totalSize.value=g.dashSize+g.gapSize,v.scale.value=g.scale}function u(v,g,_,x){v.diffuse.value.copy(g.color),v.opacity.value=g.opacity,v.size.value=g.size*_,v.scale.value=x*.5,g.map&&(v.map.value=g.map,i(g.map,v.uvTransform)),g.alphaMap&&(v.alphaMap.value=g.alphaMap,i(g.alphaMap,v.alphaMapTransform)),g.alphaTest>0&&(v.alphaTest.value=g.alphaTest)}function c(v,g){v.diffuse.value.copy(g.color),v.opacity.value=g.opacity,v.rotation.value=g.rotation,g.map&&(v.map.value=g.map,i(g.map,v.mapTransform)),g.alphaMap&&(v.alphaMap.value=g.alphaMap,i(g.alphaMap,v.alphaMapTransform)),g.alphaTest>0&&(v.alphaTest.value=g.alphaTest)}function h(v,g){v.specular.value.copy(g.specular),v.shininess.value=Math.max(g.shininess,1e-4)}function d(v,g){g.gradientMap&&(v.gradientMap.value=g.gradientMap)}function p(v,g){v.metalness.value=g.metalness,g.metalnessMap&&(v.metalnessMap.value=g.metalnessMap,i(g.metalnessMap,v.metalnessMapTransform)),v.roughness.value=g.roughness,g.roughnessMap&&(v.roughnessMap.value=g.roughnessMap,i(g.roughnessMap,v.roughnessMapTransform)),g.envMap&&(v.envMapIntensity.value=g.envMapIntensity)}function f(v,g,_){v.ior.value=g.ior,g.sheen>0&&(v.sheenColor.value.copy(g.sheenColor).multiplyScalar(g.sheen),v.sheenRoughness.value=g.sheenRoughness,g.sheenColorMap&&(v.sheenColorMap.value=g.sheenColorMap,i(g.sheenColorMap,v.sheenColorMapTransform)),g.sheenRoughnessMap&&(v.sheenRoughnessMap.value=g.sheenRoughnessMap,i(g.sheenRoughnessMap,v.sheenRoughnessMapTransform))),g.clearcoat>0&&(v.clearcoat.value=g.clearcoat,v.clearcoatRoughness.value=g.clearcoatRoughness,g.clearcoatMap&&(v.clearcoatMap.value=g.clearcoatMap,i(g.clearcoatMap,v.clearcoatMapTransform)),g.clearcoatRoughnessMap&&(v.clearcoatRoughnessMap.value=g.clearcoatRoughnessMap,i(g.clearcoatRoughnessMap,v.clearcoatRoughnessMapTransform)),g.clearcoatNormalMap&&(v.clearcoatNormalMap.value=g.clearcoatNormalMap,i(g.clearcoatNormalMap,v.clearcoatNormalMapTransform),v.clearcoatNormalScale.value.copy(g.clearcoatNormalScale),g.side===gr&&v.clearcoatNormalScale.value.negate())),g.dispersion>0&&(v.dispersion.value=g.dispersion),g.iridescence>0&&(v.iridescence.value=g.iridescence,v.iridescenceIOR.value=g.iridescenceIOR,v.iridescenceThicknessMinimum.value=g.iridescenceThicknessRange[0],v.iridescenceThicknessMaximum.value=g.iridescenceThicknessRange[1],g.iridescenceMap&&(v.iridescenceMap.value=g.iridescenceMap,i(g.iridescenceMap,v.iridescenceMapTransform)),g.iridescenceThicknessMap&&(v.iridescenceThicknessMap.value=g.iridescenceThicknessMap,i(g.iridescenceThicknessMap,v.iridescenceThicknessMapTransform))),g.transmission>0&&(v.transmission.value=g.transmission,v.transmissionSamplerMap.value=_.texture,v.transmissionSamplerSize.value.set(_.width,_.height),g.transmissionMap&&(v.transmissionMap.value=g.transmissionMap,i(g.transmissionMap,v.transmissionMapTransform)),v.thickness.value=g.thickness,g.thicknessMap&&(v.thicknessMap.value=g.thicknessMap,i(g.thicknessMap,v.thicknessMapTransform)),v.attenuationDistance.value=g.attenuationDistance,v.attenuationColor.value.copy(g.attenuationColor)),g.anisotropy>0&&(v.anisotropyVector.value.set(g.anisotropy*Math.cos(g.anisotropyRotation),g.anisotropy*Math.sin(g.anisotropyRotation)),g.anisotropyMap&&(v.anisotropyMap.value=g.anisotropyMap,i(g.anisotropyMap,v.anisotropyMapTransform))),v.specularIntensity.value=g.specularIntensity,v.specularColor.value.copy(g.specularColor),g.specularColorMap&&(v.specularColorMap.value=g.specularColorMap,i(g.specularColorMap,v.specularColorMapTransform)),g.specularIntensityMap&&(v.specularIntensityMap.value=g.specularIntensityMap,i(g.specularIntensityMap,v.specularIntensityMapTransform))}function m(v,g){g.matcap&&(v.matcap.value=g.matcap)}function y(v,g){const _=e.get(g).light;v.referencePosition.value.setFromMatrixPosition(_.matrixWorld),v.nearDistance.value=_.shadow.camera.near,v.farDistance.value=_.shadow.camera.far}return{refreshFogUniforms:n,refreshMaterialUniforms:s}}function vj(r,e,i,n){let s={},a={},o=[];const l=r.getParameter(r.MAX_UNIFORM_BUFFER_BINDINGS);function u(_,x){const b=x.program;n.uniformBlockBinding(_,b)}function c(_,x){let b=s[_.id];b===void 0&&(m(_),b=h(_),s[_.id]=b,_.addEventListener("dispose",v));const T=x.program;n.updateUBOMapping(_,T);const E=e.render.frame;a[_.id]!==E&&(p(_),a[_.id]=E)}function h(_){const x=d();_.__bindingPointIndex=x;const b=r.createBuffer(),T=_.__size,E=_.usage;return r.bindBuffer(r.UNIFORM_BUFFER,b),r.bufferData(r.UNIFORM_BUFFER,T,E),r.bindBuffer(r.UNIFORM_BUFFER,null),r.bindBufferBase(r.UNIFORM_BUFFER,x,b),b}function d(){for(let _=0;_<l;_++)if(o.indexOf(_)===-1)return o.push(_),_;return console.error("THREE.WebGLRenderer: Maximum number of simultaneously usable uniforms groups reached."),0}function p(_){const x=s[_.id],b=_.uniforms,T=_.__cache;r.bindBuffer(r.UNIFORM_BUFFER,x);for(let E=0,M=b.length;E<M;E++){const C=Array.isArray(b[E])?b[E]:[b[E]];for(let S=0,w=C.length;S<w;S++){const R=C[S];if(f(R,E,S,T)===!0){const O=R.__offset,P=Array.isArray(R.value)?R.value:[R.value];let A=0;for(let D=0;D<P.length;D++){const L=P[D],W=y(L);typeof L=="number"||typeof L=="boolean"?(R.__data[0]=L,r.bufferSubData(r.UNIFORM_BUFFER,O+A,R.__data)):L.isMatrix3?(R.__data[0]=L.elements[0],R.__data[1]=L.elements[1],R.__data[2]=L.elements[2],R.__data[3]=0,R.__data[4]=L.elements[3],R.__data[5]=L.elements[4],R.__data[6]=L.elements[5],R.__data[7]=0,R.__data[8]=L.elements[6],R.__data[9]=L.elements[7],R.__data[10]=L.elements[8],R.__data[11]=0):(L.toArray(R.__data,A),A+=W.storage/Float32Array.BYTES_PER_ELEMENT)}r.bufferSubData(r.UNIFORM_BUFFER,O,R.__data)}}}r.bindBuffer(r.UNIFORM_BUFFER,null)}function f(_,x,b,T){const E=_.value,M=x+"_"+b;if(T[M]===void 0)return typeof E=="number"||typeof E=="boolean"?T[M]=E:T[M]=E.clone(),!0;{const C=T[M];if(typeof E=="number"||typeof E=="boolean"){if(C!==E)return T[M]=E,!0}else if(C.equals(E)===!1)return C.copy(E),!0}return!1}function m(_){const x=_.uniforms;let b=0;const T=16;for(let M=0,C=x.length;M<C;M++){const S=Array.isArray(x[M])?x[M]:[x[M]];for(let w=0,R=S.length;w<R;w++){const O=S[w],P=Array.isArray(O.value)?O.value:[O.value];for(let A=0,D=P.length;A<D;A++){const L=P[A],W=y(L),G=b%T,Y=G%W.boundary,F=G+Y;b+=Y,F!==0&&T-F<W.storage&&(b+=T-F),O.__data=new Float32Array(W.storage/Float32Array.BYTES_PER_ELEMENT),O.__offset=b,b+=W.storage}}}const E=b%T;return E>0&&(b+=T-E),_.__size=b,_.__cache={},this}function y(_){const x={boundary:0,storage:0};return typeof _=="number"||typeof _=="boolean"?(x.boundary=4,x.storage=4):_.isVector2?(x.boundary=8,x.storage=8):_.isVector3||_.isColor?(x.boundary=16,x.storage=12):_.isVector4?(x.boundary=16,x.storage=16):_.isMatrix3?(x.boundary=48,x.storage=48):_.isMatrix4?(x.boundary=64,x.storage=64):_.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",_),x}function v(_){const x=_.target;x.removeEventListener("dispose",v);const b=o.indexOf(x.__bindingPointIndex);o.splice(b,1),r.deleteBuffer(s[x.id]),delete s[x.id],delete a[x.id]}function g(){for(const _ in s)r.deleteBuffer(s[_]);o=[],s={},a={}}return{bind:u,update:c,dispose:g}}class bj{constructor(e={}){const{canvas:i=lF(),context:n=null,depth:s=!0,stencil:a=!1,alpha:o=!1,antialias:l=!1,premultipliedAlpha:u=!0,preserveDrawingBuffer:c=!1,powerPreference:h="default",failIfMajorPerformanceCaveat:d=!1,reverseDepthBuffer:p=!1}=e;this.isWebGLRenderer=!0;let f;if(n!==null){if(typeof WebGLRenderingContext<"u"&&n instanceof WebGLRenderingContext)throw new Error("THREE.WebGLRenderer: WebGL 1 is not supported since r163.");f=n.getContextAttributes().alpha}else f=o;const m=new Uint32Array(4),y=new Int32Array(4);let v=null,g=null;const _=[],x=[];this.domElement=i,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this._outputColorSpace=qr,this.toneMapping=Ma,this.toneMappingExposure=1;const b=this;let T=!1,E=0,M=0,C=null,S=-1,w=null;const R=new Ni,O=new Ni;let P=null;const A=new Ut(0);let D=0,L=i.width,W=i.height,G=1,Y=null,F=null;const B=new Ni(0,0,L,W),q=new Ni(0,0,L,W);let H=!1;const z=new yv;let Z=!1,se=!1;const le=new si,fe=new si,_e=new K,Re=new Ni,nt={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};let ge=!1;function gt(){return C===null?G:1}let $=n;function Ht(U,X){return i.getContext(U,X)}try{const U={alpha:!0,depth:s,stencil:a,antialias:l,premultipliedAlpha:u,preserveDrawingBuffer:c,powerPreference:h,failIfMajorPerformanceCaveat:d};if("setAttribute"in i&&i.setAttribute("data-engine",`three.js r${Ap}`),i.addEventListener("webglcontextlost",Ee,!1),i.addEventListener("webglcontextrestored",Ge,!1),i.addEventListener("webglcontextcreationerror",Ue,!1),$===null){const X="webgl2";if($=Ht(X,U),$===null)throw Ht(X)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}}catch(U){throw console.error("THREE.WebGLRenderer: "+U.message),U}let $e,xt,Be,Ct,st,j,k,ce,we,Ce,Te,et,Ve,Xe,Ot,Ie,Ye,ct,ft,Ke,Lt,_t,Vt,te;function Le(){$e=new Sz($),$e.init(),_t=new uj($,$e),xt=new vz($,$e,e,_t),Be=new aj($,$e),xt.reverseDepthBuffer&&p&&Be.buffers.depth.setReversed(!0),Ct=new Az($),st=new W6,j=new lj($,$e,Be,st,xt,_t,Ct),k=new xz(b),ce=new wz(b),we=new DF($),Vt=new gz($,we),Ce=new Ez($,we,Ct,Vt),Te=new Rz($,Ce,we,Ct),ft=new Cz($,xt,j),Ie=new bz(st),et=new H6(b,k,ce,$e,xt,Vt,Ie),Ve=new yj(b,st),Xe=new X6,Ot=new J6($e),ct=new mz(b,k,ce,Be,Te,f,u),Ye=new nj(b,Te,xt),te=new vj($,Ct,xt,Be),Ke=new yz($,$e,Ct),Lt=new Mz($,$e,Ct),Ct.programs=et.programs,b.capabilities=xt,b.extensions=$e,b.properties=st,b.renderLists=Xe,b.shadowMap=Ye,b.state=Be,b.info=Ct}Le();const pe=new mj(b,$);this.xr=pe,this.getContext=function(){return $},this.getContextAttributes=function(){return $.getContextAttributes()},this.forceContextLoss=function(){const U=$e.get("WEBGL_lose_context");U&&U.loseContext()},this.forceContextRestore=function(){const U=$e.get("WEBGL_lose_context");U&&U.restoreContext()},this.getPixelRatio=function(){return G},this.setPixelRatio=function(U){U!==void 0&&(G=U,this.setSize(L,W,!1))},this.getSize=function(U){return U.set(L,W)},this.setSize=function(U,X,ie=!0){if(pe.isPresenting){console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting.");return}L=U,W=X,i.width=Math.floor(U*G),i.height=Math.floor(X*G),ie===!0&&(i.style.width=U+"px",i.style.height=X+"px"),this.setViewport(0,0,U,X)},this.getDrawingBufferSize=function(U){return U.set(L*G,W*G).floor()},this.setDrawingBufferSize=function(U,X,ie){L=U,W=X,G=ie,i.width=Math.floor(U*ie),i.height=Math.floor(X*ie),this.setViewport(0,0,U,X)},this.getCurrentViewport=function(U){return U.copy(R)},this.getViewport=function(U){return U.copy(B)},this.setViewport=function(U,X,ie,oe){U.isVector4?B.set(U.x,U.y,U.z,U.w):B.set(U,X,ie,oe),Be.viewport(R.copy(B).multiplyScalar(G).round())},this.getScissor=function(U){return U.copy(q)},this.setScissor=function(U,X,ie,oe){U.isVector4?q.set(U.x,U.y,U.z,U.w):q.set(U,X,ie,oe),Be.scissor(O.copy(q).multiplyScalar(G).round())},this.getScissorTest=function(){return H},this.setScissorTest=function(U){Be.setScissorTest(H=U)},this.setOpaqueSort=function(U){Y=U},this.setTransparentSort=function(U){F=U},this.getClearColor=function(U){return U.copy(ct.getClearColor())},this.setClearColor=function(){ct.setClearColor.apply(ct,arguments)},this.getClearAlpha=function(){return ct.getClearAlpha()},this.setClearAlpha=function(){ct.setClearAlpha.apply(ct,arguments)},this.clear=function(U=!0,X=!0,ie=!0){let oe=0;if(U){let J=!1;if(C!==null){const Ae=C.texture.format;J=Ae===b0||Ae===v0||Ae===y0}if(J){const Ae=C.texture.type,Pe=Ae===Ns||Ae===Io||Ae===oh||Ae===Zl||Ae===m0||Ae===g0,Ze=ct.getClearColor(),it=ct.getClearAlpha(),yt=Ze.r,At=Ze.g,pt=Ze.b;Pe?(m[0]=yt,m[1]=At,m[2]=pt,m[3]=it,$.clearBufferuiv($.COLOR,0,m)):(y[0]=yt,y[1]=At,y[2]=pt,y[3]=it,$.clearBufferiv($.COLOR,0,y))}else oe|=$.COLOR_BUFFER_BIT}X&&(oe|=$.DEPTH_BUFFER_BIT),ie&&(oe|=$.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),$.clear(oe)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.dispose=function(){i.removeEventListener("webglcontextlost",Ee,!1),i.removeEventListener("webglcontextrestored",Ge,!1),i.removeEventListener("webglcontextcreationerror",Ue,!1),Xe.dispose(),Ot.dispose(),st.dispose(),k.dispose(),ce.dispose(),Te.dispose(),Vt.dispose(),te.dispose(),et.dispose(),pe.dispose(),pe.removeEventListener("sessionstart",bo),pe.removeEventListener("sessionend",xo),$n.stop()};function Ee(U){U.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),T=!0}function Ge(){console.log("THREE.WebGLRenderer: Context Restored."),T=!1;const U=Ct.autoReset,X=Ye.enabled,ie=Ye.autoUpdate,oe=Ye.needsUpdate,J=Ye.type;Le(),Ct.autoReset=U,Ye.enabled=X,Ye.autoUpdate=ie,Ye.needsUpdate=oe,Ye.type=J}function Ue(U){console.error("THREE.WebGLRenderer: A WebGL context could not be created. Reason: ",U.statusMessage)}function Pt(U){const X=U.target;X.removeEventListener("dispose",Pt),ni(X)}function ni(U){Ai(U),st.remove(U)}function Ai(U){const X=st.get(U).programs;X!==void 0&&(X.forEach(function(ie){et.releaseProgram(ie)}),U.isShaderMaterial&&et.releaseShaderCache(U))}this.renderBufferDirect=function(U,X,ie,oe,J,Ae){X===null&&(X=nt);const Pe=J.isMesh&&J.matrixWorld.determinant()<0,Ze=at(U,X,ie,oe,J);Be.setMaterial(oe,Pe);let it=ie.index,yt=1;if(oe.wireframe===!0){if(it=Ce.getWireframeAttribute(ie),it===void 0)return;yt=2}const At=ie.drawRange,pt=ie.attributes.position;let Xt=At.start*yt,fi=(At.start+At.count)*yt;Ae!==null&&(Xt=Math.max(Xt,Ae.start*yt),fi=Math.min(fi,(Ae.start+Ae.count)*yt)),it!==null?(Xt=Math.max(Xt,0),fi=Math.min(fi,it.count)):pt!=null&&(Xt=Math.max(Xt,0),fi=Math.min(fi,pt.count));const mi=fi-Xt;if(mi<0||mi===1/0)return;Vt.setup(J,oe,Ze,ie,it);let zi,gi=Ke;if(it!==null&&(zi=we.get(it),gi=Lt,gi.setIndex(zi)),J.isMesh)oe.wireframe===!0?(Be.setLineWidth(oe.wireframeLinewidth*gt()),gi.setMode($.LINES)):gi.setMode($.TRIANGLES);else if(J.isLine){let lt=oe.linewidth;lt===void 0&&(lt=1),Be.setLineWidth(lt*gt()),J.isLineSegments?gi.setMode($.LINES):J.isLineLoop?gi.setMode($.LINE_LOOP):gi.setMode($.LINE_STRIP)}else J.isPoints?gi.setMode($.POINTS):J.isSprite&&gi.setMode($.TRIANGLES);if(J.isBatchedMesh)if(J._multiDrawInstances!==null)gi.renderMultiDrawInstances(J._multiDrawStarts,J._multiDrawCounts,J._multiDrawCount,J._multiDrawInstances);else if($e.get("WEBGL_multi_draw"))gi.renderMultiDraw(J._multiDrawStarts,J._multiDrawCounts,J._multiDrawCount);else{const lt=J._multiDrawStarts,Il=J._multiDrawCounts,Ol=J._multiDrawCount,Jn=it?we.get(it).bytesPerElement:1,Gc=st.get(oe).currentProgram.getUniforms();for(let un=0;un<Ol;un++)Gc.setValue($,"_gl_DrawID",un),gi.render(lt[un]/Jn,Il[un])}else if(J.isInstancedMesh)gi.renderInstances(Xt,mi,J.count);else if(ie.isInstancedBufferGeometry){const lt=ie._maxInstanceCount!==void 0?ie._maxInstanceCount:1/0,Il=Math.min(ie.instanceCount,lt);gi.renderInstances(Xt,mi,Il)}else gi.render(Xt,mi)};function Bt(U,X,ie){U.transparent===!0&&U.side===Cs&&U.forceSinglePass===!1?(U.side=gr,U.needsUpdate=!0,de(U,X,ie),U.side=Ea,U.needsUpdate=!0,de(U,X,ie),U.side=Cs):de(U,X,ie)}this.compile=function(U,X,ie=null){ie===null&&(ie=U),g=Ot.get(ie),g.init(X),x.push(g),ie.traverseVisible(function(J){J.isLight&&J.layers.test(X.layers)&&(g.pushLight(J),J.castShadow&&g.pushShadow(J))}),U!==ie&&U.traverseVisible(function(J){J.isLight&&J.layers.test(X.layers)&&(g.pushLight(J),J.castShadow&&g.pushShadow(J))}),g.setupLights();const oe=new Set;return U.traverse(function(J){if(!(J.isMesh||J.isPoints||J.isLine||J.isSprite))return;const Ae=J.material;if(Ae)if(Array.isArray(Ae))for(let Pe=0;Pe<Ae.length;Pe++){const Ze=Ae[Pe];Bt(Ze,ie,J),oe.add(Ze)}else Bt(Ae,ie,J),oe.add(Ae)}),x.pop(),g=null,oe},this.compileAsync=function(U,X,ie=null){const oe=this.compile(U,X,ie);return new Promise(J=>{function Ae(){if(oe.forEach(function(Pe){st.get(Pe).currentProgram.isReady()&&oe.delete(Pe)}),oe.size===0){J(U);return}setTimeout(Ae,10)}$e.get("KHR_parallel_shader_compile")!==null?Ae():setTimeout(Ae,10)})};let Nr=null;function ln(U){Nr&&Nr(U)}function bo(){$n.stop()}function xo(){$n.start()}const $n=new UE;$n.setAnimationLoop(ln),typeof self<"u"&&$n.setContext(self),this.setAnimationLoop=function(U){Nr=U,pe.setAnimationLoop(U),U===null?$n.stop():$n.start()},pe.addEventListener("sessionstart",bo),pe.addEventListener("sessionend",xo),this.render=function(U,X){if(X!==void 0&&X.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(T===!0)return;if(U.matrixWorldAutoUpdate===!0&&U.updateMatrixWorld(),X.parent===null&&X.matrixWorldAutoUpdate===!0&&X.updateMatrixWorld(),pe.enabled===!0&&pe.isPresenting===!0&&(pe.cameraAutoUpdate===!0&&pe.updateCamera(X),X=pe.getCamera()),U.isScene===!0&&U.onBeforeRender(b,U,X,C),g=Ot.get(U,x.length),g.init(X),x.push(g),fe.multiplyMatrices(X.projectionMatrix,X.matrixWorldInverse),z.setFromProjectionMatrix(fe),se=this.localClippingEnabled,Z=Ie.init(this.clippingPlanes,se),v=Xe.get(U,_.length),v.init(),_.push(v),pe.enabled===!0&&pe.isPresenting===!0){const Ae=b.xr.getDepthSensingMesh();Ae!==null&&Pl(Ae,X,-1/0,b.sortObjects)}Pl(U,X,0,b.sortObjects),v.finish(),b.sortObjects===!0&&v.sort(Y,F),ge=pe.enabled===!1||pe.isPresenting===!1||pe.hasDepthSensing()===!1,ge&&ct.addToRenderList(v,U),this.info.render.frame++,Z===!0&&Ie.beginShadows();const ie=g.state.shadowsArray;Ye.render(ie,U,X),Z===!0&&Ie.endShadows(),this.info.autoReset===!0&&this.info.reset();const oe=v.opaque,J=v.transmissive;if(g.setupLights(),X.isArrayCamera){const Ae=X.cameras;if(J.length>0)for(let Pe=0,Ze=Ae.length;Pe<Ze;Pe++){const it=Ae[Pe];Vc(oe,J,U,it)}ge&&ct.render(U);for(let Pe=0,Ze=Ae.length;Pe<Ze;Pe++){const it=Ae[Pe];jc(v,U,it,it.viewport)}}else J.length>0&&Vc(oe,J,U,X),ge&&ct.render(U),jc(v,U,X);C!==null&&(j.updateMultisampleRenderTarget(C),j.updateRenderTargetMipmap(C)),U.isScene===!0&&U.onAfterRender(b,U,X),Vt.resetDefaultState(),S=-1,w=null,x.pop(),x.length>0?(g=x[x.length-1],Z===!0&&Ie.setGlobalState(b.clippingPlanes,g.state.camera)):g=null,_.pop(),_.length>0?v=_[_.length-1]:v=null};function Pl(U,X,ie,oe){if(U.visible===!1)return;if(U.layers.test(X.layers)){if(U.isGroup)ie=U.renderOrder;else if(U.isLOD)U.autoUpdate===!0&&U.update(X);else if(U.isLight)g.pushLight(U),U.castShadow&&g.pushShadow(U);else if(U.isSprite){if(!U.frustumCulled||z.intersectsSprite(U)){oe&&Re.setFromMatrixPosition(U.matrixWorld).applyMatrix4(fe);const Ae=Te.update(U),Pe=U.material;Pe.visible&&v.push(U,Ae,Pe,ie,Re.z,null)}}else if((U.isMesh||U.isLine||U.isPoints)&&(!U.frustumCulled||z.intersectsObject(U))){const Ae=Te.update(U),Pe=U.material;if(oe&&(U.boundingSphere!==void 0?(U.boundingSphere===null&&U.computeBoundingSphere(),Re.copy(U.boundingSphere.center)):(Ae.boundingSphere===null&&Ae.computeBoundingSphere(),Re.copy(Ae.boundingSphere.center)),Re.applyMatrix4(U.matrixWorld).applyMatrix4(fe)),Array.isArray(Pe)){const Ze=Ae.groups;for(let it=0,yt=Ze.length;it<yt;it++){const At=Ze[it],pt=Pe[At.materialIndex];pt&&pt.visible&&v.push(U,Ae,pt,ie,Re.z,At)}}else Pe.visible&&v.push(U,Ae,Pe,ie,Re.z,null)}}const J=U.children;for(let Ae=0,Pe=J.length;Ae<Pe;Ae++)Pl(J[Ae],X,ie,oe)}function jc(U,X,ie,oe){const J=U.opaque,Ae=U.transmissive,Pe=U.transparent;g.setupLightsView(ie),Z===!0&&Ie.setGlobalState(b.clippingPlanes,ie),oe&&Be.viewport(R.copy(oe)),J.length>0&&N(J,X,ie),Ae.length>0&&N(Ae,X,ie),Pe.length>0&&N(Pe,X,ie),Be.buffers.depth.setTest(!0),Be.buffers.depth.setMask(!0),Be.buffers.color.setMask(!0),Be.setPolygonOffset(!1)}function Vc(U,X,ie,oe){if((ie.isScene===!0?ie.overrideMaterial:null)!==null)return;g.state.transmissionRenderTarget[oe.id]===void 0&&(g.state.transmissionRenderTarget[oe.id]=new Ca(1,1,{generateMipmaps:!0,type:$e.has("EXT_color_buffer_half_float")||$e.has("EXT_color_buffer_float")?Kl:Ns,minFilter:Po,samples:4,stencilBuffer:a,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:Gt.workingColorSpace}));const J=g.state.transmissionRenderTarget[oe.id],Ae=oe.viewport||R;J.setSize(Ae.z,Ae.w);const Pe=b.getRenderTarget();b.setRenderTarget(J),b.getClearColor(A),D=b.getClearAlpha(),D<1&&b.setClearColor(16777215,.5),b.clear(),ge&&ct.render(ie);const Ze=b.toneMapping;b.toneMapping=Ma;const it=oe.viewport;if(oe.viewport!==void 0&&(oe.viewport=void 0),g.setupLightsView(oe),Z===!0&&Ie.setGlobalState(b.clippingPlanes,oe),N(U,ie,oe),j.updateMultisampleRenderTarget(J),j.updateRenderTargetMipmap(J),$e.has("WEBGL_multisampled_render_to_texture")===!1){let yt=!1;for(let At=0,pt=X.length;At<pt;At++){const Xt=X[At],fi=Xt.object,mi=Xt.geometry,zi=Xt.material,gi=Xt.group;if(zi.side===Cs&&fi.layers.test(oe.layers)){const lt=zi.side;zi.side=gr,zi.needsUpdate=!0,ee(fi,ie,oe,mi,zi,gi),zi.side=lt,zi.needsUpdate=!0,yt=!0}}yt===!0&&(j.updateMultisampleRenderTarget(J),j.updateRenderTargetMipmap(J))}b.setRenderTarget(Pe),b.setClearColor(A,D),it!==void 0&&(oe.viewport=it),b.toneMapping=Ze}function N(U,X,ie){const oe=X.isScene===!0?X.overrideMaterial:null;for(let J=0,Ae=U.length;J<Ae;J++){const Pe=U[J],Ze=Pe.object,it=Pe.geometry,yt=oe===null?Pe.material:oe,At=Pe.group;Ze.layers.test(ie.layers)&&ee(Ze,X,ie,it,yt,At)}}function ee(U,X,ie,oe,J,Ae){U.onBeforeRender(b,X,ie,oe,J,Ae),U.modelViewMatrix.multiplyMatrices(ie.matrixWorldInverse,U.matrixWorld),U.normalMatrix.getNormalMatrix(U.modelViewMatrix),J.onBeforeRender(b,X,ie,oe,U,Ae),J.transparent===!0&&J.side===Cs&&J.forceSinglePass===!1?(J.side=gr,J.needsUpdate=!0,b.renderBufferDirect(ie,X,oe,J,U,Ae),J.side=Ea,J.needsUpdate=!0,b.renderBufferDirect(ie,X,oe,J,U,Ae),J.side=Cs):b.renderBufferDirect(ie,X,oe,J,U,Ae),U.onAfterRender(b,X,ie,oe,J,Ae)}function de(U,X,ie){X.isScene!==!0&&(X=nt);const oe=st.get(U),J=g.state.lights,Ae=g.state.shadowsArray,Pe=J.state.version,Ze=et.getParameters(U,J.state,Ae,X,ie),it=et.getProgramCacheKey(Ze);let yt=oe.programs;oe.environment=U.isMeshStandardMaterial?X.environment:null,oe.fog=X.fog,oe.envMap=(U.isMeshStandardMaterial?ce:k).get(U.envMap||oe.environment),oe.envMapRotation=oe.environment!==null&&U.envMap===null?X.environmentRotation:U.envMapRotation,yt===void 0&&(U.addEventListener("dispose",Pt),yt=new Map,oe.programs=yt);let At=yt.get(it);if(At!==void 0){if(oe.currentProgram===At&&oe.lightsStateVersion===Pe)return Je(U,Ze),At}else Ze.uniforms=et.getUniforms(U),U.onBeforeCompile(Ze,b),At=et.acquireProgram(Ze,it),yt.set(it,At),oe.uniforms=Ze.uniforms;const pt=oe.uniforms;return(!U.isShaderMaterial&&!U.isRawShaderMaterial||U.clipping===!0)&&(pt.clippingPlanes=Ie.uniform),Je(U,Ze),oe.needsLights=We(U),oe.lightsStateVersion=Pe,oe.needsLights&&(pt.ambientLightColor.value=J.state.ambient,pt.lightProbe.value=J.state.probe,pt.directionalLights.value=J.state.directional,pt.directionalLightShadows.value=J.state.directionalShadow,pt.spotLights.value=J.state.spot,pt.spotLightShadows.value=J.state.spotShadow,pt.rectAreaLights.value=J.state.rectArea,pt.ltc_1.value=J.state.rectAreaLTC1,pt.ltc_2.value=J.state.rectAreaLTC2,pt.pointLights.value=J.state.point,pt.pointLightShadows.value=J.state.pointShadow,pt.hemisphereLights.value=J.state.hemi,pt.directionalShadowMap.value=J.state.directionalShadowMap,pt.directionalShadowMatrix.value=J.state.directionalShadowMatrix,pt.spotShadowMap.value=J.state.spotShadowMap,pt.spotLightMatrix.value=J.state.spotLightMatrix,pt.spotLightMap.value=J.state.spotLightMap,pt.pointShadowMap.value=J.state.pointShadowMap,pt.pointShadowMatrix.value=J.state.pointShadowMatrix),oe.currentProgram=At,oe.uniformsList=null,At}function Ne(U){if(U.uniformsList===null){const X=U.currentProgram.getUniforms();U.uniformsList=of.seqWithValue(X.seq,U.uniforms)}return U.uniformsList}function Je(U,X){const ie=st.get(U);ie.outputColorSpace=X.outputColorSpace,ie.batching=X.batching,ie.batchingColor=X.batchingColor,ie.instancing=X.instancing,ie.instancingColor=X.instancingColor,ie.instancingMorph=X.instancingMorph,ie.skinning=X.skinning,ie.morphTargets=X.morphTargets,ie.morphNormals=X.morphNormals,ie.morphColors=X.morphColors,ie.morphTargetsCount=X.morphTargetsCount,ie.numClippingPlanes=X.numClippingPlanes,ie.numIntersection=X.numClipIntersection,ie.vertexAlphas=X.vertexAlphas,ie.vertexTangents=X.vertexTangents,ie.toneMapping=X.toneMapping}function at(U,X,ie,oe,J){X.isScene!==!0&&(X=nt),j.resetTextureUnits();const Ae=X.fog,Pe=oe.isMeshStandardMaterial?X.environment:null,Ze=C===null?b.outputColorSpace:C.isXRRenderTarget===!0?C.texture.colorSpace:Jl,it=(oe.isMeshStandardMaterial?ce:k).get(oe.envMap||Pe),yt=oe.vertexColors===!0&&!!ie.attributes.color&&ie.attributes.color.itemSize===4,At=!!ie.attributes.tangent&&(!!oe.normalMap||oe.anisotropy>0),pt=!!ie.morphAttributes.position,Xt=!!ie.morphAttributes.normal,fi=!!ie.morphAttributes.color;let mi=Ma;oe.toneMapped&&(C===null||C.isXRRenderTarget===!0)&&(mi=b.toneMapping);const zi=ie.morphAttributes.position||ie.morphAttributes.normal||ie.morphAttributes.color,gi=zi!==void 0?zi.length:0,lt=st.get(oe),Il=g.state.lights;if(Z===!0&&(se===!0||U!==w)){const Wr=U===w&&oe.id===S;Ie.setState(oe,U,Wr)}let Ol=!1;oe.version===lt.__version?(lt.needsLights&&lt.lightsStateVersion!==Il.state.version||lt.outputColorSpace!==Ze||J.isBatchedMesh&&lt.batching===!1||!J.isBatchedMesh&&lt.batching===!0||J.isBatchedMesh&&lt.batchingColor===!0&&J.colorTexture===null||J.isBatchedMesh&&lt.batchingColor===!1&&J.colorTexture!==null||J.isInstancedMesh&&lt.instancing===!1||!J.isInstancedMesh&&lt.instancing===!0||J.isSkinnedMesh&&lt.skinning===!1||!J.isSkinnedMesh&&lt.skinning===!0||J.isInstancedMesh&&lt.instancingColor===!0&&J.instanceColor===null||J.isInstancedMesh&&lt.instancingColor===!1&&J.instanceColor!==null||J.isInstancedMesh&&lt.instancingMorph===!0&&J.morphTexture===null||J.isInstancedMesh&&lt.instancingMorph===!1&&J.morphTexture!==null||lt.envMap!==it||oe.fog===!0&&lt.fog!==Ae||lt.numClippingPlanes!==void 0&&(lt.numClippingPlanes!==Ie.numPlanes||lt.numIntersection!==Ie.numIntersection)||lt.vertexAlphas!==yt||lt.vertexTangents!==At||lt.morphTargets!==pt||lt.morphNormals!==Xt||lt.morphColors!==fi||lt.toneMapping!==mi||lt.morphTargetsCount!==gi)&&(Ol=!0):(Ol=!0,lt.__version=oe.version);let Jn=lt.currentProgram;Ol===!0&&(Jn=de(oe,X,J));let Gc=!1,un=!1,ip=!1;const li=Jn.getUniforms(),ws=lt.uniforms;if(Be.useProgram(Jn.program)&&(Gc=!0,un=!0,ip=!0),oe.id!==S&&(S=oe.id,un=!0),Gc||w!==U){Be.buffers.depth.getReversed()?(le.copy(U.projectionMatrix),cF(le),hF(le),li.setValue($,"projectionMatrix",le)):li.setValue($,"projectionMatrix",U.projectionMatrix),li.setValue($,"viewMatrix",U.matrixWorldInverse);const Wr=li.map.cameraPosition;Wr!==void 0&&Wr.setValue($,_e.setFromMatrixPosition(U.matrixWorld)),xt.logarithmicDepthBuffer&&li.setValue($,"logDepthBufFC",2/(Math.log(U.far+1)/Math.LN2)),(oe.isMeshPhongMaterial||oe.isMeshToonMaterial||oe.isMeshLambertMaterial||oe.isMeshBasicMaterial||oe.isMeshStandardMaterial||oe.isShaderMaterial)&&li.setValue($,"isOrthographic",U.isOrthographicCamera===!0),w!==U&&(w=U,un=!0,ip=!0)}if(J.isSkinnedMesh){li.setOptional($,J,"bindMatrix"),li.setOptional($,J,"bindMatrixInverse");const Wr=J.skeleton;Wr&&(Wr.boneTexture===null&&Wr.computeBoneTexture(),li.setValue($,"boneTexture",Wr.boneTexture,j))}J.isBatchedMesh&&(li.setOptional($,J,"batchingTexture"),li.setValue($,"batchingTexture",J._matricesTexture,j),li.setOptional($,J,"batchingIdTexture"),li.setValue($,"batchingIdTexture",J._indirectTexture,j),li.setOptional($,J,"batchingColorTexture"),J._colorsTexture!==null&&li.setValue($,"batchingColorTexture",J._colorsTexture,j));const rp=ie.morphAttributes;if((rp.position!==void 0||rp.normal!==void 0||rp.color!==void 0)&&ft.update(J,ie,Jn),(un||lt.receiveShadow!==J.receiveShadow)&&(lt.receiveShadow=J.receiveShadow,li.setValue($,"receiveShadow",J.receiveShadow)),oe.isMeshGouraudMaterial&&oe.envMap!==null&&(ws.envMap.value=it,ws.flipEnvMap.value=it.isCubeTexture&&it.isRenderTargetTexture===!1?-1:1),oe.isMeshStandardMaterial&&oe.envMap===null&&X.environment!==null&&(ws.envMapIntensity.value=X.environmentIntensity),un&&(li.setValue($,"toneMappingExposure",b.toneMappingExposure),lt.needsLights&&qe(ws,ip),Ae&&oe.fog===!0&&Ve.refreshFogUniforms(ws,Ae),Ve.refreshMaterialUniforms(ws,oe,G,W,g.state.transmissionRenderTarget[U.id]),of.upload($,Ne(lt),ws,j)),oe.isShaderMaterial&&oe.uniformsNeedUpdate===!0&&(of.upload($,Ne(lt),ws,j),oe.uniformsNeedUpdate=!1),oe.isSpriteMaterial&&li.setValue($,"center",J.center),li.setValue($,"modelViewMatrix",J.modelViewMatrix),li.setValue($,"normalMatrix",J.normalMatrix),li.setValue($,"modelMatrix",J.matrixWorld),oe.isShaderMaterial||oe.isRawShaderMaterial){const Wr=oe.uniformsGroups;for(let np=0,_o=Wr.length;np<_o;np++){const _O=Wr[np];te.update(_O,Jn),te.bind(_O,Jn)}}return Jn}function qe(U,X){U.ambientLightColor.needsUpdate=X,U.lightProbe.needsUpdate=X,U.directionalLights.needsUpdate=X,U.directionalLightShadows.needsUpdate=X,U.pointLights.needsUpdate=X,U.pointLightShadows.needsUpdate=X,U.spotLights.needsUpdate=X,U.spotLightShadows.needsUpdate=X,U.rectAreaLights.needsUpdate=X,U.hemisphereLights.needsUpdate=X}function We(U){return U.isMeshLambertMaterial||U.isMeshToonMaterial||U.isMeshPhongMaterial||U.isMeshStandardMaterial||U.isShadowMaterial||U.isShaderMaterial&&U.lights===!0}this.getActiveCubeFace=function(){return E},this.getActiveMipmapLevel=function(){return M},this.getRenderTarget=function(){return C},this.setRenderTargetTextures=function(U,X,ie){st.get(U.texture).__webglTexture=X,st.get(U.depthTexture).__webglTexture=ie;const oe=st.get(U);oe.__hasExternalTextures=!0,oe.__autoAllocateDepthBuffer=ie===void 0,oe.__autoAllocateDepthBuffer||$e.has("WEBGL_multisampled_render_to_texture")===!0&&(console.warn("THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided"),oe.__useRenderToTexture=!1)},this.setRenderTargetFramebuffer=function(U,X){const ie=st.get(U);ie.__webglFramebuffer=X,ie.__useDefaultFramebuffer=X===void 0},this.setRenderTarget=function(U,X=0,ie=0){C=U,E=X,M=ie;let oe=!0,J=null,Ae=!1,Pe=!1;if(U){const Ze=st.get(U);if(Ze.__useDefaultFramebuffer!==void 0)Be.bindFramebuffer($.FRAMEBUFFER,null),oe=!1;else if(Ze.__webglFramebuffer===void 0)j.setupRenderTarget(U);else if(Ze.__hasExternalTextures)j.rebindTextures(U,st.get(U.texture).__webglTexture,st.get(U.depthTexture).__webglTexture);else if(U.depthBuffer){const At=U.depthTexture;if(Ze.__boundDepthTexture!==At){if(At!==null&&st.has(At)&&(U.width!==At.image.width||U.height!==At.image.height))throw new Error("WebGLRenderTarget: Attached DepthTexture is initialized to the incorrect size.");j.setupDepthRenderbuffer(U)}}const it=U.texture;(it.isData3DTexture||it.isDataArrayTexture||it.isCompressedArrayTexture)&&(Pe=!0);const yt=st.get(U).__webglFramebuffer;U.isWebGLCubeRenderTarget?(Array.isArray(yt[X])?J=yt[X][ie]:J=yt[X],Ae=!0):U.samples>0&&j.useMultisampledRTT(U)===!1?J=st.get(U).__webglMultisampledFramebuffer:Array.isArray(yt)?J=yt[ie]:J=yt,R.copy(U.viewport),O.copy(U.scissor),P=U.scissorTest}else R.copy(B).multiplyScalar(G).floor(),O.copy(q).multiplyScalar(G).floor(),P=H;if(Be.bindFramebuffer($.FRAMEBUFFER,J)&&oe&&Be.drawBuffers(U,J),Be.viewport(R),Be.scissor(O),Be.setScissorTest(P),Ae){const Ze=st.get(U.texture);$.framebufferTexture2D($.FRAMEBUFFER,$.COLOR_ATTACHMENT0,$.TEXTURE_CUBE_MAP_POSITIVE_X+X,Ze.__webglTexture,ie)}else if(Pe){const Ze=st.get(U.texture),it=X||0;$.framebufferTextureLayer($.FRAMEBUFFER,$.COLOR_ATTACHMENT0,Ze.__webglTexture,ie||0,it)}S=-1},this.readRenderTargetPixels=function(U,X,ie,oe,J,Ae,Pe){if(!(U&&U.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let Ze=st.get(U).__webglFramebuffer;if(U.isWebGLCubeRenderTarget&&Pe!==void 0&&(Ze=Ze[Pe]),Ze){Be.bindFramebuffer($.FRAMEBUFFER,Ze);try{const it=U.texture,yt=it.format,At=it.type;if(!xt.textureFormatReadable(yt)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}if(!xt.textureTypeReadable(At)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}X>=0&&X<=U.width-oe&&ie>=0&&ie<=U.height-J&&$.readPixels(X,ie,oe,J,_t.convert(yt),_t.convert(At),Ae)}finally{const it=C!==null?st.get(C).__webglFramebuffer:null;Be.bindFramebuffer($.FRAMEBUFFER,it)}}},this.readRenderTargetPixelsAsync=async function(U,X,ie,oe,J,Ae,Pe){if(!(U&&U.isWebGLRenderTarget))throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let Ze=st.get(U).__webglFramebuffer;if(U.isWebGLCubeRenderTarget&&Pe!==void 0&&(Ze=Ze[Pe]),Ze){const it=U.texture,yt=it.format,At=it.type;if(!xt.textureFormatReadable(yt))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");if(!xt.textureTypeReadable(At))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");if(X>=0&&X<=U.width-oe&&ie>=0&&ie<=U.height-J){Be.bindFramebuffer($.FRAMEBUFFER,Ze);const pt=$.createBuffer();$.bindBuffer($.PIXEL_PACK_BUFFER,pt),$.bufferData($.PIXEL_PACK_BUFFER,Ae.byteLength,$.STREAM_READ),$.readPixels(X,ie,oe,J,_t.convert(yt),_t.convert(At),0);const Xt=C!==null?st.get(C).__webglFramebuffer:null;Be.bindFramebuffer($.FRAMEBUFFER,Xt);const fi=$.fenceSync($.SYNC_GPU_COMMANDS_COMPLETE,0);return $.flush(),await uF($,fi,4),$.bindBuffer($.PIXEL_PACK_BUFFER,pt),$.getBufferSubData($.PIXEL_PACK_BUFFER,0,Ae),$.deleteBuffer(pt),$.deleteSync(fi),Ae}else throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: requested read bounds are out of range.")}},this.copyFramebufferToTexture=function(U,X=null,ie=0){U.isTexture!==!0&&(dh("WebGLRenderer: copyFramebufferToTexture function signature has changed."),X=arguments[0]||null,U=arguments[1]);const oe=Math.pow(2,-ie),J=Math.floor(U.image.width*oe),Ae=Math.floor(U.image.height*oe),Pe=X!==null?X.x:0,Ze=X!==null?X.y:0;j.setTexture2D(U,0),$.copyTexSubImage2D($.TEXTURE_2D,ie,0,0,Pe,Ze,J,Ae),Be.unbindTexture()},this.copyTextureToTexture=function(U,X,ie=null,oe=null,J=0){U.isTexture!==!0&&(dh("WebGLRenderer: copyTextureToTexture function signature has changed."),oe=arguments[0]||null,U=arguments[1],X=arguments[2],J=arguments[3]||0,ie=null);let Ae,Pe,Ze,it,yt,At,pt,Xt,fi;const mi=U.isCompressedTexture?U.mipmaps[J]:U.image;ie!==null?(Ae=ie.max.x-ie.min.x,Pe=ie.max.y-ie.min.y,Ze=ie.isBox3?ie.max.z-ie.min.z:1,it=ie.min.x,yt=ie.min.y,At=ie.isBox3?ie.min.z:0):(Ae=mi.width,Pe=mi.height,Ze=mi.depth||1,it=0,yt=0,At=0),oe!==null?(pt=oe.x,Xt=oe.y,fi=oe.z):(pt=0,Xt=0,fi=0);const zi=_t.convert(X.format),gi=_t.convert(X.type);let lt;X.isData3DTexture?(j.setTexture3D(X,0),lt=$.TEXTURE_3D):X.isDataArrayTexture||X.isCompressedArrayTexture?(j.setTexture2DArray(X,0),lt=$.TEXTURE_2D_ARRAY):(j.setTexture2D(X,0),lt=$.TEXTURE_2D),$.pixelStorei($.UNPACK_FLIP_Y_WEBGL,X.flipY),$.pixelStorei($.UNPACK_PREMULTIPLY_ALPHA_WEBGL,X.premultiplyAlpha),$.pixelStorei($.UNPACK_ALIGNMENT,X.unpackAlignment);const Il=$.getParameter($.UNPACK_ROW_LENGTH),Ol=$.getParameter($.UNPACK_IMAGE_HEIGHT),Jn=$.getParameter($.UNPACK_SKIP_PIXELS),Gc=$.getParameter($.UNPACK_SKIP_ROWS),un=$.getParameter($.UNPACK_SKIP_IMAGES);$.pixelStorei($.UNPACK_ROW_LENGTH,mi.width),$.pixelStorei($.UNPACK_IMAGE_HEIGHT,mi.height),$.pixelStorei($.UNPACK_SKIP_PIXELS,it),$.pixelStorei($.UNPACK_SKIP_ROWS,yt),$.pixelStorei($.UNPACK_SKIP_IMAGES,At);const ip=U.isDataArrayTexture||U.isData3DTexture,li=X.isDataArrayTexture||X.isData3DTexture;if(U.isRenderTargetTexture||U.isDepthTexture){const ws=st.get(U),rp=st.get(X),Wr=st.get(ws.__renderTarget),np=st.get(rp.__renderTarget);Be.bindFramebuffer($.READ_FRAMEBUFFER,Wr.__webglFramebuffer),Be.bindFramebuffer($.DRAW_FRAMEBUFFER,np.__webglFramebuffer);for(let _o=0;_o<Ze;_o++)ip&&$.framebufferTextureLayer($.READ_FRAMEBUFFER,$.COLOR_ATTACHMENT0,st.get(U).__webglTexture,J,At+_o),U.isDepthTexture?(li&&$.framebufferTextureLayer($.DRAW_FRAMEBUFFER,$.COLOR_ATTACHMENT0,st.get(X).__webglTexture,J,fi+_o),$.blitFramebuffer(it,yt,Ae,Pe,pt,Xt,Ae,Pe,$.DEPTH_BUFFER_BIT,$.NEAREST)):li?$.copyTexSubImage3D(lt,J,pt,Xt,fi+_o,it,yt,Ae,Pe):$.copyTexSubImage2D(lt,J,pt,Xt,fi+_o,it,yt,Ae,Pe);Be.bindFramebuffer($.READ_FRAMEBUFFER,null),Be.bindFramebuffer($.DRAW_FRAMEBUFFER,null)}else li?U.isDataTexture||U.isData3DTexture?$.texSubImage3D(lt,J,pt,Xt,fi,Ae,Pe,Ze,zi,gi,mi.data):X.isCompressedArrayTexture?$.compressedTexSubImage3D(lt,J,pt,Xt,fi,Ae,Pe,Ze,zi,mi.data):$.texSubImage3D(lt,J,pt,Xt,fi,Ae,Pe,Ze,zi,gi,mi):U.isDataTexture?$.texSubImage2D($.TEXTURE_2D,J,pt,Xt,Ae,Pe,zi,gi,mi.data):U.isCompressedTexture?$.compressedTexSubImage2D($.TEXTURE_2D,J,pt,Xt,mi.width,mi.height,zi,mi.data):$.texSubImage2D($.TEXTURE_2D,J,pt,Xt,Ae,Pe,zi,gi,mi);$.pixelStorei($.UNPACK_ROW_LENGTH,Il),$.pixelStorei($.UNPACK_IMAGE_HEIGHT,Ol),$.pixelStorei($.UNPACK_SKIP_PIXELS,Jn),$.pixelStorei($.UNPACK_SKIP_ROWS,Gc),$.pixelStorei($.UNPACK_SKIP_IMAGES,un),J===0&&X.generateMipmaps&&$.generateMipmap(lt),Be.unbindTexture()},this.copyTextureToTexture3D=function(U,X,ie=null,oe=null,J=0){return U.isTexture!==!0&&(dh("WebGLRenderer: copyTextureToTexture3D function signature has changed."),ie=arguments[0]||null,oe=arguments[1]||null,U=arguments[2],X=arguments[3],J=arguments[4]||0),dh('WebGLRenderer: copyTextureToTexture3D function has been deprecated. Use "copyTextureToTexture" instead.'),this.copyTextureToTexture(U,X,ie,oe,J)},this.initRenderTarget=function(U){st.get(U).__webglFramebuffer===void 0&&j.setupRenderTarget(U)},this.initTexture=function(U){U.isCubeTexture?j.setTextureCube(U,0):U.isData3DTexture?j.setTexture3D(U,0):U.isDataArrayTexture||U.isCompressedArrayTexture?j.setTexture2DArray(U,0):j.setTexture2D(U,0),Be.unbindTexture()},this.resetState=function(){E=0,M=0,C=null,Be.reset(),Vt.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return Is}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(e){this._outputColorSpace=e;const i=this.getContext();i.drawingBufferColorspace=Gt._getDrawingBufferColorSpace(e),i.unpackColorSpace=Gt._getUnpackColorSpace()}}let xj=class extends Or{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.backgroundRotation=new Oa,this.environmentIntensity=1,this.environmentRotation=new Oa,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(r,e){return super.copy(r,e),r.background!==null&&(this.background=r.background.clone()),r.environment!==null&&(this.environment=r.environment.clone()),r.fog!==null&&(this.fog=r.fog.clone()),this.backgroundBlurriness=r.backgroundBlurriness,this.backgroundIntensity=r.backgroundIntensity,this.backgroundRotation.copy(r.backgroundRotation),this.environmentIntensity=r.environmentIntensity,this.environmentRotation.copy(r.environmentRotation),r.overrideMaterial!==null&&(this.overrideMaterial=r.overrideMaterial.clone()),this.matrixAutoUpdate=r.matrixAutoUpdate,this}toJSON(r){const e=super.toJSON(r);return this.fog!==null&&(e.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(e.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(e.object.backgroundIntensity=this.backgroundIntensity),e.object.backgroundRotation=this.backgroundRotation.toArray(),this.environmentIntensity!==1&&(e.object.environmentIntensity=this.environmentIntensity),e.object.environmentRotation=this.environmentRotation.toArray(),e}},_j=class{constructor(r,e){this.isInterleavedBuffer=!0,this.array=r,this.stride=e,this.count=r!==void 0?r.length/e:0,this.usage=q0,this.updateRanges=[],this.version=0,this.uuid=Os()}onUploadCallback(){}set needsUpdate(r){r===!0&&this.version++}setUsage(r){return this.usage=r,this}addUpdateRange(r,e){this.updateRanges.push({start:r,count:e})}clearUpdateRanges(){this.updateRanges.length=0}copy(r){return this.array=new r.array.constructor(r.array),this.count=r.count,this.stride=r.stride,this.usage=r.usage,this}copyAt(r,e,i){r*=this.stride,i*=e.stride;for(let n=0,s=this.stride;n<s;n++)this.array[r+n]=e.array[i+n];return this}set(r,e=0){return this.array.set(r,e),this}clone(r){r.arrayBuffers===void 0&&(r.arrayBuffers={}),this.array.buffer._uuid===void 0&&(this.array.buffer._uuid=Os()),r.arrayBuffers[this.array.buffer._uuid]===void 0&&(r.arrayBuffers[this.array.buffer._uuid]=this.array.slice(0).buffer);const e=new this.array.constructor(r.arrayBuffers[this.array.buffer._uuid]),i=new this.constructor(e,this.stride);return i.setUsage(this.usage),i}onUpload(r){return this.onUploadCallback=r,this}toJSON(r){return r.arrayBuffers===void 0&&(r.arrayBuffers={}),this.array.buffer._uuid===void 0&&(this.array.buffer._uuid=Os()),r.arrayBuffers[this.array.buffer._uuid]===void 0&&(r.arrayBuffers[this.array.buffer._uuid]=Array.from(new Uint32Array(this.array.buffer))),{uuid:this.uuid,buffer:this.array.buffer._uuid,type:this.array.constructor.name,stride:this.stride}}};const vr=new K;let f2=class PO{constructor(e,i,n,s=!1){this.isInterleavedBufferAttribute=!0,this.name="",this.data=e,this.itemSize=i,this.offset=n,this.normalized=s}get count(){return this.data.count}get array(){return this.data.array}set needsUpdate(e){this.data.needsUpdate=e}applyMatrix4(e){for(let i=0,n=this.data.count;i<n;i++)vr.fromBufferAttribute(this,i),vr.applyMatrix4(e),this.setXYZ(i,vr.x,vr.y,vr.z);return this}applyNormalMatrix(e){for(let i=0,n=this.count;i<n;i++)vr.fromBufferAttribute(this,i),vr.applyNormalMatrix(e),this.setXYZ(i,vr.x,vr.y,vr.z);return this}transformDirection(e){for(let i=0,n=this.count;i<n;i++)vr.fromBufferAttribute(this,i),vr.transformDirection(e),this.setXYZ(i,vr.x,vr.y,vr.z);return this}getComponent(e,i){let n=this.array[e*this.data.stride+this.offset+i];return this.normalized&&(n=Cn(n,this.array)),n}setComponent(e,i,n){return this.normalized&&(n=Jt(n,this.array)),this.data.array[e*this.data.stride+this.offset+i]=n,this}setX(e,i){return this.normalized&&(i=Jt(i,this.array)),this.data.array[e*this.data.stride+this.offset]=i,this}setY(e,i){return this.normalized&&(i=Jt(i,this.array)),this.data.array[e*this.data.stride+this.offset+1]=i,this}setZ(e,i){return this.normalized&&(i=Jt(i,this.array)),this.data.array[e*this.data.stride+this.offset+2]=i,this}setW(e,i){return this.normalized&&(i=Jt(i,this.array)),this.data.array[e*this.data.stride+this.offset+3]=i,this}getX(e){let i=this.data.array[e*this.data.stride+this.offset];return this.normalized&&(i=Cn(i,this.array)),i}getY(e){let i=this.data.array[e*this.data.stride+this.offset+1];return this.normalized&&(i=Cn(i,this.array)),i}getZ(e){let i=this.data.array[e*this.data.stride+this.offset+2];return this.normalized&&(i=Cn(i,this.array)),i}getW(e){let i=this.data.array[e*this.data.stride+this.offset+3];return this.normalized&&(i=Cn(i,this.array)),i}setXY(e,i,n){return e=e*this.data.stride+this.offset,this.normalized&&(i=Jt(i,this.array),n=Jt(n,this.array)),this.data.array[e+0]=i,this.data.array[e+1]=n,this}setXYZ(e,i,n,s){return e=e*this.data.stride+this.offset,this.normalized&&(i=Jt(i,this.array),n=Jt(n,this.array),s=Jt(s,this.array)),this.data.array[e+0]=i,this.data.array[e+1]=n,this.data.array[e+2]=s,this}setXYZW(e,i,n,s,a){return e=e*this.data.stride+this.offset,this.normalized&&(i=Jt(i,this.array),n=Jt(n,this.array),s=Jt(s,this.array),a=Jt(a,this.array)),this.data.array[e+0]=i,this.data.array[e+1]=n,this.data.array[e+2]=s,this.data.array[e+3]=a,this}clone(e){if(e===void 0){console.log("THREE.InterleavedBufferAttribute.clone(): Cloning an interleaved buffer attribute will de-interleave buffer data.");const i=[];for(let n=0;n<this.count;n++){const s=n*this.data.stride+this.offset;for(let a=0;a<this.itemSize;a++)i.push(this.data.array[s+a])}return new dn(new this.array.constructor(i),this.itemSize,this.normalized)}else return e.interleavedBuffers===void 0&&(e.interleavedBuffers={}),e.interleavedBuffers[this.data.uuid]===void 0&&(e.interleavedBuffers[this.data.uuid]=this.data.clone(e)),new PO(e.interleavedBuffers[this.data.uuid],this.itemSize,this.offset,this.normalized)}toJSON(e){if(e===void 0){console.log("THREE.InterleavedBufferAttribute.toJSON(): Serializing an interleaved buffer attribute will de-interleave buffer data.");const i=[];for(let n=0;n<this.count;n++){const s=n*this.data.stride+this.offset;for(let a=0;a<this.itemSize;a++)i.push(this.data.array[s+a])}return{itemSize:this.itemSize,type:this.array.constructor.name,array:i,normalized:this.normalized}}else return e.interleavedBuffers===void 0&&(e.interleavedBuffers={}),e.interleavedBuffers[this.data.uuid]===void 0&&(e.interleavedBuffers[this.data.uuid]=this.data.toJSON(e)),{isInterleavedBufferAttribute:!0,itemSize:this.itemSize,data:this.data.uuid,offset:this.offset,normalized:this.normalized}}},Tj=class extends Uo{static get type(){return"SpriteMaterial"}constructor(r){super(),this.isSpriteMaterial=!0,this.color=new Ut(16777215),this.map=null,this.alphaMap=null,this.rotation=0,this.sizeAttenuation=!0,this.transparent=!0,this.fog=!0,this.setValues(r)}copy(r){return super.copy(r),this.color.copy(r.color),this.map=r.map,this.alphaMap=r.alphaMap,this.rotation=r.rotation,this.sizeAttenuation=r.sizeAttenuation,this.fog=r.fog,this}},bu;const bh=new K,xu=new K,_u=new K,Tu=new ke,xh=new ke,m2=new si,uf=new K,_h=new K,cf=new K,g2=new ke,Cv=new ke,y2=new ke;class wj extends Or{constructor(e=new Tj){if(super(),this.isSprite=!0,this.type="Sprite",bu===void 0){bu=new Kr;const i=new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]),n=new _j(i,5);bu.setIndex([0,1,2,0,2,3]),bu.setAttribute("position",new f2(n,3,0,!1)),bu.setAttribute("uv",new f2(n,2,3,!1))}this.geometry=bu,this.material=e,this.center=new ke(.5,.5)}raycast(e,i){e.camera===null&&console.error('THREE.Sprite: "Raycaster.camera" needs to be set in order to raycast against sprites.'),xu.setFromMatrixScale(this.matrixWorld),m2.copy(e.camera.matrixWorld),this.modelViewMatrix.multiplyMatrices(e.camera.matrixWorldInverse,this.matrixWorld),_u.setFromMatrixPosition(this.modelViewMatrix),e.camera.isPerspectiveCamera&&this.material.sizeAttenuation===!1&&xu.multiplyScalar(-_u.z);const n=this.material.rotation;let s,a;n!==0&&(a=Math.cos(n),s=Math.sin(n));const o=this.center;hf(uf.set(-.5,-.5,0),_u,o,xu,s,a),hf(_h.set(.5,-.5,0),_u,o,xu,s,a),hf(cf.set(.5,.5,0),_u,o,xu,s,a),g2.set(0,0),Cv.set(1,0),y2.set(1,1);let l=e.ray.intersectTriangle(uf,_h,cf,!1,bh);if(l===null&&(hf(_h.set(-.5,.5,0),_u,o,xu,s,a),Cv.set(0,1),l=e.ray.intersectTriangle(uf,cf,_h,!1,bh),l===null))return;const u=e.ray.origin.distanceTo(bh);u<e.near||u>e.far||i.push({distance:u,point:bh.clone(),uv:hu.getInterpolation(bh,uf,_h,cf,g2,Cv,y2,new ke),face:null,object:this})}copy(e,i){return super.copy(e,i),e.center!==void 0&&this.center.copy(e.center),this.material=e.material,this}}function hf(r,e,i,n,s,a){Tu.subVectors(r,i).addScalar(.5).multiply(n),s!==void 0?(xh.x=a*Tu.x-s*Tu.y,xh.y=s*Tu.x+a*Tu.y):xh.copy(Tu),r.copy(e),r.x+=xh.x,r.y+=xh.y,r.applyMatrix4(m2)}let v2=class extends Uo{static get type(){return"LineBasicMaterial"}constructor(r){super(),this.isLineBasicMaterial=!0,this.color=new Ut(16777215),this.map=null,this.linewidth=1,this.linecap="round",this.linejoin="round",this.fog=!0,this.setValues(r)}copy(r){return super.copy(r),this.color.copy(r.color),this.map=r.map,this.linewidth=r.linewidth,this.linecap=r.linecap,this.linejoin=r.linejoin,this.fog=r.fog,this}};const df=new K,pf=new K,b2=new si,Th=new Gp,ff=new zp,Rv=new K,x2=new K;class Sj extends Or{constructor(e=new Kr,i=new v2){super(),this.isLine=!0,this.type="Line",this.geometry=e,this.material=i,this.updateMorphTargets()}copy(e,i){return super.copy(e,i),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}computeLineDistances(){const e=this.geometry;if(e.index===null){const i=e.attributes.position,n=[0];for(let s=1,a=i.count;s<a;s++)df.fromBufferAttribute(i,s-1),pf.fromBufferAttribute(i,s),n[s]=n[s-1],n[s]+=df.distanceTo(pf);e.setAttribute("lineDistance",new xi(n,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}raycast(e,i){const n=this.geometry,s=this.matrixWorld,a=e.params.Line.threshold,o=n.drawRange;if(n.boundingSphere===null&&n.computeBoundingSphere(),ff.copy(n.boundingSphere),ff.applyMatrix4(s),ff.radius+=a,e.ray.intersectsSphere(ff)===!1)return;b2.copy(s).invert(),Th.copy(e.ray).applyMatrix4(b2);const l=a/((this.scale.x+this.scale.y+this.scale.z)/3),u=l*l,c=this.isLineSegments?2:1,h=n.index,d=n.attributes.position;if(h!==null){const p=Math.max(0,o.start),f=Math.min(h.count,o.start+o.count);for(let m=p,y=f-1;m<y;m+=c){const v=h.getX(m),g=h.getX(m+1),_=mf(this,e,Th,u,v,g);_&&i.push(_)}if(this.isLineLoop){const m=h.getX(f-1),y=h.getX(p),v=mf(this,e,Th,u,m,y);v&&i.push(v)}}else{const p=Math.max(0,o.start),f=Math.min(d.count,o.start+o.count);for(let m=p,y=f-1;m<y;m+=c){const v=mf(this,e,Th,u,m,m+1);v&&i.push(v)}if(this.isLineLoop){const m=mf(this,e,Th,u,f-1,p);m&&i.push(m)}}}updateMorphTargets(){const e=this.geometry.morphAttributes,i=Object.keys(e);if(i.length>0){const n=e[i[0]];if(n!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,a=n.length;s<a;s++){const o=n[s].name||String(s);this.morphTargetInfluences.push(0),this.morphTargetDictionary[o]=s}}}}}function mf(r,e,i,n,s,a){const o=r.geometry.attributes.position;if(df.fromBufferAttribute(o,s),pf.fromBufferAttribute(o,a),i.distanceSqToSegment(df,pf,Rv,x2)>n)return;Rv.applyMatrix4(r.matrixWorld);const l=e.ray.origin.distanceTo(Rv);if(!(l<e.near||l>e.far))return{distance:l,point:x2.clone().applyMatrix4(r.matrixWorld),index:s,face:null,faceIndex:null,barycoord:null,object:r}}class js{constructor(){this.type="Curve",this.arcLengthDivisions=200}getPoint(){return console.warn("THREE.Curve: .getPoint() not implemented."),null}getPointAt(e,i){const n=this.getUtoTmapping(e);return this.getPoint(n,i)}getPoints(e=5){const i=[];for(let n=0;n<=e;n++)i.push(this.getPoint(n/e));return i}getSpacedPoints(e=5){const i=[];for(let n=0;n<=e;n++)i.push(this.getPointAt(n/e));return i}getLength(){const e=this.getLengths();return e[e.length-1]}getLengths(e=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;const i=[];let n,s=this.getPoint(0),a=0;i.push(0);for(let o=1;o<=e;o++)n=this.getPoint(o/e),a+=n.distanceTo(s),i.push(a),s=n;return this.cacheArcLengths=i,i}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e,i){const n=this.getLengths();let s=0;const a=n.length;let o;i?o=i:o=e*n[a-1];let l=0,u=a-1,c;for(;l<=u;)if(s=Math.floor(l+(u-l)/2),c=n[s]-o,c<0)l=s+1;else if(c>0)u=s-1;else{u=s;break}if(s=u,n[s]===o)return s/(a-1);const h=n[s],d=n[s+1]-h,p=(o-h)/d;return(s+p)/(a-1)}getTangent(e,i){let n=e-1e-4,s=e+1e-4;n<0&&(n=0),s>1&&(s=1);const a=this.getPoint(n),o=this.getPoint(s),l=i||(a.isVector2?new ke:new K);return l.copy(o).sub(a).normalize(),l}getTangentAt(e,i){const n=this.getUtoTmapping(e);return this.getTangent(n,i)}computeFrenetFrames(e,i){const n=new K,s=[],a=[],o=[],l=new K,u=new si;for(let f=0;f<=e;f++){const m=f/e;s[f]=this.getTangentAt(m,new K)}a[0]=new K,o[0]=new K;let c=Number.MAX_VALUE;const h=Math.abs(s[0].x),d=Math.abs(s[0].y),p=Math.abs(s[0].z);h<=c&&(c=h,n.set(1,0,0)),d<=c&&(c=d,n.set(0,1,0)),p<=c&&n.set(0,0,1),l.crossVectors(s[0],n).normalize(),a[0].crossVectors(s[0],l),o[0].crossVectors(s[0],a[0]);for(let f=1;f<=e;f++){if(a[f]=a[f-1].clone(),o[f]=o[f-1].clone(),l.crossVectors(s[f-1],s[f]),l.length()>Number.EPSILON){l.normalize();const m=Math.acos(Wi(s[f-1].dot(s[f]),-1,1));a[f].applyMatrix4(u.makeRotationAxis(l,m))}o[f].crossVectors(s[f],a[f])}if(i===!0){let f=Math.acos(Wi(a[0].dot(a[e]),-1,1));f/=e,s[0].dot(l.crossVectors(a[0],a[e]))>0&&(f=-f);for(let m=1;m<=e;m++)a[m].applyMatrix4(u.makeRotationAxis(s[m],f*m)),o[m].crossVectors(s[m],a[m])}return{tangents:s,normals:a,binormals:o}}clone(){return new this.constructor().copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){const e={metadata:{version:4.6,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}class _2 extends js{constructor(e=0,i=0,n=1,s=1,a=0,o=Math.PI*2,l=!1,u=0){super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=e,this.aY=i,this.xRadius=n,this.yRadius=s,this.aStartAngle=a,this.aEndAngle=o,this.aClockwise=l,this.aRotation=u}getPoint(e,i=new ke){const n=i,s=Math.PI*2;let a=this.aEndAngle-this.aStartAngle;const o=Math.abs(a)<Number.EPSILON;for(;a<0;)a+=s;for(;a>s;)a-=s;a<Number.EPSILON&&(o?a=0:a=s),this.aClockwise===!0&&!o&&(a===s?a=-s:a=a-s);const l=this.aStartAngle+e*a;let u=this.aX+this.xRadius*Math.cos(l),c=this.aY+this.yRadius*Math.sin(l);if(this.aRotation!==0){const h=Math.cos(this.aRotation),d=Math.sin(this.aRotation),p=u-this.aX,f=c-this.aY;u=p*h-f*d+this.aX,c=p*d+f*h+this.aY}return n.set(u,c)}copy(e){return super.copy(e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this}toJSON(){const e=super.toJSON();return e.aX=this.aX,e.aY=this.aY,e.xRadius=this.xRadius,e.yRadius=this.yRadius,e.aStartAngle=this.aStartAngle,e.aEndAngle=this.aEndAngle,e.aClockwise=this.aClockwise,e.aRotation=this.aRotation,e}fromJSON(e){return super.fromJSON(e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this}}class Ej extends _2{constructor(e,i,n,s,a,o){super(e,i,n,n,s,a,o),this.isArcCurve=!0,this.type="ArcCurve"}}function Nv(){let r=0,e=0,i=0,n=0;function s(a,o,l,u){r=a,e=l,i=-3*a+3*o-2*l-u,n=2*a-2*o+l+u}return{initCatmullRom:function(a,o,l,u,c){s(o,l,c*(l-a),c*(u-o))},initNonuniformCatmullRom:function(a,o,l,u,c,h,d){let p=(o-a)/c-(l-a)/(c+h)+(l-o)/h,f=(l-o)/h-(u-o)/(h+d)+(u-l)/d;p*=h,f*=h,s(o,l,p,f)},calc:function(a){const o=a*a,l=o*a;return r+e*a+i*o+n*l}}}const gf=new K,Pv=new Nv,Iv=new Nv,Ov=new Nv;class Mj extends js{constructor(e=[],i=!1,n="centripetal",s=.5){super(),this.isCatmullRomCurve3=!0,this.type="CatmullRomCurve3",this.points=e,this.closed=i,this.curveType=n,this.tension=s}getPoint(e,i=new K){const n=i,s=this.points,a=s.length,o=(a-(this.closed?0:1))*e;let l=Math.floor(o),u=o-l;this.closed?l+=l>0?0:(Math.floor(Math.abs(l)/a)+1)*a:u===0&&l===a-1&&(l=a-2,u=1);let c,h;this.closed||l>0?c=s[(l-1)%a]:(gf.subVectors(s[0],s[1]).add(s[0]),c=gf);const d=s[l%a],p=s[(l+1)%a];if(this.closed||l+2<a?h=s[(l+2)%a]:(gf.subVectors(s[a-1],s[a-2]).add(s[a-1]),h=gf),this.curveType==="centripetal"||this.curveType==="chordal"){const f=this.curveType==="chordal"?.5:.25;let m=Math.pow(c.distanceToSquared(d),f),y=Math.pow(d.distanceToSquared(p),f),v=Math.pow(p.distanceToSquared(h),f);y<1e-4&&(y=1),m<1e-4&&(m=y),v<1e-4&&(v=y),Pv.initNonuniformCatmullRom(c.x,d.x,p.x,h.x,m,y,v),Iv.initNonuniformCatmullRom(c.y,d.y,p.y,h.y,m,y,v),Ov.initNonuniformCatmullRom(c.z,d.z,p.z,h.z,m,y,v)}else this.curveType==="catmullrom"&&(Pv.initCatmullRom(c.x,d.x,p.x,h.x,this.tension),Iv.initCatmullRom(c.y,d.y,p.y,h.y,this.tension),Ov.initCatmullRom(c.z,d.z,p.z,h.z,this.tension));return n.set(Pv.calc(u),Iv.calc(u),Ov.calc(u)),n}copy(e){super.copy(e),this.points=[];for(let i=0,n=e.points.length;i<n;i++){const s=e.points[i];this.points.push(s.clone())}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}toJSON(){const e=super.toJSON();e.points=[];for(let i=0,n=this.points.length;i<n;i++){const s=this.points[i];e.points.push(s.toArray())}return e.closed=this.closed,e.curveType=this.curveType,e.tension=this.tension,e}fromJSON(e){super.fromJSON(e),this.points=[];for(let i=0,n=e.points.length;i<n;i++){const s=e.points[i];this.points.push(new K().fromArray(s))}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}}function T2(r,e,i,n,s){const a=(n-e)*.5,o=(s-i)*.5,l=r*r,u=r*l;return(2*i-2*n+a+o)*u+(-3*i+3*n-2*a-o)*l+a*r+i}function Aj(r,e){const i=1-r;return i*i*e}function Cj(r,e){return 2*(1-r)*r*e}function Rj(r,e){return r*r*e}function wh(r,e,i,n){return Aj(r,e)+Cj(r,i)+Rj(r,n)}function Nj(r,e){const i=1-r;return i*i*i*e}function Pj(r,e){const i=1-r;return 3*i*i*r*e}function Ij(r,e){return 3*(1-r)*r*r*e}function Oj(r,e){return r*r*r*e}function Sh(r,e,i,n,s){return Nj(r,e)+Pj(r,i)+Ij(r,n)+Oj(r,s)}class Dj extends js{constructor(e=new ke,i=new ke,n=new ke,s=new ke){super(),this.isCubicBezierCurve=!0,this.type="CubicBezierCurve",this.v0=e,this.v1=i,this.v2=n,this.v3=s}getPoint(e,i=new ke){const n=i,s=this.v0,a=this.v1,o=this.v2,l=this.v3;return n.set(Sh(e,s.x,a.x,o.x,l.x),Sh(e,s.y,a.y,o.y,l.y)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}}class w2 extends js{constructor(e=new K,i=new K,n=new K,s=new K){super(),this.isCubicBezierCurve3=!0,this.type="CubicBezierCurve3",this.v0=e,this.v1=i,this.v2=n,this.v3=s}getPoint(e,i=new K){const n=i,s=this.v0,a=this.v1,o=this.v2,l=this.v3;return n.set(Sh(e,s.x,a.x,o.x,l.x),Sh(e,s.y,a.y,o.y,l.y),Sh(e,s.z,a.z,o.z,l.z)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}}class Lj extends js{constructor(e=new ke,i=new ke){super(),this.isLineCurve=!0,this.type="LineCurve",this.v1=e,this.v2=i}getPoint(e,i=new ke){const n=i;return e===1?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(e).add(this.v1)),n}getPointAt(e,i){return this.getPoint(e,i)}getTangent(e,i=new ke){return i.subVectors(this.v2,this.v1).normalize()}getTangentAt(e,i){return this.getTangent(e,i)}copy(e){return super.copy(e),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class kj extends js{constructor(e=new K,i=new K){super(),this.isLineCurve3=!0,this.type="LineCurve3",this.v1=e,this.v2=i}getPoint(e,i=new K){const n=i;return e===1?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(e).add(this.v1)),n}getPointAt(e,i){return this.getPoint(e,i)}getTangent(e,i=new K){return i.subVectors(this.v2,this.v1).normalize()}getTangentAt(e,i){return this.getTangent(e,i)}copy(e){return super.copy(e),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class Uj extends js{constructor(e=new ke,i=new ke,n=new ke){super(),this.isQuadraticBezierCurve=!0,this.type="QuadraticBezierCurve",this.v0=e,this.v1=i,this.v2=n}getPoint(e,i=new ke){const n=i,s=this.v0,a=this.v1,o=this.v2;return n.set(wh(e,s.x,a.x,o.x),wh(e,s.y,a.y,o.y)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class Dv extends js{constructor(e=new K,i=new K,n=new K){super(),this.isQuadraticBezierCurve3=!0,this.type="QuadraticBezierCurve3",this.v0=e,this.v1=i,this.v2=n}getPoint(e,i=new K){const n=i,s=this.v0,a=this.v1,o=this.v2;return n.set(wh(e,s.x,a.x,o.x),wh(e,s.y,a.y,o.y),wh(e,s.z,a.z,o.z)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class Fj extends js{constructor(e=[]){super(),this.isSplineCurve=!0,this.type="SplineCurve",this.points=e}getPoint(e,i=new ke){const n=i,s=this.points,a=(s.length-1)*e,o=Math.floor(a),l=a-o,u=s[o===0?o:o-1],c=s[o],h=s[o>s.length-2?s.length-1:o+1],d=s[o>s.length-3?s.length-1:o+2];return n.set(T2(l,u.x,c.x,h.x,d.x),T2(l,u.y,c.y,h.y,d.y)),n}copy(e){super.copy(e),this.points=[];for(let i=0,n=e.points.length;i<n;i++){const s=e.points[i];this.points.push(s.clone())}return this}toJSON(){const e=super.toJSON();e.points=[];for(let i=0,n=this.points.length;i<n;i++){const s=this.points[i];e.points.push(s.toArray())}return e}fromJSON(e){super.fromJSON(e),this.points=[];for(let i=0,n=e.points.length;i<n;i++){const s=e.points[i];this.points.push(new ke().fromArray(s))}return this}}var Bj=Object.freeze({__proto__:null,ArcCurve:Ej,CatmullRomCurve3:Mj,CubicBezierCurve:Dj,CubicBezierCurve3:w2,EllipseCurve:_2,LineCurve:Lj,LineCurve3:kj,QuadraticBezierCurve:Uj,QuadraticBezierCurve3:Dv,SplineCurve:Fj});class Lv extends Kr{constructor(e=1,i=32,n=0,s=Math.PI*2){super(),this.type="CircleGeometry",this.parameters={radius:e,segments:i,thetaStart:n,thetaLength:s},i=Math.max(3,i);const a=[],o=[],l=[],u=[],c=new K,h=new ke;o.push(0,0,0),l.push(0,0,1),u.push(.5,.5);for(let d=0,p=3;d<=i;d++,p+=3){const f=n+d/i*s;c.x=e*Math.cos(f),c.y=e*Math.sin(f),o.push(c.x,c.y,c.z),l.push(0,0,1),h.x=(o[p]/e+1)/2,h.y=(o[p+1]/e+1)/2,u.push(h.x,h.y)}for(let d=1;d<=i;d++)a.push(d,d+1,0);this.setIndex(a),this.setAttribute("position",new xi(o,3)),this.setAttribute("normal",new xi(l,3)),this.setAttribute("uv",new xi(u,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new Lv(e.radius,e.segments,e.thetaStart,e.thetaLength)}}class yf extends Kr{constructor(e=1,i=1,n=1,s=32,a=1,o=!1,l=0,u=Math.PI*2){super(),this.type="CylinderGeometry",this.parameters={radiusTop:e,radiusBottom:i,height:n,radialSegments:s,heightSegments:a,openEnded:o,thetaStart:l,thetaLength:u};const c=this;s=Math.floor(s),a=Math.floor(a);const h=[],d=[],p=[],f=[];let m=0;const y=[],v=n/2;let g=0;_(),o===!1&&(e>0&&x(!0),i>0&&x(!1)),this.setIndex(h),this.setAttribute("position",new xi(d,3)),this.setAttribute("normal",new xi(p,3)),this.setAttribute("uv",new xi(f,2));function _(){const b=new K,T=new K;let E=0;const M=(i-e)/n;for(let C=0;C<=a;C++){const S=[],w=C/a,R=w*(i-e)+e;for(let O=0;O<=s;O++){const P=O/s,A=P*u+l,D=Math.sin(A),L=Math.cos(A);T.x=R*D,T.y=-w*n+v,T.z=R*L,d.push(T.x,T.y,T.z),b.set(D,M,L).normalize(),p.push(b.x,b.y,b.z),f.push(P,1-w),S.push(m++)}y.push(S)}for(let C=0;C<s;C++)for(let S=0;S<a;S++){const w=y[S][C],R=y[S+1][C],O=y[S+1][C+1],P=y[S][C+1];(e>0||S!==0)&&(h.push(w,R,P),E+=3),(i>0||S!==a-1)&&(h.push(R,O,P),E+=3)}c.addGroup(g,E,0),g+=E}function x(b){const T=m,E=new ke,M=new K;let C=0;const S=b===!0?e:i,w=b===!0?1:-1;for(let O=1;O<=s;O++)d.push(0,v*w,0),p.push(0,w,0),f.push(.5,.5),m++;const R=m;for(let O=0;O<=s;O++){const P=O/s*u+l,A=Math.cos(P),D=Math.sin(P);M.x=S*D,M.y=v*w,M.z=S*A,d.push(M.x,M.y,M.z),p.push(0,w,0),E.x=A*.5+.5,E.y=D*.5*w+.5,f.push(E.x,E.y),m++}for(let O=0;O<s;O++){const P=T+O,A=R+O;b===!0?h.push(A,A+1,P):h.push(A+1,A,P),C+=3}c.addGroup(g,C,b===!0?1:2),g+=C}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new yf(e.radiusTop,e.radiusBottom,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}class kv extends yf{constructor(e=1,i=1,n=32,s=1,a=!1,o=0,l=Math.PI*2){super(0,e,i,n,s,a,o,l),this.type="ConeGeometry",this.parameters={radius:e,height:i,radialSegments:n,heightSegments:s,openEnded:a,thetaStart:o,thetaLength:l}}static fromJSON(e){return new kv(e.radius,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}let S2=class IO extends Kr{constructor(e=1,i=32,n=16,s=0,a=Math.PI*2,o=0,l=Math.PI){super(),this.type="SphereGeometry",this.parameters={radius:e,widthSegments:i,heightSegments:n,phiStart:s,phiLength:a,thetaStart:o,thetaLength:l},i=Math.max(3,Math.floor(i)),n=Math.max(2,Math.floor(n));const u=Math.min(o+l,Math.PI);let c=0;const h=[],d=new K,p=new K,f=[],m=[],y=[],v=[];for(let g=0;g<=n;g++){const _=[],x=g/n;let b=0;g===0&&o===0?b=.5/i:g===n&&u===Math.PI&&(b=-.5/i);for(let T=0;T<=i;T++){const E=T/i;d.x=-e*Math.cos(s+E*a)*Math.sin(o+x*l),d.y=e*Math.cos(o+x*l),d.z=e*Math.sin(s+E*a)*Math.sin(o+x*l),m.push(d.x,d.y,d.z),p.copy(d).normalize(),y.push(p.x,p.y,p.z),v.push(E+b,1-x),_.push(c++)}h.push(_)}for(let g=0;g<n;g++)for(let _=0;_<i;_++){const x=h[g][_+1],b=h[g][_],T=h[g+1][_],E=h[g+1][_+1];(g!==0||o>0)&&f.push(x,b,E),(g!==n-1||u<Math.PI)&&f.push(b,T,E)}this.setIndex(f),this.setAttribute("position",new xi(m,3)),this.setAttribute("normal",new xi(y,3)),this.setAttribute("uv",new xi(v,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new IO(e.radius,e.widthSegments,e.heightSegments,e.phiStart,e.phiLength,e.thetaStart,e.thetaLength)}};class Uv extends Kr{constructor(e=new Dv(new K(-1,-1,0),new K(-1,1,0),new K(1,1,0)),i=64,n=1,s=8,a=!1){super(),this.type="TubeGeometry",this.parameters={path:e,tubularSegments:i,radius:n,radialSegments:s,closed:a};const o=e.computeFrenetFrames(i,a);this.tangents=o.tangents,this.normals=o.normals,this.binormals=o.binormals;const l=new K,u=new K,c=new ke;let h=new K;const d=[],p=[],f=[],m=[];y(),this.setIndex(m),this.setAttribute("position",new xi(d,3)),this.setAttribute("normal",new xi(p,3)),this.setAttribute("uv",new xi(f,2));function y(){for(let x=0;x<i;x++)v(x);v(a===!1?i:0),_(),g()}function v(x){h=e.getPointAt(x/i,h);const b=o.normals[x],T=o.binormals[x];for(let E=0;E<=s;E++){const M=E/s*Math.PI*2,C=Math.sin(M),S=-Math.cos(M);u.x=S*b.x+C*T.x,u.y=S*b.y+C*T.y,u.z=S*b.z+C*T.z,u.normalize(),p.push(u.x,u.y,u.z),l.x=h.x+n*u.x,l.y=h.y+n*u.y,l.z=h.z+n*u.z,d.push(l.x,l.y,l.z)}}function g(){for(let x=1;x<=i;x++)for(let b=1;b<=s;b++){const T=(s+1)*(x-1)+(b-1),E=(s+1)*x+(b-1),M=(s+1)*x+b,C=(s+1)*(x-1)+b;m.push(T,E,C),m.push(E,M,C)}}function _(){for(let x=0;x<=i;x++)for(let b=0;b<=s;b++)c.x=x/i,c.y=b/s,f.push(c.x,c.y)}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}toJSON(){const e=super.toJSON();return e.path=this.parameters.path.toJSON(),e}static fromJSON(e){return new Uv(new Bj[e.path.type]().fromJSON(e.path),e.tubularSegments,e.radius,e.radialSegments,e.closed)}}let zj=class extends Uo{static get type(){return"MeshLambertMaterial"}constructor(r){super(),this.isMeshLambertMaterial=!0,this.color=new Ut(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Ut(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=iE,this.normalScale=new ke(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new Oa,this.combine=l0,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(r)}copy(r){return super.copy(r),this.color.copy(r.color),this.map=r.map,this.lightMap=r.lightMap,this.lightMapIntensity=r.lightMapIntensity,this.aoMap=r.aoMap,this.aoMapIntensity=r.aoMapIntensity,this.emissive.copy(r.emissive),this.emissiveMap=r.emissiveMap,this.emissiveIntensity=r.emissiveIntensity,this.bumpMap=r.bumpMap,this.bumpScale=r.bumpScale,this.normalMap=r.normalMap,this.normalMapType=r.normalMapType,this.normalScale.copy(r.normalScale),this.displacementMap=r.displacementMap,this.displacementScale=r.displacementScale,this.displacementBias=r.displacementBias,this.specularMap=r.specularMap,this.alphaMap=r.alphaMap,this.envMap=r.envMap,this.envMapRotation.copy(r.envMapRotation),this.combine=r.combine,this.reflectivity=r.reflectivity,this.refractionRatio=r.refractionRatio,this.wireframe=r.wireframe,this.wireframeLinewidth=r.wireframeLinewidth,this.wireframeLinecap=r.wireframeLinecap,this.wireframeLinejoin=r.wireframeLinejoin,this.flatShading=r.flatShading,this.fog=r.fog,this}};const E2={enabled:!1,files:{},add:function(r,e){this.enabled!==!1&&(this.files[r]=e)},get:function(r){if(this.enabled!==!1)return this.files[r]},remove:function(r){delete this.files[r]},clear:function(){this.files={}}};class jj{constructor(e,i,n){const s=this;let a=!1,o=0,l=0,u;const c=[];this.onStart=void 0,this.onLoad=e,this.onProgress=i,this.onError=n,this.itemStart=function(h){l++,a===!1&&s.onStart!==void 0&&s.onStart(h,o,l),a=!0},this.itemEnd=function(h){o++,s.onProgress!==void 0&&s.onProgress(h,o,l),o===l&&(a=!1,s.onLoad!==void 0&&s.onLoad())},this.itemError=function(h){s.onError!==void 0&&s.onError(h)},this.resolveURL=function(h){return u?u(h):h},this.setURLModifier=function(h){return u=h,this},this.addHandler=function(h,d){return c.push(h,d),this},this.removeHandler=function(h){const d=c.indexOf(h);return d!==-1&&c.splice(d,2),this},this.getHandler=function(h){for(let d=0,p=c.length;d<p;d+=2){const f=c[d],m=c[d+1];if(f.global&&(f.lastIndex=0),f.test(h))return m}return null}}}const Vj=new jj;class Fv{constructor(e){this.manager=e!==void 0?e:Vj,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={}}load(){}loadAsync(e,i){const n=this;return new Promise(function(s,a){n.load(e,s,i,a)})}parse(){}setCrossOrigin(e){return this.crossOrigin=e,this}setWithCredentials(e){return this.withCredentials=e,this}setPath(e){return this.path=e,this}setResourcePath(e){return this.resourcePath=e,this}setRequestHeader(e){return this.requestHeader=e,this}}Fv.DEFAULT_MATERIAL_NAME="__DEFAULT";class Gj extends Fv{constructor(e){super(e)}load(e,i,n,s){this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const a=this,o=E2.get(e);if(o!==void 0)return a.manager.itemStart(e),setTimeout(function(){i&&i(o),a.manager.itemEnd(e)},0),o;const l=hh("img");function u(){h(),E2.add(e,this),i&&i(this),a.manager.itemEnd(e)}function c(d){h(),s&&s(d),a.manager.itemError(e),a.manager.itemEnd(e)}function h(){l.removeEventListener("load",u,!1),l.removeEventListener("error",c,!1)}return l.addEventListener("load",u,!1),l.addEventListener("error",c,!1),e.slice(0,5)!=="data:"&&this.crossOrigin!==void 0&&(l.crossOrigin=this.crossOrigin),a.manager.itemStart(e),l.src=e,l}}class Hj extends Fv{constructor(e){super(e)}load(e,i,n,s){const a=new hn,o=new Gj(this.manager);return o.setCrossOrigin(this.crossOrigin),o.setPath(this.path),o.load(e,function(l){a.image=l,a.needsUpdate=!0,i!==void 0&&i(a)},n,s),a}}let M2=class extends Or{constructor(r,e=1){super(),this.isLight=!0,this.type="Light",this.color=new Ut(r),this.intensity=e}dispose(){}copy(r,e){return super.copy(r,e),this.color.copy(r.color),this.intensity=r.intensity,this}toJSON(r){const e=super.toJSON(r);return e.object.color=this.color.getHex(),e.object.intensity=this.intensity,this.groundColor!==void 0&&(e.object.groundColor=this.groundColor.getHex()),this.distance!==void 0&&(e.object.distance=this.distance),this.angle!==void 0&&(e.object.angle=this.angle),this.decay!==void 0&&(e.object.decay=this.decay),this.penumbra!==void 0&&(e.object.penumbra=this.penumbra),this.shadow!==void 0&&(e.object.shadow=this.shadow.toJSON()),this.target!==void 0&&(e.object.target=this.target.uuid),e}};const Bv=new si,A2=new K,C2=new K;let Wj=class{constructor(r){this.camera=r,this.intensity=1,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new ke(512,512),this.map=null,this.mapPass=null,this.matrix=new si,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new yv,this._frameExtents=new ke(1,1),this._viewportCount=1,this._viewports=[new Ni(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(r){const e=this.camera,i=this.matrix;A2.setFromMatrixPosition(r.matrixWorld),e.position.copy(A2),C2.setFromMatrixPosition(r.target.matrixWorld),e.lookAt(C2),e.updateMatrixWorld(),Bv.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),this._frustum.setFromProjectionMatrix(Bv),i.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),i.multiply(Bv)}getViewport(r){return this._viewports[r]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(r){return this.camera=r.camera.clone(),this.intensity=r.intensity,this.bias=r.bias,this.radius=r.radius,this.mapSize.copy(r.mapSize),this}clone(){return new this.constructor().copy(this)}toJSON(){const r={};return this.intensity!==1&&(r.intensity=this.intensity),this.bias!==0&&(r.bias=this.bias),this.normalBias!==0&&(r.normalBias=this.normalBias),this.radius!==1&&(r.radius=this.radius),(this.mapSize.x!==512||this.mapSize.y!==512)&&(r.mapSize=this.mapSize.toArray()),r.camera=this.camera.toJSON(!1).object,delete r.camera.matrix,r}},qj=class extends Wj{constructor(){super(new vv(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}},Xj=class extends M2{constructor(r,e){super(r,e),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(Or.DEFAULT_UP),this.updateMatrix(),this.target=new Or,this.shadow=new qj}dispose(){this.shadow.dispose()}copy(r){return super.copy(r),this.target=r.target.clone(),this.shadow=r.shadow.clone(),this}},Yj=class extends M2{constructor(r,e){super(r,e),this.isAmbientLight=!0,this.type="AmbientLight"}};class R2{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=N2(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let e=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const i=N2();e=(i-this.oldTime)/1e3,this.oldTime=i,this.elapsedTime+=e}return e}}function N2(){return performance.now()}const P2=new si;class I2{constructor(e,i,n=0,s=1/0){this.ray=new Gp(e,i),this.near=n,this.far=s,this.camera=null,this.layers=new rv,this.params={Mesh:{},Line:{threshold:1},LOD:{},Points:{threshold:1},Sprite:{}}}set(e,i){this.ray.set(e,i)}setFromCamera(e,i){i.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(i.matrixWorld),this.ray.direction.set(e.x,e.y,.5).unproject(i).sub(this.ray.origin).normalize(),this.camera=i):i.isOrthographicCamera?(this.ray.origin.set(e.x,e.y,(i.near+i.far)/(i.near-i.far)).unproject(i),this.ray.direction.set(0,0,-1).transformDirection(i.matrixWorld),this.camera=i):console.error("THREE.Raycaster: Unsupported camera type: "+i.type)}setFromXRController(e){return P2.identity().extractRotation(e.matrixWorld),this.ray.origin.setFromMatrixPosition(e.matrixWorld),this.ray.direction.set(0,0,-1).applyMatrix4(P2),this}intersectObject(e,i=!0,n=[]){return zv(e,this,n,i),n.sort(O2),n}intersectObjects(e,i=!0,n=[]){for(let s=0,a=e.length;s<a;s++)zv(e[s],this,n,i);return n.sort(O2),n}}function O2(r,e){return r.distance-e.distance}function zv(r,e,i,n){let s=!0;if(r.layers.test(e.layers)&&r.raycast(e,i)===!1&&(s=!1),s===!0&&n===!0){const a=r.children;for(let o=0,l=a.length;o<l;o++)zv(a[o],e,i,!0)}}class D2{constructor(e=1,i=0,n=0){return this.radius=e,this.phi=i,this.theta=n,this}set(e,i,n){return this.radius=e,this.phi=i,this.theta=n,this}copy(e){return this.radius=e.radius,this.phi=e.phi,this.theta=e.theta,this}makeSafe(){return this.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this.phi)),this}setFromVector3(e){return this.setFromCartesianCoords(e.x,e.y,e.z)}setFromCartesianCoords(e,i,n){return this.radius=Math.sqrt(e*e+i*i+n*n),this.radius===0?(this.theta=0,this.phi=0):(this.theta=Math.atan2(e,n),this.phi=Math.acos(Wi(i/this.radius,-1,1))),this}clone(){return new this.constructor().copy(this)}}class vf extends Oo{constructor(e,i=null){super(),this.object=e,this.domElement=i,this.enabled=!0,this.state=-1,this.keys={},this.mouseButtons={LEFT:null,MIDDLE:null,RIGHT:null},this.touches={ONE:null,TWO:null}}connect(){}disconnect(){}dispose(){}update(){}}typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:Ap}})),typeof window<"u"&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=Ap);function L2(r,e,i){var n,s=1;r==null&&(r=0),e==null&&(e=0),i==null&&(i=0);function a(){var o,l=n.length,u,c=0,h=0,d=0;for(o=0;o<l;++o)u=n[o],c+=u.x||0,h+=u.y||0,d+=u.z||0;for(c=(c/l-r)*s,h=(h/l-e)*s,d=(d/l-i)*s,o=0;o<l;++o)u=n[o],c&&(u.x-=c),h&&(u.y-=h),d&&(u.z-=d)}return a.initialize=function(o){n=o},a.x=function(o){return arguments.length?(r=+o,a):r},a.y=function(o){return arguments.length?(e=+o,a):e},a.z=function(o){return arguments.length?(i=+o,a):i},a.strength=function(o){return arguments.length?(s=+o,a):s},a}function Kj(r){const e=+this._x.call(null,r);return k2(this.cover(e),e,r)}function k2(r,e,i){if(isNaN(e))return r;var n,s=r._root,a={data:i},o=r._x0,l=r._x1,u,c,h,d,p;if(!s)return r._root=a,r;for(;s.length;)if((h=e>=(u=(o+l)/2))?o=u:l=u,n=s,!(s=s[d=+h]))return n[d]=a,r;if(c=+r._x.call(null,s.data),e===c)return a.next=s,n?n[d]=a:r._root=a,r;do n=n?n[d]=new Array(2):r._root=new Array(2),(h=e>=(u=(o+l)/2))?o=u:l=u;while((d=+h)==(p=+(c>=u)));return n[p]=s,n[d]=a,r}function Zj(r){Array.isArray(r)||(r=Array.from(r));const e=r.length,i=new Float64Array(e);let n=1/0,s=-1/0;for(let a=0,o;a<e;++a)isNaN(o=+this._x.call(null,r[a]))||(i[a]=o,o<n&&(n=o),o>s&&(s=o));if(n>s)return this;this.cover(n).cover(s);for(let a=0;a<e;++a)k2(this,i[a],r[a]);return this}function Qj(r){if(isNaN(r=+r))return this;var e=this._x0,i=this._x1;if(isNaN(e))i=(e=Math.floor(r))+1;else{for(var n=i-e||1,s=this._root,a,o;e>r||r>=i;)switch(o=+(r<e),a=new Array(2),a[o]=s,s=a,n*=2,o){case 0:i=e+n;break;case 1:e=i-n;break}this._root&&this._root.length&&(this._root=s)}return this._x0=e,this._x1=i,this}function $j(){var r=[];return this.visit(function(e){if(!e.length)do r.push(e.data);while(e=e.next)}),r}function Jj(r){return arguments.length?this.cover(+r[0][0]).cover(+r[1][0]):isNaN(this._x0)?void 0:[[this._x0],[this._x1]]}function Vs(r,e,i){this.node=r,this.x0=e,this.x1=i}function e8(r,e){var i,n=this._x0,s,a,o=this._x1,l=[],u=this._root,c,h;for(u&&l.push(new Vs(u,n,o)),e==null?e=1/0:(n=r-e,o=r+e);c=l.pop();)if(!(!(u=c.node)||(s=c.x0)>o||(a=c.x1)<n))if(u.length){var d=(s+a)/2;l.push(new Vs(u[1],d,a),new Vs(u[0],s,d)),(h=+(r>=d))&&(c=l[l.length-1],l[l.length-1]=l[l.length-1-h],l[l.length-1-h]=c)}else{var p=Math.abs(r-+this._x.call(null,u.data));p<e&&(e=p,n=r-p,o=r+p,i=u.data)}return i}function t8(r){if(isNaN(u=+this._x.call(null,r)))return this;var e,i=this._root,n,s,a,o=this._x0,l=this._x1,u,c,h,d,p;if(!i)return this;if(i.length)for(;;){if((h=u>=(c=(o+l)/2))?o=c:l=c,e=i,!(i=i[d=+h]))return this;if(!i.length)break;e[d+1&1]&&(n=e,p=d)}for(;i.data!==r;)if(s=i,!(i=i.next))return this;return(a=i.next)&&delete i.next,s?(a?s.next=a:delete s.next,this):e?(a?e[d]=a:delete e[d],(i=e[0]||e[1])&&i===(e[1]||e[0])&&!i.length&&(n?n[p]=i:this._root=i),this):(this._root=a,this)}function i8(r){for(var e=0,i=r.length;e<i;++e)this.remove(r[e]);return this}function r8(){return this._root}function n8(){var r=0;return this.visit(function(e){if(!e.length)do++r;while(e=e.next)}),r}function s8(r){var e=[],i,n=this._root,s,a,o;for(n&&e.push(new Vs(n,this._x0,this._x1));i=e.pop();)if(!r(n=i.node,a=i.x0,o=i.x1)&&n.length){var l=(a+o)/2;(s=n[1])&&e.push(new Vs(s,l,o)),(s=n[0])&&e.push(new Vs(s,a,l))}return this}function a8(r){var e=[],i=[],n;for(this._root&&e.push(new Vs(this._root,this._x0,this._x1));n=e.pop();){var s=n.node;if(s.length){var a,o=n.x0,l=n.x1,u=(o+l)/2;(a=s[0])&&e.push(new Vs(a,o,u)),(a=s[1])&&e.push(new Vs(a,u,l))}i.push(n)}for(;n=i.pop();)r(n.node,n.x0,n.x1);return this}function o8(r){return r[0]}function l8(r){return arguments.length?(this._x=r,this):this._x}function U2(r,e){var i=new jv(e??o8,NaN,NaN);return r==null?i:i.addAll(r)}function jv(r,e,i){this._x=r,this._x0=e,this._x1=i,this._root=void 0}function F2(r){for(var e={data:r.data},i=e;r=r.next;)i=i.next={data:r.data};return e}var Lr=U2.prototype=jv.prototype;Lr.copy=function(){var r=new jv(this._x,this._x0,this._x1),e=this._root,i,n;if(!e)return r;if(!e.length)return r._root=F2(e),r;for(i=[{source:e,target:r._root=new Array(2)}];e=i.pop();)for(var s=0;s<2;++s)(n=e.source[s])&&(n.length?i.push({source:n,target:e.target[s]=new Array(2)}):e.target[s]=F2(n));return r},Lr.add=Kj,Lr.addAll=Zj,Lr.cover=Qj,Lr.data=$j,Lr.extent=Jj,Lr.find=e8,Lr.remove=t8,Lr.removeAll=i8,Lr.root=r8,Lr.size=n8,Lr.visit=s8,Lr.visitAfter=a8,Lr.x=l8;function u8(r){const e=+this._x.call(null,r),i=+this._y.call(null,r);return B2(this.cover(e,i),e,i,r)}function B2(r,e,i,n){if(isNaN(e)||isNaN(i))return r;var s,a=r._root,o={data:n},l=r._x0,u=r._y0,c=r._x1,h=r._y1,d,p,f,m,y,v,g,_;if(!a)return r._root=o,r;for(;a.length;)if((y=e>=(d=(l+c)/2))?l=d:c=d,(v=i>=(p=(u+h)/2))?u=p:h=p,s=a,!(a=a[g=v<<1|y]))return s[g]=o,r;if(f=+r._x.call(null,a.data),m=+r._y.call(null,a.data),e===f&&i===m)return o.next=a,s?s[g]=o:r._root=o,r;do s=s?s[g]=new Array(4):r._root=new Array(4),(y=e>=(d=(l+c)/2))?l=d:c=d,(v=i>=(p=(u+h)/2))?u=p:h=p;while((g=v<<1|y)===(_=(m>=p)<<1|f>=d));return s[_]=a,s[g]=o,r}function c8(r){var e,i,n=r.length,s,a,o=new Array(n),l=new Array(n),u=1/0,c=1/0,h=-1/0,d=-1/0;for(i=0;i<n;++i)isNaN(s=+this._x.call(null,e=r[i]))||isNaN(a=+this._y.call(null,e))||(o[i]=s,l[i]=a,s<u&&(u=s),s>h&&(h=s),a<c&&(c=a),a>d&&(d=a));if(u>h||c>d)return this;for(this.cover(u,c).cover(h,d),i=0;i<n;++i)B2(this,o[i],l[i],r[i]);return this}function h8(r,e){if(isNaN(r=+r)||isNaN(e=+e))return this;var i=this._x0,n=this._y0,s=this._x1,a=this._y1;if(isNaN(i))s=(i=Math.floor(r))+1,a=(n=Math.floor(e))+1;else{for(var o=s-i||1,l=this._root,u,c;i>r||r>=s||n>e||e>=a;)switch(c=(e<n)<<1|r<i,u=new Array(4),u[c]=l,l=u,o*=2,c){case 0:s=i+o,a=n+o;break;case 1:i=s-o,a=n+o;break;case 2:s=i+o,n=a-o;break;case 3:i=s-o,n=a-o;break}this._root&&this._root.length&&(this._root=l)}return this._x0=i,this._y0=n,this._x1=s,this._y1=a,this}function d8(){var r=[];return this.visit(function(e){if(!e.length)do r.push(e.data);while(e=e.next)}),r}function p8(r){return arguments.length?this.cover(+r[0][0],+r[0][1]).cover(+r[1][0],+r[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function br(r,e,i,n,s){this.node=r,this.x0=e,this.y0=i,this.x1=n,this.y1=s}function f8(r,e,i){var n,s=this._x0,a=this._y0,o,l,u,c,h=this._x1,d=this._y1,p=[],f=this._root,m,y;for(f&&p.push(new br(f,s,a,h,d)),i==null?i=1/0:(s=r-i,a=e-i,h=r+i,d=e+i,i*=i);m=p.pop();)if(!(!(f=m.node)||(o=m.x0)>h||(l=m.y0)>d||(u=m.x1)<s||(c=m.y1)<a))if(f.length){var v=(o+u)/2,g=(l+c)/2;p.push(new br(f[3],v,g,u,c),new br(f[2],o,g,v,c),new br(f[1],v,l,u,g),new br(f[0],o,l,v,g)),(y=(e>=g)<<1|r>=v)&&(m=p[p.length-1],p[p.length-1]=p[p.length-1-y],p[p.length-1-y]=m)}else{var _=r-+this._x.call(null,f.data),x=e-+this._y.call(null,f.data),b=_*_+x*x;if(b<i){var T=Math.sqrt(i=b);s=r-T,a=e-T,h=r+T,d=e+T,n=f.data}}return n}function m8(r){if(isNaN(h=+this._x.call(null,r))||isNaN(d=+this._y.call(null,r)))return this;var e,i=this._root,n,s,a,o=this._x0,l=this._y0,u=this._x1,c=this._y1,h,d,p,f,m,y,v,g;if(!i)return this;if(i.length)for(;;){if((m=h>=(p=(o+u)/2))?o=p:u=p,(y=d>=(f=(l+c)/2))?l=f:c=f,e=i,!(i=i[v=y<<1|m]))return this;if(!i.length)break;(e[v+1&3]||e[v+2&3]||e[v+3&3])&&(n=e,g=v)}for(;i.data!==r;)if(s=i,!(i=i.next))return this;return(a=i.next)&&delete i.next,s?(a?s.next=a:delete s.next,this):e?(a?e[v]=a:delete e[v],(i=e[0]||e[1]||e[2]||e[3])&&i===(e[3]||e[2]||e[1]||e[0])&&!i.length&&(n?n[g]=i:this._root=i),this):(this._root=a,this)}function g8(r){for(var e=0,i=r.length;e<i;++e)this.remove(r[e]);return this}function y8(){return this._root}function v8(){var r=0;return this.visit(function(e){if(!e.length)do++r;while(e=e.next)}),r}function b8(r){var e=[],i,n=this._root,s,a,o,l,u;for(n&&e.push(new br(n,this._x0,this._y0,this._x1,this._y1));i=e.pop();)if(!r(n=i.node,a=i.x0,o=i.y0,l=i.x1,u=i.y1)&&n.length){var c=(a+l)/2,h=(o+u)/2;(s=n[3])&&e.push(new br(s,c,h,l,u)),(s=n[2])&&e.push(new br(s,a,h,c,u)),(s=n[1])&&e.push(new br(s,c,o,l,h)),(s=n[0])&&e.push(new br(s,a,o,c,h))}return this}function x8(r){var e=[],i=[],n;for(this._root&&e.push(new br(this._root,this._x0,this._y0,this._x1,this._y1));n=e.pop();){var s=n.node;if(s.length){var a,o=n.x0,l=n.y0,u=n.x1,c=n.y1,h=(o+u)/2,d=(l+c)/2;(a=s[0])&&e.push(new br(a,o,l,h,d)),(a=s[1])&&e.push(new br(a,h,l,u,d)),(a=s[2])&&e.push(new br(a,o,d,h,c)),(a=s[3])&&e.push(new br(a,h,d,u,c))}i.push(n)}for(;n=i.pop();)r(n.node,n.x0,n.y0,n.x1,n.y1);return this}function _8(r){return r[0]}function T8(r){return arguments.length?(this._x=r,this):this._x}function w8(r){return r[1]}function S8(r){return arguments.length?(this._y=r,this):this._y}function z2(r,e,i){var n=new Vv(e??_8,i??w8,NaN,NaN,NaN,NaN);return r==null?n:n.addAll(r)}function Vv(r,e,i,n,s,a){this._x=r,this._y=e,this._x0=i,this._y0=n,this._x1=s,this._y1=a,this._root=void 0}function j2(r){for(var e={data:r.data},i=e;r=r.next;)i=i.next={data:r.data};return e}var xr=z2.prototype=Vv.prototype;xr.copy=function(){var r=new Vv(this._x,this._y,this._x0,this._y0,this._x1,this._y1),e=this._root,i,n;if(!e)return r;if(!e.length)return r._root=j2(e),r;for(i=[{source:e,target:r._root=new Array(4)}];e=i.pop();)for(var s=0;s<4;++s)(n=e.source[s])&&(n.length?i.push({source:n,target:e.target[s]=new Array(4)}):e.target[s]=j2(n));return r},xr.add=u8,xr.addAll=c8,xr.cover=h8,xr.data=d8,xr.extent=p8,xr.find=f8,xr.remove=m8,xr.removeAll=g8,xr.root=y8,xr.size=v8,xr.visit=b8,xr.visitAfter=x8,xr.x=T8,xr.y=S8;function E8(r){const e=+this._x.call(null,r),i=+this._y.call(null,r),n=+this._z.call(null,r);return V2(this.cover(e,i,n),e,i,n,r)}function V2(r,e,i,n,s){if(isNaN(e)||isNaN(i)||isNaN(n))return r;var a,o=r._root,l={data:s},u=r._x0,c=r._y0,h=r._z0,d=r._x1,p=r._y1,f=r._z1,m,y,v,g,_,x,b,T,E,M,C;if(!o)return r._root=l,r;for(;o.length;)if((b=e>=(m=(u+d)/2))?u=m:d=m,(T=i>=(y=(c+p)/2))?c=y:p=y,(E=n>=(v=(h+f)/2))?h=v:f=v,a=o,!(o=o[M=E<<2|T<<1|b]))return a[M]=l,r;if(g=+r._x.call(null,o.data),_=+r._y.call(null,o.data),x=+r._z.call(null,o.data),e===g&&i===_&&n===x)return l.next=o,a?a[M]=l:r._root=l,r;do a=a?a[M]=new Array(8):r._root=new Array(8),(b=e>=(m=(u+d)/2))?u=m:d=m,(T=i>=(y=(c+p)/2))?c=y:p=y,(E=n>=(v=(h+f)/2))?h=v:f=v;while((M=E<<2|T<<1|b)===(C=(x>=v)<<2|(_>=y)<<1|g>=m));return a[C]=o,a[M]=l,r}function M8(r){Array.isArray(r)||(r=Array.from(r));const e=r.length,i=new Float64Array(e),n=new Float64Array(e),s=new Float64Array(e);let a=1/0,o=1/0,l=1/0,u=-1/0,c=-1/0,h=-1/0;for(let d=0,p,f,m,y;d<e;++d)isNaN(f=+this._x.call(null,p=r[d]))||isNaN(m=+this._y.call(null,p))||isNaN(y=+this._z.call(null,p))||(i[d]=f,n[d]=m,s[d]=y,f<a&&(a=f),f>u&&(u=f),m<o&&(o=m),m>c&&(c=m),y<l&&(l=y),y>h&&(h=y));if(a>u||o>c||l>h)return this;this.cover(a,o,l).cover(u,c,h);for(let d=0;d<e;++d)V2(this,i[d],n[d],s[d],r[d]);return this}function A8(r,e,i){if(isNaN(r=+r)||isNaN(e=+e)||isNaN(i=+i))return this;var n=this._x0,s=this._y0,a=this._z0,o=this._x1,l=this._y1,u=this._z1;if(isNaN(n))o=(n=Math.floor(r))+1,l=(s=Math.floor(e))+1,u=(a=Math.floor(i))+1;else{for(var c=o-n||1,h=this._root,d,p;n>r||r>=o||s>e||e>=l||a>i||i>=u;)switch(p=(i<a)<<2|(e<s)<<1|r<n,d=new Array(8),d[p]=h,h=d,c*=2,p){case 0:o=n+c,l=s+c,u=a+c;break;case 1:n=o-c,l=s+c,u=a+c;break;case 2:o=n+c,s=l-c,u=a+c;break;case 3:n=o-c,s=l-c,u=a+c;break;case 4:o=n+c,l=s+c,a=u-c;break;case 5:n=o-c,l=s+c,a=u-c;break;case 6:o=n+c,s=l-c,a=u-c;break;case 7:n=o-c,s=l-c,a=u-c;break}this._root&&this._root.length&&(this._root=h)}return this._x0=n,this._y0=s,this._z0=a,this._x1=o,this._y1=l,this._z1=u,this}function C8(){var r=[];return this.visit(function(e){if(!e.length)do r.push(e.data);while(e=e.next)}),r}function R8(r){return arguments.length?this.cover(+r[0][0],+r[0][1],+r[0][2]).cover(+r[1][0],+r[1][1],+r[1][2]):isNaN(this._x0)?void 0:[[this._x0,this._y0,this._z0],[this._x1,this._y1,this._z1]]}function ii(r,e,i,n,s,a,o){this.node=r,this.x0=e,this.y0=i,this.z0=n,this.x1=s,this.y1=a,this.z1=o}function N8(r,e,i,n){var s,a=this._x0,o=this._y0,l=this._z0,u,c,h,d,p,f,m=this._x1,y=this._y1,v=this._z1,g=[],_=this._root,x,b;for(_&&g.push(new ii(_,a,o,l,m,y,v)),n==null?n=1/0:(a=r-n,o=e-n,l=i-n,m=r+n,y=e+n,v=i+n,n*=n);x=g.pop();)if(!(!(_=x.node)||(u=x.x0)>m||(c=x.y0)>y||(h=x.z0)>v||(d=x.x1)<a||(p=x.y1)<o||(f=x.z1)<l))if(_.length){var T=(u+d)/2,E=(c+p)/2,M=(h+f)/2;g.push(new ii(_[7],T,E,M,d,p,f),new ii(_[6],u,E,M,T,p,f),new ii(_[5],T,c,M,d,E,f),new ii(_[4],u,c,M,T,E,f),new ii(_[3],T,E,h,d,p,M),new ii(_[2],u,E,h,T,p,M),new ii(_[1],T,c,h,d,E,M),new ii(_[0],u,c,h,T,E,M)),(b=(i>=M)<<2|(e>=E)<<1|r>=T)&&(x=g[g.length-1],g[g.length-1]=g[g.length-1-b],g[g.length-1-b]=x)}else{var C=r-+this._x.call(null,_.data),S=e-+this._y.call(null,_.data),w=i-+this._z.call(null,_.data),R=C*C+S*S+w*w;if(R<n){var O=Math.sqrt(n=R);a=r-O,o=e-O,l=i-O,m=r+O,y=e+O,v=i+O,s=_.data}}return s}const P8=(r,e,i,n,s,a)=>Math.sqrt((r-n)**2+(e-s)**2+(i-a)**2);function I8(r,e,i,n){const s=[],a=r-n,o=e-n,l=i-n,u=r+n,c=e+n,h=i+n;return this.visit((d,p,f,m,y,v,g)=>{if(!d.length)do{const _=d.data;P8(r,e,i,this._x(_),this._y(_),this._z(_))<=n&&s.push(_)}while(d=d.next);return p>u||f>c||m>h||y<a||v<o||g<l}),s}function O8(r){if(isNaN(p=+this._x.call(null,r))||isNaN(f=+this._y.call(null,r))||isNaN(m=+this._z.call(null,r)))return this;var e,i=this._root,n,s,a,o=this._x0,l=this._y0,u=this._z0,c=this._x1,h=this._y1,d=this._z1,p,f,m,y,v,g,_,x,b,T,E;if(!i)return this;if(i.length)for(;;){if((_=p>=(y=(o+c)/2))?o=y:c=y,(x=f>=(v=(l+h)/2))?l=v:h=v,(b=m>=(g=(u+d)/2))?u=g:d=g,e=i,!(i=i[T=b<<2|x<<1|_]))return this;if(!i.length)break;(e[T+1&7]||e[T+2&7]||e[T+3&7]||e[T+4&7]||e[T+5&7]||e[T+6&7]||e[T+7&7])&&(n=e,E=T)}for(;i.data!==r;)if(s=i,!(i=i.next))return this;return(a=i.next)&&delete i.next,s?(a?s.next=a:delete s.next,this):e?(a?e[T]=a:delete e[T],(i=e[0]||e[1]||e[2]||e[3]||e[4]||e[5]||e[6]||e[7])&&i===(e[7]||e[6]||e[5]||e[4]||e[3]||e[2]||e[1]||e[0])&&!i.length&&(n?n[E]=i:this._root=i),this):(this._root=a,this)}function D8(r){for(var e=0,i=r.length;e<i;++e)this.remove(r[e]);return this}function L8(){return this._root}function k8(){var r=0;return this.visit(function(e){if(!e.length)do++r;while(e=e.next)}),r}function U8(r){var e=[],i,n=this._root,s,a,o,l,u,c,h;for(n&&e.push(new ii(n,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1));i=e.pop();)if(!r(n=i.node,a=i.x0,o=i.y0,l=i.z0,u=i.x1,c=i.y1,h=i.z1)&&n.length){var d=(a+u)/2,p=(o+c)/2,f=(l+h)/2;(s=n[7])&&e.push(new ii(s,d,p,f,u,c,h)),(s=n[6])&&e.push(new ii(s,a,p,f,d,c,h)),(s=n[5])&&e.push(new ii(s,d,o,f,u,p,h)),(s=n[4])&&e.push(new ii(s,a,o,f,d,p,h)),(s=n[3])&&e.push(new ii(s,d,p,l,u,c,f)),(s=n[2])&&e.push(new ii(s,a,p,l,d,c,f)),(s=n[1])&&e.push(new ii(s,d,o,l,u,p,f)),(s=n[0])&&e.push(new ii(s,a,o,l,d,p,f))}return this}function F8(r){var e=[],i=[],n;for(this._root&&e.push(new ii(this._root,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1));n=e.pop();){var s=n.node;if(s.length){var a,o=n.x0,l=n.y0,u=n.z0,c=n.x1,h=n.y1,d=n.z1,p=(o+c)/2,f=(l+h)/2,m=(u+d)/2;(a=s[0])&&e.push(new ii(a,o,l,u,p,f,m)),(a=s[1])&&e.push(new ii(a,p,l,u,c,f,m)),(a=s[2])&&e.push(new ii(a,o,f,u,p,h,m)),(a=s[3])&&e.push(new ii(a,p,f,u,c,h,m)),(a=s[4])&&e.push(new ii(a,o,l,m,p,f,d)),(a=s[5])&&e.push(new ii(a,p,l,m,c,f,d)),(a=s[6])&&e.push(new ii(a,o,f,m,p,h,d)),(a=s[7])&&e.push(new ii(a,p,f,m,c,h,d))}i.push(n)}for(;n=i.pop();)r(n.node,n.x0,n.y0,n.z0,n.x1,n.y1,n.z1);return this}function B8(r){return r[0]}function z8(r){return arguments.length?(this._x=r,this):this._x}function j8(r){return r[1]}function V8(r){return arguments.length?(this._y=r,this):this._y}function G8(r){return r[2]}function H8(r){return arguments.length?(this._z=r,this):this._z}function G2(r,e,i,n){var s=new Gv(e??B8,i??j8,n??G8,NaN,NaN,NaN,NaN,NaN,NaN);return r==null?s:s.addAll(r)}function Gv(r,e,i,n,s,a,o,l,u){this._x=r,this._y=e,this._z=i,this._x0=n,this._y0=s,this._z0=a,this._x1=o,this._y1=l,this._z1=u,this._root=void 0}function H2(r){for(var e={data:r.data},i=e;r=r.next;)i=i.next={data:r.data};return e}var $i=G2.prototype=Gv.prototype;$i.copy=function(){var r=new Gv(this._x,this._y,this._z,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1),e=this._root,i,n;if(!e)return r;if(!e.length)return r._root=H2(e),r;for(i=[{source:e,target:r._root=new Array(8)}];e=i.pop();)for(var s=0;s<8;++s)(n=e.source[s])&&(n.length?i.push({source:n,target:e.target[s]=new Array(8)}):e.target[s]=H2(n));return r},$i.add=E8,$i.addAll=M8,$i.cover=A8,$i.data=C8,$i.extent=R8,$i.find=N8,$i.findAllWithinRadius=I8,$i.remove=O8,$i.removeAll=D8,$i.root=L8,$i.size=k8,$i.visit=U8,$i.visitAfter=F8,$i.x=z8,$i.y=V8,$i.z=H8;function Gs(r){return function(){return r}}function Hs(r){return(r()-.5)*1e-6}function W8(r){return r.index}function W2(r,e){var i=r.get(e);if(!i)throw new Error("node not found: "+e);return i}function q2(r){var e=W8,i=p,n,s=Gs(30),a,o,l,u,c,h,d=1;r==null&&(r=[]);function p(g){return 1/Math.min(u[g.source.index],u[g.target.index])}function f(g){for(var _=0,x=r.length;_<d;++_)for(var b=0,T,E,M,C=0,S=0,w=0,R,O;b<x;++b)T=r[b],E=T.source,M=T.target,C=M.x+M.vx-E.x-E.vx||Hs(h),l>1&&(S=M.y+M.vy-E.y-E.vy||Hs(h)),l>2&&(w=M.z+M.vz-E.z-E.vz||Hs(h)),R=Math.sqrt(C*C+S*S+w*w),R=(R-a[b])/R*g*n[b],C*=R,S*=R,w*=R,M.vx-=C*(O=c[b]),l>1&&(M.vy-=S*O),l>2&&(M.vz-=w*O),E.vx+=C*(O=1-O),l>1&&(E.vy+=S*O),l>2&&(E.vz+=w*O)}function m(){if(o){var g,_=o.length,x=r.length,b=new Map(o.map((E,M)=>[e(E,M,o),E])),T;for(g=0,u=new Array(_);g<x;++g)T=r[g],T.index=g,typeof T.source!="object"&&(T.source=W2(b,T.source)),typeof T.target!="object"&&(T.target=W2(b,T.target)),u[T.source.index]=(u[T.source.index]||0)+1,u[T.target.index]=(u[T.target.index]||0)+1;for(g=0,c=new Array(x);g<x;++g)T=r[g],c[g]=u[T.source.index]/(u[T.source.index]+u[T.target.index]);n=new Array(x),y(),a=new Array(x),v()}}function y(){if(o)for(var g=0,_=r.length;g<_;++g)n[g]=+i(r[g],g,r)}function v(){if(o)for(var g=0,_=r.length;g<_;++g)a[g]=+s(r[g],g,r)}return f.initialize=function(g,..._){o=g,h=_.find(x=>typeof x=="function")||Math.random,l=_.find(x=>[1,2,3].includes(x))||2,m()},f.links=function(g){return arguments.length?(r=g,m(),f):r},f.id=function(g){return arguments.length?(e=g,f):e},f.iterations=function(g){return arguments.length?(d=+g,f):d},f.strength=function(g){return arguments.length?(i=typeof g=="function"?g:Gs(+g),y(),f):i},f.distance=function(g){return arguments.length?(s=typeof g=="function"?g:Gs(+g),v(),f):s},f}var q8={value:()=>{}};function Eh(){for(var r=0,e=arguments.length,i={},n;r<e;++r){if(!(n=arguments[r]+"")||n in i||/[\s.]/.test(n))throw new Error("illegal type: "+n);i[n]=[]}return new bf(i)}function bf(r){this._=r}function X8(r,e){return r.trim().split(/^|\s+/).map(function(i){var n="",s=i.indexOf(".");if(s>=0&&(n=i.slice(s+1),i=i.slice(0,s)),i&&!e.hasOwnProperty(i))throw new Error("unknown type: "+i);return{type:i,name:n}})}bf.prototype=Eh.prototype={constructor:bf,on:function(r,e){var i=this._,n=X8(r+"",i),s,a=-1,o=n.length;if(arguments.length<2){for(;++a<o;)if((s=(r=n[a]).type)&&(s=Y8(i[s],r.name)))return s;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++a<o;)if(s=(r=n[a]).type)i[s]=X2(i[s],r.name,e);else if(e==null)for(s in i)i[s]=X2(i[s],r.name,null);return this},copy:function(){var r={},e=this._;for(var i in e)r[i]=e[i].slice();return new bf(r)},call:function(r,e){if((s=arguments.length-2)>0)for(var i=new Array(s),n=0,s,a;n<s;++n)i[n]=arguments[n+2];if(!this._.hasOwnProperty(r))throw new Error("unknown type: "+r);for(a=this._[r],n=0,s=a.length;n<s;++n)a[n].value.apply(e,i)},apply:function(r,e,i){if(!this._.hasOwnProperty(r))throw new Error("unknown type: "+r);for(var n=this._[r],s=0,a=n.length;s<a;++s)n[s].value.apply(e,i)}};function Y8(r,e){for(var i=0,n=r.length,s;i<n;++i)if((s=r[i]).name===e)return s.value}function X2(r,e,i){for(var n=0,s=r.length;n<s;++n)if(r[n].name===e){r[n]=q8,r=r.slice(0,n).concat(r.slice(n+1));break}return i!=null&&r.push({name:e,value:i}),r}var wu=0,Mh=0,Ah=0,Y2=1e3,xf,Ch,_f=0,Wo=0,Tf=0,Rh=typeof performance=="object"&&performance.now?performance:Date,K2=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(r){setTimeout(r,17)};function Hv(){return Wo||(K2(K8),Wo=Rh.now()+Tf)}function K8(){Wo=0}function wf(){this._call=this._time=this._next=null}wf.prototype=Wv.prototype={constructor:wf,restart:function(r,e,i){if(typeof r!="function")throw new TypeError("callback is not a function");i=(i==null?Hv():+i)+(e==null?0:+e),!this._next&&Ch!==this&&(Ch?Ch._next=this:xf=this,Ch=this),this._call=r,this._time=i,qv()},stop:function(){this._call&&(this._call=null,this._time=1/0,qv())}};function Wv(r,e,i){var n=new wf;return n.restart(r,e,i),n}function Z8(){Hv(),++wu;for(var r=xf,e;r;)(e=Wo-r._time)>=0&&r._call.call(void 0,e),r=r._next;--wu}function Z2(){Wo=(_f=Rh.now())+Tf,wu=Mh=0;try{Z8()}finally{wu=0,$8(),Wo=0}}function Q8(){var r=Rh.now(),e=r-_f;e>Y2&&(Tf-=e,_f=r)}function $8(){for(var r,e=xf,i,n=1/0;e;)e._call?(n>e._time&&(n=e._time),r=e,e=e._next):(i=e._next,e._next=null,e=r?r._next=i:xf=i);Ch=r,qv(n)}function qv(r){if(!wu){Mh&&(Mh=clearTimeout(Mh));var e=r-Wo;e>24?(r<1/0&&(Mh=setTimeout(Z2,r-Rh.now()-Tf)),Ah&&(Ah=clearInterval(Ah))):(Ah||(_f=Rh.now(),Ah=setInterval(Q8,Y2)),wu=1,K2(Z2))}}function Q2(r,e,i){var n=new wf;return e=e==null?0:+e,n.restart(s=>{n.stop(),r(s+e)},e,i),n}const J8=1664525,eV=1013904223,$2=4294967296;function tV(){let r=1;return()=>(r=(J8*r+eV)%$2)/$2}var J2=3;function Xv(r){return r.x}function eM(r){return r.y}function iV(r){return r.z}var rV=10,nV=Math.PI*(3-Math.sqrt(5)),sV=Math.PI*20/(9+Math.sqrt(221));function tM(r,e){e=e||2;var i=Math.min(J2,Math.max(1,Math.round(e))),n,s=1,a=.001,o=1-Math.pow(a,1/300),l=0,u=.6,c=new Map,h=Wv(f),d=Eh("tick","end"),p=tV();r==null&&(r=[]);function f(){m(),d.call("tick",n),s<a&&(h.stop(),d.call("end",n))}function m(g){var _,x=r.length,b;g===void 0&&(g=1);for(var T=0;T<g;++T)for(s+=(l-s)*o,c.forEach(function(E){E(s)}),_=0;_<x;++_)b=r[_],b.fx==null?b.x+=b.vx*=u:(b.x=b.fx,b.vx=0),i>1&&(b.fy==null?b.y+=b.vy*=u:(b.y=b.fy,b.vy=0)),i>2&&(b.fz==null?b.z+=b.vz*=u:(b.z=b.fz,b.vz=0));return n}function y(){for(var g=0,_=r.length,x;g<_;++g){if(x=r[g],x.index=g,x.fx!=null&&(x.x=x.fx),x.fy!=null&&(x.y=x.fy),x.fz!=null&&(x.z=x.fz),isNaN(x.x)||i>1&&isNaN(x.y)||i>2&&isNaN(x.z)){var b=rV*(i>2?Math.cbrt(.5+g):i>1?Math.sqrt(.5+g):g),T=g*nV,E=g*sV;i===1?x.x=b:i===2?(x.x=b*Math.cos(T),x.y=b*Math.sin(T)):(x.x=b*Math.sin(T)*Math.cos(E),x.y=b*Math.cos(T),x.z=b*Math.sin(T)*Math.sin(E))}(isNaN(x.vx)||i>1&&isNaN(x.vy)||i>2&&isNaN(x.vz))&&(x.vx=0,i>1&&(x.vy=0),i>2&&(x.vz=0))}}function v(g){return g.initialize&&g.initialize(r,p,i),g}return y(),n={tick:m,restart:function(){return h.restart(f),n},stop:function(){return h.stop(),n},numDimensions:function(g){return arguments.length?(i=Math.min(J2,Math.max(1,Math.round(g))),c.forEach(v),n):i},nodes:function(g){return arguments.length?(r=g,y(),c.forEach(v),n):r},alpha:function(g){return arguments.length?(s=+g,n):s},alphaMin:function(g){return arguments.length?(a=+g,n):a},alphaDecay:function(g){return arguments.length?(o=+g,n):+o},alphaTarget:function(g){return arguments.length?(l=+g,n):l},velocityDecay:function(g){return arguments.length?(u=1-g,n):1-u},randomSource:function(g){return arguments.length?(p=g,c.forEach(v),n):p},force:function(g,_){return arguments.length>1?(_==null?c.delete(g):c.set(g,v(_)),n):c.get(g)},find:function(){var g=Array.prototype.slice.call(arguments),_=g.shift()||0,x=(i>1?g.shift():null)||0,b=(i>2?g.shift():null)||0,T=g.shift()||1/0,E=0,M=r.length,C,S,w,R,O,P;for(T*=T,E=0;E<M;++E)O=r[E],C=_-O.x,S=x-(O.y||0),w=b-(O.z||0),R=C*C+S*S+w*w,R<T&&(P=O,T=R);return P},on:function(g,_){return arguments.length>1?(d.on(g,_),n):d.on(g)}}}function iM(){var r,e,i,n,s,a=Gs(-30),o,l=1,u=1/0,c=.81;function h(m){var y,v=r.length,g=(e===1?U2(r,Xv):e===2?z2(r,Xv,eM):e===3?G2(r,Xv,eM,iV):null).visitAfter(p);for(s=m,y=0;y<v;++y)i=r[y],g.visit(f)}function d(){if(r){var m,y=r.length,v;for(o=new Array(y),m=0;m<y;++m)v=r[m],o[v.index]=+a(v,m,r)}}function p(m){var y=0,v,g,_=0,x,b,T,E,M=m.length;if(M){for(x=b=T=E=0;E<M;++E)(v=m[E])&&(g=Math.abs(v.value))&&(y+=v.value,_+=g,x+=g*(v.x||0),b+=g*(v.y||0),T+=g*(v.z||0));y*=Math.sqrt(4/M),m.x=x/_,e>1&&(m.y=b/_),e>2&&(m.z=T/_)}else{v=m,v.x=v.data.x,e>1&&(v.y=v.data.y),e>2&&(v.z=v.data.z);do y+=o[v.data.index];while(v=v.next)}m.value=y}function f(m,y,v,g,_){if(!m.value)return!0;var x=[v,g,_][e-1],b=m.x-i.x,T=e>1?m.y-i.y:0,E=e>2?m.z-i.z:0,M=x-y,C=b*b+T*T+E*E;if(M*M/c<C)return C<u&&(b===0&&(b=Hs(n),C+=b*b),e>1&&T===0&&(T=Hs(n),C+=T*T),e>2&&E===0&&(E=Hs(n),C+=E*E),C<l&&(C=Math.sqrt(l*C)),i.vx+=b*m.value*s/C,e>1&&(i.vy+=T*m.value*s/C),e>2&&(i.vz+=E*m.value*s/C)),!0;if(!(m.length||C>=u)){(m.data!==i||m.next)&&(b===0&&(b=Hs(n),C+=b*b),e>1&&T===0&&(T=Hs(n),C+=T*T),e>2&&E===0&&(E=Hs(n),C+=E*E),C<l&&(C=Math.sqrt(l*C)));do m.data!==i&&(M=o[m.data.index]*s/C,i.vx+=b*M,e>1&&(i.vy+=T*M),e>2&&(i.vz+=E*M));while(m=m.next)}}return h.initialize=function(m,...y){r=m,n=y.find(v=>typeof v=="function")||Math.random,e=y.find(v=>[1,2,3].includes(v))||2,d()},h.strength=function(m){return arguments.length?(a=typeof m=="function"?m:Gs(+m),d(),h):a},h.distanceMin=function(m){return arguments.length?(l=m*m,h):Math.sqrt(l)},h.distanceMax=function(m){return arguments.length?(u=m*m,h):Math.sqrt(u)},h.theta=function(m){return arguments.length?(c=m*m,h):Math.sqrt(c)},h}function rM(r,e,i,n){var s,a,o=Gs(.1),l,u;typeof r!="function"&&(r=Gs(+r)),e==null&&(e=0),i==null&&(i=0),n==null&&(n=0);function c(d){for(var p=0,f=s.length;p<f;++p){var m=s[p],y=m.x-e||1e-6,v=(m.y||0)-i||1e-6,g=(m.z||0)-n||1e-6,_=Math.sqrt(y*y+v*v+g*g),x=(u[p]-_)*l[p]*d/_;m.vx+=y*x,a>1&&(m.vy+=v*x),a>2&&(m.vz+=g*x)}}function h(){if(s){var d,p=s.length;for(l=new Array(p),u=new Array(p),d=0;d<p;++d)u[d]=+r(s[d],d,s),l[d]=isNaN(u[d])?0:+o(s[d],d,s)}}return c.initialize=function(d,...p){s=d,a=p.find(f=>[1,2,3].includes(f))||2,h()},c.strength=function(d){return arguments.length?(o=typeof d=="function"?d:Gs(+d),h(),c):o},c.radius=function(d){return arguments.length?(r=typeof d=="function"?d:Gs(+d),h(),c):r},c.x=function(d){return arguments.length?(e=+d,c):e},c.y=function(d){return arguments.length?(i=+d,c):i},c.z=function(d){return arguments.length?(n=+d,c):n},c}var Yv=function(r){oV(r);var e=aV(r);return r.on=e.on,r.off=e.off,r.fire=e.fire,r};function aV(r){var e=Object.create(null);return{on:function(i,n,s){if(typeof n!="function")throw new Error("callback is expected to be a function");var a=e[i];return a||(a=e[i]=[]),a.push({callback:n,ctx:s}),r},off:function(i,n){var s=typeof i>"u";if(s)return e=Object.create(null),r;if(e[i]){var a=typeof n!="function";if(a)delete e[i];else for(var o=e[i],l=0;l<o.length;++l)o[l].callback===n&&o.splice(l,1)}return r},fire:function(i){var n=e[i];if(!n)return r;var s;arguments.length>1&&(s=Array.prototype.splice.call(arguments,1));for(var a=0;a<n.length;++a){var o=n[a];o.callback.apply(o.ctx,s)}return r}}}function oV(r){if(!r)throw new Error("Eventify cannot use falsy object as events subject");for(var e=["on","fire","off"],i=0;i<e.length;++i)if(r.hasOwnProperty(e[i]))throw new Error("Subject cannot be eventified, since it already has property '"+e[i]+"'")}var lV=cV,uV=Yv;function cV(r){if(r=r||{},"uniqueLinkId"in r&&(console.warn("ngraph.graph: Starting from version 0.14 `uniqueLinkId` is deprecated.\nUse `multigraph` option instead\n",`
4218
+ }`;class fj{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(e,i,n){if(this.texture===null){const s=new hn,a=e.properties.get(s);a.__webglTexture=i.texture,(i.depthNear!=n.depthNear||i.depthFar!=n.depthFar)&&(this.depthNear=i.depthNear,this.depthFar=i.depthFar),this.texture=s}}getMesh(e){if(this.texture!==null&&this.mesh===null){const i=e.cameras[0].viewport,n=new ns({vertexShader:dj,fragmentShader:pj,uniforms:{depthColor:{value:this.texture},depthWidth:{value:i.z},depthHeight:{value:i.w}}});this.mesh=new Dr(new yh(20,20),n)}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}}class mj extends Oo{constructor(e,i){super();const n=this;let s=null,a=1,o=null,l="local-floor",u=1,c=null,h=null,d=null,p=null,f=null,m=null;const y=new fj,v=i.getContextAttributes();let g=null,_=null;const x=[],b=[],T=new ke;let E=null;const M=new fn;M.viewport=new Ni;const C=new fn;C.viewport=new Ni;const S=[M,C],w=new cj;let R=null,O=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(z){let Z=x[z];return Z===void 0&&(Z=new Av,x[z]=Z),Z.getTargetRaySpace()},this.getControllerGrip=function(z){let Z=x[z];return Z===void 0&&(Z=new Av,x[z]=Z),Z.getGripSpace()},this.getHand=function(z){let Z=x[z];return Z===void 0&&(Z=new Av,x[z]=Z),Z.getHandSpace()};function P(z){const Z=b.indexOf(z.inputSource);if(Z===-1)return;const se=x[Z];se!==void 0&&(se.update(z.inputSource,z.frame,c||o),se.dispatchEvent({type:z.type,data:z.inputSource}))}function A(){s.removeEventListener("select",P),s.removeEventListener("selectstart",P),s.removeEventListener("selectend",P),s.removeEventListener("squeeze",P),s.removeEventListener("squeezestart",P),s.removeEventListener("squeezeend",P),s.removeEventListener("end",A),s.removeEventListener("inputsourceschange",D);for(let z=0;z<x.length;z++){const Z=b[z];Z!==null&&(b[z]=null,x[z].disconnect(Z))}R=null,O=null,y.reset(),e.setRenderTarget(g),f=null,p=null,d=null,s=null,_=null,H.stop(),n.isPresenting=!1,e.setPixelRatio(E),e.setSize(T.width,T.height,!1),n.dispatchEvent({type:"sessionend"})}this.setFramebufferScaleFactor=function(z){a=z,n.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(z){l=z,n.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return c||o},this.setReferenceSpace=function(z){c=z},this.getBaseLayer=function(){return p!==null?p:f},this.getBinding=function(){return d},this.getFrame=function(){return m},this.getSession=function(){return s},this.setSession=async function(z){if(s=z,s!==null){if(g=e.getRenderTarget(),s.addEventListener("select",P),s.addEventListener("selectstart",P),s.addEventListener("selectend",P),s.addEventListener("squeeze",P),s.addEventListener("squeezestart",P),s.addEventListener("squeezeend",P),s.addEventListener("end",A),s.addEventListener("inputsourceschange",D),v.xrCompatible!==!0&&await i.makeXRCompatible(),E=e.getPixelRatio(),e.getSize(T),s.renderState.layers===void 0){const Z={antialias:v.antialias,alpha:!0,depth:v.depth,stencil:v.stencil,framebufferScaleFactor:a};f=new XRWebGLLayer(s,i,Z),s.updateRenderState({baseLayer:f}),e.setPixelRatio(1),e.setSize(f.framebufferWidth,f.framebufferHeight,!1),_=new Ca(f.framebufferWidth,f.framebufferHeight,{format:An,type:Ns,colorSpace:e.outputColorSpace,stencilBuffer:v.stencil})}else{let Z=null,se=null,le=null;v.depth&&(le=v.stencil?i.DEPTH24_STENCIL8:i.DEPTH_COMPONENT24,Z=v.stencil?$l:Ql,se=v.stencil?Zl:Io);const fe={colorFormat:i.RGBA8,depthFormat:le,scaleFactor:a};d=new XRWebGLBinding(s,i),p=d.createProjectionLayer(fe),s.updateRenderState({layers:[p]}),e.setPixelRatio(1),e.setSize(p.textureWidth,p.textureHeight,!1),_=new Ca(p.textureWidth,p.textureHeight,{format:An,type:Ns,depthTexture:new WE(p.textureWidth,p.textureHeight,se,void 0,void 0,void 0,void 0,void 0,void 0,Z),stencilBuffer:v.stencil,colorSpace:e.outputColorSpace,samples:v.antialias?4:0,resolveDepthBuffer:p.ignoreDepthValues===!1})}_.isXRRenderTarget=!0,this.setFoveation(u),c=null,o=await s.requestReferenceSpace(l),H.setContext(s),H.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}},this.getEnvironmentBlendMode=function(){if(s!==null)return s.environmentBlendMode},this.getDepthTexture=function(){return y.getDepthTexture()};function D(z){for(let Z=0;Z<z.removed.length;Z++){const se=z.removed[Z],le=b.indexOf(se);le>=0&&(b[le]=null,x[le].disconnect(se))}for(let Z=0;Z<z.added.length;Z++){const se=z.added[Z];let le=b.indexOf(se);if(le===-1){for(let _e=0;_e<x.length;_e++)if(_e>=b.length){b.push(se),le=_e;break}else if(b[_e]===null){b[_e]=se,le=_e;break}if(le===-1)break}const fe=x[le];fe&&fe.connect(se)}}const L=new K,W=new K;function G(z,Z,se){L.setFromMatrixPosition(Z.matrixWorld),W.setFromMatrixPosition(se.matrixWorld);const le=L.distanceTo(W),fe=Z.projectionMatrix.elements,_e=se.projectionMatrix.elements,Re=fe[14]/(fe[10]-1),nt=fe[14]/(fe[10]+1),ge=(fe[9]+1)/fe[5],gt=(fe[9]-1)/fe[5],$=(fe[8]-1)/fe[0],Ht=(_e[8]+1)/_e[0],$e=Re*$,xt=Re*Ht,Be=le/(-$+Ht),Ct=Be*-$;if(Z.matrixWorld.decompose(z.position,z.quaternion,z.scale),z.translateX(Ct),z.translateZ(Be),z.matrixWorld.compose(z.position,z.quaternion,z.scale),z.matrixWorldInverse.copy(z.matrixWorld).invert(),fe[10]===-1)z.projectionMatrix.copy(Z.projectionMatrix),z.projectionMatrixInverse.copy(Z.projectionMatrixInverse);else{const st=Re+Be,j=nt+Be,k=$e-Ct,ce=xt+(le-Ct),we=ge*nt/j*st,Ce=gt*nt/j*st;z.projectionMatrix.makePerspective(k,ce,we,Ce,st,j),z.projectionMatrixInverse.copy(z.projectionMatrix).invert()}}function Y(z,Z){Z===null?z.matrixWorld.copy(z.matrix):z.matrixWorld.multiplyMatrices(Z.matrixWorld,z.matrix),z.matrixWorldInverse.copy(z.matrixWorld).invert()}this.updateCamera=function(z){if(s===null)return;let Z=z.near,se=z.far;y.texture!==null&&(y.depthNear>0&&(Z=y.depthNear),y.depthFar>0&&(se=y.depthFar)),w.near=C.near=M.near=Z,w.far=C.far=M.far=se,(R!==w.near||O!==w.far)&&(s.updateRenderState({depthNear:w.near,depthFar:w.far}),R=w.near,O=w.far),M.layers.mask=z.layers.mask|2,C.layers.mask=z.layers.mask|4,w.layers.mask=M.layers.mask|C.layers.mask;const le=z.parent,fe=w.cameras;Y(w,le);for(let _e=0;_e<fe.length;_e++)Y(fe[_e],le);fe.length===2?G(w,M,C):w.projectionMatrix.copy(M.projectionMatrix),F(z,w,le)};function F(z,Z,se){se===null?z.matrix.copy(Z.matrixWorld):(z.matrix.copy(se.matrixWorld),z.matrix.invert(),z.matrix.multiply(Z.matrixWorld)),z.matrix.decompose(z.position,z.quaternion,z.scale),z.updateMatrixWorld(!0),z.projectionMatrix.copy(Z.projectionMatrix),z.projectionMatrixInverse.copy(Z.projectionMatrixInverse),z.isPerspectiveCamera&&(z.fov=uh*2*Math.atan(1/z.projectionMatrix.elements[5]),z.zoom=1)}this.getCamera=function(){return w},this.getFoveation=function(){if(!(p===null&&f===null))return u},this.setFoveation=function(z){u=z,p!==null&&(p.fixedFoveation=z),f!==null&&f.fixedFoveation!==void 0&&(f.fixedFoveation=z)},this.hasDepthSensing=function(){return y.texture!==null},this.getDepthSensingMesh=function(){return y.getMesh(w)};let B=null;function q(z,Z){if(h=Z.getViewerPose(c||o),m=Z,h!==null){const se=h.views;f!==null&&(e.setRenderTargetFramebuffer(_,f.framebuffer),e.setRenderTarget(_));let le=!1;se.length!==w.cameras.length&&(w.cameras.length=0,le=!0);for(let _e=0;_e<se.length;_e++){const Re=se[_e];let nt=null;if(f!==null)nt=f.getViewport(Re);else{const gt=d.getViewSubImage(p,Re);nt=gt.viewport,_e===0&&(e.setRenderTargetTextures(_,gt.colorTexture,p.ignoreDepthValues?void 0:gt.depthStencilTexture),e.setRenderTarget(_))}let ge=S[_e];ge===void 0&&(ge=new fn,ge.layers.enable(_e),ge.viewport=new Ni,S[_e]=ge),ge.matrix.fromArray(Re.transform.matrix),ge.matrix.decompose(ge.position,ge.quaternion,ge.scale),ge.projectionMatrix.fromArray(Re.projectionMatrix),ge.projectionMatrixInverse.copy(ge.projectionMatrix).invert(),ge.viewport.set(nt.x,nt.y,nt.width,nt.height),_e===0&&(w.matrix.copy(ge.matrix),w.matrix.decompose(w.position,w.quaternion,w.scale)),le===!0&&w.cameras.push(ge)}const fe=s.enabledFeatures;if(fe&&fe.includes("depth-sensing")){const _e=d.getDepthInformation(se[0]);_e&&_e.isValid&&_e.texture&&y.init(e,_e,s.renderState)}}for(let se=0;se<x.length;se++){const le=b[se],fe=x[se];le!==null&&fe!==void 0&&fe.update(le,Z,c||o)}B&&B(z,Z),Z.detectedPlanes&&n.dispatchEvent({type:"planesdetected",data:Z}),m=null}const H=new UE;H.setAnimationLoop(q),this.setAnimationLoop=function(z){B=z},this.dispose=function(){}}}const Ho=new Oa,gj=new si;function yj(r,e){function i(v,g){v.matrixAutoUpdate===!0&&v.updateMatrix(),g.value.copy(v.matrix)}function n(v,g){g.color.getRGB(v.fogColor.value,PE(r)),g.isFog?(v.fogNear.value=g.near,v.fogFar.value=g.far):g.isFogExp2&&(v.fogDensity.value=g.density)}function s(v,g,_,x,b){g.isMeshBasicMaterial||g.isMeshLambertMaterial?a(v,g):g.isMeshToonMaterial?(a(v,g),d(v,g)):g.isMeshPhongMaterial?(a(v,g),h(v,g)):g.isMeshStandardMaterial?(a(v,g),p(v,g),g.isMeshPhysicalMaterial&&f(v,g,b)):g.isMeshMatcapMaterial?(a(v,g),m(v,g)):g.isMeshDepthMaterial?a(v,g):g.isMeshDistanceMaterial?(a(v,g),y(v,g)):g.isMeshNormalMaterial?a(v,g):g.isLineBasicMaterial?(o(v,g),g.isLineDashedMaterial&&l(v,g)):g.isPointsMaterial?u(v,g,_,x):g.isSpriteMaterial?c(v,g):g.isShadowMaterial?(v.color.value.copy(g.color),v.opacity.value=g.opacity):g.isShaderMaterial&&(g.uniformsNeedUpdate=!1)}function a(v,g){v.opacity.value=g.opacity,g.color&&v.diffuse.value.copy(g.color),g.emissive&&v.emissive.value.copy(g.emissive).multiplyScalar(g.emissiveIntensity),g.map&&(v.map.value=g.map,i(g.map,v.mapTransform)),g.alphaMap&&(v.alphaMap.value=g.alphaMap,i(g.alphaMap,v.alphaMapTransform)),g.bumpMap&&(v.bumpMap.value=g.bumpMap,i(g.bumpMap,v.bumpMapTransform),v.bumpScale.value=g.bumpScale,g.side===gr&&(v.bumpScale.value*=-1)),g.normalMap&&(v.normalMap.value=g.normalMap,i(g.normalMap,v.normalMapTransform),v.normalScale.value.copy(g.normalScale),g.side===gr&&v.normalScale.value.negate()),g.displacementMap&&(v.displacementMap.value=g.displacementMap,i(g.displacementMap,v.displacementMapTransform),v.displacementScale.value=g.displacementScale,v.displacementBias.value=g.displacementBias),g.emissiveMap&&(v.emissiveMap.value=g.emissiveMap,i(g.emissiveMap,v.emissiveMapTransform)),g.specularMap&&(v.specularMap.value=g.specularMap,i(g.specularMap,v.specularMapTransform)),g.alphaTest>0&&(v.alphaTest.value=g.alphaTest);const _=e.get(g),x=_.envMap,b=_.envMapRotation;x&&(v.envMap.value=x,Ho.copy(b),Ho.x*=-1,Ho.y*=-1,Ho.z*=-1,x.isCubeTexture&&x.isRenderTargetTexture===!1&&(Ho.y*=-1,Ho.z*=-1),v.envMapRotation.value.setFromMatrix4(gj.makeRotationFromEuler(Ho)),v.flipEnvMap.value=x.isCubeTexture&&x.isRenderTargetTexture===!1?-1:1,v.reflectivity.value=g.reflectivity,v.ior.value=g.ior,v.refractionRatio.value=g.refractionRatio),g.lightMap&&(v.lightMap.value=g.lightMap,v.lightMapIntensity.value=g.lightMapIntensity,i(g.lightMap,v.lightMapTransform)),g.aoMap&&(v.aoMap.value=g.aoMap,v.aoMapIntensity.value=g.aoMapIntensity,i(g.aoMap,v.aoMapTransform))}function o(v,g){v.diffuse.value.copy(g.color),v.opacity.value=g.opacity,g.map&&(v.map.value=g.map,i(g.map,v.mapTransform))}function l(v,g){v.dashSize.value=g.dashSize,v.totalSize.value=g.dashSize+g.gapSize,v.scale.value=g.scale}function u(v,g,_,x){v.diffuse.value.copy(g.color),v.opacity.value=g.opacity,v.size.value=g.size*_,v.scale.value=x*.5,g.map&&(v.map.value=g.map,i(g.map,v.uvTransform)),g.alphaMap&&(v.alphaMap.value=g.alphaMap,i(g.alphaMap,v.alphaMapTransform)),g.alphaTest>0&&(v.alphaTest.value=g.alphaTest)}function c(v,g){v.diffuse.value.copy(g.color),v.opacity.value=g.opacity,v.rotation.value=g.rotation,g.map&&(v.map.value=g.map,i(g.map,v.mapTransform)),g.alphaMap&&(v.alphaMap.value=g.alphaMap,i(g.alphaMap,v.alphaMapTransform)),g.alphaTest>0&&(v.alphaTest.value=g.alphaTest)}function h(v,g){v.specular.value.copy(g.specular),v.shininess.value=Math.max(g.shininess,1e-4)}function d(v,g){g.gradientMap&&(v.gradientMap.value=g.gradientMap)}function p(v,g){v.metalness.value=g.metalness,g.metalnessMap&&(v.metalnessMap.value=g.metalnessMap,i(g.metalnessMap,v.metalnessMapTransform)),v.roughness.value=g.roughness,g.roughnessMap&&(v.roughnessMap.value=g.roughnessMap,i(g.roughnessMap,v.roughnessMapTransform)),g.envMap&&(v.envMapIntensity.value=g.envMapIntensity)}function f(v,g,_){v.ior.value=g.ior,g.sheen>0&&(v.sheenColor.value.copy(g.sheenColor).multiplyScalar(g.sheen),v.sheenRoughness.value=g.sheenRoughness,g.sheenColorMap&&(v.sheenColorMap.value=g.sheenColorMap,i(g.sheenColorMap,v.sheenColorMapTransform)),g.sheenRoughnessMap&&(v.sheenRoughnessMap.value=g.sheenRoughnessMap,i(g.sheenRoughnessMap,v.sheenRoughnessMapTransform))),g.clearcoat>0&&(v.clearcoat.value=g.clearcoat,v.clearcoatRoughness.value=g.clearcoatRoughness,g.clearcoatMap&&(v.clearcoatMap.value=g.clearcoatMap,i(g.clearcoatMap,v.clearcoatMapTransform)),g.clearcoatRoughnessMap&&(v.clearcoatRoughnessMap.value=g.clearcoatRoughnessMap,i(g.clearcoatRoughnessMap,v.clearcoatRoughnessMapTransform)),g.clearcoatNormalMap&&(v.clearcoatNormalMap.value=g.clearcoatNormalMap,i(g.clearcoatNormalMap,v.clearcoatNormalMapTransform),v.clearcoatNormalScale.value.copy(g.clearcoatNormalScale),g.side===gr&&v.clearcoatNormalScale.value.negate())),g.dispersion>0&&(v.dispersion.value=g.dispersion),g.iridescence>0&&(v.iridescence.value=g.iridescence,v.iridescenceIOR.value=g.iridescenceIOR,v.iridescenceThicknessMinimum.value=g.iridescenceThicknessRange[0],v.iridescenceThicknessMaximum.value=g.iridescenceThicknessRange[1],g.iridescenceMap&&(v.iridescenceMap.value=g.iridescenceMap,i(g.iridescenceMap,v.iridescenceMapTransform)),g.iridescenceThicknessMap&&(v.iridescenceThicknessMap.value=g.iridescenceThicknessMap,i(g.iridescenceThicknessMap,v.iridescenceThicknessMapTransform))),g.transmission>0&&(v.transmission.value=g.transmission,v.transmissionSamplerMap.value=_.texture,v.transmissionSamplerSize.value.set(_.width,_.height),g.transmissionMap&&(v.transmissionMap.value=g.transmissionMap,i(g.transmissionMap,v.transmissionMapTransform)),v.thickness.value=g.thickness,g.thicknessMap&&(v.thicknessMap.value=g.thicknessMap,i(g.thicknessMap,v.thicknessMapTransform)),v.attenuationDistance.value=g.attenuationDistance,v.attenuationColor.value.copy(g.attenuationColor)),g.anisotropy>0&&(v.anisotropyVector.value.set(g.anisotropy*Math.cos(g.anisotropyRotation),g.anisotropy*Math.sin(g.anisotropyRotation)),g.anisotropyMap&&(v.anisotropyMap.value=g.anisotropyMap,i(g.anisotropyMap,v.anisotropyMapTransform))),v.specularIntensity.value=g.specularIntensity,v.specularColor.value.copy(g.specularColor),g.specularColorMap&&(v.specularColorMap.value=g.specularColorMap,i(g.specularColorMap,v.specularColorMapTransform)),g.specularIntensityMap&&(v.specularIntensityMap.value=g.specularIntensityMap,i(g.specularIntensityMap,v.specularIntensityMapTransform))}function m(v,g){g.matcap&&(v.matcap.value=g.matcap)}function y(v,g){const _=e.get(g).light;v.referencePosition.value.setFromMatrixPosition(_.matrixWorld),v.nearDistance.value=_.shadow.camera.near,v.farDistance.value=_.shadow.camera.far}return{refreshFogUniforms:n,refreshMaterialUniforms:s}}function vj(r,e,i,n){let s={},a={},o=[];const l=r.getParameter(r.MAX_UNIFORM_BUFFER_BINDINGS);function u(_,x){const b=x.program;n.uniformBlockBinding(_,b)}function c(_,x){let b=s[_.id];b===void 0&&(m(_),b=h(_),s[_.id]=b,_.addEventListener("dispose",v));const T=x.program;n.updateUBOMapping(_,T);const E=e.render.frame;a[_.id]!==E&&(p(_),a[_.id]=E)}function h(_){const x=d();_.__bindingPointIndex=x;const b=r.createBuffer(),T=_.__size,E=_.usage;return r.bindBuffer(r.UNIFORM_BUFFER,b),r.bufferData(r.UNIFORM_BUFFER,T,E),r.bindBuffer(r.UNIFORM_BUFFER,null),r.bindBufferBase(r.UNIFORM_BUFFER,x,b),b}function d(){for(let _=0;_<l;_++)if(o.indexOf(_)===-1)return o.push(_),_;return console.error("THREE.WebGLRenderer: Maximum number of simultaneously usable uniforms groups reached."),0}function p(_){const x=s[_.id],b=_.uniforms,T=_.__cache;r.bindBuffer(r.UNIFORM_BUFFER,x);for(let E=0,M=b.length;E<M;E++){const C=Array.isArray(b[E])?b[E]:[b[E]];for(let S=0,w=C.length;S<w;S++){const R=C[S];if(f(R,E,S,T)===!0){const O=R.__offset,P=Array.isArray(R.value)?R.value:[R.value];let A=0;for(let D=0;D<P.length;D++){const L=P[D],W=y(L);typeof L=="number"||typeof L=="boolean"?(R.__data[0]=L,r.bufferSubData(r.UNIFORM_BUFFER,O+A,R.__data)):L.isMatrix3?(R.__data[0]=L.elements[0],R.__data[1]=L.elements[1],R.__data[2]=L.elements[2],R.__data[3]=0,R.__data[4]=L.elements[3],R.__data[5]=L.elements[4],R.__data[6]=L.elements[5],R.__data[7]=0,R.__data[8]=L.elements[6],R.__data[9]=L.elements[7],R.__data[10]=L.elements[8],R.__data[11]=0):(L.toArray(R.__data,A),A+=W.storage/Float32Array.BYTES_PER_ELEMENT)}r.bufferSubData(r.UNIFORM_BUFFER,O,R.__data)}}}r.bindBuffer(r.UNIFORM_BUFFER,null)}function f(_,x,b,T){const E=_.value,M=x+"_"+b;if(T[M]===void 0)return typeof E=="number"||typeof E=="boolean"?T[M]=E:T[M]=E.clone(),!0;{const C=T[M];if(typeof E=="number"||typeof E=="boolean"){if(C!==E)return T[M]=E,!0}else if(C.equals(E)===!1)return C.copy(E),!0}return!1}function m(_){const x=_.uniforms;let b=0;const T=16;for(let M=0,C=x.length;M<C;M++){const S=Array.isArray(x[M])?x[M]:[x[M]];for(let w=0,R=S.length;w<R;w++){const O=S[w],P=Array.isArray(O.value)?O.value:[O.value];for(let A=0,D=P.length;A<D;A++){const L=P[A],W=y(L),G=b%T,Y=G%W.boundary,F=G+Y;b+=Y,F!==0&&T-F<W.storage&&(b+=T-F),O.__data=new Float32Array(W.storage/Float32Array.BYTES_PER_ELEMENT),O.__offset=b,b+=W.storage}}}const E=b%T;return E>0&&(b+=T-E),_.__size=b,_.__cache={},this}function y(_){const x={boundary:0,storage:0};return typeof _=="number"||typeof _=="boolean"?(x.boundary=4,x.storage=4):_.isVector2?(x.boundary=8,x.storage=8):_.isVector3||_.isColor?(x.boundary=16,x.storage=12):_.isVector4?(x.boundary=16,x.storage=16):_.isMatrix3?(x.boundary=48,x.storage=48):_.isMatrix4?(x.boundary=64,x.storage=64):_.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",_),x}function v(_){const x=_.target;x.removeEventListener("dispose",v);const b=o.indexOf(x.__bindingPointIndex);o.splice(b,1),r.deleteBuffer(s[x.id]),delete s[x.id],delete a[x.id]}function g(){for(const _ in s)r.deleteBuffer(s[_]);o=[],s={},a={}}return{bind:u,update:c,dispose:g}}class bj{constructor(e={}){const{canvas:i=lF(),context:n=null,depth:s=!0,stencil:a=!1,alpha:o=!1,antialias:l=!1,premultipliedAlpha:u=!0,preserveDrawingBuffer:c=!1,powerPreference:h="default",failIfMajorPerformanceCaveat:d=!1,reverseDepthBuffer:p=!1}=e;this.isWebGLRenderer=!0;let f;if(n!==null){if(typeof WebGLRenderingContext<"u"&&n instanceof WebGLRenderingContext)throw new Error("THREE.WebGLRenderer: WebGL 1 is not supported since r163.");f=n.getContextAttributes().alpha}else f=o;const m=new Uint32Array(4),y=new Int32Array(4);let v=null,g=null;const _=[],x=[];this.domElement=i,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this._outputColorSpace=qr,this.toneMapping=Ma,this.toneMappingExposure=1;const b=this;let T=!1,E=0,M=0,C=null,S=-1,w=null;const R=new Ni,O=new Ni;let P=null;const A=new Ut(0);let D=0,L=i.width,W=i.height,G=1,Y=null,F=null;const B=new Ni(0,0,L,W),q=new Ni(0,0,L,W);let H=!1;const z=new yv;let Z=!1,se=!1;const le=new si,fe=new si,_e=new K,Re=new Ni,nt={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};let ge=!1;function gt(){return C===null?G:1}let $=n;function Ht(U,X){return i.getContext(U,X)}try{const U={alpha:!0,depth:s,stencil:a,antialias:l,premultipliedAlpha:u,preserveDrawingBuffer:c,powerPreference:h,failIfMajorPerformanceCaveat:d};if("setAttribute"in i&&i.setAttribute("data-engine",`three.js r${Ap}`),i.addEventListener("webglcontextlost",Ee,!1),i.addEventListener("webglcontextrestored",Ge,!1),i.addEventListener("webglcontextcreationerror",Ue,!1),$===null){const X="webgl2";if($=Ht(X,U),$===null)throw Ht(X)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}}catch(U){throw console.error("THREE.WebGLRenderer: "+U.message),U}let $e,xt,Be,Ct,st,j,k,ce,we,Ce,Te,et,Ve,Xe,Ot,Ie,Ye,ct,ft,Ke,Lt,_t,Vt,te;function Le(){$e=new Sz($),$e.init(),_t=new uj($,$e),xt=new vz($,$e,e,_t),Be=new aj($,$e),xt.reverseDepthBuffer&&p&&Be.buffers.depth.setReversed(!0),Ct=new Az($),st=new W6,j=new lj($,$e,Be,st,xt,_t,Ct),k=new xz(b),ce=new wz(b),we=new DF($),Vt=new gz($,we),Ce=new Ez($,we,Ct,Vt),Te=new Rz($,Ce,we,Ct),ft=new Cz($,xt,j),Ie=new bz(st),et=new H6(b,k,ce,$e,xt,Vt,Ie),Ve=new yj(b,st),Xe=new X6,Ot=new J6($e),ct=new mz(b,k,ce,Be,Te,f,u),Ye=new nj(b,Te,xt),te=new vj($,Ct,xt,Be),Ke=new yz($,$e,Ct),Lt=new Mz($,$e,Ct),Ct.programs=et.programs,b.capabilities=xt,b.extensions=$e,b.properties=st,b.renderLists=Xe,b.shadowMap=Ye,b.state=Be,b.info=Ct}Le();const pe=new mj(b,$);this.xr=pe,this.getContext=function(){return $},this.getContextAttributes=function(){return $.getContextAttributes()},this.forceContextLoss=function(){const U=$e.get("WEBGL_lose_context");U&&U.loseContext()},this.forceContextRestore=function(){const U=$e.get("WEBGL_lose_context");U&&U.restoreContext()},this.getPixelRatio=function(){return G},this.setPixelRatio=function(U){U!==void 0&&(G=U,this.setSize(L,W,!1))},this.getSize=function(U){return U.set(L,W)},this.setSize=function(U,X,ie=!0){if(pe.isPresenting){console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting.");return}L=U,W=X,i.width=Math.floor(U*G),i.height=Math.floor(X*G),ie===!0&&(i.style.width=U+"px",i.style.height=X+"px"),this.setViewport(0,0,U,X)},this.getDrawingBufferSize=function(U){return U.set(L*G,W*G).floor()},this.setDrawingBufferSize=function(U,X,ie){L=U,W=X,G=ie,i.width=Math.floor(U*ie),i.height=Math.floor(X*ie),this.setViewport(0,0,U,X)},this.getCurrentViewport=function(U){return U.copy(R)},this.getViewport=function(U){return U.copy(B)},this.setViewport=function(U,X,ie,oe){U.isVector4?B.set(U.x,U.y,U.z,U.w):B.set(U,X,ie,oe),Be.viewport(R.copy(B).multiplyScalar(G).round())},this.getScissor=function(U){return U.copy(q)},this.setScissor=function(U,X,ie,oe){U.isVector4?q.set(U.x,U.y,U.z,U.w):q.set(U,X,ie,oe),Be.scissor(O.copy(q).multiplyScalar(G).round())},this.getScissorTest=function(){return H},this.setScissorTest=function(U){Be.setScissorTest(H=U)},this.setOpaqueSort=function(U){Y=U},this.setTransparentSort=function(U){F=U},this.getClearColor=function(U){return U.copy(ct.getClearColor())},this.setClearColor=function(){ct.setClearColor.apply(ct,arguments)},this.getClearAlpha=function(){return ct.getClearAlpha()},this.setClearAlpha=function(){ct.setClearAlpha.apply(ct,arguments)},this.clear=function(U=!0,X=!0,ie=!0){let oe=0;if(U){let J=!1;if(C!==null){const Ae=C.texture.format;J=Ae===b0||Ae===v0||Ae===y0}if(J){const Ae=C.texture.type,Pe=Ae===Ns||Ae===Io||Ae===oh||Ae===Zl||Ae===m0||Ae===g0,Ze=ct.getClearColor(),it=ct.getClearAlpha(),yt=Ze.r,At=Ze.g,pt=Ze.b;Pe?(m[0]=yt,m[1]=At,m[2]=pt,m[3]=it,$.clearBufferuiv($.COLOR,0,m)):(y[0]=yt,y[1]=At,y[2]=pt,y[3]=it,$.clearBufferiv($.COLOR,0,y))}else oe|=$.COLOR_BUFFER_BIT}X&&(oe|=$.DEPTH_BUFFER_BIT),ie&&(oe|=$.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),$.clear(oe)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.dispose=function(){i.removeEventListener("webglcontextlost",Ee,!1),i.removeEventListener("webglcontextrestored",Ge,!1),i.removeEventListener("webglcontextcreationerror",Ue,!1),Xe.dispose(),Ot.dispose(),st.dispose(),k.dispose(),ce.dispose(),Te.dispose(),Vt.dispose(),te.dispose(),et.dispose(),pe.dispose(),pe.removeEventListener("sessionstart",bo),pe.removeEventListener("sessionend",xo),$n.stop()};function Ee(U){U.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),T=!0}function Ge(){console.log("THREE.WebGLRenderer: Context Restored."),T=!1;const U=Ct.autoReset,X=Ye.enabled,ie=Ye.autoUpdate,oe=Ye.needsUpdate,J=Ye.type;Le(),Ct.autoReset=U,Ye.enabled=X,Ye.autoUpdate=ie,Ye.needsUpdate=oe,Ye.type=J}function Ue(U){console.error("THREE.WebGLRenderer: A WebGL context could not be created. Reason: ",U.statusMessage)}function Pt(U){const X=U.target;X.removeEventListener("dispose",Pt),ni(X)}function ni(U){Ai(U),st.remove(U)}function Ai(U){const X=st.get(U).programs;X!==void 0&&(X.forEach(function(ie){et.releaseProgram(ie)}),U.isShaderMaterial&&et.releaseShaderCache(U))}this.renderBufferDirect=function(U,X,ie,oe,J,Ae){X===null&&(X=nt);const Pe=J.isMesh&&J.matrixWorld.determinant()<0,Ze=at(U,X,ie,oe,J);Be.setMaterial(oe,Pe);let it=ie.index,yt=1;if(oe.wireframe===!0){if(it=Ce.getWireframeAttribute(ie),it===void 0)return;yt=2}const At=ie.drawRange,pt=ie.attributes.position;let Xt=At.start*yt,fi=(At.start+At.count)*yt;Ae!==null&&(Xt=Math.max(Xt,Ae.start*yt),fi=Math.min(fi,(Ae.start+Ae.count)*yt)),it!==null?(Xt=Math.max(Xt,0),fi=Math.min(fi,it.count)):pt!=null&&(Xt=Math.max(Xt,0),fi=Math.min(fi,pt.count));const mi=fi-Xt;if(mi<0||mi===1/0)return;Vt.setup(J,oe,Ze,ie,it);let zi,gi=Ke;if(it!==null&&(zi=we.get(it),gi=Lt,gi.setIndex(zi)),J.isMesh)oe.wireframe===!0?(Be.setLineWidth(oe.wireframeLinewidth*gt()),gi.setMode($.LINES)):gi.setMode($.TRIANGLES);else if(J.isLine){let lt=oe.linewidth;lt===void 0&&(lt=1),Be.setLineWidth(lt*gt()),J.isLineSegments?gi.setMode($.LINES):J.isLineLoop?gi.setMode($.LINE_LOOP):gi.setMode($.LINE_STRIP)}else J.isPoints?gi.setMode($.POINTS):J.isSprite&&gi.setMode($.TRIANGLES);if(J.isBatchedMesh)if(J._multiDrawInstances!==null)gi.renderMultiDrawInstances(J._multiDrawStarts,J._multiDrawCounts,J._multiDrawCount,J._multiDrawInstances);else if($e.get("WEBGL_multi_draw"))gi.renderMultiDraw(J._multiDrawStarts,J._multiDrawCounts,J._multiDrawCount);else{const lt=J._multiDrawStarts,Il=J._multiDrawCounts,Ol=J._multiDrawCount,Jn=it?we.get(it).bytesPerElement:1,Gc=st.get(oe).currentProgram.getUniforms();for(let un=0;un<Ol;un++)Gc.setValue($,"_gl_DrawID",un),gi.render(lt[un]/Jn,Il[un])}else if(J.isInstancedMesh)gi.renderInstances(Xt,mi,J.count);else if(ie.isInstancedBufferGeometry){const lt=ie._maxInstanceCount!==void 0?ie._maxInstanceCount:1/0,Il=Math.min(ie.instanceCount,lt);gi.renderInstances(Xt,mi,Il)}else gi.render(Xt,mi)};function Bt(U,X,ie){U.transparent===!0&&U.side===Cs&&U.forceSinglePass===!1?(U.side=gr,U.needsUpdate=!0,de(U,X,ie),U.side=Ea,U.needsUpdate=!0,de(U,X,ie),U.side=Cs):de(U,X,ie)}this.compile=function(U,X,ie=null){ie===null&&(ie=U),g=Ot.get(ie),g.init(X),x.push(g),ie.traverseVisible(function(J){J.isLight&&J.layers.test(X.layers)&&(g.pushLight(J),J.castShadow&&g.pushShadow(J))}),U!==ie&&U.traverseVisible(function(J){J.isLight&&J.layers.test(X.layers)&&(g.pushLight(J),J.castShadow&&g.pushShadow(J))}),g.setupLights();const oe=new Set;return U.traverse(function(J){if(!(J.isMesh||J.isPoints||J.isLine||J.isSprite))return;const Ae=J.material;if(Ae)if(Array.isArray(Ae))for(let Pe=0;Pe<Ae.length;Pe++){const Ze=Ae[Pe];Bt(Ze,ie,J),oe.add(Ze)}else Bt(Ae,ie,J),oe.add(Ae)}),x.pop(),g=null,oe},this.compileAsync=function(U,X,ie=null){const oe=this.compile(U,X,ie);return new Promise(J=>{function Ae(){if(oe.forEach(function(Pe){st.get(Pe).currentProgram.isReady()&&oe.delete(Pe)}),oe.size===0){J(U);return}setTimeout(Ae,10)}$e.get("KHR_parallel_shader_compile")!==null?Ae():setTimeout(Ae,10)})};let Nr=null;function ln(U){Nr&&Nr(U)}function bo(){$n.stop()}function xo(){$n.start()}const $n=new UE;$n.setAnimationLoop(ln),typeof self<"u"&&$n.setContext(self),this.setAnimationLoop=function(U){Nr=U,pe.setAnimationLoop(U),U===null?$n.stop():$n.start()},pe.addEventListener("sessionstart",bo),pe.addEventListener("sessionend",xo),this.render=function(U,X){if(X!==void 0&&X.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(T===!0)return;if(U.matrixWorldAutoUpdate===!0&&U.updateMatrixWorld(),X.parent===null&&X.matrixWorldAutoUpdate===!0&&X.updateMatrixWorld(),pe.enabled===!0&&pe.isPresenting===!0&&(pe.cameraAutoUpdate===!0&&pe.updateCamera(X),X=pe.getCamera()),U.isScene===!0&&U.onBeforeRender(b,U,X,C),g=Ot.get(U,x.length),g.init(X),x.push(g),fe.multiplyMatrices(X.projectionMatrix,X.matrixWorldInverse),z.setFromProjectionMatrix(fe),se=this.localClippingEnabled,Z=Ie.init(this.clippingPlanes,se),v=Xe.get(U,_.length),v.init(),_.push(v),pe.enabled===!0&&pe.isPresenting===!0){const Ae=b.xr.getDepthSensingMesh();Ae!==null&&Pl(Ae,X,-1/0,b.sortObjects)}Pl(U,X,0,b.sortObjects),v.finish(),b.sortObjects===!0&&v.sort(Y,F),ge=pe.enabled===!1||pe.isPresenting===!1||pe.hasDepthSensing()===!1,ge&&ct.addToRenderList(v,U),this.info.render.frame++,Z===!0&&Ie.beginShadows();const ie=g.state.shadowsArray;Ye.render(ie,U,X),Z===!0&&Ie.endShadows(),this.info.autoReset===!0&&this.info.reset();const oe=v.opaque,J=v.transmissive;if(g.setupLights(),X.isArrayCamera){const Ae=X.cameras;if(J.length>0)for(let Pe=0,Ze=Ae.length;Pe<Ze;Pe++){const it=Ae[Pe];Vc(oe,J,U,it)}ge&&ct.render(U);for(let Pe=0,Ze=Ae.length;Pe<Ze;Pe++){const it=Ae[Pe];jc(v,U,it,it.viewport)}}else J.length>0&&Vc(oe,J,U,X),ge&&ct.render(U),jc(v,U,X);C!==null&&(j.updateMultisampleRenderTarget(C),j.updateRenderTargetMipmap(C)),U.isScene===!0&&U.onAfterRender(b,U,X),Vt.resetDefaultState(),S=-1,w=null,x.pop(),x.length>0?(g=x[x.length-1],Z===!0&&Ie.setGlobalState(b.clippingPlanes,g.state.camera)):g=null,_.pop(),_.length>0?v=_[_.length-1]:v=null};function Pl(U,X,ie,oe){if(U.visible===!1)return;if(U.layers.test(X.layers)){if(U.isGroup)ie=U.renderOrder;else if(U.isLOD)U.autoUpdate===!0&&U.update(X);else if(U.isLight)g.pushLight(U),U.castShadow&&g.pushShadow(U);else if(U.isSprite){if(!U.frustumCulled||z.intersectsSprite(U)){oe&&Re.setFromMatrixPosition(U.matrixWorld).applyMatrix4(fe);const Ae=Te.update(U),Pe=U.material;Pe.visible&&v.push(U,Ae,Pe,ie,Re.z,null)}}else if((U.isMesh||U.isLine||U.isPoints)&&(!U.frustumCulled||z.intersectsObject(U))){const Ae=Te.update(U),Pe=U.material;if(oe&&(U.boundingSphere!==void 0?(U.boundingSphere===null&&U.computeBoundingSphere(),Re.copy(U.boundingSphere.center)):(Ae.boundingSphere===null&&Ae.computeBoundingSphere(),Re.copy(Ae.boundingSphere.center)),Re.applyMatrix4(U.matrixWorld).applyMatrix4(fe)),Array.isArray(Pe)){const Ze=Ae.groups;for(let it=0,yt=Ze.length;it<yt;it++){const At=Ze[it],pt=Pe[At.materialIndex];pt&&pt.visible&&v.push(U,Ae,pt,ie,Re.z,At)}}else Pe.visible&&v.push(U,Ae,Pe,ie,Re.z,null)}}const J=U.children;for(let Ae=0,Pe=J.length;Ae<Pe;Ae++)Pl(J[Ae],X,ie,oe)}function jc(U,X,ie,oe){const J=U.opaque,Ae=U.transmissive,Pe=U.transparent;g.setupLightsView(ie),Z===!0&&Ie.setGlobalState(b.clippingPlanes,ie),oe&&Be.viewport(R.copy(oe)),J.length>0&&N(J,X,ie),Ae.length>0&&N(Ae,X,ie),Pe.length>0&&N(Pe,X,ie),Be.buffers.depth.setTest(!0),Be.buffers.depth.setMask(!0),Be.buffers.color.setMask(!0),Be.setPolygonOffset(!1)}function Vc(U,X,ie,oe){if((ie.isScene===!0?ie.overrideMaterial:null)!==null)return;g.state.transmissionRenderTarget[oe.id]===void 0&&(g.state.transmissionRenderTarget[oe.id]=new Ca(1,1,{generateMipmaps:!0,type:$e.has("EXT_color_buffer_half_float")||$e.has("EXT_color_buffer_float")?Kl:Ns,minFilter:Po,samples:4,stencilBuffer:a,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:Gt.workingColorSpace}));const J=g.state.transmissionRenderTarget[oe.id],Ae=oe.viewport||R;J.setSize(Ae.z,Ae.w);const Pe=b.getRenderTarget();b.setRenderTarget(J),b.getClearColor(A),D=b.getClearAlpha(),D<1&&b.setClearColor(16777215,.5),b.clear(),ge&&ct.render(ie);const Ze=b.toneMapping;b.toneMapping=Ma;const it=oe.viewport;if(oe.viewport!==void 0&&(oe.viewport=void 0),g.setupLightsView(oe),Z===!0&&Ie.setGlobalState(b.clippingPlanes,oe),N(U,ie,oe),j.updateMultisampleRenderTarget(J),j.updateRenderTargetMipmap(J),$e.has("WEBGL_multisampled_render_to_texture")===!1){let yt=!1;for(let At=0,pt=X.length;At<pt;At++){const Xt=X[At],fi=Xt.object,mi=Xt.geometry,zi=Xt.material,gi=Xt.group;if(zi.side===Cs&&fi.layers.test(oe.layers)){const lt=zi.side;zi.side=gr,zi.needsUpdate=!0,ee(fi,ie,oe,mi,zi,gi),zi.side=lt,zi.needsUpdate=!0,yt=!0}}yt===!0&&(j.updateMultisampleRenderTarget(J),j.updateRenderTargetMipmap(J))}b.setRenderTarget(Pe),b.setClearColor(A,D),it!==void 0&&(oe.viewport=it),b.toneMapping=Ze}function N(U,X,ie){const oe=X.isScene===!0?X.overrideMaterial:null;for(let J=0,Ae=U.length;J<Ae;J++){const Pe=U[J],Ze=Pe.object,it=Pe.geometry,yt=oe===null?Pe.material:oe,At=Pe.group;Ze.layers.test(ie.layers)&&ee(Ze,X,ie,it,yt,At)}}function ee(U,X,ie,oe,J,Ae){U.onBeforeRender(b,X,ie,oe,J,Ae),U.modelViewMatrix.multiplyMatrices(ie.matrixWorldInverse,U.matrixWorld),U.normalMatrix.getNormalMatrix(U.modelViewMatrix),J.onBeforeRender(b,X,ie,oe,U,Ae),J.transparent===!0&&J.side===Cs&&J.forceSinglePass===!1?(J.side=gr,J.needsUpdate=!0,b.renderBufferDirect(ie,X,oe,J,U,Ae),J.side=Ea,J.needsUpdate=!0,b.renderBufferDirect(ie,X,oe,J,U,Ae),J.side=Cs):b.renderBufferDirect(ie,X,oe,J,U,Ae),U.onAfterRender(b,X,ie,oe,J,Ae)}function de(U,X,ie){X.isScene!==!0&&(X=nt);const oe=st.get(U),J=g.state.lights,Ae=g.state.shadowsArray,Pe=J.state.version,Ze=et.getParameters(U,J.state,Ae,X,ie),it=et.getProgramCacheKey(Ze);let yt=oe.programs;oe.environment=U.isMeshStandardMaterial?X.environment:null,oe.fog=X.fog,oe.envMap=(U.isMeshStandardMaterial?ce:k).get(U.envMap||oe.environment),oe.envMapRotation=oe.environment!==null&&U.envMap===null?X.environmentRotation:U.envMapRotation,yt===void 0&&(U.addEventListener("dispose",Pt),yt=new Map,oe.programs=yt);let At=yt.get(it);if(At!==void 0){if(oe.currentProgram===At&&oe.lightsStateVersion===Pe)return Je(U,Ze),At}else Ze.uniforms=et.getUniforms(U),U.onBeforeCompile(Ze,b),At=et.acquireProgram(Ze,it),yt.set(it,At),oe.uniforms=Ze.uniforms;const pt=oe.uniforms;return(!U.isShaderMaterial&&!U.isRawShaderMaterial||U.clipping===!0)&&(pt.clippingPlanes=Ie.uniform),Je(U,Ze),oe.needsLights=We(U),oe.lightsStateVersion=Pe,oe.needsLights&&(pt.ambientLightColor.value=J.state.ambient,pt.lightProbe.value=J.state.probe,pt.directionalLights.value=J.state.directional,pt.directionalLightShadows.value=J.state.directionalShadow,pt.spotLights.value=J.state.spot,pt.spotLightShadows.value=J.state.spotShadow,pt.rectAreaLights.value=J.state.rectArea,pt.ltc_1.value=J.state.rectAreaLTC1,pt.ltc_2.value=J.state.rectAreaLTC2,pt.pointLights.value=J.state.point,pt.pointLightShadows.value=J.state.pointShadow,pt.hemisphereLights.value=J.state.hemi,pt.directionalShadowMap.value=J.state.directionalShadowMap,pt.directionalShadowMatrix.value=J.state.directionalShadowMatrix,pt.spotShadowMap.value=J.state.spotShadowMap,pt.spotLightMatrix.value=J.state.spotLightMatrix,pt.spotLightMap.value=J.state.spotLightMap,pt.pointShadowMap.value=J.state.pointShadowMap,pt.pointShadowMatrix.value=J.state.pointShadowMatrix),oe.currentProgram=At,oe.uniformsList=null,At}function Ne(U){if(U.uniformsList===null){const X=U.currentProgram.getUniforms();U.uniformsList=of.seqWithValue(X.seq,U.uniforms)}return U.uniformsList}function Je(U,X){const ie=st.get(U);ie.outputColorSpace=X.outputColorSpace,ie.batching=X.batching,ie.batchingColor=X.batchingColor,ie.instancing=X.instancing,ie.instancingColor=X.instancingColor,ie.instancingMorph=X.instancingMorph,ie.skinning=X.skinning,ie.morphTargets=X.morphTargets,ie.morphNormals=X.morphNormals,ie.morphColors=X.morphColors,ie.morphTargetsCount=X.morphTargetsCount,ie.numClippingPlanes=X.numClippingPlanes,ie.numIntersection=X.numClipIntersection,ie.vertexAlphas=X.vertexAlphas,ie.vertexTangents=X.vertexTangents,ie.toneMapping=X.toneMapping}function at(U,X,ie,oe,J){X.isScene!==!0&&(X=nt),j.resetTextureUnits();const Ae=X.fog,Pe=oe.isMeshStandardMaterial?X.environment:null,Ze=C===null?b.outputColorSpace:C.isXRRenderTarget===!0?C.texture.colorSpace:Jl,it=(oe.isMeshStandardMaterial?ce:k).get(oe.envMap||Pe),yt=oe.vertexColors===!0&&!!ie.attributes.color&&ie.attributes.color.itemSize===4,At=!!ie.attributes.tangent&&(!!oe.normalMap||oe.anisotropy>0),pt=!!ie.morphAttributes.position,Xt=!!ie.morphAttributes.normal,fi=!!ie.morphAttributes.color;let mi=Ma;oe.toneMapped&&(C===null||C.isXRRenderTarget===!0)&&(mi=b.toneMapping);const zi=ie.morphAttributes.position||ie.morphAttributes.normal||ie.morphAttributes.color,gi=zi!==void 0?zi.length:0,lt=st.get(oe),Il=g.state.lights;if(Z===!0&&(se===!0||U!==w)){const Wr=U===w&&oe.id===S;Ie.setState(oe,U,Wr)}let Ol=!1;oe.version===lt.__version?(lt.needsLights&&lt.lightsStateVersion!==Il.state.version||lt.outputColorSpace!==Ze||J.isBatchedMesh&&lt.batching===!1||!J.isBatchedMesh&&lt.batching===!0||J.isBatchedMesh&&lt.batchingColor===!0&&J.colorTexture===null||J.isBatchedMesh&&lt.batchingColor===!1&&J.colorTexture!==null||J.isInstancedMesh&&lt.instancing===!1||!J.isInstancedMesh&&lt.instancing===!0||J.isSkinnedMesh&&lt.skinning===!1||!J.isSkinnedMesh&&lt.skinning===!0||J.isInstancedMesh&&lt.instancingColor===!0&&J.instanceColor===null||J.isInstancedMesh&&lt.instancingColor===!1&&J.instanceColor!==null||J.isInstancedMesh&&lt.instancingMorph===!0&&J.morphTexture===null||J.isInstancedMesh&&lt.instancingMorph===!1&&J.morphTexture!==null||lt.envMap!==it||oe.fog===!0&&lt.fog!==Ae||lt.numClippingPlanes!==void 0&&(lt.numClippingPlanes!==Ie.numPlanes||lt.numIntersection!==Ie.numIntersection)||lt.vertexAlphas!==yt||lt.vertexTangents!==At||lt.morphTargets!==pt||lt.morphNormals!==Xt||lt.morphColors!==fi||lt.toneMapping!==mi||lt.morphTargetsCount!==gi)&&(Ol=!0):(Ol=!0,lt.__version=oe.version);let Jn=lt.currentProgram;Ol===!0&&(Jn=de(oe,X,J));let Gc=!1,un=!1,ip=!1;const li=Jn.getUniforms(),ws=lt.uniforms;if(Be.useProgram(Jn.program)&&(Gc=!0,un=!0,ip=!0),oe.id!==S&&(S=oe.id,un=!0),Gc||w!==U){Be.buffers.depth.getReversed()?(le.copy(U.projectionMatrix),cF(le),hF(le),li.setValue($,"projectionMatrix",le)):li.setValue($,"projectionMatrix",U.projectionMatrix),li.setValue($,"viewMatrix",U.matrixWorldInverse);const Wr=li.map.cameraPosition;Wr!==void 0&&Wr.setValue($,_e.setFromMatrixPosition(U.matrixWorld)),xt.logarithmicDepthBuffer&&li.setValue($,"logDepthBufFC",2/(Math.log(U.far+1)/Math.LN2)),(oe.isMeshPhongMaterial||oe.isMeshToonMaterial||oe.isMeshLambertMaterial||oe.isMeshBasicMaterial||oe.isMeshStandardMaterial||oe.isShaderMaterial)&&li.setValue($,"isOrthographic",U.isOrthographicCamera===!0),w!==U&&(w=U,un=!0,ip=!0)}if(J.isSkinnedMesh){li.setOptional($,J,"bindMatrix"),li.setOptional($,J,"bindMatrixInverse");const Wr=J.skeleton;Wr&&(Wr.boneTexture===null&&Wr.computeBoneTexture(),li.setValue($,"boneTexture",Wr.boneTexture,j))}J.isBatchedMesh&&(li.setOptional($,J,"batchingTexture"),li.setValue($,"batchingTexture",J._matricesTexture,j),li.setOptional($,J,"batchingIdTexture"),li.setValue($,"batchingIdTexture",J._indirectTexture,j),li.setOptional($,J,"batchingColorTexture"),J._colorsTexture!==null&&li.setValue($,"batchingColorTexture",J._colorsTexture,j));const rp=ie.morphAttributes;if((rp.position!==void 0||rp.normal!==void 0||rp.color!==void 0)&&ft.update(J,ie,Jn),(un||lt.receiveShadow!==J.receiveShadow)&&(lt.receiveShadow=J.receiveShadow,li.setValue($,"receiveShadow",J.receiveShadow)),oe.isMeshGouraudMaterial&&oe.envMap!==null&&(ws.envMap.value=it,ws.flipEnvMap.value=it.isCubeTexture&&it.isRenderTargetTexture===!1?-1:1),oe.isMeshStandardMaterial&&oe.envMap===null&&X.environment!==null&&(ws.envMapIntensity.value=X.environmentIntensity),un&&(li.setValue($,"toneMappingExposure",b.toneMappingExposure),lt.needsLights&&qe(ws,ip),Ae&&oe.fog===!0&&Ve.refreshFogUniforms(ws,Ae),Ve.refreshMaterialUniforms(ws,oe,G,W,g.state.transmissionRenderTarget[U.id]),of.upload($,Ne(lt),ws,j)),oe.isShaderMaterial&&oe.uniformsNeedUpdate===!0&&(of.upload($,Ne(lt),ws,j),oe.uniformsNeedUpdate=!1),oe.isSpriteMaterial&&li.setValue($,"center",J.center),li.setValue($,"modelViewMatrix",J.modelViewMatrix),li.setValue($,"normalMatrix",J.normalMatrix),li.setValue($,"modelMatrix",J.matrixWorld),oe.isShaderMaterial||oe.isRawShaderMaterial){const Wr=oe.uniformsGroups;for(let np=0,_o=Wr.length;np<_o;np++){const _O=Wr[np];te.update(_O,Jn),te.bind(_O,Jn)}}return Jn}function qe(U,X){U.ambientLightColor.needsUpdate=X,U.lightProbe.needsUpdate=X,U.directionalLights.needsUpdate=X,U.directionalLightShadows.needsUpdate=X,U.pointLights.needsUpdate=X,U.pointLightShadows.needsUpdate=X,U.spotLights.needsUpdate=X,U.spotLightShadows.needsUpdate=X,U.rectAreaLights.needsUpdate=X,U.hemisphereLights.needsUpdate=X}function We(U){return U.isMeshLambertMaterial||U.isMeshToonMaterial||U.isMeshPhongMaterial||U.isMeshStandardMaterial||U.isShadowMaterial||U.isShaderMaterial&&U.lights===!0}this.getActiveCubeFace=function(){return E},this.getActiveMipmapLevel=function(){return M},this.getRenderTarget=function(){return C},this.setRenderTargetTextures=function(U,X,ie){st.get(U.texture).__webglTexture=X,st.get(U.depthTexture).__webglTexture=ie;const oe=st.get(U);oe.__hasExternalTextures=!0,oe.__autoAllocateDepthBuffer=ie===void 0,oe.__autoAllocateDepthBuffer||$e.has("WEBGL_multisampled_render_to_texture")===!0&&(console.warn("THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided"),oe.__useRenderToTexture=!1)},this.setRenderTargetFramebuffer=function(U,X){const ie=st.get(U);ie.__webglFramebuffer=X,ie.__useDefaultFramebuffer=X===void 0},this.setRenderTarget=function(U,X=0,ie=0){C=U,E=X,M=ie;let oe=!0,J=null,Ae=!1,Pe=!1;if(U){const Ze=st.get(U);if(Ze.__useDefaultFramebuffer!==void 0)Be.bindFramebuffer($.FRAMEBUFFER,null),oe=!1;else if(Ze.__webglFramebuffer===void 0)j.setupRenderTarget(U);else if(Ze.__hasExternalTextures)j.rebindTextures(U,st.get(U.texture).__webglTexture,st.get(U.depthTexture).__webglTexture);else if(U.depthBuffer){const At=U.depthTexture;if(Ze.__boundDepthTexture!==At){if(At!==null&&st.has(At)&&(U.width!==At.image.width||U.height!==At.image.height))throw new Error("WebGLRenderTarget: Attached DepthTexture is initialized to the incorrect size.");j.setupDepthRenderbuffer(U)}}const it=U.texture;(it.isData3DTexture||it.isDataArrayTexture||it.isCompressedArrayTexture)&&(Pe=!0);const yt=st.get(U).__webglFramebuffer;U.isWebGLCubeRenderTarget?(Array.isArray(yt[X])?J=yt[X][ie]:J=yt[X],Ae=!0):U.samples>0&&j.useMultisampledRTT(U)===!1?J=st.get(U).__webglMultisampledFramebuffer:Array.isArray(yt)?J=yt[ie]:J=yt,R.copy(U.viewport),O.copy(U.scissor),P=U.scissorTest}else R.copy(B).multiplyScalar(G).floor(),O.copy(q).multiplyScalar(G).floor(),P=H;if(Be.bindFramebuffer($.FRAMEBUFFER,J)&&oe&&Be.drawBuffers(U,J),Be.viewport(R),Be.scissor(O),Be.setScissorTest(P),Ae){const Ze=st.get(U.texture);$.framebufferTexture2D($.FRAMEBUFFER,$.COLOR_ATTACHMENT0,$.TEXTURE_CUBE_MAP_POSITIVE_X+X,Ze.__webglTexture,ie)}else if(Pe){const Ze=st.get(U.texture),it=X||0;$.framebufferTextureLayer($.FRAMEBUFFER,$.COLOR_ATTACHMENT0,Ze.__webglTexture,ie||0,it)}S=-1},this.readRenderTargetPixels=function(U,X,ie,oe,J,Ae,Pe){if(!(U&&U.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let Ze=st.get(U).__webglFramebuffer;if(U.isWebGLCubeRenderTarget&&Pe!==void 0&&(Ze=Ze[Pe]),Ze){Be.bindFramebuffer($.FRAMEBUFFER,Ze);try{const it=U.texture,yt=it.format,At=it.type;if(!xt.textureFormatReadable(yt)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}if(!xt.textureTypeReadable(At)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}X>=0&&X<=U.width-oe&&ie>=0&&ie<=U.height-J&&$.readPixels(X,ie,oe,J,_t.convert(yt),_t.convert(At),Ae)}finally{const it=C!==null?st.get(C).__webglFramebuffer:null;Be.bindFramebuffer($.FRAMEBUFFER,it)}}},this.readRenderTargetPixelsAsync=async function(U,X,ie,oe,J,Ae,Pe){if(!(U&&U.isWebGLRenderTarget))throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let Ze=st.get(U).__webglFramebuffer;if(U.isWebGLCubeRenderTarget&&Pe!==void 0&&(Ze=Ze[Pe]),Ze){const it=U.texture,yt=it.format,At=it.type;if(!xt.textureFormatReadable(yt))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");if(!xt.textureTypeReadable(At))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");if(X>=0&&X<=U.width-oe&&ie>=0&&ie<=U.height-J){Be.bindFramebuffer($.FRAMEBUFFER,Ze);const pt=$.createBuffer();$.bindBuffer($.PIXEL_PACK_BUFFER,pt),$.bufferData($.PIXEL_PACK_BUFFER,Ae.byteLength,$.STREAM_READ),$.readPixels(X,ie,oe,J,_t.convert(yt),_t.convert(At),0);const Xt=C!==null?st.get(C).__webglFramebuffer:null;Be.bindFramebuffer($.FRAMEBUFFER,Xt);const fi=$.fenceSync($.SYNC_GPU_COMMANDS_COMPLETE,0);return $.flush(),await uF($,fi,4),$.bindBuffer($.PIXEL_PACK_BUFFER,pt),$.getBufferSubData($.PIXEL_PACK_BUFFER,0,Ae),$.deleteBuffer(pt),$.deleteSync(fi),Ae}else throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: requested read bounds are out of range.")}},this.copyFramebufferToTexture=function(U,X=null,ie=0){U.isTexture!==!0&&(dh("WebGLRenderer: copyFramebufferToTexture function signature has changed."),X=arguments[0]||null,U=arguments[1]);const oe=Math.pow(2,-ie),J=Math.floor(U.image.width*oe),Ae=Math.floor(U.image.height*oe),Pe=X!==null?X.x:0,Ze=X!==null?X.y:0;j.setTexture2D(U,0),$.copyTexSubImage2D($.TEXTURE_2D,ie,0,0,Pe,Ze,J,Ae),Be.unbindTexture()},this.copyTextureToTexture=function(U,X,ie=null,oe=null,J=0){U.isTexture!==!0&&(dh("WebGLRenderer: copyTextureToTexture function signature has changed."),oe=arguments[0]||null,U=arguments[1],X=arguments[2],J=arguments[3]||0,ie=null);let Ae,Pe,Ze,it,yt,At,pt,Xt,fi;const mi=U.isCompressedTexture?U.mipmaps[J]:U.image;ie!==null?(Ae=ie.max.x-ie.min.x,Pe=ie.max.y-ie.min.y,Ze=ie.isBox3?ie.max.z-ie.min.z:1,it=ie.min.x,yt=ie.min.y,At=ie.isBox3?ie.min.z:0):(Ae=mi.width,Pe=mi.height,Ze=mi.depth||1,it=0,yt=0,At=0),oe!==null?(pt=oe.x,Xt=oe.y,fi=oe.z):(pt=0,Xt=0,fi=0);const zi=_t.convert(X.format),gi=_t.convert(X.type);let lt;X.isData3DTexture?(j.setTexture3D(X,0),lt=$.TEXTURE_3D):X.isDataArrayTexture||X.isCompressedArrayTexture?(j.setTexture2DArray(X,0),lt=$.TEXTURE_2D_ARRAY):(j.setTexture2D(X,0),lt=$.TEXTURE_2D),$.pixelStorei($.UNPACK_FLIP_Y_WEBGL,X.flipY),$.pixelStorei($.UNPACK_PREMULTIPLY_ALPHA_WEBGL,X.premultiplyAlpha),$.pixelStorei($.UNPACK_ALIGNMENT,X.unpackAlignment);const Il=$.getParameter($.UNPACK_ROW_LENGTH),Ol=$.getParameter($.UNPACK_IMAGE_HEIGHT),Jn=$.getParameter($.UNPACK_SKIP_PIXELS),Gc=$.getParameter($.UNPACK_SKIP_ROWS),un=$.getParameter($.UNPACK_SKIP_IMAGES);$.pixelStorei($.UNPACK_ROW_LENGTH,mi.width),$.pixelStorei($.UNPACK_IMAGE_HEIGHT,mi.height),$.pixelStorei($.UNPACK_SKIP_PIXELS,it),$.pixelStorei($.UNPACK_SKIP_ROWS,yt),$.pixelStorei($.UNPACK_SKIP_IMAGES,At);const ip=U.isDataArrayTexture||U.isData3DTexture,li=X.isDataArrayTexture||X.isData3DTexture;if(U.isRenderTargetTexture||U.isDepthTexture){const ws=st.get(U),rp=st.get(X),Wr=st.get(ws.__renderTarget),np=st.get(rp.__renderTarget);Be.bindFramebuffer($.READ_FRAMEBUFFER,Wr.__webglFramebuffer),Be.bindFramebuffer($.DRAW_FRAMEBUFFER,np.__webglFramebuffer);for(let _o=0;_o<Ze;_o++)ip&&$.framebufferTextureLayer($.READ_FRAMEBUFFER,$.COLOR_ATTACHMENT0,st.get(U).__webglTexture,J,At+_o),U.isDepthTexture?(li&&$.framebufferTextureLayer($.DRAW_FRAMEBUFFER,$.COLOR_ATTACHMENT0,st.get(X).__webglTexture,J,fi+_o),$.blitFramebuffer(it,yt,Ae,Pe,pt,Xt,Ae,Pe,$.DEPTH_BUFFER_BIT,$.NEAREST)):li?$.copyTexSubImage3D(lt,J,pt,Xt,fi+_o,it,yt,Ae,Pe):$.copyTexSubImage2D(lt,J,pt,Xt,fi+_o,it,yt,Ae,Pe);Be.bindFramebuffer($.READ_FRAMEBUFFER,null),Be.bindFramebuffer($.DRAW_FRAMEBUFFER,null)}else li?U.isDataTexture||U.isData3DTexture?$.texSubImage3D(lt,J,pt,Xt,fi,Ae,Pe,Ze,zi,gi,mi.data):X.isCompressedArrayTexture?$.compressedTexSubImage3D(lt,J,pt,Xt,fi,Ae,Pe,Ze,zi,mi.data):$.texSubImage3D(lt,J,pt,Xt,fi,Ae,Pe,Ze,zi,gi,mi):U.isDataTexture?$.texSubImage2D($.TEXTURE_2D,J,pt,Xt,Ae,Pe,zi,gi,mi.data):U.isCompressedTexture?$.compressedTexSubImage2D($.TEXTURE_2D,J,pt,Xt,mi.width,mi.height,zi,mi.data):$.texSubImage2D($.TEXTURE_2D,J,pt,Xt,Ae,Pe,zi,gi,mi);$.pixelStorei($.UNPACK_ROW_LENGTH,Il),$.pixelStorei($.UNPACK_IMAGE_HEIGHT,Ol),$.pixelStorei($.UNPACK_SKIP_PIXELS,Jn),$.pixelStorei($.UNPACK_SKIP_ROWS,Gc),$.pixelStorei($.UNPACK_SKIP_IMAGES,un),J===0&&X.generateMipmaps&&$.generateMipmap(lt),Be.unbindTexture()},this.copyTextureToTexture3D=function(U,X,ie=null,oe=null,J=0){return U.isTexture!==!0&&(dh("WebGLRenderer: copyTextureToTexture3D function signature has changed."),ie=arguments[0]||null,oe=arguments[1]||null,U=arguments[2],X=arguments[3],J=arguments[4]||0),dh('WebGLRenderer: copyTextureToTexture3D function has been deprecated. Use "copyTextureToTexture" instead.'),this.copyTextureToTexture(U,X,ie,oe,J)},this.initRenderTarget=function(U){st.get(U).__webglFramebuffer===void 0&&j.setupRenderTarget(U)},this.initTexture=function(U){U.isCubeTexture?j.setTextureCube(U,0):U.isData3DTexture?j.setTexture3D(U,0):U.isDataArrayTexture||U.isCompressedArrayTexture?j.setTexture2DArray(U,0):j.setTexture2D(U,0),Be.unbindTexture()},this.resetState=function(){E=0,M=0,C=null,Be.reset(),Vt.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return Is}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(e){this._outputColorSpace=e;const i=this.getContext();i.drawingBufferColorspace=Gt._getDrawingBufferColorSpace(e),i.unpackColorSpace=Gt._getUnpackColorSpace()}}let xj=class extends Or{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.backgroundRotation=new Oa,this.environmentIntensity=1,this.environmentRotation=new Oa,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(r,e){return super.copy(r,e),r.background!==null&&(this.background=r.background.clone()),r.environment!==null&&(this.environment=r.environment.clone()),r.fog!==null&&(this.fog=r.fog.clone()),this.backgroundBlurriness=r.backgroundBlurriness,this.backgroundIntensity=r.backgroundIntensity,this.backgroundRotation.copy(r.backgroundRotation),this.environmentIntensity=r.environmentIntensity,this.environmentRotation.copy(r.environmentRotation),r.overrideMaterial!==null&&(this.overrideMaterial=r.overrideMaterial.clone()),this.matrixAutoUpdate=r.matrixAutoUpdate,this}toJSON(r){const e=super.toJSON(r);return this.fog!==null&&(e.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(e.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(e.object.backgroundIntensity=this.backgroundIntensity),e.object.backgroundRotation=this.backgroundRotation.toArray(),this.environmentIntensity!==1&&(e.object.environmentIntensity=this.environmentIntensity),e.object.environmentRotation=this.environmentRotation.toArray(),e}},_j=class{constructor(r,e){this.isInterleavedBuffer=!0,this.array=r,this.stride=e,this.count=r!==void 0?r.length/e:0,this.usage=q0,this.updateRanges=[],this.version=0,this.uuid=Os()}onUploadCallback(){}set needsUpdate(r){r===!0&&this.version++}setUsage(r){return this.usage=r,this}addUpdateRange(r,e){this.updateRanges.push({start:r,count:e})}clearUpdateRanges(){this.updateRanges.length=0}copy(r){return this.array=new r.array.constructor(r.array),this.count=r.count,this.stride=r.stride,this.usage=r.usage,this}copyAt(r,e,i){r*=this.stride,i*=e.stride;for(let n=0,s=this.stride;n<s;n++)this.array[r+n]=e.array[i+n];return this}set(r,e=0){return this.array.set(r,e),this}clone(r){r.arrayBuffers===void 0&&(r.arrayBuffers={}),this.array.buffer._uuid===void 0&&(this.array.buffer._uuid=Os()),r.arrayBuffers[this.array.buffer._uuid]===void 0&&(r.arrayBuffers[this.array.buffer._uuid]=this.array.slice(0).buffer);const e=new this.array.constructor(r.arrayBuffers[this.array.buffer._uuid]),i=new this.constructor(e,this.stride);return i.setUsage(this.usage),i}onUpload(r){return this.onUploadCallback=r,this}toJSON(r){return r.arrayBuffers===void 0&&(r.arrayBuffers={}),this.array.buffer._uuid===void 0&&(this.array.buffer._uuid=Os()),r.arrayBuffers[this.array.buffer._uuid]===void 0&&(r.arrayBuffers[this.array.buffer._uuid]=Array.from(new Uint32Array(this.array.buffer))),{uuid:this.uuid,buffer:this.array.buffer._uuid,type:this.array.constructor.name,stride:this.stride}}};const vr=new K;let f2=class PO{constructor(e,i,n,s=!1){this.isInterleavedBufferAttribute=!0,this.name="",this.data=e,this.itemSize=i,this.offset=n,this.normalized=s}get count(){return this.data.count}get array(){return this.data.array}set needsUpdate(e){this.data.needsUpdate=e}applyMatrix4(e){for(let i=0,n=this.data.count;i<n;i++)vr.fromBufferAttribute(this,i),vr.applyMatrix4(e),this.setXYZ(i,vr.x,vr.y,vr.z);return this}applyNormalMatrix(e){for(let i=0,n=this.count;i<n;i++)vr.fromBufferAttribute(this,i),vr.applyNormalMatrix(e),this.setXYZ(i,vr.x,vr.y,vr.z);return this}transformDirection(e){for(let i=0,n=this.count;i<n;i++)vr.fromBufferAttribute(this,i),vr.transformDirection(e),this.setXYZ(i,vr.x,vr.y,vr.z);return this}getComponent(e,i){let n=this.array[e*this.data.stride+this.offset+i];return this.normalized&&(n=Cn(n,this.array)),n}setComponent(e,i,n){return this.normalized&&(n=Jt(n,this.array)),this.data.array[e*this.data.stride+this.offset+i]=n,this}setX(e,i){return this.normalized&&(i=Jt(i,this.array)),this.data.array[e*this.data.stride+this.offset]=i,this}setY(e,i){return this.normalized&&(i=Jt(i,this.array)),this.data.array[e*this.data.stride+this.offset+1]=i,this}setZ(e,i){return this.normalized&&(i=Jt(i,this.array)),this.data.array[e*this.data.stride+this.offset+2]=i,this}setW(e,i){return this.normalized&&(i=Jt(i,this.array)),this.data.array[e*this.data.stride+this.offset+3]=i,this}getX(e){let i=this.data.array[e*this.data.stride+this.offset];return this.normalized&&(i=Cn(i,this.array)),i}getY(e){let i=this.data.array[e*this.data.stride+this.offset+1];return this.normalized&&(i=Cn(i,this.array)),i}getZ(e){let i=this.data.array[e*this.data.stride+this.offset+2];return this.normalized&&(i=Cn(i,this.array)),i}getW(e){let i=this.data.array[e*this.data.stride+this.offset+3];return this.normalized&&(i=Cn(i,this.array)),i}setXY(e,i,n){return e=e*this.data.stride+this.offset,this.normalized&&(i=Jt(i,this.array),n=Jt(n,this.array)),this.data.array[e+0]=i,this.data.array[e+1]=n,this}setXYZ(e,i,n,s){return e=e*this.data.stride+this.offset,this.normalized&&(i=Jt(i,this.array),n=Jt(n,this.array),s=Jt(s,this.array)),this.data.array[e+0]=i,this.data.array[e+1]=n,this.data.array[e+2]=s,this}setXYZW(e,i,n,s,a){return e=e*this.data.stride+this.offset,this.normalized&&(i=Jt(i,this.array),n=Jt(n,this.array),s=Jt(s,this.array),a=Jt(a,this.array)),this.data.array[e+0]=i,this.data.array[e+1]=n,this.data.array[e+2]=s,this.data.array[e+3]=a,this}clone(e){if(e===void 0){console.log("THREE.InterleavedBufferAttribute.clone(): Cloning an interleaved buffer attribute will de-interleave buffer data.");const i=[];for(let n=0;n<this.count;n++){const s=n*this.data.stride+this.offset;for(let a=0;a<this.itemSize;a++)i.push(this.data.array[s+a])}return new dn(new this.array.constructor(i),this.itemSize,this.normalized)}else return e.interleavedBuffers===void 0&&(e.interleavedBuffers={}),e.interleavedBuffers[this.data.uuid]===void 0&&(e.interleavedBuffers[this.data.uuid]=this.data.clone(e)),new PO(e.interleavedBuffers[this.data.uuid],this.itemSize,this.offset,this.normalized)}toJSON(e){if(e===void 0){console.log("THREE.InterleavedBufferAttribute.toJSON(): Serializing an interleaved buffer attribute will de-interleave buffer data.");const i=[];for(let n=0;n<this.count;n++){const s=n*this.data.stride+this.offset;for(let a=0;a<this.itemSize;a++)i.push(this.data.array[s+a])}return{itemSize:this.itemSize,type:this.array.constructor.name,array:i,normalized:this.normalized}}else return e.interleavedBuffers===void 0&&(e.interleavedBuffers={}),e.interleavedBuffers[this.data.uuid]===void 0&&(e.interleavedBuffers[this.data.uuid]=this.data.toJSON(e)),{isInterleavedBufferAttribute:!0,itemSize:this.itemSize,data:this.data.uuid,offset:this.offset,normalized:this.normalized}}},Tj=class extends Uo{static get type(){return"SpriteMaterial"}constructor(r){super(),this.isSpriteMaterial=!0,this.color=new Ut(16777215),this.map=null,this.alphaMap=null,this.rotation=0,this.sizeAttenuation=!0,this.transparent=!0,this.fog=!0,this.setValues(r)}copy(r){return super.copy(r),this.color.copy(r.color),this.map=r.map,this.alphaMap=r.alphaMap,this.rotation=r.rotation,this.sizeAttenuation=r.sizeAttenuation,this.fog=r.fog,this}},bu;const bh=new K,xu=new K,_u=new K,Tu=new ke,xh=new ke,m2=new si,uf=new K,_h=new K,cf=new K,g2=new ke,Cv=new ke,y2=new ke;class wj extends Or{constructor(e=new Tj){if(super(),this.isSprite=!0,this.type="Sprite",bu===void 0){bu=new Kr;const i=new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]),n=new _j(i,5);bu.setIndex([0,1,2,0,2,3]),bu.setAttribute("position",new f2(n,3,0,!1)),bu.setAttribute("uv",new f2(n,2,3,!1))}this.geometry=bu,this.material=e,this.center=new ke(.5,.5)}raycast(e,i){e.camera===null&&console.error('THREE.Sprite: "Raycaster.camera" needs to be set in order to raycast against sprites.'),xu.setFromMatrixScale(this.matrixWorld),m2.copy(e.camera.matrixWorld),this.modelViewMatrix.multiplyMatrices(e.camera.matrixWorldInverse,this.matrixWorld),_u.setFromMatrixPosition(this.modelViewMatrix),e.camera.isPerspectiveCamera&&this.material.sizeAttenuation===!1&&xu.multiplyScalar(-_u.z);const n=this.material.rotation;let s,a;n!==0&&(a=Math.cos(n),s=Math.sin(n));const o=this.center;hf(uf.set(-.5,-.5,0),_u,o,xu,s,a),hf(_h.set(.5,-.5,0),_u,o,xu,s,a),hf(cf.set(.5,.5,0),_u,o,xu,s,a),g2.set(0,0),Cv.set(1,0),y2.set(1,1);let l=e.ray.intersectTriangle(uf,_h,cf,!1,bh);if(l===null&&(hf(_h.set(-.5,.5,0),_u,o,xu,s,a),Cv.set(0,1),l=e.ray.intersectTriangle(uf,cf,_h,!1,bh),l===null))return;const u=e.ray.origin.distanceTo(bh);u<e.near||u>e.far||i.push({distance:u,point:bh.clone(),uv:hu.getInterpolation(bh,uf,_h,cf,g2,Cv,y2,new ke),face:null,object:this})}copy(e,i){return super.copy(e,i),e.center!==void 0&&this.center.copy(e.center),this.material=e.material,this}}function hf(r,e,i,n,s,a){Tu.subVectors(r,i).addScalar(.5).multiply(n),s!==void 0?(xh.x=a*Tu.x-s*Tu.y,xh.y=s*Tu.x+a*Tu.y):xh.copy(Tu),r.copy(e),r.x+=xh.x,r.y+=xh.y,r.applyMatrix4(m2)}let v2=class extends Uo{static get type(){return"LineBasicMaterial"}constructor(r){super(),this.isLineBasicMaterial=!0,this.color=new Ut(16777215),this.map=null,this.linewidth=1,this.linecap="round",this.linejoin="round",this.fog=!0,this.setValues(r)}copy(r){return super.copy(r),this.color.copy(r.color),this.map=r.map,this.linewidth=r.linewidth,this.linecap=r.linecap,this.linejoin=r.linejoin,this.fog=r.fog,this}};const df=new K,pf=new K,b2=new si,Th=new Gp,ff=new zp,Rv=new K,x2=new K;class Sj extends Or{constructor(e=new Kr,i=new v2){super(),this.isLine=!0,this.type="Line",this.geometry=e,this.material=i,this.updateMorphTargets()}copy(e,i){return super.copy(e,i),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}computeLineDistances(){const e=this.geometry;if(e.index===null){const i=e.attributes.position,n=[0];for(let s=1,a=i.count;s<a;s++)df.fromBufferAttribute(i,s-1),pf.fromBufferAttribute(i,s),n[s]=n[s-1],n[s]+=df.distanceTo(pf);e.setAttribute("lineDistance",new xi(n,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}raycast(e,i){const n=this.geometry,s=this.matrixWorld,a=e.params.Line.threshold,o=n.drawRange;if(n.boundingSphere===null&&n.computeBoundingSphere(),ff.copy(n.boundingSphere),ff.applyMatrix4(s),ff.radius+=a,e.ray.intersectsSphere(ff)===!1)return;b2.copy(s).invert(),Th.copy(e.ray).applyMatrix4(b2);const l=a/((this.scale.x+this.scale.y+this.scale.z)/3),u=l*l,c=this.isLineSegments?2:1,h=n.index,d=n.attributes.position;if(h!==null){const p=Math.max(0,o.start),f=Math.min(h.count,o.start+o.count);for(let m=p,y=f-1;m<y;m+=c){const v=h.getX(m),g=h.getX(m+1),_=mf(this,e,Th,u,v,g);_&&i.push(_)}if(this.isLineLoop){const m=h.getX(f-1),y=h.getX(p),v=mf(this,e,Th,u,m,y);v&&i.push(v)}}else{const p=Math.max(0,o.start),f=Math.min(d.count,o.start+o.count);for(let m=p,y=f-1;m<y;m+=c){const v=mf(this,e,Th,u,m,m+1);v&&i.push(v)}if(this.isLineLoop){const m=mf(this,e,Th,u,f-1,p);m&&i.push(m)}}}updateMorphTargets(){const e=this.geometry.morphAttributes,i=Object.keys(e);if(i.length>0){const n=e[i[0]];if(n!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,a=n.length;s<a;s++){const o=n[s].name||String(s);this.morphTargetInfluences.push(0),this.morphTargetDictionary[o]=s}}}}}function mf(r,e,i,n,s,a){const o=r.geometry.attributes.position;if(df.fromBufferAttribute(o,s),pf.fromBufferAttribute(o,a),i.distanceSqToSegment(df,pf,Rv,x2)>n)return;Rv.applyMatrix4(r.matrixWorld);const l=e.ray.origin.distanceTo(Rv);if(!(l<e.near||l>e.far))return{distance:l,point:x2.clone().applyMatrix4(r.matrixWorld),index:s,face:null,faceIndex:null,barycoord:null,object:r}}class js{constructor(){this.type="Curve",this.arcLengthDivisions=200}getPoint(){return console.warn("THREE.Curve: .getPoint() not implemented."),null}getPointAt(e,i){const n=this.getUtoTmapping(e);return this.getPoint(n,i)}getPoints(e=5){const i=[];for(let n=0;n<=e;n++)i.push(this.getPoint(n/e));return i}getSpacedPoints(e=5){const i=[];for(let n=0;n<=e;n++)i.push(this.getPointAt(n/e));return i}getLength(){const e=this.getLengths();return e[e.length-1]}getLengths(e=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;const i=[];let n,s=this.getPoint(0),a=0;i.push(0);for(let o=1;o<=e;o++)n=this.getPoint(o/e),a+=n.distanceTo(s),i.push(a),s=n;return this.cacheArcLengths=i,i}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e,i){const n=this.getLengths();let s=0;const a=n.length;let o;i?o=i:o=e*n[a-1];let l=0,u=a-1,c;for(;l<=u;)if(s=Math.floor(l+(u-l)/2),c=n[s]-o,c<0)l=s+1;else if(c>0)u=s-1;else{u=s;break}if(s=u,n[s]===o)return s/(a-1);const h=n[s],d=n[s+1]-h,p=(o-h)/d;return(s+p)/(a-1)}getTangent(e,i){let n=e-1e-4,s=e+1e-4;n<0&&(n=0),s>1&&(s=1);const a=this.getPoint(n),o=this.getPoint(s),l=i||(a.isVector2?new ke:new K);return l.copy(o).sub(a).normalize(),l}getTangentAt(e,i){const n=this.getUtoTmapping(e);return this.getTangent(n,i)}computeFrenetFrames(e,i){const n=new K,s=[],a=[],o=[],l=new K,u=new si;for(let f=0;f<=e;f++){const m=f/e;s[f]=this.getTangentAt(m,new K)}a[0]=new K,o[0]=new K;let c=Number.MAX_VALUE;const h=Math.abs(s[0].x),d=Math.abs(s[0].y),p=Math.abs(s[0].z);h<=c&&(c=h,n.set(1,0,0)),d<=c&&(c=d,n.set(0,1,0)),p<=c&&n.set(0,0,1),l.crossVectors(s[0],n).normalize(),a[0].crossVectors(s[0],l),o[0].crossVectors(s[0],a[0]);for(let f=1;f<=e;f++){if(a[f]=a[f-1].clone(),o[f]=o[f-1].clone(),l.crossVectors(s[f-1],s[f]),l.length()>Number.EPSILON){l.normalize();const m=Math.acos(Wi(s[f-1].dot(s[f]),-1,1));a[f].applyMatrix4(u.makeRotationAxis(l,m))}o[f].crossVectors(s[f],a[f])}if(i===!0){let f=Math.acos(Wi(a[0].dot(a[e]),-1,1));f/=e,s[0].dot(l.crossVectors(a[0],a[e]))>0&&(f=-f);for(let m=1;m<=e;m++)a[m].applyMatrix4(u.makeRotationAxis(s[m],f*m)),o[m].crossVectors(s[m],a[m])}return{tangents:s,normals:a,binormals:o}}clone(){return new this.constructor().copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){const e={metadata:{version:4.6,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}class _2 extends js{constructor(e=0,i=0,n=1,s=1,a=0,o=Math.PI*2,l=!1,u=0){super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=e,this.aY=i,this.xRadius=n,this.yRadius=s,this.aStartAngle=a,this.aEndAngle=o,this.aClockwise=l,this.aRotation=u}getPoint(e,i=new ke){const n=i,s=Math.PI*2;let a=this.aEndAngle-this.aStartAngle;const o=Math.abs(a)<Number.EPSILON;for(;a<0;)a+=s;for(;a>s;)a-=s;a<Number.EPSILON&&(o?a=0:a=s),this.aClockwise===!0&&!o&&(a===s?a=-s:a=a-s);const l=this.aStartAngle+e*a;let u=this.aX+this.xRadius*Math.cos(l),c=this.aY+this.yRadius*Math.sin(l);if(this.aRotation!==0){const h=Math.cos(this.aRotation),d=Math.sin(this.aRotation),p=u-this.aX,f=c-this.aY;u=p*h-f*d+this.aX,c=p*d+f*h+this.aY}return n.set(u,c)}copy(e){return super.copy(e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this}toJSON(){const e=super.toJSON();return e.aX=this.aX,e.aY=this.aY,e.xRadius=this.xRadius,e.yRadius=this.yRadius,e.aStartAngle=this.aStartAngle,e.aEndAngle=this.aEndAngle,e.aClockwise=this.aClockwise,e.aRotation=this.aRotation,e}fromJSON(e){return super.fromJSON(e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this}}class Ej extends _2{constructor(e,i,n,s,a,o){super(e,i,n,n,s,a,o),this.isArcCurve=!0,this.type="ArcCurve"}}function Nv(){let r=0,e=0,i=0,n=0;function s(a,o,l,u){r=a,e=l,i=-3*a+3*o-2*l-u,n=2*a-2*o+l+u}return{initCatmullRom:function(a,o,l,u,c){s(o,l,c*(l-a),c*(u-o))},initNonuniformCatmullRom:function(a,o,l,u,c,h,d){let p=(o-a)/c-(l-a)/(c+h)+(l-o)/h,f=(l-o)/h-(u-o)/(h+d)+(u-l)/d;p*=h,f*=h,s(o,l,p,f)},calc:function(a){const o=a*a,l=o*a;return r+e*a+i*o+n*l}}}const gf=new K,Pv=new Nv,Iv=new Nv,Ov=new Nv;class Mj extends js{constructor(e=[],i=!1,n="centripetal",s=.5){super(),this.isCatmullRomCurve3=!0,this.type="CatmullRomCurve3",this.points=e,this.closed=i,this.curveType=n,this.tension=s}getPoint(e,i=new K){const n=i,s=this.points,a=s.length,o=(a-(this.closed?0:1))*e;let l=Math.floor(o),u=o-l;this.closed?l+=l>0?0:(Math.floor(Math.abs(l)/a)+1)*a:u===0&&l===a-1&&(l=a-2,u=1);let c,h;this.closed||l>0?c=s[(l-1)%a]:(gf.subVectors(s[0],s[1]).add(s[0]),c=gf);const d=s[l%a],p=s[(l+1)%a];if(this.closed||l+2<a?h=s[(l+2)%a]:(gf.subVectors(s[a-1],s[a-2]).add(s[a-1]),h=gf),this.curveType==="centripetal"||this.curveType==="chordal"){const f=this.curveType==="chordal"?.5:.25;let m=Math.pow(c.distanceToSquared(d),f),y=Math.pow(d.distanceToSquared(p),f),v=Math.pow(p.distanceToSquared(h),f);y<1e-4&&(y=1),m<1e-4&&(m=y),v<1e-4&&(v=y),Pv.initNonuniformCatmullRom(c.x,d.x,p.x,h.x,m,y,v),Iv.initNonuniformCatmullRom(c.y,d.y,p.y,h.y,m,y,v),Ov.initNonuniformCatmullRom(c.z,d.z,p.z,h.z,m,y,v)}else this.curveType==="catmullrom"&&(Pv.initCatmullRom(c.x,d.x,p.x,h.x,this.tension),Iv.initCatmullRom(c.y,d.y,p.y,h.y,this.tension),Ov.initCatmullRom(c.z,d.z,p.z,h.z,this.tension));return n.set(Pv.calc(u),Iv.calc(u),Ov.calc(u)),n}copy(e){super.copy(e),this.points=[];for(let i=0,n=e.points.length;i<n;i++){const s=e.points[i];this.points.push(s.clone())}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}toJSON(){const e=super.toJSON();e.points=[];for(let i=0,n=this.points.length;i<n;i++){const s=this.points[i];e.points.push(s.toArray())}return e.closed=this.closed,e.curveType=this.curveType,e.tension=this.tension,e}fromJSON(e){super.fromJSON(e),this.points=[];for(let i=0,n=e.points.length;i<n;i++){const s=e.points[i];this.points.push(new K().fromArray(s))}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}}function T2(r,e,i,n,s){const a=(n-e)*.5,o=(s-i)*.5,l=r*r,u=r*l;return(2*i-2*n+a+o)*u+(-3*i+3*n-2*a-o)*l+a*r+i}function Aj(r,e){const i=1-r;return i*i*e}function Cj(r,e){return 2*(1-r)*r*e}function Rj(r,e){return r*r*e}function wh(r,e,i,n){return Aj(r,e)+Cj(r,i)+Rj(r,n)}function Nj(r,e){const i=1-r;return i*i*i*e}function Pj(r,e){const i=1-r;return 3*i*i*r*e}function Ij(r,e){return 3*(1-r)*r*r*e}function Oj(r,e){return r*r*r*e}function Sh(r,e,i,n,s){return Nj(r,e)+Pj(r,i)+Ij(r,n)+Oj(r,s)}class Dj extends js{constructor(e=new ke,i=new ke,n=new ke,s=new ke){super(),this.isCubicBezierCurve=!0,this.type="CubicBezierCurve",this.v0=e,this.v1=i,this.v2=n,this.v3=s}getPoint(e,i=new ke){const n=i,s=this.v0,a=this.v1,o=this.v2,l=this.v3;return n.set(Sh(e,s.x,a.x,o.x,l.x),Sh(e,s.y,a.y,o.y,l.y)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}}class w2 extends js{constructor(e=new K,i=new K,n=new K,s=new K){super(),this.isCubicBezierCurve3=!0,this.type="CubicBezierCurve3",this.v0=e,this.v1=i,this.v2=n,this.v3=s}getPoint(e,i=new K){const n=i,s=this.v0,a=this.v1,o=this.v2,l=this.v3;return n.set(Sh(e,s.x,a.x,o.x,l.x),Sh(e,s.y,a.y,o.y,l.y),Sh(e,s.z,a.z,o.z,l.z)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}}class Lj extends js{constructor(e=new ke,i=new ke){super(),this.isLineCurve=!0,this.type="LineCurve",this.v1=e,this.v2=i}getPoint(e,i=new ke){const n=i;return e===1?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(e).add(this.v1)),n}getPointAt(e,i){return this.getPoint(e,i)}getTangent(e,i=new ke){return i.subVectors(this.v2,this.v1).normalize()}getTangentAt(e,i){return this.getTangent(e,i)}copy(e){return super.copy(e),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class kj extends js{constructor(e=new K,i=new K){super(),this.isLineCurve3=!0,this.type="LineCurve3",this.v1=e,this.v2=i}getPoint(e,i=new K){const n=i;return e===1?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(e).add(this.v1)),n}getPointAt(e,i){return this.getPoint(e,i)}getTangent(e,i=new K){return i.subVectors(this.v2,this.v1).normalize()}getTangentAt(e,i){return this.getTangent(e,i)}copy(e){return super.copy(e),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class Uj extends js{constructor(e=new ke,i=new ke,n=new ke){super(),this.isQuadraticBezierCurve=!0,this.type="QuadraticBezierCurve",this.v0=e,this.v1=i,this.v2=n}getPoint(e,i=new ke){const n=i,s=this.v0,a=this.v1,o=this.v2;return n.set(wh(e,s.x,a.x,o.x),wh(e,s.y,a.y,o.y)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class Dv extends js{constructor(e=new K,i=new K,n=new K){super(),this.isQuadraticBezierCurve3=!0,this.type="QuadraticBezierCurve3",this.v0=e,this.v1=i,this.v2=n}getPoint(e,i=new K){const n=i,s=this.v0,a=this.v1,o=this.v2;return n.set(wh(e,s.x,a.x,o.x),wh(e,s.y,a.y,o.y),wh(e,s.z,a.z,o.z)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class Fj extends js{constructor(e=[]){super(),this.isSplineCurve=!0,this.type="SplineCurve",this.points=e}getPoint(e,i=new ke){const n=i,s=this.points,a=(s.length-1)*e,o=Math.floor(a),l=a-o,u=s[o===0?o:o-1],c=s[o],h=s[o>s.length-2?s.length-1:o+1],d=s[o>s.length-3?s.length-1:o+2];return n.set(T2(l,u.x,c.x,h.x,d.x),T2(l,u.y,c.y,h.y,d.y)),n}copy(e){super.copy(e),this.points=[];for(let i=0,n=e.points.length;i<n;i++){const s=e.points[i];this.points.push(s.clone())}return this}toJSON(){const e=super.toJSON();e.points=[];for(let i=0,n=this.points.length;i<n;i++){const s=this.points[i];e.points.push(s.toArray())}return e}fromJSON(e){super.fromJSON(e),this.points=[];for(let i=0,n=e.points.length;i<n;i++){const s=e.points[i];this.points.push(new ke().fromArray(s))}return this}}var Bj=Object.freeze({__proto__:null,ArcCurve:Ej,CatmullRomCurve3:Mj,CubicBezierCurve:Dj,CubicBezierCurve3:w2,EllipseCurve:_2,LineCurve:Lj,LineCurve3:kj,QuadraticBezierCurve:Uj,QuadraticBezierCurve3:Dv,SplineCurve:Fj});class Lv extends Kr{constructor(e=1,i=32,n=0,s=Math.PI*2){super(),this.type="CircleGeometry",this.parameters={radius:e,segments:i,thetaStart:n,thetaLength:s},i=Math.max(3,i);const a=[],o=[],l=[],u=[],c=new K,h=new ke;o.push(0,0,0),l.push(0,0,1),u.push(.5,.5);for(let d=0,p=3;d<=i;d++,p+=3){const f=n+d/i*s;c.x=e*Math.cos(f),c.y=e*Math.sin(f),o.push(c.x,c.y,c.z),l.push(0,0,1),h.x=(o[p]/e+1)/2,h.y=(o[p+1]/e+1)/2,u.push(h.x,h.y)}for(let d=1;d<=i;d++)a.push(d,d+1,0);this.setIndex(a),this.setAttribute("position",new xi(o,3)),this.setAttribute("normal",new xi(l,3)),this.setAttribute("uv",new xi(u,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new Lv(e.radius,e.segments,e.thetaStart,e.thetaLength)}}class yf extends Kr{constructor(e=1,i=1,n=1,s=32,a=1,o=!1,l=0,u=Math.PI*2){super(),this.type="CylinderGeometry",this.parameters={radiusTop:e,radiusBottom:i,height:n,radialSegments:s,heightSegments:a,openEnded:o,thetaStart:l,thetaLength:u};const c=this;s=Math.floor(s),a=Math.floor(a);const h=[],d=[],p=[],f=[];let m=0;const y=[],v=n/2;let g=0;_(),o===!1&&(e>0&&x(!0),i>0&&x(!1)),this.setIndex(h),this.setAttribute("position",new xi(d,3)),this.setAttribute("normal",new xi(p,3)),this.setAttribute("uv",new xi(f,2));function _(){const b=new K,T=new K;let E=0;const M=(i-e)/n;for(let C=0;C<=a;C++){const S=[],w=C/a,R=w*(i-e)+e;for(let O=0;O<=s;O++){const P=O/s,A=P*u+l,D=Math.sin(A),L=Math.cos(A);T.x=R*D,T.y=-w*n+v,T.z=R*L,d.push(T.x,T.y,T.z),b.set(D,M,L).normalize(),p.push(b.x,b.y,b.z),f.push(P,1-w),S.push(m++)}y.push(S)}for(let C=0;C<s;C++)for(let S=0;S<a;S++){const w=y[S][C],R=y[S+1][C],O=y[S+1][C+1],P=y[S][C+1];(e>0||S!==0)&&(h.push(w,R,P),E+=3),(i>0||S!==a-1)&&(h.push(R,O,P),E+=3)}c.addGroup(g,E,0),g+=E}function x(b){const T=m,E=new ke,M=new K;let C=0;const S=b===!0?e:i,w=b===!0?1:-1;for(let O=1;O<=s;O++)d.push(0,v*w,0),p.push(0,w,0),f.push(.5,.5),m++;const R=m;for(let O=0;O<=s;O++){const P=O/s*u+l,A=Math.cos(P),D=Math.sin(P);M.x=S*D,M.y=v*w,M.z=S*A,d.push(M.x,M.y,M.z),p.push(0,w,0),E.x=A*.5+.5,E.y=D*.5*w+.5,f.push(E.x,E.y),m++}for(let O=0;O<s;O++){const P=T+O,A=R+O;b===!0?h.push(A,A+1,P):h.push(A+1,A,P),C+=3}c.addGroup(g,C,b===!0?1:2),g+=C}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new yf(e.radiusTop,e.radiusBottom,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}class kv extends yf{constructor(e=1,i=1,n=32,s=1,a=!1,o=0,l=Math.PI*2){super(0,e,i,n,s,a,o,l),this.type="ConeGeometry",this.parameters={radius:e,height:i,radialSegments:n,heightSegments:s,openEnded:a,thetaStart:o,thetaLength:l}}static fromJSON(e){return new kv(e.radius,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}let S2=class IO extends Kr{constructor(e=1,i=32,n=16,s=0,a=Math.PI*2,o=0,l=Math.PI){super(),this.type="SphereGeometry",this.parameters={radius:e,widthSegments:i,heightSegments:n,phiStart:s,phiLength:a,thetaStart:o,thetaLength:l},i=Math.max(3,Math.floor(i)),n=Math.max(2,Math.floor(n));const u=Math.min(o+l,Math.PI);let c=0;const h=[],d=new K,p=new K,f=[],m=[],y=[],v=[];for(let g=0;g<=n;g++){const _=[],x=g/n;let b=0;g===0&&o===0?b=.5/i:g===n&&u===Math.PI&&(b=-.5/i);for(let T=0;T<=i;T++){const E=T/i;d.x=-e*Math.cos(s+E*a)*Math.sin(o+x*l),d.y=e*Math.cos(o+x*l),d.z=e*Math.sin(s+E*a)*Math.sin(o+x*l),m.push(d.x,d.y,d.z),p.copy(d).normalize(),y.push(p.x,p.y,p.z),v.push(E+b,1-x),_.push(c++)}h.push(_)}for(let g=0;g<n;g++)for(let _=0;_<i;_++){const x=h[g][_+1],b=h[g][_],T=h[g+1][_],E=h[g+1][_+1];(g!==0||o>0)&&f.push(x,b,E),(g!==n-1||u<Math.PI)&&f.push(b,T,E)}this.setIndex(f),this.setAttribute("position",new xi(m,3)),this.setAttribute("normal",new xi(y,3)),this.setAttribute("uv",new xi(v,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new IO(e.radius,e.widthSegments,e.heightSegments,e.phiStart,e.phiLength,e.thetaStart,e.thetaLength)}};class Uv extends Kr{constructor(e=new Dv(new K(-1,-1,0),new K(-1,1,0),new K(1,1,0)),i=64,n=1,s=8,a=!1){super(),this.type="TubeGeometry",this.parameters={path:e,tubularSegments:i,radius:n,radialSegments:s,closed:a};const o=e.computeFrenetFrames(i,a);this.tangents=o.tangents,this.normals=o.normals,this.binormals=o.binormals;const l=new K,u=new K,c=new ke;let h=new K;const d=[],p=[],f=[],m=[];y(),this.setIndex(m),this.setAttribute("position",new xi(d,3)),this.setAttribute("normal",new xi(p,3)),this.setAttribute("uv",new xi(f,2));function y(){for(let x=0;x<i;x++)v(x);v(a===!1?i:0),_(),g()}function v(x){h=e.getPointAt(x/i,h);const b=o.normals[x],T=o.binormals[x];for(let E=0;E<=s;E++){const M=E/s*Math.PI*2,C=Math.sin(M),S=-Math.cos(M);u.x=S*b.x+C*T.x,u.y=S*b.y+C*T.y,u.z=S*b.z+C*T.z,u.normalize(),p.push(u.x,u.y,u.z),l.x=h.x+n*u.x,l.y=h.y+n*u.y,l.z=h.z+n*u.z,d.push(l.x,l.y,l.z)}}function g(){for(let x=1;x<=i;x++)for(let b=1;b<=s;b++){const T=(s+1)*(x-1)+(b-1),E=(s+1)*x+(b-1),M=(s+1)*x+b,C=(s+1)*(x-1)+b;m.push(T,E,C),m.push(E,M,C)}}function _(){for(let x=0;x<=i;x++)for(let b=0;b<=s;b++)c.x=x/i,c.y=b/s,f.push(c.x,c.y)}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}toJSON(){const e=super.toJSON();return e.path=this.parameters.path.toJSON(),e}static fromJSON(e){return new Uv(new Bj[e.path.type]().fromJSON(e.path),e.tubularSegments,e.radius,e.radialSegments,e.closed)}}let zj=class extends Uo{static get type(){return"MeshLambertMaterial"}constructor(r){super(),this.isMeshLambertMaterial=!0,this.color=new Ut(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Ut(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=iE,this.normalScale=new ke(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new Oa,this.combine=l0,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(r)}copy(r){return super.copy(r),this.color.copy(r.color),this.map=r.map,this.lightMap=r.lightMap,this.lightMapIntensity=r.lightMapIntensity,this.aoMap=r.aoMap,this.aoMapIntensity=r.aoMapIntensity,this.emissive.copy(r.emissive),this.emissiveMap=r.emissiveMap,this.emissiveIntensity=r.emissiveIntensity,this.bumpMap=r.bumpMap,this.bumpScale=r.bumpScale,this.normalMap=r.normalMap,this.normalMapType=r.normalMapType,this.normalScale.copy(r.normalScale),this.displacementMap=r.displacementMap,this.displacementScale=r.displacementScale,this.displacementBias=r.displacementBias,this.specularMap=r.specularMap,this.alphaMap=r.alphaMap,this.envMap=r.envMap,this.envMapRotation.copy(r.envMapRotation),this.combine=r.combine,this.reflectivity=r.reflectivity,this.refractionRatio=r.refractionRatio,this.wireframe=r.wireframe,this.wireframeLinewidth=r.wireframeLinewidth,this.wireframeLinecap=r.wireframeLinecap,this.wireframeLinejoin=r.wireframeLinejoin,this.flatShading=r.flatShading,this.fog=r.fog,this}};const E2={enabled:!1,files:{},add:function(r,e){this.enabled!==!1&&(this.files[r]=e)},get:function(r){if(this.enabled!==!1)return this.files[r]},remove:function(r){delete this.files[r]},clear:function(){this.files={}}};class jj{constructor(e,i,n){const s=this;let a=!1,o=0,l=0,u;const c=[];this.onStart=void 0,this.onLoad=e,this.onProgress=i,this.onError=n,this.itemStart=function(h){l++,a===!1&&s.onStart!==void 0&&s.onStart(h,o,l),a=!0},this.itemEnd=function(h){o++,s.onProgress!==void 0&&s.onProgress(h,o,l),o===l&&(a=!1,s.onLoad!==void 0&&s.onLoad())},this.itemError=function(h){s.onError!==void 0&&s.onError(h)},this.resolveURL=function(h){return u?u(h):h},this.setURLModifier=function(h){return u=h,this},this.addHandler=function(h,d){return c.push(h,d),this},this.removeHandler=function(h){const d=c.indexOf(h);return d!==-1&&c.splice(d,2),this},this.getHandler=function(h){for(let d=0,p=c.length;d<p;d+=2){const f=c[d],m=c[d+1];if(f.global&&(f.lastIndex=0),f.test(h))return m}return null}}}const Vj=new jj;class Fv{constructor(e){this.manager=e!==void 0?e:Vj,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={}}load(){}loadAsync(e,i){const n=this;return new Promise(function(s,a){n.load(e,s,i,a)})}parse(){}setCrossOrigin(e){return this.crossOrigin=e,this}setWithCredentials(e){return this.withCredentials=e,this}setPath(e){return this.path=e,this}setResourcePath(e){return this.resourcePath=e,this}setRequestHeader(e){return this.requestHeader=e,this}}Fv.DEFAULT_MATERIAL_NAME="__DEFAULT";class Gj extends Fv{constructor(e){super(e)}load(e,i,n,s){this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const a=this,o=E2.get(e);if(o!==void 0)return a.manager.itemStart(e),setTimeout(function(){i&&i(o),a.manager.itemEnd(e)},0),o;const l=hh("img");function u(){h(),E2.add(e,this),i&&i(this),a.manager.itemEnd(e)}function c(d){h(),s&&s(d),a.manager.itemError(e),a.manager.itemEnd(e)}function h(){l.removeEventListener("load",u,!1),l.removeEventListener("error",c,!1)}return l.addEventListener("load",u,!1),l.addEventListener("error",c,!1),e.slice(0,5)!=="data:"&&this.crossOrigin!==void 0&&(l.crossOrigin=this.crossOrigin),a.manager.itemStart(e),l.src=e,l}}class Hj extends Fv{constructor(e){super(e)}load(e,i,n,s){const a=new hn,o=new Gj(this.manager);return o.setCrossOrigin(this.crossOrigin),o.setPath(this.path),o.load(e,function(l){a.image=l,a.needsUpdate=!0,i!==void 0&&i(a)},n,s),a}}let M2=class extends Or{constructor(r,e=1){super(),this.isLight=!0,this.type="Light",this.color=new Ut(r),this.intensity=e}dispose(){}copy(r,e){return super.copy(r,e),this.color.copy(r.color),this.intensity=r.intensity,this}toJSON(r){const e=super.toJSON(r);return e.object.color=this.color.getHex(),e.object.intensity=this.intensity,this.groundColor!==void 0&&(e.object.groundColor=this.groundColor.getHex()),this.distance!==void 0&&(e.object.distance=this.distance),this.angle!==void 0&&(e.object.angle=this.angle),this.decay!==void 0&&(e.object.decay=this.decay),this.penumbra!==void 0&&(e.object.penumbra=this.penumbra),this.shadow!==void 0&&(e.object.shadow=this.shadow.toJSON()),this.target!==void 0&&(e.object.target=this.target.uuid),e}};const Bv=new si,A2=new K,C2=new K;let Wj=class{constructor(r){this.camera=r,this.intensity=1,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new ke(512,512),this.map=null,this.mapPass=null,this.matrix=new si,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new yv,this._frameExtents=new ke(1,1),this._viewportCount=1,this._viewports=[new Ni(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(r){const e=this.camera,i=this.matrix;A2.setFromMatrixPosition(r.matrixWorld),e.position.copy(A2),C2.setFromMatrixPosition(r.target.matrixWorld),e.lookAt(C2),e.updateMatrixWorld(),Bv.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),this._frustum.setFromProjectionMatrix(Bv),i.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),i.multiply(Bv)}getViewport(r){return this._viewports[r]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(r){return this.camera=r.camera.clone(),this.intensity=r.intensity,this.bias=r.bias,this.radius=r.radius,this.mapSize.copy(r.mapSize),this}clone(){return new this.constructor().copy(this)}toJSON(){const r={};return this.intensity!==1&&(r.intensity=this.intensity),this.bias!==0&&(r.bias=this.bias),this.normalBias!==0&&(r.normalBias=this.normalBias),this.radius!==1&&(r.radius=this.radius),(this.mapSize.x!==512||this.mapSize.y!==512)&&(r.mapSize=this.mapSize.toArray()),r.camera=this.camera.toJSON(!1).object,delete r.camera.matrix,r}},qj=class extends Wj{constructor(){super(new vv(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}},Xj=class extends M2{constructor(r,e){super(r,e),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(Or.DEFAULT_UP),this.updateMatrix(),this.target=new Or,this.shadow=new qj}dispose(){this.shadow.dispose()}copy(r){return super.copy(r),this.target=r.target.clone(),this.shadow=r.shadow.clone(),this}},Yj=class extends M2{constructor(r,e){super(r,e),this.isAmbientLight=!0,this.type="AmbientLight"}};class R2{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=N2(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let e=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const i=N2();e=(i-this.oldTime)/1e3,this.oldTime=i,this.elapsedTime+=e}return e}}function N2(){return performance.now()}const P2=new si;class I2{constructor(e,i,n=0,s=1/0){this.ray=new Gp(e,i),this.near=n,this.far=s,this.camera=null,this.layers=new rv,this.params={Mesh:{},Line:{threshold:1},LOD:{},Points:{threshold:1},Sprite:{}}}set(e,i){this.ray.set(e,i)}setFromCamera(e,i){i.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(i.matrixWorld),this.ray.direction.set(e.x,e.y,.5).unproject(i).sub(this.ray.origin).normalize(),this.camera=i):i.isOrthographicCamera?(this.ray.origin.set(e.x,e.y,(i.near+i.far)/(i.near-i.far)).unproject(i),this.ray.direction.set(0,0,-1).transformDirection(i.matrixWorld),this.camera=i):console.error("THREE.Raycaster: Unsupported camera type: "+i.type)}setFromXRController(e){return P2.identity().extractRotation(e.matrixWorld),this.ray.origin.setFromMatrixPosition(e.matrixWorld),this.ray.direction.set(0,0,-1).applyMatrix4(P2),this}intersectObject(e,i=!0,n=[]){return zv(e,this,n,i),n.sort(O2),n}intersectObjects(e,i=!0,n=[]){for(let s=0,a=e.length;s<a;s++)zv(e[s],this,n,i);return n.sort(O2),n}}function O2(r,e){return r.distance-e.distance}function zv(r,e,i,n){let s=!0;if(r.layers.test(e.layers)&&r.raycast(e,i)===!1&&(s=!1),s===!0&&n===!0){const a=r.children;for(let o=0,l=a.length;o<l;o++)zv(a[o],e,i,!0)}}class D2{constructor(e=1,i=0,n=0){return this.radius=e,this.phi=i,this.theta=n,this}set(e,i,n){return this.radius=e,this.phi=i,this.theta=n,this}copy(e){return this.radius=e.radius,this.phi=e.phi,this.theta=e.theta,this}makeSafe(){return this.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this.phi)),this}setFromVector3(e){return this.setFromCartesianCoords(e.x,e.y,e.z)}setFromCartesianCoords(e,i,n){return this.radius=Math.sqrt(e*e+i*i+n*n),this.radius===0?(this.theta=0,this.phi=0):(this.theta=Math.atan2(e,n),this.phi=Math.acos(Wi(i/this.radius,-1,1))),this}clone(){return new this.constructor().copy(this)}}class vf extends Oo{constructor(e,i=null){super(),this.object=e,this.domElement=i,this.enabled=!0,this.state=-1,this.keys={},this.mouseButtons={LEFT:null,MIDDLE:null,RIGHT:null},this.touches={ONE:null,TWO:null}}connect(){}disconnect(){}dispose(){}update(){}}typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:Ap}})),typeof window<"u"&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=Ap);function L2(r,e,i){var n,s=1;r==null&&(r=0),e==null&&(e=0),i==null&&(i=0);function a(){var o,l=n.length,u,c=0,h=0,d=0;for(o=0;o<l;++o)u=n[o],c+=u.x||0,h+=u.y||0,d+=u.z||0;for(c=(c/l-r)*s,h=(h/l-e)*s,d=(d/l-i)*s,o=0;o<l;++o)u=n[o],c&&(u.x-=c),h&&(u.y-=h),d&&(u.z-=d)}return a.initialize=function(o){n=o},a.x=function(o){return arguments.length?(r=+o,a):r},a.y=function(o){return arguments.length?(e=+o,a):e},a.z=function(o){return arguments.length?(i=+o,a):i},a.strength=function(o){return arguments.length?(s=+o,a):s},a}function Kj(r){const e=+this._x.call(null,r);return k2(this.cover(e),e,r)}function k2(r,e,i){if(isNaN(e))return r;var n,s=r._root,a={data:i},o=r._x0,l=r._x1,u,c,h,d,p;if(!s)return r._root=a,r;for(;s.length;)if((h=e>=(u=(o+l)/2))?o=u:l=u,n=s,!(s=s[d=+h]))return n[d]=a,r;if(c=+r._x.call(null,s.data),e===c)return a.next=s,n?n[d]=a:r._root=a,r;do n=n?n[d]=new Array(2):r._root=new Array(2),(h=e>=(u=(o+l)/2))?o=u:l=u;while((d=+h)==(p=+(c>=u)));return n[p]=s,n[d]=a,r}function Zj(r){Array.isArray(r)||(r=Array.from(r));const e=r.length,i=new Float64Array(e);let n=1/0,s=-1/0;for(let a=0,o;a<e;++a)isNaN(o=+this._x.call(null,r[a]))||(i[a]=o,o<n&&(n=o),o>s&&(s=o));if(n>s)return this;this.cover(n).cover(s);for(let a=0;a<e;++a)k2(this,i[a],r[a]);return this}function Qj(r){if(isNaN(r=+r))return this;var e=this._x0,i=this._x1;if(isNaN(e))i=(e=Math.floor(r))+1;else{for(var n=i-e||1,s=this._root,a,o;e>r||r>=i;)switch(o=+(r<e),a=new Array(2),a[o]=s,s=a,n*=2,o){case 0:i=e+n;break;case 1:e=i-n;break}this._root&&this._root.length&&(this._root=s)}return this._x0=e,this._x1=i,this}function $j(){var r=[];return this.visit(function(e){if(!e.length)do r.push(e.data);while(e=e.next)}),r}function Jj(r){return arguments.length?this.cover(+r[0][0]).cover(+r[1][0]):isNaN(this._x0)?void 0:[[this._x0],[this._x1]]}function Vs(r,e,i){this.node=r,this.x0=e,this.x1=i}function e8(r,e){var i,n=this._x0,s,a,o=this._x1,l=[],u=this._root,c,h;for(u&&l.push(new Vs(u,n,o)),e==null?e=1/0:(n=r-e,o=r+e);c=l.pop();)if(!(!(u=c.node)||(s=c.x0)>o||(a=c.x1)<n))if(u.length){var d=(s+a)/2;l.push(new Vs(u[1],d,a),new Vs(u[0],s,d)),(h=+(r>=d))&&(c=l[l.length-1],l[l.length-1]=l[l.length-1-h],l[l.length-1-h]=c)}else{var p=Math.abs(r-+this._x.call(null,u.data));p<e&&(e=p,n=r-p,o=r+p,i=u.data)}return i}function t8(r){if(isNaN(u=+this._x.call(null,r)))return this;var e,i=this._root,n,s,a,o=this._x0,l=this._x1,u,c,h,d,p;if(!i)return this;if(i.length)for(;;){if((h=u>=(c=(o+l)/2))?o=c:l=c,e=i,!(i=i[d=+h]))return this;if(!i.length)break;e[d+1&1]&&(n=e,p=d)}for(;i.data!==r;)if(s=i,!(i=i.next))return this;return(a=i.next)&&delete i.next,s?(a?s.next=a:delete s.next,this):e?(a?e[d]=a:delete e[d],(i=e[0]||e[1])&&i===(e[1]||e[0])&&!i.length&&(n?n[p]=i:this._root=i),this):(this._root=a,this)}function i8(r){for(var e=0,i=r.length;e<i;++e)this.remove(r[e]);return this}function r8(){return this._root}function n8(){var r=0;return this.visit(function(e){if(!e.length)do++r;while(e=e.next)}),r}function s8(r){var e=[],i,n=this._root,s,a,o;for(n&&e.push(new Vs(n,this._x0,this._x1));i=e.pop();)if(!r(n=i.node,a=i.x0,o=i.x1)&&n.length){var l=(a+o)/2;(s=n[1])&&e.push(new Vs(s,l,o)),(s=n[0])&&e.push(new Vs(s,a,l))}return this}function a8(r){var e=[],i=[],n;for(this._root&&e.push(new Vs(this._root,this._x0,this._x1));n=e.pop();){var s=n.node;if(s.length){var a,o=n.x0,l=n.x1,u=(o+l)/2;(a=s[0])&&e.push(new Vs(a,o,u)),(a=s[1])&&e.push(new Vs(a,u,l))}i.push(n)}for(;n=i.pop();)r(n.node,n.x0,n.x1);return this}function o8(r){return r[0]}function l8(r){return arguments.length?(this._x=r,this):this._x}function U2(r,e){var i=new jv(e??o8,NaN,NaN);return r==null?i:i.addAll(r)}function jv(r,e,i){this._x=r,this._x0=e,this._x1=i,this._root=void 0}function F2(r){for(var e={data:r.data},i=e;r=r.next;)i=i.next={data:r.data};return e}var Lr=U2.prototype=jv.prototype;Lr.copy=function(){var r=new jv(this._x,this._x0,this._x1),e=this._root,i,n;if(!e)return r;if(!e.length)return r._root=F2(e),r;for(i=[{source:e,target:r._root=new Array(2)}];e=i.pop();)for(var s=0;s<2;++s)(n=e.source[s])&&(n.length?i.push({source:n,target:e.target[s]=new Array(2)}):e.target[s]=F2(n));return r},Lr.add=Kj,Lr.addAll=Zj,Lr.cover=Qj,Lr.data=$j,Lr.extent=Jj,Lr.find=e8,Lr.remove=t8,Lr.removeAll=i8,Lr.root=r8,Lr.size=n8,Lr.visit=s8,Lr.visitAfter=a8,Lr.x=l8;function u8(r){const e=+this._x.call(null,r),i=+this._y.call(null,r);return B2(this.cover(e,i),e,i,r)}function B2(r,e,i,n){if(isNaN(e)||isNaN(i))return r;var s,a=r._root,o={data:n},l=r._x0,u=r._y0,c=r._x1,h=r._y1,d,p,f,m,y,v,g,_;if(!a)return r._root=o,r;for(;a.length;)if((y=e>=(d=(l+c)/2))?l=d:c=d,(v=i>=(p=(u+h)/2))?u=p:h=p,s=a,!(a=a[g=v<<1|y]))return s[g]=o,r;if(f=+r._x.call(null,a.data),m=+r._y.call(null,a.data),e===f&&i===m)return o.next=a,s?s[g]=o:r._root=o,r;do s=s?s[g]=new Array(4):r._root=new Array(4),(y=e>=(d=(l+c)/2))?l=d:c=d,(v=i>=(p=(u+h)/2))?u=p:h=p;while((g=v<<1|y)===(_=(m>=p)<<1|f>=d));return s[_]=a,s[g]=o,r}function c8(r){var e,i,n=r.length,s,a,o=new Array(n),l=new Array(n),u=1/0,c=1/0,h=-1/0,d=-1/0;for(i=0;i<n;++i)isNaN(s=+this._x.call(null,e=r[i]))||isNaN(a=+this._y.call(null,e))||(o[i]=s,l[i]=a,s<u&&(u=s),s>h&&(h=s),a<c&&(c=a),a>d&&(d=a));if(u>h||c>d)return this;for(this.cover(u,c).cover(h,d),i=0;i<n;++i)B2(this,o[i],l[i],r[i]);return this}function h8(r,e){if(isNaN(r=+r)||isNaN(e=+e))return this;var i=this._x0,n=this._y0,s=this._x1,a=this._y1;if(isNaN(i))s=(i=Math.floor(r))+1,a=(n=Math.floor(e))+1;else{for(var o=s-i||1,l=this._root,u,c;i>r||r>=s||n>e||e>=a;)switch(c=(e<n)<<1|r<i,u=new Array(4),u[c]=l,l=u,o*=2,c){case 0:s=i+o,a=n+o;break;case 1:i=s-o,a=n+o;break;case 2:s=i+o,n=a-o;break;case 3:i=s-o,n=a-o;break}this._root&&this._root.length&&(this._root=l)}return this._x0=i,this._y0=n,this._x1=s,this._y1=a,this}function d8(){var r=[];return this.visit(function(e){if(!e.length)do r.push(e.data);while(e=e.next)}),r}function p8(r){return arguments.length?this.cover(+r[0][0],+r[0][1]).cover(+r[1][0],+r[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function br(r,e,i,n,s){this.node=r,this.x0=e,this.y0=i,this.x1=n,this.y1=s}function f8(r,e,i){var n,s=this._x0,a=this._y0,o,l,u,c,h=this._x1,d=this._y1,p=[],f=this._root,m,y;for(f&&p.push(new br(f,s,a,h,d)),i==null?i=1/0:(s=r-i,a=e-i,h=r+i,d=e+i,i*=i);m=p.pop();)if(!(!(f=m.node)||(o=m.x0)>h||(l=m.y0)>d||(u=m.x1)<s||(c=m.y1)<a))if(f.length){var v=(o+u)/2,g=(l+c)/2;p.push(new br(f[3],v,g,u,c),new br(f[2],o,g,v,c),new br(f[1],v,l,u,g),new br(f[0],o,l,v,g)),(y=(e>=g)<<1|r>=v)&&(m=p[p.length-1],p[p.length-1]=p[p.length-1-y],p[p.length-1-y]=m)}else{var _=r-+this._x.call(null,f.data),x=e-+this._y.call(null,f.data),b=_*_+x*x;if(b<i){var T=Math.sqrt(i=b);s=r-T,a=e-T,h=r+T,d=e+T,n=f.data}}return n}function m8(r){if(isNaN(h=+this._x.call(null,r))||isNaN(d=+this._y.call(null,r)))return this;var e,i=this._root,n,s,a,o=this._x0,l=this._y0,u=this._x1,c=this._y1,h,d,p,f,m,y,v,g;if(!i)return this;if(i.length)for(;;){if((m=h>=(p=(o+u)/2))?o=p:u=p,(y=d>=(f=(l+c)/2))?l=f:c=f,e=i,!(i=i[v=y<<1|m]))return this;if(!i.length)break;(e[v+1&3]||e[v+2&3]||e[v+3&3])&&(n=e,g=v)}for(;i.data!==r;)if(s=i,!(i=i.next))return this;return(a=i.next)&&delete i.next,s?(a?s.next=a:delete s.next,this):e?(a?e[v]=a:delete e[v],(i=e[0]||e[1]||e[2]||e[3])&&i===(e[3]||e[2]||e[1]||e[0])&&!i.length&&(n?n[g]=i:this._root=i),this):(this._root=a,this)}function g8(r){for(var e=0,i=r.length;e<i;++e)this.remove(r[e]);return this}function y8(){return this._root}function v8(){var r=0;return this.visit(function(e){if(!e.length)do++r;while(e=e.next)}),r}function b8(r){var e=[],i,n=this._root,s,a,o,l,u;for(n&&e.push(new br(n,this._x0,this._y0,this._x1,this._y1));i=e.pop();)if(!r(n=i.node,a=i.x0,o=i.y0,l=i.x1,u=i.y1)&&n.length){var c=(a+l)/2,h=(o+u)/2;(s=n[3])&&e.push(new br(s,c,h,l,u)),(s=n[2])&&e.push(new br(s,a,h,c,u)),(s=n[1])&&e.push(new br(s,c,o,l,h)),(s=n[0])&&e.push(new br(s,a,o,c,h))}return this}function x8(r){var e=[],i=[],n;for(this._root&&e.push(new br(this._root,this._x0,this._y0,this._x1,this._y1));n=e.pop();){var s=n.node;if(s.length){var a,o=n.x0,l=n.y0,u=n.x1,c=n.y1,h=(o+u)/2,d=(l+c)/2;(a=s[0])&&e.push(new br(a,o,l,h,d)),(a=s[1])&&e.push(new br(a,h,l,u,d)),(a=s[2])&&e.push(new br(a,o,d,h,c)),(a=s[3])&&e.push(new br(a,h,d,u,c))}i.push(n)}for(;n=i.pop();)r(n.node,n.x0,n.y0,n.x1,n.y1);return this}function _8(r){return r[0]}function T8(r){return arguments.length?(this._x=r,this):this._x}function w8(r){return r[1]}function S8(r){return arguments.length?(this._y=r,this):this._y}function z2(r,e,i){var n=new Vv(e??_8,i??w8,NaN,NaN,NaN,NaN);return r==null?n:n.addAll(r)}function Vv(r,e,i,n,s,a){this._x=r,this._y=e,this._x0=i,this._y0=n,this._x1=s,this._y1=a,this._root=void 0}function j2(r){for(var e={data:r.data},i=e;r=r.next;)i=i.next={data:r.data};return e}var xr=z2.prototype=Vv.prototype;xr.copy=function(){var r=new Vv(this._x,this._y,this._x0,this._y0,this._x1,this._y1),e=this._root,i,n;if(!e)return r;if(!e.length)return r._root=j2(e),r;for(i=[{source:e,target:r._root=new Array(4)}];e=i.pop();)for(var s=0;s<4;++s)(n=e.source[s])&&(n.length?i.push({source:n,target:e.target[s]=new Array(4)}):e.target[s]=j2(n));return r},xr.add=u8,xr.addAll=c8,xr.cover=h8,xr.data=d8,xr.extent=p8,xr.find=f8,xr.remove=m8,xr.removeAll=g8,xr.root=y8,xr.size=v8,xr.visit=b8,xr.visitAfter=x8,xr.x=T8,xr.y=S8;function E8(r){const e=+this._x.call(null,r),i=+this._y.call(null,r),n=+this._z.call(null,r);return V2(this.cover(e,i,n),e,i,n,r)}function V2(r,e,i,n,s){if(isNaN(e)||isNaN(i)||isNaN(n))return r;var a,o=r._root,l={data:s},u=r._x0,c=r._y0,h=r._z0,d=r._x1,p=r._y1,f=r._z1,m,y,v,g,_,x,b,T,E,M,C;if(!o)return r._root=l,r;for(;o.length;)if((b=e>=(m=(u+d)/2))?u=m:d=m,(T=i>=(y=(c+p)/2))?c=y:p=y,(E=n>=(v=(h+f)/2))?h=v:f=v,a=o,!(o=o[M=E<<2|T<<1|b]))return a[M]=l,r;if(g=+r._x.call(null,o.data),_=+r._y.call(null,o.data),x=+r._z.call(null,o.data),e===g&&i===_&&n===x)return l.next=o,a?a[M]=l:r._root=l,r;do a=a?a[M]=new Array(8):r._root=new Array(8),(b=e>=(m=(u+d)/2))?u=m:d=m,(T=i>=(y=(c+p)/2))?c=y:p=y,(E=n>=(v=(h+f)/2))?h=v:f=v;while((M=E<<2|T<<1|b)===(C=(x>=v)<<2|(_>=y)<<1|g>=m));return a[C]=o,a[M]=l,r}function M8(r){Array.isArray(r)||(r=Array.from(r));const e=r.length,i=new Float64Array(e),n=new Float64Array(e),s=new Float64Array(e);let a=1/0,o=1/0,l=1/0,u=-1/0,c=-1/0,h=-1/0;for(let d=0,p,f,m,y;d<e;++d)isNaN(f=+this._x.call(null,p=r[d]))||isNaN(m=+this._y.call(null,p))||isNaN(y=+this._z.call(null,p))||(i[d]=f,n[d]=m,s[d]=y,f<a&&(a=f),f>u&&(u=f),m<o&&(o=m),m>c&&(c=m),y<l&&(l=y),y>h&&(h=y));if(a>u||o>c||l>h)return this;this.cover(a,o,l).cover(u,c,h);for(let d=0;d<e;++d)V2(this,i[d],n[d],s[d],r[d]);return this}function A8(r,e,i){if(isNaN(r=+r)||isNaN(e=+e)||isNaN(i=+i))return this;var n=this._x0,s=this._y0,a=this._z0,o=this._x1,l=this._y1,u=this._z1;if(isNaN(n))o=(n=Math.floor(r))+1,l=(s=Math.floor(e))+1,u=(a=Math.floor(i))+1;else{for(var c=o-n||1,h=this._root,d,p;n>r||r>=o||s>e||e>=l||a>i||i>=u;)switch(p=(i<a)<<2|(e<s)<<1|r<n,d=new Array(8),d[p]=h,h=d,c*=2,p){case 0:o=n+c,l=s+c,u=a+c;break;case 1:n=o-c,l=s+c,u=a+c;break;case 2:o=n+c,s=l-c,u=a+c;break;case 3:n=o-c,s=l-c,u=a+c;break;case 4:o=n+c,l=s+c,a=u-c;break;case 5:n=o-c,l=s+c,a=u-c;break;case 6:o=n+c,s=l-c,a=u-c;break;case 7:n=o-c,s=l-c,a=u-c;break}this._root&&this._root.length&&(this._root=h)}return this._x0=n,this._y0=s,this._z0=a,this._x1=o,this._y1=l,this._z1=u,this}function C8(){var r=[];return this.visit(function(e){if(!e.length)do r.push(e.data);while(e=e.next)}),r}function R8(r){return arguments.length?this.cover(+r[0][0],+r[0][1],+r[0][2]).cover(+r[1][0],+r[1][1],+r[1][2]):isNaN(this._x0)?void 0:[[this._x0,this._y0,this._z0],[this._x1,this._y1,this._z1]]}function ri(r,e,i,n,s,a,o){this.node=r,this.x0=e,this.y0=i,this.z0=n,this.x1=s,this.y1=a,this.z1=o}function N8(r,e,i,n){var s,a=this._x0,o=this._y0,l=this._z0,u,c,h,d,p,f,m=this._x1,y=this._y1,v=this._z1,g=[],_=this._root,x,b;for(_&&g.push(new ri(_,a,o,l,m,y,v)),n==null?n=1/0:(a=r-n,o=e-n,l=i-n,m=r+n,y=e+n,v=i+n,n*=n);x=g.pop();)if(!(!(_=x.node)||(u=x.x0)>m||(c=x.y0)>y||(h=x.z0)>v||(d=x.x1)<a||(p=x.y1)<o||(f=x.z1)<l))if(_.length){var T=(u+d)/2,E=(c+p)/2,M=(h+f)/2;g.push(new ri(_[7],T,E,M,d,p,f),new ri(_[6],u,E,M,T,p,f),new ri(_[5],T,c,M,d,E,f),new ri(_[4],u,c,M,T,E,f),new ri(_[3],T,E,h,d,p,M),new ri(_[2],u,E,h,T,p,M),new ri(_[1],T,c,h,d,E,M),new ri(_[0],u,c,h,T,E,M)),(b=(i>=M)<<2|(e>=E)<<1|r>=T)&&(x=g[g.length-1],g[g.length-1]=g[g.length-1-b],g[g.length-1-b]=x)}else{var C=r-+this._x.call(null,_.data),S=e-+this._y.call(null,_.data),w=i-+this._z.call(null,_.data),R=C*C+S*S+w*w;if(R<n){var O=Math.sqrt(n=R);a=r-O,o=e-O,l=i-O,m=r+O,y=e+O,v=i+O,s=_.data}}return s}const P8=(r,e,i,n,s,a)=>Math.sqrt((r-n)**2+(e-s)**2+(i-a)**2);function I8(r,e,i,n){const s=[],a=r-n,o=e-n,l=i-n,u=r+n,c=e+n,h=i+n;return this.visit((d,p,f,m,y,v,g)=>{if(!d.length)do{const _=d.data;P8(r,e,i,this._x(_),this._y(_),this._z(_))<=n&&s.push(_)}while(d=d.next);return p>u||f>c||m>h||y<a||v<o||g<l}),s}function O8(r){if(isNaN(p=+this._x.call(null,r))||isNaN(f=+this._y.call(null,r))||isNaN(m=+this._z.call(null,r)))return this;var e,i=this._root,n,s,a,o=this._x0,l=this._y0,u=this._z0,c=this._x1,h=this._y1,d=this._z1,p,f,m,y,v,g,_,x,b,T,E;if(!i)return this;if(i.length)for(;;){if((_=p>=(y=(o+c)/2))?o=y:c=y,(x=f>=(v=(l+h)/2))?l=v:h=v,(b=m>=(g=(u+d)/2))?u=g:d=g,e=i,!(i=i[T=b<<2|x<<1|_]))return this;if(!i.length)break;(e[T+1&7]||e[T+2&7]||e[T+3&7]||e[T+4&7]||e[T+5&7]||e[T+6&7]||e[T+7&7])&&(n=e,E=T)}for(;i.data!==r;)if(s=i,!(i=i.next))return this;return(a=i.next)&&delete i.next,s?(a?s.next=a:delete s.next,this):e?(a?e[T]=a:delete e[T],(i=e[0]||e[1]||e[2]||e[3]||e[4]||e[5]||e[6]||e[7])&&i===(e[7]||e[6]||e[5]||e[4]||e[3]||e[2]||e[1]||e[0])&&!i.length&&(n?n[E]=i:this._root=i),this):(this._root=a,this)}function D8(r){for(var e=0,i=r.length;e<i;++e)this.remove(r[e]);return this}function L8(){return this._root}function k8(){var r=0;return this.visit(function(e){if(!e.length)do++r;while(e=e.next)}),r}function U8(r){var e=[],i,n=this._root,s,a,o,l,u,c,h;for(n&&e.push(new ri(n,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1));i=e.pop();)if(!r(n=i.node,a=i.x0,o=i.y0,l=i.z0,u=i.x1,c=i.y1,h=i.z1)&&n.length){var d=(a+u)/2,p=(o+c)/2,f=(l+h)/2;(s=n[7])&&e.push(new ri(s,d,p,f,u,c,h)),(s=n[6])&&e.push(new ri(s,a,p,f,d,c,h)),(s=n[5])&&e.push(new ri(s,d,o,f,u,p,h)),(s=n[4])&&e.push(new ri(s,a,o,f,d,p,h)),(s=n[3])&&e.push(new ri(s,d,p,l,u,c,f)),(s=n[2])&&e.push(new ri(s,a,p,l,d,c,f)),(s=n[1])&&e.push(new ri(s,d,o,l,u,p,f)),(s=n[0])&&e.push(new ri(s,a,o,l,d,p,f))}return this}function F8(r){var e=[],i=[],n;for(this._root&&e.push(new ri(this._root,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1));n=e.pop();){var s=n.node;if(s.length){var a,o=n.x0,l=n.y0,u=n.z0,c=n.x1,h=n.y1,d=n.z1,p=(o+c)/2,f=(l+h)/2,m=(u+d)/2;(a=s[0])&&e.push(new ri(a,o,l,u,p,f,m)),(a=s[1])&&e.push(new ri(a,p,l,u,c,f,m)),(a=s[2])&&e.push(new ri(a,o,f,u,p,h,m)),(a=s[3])&&e.push(new ri(a,p,f,u,c,h,m)),(a=s[4])&&e.push(new ri(a,o,l,m,p,f,d)),(a=s[5])&&e.push(new ri(a,p,l,m,c,f,d)),(a=s[6])&&e.push(new ri(a,o,f,m,p,h,d)),(a=s[7])&&e.push(new ri(a,p,f,m,c,h,d))}i.push(n)}for(;n=i.pop();)r(n.node,n.x0,n.y0,n.z0,n.x1,n.y1,n.z1);return this}function B8(r){return r[0]}function z8(r){return arguments.length?(this._x=r,this):this._x}function j8(r){return r[1]}function V8(r){return arguments.length?(this._y=r,this):this._y}function G8(r){return r[2]}function H8(r){return arguments.length?(this._z=r,this):this._z}function G2(r,e,i,n){var s=new Gv(e??B8,i??j8,n??G8,NaN,NaN,NaN,NaN,NaN,NaN);return r==null?s:s.addAll(r)}function Gv(r,e,i,n,s,a,o,l,u){this._x=r,this._y=e,this._z=i,this._x0=n,this._y0=s,this._z0=a,this._x1=o,this._y1=l,this._z1=u,this._root=void 0}function H2(r){for(var e={data:r.data},i=e;r=r.next;)i=i.next={data:r.data};return e}var $i=G2.prototype=Gv.prototype;$i.copy=function(){var r=new Gv(this._x,this._y,this._z,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1),e=this._root,i,n;if(!e)return r;if(!e.length)return r._root=H2(e),r;for(i=[{source:e,target:r._root=new Array(8)}];e=i.pop();)for(var s=0;s<8;++s)(n=e.source[s])&&(n.length?i.push({source:n,target:e.target[s]=new Array(8)}):e.target[s]=H2(n));return r},$i.add=E8,$i.addAll=M8,$i.cover=A8,$i.data=C8,$i.extent=R8,$i.find=N8,$i.findAllWithinRadius=I8,$i.remove=O8,$i.removeAll=D8,$i.root=L8,$i.size=k8,$i.visit=U8,$i.visitAfter=F8,$i.x=z8,$i.y=V8,$i.z=H8;function Gs(r){return function(){return r}}function Hs(r){return(r()-.5)*1e-6}function W8(r){return r.index}function W2(r,e){var i=r.get(e);if(!i)throw new Error("node not found: "+e);return i}function q2(r){var e=W8,i=p,n,s=Gs(30),a,o,l,u,c,h,d=1;r==null&&(r=[]);function p(g){return 1/Math.min(u[g.source.index],u[g.target.index])}function f(g){for(var _=0,x=r.length;_<d;++_)for(var b=0,T,E,M,C=0,S=0,w=0,R,O;b<x;++b)T=r[b],E=T.source,M=T.target,C=M.x+M.vx-E.x-E.vx||Hs(h),l>1&&(S=M.y+M.vy-E.y-E.vy||Hs(h)),l>2&&(w=M.z+M.vz-E.z-E.vz||Hs(h)),R=Math.sqrt(C*C+S*S+w*w),R=(R-a[b])/R*g*n[b],C*=R,S*=R,w*=R,M.vx-=C*(O=c[b]),l>1&&(M.vy-=S*O),l>2&&(M.vz-=w*O),E.vx+=C*(O=1-O),l>1&&(E.vy+=S*O),l>2&&(E.vz+=w*O)}function m(){if(o){var g,_=o.length,x=r.length,b=new Map(o.map((E,M)=>[e(E,M,o),E])),T;for(g=0,u=new Array(_);g<x;++g)T=r[g],T.index=g,typeof T.source!="object"&&(T.source=W2(b,T.source)),typeof T.target!="object"&&(T.target=W2(b,T.target)),u[T.source.index]=(u[T.source.index]||0)+1,u[T.target.index]=(u[T.target.index]||0)+1;for(g=0,c=new Array(x);g<x;++g)T=r[g],c[g]=u[T.source.index]/(u[T.source.index]+u[T.target.index]);n=new Array(x),y(),a=new Array(x),v()}}function y(){if(o)for(var g=0,_=r.length;g<_;++g)n[g]=+i(r[g],g,r)}function v(){if(o)for(var g=0,_=r.length;g<_;++g)a[g]=+s(r[g],g,r)}return f.initialize=function(g,..._){o=g,h=_.find(x=>typeof x=="function")||Math.random,l=_.find(x=>[1,2,3].includes(x))||2,m()},f.links=function(g){return arguments.length?(r=g,m(),f):r},f.id=function(g){return arguments.length?(e=g,f):e},f.iterations=function(g){return arguments.length?(d=+g,f):d},f.strength=function(g){return arguments.length?(i=typeof g=="function"?g:Gs(+g),y(),f):i},f.distance=function(g){return arguments.length?(s=typeof g=="function"?g:Gs(+g),v(),f):s},f}var q8={value:()=>{}};function Eh(){for(var r=0,e=arguments.length,i={},n;r<e;++r){if(!(n=arguments[r]+"")||n in i||/[\s.]/.test(n))throw new Error("illegal type: "+n);i[n]=[]}return new bf(i)}function bf(r){this._=r}function X8(r,e){return r.trim().split(/^|\s+/).map(function(i){var n="",s=i.indexOf(".");if(s>=0&&(n=i.slice(s+1),i=i.slice(0,s)),i&&!e.hasOwnProperty(i))throw new Error("unknown type: "+i);return{type:i,name:n}})}bf.prototype=Eh.prototype={constructor:bf,on:function(r,e){var i=this._,n=X8(r+"",i),s,a=-1,o=n.length;if(arguments.length<2){for(;++a<o;)if((s=(r=n[a]).type)&&(s=Y8(i[s],r.name)))return s;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++a<o;)if(s=(r=n[a]).type)i[s]=X2(i[s],r.name,e);else if(e==null)for(s in i)i[s]=X2(i[s],r.name,null);return this},copy:function(){var r={},e=this._;for(var i in e)r[i]=e[i].slice();return new bf(r)},call:function(r,e){if((s=arguments.length-2)>0)for(var i=new Array(s),n=0,s,a;n<s;++n)i[n]=arguments[n+2];if(!this._.hasOwnProperty(r))throw new Error("unknown type: "+r);for(a=this._[r],n=0,s=a.length;n<s;++n)a[n].value.apply(e,i)},apply:function(r,e,i){if(!this._.hasOwnProperty(r))throw new Error("unknown type: "+r);for(var n=this._[r],s=0,a=n.length;s<a;++s)n[s].value.apply(e,i)}};function Y8(r,e){for(var i=0,n=r.length,s;i<n;++i)if((s=r[i]).name===e)return s.value}function X2(r,e,i){for(var n=0,s=r.length;n<s;++n)if(r[n].name===e){r[n]=q8,r=r.slice(0,n).concat(r.slice(n+1));break}return i!=null&&r.push({name:e,value:i}),r}var wu=0,Mh=0,Ah=0,Y2=1e3,xf,Ch,_f=0,Wo=0,Tf=0,Rh=typeof performance=="object"&&performance.now?performance:Date,K2=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(r){setTimeout(r,17)};function Hv(){return Wo||(K2(K8),Wo=Rh.now()+Tf)}function K8(){Wo=0}function wf(){this._call=this._time=this._next=null}wf.prototype=Wv.prototype={constructor:wf,restart:function(r,e,i){if(typeof r!="function")throw new TypeError("callback is not a function");i=(i==null?Hv():+i)+(e==null?0:+e),!this._next&&Ch!==this&&(Ch?Ch._next=this:xf=this,Ch=this),this._call=r,this._time=i,qv()},stop:function(){this._call&&(this._call=null,this._time=1/0,qv())}};function Wv(r,e,i){var n=new wf;return n.restart(r,e,i),n}function Z8(){Hv(),++wu;for(var r=xf,e;r;)(e=Wo-r._time)>=0&&r._call.call(void 0,e),r=r._next;--wu}function Z2(){Wo=(_f=Rh.now())+Tf,wu=Mh=0;try{Z8()}finally{wu=0,$8(),Wo=0}}function Q8(){var r=Rh.now(),e=r-_f;e>Y2&&(Tf-=e,_f=r)}function $8(){for(var r,e=xf,i,n=1/0;e;)e._call?(n>e._time&&(n=e._time),r=e,e=e._next):(i=e._next,e._next=null,e=r?r._next=i:xf=i);Ch=r,qv(n)}function qv(r){if(!wu){Mh&&(Mh=clearTimeout(Mh));var e=r-Wo;e>24?(r<1/0&&(Mh=setTimeout(Z2,r-Rh.now()-Tf)),Ah&&(Ah=clearInterval(Ah))):(Ah||(_f=Rh.now(),Ah=setInterval(Q8,Y2)),wu=1,K2(Z2))}}function Q2(r,e,i){var n=new wf;return e=e==null?0:+e,n.restart(s=>{n.stop(),r(s+e)},e,i),n}const J8=1664525,eV=1013904223,$2=4294967296;function tV(){let r=1;return()=>(r=(J8*r+eV)%$2)/$2}var J2=3;function Xv(r){return r.x}function eM(r){return r.y}function iV(r){return r.z}var rV=10,nV=Math.PI*(3-Math.sqrt(5)),sV=Math.PI*20/(9+Math.sqrt(221));function tM(r,e){e=e||2;var i=Math.min(J2,Math.max(1,Math.round(e))),n,s=1,a=.001,o=1-Math.pow(a,1/300),l=0,u=.6,c=new Map,h=Wv(f),d=Eh("tick","end"),p=tV();r==null&&(r=[]);function f(){m(),d.call("tick",n),s<a&&(h.stop(),d.call("end",n))}function m(g){var _,x=r.length,b;g===void 0&&(g=1);for(var T=0;T<g;++T)for(s+=(l-s)*o,c.forEach(function(E){E(s)}),_=0;_<x;++_)b=r[_],b.fx==null?b.x+=b.vx*=u:(b.x=b.fx,b.vx=0),i>1&&(b.fy==null?b.y+=b.vy*=u:(b.y=b.fy,b.vy=0)),i>2&&(b.fz==null?b.z+=b.vz*=u:(b.z=b.fz,b.vz=0));return n}function y(){for(var g=0,_=r.length,x;g<_;++g){if(x=r[g],x.index=g,x.fx!=null&&(x.x=x.fx),x.fy!=null&&(x.y=x.fy),x.fz!=null&&(x.z=x.fz),isNaN(x.x)||i>1&&isNaN(x.y)||i>2&&isNaN(x.z)){var b=rV*(i>2?Math.cbrt(.5+g):i>1?Math.sqrt(.5+g):g),T=g*nV,E=g*sV;i===1?x.x=b:i===2?(x.x=b*Math.cos(T),x.y=b*Math.sin(T)):(x.x=b*Math.sin(T)*Math.cos(E),x.y=b*Math.cos(T),x.z=b*Math.sin(T)*Math.sin(E))}(isNaN(x.vx)||i>1&&isNaN(x.vy)||i>2&&isNaN(x.vz))&&(x.vx=0,i>1&&(x.vy=0),i>2&&(x.vz=0))}}function v(g){return g.initialize&&g.initialize(r,p,i),g}return y(),n={tick:m,restart:function(){return h.restart(f),n},stop:function(){return h.stop(),n},numDimensions:function(g){return arguments.length?(i=Math.min(J2,Math.max(1,Math.round(g))),c.forEach(v),n):i},nodes:function(g){return arguments.length?(r=g,y(),c.forEach(v),n):r},alpha:function(g){return arguments.length?(s=+g,n):s},alphaMin:function(g){return arguments.length?(a=+g,n):a},alphaDecay:function(g){return arguments.length?(o=+g,n):+o},alphaTarget:function(g){return arguments.length?(l=+g,n):l},velocityDecay:function(g){return arguments.length?(u=1-g,n):1-u},randomSource:function(g){return arguments.length?(p=g,c.forEach(v),n):p},force:function(g,_){return arguments.length>1?(_==null?c.delete(g):c.set(g,v(_)),n):c.get(g)},find:function(){var g=Array.prototype.slice.call(arguments),_=g.shift()||0,x=(i>1?g.shift():null)||0,b=(i>2?g.shift():null)||0,T=g.shift()||1/0,E=0,M=r.length,C,S,w,R,O,P;for(T*=T,E=0;E<M;++E)O=r[E],C=_-O.x,S=x-(O.y||0),w=b-(O.z||0),R=C*C+S*S+w*w,R<T&&(P=O,T=R);return P},on:function(g,_){return arguments.length>1?(d.on(g,_),n):d.on(g)}}}function iM(){var r,e,i,n,s,a=Gs(-30),o,l=1,u=1/0,c=.81;function h(m){var y,v=r.length,g=(e===1?U2(r,Xv):e===2?z2(r,Xv,eM):e===3?G2(r,Xv,eM,iV):null).visitAfter(p);for(s=m,y=0;y<v;++y)i=r[y],g.visit(f)}function d(){if(r){var m,y=r.length,v;for(o=new Array(y),m=0;m<y;++m)v=r[m],o[v.index]=+a(v,m,r)}}function p(m){var y=0,v,g,_=0,x,b,T,E,M=m.length;if(M){for(x=b=T=E=0;E<M;++E)(v=m[E])&&(g=Math.abs(v.value))&&(y+=v.value,_+=g,x+=g*(v.x||0),b+=g*(v.y||0),T+=g*(v.z||0));y*=Math.sqrt(4/M),m.x=x/_,e>1&&(m.y=b/_),e>2&&(m.z=T/_)}else{v=m,v.x=v.data.x,e>1&&(v.y=v.data.y),e>2&&(v.z=v.data.z);do y+=o[v.data.index];while(v=v.next)}m.value=y}function f(m,y,v,g,_){if(!m.value)return!0;var x=[v,g,_][e-1],b=m.x-i.x,T=e>1?m.y-i.y:0,E=e>2?m.z-i.z:0,M=x-y,C=b*b+T*T+E*E;if(M*M/c<C)return C<u&&(b===0&&(b=Hs(n),C+=b*b),e>1&&T===0&&(T=Hs(n),C+=T*T),e>2&&E===0&&(E=Hs(n),C+=E*E),C<l&&(C=Math.sqrt(l*C)),i.vx+=b*m.value*s/C,e>1&&(i.vy+=T*m.value*s/C),e>2&&(i.vz+=E*m.value*s/C)),!0;if(!(m.length||C>=u)){(m.data!==i||m.next)&&(b===0&&(b=Hs(n),C+=b*b),e>1&&T===0&&(T=Hs(n),C+=T*T),e>2&&E===0&&(E=Hs(n),C+=E*E),C<l&&(C=Math.sqrt(l*C)));do m.data!==i&&(M=o[m.data.index]*s/C,i.vx+=b*M,e>1&&(i.vy+=T*M),e>2&&(i.vz+=E*M));while(m=m.next)}}return h.initialize=function(m,...y){r=m,n=y.find(v=>typeof v=="function")||Math.random,e=y.find(v=>[1,2,3].includes(v))||2,d()},h.strength=function(m){return arguments.length?(a=typeof m=="function"?m:Gs(+m),d(),h):a},h.distanceMin=function(m){return arguments.length?(l=m*m,h):Math.sqrt(l)},h.distanceMax=function(m){return arguments.length?(u=m*m,h):Math.sqrt(u)},h.theta=function(m){return arguments.length?(c=m*m,h):Math.sqrt(c)},h}function rM(r,e,i,n){var s,a,o=Gs(.1),l,u;typeof r!="function"&&(r=Gs(+r)),e==null&&(e=0),i==null&&(i=0),n==null&&(n=0);function c(d){for(var p=0,f=s.length;p<f;++p){var m=s[p],y=m.x-e||1e-6,v=(m.y||0)-i||1e-6,g=(m.z||0)-n||1e-6,_=Math.sqrt(y*y+v*v+g*g),x=(u[p]-_)*l[p]*d/_;m.vx+=y*x,a>1&&(m.vy+=v*x),a>2&&(m.vz+=g*x)}}function h(){if(s){var d,p=s.length;for(l=new Array(p),u=new Array(p),d=0;d<p;++d)u[d]=+r(s[d],d,s),l[d]=isNaN(u[d])?0:+o(s[d],d,s)}}return c.initialize=function(d,...p){s=d,a=p.find(f=>[1,2,3].includes(f))||2,h()},c.strength=function(d){return arguments.length?(o=typeof d=="function"?d:Gs(+d),h(),c):o},c.radius=function(d){return arguments.length?(r=typeof d=="function"?d:Gs(+d),h(),c):r},c.x=function(d){return arguments.length?(e=+d,c):e},c.y=function(d){return arguments.length?(i=+d,c):i},c.z=function(d){return arguments.length?(n=+d,c):n},c}var Yv=function(r){oV(r);var e=aV(r);return r.on=e.on,r.off=e.off,r.fire=e.fire,r};function aV(r){var e=Object.create(null);return{on:function(i,n,s){if(typeof n!="function")throw new Error("callback is expected to be a function");var a=e[i];return a||(a=e[i]=[]),a.push({callback:n,ctx:s}),r},off:function(i,n){var s=typeof i>"u";if(s)return e=Object.create(null),r;if(e[i]){var a=typeof n!="function";if(a)delete e[i];else for(var o=e[i],l=0;l<o.length;++l)o[l].callback===n&&o.splice(l,1)}return r},fire:function(i){var n=e[i];if(!n)return r;var s;arguments.length>1&&(s=Array.prototype.splice.call(arguments,1));for(var a=0;a<n.length;++a){var o=n[a];o.callback.apply(o.ctx,s)}return r}}}function oV(r){if(!r)throw new Error("Eventify cannot use falsy object as events subject");for(var e=["on","fire","off"],i=0;i<e.length;++i)if(r.hasOwnProperty(e[i]))throw new Error("Subject cannot be eventified, since it already has property '"+e[i]+"'")}var lV=cV,uV=Yv;function cV(r){if(r=r||{},"uniqueLinkId"in r&&(console.warn("ngraph.graph: Starting from version 0.14 `uniqueLinkId` is deprecated.\nUse `multigraph` option instead\n",`
4219
4219
  `,`Note: there is also change in default behavior: From now on each graph
4220
4220
  is considered to be not a multigraph by default (each edge is unique).`),r.multigraph=r.uniqueLinkId),r.multigraph===void 0&&(r.multigraph=!1),typeof Map!="function")throw new Error("ngraph.graph requires `Map` to be defined. Please polyfill it before using ngraph");var e=new Map,i=new Map,n={},s=0,a=r.multigraph?b:x,o=[],l=L,u=L,c=L,h=L,d={version:20,addNode:y,addLink:_,removeLink:C,removeNode:g,getNode:v,getNodeCount:T,getLinkCount:E,getEdgeCount:E,getLinksCount:E,getNodesCount:T,getLinks:M,forEachNode:Y,forEachLinkedNode:P,forEachLink:O,beginUpdate:c,endUpdate:h,clear:R,hasLink:w,hasNode:v,getLink:w};return uV(d),p(),d;function p(){var F=d.on;d.on=B;function B(){return d.beginUpdate=c=W,d.endUpdate=h=G,l=f,u=m,d.on=F,F.apply(d,arguments)}}function f(F,B){o.push({link:F,changeType:B})}function m(F,B){o.push({node:F,changeType:B})}function y(F,B){if(F===void 0)throw new Error("Invalid node identifier");c();var q=v(F);return q?(q.data=B,u(q,"update")):(q=new hV(F,B),u(q,"add")),e.set(F,q),h(),q}function v(F){return e.get(F)}function g(F){var B=v(F);if(!B)return!1;c();var q=B.links;return q&&(q.forEach(S),B.links=null),e.delete(F),u(B,"remove"),h(),!0}function _(F,B,q){c();var H=v(F)||y(F),z=v(B)||y(B),Z=a(F,B,q),se=i.has(Z.id);return i.set(Z.id,Z),nM(H,Z),F!==B&&nM(z,Z),l(Z,se?"update":"add"),h(),Z}function x(F,B,q){var H=Sf(F,B),z=i.get(H);return z?(z.data=q,z):new sM(F,B,q,H)}function b(F,B,q){var H=Sf(F,B),z=n.hasOwnProperty(H);if(z||w(F,B)){z||(n[H]=0);var Z="@"+ ++n[H];H=Sf(F+Z,B+Z)}return new sM(F,B,q,H)}function T(){return e.size}function E(){return i.size}function M(F){var B=v(F);return B?B.links:null}function C(F,B){return B!==void 0&&(F=w(F,B)),S(F)}function S(F){if(!F||!i.get(F.id))return!1;c(),i.delete(F.id);var B=v(F.fromId),q=v(F.toId);return B&&B.links.delete(F),q&&q.links.delete(F),l(F,"remove"),h(),!0}function w(F,B){if(!(F===void 0||B===void 0))return i.get(Sf(F,B))}function R(){c(),Y(function(F){g(F.id)}),h()}function O(F){if(typeof F=="function")for(var B=i.values(),q=B.next();!q.done;){if(F(q.value))return!0;q=B.next()}}function P(F,B,q){var H=v(F);if(H&&H.links&&typeof B=="function")return q?D(H.links,F,B):A(H.links,F,B)}function A(F,B,q){for(var H,z=F.values(),Z=z.next();!Z.done;){var se=Z.value,le=se.fromId===B?se.toId:se.fromId;if(H=q(e.get(le),se),H)return!0;Z=z.next()}}function D(F,B,q){for(var H,z=F.values(),Z=z.next();!Z.done;){var se=Z.value;if(se.fromId===B&&(H=q(e.get(se.toId),se),H))return!0;Z=z.next()}}function L(){}function W(){s+=1}function G(){s-=1,s===0&&o.length>0&&(d.fire("changed",o),o.length=0)}function Y(F){if(typeof F!="function")throw new Error("Function is expected to iterate over graph nodes. You passed "+F);for(var B=e.values(),q=B.next();!q.done;){if(F(q.value))return!0;q=B.next()}}}function hV(r,e){this.id=r,this.links=null,this.data=e}function nM(r,e){r.links?r.links.add(e):r.links=new Set([e])}function sM(r,e,i,n){this.fromId=r,this.toId=e,this.data=i,this.id=n}function Sf(r,e){return r.toString()+"👉 "+e.toString()}const dV=Sy(lV);var Kv={exports:{}},Nh={exports:{}},aM=function(r){return r===0?"x":r===1?"y":r===2?"z":"c"+(r+1)};const pV=aM;var Su=function(r){return e;function e(i,n){let s=n&&n.indent||0,a=n&&n.join!==void 0?n.join:`
4221
4221
  `,o=Array(s+1).join(" "),l=[];for(let u=0;u<r;++u){let c=pV(u),h=u===0?"":o;l.push(h+i.replace(/{var}/g,c))}return l.join(a)}};const oM=Su;Nh.exports=fV,Nh.exports.generateCreateBodyFunctionBody=lM,Nh.exports.getVectorCode=cM,Nh.exports.getBodyCode=uM;function fV(r,e){let i=lM(r,e),{Body:n}=new Function(i)();return n}function lM(r,e){return`
@@ -5398,7 +5398,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
5398
5398
  0% { transform: rotate(0deg); }
5399
5399
  100% { transform: rotate(360deg); }
5400
5400
  }
5401
- `}),ae.jsxs("div",{style:b.inputWrapper,children:[ae.jsx("input",{type:"text",value:s,onChange:P=>a(P.target.value),placeholder:"Search for triples...",style:b.input,onFocus:()=>{s.length>=2&&d(!0)}}),ae.jsx("button",{onClick:g,disabled:i,style:{...b.button,backgroundColor:"#ffd32a",color:"#18181b",height:"40px",borderRadius:"0 12px 12px 0",boxShadow:"0 2px 8px rgba(0,0,0,0.18)",transition:"background 0.2s, color 0.2s, transform 0.1s"},onMouseEnter:P=>P.currentTarget.style.backgroundColor="#ffe066",onMouseLeave:P=>P.currentTarget.style.backgroundColor="#ffd32a",children:i?"Searching...":"Search"})]}),_&&ae.jsxs("div",{style:b.activeFilters,children:[ae.jsx("div",{style:b.filtersLabel,children:"Active filters:"}),ae.jsxs("div",{style:b.filtersChips,children:[u.subject&&ae.jsxs("div",{style:{...b.filterChip,...b.subjectChip},children:[ae.jsxs("span",{children:["Subject: ",u.subject]}),ae.jsx("button",{onClick:()=>v("subject",u.subject),style:{...b.chipButton,...S==="subject"?b.chipButtonHover:{}},onMouseEnter:()=>w("subject"),onMouseLeave:()=>w(null),children:"×"})]}),u.predicate&&ae.jsxs("div",{style:{...b.filterChip,...b.predicateChip},children:[ae.jsxs("span",{children:["Predicate: ",u.predicate]}),ae.jsx("button",{onClick:()=>v("predicate",u.predicate),style:{...b.chipButton,...S==="predicate"?b.chipButtonHover:{}},onMouseEnter:()=>w("predicate"),onMouseLeave:()=>w(null),children:"×"})]}),u.object&&ae.jsxs("div",{style:{...b.filterChip,...b.objectChip},children:[ae.jsxs("span",{children:["Object: ",u.object]}),ae.jsx("button",{onClick:()=>v("object",u.object),style:{...b.chipButton,...S==="object"?b.chipButtonHover:{}},onMouseEnter:()=>w("object"),onMouseLeave:()=>w(null),children:"×"})]})]}),ae.jsx("button",{onClick:()=>c({subject:"",predicate:"",object:""}),style:{...b.clearButton,...M?b.clearButtonHover:{}},onMouseEnter:()=>C(!0),onMouseLeave:()=>C(!1),children:"Clear all filters"})]}),h&&ae.jsxs("div",{style:b.suggestionsContainer,ref:y,children:[p&&ae.jsx("div",{style:b.loadingContainer,children:ae.jsx("div",{style:b.loader})}),!p&&!x&&s.length>=2&&ae.jsxs("div",{style:b.noResults,children:['Aucune suggestion trouvée pour "',s,'"']}),!p&&o.subjects.length>0&&ae.jsxs("div",{style:b.suggestionCategory,children:[ae.jsx("div",{style:b.categoryHeader,children:"Suggested Subjects"}),ae.jsx("div",{style:b.suggestionList,children:o.subjects.map((P,A)=>ae.jsx("div",{style:{...b.suggestionItem,...b.subjectSuggestion,...R===`subject-${A}`?b.suggestionItemHover:{},...u.subject===P?b.selectedSuggestion:{}},onClick:()=>v("subject",P),onMouseEnter:()=>O(`subject-${A}`),onMouseLeave:()=>O(null),children:P},`subject-${A}`))})]}),!p&&o.predicates.length>0&&ae.jsxs("div",{style:b.suggestionCategory,children:[ae.jsx("div",{style:b.categoryHeader,children:"Suggested Predicates"}),ae.jsx("div",{style:b.suggestionList,children:o.predicates.map((P,A)=>ae.jsx("div",{style:{...b.suggestionItem,...b.predicateSuggestion,...R===`predicate-${A}`?b.suggestionItemHover:{},...u.predicate===P?b.selectedSuggestion:{}},onClick:()=>v("predicate",P),onMouseEnter:()=>O(`predicate-${A}`),onMouseLeave:()=>O(null),children:P},`predicate-${A}`))})]}),!p&&o.objects.length>0&&ae.jsxs("div",{style:b.suggestionCategory,children:[ae.jsx("div",{style:b.categoryHeader,children:"Suggested Objects"}),ae.jsx("div",{style:b.suggestionList,children:o.objects.map((P,A)=>ae.jsx("div",{style:{...b.suggestionItem,...b.objectSuggestion,...R===`object-${A}`?b.suggestionItemHover:{},...u.object===P?b.selectedSuggestion:{}},onClick:()=>v("object",P),onMouseEnter:()=>O(`object-${A}`),onMouseLeave:()=>O(null),children:P},`object-${A}`))})]}),!p&&o.triples&&o.triples.length>0&&ae.jsxs("div",{style:b.suggestionCategory,children:[ae.jsx("div",{style:b.categoryHeader,children:"Suggested Triples"}),ae.jsx("div",{style:b.suggestionList,children:o.triples.map((P,A)=>ae.jsxs("div",{style:{...b.tripleSuggestion,...R===`triple-${A}`?b.tripleSuggestionHover:{}},onClick:()=>{c({subject:P.subject,predicate:P.predicate,object:P.object})},onMouseEnter:()=>O(`triple-${A}`),onMouseLeave:()=>O(null),children:[ae.jsx("span",{style:b.tripleSubjectPart,children:P.subject}),ae.jsx("span",{style:b.triplePredicatePart,children:P.predicate}),ae.jsx("span",{style:b.tripleObjectPart,children:P.object})]},`triple-${A}`))})]})]})]})},dae=({endpoint:r,walletAddress:e,onNodeSelect:i,onLoadingChange:n,gamesId:s,disableNodeDetailsSidebar:a=!1})=>{const o=V.useRef(),l=V.useRef(),[u,c]=V.useState("2D"),[h,d]=V.useState(!1),[p,f]=V.useState(!1),[m,y]=V.useState(!1),[v,g]=V.useState(!1),[_,x]=V.useState(null),[b,T]=V.useState("agent"),{graphData:E,isInitialLoad:M,selectedTriple:C,isLoading:S,isSearching:w,subjectFilter:R,predicateFilter:O,objectFilter:P,shouldSearch:A,canGoBack:D,canGoForward:L,setIsInitialLoad:W,loadInitialData:G,resetGraph:Y,handleNodeClick:F,handleFilterChange:B,applyFilters:q,goBack:H,goForward:z,setGraphData:Z,setGraphHistory:se,currentHistoryIndex:le,setCurrentHistoryIndex:fe}=oae(r,b,s,i),_e=v&&_?_:E,Re=m||w;V.useEffect(()=>{G()},[G,b]),V.useEffect(()=>{A&&(g(!1),q())},[A,q]);const nt=()=>{M&&o.current&&W(!1)},ge=async(Be,Ct)=>{try{y(!0);const st={subject:Ct.subject||"",predicate:Ct.predicate||"",object:Ct.object||""},j=await Hl(st,r);if(j&&j.length>0){const k=jg(j);g(!1),Z(k),se(ce=>{const we=ce.slice(0,le+1);return we.push({graphData:k,selectedTriple:null,filters:st}),we}),fe(ce=>ce+1)}else Z({nodes:[],links:[]})}catch{Z({nodes:[],links:[]})}finally{y(!1)}},gt=()=>{y(!0)},$=()=>{g(!1),Y()},Ht=(Be,Ct)=>{g(!1),B(Be,Ct)},$e=()=>{v&&g(!1)},xt=()=>ae.jsxs("div",{style:{display:"none",alignItems:"center",backgroundColor:"#27272a",padding:"8px 12px",borderRadius:8,marginLeft:12,boxShadow:"0 2px 8px rgba(0,0,0,0.2)"},children:[ae.jsx("span",{style:{color:"white",marginRight:10,fontSize:14},children:"Graph Type:"}),ae.jsxs("select",{value:b,onChange:Be=>T(Be.target.value),style:{backgroundColor:"#3f3f46",color:"white",border:"none",padding:"4px 8px",borderRadius:4,cursor:"pointer"},children:[ae.jsx("option",{value:"base",children:"Base"}),ae.jsx("option",{value:"agent",children:"Agent"})]})]});return ae.jsxs("div",{ref:l,className:"graph-visualization-container",style:{position:"relative",top:0,left:0,right:0,bottom:0,width:"100%",height:"100%",overflow:"hidden"},children:[(S||Re||p)&&ae.jsx(TS,{}),ae.jsx(nae,{onReset:$,onBack:()=>{$e(),H()},onForward:()=>{$e(),z()},canGoBack:D,canGoForward:L}),ae.jsx("div",{style:{position:"absolute",top:"80px",left:"5px",zIndex:50},children:ae.jsx(sae,{viewMode:u,onViewModeChange:c})}),ae.jsx("div",{style:{position:"absolute",top:"10px",left:"50%",transform:"translateX(-50%)",zIndex:1e3,width:"550px",maxWidth:"calc(100% - 350px)"},children:ae.jsx(hae,{endpoint:r,onSearch:ge,isSearching:Re,onSearchStart:gt})}),ae.jsxs("div",{className:"agent-navbar",style:{position:"absolute",top:"5px",right:"5px",zIndex:10,display:"flex",flexDirection:"row",alignItems:"center",gap:"16px"},children:[ae.jsx(xt,{}),!h&&ae.jsx("button",{style:{background:"#ffd32a",color:"#18181b",border:"none",borderRadius:12,top:5,width:120,height:54,fontSize:18,fontWeight:"bold",boxShadow:"0 2px 8px rgba(0,0,0,0.18)",cursor:"pointer",textTransform:"uppercase",transition:"background 0.2s, color 0.2s, transform 0.1s"},onMouseEnter:Be=>Be.currentTarget.style.background="#ffe066",onMouseLeave:Be=>Be.currentTarget.style.background="#ffd32a",onClick:()=>d(Be=>!Be),children:"Filters"}),h&&ae.jsx("div",{style:{marginLeft:12,display:"flex",alignItems:"center",gap:16,position:"relative"},children:ae.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-end",position:"relative"},children:ae.jsx(P5,{subjectFilter:R,predicateFilter:O,objectFilter:P,onFilterChange:Ht,onReset:$,onClose:()=>d(!1)})})})]}),u==="2D"&&ae.jsx(Hse,{graphData:_e,onNodeClick:Be=>{$e(),F(Be,o,u)},onEngineStop:nt,fgRef:o,selectedTriple:C,endpoint:r,disableNodeDetailsSidebar:a,children:ae.jsx(Gw,{})}),u==="3D"&&ae.jsx(qse,{graphData:_e,onNodeClick:Be=>{$e(),F(Be,o,u)},onEngineStop:nt,fgRef:o,selectedTriple:C,endpoint:r,disableNodeDetailsSidebar:a,children:ae.jsx(Gw,{})}),u==="VR"&&ae.jsx(N5,{graphData:_e,onNodeClick:Be=>{$e(),F(Be,o,u)},onBack:()=>{$e(),H()},onForward:()=>{$e(),z()},selectedTriple:C,endpoint:r,disableNodeDetailsSidebar:a})]})};function pae({open:r,onClose:e,children:i}){return I.jsx("div",{style:{position:"absolute",top:"25%",left:"5px",height:"70%",width:r?"28.67vw":0,minWidth:r?"350px":0,backgroundColor:"rgba(0, 0, 0, 0.85)",borderRadius:18,transition:"width 0.35s cubic-bezier(0.4, 1.3, 0.5, 1)",zIndex:1300,boxShadow:"2px 0 16px rgba(0, 0, 0, 0.18)",border:r?"1px solid rgba(255,255,255,0.1)":"none",overflow:"hidden"},children:r&&I.jsxs(I.Fragment,{children:[I.jsx("button",{style:{background:"none",border:"none",color:"#ffd32a",fontSize:32,position:"absolute",top:10,right:18,cursor:"pointer",zIndex:1302,transition:"color 0.2s"},onClick:e,children:"×"}),I.jsx("div",{style:{padding:"24px",overflowY:"auto",height:"100%"},children:i})]})})}const fae=({activity:r})=>{var d;Number(r.shares||0);const e=r.term,i=r.vault_type,n=r.activity_type,s=i==="Triple"||i==="Atom",o=!(e!=null&&e.triple)||s?e:(d=e==null?void 0:e.triple)==null?void 0:d.counter_term,l=()=>{var p,f,m,y,v,g,_;return(f=(p=o==null?void 0:o.triple)==null?void 0:p.subject)!=null&&f.label&&((y=(m=o==null?void 0:o.triple)==null?void 0:m.predicate)!=null&&y.label)&&((g=(v=o==null?void 0:o.triple)==null?void 0:v.object)!=null&&g.label)?{type:"triple",subject:o.triple.subject.label,predicate:o.triple.predicate.label,object:o.triple.object.label}:(_=o==null?void 0:o.atom)!=null&&_.label?{type:"atom",label:o.atom.label}:{type:"unknown"}},u=()=>n==="deposit"?"Deposit":"Redeem",c=n==="redemption",h=()=>i||"Unknown";return I.jsx("div",{style:{background:"#232326",borderRadius:14,padding:"18px 24px",marginBottom:18,boxShadow:"0 2px 12px rgba(0,0,0,0.13)",borderLeft:`6px solid ${c?"#F44336":s?"#006FE8":"#FF9500"}`,position:"relative",display:"flex",flexDirection:"column",gap:2},className:"activity-card",children:I.jsx("div",{style:{display:"flex",alignItems:"center"},children:I.jsxs("div",{children:[I.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:4},children:[I.jsx("span",{style:{color:"#ffd32a",fontWeight:700,minWidth:110},children:"Position:"}),(()=>{const p=l();return p.type==="triple"?I.jsx(Kg,{subject:p.subject,predicate:p.predicate,object:p.object,fontSize:"13px"}):p.type==="atom"?I.jsx(eO,{label:p.label,fontSize:"13px"}):I.jsx("span",{style:{color:"#fff",fontSize:"13px"},children:"Unknown Position"})})()]}),I.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:4},children:[I.jsx("span",{style:{color:"#ffd32a",fontWeight:700,minWidth:110},children:"Action:"}),I.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[I.jsxs("span",{style:{color:"#fff",fontSize:"13px"},children:[u()," ",h()]}),I.jsx("span",{style:{color:"rgba(255, 255, 255, 0.6)"},children:"-"}),I.jsx(Ic,{isFor:s,fontSize:"12px"})]})]})]})})})},mae=(r,e)=>{if(!r||!e||e===0)return"0.00%";const i=Number(r),n=Number(e),s=i/n*100;if(s<.01&&s>0){const a=i.toString(),l=n.toString().length-a.length;if(l>5){const u=Math.pow(10,l),h=i*u/n*100;if(h>=.01&&h<=100)return`${h.toFixed(2)}%`}}return s>100?`${s.toFixed(2)}% ⚠️`:s>0&&s<.01?"< 0.01%":`${s.toFixed(2)}%`},gae=({positionId:r,shares:e,redeemAmount:i,onAmountChange:n})=>I.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-end",gap:"6px",minWidth:"200px"},children:I.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"6px",width:"100%"},children:[I.jsx("input",{type:"number",value:i||e,onChange:s=>n(r,parseFloat(s.target.value)||0),max:e,min:0,step:"0.000001",style:{width:"100%",padding:"4px 8px",borderRadius:"4px",border:"1px solid #374151",backgroundColor:"#232326",color:"#fff",fontSize:"12px"}}),I.jsxs("p",{style:{color:"#9ca3af",fontSize:"10px"},children:["Max: ",e]}),I.jsx("div",{style:{display:"flex",gap:"4px",flexWrap:"wrap"},children:[{label:"25%",multiplier:.25},{label:"50%",multiplier:.5},{label:"75%",multiplier:.75},{label:"Max",multiplier:1}].map(({label:s,multiplier:a})=>I.jsx("button",{onClick:()=>n(r,e*a),style:{padding:"0px 4px",borderRadius:"4px",border:"1px solid #374151",backgroundColor:"#232326",color:"#fff",fontSize:"12px",cursor:"pointer",minWidth:"32px",textAlign:"center",height:"20px",lineHeight:"20px"},children:s},s))})]})}),yae=({isSelected:r,onSelect:e,positionId:i})=>I.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[r&&I.jsx("span",{style:{color:"#ffd32a",fontSize:"12px",fontWeight:"bold"},children:"Amount to Redeem"}),I.jsxs("label",{style:{display:"flex",alignItems:"center",gap:"6px",cursor:"pointer"},children:[I.jsx("input",{type:"checkbox",checked:r,onChange:n=>e(i,n.target.checked),style:{width:"16px",height:"16px",accentColor:"#ffd32a"}}),I.jsx("span",{style:{color:"#ffd32a",fontSize:"12px",fontWeight:"bold"},children:"Redeem"})]})]}),FI=({label:r,value:e})=>I.jsxs("div",{style:{display:"flex",gap:8,marginBottom:4},children:[I.jsxs("span",{style:{color:"#ffd429",fontWeight:700,minWidth:110},children:[r,":"]}),I.jsx("span",{style:{color:"#fff"},children:e||"N/A"})]}),vae=({src:r,alt:e})=>r?I.jsx("img",{src:r,alt:e,style:{width:48,height:48,borderRadius:"50%",objectFit:"cover",boxShadow:"0 2px 8px rgba(0,0,0,0.18)",marginRight:10}}):null,bae=({position:r,isSelected:e=!1,onSelect:i,onAmountChange:n,redeemAmount:s=0})=>{var b,T,E,M,C,S,w,R,O,P,A,D;const a=Number(r.shares||0),o=r.term,l=((b=r.vault)==null?void 0:b.deposits)&&r.vault.deposits.length>0,u=((T=r.vault)==null?void 0:T.redemptions)&&r.vault.redemptions.length>0,c=(C=(M=(E=r.vault)==null?void 0:E.deposits)==null?void 0:M[0])==null?void 0:C.vault_type,h=(R=(w=(S=r.vault)==null?void 0:S.redemptions)==null?void 0:w[0])==null?void 0:R.vault_type,d=a>0&&(c==="Triple"||c==="Atom"||h==="Triple"||h==="Atom"),p=!(o!=null&&o.triple),f=p||d?o:(O=o==null?void 0:o.triple)==null?void 0:O.counter_term,m=()=>{var L,W,G,Y,F,B,q;return(W=(L=f==null?void 0:f.triple)==null?void 0:L.subject)!=null&&W.label&&((Y=(G=f==null?void 0:f.triple)==null?void 0:G.predicate)!=null&&Y.label)&&((B=(F=f==null?void 0:f.triple)==null?void 0:F.object)!=null&&B.label)?{type:"triple",subject:f.triple.subject.label,predicate:f.triple.predicate.label,object:f.triple.object.label}:(q=f==null?void 0:f.atom)!=null&&q.label?{type:"atom",label:f.atom.label}:{type:"unknown"}},y=p||d?o:(P=o==null?void 0:o.triple)==null?void 0:P.counter_term,v=mae(a,Number((y==null?void 0:y.total_assets)||0)),g=Number((y==null?void 0:y.total_assets)||0),x=(l&&u?a>0?"Deposit":"Redeem":l?"Deposit":u?"Redeem":"Unknown")==="Redeem";return I.jsx("div",{style:{background:"#232326",borderRadius:14,padding:"18px 24px",marginBottom:4,boxShadow:"0 2px 12px rgba(0,0,0,0.13)",borderLeft:`6px solid ${x?"#FFD700":d?"#006FE8":"#FF9500"}`,position:"relative",display:"flex",flexDirection:"column",gap:2},className:"position-card",children:I.jsxs("div",{style:{display:"flex",alignItems:"flex-start"},children:[I.jsx(vae,{src:(A=r.account)==null?void 0:A.image,alt:(D=r.account)==null?void 0:D.label}),I.jsxs("div",{style:{flex:1},children:[I.jsx("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:4},children:(()=>{const L=m();return L.type==="triple"?I.jsx(Kg,{subject:L.subject,predicate:L.predicate,object:L.object,fontSize:"14px"}):L.type==="atom"?I.jsx(eO,{label:L.label,fontSize:"14px"}):I.jsx("span",{style:{color:"#fff",fontSize:"14px"},children:"Unknown Position"})})()}),I.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:4},children:[I.jsx("span",{style:{color:"#ffd429",fontWeight:700,minWidth:110},children:"Direction:"}),I.jsx(Ic,{isFor:d,fontSize:"12px"})]}),I.jsx(FI,{label:"Shares",value:v}),I.jsx(FI,{label:"Term Shares",value:g})]}),I.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-end",gap:"8px"},children:[I.jsx(yae,{isSelected:e,onSelect:i||(()=>{}),positionId:r.id}),e&&n&&I.jsx(gae,{positionId:r.id,shares:a,redeemAmount:s,onAmountChange:n})]})]})})},xae=({atomDetails:r,connections:e,walletAddress:i})=>{var a,o,l,u,c,h,d,p;if(!r)return null;const n=r.image,s=n?Ty(n)?Fw(n):n:void 0;return I.jsx(I.Fragment,{children:I.jsxs("div",{className:"flex flex-wrap items-center gap-4",children:[I.jsx("div",{className:"w-1/6 h-20",children:s?I.jsx("img",{src:s,alt:r.label||"Atom image",className:"w-full h-20 object-contain rounded-2xl"}):I.jsx("div",{className:"w-full h-auto object-contain rounded-2xl",children:"No image"})}),I.jsxs("div",{className:"flex-col w-4/6 gap-2 text-primary",children:[I.jsx("p",{className:"bold text-2xl capitalize",children:I.jsx("strong",{children:String(r.label??"Not defined")})}),I.jsxs("p",{className:"text-sm",children:["Following: ",e.followers.length," - Followers: ",e.follows.length]})]}),I.jsx("div",{className:"flex-col w-full h-[70px] gap-2 text-[#D9D9D9] border-b-1 border-[#D9D9D9] overflow-y-auto",children:I.jsxs("p",{children:[I.jsx("strong",{children:"UID / Description :"})," ",I.jsx("br",{}),((o=(a=r.value)==null?void 0:a.person)==null?void 0:o.description)||((u=(l=r.value)==null?void 0:l.organization)==null?void 0:u.description)||((h=(c=r.value)==null?void 0:c.thing)==null?void 0:h.description)||((p=(d=r.value)==null?void 0:d.book)==null?void 0:p.description)||"No description available"]})})]})})},iT=({isOpen:r,onClose:e,title:i,children:n})=>(V.useEffect(()=>{const s=a=>{a.key==="Escape"&&e()};return r&&(document.addEventListener("keydown",s),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",s),document.body.style.overflow="unset"}},[r,e]),r?I.jsx("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:9999,padding:"20px"},onClick:e,children:I.jsxs("div",{style:{backgroundColor:"#1a1a1a",borderRadius:"16px",border:"1px solid rgba(255, 255, 255, 0.1)",maxWidth:"700px",width:"100%",maxHeight:"85vh",minHeight:"400px",display:"flex",flexDirection:"column",overflow:"hidden",boxShadow:"0 20px 40px rgba(0, 0, 0, 0.5)"},onClick:s=>s.stopPropagation(),children:[I.jsxs("div",{style:{padding:"20px 24px",borderBottom:"1px solid rgba(255, 255, 255, 0.1)",display:"flex",alignItems:"center",justifyContent:"space-between"},children:[I.jsx("h2",{style:{margin:0,fontSize:"18px",fontWeight:"600",color:"#fff"},children:i}),I.jsx("button",{onClick:e,style:{background:"none",border:"none",color:"rgba(255, 255, 255, 0.6)",fontSize:"24px",cursor:"pointer",padding:"4px",borderRadius:"4px",display:"flex",alignItems:"center",justifyContent:"center",width:"32px",height:"32px",transition:"all 0.2s"},onMouseEnter:s=>{s.currentTarget.style.color="#fff",s.currentTarget.style.backgroundColor="rgba(255, 255, 255, 0.1)"},onMouseLeave:s=>{s.currentTarget.style.color="rgba(255, 255, 255, 0.6)",s.currentTarget.style.backgroundColor="transparent"},children:"×"})]}),I.jsx("div",{style:{padding:"0",overflowY:"auto",flex:1,display:"flex",flexDirection:"column"},children:n})]})}):null),rT=({currentPage:r,totalPages:e,onPageChange:i,itemsPerPage:n,totalItems:s})=>e<=1?null:I.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[I.jsx("button",{onClick:()=>i(r-1),disabled:r===1,style:{background:r===1?"rgba(255, 255, 255, 0.1)":"rgba(255, 255, 255, 0.2)",border:"1px solid rgba(255, 255, 255, 0.2)",borderRadius:"6px",color:r===1?"rgba(255, 255, 255, 0.4)":"#fff",padding:"6px 12px",fontSize:"12px",cursor:r===1?"not-allowed":"pointer",transition:"all 0.2s"},onMouseEnter:a=>{r>1&&(a.currentTarget.style.background="rgba(255, 255, 255, 0.3)")},onMouseLeave:a=>{r>1&&(a.currentTarget.style.background="rgba(255, 255, 255, 0.2)")},children:"←"}),I.jsx("div",{style:{display:"flex",gap:"4px"},children:(()=>{const l=[];l.push(1),r>3&&l.push("...");const u=Math.max(2,r-1),c=Math.min(e-1,r+1);for(let h=u;h<=c;h++)h!==1&&h!==e&&l.push(h);return r<e-2&&l.push("..."),e>1&&l.push(e),l})().map((l,u)=>l==="..."?I.jsx("span",{style:{color:"rgba(255, 255, 255, 0.6)",padding:"6px 4px",fontSize:"12px"},children:"..."},`ellipsis-${u}`):I.jsx("button",{onClick:()=>i(l),style:{background:l===r?"#ffd32a":"rgba(255, 255, 255, 0.1)",border:"1px solid rgba(255, 255, 255, 0.2)",borderRadius:"6px",color:l===r?"#18181b":"#fff",padding:"6px 10px",fontSize:"12px",cursor:"pointer",minWidth:"32px",transition:"all 0.2s",fontWeight:l===r?"600":"400"},onMouseEnter:c=>{l!==r&&(c.currentTarget.style.background="rgba(255, 255, 255, 0.2)")},onMouseLeave:c=>{l!==r&&(c.currentTarget.style.background="rgba(255, 255, 255, 0.1)")},children:l},l))}),I.jsx("button",{onClick:()=>i(r+1),disabled:r===e,style:{background:r===e?"rgba(255, 255, 255, 0.1)":"rgba(255, 255, 255, 0.2)",border:"1px solid rgba(255, 255, 255, 0.2)",borderRadius:"6px",color:r===e?"rgba(255, 255, 255, 0.4)":"#fff",padding:"6px 12px",fontSize:"12px",cursor:r===e?"not-allowed":"pointer",transition:"all 0.2s"},onMouseEnter:a=>{r<e&&(a.currentTarget.style.background="rgba(255, 255, 255, 0.3)")},onMouseLeave:a=>{r<e&&(a.currentTarget.style.background="rgba(255, 255, 255, 0.2)")},children:"→"})]}),nT=({currentPage:r,itemsPerPage:e,totalItems:i})=>{const n=(r-1)*e+1,s=Math.min(r*e,i);return I.jsxs("div",{style:{fontSize:"12px",color:"rgba(255, 255, 255, 0.6)"},children:["Showing ",n,"-",s," of ",i]})};var Vg=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(r){return this.listeners.add(r),this.onSubscribe(),()=>{this.listeners.delete(r),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},_ae={setTimeout:(r,e)=>setTimeout(r,e),clearTimeout:r=>clearTimeout(r),setInterval:(r,e)=>setInterval(r,e),clearInterval:r=>clearInterval(r)},Tae=(dO=class{constructor(){zt(this,bs,_ae);zt(this,Sl,!1)}setTimeoutProvider(r){process.env.NODE_ENV!=="production"&&ve(this,Sl)&&r!==ve(this,bs)&&console.error("[timeoutManager]: Switching provider after calls to previous provider might result in unexpected behavior.",{previous:ve(this,bs),provider:r}),mt(this,bs,r),process.env.NODE_ENV!=="production"&&mt(this,Sl,!1)}setTimeout(r,e){return process.env.NODE_ENV!=="production"&&mt(this,Sl,!0),ve(this,bs).setTimeout(r,e)}clearTimeout(r){ve(this,bs).clearTimeout(r)}setInterval(r,e){return process.env.NODE_ENV!=="production"&&mt(this,Sl,!0),ve(this,bs).setInterval(r,e)}clearInterval(r){ve(this,bs).clearInterval(r)}},bs=new WeakMap,Sl=new WeakMap,dO),sT=new Tae;function wae(r){setTimeout(r,0)}var Gg=typeof window>"u"||"Deno"in globalThis;function Kn(){}function Sae(r,e){return typeof r=="function"?r(e):r}function Eae(r){return typeof r=="number"&&r>=0&&r!==1/0}function Mae(r,e){return Math.max(r+(e||0)-Date.now(),0)}function aT(r,e){return typeof r=="function"?r(e):r}function Aae(r,e){return typeof r=="function"?r(e):r}function BI(r,e){const{type:i="all",exact:n,fetchStatus:s,predicate:a,queryKey:o,stale:l}=r;if(o){if(n){if(e.queryHash!==oT(o,e.options))return!1}else if(!$d(e.queryKey,o))return!1}if(i!=="all"){const u=e.isActive();if(i==="active"&&!u||i==="inactive"&&u)return!1}return!(typeof l=="boolean"&&e.isStale()!==l||s&&s!==e.state.fetchStatus||a&&!a(e))}function zI(r,e){const{exact:i,status:n,predicate:s,mutationKey:a}=r;if(a){if(!e.options.mutationKey)return!1;if(i){if(Qd(e.options.mutationKey)!==Qd(a))return!1}else if(!$d(e.options.mutationKey,a))return!1}return!(n&&e.state.status!==n||s&&!s(e))}function oT(r,e){return((e==null?void 0:e.queryKeyHashFn)||Qd)(r)}function Qd(r){return JSON.stringify(r,(e,i)=>uT(i)?Object.keys(i).sort().reduce((n,s)=>(n[s]=i[s],n),{}):i)}function $d(r,e){return r===e?!0:typeof r!=typeof e?!1:r&&e&&typeof r=="object"&&typeof e=="object"?Object.keys(e).every(i=>$d(r[i],e[i])):!1}var Cae=Object.prototype.hasOwnProperty;function lT(r,e){if(r===e)return r;const i=jI(r)&&jI(e);if(!i&&!(uT(r)&&uT(e)))return e;const s=(i?r:Object.keys(r)).length,a=i?e:Object.keys(e),o=a.length,l=i?new Array(o):{};let u=0;for(let c=0;c<o;c++){const h=i?c:a[c],d=r[h],p=e[h];if(d===p){l[h]=d,(i?c<s:Cae.call(r,h))&&u++;continue}if(d===null||p===null||typeof d!="object"||typeof p!="object"){l[h]=p;continue}const f=lT(d,p);l[h]=f,f===d&&u++}return s===o&&u===s?r:l}function jI(r){return Array.isArray(r)&&r.length===Object.keys(r).length}function uT(r){if(!VI(r))return!1;const e=r.constructor;if(e===void 0)return!0;const i=e.prototype;return!(!VI(i)||!i.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(r)!==Object.prototype)}function VI(r){return Object.prototype.toString.call(r)==="[object Object]"}function Rae(r){return new Promise(e=>{sT.setTimeout(e,r)})}function Nae(r,e,i){if(typeof i.structuralSharing=="function")return i.structuralSharing(r,e);if(i.structuralSharing!==!1){if(process.env.NODE_ENV!=="production")try{return lT(r,e)}catch(n){throw console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${i.queryHash}]: ${n}`),n}return lT(r,e)}return e}function Pae(r,e,i=0){const n=[...r,e];return i&&n.length>i?n.slice(1):n}function Iae(r,e,i=0){const n=[e,...r];return i&&n.length>i?n.slice(0,-1):n}var Hg=Symbol();function GI(r,e){return process.env.NODE_ENV!=="production"&&r.queryFn===Hg&&console.error(`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${r.queryHash}'`),!r.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!r.queryFn||r.queryFn===Hg?()=>Promise.reject(new Error(`Missing queryFn: '${r.queryHash}'`)):r.queryFn}var Oae=(pO=class extends Vg{constructor(){super();zt(this,El);zt(this,fo);zt(this,Oc);mt(this,Oc,e=>{if(!Gg&&window.addEventListener){const i=()=>e();return window.addEventListener("visibilitychange",i,!1),()=>{window.removeEventListener("visibilitychange",i)}}})}onSubscribe(){ve(this,fo)||this.setEventListener(ve(this,Oc))}onUnsubscribe(){var e;this.hasListeners()||((e=ve(this,fo))==null||e.call(this),mt(this,fo,void 0))}setEventListener(e){var i;mt(this,Oc,e),(i=ve(this,fo))==null||i.call(this),mt(this,fo,e(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(e){ve(this,El)!==e&&(mt(this,El,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(i=>{i(e)})}isFocused(){var e;return typeof ve(this,El)=="boolean"?ve(this,El):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},El=new WeakMap,fo=new WeakMap,Oc=new WeakMap,pO),HI=new Oae;function Dae(){let r,e;const i=new Promise((s,a)=>{r=s,e=a});i.status="pending",i.catch(()=>{});function n(s){Object.assign(i,s),delete i.resolve,delete i.reject}return i.resolve=s=>{n({status:"fulfilled",value:s}),r(s)},i.reject=s=>{n({status:"rejected",reason:s}),e(s)},i}var Lae=wae;function kae(){let r=[],e=0,i=l=>{l()},n=l=>{l()},s=Lae;const a=l=>{e?r.push(l):s(()=>{i(l)})},o=()=>{const l=r;r=[],l.length&&s(()=>{n(()=>{l.forEach(u=>{i(u)})})})};return{batch:l=>{let u;e++;try{u=l()}finally{e--,e||o()}return u},batchCalls:l=>(...u)=>{a(()=>{l(...u)})},schedule:a,setNotifyFunction:l=>{i=l},setBatchNotifyFunction:l=>{n=l},setScheduler:l=>{s=l}}}var Ar=kae(),Uae=(fO=class extends Vg{constructor(){super();zt(this,Dc,!0);zt(this,mo);zt(this,Lc);mt(this,Lc,e=>{if(!Gg&&window.addEventListener){const i=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",i,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",i),window.removeEventListener("offline",n)}}})}onSubscribe(){ve(this,mo)||this.setEventListener(ve(this,Lc))}onUnsubscribe(){var e;this.hasListeners()||((e=ve(this,mo))==null||e.call(this),mt(this,mo,void 0))}setEventListener(e){var i;mt(this,Lc,e),(i=ve(this,mo))==null||i.call(this),mt(this,mo,e(this.setOnline.bind(this)))}setOnline(e){ve(this,Dc)!==e&&(mt(this,Dc,e),this.listeners.forEach(n=>{n(e)}))}isOnline(){return ve(this,Dc)}},Dc=new WeakMap,mo=new WeakMap,Lc=new WeakMap,fO),Wg=new Uae;function Fae(r){return Math.min(1e3*2**r,3e4)}function WI(r){return(r??"online")==="online"?Wg.isOnline():!0}var cT=class extends Error{constructor(r){super("CancelledError"),this.revert=r==null?void 0:r.revert,this.silent=r==null?void 0:r.silent}};function qI(r){let e=!1,i=0,n;const s=Dae(),a=()=>s.status!=="pending",o=y=>{var v;if(!a()){const g=new cT(y);p(g),(v=r.onCancel)==null||v.call(r,g)}},l=()=>{e=!0},u=()=>{e=!1},c=()=>HI.isFocused()&&(r.networkMode==="always"||Wg.isOnline())&&r.canRun(),h=()=>WI(r.networkMode)&&r.canRun(),d=y=>{a()||(n==null||n(),s.resolve(y))},p=y=>{a()||(n==null||n(),s.reject(y))},f=()=>new Promise(y=>{var v;n=g=>{(a()||c())&&y(g)},(v=r.onPause)==null||v.call(r)}).then(()=>{var y;n=void 0,a()||(y=r.onContinue)==null||y.call(r)}),m=()=>{if(a())return;let y;const v=i===0?r.initialPromise:void 0;try{y=v??r.fn()}catch(g){y=Promise.reject(g)}Promise.resolve(y).then(d).catch(g=>{var E;if(a())return;const _=r.retry??(Gg?0:3),x=r.retryDelay??Fae,b=typeof x=="function"?x(i,g):x,T=_===!0||typeof _=="number"&&i<_||typeof _=="function"&&_(i,g);if(e||!T){p(g);return}i++,(E=r.onFail)==null||E.call(r,i,g),Rae(b).then(()=>c()?void 0:f()).then(()=>{e?p(g):m()})})};return{promise:s,status:()=>s.status,cancel:o,continue:()=>(n==null||n(),s),cancelRetry:l,continueRetry:u,canStart:h,start:()=>(h()?m():f().then(m),s)}}var XI=(mO=class{constructor(){zt(this,Ml)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Eae(this.gcTime)&&mt(this,Ml,sT.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(r){this.gcTime=Math.max(this.gcTime||0,r??(Gg?1/0:5*60*1e3))}clearGcTimeout(){ve(this,Ml)&&(sT.clearTimeout(ve(this,Ml)),mt(this,Ml,void 0))}},Ml=new WeakMap,mO),Bae=(gO=class extends XI{constructor(e){super();zt(this,Zn);zt(this,Al);zt(this,kc);zt(this,wn);zt(this,Cl);zt(this,Ki);zt(this,Jd);zt(this,Rl);mt(this,Rl,!1),mt(this,Jd,e.defaultOptions),this.setOptions(e.options),this.observers=[],mt(this,Cl,e.client),mt(this,wn,ve(this,Cl).getQueryCache()),this.queryKey=e.queryKey,this.queryHash=e.queryHash,mt(this,Al,YI(this.options)),this.state=e.state??ve(this,Al),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return(e=ve(this,Ki))==null?void 0:e.promise}setOptions(e){if(this.options={...ve(this,Jd),...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const i=YI(this.options);i.data!==void 0&&(this.setData(i.data,{updatedAt:i.dataUpdatedAt,manual:!0}),mt(this,Al,i))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&ve(this,wn).remove(this)}setData(e,i){const n=Nae(this.state.data,e,this.options);return mr(this,Zn,Sa).call(this,{data:n,type:"success",dataUpdatedAt:i==null?void 0:i.updatedAt,manual:i==null?void 0:i.manual}),n}setState(e,i){mr(this,Zn,Sa).call(this,{type:"setState",state:e,setStateOptions:i})}cancel(e){var n,s;const i=(n=ve(this,Ki))==null?void 0:n.promise;return(s=ve(this,Ki))==null||s.cancel(e),i?i.then(Kn).catch(Kn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(ve(this,Al))}isActive(){return this.observers.some(e=>Aae(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Hg||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>aT(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!Mae(this.state.dataUpdatedAt,e)}onFocus(){var i;const e=this.observers.find(n=>n.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(i=ve(this,Ki))==null||i.continue()}onOnline(){var i;const e=this.observers.find(n=>n.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(i=ve(this,Ki))==null||i.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),ve(this,wn).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(i=>i!==e),this.observers.length||(ve(this,Ki)&&(ve(this,Rl)?ve(this,Ki).cancel({revert:!0}):ve(this,Ki).cancelRetry()),this.scheduleGc()),ve(this,wn).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||mr(this,Zn,Sa).call(this,{type:"invalidate"})}async fetch(e,i){var u,c,h,d,p,f,m,y,v,g,_,x;if(this.state.fetchStatus!=="idle"&&((u=ve(this,Ki))==null?void 0:u.status())!=="rejected"){if(this.state.data!==void 0&&(i!=null&&i.cancelRefetch))this.cancel({silent:!0});else if(ve(this,Ki))return ve(this,Ki).continueRetry(),ve(this,Ki).promise}if(e&&this.setOptions(e),!this.options.queryFn){const b=this.observers.find(T=>T.options.queryFn);b&&this.setOptions(b.options)}process.env.NODE_ENV!=="production"&&(Array.isArray(this.options.queryKey)||console.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']"));const n=new AbortController,s=b=>{Object.defineProperty(b,"signal",{enumerable:!0,get:()=>(mt(this,Rl,!0),n.signal)})},a=()=>{const b=GI(this.options,i),E=(()=>{const M={client:ve(this,Cl),queryKey:this.queryKey,meta:this.meta};return s(M),M})();return mt(this,Rl,!1),this.options.persister?this.options.persister(b,E,this):b(E)},l=(()=>{const b={fetchOptions:i,options:this.options,queryKey:this.queryKey,client:ve(this,Cl),state:this.state,fetchFn:a};return s(b),b})();(c=this.options.behavior)==null||c.onFetch(l,this),mt(this,kc,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((h=l.fetchOptions)==null?void 0:h.meta))&&mr(this,Zn,Sa).call(this,{type:"fetch",meta:(d=l.fetchOptions)==null?void 0:d.meta}),mt(this,Ki,qI({initialPromise:i==null?void 0:i.initialPromise,fn:l.fetchFn,onCancel:b=>{b instanceof cT&&b.revert&&this.setState({...ve(this,kc),fetchStatus:"idle"}),n.abort()},onFail:(b,T)=>{mr(this,Zn,Sa).call(this,{type:"failed",failureCount:b,error:T})},onPause:()=>{mr(this,Zn,Sa).call(this,{type:"pause"})},onContinue:()=>{mr(this,Zn,Sa).call(this,{type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0}));try{const b=await ve(this,Ki).start();if(b===void 0)throw process.env.NODE_ENV!=="production"&&console.error(`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`),new Error(`${this.queryHash} data is undefined`);return this.setData(b),(f=(p=ve(this,wn).config).onSuccess)==null||f.call(p,b,this),(y=(m=ve(this,wn).config).onSettled)==null||y.call(m,b,this.state.error,this),b}catch(b){if(b instanceof cT){if(b.silent)return ve(this,Ki).promise;if(b.revert){if(this.state.data===void 0)throw b;return this.state.data}}throw mr(this,Zn,Sa).call(this,{type:"error",error:b}),(g=(v=ve(this,wn).config).onError)==null||g.call(v,b,this),(x=(_=ve(this,wn).config).onSettled)==null||x.call(_,this.state.data,b,this),b}finally{this.scheduleGc()}}},Al=new WeakMap,kc=new WeakMap,wn=new WeakMap,Cl=new WeakMap,Ki=new WeakMap,Jd=new WeakMap,Rl=new WeakMap,Zn=new WeakSet,Sa=function(e){const i=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...zae(n.data,this.options),fetchMeta:e.meta??null};case"success":const s={...n,data:e.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return mt(this,kc,e.manual?s:void 0),s;case"error":const a=e.error;return{...n,error:a,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=i(this.state),Ar.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),ve(this,wn).notify({query:this,type:"updated",action:e})})},gO);function zae(r,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:WI(e.networkMode)?"fetching":"paused",...r===void 0&&{error:null,status:"pending"}}}function YI(r){const e=typeof r.initialData=="function"?r.initialData():r.initialData,i=e!==void 0,n=i?typeof r.initialDataUpdatedAt=="function"?r.initialDataUpdatedAt():r.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:i?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:i?"success":"pending",fetchStatus:"idle"}}function KI(r){return{onFetch:(e,i)=>{var h,d,p,f,m;const n=e.options,s=(p=(d=(h=e.fetchOptions)==null?void 0:h.meta)==null?void 0:d.fetchMore)==null?void 0:p.direction,a=((f=e.state.data)==null?void 0:f.pages)||[],o=((m=e.state.data)==null?void 0:m.pageParams)||[];let l={pages:[],pageParams:[]},u=0;const c=async()=>{let y=!1;const v=x=>{Object.defineProperty(x,"signal",{enumerable:!0,get:()=>(e.signal.aborted?y=!0:e.signal.addEventListener("abort",()=>{y=!0}),e.signal)})},g=GI(e.options,e.fetchOptions),_=async(x,b,T)=>{if(y)return Promise.reject();if(b==null&&x.pages.length)return Promise.resolve(x);const M=(()=>{const R={client:e.client,queryKey:e.queryKey,pageParam:b,direction:T?"backward":"forward",meta:e.options.meta};return v(R),R})(),C=await g(M),{maxPages:S}=e.options,w=T?Iae:Pae;return{pages:w(x.pages,C,S),pageParams:w(x.pageParams,b,S)}};if(s&&a.length){const x=s==="backward",b=x?jae:ZI,T={pages:a,pageParams:o},E=b(n,T);l=await _(T,E,x)}else{const x=r??a.length;do{const b=u===0?o[0]??n.initialPageParam:ZI(n,l);if(u>0&&b==null)break;l=await _(l,b),u++}while(u<x)}return l};e.options.persister?e.fetchFn=()=>{var y,v;return(v=(y=e.options).persister)==null?void 0:v.call(y,c,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},i)}:e.fetchFn=c}}}function ZI(r,{pages:e,pageParams:i}){const n=e.length-1;return e.length>0?r.getNextPageParam(e[n],e,i[n],i):void 0}function jae(r,{pages:e,pageParams:i}){var n;return e.length>0?(n=r.getPreviousPageParam)==null?void 0:n.call(r,e[0],e,i[0],i):void 0}var Vae=(yO=class extends XI{constructor(e){super();zt(this,_s);zt(this,ep);zt(this,xs);zt(this,Rr);zt(this,Nl);mt(this,ep,e.client),this.mutationId=e.mutationId,mt(this,Rr,e.mutationCache),mt(this,xs,[]),this.state=e.state||Gae(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){ve(this,xs).includes(e)||(ve(this,xs).push(e),this.clearGcTimeout(),ve(this,Rr).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){mt(this,xs,ve(this,xs).filter(i=>i!==e)),this.scheduleGc(),ve(this,Rr).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){ve(this,xs).length||(this.state.status==="pending"?this.scheduleGc():ve(this,Rr).remove(this))}continue(){var e;return((e=ve(this,Nl))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var o,l,u,c,h,d,p,f,m,y,v,g,_,x,b,T,E,M,C,S;const i=()=>{mr(this,_s,To).call(this,{type:"continue"})},n={client:ve(this,ep),meta:this.options.meta,mutationKey:this.options.mutationKey};mt(this,Nl,qI({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(w,R)=>{mr(this,_s,To).call(this,{type:"failed",failureCount:w,error:R})},onPause:()=>{mr(this,_s,To).call(this,{type:"pause"})},onContinue:i,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>ve(this,Rr).canRun(this)}));const s=this.state.status==="pending",a=!ve(this,Nl).canStart();try{if(s)i();else{mr(this,_s,To).call(this,{type:"pending",variables:e,isPaused:a}),await((l=(o=ve(this,Rr).config).onMutate)==null?void 0:l.call(o,e,this,n));const R=await((c=(u=this.options).onMutate)==null?void 0:c.call(u,e,n));R!==this.state.context&&mr(this,_s,To).call(this,{type:"pending",context:R,variables:e,isPaused:a})}const w=await ve(this,Nl).start();return await((d=(h=ve(this,Rr).config).onSuccess)==null?void 0:d.call(h,w,e,this.state.context,this,n)),await((f=(p=this.options).onSuccess)==null?void 0:f.call(p,w,e,this.state.context,n)),await((y=(m=ve(this,Rr).config).onSettled)==null?void 0:y.call(m,w,null,this.state.variables,this.state.context,this,n)),await((g=(v=this.options).onSettled)==null?void 0:g.call(v,w,null,e,this.state.context,n)),mr(this,_s,To).call(this,{type:"success",data:w}),w}catch(w){try{throw await((x=(_=ve(this,Rr).config).onError)==null?void 0:x.call(_,w,e,this.state.context,this,n)),await((T=(b=this.options).onError)==null?void 0:T.call(b,w,e,this.state.context,n)),await((M=(E=ve(this,Rr).config).onSettled)==null?void 0:M.call(E,void 0,w,this.state.variables,this.state.context,this,n)),await((S=(C=this.options).onSettled)==null?void 0:S.call(C,void 0,w,e,this.state.context,n)),w}finally{mr(this,_s,To).call(this,{type:"error",error:w})}}finally{ve(this,Rr).runNext(this)}}},ep=new WeakMap,xs=new WeakMap,Rr=new WeakMap,Nl=new WeakMap,_s=new WeakSet,To=function(e){const i=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=i(this.state),Ar.batch(()=>{ve(this,xs).forEach(n=>{n.onMutationUpdate(e)}),ve(this,Rr).notify({mutation:this,type:"updated",action:e})})},yO);function Gae(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Hae=(vO=class extends Vg{constructor(e={}){super();zt(this,wa);zt(this,Qn);zt(this,tp);this.config=e,mt(this,wa,new Set),mt(this,Qn,new Map),mt(this,tp,0)}build(e,i,n){const s=new Vae({client:e,mutationCache:this,mutationId:++$g(this,tp)._,options:e.defaultMutationOptions(i),state:n});return this.add(s),s}add(e){ve(this,wa).add(e);const i=qg(e);if(typeof i=="string"){const n=ve(this,Qn).get(i);n?n.push(e):ve(this,Qn).set(i,[e])}this.notify({type:"added",mutation:e})}remove(e){if(ve(this,wa).delete(e)){const i=qg(e);if(typeof i=="string"){const n=ve(this,Qn).get(i);if(n)if(n.length>1){const s=n.indexOf(e);s!==-1&&n.splice(s,1)}else n[0]===e&&ve(this,Qn).delete(i)}}this.notify({type:"removed",mutation:e})}canRun(e){const i=qg(e);if(typeof i=="string"){const n=ve(this,Qn).get(i),s=n==null?void 0:n.find(a=>a.state.status==="pending");return!s||s===e}else return!0}runNext(e){var n;const i=qg(e);if(typeof i=="string"){const s=(n=ve(this,Qn).get(i))==null?void 0:n.find(a=>a!==e&&a.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Ar.batch(()=>{ve(this,wa).forEach(e=>{this.notify({type:"removed",mutation:e})}),ve(this,wa).clear(),ve(this,Qn).clear()})}getAll(){return Array.from(ve(this,wa))}find(e){const i={exact:!0,...e};return this.getAll().find(n=>zI(i,n))}findAll(e={}){return this.getAll().filter(i=>zI(e,i))}notify(e){Ar.batch(()=>{this.listeners.forEach(i=>{i(e)})})}resumePausedMutations(){const e=this.getAll().filter(i=>i.state.isPaused);return Ar.batch(()=>Promise.all(e.map(i=>i.continue().catch(Kn))))}},wa=new WeakMap,Qn=new WeakMap,tp=new WeakMap,vO);function qg(r){var e;return(e=r.options.scope)==null?void 0:e.id}var Wae=(bO=class extends Vg{constructor(e={}){super();zt(this,Ts);this.config=e,mt(this,Ts,new Map)}build(e,i,n){const s=i.queryKey,a=i.queryHash??oT(s,i);let o=this.get(a);return o||(o=new Bae({client:e,queryKey:s,queryHash:a,options:e.defaultQueryOptions(i),state:n,defaultOptions:e.getQueryDefaults(s)}),this.add(o)),o}add(e){ve(this,Ts).has(e.queryHash)||(ve(this,Ts).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const i=ve(this,Ts).get(e.queryHash);i&&(e.destroy(),i===e&&ve(this,Ts).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Ar.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return ve(this,Ts).get(e)}getAll(){return[...ve(this,Ts).values()]}find(e){const i={exact:!0,...e};return this.getAll().find(n=>BI(i,n))}findAll(e={}){const i=this.getAll();return Object.keys(e).length>0?i.filter(n=>BI(e,n)):i}notify(e){Ar.batch(()=>{this.listeners.forEach(i=>{i(e)})})}onFocus(){Ar.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Ar.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Ts=new WeakMap,bO),qae=(xO=class{constructor(r={}){zt(this,Mi);zt(this,go);zt(this,yo);zt(this,Uc);zt(this,Fc);zt(this,vo);zt(this,Bc);zt(this,zc);mt(this,Mi,r.queryCache||new Wae),mt(this,go,r.mutationCache||new Hae),mt(this,yo,r.defaultOptions||{}),mt(this,Uc,new Map),mt(this,Fc,new Map),mt(this,vo,0)}mount(){$g(this,vo)._++,ve(this,vo)===1&&(mt(this,Bc,HI.subscribe(async r=>{r&&(await this.resumePausedMutations(),ve(this,Mi).onFocus())})),mt(this,zc,Wg.subscribe(async r=>{r&&(await this.resumePausedMutations(),ve(this,Mi).onOnline())})))}unmount(){var r,e;$g(this,vo)._--,ve(this,vo)===0&&((r=ve(this,Bc))==null||r.call(this),mt(this,Bc,void 0),(e=ve(this,zc))==null||e.call(this),mt(this,zc,void 0))}isFetching(r){return ve(this,Mi).findAll({...r,fetchStatus:"fetching"}).length}isMutating(r){return ve(this,go).findAll({...r,status:"pending"}).length}getQueryData(r){var i;const e=this.defaultQueryOptions({queryKey:r});return(i=ve(this,Mi).get(e.queryHash))==null?void 0:i.state.data}ensureQueryData(r){const e=this.defaultQueryOptions(r),i=ve(this,Mi).build(this,e),n=i.state.data;return n===void 0?this.fetchQuery(r):(r.revalidateIfStale&&i.isStaleByTime(aT(e.staleTime,i))&&this.prefetchQuery(e),Promise.resolve(n))}getQueriesData(r){return ve(this,Mi).findAll(r).map(({queryKey:e,state:i})=>{const n=i.data;return[e,n]})}setQueryData(r,e,i){const n=this.defaultQueryOptions({queryKey:r}),s=ve(this,Mi).get(n.queryHash),a=s==null?void 0:s.state.data,o=Sae(e,a);if(o!==void 0)return ve(this,Mi).build(this,n).setData(o,{...i,manual:!0})}setQueriesData(r,e,i){return Ar.batch(()=>ve(this,Mi).findAll(r).map(({queryKey:n})=>[n,this.setQueryData(n,e,i)]))}getQueryState(r){var i;const e=this.defaultQueryOptions({queryKey:r});return(i=ve(this,Mi).get(e.queryHash))==null?void 0:i.state}removeQueries(r){const e=ve(this,Mi);Ar.batch(()=>{e.findAll(r).forEach(i=>{e.remove(i)})})}resetQueries(r,e){const i=ve(this,Mi);return Ar.batch(()=>(i.findAll(r).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...r},e)))}cancelQueries(r,e={}){const i={revert:!0,...e},n=Ar.batch(()=>ve(this,Mi).findAll(r).map(s=>s.cancel(i)));return Promise.all(n).then(Kn).catch(Kn)}invalidateQueries(r,e={}){return Ar.batch(()=>(ve(this,Mi).findAll(r).forEach(i=>{i.invalidate()}),(r==null?void 0:r.refetchType)==="none"?Promise.resolve():this.refetchQueries({...r,type:(r==null?void 0:r.refetchType)??(r==null?void 0:r.type)??"active"},e)))}refetchQueries(r,e={}){const i={...e,cancelRefetch:e.cancelRefetch??!0},n=Ar.batch(()=>ve(this,Mi).findAll(r).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let a=s.fetch(void 0,i);return i.throwOnError||(a=a.catch(Kn)),s.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(n).then(Kn)}fetchQuery(r){const e=this.defaultQueryOptions(r);e.retry===void 0&&(e.retry=!1);const i=ve(this,Mi).build(this,e);return i.isStaleByTime(aT(e.staleTime,i))?i.fetch(e):Promise.resolve(i.state.data)}prefetchQuery(r){return this.fetchQuery(r).then(Kn).catch(Kn)}fetchInfiniteQuery(r){return r.behavior=KI(r.pages),this.fetchQuery(r)}prefetchInfiniteQuery(r){return this.fetchInfiniteQuery(r).then(Kn).catch(Kn)}ensureInfiniteQueryData(r){return r.behavior=KI(r.pages),this.ensureQueryData(r)}resumePausedMutations(){return Wg.isOnline()?ve(this,go).resumePausedMutations():Promise.resolve()}getQueryCache(){return ve(this,Mi)}getMutationCache(){return ve(this,go)}getDefaultOptions(){return ve(this,yo)}setDefaultOptions(r){mt(this,yo,r)}setQueryDefaults(r,e){ve(this,Uc).set(Qd(r),{queryKey:r,defaultOptions:e})}getQueryDefaults(r){const e=[...ve(this,Uc).values()],i={};return e.forEach(n=>{$d(r,n.queryKey)&&Object.assign(i,n.defaultOptions)}),i}setMutationDefaults(r,e){ve(this,Fc).set(Qd(r),{mutationKey:r,defaultOptions:e})}getMutationDefaults(r){const e=[...ve(this,Fc).values()],i={};return e.forEach(n=>{$d(r,n.mutationKey)&&Object.assign(i,n.defaultOptions)}),i}defaultQueryOptions(r){if(r._defaulted)return r;const e={...ve(this,yo).queries,...this.getQueryDefaults(r.queryKey),...r,_defaulted:!0};return e.queryHash||(e.queryHash=oT(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===Hg&&(e.enabled=!1),e}defaultMutationOptions(r){return r!=null&&r._defaulted?r:{...ve(this,yo).mutations,...(r==null?void 0:r.mutationKey)&&this.getMutationDefaults(r.mutationKey),...r,_defaulted:!0}}clear(){ve(this,Mi).clear(),ve(this,go).clear()}},Mi=new WeakMap,go=new WeakMap,yo=new WeakMap,Uc=new WeakMap,Fc=new WeakMap,vo=new WeakMap,Bc=new WeakMap,zc=new WeakMap,xO),Xae=sp.createContext(void 0),Yae=({client:r,children:e})=>(sp.useEffect(()=>(r.mount(),()=>{r.unmount()}),[r]),I.jsx(Xae.Provider,{value:r,children:e})),Kae="https://prod.base-sepolia.intuition-api.com/v1/graphql",Zae="https://prod.base-mainnet-v-1-0.intuition.sh/v1/graphql",Qae=Zae,QI={apiUrl:Qae};function $ae(r){QI={...QI,...r}}var ri=(r=>(r.MAINNET="mainnet",r.TESTNET="testnet",r))(ri||{});const Cr={mainnet:"https://testnet.intuition.sh/v1/graphql",testnet:Kae},hT=async(r,e=ri.MAINNET)=>{var i,n;try{const s=Cr[e],a=[],o=100;let l=0,u=!0;for(;u;){const h=await(await fetch(s,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:`query GetActivePositions($accountId: String!, $limit: Int!, $offset: Int!) {
5401
+ `}),ae.jsxs("div",{style:b.inputWrapper,children:[ae.jsx("input",{type:"text",value:s,onChange:P=>a(P.target.value),placeholder:"Search for triples...",style:b.input,onFocus:()=>{s.length>=2&&d(!0)}}),ae.jsx("button",{onClick:g,disabled:i,style:{...b.button,backgroundColor:"#ffd32a",color:"#18181b",height:"40px",borderRadius:"0 12px 12px 0",boxShadow:"0 2px 8px rgba(0,0,0,0.18)",transition:"background 0.2s, color 0.2s, transform 0.1s"},onMouseEnter:P=>P.currentTarget.style.backgroundColor="#ffe066",onMouseLeave:P=>P.currentTarget.style.backgroundColor="#ffd32a",children:i?"Searching...":"Search"})]}),_&&ae.jsxs("div",{style:b.activeFilters,children:[ae.jsx("div",{style:b.filtersLabel,children:"Active filters:"}),ae.jsxs("div",{style:b.filtersChips,children:[u.subject&&ae.jsxs("div",{style:{...b.filterChip,...b.subjectChip},children:[ae.jsxs("span",{children:["Subject: ",u.subject]}),ae.jsx("button",{onClick:()=>v("subject",u.subject),style:{...b.chipButton,...S==="subject"?b.chipButtonHover:{}},onMouseEnter:()=>w("subject"),onMouseLeave:()=>w(null),children:"×"})]}),u.predicate&&ae.jsxs("div",{style:{...b.filterChip,...b.predicateChip},children:[ae.jsxs("span",{children:["Predicate: ",u.predicate]}),ae.jsx("button",{onClick:()=>v("predicate",u.predicate),style:{...b.chipButton,...S==="predicate"?b.chipButtonHover:{}},onMouseEnter:()=>w("predicate"),onMouseLeave:()=>w(null),children:"×"})]}),u.object&&ae.jsxs("div",{style:{...b.filterChip,...b.objectChip},children:[ae.jsxs("span",{children:["Object: ",u.object]}),ae.jsx("button",{onClick:()=>v("object",u.object),style:{...b.chipButton,...S==="object"?b.chipButtonHover:{}},onMouseEnter:()=>w("object"),onMouseLeave:()=>w(null),children:"×"})]})]}),ae.jsx("button",{onClick:()=>c({subject:"",predicate:"",object:""}),style:{...b.clearButton,...M?b.clearButtonHover:{}},onMouseEnter:()=>C(!0),onMouseLeave:()=>C(!1),children:"Clear all filters"})]}),h&&ae.jsxs("div",{style:b.suggestionsContainer,ref:y,children:[p&&ae.jsx("div",{style:b.loadingContainer,children:ae.jsx("div",{style:b.loader})}),!p&&!x&&s.length>=2&&ae.jsxs("div",{style:b.noResults,children:['Aucune suggestion trouvée pour "',s,'"']}),!p&&o.subjects.length>0&&ae.jsxs("div",{style:b.suggestionCategory,children:[ae.jsx("div",{style:b.categoryHeader,children:"Suggested Subjects"}),ae.jsx("div",{style:b.suggestionList,children:o.subjects.map((P,A)=>ae.jsx("div",{style:{...b.suggestionItem,...b.subjectSuggestion,...R===`subject-${A}`?b.suggestionItemHover:{},...u.subject===P?b.selectedSuggestion:{}},onClick:()=>v("subject",P),onMouseEnter:()=>O(`subject-${A}`),onMouseLeave:()=>O(null),children:P},`subject-${A}`))})]}),!p&&o.predicates.length>0&&ae.jsxs("div",{style:b.suggestionCategory,children:[ae.jsx("div",{style:b.categoryHeader,children:"Suggested Predicates"}),ae.jsx("div",{style:b.suggestionList,children:o.predicates.map((P,A)=>ae.jsx("div",{style:{...b.suggestionItem,...b.predicateSuggestion,...R===`predicate-${A}`?b.suggestionItemHover:{},...u.predicate===P?b.selectedSuggestion:{}},onClick:()=>v("predicate",P),onMouseEnter:()=>O(`predicate-${A}`),onMouseLeave:()=>O(null),children:P},`predicate-${A}`))})]}),!p&&o.objects.length>0&&ae.jsxs("div",{style:b.suggestionCategory,children:[ae.jsx("div",{style:b.categoryHeader,children:"Suggested Objects"}),ae.jsx("div",{style:b.suggestionList,children:o.objects.map((P,A)=>ae.jsx("div",{style:{...b.suggestionItem,...b.objectSuggestion,...R===`object-${A}`?b.suggestionItemHover:{},...u.object===P?b.selectedSuggestion:{}},onClick:()=>v("object",P),onMouseEnter:()=>O(`object-${A}`),onMouseLeave:()=>O(null),children:P},`object-${A}`))})]}),!p&&o.triples&&o.triples.length>0&&ae.jsxs("div",{style:b.suggestionCategory,children:[ae.jsx("div",{style:b.categoryHeader,children:"Suggested Triples"}),ae.jsx("div",{style:b.suggestionList,children:o.triples.map((P,A)=>ae.jsxs("div",{style:{...b.tripleSuggestion,...R===`triple-${A}`?b.tripleSuggestionHover:{}},onClick:()=>{c({subject:P.subject,predicate:P.predicate,object:P.object})},onMouseEnter:()=>O(`triple-${A}`),onMouseLeave:()=>O(null),children:[ae.jsx("span",{style:b.tripleSubjectPart,children:P.subject}),ae.jsx("span",{style:b.triplePredicatePart,children:P.predicate}),ae.jsx("span",{style:b.tripleObjectPart,children:P.object})]},`triple-${A}`))})]})]})]})},dae=({endpoint:r,walletAddress:e,onNodeSelect:i,onLoadingChange:n,gamesId:s,disableNodeDetailsSidebar:a=!1})=>{const o=V.useRef(),l=V.useRef(),[u,c]=V.useState("2D"),[h,d]=V.useState(!1),[p,f]=V.useState(!1),[m,y]=V.useState(!1),[v,g]=V.useState(!1),[_,x]=V.useState(null),[b,T]=V.useState("agent"),{graphData:E,isInitialLoad:M,selectedTriple:C,isLoading:S,isSearching:w,subjectFilter:R,predicateFilter:O,objectFilter:P,shouldSearch:A,canGoBack:D,canGoForward:L,setIsInitialLoad:W,loadInitialData:G,resetGraph:Y,handleNodeClick:F,handleFilterChange:B,applyFilters:q,goBack:H,goForward:z,setGraphData:Z,setGraphHistory:se,currentHistoryIndex:le,setCurrentHistoryIndex:fe}=oae(r,b,s,i),_e=v&&_?_:E,Re=m||w;V.useEffect(()=>{G()},[G,b]),V.useEffect(()=>{A&&(g(!1),q())},[A,q]);const nt=()=>{M&&o.current&&W(!1)},ge=async(Be,Ct)=>{try{y(!0);const st={subject:Ct.subject||"",predicate:Ct.predicate||"",object:Ct.object||""},j=await Hl(st,r);if(j&&j.length>0){const k=jg(j);g(!1),Z(k),se(ce=>{const we=ce.slice(0,le+1);return we.push({graphData:k,selectedTriple:null,filters:st}),we}),fe(ce=>ce+1)}else Z({nodes:[],links:[]})}catch{Z({nodes:[],links:[]})}finally{y(!1)}},gt=()=>{y(!0)},$=()=>{g(!1),Y()},Ht=(Be,Ct)=>{g(!1),B(Be,Ct)},$e=()=>{v&&g(!1)},xt=()=>ae.jsxs("div",{style:{display:"none",alignItems:"center",backgroundColor:"#27272a",padding:"8px 12px",borderRadius:8,marginLeft:12,boxShadow:"0 2px 8px rgba(0,0,0,0.2)"},children:[ae.jsx("span",{style:{color:"white",marginRight:10,fontSize:14},children:"Graph Type:"}),ae.jsxs("select",{value:b,onChange:Be=>T(Be.target.value),style:{backgroundColor:"#3f3f46",color:"white",border:"none",padding:"4px 8px",borderRadius:4,cursor:"pointer"},children:[ae.jsx("option",{value:"base",children:"Base"}),ae.jsx("option",{value:"agent",children:"Agent"})]})]});return ae.jsxs("div",{ref:l,className:"graph-visualization-container",style:{position:"relative",top:0,left:0,right:0,bottom:0,width:"100%",height:"100%",overflow:"hidden"},children:[(S||Re||p)&&ae.jsx(TS,{}),ae.jsx(nae,{onReset:$,onBack:()=>{$e(),H()},onForward:()=>{$e(),z()},canGoBack:D,canGoForward:L}),ae.jsx("div",{style:{position:"absolute",top:"80px",left:"5px",zIndex:50},children:ae.jsx(sae,{viewMode:u,onViewModeChange:c})}),ae.jsx("div",{style:{position:"absolute",top:"10px",left:"50%",transform:"translateX(-50%)",zIndex:1e3,width:"550px",maxWidth:"calc(100% - 350px)"},children:ae.jsx(hae,{endpoint:r,onSearch:ge,isSearching:Re,onSearchStart:gt})}),ae.jsxs("div",{className:"agent-navbar",style:{position:"absolute",top:"5px",right:"5px",zIndex:10,display:"flex",flexDirection:"row",alignItems:"center",gap:"16px"},children:[ae.jsx(xt,{}),!h&&ae.jsx("button",{style:{background:"#ffd32a",color:"#18181b",border:"none",borderRadius:12,top:5,width:120,height:54,fontSize:18,fontWeight:"bold",boxShadow:"0 2px 8px rgba(0,0,0,0.18)",cursor:"pointer",textTransform:"uppercase",transition:"background 0.2s, color 0.2s, transform 0.1s"},onMouseEnter:Be=>Be.currentTarget.style.background="#ffe066",onMouseLeave:Be=>Be.currentTarget.style.background="#ffd32a",onClick:()=>d(Be=>!Be),children:"Filters"}),h&&ae.jsx("div",{style:{marginLeft:12,display:"flex",alignItems:"center",gap:16,position:"relative"},children:ae.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-end",position:"relative"},children:ae.jsx(P5,{subjectFilter:R,predicateFilter:O,objectFilter:P,onFilterChange:Ht,onReset:$,onClose:()=>d(!1)})})})]}),u==="2D"&&ae.jsx(Hse,{graphData:_e,onNodeClick:Be=>{$e(),F(Be,o,u)},onEngineStop:nt,fgRef:o,selectedTriple:C,endpoint:r,disableNodeDetailsSidebar:a,children:ae.jsx(Gw,{})}),u==="3D"&&ae.jsx(qse,{graphData:_e,onNodeClick:Be=>{$e(),F(Be,o,u)},onEngineStop:nt,fgRef:o,selectedTriple:C,endpoint:r,disableNodeDetailsSidebar:a,children:ae.jsx(Gw,{})}),u==="VR"&&ae.jsx(N5,{graphData:_e,onNodeClick:Be=>{$e(),F(Be,o,u)},onBack:()=>{$e(),H()},onForward:()=>{$e(),z()},selectedTriple:C,endpoint:r,disableNodeDetailsSidebar:a})]})};function pae({open:r,onClose:e,children:i}){return I.jsx("div",{style:{position:"absolute",top:"25%",left:"5px",height:"70%",width:r?"28.67vw":0,minWidth:r?"350px":0,backgroundColor:"rgba(0, 0, 0, 0.85)",borderRadius:18,transition:"width 0.35s cubic-bezier(0.4, 1.3, 0.5, 1)",zIndex:1300,boxShadow:"2px 0 16px rgba(0, 0, 0, 0.18)",border:r?"1px solid rgba(255,255,255,0.1)":"none",overflow:"hidden"},children:r&&I.jsxs(I.Fragment,{children:[I.jsx("button",{style:{background:"none",border:"none",color:"#ffd32a",fontSize:32,position:"absolute",top:10,right:18,cursor:"pointer",zIndex:1302,transition:"color 0.2s"},onClick:e,children:"×"}),I.jsx("div",{style:{padding:"24px",overflowY:"auto",height:"100%"},children:i})]})})}const fae=({activity:r})=>{var d;Number(r.shares||0);const e=r.term,i=r.vault_type,n=r.activity_type,s=i==="Triple"||i==="Atom",o=!(e!=null&&e.triple)||s?e:(d=e==null?void 0:e.triple)==null?void 0:d.counter_term,l=()=>{var p,f,m,y,v,g,_;return(f=(p=o==null?void 0:o.triple)==null?void 0:p.subject)!=null&&f.label&&((y=(m=o==null?void 0:o.triple)==null?void 0:m.predicate)!=null&&y.label)&&((g=(v=o==null?void 0:o.triple)==null?void 0:v.object)!=null&&g.label)?{type:"triple",subject:o.triple.subject.label,predicate:o.triple.predicate.label,object:o.triple.object.label}:(_=o==null?void 0:o.atom)!=null&&_.label?{type:"atom",label:o.atom.label}:{type:"unknown"}},u=()=>n==="deposit"?"Deposit":"Redeem",c=n==="redemption",h=()=>i||"Unknown";return I.jsx("div",{style:{background:"#232326",borderRadius:14,padding:"18px 24px",marginBottom:18,boxShadow:"0 2px 12px rgba(0,0,0,0.13)",borderLeft:`6px solid ${c?"#F44336":s?"#006FE8":"#FF9500"}`,position:"relative",display:"flex",flexDirection:"column",gap:2},className:"activity-card",children:I.jsx("div",{style:{display:"flex",alignItems:"center"},children:I.jsxs("div",{children:[I.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:4},children:[I.jsx("span",{style:{color:"#ffd32a",fontWeight:700,minWidth:110},children:"Position:"}),(()=>{const p=l();return p.type==="triple"?I.jsx(Kg,{subject:p.subject,predicate:p.predicate,object:p.object,fontSize:"13px"}):p.type==="atom"?I.jsx(eO,{label:p.label,fontSize:"13px"}):I.jsx("span",{style:{color:"#fff",fontSize:"13px"},children:"Unknown Position"})})()]}),I.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:4},children:[I.jsx("span",{style:{color:"#ffd32a",fontWeight:700,minWidth:110},children:"Action:"}),I.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[I.jsxs("span",{style:{color:"#fff",fontSize:"13px"},children:[u()," ",h()]}),I.jsx("span",{style:{color:"rgba(255, 255, 255, 0.6)"},children:"-"}),I.jsx(Ic,{isFor:s,fontSize:"12px"})]})]})]})})})},mae=(r,e)=>{if(!r||!e||e===0)return"0.00%";const i=Number(r),n=Number(e),s=i/n*100;if(s<.01&&s>0){const a=i.toString(),l=n.toString().length-a.length;if(l>5){const u=Math.pow(10,l),h=i*u/n*100;if(h>=.01&&h<=100)return`${h.toFixed(2)}%`}}return s>100?`${s.toFixed(2)}% ⚠️`:s>0&&s<.01?"< 0.01%":`${s.toFixed(2)}%`},gae=({positionId:r,shares:e,redeemAmount:i,onAmountChange:n})=>I.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-end",gap:"6px",minWidth:"200px"},children:I.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"6px",width:"100%"},children:[I.jsx("input",{type:"number",value:i||e,onChange:s=>n(r,parseFloat(s.target.value)||0),max:e,min:0,step:"0.000001",style:{width:"100%",padding:"4px 8px",borderRadius:"4px",border:"1px solid #374151",backgroundColor:"#232326",color:"#fff",fontSize:"12px"}}),I.jsxs("p",{style:{color:"#9ca3af",fontSize:"10px"},children:["Max: ",e]}),I.jsx("div",{style:{display:"flex",gap:"4px",flexWrap:"wrap"},children:[{label:"25%",multiplier:.25},{label:"50%",multiplier:.5},{label:"75%",multiplier:.75},{label:"Max",multiplier:1}].map(({label:s,multiplier:a})=>I.jsx("button",{onClick:()=>n(r,e*a),style:{padding:"0px 4px",borderRadius:"4px",border:"1px solid #374151",backgroundColor:"#232326",color:"#fff",fontSize:"12px",cursor:"pointer",minWidth:"32px",textAlign:"center",height:"20px",lineHeight:"20px"},children:s},s))})]})}),yae=({isSelected:r,onSelect:e,positionId:i})=>I.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[r&&I.jsx("span",{style:{color:"#ffd32a",fontSize:"12px",fontWeight:"bold"},children:"Amount to Redeem"}),I.jsxs("label",{style:{display:"flex",alignItems:"center",gap:"6px",cursor:"pointer"},children:[I.jsx("input",{type:"checkbox",checked:r,onChange:n=>e(i,n.target.checked),style:{width:"16px",height:"16px",accentColor:"#ffd32a"}}),I.jsx("span",{style:{color:"#ffd32a",fontSize:"12px",fontWeight:"bold"},children:"Redeem"})]})]}),FI=({label:r,value:e})=>I.jsxs("div",{style:{display:"flex",gap:8,marginBottom:4},children:[I.jsxs("span",{style:{color:"#ffd429",fontWeight:700,minWidth:110},children:[r,":"]}),I.jsx("span",{style:{color:"#fff"},children:e||"N/A"})]}),vae=({src:r,alt:e})=>r?I.jsx("img",{src:r,alt:e,style:{width:48,height:48,borderRadius:"50%",objectFit:"cover",boxShadow:"0 2px 8px rgba(0,0,0,0.18)",marginRight:10}}):null,bae=({position:r,isSelected:e=!1,onSelect:i,onAmountChange:n,redeemAmount:s=0})=>{var b,T,E,M,C,S,w,R,O,P,A,D;const a=Number(r.shares||0),o=r.term,l=((b=r.vault)==null?void 0:b.deposits)&&r.vault.deposits.length>0,u=((T=r.vault)==null?void 0:T.redemptions)&&r.vault.redemptions.length>0,c=(C=(M=(E=r.vault)==null?void 0:E.deposits)==null?void 0:M[0])==null?void 0:C.vault_type,h=(R=(w=(S=r.vault)==null?void 0:S.redemptions)==null?void 0:w[0])==null?void 0:R.vault_type,d=a>0&&(c==="Triple"||c==="Atom"||h==="Triple"||h==="Atom"),p=!(o!=null&&o.triple),f=p||d?o:(O=o==null?void 0:o.triple)==null?void 0:O.counter_term,m=()=>{var L,W,G,Y,F,B,q;return(W=(L=f==null?void 0:f.triple)==null?void 0:L.subject)!=null&&W.label&&((Y=(G=f==null?void 0:f.triple)==null?void 0:G.predicate)!=null&&Y.label)&&((B=(F=f==null?void 0:f.triple)==null?void 0:F.object)!=null&&B.label)?{type:"triple",subject:f.triple.subject.label,predicate:f.triple.predicate.label,object:f.triple.object.label}:(q=f==null?void 0:f.atom)!=null&&q.label?{type:"atom",label:f.atom.label}:{type:"unknown"}},y=p||d?o:(P=o==null?void 0:o.triple)==null?void 0:P.counter_term,v=mae(a,Number((y==null?void 0:y.total_assets)||0)),g=Number((y==null?void 0:y.total_assets)||0),x=(l&&u?a>0?"Deposit":"Redeem":l?"Deposit":u?"Redeem":"Unknown")==="Redeem";return I.jsx("div",{style:{background:"#232326",borderRadius:14,padding:"18px 24px",marginBottom:4,boxShadow:"0 2px 12px rgba(0,0,0,0.13)",borderLeft:`6px solid ${x?"#FFD700":d?"#006FE8":"#FF9500"}`,position:"relative",display:"flex",flexDirection:"column",gap:2},className:"position-card",children:I.jsxs("div",{style:{display:"flex",alignItems:"flex-start"},children:[I.jsx(vae,{src:(A=r.account)==null?void 0:A.image,alt:(D=r.account)==null?void 0:D.label}),I.jsxs("div",{style:{flex:1},children:[I.jsx("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:4},children:(()=>{const L=m();return L.type==="triple"?I.jsx(Kg,{subject:L.subject,predicate:L.predicate,object:L.object,fontSize:"14px"}):L.type==="atom"?I.jsx(eO,{label:L.label,fontSize:"14px"}):I.jsx("span",{style:{color:"#fff",fontSize:"14px"},children:"Unknown Position"})})()}),I.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:4},children:[I.jsx("span",{style:{color:"#ffd429",fontWeight:700,minWidth:110},children:"Direction:"}),I.jsx(Ic,{isFor:d,fontSize:"12px"})]}),I.jsx(FI,{label:"Shares",value:v}),I.jsx(FI,{label:"Term Shares",value:g})]}),I.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-end",gap:"8px"},children:[I.jsx(yae,{isSelected:e,onSelect:i||(()=>{}),positionId:r.id}),e&&n&&I.jsx(gae,{positionId:r.id,shares:a,redeemAmount:s,onAmountChange:n})]})]})})},xae=({atomDetails:r,connections:e,walletAddress:i})=>{var a,o,l,u,c,h,d,p;if(!r)return null;const n=r.image,s=n?Ty(n)?Fw(n):n:void 0;return I.jsx(I.Fragment,{children:I.jsxs("div",{className:"flex flex-wrap items-center gap-4",children:[I.jsx("div",{className:"w-1/6 h-20",children:s?I.jsx("img",{src:s,alt:r.label||"Atom image",style:{width:"20%",height:"20%",objectFit:"cover",borderRadius:"16px",display:"block"}}):I.jsx("div",{style:{width:"20%",height:"20%",display:"flex",justifyContent:"center",alignItems:"center",borderRadius:"16px"},children:"No image"})}),I.jsxs("div",{className:"flex-col w-4/6 gap-2 text-primary",children:[I.jsx("p",{className:"bold text-2xl capitalize",children:I.jsx("strong",{children:String(r.label??"Not defined")})}),I.jsxs("p",{className:"text-sm",children:["Following: ",e.followers.length," - Followers:"," ",e.follows.length]})]}),I.jsx("div",{className:"flex-col w-full h-[70px] gap-2 text-[#D9D9D9] border-b-1 border-[#D9D9D9] overflow-y-auto",children:I.jsxs("p",{children:[I.jsx("strong",{children:"Description :"})," ",I.jsx("br",{}),((o=(a=r.value)==null?void 0:a.person)==null?void 0:o.description)||((u=(l=r.value)==null?void 0:l.organization)==null?void 0:u.description)||((h=(c=r.value)==null?void 0:c.thing)==null?void 0:h.description)||((p=(d=r.value)==null?void 0:d.book)==null?void 0:p.description)||"No description available"]})})]})})},iT=({isOpen:r,onClose:e,title:i,children:n})=>(V.useEffect(()=>{const s=a=>{a.key==="Escape"&&e()};return r&&(document.addEventListener("keydown",s),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",s),document.body.style.overflow="unset"}},[r,e]),r?I.jsx("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:9999,padding:"20px"},onClick:e,children:I.jsxs("div",{style:{backgroundColor:"#1a1a1a",borderRadius:"16px",border:"1px solid rgba(255, 255, 255, 0.1)",maxWidth:"700px",width:"100%",maxHeight:"85vh",minHeight:"400px",display:"flex",flexDirection:"column",overflow:"hidden",boxShadow:"0 20px 40px rgba(0, 0, 0, 0.5)"},onClick:s=>s.stopPropagation(),children:[I.jsxs("div",{style:{padding:"20px 24px",borderBottom:"1px solid rgba(255, 255, 255, 0.1)",display:"flex",alignItems:"center",justifyContent:"space-between"},children:[I.jsx("h2",{style:{margin:0,fontSize:"18px",fontWeight:"600",color:"#fff"},children:i}),I.jsx("button",{onClick:e,style:{background:"none",border:"none",color:"rgba(255, 255, 255, 0.6)",fontSize:"24px",cursor:"pointer",padding:"4px",borderRadius:"4px",display:"flex",alignItems:"center",justifyContent:"center",width:"32px",height:"32px",transition:"all 0.2s"},onMouseEnter:s=>{s.currentTarget.style.color="#fff",s.currentTarget.style.backgroundColor="rgba(255, 255, 255, 0.1)"},onMouseLeave:s=>{s.currentTarget.style.color="rgba(255, 255, 255, 0.6)",s.currentTarget.style.backgroundColor="transparent"},children:"×"})]}),I.jsx("div",{style:{padding:"0",overflowY:"auto",flex:1,display:"flex",flexDirection:"column"},children:n})]})}):null),rT=({currentPage:r,totalPages:e,onPageChange:i,itemsPerPage:n,totalItems:s})=>e<=1?null:I.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[I.jsx("button",{onClick:()=>i(r-1),disabled:r===1,style:{background:r===1?"rgba(255, 255, 255, 0.1)":"rgba(255, 255, 255, 0.2)",border:"1px solid rgba(255, 255, 255, 0.2)",borderRadius:"6px",color:r===1?"rgba(255, 255, 255, 0.4)":"#fff",padding:"6px 12px",fontSize:"12px",cursor:r===1?"not-allowed":"pointer",transition:"all 0.2s"},onMouseEnter:a=>{r>1&&(a.currentTarget.style.background="rgba(255, 255, 255, 0.3)")},onMouseLeave:a=>{r>1&&(a.currentTarget.style.background="rgba(255, 255, 255, 0.2)")},children:"←"}),I.jsx("div",{style:{display:"flex",gap:"4px"},children:(()=>{const l=[];l.push(1),r>3&&l.push("...");const u=Math.max(2,r-1),c=Math.min(e-1,r+1);for(let h=u;h<=c;h++)h!==1&&h!==e&&l.push(h);return r<e-2&&l.push("..."),e>1&&l.push(e),l})().map((l,u)=>l==="..."?I.jsx("span",{style:{color:"rgba(255, 255, 255, 0.6)",padding:"6px 4px",fontSize:"12px"},children:"..."},`ellipsis-${u}`):I.jsx("button",{onClick:()=>i(l),style:{background:l===r?"#ffd32a":"rgba(255, 255, 255, 0.1)",border:"1px solid rgba(255, 255, 255, 0.2)",borderRadius:"6px",color:l===r?"#18181b":"#fff",padding:"6px 10px",fontSize:"12px",cursor:"pointer",minWidth:"32px",transition:"all 0.2s",fontWeight:l===r?"600":"400"},onMouseEnter:c=>{l!==r&&(c.currentTarget.style.background="rgba(255, 255, 255, 0.2)")},onMouseLeave:c=>{l!==r&&(c.currentTarget.style.background="rgba(255, 255, 255, 0.1)")},children:l},l))}),I.jsx("button",{onClick:()=>i(r+1),disabled:r===e,style:{background:r===e?"rgba(255, 255, 255, 0.1)":"rgba(255, 255, 255, 0.2)",border:"1px solid rgba(255, 255, 255, 0.2)",borderRadius:"6px",color:r===e?"rgba(255, 255, 255, 0.4)":"#fff",padding:"6px 12px",fontSize:"12px",cursor:r===e?"not-allowed":"pointer",transition:"all 0.2s"},onMouseEnter:a=>{r<e&&(a.currentTarget.style.background="rgba(255, 255, 255, 0.3)")},onMouseLeave:a=>{r<e&&(a.currentTarget.style.background="rgba(255, 255, 255, 0.2)")},children:"→"})]}),nT=({currentPage:r,itemsPerPage:e,totalItems:i})=>{const n=(r-1)*e+1,s=Math.min(r*e,i);return I.jsxs("div",{style:{fontSize:"12px",color:"rgba(255, 255, 255, 0.6)"},children:["Showing ",n,"-",s," of ",i]})};var Vg=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(r){return this.listeners.add(r),this.onSubscribe(),()=>{this.listeners.delete(r),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},_ae={setTimeout:(r,e)=>setTimeout(r,e),clearTimeout:r=>clearTimeout(r),setInterval:(r,e)=>setInterval(r,e),clearInterval:r=>clearInterval(r)},Tae=(dO=class{constructor(){zt(this,bs,_ae);zt(this,Sl,!1)}setTimeoutProvider(r){process.env.NODE_ENV!=="production"&&ve(this,Sl)&&r!==ve(this,bs)&&console.error("[timeoutManager]: Switching provider after calls to previous provider might result in unexpected behavior.",{previous:ve(this,bs),provider:r}),mt(this,bs,r),process.env.NODE_ENV!=="production"&&mt(this,Sl,!1)}setTimeout(r,e){return process.env.NODE_ENV!=="production"&&mt(this,Sl,!0),ve(this,bs).setTimeout(r,e)}clearTimeout(r){ve(this,bs).clearTimeout(r)}setInterval(r,e){return process.env.NODE_ENV!=="production"&&mt(this,Sl,!0),ve(this,bs).setInterval(r,e)}clearInterval(r){ve(this,bs).clearInterval(r)}},bs=new WeakMap,Sl=new WeakMap,dO),sT=new Tae;function wae(r){setTimeout(r,0)}var Gg=typeof window>"u"||"Deno"in globalThis;function Kn(){}function Sae(r,e){return typeof r=="function"?r(e):r}function Eae(r){return typeof r=="number"&&r>=0&&r!==1/0}function Mae(r,e){return Math.max(r+(e||0)-Date.now(),0)}function aT(r,e){return typeof r=="function"?r(e):r}function Aae(r,e){return typeof r=="function"?r(e):r}function BI(r,e){const{type:i="all",exact:n,fetchStatus:s,predicate:a,queryKey:o,stale:l}=r;if(o){if(n){if(e.queryHash!==oT(o,e.options))return!1}else if(!$d(e.queryKey,o))return!1}if(i!=="all"){const u=e.isActive();if(i==="active"&&!u||i==="inactive"&&u)return!1}return!(typeof l=="boolean"&&e.isStale()!==l||s&&s!==e.state.fetchStatus||a&&!a(e))}function zI(r,e){const{exact:i,status:n,predicate:s,mutationKey:a}=r;if(a){if(!e.options.mutationKey)return!1;if(i){if(Qd(e.options.mutationKey)!==Qd(a))return!1}else if(!$d(e.options.mutationKey,a))return!1}return!(n&&e.state.status!==n||s&&!s(e))}function oT(r,e){return((e==null?void 0:e.queryKeyHashFn)||Qd)(r)}function Qd(r){return JSON.stringify(r,(e,i)=>uT(i)?Object.keys(i).sort().reduce((n,s)=>(n[s]=i[s],n),{}):i)}function $d(r,e){return r===e?!0:typeof r!=typeof e?!1:r&&e&&typeof r=="object"&&typeof e=="object"?Object.keys(e).every(i=>$d(r[i],e[i])):!1}var Cae=Object.prototype.hasOwnProperty;function lT(r,e){if(r===e)return r;const i=jI(r)&&jI(e);if(!i&&!(uT(r)&&uT(e)))return e;const s=(i?r:Object.keys(r)).length,a=i?e:Object.keys(e),o=a.length,l=i?new Array(o):{};let u=0;for(let c=0;c<o;c++){const h=i?c:a[c],d=r[h],p=e[h];if(d===p){l[h]=d,(i?c<s:Cae.call(r,h))&&u++;continue}if(d===null||p===null||typeof d!="object"||typeof p!="object"){l[h]=p;continue}const f=lT(d,p);l[h]=f,f===d&&u++}return s===o&&u===s?r:l}function jI(r){return Array.isArray(r)&&r.length===Object.keys(r).length}function uT(r){if(!VI(r))return!1;const e=r.constructor;if(e===void 0)return!0;const i=e.prototype;return!(!VI(i)||!i.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(r)!==Object.prototype)}function VI(r){return Object.prototype.toString.call(r)==="[object Object]"}function Rae(r){return new Promise(e=>{sT.setTimeout(e,r)})}function Nae(r,e,i){if(typeof i.structuralSharing=="function")return i.structuralSharing(r,e);if(i.structuralSharing!==!1){if(process.env.NODE_ENV!=="production")try{return lT(r,e)}catch(n){throw console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${i.queryHash}]: ${n}`),n}return lT(r,e)}return e}function Pae(r,e,i=0){const n=[...r,e];return i&&n.length>i?n.slice(1):n}function Iae(r,e,i=0){const n=[e,...r];return i&&n.length>i?n.slice(0,-1):n}var Hg=Symbol();function GI(r,e){return process.env.NODE_ENV!=="production"&&r.queryFn===Hg&&console.error(`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${r.queryHash}'`),!r.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!r.queryFn||r.queryFn===Hg?()=>Promise.reject(new Error(`Missing queryFn: '${r.queryHash}'`)):r.queryFn}var Oae=(pO=class extends Vg{constructor(){super();zt(this,El);zt(this,fo);zt(this,Oc);mt(this,Oc,e=>{if(!Gg&&window.addEventListener){const i=()=>e();return window.addEventListener("visibilitychange",i,!1),()=>{window.removeEventListener("visibilitychange",i)}}})}onSubscribe(){ve(this,fo)||this.setEventListener(ve(this,Oc))}onUnsubscribe(){var e;this.hasListeners()||((e=ve(this,fo))==null||e.call(this),mt(this,fo,void 0))}setEventListener(e){var i;mt(this,Oc,e),(i=ve(this,fo))==null||i.call(this),mt(this,fo,e(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(e){ve(this,El)!==e&&(mt(this,El,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(i=>{i(e)})}isFocused(){var e;return typeof ve(this,El)=="boolean"?ve(this,El):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},El=new WeakMap,fo=new WeakMap,Oc=new WeakMap,pO),HI=new Oae;function Dae(){let r,e;const i=new Promise((s,a)=>{r=s,e=a});i.status="pending",i.catch(()=>{});function n(s){Object.assign(i,s),delete i.resolve,delete i.reject}return i.resolve=s=>{n({status:"fulfilled",value:s}),r(s)},i.reject=s=>{n({status:"rejected",reason:s}),e(s)},i}var Lae=wae;function kae(){let r=[],e=0,i=l=>{l()},n=l=>{l()},s=Lae;const a=l=>{e?r.push(l):s(()=>{i(l)})},o=()=>{const l=r;r=[],l.length&&s(()=>{n(()=>{l.forEach(u=>{i(u)})})})};return{batch:l=>{let u;e++;try{u=l()}finally{e--,e||o()}return u},batchCalls:l=>(...u)=>{a(()=>{l(...u)})},schedule:a,setNotifyFunction:l=>{i=l},setBatchNotifyFunction:l=>{n=l},setScheduler:l=>{s=l}}}var Ar=kae(),Uae=(fO=class extends Vg{constructor(){super();zt(this,Dc,!0);zt(this,mo);zt(this,Lc);mt(this,Lc,e=>{if(!Gg&&window.addEventListener){const i=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",i,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",i),window.removeEventListener("offline",n)}}})}onSubscribe(){ve(this,mo)||this.setEventListener(ve(this,Lc))}onUnsubscribe(){var e;this.hasListeners()||((e=ve(this,mo))==null||e.call(this),mt(this,mo,void 0))}setEventListener(e){var i;mt(this,Lc,e),(i=ve(this,mo))==null||i.call(this),mt(this,mo,e(this.setOnline.bind(this)))}setOnline(e){ve(this,Dc)!==e&&(mt(this,Dc,e),this.listeners.forEach(n=>{n(e)}))}isOnline(){return ve(this,Dc)}},Dc=new WeakMap,mo=new WeakMap,Lc=new WeakMap,fO),Wg=new Uae;function Fae(r){return Math.min(1e3*2**r,3e4)}function WI(r){return(r??"online")==="online"?Wg.isOnline():!0}var cT=class extends Error{constructor(r){super("CancelledError"),this.revert=r==null?void 0:r.revert,this.silent=r==null?void 0:r.silent}};function qI(r){let e=!1,i=0,n;const s=Dae(),a=()=>s.status!=="pending",o=y=>{var v;if(!a()){const g=new cT(y);p(g),(v=r.onCancel)==null||v.call(r,g)}},l=()=>{e=!0},u=()=>{e=!1},c=()=>HI.isFocused()&&(r.networkMode==="always"||Wg.isOnline())&&r.canRun(),h=()=>WI(r.networkMode)&&r.canRun(),d=y=>{a()||(n==null||n(),s.resolve(y))},p=y=>{a()||(n==null||n(),s.reject(y))},f=()=>new Promise(y=>{var v;n=g=>{(a()||c())&&y(g)},(v=r.onPause)==null||v.call(r)}).then(()=>{var y;n=void 0,a()||(y=r.onContinue)==null||y.call(r)}),m=()=>{if(a())return;let y;const v=i===0?r.initialPromise:void 0;try{y=v??r.fn()}catch(g){y=Promise.reject(g)}Promise.resolve(y).then(d).catch(g=>{var E;if(a())return;const _=r.retry??(Gg?0:3),x=r.retryDelay??Fae,b=typeof x=="function"?x(i,g):x,T=_===!0||typeof _=="number"&&i<_||typeof _=="function"&&_(i,g);if(e||!T){p(g);return}i++,(E=r.onFail)==null||E.call(r,i,g),Rae(b).then(()=>c()?void 0:f()).then(()=>{e?p(g):m()})})};return{promise:s,status:()=>s.status,cancel:o,continue:()=>(n==null||n(),s),cancelRetry:l,continueRetry:u,canStart:h,start:()=>(h()?m():f().then(m),s)}}var XI=(mO=class{constructor(){zt(this,Ml)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Eae(this.gcTime)&&mt(this,Ml,sT.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(r){this.gcTime=Math.max(this.gcTime||0,r??(Gg?1/0:5*60*1e3))}clearGcTimeout(){ve(this,Ml)&&(sT.clearTimeout(ve(this,Ml)),mt(this,Ml,void 0))}},Ml=new WeakMap,mO),Bae=(gO=class extends XI{constructor(e){super();zt(this,Zn);zt(this,Al);zt(this,kc);zt(this,wn);zt(this,Cl);zt(this,Ki);zt(this,Jd);zt(this,Rl);mt(this,Rl,!1),mt(this,Jd,e.defaultOptions),this.setOptions(e.options),this.observers=[],mt(this,Cl,e.client),mt(this,wn,ve(this,Cl).getQueryCache()),this.queryKey=e.queryKey,this.queryHash=e.queryHash,mt(this,Al,YI(this.options)),this.state=e.state??ve(this,Al),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return(e=ve(this,Ki))==null?void 0:e.promise}setOptions(e){if(this.options={...ve(this,Jd),...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const i=YI(this.options);i.data!==void 0&&(this.setData(i.data,{updatedAt:i.dataUpdatedAt,manual:!0}),mt(this,Al,i))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&ve(this,wn).remove(this)}setData(e,i){const n=Nae(this.state.data,e,this.options);return mr(this,Zn,Sa).call(this,{data:n,type:"success",dataUpdatedAt:i==null?void 0:i.updatedAt,manual:i==null?void 0:i.manual}),n}setState(e,i){mr(this,Zn,Sa).call(this,{type:"setState",state:e,setStateOptions:i})}cancel(e){var n,s;const i=(n=ve(this,Ki))==null?void 0:n.promise;return(s=ve(this,Ki))==null||s.cancel(e),i?i.then(Kn).catch(Kn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(ve(this,Al))}isActive(){return this.observers.some(e=>Aae(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Hg||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>aT(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!Mae(this.state.dataUpdatedAt,e)}onFocus(){var i;const e=this.observers.find(n=>n.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(i=ve(this,Ki))==null||i.continue()}onOnline(){var i;const e=this.observers.find(n=>n.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(i=ve(this,Ki))==null||i.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),ve(this,wn).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(i=>i!==e),this.observers.length||(ve(this,Ki)&&(ve(this,Rl)?ve(this,Ki).cancel({revert:!0}):ve(this,Ki).cancelRetry()),this.scheduleGc()),ve(this,wn).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||mr(this,Zn,Sa).call(this,{type:"invalidate"})}async fetch(e,i){var u,c,h,d,p,f,m,y,v,g,_,x;if(this.state.fetchStatus!=="idle"&&((u=ve(this,Ki))==null?void 0:u.status())!=="rejected"){if(this.state.data!==void 0&&(i!=null&&i.cancelRefetch))this.cancel({silent:!0});else if(ve(this,Ki))return ve(this,Ki).continueRetry(),ve(this,Ki).promise}if(e&&this.setOptions(e),!this.options.queryFn){const b=this.observers.find(T=>T.options.queryFn);b&&this.setOptions(b.options)}process.env.NODE_ENV!=="production"&&(Array.isArray(this.options.queryKey)||console.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']"));const n=new AbortController,s=b=>{Object.defineProperty(b,"signal",{enumerable:!0,get:()=>(mt(this,Rl,!0),n.signal)})},a=()=>{const b=GI(this.options,i),E=(()=>{const M={client:ve(this,Cl),queryKey:this.queryKey,meta:this.meta};return s(M),M})();return mt(this,Rl,!1),this.options.persister?this.options.persister(b,E,this):b(E)},l=(()=>{const b={fetchOptions:i,options:this.options,queryKey:this.queryKey,client:ve(this,Cl),state:this.state,fetchFn:a};return s(b),b})();(c=this.options.behavior)==null||c.onFetch(l,this),mt(this,kc,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((h=l.fetchOptions)==null?void 0:h.meta))&&mr(this,Zn,Sa).call(this,{type:"fetch",meta:(d=l.fetchOptions)==null?void 0:d.meta}),mt(this,Ki,qI({initialPromise:i==null?void 0:i.initialPromise,fn:l.fetchFn,onCancel:b=>{b instanceof cT&&b.revert&&this.setState({...ve(this,kc),fetchStatus:"idle"}),n.abort()},onFail:(b,T)=>{mr(this,Zn,Sa).call(this,{type:"failed",failureCount:b,error:T})},onPause:()=>{mr(this,Zn,Sa).call(this,{type:"pause"})},onContinue:()=>{mr(this,Zn,Sa).call(this,{type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0}));try{const b=await ve(this,Ki).start();if(b===void 0)throw process.env.NODE_ENV!=="production"&&console.error(`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`),new Error(`${this.queryHash} data is undefined`);return this.setData(b),(f=(p=ve(this,wn).config).onSuccess)==null||f.call(p,b,this),(y=(m=ve(this,wn).config).onSettled)==null||y.call(m,b,this.state.error,this),b}catch(b){if(b instanceof cT){if(b.silent)return ve(this,Ki).promise;if(b.revert){if(this.state.data===void 0)throw b;return this.state.data}}throw mr(this,Zn,Sa).call(this,{type:"error",error:b}),(g=(v=ve(this,wn).config).onError)==null||g.call(v,b,this),(x=(_=ve(this,wn).config).onSettled)==null||x.call(_,this.state.data,b,this),b}finally{this.scheduleGc()}}},Al=new WeakMap,kc=new WeakMap,wn=new WeakMap,Cl=new WeakMap,Ki=new WeakMap,Jd=new WeakMap,Rl=new WeakMap,Zn=new WeakSet,Sa=function(e){const i=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...zae(n.data,this.options),fetchMeta:e.meta??null};case"success":const s={...n,data:e.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return mt(this,kc,e.manual?s:void 0),s;case"error":const a=e.error;return{...n,error:a,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=i(this.state),Ar.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),ve(this,wn).notify({query:this,type:"updated",action:e})})},gO);function zae(r,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:WI(e.networkMode)?"fetching":"paused",...r===void 0&&{error:null,status:"pending"}}}function YI(r){const e=typeof r.initialData=="function"?r.initialData():r.initialData,i=e!==void 0,n=i?typeof r.initialDataUpdatedAt=="function"?r.initialDataUpdatedAt():r.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:i?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:i?"success":"pending",fetchStatus:"idle"}}function KI(r){return{onFetch:(e,i)=>{var h,d,p,f,m;const n=e.options,s=(p=(d=(h=e.fetchOptions)==null?void 0:h.meta)==null?void 0:d.fetchMore)==null?void 0:p.direction,a=((f=e.state.data)==null?void 0:f.pages)||[],o=((m=e.state.data)==null?void 0:m.pageParams)||[];let l={pages:[],pageParams:[]},u=0;const c=async()=>{let y=!1;const v=x=>{Object.defineProperty(x,"signal",{enumerable:!0,get:()=>(e.signal.aborted?y=!0:e.signal.addEventListener("abort",()=>{y=!0}),e.signal)})},g=GI(e.options,e.fetchOptions),_=async(x,b,T)=>{if(y)return Promise.reject();if(b==null&&x.pages.length)return Promise.resolve(x);const M=(()=>{const R={client:e.client,queryKey:e.queryKey,pageParam:b,direction:T?"backward":"forward",meta:e.options.meta};return v(R),R})(),C=await g(M),{maxPages:S}=e.options,w=T?Iae:Pae;return{pages:w(x.pages,C,S),pageParams:w(x.pageParams,b,S)}};if(s&&a.length){const x=s==="backward",b=x?jae:ZI,T={pages:a,pageParams:o},E=b(n,T);l=await _(T,E,x)}else{const x=r??a.length;do{const b=u===0?o[0]??n.initialPageParam:ZI(n,l);if(u>0&&b==null)break;l=await _(l,b),u++}while(u<x)}return l};e.options.persister?e.fetchFn=()=>{var y,v;return(v=(y=e.options).persister)==null?void 0:v.call(y,c,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},i)}:e.fetchFn=c}}}function ZI(r,{pages:e,pageParams:i}){const n=e.length-1;return e.length>0?r.getNextPageParam(e[n],e,i[n],i):void 0}function jae(r,{pages:e,pageParams:i}){var n;return e.length>0?(n=r.getPreviousPageParam)==null?void 0:n.call(r,e[0],e,i[0],i):void 0}var Vae=(yO=class extends XI{constructor(e){super();zt(this,_s);zt(this,ep);zt(this,xs);zt(this,Rr);zt(this,Nl);mt(this,ep,e.client),this.mutationId=e.mutationId,mt(this,Rr,e.mutationCache),mt(this,xs,[]),this.state=e.state||Gae(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){ve(this,xs).includes(e)||(ve(this,xs).push(e),this.clearGcTimeout(),ve(this,Rr).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){mt(this,xs,ve(this,xs).filter(i=>i!==e)),this.scheduleGc(),ve(this,Rr).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){ve(this,xs).length||(this.state.status==="pending"?this.scheduleGc():ve(this,Rr).remove(this))}continue(){var e;return((e=ve(this,Nl))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var o,l,u,c,h,d,p,f,m,y,v,g,_,x,b,T,E,M,C,S;const i=()=>{mr(this,_s,To).call(this,{type:"continue"})},n={client:ve(this,ep),meta:this.options.meta,mutationKey:this.options.mutationKey};mt(this,Nl,qI({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(w,R)=>{mr(this,_s,To).call(this,{type:"failed",failureCount:w,error:R})},onPause:()=>{mr(this,_s,To).call(this,{type:"pause"})},onContinue:i,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>ve(this,Rr).canRun(this)}));const s=this.state.status==="pending",a=!ve(this,Nl).canStart();try{if(s)i();else{mr(this,_s,To).call(this,{type:"pending",variables:e,isPaused:a}),await((l=(o=ve(this,Rr).config).onMutate)==null?void 0:l.call(o,e,this,n));const R=await((c=(u=this.options).onMutate)==null?void 0:c.call(u,e,n));R!==this.state.context&&mr(this,_s,To).call(this,{type:"pending",context:R,variables:e,isPaused:a})}const w=await ve(this,Nl).start();return await((d=(h=ve(this,Rr).config).onSuccess)==null?void 0:d.call(h,w,e,this.state.context,this,n)),await((f=(p=this.options).onSuccess)==null?void 0:f.call(p,w,e,this.state.context,n)),await((y=(m=ve(this,Rr).config).onSettled)==null?void 0:y.call(m,w,null,this.state.variables,this.state.context,this,n)),await((g=(v=this.options).onSettled)==null?void 0:g.call(v,w,null,e,this.state.context,n)),mr(this,_s,To).call(this,{type:"success",data:w}),w}catch(w){try{throw await((x=(_=ve(this,Rr).config).onError)==null?void 0:x.call(_,w,e,this.state.context,this,n)),await((T=(b=this.options).onError)==null?void 0:T.call(b,w,e,this.state.context,n)),await((M=(E=ve(this,Rr).config).onSettled)==null?void 0:M.call(E,void 0,w,this.state.variables,this.state.context,this,n)),await((S=(C=this.options).onSettled)==null?void 0:S.call(C,void 0,w,e,this.state.context,n)),w}finally{mr(this,_s,To).call(this,{type:"error",error:w})}}finally{ve(this,Rr).runNext(this)}}},ep=new WeakMap,xs=new WeakMap,Rr=new WeakMap,Nl=new WeakMap,_s=new WeakSet,To=function(e){const i=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=i(this.state),Ar.batch(()=>{ve(this,xs).forEach(n=>{n.onMutationUpdate(e)}),ve(this,Rr).notify({mutation:this,type:"updated",action:e})})},yO);function Gae(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Hae=(vO=class extends Vg{constructor(e={}){super();zt(this,wa);zt(this,Qn);zt(this,tp);this.config=e,mt(this,wa,new Set),mt(this,Qn,new Map),mt(this,tp,0)}build(e,i,n){const s=new Vae({client:e,mutationCache:this,mutationId:++$g(this,tp)._,options:e.defaultMutationOptions(i),state:n});return this.add(s),s}add(e){ve(this,wa).add(e);const i=qg(e);if(typeof i=="string"){const n=ve(this,Qn).get(i);n?n.push(e):ve(this,Qn).set(i,[e])}this.notify({type:"added",mutation:e})}remove(e){if(ve(this,wa).delete(e)){const i=qg(e);if(typeof i=="string"){const n=ve(this,Qn).get(i);if(n)if(n.length>1){const s=n.indexOf(e);s!==-1&&n.splice(s,1)}else n[0]===e&&ve(this,Qn).delete(i)}}this.notify({type:"removed",mutation:e})}canRun(e){const i=qg(e);if(typeof i=="string"){const n=ve(this,Qn).get(i),s=n==null?void 0:n.find(a=>a.state.status==="pending");return!s||s===e}else return!0}runNext(e){var n;const i=qg(e);if(typeof i=="string"){const s=(n=ve(this,Qn).get(i))==null?void 0:n.find(a=>a!==e&&a.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Ar.batch(()=>{ve(this,wa).forEach(e=>{this.notify({type:"removed",mutation:e})}),ve(this,wa).clear(),ve(this,Qn).clear()})}getAll(){return Array.from(ve(this,wa))}find(e){const i={exact:!0,...e};return this.getAll().find(n=>zI(i,n))}findAll(e={}){return this.getAll().filter(i=>zI(e,i))}notify(e){Ar.batch(()=>{this.listeners.forEach(i=>{i(e)})})}resumePausedMutations(){const e=this.getAll().filter(i=>i.state.isPaused);return Ar.batch(()=>Promise.all(e.map(i=>i.continue().catch(Kn))))}},wa=new WeakMap,Qn=new WeakMap,tp=new WeakMap,vO);function qg(r){var e;return(e=r.options.scope)==null?void 0:e.id}var Wae=(bO=class extends Vg{constructor(e={}){super();zt(this,Ts);this.config=e,mt(this,Ts,new Map)}build(e,i,n){const s=i.queryKey,a=i.queryHash??oT(s,i);let o=this.get(a);return o||(o=new Bae({client:e,queryKey:s,queryHash:a,options:e.defaultQueryOptions(i),state:n,defaultOptions:e.getQueryDefaults(s)}),this.add(o)),o}add(e){ve(this,Ts).has(e.queryHash)||(ve(this,Ts).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const i=ve(this,Ts).get(e.queryHash);i&&(e.destroy(),i===e&&ve(this,Ts).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Ar.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return ve(this,Ts).get(e)}getAll(){return[...ve(this,Ts).values()]}find(e){const i={exact:!0,...e};return this.getAll().find(n=>BI(i,n))}findAll(e={}){const i=this.getAll();return Object.keys(e).length>0?i.filter(n=>BI(e,n)):i}notify(e){Ar.batch(()=>{this.listeners.forEach(i=>{i(e)})})}onFocus(){Ar.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Ar.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Ts=new WeakMap,bO),qae=(xO=class{constructor(r={}){zt(this,Mi);zt(this,go);zt(this,yo);zt(this,Uc);zt(this,Fc);zt(this,vo);zt(this,Bc);zt(this,zc);mt(this,Mi,r.queryCache||new Wae),mt(this,go,r.mutationCache||new Hae),mt(this,yo,r.defaultOptions||{}),mt(this,Uc,new Map),mt(this,Fc,new Map),mt(this,vo,0)}mount(){$g(this,vo)._++,ve(this,vo)===1&&(mt(this,Bc,HI.subscribe(async r=>{r&&(await this.resumePausedMutations(),ve(this,Mi).onFocus())})),mt(this,zc,Wg.subscribe(async r=>{r&&(await this.resumePausedMutations(),ve(this,Mi).onOnline())})))}unmount(){var r,e;$g(this,vo)._--,ve(this,vo)===0&&((r=ve(this,Bc))==null||r.call(this),mt(this,Bc,void 0),(e=ve(this,zc))==null||e.call(this),mt(this,zc,void 0))}isFetching(r){return ve(this,Mi).findAll({...r,fetchStatus:"fetching"}).length}isMutating(r){return ve(this,go).findAll({...r,status:"pending"}).length}getQueryData(r){var i;const e=this.defaultQueryOptions({queryKey:r});return(i=ve(this,Mi).get(e.queryHash))==null?void 0:i.state.data}ensureQueryData(r){const e=this.defaultQueryOptions(r),i=ve(this,Mi).build(this,e),n=i.state.data;return n===void 0?this.fetchQuery(r):(r.revalidateIfStale&&i.isStaleByTime(aT(e.staleTime,i))&&this.prefetchQuery(e),Promise.resolve(n))}getQueriesData(r){return ve(this,Mi).findAll(r).map(({queryKey:e,state:i})=>{const n=i.data;return[e,n]})}setQueryData(r,e,i){const n=this.defaultQueryOptions({queryKey:r}),s=ve(this,Mi).get(n.queryHash),a=s==null?void 0:s.state.data,o=Sae(e,a);if(o!==void 0)return ve(this,Mi).build(this,n).setData(o,{...i,manual:!0})}setQueriesData(r,e,i){return Ar.batch(()=>ve(this,Mi).findAll(r).map(({queryKey:n})=>[n,this.setQueryData(n,e,i)]))}getQueryState(r){var i;const e=this.defaultQueryOptions({queryKey:r});return(i=ve(this,Mi).get(e.queryHash))==null?void 0:i.state}removeQueries(r){const e=ve(this,Mi);Ar.batch(()=>{e.findAll(r).forEach(i=>{e.remove(i)})})}resetQueries(r,e){const i=ve(this,Mi);return Ar.batch(()=>(i.findAll(r).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...r},e)))}cancelQueries(r,e={}){const i={revert:!0,...e},n=Ar.batch(()=>ve(this,Mi).findAll(r).map(s=>s.cancel(i)));return Promise.all(n).then(Kn).catch(Kn)}invalidateQueries(r,e={}){return Ar.batch(()=>(ve(this,Mi).findAll(r).forEach(i=>{i.invalidate()}),(r==null?void 0:r.refetchType)==="none"?Promise.resolve():this.refetchQueries({...r,type:(r==null?void 0:r.refetchType)??(r==null?void 0:r.type)??"active"},e)))}refetchQueries(r,e={}){const i={...e,cancelRefetch:e.cancelRefetch??!0},n=Ar.batch(()=>ve(this,Mi).findAll(r).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let a=s.fetch(void 0,i);return i.throwOnError||(a=a.catch(Kn)),s.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(n).then(Kn)}fetchQuery(r){const e=this.defaultQueryOptions(r);e.retry===void 0&&(e.retry=!1);const i=ve(this,Mi).build(this,e);return i.isStaleByTime(aT(e.staleTime,i))?i.fetch(e):Promise.resolve(i.state.data)}prefetchQuery(r){return this.fetchQuery(r).then(Kn).catch(Kn)}fetchInfiniteQuery(r){return r.behavior=KI(r.pages),this.fetchQuery(r)}prefetchInfiniteQuery(r){return this.fetchInfiniteQuery(r).then(Kn).catch(Kn)}ensureInfiniteQueryData(r){return r.behavior=KI(r.pages),this.ensureQueryData(r)}resumePausedMutations(){return Wg.isOnline()?ve(this,go).resumePausedMutations():Promise.resolve()}getQueryCache(){return ve(this,Mi)}getMutationCache(){return ve(this,go)}getDefaultOptions(){return ve(this,yo)}setDefaultOptions(r){mt(this,yo,r)}setQueryDefaults(r,e){ve(this,Uc).set(Qd(r),{queryKey:r,defaultOptions:e})}getQueryDefaults(r){const e=[...ve(this,Uc).values()],i={};return e.forEach(n=>{$d(r,n.queryKey)&&Object.assign(i,n.defaultOptions)}),i}setMutationDefaults(r,e){ve(this,Fc).set(Qd(r),{mutationKey:r,defaultOptions:e})}getMutationDefaults(r){const e=[...ve(this,Fc).values()],i={};return e.forEach(n=>{$d(r,n.mutationKey)&&Object.assign(i,n.defaultOptions)}),i}defaultQueryOptions(r){if(r._defaulted)return r;const e={...ve(this,yo).queries,...this.getQueryDefaults(r.queryKey),...r,_defaulted:!0};return e.queryHash||(e.queryHash=oT(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===Hg&&(e.enabled=!1),e}defaultMutationOptions(r){return r!=null&&r._defaulted?r:{...ve(this,yo).mutations,...(r==null?void 0:r.mutationKey)&&this.getMutationDefaults(r.mutationKey),...r,_defaulted:!0}}clear(){ve(this,Mi).clear(),ve(this,go).clear()}},Mi=new WeakMap,go=new WeakMap,yo=new WeakMap,Uc=new WeakMap,Fc=new WeakMap,vo=new WeakMap,Bc=new WeakMap,zc=new WeakMap,xO),Xae=sp.createContext(void 0),Yae=({client:r,children:e})=>(sp.useEffect(()=>(r.mount(),()=>{r.unmount()}),[r]),I.jsx(Xae.Provider,{value:r,children:e})),Kae="https://prod.base-sepolia.intuition-api.com/v1/graphql",Zae="https://prod.base-mainnet-v-1-0.intuition.sh/v1/graphql",Qae=Zae,QI={apiUrl:Qae};function $ae(r){QI={...QI,...r}}var ii=(r=>(r.MAINNET="mainnet",r.TESTNET="testnet",r))(ii||{});const Cr={mainnet:"https://testnet.intuition.sh/v1/graphql",testnet:Kae},hT=async(r,e=ii.MAINNET)=>{var i,n;try{const s=Cr[e],a=[],o=100;let l=0,u=!0;for(;u;){const h=await(await fetch(s,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:`query GetActivePositions($accountId: String!, $limit: Int!, $offset: Int!) {
5402
5402
  positions(where: { account_id: { _eq: $accountId }, shares: { _gt: 0 } }, limit: $limit, offset: $offset) {
5403
5403
  id
5404
5404
  shares
@@ -5457,14 +5457,14 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
5457
5457
  }
5458
5458
  }
5459
5459
  }
5460
- }`,variables:{accountId:r,limit:o,offset:l}})})).json();if(h.errors)throw console.error("GraphQL errors:",h.errors),new Error(((i=h.errors[0])==null?void 0:i.message)||"GraphQL error");const d=((n=h.data)==null?void 0:n.positions)||[];d.length===0?u=!1:(a.push(...d),d.length<o?u=!1:l+=o),l>1e5&&(u=!1)}return a}catch(s){return console.error("Error fetching active positions:",s),[]}},Jae=({claim:r,walletAddress:e,onSelectionChange:i})=>{var m;const[n,s]=V.useState("neutral"),[a,o]=V.useState(0),[l,u]=V.useState([]),[c,h]=V.useState(null);V.useEffect(()=>{(async()=>{if(e)try{const g=(await hT(e,ri.MAINNET)).filter(b=>{var M,C,S;const T=((M=b.term)==null?void 0:M.id)===r.term_id,E=((C=b.term)==null?void 0:C.id)===((S=r.counter_term)==null?void 0:S.id);return T||E});u(g);const _=g.find(b=>{var T;return((T=b.term)==null?void 0:T.id)===r.term_id&&b.shares>0}),x=g.find(b=>{var T,E;return((T=b.term)==null?void 0:T.id)===((E=r.counter_term)==null?void 0:E.id)&&b.shares>0});s(_?"for":x?"against":"neutral")}catch(v){console.error("Error fetching user positions:",v)}})()},[e,r.term_id,(m=r.counter_term)==null?void 0:m.id]);const d=y=>y==="for"?!l.some(g=>{var _,x;return((_=g.term)==null?void 0:_.id)===((x=r.counter_term)==null?void 0:x.id)&&g.shares>0}):y==="against"?!l.some(g=>{var _;return((_=g.term)==null?void 0:_.id)===r.term_id&&g.shares>0}):y==="neutral"?!l.some(g=>{var _,x,b;return(((_=g.term)==null?void 0:_.id)===r.term_id||((x=g.term)==null?void 0:x.id)===((b=r.counter_term)==null?void 0:b.id))&&g.shares>0}):!0,p=y=>{if((y==="for"||y==="against")&&!d(y)){h(`You already have a ${y==="for"?"Against":"For"} position on this claim`);return}h(null),s(y),y==="neutral"&&o(0),i&&i(a,y)},f=y=>{const v=parseFloat(y);if(isNaN(v)||v<0){o(0),i&&i(0,n);return}const g=v;o(g),i&&i(g,n)};return I.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",marginTop:"4px",justifyContent:"flex-end"},children:[c&&I.jsx("div",{style:{color:"#ff6b6b",fontSize:"10px",marginRight:"8px",padding:"2px 6px",backgroundColor:"rgba(255, 107, 107, 0.1)",borderRadius:"3px",border:"1px solid rgba(255, 107, 107, 0.3)"},children:c}),I.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"4px"},children:[I.jsx("input",{type:"number",value:a,onChange:y=>f(y.target.value),step:"0.001",min:"0",placeholder:"0.000",style:{width:"65px",padding:"2px",backgroundColor:"rgba(255, 255, 255, 0.05)",border:"1px solid rgba(255, 255, 255, 0.1)",borderRadius:"6px",color:"#fff",fontSize:"12px",textAlign:"left",marginBottom:"2px"},disabled:n==="neutral"}),I.jsx("span",{style:{fontSize:"12px",color:"rgba(255, 255, 255, 0.6)",fontWeight:"500"},children:"TRUST"})]}),I.jsx("div",{style:{position:"relative",width:"60px",height:"20px",backgroundColor:"rgba(255, 255, 255, 0.1)",borderRadius:"10px",cursor:"pointer",opacity:d("for")&&d("against")&&d("neutral")?1:.5},onClick:()=>{n==="neutral"&&d("for")?p("for"):n==="for"&&d("against")?p("against"):(n==="against"&&d("neutral")||n==="for"&&!d("against")&&d("neutral")||n==="against"&&!d("for")&&d("neutral"))&&p("neutral")},title:!d("for")||!d("against")||!d("neutral")?"You already have an active position on this claim":`Current: ${n.toUpperCase()} - Click to change`,children:I.jsx("div",{style:{position:"absolute",top:"2px",left:n==="for"?"2px":n==="against"?"42px":"20px",width:"16px",height:"16px",backgroundColor:n==="for"?"rgb(0, 111, 232)":n==="against"?"rgb(255, 149, 0)":"rgba(255, 255, 255, 0.3)",borderRadius:"50%",transition:"all 0.2s ease",boxShadow:"0 1px 3px rgba(0, 0, 0, 0.3)"}})})]})};var ot=(r=>(r.For="FOR",r.Against="AGAINST",r.None="NONE",r))(ot||{});const wl={GAMES_ID:"0x5dc0a2335c12343d8e0f71b62a73fbf70d06fcbaf647f57d82a189873ad90da3",FOLLOWS:"0x8f9b5dc2e7b8bd12f6762c839830672f1d13c08e72b5f09f194cafc153f2df8a",IS:"0x2af261bce70c2fc3a1abf882e3e89b23066fcd150bfda27fab69f9f55ed2d9d0",IS_PLAYER_OF:"0x05f1707d8cb50571d01021f09a664826aa1be2ff43504c0cca55eef87142f84f"},eoe={PLAYER_GAME:{predicateId:wl.IS_PLAYER_OF,objectId:wl.GAMES_ID},PLAYER_QUALITY_1:{predicateId:wl.IS,objectId:"0xc9559c712c264e5f94ce450ed9473c451b6fd01ab6a436a726fbae767cd67b9c"},PLAYER_QUALITY_2:{predicateId:wl.IS,objectId:"0x56d28a901a7f2617247f1663b0c25c77ba6403a8141bac43b1e94eb32a2de941"},PLAYER_QUALITY_3:{predicateId:wl.IS,objectId:"0xc8433466cda62c0e8bb4fc5433f3faa51949072d6c7b0df50a595c95fb97f1bb"},PLAYER_GUILD:{predicateId:wl.IS_PLAYER_OF,objectId:null}},toe=[{id:"0x4320ae619f6a9c9b79ee8e2a9415585aff1c287f0b72b08c049cf7a5780eb08d",name:"The Alchemists"},{id:"0x12d4b4425dcfeaf46af6543e8de0133f22f768a69d56a3aa28662ecb06aa9ca1",name:"Big Time Warriors"},{id:"0xd9e1d54c0cb904c23e04caea94f9d0dae00874ec18849ca74a832e94c6de01fa",name:"The NEST"},{id:"0xd473ceacf850609ff8881c398e85e59aadbc315588ca78182313cc1af05a2800",name:"Clock Work Gamers"},{id:"0x14511bc4065a1e7d67ba7d50d4706a8899a148a2e68b55213794c14e347acaa",name:"Vast Impact Gaming"}],Xg=10000000000000000n,$I=["0x27191de92fe0308355319ec8f2359e5ce85123bd243bf7ffa6eb8028347b3eab","0x561a2c3e4359c8ed1c468aef27691e8e48b4424344a38c7693b9127b1911efc9","0x6d7e52c5e80bf6c2873a21cb7013ba0655dc0458c77f2c0e7446c49efdbd0033"],ioe={COMMON_IDS:wl,PLAYER_TRIPLE_TYPES:eoe,OFFICIAL_GUILDS:toe,PREDEFINED_CLAIM_IDS:$I},dT=({walletConnected:r,walletAddress:e,publicClient:i,network:n=ri.MAINNET})=>{const[s,a]=V.useState(!1),o=async u=>{var c;try{const h=Cr[n],d=await fetch(h,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:`
5460
+ }`,variables:{accountId:r,limit:o,offset:l}})})).json();if(h.errors)throw console.error("GraphQL errors:",h.errors),new Error(((i=h.errors[0])==null?void 0:i.message)||"GraphQL error");const d=((n=h.data)==null?void 0:n.positions)||[];d.length===0?u=!1:(a.push(...d),d.length<o?u=!1:l+=o),l>1e5&&(u=!1)}return a}catch(s){return console.error("Error fetching active positions:",s),[]}},Jae=({claim:r,walletAddress:e,onSelectionChange:i})=>{var m;const[n,s]=V.useState("neutral"),[a,o]=V.useState(0),[l,u]=V.useState([]),[c,h]=V.useState(null);V.useEffect(()=>{(async()=>{if(e)try{const g=(await hT(e,ii.MAINNET)).filter(b=>{var M,C,S;const T=((M=b.term)==null?void 0:M.id)===r.term_id,E=((C=b.term)==null?void 0:C.id)===((S=r.counter_term)==null?void 0:S.id);return T||E});u(g);const _=g.find(b=>{var T;return((T=b.term)==null?void 0:T.id)===r.term_id&&b.shares>0}),x=g.find(b=>{var T,E;return((T=b.term)==null?void 0:T.id)===((E=r.counter_term)==null?void 0:E.id)&&b.shares>0});s(_?"for":x?"against":"neutral")}catch(v){console.error("Error fetching user positions:",v)}})()},[e,r.term_id,(m=r.counter_term)==null?void 0:m.id]);const d=y=>y==="for"?!l.some(g=>{var _,x;return((_=g.term)==null?void 0:_.id)===((x=r.counter_term)==null?void 0:x.id)&&g.shares>0}):y==="against"?!l.some(g=>{var _;return((_=g.term)==null?void 0:_.id)===r.term_id&&g.shares>0}):y==="neutral"?!l.some(g=>{var _,x,b;return(((_=g.term)==null?void 0:_.id)===r.term_id||((x=g.term)==null?void 0:x.id)===((b=r.counter_term)==null?void 0:b.id))&&g.shares>0}):!0,p=y=>{if((y==="for"||y==="against")&&!d(y)){h(`You already have a ${y==="for"?"Against":"For"} position on this claim`);return}h(null),s(y),y==="neutral"&&o(0),i&&i(a,y)},f=y=>{const v=parseFloat(y);if(isNaN(v)||v<0){o(0),i&&i(0,n);return}const g=v;o(g),i&&i(g,n)};return I.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",marginTop:"4px",justifyContent:"flex-end"},children:[c&&I.jsx("div",{style:{color:"#ff6b6b",fontSize:"10px",marginRight:"8px",padding:"2px 6px",backgroundColor:"rgba(255, 107, 107, 0.1)",borderRadius:"3px",border:"1px solid rgba(255, 107, 107, 0.3)"},children:c}),I.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"4px"},children:[I.jsx("input",{type:"number",value:a,onChange:y=>f(y.target.value),step:"0.001",min:"0",placeholder:"0.000",style:{width:"65px",padding:"2px",backgroundColor:"rgba(255, 255, 255, 0.05)",border:"1px solid rgba(255, 255, 255, 0.1)",borderRadius:"6px",color:"#fff",fontSize:"12px",textAlign:"left",marginBottom:"2px"},disabled:n==="neutral"}),I.jsx("span",{style:{fontSize:"12px",color:"rgba(255, 255, 255, 0.6)",fontWeight:"500"},children:"TRUST"})]}),I.jsx("div",{style:{position:"relative",width:"60px",height:"20px",backgroundColor:"rgba(255, 255, 255, 0.1)",borderRadius:"10px",cursor:"pointer",opacity:d("for")&&d("against")&&d("neutral")?1:.5},onClick:()=>{n==="neutral"&&d("for")?p("for"):n==="for"&&d("against")?p("against"):(n==="against"&&d("neutral")||n==="for"&&!d("against")&&d("neutral")||n==="against"&&!d("for")&&d("neutral"))&&p("neutral")},title:!d("for")||!d("against")||!d("neutral")?"You already have an active position on this claim":`Current: ${n.toUpperCase()} - Click to change`,children:I.jsx("div",{style:{position:"absolute",top:"2px",left:n==="for"?"2px":n==="against"?"42px":"20px",width:"16px",height:"16px",backgroundColor:n==="for"?"rgb(0, 111, 232)":n==="against"?"rgb(255, 149, 0)":"rgba(255, 255, 255, 0.3)",borderRadius:"50%",transition:"all 0.2s ease",boxShadow:"0 1px 3px rgba(0, 0, 0, 0.3)"}})})]})};var ot=(r=>(r.For="FOR",r.Against="AGAINST",r.None="NONE",r))(ot||{});const wl={GAMES_ID:"0x5dc0a2335c12343d8e0f71b62a73fbf70d06fcbaf647f57d82a189873ad90da3",FOLLOWS:"0x8f9b5dc2e7b8bd12f6762c839830672f1d13c08e72b5f09f194cafc153f2df8a",IS:"0x2af261bce70c2fc3a1abf882e3e89b23066fcd150bfda27fab69f9f55ed2d9d0",IS_PLAYER_OF:"0x05f1707d8cb50571d01021f09a664826aa1be2ff43504c0cca55eef87142f84f"},eoe={PLAYER_GAME:{predicateId:wl.IS_PLAYER_OF,objectId:wl.GAMES_ID},PLAYER_QUALITY_1:{predicateId:wl.IS,objectId:"0xc9559c712c264e5f94ce450ed9473c451b6fd01ab6a436a726fbae767cd67b9c"},PLAYER_QUALITY_2:{predicateId:wl.IS,objectId:"0x56d28a901a7f2617247f1663b0c25c77ba6403a8141bac43b1e94eb32a2de941"},PLAYER_QUALITY_3:{predicateId:wl.IS,objectId:"0xc8433466cda62c0e8bb4fc5433f3faa51949072d6c7b0df50a595c95fb97f1bb"},PLAYER_GUILD:{predicateId:wl.IS_PLAYER_OF,objectId:null}},toe=[{id:"0x4320ae619f6a9c9b79ee8e2a9415585aff1c287f0b72b08c049cf7a5780eb08d",name:"The Alchemists"},{id:"0x12d4b4425dcfeaf46af6543e8de0133f22f768a69d56a3aa28662ecb06aa9ca1",name:"Big Time Warriors"},{id:"0xd9e1d54c0cb904c23e04caea94f9d0dae00874ec18849ca74a832e94c6de01fa",name:"The NEST"},{id:"0xd473ceacf850609ff8881c398e85e59aadbc315588ca78182313cc1af05a2800",name:"Clock Work Gamers"},{id:"0x14511bc4065a1e7d67ba7d50d4706a8899a148a2e68b55213794c14e347acaa",name:"Vast Impact Gaming"}],Xg=10000000000000000n,$I=["0x27191de92fe0308355319ec8f2359e5ce85123bd243bf7ffa6eb8028347b3eab","0x561a2c3e4359c8ed1c468aef27691e8e48b4424344a38c7693b9127b1911efc9","0x6d7e52c5e80bf6c2873a21cb7013ba0655dc0458c77f2c0e7446c49efdbd0033"],ioe={COMMON_IDS:wl,PLAYER_TRIPLE_TYPES:eoe,OFFICIAL_GUILDS:toe,PREDEFINED_CLAIM_IDS:$I},dT=({walletConnected:r,walletAddress:e,publicClient:i,network:n=ii.MAINNET})=>{const[s,a]=V.useState(!1),o=async u=>{var c;try{const h=Cr[n],d=await fetch(h,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:`
5461
5461
  query Triple($tripleId: String!) {
5462
5462
  triple(term_id: $tripleId) {
5463
5463
  term_id
5464
5464
  counter_term_id
5465
5465
  }
5466
5466
  }
5467
- `,variables:{tripleId:String(u)}})});if(!d.ok)return null;const p=await d.json();return p.errors?(console.error("❌ GraphQL errors:",p.errors),null):(c=p.data)!=null&&c.triple?{id:String(u),...p.data.triple}:(console.error("❌ No triple data found"),null)}catch(h){return console.error("❌ fetchTripleDetails error:",h),null}};return{depositTriple:async u=>{if(!r||!e)return{success:!1,error:"Wallet not connected"};if(u.length===0)return{success:!1,error:"No votes provided"};for(const c of u)if(c.units<=0)return{success:!1,error:"Units must be greater than 0"};a(!0);try{const c=[],h=[],d=[],p=[];for(const y of u){const v=await o(y.claimId);if(!v)return a(!1),{success:!1,error:`Failed to fetch triple details for claim ${y.claimId}`};let g;if(y.direction===ot.For){if(!v.term_id)return console.error("❌ term_id is undefined for FOR vote"),{success:!1,error:"term_id not found"};g=v.term_id}else{if(!v.counter_term_id)return console.error("❌ counter_term_id is undefined for AGAINST vote"),{success:!1,error:"counter_term_id not found"};g=v.counter_term_id}if(!g)return console.error("❌ targetId is undefined"),{success:!1,error:"targetId not found"};const _=Number(Xg)*y.units,x=Math.round(_),b=BigInt(x);c.push(g),h.push(1n),d.push(b),p.push(0n)}const f=await r.writeContract({address:wo,abi:Ll,functionName:"depositBatch",args:[e,c,h,d,p],value:d.reduce((y,v)=>y+v,0n),gas:500000n*BigInt(u.length)});let m;return r.waitForTransactionReceipt?m=await r.waitForTransactionReceipt({hash:f}):f.wait?m=await f.wait():await new Promise(y=>setTimeout(y,5e3)),a(!1),{success:!0,hash:typeof f=="string"?f:f.hash}}catch(c){return a(!1),{success:!1,error:c instanceof Error?c.message:String(c)}}},isLoading:s}},roe=({isOpen:r,onClose:e,activities:i,walletAddress:n,walletConnected:s,publicClient:a})=>{const[o,l]=V.useState(1),[u,c]=V.useState({}),[h,d]=V.useState(!1),p=10,{depositTriple:f}=dT({walletConnected:s,walletAddress:n,publicClient:a}),m=Math.ceil(i.length/p),y=(o-1)*p,v=y+p,g=i.slice(y,v),_=()=>{e(),l(1),c({})},x=(E,M,C)=>{if(C==="neutral"||M===0){const S={...u};delete S[E],c(S)}else c(S=>({...S,[E]:{trust:M,direction:C}}))},b=async()=>{if(Object.keys(u).length!==0){d(!0);try{const M=Object.entries(u).map(([S,w])=>({claimId:S,units:w.trust*100,direction:w.direction==="for"?ot.For:ot.Against})),C=await f(M);C.success?c({}):console.error("❌ Deposit failed:",C.error)}catch(M){console.error("❌ Deposit error:",M)}finally{d(!1)}}},T=Object.keys(u).length;return I.jsx(iT,{isOpen:r,onClose:_,title:`All Claims (${i.length})`,children:I.jsxs("div",{style:{padding:"0"},children:[I.jsx("div",{style:{padding:"16px 24px 16px"},children:g.map(E=>{var M,C,S,w,R,O;return I.jsxs("div",{style:{width:"100%",display:"flex",flexDirection:"column",alignItems:"center",border:"1px solid rgba(255, 255, 255, 0.1)",borderRadius:"12px",overflow:"hidden",marginBottom:"2px",backgroundColor:"rgba(255, 255, 255, 0.05)"},children:[I.jsxs("div",{style:{width:"100%",display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",padding:"16px 16px 10px 16px",gap:"12px"},children:[I.jsx("div",{style:{display:"flex",flex:1,alignItems:"center",gap:"8px"},children:I.jsx(Kg,{subject:"",predicate:E.predicate.label,object:E.object.label,fontSize:"12px",showArrows:!1})}),I.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[I.jsx(Ic,{isFor:!0,count:((S=(C=(M=E.term)==null?void 0:M.positions_aggregate)==null?void 0:C.aggregate)==null?void 0:S.count)||0,fontSize:"12px",showCount:!0}),I.jsx(Ic,{isFor:!1,count:((O=(R=(w=E.counter_term)==null?void 0:w.positions_aggregate)==null?void 0:R.aggregate)==null?void 0:O.count)||0,fontSize:"12px",showCount:!0})]})]}),I.jsx("div",{style:{width:"100%",display:"flex",justifyContent:"flex-end",marginBottom:"5px",marginRight:"16px"},children:I.jsx(Jae,{claim:E,walletAddress:n,walletConnected:s,publicClient:a,onSelectionChange:(P,A)=>x(E.term_id,P,A)})})]},E.term_id)})}),I.jsxs("div",{style:{borderTop:"1px solid #374151",padding:"16px 24px",backgroundColor:"#18181b",display:"flex",justifyContent:"space-between",alignItems:"center",position:"sticky",bottom:0,zIndex:10},children:[I.jsx("div",{children:I.jsx(nT,{currentPage:o,itemsPerPage:p,totalItems:i.length})}),T>0&&I.jsx("div",{style:{display:"flex",justifyContent:"center",flex:1},children:I.jsx("button",{onClick:b,disabled:h,style:{backgroundColor:"#ffd32a",color:"#000",border:"none",borderRadius:"8px",padding:"12px 24px",fontSize:"14px",fontWeight:"600",cursor:h?"not-allowed":"pointer",opacity:h?.7:1,transition:"all 0.2s",minWidth:"200px"},onMouseEnter:E=>{h||(E.currentTarget.style.backgroundColor="#ffed4e")},onMouseLeave:E=>{h||(E.currentTarget.style.backgroundColor="#ffd32a")},children:h?"Processing...":`Deposit All Selected (${T})`})}),I.jsx("div",{children:I.jsx(rT,{currentPage:o,totalPages:m,onPageChange:l,itemsPerPage:p,totalItems:i.length})})]})]})})},noe=({activities:r,title:e="My Claims",walletAddress:i,walletConnected:n,publicClient:s})=>{const[a,o]=V.useState(!1);return I.jsxs("div",{style:{marginTop:"10px"},children:[I.jsxs("h3",{children:[e," (",r.length,")"]}),r.length>0?I.jsxs("div",{style:{maxHeight:"300px",overflowY:"auto"},children:[r.slice(0,3).map(l=>{var u,c,h,d,p,f,m,y;return I.jsx("div",{style:{width:"100%",display:"flex",flexDirection:"column",alignItems:"center",border:"1px solid rgba(255, 255, 255, 0.1)",borderRadius:"12px",overflow:"hidden",marginBottom:"2px",backgroundColor:"rgba(255, 255, 255, 0.05)"},children:I.jsxs("div",{style:{width:"100%",display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",padding:"16px",gap:"12px"},children:[I.jsx("div",{style:{display:"flex",flex:1,alignItems:"center",gap:"8px"},children:I.jsx(Kg,{subject:"",predicate:String(((u=l.predicate)==null?void 0:u.label)??""),object:String(((c=l.object)==null?void 0:c.label)??""),fontSize:"12px",showArrows:!1})}),I.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[I.jsx(Ic,{isFor:!0,count:((p=(d=(h=l.term)==null?void 0:h.positions_aggregate)==null?void 0:d.aggregate)==null?void 0:p.count)||0,fontSize:"12px",showCount:!0}),I.jsx(Ic,{isFor:!1,count:((y=(m=(f=l.counter_term)==null?void 0:f.positions_aggregate)==null?void 0:m.aggregate)==null?void 0:y.count)||0,fontSize:"12px",showCount:!0})]})]})},l.term_id)}),r.length>3&&I.jsxs("div",{style:{padding:"12px",textAlign:"center",fontSize:"12px",color:"rgba(255, 255, 255, 0.6)",fontStyle:"italic",cursor:"pointer",transition:"color 0.2s"},onClick:()=>o(!0),onMouseEnter:l=>{l.currentTarget.style.color="#fff"},onMouseLeave:l=>{l.currentTarget.style.color="rgba(255, 255, 255, 0.6)"},children:["Show all ",r.length," claims"]})]}):I.jsx("p",{style:{color:"rgba(255, 255, 255, 0.6)",fontStyle:"italic"},children:"No claim found"}),I.jsx(roe,{isOpen:a,onClose:()=>o(!1),activities:r,walletAddress:i,walletConnected:n,publicClient:s})]})},soe=()=>{const[r,e]=V.useState(new Set),[i,n]=V.useState({});return{selectedPositions:r,redeemAmounts:i,handlePositionSelect:(l,u)=>{e(c=>{const h=new Set(c);return u?h.add(l):(h.delete(l),n(d=>{const p={...d};return delete p[l],p})),h})},handleAmountChange:(l,u)=>{n(c=>({...c,[l]:u}))},clearSelection:()=>{e(new Set),n({})}}},aoe=({walletConnected:r,walletAddress:e})=>{const[i,n]=V.useState(!1);return{redeemBatch:async a=>{if(!r||!e)throw new Error("Wallet not connected");n(!0);try{const o=await r.writeContract({address:wo,abi:Ll,functionName:"redeemBatch",args:[a.receiver,a.termIds,a.curveIds,a.shares,a.minAssets],gas:500000n*BigInt(a.termIds.length)});let l;return r.waitForTransactionReceipt?l=await r.waitForTransactionReceipt({hash:o}):o.wait?l=await o.wait():await new Promise(u=>setTimeout(u,5e3)),n(!1),{success:!0,hash:typeof o=="string"?o:o.hash}}catch(o){throw n(!1),o}},isLoading:i}},ooe=({walletConnected:r,walletAddress:e})=>{const{redeemBatch:i,isLoading:n}=aoe({walletConnected:r,walletAddress:e});return{handleRedeemAllSelected:async(a,o,l,u)=>{if(o.size===0)return;const c=a.filter(h=>o.has(h.id));try{const h=[],d=[],p=[],f=[];for(const m of c){const y=l[m.id]||m.shares,v=m.curve_id;h.push(m.term.id),d.push(BigInt(v)),p.push(BigInt(y)),f.push(BigInt(0))}return await i({receiver:u,termIds:h,curveIds:d,shares:p,minAssets:f}),{success:!0}}catch(h){return console.error("Error redeeming selected positions:",h),{success:!1,error:h}}},isLoading:n}},loe=({accountId:r,walletConnected:e,walletAddress:i})=>{const[n,s]=V.useState([]),[a,o]=V.useState(!0),[l,u]=V.useState(!1),[c,h]=V.useState(1),d=7,{selectedPositions:p,redeemAmounts:f,handlePositionSelect:m,handleAmountChange:y,clearSelection:v}=soe(),{handleRedeemAllSelected:g,isLoading:_}=ooe({walletConnected:e,walletAddress:i});V.useEffect(()=>{(async()=>{if(r){o(!0);try{const T=await hT(r);s(T)}catch(T){console.error("Error loading positions:",T),s([])}finally{o(!1)}}})()},[r]);const x=async()=>{const b=await g(n,p,f,r);b!=null&&b.success&&v()};return a?I.jsxs("div",{style:{marginTop:"10px",marginBottom:"10px"},children:[I.jsx("h3",{children:"My Positions"}),I.jsx("p",{children:"Loading positions..."})]}):I.jsxs("div",{style:{marginTop:"10px",marginBottom:"10px"},children:[I.jsxs("button",{onClick:()=>u(!0),style:{background:"#ffd32a",color:"#000",border:"none",borderRadius:"8px",padding:"12px 24px",fontSize:"14px",fontWeight:"bold",cursor:"pointer",transition:"all 0.2s",width:"100%"},onMouseEnter:b=>{b.currentTarget.style.background="#ffed4e",b.currentTarget.style.transform="translateY(-1px)"},onMouseLeave:b=>{b.currentTarget.style.background="#ffd32a",b.currentTarget.style.transform="translateY(0)"},children:["My Positions (",n.length,")"]}),I.jsx(iT,{isOpen:l,onClose:()=>{u(!1),h(1)},title:`My Positions (${n.length})`,children:I.jsxs("div",{style:{padding:"0"},children:[(()=>{const b=(c-1)*d,T=b+d;return n.slice(b,T).map((M,C)=>I.jsx("div",{style:{padding:"8px 24px 8px"},children:I.jsx(bae,{position:M,isSelected:p.has(M.id),onSelect:m,onAmountChange:y,redeemAmount:f[M.id]},M.id||C)},M.id||C))})(),I.jsxs("div",{style:{borderTop:"1px solid #374151",padding:"16px 24px",backgroundColor:"#18181b",display:"flex",justifyContent:"space-between",alignItems:"center",position:"sticky",bottom:0,zIndex:10},children:[I.jsx("div",{children:I.jsx(nT,{currentPage:c,itemsPerPage:d,totalItems:n.length})}),I.jsx("div",{children:I.jsx(hoe,{selectedCount:p.size,onRedeemAll:x,isLoading:_})}),I.jsx("div",{children:I.jsx(rT,{currentPage:c,totalPages:Math.ceil(n.length/d),onPageChange:h,itemsPerPage:d,totalItems:n.length})})]})]})})]})},JI=async(r,e,i,n,s=100)=>{var u,c;const a=[];let o=0,l=!0;for(;l;){const d=await(await fetch(r,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:e,variables:{...i,limit:s,offset:o}})})).json();if(d.errors)throw console.error("GraphQL errors:",d.errors),new Error(((u=d.errors[0])==null?void 0:u.message)||"GraphQL error");const p=((c=d.data)==null?void 0:c[n])||[];p.length===0?l=!1:(a.push(...p),p.length<s?l=!1:o+=s)}return a},uoe=async(r,e=ri.MAINNET)=>{try{const i=Cr[e],n=100,s=`
5467
+ `,variables:{tripleId:String(u)}})});if(!d.ok)return null;const p=await d.json();return p.errors?(console.error("❌ GraphQL errors:",p.errors),null):(c=p.data)!=null&&c.triple?{id:String(u),...p.data.triple}:(console.error("❌ No triple data found"),null)}catch(h){return console.error("❌ fetchTripleDetails error:",h),null}};return{depositTriple:async u=>{if(!r||!e)return{success:!1,error:"Wallet not connected"};if(u.length===0)return{success:!1,error:"No votes provided"};for(const c of u)if(c.units<=0)return{success:!1,error:"Units must be greater than 0"};a(!0);try{const c=[],h=[],d=[],p=[];for(const y of u){const v=await o(y.claimId);if(!v)return a(!1),{success:!1,error:`Failed to fetch triple details for claim ${y.claimId}`};let g;if(y.direction===ot.For){if(!v.term_id)return console.error("❌ term_id is undefined for FOR vote"),{success:!1,error:"term_id not found"};g=v.term_id}else{if(!v.counter_term_id)return console.error("❌ counter_term_id is undefined for AGAINST vote"),{success:!1,error:"counter_term_id not found"};g=v.counter_term_id}if(!g)return console.error("❌ targetId is undefined"),{success:!1,error:"targetId not found"};const _=Number(Xg)*y.units,x=Math.round(_),b=BigInt(x);c.push(g),h.push(1n),d.push(b),p.push(0n)}const f=await r.writeContract({address:wo,abi:Ll,functionName:"depositBatch",args:[e,c,h,d,p],value:d.reduce((y,v)=>y+v,0n),gas:500000n*BigInt(u.length)});let m;return r.waitForTransactionReceipt?m=await r.waitForTransactionReceipt({hash:f}):f.wait?m=await f.wait():await new Promise(y=>setTimeout(y,5e3)),a(!1),{success:!0,hash:typeof f=="string"?f:f.hash}}catch(c){return a(!1),{success:!1,error:c instanceof Error?c.message:String(c)}}},isLoading:s}},roe=({isOpen:r,onClose:e,activities:i,walletAddress:n,walletConnected:s,publicClient:a})=>{const[o,l]=V.useState(1),[u,c]=V.useState({}),[h,d]=V.useState(!1),p=10,{depositTriple:f}=dT({walletConnected:s,walletAddress:n,publicClient:a}),m=Math.ceil(i.length/p),y=(o-1)*p,v=y+p,g=i.slice(y,v),_=()=>{e(),l(1),c({})},x=(E,M,C)=>{if(C==="neutral"||M===0){const S={...u};delete S[E],c(S)}else c(S=>({...S,[E]:{trust:M,direction:C}}))},b=async()=>{if(Object.keys(u).length!==0){d(!0);try{const M=Object.entries(u).map(([S,w])=>({claimId:S,units:w.trust*100,direction:w.direction==="for"?ot.For:ot.Against})),C=await f(M);C.success?c({}):console.error("❌ Deposit failed:",C.error)}catch(M){console.error("❌ Deposit error:",M)}finally{d(!1)}}},T=Object.keys(u).length;return I.jsx(iT,{isOpen:r,onClose:_,title:`All Claims (${i.length})`,children:I.jsxs("div",{style:{padding:"0"},children:[I.jsx("div",{style:{padding:"16px 24px 16px"},children:g.map(E=>{var M,C,S,w,R,O;return I.jsxs("div",{style:{width:"100%",display:"flex",flexDirection:"column",alignItems:"center",border:"1px solid rgba(255, 255, 255, 0.1)",borderRadius:"12px",overflow:"hidden",marginBottom:"2px",backgroundColor:"rgba(255, 255, 255, 0.05)"},children:[I.jsxs("div",{style:{width:"100%",display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",padding:"16px 16px 10px 16px",gap:"12px"},children:[I.jsx("div",{style:{display:"flex",flex:1,alignItems:"center",gap:"8px"},children:I.jsx(Kg,{subject:"",predicate:E.predicate.label,object:E.object.label,fontSize:"12px",showArrows:!1})}),I.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[I.jsx(Ic,{isFor:!0,count:((S=(C=(M=E.term)==null?void 0:M.positions_aggregate)==null?void 0:C.aggregate)==null?void 0:S.count)||0,fontSize:"12px",showCount:!0}),I.jsx(Ic,{isFor:!1,count:((O=(R=(w=E.counter_term)==null?void 0:w.positions_aggregate)==null?void 0:R.aggregate)==null?void 0:O.count)||0,fontSize:"12px",showCount:!0})]})]}),I.jsx("div",{style:{width:"100%",display:"flex",justifyContent:"flex-end",marginBottom:"5px",marginRight:"16px"},children:I.jsx(Jae,{claim:E,walletAddress:n,walletConnected:s,publicClient:a,onSelectionChange:(P,A)=>x(E.term_id,P,A)})})]},E.term_id)})}),I.jsxs("div",{style:{borderTop:"1px solid #374151",padding:"16px 24px",backgroundColor:"#18181b",display:"flex",justifyContent:"space-between",alignItems:"center",position:"sticky",bottom:0,zIndex:10},children:[I.jsx("div",{children:I.jsx(nT,{currentPage:o,itemsPerPage:p,totalItems:i.length})}),T>0&&I.jsx("div",{style:{display:"flex",justifyContent:"center",flex:1},children:I.jsx("button",{onClick:b,disabled:h,style:{backgroundColor:"#ffd32a",color:"#000",border:"none",borderRadius:"8px",padding:"12px 24px",fontSize:"14px",fontWeight:"600",cursor:h?"not-allowed":"pointer",opacity:h?.7:1,transition:"all 0.2s",minWidth:"200px"},onMouseEnter:E=>{h||(E.currentTarget.style.backgroundColor="#ffed4e")},onMouseLeave:E=>{h||(E.currentTarget.style.backgroundColor="#ffd32a")},children:h?"Processing...":`Deposit All Selected (${T})`})}),I.jsx("div",{children:I.jsx(rT,{currentPage:o,totalPages:m,onPageChange:l,itemsPerPage:p,totalItems:i.length})})]})]})})},noe=({activities:r,title:e="My Claims",walletAddress:i,walletConnected:n,publicClient:s})=>{const[a,o]=V.useState(!1);return I.jsxs("div",{style:{marginTop:"10px"},children:[I.jsxs("h3",{children:[e," (",r.length,")"]}),r.length>0?I.jsxs("div",{style:{maxHeight:"300px",overflowY:"auto"},children:[r.slice(0,3).map(l=>{var u,c,h,d,p,f,m,y;return I.jsx("div",{style:{width:"100%",display:"flex",flexDirection:"column",alignItems:"center",border:"1px solid rgba(255, 255, 255, 0.1)",borderRadius:"12px",overflow:"hidden",marginBottom:"2px",backgroundColor:"rgba(255, 255, 255, 0.05)"},children:I.jsxs("div",{style:{width:"100%",display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",padding:"16px",gap:"12px"},children:[I.jsx("div",{style:{display:"flex",flex:1,alignItems:"center",gap:"8px"},children:I.jsx(Kg,{subject:"",predicate:String(((u=l.predicate)==null?void 0:u.label)??""),object:String(((c=l.object)==null?void 0:c.label)??""),fontSize:"12px",showArrows:!1})}),I.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[I.jsx(Ic,{isFor:!0,count:((p=(d=(h=l.term)==null?void 0:h.positions_aggregate)==null?void 0:d.aggregate)==null?void 0:p.count)||0,fontSize:"12px",showCount:!0}),I.jsx(Ic,{isFor:!1,count:((y=(m=(f=l.counter_term)==null?void 0:f.positions_aggregate)==null?void 0:m.aggregate)==null?void 0:y.count)||0,fontSize:"12px",showCount:!0})]})]})},l.term_id)}),r.length>3&&I.jsxs("div",{style:{padding:"12px",textAlign:"center",fontSize:"12px",color:"rgba(255, 255, 255, 0.6)",fontStyle:"italic",cursor:"pointer",transition:"color 0.2s"},onClick:()=>o(!0),onMouseEnter:l=>{l.currentTarget.style.color="#fff"},onMouseLeave:l=>{l.currentTarget.style.color="rgba(255, 255, 255, 0.6)"},children:["Show all ",r.length," claims"]})]}):I.jsx("p",{style:{color:"rgba(255, 255, 255, 0.6)",fontStyle:"italic"},children:"No claim found"}),I.jsx(roe,{isOpen:a,onClose:()=>o(!1),activities:r,walletAddress:i,walletConnected:n,publicClient:s})]})},soe=()=>{const[r,e]=V.useState(new Set),[i,n]=V.useState({});return{selectedPositions:r,redeemAmounts:i,handlePositionSelect:(l,u)=>{e(c=>{const h=new Set(c);return u?h.add(l):(h.delete(l),n(d=>{const p={...d};return delete p[l],p})),h})},handleAmountChange:(l,u)=>{n(c=>({...c,[l]:u}))},clearSelection:()=>{e(new Set),n({})}}},aoe=({walletConnected:r,walletAddress:e})=>{const[i,n]=V.useState(!1);return{redeemBatch:async a=>{if(!r||!e)throw new Error("Wallet not connected");n(!0);try{const o=await r.writeContract({address:wo,abi:Ll,functionName:"redeemBatch",args:[a.receiver,a.termIds,a.curveIds,a.shares,a.minAssets],gas:500000n*BigInt(a.termIds.length)});let l;return r.waitForTransactionReceipt?l=await r.waitForTransactionReceipt({hash:o}):o.wait?l=await o.wait():await new Promise(u=>setTimeout(u,5e3)),n(!1),{success:!0,hash:typeof o=="string"?o:o.hash}}catch(o){throw n(!1),o}},isLoading:i}},ooe=({walletConnected:r,walletAddress:e})=>{const{redeemBatch:i,isLoading:n}=aoe({walletConnected:r,walletAddress:e});return{handleRedeemAllSelected:async(a,o,l,u)=>{if(o.size===0)return;const c=a.filter(h=>o.has(h.id));try{const h=[],d=[],p=[],f=[];for(const m of c){const y=l[m.id]||m.shares,v=m.curve_id;h.push(m.term.id),d.push(BigInt(v)),p.push(BigInt(y)),f.push(BigInt(0))}return await i({receiver:u,termIds:h,curveIds:d,shares:p,minAssets:f}),{success:!0}}catch(h){return console.error("Error redeeming selected positions:",h),{success:!1,error:h}}},isLoading:n}},loe=({accountId:r,walletConnected:e,walletAddress:i})=>{const[n,s]=V.useState([]),[a,o]=V.useState(!0),[l,u]=V.useState(!1),[c,h]=V.useState(1),d=7,{selectedPositions:p,redeemAmounts:f,handlePositionSelect:m,handleAmountChange:y,clearSelection:v}=soe(),{handleRedeemAllSelected:g,isLoading:_}=ooe({walletConnected:e,walletAddress:i});V.useEffect(()=>{(async()=>{if(r){o(!0);try{const T=await hT(r);s(T)}catch(T){console.error("Error loading positions:",T),s([])}finally{o(!1)}}})()},[r]);const x=async()=>{const b=await g(n,p,f,r);b!=null&&b.success&&v()};return a?I.jsxs("div",{style:{marginTop:"10px",marginBottom:"10px"},children:[I.jsx("h3",{children:"My Positions"}),I.jsx("p",{children:"Loading positions..."})]}):I.jsxs("div",{style:{marginTop:"10px",marginBottom:"10px"},children:[I.jsxs("button",{onClick:()=>u(!0),style:{background:"#ffd32a",color:"#000",border:"none",borderRadius:"8px",padding:"12px 24px",fontSize:"14px",fontWeight:"bold",cursor:"pointer",transition:"all 0.2s",width:"100%"},onMouseEnter:b=>{b.currentTarget.style.background="#ffed4e",b.currentTarget.style.transform="translateY(-1px)"},onMouseLeave:b=>{b.currentTarget.style.background="#ffd32a",b.currentTarget.style.transform="translateY(0)"},children:["My Positions (",n.length,")"]}),I.jsx(iT,{isOpen:l,onClose:()=>{u(!1),h(1)},title:`My Positions (${n.length})`,children:I.jsxs("div",{style:{padding:"0"},children:[(()=>{const b=(c-1)*d,T=b+d;return n.slice(b,T).map((M,C)=>I.jsx("div",{style:{padding:"8px 24px 8px"},children:I.jsx(bae,{position:M,isSelected:p.has(M.id),onSelect:m,onAmountChange:y,redeemAmount:f[M.id]},M.id||C)},M.id||C))})(),I.jsxs("div",{style:{borderTop:"1px solid #374151",padding:"16px 24px",backgroundColor:"#18181b",display:"flex",justifyContent:"space-between",alignItems:"center",position:"sticky",bottom:0,zIndex:10},children:[I.jsx("div",{children:I.jsx(nT,{currentPage:c,itemsPerPage:d,totalItems:n.length})}),I.jsx("div",{children:I.jsx(hoe,{selectedCount:p.size,onRedeemAll:x,isLoading:_})}),I.jsx("div",{children:I.jsx(rT,{currentPage:c,totalPages:Math.ceil(n.length/d),onPageChange:h,itemsPerPage:d,totalItems:n.length})})]})]})})]})},JI=async(r,e,i,n,s=100)=>{var u,c;const a=[];let o=0,l=!0;for(;l;){const d=await(await fetch(r,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:e,variables:{...i,limit:s,offset:o}})})).json();if(d.errors)throw console.error("GraphQL errors:",d.errors),new Error(((u=d.errors[0])==null?void 0:u.message)||"GraphQL error");const p=((c=d.data)==null?void 0:c[n])||[];p.length===0?l=!1:(a.push(...p),p.length<s?l=!1:o+=s)}return a},uoe=async(r,e=ii.MAINNET)=>{try{const i=Cr[e],n=100,s=`
5468
5468
  query GetDeposits($accountId: String!, $limit: Int!, $offset: Int!) {
5469
5469
  deposits(
5470
5470
  limit: $limit,
@@ -5568,7 +5568,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
5568
5568
  }
5569
5569
  }
5570
5570
  }
5571
- `,[o,l]=await Promise.all([JI(i,s,{accountId:r},"deposits",n),JI(i,a,{accountId:r},"redemptions",n)]);return[...o.map(c=>({...c,activity_type:"deposit"})),...l.map(c=>({...c,activity_type:"redemption"}))].sort((c,h)=>new Date(h.created_at).getTime()-new Date(c.created_at).getTime())}catch(i){return console.error("Error fetching activity history:",i),[]}},coe=({accountId:r})=>{const[e,i]=V.useState([]),[n,s]=V.useState(!0),[a,o]=V.useState(!1),[l,u]=V.useState(1),c=10;return V.useEffect(()=>{(async()=>{if(r){s(!0);try{const d=await uoe(r);i(d)}catch(d){console.error("Error loading activity history:",d),i([])}finally{s(!1)}}})()},[r]),n?I.jsxs("div",{style:{marginTop:"10px"},children:[I.jsx("h3",{children:"Activity History"}),I.jsx("p",{children:"Loading activities..."})]}):I.jsxs("div",{style:{marginTop:"20px"},children:[I.jsxs("button",{onClick:()=>o(!0),style:{background:"#ffd429",color:"#000",border:"none",borderRadius:"8px",padding:"12px 24px",fontSize:"14px",fontWeight:"bold",cursor:"pointer",transition:"all 0.2s",width:"100%"},onMouseEnter:h=>{h.currentTarget.style.background="#ffed4e",h.currentTarget.style.transform="translateY(-1px)"},onMouseLeave:h=>{h.currentTarget.style.background="#ffd32a",h.currentTarget.style.transform="translateY(0)"},children:["Activity History (",e.length,")"]}),I.jsx(iT,{isOpen:a,onClose:()=>{o(!1),u(1)},title:`Activity History (${e.length})`,children:I.jsx("div",{style:{padding:"0"},children:(()=>{const h=Math.ceil(e.length/c),d=(l-1)*c,p=d+c,f=e.slice(d,p);return I.jsxs(I.Fragment,{children:[I.jsx("div",{style:{padding:"16px 24px 16px"},children:f.map((m,y)=>I.jsx(fae,{activity:m},m.id||y))}),I.jsxs("div",{style:{borderTop:"1px solid #374151",padding:"16px 24px",backgroundColor:"#18181b",display:"flex",justifyContent:"space-between",alignItems:"center",position:"sticky",bottom:0,zIndex:10},children:[I.jsx("div",{children:I.jsx(nT,{currentPage:l,itemsPerPage:c,totalItems:e.length})}),I.jsx("div",{children:I.jsx(rT,{currentPage:l,totalPages:h,onPageChange:u,itemsPerPage:c,totalItems:e.length})})]})]})})()})})]})},hoe=({selectedCount:r,onRedeemAll:e,isLoading:i})=>r===0?null:I.jsx("button",{onClick:e,disabled:i,style:{padding:"8px 16px",borderRadius:"6px",border:"none",backgroundColor:i?"#374151":"#ffd32a",color:i?"#9ca3af":"#000",fontSize:"14px",fontWeight:"bold",cursor:i?"not-allowed":"pointer"},children:i?"Redeeming...":`Redeem All Selected (${r})`}),Yg=({text:r,maxLength:e,className:i,style:n})=>{const s=r.length<=e?r:r.slice(0,e)+"...";return I.jsx("span",{className:i,style:n,children:s})},Kg=({subject:r,predicate:e,object:i,fontSize:n="13px",showArrows:s=!0})=>I.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",flexWrap:"wrap"},children:[r&&I.jsxs(I.Fragment,{children:[I.jsxs("div",{style:{padding:"4px 8px",borderRadius:"12px",border:"1px solid rgba(255, 255, 255, 0.2)",backgroundColor:"rgba(255, 255, 255, 0.05)",fontSize:n,color:"#fff",display:"flex",alignItems:"center",gap:"4px"},children:[I.jsx("div",{style:{width:"4px",height:"4px",borderRadius:"50%",backgroundColor:"#FF9500"}}),I.jsx(Yg,{text:r,maxLength:10})]}),s&&I.jsx("div",{style:{color:"rgba(255, 255, 255, 0.6)",fontSize:"12px"},children:"→"})]}),I.jsxs("div",{style:{padding:"4px 8px",borderRadius:"12px",border:"1px solid rgba(255, 255, 255, 0.2)",backgroundColor:"rgba(255, 255, 255, 0.05)",fontSize:n,color:"#fff",display:"flex",alignItems:"center",gap:"4px"},children:[I.jsx("div",{style:{width:"4px",height:"4px",borderRadius:"50%",backgroundColor:"#006FE8"}}),I.jsx(Yg,{text:e,maxLength:8})]}),s&&I.jsx("div",{style:{color:"rgba(255, 255, 255, 0.6)",fontSize:"12px"},children:"→"}),I.jsxs("div",{style:{padding:"4px 8px",borderRadius:"12px",border:"1px solid rgba(255, 255, 255, 0.2)",backgroundColor:"rgba(255, 255, 255, 0.05)",fontSize:n,color:"#fff",display:"flex",alignItems:"center",gap:"4px"},children:[I.jsx("div",{style:{width:"4px",height:"4px",borderRadius:"50%",backgroundColor:"#4CAF50"}}),I.jsx(Yg,{text:i,maxLength:12})]})]}),eO=({label:r,fontSize:e="13px",maxLength:i=15})=>I.jsxs("div",{style:{padding:"4px 8px",borderRadius:"12px",border:"1px solid rgba(255, 255, 255, 0.2)",backgroundColor:"rgba(255, 255, 255, 0.05)",fontSize:e,color:"#fff",display:"inline-flex",alignItems:"center",gap:"4px"},children:[I.jsx("div",{style:{width:"4px",height:"4px",borderRadius:"50%",backgroundColor:"#9C27B0"}}),I.jsx(Yg,{text:r,maxLength:i})]}),Ic=({isFor:r,count:e,fontSize:i="12px",showCount:n=!1})=>I.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"4px",padding:"4px 8px",borderRadius:"6px",backgroundColor:r?"rgba(0, 111, 232, 0.2)":"rgba(255, 149, 0, 0.2)",border:`1px solid ${r?"rgba(0, 111, 232, 0.3)":"rgba(255, 149, 0, 0.3)"}`},children:[I.jsx("div",{style:{width:"0",height:"0",borderLeft:"4px solid transparent",borderRight:"4px solid transparent",borderBottom:r?"6px solid #006FE8":"none",borderTop:r?"none":"6px solid #FF9500"}}),I.jsx("span",{style:{fontSize:i,color:r?"#006FE8":"#FF9500",fontWeight:"600"},children:n&&e!==void 0?e:r?"For":"Against"})]});var tO={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},iO=V.createContext&&V.createContext(tO),doe=["attr","size","title"];function poe(r,e){if(r==null)return{};var i=foe(r,e),n,s;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(r);for(s=0;s<a.length;s++)n=a[s],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(r,n)&&(i[n]=r[n])}return i}function foe(r,e){if(r==null)return{};var i={};for(var n in r)if(Object.prototype.hasOwnProperty.call(r,n)){if(e.indexOf(n)>=0)continue;i[n]=r[n]}return i}function Zg(){return Zg=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(r[n]=i[n])}return r},Zg.apply(this,arguments)}function rO(r,e){var i=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(r,s).enumerable})),i.push.apply(i,n)}return i}function Qg(r){for(var e=1;e<arguments.length;e++){var i=arguments[e]!=null?arguments[e]:{};e%2?rO(Object(i),!0).forEach(function(n){moe(r,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):rO(Object(i)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(i,n))})}return r}function moe(r,e,i){return e=goe(e),e in r?Object.defineProperty(r,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[e]=i,r}function goe(r){var e=yoe(r,"string");return typeof e=="symbol"?e:e+""}function yoe(r,e){if(typeof r!="object"||!r)return r;var i=r[Symbol.toPrimitive];if(i!==void 0){var n=i.call(r,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function nO(r){return r&&r.map((e,i)=>V.createElement(e.tag,Qg({key:i},e.attr),nO(e.child)))}function voe(r){return e=>V.createElement(boe,Zg({attr:Qg({},r.attr)},e),nO(r.child))}function boe(r){var e=i=>{var{attr:n,size:s,title:a}=r,o=poe(r,doe),l=s||i.size||"1em",u;return i.className&&(u=i.className),r.className&&(u=(u?u+" ":"")+r.className),V.createElement("svg",Zg({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},i.attr,n,o,{className:u,style:Qg(Qg({color:r.color||i.color},i.style),r.style),height:l,width:l,xmlns:"http://www.w3.org/2000/svg"}),a&&V.createElement("title",null,a),r.children)};return iO!==void 0?V.createElement(iO.Consumer,null,i=>e(i)):e(tO)}function xoe(r){return voe({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4z"},child:[]}]})(r)}const _oe="data:image/svg+xml,%3csvg%20width='300'%20height='50'%20viewBox='0%200%20500%2084'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3crect%20width='500'%20height='84'%20fill='url(%23pattern0_10_2)'/%3e%3cdefs%3e%3cpattern%20id='pattern0_10_2'%20patternContentUnits='objectBoundingBox'%20width='1'%20height='1'%3e%3cuse%20xlink:href='%23image0_10_2'%20transform='scale(0.002%200.0119048)'/%3e%3c/pattern%3e%3cimage%20id='image0_10_2'%20width='500'%20height='84'%20preserveAspectRatio='none'%20xlink:href='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAfQAAABUCAYAAAB0vcXQAAAAAXNSR0IArs4c6QAAIABJREFUeF7tXQeYJFW5vfdWro4zw2wgioCoJEUMwDOsGEAFFR/6RFEREAH1IUpQQaIEFcWEiiAGVIKib0URFFBEfQbQJ+CCgODCssvuhE5VXfm+PjVVQ01vz0x3T/eE3arvQ2S6wr3/Def+6fyULPC1YcOGjKZpewiC8JwgCPZkjD07CIIVlNICISRPCMG/JUJImVJa4ZzXov//YBAED3iet0bTtPtVVX2MUore8AXuUvr5VAKpBFIJpBJYaAkADjpGg64eWuieTn4/RMD5vsrl8m6CILyRc/56wsl/EEoEQkhXbclms8S2beL7/oZ6vf6rTCbzy2q1euuyZcs2RO/seEh7Io+lPS96IoIt9SWLeWgXc9u21PmwNPqVzoylMU5za2VXINrNJyuVyrMppScSQt5KCFk+zTtcQsjDhJDHCSElQgg08rLImOdzDk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zLtbCqBVAKpBFIJLF4J/D/xclRhztyp5QAAAABJRU5ErkJggg=='/%3e%3c/defs%3e%3c/svg%3e",Toe=async(r,e=ri.MAINNET)=>{var i,n;try{const s=Cr[e],l=(n=(i=(await(await fetch(s,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:`
5571
+ `,[o,l]=await Promise.all([JI(i,s,{accountId:r},"deposits",n),JI(i,a,{accountId:r},"redemptions",n)]);return[...o.map(c=>({...c,activity_type:"deposit"})),...l.map(c=>({...c,activity_type:"redemption"}))].sort((c,h)=>new Date(h.created_at).getTime()-new Date(c.created_at).getTime())}catch(i){return console.error("Error fetching activity history:",i),[]}},coe=({accountId:r})=>{const[e,i]=V.useState([]),[n,s]=V.useState(!0),[a,o]=V.useState(!1),[l,u]=V.useState(1),c=10;return V.useEffect(()=>{(async()=>{if(r){s(!0);try{const d=await uoe(r);i(d)}catch(d){console.error("Error loading activity history:",d),i([])}finally{s(!1)}}})()},[r]),n?I.jsxs("div",{style:{marginTop:"10px"},children:[I.jsx("h3",{children:"Activity History"}),I.jsx("p",{children:"Loading activities..."})]}):I.jsxs("div",{style:{marginTop:"20px"},children:[I.jsxs("button",{onClick:()=>o(!0),style:{background:"#ffd429",color:"#000",border:"none",borderRadius:"8px",padding:"12px 24px",fontSize:"14px",fontWeight:"bold",cursor:"pointer",transition:"all 0.2s",width:"100%"},onMouseEnter:h=>{h.currentTarget.style.background="#ffed4e",h.currentTarget.style.transform="translateY(-1px)"},onMouseLeave:h=>{h.currentTarget.style.background="#ffd32a",h.currentTarget.style.transform="translateY(0)"},children:["Activity History (",e.length,")"]}),I.jsx(iT,{isOpen:a,onClose:()=>{o(!1),u(1)},title:`Activity History (${e.length})`,children:I.jsx("div",{style:{padding:"0"},children:(()=>{const h=Math.ceil(e.length/c),d=(l-1)*c,p=d+c,f=e.slice(d,p);return I.jsxs(I.Fragment,{children:[I.jsx("div",{style:{padding:"16px 24px 16px"},children:f.map((m,y)=>I.jsx(fae,{activity:m},m.id||y))}),I.jsxs("div",{style:{borderTop:"1px solid #374151",padding:"16px 24px",backgroundColor:"#18181b",display:"flex",justifyContent:"space-between",alignItems:"center",position:"sticky",bottom:0,zIndex:10},children:[I.jsx("div",{children:I.jsx(nT,{currentPage:l,itemsPerPage:c,totalItems:e.length})}),I.jsx("div",{children:I.jsx(rT,{currentPage:l,totalPages:h,onPageChange:u,itemsPerPage:c,totalItems:e.length})})]})]})})()})})]})},hoe=({selectedCount:r,onRedeemAll:e,isLoading:i})=>r===0?null:I.jsx("button",{onClick:e,disabled:i,style:{padding:"8px 16px",borderRadius:"6px",border:"none",backgroundColor:i?"#374151":"#ffd32a",color:i?"#9ca3af":"#000",fontSize:"14px",fontWeight:"bold",cursor:i?"not-allowed":"pointer"},children:i?"Redeeming...":`Redeem All Selected (${r})`}),Yg=({text:r,maxLength:e,className:i,style:n})=>{const s=r.length<=e?r:r.slice(0,e)+"...";return I.jsx("span",{className:i,style:n,children:s})},Kg=({subject:r,predicate:e,object:i,fontSize:n="13px",showArrows:s=!0})=>I.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",flexWrap:"wrap"},children:[r&&I.jsxs(I.Fragment,{children:[I.jsxs("div",{style:{padding:"4px 8px",borderRadius:"12px",border:"1px solid rgba(255, 255, 255, 0.2)",backgroundColor:"rgba(255, 255, 255, 0.05)",fontSize:n,color:"#fff",display:"flex",alignItems:"center",gap:"4px"},children:[I.jsx("div",{style:{width:"4px",height:"4px",borderRadius:"50%",backgroundColor:"#FF9500"}}),I.jsx(Yg,{text:r,maxLength:10})]}),s&&I.jsx("div",{style:{color:"rgba(255, 255, 255, 0.6)",fontSize:"12px"},children:"→"})]}),I.jsxs("div",{style:{padding:"4px 8px",borderRadius:"12px",border:"1px solid rgba(255, 255, 255, 0.2)",backgroundColor:"rgba(255, 255, 255, 0.05)",fontSize:n,color:"#fff",display:"flex",alignItems:"center",gap:"4px"},children:[I.jsx("div",{style:{width:"4px",height:"4px",borderRadius:"50%",backgroundColor:"#006FE8"}}),I.jsx(Yg,{text:e,maxLength:8})]}),s&&I.jsx("div",{style:{color:"rgba(255, 255, 255, 0.6)",fontSize:"12px"},children:"→"}),I.jsxs("div",{style:{padding:"4px 8px",borderRadius:"12px",border:"1px solid rgba(255, 255, 255, 0.2)",backgroundColor:"rgba(255, 255, 255, 0.05)",fontSize:n,color:"#fff",display:"flex",alignItems:"center",gap:"4px"},children:[I.jsx("div",{style:{width:"4px",height:"4px",borderRadius:"50%",backgroundColor:"#4CAF50"}}),I.jsx(Yg,{text:i,maxLength:12})]})]}),eO=({label:r,fontSize:e="13px",maxLength:i=15})=>I.jsxs("div",{style:{padding:"4px 8px",borderRadius:"12px",border:"1px solid rgba(255, 255, 255, 0.2)",backgroundColor:"rgba(255, 255, 255, 0.05)",fontSize:e,color:"#fff",display:"inline-flex",alignItems:"center",gap:"4px"},children:[I.jsx("div",{style:{width:"4px",height:"4px",borderRadius:"50%",backgroundColor:"#9C27B0"}}),I.jsx(Yg,{text:r,maxLength:i})]}),Ic=({isFor:r,count:e,fontSize:i="12px",showCount:n=!1})=>I.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"4px",padding:"4px 8px",borderRadius:"6px",backgroundColor:r?"rgba(0, 111, 232, 0.2)":"rgba(255, 149, 0, 0.2)",border:`1px solid ${r?"rgba(0, 111, 232, 0.3)":"rgba(255, 149, 0, 0.3)"}`},children:[I.jsx("div",{style:{width:"0",height:"0",borderLeft:"4px solid transparent",borderRight:"4px solid transparent",borderBottom:r?"6px solid #006FE8":"none",borderTop:r?"none":"6px solid #FF9500"}}),I.jsx("span",{style:{fontSize:i,color:r?"#006FE8":"#FF9500",fontWeight:"600"},children:n&&e!==void 0?e:r?"For":"Against"})]});var tO={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},iO=V.createContext&&V.createContext(tO),doe=["attr","size","title"];function poe(r,e){if(r==null)return{};var i=foe(r,e),n,s;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(r);for(s=0;s<a.length;s++)n=a[s],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(r,n)&&(i[n]=r[n])}return i}function foe(r,e){if(r==null)return{};var i={};for(var n in r)if(Object.prototype.hasOwnProperty.call(r,n)){if(e.indexOf(n)>=0)continue;i[n]=r[n]}return i}function Zg(){return Zg=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(r[n]=i[n])}return r},Zg.apply(this,arguments)}function rO(r,e){var i=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(r,s).enumerable})),i.push.apply(i,n)}return i}function Qg(r){for(var e=1;e<arguments.length;e++){var i=arguments[e]!=null?arguments[e]:{};e%2?rO(Object(i),!0).forEach(function(n){moe(r,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):rO(Object(i)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(i,n))})}return r}function moe(r,e,i){return e=goe(e),e in r?Object.defineProperty(r,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[e]=i,r}function goe(r){var e=yoe(r,"string");return typeof e=="symbol"?e:e+""}function yoe(r,e){if(typeof r!="object"||!r)return r;var i=r[Symbol.toPrimitive];if(i!==void 0){var n=i.call(r,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function nO(r){return r&&r.map((e,i)=>V.createElement(e.tag,Qg({key:i},e.attr),nO(e.child)))}function voe(r){return e=>V.createElement(boe,Zg({attr:Qg({},r.attr)},e),nO(r.child))}function boe(r){var e=i=>{var{attr:n,size:s,title:a}=r,o=poe(r,doe),l=s||i.size||"1em",u;return i.className&&(u=i.className),r.className&&(u=(u?u+" ":"")+r.className),V.createElement("svg",Zg({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},i.attr,n,o,{className:u,style:Qg(Qg({color:r.color||i.color},i.style),r.style),height:l,width:l,xmlns:"http://www.w3.org/2000/svg"}),a&&V.createElement("title",null,a),r.children)};return iO!==void 0?V.createElement(iO.Consumer,null,i=>e(i)):e(tO)}function xoe(r){return voe({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4z"},child:[]}]})(r)}const _oe="data:image/svg+xml,%3csvg%20width='300'%20height='50'%20viewBox='0%200%20500%2084'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3crect%20width='500'%20height='84'%20fill='url(%23pattern0_10_2)'/%3e%3cdefs%3e%3cpattern%20id='pattern0_10_2'%20patternContentUnits='objectBoundingBox'%20width='1'%20height='1'%3e%3cuse%20xlink:href='%23image0_10_2'%20transform='scale(0.002%200.0119048)'/%3e%3c/pattern%3e%3cimage%20id='image0_10_2'%20width='500'%20height='84'%20preserveAspectRatio='none'%20xlink:href='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAfQAAABUCAYAAAB0vcXQAAAAAXNSR0IArs4c6QAAIABJREFUeF7tXQeYJFW5vfdWro4zw2wgioCoJEUMwDOsGEAFFR/6RFEREAH1IUpQQaIEFcWEiiAGVIKib0URFFBEfQbQJ+CCgODCssvuhE5VXfm+PjVVQ01vz0x3T/eE3arvQ2S6wr3/Def+6fyULPC1YcOGjKZpewiC8JwgCPZkjD07CIIVlNICISRPCMG/JUJImVJa4ZzXov//YBAED3iet0bTtPtVVX2MUore8AXuUvr5VAKpBFIJpBJYaAkADjpGg64eWuieTn4/RM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RhjbbFfGwE9Ri55xfq2nakXG0esN/r61bt25o++23B8nNwkh1tg6kv6cSSCWQSiCVwFYlgafBqH+wNO+A3jyCyFE3TXMPx3H2lCRpz6gO8yDnHJr4UKPgC4LjUCcXjviaKIp1z/PWIijOdd1/EULuKRaLv5rRlN4/+W1VEzLtbCqBVAKpBFIJLF4J/D/xclRhztyp5QAAAABJRU5ErkJggg=='/%3e%3c/defs%3e%3c/svg%3e",Toe=async(r,e=ii.MAINNET)=>{var i,n;try{const s=Cr[e],l=(n=(i=(await(await fetch(s,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:`
5572
5572
  query GetAtom($atomId: String!) {
5573
5573
  atoms(where: { term_id: { _eq: $atomId } }) {
5574
5574
  term_id
@@ -5596,7 +5596,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
5596
5596
  }
5597
5597
  }
5598
5598
  }
5599
- `,variables:{atomId:r}})})).json()).data)==null?void 0:i.atoms)==null?void 0:n[0];return l||null}catch(s){return console.error("Error fetching atom details:",s),null}},woe=async(r,e=ri.MAINNET,i=1e3)=>{var n;try{const s=Cr[e];return((n=(await(await fetch(s,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:`
5599
+ `,variables:{atomId:r}})})).json()).data)==null?void 0:i.atoms)==null?void 0:n[0];return l||null}catch(s){return console.error("Error fetching atom details:",s),null}},woe=async(r,e=ii.MAINNET,i=1e3)=>{var n;try{const s=Cr[e];return((n=(await(await fetch(s,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:`
5600
5600
  query Triples_for_Agent($objectId: String!, $batchSize: Int!) {
5601
5601
  triples(limit: $batchSize, where: { object_id: { _eq: $objectId } }) {
5602
5602
  term_id
@@ -5638,7 +5638,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
5638
5638
  }
5639
5639
  }
5640
5640
  }
5641
- `,variables:{objectId:r,batchSize:i}})})).json()).data)==null?void 0:n.triples)||[]}catch(s){return console.error("Error fetching triples for agent:",s),[]}},Soe=async(r,e,i=ri.MAINNET)=>{var n,s,a,o;try{const l=Cr[i],u="0x4b5ec64b82fae56c71a469fc902df2096b0dc7c930dd61032e817d583575fe47",h=await(await fetch(l,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:`
5641
+ `,variables:{objectId:r,batchSize:i}})})).json()).data)==null?void 0:n.triples)||[]}catch(s){return console.error("Error fetching triples for agent:",s),[]}},Soe=async(r,e,i=ii.MAINNET)=>{var n,s,a,o;try{const l=Cr[i],u="0x4b5ec64b82fae56c71a469fc902df2096b0dc7c930dd61032e817d583575fe47",h=await(await fetch(l,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:`
5642
5642
  query GetFollowsAndFollowers($predicateId: String!, $userAtomId: String!) {
5643
5643
  follows: triples(
5644
5644
  where: {
@@ -5673,7 +5673,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
5673
5673
  }
5674
5674
  }
5675
5675
  }
5676
- `,variables:{predicateId:r,userAtomId:u}})})).json();return{follows:((s=(n=h.data)==null?void 0:n.follows)==null?void 0:s.map(d=>({...d,object:{...d.object,id:d.object.term_id}})))||[],followers:((o=(a=h.data)==null?void 0:a.followers)==null?void 0:o.map(d=>({...d,subject:{...d.subject,id:d.subject.term_id}})))||[]}}catch(l){return console.error("Error fetching follows and followers:",l),{follows:[],followers:[]}}},sO=async(r,e=ri.MAINNET)=>{var i,n;try{const s=Cr[e],a=[],o=100;let l=0,u=!0;for(;u;){const h=await(await fetch(s,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:`
5676
+ `,variables:{predicateId:r,userAtomId:u}})})).json();return{follows:((s=(n=h.data)==null?void 0:n.follows)==null?void 0:s.map(d=>({...d,object:{...d.object,id:d.object.term_id}})))||[],followers:((o=(a=h.data)==null?void 0:a.followers)==null?void 0:o.map(d=>({...d,subject:{...d.subject,id:d.subject.term_id}})))||[]}}catch(l){return console.error("Error fetching follows and followers:",l),{follows:[],followers:[]}}},sO=async(r,e=ii.MAINNET)=>{var i,n;try{const s=Cr[e],a=[],o=100;let l=0,u=!0;for(;u;){const h=await(await fetch(s,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:`
5677
5677
  query ClaimsBySubject($subjectId: String!, $limit: Int!, $offset: Int!) {
5678
5678
  triples(
5679
5679
  limit: $limit,
@@ -5713,7 +5713,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
5713
5713
  }
5714
5714
  }
5715
5715
  }
5716
- `,variables:{subjectId:r,limit:o,offset:l}})})).json();if(h.errors)throw console.error("GraphQL errors:",h.errors),new Error(((i=h.errors[0])==null?void 0:i.message)||"GraphQL error");const d=((n=h.data)==null?void 0:n.triples)||[];d.length===0?u=!1:(a.push(...d),d.length<o?u=!1:l+=o)}return a}catch(s){return console.error("Error fetching claims by subject:",s),[]}},Eoe=async(r,e,i,n=ri.MAINNET)=>{var l;const s=Cr[n],a={where:{subject:{creator_id:{_eq:r}},predicate_id:{_eq:e},object_id:{_eq:i}}},o=`
5716
+ `,variables:{subjectId:r,limit:o,offset:l}})})).json();if(h.errors)throw console.error("GraphQL errors:",h.errors),new Error(((i=h.errors[0])==null?void 0:i.message)||"GraphQL error");const d=((n=h.data)==null?void 0:n.triples)||[];d.length===0?u=!1:(a.push(...d),d.length<o?u=!1:l+=o)}return a}catch(s){return console.error("Error fetching claims by subject:",s),[]}},Eoe=async(r,e,i,n=ii.MAINNET)=>{var l;const s=Cr[n],a={where:{subject:{creator_id:{_eq:r}},predicate_id:{_eq:e},object_id:{_eq:i}}},o=`
5717
5717
  query GetTriples($where: triples_bool_exp) {
5718
5718
  triples(where: $where) {
5719
5719
  term_id
@@ -5755,7 +5755,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
5755
5755
  transaction_hash
5756
5756
  }
5757
5757
  }
5758
- `;try{const c=await(await fetch(s,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({query:o,variables:a})})).json();if(c.errors)throw console.error("la Erreurs GraphQL:",c.errors),new Error(((l=c.errors[0])==null?void 0:l.message)||"Erreur GraphQL inconnue");return c.data}catch(u){throw console.error(`[fetchTriplesByCreator] Erreur lors de la requête directe vers ${s}:`,u),u}},pT=(r,e,i,n=ri.MAINNET,s)=>{const{PLAYER_TRIPLE_TYPES:a}=s||{PLAYER_TRIPLE_TYPES:{PLAYER_GAME:{predicateId:"",objectId:""}}},o=e||a.PLAYER_GAME.predicateId,l=i||a.PLAYER_GAME.objectId,[u,c]=V.useState(null),[h,d]=V.useState(!0),[p,f]=V.useState(null);V.useEffect(()=>{(async()=>{if(!r){d(!1);return}try{const v=await Eoe(r,o,l,n);c(v)}catch(v){console.error(`[${n}] Erreur lors de la récupération des triples:`,v),f(v instanceof Error?v:new Error(String(v)))}finally{d(!1)}})()},[r,e,i,n]);const m=(u==null?void 0:u.triples)||[];return{loading:h,error:p,triples:m,network:n,rawData:u}},Moe=(r,e=ri.MAINNET,i)=>{const[n,s]=V.useState([]),[a,o]=V.useState([]),[l,u]=V.useState([]),[c,h]=V.useState({follows:[],followers:[]}),[d,p]=V.useState(!1),[f,m]=V.useState(null),{COMMON_IDS:y}=i,{triples:v,loading:g,error:_}=pT(r||"",i.PLAYER_TRIPLE_TYPES.PLAYER_GAME.predicateId,i.PLAYER_TRIPLE_TYPES.PLAYER_GAME.objectId,e),x=v.length>0?v[0].subject:null;return V.useEffect(()=>{if(!r){s([]),o([]),u([]);return}(async()=>{p(!0),m(null);try{const[T,E,M]=await Promise.all([woe(r,e),hT(r,e),Soe(y.FOLLOWS,r,e)]);s(T),o(E),h(M)}catch(T){console.error("Error loading sidebar data:",T),m(T instanceof Error?T.message:"Unknown error")}finally{p(!1)}})()},[r,e]),V.useEffect(()=>{if(!x){u([]);return}(async()=>{try{const T=await sO(x.term_id,e);u(T)}catch(T){console.error("Error loading claims:",T),u([])}})()},[x,e]),{atomDetails:x,triples:n,positions:a,activities:l,connections:c,loading:d||g,error:f||(_?_.message:null)}},Aoe=(r,e=ri.MAINNET)=>{const[i,n]=V.useState(null),[s,a]=V.useState(!1),[o,l]=V.useState(null);return V.useEffect(()=>{if(!(r!=null&&r.id)){n(null),l(null);return}(async()=>{a(!0),l(null);try{const c=await Toe(r.id,e);n(c)}catch(c){console.error("Error loading selected atom details:",c),l(c instanceof Error?c.message:"Unknown error"),n(null)}finally{a(!1)}})()},[r==null?void 0:r.id,e]),{atomDetails:i,loading:s,error:o}},Coe=(r,e=ri.MAINNET)=>{const[i,n]=V.useState([]),[s,a]=V.useState(!1),[o,l]=V.useState(null);return V.useEffect(()=>{if(!(r!=null&&r.id)){n([]),l(null);return}(async()=>{a(!0),l(null);try{const c=await sO(r.id,e);n(c)}catch(c){console.error("Error loading selected atom claims:",c),l(c instanceof Error?c.message:"Unknown error"),n([])}finally{a(!1)}})()},[r==null?void 0:r.id,e]),{claims:i,loading:s,error:o}},aO=({walletAddress:r,walletConnected:e,walletHooks:i,onOpenVoting:n,constants:s,gamesId:a,wagmiConfig:o})=>{const[l,u]=V.useState(null),[c,h]=V.useState(!1),d=Y=>{u(Y)},[p,f]=V.useState("base"),[m,y]=V.useState(!1),[v,g]=V.useState(!1),[_,x]=V.useState(""),b=()=>{n?n():console.warn("onOpenVoting not provided to PlayerMapGraph")},{atomDetails:T,activities:E,connections:M,loading:C,error:S}=Moe(r,ri.MAINNET,s),{atomDetails:w,loading:R,error:O}=Aoe(l,ri.MAINNET),{claims:P,loading:A,error:D}=Coe(l,ri.MAINNET);V.useEffect(()=>{l&&T&&((l==null?void 0:l.id)===(T==null?void 0:T.id)||(l==null?void 0:l.id)===(T==null?void 0:T.term_id)?(h(!0),g(!0)):(h(!1),g(!0)))},[l,T]);const L={background:"#ffd32a",color:"#18181b",border:"none",borderRadius:12,width:54,height:54,fontSize:22,fontWeight:"bold",boxShadow:"0 2px 8px rgba(0,0,0,0.18)",cursor:"pointer",marginBottom:0,marginTop:0,textTransform:"uppercase",display:"flex",alignItems:"center",justifyContent:"center",padding:0,transition:"background 0.2s, color 0.2s, transform 0.1s"},W={background:"#ffe066",color:"#18181b",transform:"translateY(-2px) scale(1.03)"},G=Y=>_===Y?{...L,...W}:L;return I.jsxs("div",{style:{display:"flex",flexDirection:"column",height:"100%",width:"100%",position:"relative",overflow:"hidden"},children:[I.jsx("div",{style:{position:"relative",flex:1,width:"100%",height:"100%",overflow:"hidden"},children:I.jsx(dae,{endpoint:p,onNodeSelect:d,onLoadingChange:y,walletAddress:r,gamesId:a,disableNodeDetailsSidebar:!0})}),m&&I.jsx("div",{style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",zIndex:2},children:I.jsx(TS,{})}),I.jsx("div",{style:{position:"absolute",top:"5px",left:"5px",zIndex:50,display:"flex",flexDirection:"row",gap:"12px",alignItems:"center"},children:I.jsx("button",{style:G("profile"),onClick:()=>{h(!0),g(!0)},"aria-label":"Profile",onMouseEnter:()=>x("profile"),onMouseLeave:()=>x(""),children:I.jsx(xoe,{})})}),I.jsx("div",{style:{position:"absolute",bottom:"50%",right:"5px",zIndex:50},children:I.jsxs("button",{style:{...G("vote"),fontSize:"18px",fontWeight:"bolder",width:"auto",minWidth:"160px",padding:"0 12px",display:"flex",alignItems:"center",gap:"8px"},onClick:b,"aria-label":"Vote",onMouseEnter:()=>x("vote"),onMouseLeave:()=>x(""),children:[I.jsx("img",{src:xT,alt:"Atom",style:{width:"44px"}}),"SPEAK UP"]})}),I.jsx("div",{style:{position:"absolute",bottom:"5px",left:"5px",opacity:.4,zIndex:50},children:I.jsx("a",{href:"https://portal.intuition.systems/",target:"_blank",rel:"noopener noreferrer",style:{display:"block",textDecoration:"none",transition:"opacity 0.2s, transform 0.2s"},onMouseEnter:Y=>{Y.currentTarget.style.opacity="0.8",Y.currentTarget.style.transform="scale(1.05)"},onMouseLeave:Y=>{Y.currentTarget.style.opacity="1",Y.currentTarget.style.transform="scale(1)"},children:I.jsx("img",{src:_oe,alt:"Intuition Systems",style:{height:"30px",width:"auto",cursor:"pointer"}})})}),v&&I.jsx("div",{style:{position:"absolute",inset:0,zIndex:1200,pointerEvents:"auto"},onClick:()=>g(!1)}),I.jsxs(pae,{open:v,onClose:()=>g(!1),children:[(C||R||A)&&I.jsx("p",{children:"Loading data..."}),(S||O||D)&&I.jsxs("p",{style:{color:"red"},children:["Error : ",S||O||D]}),!C&&!S&&!R&&!O&&!A&&!D&&I.jsxs(I.Fragment,{children:[I.jsx(xae,{atomDetails:c?T:w,connections:c?M:{follows:[],followers:[]},walletAddress:r}),I.jsx(noe,{activities:c?E:P,title:c?"My Claims":"Claims",walletAddress:r,walletConnected:e,publicClient:o==null?void 0:o.publicClient}),c&&I.jsxs(I.Fragment,{children:[I.jsx(loe,{accountId:r||"",walletConnected:e,walletAddress:r}),I.jsx(coe,{accountId:r||""})]})]})]})]})},oO=({isOpen:r,onConnectWallet:e})=>r?I.jsx("div",{style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:"rgba(0, 0, 0, 0.7)",backdropFilter:"blur(5px)",zIndex:1e3,width:"100%",height:"100%"},children:I.jsxs("div",{style:{backgroundColor:"#1a1a2e",padding:"30px",borderRadius:"10px",textAlign:"center",maxWidth:"500px",boxShadow:"0 0 15px rgba(108, 92, 231, 0.5)"},children:[I.jsx("h2",{style:{color:"#6c5ce7",marginBottom:"20px"},children:"Wallet Required"}),I.jsx("p",{style:{fontSize:"18px",marginBottom:"25px",color:"#fff"},children:"Please connect your wallet to access this feature"}),I.jsx("button",{onClick:e,style:{padding:"12px 24px",backgroundColor:"#6c5ce7",color:"#fff",border:"none",borderRadius:"4px",cursor:"pointer",fontSize:"16px"},children:"Connect Wallet"})]})}):null,Roe=({isOpen:r,onCreatePlayer:e,onClose:i})=>r?I.jsx("div",{style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:"rgba(0, 0, 0, 1)",backdropFilter:"blur(1px)",zIndex:1e3,width:"100%",height:"100%"},children:I.jsxs("div",{style:{backgroundColor:"#1a1a2e",padding:"30px",borderRadius:"10px",textAlign:"center",maxWidth:"500px",boxShadow:"0 0 15px rgba(0, 128, 255, 0.7)",position:"relative"},children:[i&&I.jsx("button",{onClick:i,style:{position:"absolute",top:"10px",right:"10px",backgroundColor:"transparent",border:"none",fontSize:"20px",color:"#666",cursor:"pointer"},children:"×"}),I.jsx("h2",{style:{color:"#FFD32A",marginBottom:"20px"},children:"Player Required"}),I.jsx("p",{style:{fontSize:"18px",marginBottom:"25px",color:"#fff"},children:"You need to create a player before you can vote on claims"}),I.jsx("button",{onClick:e,style:{padding:"12px 24px",backgroundColor:"#1976d2",color:"#fff",border:"none",borderRadius:"4px",cursor:"pointer",fontSize:"16px"},children:"Create Player"})]})}):null,Noe=({walletConnected:r,walletAddress:e,publicClient:i,network:n=ri.MAINNET,onSuccess:s})=>{const[a,o]=V.useState(!1),[l,u]=V.useState({status:"idle",message:""}),{depositTriple:c,isLoading:h}=dT({walletConnected:r,walletAddress:e,publicClient:i,network:n});return{submitVotes:async p=>{var m;if(!p.some(y=>y.units>0))return u({status:"error",message:"Please place at least one vote."}),null;if(!r||!e)return u({status:"error",message:"Wallet not connected."}),null;try{o(!0),u({status:"pending",message:"Transaction in progress..."});const v=p.filter(_=>_.units>0).map(_=>({claimId:`0x${_.id.toString(16).padStart(64,"0")}`,units:_.units,direction:_.direction})),g=await c(v);if(g.success)return u({status:"success",message:`Transaction successful! Hash: ${(m=g.hash)==null?void 0:m.substring(0,10)}...`}),s&&s(),g;{let _=g.error||"An error occurred.";return _.includes("user rejected")?u({status:"error",message:"Transaction cancelled: User rejected the request."}):u({status:"error",message:`Error: ${_}`}),null}}catch(y){return console.error("Error submitting votes:",y),u({status:"error",message:y instanceof Error?y.message:"An error occurred."}),null}finally{o(!1)}},isSubmitting:a,isDepositLoading:h,transactionStatus:l,setTransactionStatus:u}},Poe=({network:r=ri.MAINNET,onError:e}={})=>{const[i,n]=V.useState(!1);return{fetchTripleDetails:async a=>{var o,l,u,c,h,d,p;n(!0);try{const f=Cr[r],m=await fetch(f,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:`
5758
+ `;try{const c=await(await fetch(s,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({query:o,variables:a})})).json();if(c.errors)throw console.error("la Erreurs GraphQL:",c.errors),new Error(((l=c.errors[0])==null?void 0:l.message)||"Erreur GraphQL inconnue");return c.data}catch(u){throw console.error(`[fetchTriplesByCreator] Erreur lors de la requête directe vers ${s}:`,u),u}},pT=(r,e,i,n=ii.MAINNET,s)=>{const{PLAYER_TRIPLE_TYPES:a}=s||{PLAYER_TRIPLE_TYPES:{PLAYER_GAME:{predicateId:"",objectId:""}}},o=e||a.PLAYER_GAME.predicateId,l=i||a.PLAYER_GAME.objectId,[u,c]=V.useState(null),[h,d]=V.useState(!0),[p,f]=V.useState(null);V.useEffect(()=>{(async()=>{if(!r){d(!1);return}try{const v=await Eoe(r,o,l,n);c(v)}catch(v){console.error(`[${n}] Erreur lors de la récupération des triples:`,v),f(v instanceof Error?v:new Error(String(v)))}finally{d(!1)}})()},[r,e,i,n]);const m=(u==null?void 0:u.triples)||[];return{loading:h,error:p,triples:m,network:n,rawData:u}},Moe=(r,e=ii.MAINNET,i)=>{const[n,s]=V.useState([]),[a,o]=V.useState([]),[l,u]=V.useState([]),[c,h]=V.useState({follows:[],followers:[]}),[d,p]=V.useState(!1),[f,m]=V.useState(null),{COMMON_IDS:y}=i,{triples:v,loading:g,error:_}=pT(r||"",i.PLAYER_TRIPLE_TYPES.PLAYER_GAME.predicateId,i.PLAYER_TRIPLE_TYPES.PLAYER_GAME.objectId,e),x=v.length>0?v[0].subject:null;return V.useEffect(()=>{if(!r){s([]),o([]),u([]);return}(async()=>{p(!0),m(null);try{const[T,E,M]=await Promise.all([woe(r,e),hT(r,e),Soe(y.FOLLOWS,r,e)]);s(T),o(E),h(M)}catch(T){console.error("Error loading sidebar data:",T),m(T instanceof Error?T.message:"Unknown error")}finally{p(!1)}})()},[r,e]),V.useEffect(()=>{if(!x){u([]);return}(async()=>{try{const T=await sO(x.term_id,e);u(T)}catch(T){console.error("Error loading claims:",T),u([])}})()},[x,e]),{atomDetails:x,triples:n,positions:a,activities:l,connections:c,loading:d||g,error:f||(_?_.message:null)}},Aoe=(r,e=ii.MAINNET)=>{const[i,n]=V.useState(null),[s,a]=V.useState(!1),[o,l]=V.useState(null);return V.useEffect(()=>{if(!(r!=null&&r.id)){n(null),l(null);return}(async()=>{a(!0),l(null);try{const c=await Toe(r.id,e);n(c)}catch(c){console.error("Error loading selected atom details:",c),l(c instanceof Error?c.message:"Unknown error"),n(null)}finally{a(!1)}})()},[r==null?void 0:r.id,e]),{atomDetails:i,loading:s,error:o}},Coe=(r,e=ii.MAINNET)=>{const[i,n]=V.useState([]),[s,a]=V.useState(!1),[o,l]=V.useState(null);return V.useEffect(()=>{if(!(r!=null&&r.id)){n([]),l(null);return}(async()=>{a(!0),l(null);try{const c=await sO(r.id,e);n(c)}catch(c){console.error("Error loading selected atom claims:",c),l(c instanceof Error?c.message:"Unknown error"),n([])}finally{a(!1)}})()},[r==null?void 0:r.id,e]),{claims:i,loading:s,error:o}},aO=({walletAddress:r,walletConnected:e,walletHooks:i,onOpenVoting:n,constants:s,gamesId:a,wagmiConfig:o})=>{const[l,u]=V.useState(null),[c,h]=V.useState(!1),d=Y=>{u(Y)},[p,f]=V.useState("base"),[m,y]=V.useState(!1),[v,g]=V.useState(!1),[_,x]=V.useState(""),b=()=>{n?n():console.warn("onOpenVoting not provided to PlayerMapGraph")},{atomDetails:T,activities:E,connections:M,loading:C,error:S}=Moe(r,ii.MAINNET,s),{atomDetails:w,loading:R,error:O}=Aoe(l,ii.MAINNET),{claims:P,loading:A,error:D}=Coe(l,ii.MAINNET);V.useEffect(()=>{l&&T&&((l==null?void 0:l.id)===(T==null?void 0:T.id)||(l==null?void 0:l.id)===(T==null?void 0:T.term_id)?(h(!0),g(!0)):(h(!1),g(!0)))},[l,T]);const L={background:"#ffd32a",color:"#18181b",border:"none",borderRadius:12,width:54,height:54,fontSize:22,fontWeight:"bold",boxShadow:"0 2px 8px rgba(0,0,0,0.18)",cursor:"pointer",marginBottom:0,marginTop:0,textTransform:"uppercase",display:"flex",alignItems:"center",justifyContent:"center",padding:0,transition:"background 0.2s, color 0.2s, transform 0.1s"},W={background:"#ffe066",color:"#18181b",transform:"translateY(-2px) scale(1.03)"},G=Y=>_===Y?{...L,...W}:L;return I.jsxs("div",{style:{display:"flex",flexDirection:"column",height:"100vh",width:"100%",position:"relative",overflow:"hidden"},children:[I.jsx("div",{style:{position:"relative",flex:1,width:"100%",height:"100%",overflow:"hidden"},children:I.jsx(dae,{endpoint:p,onNodeSelect:d,onLoadingChange:y,walletAddress:r,gamesId:a,disableNodeDetailsSidebar:!0})}),m&&I.jsx("div",{style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",zIndex:2},children:I.jsx(TS,{})}),I.jsx("div",{style:{position:"absolute",top:"5px",left:"5px",zIndex:50,display:"flex",flexDirection:"row",gap:"12px",alignItems:"center"},children:I.jsx("button",{style:G("profile"),onClick:()=>{h(!0),g(!0)},"aria-label":"Profile",onMouseEnter:()=>x("profile"),onMouseLeave:()=>x(""),children:I.jsx(xoe,{})})}),I.jsx("div",{style:{position:"absolute",bottom:"50%",right:"5px",zIndex:50},children:I.jsxs("button",{style:{...G("vote"),fontSize:"18px",fontWeight:"bolder",width:"auto",minWidth:"160px",padding:"0 12px",display:"flex",alignItems:"center",gap:"8px"},onClick:b,"aria-label":"Vote",onMouseEnter:()=>x("vote"),onMouseLeave:()=>x(""),children:[I.jsx("img",{src:xT,alt:"Atom",style:{width:"44px"}}),"SPEAK UP"]})}),I.jsx("div",{style:{position:"absolute",bottom:"5px",left:"5px",opacity:.4,zIndex:50},children:I.jsx("a",{href:"https://portal.intuition.systems/",target:"_blank",rel:"noopener noreferrer",style:{display:"block",textDecoration:"none",transition:"opacity 0.2s, transform 0.2s"},onMouseEnter:Y=>{Y.currentTarget.style.opacity="0.8",Y.currentTarget.style.transform="scale(1.05)"},onMouseLeave:Y=>{Y.currentTarget.style.opacity="1",Y.currentTarget.style.transform="scale(1)"},children:I.jsx("img",{src:_oe,alt:"Intuition Systems",style:{height:"30px",width:"auto",cursor:"pointer"}})})}),v&&I.jsx("div",{style:{position:"absolute",inset:0,zIndex:1200,pointerEvents:"auto"},onClick:()=>g(!1)}),I.jsxs(pae,{open:v,onClose:()=>g(!1),children:[(C||R||A)&&I.jsx("p",{children:"Loading data..."}),(S||O||D)&&I.jsxs("p",{style:{color:"red"},children:["Error : ",S||O||D]}),!C&&!S&&!R&&!O&&!A&&!D&&I.jsxs(I.Fragment,{children:[I.jsx(xae,{atomDetails:c?T:w,connections:c?M:{follows:[],followers:[]},walletAddress:r}),I.jsx(noe,{activities:c?E:P,title:c?"My Claims":"Claims",walletAddress:r,walletConnected:e,publicClient:o==null?void 0:o.publicClient}),c&&I.jsxs(I.Fragment,{children:[I.jsx(loe,{accountId:r||"",walletConnected:e,walletAddress:r}),I.jsx(coe,{accountId:r||""})]})]})]})]})},oO=({isOpen:r,onConnectWallet:e})=>r?I.jsx("div",{style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:"rgba(0, 0, 0, 0.7)",backdropFilter:"blur(5px)",zIndex:1e3,width:"100%",height:"100%"},children:I.jsxs("div",{style:{backgroundColor:"#1a1a2e",padding:"30px",borderRadius:"10px",textAlign:"center",maxWidth:"500px",boxShadow:"0 0 15px rgba(108, 92, 231, 0.5)"},children:[I.jsx("h2",{style:{color:"#6c5ce7",marginBottom:"20px"},children:"Wallet Required"}),I.jsx("p",{style:{fontSize:"18px",marginBottom:"25px",color:"#fff"},children:"Please connect your wallet to access this feature"}),I.jsx("button",{onClick:e,style:{padding:"12px 24px",backgroundColor:"#6c5ce7",color:"#fff",border:"none",borderRadius:"4px",cursor:"pointer",fontSize:"16px"},children:"Connect Wallet"})]})}):null,Roe=({isOpen:r,onCreatePlayer:e,onClose:i})=>r?I.jsx("div",{style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:"rgba(0, 0, 0, 1)",backdropFilter:"blur(1px)",zIndex:1e3,width:"100%",height:"100%"},children:I.jsxs("div",{style:{backgroundColor:"#1a1a2e",padding:"30px",borderRadius:"10px",textAlign:"center",maxWidth:"500px",boxShadow:"0 0 15px rgba(0, 128, 255, 0.7)",position:"relative"},children:[i&&I.jsx("button",{onClick:i,style:{position:"absolute",top:"10px",right:"10px",backgroundColor:"transparent",border:"none",fontSize:"20px",color:"#666",cursor:"pointer"},children:"×"}),I.jsx("h2",{style:{color:"#FFD32A",marginBottom:"20px"},children:"Player Required"}),I.jsx("p",{style:{fontSize:"18px",marginBottom:"25px",color:"#fff"},children:"You need to create a player before you can vote on claims"}),I.jsx("button",{onClick:e,style:{padding:"12px 24px",backgroundColor:"#1976d2",color:"#fff",border:"none",borderRadius:"4px",cursor:"pointer",fontSize:"16px"},children:"Create Player"})]})}):null,Noe=({walletConnected:r,walletAddress:e,publicClient:i,network:n=ii.MAINNET,onSuccess:s})=>{const[a,o]=V.useState(!1),[l,u]=V.useState({status:"idle",message:""}),{depositTriple:c,isLoading:h}=dT({walletConnected:r,walletAddress:e,publicClient:i,network:n});return{submitVotes:async p=>{var m;if(!p.some(y=>y.units>0))return u({status:"error",message:"Please place at least one vote."}),null;if(!r||!e)return u({status:"error",message:"Wallet not connected."}),null;try{o(!0),u({status:"pending",message:"Transaction in progress..."});const v=p.filter(_=>_.units>0).map(_=>({claimId:`0x${_.id.toString(16).padStart(64,"0")}`,units:_.units,direction:_.direction})),g=await c(v);if(g.success)return u({status:"success",message:`Transaction successful! Hash: ${(m=g.hash)==null?void 0:m.substring(0,10)}...`}),s&&s(),g;{let _=g.error||"An error occurred.";return _.includes("user rejected")?u({status:"error",message:"Transaction cancelled: User rejected the request."}):u({status:"error",message:`Error: ${_}`}),null}}catch(y){return console.error("Error submitting votes:",y),u({status:"error",message:y instanceof Error?y.message:"An error occurred."}),null}finally{o(!1)}},isSubmitting:a,isDepositLoading:h,transactionStatus:l,setTransactionStatus:u}},Poe=({network:r=ii.MAINNET,onError:e}={})=>{const[i,n]=V.useState(!1);return{fetchTripleDetails:async a=>{var o,l,u,c,h,d,p;n(!0);try{const f=Cr[r],m=await fetch(f,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:`
5759
5759
  query Triple($tripleId: String!) {
5760
5760
  triple(term_id: $tripleId) {
5761
5761
  term_id
@@ -5786,7 +5786,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
5786
5786
  }
5787
5787
  }
5788
5788
  }
5789
- `,variables:{tripleId:a.toString()}})});if(!m.ok)throw new Error(`GraphQL request failed with status ${m.status}`);const y=await m.json();if(y.errors)throw new Error(`GraphQL errors: ${JSON.stringify(y.errors)}`);if(!((o=y.data)!=null&&o.triple))return e&&e(`Triple with ID ${a} not found`),n(!1),null;const v=((c=(u=(l=y.data.triple.term)==null?void 0:l.positions_aggregate)==null?void 0:u.aggregate)==null?void 0:c.count)||0,g=((p=(d=(h=y.data.triple.counter_term)==null?void 0:h.positions_aggregate)==null?void 0:d.aggregate)==null?void 0:p.count)||0;return n(!1),{id:String(a),subject:y.data.triple.subject,predicate:y.data.triple.predicate,object:y.data.triple.object,term_id:y.data.triple.term_id,counter_term_id:y.data.triple.counter_term_id,term_position_count:v,counter_term_position_count:g}}catch(f){return e&&e(`Error fetching details for triple ${a}: ${f instanceof Error?f.message:String(f)}`),n(!1),null}},isLoading:i}},Ioe=({network:r=ri.MAINNET,walletAddress:e="",onError:i,constants:n})=>{const[s,a]=V.useState([]),[o,l]=V.useState(!0),{PREDEFINED_CLAIM_IDS:u}=n,[c,h]=V.useState(0),[d,p]=V.useState({}),[f,m]=V.useState(!1);Poe({network:r,onError:i});const[y,v]=V.useState(null),[g,_]=V.useState(!0);V.useEffect(()=>{(async()=>{var w;if(!e||!u||u.length===0){_(!1);return}try{_(!0);const R=Cr[r],P=await fetch(R,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:`
5789
+ `,variables:{tripleId:a.toString()}})});if(!m.ok)throw new Error(`GraphQL request failed with status ${m.status}`);const y=await m.json();if(y.errors)throw new Error(`GraphQL errors: ${JSON.stringify(y.errors)}`);if(!((o=y.data)!=null&&o.triple))return e&&e(`Triple with ID ${a} not found`),n(!1),null;const v=((c=(u=(l=y.data.triple.term)==null?void 0:l.positions_aggregate)==null?void 0:u.aggregate)==null?void 0:c.count)||0,g=((p=(d=(h=y.data.triple.counter_term)==null?void 0:h.positions_aggregate)==null?void 0:d.aggregate)==null?void 0:p.count)||0;return n(!1),{id:String(a),subject:y.data.triple.subject,predicate:y.data.triple.predicate,object:y.data.triple.object,term_id:y.data.triple.term_id,counter_term_id:y.data.triple.counter_term_id,term_position_count:v,counter_term_position_count:g}}catch(f){return e&&e(`Error fetching details for triple ${a}: ${f instanceof Error?f.message:String(f)}`),n(!1),null}},isLoading:i}},Ioe=({network:r=ii.MAINNET,walletAddress:e="",onError:i,constants:n})=>{const[s,a]=V.useState([]),[o,l]=V.useState(!0),{PREDEFINED_CLAIM_IDS:u}=n,[c,h]=V.useState(0),[d,p]=V.useState({}),[f,m]=V.useState(!1);Poe({network:r,onError:i});const[y,v]=V.useState(null),[g,_]=V.useState(!0);V.useEffect(()=>{(async()=>{var w;if(!e||!u||u.length===0){_(!1);return}try{_(!0);const R=Cr[r],P=await fetch(R,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:`
5790
5790
  query BatchUserPositions($tripleIds: [String!]!, $walletAddress: String!) {
5791
5791
  triples(where: { term_id: { _in: $tripleIds } }) {
5792
5792
  term_id
@@ -5854,7 +5854,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
5854
5854
  }
5855
5855
  }
5856
5856
  }
5857
- `,variables:{tripleIds:S.map(D=>D.toString())}})});if(!O.ok)throw new Error(`GraphQL request failed with status ${O.status}`);const P=await O.json();if(P.errors)throw new Error(`GraphQL errors: ${JSON.stringify(P.errors)}`);const A=new Map;return(((w=P.data)==null?void 0:w.triples)||[]).forEach(D=>{var G,Y,F,B,q,H;const L=((F=(Y=(G=D.term)==null?void 0:G.positions_aggregate)==null?void 0:Y.aggregate)==null?void 0:F.count)||0,W=((H=(q=(B=D.counter_term)==null?void 0:B.positions_aggregate)==null?void 0:q.aggregate)==null?void 0:H.count)||0;A.set(D.term_id,{id:D.term_id,subject:D.subject,predicate:D.predicate,object:D.object,term_id:D.term_id,counter_term_id:D.counter_term_id,term_position_count:L,counter_term_position_count:W})}),S.forEach(D=>{A.has(D)||A.set(D,null)}),A}catch(R){const O=new Map;return S.forEach(P=>{O.set(P,null)}),i&&i(`Error fetching batch triple details: ${R instanceof Error?R.message:String(R)}`),O}},b=async S=>{l(!0);try{const w=await x(u),R=S||d,O=u.map(A=>{var G,Y,F;const D=w.get(A);if(!D)return{id:BigInt(A),subject:`Claim ${A}`,predicate:"is",object:"Unknown",units:0,direction:ot.None,userHasPosition:!1,userPositionDirection:ot.None};const L=D.term_id||String(A),W=R[L]||R[String(A)]||ot.None;return W!==ot.None&&console.log(`[loadTripleDetails] Triple ${L} a une position:`,W),L==="0x27191de92fe0308355319ec8f2359e5ce85123bd243bf7ffa6eb8028347b3eab"&&(console.log(`[loadTripleDetails] Triple recherché: ${L}`),console.log("[loadTripleDetails] positionsToUse keys:",Object.keys(R)),console.log("[loadTripleDetails] Trouvé dans positionsToUse:",R[L])),{id:BigInt(D.id),subject:((G=D.subject)==null?void 0:G.label)||`Subject ${A}`,predicate:((Y=D.predicate)==null?void 0:Y.label)||"is",object:((F=D.object)==null?void 0:F.label)||`Object ${A}`,units:0,direction:ot.None,term_id:D.term_id,term_position_count:D.term_position_count||0,counter_term_id:D.counter_term_id,counter_term_position_count:D.counter_term_position_count||0,userHasPosition:W!==ot.None,userPositionDirection:W}});O.every(A=>A.object==="Unknown")&&i&&i("Error: Failed to fetch triple details. Please check your network connection or try again later."),a(O)}catch{i&&i("Error: Failed to fetch triple details")}finally{l(!1)}},T=(S,w,R)=>{if(w!==ot.None&&!C(S,w)){const P=s.find(A=>A.id===S);if(P&&P.userHasPosition&&P.userPositionDirection!==ot.None){i&&i(`Cannot vote ${w===ot.For?"for":"against"} this claim as you already have an ${P.userPositionDirection===ot.For?"affirmative":"opposing"} position on it.`);return}}a(O=>O.map(P=>P.id===S?P.userHasPosition&&P.userPositionDirection!==ot.None&&w!==ot.None&&P.userPositionDirection!==w?P:P.direction!==w&&P.direction!==ot.None?{...P,units:R,direction:w}:R===0?{...P,units:0,direction:ot.None}:{...P,units:R,direction:w}:P))},E=()=>{a(S=>S.map(w=>({...w,units:0,direction:ot.None})))},M=s.filter(S=>S.units>0).length,C=(S,w)=>{const R=s.find(P=>P.id===S);return!R||!R.userHasPosition?!0:R.userPositionDirection===ot.None||R.userPositionDirection===w};return{voteItems:s,setVoteItems:a,isLoading:o||g,totalUnits:c,numberOfTransactions:M,handleChangeUnits:T,resetAllVotes:E,loadTripleDetails:b,isVoteDirectionAllowed:C,userPositions:d}},lO=r=>(r*.01).toFixed(2),Ooe=r=>(r*5e-5).toFixed(5),Doe=({numberOfTransactions:r,totalUnits:e,onResetAll:i})=>I.jsxs("div",{style:{backgroundColor:"rgba(0, 0, 0, 0.85)",padding:"10px",borderRadius:"8px",marginBottom:"25px",display:"flex",flexDirection:"column",border:"1px solid rgb(105, 105, 105)"},children:[I.jsxs("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:"15px"},children:[I.jsxs("div",{children:[I.jsx("div",{style:{fontSize:"0.9em",color:"#6b7280"},children:"Unit value:"}),I.jsxs("div",{style:{fontSize:"1.1em",fontWeight:"bold",color:"#FFD32A"},children:[lO(e)," tTRUST"]})]}),I.jsxs("div",{children:[I.jsx("div",{style:{fontSize:"0.9em",color:"#6b7280"},children:"Number of transactions:"}),I.jsx("div",{style:{fontSize:"1.1em",fontWeight:"bold",color:"#FFD32A"},children:r})]}),I.jsxs("div",{children:[I.jsx("div",{style:{fontSize:"0.9em",color:"#6b7280"},children:"Estimated gas cost:"}),I.jsxs("div",{style:{fontSize:"1.1em",fontWeight:"bold",color:"#FFD32A"},children:["~",Ooe(r)," tTRUST"]})]})]}),I.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[I.jsxs("div",{style:{fontSize:"1em",fontWeight:"bold"},children:["Total units selected:",I.jsxs("span",{style:{fontSize:"1.6em",marginLeft:"10px",color:"#FFD32A"},children:[e," ",e===1?"unit":"units"]})]}),e>0&&I.jsx("button",{onClick:i,style:{backgroundColor:"transparent",border:"1px solid #6b7280",color:"#FFF",padding:"6px 12px",borderRadius:"4px",cursor:"pointer",fontSize:"0.9em"},children:"Reset all"})]})]}),Loe=({onClose:r})=>I.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"25px",borderBottom:"1px solid rgb(105, 105, 105)"},children:[I.jsx("h2",{style:{fontSize:"1.3em",color:"#FFD32A",margin:0,fontWeight:"bold"},children:"VOTE ON CLAIMS"}),r&&I.jsx("button",{onClick:r,style:{backgroundColor:"transparent",border:"none",color:"#FFF",cursor:"pointer",fontSize:"1.5em"},children:"×"})]}),koe=({voteItem:r,onChangeUnits:e,isVoteDirectionAllowed:i=()=>!0,walletAddress:n="",network:s=ri.MAINNET,constants:a})=>{const{UNIT_VALUE:o}=a,{id:l,subject:u,predicate:c,object:h,units:d,direction:p,term_position_count:f=0,counter_term_position_count:m=0,userHasPosition:y=!1,userPositionDirection:v=ot.None}=r,[g,_]=V.useState(0),[x,b]=V.useState(!1),[T,E]=V.useState(!1),M=y,C=v,S=f,w=m,R=20;V.useEffect(()=>{p===ot.For?_(d):p===ot.Against?_(-d):_(0)},[d,p]);const O=i?i(l,ot.For):!M||C===ot.For,P=i?i(l,ot.Against):!M||C===ot.Against,A=()=>{if(!O)return;const z=Math.min(g+1,R);_(z),e(l,ot.For,z)},D=()=>{if(!O||g<=0)return;const z=g-1;_(z),z===0?e(l,ot.None,0):e(l,ot.For,z)},L=()=>{if(!P)return;const z=Math.max(g-1,-R);_(z),e(l,ot.Against,Math.abs(z))},W=()=>{if(!P||g>=0)return;const z=g+1;_(z),z===0?e(l,ot.None,0):e(l,ot.Against,Math.abs(z))},G=p===ot.For&&d>0,Y=p===ot.Against&&d>0,F=Number(o)/10**18*d,B=M&&C!==ot.None,q=B&&C===ot.Against?"You cannot vote FOR this claim because you already have an AGAINST position":"",H=B&&C===ot.For?"You cannot vote AGAINST this claim because you already have a FOR position":"";return I.jsxs("div",{style:{padding:"20px",marginBottom:"20px",borderRadius:"8px",backgroundColor:"rgba(0, 0, 0, 0.85)",position:"relative",borderBottom:B?C===ot.For?"12px solid #006FE8":"12px solid #FF9500":"1px solid rgb(105, 105, 105)",borderTop:"1px solid rgb(105, 105, 105)",borderLeft:"1px solid rgb(105, 105, 105)",borderRight:"1px solid rgb(105, 105, 105)",boxShadow:"0 4px 10px rgba(0, 0, 0, 0.3)"},children:[d>0&&I.jsxs("div",{style:{position:"absolute",top:"5px",left:"5px",backgroundColor:"#FFD32A",color:"#000000",padding:"3px 6px",fontSize:"10px",fontWeight:"bold",borderRadius:"4px"},children:[F.toFixed(2)," tTRUST"]}),I.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[I.jsxs("div",{style:{display:"flex",alignItems:"center",position:"relative"},children:[I.jsx("div",{style:{fontSize:"0.9em",color:"#E1E1E1",marginRight:"10px"},children:"For ▲:"}),C===ot.For||C===ot.None?I.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[I.jsx("button",{onClick:O&&g>0?D:void 0,disabled:!O||g<=0,style:{width:"30px",height:"30px",backgroundColor:O&&g>0?"#1e2030":"#606060",border:"none",borderRadius:"4px",color:"#ffffff",fontSize:"16px",cursor:O&&g>0?"pointer":"not-allowed",display:"flex",alignItems:"center",justifyContent:"center",opacity:O&&g>0?1:.4,pointerEvents:O&&g>0?"auto":"none",userSelect:"none"},children:"-"}),I.jsx("span",{style:{margin:"0 10px",color:"#ffffff",fontWeight:"bold"},children:G?d:0}),I.jsxs("div",{style:{position:"relative"},onMouseEnter:()=>q&&b(!0),onMouseLeave:()=>q&&b(!1),children:[I.jsx("button",{onClick:O?A:void 0,disabled:!O,style:{width:"30px",height:"30px",backgroundColor:O?"#1976d2":"#606060",border:!O&&B?"2px solid #F44336":"none",borderRadius:"4px",color:"#ffffff",fontSize:"16px",cursor:O?"pointer":"not-allowed",display:"flex",alignItems:"center",justifyContent:"center",opacity:O?1:.4,pointerEvents:O?"auto":"none",userSelect:"none"},children:"+"}),(!O&&B||x&&q)&&I.jsx("div",{style:{position:"absolute",bottom:"100%",left:"50%",transform:"translateX(-50%)",backgroundColor:"#F44336",color:"white",padding:"5px 10px",borderRadius:"4px",fontSize:"12px",whiteSpace:"nowrap",zIndex:10,marginBottom:"5px"},children:q})]})]}):I.jsx("div",{style:{backgroundColor:"#606060",borderRadius:"4px",color:"#ffffff",padding:"5px 10px",fontSize:"12px",marginLeft:"10px"},children:"You have voted AGAINST ▼"})]}),I.jsxs("div",{style:{display:"flex",marginBottom:"20px",gap:"5px",marginTop:"20px"},children:[I.jsx("span",{style:{backgroundColor:"#FFB300",padding:"4px 8px",borderRadius:"4px",fontSize:"0.9em",color:"#000000",fontWeight:"bold"},children:u}),"-",I.jsx("span",{style:{backgroundColor:"#ccd3d3",padding:"4px 8px",borderRadius:"4px",fontSize:"0.9em",color:"#000000",fontWeight:"bold"},children:c}),"-",I.jsx("span",{style:{backgroundColor:"#43A047",padding:"4px 8px",borderRadius:"4px",fontSize:"0.9em",color:"#000000",fontWeight:"bold"},children:h})]}),I.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[I.jsx("div",{style:{fontSize:"0.9em",color:"#E1E1E1",marginRight:"10px"},children:"Against ▼:"}),C===ot.Against||C===ot.None?I.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[I.jsx("button",{onClick:P&&g<0?W:void 0,disabled:!P||g>=0,style:{width:"30px",height:"30px",backgroundColor:P&&g<0?"#1e2030":"#606060",border:"none",borderRadius:"4px",color:"#ffffff",fontSize:"16px",cursor:P&&g<0?"pointer":"not-allowed",display:"flex",alignItems:"center",justifyContent:"center",opacity:P&&g<0?1:.4,pointerEvents:P&&g<0?"auto":"none",userSelect:"none"},children:"-"}),I.jsx("span",{style:{margin:"0 10px",color:"#ffffff",fontWeight:"bold"},children:Y?d:0}),I.jsxs("div",{style:{position:"relative"},onMouseEnter:()=>H&&E(!0),onMouseLeave:()=>H&&E(!1),children:[I.jsx("button",{onClick:P?L:void 0,disabled:!P,style:{width:"30px",height:"30px",backgroundColor:P?"#dc3545":"#606060",border:!P&&B?"2px solid #4CAF50":"none",borderRadius:"4px",color:"#ffffff",fontSize:"16px",cursor:P?"pointer":"not-allowed",display:"flex",alignItems:"center",justifyContent:"center",opacity:P?1:.4,pointerEvents:P?"auto":"none",userSelect:"none"},children:"+"}),(!P&&B||T&&H)&&I.jsx("div",{style:{position:"absolute",bottom:"100%",left:"50%",transform:"translateX(-50%)",backgroundColor:"#F44336",color:"white",padding:"5px 10px",borderRadius:"4px",fontSize:"12px",whiteSpace:"nowrap",zIndex:10,marginBottom:"5px"},children:H})]})]}):I.jsx("div",{style:{backgroundColor:"#606060",borderRadius:"4px",color:"#ffffff",padding:"5px 10px",fontSize:"12px",marginLeft:"10px"},children:"You have voted FOR ▲"})]})]}),I.jsxs("div",{className:"flex flex-row justify-between",children:[I.jsxs("div",{style:{fontSize:"0.7em",color:"#4CAF50",marginBottom:"8px",backgroundColor:"rgba(76, 175, 80, 0.1)",padding:"2px 6px",borderRadius:"4px",fontWeight:"bold"},children:[S," positions"]}),I.jsxs("div",{style:{fontSize:"0.7em",color:"#F44336",marginBottom:"8px",backgroundColor:"rgba(244, 67, 54, 0.1)",padding:"2px 6px",borderRadius:"4px",fontWeight:"bold"},children:[w," positions"]})]})]})},Uoe=({isLoading:r,loadingProgress:e,voteItems:i,onChangeUnits:n,isVoteDirectionAllowed:s,walletAddress:a="",network:o=ri.MAINNET,constants:l})=>{if(r){const u=e?`Loading claims... ${e.loaded}/${e.total}`:"Loading claims...";return I.jsxs("div",{style:{textAlign:"center",padding:"30px",color:"#6b7280",fontSize:"1.1em"},children:[I.jsx("div",{style:{marginBottom:"10px"},children:u}),e&&I.jsx("div",{style:{width:"100%",backgroundColor:"#374151",borderRadius:"4px",overflow:"hidden",marginTop:"10px"},children:I.jsx("div",{style:{width:`${e.loaded/e.total*100}%`,height:"8px",backgroundColor:"#3b82f6",transition:"width 0.3s ease"}})})]})}return I.jsx("div",{style:{marginBottom:"25px"},children:i.map(u=>I.jsx(koe,{voteItem:u,onChangeUnits:n,isVoteDirectionAllowed:s,walletAddress:a,network:o,constants:l},u.id.toString()))})},Foe=({onSubmit:r,isSubmitting:e,isDepositLoading:i,totalUnits:n,numberOfTransactions:s})=>I.jsxs("div",{style:{textAlign:"center"},children:[I.jsx("div",{style:{marginBottom:"15px",fontSize:"0.9em",color:"#6b7280"},children:s>0&&`You will initiate ${s} transaction${s>1?"s":""}`}),I.jsx("button",{onClick:r,disabled:e||i||n===0,style:{backgroundColor:n>0&&!e&&!i?"#1976d2":"rgb(105, 105, 105)",color:"#FFF",padding:"12px 30px",border:"none",borderRadius:"8px",fontSize:"1.1em",fontWeight:"bold",cursor:n>0&&!e&&!i?"pointer":"not-allowed",width:"100%",maxWidth:"350px",boxShadow:"0 4px 10px rgba(0, 0, 0, 0.3)",transition:"background-color 0.2s ease"},children:e||i?"Processing...":n>0?`Submit votes (${lO(n)} tTRUST)`:"Submit votes"})]}),Boe=({transactionStatus:r})=>r.status==="idle"||r.status==="whitelist_error"?null:I.jsx("div",{style:{marginTop:"25px",padding:"20px",borderRadius:"8px",backgroundColor:r.status==="pending"?"#10172d":r.status==="approval_pending"?"rgba(255, 211, 42, 0.1)":r.status==="success"?"rgba(0, 128, 0, 0.1)":"rgba(255, 0, 0, 0.1)",color:r.status==="success"?"#4CAF50":r.status==="error"?"#F44336":r.status==="approval_pending"?"#FFD32A":"#FFF",display:"flex",flexDirection:"column",gap:"10px",border:"1px solid #1e3b70"},children:I.jsx("div",{children:r.message})}),uO=({walletConnected:r,walletAddress:e,publicClient:i,onClose:n,network:s=ri.MAINNET,onConnectWallet:a,onCreatePlayer:o,wagmiConfig:l,walletHooks:u,constants:c})=>{const[h,d]=V.useState(!1),[p,f]=V.useState(!1),[m,y]=V.useState(!1),{PLAYER_TRIPLE_TYPES:v}=c,{loading:g,triples:_}=pT(e||"",v.PLAYER_GAME.predicateId,v.PLAYER_GAME.objectId,s,c),x=_.length>0;V.useEffect(()=>{y(!!(e&&e!==""))},[e]),V.useEffect(()=>{f(!!(m&&!x&&!g))},[m,x,g]);const{voteItems:b,isLoading:T,totalUnits:E,numberOfTransactions:M,handleChangeUnits:C,resetAllVotes:S,isVoteDirectionAllowed:w}=Ioe({network:s,walletAddress:e,onError:z=>{D({status:"error",message:z})},constants:c}),{submitVotes:R,isSubmitting:O,isDepositLoading:P,transactionStatus:A,setTransactionStatus:D}=Noe({walletConnected:r,walletAddress:e,publicClient:i,network:s,onSuccess:S}),L=async()=>{await R(b)},W=()=>{f(!1),d(!0),o&&o()},G=()=>{d(!1)},Y=()=>{f(!1),n&&n()},{isCorrectNetwork:F,currentChainId:B,targetChainId:q,allowedChainIds:H}=Bw({walletConnected:r,publicClient:i});return m?m&&!x&&!g?I.jsxs("div",{style:{backgroundColor:"rgba(0, 0, 0, 0.85)",minHeight:"100%",color:"#fff",padding:"15px",border:"1px solid rgb(105, 105, 105)",borderRadius:"8px",maxWidth:"100%",margin:"0 auto",position:"relative",boxShadow:"0 4px 15px rgba(0, 0, 0, 0.3)"},children:[I.jsx(Roe,{isOpen:!0,onCreatePlayer:W,onClose:Y}),I.jsx(wy,{isOpen:h,onClose:G,walletConnected:r,walletAddress:e,wagmiConfig:l,walletHooks:u})]}):I.jsxs("div",{style:{backgroundColor:"rgba(0, 0, 0, 0.85)",minHeight:"100%",opacity:"0.9",color:"#fff",padding:"15px",border:"1px solid rgb(105, 105, 105)",borderRadius:"8px",maxWidth:"100%",margin:"0 auto",position:"relative",boxShadow:"0 4px 15px rgba(0, 0, 0, 0.3)"},children:[I.jsx(Loe,{onClose:n}),I.jsx(Doe,{numberOfTransactions:M,totalUnits:E,onResetAll:S}),I.jsx(Uoe,{isLoading:T||g,voteItems:b,onChangeUnits:C,isVoteDirectionAllowed:w,walletAddress:e,network:s,constants:c}),I.jsx(Foe,{onSubmit:L,isSubmitting:O,isDepositLoading:P,totalUnits:E,numberOfTransactions:M}),I.jsx(Boe,{transactionStatus:A}),!F&&I.jsx(zw,{allowedChainIds:H,currentChainId:B,targetChainId:q})]}):I.jsx("div",{style:{backgroundColor:"rgba(0, 0, 0, 0.85)",minHeight:"100%",opacity:"0.9",color:"#fff",padding:"15px",border:"1px solid rgb(105, 105, 105)",borderRadius:"8px",maxWidth:"100%",margin:"0 auto",position:"relative",boxShadow:"0 4px 15px rgba(0, 0, 0, 0.3)"},children:I.jsx(oO,{isOpen:!0,onConnectWallet:a||(()=>{})})})},cO=({walletConnected:r,walletAddress:e,publicClient:i,onClose:n,constants:s,wagmiConfig:a})=>(V.useEffect(()=>(document.body.style.overflow="hidden",()=>{document.body.style.overflow="auto"}),[]),I.jsx("div",{className:"fixed inset-0 flex items-center justify-center height-700px",style:{backgroundColor:"rgba(0, 0, 0, 0.5)",zIndex:1e3},children:I.jsx("div",{style:{backgroundColor:"#18181b",borderRadius:"12px",boxShadow:"0 25px 50px -12px rgba(0, 0, 0, 0.25)",maxWidth:"1000px",width:"100%",maxHeight:"700px",height:"700px",display:"flex",flexDirection:"column",overflow:"hidden",opacity:.85},children:I.jsx("div",{style:{flex:1,overflow:"auto",padding:"0"},children:I.jsx(uO,{walletConnected:r,walletAddress:e,publicClient:i,onClose:n,network:"mainnet",wagmiConfig:a,constants:s})})})})),hO=new qae({defaultOptions:{queries:{retry:1,refetchOnWindowFocus:!1}}});V.createContext({queryClient:hO});const zoe=({children:r})=>I.jsx(Yae,{client:hO,children:r}),joe=r=>V.useMemo(()=>r!=null&&r.constants?{...r.constants,UNIT_VALUE:Xg}:{...ioe,UNIT_VALUE:Xg},[r==null?void 0:r.constants]),Voe="https://testnet.intuition.sh/v1/graphql";function Goe(){$ae({apiUrl:Voe})}const Hoe=({walletConnected:r=!1,walletAddress:e="",wagmiConfig:i,walletHooks:n,onClose:s,onCreatePlayer:a,onConnectWallet:o,config:l})=>{V.useEffect(()=>{Goe()},[]);const u=joe(l),[c,h]=V.useState(ri.MAINNET),[d,p]=V.useState(!1),[f,m]=V.useState(!1),[y,v]=V.useState(!1),[g,_]=V.useState([]),[x,b]=V.useState(!1),[T,E]=V.useState(null),M=V.useRef(0),C=V.useRef(0),S=V.useRef(!1),w=e||"";V.useEffect(()=>{v(!!(e&&e!==""))},[e]);const{loading:R,error:O,triples:P}=pT(w,u.PLAYER_TRIPLE_TYPES.PLAYER_GAME.predicateId,u.PLAYER_TRIPLE_TYPES.PLAYER_GAME.objectId,c),A=V.useMemo(()=>!P||P.length===0?[]:[...P],[P]),D=V.useMemo(()=>!A||A.length===0?"":A.filter(Z=>Z.predicate_id===u.PLAYER_TRIPLE_TYPES.PLAYER_GAME.predicateId&&Z.object_id===u.PLAYER_TRIPLE_TYPES.PLAYER_GAME.objectId).map(Z=>Z.term_id).sort().join(","),[A,u.PLAYER_TRIPLE_TYPES.PLAYER_GAME.predicateId,u.PLAYER_TRIPLE_TYPES.PLAYER_GAME.objectId]);V.useEffect(()=>{(async()=>{var fe,_e,Re,nt;if(!y||!e){_([]),E(null);return}if(S.current)return;const Z=Date.now();if(Z-C.current<3e4){console.warn("[GraphComponent] Skip fetch: Too many requests recently (429 error)");return}if(R||O)return;if(!A||A.length===0){_([]);return}if(Z-M.current<1e3){console.warn("[GraphComponent] Skip fetch: Too frequent requests");return}M.current=Z,S.current=!0,b(!0),E(null);try{const gt=A.filter(Be=>Be.predicate_id===u.PLAYER_TRIPLE_TYPES.PLAYER_GAME.predicateId&&Be.object_id===u.PLAYER_TRIPLE_TYPES.PLAYER_GAME.objectId).map(Be=>Be.term_id);if(gt.length===0){_([]);return}const $=Cr[c],$e=await(await fetch($,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:`
5857
+ `,variables:{tripleIds:S.map(D=>D.toString())}})});if(!O.ok)throw new Error(`GraphQL request failed with status ${O.status}`);const P=await O.json();if(P.errors)throw new Error(`GraphQL errors: ${JSON.stringify(P.errors)}`);const A=new Map;return(((w=P.data)==null?void 0:w.triples)||[]).forEach(D=>{var G,Y,F,B,q,H;const L=((F=(Y=(G=D.term)==null?void 0:G.positions_aggregate)==null?void 0:Y.aggregate)==null?void 0:F.count)||0,W=((H=(q=(B=D.counter_term)==null?void 0:B.positions_aggregate)==null?void 0:q.aggregate)==null?void 0:H.count)||0;A.set(D.term_id,{id:D.term_id,subject:D.subject,predicate:D.predicate,object:D.object,term_id:D.term_id,counter_term_id:D.counter_term_id,term_position_count:L,counter_term_position_count:W})}),S.forEach(D=>{A.has(D)||A.set(D,null)}),A}catch(R){const O=new Map;return S.forEach(P=>{O.set(P,null)}),i&&i(`Error fetching batch triple details: ${R instanceof Error?R.message:String(R)}`),O}},b=async S=>{l(!0);try{const w=await x(u),R=S||d,O=u.map(A=>{var G,Y,F;const D=w.get(A);if(!D)return{id:BigInt(A),subject:`Claim ${A}`,predicate:"is",object:"Unknown",units:0,direction:ot.None,userHasPosition:!1,userPositionDirection:ot.None};const L=D.term_id||String(A),W=R[L]||R[String(A)]||ot.None;return W!==ot.None&&console.log(`[loadTripleDetails] Triple ${L} a une position:`,W),L==="0x27191de92fe0308355319ec8f2359e5ce85123bd243bf7ffa6eb8028347b3eab"&&(console.log(`[loadTripleDetails] Triple recherché: ${L}`),console.log("[loadTripleDetails] positionsToUse keys:",Object.keys(R)),console.log("[loadTripleDetails] Trouvé dans positionsToUse:",R[L])),{id:BigInt(D.id),subject:((G=D.subject)==null?void 0:G.label)||`Subject ${A}`,predicate:((Y=D.predicate)==null?void 0:Y.label)||"is",object:((F=D.object)==null?void 0:F.label)||`Object ${A}`,units:0,direction:ot.None,term_id:D.term_id,term_position_count:D.term_position_count||0,counter_term_id:D.counter_term_id,counter_term_position_count:D.counter_term_position_count||0,userHasPosition:W!==ot.None,userPositionDirection:W}});O.every(A=>A.object==="Unknown")&&i&&i("Error: Failed to fetch triple details. Please check your network connection or try again later."),a(O)}catch{i&&i("Error: Failed to fetch triple details")}finally{l(!1)}},T=(S,w,R)=>{if(w!==ot.None&&!C(S,w)){const P=s.find(A=>A.id===S);if(P&&P.userHasPosition&&P.userPositionDirection!==ot.None){i&&i(`Cannot vote ${w===ot.For?"for":"against"} this claim as you already have an ${P.userPositionDirection===ot.For?"affirmative":"opposing"} position on it.`);return}}a(O=>O.map(P=>P.id===S?P.userHasPosition&&P.userPositionDirection!==ot.None&&w!==ot.None&&P.userPositionDirection!==w?P:P.direction!==w&&P.direction!==ot.None?{...P,units:R,direction:w}:R===0?{...P,units:0,direction:ot.None}:{...P,units:R,direction:w}:P))},E=()=>{a(S=>S.map(w=>({...w,units:0,direction:ot.None})))},M=s.filter(S=>S.units>0).length,C=(S,w)=>{const R=s.find(P=>P.id===S);return!R||!R.userHasPosition?!0:R.userPositionDirection===ot.None||R.userPositionDirection===w};return{voteItems:s,setVoteItems:a,isLoading:o||g,totalUnits:c,numberOfTransactions:M,handleChangeUnits:T,resetAllVotes:E,loadTripleDetails:b,isVoteDirectionAllowed:C,userPositions:d}},lO=r=>(r*.01).toFixed(2),Ooe=r=>(r*5e-5).toFixed(5),Doe=({numberOfTransactions:r,totalUnits:e,onResetAll:i})=>I.jsxs("div",{style:{backgroundColor:"rgba(0, 0, 0, 0.85)",padding:"10px",borderRadius:"8px",marginBottom:"25px",display:"flex",flexDirection:"column",border:"1px solid rgb(105, 105, 105)"},children:[I.jsxs("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:"15px"},children:[I.jsxs("div",{children:[I.jsx("div",{style:{fontSize:"0.9em",color:"#6b7280"},children:"Unit value:"}),I.jsxs("div",{style:{fontSize:"1.1em",fontWeight:"bold",color:"#FFD32A"},children:[lO(e)," tTRUST"]})]}),I.jsxs("div",{children:[I.jsx("div",{style:{fontSize:"0.9em",color:"#6b7280"},children:"Number of transactions:"}),I.jsx("div",{style:{fontSize:"1.1em",fontWeight:"bold",color:"#FFD32A"},children:r})]}),I.jsxs("div",{children:[I.jsx("div",{style:{fontSize:"0.9em",color:"#6b7280"},children:"Estimated gas cost:"}),I.jsxs("div",{style:{fontSize:"1.1em",fontWeight:"bold",color:"#FFD32A"},children:["~",Ooe(r)," tTRUST"]})]})]}),I.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[I.jsxs("div",{style:{fontSize:"1em",fontWeight:"bold"},children:["Total units selected:",I.jsxs("span",{style:{fontSize:"1.6em",marginLeft:"10px",color:"#FFD32A"},children:[e," ",e===1?"unit":"units"]})]}),e>0&&I.jsx("button",{onClick:i,style:{backgroundColor:"transparent",border:"1px solid #6b7280",color:"#FFF",padding:"6px 12px",borderRadius:"4px",cursor:"pointer",fontSize:"0.9em"},children:"Reset all"})]})]}),Loe=({onClose:r})=>I.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"25px",borderBottom:"1px solid rgb(105, 105, 105)"},children:[I.jsx("h2",{style:{fontSize:"1.3em",color:"#FFD32A",margin:0,fontWeight:"bold"},children:"VOTE ON CLAIMS"}),r&&I.jsx("button",{onClick:r,style:{backgroundColor:"transparent",border:"none",color:"#FFF",cursor:"pointer",fontSize:"1.5em"},children:"×"})]}),koe=({voteItem:r,onChangeUnits:e,isVoteDirectionAllowed:i=()=>!0,walletAddress:n="",network:s=ii.MAINNET,constants:a})=>{const{UNIT_VALUE:o}=a,{id:l,subject:u,predicate:c,object:h,units:d,direction:p,term_position_count:f=0,counter_term_position_count:m=0,userHasPosition:y=!1,userPositionDirection:v=ot.None}=r,[g,_]=V.useState(0),[x,b]=V.useState(!1),[T,E]=V.useState(!1),M=y,C=v,S=f,w=m,R=20;V.useEffect(()=>{p===ot.For?_(d):p===ot.Against?_(-d):_(0)},[d,p]);const O=i?i(l,ot.For):!M||C===ot.For,P=i?i(l,ot.Against):!M||C===ot.Against,A=()=>{if(!O)return;const z=Math.min(g+1,R);_(z),e(l,ot.For,z)},D=()=>{if(!O||g<=0)return;const z=g-1;_(z),z===0?e(l,ot.None,0):e(l,ot.For,z)},L=()=>{if(!P)return;const z=Math.max(g-1,-R);_(z),e(l,ot.Against,Math.abs(z))},W=()=>{if(!P||g>=0)return;const z=g+1;_(z),z===0?e(l,ot.None,0):e(l,ot.Against,Math.abs(z))},G=p===ot.For&&d>0,Y=p===ot.Against&&d>0,F=Number(o)/10**18*d,B=M&&C!==ot.None,q=B&&C===ot.Against?"You cannot vote FOR this claim because you already have an AGAINST position":"",H=B&&C===ot.For?"You cannot vote AGAINST this claim because you already have a FOR position":"";return I.jsxs("div",{style:{padding:"20px",marginBottom:"20px",borderRadius:"8px",backgroundColor:"rgba(0, 0, 0, 0.85)",position:"relative",borderBottom:B?C===ot.For?"12px solid #006FE8":"12px solid #FF9500":"1px solid rgb(105, 105, 105)",borderTop:"1px solid rgb(105, 105, 105)",borderLeft:"1px solid rgb(105, 105, 105)",borderRight:"1px solid rgb(105, 105, 105)",boxShadow:"0 4px 10px rgba(0, 0, 0, 0.3)"},children:[d>0&&I.jsxs("div",{style:{position:"absolute",top:"5px",left:"5px",backgroundColor:"#FFD32A",color:"#000000",padding:"3px 6px",fontSize:"10px",fontWeight:"bold",borderRadius:"4px"},children:[F.toFixed(2)," tTRUST"]}),I.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[I.jsxs("div",{style:{display:"flex",alignItems:"center",position:"relative"},children:[I.jsx("div",{style:{fontSize:"0.9em",color:"#E1E1E1",marginRight:"10px"},children:"For ▲:"}),C===ot.For||C===ot.None?I.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[I.jsx("button",{onClick:O&&g>0?D:void 0,disabled:!O||g<=0,style:{width:"30px",height:"30px",backgroundColor:O&&g>0?"#1e2030":"#606060",border:"none",borderRadius:"4px",color:"#ffffff",fontSize:"16px",cursor:O&&g>0?"pointer":"not-allowed",display:"flex",alignItems:"center",justifyContent:"center",opacity:O&&g>0?1:.4,pointerEvents:O&&g>0?"auto":"none",userSelect:"none"},children:"-"}),I.jsx("span",{style:{margin:"0 10px",color:"#ffffff",fontWeight:"bold"},children:G?d:0}),I.jsxs("div",{style:{position:"relative"},onMouseEnter:()=>q&&b(!0),onMouseLeave:()=>q&&b(!1),children:[I.jsx("button",{onClick:O?A:void 0,disabled:!O,style:{width:"30px",height:"30px",backgroundColor:O?"#1976d2":"#606060",border:!O&&B?"2px solid #F44336":"none",borderRadius:"4px",color:"#ffffff",fontSize:"16px",cursor:O?"pointer":"not-allowed",display:"flex",alignItems:"center",justifyContent:"center",opacity:O?1:.4,pointerEvents:O?"auto":"none",userSelect:"none"},children:"+"}),(!O&&B||x&&q)&&I.jsx("div",{style:{position:"absolute",bottom:"100%",left:"50%",transform:"translateX(-50%)",backgroundColor:"#F44336",color:"white",padding:"5px 10px",borderRadius:"4px",fontSize:"12px",whiteSpace:"nowrap",zIndex:10,marginBottom:"5px"},children:q})]})]}):I.jsx("div",{style:{backgroundColor:"#606060",borderRadius:"4px",color:"#ffffff",padding:"5px 10px",fontSize:"12px",marginLeft:"10px"},children:"You have voted AGAINST ▼"})]}),I.jsxs("div",{style:{display:"flex",marginBottom:"20px",gap:"5px",marginTop:"20px"},children:[I.jsx("span",{style:{backgroundColor:"#FFB300",padding:"4px 8px",borderRadius:"4px",fontSize:"0.9em",color:"#000000",fontWeight:"bold"},children:u}),"-",I.jsx("span",{style:{backgroundColor:"#ccd3d3",padding:"4px 8px",borderRadius:"4px",fontSize:"0.9em",color:"#000000",fontWeight:"bold"},children:c}),"-",I.jsx("span",{style:{backgroundColor:"#43A047",padding:"4px 8px",borderRadius:"4px",fontSize:"0.9em",color:"#000000",fontWeight:"bold"},children:h})]}),I.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[I.jsx("div",{style:{fontSize:"0.9em",color:"#E1E1E1",marginRight:"10px"},children:"Against ▼:"}),C===ot.Against||C===ot.None?I.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[I.jsx("button",{onClick:P&&g<0?W:void 0,disabled:!P||g>=0,style:{width:"30px",height:"30px",backgroundColor:P&&g<0?"#1e2030":"#606060",border:"none",borderRadius:"4px",color:"#ffffff",fontSize:"16px",cursor:P&&g<0?"pointer":"not-allowed",display:"flex",alignItems:"center",justifyContent:"center",opacity:P&&g<0?1:.4,pointerEvents:P&&g<0?"auto":"none",userSelect:"none"},children:"-"}),I.jsx("span",{style:{margin:"0 10px",color:"#ffffff",fontWeight:"bold"},children:Y?d:0}),I.jsxs("div",{style:{position:"relative"},onMouseEnter:()=>H&&E(!0),onMouseLeave:()=>H&&E(!1),children:[I.jsx("button",{onClick:P?L:void 0,disabled:!P,style:{width:"30px",height:"30px",backgroundColor:P?"#dc3545":"#606060",border:!P&&B?"2px solid #4CAF50":"none",borderRadius:"4px",color:"#ffffff",fontSize:"16px",cursor:P?"pointer":"not-allowed",display:"flex",alignItems:"center",justifyContent:"center",opacity:P?1:.4,pointerEvents:P?"auto":"none",userSelect:"none"},children:"+"}),(!P&&B||T&&H)&&I.jsx("div",{style:{position:"absolute",bottom:"100%",left:"50%",transform:"translateX(-50%)",backgroundColor:"#F44336",color:"white",padding:"5px 10px",borderRadius:"4px",fontSize:"12px",whiteSpace:"nowrap",zIndex:10,marginBottom:"5px"},children:H})]})]}):I.jsx("div",{style:{backgroundColor:"#606060",borderRadius:"4px",color:"#ffffff",padding:"5px 10px",fontSize:"12px",marginLeft:"10px"},children:"You have voted FOR ▲"})]})]}),I.jsxs("div",{className:"flex flex-row justify-between",children:[I.jsxs("div",{style:{fontSize:"0.7em",color:"#4CAF50",marginBottom:"8px",backgroundColor:"rgba(76, 175, 80, 0.1)",padding:"2px 6px",borderRadius:"4px",fontWeight:"bold"},children:[S," positions"]}),I.jsxs("div",{style:{fontSize:"0.7em",color:"#F44336",marginBottom:"8px",backgroundColor:"rgba(244, 67, 54, 0.1)",padding:"2px 6px",borderRadius:"4px",fontWeight:"bold"},children:[w," positions"]})]})]})},Uoe=({isLoading:r,loadingProgress:e,voteItems:i,onChangeUnits:n,isVoteDirectionAllowed:s,walletAddress:a="",network:o=ii.MAINNET,constants:l})=>{if(r){const u=e?`Loading claims... ${e.loaded}/${e.total}`:"Loading claims...";return I.jsxs("div",{style:{textAlign:"center",padding:"30px",color:"#6b7280",fontSize:"1.1em"},children:[I.jsx("div",{style:{marginBottom:"10px"},children:u}),e&&I.jsx("div",{style:{width:"100%",backgroundColor:"#374151",borderRadius:"4px",overflow:"hidden",marginTop:"10px"},children:I.jsx("div",{style:{width:`${e.loaded/e.total*100}%`,height:"8px",backgroundColor:"#3b82f6",transition:"width 0.3s ease"}})})]})}return I.jsx("div",{style:{marginBottom:"25px"},children:i.map(u=>I.jsx(koe,{voteItem:u,onChangeUnits:n,isVoteDirectionAllowed:s,walletAddress:a,network:o,constants:l},u.id.toString()))})},Foe=({onSubmit:r,isSubmitting:e,isDepositLoading:i,totalUnits:n,numberOfTransactions:s})=>I.jsxs("div",{style:{textAlign:"center"},children:[I.jsx("div",{style:{marginBottom:"15px",fontSize:"0.9em",color:"#6b7280"},children:s>0&&`You will initiate ${s} transaction${s>1?"s":""}`}),I.jsx("button",{onClick:r,disabled:e||i||n===0,style:{backgroundColor:n>0&&!e&&!i?"#1976d2":"rgb(105, 105, 105)",color:"#FFF",padding:"12px 30px",border:"none",borderRadius:"8px",fontSize:"1.1em",fontWeight:"bold",cursor:n>0&&!e&&!i?"pointer":"not-allowed",width:"100%",maxWidth:"350px",boxShadow:"0 4px 10px rgba(0, 0, 0, 0.3)",transition:"background-color 0.2s ease"},children:e||i?"Processing...":n>0?`Submit votes (${lO(n)} tTRUST)`:"Submit votes"})]}),Boe=({transactionStatus:r})=>r.status==="idle"||r.status==="whitelist_error"?null:I.jsx("div",{style:{marginTop:"25px",padding:"20px",borderRadius:"8px",backgroundColor:r.status==="pending"?"#10172d":r.status==="approval_pending"?"rgba(255, 211, 42, 0.1)":r.status==="success"?"rgba(0, 128, 0, 0.1)":"rgba(255, 0, 0, 0.1)",color:r.status==="success"?"#4CAF50":r.status==="error"?"#F44336":r.status==="approval_pending"?"#FFD32A":"#FFF",display:"flex",flexDirection:"column",gap:"10px",border:"1px solid #1e3b70"},children:I.jsx("div",{children:r.message})}),uO=({walletConnected:r,walletAddress:e,publicClient:i,onClose:n,network:s=ii.MAINNET,onConnectWallet:a,onCreatePlayer:o,wagmiConfig:l,walletHooks:u,constants:c})=>{const[h,d]=V.useState(!1),[p,f]=V.useState(!1),[m,y]=V.useState(!1),{PLAYER_TRIPLE_TYPES:v}=c,{loading:g,triples:_}=pT(e||"",v.PLAYER_GAME.predicateId,v.PLAYER_GAME.objectId,s,c),x=_.length>0;V.useEffect(()=>{y(!!(e&&e!==""))},[e]),V.useEffect(()=>{f(!!(m&&!x&&!g))},[m,x,g]);const{voteItems:b,isLoading:T,totalUnits:E,numberOfTransactions:M,handleChangeUnits:C,resetAllVotes:S,isVoteDirectionAllowed:w}=Ioe({network:s,walletAddress:e,onError:z=>{D({status:"error",message:z})},constants:c}),{submitVotes:R,isSubmitting:O,isDepositLoading:P,transactionStatus:A,setTransactionStatus:D}=Noe({walletConnected:r,walletAddress:e,publicClient:i,network:s,onSuccess:S}),L=async()=>{await R(b)},W=()=>{f(!1),d(!0),o&&o()},G=()=>{d(!1)},Y=()=>{f(!1),n&&n()},{isCorrectNetwork:F,currentChainId:B,targetChainId:q,allowedChainIds:H}=Bw({walletConnected:r,publicClient:i});return m?m&&!x&&!g?I.jsxs("div",{style:{backgroundColor:"rgba(0, 0, 0, 0.85)",minHeight:"100%",color:"#fff",padding:"15px",border:"1px solid rgb(105, 105, 105)",borderRadius:"8px",maxWidth:"100%",margin:"0 auto",position:"relative",boxShadow:"0 4px 15px rgba(0, 0, 0, 0.3)"},children:[I.jsx(Roe,{isOpen:!0,onCreatePlayer:W,onClose:Y}),I.jsx(wy,{isOpen:h,onClose:G,walletConnected:r,walletAddress:e,wagmiConfig:l,walletHooks:u,constants:c})]}):I.jsxs("div",{style:{backgroundColor:"rgba(0, 0, 0, 0.85)",minHeight:"100%",opacity:"0.9",color:"#fff",padding:"15px",border:"1px solid rgb(105, 105, 105)",borderRadius:"8px",maxWidth:"100%",margin:"0 auto",position:"relative",boxShadow:"0 4px 15px rgba(0, 0, 0, 0.3)"},children:[I.jsx(Loe,{onClose:n}),I.jsx(Doe,{numberOfTransactions:M,totalUnits:E,onResetAll:S}),I.jsx(Uoe,{isLoading:T||g,voteItems:b,onChangeUnits:C,isVoteDirectionAllowed:w,walletAddress:e,network:s,constants:c}),I.jsx(Foe,{onSubmit:L,isSubmitting:O,isDepositLoading:P,totalUnits:E,numberOfTransactions:M}),I.jsx(Boe,{transactionStatus:A}),!F&&I.jsx(zw,{allowedChainIds:H,currentChainId:B,targetChainId:q})]}):I.jsx("div",{style:{backgroundColor:"rgba(0, 0, 0, 0.85)",minHeight:"100%",opacity:"0.9",color:"#fff",padding:"15px",border:"1px solid rgb(105, 105, 105)",borderRadius:"8px",maxWidth:"100%",margin:"0 auto",position:"relative",boxShadow:"0 4px 15px rgba(0, 0, 0, 0.3)"},children:I.jsx(oO,{isOpen:!0,onConnectWallet:a||(()=>{})})})},cO=({walletConnected:r,walletAddress:e,publicClient:i,onClose:n,constants:s,wagmiConfig:a})=>(V.useEffect(()=>(document.body.style.overflow="hidden",()=>{document.body.style.overflow="auto"}),[]),I.jsx("div",{className:"flex items-center justify-center height-700px",style:{backgroundColor:"rgba(0, 0, 0, 0.5)",zIndex:1e3,position:"absolute",top:"15%",left:"25%",right:"25%",bottom:"15%"},children:I.jsx("div",{style:{backgroundColor:"#18181b",borderRadius:"12px",boxShadow:"0 25px 50px -12px rgba(0, 0, 0, 0.25)",maxWidth:"1000px",width:"100%",maxHeight:"700px",height:"700px",display:"flex",flexDirection:"column",overflow:"hidden",opacity:.85},children:I.jsx("div",{style:{flex:1,overflow:"auto",padding:"0"},children:I.jsx(uO,{walletConnected:r,walletAddress:e,publicClient:i,onClose:n,network:ii.MAINNET,wagmiConfig:a,constants:s})})})})),hO=new qae({defaultOptions:{queries:{retry:1,refetchOnWindowFocus:!1}}});V.createContext({queryClient:hO});const zoe=({children:r})=>I.jsx(Yae,{client:hO,children:r}),joe=r=>V.useMemo(()=>r!=null&&r.constants?{...r.constants,UNIT_VALUE:Xg}:{...ioe,UNIT_VALUE:Xg},[r==null?void 0:r.constants]),Voe="https://testnet.intuition.sh/v1/graphql";function Goe(){$ae({apiUrl:Voe})}const Hoe=({walletConnected:r=!1,walletAddress:e="",wagmiConfig:i,walletHooks:n,onClose:s,onCreatePlayer:a,onConnectWallet:o,config:l})=>{V.useEffect(()=>{Goe()},[]);const u=joe(l),[c,h]=V.useState(ii.MAINNET),[d,p]=V.useState(!1),[f,m]=V.useState(!1),[y,v]=V.useState(!1),[g,_]=V.useState([]),[x,b]=V.useState(!1),[T,E]=V.useState(null),M=V.useRef(0),C=V.useRef(0),S=V.useRef(!1),w=e||"";V.useEffect(()=>{v(!!(e&&e!==""))},[e]);const{loading:R,error:O,triples:P}=pT(w,u.PLAYER_TRIPLE_TYPES.PLAYER_GAME.predicateId,u.PLAYER_TRIPLE_TYPES.PLAYER_GAME.objectId,c),A=V.useMemo(()=>!P||P.length===0?[]:[...P],[P]),D=V.useMemo(()=>!A||A.length===0?"":A.filter(Z=>Z.predicate_id===u.PLAYER_TRIPLE_TYPES.PLAYER_GAME.predicateId&&Z.object_id===u.PLAYER_TRIPLE_TYPES.PLAYER_GAME.objectId).map(Z=>Z.term_id).sort().join(","),[A,u.PLAYER_TRIPLE_TYPES.PLAYER_GAME.predicateId,u.PLAYER_TRIPLE_TYPES.PLAYER_GAME.objectId]);V.useEffect(()=>{(async()=>{var fe,_e,Re,nt;if(!y||!e){_([]),E(null);return}if(S.current)return;const Z=Date.now();if(Z-C.current<3e4){console.warn("[GraphComponent] Skip fetch: Too many requests recently (429 error)");return}if(R||O)return;if(!A||A.length===0){_([]);return}if(Z-M.current<1e3){console.warn("[GraphComponent] Skip fetch: Too frequent requests");return}M.current=Z,S.current=!0,b(!0),E(null);try{const gt=A.filter(Be=>Be.predicate_id===u.PLAYER_TRIPLE_TYPES.PLAYER_GAME.predicateId&&Be.object_id===u.PLAYER_TRIPLE_TYPES.PLAYER_GAME.objectId).map(Be=>Be.term_id);if(gt.length===0){_([]);return}const $=Cr[c],$e=await(await fetch($,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:`
5858
5858
  query GetPlayerPositions($accountId: String!, $termIds: [String!]!) {
5859
5859
  positions(where: {
5860
5860
  account_id: { _eq: $accountId },
@@ -5919,51 +5919,51 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
5919
5919
  }
5920
5920
  }
5921
5921
  }
5922
- `,variables:{accountId:e,termIds:gt}})})).json();if($e.errors)throw console.error("[GraphComponent] GraphQL errors:",$e.errors),new Error(((fe=$e.errors[0])==null?void 0:fe.message)||"GraphQL error");const xt=((_e=$e.data)==null?void 0:_e.positions)||[];_(xt)}catch(ge){console.error("Error fetching positions:",ge),((Re=ge==null?void 0:ge.message)!=null&&Re.includes("429")||(ge==null?void 0:ge.status)===429||((nt=ge==null?void 0:ge.response)==null?void 0:nt.status)===429)&&(C.current=Date.now(),console.warn("[GraphComponent] Rate limit hit (429), will retry after 30 seconds")),E(ge)}finally{S.current=!1,b(!1)}})()},[y,e,c,D,R,O]);const L=A.length>0,W=g.length>0,G=L&&W,Y=R||x,F=O,B=V.useCallback(()=>{a&&a(),p(!0)},[a]),q=V.useCallback(()=>{p(!1),s&&s()},[s]),H=V.useCallback(()=>{o&&o()},[o]);return F?I.jsxs("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%",flexDirection:"column",gap:"20px"},children:[I.jsx("h2",{style:{color:"red",textAlign:"center"},children:"Erreur lors du chargement des données"}),I.jsx("p",{style:{textAlign:"center",color:"#666"},children:F.message||"Une erreur inattendue s'est produite"}),I.jsx("button",{onClick:()=>window.location.reload(),style:{padding:"10px 20px",backgroundColor:"#FFD32A",color:"#000",border:"none",borderRadius:"5px",cursor:"pointer"},children:"Recharger la page"})]}):Y?I.jsxs("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%",flexDirection:"column",gap:"20px"},children:[I.jsx("div",{style:{width:"50px",height:"50px",border:"4px solid #FFD32A",borderTop:"4px solid transparent",borderRadius:"50%",animation:"spin 1s linear infinite"}}),I.jsx("p",{style:{textAlign:"center",color:"#666"},children:"Chargement des données du joueur..."})]}):I.jsx(zoe,{children:I.jsxs("div",{style:{position:"relative",width:"100%",height:"100%"},children:[I.jsx(oO,{isOpen:!y,onConnectWallet:H}),(!y||y&&!G)&&I.jsx("div",{style:{filter:y?"none":"blur(3px)",opacity:y?1:.7,position:"relative"},children:I.jsx(iy,{walletConnected:y,walletAddress:e,wagmiConfig:i,walletHooks:n,onCreatePlayer:B})}),y&&G&&I.jsx(aO,{walletAddress:e,walletConnected:r,walletHooks:n,onOpenVoting:()=>m(!0),constants:u,gamesId:u.COMMON_IDS.GAMES_ID,wagmiConfig:i}),I.jsx(wy,{isOpen:d,onClose:q,walletConnected:r,walletAddress:e,wagmiConfig:i,walletHooks:n,constants:u}),f&&y&&G&&I.jsx(cO,{walletConnected:r,walletAddress:e,publicClient:i==null?void 0:i.publicClient,wagmiConfig:i,onClose:()=>m(!1),constants:u})]})})},Woe=({walletAddress:r,tripleId:e,network:i=ri.MAINNET})=>{const[n,s]=V.useState(!1),[a,o]=V.useState(null),[l,u]=V.useState(!0),[c,h]=V.useState(null),[d,p]=V.useState(0),[f,m]=V.useState(0);return V.useEffect(()=>{(async()=>{var v,g,_,x,b,T,E,M,C,S,w,R,O,P,A,D,L,W,G;if(!r||!e){u(!1);return}try{u(!0);const Y=Cr[i],F=await fetch(Y,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:`
5923
- query GetTripleUserPosition($tripleId: String!, $walletAddress: String!) {
5924
- # Get the triple with vault information
5925
- triple(term_id: $tripleId) {
5926
- term_id
5927
- subject {
5928
- label
5929
- }
5930
- predicate {
5931
- label
5932
- }
5933
- object {
5934
- label
5935
- }
5936
- term_id
5937
- counter_term_id
5938
-
5939
- # Get vault positions (user only)
5940
- term {
5941
- id
5942
- positions_aggregate(where: {account: {id: {_ilike: $walletAddress}}, shares: {_gt: 0}}) {
5943
- aggregate {
5944
- count
5945
- }
5946
- nodes {
5947
- id
5948
- }
5922
+ `,variables:{accountId:e,termIds:gt}})})).json();if($e.errors)throw console.error("[GraphComponent] GraphQL errors:",$e.errors),new Error(((fe=$e.errors[0])==null?void 0:fe.message)||"GraphQL error");const xt=((_e=$e.data)==null?void 0:_e.positions)||[];_(xt)}catch(ge){console.error("Error fetching positions:",ge),((Re=ge==null?void 0:ge.message)!=null&&Re.includes("429")||(ge==null?void 0:ge.status)===429||((nt=ge==null?void 0:ge.response)==null?void 0:nt.status)===429)&&(C.current=Date.now(),console.warn("[GraphComponent] Rate limit hit (429), will retry after 30 seconds")),E(ge)}finally{S.current=!1,b(!1)}})()},[y,e,c,D,R,O]);const L=A.length>0,W=g.length>0,G=L&&W,Y=R||x,F=O,B=V.useCallback(()=>{a&&a(),p(!0)},[a]),q=V.useCallback(()=>{p(!1),s&&s()},[s]),H=V.useCallback(()=>{o&&o()},[o]);return F?I.jsxs("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%",flexDirection:"column",gap:"20px"},children:[I.jsx("h2",{style:{color:"red",textAlign:"center"},children:"Erreur lors du chargement des données"}),I.jsx("p",{style:{textAlign:"center",color:"#666"},children:F.message||"Une erreur inattendue s'est produite"}),I.jsx("button",{onClick:()=>window.location.reload(),style:{padding:"10px 20px",backgroundColor:"#FFD32A",color:"#000",border:"none",borderRadius:"5px",cursor:"pointer"},children:"Recharger la page"})]}):Y?I.jsxs("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%",flexDirection:"column",gap:"20px"},children:[I.jsx("div",{style:{width:"50px",height:"50px",border:"4px solid #FFD32A",borderTop:"4px solid transparent",borderRadius:"50%",animation:"spin 1s linear infinite"}}),I.jsx("p",{style:{textAlign:"center",color:"#666"},children:"Chargement des données du joueur..."})]}):I.jsx(zoe,{children:I.jsxs("div",{style:{position:"relative",width:"100%",height:"100%"},children:[I.jsx(oO,{isOpen:!y,onConnectWallet:H}),(!y||y&&!G)&&I.jsx("div",{style:{filter:y?"none":"blur(3px)",opacity:y?1:.7,position:"relative"},children:I.jsx(iy,{walletConnected:y,walletAddress:e,wagmiConfig:i,walletHooks:n,onCreatePlayer:B})}),y&&G&&I.jsx(aO,{walletAddress:e,walletConnected:r,walletHooks:n,onOpenVoting:()=>m(!0),constants:u,gamesId:u.COMMON_IDS.GAMES_ID,wagmiConfig:i}),I.jsx(wy,{isOpen:d,onClose:q,walletConnected:r,walletAddress:e,wagmiConfig:i,walletHooks:n,constants:u}),f&&y&&G&&I.jsx(cO,{walletConnected:r,walletAddress:e,publicClient:i==null?void 0:i.publicClient,wagmiConfig:i,onClose:()=>m(!1),constants:u})]})})},Woe=({walletAddress:r,tripleId:e,network:i=ii.MAINNET})=>{const[n,s]=V.useState(!1),[a,o]=V.useState(null),[l,u]=V.useState(!0),[c,h]=V.useState(null),[d,p]=V.useState(0),[f,m]=V.useState(0);return V.useEffect(()=>{(async()=>{var v,g,_,x,b,T,E,M,C,S,w,R,O,P,A,D,L,W,G;if(!r||!e){u(!1);return}try{u(!0);const Y=Cr[i],F=await fetch(Y,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:`
5923
+ query GetTripleUserPosition($tripleId: String!, $walletAddress: String!) {
5924
+ # Get the triple with vault information
5925
+ triple(term_id: $tripleId) {
5926
+ term_id
5927
+ subject {
5928
+ label
5949
5929
  }
5950
- }
5951
-
5952
- # Get counter vault positions (user only)
5953
- counter_term {
5954
- id
5955
- positions_aggregate(where: {account: {id: {_ilike: $walletAddress}}, shares: {_gt: 0}}) {
5956
- aggregate {
5957
- count
5930
+ predicate {
5931
+ label
5932
+ }
5933
+ object {
5934
+ label
5935
+ }
5936
+ term_id
5937
+ counter_term_id
5938
+
5939
+ # Get vault positions (user only)
5940
+ term {
5941
+ id
5942
+ positions_aggregate(where: {account: {id: {_ilike: $walletAddress}}, shares: {_gt: 0}}) {
5943
+ aggregate {
5944
+ count
5945
+ }
5946
+ nodes {
5947
+ id
5948
+ }
5958
5949
  }
5959
- nodes {
5960
- id
5950
+ }
5951
+
5952
+ # Get counter vault positions (user only)
5953
+ counter_term {
5954
+ id
5955
+ positions_aggregate(where: {account: {id: {_ilike: $walletAddress}}, shares: {_gt: 0}}) {
5956
+ aggregate {
5957
+ count
5958
+ }
5959
+ nodes {
5960
+ id
5961
+ }
5961
5962
  }
5962
5963
  }
5963
5964
  }
5964
5965
  }
5965
- }
5966
- `,variables:{tripleId:String(e),walletAddress:r.toLowerCase()}})});if(!F.ok)throw new Error(`GraphQL request failed with status ${F.status}`);const B=await F.json();if(B.errors)throw console.error("GraphQL errors:",B.errors),new Error(`GraphQL errors: ${JSON.stringify(B.errors)}`);const q=(v=B.data)==null?void 0:v.triple;if(!q){s(!1),o(null),u(!1);return}const H=((x=(_=(g=q.term)==null?void 0:g.positions_aggregate)==null?void 0:_.aggregate)==null?void 0:x.count)>0||((E=(T=(b=q.term)==null?void 0:b.positions_aggregate)==null?void 0:T.nodes)==null?void 0:E.length)>0,z=((S=(C=(M=q.counter_term)==null?void 0:M.positions_aggregate)==null?void 0:C.aggregate)==null?void 0:S.count)>0||((O=(R=(w=q.counter_term)==null?void 0:w.positions_aggregate)==null?void 0:R.nodes)==null?void 0:O.length)>0;p(((D=(A=(P=q.term)==null?void 0:P.positions_aggregate)==null?void 0:A.aggregate)==null?void 0:D.count)||0),m(((G=(W=(L=q.counter_term)==null?void 0:L.positions_aggregate)==null?void 0:W.aggregate)==null?void 0:G.count)||0);const Z=H||z;s(Z),Z&&o(H),u(!1)}catch(Y){console.error("Error checking triple position:",Y),h(Y),u(!1)}})()},[r,e,i]),{hasPosition:n,isFor:a,loading:l,error:c,termPositionCount:d,counterTermPositionCount:f}},qoe=r=>{const[e,i]=V.useState(null),[n,s]=V.useState(!0),[a,o]=V.useState(null);return V.useEffect(()=>{(async()=>{if(!r){s(!1);return}try{s(!0);const h=await(await fetch(Cr[ri.MAINNET],{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:`
5966
+ `,variables:{tripleId:String(e),walletAddress:r.toLowerCase()}})});if(!F.ok)throw new Error(`GraphQL request failed with status ${F.status}`);const B=await F.json();if(B.errors)throw console.error("GraphQL errors:",B.errors),new Error(`GraphQL errors: ${JSON.stringify(B.errors)}`);const q=(v=B.data)==null?void 0:v.triple;if(!q){s(!1),o(null),u(!1);return}const H=((x=(_=(g=q.term)==null?void 0:g.positions_aggregate)==null?void 0:_.aggregate)==null?void 0:x.count)>0||((E=(T=(b=q.term)==null?void 0:b.positions_aggregate)==null?void 0:T.nodes)==null?void 0:E.length)>0,z=((S=(C=(M=q.counter_term)==null?void 0:M.positions_aggregate)==null?void 0:C.aggregate)==null?void 0:S.count)>0||((O=(R=(w=q.counter_term)==null?void 0:w.positions_aggregate)==null?void 0:R.nodes)==null?void 0:O.length)>0;p(((D=(A=(P=q.term)==null?void 0:P.positions_aggregate)==null?void 0:A.aggregate)==null?void 0:D.count)||0),m(((G=(W=(L=q.counter_term)==null?void 0:L.positions_aggregate)==null?void 0:W.aggregate)==null?void 0:G.count)||0);const Z=H||z;s(Z),Z&&o(H),u(!1)}catch(Y){console.error("Error checking triple position:",Y),h(Y),u(!1)}})()},[r,e,i]),{hasPosition:n,isFor:a,loading:l,error:c,termPositionCount:d,counterTermPositionCount:f}},qoe=r=>{const[e,i]=V.useState(null),[n,s]=V.useState(!0),[a,o]=V.useState(null);return V.useEffect(()=>{(async()=>{if(!r){s(!1);return}try{s(!0);const h=await(await fetch(Cr[ii.MAINNET],{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:`
5967
5967
  query GetTriplesWithPositions($accountId: String!) {
5968
5968
  triples {
5969
5969
  term_id
@@ -6000,7 +6000,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
6000
6000
  }
6001
6001
  }
6002
6002
  }
6003
- `,variables:{accountId:r}})})).json();if(h.errors)throw console.error("GraphQL Errors:",h.errors),new Error(h.errors[0].message);const d={triples:h.data.triples,positions:h.data.triples.flatMap(p=>{var f,m;return[...p.positions||[],...((f=p.term)==null?void 0:f.positions)||[],...((m=p.counter_term)==null?void 0:m.positions)||[]]})};i(d),s(!1)}catch(u){console.error("Erreur lors de la récupération des triples:",u),o(u),s(!1)}})()},[r]),{data:e,loading:n,error:a}},Xoe=async(r,e,i=ri.MAINNET)=>{var n,s,a,o,l,u,c,h,d,p,f,m,y;if(!r)throw new Error("Wallet address is required");try{const v=Cr[i],g=await fetch(v,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:`
6003
+ `,variables:{accountId:r}})})).json();if(h.errors)throw console.error("GraphQL Errors:",h.errors),new Error(h.errors[0].message);const d={triples:h.data.triples,positions:h.data.triples.flatMap(p=>{var f,m;return[...p.positions||[],...((f=p.term)==null?void 0:f.positions)||[],...((m=p.counter_term)==null?void 0:m.positions)||[]]})};i(d),s(!1)}catch(u){console.error("Erreur lors de la récupération des triples:",u),o(u),s(!1)}})()},[r]),{data:e,loading:n,error:a}},Xoe=async(r,e,i=ii.MAINNET)=>{var n,s,a,o,l,u,c,h,d,p,f,m,y;if(!r)throw new Error("Wallet address is required");try{const v=Cr[i],g=await fetch(v,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:`
6004
6004
  query GetTripleUserPosition($tripleId: numeric!, $walletAddress: String!) {
6005
6005
  # Get the triple with vault information
6006
6006
  triple(term_id: $tripleId) {