tokentracker-cli 1.3.6 → 1.3.8

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.
Files changed (126) hide show
  1. package/THIRD_PARTY_NOTICES.md +39 -0
  2. package/dashboard/dist/THIRD_PARTY_NOTICES.txt +39 -0
  3. package/dashboard/dist/assets/{AchievementBadge-CHDt55IP.js → AchievementBadge-BqLeP5y3.js} +1 -1
  4. package/dashboard/dist/assets/{AchievementsPage-DpbRHmb8.js → AchievementsPage-BwVkM45R.js} +2 -2
  5. package/dashboard/dist/assets/{AchievementsSection-Ck5CiX4P.js → AchievementsSection-CglgOcQ1.js} +1 -1
  6. package/dashboard/dist/assets/{BadgeDetailModal-BVPqlh0X.js → BadgeDetailModal-IurF0cmo.js} +1 -1
  7. package/dashboard/dist/assets/BotAnimated-C4_NxPuy.js +1 -0
  8. package/dashboard/dist/assets/{Card-C9FjyAwh.js → Card-C-UuIN42.js} +1 -1
  9. package/dashboard/dist/assets/{CloudCheckoutPage-ChkjId9l.js → CloudCheckoutPage-CrMDquLi.js} +1 -1
  10. package/dashboard/dist/assets/CloudPage-D6xTPnMs.js +2 -0
  11. package/dashboard/dist/assets/{CommandPalette-DFnEeZzc.js → CommandPalette-8LFLY-LQ.js} +1 -1
  12. package/dashboard/dist/assets/{CommunityStatsModal-CZDS8gPA.js → CommunityStatsModal-DYTjxABN.js} +1 -1
  13. package/dashboard/dist/assets/{ConfirmModal-DRhgBoGE.js → ConfirmModal-St89kP59.js} +1 -1
  14. package/dashboard/dist/assets/{Controls-BmT6-x_L.js → Controls-BJAwM2gB.js} +1 -1
  15. package/dashboard/dist/assets/DashboardPage-BvGqFvP7.js +1 -0
  16. package/dashboard/dist/assets/{DateRangePopover-DuqNLatr.js → DateRangePopover-Cbd1idiF.js} +1 -1
  17. package/dashboard/dist/assets/{DevicePage-BtI0bWyg.js → DevicePage-BcSU0xgf.js} +1 -1
  18. package/dashboard/dist/assets/{DialogClose-DjnC3P4V.js → DialogClose-Cb1-Hd8P.js} +1 -1
  19. package/dashboard/dist/assets/DialogDescription-DQvYzWMp.js +1 -0
  20. package/dashboard/dist/assets/{DialogTitle-B9NNSz5p.js → DialogTitle-VXrHY7H0.js} +1 -1
  21. package/dashboard/dist/assets/ElectricLogo-D0wiAojj.css +1 -0
  22. package/dashboard/dist/assets/ElectricLogo-DmQqYnSD.js +282 -0
  23. package/dashboard/dist/assets/{FadeIn-fsVQmJGa.js → FadeIn-BEieTXMD.js} +1 -1
  24. package/dashboard/dist/assets/{HeaderGithubStar-Cg-f1iZc.js → HeaderGithubStar-BlYC_PSb.js} +1 -1
  25. package/dashboard/dist/assets/{HoverTooltip-DRIRlzXH.js → HoverTooltip-C5Pe7iBz.js} +1 -1
  26. package/dashboard/dist/assets/{IpCheckPage-DaAubaJQ.js → IpCheckPage-Diln3EdG.js} +1 -1
  27. package/dashboard/dist/assets/{LandingPage-DjBGIjHk.js → LandingPage-BzGYuAO7.js} +2 -2
  28. package/dashboard/dist/assets/{LeaderboardPage-BkCXqhz7.js → LeaderboardPage-Bn-ehU5S.js} +2 -2
  29. package/dashboard/dist/assets/{LeaderboardProBadge-Ds-wiWcN.js → LeaderboardProBadge-SovdGwYs.js} +1 -1
  30. package/dashboard/dist/assets/{LeaderboardProfileModal-X_rfSQT5.js → LeaderboardProfileModal-BhxmTcHh.js} +3 -3
  31. package/dashboard/dist/assets/{LeaderboardProfilePage-rpl1Ozwj.js → LeaderboardProfilePage-3iAYvoTb.js} +1 -1
  32. package/dashboard/dist/assets/{LimitsPage-BUvDBmgD.js → LimitsPage-DHxFAdqK.js} +1 -1
  33. package/dashboard/dist/assets/{LocalOnlyNotice-LBH1DBrs.js → LocalOnlyNotice-HlGfiiI3.js} +1 -1
  34. package/dashboard/dist/assets/{LoginCard-B0vRJEcg.js → LoginCard-CamUYmiF.js} +1 -1
  35. package/dashboard/dist/assets/{LoginModal-DdzgP43f.js → LoginModal-CcmYUJ45.js} +1 -1
  36. package/dashboard/dist/assets/{LoginPage-B4VCQxzn.js → LoginPage-DMNNmZwr.js} +1 -1
  37. package/dashboard/dist/assets/PetPage-D6xFX8QA.js +2 -0
  38. package/dashboard/dist/assets/PopoverPopup-CKKgItAT.js +1 -0
  39. package/dashboard/dist/assets/{ProviderIcon-ClHXNkQ0.js → ProviderIcon-B-uS3pJ3.js} +1 -1
  40. package/dashboard/dist/assets/{ResetPasswordPage-BeUpNt_6.js → ResetPasswordPage-DX4RJjX0.js} +1 -1
  41. package/dashboard/dist/assets/{Select-BHEXdYHu.js → Select-Dcg7FYAt.js} +1 -1
  42. package/dashboard/dist/assets/{SelectItemText-aaQK_QIt.js → SelectItemText-4vuj6xMs.js} +1 -1
  43. package/dashboard/dist/assets/{SelfHostPage-ClNhKnlP.js → SelfHostPage-ButVBgE7.js} +1 -1
  44. package/dashboard/dist/assets/{ServiceStatusPage-Byd_s6FS.js → ServiceStatusPage-DJDDO6lV.js} +1 -1
  45. package/dashboard/dist/assets/{SessionsPage-u3_b4PO7.js → SessionsPage-CiUirFMD.js} +1 -1
  46. package/dashboard/dist/assets/SettingsPage-CB4CML8u.js +5 -0
  47. package/dashboard/dist/assets/{SkillsPage-Bb-PVfux.js → SkillsPage-D2tfFFY8.js} +1 -1
  48. package/dashboard/dist/assets/{TokenGalaxy-CubA3PXu.js → TokenGalaxy-TQ-eWK8P.js} +1 -1
  49. package/dashboard/dist/assets/TooltipPopup-BhSCJqFR.js +1 -0
  50. package/dashboard/dist/assets/{TrendMonitor-as8idaOy.js → TrendMonitor-CP6ZZ53c.js} +1 -1
  51. package/dashboard/dist/assets/{WidgetsPage-DDPR4v0R.js → WidgetsPage-BdeR7P8D.js} +1 -1
  52. package/dashboard/dist/assets/{WrappedPage-zZzgYz6s.js → WrappedPage-OqcqupRE.js} +1 -1
  53. package/dashboard/dist/assets/__vite-browser-external-BXwSXUpN.js +45 -0
  54. package/dashboard/dist/assets/__vite-browser-external-DvNSoTb8.css +1 -0
  55. package/dashboard/dist/assets/{agent-logos-CoNhCm9-.js → agent-logos-E6GfkcgD.js} +1 -1
  56. package/dashboard/dist/assets/{arrow-left-C5hDp7fc.js → arrow-left-D_ufthLH.js} +1 -1
  57. package/dashboard/dist/assets/{arrow-right-DEvMmSiA.js → arrow-right-CgV_OrFz.js} +1 -1
  58. package/dashboard/dist/assets/{arrow-up-right-DxY0neJ4.js → arrow-up-right-CzeEeXRz.js} +1 -1
  59. package/dashboard/dist/assets/{calendar-days-bzh7-lab.js → calendar-days-BQdTF7ec.js} +1 -1
  60. package/dashboard/dist/assets/{check-CSZvcC3X.js → check-C--D8Lze.js} +1 -1
  61. package/dashboard/dist/assets/{chevron-down-CsiGcG0G.js → chevron-down-BzkceD4z.js} +1 -1
  62. package/dashboard/dist/assets/{cloud-checkout-z_eDVwm6.js → cloud-checkout-m1Yllbij.js} +1 -1
  63. package/dashboard/dist/assets/{composite-Cq0CmNAv.js → composite-7DhFi6TA.js} +1 -1
  64. package/dashboard/dist/assets/{download-DqLpubIF.js → download-BSyGLtfW.js} +1 -1
  65. package/dashboard/dist/assets/{external-link-B8E8tbB3.js → external-link-KzFbueBT.js} +1 -1
  66. package/dashboard/dist/assets/{flame-CrJDlnro.js → flame-DlPM_oaj.js} +1 -1
  67. package/dashboard/dist/assets/{format-tokens-DPIGGOlt.js → format-tokens-BHBaWyA3.js} +1 -1
  68. package/dashboard/dist/assets/{gift-CCp4Hh50.js → gift-BhWBQnun.js} +1 -1
  69. package/dashboard/dist/assets/{host-mode-xzpMLcwP.js → host-mode--iIPGrkN.js} +1 -1
  70. package/dashboard/dist/assets/{icons-CbB9Y-eV.js → icons-COEaSBYi.js} +1 -1
  71. package/dashboard/dist/assets/{index-BiK5-tQp.js → index-Bo8CSxCq.js} +1 -1
  72. package/dashboard/dist/assets/{index-DX7nYrHb.js → index-CW6A_Ff_.js} +1 -1
  73. package/dashboard/dist/assets/{index-zuC7FU-t.js → index-Cf4HcmLp.js} +1 -1
  74. package/dashboard/dist/assets/{info-B3NKYwWG.js → info-D1gOdsM_.js} +1 -1
  75. package/dashboard/dist/assets/{link-2-BRc8d8M9.js → link-2-CXDnDOK4.js} +1 -1
  76. package/dashboard/dist/assets/{loader-circle-Cm5Nsgp-.js → loader-circle-DWeQPecG.js} +1 -1
  77. package/dashboard/dist/assets/{modifiers.esm-CYLYBECB.js → modifiers.esm-BljqMT7V.js} +1 -1
  78. package/dashboard/dist/assets/{monitor-smartphone--IZ4D84F.js → monitor-smartphone-DpkdtOjk.js} +1 -1
  79. package/dashboard/dist/assets/{play-CUrMOLtq.js → play-BlGNrekI.js} +1 -1
  80. package/dashboard/dist/assets/{plus-0hrCDl4r.js → plus-CpYVQ_t-.js} +1 -1
  81. package/dashboard/dist/assets/{provider-display-CNK0FN3Q.js → provider-display-D6Blvktj.js} +1 -1
  82. package/dashboard/dist/assets/{react-CCNSVHEA.js → react-BMJ2wuz1.js} +1 -1
  83. package/dashboard/dist/assets/{safePolygon-DsolkMUX.js → safePolygon-BFHXICk1.js} +1 -1
  84. package/dashboard/dist/assets/{search-DYmYb9xY.js → search-0NxXkytY.js} +1 -1
  85. package/dashboard/dist/assets/{server-CYcqzdSW.js → server-GHkrUKSI.js} +1 -1
  86. package/dashboard/dist/assets/{shield-check-5zABLIr6.js → shield-check-C16cbx1z.js} +1 -1
  87. package/dashboard/dist/assets/{skills-api-CD-ojBGj.js → skills-api-DAm1fFB4.js} +1 -1
  88. package/dashboard/dist/assets/{sortable.esm-BCn2Ms6R.js → sortable.esm-CkOax8h0.js} +1 -1
  89. package/dashboard/dist/assets/{store-B22kwLs0.js → store-DR444-5P.js} +1 -1
  90. package/dashboard/dist/assets/{terminal-CTv-oTU2.js → terminal-BpvNaIz9.js} +1 -1
  91. package/dashboard/dist/assets/{trash-C5MAh3GO.js → trash-DX8LwOmN.js} +1 -1
  92. package/dashboard/dist/assets/{use-community-stats-BrgrxUD2.js → use-community-stats-BFW4-DYG.js} +1 -1
  93. package/dashboard/dist/assets/{use-latest-request-guard-B1_rbvgH.js → use-latest-request-guard-Cpcl08EJ.js} +1 -1
  94. package/dashboard/dist/assets/{use-limits-display-prefs-BOk5f-HM.js → use-limits-display-prefs-BqixyeAa.js} +1 -1
  95. package/dashboard/dist/assets/{use-native-settings-B2gc_m9W.js → use-native-settings-BSx7lGEK.js} +1 -1
  96. package/dashboard/dist/assets/{use-ordered-list-N3sGpJ0u.js → use-ordered-list-UCjB0_zK.js} +1 -1
  97. package/dashboard/dist/assets/use-reduced-motion-C6zOHbfR.js +1 -0
  98. package/dashboard/dist/assets/use-session-efficiency-pref-BgOJaGEy.js +1 -0
  99. package/dashboard/dist/assets/{use-transform-BsaLmw46.js → use-transform-Y98QifnQ.js} +1 -1
  100. package/dashboard/dist/assets/{use-usage-limits-wL7v-S0r.js → use-usage-limits-DJGO-Kxv.js} +1 -1
  101. package/dashboard/dist/assets/{useCurrency-CbCnjf-N.js → useCurrency-DL458pqS.js} +1 -1
  102. package/dashboard/dist/assets/{usePositioner-MepYlL0A.js → usePositioner-DnCQwlVT.js} +1 -1
  103. package/dashboard/dist/assets/{useTokenFormat-Bq-rwuKa.js → useTokenFormat-CYLt9pgs.js} +1 -1
  104. package/dashboard/dist/assets/{zap-1ah5e11g.js → zap-BW6E_Jv3.js} +1 -1
  105. package/dashboard/dist/index.html +2 -2
  106. package/dashboard/dist/ip-check.html +2 -2
  107. package/dashboard/dist/leaderboard.html +2 -2
  108. package/dashboard/dist/share.html +2 -2
  109. package/dashboard/dist/token-tracker-bolt-outline.svg +3 -0
  110. package/dashboard/dist/token-tracker-bolt.svg +3 -0
  111. package/package.json +1 -1
  112. package/src/lib/pricing/seed-snapshot.json +1 -1
  113. package/dashboard/dist/assets/BotAnimated-CVsv6kxT.js +0 -1
  114. package/dashboard/dist/assets/CloudPage-D1nrt3MG.js +0 -1
  115. package/dashboard/dist/assets/CloudUsageExport-jXdoiD0e.js +0 -4
  116. package/dashboard/dist/assets/DashboardPage-DfwwXZBo.js +0 -1
  117. package/dashboard/dist/assets/DialogDescription-yy_QHg7O.js +0 -1
  118. package/dashboard/dist/assets/PetPage-Cmf6aXc9.js +0 -1
  119. package/dashboard/dist/assets/PopoverPopup-BzfELnIC.js +0 -1
  120. package/dashboard/dist/assets/SettingsPage-DweCAbsy.js +0 -2
  121. package/dashboard/dist/assets/TooltipPopup-DMliWhoK.js +0 -1
  122. package/dashboard/dist/assets/__vite-browser-external-DWN9Fb-H.js +0 -45
  123. package/dashboard/dist/assets/__vite-browser-external-LpFw4zXh.css +0 -1
  124. package/dashboard/dist/assets/skins-Mc0sI20C.js +0 -1
  125. package/dashboard/dist/assets/use-pet-settings-sWFXgR3m.js +0 -2
  126. package/dashboard/dist/assets/use-reduced-motion-C3MBYVqm.js +0 -1
