import{n as e,s as t}from"./rolldown-runtime-BG2f4sTM.js";import{dn as n,un as r,zt as i}from"./app-initial~avatarOverlayCompositionSurface~index-9fQ9wihu~index-BFCcxPM5~mapbox-gl-DVWlwqb~kppdhley-CabsBVhy.js";import{S as a,d as o,h as s,i as c,s as l,t as u,y as d}from"./app-initial~avatarOverlayCompositionSurface~artifact-tab-content.electron~notebook-preview-~mfl5y5w0-EMlrcfp2.js";import{i as f,n as p,r as ee,t as te}from"./app-initial~app-main~onboarding-page~hotkey-window-thread-page~quick-chat-window-page~chatg~b1ew1ta1-D0bcuZKM.js";function m(e,t){let n=Math.sin((e+1)*12.9898+t*78.233)*43758.5453;return n-Math.floor(n)}var h=e((()=>{})),g,ne,re,ie,_,ae,v,y,b=e((()=>{g=`_FastTrackParticles_1pz9e_1`,ne=`_FastTrackParticleTravel_1pz9e_1`,re=`_FastTrackParticlePath_1pz9e_7`,ie=`_TrackParticle_1pz9e_22`,_=`_TrackParticles_1pz9e_38`,ae=`_Burst_1pz9e_76`,v=`_ParticleBurst_1pz9e_1`,y={FastTrackParticles:g,FastTrackParticleTravel:ne,FastTrackParticlePath:re,TrackParticle:ie,TrackParticles:_,Burst:ae,ParticleBurst:v}}));function oe(e){let t=(0,x.c)(5),{animationActive:n,initialStartPercent:r}=e,[i]=(0,se.useState)(r),a=1-Math.min(Math.max(i,0),100)/100,o;t[0]===a?o=t[1]:(o=Array.from({length:14},(e,t)=>{let n=1+(m(t,21)-.5)*2*le,r=S/n,i=r*a,o=.4+m(t,11)*.6,s=.5+m(t,12)*.45;return(0,ce.jsx)(`span`,{className:y.FastTrackParticlePath,style:{animationDelay:`${t*ue-i}s`,animationDuration:`${r}s`,top:`${12+m(t,23)*76}%`},children:(0,ce.jsx)(`span`,{className:y.TrackParticle,style:{opacity:o,transform:`translate(-50%, -50%) scale(${s})`}})},t)}),t[0]=a,t[1]=o);let s;return t[2]!==n||t[3]!==o?(s=(0,ce.jsx)(`span`,{"aria-hidden":!0,className:y.FastTrackParticles,"data-animation-active":n,children:o}),t[2]=n,t[3]=o,t[4]=s):s=t[4],s}var x,se,ce,S,le,ue,de=e((()=>{x=r(),se=t(n(),1),h(),b(),ce=i(),S=1.9,le=.2,ue=S/14}));function fe(){let e=(0,me.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,C.jsx)(`span`,{"aria-hidden":!0,className:y.Burst,children:Array.from({length:16},pe)}),e[0]=t):t=e[0],t}function pe(e,t){return(0,C.jsx)(`span`,{},t)}var me,C,he=e((()=>{me=r(),b(),C=i()})),ge,w,T,E,D,O=e((()=>{ge=`_Fill_notip_7`,w=`_Reveal_notip_1`,T=`_Mask_notip_14`,E=`_Canvas_notip_61`,D={Fill:ge,Reveal:w,Mask:T,Canvas:E}}));function _e(e){let t=(0,xe.c)(7),{active:n,reveal:r,shouldReduceMotion:i}=e,a=(0,k.useRef)(null),o,s;t[0]!==n||t[1]!==i?(o=()=>{if(!n)return;let e=a.current;if(e!=null)return ve(e,i)},s=[n,i],t[0]=n,t[1]=i,t[2]=o,t[3]=s):(o=t[2],s=t[3]),(0,k.useEffect)(o,s);let c;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,A.jsx)(`span`,{className:D.Mask,children:(0,A.jsx)(`canvas`,{className:D.Canvas,ref:a})}),t[4]=c):c=t[4];let l;return t[5]===r?l=t[6]:(l=(0,A.jsx)(`span`,{"aria-hidden":!0,className:D.Fill,"data-reveal":r,children:c}),t[5]=r,t[6]=l),l}function ve(e,t){if(typeof WebGLRenderingContext>`u`||typeof ResizeObserver>`u`)return;let n=e.getContext(`webgl`,{alpha:!0,antialias:!1,depth:!1,powerPreference:`high-performance`,stencil:!1});if(n==null)return;let r=ye(n);if(r==null)return;let i=n.createBuffer();if(i==null){n.deleteProgram(r);return}let a=n.getAttribLocation(r,`aPosition`),o=n.getUniformLocation(r,`uResolution`),s=n.getUniformLocation(r,`uTime`),c=performance.now(),l=0;n.useProgram(r),n.bindBuffer(n.ARRAY_BUFFER,i),n.bufferData(n.ARRAY_BUFFER,M,n.STATIC_DRAW),n.enableVertexAttribArray(a),n.vertexAttribPointer(a,2,n.FLOAT,!1,0,0);let u=e=>{n.uniform1f(s,e),n.drawArrays(n.TRIANGLES,0,6)},d=()=>{let r=Math.min(window.devicePixelRatio,2),{height:i,width:a}=e.getBoundingClientRect(),s=Math.max(Math.round(a),1),l=Math.max(Math.round(i),1);e.width=Math.round(s*r),e.height=Math.round(l*r),n.viewport(0,0,e.width,e.height),n.uniform2f(o,s,l),u(t?0:(performance.now()-c)/1e3)},f=e=>{l=0,u((e-c)/1e3),l=window.requestAnimationFrame(f)},p=new ResizeObserver(d);return d(),p.observe(e),t||(l=window.requestAnimationFrame(f)),()=>{l!==0&&window.cancelAnimationFrame(l),p.disconnect(),n.deleteBuffer(i),n.deleteProgram(r)}}function ye(e){let t=be(e,e.VERTEX_SHADER,j),n=be(e,e.FRAGMENT_SHADER,Se);if(t==null||n==null)return t!=null&&e.deleteShader(t),n!=null&&e.deleteShader(n),null;let r=e.createProgram();return r==null?(e.deleteShader(t),e.deleteShader(n),null):(e.attachShader(r,t),e.attachShader(r,n),e.linkProgram(r),e.deleteShader(t),e.deleteShader(n),e.getProgramParameter(r,e.LINK_STATUS)?r:(e.deleteProgram(r),null))}function be(e,t,n){let r=e.createShader(t);return r==null?null:(e.shaderSource(r,n),e.compileShader(r),e.getShaderParameter(r,e.COMPILE_STATUS)?r:(e.deleteShader(r),null))}var xe,k,A,j,Se,M,N=e((()=>{xe=r(),k=t(n(),1),O(),A=i(),j=`
  attribute vec2 aPosition;
  varying vec2 vUv;

  void main() {
    vUv = aPosition * 0.5 + 0.5;
    gl_Position = vec4(aPosition, 0.0, 1.0);
  }
`,Se=`
  precision highp float;

  varying vec2 vUv;

  uniform float uTime;
  uniform vec2 uResolution;

  const vec3 COLOR_1 = vec3(0.592, 0.388, 0.945);
  const vec3 COLOR_2 = vec3(0.831, 0.710, 0.953);
  const vec3 COLOR_3 = vec3(0.286, 0.000, 0.404);
  const vec3 COLOR_4 = vec3(0.145, 0.055, 0.478);
  const vec3 COLOR_5 = vec3(0.592, 0.000, 0.996);
  const vec3 COLOR_6 = vec3(0.780, 0.459, 0.914);
  const vec3 COLOR_7 = vec3(0.725, 0.576, 1.000);
  const vec3 COLOR_8 = vec3(0.400, 0.212, 0.820);
  const vec3 COLOR_9 = vec3(0.882, 0.690, 1.000);
  const vec3 COLOR_10 = vec3(0.498, 0.345, 0.957);
  const vec3 COLOR_11 = vec3(0.659, 0.275, 0.910);
  const vec3 COLOR_12 = vec3(0.212, 0.063, 0.400);

  float grain(vec2 uv) {
    vec2 grainUv = uv * uResolution * 0.5;
    return fract(sin(dot(grainUv + uTime, vec2(12.9898, 78.233))) * 43758.5453) * 2.0 - 1.0;
  }

  float fieldWeight(vec2 point, vec2 center) {
    return exp(-dot(point - center, point - center) * 12.0);
  }

  vec3 fieldColor(vec2 rawUv) {
    const float speed = 1.25;
    vec2 uv = vec2(rawUv.x, 0.40 + rawUv.y * 0.18);
    vec2 spatialScale = vec2(1.55, 1.0);
    vec2 point = uv * spatialScale;
    vec2 center1 = vec2(0.18 + sin(uTime * speed * 0.42) * 0.18, 0.36 + cos(uTime * speed * 0.50) * 0.42) * spatialScale;
    vec2 center2 = vec2(0.34 + cos(uTime * speed * 0.62) * 0.24, 0.62 + sin(uTime * speed * 0.47) * 0.38) * spatialScale;
    vec2 center3 = vec2(0.52 + sin(uTime * speed * 0.38) * 0.28, 0.30 + cos(uTime * speed * 0.58) * 0.36) * spatialScale;
    vec2 center4 = vec2(0.70 + cos(uTime * speed * 0.54) * 0.24, 0.68 + sin(uTime * speed * 0.41) * 0.36) * spatialScale;
    vec2 center5 = vec2(0.88 + sin(uTime * speed * 0.74) * 0.16, 0.36 + cos(uTime * speed * 0.64) * 0.40) * spatialScale;
    vec2 center6 = vec2(0.12 + cos(uTime * speed * 0.48) * 0.20, 0.72 + sin(uTime * speed * 0.70) * 0.30) * spatialScale;
    vec2 center7 = vec2(0.30 + sin(uTime * speed * 0.58) * 0.22, 0.44 + cos(uTime * speed * 0.52) * 0.42) * spatialScale;
    vec2 center8 = vec2(0.46 + cos(uTime * speed * 0.68) * 0.26, 0.72 + sin(uTime * speed * 0.56) * 0.32) * spatialScale;
    vec2 center9 = vec2(0.60 + sin(uTime * speed * 0.44) * 0.28, 0.26 + cos(uTime * speed * 0.60) * 0.38) * spatialScale;
    vec2 center10 = vec2(0.76 + cos(uTime * speed * 0.50) * 0.22, 0.54 + sin(uTime * speed * 0.66) * 0.40) * spatialScale;
    vec2 center11 = vec2(0.92 + sin(uTime * speed * 0.70) * 0.15, 0.66 + cos(uTime * speed * 0.46) * 0.30) * spatialScale;
    vec2 center12 = vec2(0.06 + cos(uTime * speed * 0.40) * 0.14, 0.32 + sin(uTime * speed * 0.60) * 0.40) * spatialScale;
    float weight1 = fieldWeight(point, center1) * (0.7 + 0.3 * sin(uTime * 0.91));
    float weight2 = fieldWeight(point, center2) * (0.7 + 0.3 * cos(uTime * 1.07));
    float weight3 = fieldWeight(point, center3) * (0.7 + 0.3 * sin(uTime * 0.76));
    float weight4 = fieldWeight(point, center4) * (0.7 + 0.3 * cos(uTime * 1.18));
    float weight5 = fieldWeight(point, center5) * (0.7 + 0.3 * sin(uTime * 1.03));
    float weight6 = fieldWeight(point, center6) * (0.7 + 0.3 * cos(uTime * 0.83));
    float weight7 = fieldWeight(point, center7) * (0.7 + 0.3 * sin(uTime * 1.24));
    float weight8 = fieldWeight(point, center8) * (0.7 + 0.3 * cos(uTime * 0.96));
    float weight9 = fieldWeight(point, center9) * (0.7 + 0.3 * sin(uTime * 1.11));
    float weight10 = fieldWeight(point, center10) * (0.7 + 0.3 * cos(uTime * 0.72));
    float weight11 = fieldWeight(point, center11) * (0.7 + 0.3 * sin(uTime * 1.29));
    float weight12 = fieldWeight(point, center12) * (0.7 + 0.3 * cos(uTime * 0.88));
    float totalWeight = max(
      weight1 + weight2 + weight3 + weight4 + weight5 + weight6 +
        weight7 + weight8 + weight9 + weight10 + weight11 + weight12,
      0.0001
    );
    vec3 color = (
      COLOR_1 * weight1 + COLOR_2 * weight2 + COLOR_3 * weight3 +
      COLOR_4 * weight4 + COLOR_5 * weight5 + COLOR_6 * weight6 +
      COLOR_7 * weight7 + COLOR_8 * weight8 + COLOR_9 * weight9 +
      COLOR_10 * weight10 + COLOR_11 * weight11 + COLOR_12 * weight12
    ) / totalWeight;
    color = mix(COLOR_4, color, 0.96);

    return pow(clamp(color, vec3(0.0), vec3(1.0)), vec3(0.9));
  }

  void main() {
    vec3 color = fieldColor(vUv);
    color += grain(vUv) * 0.012;
    color.r += sin(uTime * 0.5) * 0.02;
    color.g += cos(uTime * 0.7) * 0.02;
    color.b += sin(uTime * 0.6) * 0.02;
    color = pow(color, vec3(0.92));

    gl_FragColor = vec4(color, 1.0);
  }
`,M=new Float32Array([-1,-1,1,-1,-1,1,-1,1,1,-1,1,1])}));function P(e){let t=(0,Ee.c)(13),{animationActive:n,index:r}=e,i;t[0]===r?i=t[1]:(i=()=>Ce(r),t[0]=r,t[1]=i);let[a,o]=(0,F.useState)(i),s;t[2]===r?s=t[3]:(s=Math.round(4+m(r,14)*92),t[2]=r,t[3]=s);let c=s,l=Oe*a.durationScale,u=.4+m(r,11)*.6,d=.5+m(r,12)*.45,f,p;t[4]===n?(f=t[5],p=t[6]):(f=()=>{if(!n)return;let e=0,t=()=>{let n=we();o(n),e=window.setTimeout(t,Oe*n.durationScale*1e3)},r=window.requestAnimationFrame(t);return()=>{window.cancelAnimationFrame(r),window.clearTimeout(e)}},p=[n],t[4]=n,t[5]=f,t[6]=p),(0,F.useEffect)(f,p);let ee=`calc(${c}% + ${a.horizontalOffset}px)`,te=`translate(-50%, -50%) scale(${d})`,h=`${l}s`,g;return t[7]!==u||t[8]!==ee||t[9]!==te||t[10]!==h||t[11]!==a.y?(g=(0,De.jsx)(`span`,{className:y.TrackParticle,style:{left:ee,opacity:u,top:a.y,transform:te,transitionDuration:h}}),t[7]=u,t[8]=ee,t[9]=te,t[10]=h,t[11]=a.y,t[12]=g):g=t[12],g}function Ce(e){let t=1;return Te(()=>{let n=m(e,t);return t+=1,n})}function we(){return Te(Math.random)}function Te(e){let t=e(),n=e();return{durationScale:.8+e()*1.2,horizontalOffset:Math.round((t-.5)*8),y:Math.round(12+(n-.5)*14)}}var Ee,F,De,Oe,ke=e((()=>{Ee=r(),F=t(n(),1),h(),b(),De=i(),Oe=1.6}));function Ae(e){let t=(0,je.c)(2),{animationActive:n}=e,r;return t[0]===n?r=t[1]:(r=(0,I.jsx)(`span`,{"aria-hidden":!0,className:y.TrackParticles,children:Array.from({length:14},(e,t)=>(0,I.jsx)(P,{animationActive:n,index:t},t))}),t[0]=n,t[1]=r),r}var je,I,L=e((()=>{je=r(),ke(),h(),b(),I=i()})),Me,Ne,Pe,Fe,Ie,Le,Re,ze,Be,Ve,He,Ue,We,Ge,R,Ke,z,qe,B,V,H,U,W,G=e((()=>{Me=`_Container_3jngk_1`,Ne=`_Thumb_3jngk_12`,Pe=`_Root_3jngk_19`,Fe=`_EnableModelPickerPowerSliderThumbInputMotion_3jngk_1`,Ie=`_FastModeTickScale_3jngk_1`,Le=`_FastModeTickTranslate_3jngk_1`,Re=`_FastModeTickFade_3jngk_1`,ze=`_FastModeTickReturnScale_3jngk_1`,Be=`_FastModeTickReturnTranslate_3jngk_1`,Ve=`_FastModeTickReturnFade_3jngk_1`,He=`_Tick_3jngk_40`,Ue=`_ThumbInput_3jngk_116`,We=`_Track_3jngk_212`,Ge=`_Range_3jngk_226`,R=`_MaxEffects_3jngk_236`,Ke=`_FastParticleClip_3jngk_242`,z=`_ParticleTransition_3jngk_251`,qe=`_TickRail_3jngk_259`,B=`_VisualThumbRail_3jngk_302`,V=`_ThumbScale_3jngk_343`,H=`_MaxBurst_3jngk_352`,U=`_ThumbSpring_3jngk_358`,W={Container:Me,Thumb:Ne,Root:Pe,EnableModelPickerPowerSliderThumbInputMotion:Fe,FastModeTickScale:Ie,FastModeTickTranslate:Le,FastModeTickFade:Re,FastModeTickReturnScale:ze,FastModeTickReturnTranslate:Be,FastModeTickReturnFade:Ve,Tick:He,ThumbInput:Ue,Track:We,Range:Ge,MaxEffects:R,FastParticleClip:Ke,ParticleTransition:z,TickRail:qe,VisualThumbRail:B,ThumbScale:V,MaxBurst:H,ThumbSpring:U}}));function K(e){let t=(0,$e.c)(144),{active:n,disabled:r,fastModeEnabled:i,keyboardControlFocused:u,onDragToMax:f,onSelectOption:m,options:h,selectedOptionId:g,shouldReduceMotion:ne,transitionsReady:re}=e,ie=r===void 0?!1:r,_=re===void 0?!0:re,ae=l(),v=ne??ae??!1,y=i?`active`:`inactive`,b;t[0]!==i||t[1]!==y?(b={enabled:i,phase:y,sequence:0},t[0]=i,t[1]=y,t[2]=b):b=t[2];let[x,se]=(0,Y.useState)(b),[ce,S]=(0,Y.useReducer)(Ye,vt),le=(0,Y.useRef)(null),ue=(0,Y.useRef)(!1),de=(0,Y.useRef)(!1),pe;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(pe={accumulatedDelta:0,lastEventTime:0},t[3]=pe):pe=t[3];let me=(0,Y.useRef)(pe),{isDragging:C,isPointerDown:he,isThumbHovered:ge,maxBurstKey:w,previewBaseOptionId:T,previewIndex:E,previewOptionIds:D}=ce,O=ie||h.length<=1,ve;if(t[4]!==h||t[5]!==g){let e;t[7]===g?e=t[8]:(e=e=>{let{id:t}=e;return t===g},t[7]=g,t[8]=e),ve=h.findIndex(e),t[4]=h,t[5]=g,t[6]=ve}else ve=t[6];let ye=Math.max(ve,0),be=E==null?void 0:h[E],xe;t[9]!==T||t[10]!==D||t[11]!==be||t[12]!==g?(xe=be!=null&&be.id!==g&&(g===T||D.slice(0,-1).some(e=>e===g)),t[9]=T,t[10]=D,t[11]=be,t[12]=g,t[13]=xe):xe=t[13];let k=xe;E!=null&&!k&&S({type:`preview_acknowledged`});let A=h.length-1,j=Math.min(k&&E!=null?E:ye,A),Se=h[j],M=A<=0?0:Math.max(j,0)/A*100,N=A>0&&Se?.isMax===!0,P=s(M),Ce;t[14]===A?Ce=t[15]:(Ce=e=>Ze(e,A),t[14]=A,t[15]=Ce);let we=o(P,Ce),Te;t[16]===A?Te=t[17]:(Te=e=>Qe(e,A),t[16]=A,t[17]=Te);let Ee=o(P,Te),F;t[18]!==i||t[19]!==A?(F=e=>Ze(e,A,-(1-(i?0:tt))),t[18]=i,t[19]=A,t[20]=F):F=t[20];let De=o(P,F),Oe=o(P,Xe);x.enabled!==i&&se({enabled:i,phase:i?`entering`:`exiting`,sequence:x.sequence+1});let ke,je;t[21]===i?(ke=t[22],je=t[23]):(ke=()=>{let e=window.setTimeout(()=>{se(e=>{let t=i?`active`:`inactive`;return e.enabled===i&&e.phase!==t?{...e,phase:t}:e})},i?nt:rt);return()=>window.clearTimeout(e)},je=[i],t[21]=i,t[22]=ke,t[23]=je),(0,Y.useEffect)(ke,je);let I;t[24]!==j||t[25]!==k||t[26]!==O||t[27]!==N||t[28]!==A||t[29]!==f||t[30]!==m||t[31]!==h||t[32]!==T||t[33]!==g?(I=e=>{let t=h[e];if(O||t==null||e===j)return;let n=A>0&&t.isMax;n?de.current||(de.current=!0,ue.current&&f()):de.current=!1,m(t),S({type:`value_preview`,atMax:n,baseOptionId:k&&T!=null?T:g,enteredMax:n&&!N,index:e,optionId:t.id})},t[24]=j,t[25]=k,t[26]=O,t[27]=N,t[28]=A,t[29]=f,t[30]=m,t[31]=h,t[32]=T,t[33]=g,t[34]=I):I=t[34];let L=I,Me;t[35]===Symbol.for(`react.memo_cache_sentinel`)?(Me=()=>{ue.current=!1,de.current=!1,S({type:`pointer_up`})},t[35]=Me):Me=t[35];let Ne=Me,Pe;t[36]!==j||t[37]!==O||t[38]!==A||t[39]!==L?(Pe=e=>{if(e.ctrlKey||O||A<=0)return;e.preventDefault(),e.stopPropagation();let t=Math.abs(e.deltaX)>Math.abs(e.deltaY)?e.deltaX:-e.deltaY;`webkitDirectionInvertedFromDevice`in e&&e.webkitDirectionInvertedFromDevice===!0&&(t*=-1);let n=e.deltaMode===WheelEvent.DOM_DELTA_PIXEL?t:Math.sign(t)*_t;if(n===0)return;let r=me.current;if((e.timeStamp-r.lastEventTime>gt||Math.sign(n)!==Math.sign(r.accumulatedDelta))&&(r.accumulatedDelta=0),r.lastEventTime=e.timeStamp,r.accumulatedDelta+=n,Math.abs(r.accumulatedDelta)<_t)return;let i=Math.sign(r.accumulatedDelta);r.accumulatedDelta-=i*_t;let a=Math.max(0,Math.min(j+i,A));if(a===j){r.accumulatedDelta=0;return}L(a),S({type:`pointer_up`})},t[36]=j,t[37]=O,t[38]=A,t[39]=L,t[40]=Pe):Pe=t[40];let Fe=(0,Y.useEffectEvent)(Pe),Ie;t[41]===Fe?Ie=t[42]:(Ie=()=>{let e=le.current;if(e==null)return;let t=e=>Fe(e);return e.addEventListener(`wheel`,t,{passive:!1}),()=>e.removeEventListener(`wheel`,t)},t[41]=Fe,t[42]=Ie);let Le;t[43]===Symbol.for(`react.memo_cache_sentinel`)?(Le=[],t[43]=Le):Le=t[43],(0,Y.useEffect)(Ie,Le);let Re,ze;if(t[44]!==n||t[45]!==P||t[46]!==M||t[47]!==C||t[48]!==v?(Re=()=>{if(!n||v){P.jump(M);return}let e=c(P,M,C?at:it);return()=>e.stop()},ze=[n,P,M,C,v],t[44]=n,t[45]=P,t[46]=M,t[47]=C,t[48]=v,t[49]=Re,t[50]=ze):(Re=t[49],ze=t[50]),(0,Y.useEffect)(Re,ze),Se==null)return null;let Be=!O&&(ge||he),Ve=!O&&C,He=x.phase,Ue=!O&&he,We=Math.max(A,1),Ge;t[51]===Symbol.for(`react.memo_cache_sentinel`)?(Ge=e=>{e.stopPropagation(),Ne()},t[51]=Ge):Ge=t[51];let R;t[52]===O?R=t[53]:(R=e=>{e.stopPropagation(),ue.current=!1,de.current=!1,O||S({type:`pointer_down`})},t[52]=O,t[53]=R);let Ke;t[54]===Symbol.for(`react.memo_cache_sentinel`)?(Ke=e=>{e.buttons!==0&&(ue.current=!0)},t[54]=Ke):Ke=t[54];let z;t[55]===O?z=t[56]:(z=e=>{e.stopPropagation(),!O&&e.buttons!==0&&S({type:`pointer_move`})},t[55]=O,t[56]=z);let qe;t[57]===Symbol.for(`react.memo_cache_sentinel`)?(qe=e=>{e.stopPropagation(),Ne()},t[57]=qe):qe=t[57];let B;t[58]===L?B=t[59]:(B=e=>{let t=e[0];t!=null&&L(t)},t[58]=L,t[59]=B);let V;t[60]===j?V=t[61]:(V=[j],t[60]=j,t[61]=V);let H;t[62]===we?H=t[63]:(H={transform:we},t[62]=we,t[63]=H);let U;t[64]!==n||t[65]!==De||t[66]!==x.enabled||t[67]!==x.phase||t[68]!==x.sequence||t[69]!==N||t[70]!==w||t[71]!==v||t[72]!==_?(U=N?(0,X.jsxs)(d.span,{animate:{opacity:1},className:W.MaxEffects,exit:{opacity:0},initial:{opacity:0},style:{transform:De},transition:v?ht:it,children:[(0,X.jsx)(_e,{active:n,reveal:!v&&w>0,shouldReduceMotion:v}),(0,X.jsx)(a,{children:!x.enabled&&!v?(0,X.jsx)(d.span,{animate:{opacity:1,transition:x.phase===`exiting`?lt:ot,x:0},className:W.ParticleTransition,exit:{opacity:0,transition:ut,x:-110},initial:_?{opacity:0,x:x.phase===`exiting`?28:0}:!1,children:(0,X.jsx)(Ae,{animationActive:n})},`max-particles-${x.sequence}`):null})]},`max-effects`):null,t[64]=n,t[65]=De,t[66]=x.enabled,t[67]=x.phase,t[68]=x.sequence,t[69]=N,t[70]=w,t[71]=v,t[72]=_,t[73]=U):U=t[73];let G;t[74]===U?G=t[75]:(G=(0,X.jsx)(a,{initial:!1,children:U}),t[74]=U,t[75]=G);let K;t[76]!==H||t[77]!==G?(K=(0,X.jsx)(d.span,{"aria-hidden":!0,className:W.Range,style:H,children:G}),t[76]=H,t[77]=G,t[78]=K):K=t[78];let q;t[79]!==n||t[80]!==Ee||t[81]!==M||t[82]!==x.enabled||t[83]!==x.sequence||t[84]!==N||t[85]!==v||t[86]!==_?(q=x.enabled&&!v?(0,X.jsx)(d.span,{animate:{opacity:1},className:W.FastParticleClip,exit:{opacity:0,transition:N?ct:ft},initial:{opacity:0},style:{clipPath:Ee},transition:N?st:dt,children:(0,X.jsx)(oe,{animationActive:n,initialStartPercent:_?M:0})},`fast-particles-${x.sequence}`):null,t[79]=n,t[80]=Ee,t[81]=M,t[82]=x.enabled,t[83]=x.sequence,t[84]=N,t[85]=v,t[86]=_,t[87]=q):q=t[87];let J;t[88]===q?J=t[89]:(J=(0,X.jsx)(a,{initial:!1,children:q}),t[88]=q,t[89]=J);let Z;if(t[90]!==j||t[91]!==A||t[92]!==h){let e;t[94]!==j||t[95]!==A?(e=(e,t)=>(0,X.jsx)(`span`,{className:W.Tick,"data-selected":t<=j,style:{left:Xe(A===0?0:t/A*100)}},e.id),t[94]=j,t[95]=A,t[96]=e):e=t[96],Z=h.map(e),t[90]=j,t[91]=A,t[92]=h,t[93]=Z}else Z=t[93];let Q;t[97]===Z?Q=t[98]:(Q=(0,X.jsx)(`div`,{className:W.TickRail,children:Z}),t[97]=Z,t[98]=Q);let yt;t[99]!==K||t[100]!==J||t[101]!==Q?(yt=(0,X.jsxs)(ee,{className:W.Track,children:[K,J,Q]}),t[99]=K,t[100]=J,t[101]=Q,t[102]=yt):yt=t[102];let $;t[103]===Oe?$=t[104]:($={left:Oe},t[103]=Oe,t[104]=$);let bt;t[105]!==N||t[106]!==w||t[107]!==v?(bt=N&&w>0&&!v?(0,X.jsx)(`span`,{className:W.MaxBurst,"data-model-picker-power-slider-max-burst":!0,children:(0,X.jsx)(fe,{},w)}):null,t[105]=N,t[106]=w,t[107]=v,t[108]=bt):bt=t[108];let xt=!v&&Be?et:1,St;t[109]===xt?St=t[110]:(St={scale:xt},t[109]=xt,t[110]=St);let Ct=v?ht:Be?pt:mt,wt;t[111]===Symbol.for(`react.memo_cache_sentinel`)?(wt=(0,X.jsx)(`span`,{className:W.Thumb}),t[111]=wt):wt=t[111];let Tt;t[112]!==St||t[113]!==Ct?(Tt=(0,X.jsx)(d.span,{animate:St,className:W.ThumbSpring,initial:!1,transition:Ct,children:wt}),t[112]=St,t[113]=Ct,t[114]=Tt):Tt=t[114];let Et;t[115]!==$||t[116]!==bt||t[117]!==Tt?(Et=(0,X.jsx)(`div`,{"aria-hidden":!0,className:W.VisualThumbRail,children:(0,X.jsxs)(d.span,{className:W.ThumbScale,style:$,children:[bt,Tt]})}),t[115]=$,t[116]=bt,t[117]=Tt,t[118]=Et):Et=t[118];let Dt;t[119]===Symbol.for(`react.memo_cache_sentinel`)?(Dt=()=>{S({type:`pointer_up`})},t[119]=Dt):Dt=t[119];let Ot;t[120]===O?Ot=t[121]:(Ot=()=>{O||S({type:`thumb_hover`,hovered:!0})},t[120]=O,t[121]=Ot);let kt;t[122]===Symbol.for(`react.memo_cache_sentinel`)?(kt=()=>{S({type:`thumb_hover`,hovered:!1})},t[122]=kt):kt=t[122];let At;t[123]===Ot?At=t[124]:(At=(0,X.jsx)(p,{"aria-hidden":!0,className:W.ThumbInput,onBlur:Dt,onPointerEnter:Ot,onPointerLeave:kt,tabIndex:-1}),t[123]=Ot,t[124]=At);let jt;t[125]!==i||t[126]!==x.phase||t[127]!==O||t[128]!==N||t[129]!==v||t[130]!==Ve||t[131]!==Ue||t[132]!==We||t[133]!==R||t[134]!==z||t[135]!==B||t[136]!==V||t[137]!==yt||t[138]!==Et||t[139]!==At?(jt=(0,X.jsxs)(te,{className:W.Root,"data-dragging":Ve,"data-fast-mode":i,"data-fast-mode-dot-transition":He,"data-max":N,"data-pointer-down":Ue,"data-reduced-motion":v,dir:`ltr`,disabled:O,max:We,min:0,onClick:Je,onLostPointerCapture:Ne,onPointerCancel:Ge,onPointerDown:R,onPointerMoveCapture:Ke,onPointerMove:z,onPointerUp:qe,onValueChange:B,onValueCommit:Ne,step:1,ref:le,value:V,children:[yt,Et,At]}),t[125]=i,t[126]=x.phase,t[127]=O,t[128]=N,t[129]=v,t[130]=Ve,t[131]=Ue,t[132]=We,t[133]=R,t[134]=z,t[135]=B,t[136]=V,t[137]=yt,t[138]=Et,t[139]=At,t[140]=jt):jt=t[140];let Mt;return t[141]!==u||t[142]!==jt?(Mt=(0,X.jsx)(`div`,{className:W.Container,"data-keyboard-focused":u,"data-model-picker-power-slider":``,children:jt}),t[141]=u,t[142]=jt,t[143]=Mt):Mt=t[143],Mt}function Je(e){return e.stopPropagation()}function Ye(e,t){switch(t.type){case`pointer_down`:return{...e,isDragging:!1,isPointerDown:!0};case`pointer_move`:return e.isPointerDown&&!e.isDragging?{...e,isDragging:!0}:e;case`pointer_up`:return{...e,isDragging:!1,isPointerDown:!1,isThumbHovered:!1};case`preview_acknowledged`:return{...e,previewBaseOptionId:null,previewIndex:null,previewOptionIds:[]};case`thumb_hover`:return{...e,isThumbHovered:t.hovered};case`value_preview`:return{...e,maxBurstKey:t.enteredMax?e.maxBurstKey+1:t.atMax?e.maxBurstKey:0,previewBaseOptionId:t.baseOptionId,previewIndex:t.index,previewOptionIds:e.previewBaseOptionId==null?[t.optionId]:[...e.previewOptionIds,t.optionId]}}}function Xe(e){return`calc(${e}% + ${J(e)}px)`}function Ze(e,t,n=1){if(t<=0)return`translateX(${-100*n}%)`;let r=q(e,t);return`translateX(calc(${(e-100)*n}% + ${r*n}px))`}function Qe(e,t){let n=q(e,t);return`inset(0 calc(${100-e}% - ${n}px) 0 0)`}function q(e,t){if(t<=0)return 0;let n=100/t,r=Math.min(e/n,(100-e)/n,1);return J(e)*r}function J(e){let t=Z/2-Q;return t-e/50*t}var $e,Y,X,et,tt,Z,Q,nt,rt,it,at,ot,st,ct,lt,ut,dt,ft,pt,mt,ht,gt,_t,vt;e((()=>{$e=r(),f(),u(),Y=t(n(),1),de(),he(),N(),L(),G(),X=i(),et=32/28,tt=.1,Z=28,Q=1,nt=1200,rt=350,it={duration:.3,ease:[.23,1,.32,1]},at={duration:.15,ease:[.23,1,.32,1]},ot={delay:.15,duration:.35,ease:[.42,0,.58,1]},st={duration:.25,ease:[.42,0,1,1]},ct={delay:.1,duration:.3,ease:`linear`},lt={opacity:{delay:.05,duration:.5,ease:`linear`},x:{delay:.05,duration:.5,ease:`easeOut`}},ut={opacity:{delay:1,duration:.55,ease:[.42,0,1,1]},x:{delay:.2,duration:1.35,ease:[.42,0,1,1]}},dt={duration:.08,ease:[.42,0,.58,1]},ft={duration:.25,ease:[.42,0,.58,1]},pt={type:`spring`,stiffness:420,damping:38,mass:1},mt={type:`spring`,stiffness:220,damping:26,mass:1},ht={duration:0},gt=160,_t=30,vt={isDragging:!1,isPointerDown:!1,isThumbHovered:!1,maxBurstKey:0,previewBaseOptionId:null,previewIndex:null,previewOptionIds:[]}}))();export{K as ModelPickerPowerSliderImpl};
//# sourceMappingURL=model-picker-power-slider-impl-CHY-N8op.js.map