1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3554],{50230:function(e,t,n){n.d(t,{o:function(){return s}});var r=n(27573),a=n(7653),i=n(3458);let o="cursor-pointer rounded-[10px] border border-solid border-black bg-white p-[18px] font-sans font-semibold text-[20px] uppercase tracking-[0.4px] leading-[1.3] text-black transition-colors can-hover:hover:bg-black can-hover:hover:text-white",l="flex-1 cursor-pointer rounded-[6px] border-[1.324px] border-solid border-black bg-white px-[18px] py-[14px] font-sans font-semibold text-[12px] uppercase tracking-[0.24px] leading-[1.3] text-black";function s(e){let{rect:t,onConfirm:n,onCancel:s}=e;if((0,a.useEffect)(()=>{let e=e=>{"Escape"===e.key&&(e.stopPropagation(),s())};return window.addEventListener("keydown",e,!0),()=>window.removeEventListener("keydown",e,!0)},[s]),!t)return"undefined"==typeof document?null:(0,i.createPortal)((0,r.jsxs)("div",{className:"pointer-events-auto fixed inset-0 z-[110] flex items-center justify-center px-[20px]",children:[(0,r.jsx)("div",{className:"absolute inset-0 bg-black/60",onClick:s,"aria-hidden":"true"}),(0,r.jsxs)("div",{role:"alertdialog","aria-modal":"true","aria-label":"Discard form progress?",className:"relative flex w-full max-w-[353px] flex-col items-center gap-[30px] rounded-[6px] bg-white px-[20px] py-[24px] text-center",children:[(0,r.jsxs)("div",{className:"flex w-full flex-col gap-[6px]",children:[(0,r.jsx)("p",{className:"font-sans font-normal text-[20px] leading-[1.2] text-black",children:"Are you sure?"}),(0,r.jsx)("p",{className:"font-sans font-normal text-[14px] leading-[1.3] text-black/70",children:"Your progress will be lost without submitting."})]}),(0,r.jsxs)("div",{className:"flex w-full gap-[12px]",children:[(0,r.jsx)("button",{type:"button",onClick:n,className:l,children:"Yes, exit"}),(0,r.jsx)("button",{type:"button",onClick:s,className:l,children:"No, Continue"})]})]})]}),document.body);let u=t.width/1213;return(0,r.jsxs)("div",{className:"pointer-events-auto absolute z-[80]",style:{left:t.left,top:t.top,width:t.width,height:t.height},children:[(0,r.jsx)("div",{className:"absolute inset-0 bg-black/60",onClick:s,"aria-hidden":"true"}),(0,r.jsx)("div",{role:"alertdialog","aria-modal":"true","aria-label":"Discard form progress?",className:"absolute left-1/2 top-1/2 origin-center",style:{transform:"translate(-50%, -50%) scale(".concat(u,")")},children:(0,r.jsxs)("div",{className:"flex w-[436px] flex-col items-center gap-[50px] rounded-[6px] bg-white px-[20px] py-[30px] text-center",children:[(0,r.jsxs)("div",{className:"flex w-full flex-col gap-[6px]",children:[(0,r.jsx)("p",{className:"font-sans font-normal text-[28px] leading-[1.3] text-black",children:"Are you sure?"}),(0,r.jsx)("p",{className:"font-sans font-normal text-[14px] leading-[1.4] text-black",children:"Your progress will be lost without submitting."})]}),(0,r.jsxs)("div",{className:"flex gap-[20px]",children:[(0,r.jsx)("button",{type:"button",onClick:n,className:o,children:"Yes, exit"}),(0,r.jsx)("button",{type:"button",onClick:s,className:o,children:"No, Continue"})]})]})})]})}},67256:function(e,t,n){n.d(t,{p:function(){return p}});var r=n(27573),a=n(10607),i=n(30906);let o="#92efff",l={desktop:{labelGap:"gap-[20px]",labelClass:"font-mono text-[16px] uppercase tracking-[0.32px] text-white",inputClass:"w-full rounded-[6px] border border-solid bg-transparent p-[20px] font-sans font-light text-[26px] leading-[1.2] text-white placeholder:text-white/60 outline-none transition-colors",textareaMin:"min-h-[180px]",optionLabelClass:"font-mono text-[16px] uppercase tracking-[0.32px] leading-[1.3] text-white",textFieldsGrid:"grid-cols-2 gap-[40px]",fieldGap:"gap-[32px]",optionDotSize:"size-[20px]",optionGapY:"gap-y-[24px]",optionGapX:"gap-x-[40px]",customTextSize:"text-[16px]",customTextTracking:"tracking-[0.32px]"},mobile:{labelGap:"gap-[12px]",labelClass:"font-mono text-[14px] uppercase tracking-[0.28px] leading-[1.3] text-white",inputClass:"w-full rounded-[6px] border border-solid bg-transparent p-[16px] font-sans font-normal text-[16px] leading-[1.3] text-white placeholder:text-white/60 outline-none transition-colors",textareaMin:"min-h-[160px]",optionLabelClass:"font-mono text-[14px] uppercase tracking-[0.28px] leading-[1.3] text-white",textFieldsGrid:"grid-cols-1 gap-[30px]",fieldGap:"gap-[30px]",optionDotSize:"size-[20px]",optionGapY:"gap-y-[20px]",optionGapX:"gap-x-[20px]",customTextSize:"text-[16px]",customTextTracking:"tracking-[0.32px]"}};function s(e){let{field:t,value:n,invalid:i,variant:o,onChange:s}=e,u=l[o];return(0,r.jsxs)("label",{className:(0,a.Z)("flex w-full flex-col",u.labelGap),children:[t.label&&(0,r.jsx)("span",{className:(0,a.Z)(u.labelClass,i&&"text-[#ff6c6c]"),children:t.label}),(0,r.jsx)("input",{type:"email"===t.type?"email":"text",value:n,placeholder:t.placeholder,onChange:e=>
1s(e.target.value),"aria-invalid":i,className:(0,a.Z)(u.inputClass,i?"border-[#ff6c6c]":"border-white")})]})}function u(e){let{field:t,value:n,invalid:i,variant:o,onChange:s}=e,u=l[o];return(0,r.jsxs)("label",{className:(0,a.Z)("flex w-full flex-col",u.labelGap),children:[t.label&&(0,r.jsx)("span",{className:(0,a.Z)(u.labelClass,i&&"text-[#ff6c6c]"),children:t.label}),(0,r.jsx)("textarea",{value:n,placeholder:t.placeholder,onChange:e=>s(e.target.value),"aria-invalid":i,rows:5,className:(0,a.Z)(u.inputClass,u.textareaMin,"resize-none",i?"border-[#ff6c6c]":"border-white")})]})}function c(e){var t;let{field:n,selected:s,multi:u,variant:c,onToggle:p,values:d,onChange:f,errors:m}=e,h=l[c],v=(0,a.Z)("mt-[1px] flex shrink-0 items-center justify-center border border-solid border-white",h.optionDotSize,u?"rounded-[4px]":"rounded-full"),x=(0,a.Z)("size-[10px]",u?"rounded-[2px]":"rounded-full"),g="desktop"===c&&2===n.optionColumns;return(0,r.jsx)("div",{role:u?"group":"radiogroup",className:(0,a.Z)("grid w-full",h.optionGapX,h.optionGapY,g?"grid-cols-2":"grid-cols-1"),children:null===(t=n.options)||void 0===t?void 0:t.map(e=>{let t=s.includes(e.value),l=t?{borderColor:o}:void 0,c={backgroundColor:o};if(e.allowsCustomText&&t){var g;let t=(0,i.Q)(n.name,e.value),s=m.has(t);return(0,r.jsxs)("div",{className:"flex items-center gap-[14px]",children:[(0,r.jsx)("button",{type:"button",role:u?"checkbox":"radio","aria-checked":!0,onClick:()=>p(e.value),"aria-label":"Deselect ".concat(e.label),className:"cursor-pointer",children:(0,r.jsx)("span",{className:v,style:l,children:(0,r.jsx)("span",{className:x,style:c})})}),(0,r.jsx)("input",{type:"text",autoFocus:!0,value:null!==(g=d[t])&&void 0!==g?g:"",placeholder:e.customTextPlaceholder,onChange:e=>f(t,e.target.value),"aria-invalid":s,"aria-label":"".concat(e.label," â please specify"),className:(0,a.Z)("w-full border-0 border-b border-solid bg-transparent pb-[8px] font-mono uppercase leading-[1.3] text-white outline-none placeholder:text-white/40",h.customTextSize,h.customTextTracking,s?"border-[#ff6c6c]":"border-white"),style:{color:o}})]},e.value)}let y=t?{color:o}:void 0;return(0,r.jsxs)("button",{type:"button",role:u?"checkbox":"radio","aria-checked":t,onClick:()=>p(e.value),className:"flex cursor-pointer items-start gap-[14px] text-left can-hover:hover:opacity-80",children:[(0,r.jsx)("span",{className:v,style:l,children:t&&(0,r.jsx)("span",{className:x,style:c})}),(0,r.jsxs)("span",{className:"flex flex-col gap-[6px]",children:[(0,r.jsx)("span",{className:h.optionLabelClass,style:y,children:e.label}),e.description&&(0,r.jsx)("span",{className:"font-sans font-light text-[13px] leading-[1.3] text-white/55",style:y,children:e.description})]})]},e.value)})})}function p(e){let{step:t,values:n,onChange:i,errors:o,variant:p="desktop"}=e,d=l[p],f=t.fields.filter(e=>"text"===e.type||"email"===e.type||"textarea"===e.type),m=t.fields.filter(e=>"radio"===e.type||"checkbox"===e.type);return(0,r.jsxs)("div",{className:(0,a.Z)("flex flex-col",d.fieldGap),children:[f.length>0&&(0,r.jsx)("div",{className:(0,a.Z)("grid",d.textFieldsGrid),children:f.map(e=>{var t;let a=o.has(e.name),l=null!==(t=n[e.name])&&void 0!==t?t:"",c="mobile"===p?"":1===e.span?"col-span-1":"col-span-2";return(0,r.jsx)("div",{className:c,children:"textarea"===e.type?(0,r.jsx)(u,{field:e,value:l,invalid:a,variant:p,onChange:t=>i(e.name,t)}):(0,r.jsx)(s,{field:e,value:l,invalid:a,variant:p,onChange:t=>i(e.name,t)})},e.name)})}),m.map(e=>{var t;let a="checkbox"===e.type,l=null!==(t=n[e.name])&&void 0!==t?t:[];return(0,r.jsx)(c,{field:e,selected:l,multi:a,variant:p,onToggle:t=>{a?i(e.name,l.includes(t)?l.filter(e=>e!==t):[...l,t]):i(e.name,[t])},values:n,onChange:i,errors:o},e.name)})]})}},30906:function(e,t,n){function r(e,t){return"".concat(e,"__").concat(t,"__text")}function a(e,t){var n,a,i,o,l,s,u;let c=[];for(let p of null!==(n=null==e?void 0:e.steps)&&void 0!==n?n:[])for(let e of p.fields){let n=t[e.name];if("radio"===e.type||"checkbox"===e.type){let s=Array.isArray(n)?n:[];if(0===s.length)continue;let u=n=>{var a;return n?null===(a=t[r(e.name,n.value)])||void 0===a?void 0:a.trim():void 0};if("checkbox"===e.type){let t=null!==(i=null!==(a=e.receiptLabel)&&void 0!==a?a:e.label)&&void 0!==i?i:p.title;
1for(let n of(c.push({desc:t.toUpperCase(),qty:s.length}),null!==(o=e.options)&&void 0!==o?o:[])){if(!n.allowsCustomText||!s.includes(n.value))continue;let e=u(n);e&&c.push({desc:e.toUpperCase(),qty:1})}}else{let t=null===(l=e.options)||void 0===l?void 0:l.find(e=>e.value===s[0]),n=(null==t?void 0:t.allowsCustomText)?u(t):void 0;c.push({desc:(n||(null==t?void 0:t.label)||s[0]).toUpperCase(),qty:1})}}else{let t="string"==typeof n?n.trim():"";if(!t)continue;let r="textarea"===e.type?(null!==(u=null!==(s=e.receiptLabel)&&void 0!==s?s:e.label)&&void 0!==u?u:"").toUpperCase():t.toUpperCase();c.push({desc:r,qty:1})}}return c}n.d(t,{Q:function(){return r},c:function(){return a}})},22247:function(e,t,n){n.d(t,{i:function(){return p}});var r=n(27573),a=n(10607),i=n(7653),o=n(4154),l=n(2949);class s extends i.Component{static getDerivedStateFromError(){return{failed:!0}}render(){return this.state.failed?this.props.fallback:this.props.children}constructor(...e){super(...e),this.state={failed:!1}}}function u(){return(0,r.jsx)("div",{style:{width:39,height:39,borderRadius:"50%",background:"#7e6fff",animation:"contact-loader-pulse 1.2s ease-in-out infinite"}})}let c=()=>(0,r.jsx)("style",{children:"@keyframes contact-loader-pulse{0%,100%{opacity:.3;transform:scale(.85)}50%{opacity:1;transform:scale(1)}}"});function p(){let{progress:e,active:t,loaded:n}=(0,o.S)(),[p,d]=(0,i.useState)(!1),[f,m]=(0,i.useState)(!1),[h,v]=(0,i.useState)(!1),[x,g]=(0,i.useState)(!1);return((0,i.useEffect)(()=>{let e=setTimeout(()=>m(!0),800);return()=>clearTimeout(e)},[]),(0,i.useEffect)(()=>{n>0&&!t&&e>=100&&d(!0)},[n,t,e]),(0,i.useEffect)(()=>{if(!p||!f)return;let e=setTimeout(()=>v(!0),2e3);return()=>clearTimeout(e)},[p,f]),(0,i.useEffect)(()=>{if(!h)return;let e=setTimeout(()=>g(!0),550);return()=>clearTimeout(e)},[h]),(0,i.useEffect)(()=>{let e=setTimeout(()=>v(!0),12e3);return()=>clearTimeout(e)},[]),x)?null:(0,r.jsxs)("div",{"aria-hidden":!0,className:(0,a.Z)("pointer-events-none absolute inset-0 z-[80] flex items-center justify-center transition-opacity duration-500",h?"opacity-0":"opacity-100"),style:{background:"linear-gradient(180deg, #E3CEC2 3.4%, #C094E5 93.7%)"},children:[(0,r.jsx)(c,{}),(0,r.jsx)(s,{fallback:(0,r.jsx)(u,{}),children:(0,r.jsx)(l.KX,{src:"".concat(window.location.origin).concat("/contact/loading.lottie"),autoplay:!0,loop:!0,useFrameInterpolation:!1,renderConfig:{devicePixelRatio:1,autoResize:!1,freezeOnOffscreen:!0},style:{width:84,height:84}})})]})}(0,l.YD)("".concat(window.location.origin).concat("/contact/dotlottie-player.wasm"))},95977:function(e,t,n){n.d(t,{Kb:function(){return H},Py:function(){return S},SF:function(){return _},ZP:function(){return ei},b$:function(){return Z},fK:function(){return Q},m6:function(){return K}});var r=n(27573),a=n(7653),i=n(34789),o=n(97551),l=n(23607),s=n(78813),u=n(5655),c=n(37558),p=n(30906),d=n(43489),f=n(52207),m=n(83733),h=n(23766);function v(e,t){let{autoplay:n=!0}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=null,a="https://stream.mux.com/".concat(t,".m3u8");return e.canPlayType("application/vnd.apple.mpegurl")?e.src=a:d.default.isSupported()&&((r=new d.default).loadSource(a),r.attachMedia(e)),n&&e.play().catch(()=>{}),()=>{r&&(r.destroy(),r=null)}}let x={Bar_L:"#FFE566",Bar_R:"#FFE566",button_1:"#44FF44",button_2:"#CCFF00",button_3:"#FF4466",button_4:"#00FFAA",Beads:"#E8B547",Torus:"#E8B547",Sound_Board_Screen:"#2A2A3E",Screen_Body:"#2A2A3E",Sound_Board_Screen_Bordern:"#2A2A3E",Slide_Show_Screen_Frame:"#2A2A3E"},g=new Set(["Intern Screen","Intern Screen_Active","Main Screen","Mobile Main Screen","Yung Device Screen - S","Sqaure Screen","CD","Receipt"]),y="Intership_Device_-_Body",b=["Main Screen","Mobile Main Screen"],w={partner:["Want to partner","with us?"],join:["Want to join","our team?"]},S={partner:"Want to partner with us?",join:"Want to join our team?"},M=["Switch_Button","Switch Button"],C=["Slider_Body","Slider Body"];function B(e,t){if("undefined"==typeof document)return t;let n=getComputedStyle(document.documentElement).getPropertyValue(e).trim();return n?"".concat(n,", ").concat(t):t}let T=()=>B("--font-polysans-mono",'"SF Mono", "Courier New", monospace'),D=()=>B("--font-polysans","system-ui, sans-serif");function _(e){return e.toLocaleDateString("en-US",{weekday:"long",month:"long",day:"numeric",year:"numeric"}).toUpperCase()}let k=new s.Euler,R=new s.Quaternion,j=new s.Matrix4,P=new s.Vector3,A=new s.Vector3,F=new s.Vector3,E=new s.Vector3,I="Slide_Show_Device_-_Outer_Band",N="Sound_Board_Body",z="Sound Board Screen",U="/contact/sounds",W=[1,2,3,4].map(e=>"".concat(U,"/YG_SOUNDBOARD_BUTTON_").concat(e,".mp3")),L="".concat(U,"/YG_CD_SPIN_PERF_LOOP.mp3"),O={L:"".concat(U,"/YG_INTERN_BUTTON_1.mp3"),R:"".concat(U,"/YG_INTERN_BUTTON_2.mp3")},q="".concat(U,"/YG_TOMOGACHI_BUTTON.mp3"),Y={join:"".concat(U,"/YG_SLIDE_CLICK_1.mp3"),partner:"".concat(U,"/YG_SLIDE_CLICK_2.mp3")},G="".concat(U,"/YG_BIG_BUTTON.mp3"),V={"Main_Device_-_Body":"main","Slide_Show_Device_-_Outer_Band":"slideshow","Intership_Device_-_Body":"internship","Tamagotchi-Device":"tamagotchi",Sound_Board_Body:"soundboard"},Z=Object.fromEntries(Object.entries(V).map(e=>{let[t,n]=e;return[n,t]})),X={main:b},Q="/models/Device_Desktop_v7.glb",K="/models/Devices_Mobile_v003.glb",H="/models/Devices_Mobile_LIGHTER_v001.glb";function $(e){return e===K||e===H}let J=new s.MeshBasicMaterial({color:1710638,side:s.BackSide}),ee=new s.MeshBasicMaterial({color:0,side:s.BackSide}),et={x:-.7,y:-.7},en=new Set(["PBR Wire",z]);function er(e,t){return new s.MeshToonMaterial({color:new s.Color(e),gradientMap:t})}function ea(e){e.onBeforeCompile=e=>{e.fragmentShader=e.fragmentShader.replace("#include <map_fragment>","#include <map_fragment>\n#ifdef USE_MAP\n diffuseColor.rgb = 1.0 - diffuseColor.rgb;\n#endif").replace("#include <emissivemap_fragment>","#ifdef USE_EMISSIVEMAP\n vec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv );\n totalEmissiveRadiance *= (1.0 - emissiveColor.rgb);\n#endif")}}function ei(e){let{onDeviceClick:t,scale:n,position:d,centerOn:S,activeDevice:B,tamagotchiVideos:U,internshipVideoActive:K,internshipVideoClosed:H,internshipOpenings:ei,slideshowImages:eo,soundboardSounds:el,contactForms:es,onToggleChange:eu,soundEnabled:ec,receiptData:ep,formOpen:ed,glbUrl:ef=Q,disableIdleFloat:em=!1,lite:eh=!1}=e,ev=(0,a.useRef)(null),{scene:ex}=(0,i.L)(ef),{scene:eg,gl:ey,camera:eb,size:ew}=(0,o.D)();(0,a.useEffect)(()=>{ey.localClippingEnabled=!0},[ey]);let eS=(0,a.useRef)(null),eM=(0,a.useRef)(null),eC=(0,a.useRef)({phase:"idle",t
1:0,startPos:new s.Vector3,startQuat:new s.Quaternion}),eB=(0,a.useRef)({phase:"idle",t:0,slotPar:new s.Vector3,farPar:new s.Vector3,plane:new s.Plane}),eT=(0,a.useRef)(null),eD=(0,a.useRef)(!1);(0,a.useEffect)(()=>{eD.current=!!ec},[ec]);let e_=(0,a.useMemo)(()=>{let e=ex.clone(!0),t=function(){let e=new Uint8Array(4);e[0]=80,e[1]=160,e[2]=210,e[3]=255;let t=new s.DataTexture(e,4,1,s.RedFormat);return t.minFilter=s.NearestFilter,t.magFilter=s.NearestFilter,t.needsUpdate=!0,t}(),n=$(ef)?2/15:1;if(e.traverse(e=>{var r,a,i,o,l,c,p,d,f,m,h,v;if(!(e instanceof s.Mesh)||e.userData.isOutline||e.userData.isStickerShadow)return;e.castShadow=!0,e.receiveShadow=!0;let w=e.material;if(!w)return;let S=w.name||"",B=e.name||"";if((null===(r=e.parent)||void 0===r?void 0:r.name)==="Tamagotchi-Device"&&("PBR Tamagotchi-Device Button"===S?e.userData.isTamagotchiButton=!0:"Yung Device Screen - S"===S&&(e.userData.isTamagotchiScreen=!0)),(null===(a=e.parent)||void 0===a?void 0:a.name)===I&&"Sqaure Screen"===S&&(e.userData.isSlideshowScreen=!0),(null===(i=e.parent)||void 0===i?void 0:i.name)===I&&!B.startsWith("Button_Ring")&&B.startsWith("Button")&&(e.userData.isSlideshowButton=!0),(null===(o=e.parent)||void 0===o?void 0:o.name)===N&&S.startsWith("PBR Button Color")){e.userData.isSoundboardButton=!0;let t=parseInt(S.replace(/\D+/g,""),10);e.userData.soundboardButtonIndex=Number.isFinite(t)&&t>=1?t-1:0}if((null===(l=e.parent)||void 0===l?void 0:l.name)===N&&"CD"===S&&(e.userData.isSoundboardCD=!0),(null===(c=e.parent)||void 0===c?void 0:c.name)===N&&S===z&&(e.userData.isSoundboardScreen=!0),(null===(p=e.parent)||void 0===p?void 0:p.name)===y&&("Intern Screen_Active"===S||"Intern Screen"===S)&&(e.userData.isInternshipScreen=!0),b.includes(S)){e.userData.isMainScreen=!0,e.raycast=()=>{};let t=e.parent;t&&t instanceof s.Mesh&&/Screen_Body/.test(t.name)&&(t.raycast=()=>{})}if("Receipt"===S&&(e.userData.isReceipt=!0),M.includes(B)?(e.userData.isMainToggleKnob=!0,e.userData.isMainToggle=!0):C.includes(B)&&(e.userData.isMainToggle=!0),(null===(d=e.parent)||void 0===d?void 0:d.name)===y&&(B.startsWith("Button_R_-_Active")?e.userData.internshipButton={side:"R",state:"active"}:B.startsWith("Button_L_-_Active")?e.userData.internshipButton={side:"L",state:"active"}:B.startsWith("Button_R_-_Closed")?e.userData.internshipButton={side:"R",state:"closed"}:B.startsWith("Button_L_-_Closed")&&(e.userData.internshipButton={side:"L",state:"closed"})),!e.geometry||g.has(S)||"PBR Wire"===S||S===z||S.startsWith("OpenPBR Sticker")||e.userData.internshipButton)e.geometry&&!e.geometry.getAttribute("normal")&&e.geometry.computeVertexNormals();else{let t=e.geometry.getAttribute("position");if(t){let n=new s.BufferGeometry;n.setAttribute("position",t.clone()),e.geometry.index&&n.setIndex(e.geometry.index.clone());let r=(0,u.$1)(n);r.computeVertexNormals(),e.geometry.dispose(),e.geometry=r}}if(S.startsWith("OpenPBR Sticker")&&(e.position.z+=.012,e.castShadow=!1,function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=e.parent;if(!r||!e.geometry)return;let a=new s.MeshBasicMaterial({color:1315871,map:null!=t?t:void 0,transparent:!0,opacity:.4,depthWrite:!1,toneMapped:!1}),i=new s.Mesh(e.geometry,a);i.raycast=()=>{},i.castShadow=!1,i.receiveShadow=!1,i.userData.isStickerShadow=!0,e.geometry.computeBoundingBox();let o=e.geometry.boundingBox,l=.05*n*(o?Math.max((o.max.x-o.min.x)*e.scale.x,(o.max.y-o.min.y)*e.scale.y):.02);i.position.copy(e.position),i.position.x+=l*et.x,i.position.y+=l*et.y,i.position.z-=.006,i.quaternion.copy(e.quaternion),i.scale.copy(e.scale),r.add(i)}(e,null!==(m=w.map)&&void 0!==m?m:null,n)),g.has(S)||en.has(S)||S.startsWith("OpenPBR Sticker")||B.startsWith("Beads")||B.startsWith("Torus")||e.userData.internshipButton||function(e){if(!e.geometry)return;e.updateWorldMatrix(!0,!1);let t=e.matrixWorld.elements,n=Math.max(Math.hypot(t[0],t[1],t[2]),Math.hypot(t[4],t[5],t[6]),Math.hypot(t[8],t[9],t[10])),r=function(e,t){let n=e.getAttribute("position");if(!n)return null;let r=n.count,a=new Float32Array(3*r);for(let e=0;e<r;e++)a[3*e]=n.getX(e),a[3*e+1]=n.getY(e),a[3*e+2]=n.getZ(e);let i=new s.BufferGeometry;i.setAttribute("position",new s.BufferAttribute(a,3)),e.index&&i.setIndex(e.index.clone());let o=(0,u.$1)(i);
1o.computeVertexNormals();let l=o.getAttribute("position"),c=o.getAttribute("normal");for(let e=0;e<l.count;e++)l.setXYZ(e,l.getX(e)+c.getX(e)*t,l.getY(e)+c.getY(e)*t,l.getZ(e)+c.getZ(e)*t);return l.needsUpdate=!0,o.deleteAttribute("normal"),o}(e.geometry,n>0?6e-4/n:6e-4);if(!r)return;let a=new s.Mesh(r,J);a.raycast=()=>{},a.castShadow=!1,a.receiveShadow=!1,a.userData.isOutline=!0,e.add(a)}(e),g.has(S)){let t=w.clone();t.emissive=new s.Color("#ffffff"),t.emissiveIntensity=.4,t.emissiveMap=t.map,e.userData.isTamagotchiScreen&&ea(t),b.includes(S)&&(t.color=new s.Color("#000000"),t.emissiveIntensity=1),e.material=t;return}let T=null!==(v=function(e,t){if(e===I)return"#3344D6";if(t===I){if(e.startsWith("Button_Ring"))return null;if(e.startsWith("Button"))return"#A35CB2"}if(t===y){if(e.startsWith("Button_R_-_Active")||e.startsWith("Button_L_-_Active"))return"#FFE566";if(e.startsWith("Button_R_-_Closed")||e.startsWith("Button_L_-_Closed"))return"#5A5566"}return null}(B,null!==(h=null===(f=e.parent)||void 0===f?void 0:f.name)&&void 0!==h?h:""))&&void 0!==v?v:void 0;if(T||(T=x[B]),!T){if(B.startsWith("Plug"))T="#8B7BF7";else if(B.startsWith("Screw"))T="#7B6BD7";else if(B.startsWith("Button"))T="#9B8BFF";else if(B.startsWith("Switch"))T="#F0BF2C";else if(B.startsWith("Slider")){T="#9B8BFF";let t=e.children.find(e=>e.userData.isOutline);t&&(t.material=ee)}else B.startsWith("Wire")&&(T="#7B5CF6")}if(T){e.userData.internshipButton&&"closed"===e.userData.internshipButton.state?e.material=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:.08,a=e.getAttribute("position");if(!a)return er(t,n);e.computeBoundingBox();let i=e.boundingBox;if(!i)return er(t,n);let o={x:i.max.x-i.min.x,y:i.max.y-i.min.y,z:i.max.z-i.min.z},l=o.x<=o.y&&o.x<=o.z?"x":o.y<=o.z?"y":"z",u=[];for(let e=0;e<a.count;e++)u.push("x"===l?a.getX(e):"y"===l?a.getY(e):a.getZ(e));u.sort((e,t)=>e-t);let c=u[Math.floor(.9*u.length)],p=c-u[0];if(p<=0)return er(t,n);let d=new Float32Array(a.count);for(let e=0;e<a.count;e++){let t="x"===l?a.getX(e):"y"===l?a.getY(e):a.getZ(e);d[e]=Math.min(1,Math.max(0,(c-t)/p))}e.setAttribute("aRecessDepth",new s.BufferAttribute(d,1));let f=new s.MeshToonMaterial({color:new s.Color(t),gradientMap:n});return f.onBeforeCompile=e=>{e.uniforms.uDarkenFloor={value:r},e.vertexShader="\n attribute float aRecessDepth;\n varying float vRecessDepth;\n "+e.vertexShader.replace("#include <begin_vertex>","#include <begin_vertex>\n vRecessDepth = aRecessDepth;"),e.fragmentShader="\n uniform float uDarkenFloor;\n varying float vRecessDepth;\n "+e.fragmentShader.replace("#include <opaque_fragment>","#include <opaque_fragment>\n float vRecessAmped = smoothstep(0.15, 0.4, vRecessDepth);\n gl_FragColor.rgb *= mix(1.0, uDarkenFloor, vRecessAmped);")},f}(e.geometry,T,t):e.material=er(T,t);return}if(S.startsWith("RS Toon")||S.startsWith("RS Standard")||S.startsWith("Wire Toon")||S.startsWith("Button Color")){let n="#D4C4E8";S.startsWith("Wire Toon")?n="#7B5CF6":"Button Color 1"===S?n="#44FF44":"Button Color 2"===S?n="#CCFF00":"Button Color 3"===S?n="#FF4466":"Button Color 4"===S&&(n="#00FFAA"),e.material=er(n,t)}}),S){e.updateMatrixWorld(!0);let t=X[S],n=null,r=-1;if(t){let a=Array.isArray(t)?t:[t];e.traverse(e=>{if(!(e instanceof s.Mesh))return;let t=e.material;if(!t||!a.includes(t.name))return;let i=new s.Box3().setFromObject(e),o=new s.Vector3;i.getSize(o);let l=o.x*o.y*o.z;l>r&&(r=l,n=e)})}if(!n){let t=Z[S];e.traverse(e=>{if(e.name!==t)return;let a=new s.Box3().setFromObject(e),i=new s.Vector3;a.getSize(i);let o=i.x*i.y*i.z;o>r&&(r=o,n=e)})}if(n){let t=new s.Box3().setFromObject(n),r=new s.Vector3;t.getCenter(r),e.position.sub(r)}}return e},[ex,S,ef]),ek=(0,a.useRef)(null),eR=(0,l.J)(),ej=(0,a.useRef)(1),eP=(0,a.useRef)(null),eA=(0,a.useRef)(0);(0,o.F)((e,t)=>{if(eR)return;let n=ek.current;if(!n)return;if(em)n.position.x=0,n.position.y=0,n.rotation.z=0;else{let r=ed?0:B?.5:1;ej.current=s.MathUtils.lerp(ej.current,r,1-Math.exp(-3*t));let a=ej.current,i=e.clock.elapsedTime;n.position.x=.01*Math.sin(.1*i*Math.PI*2)*a,n.position.y=.005*Math.cos(.25*i*Math.PI*2)*a,n.rotation.z=.004*Math.sin(.15*i*Math.PI*2)*a}let r=eJ.current,a=e0.current;if(r&&a.length>=2){let e=e1.current;e.timer+=t,e.timer<2?e.progress=0:e.timer<3?e.progress=(e.timer-2)/1:(e.fromIdx=e.toIdx,e.toIdx=(e.toIdx+1)%a.length,e.timer=0,e.progress=0,r.uniforms.uTextureA.value=a[e.fromIdx],r.uniforms.uTextureB.value=a[e.toIdx]),r.uniforms.uProgress.value=e.progress}let i=e2.current;if(i){i.uniforms.uTime.value+=t;let e=e7.current,n=e8.current;if(e&&n){e.getByteFrequencyData(n);let t=0;for(let e=0;e<n.length;e++){let r=n[e];t+=r*r}let r=Math.sqrt(t/n.length)/255;e3.current=Math.min(1,1.6*r)}else e3.current=0;i.uniforms.uPulse.value=e3.current}let o=eP.current;if(o){let e="soundboard"===B?1.5:0;eA.current=s.MathUtils.lerp(eA.current,e,1-Math.exp(-2*t)),o.rotation.y-=eA.current*Math.PI*2*t}let l=eS.current,u=eC.current;if(l&&"falling"===u.phase){u.t+=t;let e=Math.min(1,u.t/2),n=Math.sin(2.6*u.t);l.position.set(u.startPos.x+.22*n*e,u.startPos.y-1*e,u.startPos.z+.11*Math.cos(2.08*u.t)*e),k.set(.4*Math.sin(1.8*u.t),1.1*u.t,.55*n),R.setFromEuler(k),l.quaternion.copy(u.startQuat).multiply(R);let r=l.material;r&&(r.opacity=e<.6?1:1-(e-.6)/.4),e>=1&&(u.phase="gone",l.visible=!1)}
1let c=eB.current,p=eM.current;if(l&&p&&"printing"===c.phase){c.t+=t;let e=Math.max(0,Math.min(1,c.t/2.2)),n=p.parent;n.updateWorldMatrix(!0,!1),P.copy(c.slotPar).applyMatrix4(n.matrixWorld),A.copy(c.farPar).applyMatrix4(n.matrixWorld),F.copy(P).lerp(A,e),E.copy(P).sub(A).normalize(),c.plane.setFromNormalAndCoplanarPoint(E,F);let r=l.material,a=.35*(1-e);(null==r?void 0:r.map)&&(r.map.offset.y=a),(null==r?void 0:r.emissiveMap)&&r.emissiveMap!==r.map&&(r.emissiveMap.offset.y=a),c.t>=2.2&&(c.phase="idle",r&&(r.clippingPlanes=[],r.map&&(r.map.offset.y=0),r.emissiveMap&&r.emissiveMap!==r.map&&(r.emissiveMap.offset.y=0)))}});let eF=(0,a.useRef)(null),eE=(0,a.useRef)(0),eI=(0,a.useRef)(null);(0,a.useEffect)(()=>{var e;if(!U||0===U.length)return;let t=null===(e=U[0])||void 0===e?void 0:e.playbackId;if(!t)return;let n=null;if(e_.traverse(e=>{!n&&e instanceof s.Mesh&&e.userData.isTamagotchiScreen&&(n=e)}),!n)return;if(eh){let e=new s.TextureLoader;e.setCrossOrigin("anonymous");let r=e.load((0,f.X$)(t));r.colorSpace=s.SRGBColorSpace,r.flipY=!1,r.minFilter=s.LinearFilter,r.magFilter=s.LinearFilter,r.generateMipmaps=!1;let a=n,i=a.material,o=new s.MeshStandardMaterial({map:r,emissive:new s.Color("#ffffff"),emissiveMap:r,emissiveIntensity:.4,toneMapped:!1});return ea(o),a.material=o,e$.current=!0,()=>{r.dispose(),o.dispose(),a.material=i}}eE.current=0;let r=document.createElement("video");
1r.crossOrigin="anonymous",r.loop=!0,r.muted=!0,r.playsInline=!0,r.autoplay=!1,eI.current=v(r,t,{autoplay:!1}),eF.current=r;let a=new s.VideoTexture(r);a.colorSpace=s.SRGBColorSpace,a.flipY=!1,a.minFilter=s.LinearFilter,a.magFilter=s.LinearFilter,a.generateMipmaps=!1;let i=n,o=i.material,l=new s.MeshStandardMaterial({map:a,emissive:new s.Color("#ffffff"),emissiveMap:a,emissiveIntensity:.4,toneMapped:!1});return ea(l),i.material=l,e$.current=!0,()=>{eI.current&&(eI.current(),eI.current=null),r.pause(),r.removeAttribute("src"),r.load(),a.dispose(),l.dispose(),eF.current===r&&(eF.current=null),i.material=o}},[e_,U,eh]),(0,a.useEffect)(()=>{let e=eF.current;if(e){if("tamagotchi"!==B){e.pause();return}e.play().catch(()=>{})}},[B]);let eN=(0,a.useRef)("partner"),ez=(0,a.useRef)(null),eU=(0,a.useRef)(null),eW=(0,a.useRef)("x"),eL=(0,a.useRef)(.0371),eO=(0,a.useRef)(null);(0,a.useEffect)(()=>{let e=null;if(e_.traverse(t=>{!e&&t instanceof s.Mesh&&t.userData.isMainScreen&&(e=t)}),!e)return;let t=e.material,n=t.map;if(!n)return;let r="Mobile Main Screen"===t.name,a=!1,i=(e,t,n,r,a)=>(e.font="".concat(t," ").concat(200,"px ").concat(n),a/(e.measureText(r).actualBoundingBoxAscent||140.79999999999998)*200),o=e=>{if(a)return;let o=document.createElement("canvas");o.width=1920,o.height=1080;let l=o.getContext("2d");if(!l)return;if(l.fillStyle="#000000",l.fillRect(0,0,1920,1080),r){n.image=o,n.needsUpdate=!0,t.emissiveMap&&t.emissiveMap!==n&&(t.emissiveMap.image=o,t.emissiveMap.needsUpdate=!0);return}l.fillStyle="#ffffff",l.textAlign="left",l.textBaseline="alphabetic";let s=T(),u=i(l,"400",s,"M",31);l.font="400 ".concat(u,"px ").concat(s),l.fillText(_(new Date),130,169);let c=D(),p=i(l,"400",c,"W",102);l.font="".concat("400"," ").concat(p,"px ").concat(c),w[e].forEach((e,t)=>{l.fillText(e,130,503+158*t)}),n.image=o,n.needsUpdate=!0,t.emissiveMap&&t.emissiveMap!==n&&(t.emissiveMap.image=o,t.emissiveMap.needsUpdate=!0)},l=()=>{a||(eO.current=o,o(eN.current))};if("fonts"in document){let e=T().split(",")[0].trim(),t=D().split(",")[0].trim();Promise.all([document.fonts.load("400 45px ".concat(e)),document.fonts.load("".concat("400"," 145px ").concat(t))]).then(l).catch(l)}else l();return()=>{a=!0,eO.current=null}},[e_]),(0,a.useEffect)(()=>{let e=null;if(e_.traverse(t=>{!e&&t instanceof s.Mesh&&t.userData.isReceipt&&(e=t)}),eS.current=e,e&&e.parent){let t=e;t.visible=!1,eM.current={parent:t.parent,position:t.position.clone(),quaternion:t.quaternion.clone(),scale:t.scale.clone()},t.geometry.computeBoundingBox();let n=t.geometry.boundingBox;n&&(eT.current={min:n.min.clone(),max:n.max.clone()});let r=t.material;r&&(r.side=s.DoubleSide,r.shadowSide=s.FrontSide,r.polygonOffset=!0,r.polygonOffsetFactor=4,r.polygonOffsetUnits=4,r.map&&(r.map.center.set(.5,.5),r.map.rotation=-Math.PI/2),r.emissiveMap&&r.emissiveMap!==r.map&&(r.emissiveMap.center.set(.5,.5),r.emissiveMap.rotation=-Math.PI/2))}},[e_]);let eq=(0,a.useRef)(null);(0,a.useEffect)(()=>{let e=eS.current,t=eM.current,n=eC.current,r=eB.current,a=eT.current;if(!e||!t){eq.current=ep;return}let i=e.material,o=!!eq.current,l=!!ep;if(eq.current=ep,o&&!l){r.phase="idle",i&&(i.clippingPlanes=[]),eg.attach(e),n.startPos.copy(e.position),n.startQuat.copy(e.quaternion),n.t=0,n.phase="falling",i&&(i.transparent=!0,i.depthWrite=!1,i.opacity=1),e.castShadow=!1,e.receiveShadow=!1,e.visible=!0;return}if(l&&(e.parent!==t.parent&&t.parent.add(e),e.position.copy(t.position),e.quaternion.copy(t.quaternion),e.scale.copy(t.scale),i&&(i.opacity=1,i.transparent=!1,i.depthWrite=!0,i.map&&(i.map.offset.y=0),i.emissiveMap&&i.emissiveMap!==i.map&&(i.emissiveMap.offset.y=0)),e.castShadow=!0,e.receiveShadow=!0,e.visible=!0,n.phase="idle",a&&i)){let e=(a.min.y+a.max.y)/2,n=(a.min.z+a.max.z)/2;j.compose(t.position,t.quaternion,t.scale),r.slotPar.set(a.min.x,e,n).applyMatrix4(j),r.farPar.set(a.max.x,e,n).applyMatrix4(j),t.parent.updateWorldMatrix(!0,!1),P.copy(r.slotPar).applyMatrix4(t.parent.matrixWorld),A.copy(r.farPar).applyMatrix4(t.parent.matrixWorld),E.copy(P).sub(A).normalize(),r.plane.setFromNormalAndCoplanarPoint(E,P),i.clippingPlanes=[r.plane],i.clipShadows=!0,i.needsUpdate=!0,i.map&&(i.map.offset.y=.35),i.emissiveMap&&i.emissiveMap!==i.map&&(i.emissiveMap.offset.y=.35),r.t=-1.1,r.phase="printing"}},[ep,eg]),(0,a.useEffect)(()=>
1{if(!ep)return;let e=null==es?void 0:es[ep.variant],t=null;if(e_.traverse(e=>{!t&&e instanceof s.Mesh&&e.userData.isReceipt&&(t=e)}),!t)return;let n=t.material,r=n.map;if(!r)return;r.center.set(.5,.5),r.rotation=-Math.PI/2,n.emissiveMap&&n.emissiveMap!==r&&(n.emissiveMap.center.set(.5,.5),n.emissiveMap.rotation=-Math.PI/2);let a=!1,i=()=>{var t;if(a)return;let i=document.createElement("canvas");i.width=2160,i.height=4628;let o=i.getContext("2d");o&&(function(e,t,n){let r=T(),a=D();e.fillStyle="#ffffff",e.fillRect(0,0,2160,4628),e.fillStyle="#000000",e.textBaseline="alphabetic";let i=t=>{e.save(),e.strokeStyle="#000000",e.lineWidth=3,e.setLineDash([16,16]),e.beginPath(),e.moveTo(170,t),e.lineTo(1990,t),e.stroke(),e.restore()};e.textAlign="center",e.font="700 130px ".concat(a),e.fillText("Yung Studio",1080,360),e.textAlign="left",e.font="400 ".concat(46,"px ").concat(r),e.fillText(t.toUpperCase(),170,690),e.fillText(function(e){let t=e.toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric"}),n=e.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit"});return"".concat(t," ").concat(n).toUpperCase()}(new Date),170,780),i(900),e.fillText("DESCRIPTION",170,1070),e.textAlign="right",e.fillText("QTY",1990,1070),e.textAlign="left",i(1170);let o=Math.min(110,940/Math.max(n.length,1));n.forEach((t,n)=>{let r=1340+n*o,a=t.desc.length>34?"".concat(t.desc.slice(0,33),"â¦"):t.desc;e.textAlign="left",e.fillText(a,170,r),e.textAlign="right",e.fillText(String(t.qty),1990,r)}),e.textAlign="left",i(2380),e.textAlign="center",e.font="italic 700 360px ".concat(a),e.fillText("Thank",1080,3120),e.fillText("you!",1080,3470),e.font="400 40px ".concat(r),e.fillText("HAVE A QUESTION?",1080,4308),e.fillText("EMAIL US AT [email protected]",1080,4378)}(o,null!==(t=null==e?void 0:e.receiptTitle)&&void 0!==t?t:"",(0,p.c)(e,ep.values)),r.image=i,r.needsUpdate=!0,n.emissiveMap&&n.emissiveMap!==r&&(n.emissiveMap.image=i,n.emissiveMap.needsUpdate=!0))};if("fonts"in document){let e=T().split(",")[0].trim(),t=D().split(",")[0].trim();Promise.all([document.fonts.load("400 46px ".concat(e)),document.fonts.load("700 130px ".concat(t)),document.fonts.load("italic 700 360px ".concat(t))]).then(i).catch(i)}else i();return()=>{a=!0}},[e_,ep,es]),(0,a.useEffect)(()=>{let e=null,t=null;if(e_.traverse(n=>{!e&&n.userData.isMainToggleKnob&&(e=n,t=n.parent)}),ez.current=e,!e||!t)return;let n=e,r=t;null==n.userData.toggleRestX&&(n.userData.toggleRestX=n.position.x),null==n.userData.toggleRestY&&(n.userData.toggleRestY=n.position.y),null==n.userData.toggleRestZ&&(n.userData.toggleRestZ=n.position.z);let a=-.083,i=-.0175,o=-.0332,l=.013,u=.0048,p="x",d="y",f="z",m=.0371,h=null;if($(ef)){let e=null;if(e_.traverse(t=>{!e&&t.userData.isMainToggle&&!t.userData.isMainToggleKnob&&t.geometry&&(e=t)}),e){let t=e;e_.updateMatrixWorld(!0);let c=new s.Matrix4().copy(r.matrixWorld).invert(),v=new s.Box3().setFromObject(t).applyMatrix4(c),x=v.getCenter(new s.Vector3),g=v.getSize(new s.Vector3),y=["x","y","z"].map(e=>({axis:e,size:g[e]})).sort((e,t)=>t.size-e.size);p=y[0].axis,d=y[1].axis,f=y[2].axis;let b=y[0].size,w=y[1].size,S=x[p],M=n.position[p]<=S?1:-1;m=(b-w)*M;let C=b/2,B=.06*b;a=S-M*(C+B+.095*b),i=S+M*(C+B+.06*b),o=x[d];let T=r.getWorldQuaternion(new s.Quaternion).invert(),D=new s.Vector3(0,0,1).applyQuaternion(T),_=D[f]>=0?1:-1,k=g[f]/2;l=x[f]+_*(k+5e-4),u=.112*b;let R=new s.Vector3(1,0,0).applyQuaternion(T),j=new s.Vector3(0,1,0).applyQuaternion(T),P=new s.Matrix4().makeBasis(R,j,D);h=new s.Quaternion().setFromRotationMatrix(P)}}eW.current=p,eL.current=m;let v=new s.Vector3,x=new s.Vector3;if($(ef)){let e=m>=0?1:-1;v[p]=-e,x[p]=e}let g=h&&v.clone().applyQuaternion(h.clone().invert()).x>=0?"left":"right",y=h?x.clone().applyQuaternion(h.clone().invert()).x>=0?"left":"right":"left",b=(e,t,n,r)=>{let a=new c.xv;a.text=e.toUpperCase(),a.font="/fonts/PolySans-NeutralMono.woff",a.fontSize=u,a.color="#000000",a.anchorX=r,a.anchorY="middle",a.textAlign="center";let i=new s.Vector3;return i[p]=n,i[d]=o,i[f]=l,a.position.copy(i),h&&a.quaternion.copy(h),a.fillOpacity=(eN.current,1),a.material.toneMapped=!1,a.userData.mainToggleSide=t,a.castShadow=!1,a.receiveShadow=!1,a.sync(),a},w=$(ef),S=b(w?"Partner\nWith Us":"Partner With Us","partner",a,g),M=b(w?"Join\nOur Team":"Join Our Team","join",i,y);return r.add(S,M),eU.current={partner:S,join:M},()=>{r.remove(S,M),S.dispose(),M.dispose(),eU.current=null,ez.current=null}},[e_]),(0,a.useEffect)(()=>{let e=null;if(e_.traverse(t=>{!e&&t.userData.isSlideshowButton&&(e=t)}),!e)return;let t=e;if(!t.geometry)return;e_.updateMatrixWorld(!0);let n=new s.Quaternion;t.getWorldQuaternion(n);let r=n.clone().invert(),a=new s.Vector3(0,0,1).applyQuaternion(r).normalize();t.geometry.computeBoundingBox();let i=t.geometry.boundingBox;if(!i)return;let o=i.getCenter(new s.Vector3),l=i.getSize(new s.Vector3),u=(Math.abs(a.x)*l.x+Math.abs(a.y)*l.y+Math.abs(a.z)*l.z)/2,p=[{s:l.x,a:Math.abs(a.x)},{s:l.y,a:Math.abs(a.y)},{s:l.z,a:Math.abs(a.z)}].sort((e,t)=>
1e.a-t.a),d=Math.min(p[0].s,p[1].s),f=new c.xv;f.text="Email\nus",f.font="/fonts/PolySans-Neutral.woff",f.fontSize=.26*d,f.color="#ffffff",f.anchorX="center",f.anchorY="middle",f.textAlign="center",f.lineHeight=1.1,f.position.copy(o).addScaledVector(a,u+.001);let m=new s.Quaternion().setFromAxisAngle(new s.Vector3(0,0,1),.16);return f.quaternion.copy(r).multiply(m),f.raycast=()=>{},f.castShadow=!1,f.receiveShadow=!1,f.userData.isOutline=!0,f.sync(),t.add(f),()=>{t.remove(f),f.dispose()}},[e_]);let eY=(0,a.useRef)({});(0,a.useEffect)(()=>{let e=[O.L,O.R,q,Y.join,Y.partner,G],t={};for(let n of e){let e=new Audio;e.preload="auto",e.src=n,t[n]=e}return eY.current=t,()=>{Object.values(t).forEach(e=>{e.pause(),e.removeAttribute("src"),e.load()}),eY.current={}}},[]);let eG=(0,a.useCallback)(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.7;if(!eD.current)return;let n=eY.current[e];n&&(n.currentTime=0,n.volume=t,n.play().catch(()=>{}))},[]),eV=(0,a.useCallback)(e=>{var t,n;if(eN.current===e)return;eN.current=e;let r=ez.current;if(r){let t=eW.current,a=eL.current,i="x"===t?"toggleRestX":"y"===t?"toggleRestY":"toggleRestZ",o=null!==(n=r.userData[i])&&void 0!==n?n:r.position[t],l="join"===e?o+a:o;m.ZP.killTweensOf(r.position),m.ZP.to(r.position,{[t]:l,duration:.45,ease:"back.out(1.6)"})}let a=eU.current;a&&(a.partner.fillOpacity=1,a.join.fillOpacity=1,a.partner.sync(),a.join.sync()),null===(t=eO.current)||void 0===t||t.call(eO,e),eG(Y[e]),null==eu||eu(e)},[eu,eG]);(0,a.useEffect)(()=>{null==eu||eu(eN.current)},[eu]);let eZ=(0,a.useCallback)(()=>{eV("partner"===eN.current?"join":"partner")},[eV]),eX=(0,a.useCallback)(()=>{var e;let t=eF.current,n=null!=U?U:[];if(!t||0===n.length)return;eE.current=(eE.current+1)%n.length;let r=null===(e=n[eE.current])||void 0===e?void 0:e.playbackId;r&&(eI.current&&eI.current(),eI.current=v(t,r))},[U]),eQ=(0,a.useRef)(null),eK=(0,a.useRef)(null),eH=(0,a.useRef)(B);(0,a.useEffect)(()=>{eH.current=B},[B]);let e$=(0,a.useRef)(!1);(0,o.F)(()=>{if(e$.current){e$.current=!1;try{ey.compile(eg,eb)}catch(e){}}}),(0,a.useEffect)(()=>{var e;let t=!!ei&&ei.length>0,n=t?K:H,r=t?H:K,a=null!==(e=null==n?void 0:n.playbackId)&&void 0!==e?e:null==r?void 0:r.playbackId;if(!a)return;let i=null;if(e_.traverse(e=>{!i&&e instanceof s.Mesh&&e.userData.isInternshipScreen&&(i=e)}),!i)return;if(eh){let e=new s.TextureLoader;e.setCrossOrigin("anonymous");let t=e.load((0,f.X$)(a));t.colorSpace=s.SRGBColorSpace,t.flipY=!1,t.minFilter=s.LinearFilter,t.magFilter=s.LinearFilter,t.generateMipmaps=!1;let n=i,r=n.material,o=new s.MeshStandardMaterial({map:t,emissive:new s.Color("#ffffff"),emissiveMap:t,emissiveIntensity:.4,toneMapped:!1});return n.material=o,e$.current=!0,()=>{t.dispose(),o.dispose(),n.material=r}}let o=document.createElement("video");o.crossOrigin="anonymous",o.loop=!0,o.muted=!0,o.playsInline=!0,o.autoplay=!$(ef),o.preload="auto",eK.current=v(o,a,{autoplay:!1}),eQ.current=o;let l=new s.VideoTexture(o);l.colorSpace=s.SRGBColorSpace,l.flipY=!1,l.minFilter=s.LinearFilter,l.magFilter=s.LinearFilter,l.generateMipmaps=!1,o.addEventListener("canplay",()=>{"internship"!==eH.current&&o.play().then(()=>{let e=()=>{"internship"!==eH.current&&$(ef)&&o.pause(),l.needsUpdate=!0,ey.initTexture(l)};"function"==typeof o.requestVideoFrameCallback?o.requestVideoFrameCallback(e):requestAnimationFrame(e)}).catch(()=>{})},{once:!0});let u=i,c=u.material,p=new s.MeshStandardMaterial({map:l,emissive:new s.Color("#ffffff"),emissiveMap:l,emissiveIntensity:.4,toneMapped:!1});return u.material=p,e$.current=!0,()=>{eK.current&&(eK.current(),eK.current=null),o.pause(),o.removeAttribute("src"),o.load(),l.dispose(),p.dispose(),eQ.current===o&&(eQ.current=null),u.material=c}},[e_,K,H,ei,eh]),(0,a.useEffect)(()=>{let e=eQ.current;if(e){if(!$(ef)){e.play().catch(()=>{});return}if("internship"!==B){e.pause();return}e.play().catch(()=>{})}},[B,ef]),(0,a.useEffect)(()=>{let e=!!ei&&ei.length>0;e_.traverse(t=>{let n=t.userData.internshipButton;n&&(t.visible=e?"active"===n.state:"closed"===n.state)})},[e_,ei]);let eJ=(0,a.useRef)(null),e0=(0,a.useRef)([]),e1=(0,a.useRef)({fromIdx:0,toIdx:1,timer:0,progress:0});(0,a.useEffect)(()=>
1{if(!eo||0===eo.length)return;let e=null;if(e_.traverse(t=>{!e&&t instanceof s.Mesh&&t.userData.isSlideshowScreen&&(e=t)}),!e)return;let t=new s.TextureLoader;t.setCrossOrigin("anonymous");let n=eo.map(e=>{let n=(0,h.u)(e.image).width(1024).height(1024).url(),r=t.load(n);return r.colorSpace=s.SRGBColorSpace,r.flipY=!1,r.minFilter=s.LinearFilter,r.magFilter=s.LinearFilter,r.generateMipmaps=!1,r});e0.current=n;let r=n.length>1?1:0;e1.current={fromIdx:0,toIdx:r,timer:0,progress:0};let a=new s.ShaderMaterial({vertexShader:"\n varying vec2 vUv;\n void main() {\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n }\n",fragmentShader:'\n uniform sampler2D uTextureA;\n uniform sampler2D uTextureB;\n uniform float uProgress;\n varying vec2 vUv;\n\n float hash21(vec2 p) {\n return fract(sin(dot(p, vec2(127.1, 311.7))) * 43758.5453);\n }\n float smoothNoise(vec2 p) {\n vec2 i = floor(p);\n vec2 f = fract(p);\n vec2 u = f * f * (3.0 - 2.0 * f);\n return mix(\n mix(hash21(i), hash21(i + vec2(1.0, 0.0)), u.x),\n mix(hash21(i + vec2(0.0, 1.0)), hash21(i + vec2(1.0, 1.0)), u.x),\n u.y\n );\n }\n\n void main() {\n float p = uProgress;\n float bell = sin(p * 3.14159265);\n\n // Chromatic aberration only during the morph â bell goes to 0 at\n // both p=0 and p=1, so the held frames sample clean.\n float chrom = 0.008 * bell;\n vec3 colA = vec3(\n texture2D(uTextureA, vUv + vec2(chrom, 0.0)).r,\n texture2D(uTextureA, vUv).g,\n texture2D(uTextureA, vUv - vec2(chrom, 0.0)).b\n );\n vec3 colB = vec3(\n texture2D(uTextureB, vUv + vec2(chrom, 0.0)).r,\n texture2D(uTextureB, vUv).g,\n texture2D(uTextureB, vUv - vec2(chrom, 0.0)).b\n );\n\n // Liquid noise-mask reveal â different pixels swap from A to B at\n // different threshold values, giving the transition its organic\n // "pour" feel without the UV displacement that read as a twist on\n // the held image.\n vec2 nCoord = vUv * 3.5;\n float threshold = smoothNoise(nCoord * 0.8) * 0.6 + 0.2;\n float mask = smoothstep(p - 0.18, p + 0.18, threshold);\n vec3 final = mix(colB, colA, mask);\n\n gl_FragColor = vec4(final, 1.0);\n }\n',uniforms:{uTextureA:{value:n[0]},uTextureB:{value:n[r]},uProgress:{value:0}}});eJ.current=a;let i=e,o=i.material;return i.material=a,e$.current=!0,()=>{n.forEach(e=>e.dispose()),a.dispose(),i.material=o,eJ.current=null,e0.current=[]}},[e_,eo]),(0,a.useEffect)(()=>{let e=null;return e_.traverse(t=>{!e&&t.userData.isSoundboardCD&&(e=t)}),eP.current=e,eA.current=0,()=>{eP.current=null}},[e_]);let e2=(0,a.useRef)(null),e3=(0,a.useRef)(0),e5=(0,a.useRef)(0);(0,a.useEffect)(()=>{let e=null;if(e_.traverse(t=>{!e&&t instanceof s.Mesh&&t.userData.isSoundboardScreen&&(e=t)}),!e)return;let t=new s.ShaderMaterial({vertexShader:"\n varying vec2 vUv;\n void main() {\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n }\n",fragmentShader:"\n uniform float uTime;\n uniform float uPulse;\n uniform int uGeometry;\n varying vec2 vUv;\n\n #define PI 3.14159265359\n\n // Geometry 0 â Archimedean spiral with audio-reactive radial stress.\n // The line strains inward/outward under pulse via two desynchronized\n // sinusoidal harmonics added to the effective radius.\n float spiralGeometry(vec2 p, float r) {\n float theta = atan(p.y, p.x);\n if (theta < 0.0) theta += 2.0 * PI;\n theta += uTime * 0.5;\n float a = 0.022;\n float armSpacing = 2.0 * PI * a;\n float wobble1 = sin(theta * 22.0 + uTime * 18.0) * 0.0065;\n float wobble2 = sin(theta * 7.0 - uTime * 11.0) * 0.005;\n float perturbR = r + (wobble1 + wobble2) * uPulse;\n float phase = (perturbR - a * theta) / armSpacing;\n float distFromArm = abs(fract(phase + 0.5) - 0.5) * armSpacing;\n float strokeWidth = 0.0045;\n return 1.0 - smoothstep(strokeWidth * 0.6, strokeWidth, distFromArm);\n }\n\n // Geometry 1 â Chladni nodal pattern on a square plate. The\n // function f(x, y) = sin(n\xb7Ï\xb7x)\xb7sin(m\xb7Ï\xb7y) - sin(m\xb7Ï\xb7x)\xb7sin(n\xb7Ï\xb7y)\n // describes the standing-wave nodes; the visible outline is the\n // zero set of f.\n //\n // Stress applies a HIGH-spatial-frequency domain warp so each nodal\n // line wobbles independently of its neighbors. The warp's period\n // (â 0.18 in q-space, set by frequency â 35) matches the inter-line\n // spacing of the (n=3, m=5) pattern, so adjacent lines sit in\n // opposite phases of the warp wave and react out-of-sync. Two\n // harmonics per axis at desynchronized temporal frequencies prevent\n // the wobble from reading as a single repeating wave. Amplitude is\n // small (â¤0.035 in q-units) so lines bend rather than fragment.\n float chladniGeometry(vec2 uv) {\n // Center then scale to [-1, 1] so the (n, m) harmonics span the\n // whole circle mask.\n vec2 q = (uv - 0.5) * 1.8;\n float warpX = sin(q.y * 34.0 + uTime * 5.0)\n + sin(q.y * 21.0 - uTime * 8.5) * 0.5;\n float warpY = sin(q.x * 37.0 - uTime * 4.2)\n + sin(q.x * 23.0 + uTime * 7.8) * 0.5;\n q.x += warpX * 0.022 * uPulse;\n q.y += warpY * 0.02 * uPulse;\n float n = 3.0;\n float m = 5.0;\n float v = sin(n * PI * q.x) * sin(m * PI * q.y)\n - sin(m * PI * q.x) * sin(n * PI * q.y);\n // Outline at |v| â 0. The smoothstep width controls perceived\n // line thickness â kept thin to match the spiral's weight.\n return 1.0 - smoothstep(0.0, 0.05, abs(v));\n }\n\n // Geometry 2 â Concentric sonar rings expanding outward. The\n // baseline is a clean fract(r * freq - time) ring pattern; stress\n // adds a high-frequency radial wobble keyed to angular position so\n // the rings ripple unevenly under pulse.\n float ringsGeometry(vec2 p, float r) {\n float theta = atan(p.y, p.x);\n float wobble = sin(theta * 8.0 + uTime * 14.0 + r * 22.0)\n * 0.012 * uPulse;\n float perturbR = r + wobble;\n float ringFreq = 14.0;\n float phase = perturbR * ringFreq - uTime * 2.2;\n float dist = abs(fract(phase + 0.5) - 0.5);\n float strokeWidth = 0.07;\n return 1.0 - smoothstep(strokeWidth * 0.6, strokeWidth, dist);\n }\n\n void main() {\n vec2 p = vUv - 0.5;\n float r = length(p);\n\n // Outer mask â anything past 0.46 of the UV is pure black so the\n // visualizer feels framed inside the screen bezel.\n if (r > 0.46) {\n gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);\n return;\n }\n\n float stroke;\n if (uGeometry == 1) {\n stroke = chladniGeometry(vUv);\n } else if (uGeometry == 2) {\n stroke = ringsGeometry(p, r);\n } else {\n stroke = spiralGeometry(p, r);\n }\n\n // CRT phosphor green â slightly desaturated so the stroke reads as\n // light-emitting rather than printed.\n vec3 phosphor = vec3(0.16, 1.0, 0.27);\n gl_FragColor = vec4(phosphor * stroke, 1.0);\n }\n",uniforms:{uTime:{value:0},uPulse:{value:0},uGeometry:{value:e5.current}}});e2.current=t;let n=e,r=n.material;return n.material=t,e$.current=!0,()=>{t.dispose(),n.material=r,e2.current=null,e3.current=0}},[e_]);let e4=(0,a.useRef)([]),e6=(0,a.useRef)(null),e7=(0,a.useRef)(null),e8=(0,a.useRef)(null),e9=(0,a.useRef)([]),te=(0,a.useRef)([]),tt=(0,a.useRef)(0);(0,a.useEffect)(()=>{let e=W.map(e=>{let t=new Audio;return t.preload="auto",t.src=e,t});e4.current=e;let t=(null!=el?el:[]).map(e=>{let t=new Audio;return t.preload="auto",e.audioUrl&&(t.src=e.audioUrl),t.crossOrigin="anonymous",t});e9.current=t,te.current=[],tt.current=0;let n=null,r=null,a=[];{let i=window.AudioContext||window.webkitAudioContext;if(i)try{for(let o of((r=(n=new i).createAnalyser()).fftSize=256,r.smoothingTimeConstant=.7,r.connect(n.destination),[...e,...t]))try{let e=n.createMediaElementSource(o);e.connect(r),a.push(e)}catch(e){}
1e6.current=n,e7.current=r,e8.current=new Uint8Array(new ArrayBuffer(r.frequencyBinCount))}catch(e){n=null,r=null}}return()=>{[...e,...t].forEach(e=>{e.pause(),e.removeAttribute("src"),e.load()}),a.forEach(e=>e.disconnect()),r&&r.disconnect(),n&&n.close().catch(()=>{}),e4.current=[],e9.current=[],e6.current=null,e7.current=null,e8.current=null}},[el]);let tn=(0,a.useRef)(null);(0,a.useEffect)(()=>{let e=new Audio;return e.preload="auto",e.loop=!0,e.volume=.5,e.src=L,tn.current=e,()=>{e.pause(),e.removeAttribute("src"),e.load(),tn.current=null}},[]),(0,a.useEffect)(()=>{let e=tn.current;e&&("soundboard"===B&&ec?e.play().catch(()=>{}):e.pause())},[B,ec]);let tr=(0,a.useCallback)(e=>{e.userData.soundboardRestPos||(e.userData.soundboardRestPos=e.position.clone());let t=e.userData.soundboardRestPos;m.ZP.killTweensOf(e.position),m.ZP.timeline().to(e.position,{z:t.z-.005,duration:.08,ease:"power2.out"}).to(e.position,{z:t.z,duration:.18,ease:"back.out(1.5)"})},[]),ta=(0,a.useCallback)((e,t)=>{e.userData.pressRestPos||(e.userData.pressRestPos=e.position.clone());let n=e.userData.pressRestPos,r=new s.Vector3(0,0,-1);if(e.parent){let t=new s.Quaternion;e.parent.getWorldQuaternion(t),r.applyQuaternion(t.invert())}r.normalize();let a=n.x+r.x*t,i=n.y+r.y*t,o=n.z+r.z*t;m.ZP.killTweensOf(e.position),m.ZP.timeline().to(e.position,{x:a,y:i,z:o,duration:.08,ease:"power2.out"}).to(e.position,{x:n.x,y:n.y,z:n.z,duration:.18,ease:"back.out(1.5)"})},[]),ti=(0,a.useCallback)(e=>{if(!eD.current)return;let t=e4.current[e];if(!t)return;let n=e6.current;n&&"suspended"===n.state&&n.resume().catch(()=>{}),t.currentTime=0,t.play().catch(()=>{}),e5.current=(e5.current+1)%3;let r=e2.current;r&&(r.uniforms.uGeometry.value=e5.current)},[]),to=(0,a.useCallback)(()=>{if(!eD.current)return;let e=e9.current;if(0===e.length)return;if(0===te.current.length||tt.current>=te.current.length){let t=Array.from({length:e.length},(e,t)=>t);for(let e=t.length-1;e>0;e--){let n=Math.floor(Math.random()*(e+1));[t[e],t[n]]=[t[n],t[e]]}te.current=t,tt.current=0}let t=te.current[tt.current];tt.current+=1;let n=e[t];if(!n)return;let r=e6.current;r&&"suspended"===r.state&&r.resume().catch(()=>{}),n.currentTime=0,n.play().catch(()=>{})},[]),tl=(0,a.useRef)(null),ts=(0,a.useRef)(!1),tu=(0,a.useCallback)(e=>{let t=tl.current;if(!t)return;tl.current=null,document.removeEventListener("pointermove",t.onMove),document.removeEventListener("pointerup",t.onUp),document.removeEventListener("pointercancel",t.onUp);try{ey.domElement.releasePointerCapture(t.pointerId)}catch(e){}let n=ez.current;if(!n)return;if(!e||t.movedPx<5){t.movedPx>0&&(n.position[t.axis]=t.startKnobCoord);return}ts.current=!0;let r=(0===t.travel?0:(n.position[t.axis]-t.rest)/t.travel)>=.5?"join":"partner";if(eN.current===r){m.ZP.killTweensOf(n.position);let e="join"===r?t.rest+t.travel:t.rest;m.ZP.to(n.position,{[t.axis]:e,duration:.45,ease:"back.out(1.6)"})}else eV(r)},[eV,ey]),tc=(0,a.useCallback)(e=>{var t,n;if(!(null===(t=e.intersections)||void 0===t?void 0:t.find(e=>e.object.userData.isMainToggle||e.object.userData.mainToggleSide)))return;let r=ez.current;if(!r)return;let a=r.parent;if(!a||tl.current)return;let i=eW.current,o=eL.current,l=null!==(n=r.userData["x"===i?"toggleRestX":"y"===i?"toggleRestY":"toggleRestZ"])&&void 0!==n?n:r.position[i];a.updateWorldMatrix(!0,!1);let s=r.position.clone();s[i]=l;let u=r.position.clone();u[i]=l+o;let c=s.applyMatrix4(a.matrixWorld),p=u.applyMatrix4(a.matrixWorld),d=c.clone().project(eb),f=p.clone().project(eb),h=(.5*d.x+.5)*ew.width,v=(1-(.5*d.y+.5))*ew.height,x=(.5*f.x+.5)*ew.width,g=(1-(.5*f.y+.5))*ew.height,y=x-h,b=g-v,w=Math.hypot(y,b);if(w<1)return;m.ZP.killTweensOf(r.position);try{ey.domElement.setPointerCapture(e.pointerId)}catch(e){}let S=e=>{let t=tl.current;if(!t||t.pointerId!==e.pointerId)return;let n=ez.current;if(!n)return;let r=e.clientX-t.startClientX,a=e.clientY-t.startClientY,i=(r*t.slideUnitX+a*t.slideUnitY)/t.pxPerUnit,o=Math.min(t.rest,t.rest+t.travel),l=Math.max(t.rest,t.rest+t.travel);n.position[t.axis]=Math.max(o,Math.min(l,t.startKnobCoord+i)),t.movedPx=Math.max(t.movedPx,Math.hypot(r,a))},M=e=>{tl.current&&tl.current.pointerId===e.pointerId&&tu(!0)};tl.current={pointerId:e.pointerId,axis:i,rest:l,travel:o,startKnobCoord:r.position[i],startClientX:e.clientX,startClientY:e.clientY,slideUnitX:y/w,slideUnitY:b/w,pxPerUnit:w/Math.abs(o),movedPx:0,onMove:S,onUp:M},ts.current=!1,document.addEventListener("pointermove",S),document.addEventListener("pointerup",M),document.addEventListener("pointercancel",M)},[eb,ew,ey,tu]);(0,a.useEffect)(()=>()=>tu(!1),[tu]),(0,a.useEffect)(()=>()=>{document.body.style.cursor=""},[]);let tp=(0,a.useRef)(B);tp.current=B;let td=e=>{let t=e;for(;t;){let e=t.userData;if(e.isTamagotchiButton||e.internshipButton||e.isSoundboardButton||e.isSlideshowButton||e.isMainToggle||e.mainToggleSide)return!0;t=t.parent}return!1};return(0,r.jsx)("group",{ref:ev,scale:n,position:d,onClick:e=>{var n,r,a,i;if(!t)return;e.stopPropagation(),e.object.userData.isTamagotchiButton&&(eX(),eG(q),e.object instanceof s.Mesh&&ta(e.object,.005));let o=e.object.userData.internshipButton;if(o&&e.object.visible&&(eG(O[o.side]),"active"===o.state)){let e="L"===o.side?0:1,t=null==ei?void 0:ei[e];(null==t?void 0:t.link)&&window.open(t.link,"_blank","noopener,noreferrer")}if(e.object.userData.isSoundboardButton&&(ti(null!==(n=e.object.userData.soundboardButtonIndex)&&void 0!==n?n:0),to(),e.object instanceof s.Mesh&&tr(e.object)),e.object.userData.isSlideshowButton&&(eG(G),e.object instanceof s.Mesh&&ta(e.object,.006),window.location.href="mailto:[email protected]"),!ts.current){let t=null===(r=e.intersections)||void 0===r?void 0:r.find(e=>e.object.userData.isMainToggle||e.object.userData.mainToggleSide),n=null==t?void 0:t.object,a=null==n?void 0:n.userData.mainToggleSide;a?eV(a):(null==n?void 0:n.userData.isMainToggle)&&eZ()}ts.current=!1;let l=e.object;for(;l;){let e=V[l.name];if(e){"soundboard"===e&&eD.current&&(null===(a=tn.current)||void 0===a||a.play().catch(()=>{})),"internship"===e&&(null===(i=eQ.current)||void 0===i||i.play().catch(()=>{})),t(e);return}l=l.parent}},onPointerDown:tc,onPointerMove:t?e=>{var t,n,r;let a=null!==(r=null===(n=e.intersections)||void 0===n?void 0:null===(t=n[0])||void 0===t?void 0:t.object)&&void 0!==r?r:e.object,i=!tp.current||td(a);document.body.style.cursor=i?"pointer":""}:void 0,onPointerOut:t?()=>{document.body.style.cursor=""}:void 0,children:(0,r.jsx)("group",{ref:ek,children:(0,r.jsx)("primitive",{object:e_})})})}},6247:function(e,t,n){n.d(t,{BA:function(){return f},DH:function(){return M},FJ:function(){return u},HF:function(){return g},IE:function(){return v},II:function(){return h},VC:function(){return c},_A:function(){return m},e8:function(){return d},gV:function(){return y},rO:function(){return p}});var r=n(27573),a=n(7653),i=n(97551),o=n(13195),l=n(25245),s=n(78813);let u=["point","spot","directional","ambient","hemisphere"],c={ambient:"ambientLight",hemisphere:"hemisphereLight",directional:"directionalLight",point:"pointLight",spot:"spotLight"},p=e=>"ambient"!==e,d=e=>"directional"===e||"spot"===e,f=e=>"directional"===e||"point"===e||"spot"===e,m={color:"#ffffff",intensity:1,position:[0,.5,1],groundColor:"#444444",distance:0,decay:2,angle:.5,penumbra:.5,focus:1,target:[0,0,0],shadowBias:-.0005,shadowNormalBias:0,shadowRadius:1,shadowMapSize:1024,shadowNear:.5,shadowFar:50,shadowCameraSize:10};function h(e){var t,n,r,a,i,o,l,s,u;
1let c={color:null!==(t=e.color)&&void 0!==t?t:m.color,intensity:null!==(n=e.intensity)&&void 0!==n?n:m.intensity};return p(e.type)&&(c.position=null!==(r=e.position)&&void 0!==r?r:m.position),"hemisphere"===e.type&&(c.groundColor=null!==(a=e.groundColor)&&void 0!==a?a:m.groundColor),("point"===e.type||"spot"===e.type)&&(c.distance=null!==(i=e.distance)&&void 0!==i?i:m.distance,c.decay=null!==(o=e.decay)&&void 0!==o?o:m.decay),"spot"===e.type&&(c.angle=null!==(l=e.angle)&&void 0!==l?l:m.angle,c.penumbra=null!==(s=e.penumbra)&&void 0!==s?s:m.penumbra),f(e.type)&&(c.castShadow=null!==(u=e.castShadow)&&void 0!==u&&u),c}function v(e,t,n,r){var a,i,o,l,s,u,c,p,f,h;if(d(t.type)){let[i,o,l]=null!==(a=t.target)&&void 0!==a?a:m.target;r.position.set(i,o,l),r.parent||n.add(r),e.target=r}let v=e.shadow;if(t.castShadow&&v){let e=v.camera;if(v.bias=null!==(i=t.shadowBias)&&void 0!==i?i:m.shadowBias,v.normalBias=null!==(o=t.shadowNormalBias)&&void 0!==o?o:m.shadowNormalBias,v.radius=null!==(l=t.shadowRadius)&&void 0!==l?l:m.shadowRadius,e.near=null!==(s=t.shadowNear)&&void 0!==s?s:m.shadowNear,e.far=null!==(u=t.shadowFar)&&void 0!==u?u:m.shadowFar,"directional"===t.type){let e=null!==(c=t.shadowCameraSize)&&void 0!==c?c:m.shadowCameraSize,n=v.camera;n.left=-e,n.right=e,n.top=e,n.bottom=-e}"spot"===t.type&&(v.focus=null!==(p=t.focus)&&void 0!==p?p:m.focus);let n=null!==(f=t.shadowMapSize)&&void 0!==f?f:m.shadowMapSize;v.mapSize.width!==n&&(v.mapSize.set(n,n),null===(h=v.map)||void 0===h||h.dispose(),v.map=null),e.updateProjectionMatrix()}}function x(e){let{config:t}=e,{scene:n}=(0,i.D)(),r=(0,a.useRef)(null),o=(0,a.useRef)(new s.Object3D);return(0,a.useEffect)(()=>{r.current&&v(r.current,t,n,o.current);let e=o.current;return()=>{e.parent&&n.remove(e)}},[n,t]),(0,a.createElement)(c[t.type],{ref:r,...h(t)})}function g(e){let{lights:t}=e;return(0,r.jsx)(r.Fragment,{children:t.map((e,t)=>(0,r.jsx)(x,{config:e},t))})}let y={intensity:1,rotationY:0,showBackground:!1,backgroundBlur:0},b=["png","jpg","jpeg","webp"];function w(e){var t,n,r,a;return{environmentIntensity:null!==(t=e.intensity)&&void 0!==t?t:y.intensity,environmentRotation:new s.Euler(0,null!==(n=e.rotationY)&&void 0!==n?n:y.rotationY,0),background:null!==(r=e.showBackground)&&void 0!==r?r:y.showBackground,backgroundBlurriness:null!==(a=e.backgroundBlur)&&void 0!==a?a:y.backgroundBlur}}function S(e){let{config:t}=e,n=(0,o.mE)(t.files);return n.mapping=s.EquirectangularReflectionMapping,n.colorSpace
1=s.SRGBColorSpace,(0,r.jsx)(l.qA,{map:n,...w(t)})}function M(e){var t,n;let{config:a,texture:i}=e;if(i)return(0,r.jsx)(l.qA,{map:i,...w(a)});if(!a.files)return null;let o=null!==(n=null===(t=a.files.split(".").pop())||void 0===t?void 0:t.toLowerCase())&&void 0!==n?n:"";return b.includes(o)?(0,r.jsx)(S,{config:a}):(0,r.jsx)(l.qA,{files:a.files,...w(a)})}},91617:function(e,t,n){n.d(t,{Vh:function(){return a.useLogoHover},cT:function(){return r.useSound}}),n(48050),n(74267),n(35544),n(60575),n(20185),n(11367);var r=n(85515);n(60803);var a=n(34582)},52207:function(e,t,n){function r(e){return"https://stream.mux.com/".concat(e,"/1080p.mp4")}function a(e,t){let n="https://image.mux.com/".concat(e,"/thumbnail.jpg");return t?"".concat(n,"?width=").concat(t,"&fit_mode=preserve"):n}n.d(t,{Kz:function(){return r},X$:function(){return a},ih:function(){return o},jC:function(){return s},zI:function(){return l}});let i=[640,750,828,1080,1280,1920];function o(e){return i.map(t=>"".concat(a(e,t)," ").concat(t,"w")).join(", ")}function l(e){return"https://stream.mux.com/".concat(e,".m3u8")}function s(e){if(e.videoAspectRatio){let[t,n]=e.videoAspectRatio.split(":").map(Number);if(t>0&&n>0)return{width:t,height:n}}let t=e.videoDimensions;return(null==t?void 0:t.width)&&(null==t?void 0:t.height)?{width:t.width,height:t.height}:null}},23766:function(e,t,n){n.d(t,{u:function(){return f}});var r=n(87664),a=n.n(r),i=n(60911),o=n(68571);let l="n405s3jq",s="web2026",u="2024-01-01",c=o.env.SANITY_API_TOKEN;if(!l)throw Error("Missing NEXT_PUBLIC_SANITY_PROJECT_ID environment variable");let p=(0,i.eI)({projectId:l,dataset:s,apiVersion:u,useCdn:!1,perspective:"published",stega:{enabled:!1,studioUrl:"/studio"}});(0,i.eI)({projectId:l,dataset:s,apiVersion:u,useCdn:!1,token:c,perspective:"previewDrafts",stega:{enabled:!0,studioUrl:o.env.SANITY_STUDIO_URL||"http://localhost:3333"}});let d=a()(p);function f(e){return d.image(e)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.