@@ -1 +1 @@
1
- import{r as c,bi as N,J as I,cf as V,bN as K,j as C,bJ as L,bM as _,b7 as H,ba as J,b1 as W,bx as z,N as Y,bD as q,bC as G}from"./__vite-browser-external-DWN9Fb-H.js";import{y as Q,z as X,v as Z,w as $,x as ee,C as te,I as ne,o as oe,B as se,p as ae,f as re,P as ie,n as le,j as ue,k as ce,l as pe,m as de,u as ge}from"./composite-Cq0CmNAv.js";import{p as fe,c as me}from"./store-B22kwLs0.js";const F=c.createContext(void 0);function b(e){const t=c.useContext(F);if(!e&&t===void 0)throw new Error(N(27));return t}const we=c.forwardRef(function(t,o){const{render:a,className:d,style:l,forceRender:u=!1,...p}=t,s=b(),n=s.useState("open"),g=s.useState("nested"),S=s.useState("mounted"),m=s.useState("transitionStatus");return I("div",t,{state:{open:n,transitionStatus:m},ref:[s.context.backdropRef,o],stateAttributesMapping:Q,props:[{role:"presentation",hidden:!S,style:{userSelect:"none",WebkitUserSelect:"none"}},p],enabled:u||!g})}),B=c.createContext(void 0);function j(){const e=c.useContext(B);if(e===void 0)throw new Error(N(26));return e}const Se="--nested-dialogs",he="data-nested-dialog-open",A={...X,...V,nestedDialogOpen(e){return e?{[he]:""}:null}},ye=c.forwardRef(function(t,o){const{render:a,className:d,style:l,finalFocus:u,initialFocus:p,...s}=t,n=b(),g=n.useState("descriptionElementId"),S=n.useState("disablePointerDismissal"),m=n.useState("floatingRootContext"),h=n.useState("popupProps"),i=n.useState("modal"),f=n.useState("mounted"),P=n.useState("nested"),D=n.useState("nestedOpenDialogCount"),O=n.useState("open"),x=n.useState("openMethod"),r=n.useState("titleElementId"),R=n.useState("transitionStatus"),w=n.useState("role"),y=m.useState("floatingId");j(),K({open:O,ref:n.context.popupRef,onComplete(){O&&n.context.onOpenChangeComplete?.(!0)}});const E=p===void 0?Z(n.context.popupRef):p,k=D>0,v=n.useStateSetter("popupElement"),U=I("div",t,{state:{open:O,nested:P,transitionStatus:R,nestedDialogOpen:k},props:[h,{id:y,"aria-labelledby":r,"aria-describedby":g,role:w,...ee,hidden:!f,onKeyDown(T){te.has(T.key)&&T.stopPropagation()},style:{[Se]:D}},s],ref:[o,n.context.popupRef,v],stateAttributesMapping:A});return C.jsx($,{context:m,openInteractionType:x,disabled:!f,closeOnFocusOut:!S,initialFocus:E,returnFocus:u,modal:i!==!1,restoreFocus:"popup",children:U})}),ke=c.forwardRef(function(t,o){const{keepMounted:a=!1,...d}=t,l=b(),u=l.useState("mounted"),p=l.useState("modal"),s=l.useState("open");return u||a?C.jsx(B.Provider,{value:a,children:C.jsxs(L,{ref:o,...d,children:[u&&p===!0&&C.jsx(ne,{ref:l.context.internalBackdropRef,inert:_(!s)}),t.children]})}):null});function De({store:e,parentContext:t,isDrawer:o}){const a=e.useState("open"),d=e.useState("disablePointerDismissal"),l=e.useState("modal"),u=e.useState("popupElement"),p=e.useState("floatingRootContext"),[s,n]=c.useState(0),[g,S]=c.useState(0),m=s===0,h=oe(p,{outsidePressEvent(){return e.context.internalBackdropRef.current||e.context.backdropRef.current?"intentional":{mouse:l==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}},outsidePress(i){if(!e.context.outsidePressEnabledRef.current||"button"in i&&i.button!==0)return!1;if("touches"in i){if(i.type==="touchend"){if(i.changedTouches.length!==1||i.touches.length!==0)return!1}else if(i.touches.length!==1)return!1}const f=H(i);if(m&&!d){if(l){const P=e.context.internalBackdropRef.current,D=e.context.backdropRef.current;return P||D?P===f||D===f||J(f,u)&&!f?.hasAttribute("data-base-ui-portal"):!0}return!0}return!1},escapeKey:m});return se(a&&l===!0,u),e.useContextCallback("onNestedDialogOpen",(i,f)=>{n(i),S(f)}),W(()=>(t?.onNestedDialogOpen&&(a?t.onNestedDialogOpen(s+1,g+(o?1:0)):t.onNestedDialogOpen(0,0)),()=>{t?.onNestedDialogOpen&&a&&t.onNestedDialogOpen(0,0)}),[o,a,s,g,t]),ae(e,{activeTriggerProps:h.reference,inactiveTriggerProps:h.trigger,popupProps:h.floating,nestedOpenDialogCount:s,nestedOpenDrawerCount:g}),null}const Pe={...fe,modal:e=>e.modal,nested:e=>e.nested,nestedOpenDialogCount:e=>e.nestedOpenDialogCount,nestedOpenDrawerCount:e=>e.nestedOpenDrawerCount,disablePointerDismissal:e=>e.disablePointerDismissal,openMethod:e=>e.openMethod,descriptionElementId:e=>e.descriptionElementId,titleElementId:e=>e.titleElementId,viewportElement:e=>e.viewportElement,role:e=>e.role};class Ce extends z{constructor(t,o,a){const d=new ie,l=Oe(t,d,o,a);super(l,be(d),Pe)}setOpen=(t,o)=>{o.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},!t&&o.trigger==null&&this.state.activeTriggerId!=null&&(o.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(t,o),!o.isCanceled&&(this.state.floatingRootContext.dispatchOpenChange(t,o),this.update(re(this.state,t,o.trigger)))}}function Oe(e,t,o,a=!1){return{...me(t,o,a),modal:!0,disablePointerDismissal:!1,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:"dialog",...e}}function be(e){return{popupRef:c.createRef(),backdropRef:c.createRef(),internalBackdropRef:c.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:e,onOpenChange:void 0,onOpenChangeComplete:void 0}}function Re(e,t){const{children:o,open:a,defaultOpen:d=!1,onOpenChange:l,onOpenChangeComplete:u,disablePointerDismissal:p=!1,modal:s=!0,actionsRef:n,handle:g,triggerId:S,defaultTriggerId:m=null}=t,h=e==="drawer",i=s,f=p,P="dialog",D=b(!0),O=D!=null,x={modal:i,disablePointerDismissal:f,nested:O,role:P},r=le((v,M)=>new Ce({open:d,openProp:a,activeTriggerId:m,triggerIdProp:S,...x},v,M),!0);r.useControlledProp("openProp",a),r.useControlledProp("triggerIdProp",S),r.useSyncedValues(x),r.useContextCallback("onOpenChange",l),r.useContextCallback("onOpenChangeComplete",u);const R=r.useState("open"),w=r.useState("mounted"),y=r.useState("payload");ue(r,R),ce(r);const{forceUnmount:E}=pe(R,r);c.useImperativeHandle(n,()=>({unmount:E,close:()=>r.setOpen(!1,Y(q))}),[E,r]);const k=R||w;return C.jsxs(F.Provider,{value:r,children:[g&&C.jsx(de,{handle:g,store:r}),k&&C.jsx(De,{store:r,parentContext:D?.context,isDrawer:h}),typeof o=="function"?o({payload:y}):o]})}const ve=G(function(t){return Re("dialog",t)}),Me=c.forwardRef(function(t,o){const{render:a,className:d,style:l,children:u,...p}=t,s=j(),n=b(),g=n.useState("open"),S=n.useState("nested"),m=n.useState("transitionStatus"),h=n.useState("nestedOpenDialogCount"),i=n.useState("mounted"),f=n.useStateSetter("viewportElement"),P=h>0;return I("div",t,{enabled:s||i,state:{open:g,nested:S,transitionStatus:m,nestedDialogOpen:P},ref:[o,f],stateAttributesMapping:A,props:[{role:"presentation",hidden:!i,style:{pointerEvents:g?void 0:"none"},children:u},p]})}),Te=c.forwardRef(function(t,o){const{render:a,className:d,style:l,id:u,...p}=t,s=b(),n=ge(u);return s.useSyncedValueWithCleanup("titleElementId",n),I("h2",t,{ref:o,props:[{id:n},p]})});export{ve as D,ke as a,we as b,Me as c,ye as d,Te as e,b as u};
1
+ import{r as c,bm as N,K as I,c7 as V,bF as K,j as C,bB as L,bE as _,b7 as H,ba as W,b1 as z,bn as Y,N as q,bt as G,bs as J}from"./__vite-browser-external-BXwSXUpN.js";import{y as Q,z as X,v as Z,w as $,x as ee,C as te,I as ne,n as oe,B as se,o as ae,e as re,P as ie,m as le,h as ue,j as ce,k as de,l as pe,u as ge}from"./composite-7DhFi6TA.js";import{p as fe,c as me}from"./store-DR444-5P.js";const F=c.createContext(void 0);function b(e){const t=c.useContext(F);if(!e&&t===void 0)throw new Error(N(27));return t}const we=c.forwardRef(function(t,o){const{render:a,className:p,style:l,forceRender:u=!1,...d}=t,s=b(),n=s.useState("open"),g=s.useState("nested"),S=s.useState("mounted"),m=s.useState("transitionStatus");return I("div",t,{state:{open:n,transitionStatus:m},ref:[s.context.backdropRef,o],stateAttributesMapping:Q,props:[{role:"presentation",hidden:!S,style:{userSelect:"none",WebkitUserSelect:"none"}},d],enabled:u||!g})}),B=c.createContext(void 0);function j(){const e=c.useContext(B);if(e===void 0)throw new Error(N(26));return e}const Se="--nested-dialogs",he="data-nested-dialog-open",A={...X,...V,nestedDialogOpen(e){return e?{[he]:""}:null}},ye=c.forwardRef(function(t,o){const{render:a,className:p,style:l,finalFocus:u,initialFocus:d,...s}=t,n=b(),g=n.useState("descriptionElementId"),S=n.useState("disablePointerDismissal"),m=n.useState("floatingRootContext"),h=n.useState("popupProps"),i=n.useState("modal"),f=n.useState("mounted"),D=n.useState("nested"),P=n.useState("nestedOpenDialogCount"),O=n.useState("open"),E=n.useState("openMethod"),r=n.useState("titleElementId"),R=n.useState("transitionStatus"),w=n.useState("role"),y=m.useState("floatingId");j(),K({open:O,ref:n.context.popupRef,onComplete(){O&&n.context.onOpenChangeComplete?.(!0)}});const x=d===void 0?Z(n.context.popupRef):d,k=P>0,v=n.useStateSetter("popupElement"),U=I("div",t,{state:{open:O,nested:D,transitionStatus:R,nestedDialogOpen:k},props:[h,{id:y,"aria-labelledby":r,"aria-describedby":g,role:w,...ee,hidden:!f,onKeyDown(T){te.has(T.key)&&T.stopPropagation()},style:{[Se]:P}},s],ref:[o,n.context.popupRef,v],stateAttributesMapping:A});return C.jsx($,{context:m,openInteractionType:E,disabled:!f,closeOnFocusOut:!S,initialFocus:x,returnFocus:u,modal:i!==!1,restoreFocus:"popup",children:U})}),ke=c.forwardRef(function(t,o){const{keepMounted:a=!1,...p}=t,l=b(),u=l.useState("mounted"),d=l.useState("modal"),s=l.useState("open");return u||a?C.jsx(B.Provider,{value:a,children:C.jsxs(L,{ref:o,...p,children:[u&&d===!0&&C.jsx(ne,{ref:l.context.internalBackdropRef,inert:_(!s)}),t.children]})}):null});function Pe({store:e,parentContext:t,isDrawer:o}){const a=e.useState("open"),p=e.useState("disablePointerDismissal"),l=e.useState("modal"),u=e.useState("popupElement"),d=e.useState("floatingRootContext"),[s,n]=c.useState(0),[g,S]=c.useState(0),m=s===0,h=oe(d,{outsidePressEvent(){return e.context.internalBackdropRef.current||e.context.backdropRef.current?"intentional":{mouse:l==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}},outsidePress(i){if(!e.context.outsidePressEnabledRef.current||"button"in i&&i.button!==0)return!1;if("touches"in i){if(i.type==="touchend"){if(i.changedTouches.length!==1||i.touches.length!==0)return!1}else if(i.touches.length!==1)return!1}const f=H(i);if(m&&!p){if(l){const D=e.context.internalBackdropRef.current,P=e.context.backdropRef.current;return D||P?D===f||P===f||W(f,u)&&!f?.hasAttribute("data-base-ui-portal"):!0}return!0}return!1},escapeKey:m});return se(a&&l===!0,u),e.useContextCallback("onNestedDialogOpen",(i,f)=>{n(i),S(f)}),z(()=>(t?.onNestedDialogOpen&&(a?t.onNestedDialogOpen(s+1,g+(o?1:0)):t.onNestedDialogOpen(0,0)),()=>{t?.onNestedDialogOpen&&a&&t.onNestedDialogOpen(0,0)}),[o,a,s,g,t]),ae(e,{activeTriggerProps:h.reference,inactiveTriggerProps:h.trigger,popupProps:h.floating,nestedOpenDialogCount:s,nestedOpenDrawerCount:g}),null}const De={...fe,modal:e=>e.modal,nested:e=>e.nested,nestedOpenDialogCount:e=>e.nestedOpenDialogCount,nestedOpenDrawerCount:e=>e.nestedOpenDrawerCount,disablePointerDismissal:e=>e.disablePointerDismissal,openMethod:e=>e.openMethod,descriptionElementId:e=>e.descriptionElementId,titleElementId:e=>e.titleElementId,viewportElement:e=>e.viewportElement,role:e=>e.role};class Ce extends Y{constructor(t,o,a){const p=new ie,l=Oe(t,p,o,a);super(l,be(p),De)}setOpen=(t,o)=>{o.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},!t&&o.trigger==null&&this.state.activeTriggerId!=null&&(o.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(t,o),!o.isCanceled&&(this.state.floatingRootContext.dispatchOpenChange(t,o),this.update(re(this.state,t,o.trigger)))}}function Oe(e,t,o,a=!1){return{...me(t,o,a),modal:!0,disablePointerDismissal:!1,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:"dialog",...e}}function be(e){return{popupRef:c.createRef(),backdropRef:c.createRef(),internalBackdropRef:c.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:e,onOpenChange:void 0,onOpenChangeComplete:void 0}}function Re(e,t){const{children:o,open:a,defaultOpen:p=!1,onOpenChange:l,onOpenChangeComplete:u,disablePointerDismissal:d=!1,modal:s=!0,actionsRef:n,handle:g,triggerId:S,defaultTriggerId:m=null}=t,h=e==="drawer",i=s,f=d,D="dialog",P=b(!0),O=P!=null,E={modal:i,disablePointerDismissal:f,nested:O,role:D},r=le((v,M)=>new Ce({open:p,openProp:a,activeTriggerId:m,triggerIdProp:S,...E},v,M),!0);r.useControlledProp("openProp",a),r.useControlledProp("triggerIdProp",S),r.useSyncedValues(E),r.useContextCallback("onOpenChange",l),r.useContextCallback("onOpenChangeComplete",u);const R=r.useState("open"),w=r.useState("mounted"),y=r.useState("payload");ue(r,R),ce(r);const{forceUnmount:x}=de(R,r);c.useImperativeHandle(n,()=>({unmount:x,close:()=>r.setOpen(!1,q(G))}),[x,r]);const k=R||w;return C.jsxs(F.Provider,{value:r,children:[g&&C.jsx(pe,{handle:g,store:r}),k&&C.jsx(Pe,{store:r,parentContext:P?.context,isDrawer:h}),typeof o=="function"?o({payload:y}):o]})}const ve=J(function(t){return Re("dialog",t)}),Me=c.forwardRef(function(t,o){const{render:a,className:p,style:l,children:u,...d}=t,s=j(),n=b(),g=n.useState("open"),S=n.useState("nested"),m=n.useState("transitionStatus"),h=n.useState("nestedOpenDialogCount"),i=n.useState("mounted"),f=n.useStateSetter("viewportElement"),D=h>0;return I("div",t,{enabled:s||i,state:{open:g,nested:S,transitionStatus:m,nestedDialogOpen:D},ref:[o,f],stateAttributesMapping:A,props:[{role:"presentation",hidden:!i,style:{pointerEvents:g?void 0:"none"},children:u},d]})}),Te=c.forwardRef(function(t,o){const{render:a,className:p,style:l,id:u,...d}=t,s=b(),n=ge(u);return s.useSyncedValueWithCleanup("titleElementId",n),I("h2",t,{ref:o,props:[{id:n},d]})});export{ve as D,ke as a,we as b,Me as c,ye as d,Te as e,b as u};
@@ -0,0 +1 @@
1
+ .electric-logo{position:relative;width:100%;height:100%;overflow:hidden}.electric-logo canvas{opacity:0;transition:opacity .26s ease}.electric-logo[data-electric-state=ready] canvas{opacity:1}@media(prefers-reduced-motion:reduce){.electric-logo canvas{transition:none}}
@@ -0,0 +1,282 @@
1
+ import{r as at,j as Ce}from"./__vite-browser-external-BXwSXUpN.js";function pt(e){let t=e[0],i=e[1],s=e[2];return Math.sqrt(t*t+i*i+s*s)}function Pt(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function Le(e,t,i,s){return e[0]=t,e[1]=i,e[2]=s,e}function Zt(e,t,i){return e[0]=t[0]+i[0],e[1]=t[1]+i[1],e[2]=t[2]+i[2],e}function Qt(e,t,i){return e[0]=t[0]-i[0],e[1]=t[1]-i[1],e[2]=t[2]-i[2],e}function Ie(e,t,i){return e[0]=t[0]*i[0],e[1]=t[1]*i[1],e[2]=t[2]*i[2],e}function ke(e,t,i){return e[0]=t[0]/i[0],e[1]=t[1]/i[1],e[2]=t[2]/i[2],e}function Ct(e,t,i){return e[0]=t[0]*i,e[1]=t[1]*i,e[2]=t[2]*i,e}function Ue(e,t){let i=t[0]-e[0],s=t[1]-e[1],r=t[2]-e[2];return Math.sqrt(i*i+s*s+r*r)}function Pe(e,t){let i=t[0]-e[0],s=t[1]-e[1],r=t[2]-e[2];return i*i+s*s+r*r}function Kt(e){let t=e[0],i=e[1],s=e[2];return t*t+i*i+s*s}function Oe(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e}function De(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e}function Ot(e,t){let i=t[0],s=t[1],r=t[2],n=i*i+s*s+r*r;return n>0&&(n=1/Math.sqrt(n)),e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e}function Me(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function Jt(e,t,i){let s=t[0],r=t[1],n=t[2],h=i[0],a=i[1],l=i[2];return e[0]=r*l-n*a,e[1]=n*h-s*l,e[2]=s*a-r*h,e}function Be(e,t,i,s){let r=t[0],n=t[1],h=t[2];return e[0]=r+s*(i[0]-r),e[1]=n+s*(i[1]-n),e[2]=h+s*(i[2]-h),e}function Ne(e,t,i,s,r){const n=Math.exp(-s*r);let h=t[0],a=t[1],l=t[2];return e[0]=i[0]+(h-i[0])*n,e[1]=i[1]+(a-i[1])*n,e[2]=i[2]+(l-i[2])*n,e}function Ge(e,t,i){let s=t[0],r=t[1],n=t[2],h=i[3]*s+i[7]*r+i[11]*n+i[15];return h=h||1,e[0]=(i[0]*s+i[4]*r+i[8]*n+i[12])/h,e[1]=(i[1]*s+i[5]*r+i[9]*n+i[13])/h,e[2]=(i[2]*s+i[6]*r+i[10]*n+i[14])/h,e}function qe(e,t,i){let s=t[0],r=t[1],n=t[2],h=i[3]*s+i[7]*r+i[11]*n+i[15];return h=h||1,e[0]=(i[0]*s+i[4]*r+i[8]*n)/h,e[1]=(i[1]*s+i[5]*r+i[9]*n)/h,e[2]=(i[2]*s+i[6]*r+i[10]*n)/h,e}function Xe(e,t,i){let s=t[0],r=t[1],n=t[2];return e[0]=s*i[0]+r*i[3]+n*i[6],e[1]=s*i[1]+r*i[4]+n*i[7],e[2]=s*i[2]+r*i[5]+n*i[8],e}function je(e,t,i){let s=t[0],r=t[1],n=t[2],h=i[0],a=i[1],l=i[2],o=i[3],c=a*n-l*r,d=l*s-h*n,f=h*r-a*s,g=a*f-l*d,u=l*c-h*f,m=h*d-a*c,p=o*2;return c*=p,d*=p,f*=p,g*=2,u*=2,m*=2,e[0]=s+c+g,e[1]=r+d+u,e[2]=n+f+m,e}const $e=(function(){const e=[0,0,0],t=[0,0,0];return function(i,s){Pt(e,i),Pt(t,s),Ot(e,e),Ot(t,t);let r=Me(e,t);return r>1?0:r<-1?Math.PI:Math.acos(r)}})();function We(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}class K extends Array{constructor(t=0,i=t,s=t){return super(t,i,s),this}get x(){return this[0]}get y(){return this[1]}get z(){return this[2]}set x(t){this[0]=t}set y(t){this[1]=t}set z(t){this[2]=t}set(t,i=t,s=t){return t.length?this.copy(t):(Le(this,t,i,s),this)}copy(t){return Pt(this,t),this}add(t,i){return i?Zt(this,t,i):Zt(this,this,t),this}sub(t,i){return i?Qt(this,t,i):Qt(this,this,t),this}multiply(t){return t.length?Ie(this,this,t):Ct(this,this,t),this}divide(t){return t.length?ke(this,this,t):Ct(this,this,1/t),this}inverse(t=this){return De(this,t),this}len(){return pt(this)}distance(t){return t?Ue(this,t):pt(this)}squaredLen(){return Kt(this)}squaredDistance(t){return t?Pe(this,t):Kt(this)}negate(t=this){return Oe(this,t),this}cross(t,i){return i?Jt(this,t,i):Jt(this,this,t),this}scale(t){return Ct(this,this,t),this}normalize(){return Ot(this,this),this}dot(t){return Me(this,t)}equals(t){return We(this,t)}applyMatrix3(t){return Xe(this,this,t),this}applyMatrix4(t){return Ge(this,this,t),this}scaleRotateMatrix4(t){return qe(this,this,t),this}applyQuaternion(t){return je(this,this,t),this}angle(t){return $e(this,t)}lerp(t,i){return Be(this,this,t,i),this}smoothLerp(t,i,s){return Ne(this,this,t,i,s),this}clone(){return new K(this[0],this[1],this[2])}fromArray(t,i=0){return this[0]=t[i],this[1]=t[i+1],this[2]=t[i+2],this}toArray(t=[],i=0){return t[i]=this[0],t[i+1]=this[1],t[i+2]=this[2],t}transformDirection(t){const i=this[0],s=this[1],r=this[2];return this[0]=t[0]*i+t[4]*s+t[8]*r,this[1]=t[1]*i+t[5]*s+t[9]*r,this[2]=t[2]*i+t[6]*s+t[10]*r,this.normalize()}}const te=new K;let Ve=1,Ye=1,ee=!1;class He{constructor(t,i={}){t.canvas||console.error("gl not passed as first argument to Geometry"),this.gl=t,this.attributes=i,this.id=Ve++,this.VAOs={},this.drawRange={start:0,count:0},this.instancedCount=0,this.gl.renderer.bindVertexArray(null),this.gl.renderer.currentGeometry=null,this.glState=this.gl.renderer.state;for(let s in i)this.addAttribute(s,i[s])}addAttribute(t,i){if(this.attributes[t]=i,i.id=Ye++,i.size=i.size||1,i.type=i.type||(i.data.constructor===Float32Array?this.gl.FLOAT:i.data.constructor===Uint16Array?this.gl.UNSIGNED_SHORT:this.gl.UNSIGNED_INT),i.target=t==="index"?this.gl.ELEMENT_ARRAY_BUFFER:this.gl.ARRAY_BUFFER,i.normalized=i.normalized||!1,i.stride=i.stride||0,i.offset=i.offset||0,i.count=i.count||(i.stride?i.data.byteLength/i.stride:i.data.length/i.size),i.divisor=i.instanced||0,i.needsUpdate=!1,i.usage=i.usage||this.gl.STATIC_DRAW,i.buffer||this.updateAttribute(i),i.divisor){if(this.isInstanced=!0,this.instancedCount&&this.instancedCount!==i.count*i.divisor)return console.warn("geometry has multiple instanced buffers of different length"),this.instancedCount=Math.min(this.instancedCount,i.count*i.divisor);this.instancedCount=i.count*i.divisor}else t==="index"?this.drawRange.count=i.count:this.attributes.index||(this.drawRange.count=Math.max(this.drawRange.count,i.count))}updateAttribute(t){const i=!t.buffer;i&&(t.buffer=this.gl.createBuffer()),this.glState.boundBuffer!==t.buffer&&(this.gl.bindBuffer(t.target,t.buffer),this.glState.boundBuffer=t.buffer),i?this.gl.bufferData(t.target,t.data,t.usage):this.gl.bufferSubData(t.target,0,t.data),t.needsUpdate=!1}setIndex(t){this.addAttribute("index",t)}setDrawRange(t,i){this.drawRange.start=t,this.drawRange.count=i}setInstancedCount(t){this.instancedCount=t}createVAO(t){this.VAOs[t.attributeOrder]=this.gl.renderer.createVertexArray(),this.gl.renderer.bindVertexArray(this.VAOs[t.attributeOrder]),this.bindAttributes(t)}bindAttributes(t){t.attributeLocations.forEach((i,{name:s,type:r})=>{if(!this.attributes[s]){console.warn(`active attribute ${s} not being supplied`);return}const n=this.attributes[s];this.gl.bindBuffer(n.target,n.buffer),this.glState.boundBuffer=n.buffer;let h=1;r===35674&&(h=2),r===35675&&(h=3),r===35676&&(h=4);const a=n.size/h,l=h===1?0:h*h*4,o=h===1?0:h*4;for(let c=0;c<h;c++)this.gl.vertexAttribPointer(i+c,a,n.type,n.normalized,n.stride+l,n.offset+c*o),this.gl.enableVertexAttribArray(i+c),this.gl.renderer.vertexAttribDivisor(i+c,n.divisor)}),this.attributes.index&&this.gl.bindBuffer(this.gl.ELEMENT_ARRAY_BUFFER,this.attributes.index.buffer)}draw({program:t,mode:i=this.gl.TRIANGLES}){this.gl.renderer.currentGeometry!==`${this.id}_${t.attributeOrder}`&&(this.VAOs[t.attributeOrder]||this.createVAO(t),this.gl.renderer.bindVertexArray(this.VAOs[t.attributeOrder]),this.gl.renderer.currentGeometry=`${this.id}_${t.attributeOrder}`),t.attributeLocations.forEach((r,{name:n})=>{const h=this.attributes[n];h.needsUpdate&&this.updateAttribute(h)});let s=2;this.attributes.index?.type===this.gl.UNSIGNED_INT&&(s=4),this.isInstanced?this.attributes.index?this.gl.renderer.drawElementsInstanced(i,this.drawRange.count,this.attributes.index.type,this.attributes.index.offset+this.drawRange.start*s,this.instancedCount):this.gl.renderer.drawArraysInstanced(i,this.drawRange.start,this.drawRange.count,this.instancedCount):this.attributes.index?this.gl.drawElements(i,this.drawRange.count,this.attributes.index.type,this.attributes.index.offset+this.drawRange.start*s):this.gl.drawArrays(i,this.drawRange.start,this.drawRange.count)}getPosition(){const t=this.attributes.position;if(t.data)return t;if(!ee)return console.warn("No position buffer data found to compute bounds"),ee=!0}computeBoundingBox(t){t||(t=this.getPosition());const i=t.data,s=t.size;this.bounds||(this.bounds={min:new K,max:new K,center:new K,scale:new K,radius:1/0});const r=this.bounds.min,n=this.bounds.max,h=this.bounds.center,a=this.bounds.scale;r.set(1/0),n.set(-1/0);for(let l=0,o=i.length;l<o;l+=s){const c=i[l],d=i[l+1],f=i[l+2];r.x=Math.min(c,r.x),r.y=Math.min(d,r.y),r.z=Math.min(f,r.z),n.x=Math.max(c,n.x),n.y=Math.max(d,n.y),n.z=Math.max(f,n.z)}a.sub(n,r),h.add(r,n).divide(2)}computeBoundingSphere(t){t||(t=this.getPosition());const i=t.data,s=t.size;this.bounds||this.computeBoundingBox(t);let r=0;for(let n=0,h=i.length;n<h;n+=s)te.fromArray(i,n),r=Math.max(r,this.bounds.center.squaredDistance(te));this.bounds.radius=Math.sqrt(r)}remove(){for(let t in this.VAOs)this.gl.renderer.deleteVertexArray(this.VAOs[t]),delete this.VAOs[t];for(let t in this.attributes)this.gl.deleteBuffer(this.attributes[t].buffer),delete this.attributes[t]}}let Ze=1;const ie={};class Qe{constructor(t,{vertex:i,fragment:s,uniforms:r={},transparent:n=!1,cullFace:h=t.BACK,frontFace:a=t.CCW,depthTest:l=!0,depthWrite:o=!0,depthFunc:c=t.LEQUAL}={}){t.canvas||console.error("gl not passed as first argument to Program"),this.gl=t,this.uniforms=r,this.id=Ze++,i||console.warn("vertex shader not supplied"),s||console.warn("fragment shader not supplied"),this.transparent=n,this.cullFace=h,this.frontFace=a,this.depthTest=l,this.depthWrite=o,this.depthFunc=c,this.blendFunc={},this.blendEquation={},this.stencilFunc={},this.stencilOp={},this.transparent&&!this.blendFunc.src&&(this.gl.renderer.premultipliedAlpha?this.setBlendFunc(this.gl.ONE,this.gl.ONE_MINUS_SRC_ALPHA):this.setBlendFunc(this.gl.SRC_ALPHA,this.gl.ONE_MINUS_SRC_ALPHA)),this.vertexShader=t.createShader(t.VERTEX_SHADER),this.fragmentShader=t.createShader(t.FRAGMENT_SHADER),this.program=t.createProgram(),t.attachShader(this.program,this.vertexShader),t.attachShader(this.program,this.fragmentShader),this.setShaders({vertex:i,fragment:s})}setShaders({vertex:t,fragment:i}){if(t&&(this.gl.shaderSource(this.vertexShader,t),this.gl.compileShader(this.vertexShader),this.gl.getShaderInfoLog(this.vertexShader)!==""&&console.warn(`${this.gl.getShaderInfoLog(this.vertexShader)}
2
+ Vertex Shader
3
+ ${se(t)}`)),i&&(this.gl.shaderSource(this.fragmentShader,i),this.gl.compileShader(this.fragmentShader),this.gl.getShaderInfoLog(this.fragmentShader)!==""&&console.warn(`${this.gl.getShaderInfoLog(this.fragmentShader)}
4
+ Fragment Shader
5
+ ${se(i)}`)),this.gl.linkProgram(this.program),!this.gl.getProgramParameter(this.program,this.gl.LINK_STATUS))return console.warn(this.gl.getProgramInfoLog(this.program));this.uniformLocations=new Map;let s=this.gl.getProgramParameter(this.program,this.gl.ACTIVE_UNIFORMS);for(let h=0;h<s;h++){let a=this.gl.getActiveUniform(this.program,h);this.uniformLocations.set(a,this.gl.getUniformLocation(this.program,a.name));const l=a.name.match(/(\w+)/g);a.uniformName=l[0],a.nameComponents=l.slice(1)}this.attributeLocations=new Map;const r=[],n=this.gl.getProgramParameter(this.program,this.gl.ACTIVE_ATTRIBUTES);for(let h=0;h<n;h++){const a=this.gl.getActiveAttrib(this.program,h),l=this.gl.getAttribLocation(this.program,a.name);l!==-1&&(r[l]=a.name,this.attributeLocations.set(a,l))}this.attributeOrder=r.join("")}setBlendFunc(t,i,s,r){this.blendFunc.src=t,this.blendFunc.dst=i,this.blendFunc.srcAlpha=s,this.blendFunc.dstAlpha=r,t&&(this.transparent=!0)}setBlendEquation(t,i){this.blendEquation.modeRGB=t,this.blendEquation.modeAlpha=i}setStencilFunc(t,i,s){this.stencilRef=i,this.stencilFunc.func=t,this.stencilFunc.ref=i,this.stencilFunc.mask=s}setStencilOp(t,i,s){this.stencilOp.stencilFail=t,this.stencilOp.depthFail=i,this.stencilOp.depthPass=s}applyState(){this.depthTest?this.gl.renderer.enable(this.gl.DEPTH_TEST):this.gl.renderer.disable(this.gl.DEPTH_TEST),this.cullFace?this.gl.renderer.enable(this.gl.CULL_FACE):this.gl.renderer.disable(this.gl.CULL_FACE),this.blendFunc.src?this.gl.renderer.enable(this.gl.BLEND):this.gl.renderer.disable(this.gl.BLEND),this.cullFace&&this.gl.renderer.setCullFace(this.cullFace),this.gl.renderer.setFrontFace(this.frontFace),this.gl.renderer.setDepthMask(this.depthWrite),this.gl.renderer.setDepthFunc(this.depthFunc),this.blendFunc.src&&this.gl.renderer.setBlendFunc(this.blendFunc.src,this.blendFunc.dst,this.blendFunc.srcAlpha,this.blendFunc.dstAlpha),this.gl.renderer.setBlendEquation(this.blendEquation.modeRGB,this.blendEquation.modeAlpha),this.stencilFunc.func||this.stencilOp.stencilFail?this.gl.renderer.enable(this.gl.STENCIL_TEST):this.gl.renderer.disable(this.gl.STENCIL_TEST),this.gl.renderer.setStencilFunc(this.stencilFunc.func,this.stencilFunc.ref,this.stencilFunc.mask),this.gl.renderer.setStencilOp(this.stencilOp.stencilFail,this.stencilOp.depthFail,this.stencilOp.depthPass)}use({flipFaces:t=!1}={}){let i=-1;this.gl.renderer.state.currentProgram===this.id||(this.gl.useProgram(this.program),this.gl.renderer.state.currentProgram=this.id),this.uniformLocations.forEach((r,n)=>{let h=this.uniforms[n.uniformName];for(const a of n.nameComponents){if(!h)break;if(a in h)h=h[a];else{if(Array.isArray(h.value))break;h=void 0;break}}if(!h)return re(`Active uniform ${n.name} has not been supplied`);if(h&&h.value===void 0)return re(`${n.name} uniform is missing a value parameter`);if(h.value.texture)return i=i+1,h.value.update(i),Lt(this.gl,n.type,r,i);if(h.value.length&&h.value[0].texture){const a=[];return h.value.forEach(l=>{i=i+1,l.update(i),a.push(i)}),Lt(this.gl,n.type,r,a)}Lt(this.gl,n.type,r,h.value)}),this.applyState(),t&&this.gl.renderer.setFrontFace(this.frontFace===this.gl.CCW?this.gl.CW:this.gl.CCW)}remove(){this.gl.deleteProgram(this.program)}}function Lt(e,t,i,s){s=s.length?Ke(s):s;const r=e.renderer.state.uniformLocations.get(i);if(s.length)if(r===void 0||r.length!==s.length)e.renderer.state.uniformLocations.set(i,s.slice(0));else{if(Je(r,s))return;r.set?r.set(s):ti(r,s),e.renderer.state.uniformLocations.set(i,r)}else{if(r===s)return;e.renderer.state.uniformLocations.set(i,s)}switch(t){case 5126:return s.length?e.uniform1fv(i,s):e.uniform1f(i,s);case 35664:return e.uniform2fv(i,s);case 35665:return e.uniform3fv(i,s);case 35666:return e.uniform4fv(i,s);case 35670:case 5124:case 35678:case 36306:case 35680:case 36289:return s.length?e.uniform1iv(i,s):e.uniform1i(i,s);case 35671:case 35667:return e.uniform2iv(i,s);case 35672:case 35668:return e.uniform3iv(i,s);case 35673:case 35669:return e.uniform4iv(i,s);case 35674:return e.uniformMatrix2fv(i,!1,s);case 35675:return e.uniformMatrix3fv(i,!1,s);case 35676:return e.uniformMatrix4fv(i,!1,s)}}function se(e){let t=e.split(`
6
+ `);for(let i=0;i<t.length;i++)t[i]=i+1+": "+t[i];return t.join(`
7
+ `)}function Ke(e){const t=e.length,i=e[0].length;if(i===void 0)return e;const s=t*i;let r=ie[s];r||(ie[s]=r=new Float32Array(s));for(let n=0;n<t;n++)r.set(e[n],n*i);return r}function Je(e,t){if(e.length!==t.length)return!1;for(let i=0,s=e.length;i<s;i++)if(e[i]!==t[i])return!1;return!0}function ti(e,t){for(let i=0,s=e.length;i<s;i++)e[i]=t[i]}let It=0;function re(e){It>100||(console.warn(e),It++,It>100&&console.warn("More than 100 program warnings - stopping logs."))}const kt=new K;let ei=1;class ii{constructor({canvas:t=document.createElement("canvas"),width:i=300,height:s=150,dpr:r=1,alpha:n=!1,depth:h=!0,stencil:a=!1,antialias:l=!1,premultipliedAlpha:o=!1,preserveDrawingBuffer:c=!1,powerPreference:d="default",autoClear:f=!0,webgl:g=2}={}){const u={alpha:n,depth:h,stencil:a,antialias:l,premultipliedAlpha:o,preserveDrawingBuffer:c,powerPreference:d};this.dpr=r,this.alpha=n,this.color=!0,this.depth=h,this.stencil=a,this.premultipliedAlpha=o,this.autoClear=f,this.id=ei++,g===2&&(this.gl=t.getContext("webgl2",u)),this.isWebgl2=!!this.gl,this.gl||(this.gl=t.getContext("webgl",u)),this.gl||console.error("unable to create webgl context"),this.gl.renderer=this,this.setSize(i,s),this.state={},this.state.blendFunc={src:this.gl.ONE,dst:this.gl.ZERO},this.state.blendEquation={modeRGB:this.gl.FUNC_ADD},this.state.cullFace=!1,this.state.frontFace=this.gl.CCW,this.state.depthMask=!0,this.state.depthFunc=this.gl.LEQUAL,this.state.premultiplyAlpha=!1,this.state.flipY=!1,this.state.unpackAlignment=4,this.state.framebuffer=null,this.state.viewport={x:0,y:0,width:null,height:null},this.state.textureUnits=[],this.state.activeTextureUnit=0,this.state.boundBuffer=null,this.state.uniformLocations=new Map,this.state.currentProgram=null,this.extensions={},this.isWebgl2?(this.getExtension("EXT_color_buffer_float"),this.getExtension("OES_texture_float_linear")):(this.getExtension("OES_texture_float"),this.getExtension("OES_texture_float_linear"),this.getExtension("OES_texture_half_float"),this.getExtension("OES_texture_half_float_linear"),this.getExtension("OES_element_index_uint"),this.getExtension("OES_standard_derivatives"),this.getExtension("EXT_sRGB"),this.getExtension("WEBGL_depth_texture"),this.getExtension("WEBGL_draw_buffers")),this.getExtension("WEBGL_compressed_texture_astc"),this.getExtension("EXT_texture_compression_bptc"),this.getExtension("WEBGL_compressed_texture_s3tc"),this.getExtension("WEBGL_compressed_texture_etc1"),this.getExtension("WEBGL_compressed_texture_pvrtc"),this.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),this.vertexAttribDivisor=this.getExtension("ANGLE_instanced_arrays","vertexAttribDivisor","vertexAttribDivisorANGLE"),this.drawArraysInstanced=this.getExtension("ANGLE_instanced_arrays","drawArraysInstanced","drawArraysInstancedANGLE"),this.drawElementsInstanced=this.getExtension("ANGLE_instanced_arrays","drawElementsInstanced","drawElementsInstancedANGLE"),this.createVertexArray=this.getExtension("OES_vertex_array_object","createVertexArray","createVertexArrayOES"),this.bindVertexArray=this.getExtension("OES_vertex_array_object","bindVertexArray","bindVertexArrayOES"),this.deleteVertexArray=this.getExtension("OES_vertex_array_object","deleteVertexArray","deleteVertexArrayOES"),this.drawBuffers=this.getExtension("WEBGL_draw_buffers","drawBuffers","drawBuffersWEBGL"),this.parameters={},this.parameters.maxTextureUnits=this.gl.getParameter(this.gl.MAX_COMBINED_TEXTURE_IMAGE_UNITS),this.parameters.maxAnisotropy=this.getExtension("EXT_texture_filter_anisotropic")?this.gl.getParameter(this.getExtension("EXT_texture_filter_anisotropic").MAX_TEXTURE_MAX_ANISOTROPY_EXT):0}setSize(t,i){this.width=t,this.height=i,this.gl.canvas.width=t*this.dpr,this.gl.canvas.height=i*this.dpr,this.gl.canvas.style&&Object.assign(this.gl.canvas.style,{width:t+"px",height:i+"px"})}setViewport(t,i,s=0,r=0){this.state.viewport.width===t&&this.state.viewport.height===i||(this.state.viewport.width=t,this.state.viewport.height=i,this.state.viewport.x=s,this.state.viewport.y=r,this.gl.viewport(s,r,t,i))}setScissor(t,i,s=0,r=0){this.gl.scissor(s,r,t,i)}enable(t){this.state[t]!==!0&&(this.gl.enable(t),this.state[t]=!0)}disable(t){this.state[t]!==!1&&(this.gl.disable(t),this.state[t]=!1)}setBlendFunc(t,i,s,r){this.state.blendFunc.src===t&&this.state.blendFunc.dst===i&&this.state.blendFunc.srcAlpha===s&&this.state.blendFunc.dstAlpha===r||(this.state.blendFunc.src=t,this.state.blendFunc.dst=i,this.state.blendFunc.srcAlpha=s,this.state.blendFunc.dstAlpha=r,s!==void 0?this.gl.blendFuncSeparate(t,i,s,r):this.gl.blendFunc(t,i))}setBlendEquation(t,i){t=t||this.gl.FUNC_ADD,!(this.state.blendEquation.modeRGB===t&&this.state.blendEquation.modeAlpha===i)&&(this.state.blendEquation.modeRGB=t,this.state.blendEquation.modeAlpha=i,i!==void 0?this.gl.blendEquationSeparate(t,i):this.gl.blendEquation(t))}setCullFace(t){this.state.cullFace!==t&&(this.state.cullFace=t,this.gl.cullFace(t))}setFrontFace(t){this.state.frontFace!==t&&(this.state.frontFace=t,this.gl.frontFace(t))}setDepthMask(t){this.state.depthMask!==t&&(this.state.depthMask=t,this.gl.depthMask(t))}setDepthFunc(t){this.state.depthFunc!==t&&(this.state.depthFunc=t,this.gl.depthFunc(t))}setStencilMask(t){this.state.stencilMask!==t&&(this.state.stencilMask=t,this.gl.stencilMask(t))}setStencilFunc(t,i,s){this.state.stencilFunc===t&&this.state.stencilRef===i&&this.state.stencilFuncMask===s||(this.state.stencilFunc=t||this.gl.ALWAYS,this.state.stencilRef=i||0,this.state.stencilFuncMask=s||0,this.gl.stencilFunc(t||this.gl.ALWAYS,i||0,s||0))}setStencilOp(t,i,s){this.state.stencilFail===t&&this.state.stencilDepthFail===i&&this.state.stencilDepthPass===s||(this.state.stencilFail=t,this.state.stencilDepthFail=i,this.state.stencilDepthPass=s,this.gl.stencilOp(t,i,s))}activeTexture(t){this.state.activeTextureUnit!==t&&(this.state.activeTextureUnit=t,this.gl.activeTexture(this.gl.TEXTURE0+t))}bindFramebuffer({target:t=this.gl.FRAMEBUFFER,buffer:i=null}={}){this.state.framebuffer!==i&&(this.state.framebuffer=i,this.gl.bindFramebuffer(t,i))}getExtension(t,i,s){return i&&this.gl[i]?this.gl[i].bind(this.gl):(this.extensions[t]||(this.extensions[t]=this.gl.getExtension(t)),i?this.extensions[t]?this.extensions[t][s].bind(this.extensions[t]):null:this.extensions[t])}sortOpaque(t,i){return t.renderOrder!==i.renderOrder?t.renderOrder-i.renderOrder:t.program.id!==i.program.id?t.program.id-i.program.id:t.zDepth!==i.zDepth?t.zDepth-i.zDepth:i.id-t.id}sortTransparent(t,i){return t.renderOrder!==i.renderOrder?t.renderOrder-i.renderOrder:t.zDepth!==i.zDepth?i.zDepth-t.zDepth:i.id-t.id}sortUI(t,i){return t.renderOrder!==i.renderOrder?t.renderOrder-i.renderOrder:t.program.id!==i.program.id?t.program.id-i.program.id:i.id-t.id}getRenderList({scene:t,camera:i,frustumCull:s,sort:r}){let n=[];if(i&&s&&i.updateFrustum(),t.traverse(h=>{if(!h.visible)return!0;h.draw&&(s&&h.frustumCulled&&i&&!i.frustumIntersectsMesh(h)||n.push(h))}),r){const h=[],a=[],l=[];n.forEach(o=>{o.program.transparent?o.program.depthTest?a.push(o):l.push(o):h.push(o),o.zDepth=0,!(o.renderOrder!==0||!o.program.depthTest||!i)&&(o.worldMatrix.getTranslation(kt),kt.applyMatrix4(i.projectionViewMatrix),o.zDepth=kt.z)}),h.sort(this.sortOpaque),a.sort(this.sortTransparent),l.sort(this.sortUI),n=h.concat(a,l)}return n}render({scene:t,camera:i,target:s=null,update:r=!0,sort:n=!0,frustumCull:h=!0,clear:a}){s===null?(this.bindFramebuffer(),this.setViewport(this.width*this.dpr,this.height*this.dpr)):(this.bindFramebuffer(s),this.setViewport(s.width,s.height)),(a||this.autoClear&&a!==!1)&&(this.depth&&(!s||s.depth)&&(this.enable(this.gl.DEPTH_TEST),this.setDepthMask(!0)),(this.stencil||!s||s.stencil)&&(this.enable(this.gl.STENCIL_TEST),this.setStencilMask(255)),this.gl.clear((this.color?this.gl.COLOR_BUFFER_BIT:0)|(this.depth?this.gl.DEPTH_BUFFER_BIT:0)|(this.stencil?this.gl.STENCIL_BUFFER_BIT:0))),r&&t.updateMatrixWorld(),i&&i.updateMatrixWorld(),this.getRenderList({scene:t,camera:i,frustumCull:h,sort:n}).forEach(o=>{o.draw({camera:i})})}}function si(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function ri(e,t,i,s,r){return e[0]=t,e[1]=i,e[2]=s,e[3]=r,e}function ni(e,t){let i=t[0],s=t[1],r=t[2],n=t[3],h=i*i+s*s+r*r+n*n;return h>0&&(h=1/Math.sqrt(h)),e[0]=i*h,e[1]=s*h,e[2]=r*h,e[3]=n*h,e}function hi(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}function li(e){return e[0]=0,e[1]=0,e[2]=0,e[3]=1,e}function ai(e,t,i){i=i*.5;let s=Math.sin(i);return e[0]=s*t[0],e[1]=s*t[1],e[2]=s*t[2],e[3]=Math.cos(i),e}function ne(e,t,i){let s=t[0],r=t[1],n=t[2],h=t[3],a=i[0],l=i[1],o=i[2],c=i[3];return e[0]=s*c+h*a+r*o-n*l,e[1]=r*c+h*l+n*a-s*o,e[2]=n*c+h*o+s*l-r*a,e[3]=h*c-s*a-r*l-n*o,e}function oi(e,t,i){i*=.5;let s=t[0],r=t[1],n=t[2],h=t[3],a=Math.sin(i),l=Math.cos(i);return e[0]=s*l+h*a,e[1]=r*l+n*a,e[2]=n*l-r*a,e[3]=h*l-s*a,e}function ci(e,t,i){i*=.5;let s=t[0],r=t[1],n=t[2],h=t[3],a=Math.sin(i),l=Math.cos(i);return e[0]=s*l-n*a,e[1]=r*l+h*a,e[2]=n*l+s*a,e[3]=h*l-r*a,e}function fi(e,t,i){i*=.5;let s=t[0],r=t[1],n=t[2],h=t[3],a=Math.sin(i),l=Math.cos(i);return e[0]=s*l+r*a,e[1]=r*l-s*a,e[2]=n*l+h*a,e[3]=h*l-n*a,e}function di(e,t,i,s){let r=t[0],n=t[1],h=t[2],a=t[3],l=i[0],o=i[1],c=i[2],d=i[3],f,g,u,m,p;return g=r*l+n*o+h*c+a*d,g<0&&(g=-g,l=-l,o=-o,c=-c,d=-d),1-g>1e-6?(f=Math.acos(g),u=Math.sin(f),m=Math.sin((1-s)*f)/u,p=Math.sin(s*f)/u):(m=1-s,p=s),e[0]=m*r+p*l,e[1]=m*n+p*o,e[2]=m*h+p*c,e[3]=m*a+p*d,e}function gi(e,t){let i=t[0],s=t[1],r=t[2],n=t[3],h=i*i+s*s+r*r+n*n,a=h?1/h:0;return e[0]=-i*a,e[1]=-s*a,e[2]=-r*a,e[3]=n*a,e}function ui(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=t[3],e}function pi(e,t){let i=t[0]+t[4]+t[8],s;if(i>0)s=Math.sqrt(i+1),e[3]=.5*s,s=.5/s,e[0]=(t[5]-t[7])*s,e[1]=(t[6]-t[2])*s,e[2]=(t[1]-t[3])*s;else{let r=0;t[4]>t[0]&&(r=1),t[8]>t[r*3+r]&&(r=2);let n=(r+1)%3,h=(r+2)%3;s=Math.sqrt(t[r*3+r]-t[n*3+n]-t[h*3+h]+1),e[r]=.5*s,s=.5/s,e[3]=(t[n*3+h]-t[h*3+n])*s,e[n]=(t[n*3+r]+t[r*3+n])*s,e[h]=(t[h*3+r]+t[r*3+h])*s}return e}function mi(e,t,i="YXZ"){let s=Math.sin(t[0]*.5),r=Math.cos(t[0]*.5),n=Math.sin(t[1]*.5),h=Math.cos(t[1]*.5),a=Math.sin(t[2]*.5),l=Math.cos(t[2]*.5);return i==="XYZ"?(e[0]=s*h*l+r*n*a,e[1]=r*n*l-s*h*a,e[2]=r*h*a+s*n*l,e[3]=r*h*l-s*n*a):i==="YXZ"?(e[0]=s*h*l+r*n*a,e[1]=r*n*l-s*h*a,e[2]=r*h*a-s*n*l,e[3]=r*h*l+s*n*a):i==="ZXY"?(e[0]=s*h*l-r*n*a,e[1]=r*n*l+s*h*a,e[2]=r*h*a+s*n*l,e[3]=r*h*l-s*n*a):i==="ZYX"?(e[0]=s*h*l-r*n*a,e[1]=r*n*l+s*h*a,e[2]=r*h*a-s*n*l,e[3]=r*h*l+s*n*a):i==="YZX"?(e[0]=s*h*l+r*n*a,e[1]=r*n*l+s*h*a,e[2]=r*h*a-s*n*l,e[3]=r*h*l-s*n*a):i==="XZY"&&(e[0]=s*h*l-r*n*a,e[1]=r*n*l-s*h*a,e[2]=r*h*a+s*n*l,e[3]=r*h*l+s*n*a),e}const xi=si,yi=ri,vi=hi,wi=ni;class Mi extends Array{constructor(t=0,i=0,s=0,r=1){super(t,i,s,r),this.onChange=()=>{},this._target=this;const n=["0","1","2","3"];return new Proxy(this,{set(h,a){const l=Reflect.set(...arguments);return l&&n.includes(a)&&h.onChange(),l}})}get x(){return this[0]}get y(){return this[1]}get z(){return this[2]}get w(){return this[3]}set x(t){this._target[0]=t,this.onChange()}set y(t){this._target[1]=t,this.onChange()}set z(t){this._target[2]=t,this.onChange()}set w(t){this._target[3]=t,this.onChange()}identity(){return li(this._target),this.onChange(),this}set(t,i,s,r){return t.length?this.copy(t):(yi(this._target,t,i,s,r),this.onChange(),this)}rotateX(t){return oi(this._target,this._target,t),this.onChange(),this}rotateY(t){return ci(this._target,this._target,t),this.onChange(),this}rotateZ(t){return fi(this._target,this._target,t),this.onChange(),this}inverse(t=this._target){return gi(this._target,t),this.onChange(),this}conjugate(t=this._target){return ui(this._target,t),this.onChange(),this}copy(t){return xi(this._target,t),this.onChange(),this}normalize(t=this._target){return wi(this._target,t),this.onChange(),this}multiply(t,i){return i?ne(this._target,t,i):ne(this._target,this._target,t),this.onChange(),this}dot(t){return vi(this._target,t)}fromMatrix3(t){return pi(this._target,t),this.onChange(),this}fromEuler(t,i){return mi(this._target,t,t.order),i||this.onChange(),this}fromAxisAngle(t,i){return ai(this._target,t,i),this.onChange(),this}slerp(t,i){return di(this._target,this._target,t,i),this.onChange(),this}fromArray(t,i=0){return this._target[0]=t[i],this._target[1]=t[i+1],this._target[2]=t[i+2],this._target[3]=t[i+3],this.onChange(),this}toArray(t=[],i=0){return t[i]=this[0],t[i+1]=this[1],t[i+2]=this[2],t[i+3]=this[3],t}}const Ei=1e-6;function Ai(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function bi(e,t,i,s,r,n,h,a,l,o,c,d,f,g,u,m,p){return e[0]=t,e[1]=i,e[2]=s,e[3]=r,e[4]=n,e[5]=h,e[6]=a,e[7]=l,e[8]=o,e[9]=c,e[10]=d,e[11]=f,e[12]=g,e[13]=u,e[14]=m,e[15]=p,e}function _i(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function Fi(e,t){let i=t[0],s=t[1],r=t[2],n=t[3],h=t[4],a=t[5],l=t[6],o=t[7],c=t[8],d=t[9],f=t[10],g=t[11],u=t[12],m=t[13],p=t[14],x=t[15],_=i*a-s*h,w=i*l-r*h,v=i*o-n*h,M=s*l-r*a,E=s*o-n*a,k=r*o-n*l,O=c*m-d*u,U=c*p-f*u,A=c*x-g*u,T=d*p-f*m,F=d*x-g*m,P=f*x-g*p,b=_*P-w*F+v*T+M*A-E*U+k*O;return b?(b=1/b,e[0]=(a*P-l*F+o*T)*b,e[1]=(r*F-s*P-n*T)*b,e[2]=(m*k-p*E+x*M)*b,e[3]=(f*E-d*k-g*M)*b,e[4]=(l*A-h*P-o*U)*b,e[5]=(i*P-r*A+n*U)*b,e[6]=(p*v-u*k-x*w)*b,e[7]=(c*k-f*v+g*w)*b,e[8]=(h*F-a*A+o*O)*b,e[9]=(s*A-i*F-n*O)*b,e[10]=(u*E-m*v+x*_)*b,e[11]=(d*v-c*E-g*_)*b,e[12]=(a*U-h*T-l*O)*b,e[13]=(i*T-s*U+r*O)*b,e[14]=(m*w-u*M-p*_)*b,e[15]=(c*M-d*w+f*_)*b,e):null}function Ee(e){let t=e[0],i=e[1],s=e[2],r=e[3],n=e[4],h=e[5],a=e[6],l=e[7],o=e[8],c=e[9],d=e[10],f=e[11],g=e[12],u=e[13],m=e[14],p=e[15],x=t*h-i*n,_=t*a-s*n,w=t*l-r*n,v=i*a-s*h,M=i*l-r*h,E=s*l-r*a,k=o*u-c*g,O=o*m-d*g,U=o*p-f*g,A=c*m-d*u,T=c*p-f*u,F=d*p-f*m;return x*F-_*T+w*A+v*U-M*O+E*k}function he(e,t,i){let s=t[0],r=t[1],n=t[2],h=t[3],a=t[4],l=t[5],o=t[6],c=t[7],d=t[8],f=t[9],g=t[10],u=t[11],m=t[12],p=t[13],x=t[14],_=t[15],w=i[0],v=i[1],M=i[2],E=i[3];return e[0]=w*s+v*a+M*d+E*m,e[1]=w*r+v*l+M*f+E*p,e[2]=w*n+v*o+M*g+E*x,e[3]=w*h+v*c+M*u+E*_,w=i[4],v=i[5],M=i[6],E=i[7],e[4]=w*s+v*a+M*d+E*m,e[5]=w*r+v*l+M*f+E*p,e[6]=w*n+v*o+M*g+E*x,e[7]=w*h+v*c+M*u+E*_,w=i[8],v=i[9],M=i[10],E=i[11],e[8]=w*s+v*a+M*d+E*m,e[9]=w*r+v*l+M*f+E*p,e[10]=w*n+v*o+M*g+E*x,e[11]=w*h+v*c+M*u+E*_,w=i[12],v=i[13],M=i[14],E=i[15],e[12]=w*s+v*a+M*d+E*m,e[13]=w*r+v*l+M*f+E*p,e[14]=w*n+v*o+M*g+E*x,e[15]=w*h+v*c+M*u+E*_,e}function Ti(e,t,i){let s=i[0],r=i[1],n=i[2],h,a,l,o,c,d,f,g,u,m,p,x;return t===e?(e[12]=t[0]*s+t[4]*r+t[8]*n+t[12],e[13]=t[1]*s+t[5]*r+t[9]*n+t[13],e[14]=t[2]*s+t[6]*r+t[10]*n+t[14],e[15]=t[3]*s+t[7]*r+t[11]*n+t[15]):(h=t[0],a=t[1],l=t[2],o=t[3],c=t[4],d=t[5],f=t[6],g=t[7],u=t[8],m=t[9],p=t[10],x=t[11],e[0]=h,e[1]=a,e[2]=l,e[3]=o,e[4]=c,e[5]=d,e[6]=f,e[7]=g,e[8]=u,e[9]=m,e[10]=p,e[11]=x,e[12]=h*s+c*r+u*n+t[12],e[13]=a*s+d*r+m*n+t[13],e[14]=l*s+f*r+p*n+t[14],e[15]=o*s+g*r+x*n+t[15]),e}function Si(e,t,i){let s=i[0],r=i[1],n=i[2];return e[0]=t[0]*s,e[1]=t[1]*s,e[2]=t[2]*s,e[3]=t[3]*s,e[4]=t[4]*r,e[5]=t[5]*r,e[6]=t[6]*r,e[7]=t[7]*r,e[8]=t[8]*n,e[9]=t[9]*n,e[10]=t[10]*n,e[11]=t[11]*n,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function Ri(e,t,i,s){let r=s[0],n=s[1],h=s[2],a=Math.hypot(r,n,h),l,o,c,d,f,g,u,m,p,x,_,w,v,M,E,k,O,U,A,T,F,P,b,G;return Math.abs(a)<Ei?null:(a=1/a,r*=a,n*=a,h*=a,l=Math.sin(i),o=Math.cos(i),c=1-o,d=t[0],f=t[1],g=t[2],u=t[3],m=t[4],p=t[5],x=t[6],_=t[7],w=t[8],v=t[9],M=t[10],E=t[11],k=r*r*c+o,O=n*r*c+h*l,U=h*r*c-n*l,A=r*n*c-h*l,T=n*n*c+o,F=h*n*c+r*l,P=r*h*c+n*l,b=n*h*c-r*l,G=h*h*c+o,e[0]=d*k+m*O+w*U,e[1]=f*k+p*O+v*U,e[2]=g*k+x*O+M*U,e[3]=u*k+_*O+E*U,e[4]=d*A+m*T+w*F,e[5]=f*A+p*T+v*F,e[6]=g*A+x*T+M*F,e[7]=u*A+_*T+E*F,e[8]=d*P+m*b+w*G,e[9]=f*P+p*b+v*G,e[10]=g*P+x*b+M*G,e[11]=u*P+_*b+E*G,t!==e&&(e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e)}function zi(e,t){return e[0]=t[12],e[1]=t[13],e[2]=t[14],e}function Ae(e,t){let i=t[0],s=t[1],r=t[2],n=t[4],h=t[5],a=t[6],l=t[8],o=t[9],c=t[10];return e[0]=Math.hypot(i,s,r),e[1]=Math.hypot(n,h,a),e[2]=Math.hypot(l,o,c),e}function Ci(e){let t=e[0],i=e[1],s=e[2],r=e[4],n=e[5],h=e[6],a=e[8],l=e[9],o=e[10];const c=t*t+i*i+s*s,d=r*r+n*n+h*h,f=a*a+l*l+o*o;return Math.sqrt(Math.max(c,d,f))}const be=(function(){const e=[1,1,1];return function(t,i){let s=e;Ae(s,i);let r=1/s[0],n=1/s[1],h=1/s[2],a=i[0]*r,l=i[1]*n,o=i[2]*h,c=i[4]*r,d=i[5]*n,f=i[6]*h,g=i[8]*r,u=i[9]*n,m=i[10]*h,p=a+d+m,x=0;return p>0?(x=Math.sqrt(p+1)*2,t[3]=.25*x,t[0]=(f-u)/x,t[1]=(g-o)/x,t[2]=(l-c)/x):a>d&&a>m?(x=Math.sqrt(1+a-d-m)*2,t[3]=(f-u)/x,t[0]=.25*x,t[1]=(l+c)/x,t[2]=(g+o)/x):d>m?(x=Math.sqrt(1+d-a-m)*2,t[3]=(g-o)/x,t[0]=(l+c)/x,t[1]=.25*x,t[2]=(f+u)/x):(x=Math.sqrt(1+m-a-d)*2,t[3]=(l-c)/x,t[0]=(g+o)/x,t[1]=(f+u)/x,t[2]=.25*x),t}})();function Li(e,t,i,s){let r=pt([e[0],e[1],e[2]]);const n=pt([e[4],e[5],e[6]]),h=pt([e[8],e[9],e[10]]);Ee(e)<0&&(r=-r),i[0]=e[12],i[1]=e[13],i[2]=e[14];const l=e.slice(),o=1/r,c=1/n,d=1/h;l[0]*=o,l[1]*=o,l[2]*=o,l[4]*=c,l[5]*=c,l[6]*=c,l[8]*=d,l[9]*=d,l[10]*=d,be(t,l),s[0]=r,s[1]=n,s[2]=h}function Ii(e,t,i,s){const r=e,n=t[0],h=t[1],a=t[2],l=t[3],o=n+n,c=h+h,d=a+a,f=n*o,g=n*c,u=n*d,m=h*c,p=h*d,x=a*d,_=l*o,w=l*c,v=l*d,M=s[0],E=s[1],k=s[2];return r[0]=(1-(m+x))*M,r[1]=(g+v)*M,r[2]=(u-w)*M,r[3]=0,r[4]=(g-v)*E,r[5]=(1-(f+x))*E,r[6]=(p+_)*E,r[7]=0,r[8]=(u+w)*k,r[9]=(p-_)*k,r[10]=(1-(f+m))*k,r[11]=0,r[12]=i[0],r[13]=i[1],r[14]=i[2],r[15]=1,r}function ki(e,t){let i=t[0],s=t[1],r=t[2],n=t[3],h=i+i,a=s+s,l=r+r,o=i*h,c=s*h,d=s*a,f=r*h,g=r*a,u=r*l,m=n*h,p=n*a,x=n*l;return e[0]=1-d-u,e[1]=c+x,e[2]=f-p,e[3]=0,e[4]=c-x,e[5]=1-o-u,e[6]=g+m,e[7]=0,e[8]=f+p,e[9]=g-m,e[10]=1-o-d,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function Ui(e,t,i,s,r){let n=1/Math.tan(t/2),h=1/(s-r);return e[0]=n/i,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=n,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=(r+s)*h,e[11]=-1,e[12]=0,e[13]=0,e[14]=2*r*s*h,e[15]=0,e}function Pi(e,t,i,s,r,n,h){let a=1/(t-i),l=1/(s-r),o=1/(n-h);return e[0]=-2*a,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*o,e[11]=0,e[12]=(t+i)*a,e[13]=(r+s)*l,e[14]=(h+n)*o,e[15]=1,e}function Oi(e,t,i,s){let r=t[0],n=t[1],h=t[2],a=s[0],l=s[1],o=s[2],c=r-i[0],d=n-i[1],f=h-i[2],g=c*c+d*d+f*f;g===0?f=1:(g=1/Math.sqrt(g),c*=g,d*=g,f*=g);let u=l*f-o*d,m=o*c-a*f,p=a*d-l*c;return g=u*u+m*m+p*p,g===0&&(o?a+=1e-6:l?o+=1e-6:l+=1e-6,u=l*f-o*d,m=o*c-a*f,p=a*d-l*c,g=u*u+m*m+p*p),g=1/Math.sqrt(g),u*=g,m*=g,p*=g,e[0]=u,e[1]=m,e[2]=p,e[3]=0,e[4]=d*p-f*m,e[5]=f*u-c*p,e[6]=c*m-d*u,e[7]=0,e[8]=c,e[9]=d,e[10]=f,e[11]=0,e[12]=r,e[13]=n,e[14]=h,e[15]=1,e}function le(e,t,i){return e[0]=t[0]+i[0],e[1]=t[1]+i[1],e[2]=t[2]+i[2],e[3]=t[3]+i[3],e[4]=t[4]+i[4],e[5]=t[5]+i[5],e[6]=t[6]+i[6],e[7]=t[7]+i[7],e[8]=t[8]+i[8],e[9]=t[9]+i[9],e[10]=t[10]+i[10],e[11]=t[11]+i[11],e[12]=t[12]+i[12],e[13]=t[13]+i[13],e[14]=t[14]+i[14],e[15]=t[15]+i[15],e}function ae(e,t,i){return e[0]=t[0]-i[0],e[1]=t[1]-i[1],e[2]=t[2]-i[2],e[3]=t[3]-i[3],e[4]=t[4]-i[4],e[5]=t[5]-i[5],e[6]=t[6]-i[6],e[7]=t[7]-i[7],e[8]=t[8]-i[8],e[9]=t[9]-i[9],e[10]=t[10]-i[10],e[11]=t[11]-i[11],e[12]=t[12]-i[12],e[13]=t[13]-i[13],e[14]=t[14]-i[14],e[15]=t[15]-i[15],e}function Di(e,t,i){return e[0]=t[0]*i,e[1]=t[1]*i,e[2]=t[2]*i,e[3]=t[3]*i,e[4]=t[4]*i,e[5]=t[5]*i,e[6]=t[6]*i,e[7]=t[7]*i,e[8]=t[8]*i,e[9]=t[9]*i,e[10]=t[10]*i,e[11]=t[11]*i,e[12]=t[12]*i,e[13]=t[13]*i,e[14]=t[14]*i,e[15]=t[15]*i,e}class bt extends Array{constructor(t=1,i=0,s=0,r=0,n=0,h=1,a=0,l=0,o=0,c=0,d=1,f=0,g=0,u=0,m=0,p=1){return super(t,i,s,r,n,h,a,l,o,c,d,f,g,u,m,p),this}get x(){return this[12]}get y(){return this[13]}get z(){return this[14]}get w(){return this[15]}set x(t){this[12]=t}set y(t){this[13]=t}set z(t){this[14]=t}set w(t){this[15]=t}set(t,i,s,r,n,h,a,l,o,c,d,f,g,u,m,p){return t.length?this.copy(t):(bi(this,t,i,s,r,n,h,a,l,o,c,d,f,g,u,m,p),this)}translate(t,i=this){return Ti(this,i,t),this}rotate(t,i,s=this){return Ri(this,s,t,i),this}scale(t,i=this){return Si(this,i,typeof t=="number"?[t,t,t]:t),this}add(t,i){return i?le(this,t,i):le(this,this,t),this}sub(t,i){return i?ae(this,t,i):ae(this,this,t),this}multiply(t,i){return t.length?i?he(this,t,i):he(this,this,t):Di(this,this,t),this}identity(){return _i(this),this}copy(t){return Ai(this,t),this}fromPerspective({fov:t,aspect:i,near:s,far:r}={}){return Ui(this,t,i,s,r),this}fromOrthogonal({left:t,right:i,bottom:s,top:r,near:n,far:h}){return Pi(this,t,i,s,r,n,h),this}fromQuaternion(t){return ki(this,t),this}setPosition(t){return this.x=t[0],this.y=t[1],this.z=t[2],this}inverse(t=this){return Fi(this,t),this}compose(t,i,s){return Ii(this,t,i,s),this}decompose(t,i,s){return Li(this,t,i,s),this}getRotation(t){return be(t,this),this}getTranslation(t){return zi(t,this),this}getScaling(t){return Ae(t,this),this}getMaxScaleOnAxis(){return Ci(this)}lookAt(t,i,s){return Oi(this,t,i,s),this}determinant(){return Ee(this)}fromArray(t,i=0){return this[0]=t[i],this[1]=t[i+1],this[2]=t[i+2],this[3]=t[i+3],this[4]=t[i+4],this[5]=t[i+5],this[6]=t[i+6],this[7]=t[i+7],this[8]=t[i+8],this[9]=t[i+9],this[10]=t[i+10],this[11]=t[i+11],this[12]=t[i+12],this[13]=t[i+13],this[14]=t[i+14],this[15]=t[i+15],this}toArray(t=[],i=0){return t[i]=this[0],t[i+1]=this[1],t[i+2]=this[2],t[i+3]=this[3],t[i+4]=this[4],t[i+5]=this[5],t[i+6]=this[6],t[i+7]=this[7],t[i+8]=this[8],t[i+9]=this[9],t[i+10]=this[10],t[i+11]=this[11],t[i+12]=this[12],t[i+13]=this[13],t[i+14]=this[14],t[i+15]=this[15],t}}function Bi(e,t,i="YXZ"){return i==="XYZ"?(e[1]=Math.asin(Math.min(Math.max(t[8],-1),1)),Math.abs(t[8])<.99999?(e[0]=Math.atan2(-t[9],t[10]),e[2]=Math.atan2(-t[4],t[0])):(e[0]=Math.atan2(t[6],t[5]),e[2]=0)):i==="YXZ"?(e[0]=Math.asin(-Math.min(Math.max(t[9],-1),1)),Math.abs(t[9])<.99999?(e[1]=Math.atan2(t[8],t[10]),e[2]=Math.atan2(t[1],t[5])):(e[1]=Math.atan2(-t[2],t[0]),e[2]=0)):i==="ZXY"?(e[0]=Math.asin(Math.min(Math.max(t[6],-1),1)),Math.abs(t[6])<.99999?(e[1]=Math.atan2(-t[2],t[10]),e[2]=Math.atan2(-t[4],t[5])):(e[1]=0,e[2]=Math.atan2(t[1],t[0]))):i==="ZYX"?(e[1]=Math.asin(-Math.min(Math.max(t[2],-1),1)),Math.abs(t[2])<.99999?(e[0]=Math.atan2(t[6],t[10]),e[2]=Math.atan2(t[1],t[0])):(e[0]=0,e[2]=Math.atan2(-t[4],t[5]))):i==="YZX"?(e[2]=Math.asin(Math.min(Math.max(t[1],-1),1)),Math.abs(t[1])<.99999?(e[0]=Math.atan2(-t[9],t[5]),e[1]=Math.atan2(-t[2],t[0])):(e[0]=0,e[1]=Math.atan2(t[8],t[10]))):i==="XZY"&&(e[2]=Math.asin(-Math.min(Math.max(t[4],-1),1)),Math.abs(t[4])<.99999?(e[0]=Math.atan2(t[6],t[5]),e[1]=Math.atan2(t[8],t[0])):(e[0]=Math.atan2(-t[9],t[10]),e[1]=0)),e}const oe=new bt;class Ni extends Array{constructor(t=0,i=t,s=t,r="YXZ"){super(t,i,s),this.order=r,this.onChange=()=>{},this._target=this;const n=["0","1","2"];return new Proxy(this,{set(h,a){const l=Reflect.set(...arguments);return l&&n.includes(a)&&h.onChange(),l}})}get x(){return this[0]}get y(){return this[1]}get z(){return this[2]}set x(t){this._target[0]=t,this.onChange()}set y(t){this._target[1]=t,this.onChange()}set z(t){this._target[2]=t,this.onChange()}set(t,i=t,s=t){return t.length?this.copy(t):(this._target[0]=t,this._target[1]=i,this._target[2]=s,this.onChange(),this)}copy(t){return this._target[0]=t[0],this._target[1]=t[1],this._target[2]=t[2],this.onChange(),this}reorder(t){return this._target.order=t,this.onChange(),this}fromRotationMatrix(t,i=this.order){return Bi(this._target,t,i),this.onChange(),this}fromQuaternion(t,i=this.order,s){return oe.fromQuaternion(t),this._target.fromRotationMatrix(oe,i),s||this.onChange(),this}fromArray(t,i=0){return this._target[0]=t[i],this._target[1]=t[i+1],this._target[2]=t[i+2],this}toArray(t=[],i=0){return t[i]=this[0],t[i+1]=this[1],t[i+2]=this[2],t}}class Gi{constructor(){this.parent=null,this.children=[],this.visible=!0,this.matrix=new bt,this.worldMatrix=new bt,this.matrixAutoUpdate=!0,this.worldMatrixNeedsUpdate=!1,this.position=new K,this.quaternion=new Mi,this.scale=new K(1),this.rotation=new Ni,this.up=new K(0,1,0),this.rotation._target.onChange=()=>this.quaternion.fromEuler(this.rotation,!0),this.quaternion._target.onChange=()=>this.rotation.fromQuaternion(this.quaternion,void 0,!0)}setParent(t,i=!0){this.parent&&t!==this.parent&&this.parent.removeChild(this,!1),this.parent=t,i&&t&&t.addChild(this,!1)}addChild(t,i=!0){~this.children.indexOf(t)||this.children.push(t),i&&t.setParent(this,!1)}removeChild(t,i=!0){~this.children.indexOf(t)&&this.children.splice(this.children.indexOf(t),1),i&&t.setParent(null,!1)}updateMatrixWorld(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.worldMatrixNeedsUpdate||t)&&(this.parent===null?this.worldMatrix.copy(this.matrix):this.worldMatrix.multiply(this.parent.worldMatrix,this.matrix),this.worldMatrixNeedsUpdate=!1,t=!0);for(let i=0,s=this.children.length;i<s;i++)this.children[i].updateMatrixWorld(t)}updateMatrix(){this.matrix.compose(this.quaternion,this.position,this.scale),this.worldMatrixNeedsUpdate=!0}traverse(t){if(!t(this))for(let i=0,s=this.children.length;i<s;i++)this.children[i].traverse(t)}decompose(){this.matrix.decompose(this.quaternion._target,this.position,this.scale),this.rotation.fromQuaternion(this.quaternion)}lookAt(t,i=!1){i?this.matrix.lookAt(this.position,t,this.up):this.matrix.lookAt(t,this.position,this.up),this.matrix.getRotation(this.quaternion._target),this.rotation.fromQuaternion(this.quaternion)}}function qi(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[4],e[4]=t[5],e[5]=t[6],e[6]=t[8],e[7]=t[9],e[8]=t[10],e}function Xi(e,t){let i=t[0],s=t[1],r=t[2],n=t[3],h=i+i,a=s+s,l=r+r,o=i*h,c=s*h,d=s*a,f=r*h,g=r*a,u=r*l,m=n*h,p=n*a,x=n*l;return e[0]=1-d-u,e[3]=c-x,e[6]=f+p,e[1]=c+x,e[4]=1-o-u,e[7]=g-m,e[2]=f-p,e[5]=g+m,e[8]=1-o-d,e}function ji(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e}function $i(e,t,i,s,r,n,h,a,l,o){return e[0]=t,e[1]=i,e[2]=s,e[3]=r,e[4]=n,e[5]=h,e[6]=a,e[7]=l,e[8]=o,e}function Wi(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e}function Vi(e,t){let i=t[0],s=t[1],r=t[2],n=t[3],h=t[4],a=t[5],l=t[6],o=t[7],c=t[8],d=c*h-a*o,f=-c*n+a*l,g=o*n-h*l,u=i*d+s*f+r*g;return u?(u=1/u,e[0]=d*u,e[1]=(-c*s+r*o)*u,e[2]=(a*s-r*h)*u,e[3]=f*u,e[4]=(c*i-r*l)*u,e[5]=(-a*i+r*n)*u,e[6]=g*u,e[7]=(-o*i+s*l)*u,e[8]=(h*i-s*n)*u,e):null}function ce(e,t,i){let s=t[0],r=t[1],n=t[2],h=t[3],a=t[4],l=t[5],o=t[6],c=t[7],d=t[8],f=i[0],g=i[1],u=i[2],m=i[3],p=i[4],x=i[5],_=i[6],w=i[7],v=i[8];return e[0]=f*s+g*h+u*o,e[1]=f*r+g*a+u*c,e[2]=f*n+g*l+u*d,e[3]=m*s+p*h+x*o,e[4]=m*r+p*a+x*c,e[5]=m*n+p*l+x*d,e[6]=_*s+w*h+v*o,e[7]=_*r+w*a+v*c,e[8]=_*n+w*l+v*d,e}function Yi(e,t,i){let s=t[0],r=t[1],n=t[2],h=t[3],a=t[4],l=t[5],o=t[6],c=t[7],d=t[8],f=i[0],g=i[1];return e[0]=s,e[1]=r,e[2]=n,e[3]=h,e[4]=a,e[5]=l,e[6]=f*s+g*h+o,e[7]=f*r+g*a+c,e[8]=f*n+g*l+d,e}function Hi(e,t,i){let s=t[0],r=t[1],n=t[2],h=t[3],a=t[4],l=t[5],o=t[6],c=t[7],d=t[8],f=Math.sin(i),g=Math.cos(i);return e[0]=g*s+f*h,e[1]=g*r+f*a,e[2]=g*n+f*l,e[3]=g*h-f*s,e[4]=g*a-f*r,e[5]=g*l-f*n,e[6]=o,e[7]=c,e[8]=d,e}function Zi(e,t,i){let s=i[0],r=i[1];return e[0]=s*t[0],e[1]=s*t[1],e[2]=s*t[2],e[3]=r*t[3],e[4]=r*t[4],e[5]=r*t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e}function Qi(e,t){let i=t[0],s=t[1],r=t[2],n=t[3],h=t[4],a=t[5],l=t[6],o=t[7],c=t[8],d=t[9],f=t[10],g=t[11],u=t[12],m=t[13],p=t[14],x=t[15],_=i*a-s*h,w=i*l-r*h,v=i*o-n*h,M=s*l-r*a,E=s*o-n*a,k=r*o-n*l,O=c*m-d*u,U=c*p-f*u,A=c*x-g*u,T=d*p-f*m,F=d*x-g*m,P=f*x-g*p,b=_*P-w*F+v*T+M*A-E*U+k*O;return b?(b=1/b,e[0]=(a*P-l*F+o*T)*b,e[1]=(l*A-h*P-o*U)*b,e[2]=(h*F-a*A+o*O)*b,e[3]=(r*F-s*P-n*T)*b,e[4]=(i*P-r*A+n*U)*b,e[5]=(s*A-i*F-n*O)*b,e[6]=(m*k-p*E+x*M)*b,e[7]=(p*v-u*k-x*w)*b,e[8]=(u*E-m*v+x*_)*b,e):null}class Ki extends Array{constructor(t=1,i=0,s=0,r=0,n=1,h=0,a=0,l=0,o=1){return super(t,i,s,r,n,h,a,l,o),this}set(t,i,s,r,n,h,a,l,o){return t.length?this.copy(t):($i(this,t,i,s,r,n,h,a,l,o),this)}translate(t,i=this){return Yi(this,i,t),this}rotate(t,i=this){return Hi(this,i,t),this}scale(t,i=this){return Zi(this,i,t),this}multiply(t,i){return i?ce(this,t,i):ce(this,this,t),this}identity(){return Wi(this),this}copy(t){return ji(this,t),this}fromMatrix4(t){return qi(this,t),this}fromQuaternion(t){return Xi(this,t),this}fromBasis(t,i,s){return this.set(t[0],t[1],t[2],i[0],i[1],i[2],s[0],s[1],s[2]),this}inverse(t=this){return Vi(this,t),this}getNormalMatrix(t){return Qi(this,t),this}}let Ji=0;class ts extends Gi{constructor(t,{geometry:i,program:s,mode:r=t.TRIANGLES,frustumCulled:n=!0,renderOrder:h=0}={}){super(),t.canvas||console.error("gl not passed as first argument to Mesh"),this.gl=t,this.id=Ji++,this.geometry=i,this.program=s,this.mode=r,this.frustumCulled=n,this.renderOrder=h,this.modelViewMatrix=new bt,this.normalMatrix=new Ki,this.beforeRenderCallbacks=[],this.afterRenderCallbacks=[]}onBeforeRender(t){return this.beforeRenderCallbacks.push(t),this}onAfterRender(t){return this.afterRenderCallbacks.push(t),this}draw({camera:t}={}){t&&(this.program.uniforms.modelMatrix||Object.assign(this.program.uniforms,{modelMatrix:{value:null},viewMatrix:{value:null},modelViewMatrix:{value:null},normalMatrix:{value:null},projectionMatrix:{value:null},cameraPosition:{value:null}}),this.program.uniforms.projectionMatrix.value=t.projectionMatrix,this.program.uniforms.cameraPosition.value=t.worldPosition,this.program.uniforms.viewMatrix.value=t.viewMatrix,this.modelViewMatrix.multiply(t.viewMatrix,this.worldMatrix),this.normalMatrix.getNormalMatrix(this.modelViewMatrix),this.program.uniforms.modelMatrix.value=this.worldMatrix,this.program.uniforms.modelViewMatrix.value=this.modelViewMatrix,this.program.uniforms.normalMatrix.value=this.normalMatrix),this.beforeRenderCallbacks.forEach(s=>s&&s({mesh:this,camera:t}));let i=this.program.cullFace&&this.worldMatrix.determinant()<0;this.program.use({flipFaces:i}),this.geometry.draw({mode:this.mode,program:this.program}),this.afterRenderCallbacks.forEach(s=>s&&s({mesh:this,camera:t}))}}const fe=new Uint8Array(4);function de(e){return(e&e-1)===0}let es=1;class ge{constructor(t,{image:i,target:s=t.TEXTURE_2D,type:r=t.UNSIGNED_BYTE,format:n=t.RGBA,internalFormat:h=n,wrapS:a=t.CLAMP_TO_EDGE,wrapT:l=t.CLAMP_TO_EDGE,wrapR:o=t.CLAMP_TO_EDGE,generateMipmaps:c=s===(t.TEXTURE_2D||t.TEXTURE_CUBE_MAP),minFilter:d=c?t.NEAREST_MIPMAP_LINEAR:t.LINEAR,magFilter:f=t.LINEAR,premultiplyAlpha:g=!1,unpackAlignment:u=4,flipY:m=s==(t.TEXTURE_2D||t.TEXTURE_3D),anisotropy:p=0,level:x=0,width:_,height:w=_,length:v=1}={}){this.gl=t,this.id=es++,this.image=i,this.target=s,this.type=r,this.format=n,this.internalFormat=h,this.minFilter=d,this.magFilter=f,this.wrapS=a,this.wrapT=l,this.wrapR=o,this.generateMipmaps=c,this.premultiplyAlpha=g,this.unpackAlignment=u,this.flipY=m,this.anisotropy=Math.min(p,this.gl.renderer.parameters.maxAnisotropy),this.level=x,this.width=_,this.height=w,this.length=v,this.texture=this.gl.createTexture(),this.store={image:null},this.glState=this.gl.renderer.state,this.state={},this.state.minFilter=this.gl.NEAREST_MIPMAP_LINEAR,this.state.magFilter=this.gl.LINEAR,this.state.wrapS=this.gl.REPEAT,this.state.wrapT=this.gl.REPEAT,this.state.anisotropy=0}bind(){this.glState.textureUnits[this.glState.activeTextureUnit]!==this.id&&(this.gl.bindTexture(this.target,this.texture),this.glState.textureUnits[this.glState.activeTextureUnit]=this.id)}update(t=0){const i=!(this.image===this.store.image&&!this.needsUpdate);if((i||this.glState.textureUnits[t]!==this.id)&&(this.gl.renderer.activeTexture(t),this.bind()),!!i){if(this.needsUpdate=!1,this.flipY!==this.glState.flipY&&(this.gl.pixelStorei(this.gl.UNPACK_FLIP_Y_WEBGL,this.flipY),this.glState.flipY=this.flipY),this.premultiplyAlpha!==this.glState.premultiplyAlpha&&(this.gl.pixelStorei(this.gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL,this.premultiplyAlpha),this.glState.premultiplyAlpha=this.premultiplyAlpha),this.unpackAlignment!==this.glState.unpackAlignment&&(this.gl.pixelStorei(this.gl.UNPACK_ALIGNMENT,this.unpackAlignment),this.glState.unpackAlignment=this.unpackAlignment),this.minFilter!==this.state.minFilter&&(this.gl.texParameteri(this.target,this.gl.TEXTURE_MIN_FILTER,this.minFilter),this.state.minFilter=this.minFilter),this.magFilter!==this.state.magFilter&&(this.gl.texParameteri(this.target,this.gl.TEXTURE_MAG_FILTER,this.magFilter),this.state.magFilter=this.magFilter),this.wrapS!==this.state.wrapS&&(this.gl.texParameteri(this.target,this.gl.TEXTURE_WRAP_S,this.wrapS),this.state.wrapS=this.wrapS),this.wrapT!==this.state.wrapT&&(this.gl.texParameteri(this.target,this.gl.TEXTURE_WRAP_T,this.wrapT),this.state.wrapT=this.wrapT),this.wrapR!==this.state.wrapR&&(this.gl.texParameteri(this.target,this.gl.TEXTURE_WRAP_R,this.wrapR),this.state.wrapR=this.wrapR),this.anisotropy&&this.anisotropy!==this.state.anisotropy&&(this.gl.texParameterf(this.target,this.gl.renderer.getExtension("EXT_texture_filter_anisotropic").TEXTURE_MAX_ANISOTROPY_EXT,this.anisotropy),this.state.anisotropy=this.anisotropy),this.image){if(this.image.width&&(this.width=this.image.width,this.height=this.image.height),this.target===this.gl.TEXTURE_CUBE_MAP)for(let s=0;s<6;s++)this.gl.texImage2D(this.gl.TEXTURE_CUBE_MAP_POSITIVE_X+s,this.level,this.internalFormat,this.format,this.type,this.image[s]);else if(ArrayBuffer.isView(this.image))this.target===this.gl.TEXTURE_2D?this.gl.texImage2D(this.target,this.level,this.internalFormat,this.width,this.height,0,this.format,this.type,this.image):(this.target===this.gl.TEXTURE_2D_ARRAY||this.target===this.gl.TEXTURE_3D)&&this.gl.texImage3D(this.target,this.level,this.internalFormat,this.width,this.height,this.length,0,this.format,this.type,this.image);else if(this.image.isCompressedTexture)for(let s=0;s<this.image.length;s++)this.gl.compressedTexImage2D(this.target,s,this.internalFormat,this.image[s].width,this.image[s].height,0,this.image[s].data);else this.target===this.gl.TEXTURE_2D?this.gl.texImage2D(this.target,this.level,this.internalFormat,this.format,this.type,this.image):this.gl.texImage3D(this.target,this.level,this.internalFormat,this.width,this.height,this.length,0,this.format,this.type,this.image);this.generateMipmaps&&(!this.gl.renderer.isWebgl2&&(!de(this.image.width)||!de(this.image.height))?(this.generateMipmaps=!1,this.wrapS=this.wrapT=this.gl.CLAMP_TO_EDGE,this.minFilter=this.gl.LINEAR):this.gl.generateMipmap(this.target)),this.onUpdate&&this.onUpdate()}else if(this.target===this.gl.TEXTURE_CUBE_MAP)for(let s=0;s<6;s++)this.gl.texImage2D(this.gl.TEXTURE_CUBE_MAP_POSITIVE_X+s,0,this.gl.RGBA,1,1,0,this.gl.RGBA,this.gl.UNSIGNED_BYTE,fe);else this.width?this.target===this.gl.TEXTURE_2D?this.gl.texImage2D(this.target,this.level,this.internalFormat,this.width,this.height,0,this.format,this.type,null):this.gl.texImage3D(this.target,this.level,this.internalFormat,this.width,this.height,this.length,0,this.format,this.type,null):this.gl.texImage2D(this.target,0,this.gl.RGBA,1,1,0,this.gl.RGBA,this.gl.UNSIGNED_BYTE,fe);this.store.image=this.image}}}class is extends He{constructor(t,{attributes:i={}}={}){Object.assign(i,{position:{size:2,data:new Float32Array([-1,-1,3,-1,-1,3])},uv:{size:2,data:new Float32Array([0,0,2,0,0,2])}}),super(t,i)}}const ue=`data:image/svg+xml;charset=utf-8,${encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="64" height="64" viewBox="0 0 64 64"><path d="M39 3 12 37h17l-4 24 27-34H35z" fill="#fff"/></svg>')}`,ss=560,V=4,mt=1e20,rt=5,xt=3,rs=4e6,pe=e=>{let t=String(e||"").replace("#","");t.length===3&&(t=t.replace(/./g,s=>s+s));const i=parseInt(t.slice(0,6),16);return Number.isNaN(i)?[1,1,1]:[(i>>16&255)/255,(i>>8&255)/255,(i&255)/255]},me=(e,t,i,s,r)=>{let n=0;i[0]=0,s[0]=-mt,s[1]=mt;for(let h=1;h<r;h++){let a=(e[h]+h*h-(e[i[n]]+i[n]*i[n]))/(2*h-2*i[n]);for(;a<=s[n];)n--,a=(e[h]+h*h-(e[i[n]]+i[n]*i[n]))/(2*h-2*i[n]);n++,i[n]=h,s[n]=a,s[n+1]=mt}n=0;for(let h=0;h<r;h++){for(;s[n+1]<h;)n++;t[h]=(h-i[n])*(h-i[n])+e[i[n]]}},xe=(e,t,i)=>{const s=Math.max(t,i),r=new Float64Array(s),n=new Float64Array(s),h=new Int32Array(s),a=new Float64Array(s+1);for(let l=0;l<t;l++){for(let o=0;o<i;o++)r[o]=e[o*t+l];me(r,n,h,a,i);for(let o=0;o<i;o++)e[o*t+l]=n[o]}for(let l=0;l<i;l++){for(let o=0;o<t;o++)r[o]=e[l*t+o];me(r,n,h,a,t);for(let o=0;o<t;o++)e[l*t+o]=n[o]}},ye=(e,t,i,s,r,n)=>{const h=1/(2*n+1);let a=0;for(let l=0;l<=n&&l<r;l++)a+=e[i+l*s];for(let l=0;l<r;l++)t[i+l*s]=a*h,l+n+1<r&&(a+=e[i+(l+n+1)*s]),l-n>=0&&(a-=e[i+(l-n)*s])},ve=(e,t,i,s)=>{const r=new Float32Array(t*i);for(let n=0;n<3;n++){for(let h=0;h<i;h++)ye(e,r,h*t,1,t,s);for(let h=0;h<t;h++)ye(r,e,h,t,i,s)}},ns=(e,t,i)=>{const s=new Float32Array(t*i);let r=0;for(let c=0;c<t*i;c++)e[c*4+3]<250&&r++;if(r>t*i*.01){for(let c=0;c<t*i;c++)s[c]=e[c*4+3]/255;return s}let n=0,h=0,a=0,l=0;const o=c=>{n+=e[c*4],h+=e[c*4+1],a+=e[c*4+2],l++};for(let c=0;c<t;c++)o(c),o((i-1)*t+c);for(let c=0;c<i;c++)o(c*t),o(c*t+t-1);n/=l,h/=l,a/=l;for(let c=0;c<t*i;c++){const d=Math.max(Math.abs(e[c*4]-n),Math.abs(e[c*4+1]-h),Math.abs(e[c*4+2]-a));s[c]=Math.min(1,Math.max(0,(d-24)/48))}return s},we=(e,t,i)=>{const{field:s,width:r,height:n}=e,h=Math.min(Math.max(t,.5),r-.5),a=Math.min(Math.max(i,.5),n-.5),l=Math.min(Math.floor(h-.5),r-2),o=Math.min(Math.floor(a-.5),n-2),c=h-.5-l,d=a-.5-o,f=o*r+l,g=s[f]+(s[f+1]-s[f])*c,u=s[f+r]+(s[f+r+1]-s[f+r])*c;return g+(u-g)*d+Math.hypot(t-h,i-a)},hs=e=>{const t=e.naturalWidth||e.width,i=e.naturalHeight||e.height;if(!t||!i)return null;const s=ss/Math.max(t,i),r=Math.max(2,Math.round(t*s)),n=Math.max(2,Math.round(i*s)),h=document.createElement("canvas");h.width=r,h.height=n;const a=h.getContext("2d",{willReadFrequently:!0});if(!a)return null;a.drawImage(e,0,0,r,n);const l=ns(a.getImageData(0,0,r,n).data,r,n);let o=r,c=n,d=-1,f=-1;for(let y=0;y<n;y++)for(let C=0;C<r;C++)l[y*r+C]<=.01||(C<o&&(o=C),C>d&&(d=C),y<c&&(c=y),y>f&&(f=y));if(d<0)return null;const g=d-o+1,u=f-c+1,m=Math.ceil(Math.max(g,u)*.25)+2,p=g+m*2,x=u+m*2,_=new Float32Array(p*x),w=new Float32Array(p*x);for(let y=0;y<x;y++)for(let C=0;C<p;C++){const B=C-m+o,j=y-m+c,Y=B>=0&&j>=0&&B<r&&j<n?l[j*r+B]:0,q=y*p+C;if(Y>=1)_[q]=0,w[q]=mt;else if(Y<=0)_[q]=mt,w[q]=0;else{const S=.5-Y;_[q]=S>0?S*S:0,w[q]=S<0?S*S:0}}xe(_,p,x),xe(w,p,x);const v=new Float32Array(p*x);for(let y=0;y<p*x;y++)v[y]=Math.sqrt(_[y])-Math.sqrt(w[y]);const M=[];for(let y=1;y<x-1;y++)for(let C=1;C<p-1;C++){const B=y*p+C,j=v[B];if(j>0||v[B-1]<=0&&v[B+1]<=0&&v[B-p]<=0&&v[B+p]<=0)continue;const Y=v[B+1]-v[B-1],q=v[B+p]-v[B-p],S=Math.hypot(Y,q)||1;M.push(C+.5-j*Y/S,y+.5-j*q/S)}const E=Math.max(1,Math.ceil(M.length/2/3e3))*2,k=[];for(let y=0;y<M.length;y+=E)k.push(M[y],M[y+1]);const O=Math.max(g,u),U=Math.ceil(O*.7/V),A=Math.ceil(g/V)+U*2,T=Math.ceil(u/V)+U*2,F=new Float32Array(A*T);for(let y=0;y<x;y++){const C=Math.floor((y-m)/V)+U;for(let B=0;B<p;B++){const j=Math.floor((B-m)/V)+U;F[C*A+j]+=Math.exp(-Math.abs(v[y*p+B])/1.5)/(V*V)}}const P=F.slice(),b=Math.max(1,Math.round(O*.035/V)),G=Math.max(2,Math.round(O*.13/V));ve(F,A,T,b),ve(P,A,T,G);const yt=Math.sqrt(2*Math.PI*(b*b+b))*V/3,nt=Math.sqrt(2*Math.PI*(G*G+G))*V/3,tt=new Float32Array(A*T*2);for(let y=0;y<A*T;y++)tt[y*2]=F[y]*yt,tt[y*2+1]=P[y]*nt;return{field:v,edges:k,width:p,height:x,pad:m,logoWidth:g,logoHeight:u,glow:tt,glowWidth:A,glowHeight:T,glowOffset:m-U*V}},Ut=(e,t,i)=>{const{edges:s,logoWidth:r,logoHeight:n}=e,h=s.length/2;if(h<2)return null;const a=Math.max(r,n);let l=Math.floor(Math.random()*h);if(i){let d=!1;for(let f=0;f<40&&!d;f++){const g=Math.floor(Math.random()*h);Math.hypot(s[g*2]-i.x,s[g*2+1]-i.y)<i.radius&&(l=g,d=!0)}if(!d)return null}const o=s[l*2],c=s[l*2+1];for(let d=0;d<24;d++){const f=Math.floor(Math.random()*h),g=s[f*2],u=s[f*2+1],m=Math.hypot(g-o,u-c);if(m<a*.08||m>a*.3)continue;const p=-(u-c)/m,x=(g-o)/m,_=m*(.2+Math.random()*.3),w=(o+g)/2,v=(c+u)/2,M=we(e,w+p*_,v+x*_),E=we(e,w-p*_,v-x*_);if(!(Math.max(M,E)<=0))return{ax:o,ay:c,bx:g,by:u,bow:M>=E?_:-_,seed:1+Math.random()*60,born:t,life:.35+Math.random()*.45}}return null},ls=`#version 300 es
8
+ in vec2 position;
9
+ in vec2 uv;
10
+ out vec2 vUv;
11
+ void main() {
12
+ vUv = uv;
13
+ gl_Position = vec4(position, 0.0, 1.0);
14
+ }
15
+ `,as=`#version 300 es
16
+ precision highp float;
17
+ precision highp int;
18
+
19
+ uniform sampler2D tFieldFrom;
20
+ uniform sampler2D tGlowFrom;
21
+ uniform sampler2D tFieldTo;
22
+ uniform sampler2D tGlowTo;
23
+ uniform vec4 uMapFrom;
24
+ uniform vec4 uSizeFrom;
25
+ uniform vec4 uMapTo;
26
+ uniform vec4 uSizeTo;
27
+ uniform float uMorph;
28
+ uniform vec2 uResolution;
29
+ uniform float uUnit;
30
+ uniform float uTime;
31
+ uniform float uPresence;
32
+ uniform vec3 uHover;
33
+ uniform float uHoverRadius;
34
+ uniform vec4 uPulses[${xt}];
35
+ uniform float uPulseBoost;
36
+ uniform float uFlash;
37
+ uniform vec3 uColor;
38
+ uniform vec3 uGlowColor;
39
+ uniform float uIntensity;
40
+ uniform float uGlow;
41
+ uniform float uThickness;
42
+ uniform float uStrands;
43
+ uniform float uBend;
44
+ uniform float uCrackle;
45
+ uniform float uFlicker;
46
+ uniform float uFill;
47
+ uniform float uInk;
48
+ uniform vec4 uArcEnds[${rt}];
49
+ uniform vec4 uArcShape[${rt}];
50
+
51
+ in vec2 vUv;
52
+ out vec4 fragColor;
53
+
54
+ uint scramble(uint x) {
55
+ x ^= x >> 16u;
56
+ x *= 0x7feb352du;
57
+ x ^= x >> 15u;
58
+ x *= 0x846ca68bu;
59
+ x ^= x >> 16u;
60
+ return x;
61
+ }
62
+
63
+ float fieldAt(sampler2D tex, vec4 map, vec4 size, vec2 p) {
64
+ vec2 f = (p - map.xy) / map.z;
65
+ vec2 c = clamp(f, vec2(0.5), size.xy - 0.5);
66
+ return (textureLod(tex, c / size.xy, 0.0).r + length(f - c)) * map.z;
67
+ }
68
+
69
+ vec2 glowAt(sampler2D tex, vec4 map, vec4 size, vec2 p) {
70
+ vec2 f = (p - map.xy) / map.z - map.w;
71
+ return textureLod(tex, f / (size.zw * ${V}.0), 0.0).rg;
72
+ }
73
+
74
+ float shape(vec2 p, float k) {
75
+ float to = fieldAt(tFieldTo, uMapTo, uSizeTo, p);
76
+ if (k >= 1.0) return to;
77
+ return mix(fieldAt(tFieldFrom, uMapFrom, uSizeFrom, p), to, k);
78
+ }
79
+
80
+ vec2 aura(vec2 p, float k) {
81
+ vec2 to = glowAt(tGlowTo, uMapTo, uSizeTo, p);
82
+ if (k >= 1.0) return to;
83
+ return mix(glowAt(tGlowFrom, uMapFrom, uSizeFrom, p), to, k);
84
+ }
85
+
86
+ vec4 corner(ivec2 c, uint seed) {
87
+ uint h = scramble(uint(c.x) * 0x8da6b343u + uint(c.y) * 0xd8163841u + seed * 0xcb1ab31fu);
88
+ return vec4(uvec4(h, h >> 8u, h >> 16u, h >> 24u) & 255u) / 127.5 - 1.0;
89
+ }
90
+
91
+ vec2 drift(vec2 p, uint seed, out mat2 jac) {
92
+ vec2 i = floor(p);
93
+ vec2 f = p - i;
94
+ vec2 u = f * f * f * (f * (f * 6.0 - 15.0) + 10.0);
95
+ vec2 du = 30.0 * f * f * (f * (f - 2.0) + 1.0);
96
+ ivec2 c = ivec2(i);
97
+ vec4 ga = corner(c, seed);
98
+ vec4 gb = corner(c + ivec2(1, 0), seed);
99
+ vec4 gc = corner(c + ivec2(0, 1), seed);
100
+ vec4 gd = corner(c + ivec2(1, 1), seed);
101
+ vec2 fb = f - vec2(1.0, 0.0);
102
+ vec2 fc = f - vec2(0.0, 1.0);
103
+ vec2 fd = f - vec2(1.0);
104
+ vec2 va = vec2(dot(ga.xy, f), dot(ga.zw, f));
105
+ vec2 vb = vec2(dot(gb.xy, fb), dot(gb.zw, fb));
106
+ vec2 vc = vec2(dot(gc.xy, fc), dot(gc.zw, fc));
107
+ vec2 vd = vec2(dot(gd.xy, fd), dot(gd.zw, fd));
108
+ vec2 k = va - vb - vc + vd;
109
+ vec4 g = ga + u.x * (gb - ga) + u.y * (gc - ga) + u.x * u.y * (ga - gb - gc + gd);
110
+ jac = mat2(
111
+ g.xy + du * (u.yx * k.x + vec2(vb.x - va.x, vc.x - va.x)),
112
+ g.zw + du * (u.yx * k.y + vec2(vb.y - va.y, vc.y - va.y))
113
+ );
114
+ return va + u.x * (vb - va) + u.y * (vc - va) + u.x * u.y * k;
115
+ }
116
+
117
+ float wobble(vec2 p, uint seed) {
118
+ mat2 jac;
119
+ return drift(p, seed, jac).x;
120
+ }
121
+
122
+ vec2 ripple(vec2 p, out float surge) {
123
+ vec2 push = vec2(0.0);
124
+ surge = 0.0;
125
+ float width = uUnit * 10.0;
126
+ for (int i = 0; i < ${xt}; i++) {
127
+ vec4 pulse = uPulses[i];
128
+ if (pulse.w <= 0.0) continue;
129
+ vec2 d = p - pulse.xy;
130
+ float dist = length(d);
131
+ float front = (dist - pulse.z * uUnit * 150.0) / width;
132
+ float env = exp(-front * front) * pulse.w * exp(-pulse.z * 1.7) * smoothstep(0.0, uUnit * 8.0, dist);
133
+ push += d / max(dist, 1.0) * env * cos(front * 2.2) * uUnit * 7.5;
134
+ surge += env;
135
+ }
136
+ return push;
137
+ }
138
+
139
+ vec2 wander(vec2 p, float t, uint seed, float reachScale, out mat2 jac, out vec2 sway) {
140
+ vec2 q = p / uUnit;
141
+ mat2 ja;
142
+ mat2 jb;
143
+ mat2 jc;
144
+ mat2 jd;
145
+ vec2 a = drift(q * 0.028 + vec2(t * 0.29, t * 0.21), seed, ja);
146
+ vec2 b = drift(q * 0.085 + a * 0.4 + vec2(t * 0.83, -t * 0.61) + 17.0, seed + 1u, jb);
147
+ vec2 c = drift(p / 9.0 + b * 0.6 + vec2(t * 1.9, t * 1.3) + 5.0, seed + 2u, jc);
148
+ vec2 d = drift(p / 4.1 + vec2(-t * 2.7, t * 2.2) + 11.0, seed + 3u, jd);
149
+ float bendAmp = uBend * 8.0 * reachScale;
150
+ float rippleAmp = uBend * 3.2 * reachScale;
151
+ float crinkleAmp = uCrackle * 1.5 * reachScale;
152
+ jac = ja * (0.028 * bendAmp) + jb * (0.085 * rippleAmp) + jc * (crinkleAmp / 9.0) + jd * (crinkleAmp * 0.35 / 4.1);
153
+ sway = (a * bendAmp + b * rippleAmp) * uUnit;
154
+ return sway + (c + d * 0.35) * crinkleAmp;
155
+ }
156
+
157
+ vec2 glowShape(float line, float spread, float w) {
158
+ float x = abs(line);
159
+ float y = abs(spread);
160
+ return vec2(exp(-x * x / (w * w * 0.5)) + exp(-y / (w * 2.2)) * 0.6, exp(-y / (w * 4.5)) * 0.5);
161
+ }
162
+
163
+ void addArc(vec2 p, vec4 ends, vec4 info, float t, inout vec3 light, inout float energy, inout float hot) {
164
+ if (info.y < 0.002) return;
165
+ vec2 ab = ends.zw - ends.xy;
166
+ float len = max(length(ab), 1.0);
167
+ vec2 dir = ab / len;
168
+ vec2 rel = p - ends.xy;
169
+ float s = dot(rel, dir);
170
+ float h = dot(rel, vec2(-dir.y, dir.x));
171
+ float margin = abs(info.x) + uCrackle * (2.0 + len * 0.08) + uThickness * 12.0 + 10.0;
172
+ if (s < -margin || s > len + margin || abs(h) > margin) return;
173
+ float u = clamp(s / len, 0.0, 1.0);
174
+ float taper = sin(3.14159265 * u);
175
+ float bendSlope = s > 0.0 && s < len ? 3.14159265 / len * cos(3.14159265 * u) : 0.0;
176
+ float beyond = max(-s, 0.0) + max(s - len, 0.0);
177
+ for (int c = 0; c < 2; c++) {
178
+ uint seed = uint(info.z * 131.0) + uint(c) * 29u + 7u;
179
+ float jag = 0.0;
180
+ float jagSlope = 0.0;
181
+ float wave = max(len * 0.3, 14.0);
182
+ float weight = uCrackle * (1.5 + len * 0.05) * (c == 0 ? 1.0 : 1.5);
183
+ for (int o = 0; o < 3; o++) {
184
+ mat2 jac;
185
+ float n = drift(vec2(s / wave + info.z * 3.0, t * (1.4 + float(o) * 1.1)), seed + uint(o), jac).x;
186
+ jag += n * weight;
187
+ jagSlope += jac[0].x * weight / wave;
188
+ wave *= 0.42;
189
+ weight *= 0.4;
190
+ }
191
+ float offset = (info.x + jag) * taper;
192
+ float offsetSlope = (info.x + jag) * bendSlope + jagSlope * taper;
193
+ float across = (h - offset) / sqrt(1.0 + offsetSlope * offsetSlope);
194
+ float gap = length(vec2(beyond, across));
195
+ float w = uThickness * (c == 0 ? 0.9 : 0.6);
196
+ vec2 g = glowShape(gap, gap, w);
197
+ float k = info.y * (c == 0 ? 1.0 : 0.45);
198
+ light += (uColor * g.x + uGlowColor * g.y * uGlow) * k;
199
+ energy += (g.x + g.y * uGlow) * k;
200
+ hot += exp(-gap * gap / (w * w * 0.16)) * k * (c == 0 ? 1.0 : 0.0);
201
+ }
202
+ }
203
+
204
+ void main() {
205
+ vec2 p = vec2(vUv.x, 1.0 - vUv.y) * uResolution;
206
+ float t = uTime;
207
+ vec3 light = vec3(0.0);
208
+ float energy = 0.0;
209
+ float hot = 0.0;
210
+
211
+ float surge;
212
+ vec2 pr = p - ripple(p, surge);
213
+ float k = uMorph >= 1.0 ? 1.0 : smoothstep(0.0, 1.0, clamp(uMorph * 1.7 - 0.35 + 0.35 * wobble(p / uUnit * 0.018, 41u), 0.0, 1.0));
214
+ float transit = uMorph >= 1.0 ? 0.0 : sin(3.14159265 * uMorph);
215
+ float base = shape(pr, k);
216
+
217
+ vec2 toHover = p - uHover.xy;
218
+ float heat = min(uHover.z * exp(-dot(toHover, toHover) / (uHoverRadius * uHoverRadius)) + surge * 1.4 + transit * 0.5, 2.0);
219
+ float heatCap = min(uHover.z + uPulseBoost * 1.4 + transit * 0.5, 2.0);
220
+ float breath = 1.0 + uFlicker * 0.6 * wobble(vec2(t * 2.1, 7.0), 3u);
221
+ float grow = uPresence;
222
+
223
+ float edge = abs(base);
224
+ vec2 halo = aura(pr, k);
225
+ float ink = uInk;
226
+ float bloom = (halo.x * 0.16 + halo.y * 0.08) * (1.0 - ink * 0.65) * uGlow * (1.0 + heat * 1.2);
227
+ float body = smoothstep(0.75, -0.75, base) * uFill * (0.06 + 1.2 * min(halo.x, 1.0)) * (1.0 + heat * 0.5);
228
+ light += uGlowColor * bloom * grow * grow;
229
+ energy += bloom * grow * grow;
230
+
231
+ float reachScale = mix(0.15, 1.0, grow) * (1.0 + heat * 0.9);
232
+ float reach = (uUnit * uBend * 16.0 + uCrackle * 3.0) * (1.0 + heatCap * 0.9) + uThickness * 20.0 + 8.0;
233
+ if (edge < reach && grow > 0.0) {
234
+ float fade = smoothstep(reach, reach * 0.55, edge);
235
+ vec2 q = pr / uUnit;
236
+ float count = min(uStrands + heat * 2.5, 6.0);
237
+ float limit = min(uStrands + heatCap * 2.5, 6.0);
238
+ for (int i = 0; i < 6; i++) {
239
+ float fi = float(i);
240
+ if (fi >= limit) break;
241
+ float present = clamp(count - fi, 0.0, 1.0);
242
+ if (present <= 0.0) continue;
243
+ uint seed = uint(i) * 7u + 3u;
244
+ mat2 jac;
245
+ vec2 sway;
246
+ float lead = i == 0 ? 1.0 : 0.0;
247
+ vec2 warped = pr + wander(pr, t * (1.0 + fi * 0.19), seed, reachScale * mix(0.6 + fi * 0.2, 0.7, lead), jac, sway);
248
+ float dw = shape(warped, k);
249
+ vec2 slope = vec2(shape(warped + vec2(1.0, 0.0), k), shape(warped + vec2(0.0, 1.0), k)) - dw;
250
+ float d = dw / max(length(slope + jac * slope), 0.3);
251
+ float spread = shape(pr + sway, k);
252
+ float swell = 0.5 + 0.5 * wobble(q * 0.06 + vec2(t * 0.9, fi * 5.1 - t * 0.6), seed + 8u);
253
+ float w = uThickness * mix(0.5, 1.0, lead) * (0.5 + swell);
254
+ float vis = mix(0.3 + 0.45 * smoothstep(-0.25, 0.2, wobble(q * 0.035 + vec2(t * 0.21, fi * 3.7), seed + 5u)), 1.0, lead);
255
+ float spark = 1.0 - uFlicker * 0.3 * (0.5 + 0.5 * wobble(vec2(t * 6.0, fi * 2.3), seed + 6u));
256
+ float weight = max(vis, heat * 0.85) * spark * fade * present * (0.7 + 0.6 * swell);
257
+ vec2 g = glowShape(d, spread, w) * weight;
258
+ float soft = mix(1.0, mix(0.5, 1.0, lead), ink);
259
+ vec3 stroke = mix(uColor, uGlowColor, ink * (1.0 - lead) * 0.65);
260
+ float haze = uGlow * (1.0 + heat) * (1.0 - ink * 0.7);
261
+ light += stroke * g.x * soft + uGlowColor * g.y * haze;
262
+ energy += g.x * soft + g.y * haze;
263
+ hot += exp(-d * d / (w * w * 0.16)) * lead * weight;
264
+ }
265
+ light *= grow;
266
+ energy *= grow;
267
+ }
268
+
269
+ for (int i = 0; i < ${rt}; i++) addArc(pr, uArcEnds[i], uArcShape[i], t, light, energy, hot);
270
+
271
+ float gain = uIntensity * breath * (1.0 + heat * 0.45) * (1.0 + uFlash * 0.3) * 1.4;
272
+ float alpha = 1.0 - exp(-energy * gain);
273
+ vec3 color = mix(1.0 - exp(-light * gain), alpha * light / max(energy, 1e-4), ink);
274
+ color = mix(color, vec3(alpha), clamp(hot * grow, 0.0, 1.0) * ink * 0.85);
275
+ float tint = (1.0 - exp(-body * gain * 1.2)) * grow * grow * (1.0 - ink * 0.82);
276
+ color += uGlowColor * tint * (1.0 - alpha);
277
+ alpha += tint * (1.0 - alpha);
278
+ float grain = (fract(52.9829189 * fract(dot(gl_FragCoord.xy, vec2(0.06711056, 0.00583715)))) - 0.5) / 255.0;
279
+ alpha = clamp(alpha + grain, 0.0, 1.0);
280
+ fragColor = vec4(clamp(color + grain, 0.0, alpha), alpha);
281
+ }
282
+ `,cs=({src:e=ue,color:t="#ecc7ff",glowColor:i="#ad6dff",scale:s=.7,intensity:r=1,glow:n=1,thickness:h=1.5,strands:a=4,bend:l=.6,crackle:o=1.5,arcs:c=1,flicker:d=.6,fill:f=0,speed:g=2.5,interactive:u=!0,cursorIntensity:m=.75,cursorRadius:p=100,theme:x="dark",onRender:_,className:w="",style:v})=>{const M=at.useRef(null),[E,k]=at.useState(!1),O=at.useRef(null),U=at.useRef(null);return at.useEffect(()=>{O.current={color:t,glowColor:i,scale:s,intensity:r,glow:n,thickness:h,strands:a,bend:l,crackle:o,arcs:c,flicker:d,fill:f,speed:g,interactive:u,cursorIntensity:m,cursorRadius:p,theme:x,onRender:_}}),at.useEffect(()=>{let A=!0;const T=new Image;return T.crossOrigin="anonymous",T.decoding="async",T.onload=()=>{if(!A)return;let F=null;try{F=hs(T)}catch{F=null}F&&(U.current=F)},T.src=e||ue,()=>{A=!1,T.onload=null}},[e]),at.useEffect(()=>{const A=M.current;if(!A)return;let T,F=[],P,b=!1,G=!0,yt=!1;const nt=[],tt=()=>{if(b)return;b=!0,G=!1;for(const C of nt)C();const y=T?.gl;if(y){for(const C of F)y.deleteTexture(C.field.texture),y.deleteTexture(C.glow.texture);P?.geometry.remove(),P?.program.remove(),y.getExtension("WEBGL_lose_context")?.loseContext(),y.canvas.remove()}};try{T=new ii({dpr:Math.min(window.devicePixelRatio||1,2),alpha:!0,premultipliedAlpha:!0,antialias:!1});const y=T.gl;if(!T.isWebgl2){tt();return}y.clearColor(0,0,0,0);const C=y.canvas;C.style.display="block",C.style.width="100%",C.style.height="100%",A.appendChild(C);const B=()=>({shape:null,field:new ge(y,{image:new Float32Array([1e3]),width:1,height:1,internalFormat:y.R16F,format:y.RED,type:y.FLOAT,minFilter:y.LINEAR,magFilter:y.LINEAR,generateMipmaps:!1,flipY:!1,unpackAlignment:1}),glow:new ge(y,{image:new Float32Array([0,0]),width:1,height:1,internalFormat:y.RG16F,format:y.RG,type:y.FLOAT,minFilter:y.LINEAR,magFilter:y.LINEAR,generateMipmaps:!1,flipY:!1,unpackAlignment:1})});F=[B(),B()];const j=Array.from({length:rt*4},()=>0),Y=Array.from({length:rt*4},()=>0),q=Array.from({length:xt*4},()=>0),S={tFieldFrom:{value:F[1].field},tGlowFrom:{value:F[1].glow},tFieldTo:{value:F[0].field},tGlowTo:{value:F[0].glow},uMapFrom:{value:[0,0,1,0]},uSizeFrom:{value:[1,1,1,1]},uMapTo:{value:[0,0,1,0]},uSizeTo:{value:[1,1,1,1]},uMorph:{value:1},uResolution:{value:[1,1]},uUnit:{value:1},uTime:{value:0},uPresence:{value:0},uHover:{value:[0,0,0]},uHoverRadius:{value:120},uPulses:{value:q},uPulseBoost:{value:0},uFlash:{value:0},uColor:{value:[1,1,1]},uGlowColor:{value:[.43,.48,1]},uIntensity:{value:1},uGlow:{value:1},uThickness:{value:1.8},uStrands:{value:3},uBend:{value:1},uCrackle:{value:1},uFlicker:{value:.4},uFill:{value:.5},uInk:{value:0},uArcEnds:{value:j},uArcShape:{value:Y}};if(P=new ts(y,{geometry:new is(y),program:new Qe(y,{vertex:ls,fragment:as,uniforms:S,depthTest:!1,depthWrite:!1})}),!y.getProgramParameter(P.program.program,y.LINK_STATUS)){tt();return}const vt=window.matchMedia?.("(prefers-reduced-motion: reduce)").matches??!1,W={x:0,y:0,over:!1},D={x:0,y:0,vx:0,vy:0,power:0},Z=[],ht=[];let J=0,ft=null,H=1,wt=null,dt=0,_t=0;const Mt=[[1,1,1],[1,1,1]];let Dt=!1,lt=0,ot=1,ct=1,et=0,Ft=performance.now(),it=!0;const _e=(L,R)=>{L.shape=R,L.field.image=R.field,L.field.width=R.width,L.field.height=R.height,L.field.needsUpdate=!0,L.glow.image=R.glow,L.glow.width=R.glowWidth,L.glow.height=R.glowHeight,L.glow.needsUpdate=!0},Bt=(L,R)=>{const X=Math.max(1e-4,Math.min(ot*R.scale/L.logoWidth,ct*R.scale/L.logoHeight));return{fit:X,ox:ot/2-(L.pad+L.logoWidth/2)*X,oy:ct/2-(L.pad+L.logoHeight/2)*X,unit:Math.max(L.logoWidth,L.logoHeight)*X/100}},Nt=()=>{ot=Math.max(1,A.clientWidth),ct=Math.max(1,A.clientHeight),T.dpr=Math.min(window.devicePixelRatio||1,2,Math.sqrt(rs/(ot*ct))),T.setSize(ot,ct),S.uResolution.value=[ot,ct]},Gt=L=>{if(et=0,!it||!G)return;const R=O.current,X=Math.min(.05,Math.max(0,(L-Ft)/1e3));Ft=L;const St=U.current;St&&St!==F[J].shape&&(ft=St),ft&&H>=1&&(F[J].shape&&(J=1-J,H=0,Z.length=0),_e(F[J],ft),ft=null),H<1&&(H=Math.min(1,H+X/(ft?.3:1.6)));const Q=F[J].shape,st=H<1?F[1-J].shape:null;Q&&(dt=Math.min(1,dt+X/1.4));const At=dt*dt*(3-2*dt);if(Q&&R){const N=Bt(Q,R),gt=st?Bt(st,R):N,Fe=H*H*(3-2*H),Te=gt.unit+(N.unit-gt.unit)*Fe,Rt=R.interactive&&W.over;Rt&&D.power<.01&&(D.x=W.x,D.y=W.y,D.vx=0,D.vy=0),D.vx+=((W.x-D.x)*120-D.vx*19)*X,D.vy+=((W.y-D.y)*120-D.vy*19)*X,D.x+=D.vx*X,D.y+=D.vy*X,D.power+=((Rt?1:0)-D.power)*(1-Math.exp(-X/(Rt?.3:.55)));const Se=vt?.2:1;lt+=X*R.speed*Se;for(let z=Z.length-1;z>=0;z--)lt-Z[z].born>Z[z].life&&Z.splice(z,1);const Vt=z=>({x:(z.x-N.ox)/N.fit,y:(z.y-N.oy)/N.fit,radius:Math.max(1,R.cursorRadius)/N.fit});if(wt&&H>=1&&R.arcs>0)for(let z=0;z<3&&Z.length<rt;z++){const I=Ut(Q,lt,Vt(wt));I&&Z.push(I)}if(wt=null,!vt&&At>.8&&H>=1&&Z.length<rt){const z=X*R.speed*R.arcs;if(Math.random()<z*6*D.power*R.cursorIntensity){const I=Ut(Q,lt,Vt(D));I&&Z.push(I)}else if(Math.random()<z*2.2){const I=Ut(Q,lt,null);I&&Z.push(I)}}for(let z=0;z<rt;z++){const I=z*4,$=Z[z];if(!$){Y[I+1]=0;continue}const ut=(lt-$.born)/$.life;j[I]=N.ox+$.ax*N.fit,j[I+1]=N.oy+$.ay*N.fit,j[I+2]=N.ox+$.bx*N.fit,j[I+3]=N.oy+$.by*N.fit,Y[I]=$.bow*N.fit,Y[I+1]=Math.sin(Math.PI*Math.min(1,Math.max(0,ut)))*At,Y[I+2]=$.seed}let zt=0,Yt=0;for(let z=ht.length-1;z>=0;z--)(L-ht[z].born)/1e3>2&&ht.splice(z,1);for(let z=0;z<xt;z++){const I=z*4,$=ht[z];if(!$){q[I+3]=0;continue}const ut=(L-$.born)/1e3;q[I]=$.x,q[I+1]=$.y,q[I+2]=ut,q[I+3]=1,zt=Math.max(zt,Math.exp(-ut*1.7)),Yt+=Math.exp(-ut*7)}const Ht=F[1-J];S.tFieldTo.value=F[J].field,S.tGlowTo.value=F[J].glow,S.tFieldFrom.value=Ht.field,S.tGlowFrom.value=Ht.glow,S.uMapTo.value=[N.ox,N.oy,N.fit,Q.glowOffset],S.uSizeTo.value=[Q.width,Q.height,Q.glowWidth,Q.glowHeight],st&&(S.uMapFrom.value=[gt.ox,gt.oy,gt.fit,st.glowOffset],S.uSizeFrom.value=[st.width,st.height,st.glowWidth,st.glowHeight]),S.uMorph.value=H,S.uUnit.value=Te,S.uTime.value=lt,S.uPresence.value=At,S.uHover.value=[D.x,D.y,D.power*Math.max(0,R.cursorIntensity)],S.uHoverRadius.value=Math.max(1,R.cursorRadius),S.uPulseBoost.value=zt,S.uFlash.value=Yt;const Re=[pe(R.color),pe(R.glowColor)],ze=Dt?1-Math.exp(-X/.35):1;Dt=!0;for(let z=0;z<2;z++)for(let I=0;I<3;I++)Mt[z][I]+=(Re[z][I]-Mt[z][I])*ze;S.uColor.value=Mt[0].slice(),S.uGlowColor.value=Mt[1].slice(),S.uIntensity.value=R.intensity,S.uGlow.value=R.glow,S.uThickness.value=R.thickness,S.uStrands.value=Math.max(1,Math.min(6,Math.round(R.strands))),S.uBend.value=R.bend,S.uCrackle.value=R.crackle,S.uFlicker.value=vt?0:R.flicker,_t+=((R.theme==="light"?1:0)-_t)*(1-Math.exp(-X/.25)),S.uFill.value=R.fill,S.uInk.value=_t;try{T.render({scene:P})}catch{it=!1,G=!1,k(!1);return}At>=1&&!yt&&(yt=!0,k(!0)),R.onRender?.(C)}it&&(et=requestAnimationFrame(Gt))},qt=()=>{et||!it||!G||(Ft=performance.now(),et=requestAnimationFrame(Gt))},Tt=L=>{const R=A.getBoundingClientRect();W.x=L.clientX-R.left,W.y=L.clientY-R.top,W.over=!0},Xt=L=>{Tt(L),!(!O.current?.interactive||vt)&&(ht.push({x:W.x,y:W.y,born:performance.now()}),ht.length>xt&&ht.shift(),wt={x:W.x,y:W.y})},Et=()=>{W.over=!1};A.addEventListener("pointermove",Tt),A.addEventListener("pointerdown",Xt),A.addEventListener("pointerleave",Et),A.addEventListener("pointercancel",Et),nt.push(()=>{A.removeEventListener("pointermove",Tt),A.removeEventListener("pointerdown",Xt),A.removeEventListener("pointerleave",Et),A.removeEventListener("pointercancel",Et)});const jt=()=>{it=!1,G=!1,cancelAnimationFrame(et),k(!1)};C.addEventListener("webglcontextlost",jt),nt.push(()=>C.removeEventListener("webglcontextlost",jt));const $t=new ResizeObserver(Nt);nt.push(()=>$t.disconnect()),$t.observe(A);const Wt=new IntersectionObserver(([L])=>{it=L.isIntersecting,it||(cancelAnimationFrame(et),et=0),qt()});return nt.push(()=>Wt.disconnect()),Wt.observe(A),Nt(),qt(),()=>{it=!1,cancelAnimationFrame(et),tt()}}catch{tt();return}},[]),Ce.jsx("div",{ref:M,className:`electric-logo ${w}`.trim(),style:v,"data-electric-state":E?"ready":"loading"})};export{cs as default};
@@ -1 +1 @@
1
- import{j as o}from"./__vite-browser-external-DWN9Fb-H.js";import{m as s}from"./react-CCNSVHEA.js";import{u as d}from"./use-reduced-motion-C3MBYVqm.js";function m({children:i,delay:t=0,duration:n=.35,y:e=12,className:r="",once:a=!0}){return d()?o.jsx("div",{className:r,children:i}):o.jsx(s.div,{initial:{opacity:0,y:e},animate:{opacity:1,y:0},transition:{duration:n,delay:t,ease:[.16,1,.3,1]},className:r,children:i})}function p({children:i,staggerDelay:t=.1,initialDelay:n=0,className:e=""}){return d()?o.jsx("div",{className:e,children:i}):o.jsx(s.div,{initial:"hidden",animate:"visible",variants:{hidden:{},visible:{transition:{staggerChildren:t,delayChildren:n}}},className:e,children:i})}function x({children:i,className:t="",y:n=12}){return d()?o.jsx("div",{className:t,children:i}):o.jsx(s.div,{variants:{hidden:{opacity:0,y:n},visible:{opacity:1,y:0,transition:{duration:.35,ease:[.16,1,.3,1]}}},className:t,children:i})}export{m as F,p as S,x as a};
1
+ import{j as o}from"./__vite-browser-external-BXwSXUpN.js";import{m as s}from"./react-BMJ2wuz1.js";import{u as d}from"./use-reduced-motion-C6zOHbfR.js";function m({children:i,delay:t=0,duration:n=.35,y:e=12,className:r="",once:a=!0}){return d()?o.jsx("div",{className:r,children:i}):o.jsx(s.div,{initial:{opacity:0,y:e},animate:{opacity:1,y:0},transition:{duration:n,delay:t,ease:[.16,1,.3,1]},className:r,children:i})}function p({children:i,staggerDelay:t=.1,initialDelay:n=0,className:e=""}){return d()?o.jsx("div",{className:e,children:i}):o.jsx(s.div,{initial:"hidden",animate:"visible",variants:{hidden:{},visible:{transition:{staggerChildren:t,delayChildren:n}}},className:e,children:i})}function x({children:i,className:t="",y:n=12}){return d()?o.jsx("div",{className:t,children:i}):o.jsx(s.div,{variants:{hidden:{opacity:0,y:n},visible:{opacity:1,y:0,transition:{duration:.35,ease:[.16,1,.3,1]}}},className:t,children:i})}export{m as F,p as S,x as a};
@@ -1 +1 @@
1
- import{r as s,s as c,j as t,c as d}from"./__vite-browser-external-DWN9Fb-H.js";function h({repo:r="xiufengsun/TokenTracker"}){const[a,n]=s.useState(null);return s.useEffect(()=>{if(typeof window>"u")return;const o=typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,i=typeof document<"u"&&(document.documentElement?.classList.contains("screenshot-capture")||document.body?.classList.contains("screenshot-capture"));c({prefersReducedMotion:o,screenshotCapture:i})&&fetch(`https://api.github.com/repos/${r}`).then(e=>e.json()).then(e=>{e&&typeof e.stargazers_count=="number"&&n(e.stargazers_count)}).catch(()=>{})},[r]),t.jsxs("a",{href:`https://github.com/${r}`,target:"_blank",rel:"noopener noreferrer",className:"inline-flex shrink-0 items-center gap-2 px-3 py-1.5 rounded-md border border-oai-gray-200 dark:border-oai-gray-700 bg-oai-gray-50 dark:bg-oai-gray-800 hover:bg-oai-gray-100 dark:hover:bg-oai-gray-700 transition-colors no-underline",children:[t.jsx("svg",{height:"16",viewBox:"0 0 16 16",width:"16",className:"shrink-0 fill-oai-gray-700 dark:fill-oai-gray-300",children:t.jsx("path",{d:"M8 0c4.42 0 8 3.58 8 8a8.013 8.013 0 0 1-5.45 7.59c-.4.08-.55-.17-.55-.38 0-.27.01-1.13.01-2.2 0-.75-.25-1.23-.54-1.48 1.78-.2 3.65-.88 3.65-3.95 0-.88-.31-1.59-.82-2.15.08-.2.36-1.02-.08-2.12 0 0-.67-.22-2.2.82-.64-.18-1.32-.27-2-.27-.68 0-1.36.09-2 .27-1.53-1.03-2.2-.82-2.2-.82-.44 1.1-.16 1.92-.08 2.12-.51.56-.82 1.28-.82 2.15 0 3.06 1.86 3.75 3.64 3.95-.23.2-.44.55-.51 1.07-.46.21-1.61.55-2.33-.66-.15-.24-.6-.83-1.23-.82-.67.01-.27.38.01.53.34.19.73.9.82 1.13.16.45.68 1.31 2.69.94 0 .67.01 1.3.01 1.49 0 .21-.15.45-.55.38A7.995 7.995 0 0 1 0 8c0-4.42 3.58-8 8-8Z"})}),t.jsx("span",{className:"text-xs font-medium text-oai-gray-700 dark:text-oai-gray-300 whitespace-nowrap",children:d("shared.github.star")}),a!==null&&t.jsx("span",{className:"text-xs font-semibold text-oai-gray-900 dark:text-oai-white tabular-nums whitespace-nowrap",children:a})]})}export{h as H};
1
+ import{r as s,s as c,j as t,c as d}from"./__vite-browser-external-BXwSXUpN.js";function h({repo:r="xiufengsun/TokenTracker"}){const[a,n]=s.useState(null);return s.useEffect(()=>{if(typeof window>"u")return;const o=typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,i=typeof document<"u"&&(document.documentElement?.classList.contains("screenshot-capture")||document.body?.classList.contains("screenshot-capture"));c({prefersReducedMotion:o,screenshotCapture:i})&&fetch(`https://api.github.com/repos/${r}`).then(e=>e.json()).then(e=>{e&&typeof e.stargazers_count=="number"&&n(e.stargazers_count)}).catch(()=>{})},[r]),t.jsxs("a",{href:`https://github.com/${r}`,target:"_blank",rel:"noopener noreferrer",className:"inline-flex shrink-0 items-center gap-2 px-3 py-1.5 rounded-md border border-oai-gray-200 dark:border-oai-gray-700 bg-oai-gray-50 dark:bg-oai-gray-800 hover:bg-oai-gray-100 dark:hover:bg-oai-gray-700 transition-colors no-underline",children:[t.jsx("svg",{height:"16",viewBox:"0 0 16 16",width:"16",className:"shrink-0 fill-oai-gray-700 dark:fill-oai-gray-300",children:t.jsx("path",{d:"M8 0c4.42 0 8 3.58 8 8a8.013 8.013 0 0 1-5.45 7.59c-.4.08-.55-.17-.55-.38 0-.27.01-1.13.01-2.2 0-.75-.25-1.23-.54-1.48 1.78-.2 3.65-.88 3.65-3.95 0-.88-.31-1.59-.82-2.15.08-.2.36-1.02-.08-2.12 0 0-.67-.22-2.2.82-.64-.18-1.32-.27-2-.27-.68 0-1.36.09-2 .27-1.53-1.03-2.2-.82-2.2-.82-.44 1.1-.16 1.92-.08 2.12-.51.56-.82 1.28-.82 2.15 0 3.06 1.86 3.75 3.64 3.95-.23.2-.44.55-.51 1.07-.46.21-1.61.55-2.33-.66-.15-.24-.6-.83-1.23-.82-.67.01-.27.38.01.53.34.19.73.9.82 1.13.16.45.68 1.31 2.69.94 0 .67.01 1.3.01 1.49 0 .21-.15.45-.55.38A7.995 7.995 0 0 1 0 8c0-4.42 3.58-8 8-8Z"})}),t.jsx("span",{className:"text-xs font-medium text-oai-gray-700 dark:text-oai-gray-300 whitespace-nowrap",children:d("shared.github.star")}),a!==null&&t.jsx("span",{className:"text-xs font-semibold text-oai-gray-900 dark:text-oai-white tabular-nums whitespace-nowrap",children:a})]})}export{h as H};
@@ -1 +1 @@
1
- import{j as t,y as a}from"./__vite-browser-external-DWN9Fb-H.js";function i({text:o,placement:r="top"}){return o?t.jsx("div",{role:"tooltip",className:a("pointer-events-none absolute left-1/2 z-10 w-max max-w-[260px] -translate-x-1/2 whitespace-pre-line rounded-xl border border-oai-gray-200/50 dark:border-oai-gray-800/50 bg-white/90 dark:bg-oai-gray-900/90 backdrop-blur-md px-2.5 py-1.5 text-[10.5px] leading-snug text-oai-gray-700 dark:text-oai-gray-200 shadow-xl opacity-0 transition-opacity duration-150 group-hover:opacity-100",r==="bottom"?"top-full mt-2":"bottom-full mb-2"),children:o}):null}export{i as H};
1
+ import{j as t,y as a}from"./__vite-browser-external-BXwSXUpN.js";function i({text:o,placement:r="top"}){return o?t.jsx("div",{role:"tooltip",className:a("pointer-events-none absolute left-1/2 z-10 w-max max-w-[260px] -translate-x-1/2 whitespace-pre-line rounded-xl border border-oai-gray-200/50 dark:border-oai-gray-800/50 bg-white/90 dark:bg-oai-gray-900/90 backdrop-blur-md px-2.5 py-1.5 text-[10.5px] leading-snug text-oai-gray-700 dark:text-oai-gray-200 shadow-xl opacity-0 transition-opacity duration-150 group-hover:opacity-100",r==="bottom"?"top-full mt-2":"bottom-full mb-2"),children:o}):null}export{i as H};
@@ -1,4 +1,4 @@
1
- import{r as ge,c as t,j as n}from"./__vite-browser-external-DWN9Fb-H.js";const Ge=typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"),j=Ge?"/proxy/ipcheck":"https://ip.net.coffee",fe="claude_ip_history",Se=6,Ue=["CN","HK","MO","RU","KP","IR","SY","CU","BY","VE"],ze={CN:"Asia/Shanghai",TW:"Asia/Taipei",HK:"Asia/Hong_Kong",MO:"Asia/Macau",JP:"Asia/Tokyo",KR:"Asia/Seoul",SG:"Asia/Singapore",MY:"Asia/Kuala_Lumpur",TH:"Asia/Bangkok",VN:"Asia/Ho_Chi_Minh",ID:"Asia/Jakarta",PH:"Asia/Manila",IN:"Asia/Kolkata",PK:"Asia/Karachi",BD:"Asia/Dhaka",IR:"Asia/Tehran",IL:"Asia/Jerusalem",AE:"Asia/Dubai",SA:"Asia/Riyadh",TR:"Europe/Istanbul",RU:"Europe/Moscow",UA:"Europe/Kyiv",GB:"Europe/London",IE:"Europe/Dublin",FR:"Europe/Paris",DE:"Europe/Berlin",IT:"Europe/Rome",ES:"Europe/Madrid",PT:"Europe/Lisbon",NL:"Europe/Amsterdam",BE:"Europe/Brussels",CH:"Europe/Zurich",AT:"Europe/Vienna",SE:"Europe/Stockholm",NO:"Europe/Oslo",DK:"Europe/Copenhagen",FI:"Europe/Helsinki",PL:"Europe/Warsaw",CZ:"Europe/Prague",GR:"Europe/Athens",RO:"Europe/Bucharest",US:"America/Los_Angeles",CA:"America/Toronto",MX:"America/Mexico_City",BR:"America/Sao_Paulo",AR:"America/Argentina/Buenos_Aires",CL:"America/Santiago",AU:"Australia/Sydney",NZ:"Pacific/Auckland",ZA:"Africa/Johannesburg",EG:"Africa/Cairo",NG:"Africa/Lagos",KE:"Africa/Nairobi"},We={CN:["zh"],TW:["zh"],HK:["zh","en"],MO:["zh","en"],JP:["ja"],KR:["ko"],TH:["th"],VN:["vi"],SG:["en","zh","ms","ta"],MY:["ms","en","zh","ta"],ID:["id","en"],PH:["en","tl","fil"],IN:["en","hi"],PK:["ur","en"],BD:["bn","en"],LK:["si","ta","en"],NP:["ne","en"],US:["en"],GB:["en"],IE:["en","ga"],AU:["en"],NZ:["en","mi"],CA:["en","fr"],DE:["de"],AT:["de"],CH:["de","fr","it","rm"],BE:["nl","fr","de"],FR:["fr"],IT:["it"],ES:["es","ca","gl","eu"],PT:["pt"],NL:["nl","fy"],LU:["lb","fr","de"],SE:["sv"],NO:["no","nb","nn"],DK:["da"],FI:["fi","sv"],IS:["is","en"],PL:["pl"],CZ:["cs"],SK:["sk"],HU:["hu"],RO:["ro"],BG:["bg"],GR:["el"],RU:["ru"],UA:["uk","ru"],BY:["be","ru"],TR:["tr"],IL:["he","ar","en"],SA:["ar"],AE:["ar","en"],EG:["ar"],IR:["fa"],IQ:["ar","ku"],ZA:["en","af","zu","xh"],KE:["en","sw"],NG:["en"],ET:["am","en"],BR:["pt"],AR:["es"],MX:["es"],CL:["es"],CO:["es"],PE:["es"],VE:["es"]},Be={jp:"Japan",tw:"Taiwan",hk:"Hong Kong",sg:"Singapore",us:"United States",de:"Germany",kr:"South Korea",fr:"France",nl:"Netherlands",gb:"United Kingdom",au:"Australia",ca:"Canada",br:"Brazil",in:"India"};function Z(p){return!!p&&p.includes(":")}function Ke(p){return!Z(p)||p.length<=20?p:p.substring(0,18)+"..."}function w(p){return p==null?"":String(p).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function B(p){if(!p||!/^[a-zA-Z]{2}$/.test(p))return"";const b=p.toLowerCase();return`<img src="${b==="cn"?`${j}/favicons/cn.png`:b==="tw"?`${j}/favicons/flags/tw.png`:`${j}/favicons/flags/${b}.png`}" alt="${b}" class="inline-block h-4 w-auto align-[-2px]" onerror="this.onerror=null;this.style.display='none'">`}function Fe(p){if(!p)return"";const b=String(p).trim();if(/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/.test(b)){const S=b.split(".");return S[0]+"."+S[1]+".*.*"}if(b.includes("…")){const S=b.lastIndexOf("…");return b.substring(0,S+1)+"*"}if(b.includes(":")){const S=b.split(":");if(S.length>=2)return S[0]+":"+S[1]+":*"}return b}function Ve(p){if(!p)return null;try{const S=new Intl.DateTimeFormat("en-US",{timeZone:p,timeZoneName:"longOffset"}).formatToParts(new Date).find(q=>q.type==="timeZoneName");if(!S)return null;if(S.value==="GMT"||S.value==="UTC")return 0;const M=S.value.match(/GMT([+-])(\d{1,2}):?(\d{0,2})/);return M?(M[1]==="+"?1:-1)*(parseInt(M[2],10)*60+parseInt(M[3]||"0",10)):null}catch{return null}}function Ye(p){if(p==null)return"";const b=p>=0?"+":"-",S=Math.abs(p),M=Math.floor(S/60),D=S%60;return"UTC"+b+M+(D?":"+String(D).padStart(2,"0"):"")}const Te={safe:"bg-emerald-50 text-emerald-700 dark:bg-emerald-500/15 dark:text-emerald-300",warn:"bg-amber-50 text-amber-800 dark:bg-amber-500/15 dark:text-amber-300",danger:"bg-red-50 text-red-700 dark:bg-red-500/15 dark:text-red-300",info:"bg-blue-50 text-blue-700 dark:bg-blue-500/15 dark:text-blue-300",neutral:"bg-oai-gray-100 text-oai-gray-600 dark:bg-oai-gray-800 dark:text-oai-gray-400"};function Je(){const p=ge.useRef(null),[b,S]=ge.useState(!1);ge.useEffect(()=>{const _=p.current;if(!_)return;const C=a=>_.querySelector(`#${a}`);let se=!1;const e={unknown:t("ipcheck.common.unknown"),failed:t("ipcheck.ip.failed"),regionAccessible:t("ipcheck.trust.region.accessible"),regionWarnTitle:a=>t("ipcheck.trust.region_warn.title",{region:a}),regionWarnBody:t("ipcheck.trust.region_warn.body"),regionRestrictedText:t("ipcheck.trust.text.restricted"),noData:t("ipcheck.trust.no_data"),noIp:t("ipcheck.trust.no_ip"),noScore:t("ipcheck.trust.no_score"),score:{pristine:t("ipcheck.trust.label.pristine"),clean:t("ipcheck.trust.label.clean"),good:t("ipcheck.trust.label.good"),neutral:t("ipcheck.trust.label.neutral"),suspicious:t("ipcheck.trust.label.suspicious"),unreachable:t("ipcheck.trust.label.unreachable")},scoreText:{excellent:t("ipcheck.trust.text.excellent"),great:t("ipcheck.trust.text.great"),minor:t("ipcheck.trust.text.minor"),moderate:t("ipcheck.trust.text.moderate"),severe:t("ipcheck.trust.text.severe")},propsRegion:t("ipcheck.props.region"),propsCity:t("ipcheck.props.city"),propsType:t("ipcheck.props.type"),propsAsn:t("ipcheck.props.asn"),propsOrg:t("ipcheck.props.org"),propsResidential:t("ipcheck.props.residential"),propsDatacenter:t("ipcheck.props.datacenter"),secVpn:t("ipcheck.security.vpn"),secProxy:t("ipcheck.security.proxy"),secTor:t("ipcheck.security.tor"),secCrawler:t("ipcheck.security.crawler"),secAbuser:t("ipcheck.security.abuser"),secProxyFlag:t("ipcheck.security.proxy_flag"),secCrawlerYes:t("ipcheck.security.crawler_yes"),secCrawlerNo:t("ipcheck.security.crawler_no"),secAbuserYes:t("ipcheck.security.abuser_yes"),secAbuserNo:t("ipcheck.security.abuser_no"),secClean:t("ipcheck.security.clean"),availSvc:t("ipcheck.avail.svc_row"),availLat:{normal:t("ipcheck.avail.latency.normal"),good:t("ipcheck.avail.latency.good"),slow:t("ipcheck.avail.latency.slow"),unreachable:t("ipcheck.avail.latency.unreachable")},availSvcStatus:{none:t("ipcheck.avail.svc.none"),minor:t("ipcheck.avail.svc.minor"),major:t("ipcheck.avail.svc.major"),critical:t("ipcheck.avail.svc.critical"),maintenance:t("ipcheck.avail.svc.maintenance"),other:t("ipcheck.avail.svc.other")},dnsStatus:t("ipcheck.dns.status"),dnsOutlet:t("ipcheck.dns.outlet"),dnsOutletIp:t("ipcheck.dns.outlet_ip"),dnsIsp:t("ipcheck.dns.isp"),dnsLeaked:t("ipcheck.dns.leaked"),dnsNoLeak:t("ipcheck.dns.no_leak"),dnsEncrypted:t("ipcheck.dns.encrypted"),dnsCnTag:t("ipcheck.dns.cn_tag"),udpStatus:t("ipcheck.udp.status"),udpOutlet:t("ipcheck.udp.outlet"),udpOutletIp:t("ipcheck.udp.outlet_ip"),udpOrigin:t("ipcheck.udp.origin"),udpDisabled:t("ipcheck.udp.disabled"),udpNoLeak:t("ipcheck.udp.no_leak"),udpLeaked:t("ipcheck.udp.leaked"),udpAnomaly:t("ipcheck.udp.anomaly"),devTz:t("ipcheck.device.tz"),devLang:t("ipcheck.device.lang"),devOs:t("ipcheck.device.os"),devTouch:t("ipcheck.device.touch"),devNet:t("ipcheck.device.net"),devDnt:t("ipcheck.device.dnt"),devWebglRender:t("ipcheck.device.webgl_render"),devCanvasFp:t("ipcheck.device.canvas_fp"),devWebglFp:t("ipcheck.device.webgl_fp"),devMatch:t("ipcheck.device.match"),devMismatch:t("ipcheck.device.mismatch"),devLocal:t("ipcheck.device.local"),devEstSuffix:t("ipcheck.device.estimate_suffix"),devDiffEqual:t("ipcheck.device.diff_equal"),devDiffAhead:a=>t("ipcheck.device.diff_ahead",{h:a}),devDiffBehind:a=>t("ipcheck.device.diff_behind",{h:a}),devLangExpected:t("ipcheck.device.lang_expected"),devTouchYes:t("ipcheck.device.touch_yes"),devTouchNo:t("ipcheck.device.touch_no"),devDntOn:t("ipcheck.device.dnt_on"),devDntOff:t("ipcheck.device.dnt_off"),devDntUnset:t("ipcheck.device.dnt_unset"),devNetUnsupported:t("ipcheck.device.net_unsupported"),devUnsupported:t("ipcheck.device.unsupported"),histEmpty:t("ipcheck.history.empty"),histCurrent:t("ipcheck.history.current"),histLoading:t("ipcheck.ip.loading")};function f(a,i="neutral"){return`<span class="inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium ${Te[i]||Te.neutral}">${a}</span>`}function J(a,i,r){return a===!0?f(i,"danger"):a===!1?f(r,"safe"):f(e.unknown,"neutral")}function he(a){if(!a)return`<span class="text-oai-gray-400 dark:text-oai-gray-500">${w(e.failed)}</span>`;const i=w(a);return Z(a)?`<span class="ip-mask-target truncate" title="${i}">${w(Ke(a))}</span>`:`<span class="ip-mask-target">${i}</span>`}function K(a){return a?`<span class="ip-link">${he(a)}</span>`:`<span class="text-oai-gray-400 dark:text-oai-gray-500">${w(e.failed)}</span>`}function d(a,i,r=!1){let u=i;return i===void 0?r?u=`<div class="inline-flex items-center gap-1.5 text-xs text-oai-gray-400">
1
+ import{r as ge,c as t,j as n}from"./__vite-browser-external-BXwSXUpN.js";const Ge=typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"),j=Ge?"/proxy/ipcheck":"https://ip.net.coffee",fe="claude_ip_history",Se=6,Ue=["CN","HK","MO","RU","KP","IR","SY","CU","BY","VE"],ze={CN:"Asia/Shanghai",TW:"Asia/Taipei",HK:"Asia/Hong_Kong",MO:"Asia/Macau",JP:"Asia/Tokyo",KR:"Asia/Seoul",SG:"Asia/Singapore",MY:"Asia/Kuala_Lumpur",TH:"Asia/Bangkok",VN:"Asia/Ho_Chi_Minh",ID:"Asia/Jakarta",PH:"Asia/Manila",IN:"Asia/Kolkata",PK:"Asia/Karachi",BD:"Asia/Dhaka",IR:"Asia/Tehran",IL:"Asia/Jerusalem",AE:"Asia/Dubai",SA:"Asia/Riyadh",TR:"Europe/Istanbul",RU:"Europe/Moscow",UA:"Europe/Kyiv",GB:"Europe/London",IE:"Europe/Dublin",FR:"Europe/Paris",DE:"Europe/Berlin",IT:"Europe/Rome",ES:"Europe/Madrid",PT:"Europe/Lisbon",NL:"Europe/Amsterdam",BE:"Europe/Brussels",CH:"Europe/Zurich",AT:"Europe/Vienna",SE:"Europe/Stockholm",NO:"Europe/Oslo",DK:"Europe/Copenhagen",FI:"Europe/Helsinki",PL:"Europe/Warsaw",CZ:"Europe/Prague",GR:"Europe/Athens",RO:"Europe/Bucharest",US:"America/Los_Angeles",CA:"America/Toronto",MX:"America/Mexico_City",BR:"America/Sao_Paulo",AR:"America/Argentina/Buenos_Aires",CL:"America/Santiago",AU:"Australia/Sydney",NZ:"Pacific/Auckland",ZA:"Africa/Johannesburg",EG:"Africa/Cairo",NG:"Africa/Lagos",KE:"Africa/Nairobi"},We={CN:["zh"],TW:["zh"],HK:["zh","en"],MO:["zh","en"],JP:["ja"],KR:["ko"],TH:["th"],VN:["vi"],SG:["en","zh","ms","ta"],MY:["ms","en","zh","ta"],ID:["id","en"],PH:["en","tl","fil"],IN:["en","hi"],PK:["ur","en"],BD:["bn","en"],LK:["si","ta","en"],NP:["ne","en"],US:["en"],GB:["en"],IE:["en","ga"],AU:["en"],NZ:["en","mi"],CA:["en","fr"],DE:["de"],AT:["de"],CH:["de","fr","it","rm"],BE:["nl","fr","de"],FR:["fr"],IT:["it"],ES:["es","ca","gl","eu"],PT:["pt"],NL:["nl","fy"],LU:["lb","fr","de"],SE:["sv"],NO:["no","nb","nn"],DK:["da"],FI:["fi","sv"],IS:["is","en"],PL:["pl"],CZ:["cs"],SK:["sk"],HU:["hu"],RO:["ro"],BG:["bg"],GR:["el"],RU:["ru"],UA:["uk","ru"],BY:["be","ru"],TR:["tr"],IL:["he","ar","en"],SA:["ar"],AE:["ar","en"],EG:["ar"],IR:["fa"],IQ:["ar","ku"],ZA:["en","af","zu","xh"],KE:["en","sw"],NG:["en"],ET:["am","en"],BR:["pt"],AR:["es"],MX:["es"],CL:["es"],CO:["es"],PE:["es"],VE:["es"]},Be={jp:"Japan",tw:"Taiwan",hk:"Hong Kong",sg:"Singapore",us:"United States",de:"Germany",kr:"South Korea",fr:"France",nl:"Netherlands",gb:"United Kingdom",au:"Australia",ca:"Canada",br:"Brazil",in:"India"};function Z(p){return!!p&&p.includes(":")}function Ke(p){return!Z(p)||p.length<=20?p:p.substring(0,18)+"..."}function w(p){return p==null?"":String(p).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function B(p){if(!p||!/^[a-zA-Z]{2}$/.test(p))return"";const b=p.toLowerCase();return`<img src="${b==="cn"?`${j}/favicons/cn.png`:b==="tw"?`${j}/favicons/flags/tw.png`:`${j}/favicons/flags/${b}.png`}" alt="${b}" class="inline-block h-4 w-auto align-[-2px]" onerror="this.onerror=null;this.style.display='none'">`}function Fe(p){if(!p)return"";const b=String(p).trim();if(/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/.test(b)){const S=b.split(".");return S[0]+"."+S[1]+".*.*"}if(b.includes("…")){const S=b.lastIndexOf("…");return b.substring(0,S+1)+"*"}if(b.includes(":")){const S=b.split(":");if(S.length>=2)return S[0]+":"+S[1]+":*"}return b}function Ve(p){if(!p)return null;try{const S=new Intl.DateTimeFormat("en-US",{timeZone:p,timeZoneName:"longOffset"}).formatToParts(new Date).find(q=>q.type==="timeZoneName");if(!S)return null;if(S.value==="GMT"||S.value==="UTC")return 0;const M=S.value.match(/GMT([+-])(\d{1,2}):?(\d{0,2})/);return M?(M[1]==="+"?1:-1)*(parseInt(M[2],10)*60+parseInt(M[3]||"0",10)):null}catch{return null}}function Ye(p){if(p==null)return"";const b=p>=0?"+":"-",S=Math.abs(p),M=Math.floor(S/60),D=S%60;return"UTC"+b+M+(D?":"+String(D).padStart(2,"0"):"")}const Te={safe:"bg-emerald-50 text-emerald-700 dark:bg-emerald-500/15 dark:text-emerald-300",warn:"bg-amber-50 text-amber-800 dark:bg-amber-500/15 dark:text-amber-300",danger:"bg-red-50 text-red-700 dark:bg-red-500/15 dark:text-red-300",info:"bg-blue-50 text-blue-700 dark:bg-blue-500/15 dark:text-blue-300",neutral:"bg-oai-gray-100 text-oai-gray-600 dark:bg-oai-gray-800 dark:text-oai-gray-400"};function Je(){const p=ge.useRef(null),[b,S]=ge.useState(!1);ge.useEffect(()=>{const _=p.current;if(!_)return;const C=a=>_.querySelector(`#${a}`);let se=!1;const e={unknown:t("ipcheck.common.unknown"),failed:t("ipcheck.ip.failed"),regionAccessible:t("ipcheck.trust.region.accessible"),regionWarnTitle:a=>t("ipcheck.trust.region_warn.title",{region:a}),regionWarnBody:t("ipcheck.trust.region_warn.body"),regionRestrictedText:t("ipcheck.trust.text.restricted"),noData:t("ipcheck.trust.no_data"),noIp:t("ipcheck.trust.no_ip"),noScore:t("ipcheck.trust.no_score"),score:{pristine:t("ipcheck.trust.label.pristine"),clean:t("ipcheck.trust.label.clean"),good:t("ipcheck.trust.label.good"),neutral:t("ipcheck.trust.label.neutral"),suspicious:t("ipcheck.trust.label.suspicious"),unreachable:t("ipcheck.trust.label.unreachable")},scoreText:{excellent:t("ipcheck.trust.text.excellent"),great:t("ipcheck.trust.text.great"),minor:t("ipcheck.trust.text.minor"),moderate:t("ipcheck.trust.text.moderate"),severe:t("ipcheck.trust.text.severe")},propsRegion:t("ipcheck.props.region"),propsCity:t("ipcheck.props.city"),propsType:t("ipcheck.props.type"),propsAsn:t("ipcheck.props.asn"),propsOrg:t("ipcheck.props.org"),propsResidential:t("ipcheck.props.residential"),propsDatacenter:t("ipcheck.props.datacenter"),secVpn:t("ipcheck.security.vpn"),secProxy:t("ipcheck.security.proxy"),secTor:t("ipcheck.security.tor"),secCrawler:t("ipcheck.security.crawler"),secAbuser:t("ipcheck.security.abuser"),secProxyFlag:t("ipcheck.security.proxy_flag"),secCrawlerYes:t("ipcheck.security.crawler_yes"),secCrawlerNo:t("ipcheck.security.crawler_no"),secAbuserYes:t("ipcheck.security.abuser_yes"),secAbuserNo:t("ipcheck.security.abuser_no"),secClean:t("ipcheck.security.clean"),availSvc:t("ipcheck.avail.svc_row"),availLat:{normal:t("ipcheck.avail.latency.normal"),good:t("ipcheck.avail.latency.good"),slow:t("ipcheck.avail.latency.slow"),unreachable:t("ipcheck.avail.latency.unreachable")},availSvcStatus:{none:t("ipcheck.avail.svc.none"),minor:t("ipcheck.avail.svc.minor"),major:t("ipcheck.avail.svc.major"),critical:t("ipcheck.avail.svc.critical"),maintenance:t("ipcheck.avail.svc.maintenance"),other:t("ipcheck.avail.svc.other")},dnsStatus:t("ipcheck.dns.status"),dnsOutlet:t("ipcheck.dns.outlet"),dnsOutletIp:t("ipcheck.dns.outlet_ip"),dnsIsp:t("ipcheck.dns.isp"),dnsLeaked:t("ipcheck.dns.leaked"),dnsNoLeak:t("ipcheck.dns.no_leak"),dnsEncrypted:t("ipcheck.dns.encrypted"),dnsCnTag:t("ipcheck.dns.cn_tag"),udpStatus:t("ipcheck.udp.status"),udpOutlet:t("ipcheck.udp.outlet"),udpOutletIp:t("ipcheck.udp.outlet_ip"),udpOrigin:t("ipcheck.udp.origin"),udpDisabled:t("ipcheck.udp.disabled"),udpNoLeak:t("ipcheck.udp.no_leak"),udpLeaked:t("ipcheck.udp.leaked"),udpAnomaly:t("ipcheck.udp.anomaly"),devTz:t("ipcheck.device.tz"),devLang:t("ipcheck.device.lang"),devOs:t("ipcheck.device.os"),devTouch:t("ipcheck.device.touch"),devNet:t("ipcheck.device.net"),devDnt:t("ipcheck.device.dnt"),devWebglRender:t("ipcheck.device.webgl_render"),devCanvasFp:t("ipcheck.device.canvas_fp"),devWebglFp:t("ipcheck.device.webgl_fp"),devMatch:t("ipcheck.device.match"),devMismatch:t("ipcheck.device.mismatch"),devLocal:t("ipcheck.device.local"),devEstSuffix:t("ipcheck.device.estimate_suffix"),devDiffEqual:t("ipcheck.device.diff_equal"),devDiffAhead:a=>t("ipcheck.device.diff_ahead",{h:a}),devDiffBehind:a=>t("ipcheck.device.diff_behind",{h:a}),devLangExpected:t("ipcheck.device.lang_expected"),devTouchYes:t("ipcheck.device.touch_yes"),devTouchNo:t("ipcheck.device.touch_no"),devDntOn:t("ipcheck.device.dnt_on"),devDntOff:t("ipcheck.device.dnt_off"),devDntUnset:t("ipcheck.device.dnt_unset"),devNetUnsupported:t("ipcheck.device.net_unsupported"),devUnsupported:t("ipcheck.device.unsupported"),histEmpty:t("ipcheck.history.empty"),histCurrent:t("ipcheck.history.current"),histLoading:t("ipcheck.ip.loading")};function f(a,i="neutral"){return`<span class="inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium ${Te[i]||Te.neutral}">${a}</span>`}function J(a,i,r){return a===!0?f(i,"danger"):a===!1?f(r,"safe"):f(e.unknown,"neutral")}function he(a){if(!a)return`<span class="text-oai-gray-400 dark:text-oai-gray-500">${w(e.failed)}</span>`;const i=w(a);return Z(a)?`<span class="ip-mask-target truncate" title="${i}">${w(Ke(a))}</span>`:`<span class="ip-mask-target">${i}</span>`}function K(a){return a?`<span class="ip-link">${he(a)}</span>`:`<span class="text-oai-gray-400 dark:text-oai-gray-500">${w(e.failed)}</span>`}function d(a,i,r=!1){let u=i;return i===void 0?r?u=`<div class="inline-flex items-center gap-1.5 text-xs text-oai-gray-400">
2
2
  <svg class="animate-spin-subtle h-3.5 w-3.5" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
3
3
  <circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="3"></circle>
4
4
  <path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path>