PageSourceSearch

https://rsdmrkt.com/assets/CollectionPage-C73Jbbjo.js

js rsdmrkt.com collected 2026-09-25 04:10:45 UTC 138,148 bytes, 2 lines download raw bytes

1import{j as d,L as st,r as w,b as Ko,c as $o}from"./emotion-element-f0de968e.browser.esm-DAcAn3jx.js";import{cY as Go,u as ne,s as Ho,o as ei,aH as Xo,h as Yo,cZ as qo,c_ as Zo,c$ as Qo}from"./api-KZNW2Ket.js";import{D as Jo}from"./DragIndicator-CU6LYIYF.js";import{D as tr}from"./DeleteSweep-Bogkfd0r.js";import{A as er}from"./AtlasSearchProvider-DaJ6clz-.js";import{A as nr}from"./ArrowRight-B4QKvvAX.js";import{C as sr}from"./CustomSearchBox-CX5K0f_t.js";import{T as rt,F as ir}from"./FilterDrawer-CGoJp7ei.js";import{P as or}from"./PagingControls-DTElKLL1.js";import{u as pe,B as O,C as rr}from"./Button-KVxmVPcQ.js";import{B as v,T as D}from"./Box-CdsPgKjk.js";import{D as re}from"./Divider-DJxQQ4t0.js";import{u as Be}from"./index-DkVogYJF.js";import{F as pt}from"./FormControlLabel-gDZUzoP6.js";import{C as mt}from"./Checkbox-BQKglEA7.js";import{G as gt}from"./StorePage-DCZRiikn.js";import{C as Te}from"./Card-QqbP_w_-.js";import{T as Fn}from"./TextField-BKbREhBK.js";import{S as ar,a as lr}from"./Snackbar-BLmOveHA.js";import"./imageUtils-Bv75Hoxq.js";import"./Drawer-D9kGXRYg.js";import"./useId-BOtalUON.js";import"./IconButton-C4bln0zo.js";import"./getThemeProps-B4ZF914Q.js";import"./Edit-DQtX7EYK.js";import"./appPaths-B9EFiJhW.js";import"./GridView-DBRoP9ri.js";import"./useThemeProps-DVgs-USV.js";import"./CollectionItems-i54bjIho.js";import"./Price-CnfREIyP.js";import"./AnimatedLink-CaZ5Lp4_.js";import"./LocationOn-DM2UKiY4.js";import"./Message-Cfmnl7mY.js";import"./DialogTitle-BztL3sGR.js";import"./seo-N-rINtPA.js";import"./index.esm-CUxG0IsZ.js";import"./Skeleton-DSjqnrBB.js";import"./cssUtils-BDukCBHC.js";const yt=t=>({width:"100%",height:"32px",backgroundColor:t.palette.mode==="light"?"#1e1e1e":"#171717",color:"#d4d4d4",display:"flex",alignItems:"center",justifyContent:"center"}),xt=(t,e)=>({width:"100%",height:"64px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:e%2===0?t.palette.background.default:t.palette.background.paper}),cr=({results:t,removeFilter:e,filters:n,handleAddToCollection:s})=>{const i=pe();return d.jsxs(v,{sx:{display:"grid",gridTemplateColumns:"1fr 3fr 3fr 1fr 2fr 2fr",columnGap:0,rowGap:0},children:[d.jsx(v,{sx:{gridRow:1,gridColumn:1},children:d.jsx(v,{sx:yt(i)})}),d.jsx(v,{sx:{gridRow:1,gridColumn:2},children:d.jsx(v,{sx:{...yt(i),justifyContent:"flex-start"},children:d.jsx(D,{sx:{fontSize:"12px",fontWeight:700,textTransform:"uppercase"},children:"Album"})})}),d.jsx(v,{sx:{gridRow:1,gridColumn:3},children:d.jsx(v,{sx:yt(i),children:d.jsx(D,{sx:{textAlign:"center",fontSize:"12px",fontWeight:700,textTransform:"uppercase"},children:"Artist"})})}),d.jsx(v,{sx:{gridRow:1,gridColumn:4},children:d.jsx(v,{sx:yt(i),children:d.jsx(D,{sx:{textAlign:"center",fontSize:"12px",fontWeight:700,textTransform:"uppercase"},children:"Format"})})}),d.jsx(v,{sx:{gridRow:1,gridColumn:5},children:d.jsx(v,{sx:yt(i),children:d.jsx(D,{sx:{textAlign:"center",fontSize:"12px",fontWeight:700,textTransform:"uppercase"},children:"Release Type"})})}),d.jsx(v,{sx:{gridRow:1,gridColumn:6},children:d.jsx(v,{sx:yt(i)})}),t.length>0?t==null?void 0:t.map((r,o)=>{var a;return[d.jsx(v,{sx:{gridRow:o+2,gridColumn:1},children:d.jsx(v,{sx:xt(i,o),children:d.jsx(st,{to:`/upc/${r.format_upcs.raw[0]}`,children:d.jsx(v,{sx:{height:"40px",width:"40px",flexShrink:0},children:d.jsx("img",{src:((a=r.photo_small)==null?void 0:a.raw)||"/generic-record.webp",alt:"",style:{height:"100%",width:"100%",objectFit:"cover",boxShadow:"0px 4px 7px 2px rgba(0, 0, 0, 0.25)"},loading:"lazy"})})})})},`${r.id}-photo`),d.jsx(v,{sx:{gridRow:o+2,gridColumn:2},children:d.jsx(v,{sx:{...xt(i,o),justifyContent:"flex-start"},children:d.jsx(st,{style:{color:i.palette.text.primary,textDecoration:"none"},to:`/upc/${r.format_upcs.raw[0]}`,children:d.jsx(D,{sx:{fontSize:"12px",fontWeight:700},children:r.name.raw})})})},`${r.id}-title`),d.jsx(v,{sx:{gridRow:o+2,gridColumn:3},children:d.jsx(v,{sx:xt(i,o),children:d.jsx(D,{sx:{fontSize:"12px",fontWeight:700,textAlign:"center"},color:i.palette.mode==="light"?"warning.dark":"#edcc76",children:r.artists.raw.join(", ")})})},`${r.id}-artists`),d.jsx(v,{sx:{gridRow:o+2,gridColumn:4},children:d.jsx(v,{sx:xt(i,o),children:d.jsx(D,{sx:{fontSize:"12px",fontWeight:600,textAlign:"center"},color:"text.primary",children:r.formats.raw.join(", ")})})},`${r.id}-format`),d.jsx(v,{sx:{gridRow:o+2,gridColumn:5},children:d.jsx(v,{sx:xt(i,o),children:d.jsx(D,{sx:{fontSize:"12px",fontWeight:400,textAlign:"center"},color:"text.primary",children:r.format_release_types.raw.join(", ")})})},`${r.id}-releaseType`),d.jsx(v,{sx:{gridRow:o+2,gridColumn:6},children:d.jsx(v,{sx:{...xt(i,o),justifyContent:"flex-end",color:"text.primary"},children:d.jsx(O,{onClick:()=>{var l;s({newItem:{_id:r.id.raw,name:r.name.raw,image:((l=r.photo_small)==null?void 0:l.raw)||"/generic-record.webp"}})},sx:{textTransform:"none"},children:"+ Add"})})},`${r.id}-add`)]}):d.jsx(v,{sx:{gridRow:2,gridColumn:"1 / -1"},children:d.jsxs(v,{sx:{width:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",boxSizing:"border-box",p:4,gap:4},children:[d.jsx(D,{variant:"h3",color:"text.primary",children:"Sorry, we didn't find any results."}),n.find(r=>r.field==="in_stock"&&r.values.includes("In Stock"))?d.jsx(O,{variant:"contained",color:"warning",sx:{textTransform:"none"},onClick:()=>{e("in_stock","In Stock")},children:"Show me out of stock items"}):null]})})]})},ur=({results:t,removeFilter:e,filters:n,handleAddToCollection:s,disableButton:i})=>{const r=pe();return d.jsxs(v,{sx:{width:"100%",display:"flex",flexDirection:"column",color:"text.primary"},children:[d.jsx(re,{fullWidth:!0,flexItem:!0}),t.length>0?t.map(o=>{var a;return[d.jsxs(v,{sx:{width:"100%",display:"flex",flexDirection:"column",p:2,boxSizing:"border-box",backgroundColor:r.palette.background.paper},children:[d.jsxs(v,{sx:{width:"100%",display:"flex",flexDirection:"row"},children:[d.jsx(v,{sx:{width:"64px",height:"64px"},children:d.jsx(st,{to:`/upc/${o.format_upcs.raw[0]}`,children:d.jsx(v,{sx:{height:"40px",width:"40px",flexShrink:0},children:d.jsx("img",{src:((a=o.photo_small)==null?void 0:a.raw)||"/generic-record.webp",alt:"",style:{height:"100%",width:"100%",objectFit:"cover",boxShadow:"0px 4px 7px 2px rgba(0, 0, 0, 0.25)"},loading:"lazy"})})})}),d.jsxs(v,{sx:{width:"100%",display:"flex",flexDirection:"column"},children:[d.jsx(st,{style:{color:r.palette.text.primary,WebkitTextDecoration:"none",textDecoration:"none"},to:`/upc/${o.format_upcs.raw[0]}`,children:d.jsx(D,{sx:{fontSize:"14px",fontWeight:700},children:o.name.raw})}),d.jsx(D,{sx:{fontSize:"14px",fontWeight:600},color:(r.palette.mode==="light","text.secondary"),children:o.artists.raw.join(", ")})]})]}),d.jsxs(v,{sx:{width:"100%",display:"flex",flexDirection:"row",justifyContent:"space-between",py:2},children:[d.jsx(D,{sx:{fontSize:"12px",fontWeight:600},children:o.formats.raw.join(", ")}),d.jsx(D,{sx:{fontSize:"12px",fontWeight:400,textAlign:"right"},color:"text.primary",children:o.format_release_types.raw.join(", ")})]}),d.jsx(v,{sx:{width:"100%",display:"flex",flexDirection:"row",justifyContent:"flex-end"},children:d.jsx(O,{onClick:()=>{var l;s({newItem:{_id:o.id.raw,name:o.name.raw,image:((l=o.photo_small)==null?void 0:l.raw)||"/generic-record.webp"}})},sx:{textTransform:"none"},children:"+ Add"})})]}),d.jsx(re,{fullWidth:!0,flexItem:!0})]}):d.jsxs(v,{sx:{width:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",boxSizing:"border-box",p:4,gap:4},children:[d.jsx(D,{variant:"h3",color:"text.primary",children:"Sorry, we didn't find any results."}),n.find(o=>o.field==="in_stock"&&o.values.includes("In Stock"))?d.jsx(O,{variant:"contained",color:"warning",sx:{textTransform:"none"},onClick:()=>{e("in_stock","In Stock")},disabled:i,children:"Show me out of stock items"}):null]})]})},On=({isSuperAdmin:t,store:e,handleAddToCollection:n,disableButton:s,collectionId:i})=>{const r=({current:o,resultsPerPage:a,searchTerm:l,autocompletedResults:c,autocompletedSuggestions:u,facets:h,results:f,totalResults:p,addFilter:m,setFilter:g,removeFilter:y,setCurrent:x,setSearchTerm:T,filters:S})=>{const V=pe(),b=Be(V.breakpoints.up("desktop")),M=Be(V.breakpoints.between("tablet","desktop")),[A,C]=w.useState(!1),k=()=>C(!1);w.useEffect(()=>{m("in_stock","In Stock","all"),!t&&e?m("stores.keyword",e,"all"):y("stores.keyword")},[]);const W=P=>{P.target.checked?y("in_stock"):m("in_stock","In Stock","all")},[H,qt]=w.useState(!1),we=()=>{y("stores.keyword")},Zt=P=>L=>{L.target.checked?m("stores.keyword",P,"all"):y("stores.keyword",P)},En=w.useMemo(()=>h?h["stores.keyword"]?H?h["stores.keyword"][0].data:h["stores.keyword"][0].data.slice(0,5):[]:[],[h,H]),Ln=()=>{y("formats.keyword")},[F,X]=w.useState(!1),kt=P=>L=>{L.target.checked?m("formats.keyword",P,"all"):y("formats.keyword",P)},Rt=w.useMemo(()=>h?h["formats.keyword"]?F?h["formats.keyword"][0].data:h["formats.keyword"][0].data.slice(0,5):[]:[],[h,F]),Fo=P=>L=>{L.target.checked?m("events.keyword",P,"all"):y("events.keyword",P)},Oo=()=>{y("events.keyword")},[Qt,_o]=w.useState(!1),No=w.useMemo(()=>h?h["events.keyword"]?Qt?h["events.keyword"][0].data:h["events.keyword"][0].data.slice(0,5):[]:[],[h,Qt]),Uo=P=>L=>{L.target.checked?m("categories.keyword",P,"all"):y("categories.keyword",P)},Wo=()=>{y("categories.keyword")},zo=w.useMemo(()=>h?h["categories.keyword"]?h["categories.keyword"][0].data:[]:[],[h]),In=d.jsxs(v,{sx:{boxSizing:"border-box",display:"flex",flexDirection:"column",gap:2},children:[t?d.jsx(rt,{children:d.jsx(pt,{control:d.jsx(mt,{checked:!S.find(P=>P.field==="in_stock"&&P.values.includes("In Stock")),onChange:W,sx:{"&:hover":{bgcolor:"transparent"},"& .MuiSvgIcon-root":{fontSize:"20px"}},color:"action"}),label:d.jsx(D,{color:"text.primary",sx:{fontSize:"14px",fontWeight:600},children:"Show out of stock items"})})}):null,t?d.jsxs(rt,{children:[d.jsxs(v,{sx:{width:"100%",display:"flex",justifyContent:"space-between"},children:[d.jsx(D,{children:"Stores"}),d.jsx(O,{color:"warning",sx:{textTransform:"none",fontSize:"12px"},onClick:we,children:"Clear all"})]}),d.jsxs(v,{sx:{width:"100%"},children:[En.map(P=>d.jsx(pt,{control:d.jsx(mt,{checked:S.find(L=>L.field==="stores.keyword"&&L.values.includes(P.value)),onChange:Zt(P.value),sx:{"&:hover":{bgcolor:"transparent"},"& .MuiSvgIcon-root":{fontSize:"16px"}},color:"action"}
1),sx:{width:"100%",".MuiFormControlLabel-label":{width:"100%"}},label:d.jsxs(v,{sx:{width:"100%",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between"},children:[d.jsx(D,{color:"text.primary",sx:{fontSize:"12px",fontWeight:600},children:P.value}),d.jsxs(D,{color:"text.primary",sx:{fontSize:"12px",fontWeight:400},children:[" ","(",P.count,")"]})]})})),h&&h["stores.keyword"]&&h["stores.keyword"][0].data.length>5?d.jsx(v,{sx:{width:"100%",display:"flex",justifyContent:"center"},children:d.jsxs(O,{color:"warning",sx:{textTransform:"none",fontSize:"12px"},onClick:()=>qt(!H),children:["Show ",H?"less":"all"]})}):null]})]}):d.jsx(rt,{children:d.jsx(pt,{control:d.jsx(mt,{checked:!S.find(P=>P.field==="stores.keyword"&&P.values.length>0),onChange:P=>{P.target.checked?(y("stores.keyword"),y("in_stock")):(m("stores.keyword",e,"all"),m("in_stock","In Stock","all"))},sx:{"&:hover":{bgcolor:"transparent"},"& .MuiSvgIcon-root":{fontSize:"20px"}},color:"action"}),label:d.jsx(D,{color:"text.primary",sx:{fontSize:"14px",fontWeight:600},children:"Show all RSD products"})})}),d.jsxs(rt,{children:[d.jsxs(v,{sx:{width:"100%",display:"flex",justifyContent:"space-between"},children:[d.jsx(D,{children:"Categories"}),d.jsx(O,{color:"warning",sx:{textTransform:"none",fontSize:"12px"},onClick:Wo,children:"Clear all"})]}),d.jsx(v,{sx:{width:"100%"},children:zo.map(P=>d.jsx(pt,{control:d.jsx(mt,{checked:S.find(L=>L.field==="categories.keyword"&&L.values.includes(P.value)),onChange:Uo(P.value),sx:{"&:hover":{bgcolor:"transparent"},"& .MuiSvgIcon-root":{fontSize:"16px"}},color:"action"}),sx:{width:"100%",".MuiFormControlLabel-label":{width:"100%"}},label:d.jsxs(v,{sx:{width:"100%",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between"},children:[d.jsx(D,{color:"text.primary",sx:{fontSize:"12px",fontWeight:600},children:P.value}),d.jsxs(D,{color:"text.primary",sx:{fontSize:"12px",fontWeight:400},children:[" ","(",P.count,")"]})]})}))})]}),d.jsxs(rt,{children:[d.jsxs(v,{sx:{width:"100%",display:"flex",justifyContent:"space-between"},children:[d.jsx(D,{children:"Events"}),d.jsx(O,{color:"warning",sx:{textTransform:"none",fontSize:"12px"},onClick:Oo,children:"Clear all"})]}),d.jsxs(v,{sx:{width:"100%"},children:[No.map(P=>d.jsx(pt,{control:d.jsx(mt,{checked:S.find(L=>L.field==="events.keyword"&&L.values.includes(P.value)),onChange:Fo(P.value),sx:{"&:hover":{bgcolor:"transparent"},"& .MuiSvgIcon-root":{fontSize:"16px"}},color:"action"}),sx:{width:"100%",".MuiFormControlLabel-label":{width:"100%"}},label:d.jsxs(v,{sx:{width:"100%",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between"},children:[d.jsx(D,{color:"text.primary",sx:{fontSize:"12px",fontWeight:600},children:P.value}),d.jsxs(D,{color:"text.primary",sx:{fontSize:"12px",fontWeight:400},children:[" ","(",P.count,")"]})]})})),h&&h["events.keyword"]&&h["events.keyword"][0].data.length>5?d.jsx(v,{sx:{width:"100%",display:"flex",justifyContent:"center"},children:d.jsxs(O,{color:"warning",sx:{textTransform:"none",fontSize:"12px"},onClick:()=>_o(!Qt),children:["Show ",Qt?"less":"all"]})}):null]})]}),d.jsxs(rt,{children:[d.jsx(D,{sx:{mb:1},children:"Released"}),d.jsx(v,{sx:{width:"100%",display:"flex",flexDirection:"column",gap:1,pl:1,boxSizing:"border-box"},children:h&&h.release_date?h.release_date[0].data.map(P=>{var L;return P.count>0?d.jsxs(v,{sx:{width:"100%",display:"flex",flexDirection:"row",justifyContent:"space-between"},children:[d.jsx(D,{sx:{fontSize:"12px",fontWeight:700,"&:hover":{textDecoration:"underline",cursor:"pointer"}},onClick:()=>{g("release_date",P.value)},children:((L=P.value)==null?void 0:L.name)??""}),S.find(ft=>ft.field!=="release_date"?!1:(ft.values||[]).some(Se=>{var Bn;return(Se==null?void 0:Se.name)===((Bn=P==null?void 0:P.value)==null?void 0:Bn.name)}))?d.jsx(D,{sx:{p:0,fontSize:"12px","&:hover":{textDecoration:"underline",cursor:"pointer"}},color:"warning.main",onClick:()=>{y("release_date",P.value)},children:"clear"}):d.jsxs(D,{sx:{fontSize:"12px",fontWeight:400},children:["(",P.count,")"]})]}):null}):null})]}),d.jsxs(rt,{children:[d.jsxs(v,{sx:{width:"100%",display:"flex",justifyContent:"space-between"},children:[d.jsx(D,{children:"Formats"}),d.jsx(O,{color:"warning",sx:{textTransform:"none",fontSize:"12px"},onClick:Ln,children:"Clear all"})]}),d.jsxs(v,{sx:{width:"100%"},children:[Rt.map(P=>d.jsx(pt,{control:d.jsx(mt,{checked:S.find(L=>L.field==="formats.keyword"&&L.values.includes(P.value)),onChange:kt(P.value),sx:{"&:hover":{bgcolor:"transparent"},"& .MuiSvgIcon-root":{fontSize:"16px"}},color:"action"}
1),sx:{width:"100%",".MuiFormControlLabel-label":{width:"100%"}},label:d.jsxs(v,{sx:{width:"100%",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between"},children:[d.jsx(D,{color:"text.primary",sx:{fontSize:"12px",fontWeight:600},children:P.value}),d.jsxs(D,{color:"text.primary",sx:{fontSize:"12px",fontWeight:400},children:[" ","(",P.count,")"]})]})})),h&&h["formats.keyword"]&&h["formats.keyword"][0].data.length>5?d.jsx(v,{sx:{width:"100%",display:"flex",justifyContent:"center"},children:d.jsxs(O,{color:"warning",sx:{textTransform:"none",fontSize:"12px"},onClick:()=>X(!F),children:["Show ",F?"less":"all"]})}):null]})]})]});return d.jsxs(v,{sx:{width:"100%",backgroundColor:V.palette.background.parchment},children:[d.jsx(v,{sx:{px:b?6:0,py:2},children:d.jsxs(gt,{container:!0,spacing:2,children:[d.jsx(gt,{sx:{display:"flex",alignItems:"center",justifyContent:b?"flex-start":"flex-end"},size:b?3:12,children:d.jsx(D,{variant:"h2",color:"text.primary",sx:{px:b?0:2,fontSize:"24px",fontFamily:"Plus Jakarta Sans",fontWeight:600},children:"Search"})}),d.jsxs(gt,{sx:{display:"flex",alignItems:"center"},size:b?9:12,children:[d.jsx(sr,{sx:{width:"100%",backgroundColor:"background.parchment"},customUrl:`/admin/collections/${i}`,searchTerm:l,setSearchTerm:T,autocompletedResults:c,autocompletedSuggestions:u}),b?d.jsxs(D,{sx:{fontSize:"14px",fontWeight:700},color:"text.primary",children:[d.jsx("span",{style:{color:V.palette.warning.main},children:p})," ","results"]}):null]}),d.jsxs(gt,{sx:{display:b?"flex":"none",flexDirection:"column",alignItems:"center",gap:"15px"},size:3,children:[d.jsx(D,{variant:"h5",color:"text.primary",children:"Filter Results"}),In]}),d.jsxs(gt,{size:b?9:12,children:[d.jsx(v,{sx:{display:"flex",flexDirection:"column",gap:2},children:b?null:d.jsxs(v,{sx:{width:"100%",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",boxSizing:"border-box",mb:2,px:3},children:[d.jsx(O,{variant:"contained",color:"warning",sx:{textTransform:"none"},endIcon:d.jsx(nr,{}),onClick:()=>C(!0),children:"Filter Results"}),d.jsxs(D,{sx:{fontSize:"14px",fontWeight:700},color:"text.primary",children:[d.jsx("span",{style:{color:V.palette.warning.main},children:p})," ","results"]})]})}),b||M?d.jsx(cr,{results:f,filters:S,removeFilter:y,store:e,handleAddToCollection:n,disableButton:s}):d.jsx(ur,{results:f,filters:S,removeFilter:y,store:e,handleAddToCollection:n,disableButton:s}),d.jsx(gt,{size:12,children:d.jsx(v,{sx:{width:"100%",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",py:1},children:f.length>0?d.jsx(or,{page:o,setPage:x,totalPages:Math.ceil(p/a)}):null})})]})]})}),d.jsx(ir,{open:A,onClose:k,children:In})]})};return d.jsx(er,{config:{alwaysSearchOnInitialLoad:!0,resultsPerPage:20},children:o=>r(o)})},ni=w.createContext({});function Dt(t){const e=w.useRef(null);return e.current===null&&(e.current=t()),e.current}const Je=w.createContext(null),tn=w.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function hr(t=!0){const e=w.useContext(Je);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:i}=e,r=w.useId();w.useEffect(()=>{t&&i(r)},[t]);const o=w.useCallback(()=>t&&s&&s(r),[r,s,t]);return!n&&s?[!1,o]:[!0]}const en=typeof window<"u",si=en?w.useLayoutEffect:w.useEffect,z=t=>t;let ii=z;function nn(t){let e;return()=>(e===void 0&&(e=t()),e)}const Ct=(t,e,n)=>{const s=e-t;return s===0?1:(n-t)/s},Q=t=>t*1e3,J=t=>t/1e3,dr={useManualTiming:!1};function fr(t){let e=new Set,n=new Set,s=!1,i=!1;const r=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function a(c){r.has(c)&&(l.schedule(c),t()),c(o)}const l={schedule:(c,u=!1,h=!1)=>{const p=h&&s?e:n;return u&&r.add(c),p.has(c)||p.add(c),c},cancel:c=>{n.delete(c),r.delete(c)},process:c=>{if(o=c,s){i=!0;return}s=!0,[e,n]=[n,e],e.forEach(a),e.clear(),s=!1,i&&(i=!1,l.process(c))}};return l}const Jt=["read","resolveKeyframes","update","preRender","render","postRender"],pr=40;function oi(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,o=Jt.reduce((x,T)=>(x[T]=fr(r),x),{}),{read:a,resolveKeyframes:l,update:c,preRender:u,render:h,postRender:f}=o,p=()=>{const x=performance.now();n=!1,i.delta=s?1e3/60:Math.max(Math.min(x-i.timestamp,pr),1),i.timestamp=x,i.isProcessing=!0,a.process(i),l.process(i),c.process(i),u.process(i),h.process(i),f.process(i),i.isProcessing=!1,n&&e&&(s=!1,t(p))},m=()=>{n=!0,s=!0,i.isProcessing||t(p)};return{schedule:Jt.reduce((x,T)=>{const S=o[T];return x[T]=(V,b=!1,M=!1)=>(n||m(),S.schedule(V,b,M)),x},{}),cancel:x=>{for(let T=0;T<Jt.length;T++)o[Jt[T]].cancel(x)},state:i,steps:o}}const{schedule:R,cancel:tt,state:_,steps:be}=oi(typeof requestAnimationFrame<"u"?requestAnimationFrame:z,!0),ri=w.createContext({strict:!1}),_n={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Pt={};for(const t in _n)Pt[t]={isEnabled:e=>_n[t].some(n=>!!e[n])};function mr(t){for(const e in t)Pt[e]={...Pt[e],...t[e]}}const gr=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function ae(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||gr.has(t)}let ai=t=>!ae(t);function yr(t){t&&(ai=e=>e.startsWith("on")?!ae(e):t(e))}try{yr(require("@emotion/is-prop-valid").default)}catch{}function xr(t,e,n){const s={};for(const i in t)i==="values"&&typeof t.values=="object"||(ai(i)||n===!0&&ae(i)||!e&&!ae(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}function vr(t){if(typeof Proxy>"u")return t;const e=new Map,n=(...s)=>t(...s);return new Proxy(n,{get:(s,i)=>i==="create"?t:(e.has(i)||e.set(i,t(i)),e.get(i))})}const me=w.createContext({});function Wt(t){return typeof t=="string"||Array.isArray(t)}function ge(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}const sn=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],on=["initial",...sn];function ye(t){return ge(t.animate)||on.some(e=>Wt(t[e]))}function li(t){return!!(ye(t)||t.variants)}function wr(t,e){if(ye(t)){const{initial:n,animate:s}=t;return{initial:n===!1||Wt(n)?n:void 0,animate:Wt(s)?s:void 0}}return t.inherit!==!1?e:{}}function Sr(t){const{initial:e,animate:n}=wr(t,w.useContext(me));return w.useMemo(()=>({initial:e,animate:n}),[Nn(e),Nn(n)])}function Nn(t){return Array.isArray(t)?t.join(" "):t}const Tr=Symbol.for("motionComponentSymbol");function vt(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function br(t,e,n){return w.useCallback(s=>{s&&t.onMount&&t.onMount(s),e&&(s?e.mount(s):e.unmount()),n&&(typeof n=="function"?n(s):vt(n)&&(n.current=s))},[e])}const rn=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Cr="framerAppearId",ci="data-"+rn(Cr),{schedule:an}=oi(queueMicrotask,!1),ui=w.createContext({});function Pr(t,e,n,s,i){var r,o;const{visualElement:a}=w.useContext(me),l=w.useContext(ri),c=w.useContext(Je),u=w.useContext(tn).reducedMotion,h=w.useRef(null);s=s||l.renderer,!h.current&&s&&(h.current=s(t,{visualState:e,parent:a,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u}));const f=h.current,p=w.useContext(ui);f&&!f.projection&&i&&(f.type==="html"||f.type==="svg")&&jr(h.current,n,i,p);const m=w.useRef(!1);w.useInsertionEffect(()=>{f&&m.current&&f.update(n,c)});const g=n[ci],y=w.useRef(!!g&&!(!((r=window.MotionHandoffIsComplete)===null||r===void 0)&&r.call(window,g))&&((o=window.MotionHasOptimisedAnimation)===null||o===void 0?void 0:o.call(window,g)));return si(()=>{f&&(m.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),an.render(f.render),y.current&&f.animationState&&f.animationState.animateChanges())}),w.useEffect(()=>{f&&(!y.current&&f.animationState&&f.animationState.animateChanges(),y.current&&(queueMicrotask(()=>{var x;(x=window.MotionHandoffMarkAsComplete)===null||x===void 0||x.call(window,g)}
vendor: 23,823 bytes, line 1
1),y.current=!1))}),f}function jr(t,e,n,s){const{layoutId:i,layout:r,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:c}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:hi(t.parent)),t.projection.setOptions({layoutId:i,layout:r,alwaysMeasureLayout:!!o||a&&vt(a),visualElement:t,animationType:typeof r=="string"?r:"both",initialPromotionConfig:s,layoutScroll:l,layoutRoot:c})}function hi(t){if(t)return t.options.allowProjection!==!1?t.projection:hi(t.parent)}function Ar({preloadedFeatures:t,createVisualElement:e,useRender:n,useVisualState:s,Component:i}){var r,o;t&&mr(t);function a(c,u){let h;const f={...w.useContext(tn),...c,layoutId:Dr(c)},{isStatic:p}=f,m=Sr(c),g=s(c,p);if(!p&&en){Vr();const y=Mr(f);h=y.MeasureLayout,m.visualElement=Pr(i,g,f,e,y.ProjectionNode)}return d.jsxs(me.Provider,{value:m,children:[h&&m.visualElement?d.jsx(h,{visualElement:m.visualElement,...f}):null,n(i,c,br(g,m.visualElement,u),g,p,m.visualElement)]})}a.displayName=`motion.${typeof i=="string"?i:`create(${(o=(r=i.displayName)!==null&&r!==void 0?r:i.name)!==null&&o!==void 0?o:""})`}`;const l=w.forwardRef(a);return l[Tr]=i,l}function Dr({layoutId:t}){const e=w.useContext(ni).id;return e&&t!==void 0?e+"-"+t:t}function Vr(t,e){w.useContext(ri).strict}function Mr(t){const{drag:e,layout:n}=Pt;if(!e&&!n)return{};const s={...e,...n};return{MeasureLayout:e!=null&&e.isEnabled(t)||n!=null&&n.isEnabled(t)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}const kr=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function ln(t){return typeof t!="string"||t.includes("-")?!1:!!(kr.indexOf(t)>-1||/[A-Z]/u.test(t))}function Un(t){const e=[{},{}];return t==null||t.values.forEach((n,s)=>{e[0][s]=n.get(),e[1][s]=n.getVelocity()}),e}function cn(t,e,n,s){if(typeof e=="function"){const[i,r]=Un(s);e=e(n!==void 0?n:t.custom,i,r)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[i,r]=Un(s);e=e(n!==void 0?n:t.custom,i,r)}return e}const Fe=t=>Array.isArray(t),Rr=t=>!!(t&&typeof t=="object"&&t.mix&&t.toValue),Er=t=>Fe(t)?t[t.length-1]||0:t,N=t=>!!(t&&t.getVelocity);function se(t){const e=N(t)?t.get():t;return Rr(e)?e.toValue():e}function Lr({scrapeMotionValuesFromProps:t,createRenderState:e,onUpdate:n},s,i,r){const o={latestValues:Ir(s,i,r,t),renderState:e()};return n&&(o.onMount=a=>n({props:s,current:a,...o}),o.onUpdate=a=>n(a)),o}const di=t=>(e,n)=>{const s=w.useContext(me),i=w.useContext(Je),r=()=>Lr(t,e,s,i);return n?r():Dt(r)};function Ir(t,e,n,s){const i={},r=s(t,{});for(const f in r)i[f]=se(r[f]);let{initial:o,animate:a}=t;const l=ye(t),c=li(t);e&&c&&!l&&t.inherit!==!1&&(o===void 0&&(o=e.initial),a===void 0&&(a=e.animate));let u=n?n.initial===!1:!1;u=u||o===!1;const h=u?a:o;if(h&&typeof h!="boolean"&&!ge(h)){const f=Array.isArray(h)?h:[h];for(let p=0;p<f.length;p++){const m=cn(t,f[p]);if(m){const{transitionEnd:g,transition:y,...x}=m;for(const T in x){let S=x[T];if(Array.isArray(S)){const V=u?S.length-1:0;S=S[V]}S!==null&&(i[T]=S)}for(const T in g)i[T]=g[T]}}}return i}const Vt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],dt=new Set(Vt),fi=t=>e=>typeof e=="string"&&e.startsWith(t),pi=fi("--"),Br=fi("var(--"),un=t=>Br(t)?Fr.test(t.split("/*")[0].trim()):!1,Fr=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,mi=(t,e)=>e&&typeof t=="number"?e.transform(t):t,et=(t,e,n)=>n>e?e:n<t?t:n,Mt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},zt={...Mt,transform:t=>et(0,1,t)},te={...Mt,default:1},Gt=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),nt=Gt("deg"),q=Gt("%"),j=Gt("px"),Or=Gt("vh"),_r=Gt("vw"),Wn={...q,parse:t=>q.parse(t)/100,transform:t=>q.transform(t*100)},Nr={borderWidth:j,borderTopWidth:j,borderRightWidth:j,borderBottomWidth:j,borderLeftWidth:j,borderRadius:j,radius:j,borderTopLeftRadius:j,borderTopRightRadius:j,borderBottomRightRadius:j,borderBottomLeftRadius:j,width:j,maxWidth:j,height:j,maxHeight:j,top:j,right:j,bottom:j,left:j,padding:j,paddingTop:j,paddingRight:j,paddingBottom:j,paddingLeft:j,margin:j,marginTop:j,marginRight:j,marginBottom:j,marginLeft:j,backgroundPositionX:j,backgroundPositionY:j},Ur={rotate:nt,rotateX:nt,rotateY:nt,rotateZ:nt,scale:te,scaleX:te,scaleY:te,scaleZ:te,skew:nt,skewX:nt,skewY:nt,distance:j,translateX:j,translateY:j,translateZ:j,x:j,y:j,z:j,perspective:j,transformPerspective:j,opacity:zt,originX:Wn,originY:Wn,originZ:j},zn={...Mt,transform:Math.round},hn={...Nr,...Ur,zIndex:zn,size:j,fillOpacity:zt,strokeOpacity:zt,numOctaves:zn},Wr={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},zr=Vt.length;function Kr(t,e,n){let s="",i=!0;for(let r=0;r<zr;r++){const o=Vt[r],a=t[o];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(o.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const c=mi(a,hn[o]);if(!l){i=!1;const u=Wr[o]||o;s+=`${u}(${c}) `}n&&(e[o]=c)}}return s=s.trim(),n?s=n(e,i?"":s):i&&(s="none"),s}function dn(t,e,n){const{style:s,vars:i,transformOrigin:r}=t;let o=!1,a=!1;for(const l in e){const c=e[l];if(dt.has(l)){o=!0;continue}else if(pi(l)){i[l]=c;continue}else{const u=mi(c,hn[l]);l.startsWith("origin")?(a=!0,r[l]=u):s[l]=u}}if(e.transform||(o||n?s.transform=Kr(e,t.transform,n):s.transform&&(s.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:u=0}=r;s.transformOrigin=`${l} ${c} ${u}`}}const $r={offset:"stroke-dashoffset",array:"stroke-dasharray"},Gr={offset:"strokeDashoffset",array:"strokeDasharray"};function Hr(t,e,n=1,s=0,i=!0){t.pathLength=1;const r=i?$r:Gr;t[r.offset]=j.transform(-s);const o=j.transform(e),a=j.transform(n);t[r.array]=`${o} ${a}`}function Kn(t,e,n){return typeof t=="string"?t:j.transform(e+n*t)}function Xr(t,e,n){const s=Kn(e,t.x,t.width),i=Kn(n,t.y,t.height);return`${s} ${i}`}function fn(t,{attrX:e,attrY:n,attrScale:s,originX:i,originY:r,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...c},u,h){if(dn(t,c,h),u){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:f,style:p,dimensions:m}=t;f.transform&&(m&&(p.transform=f.transform),delete f.transform),m&&(i!==void 0||r!==void 0||p.transform)&&(p.transformOrigin=Xr(m,i!==void 0?i:.5,r!==void 0?r:.5)),e!==void 0&&(f.x=e),n!==void 0&&(f.y=n),s!==void 0&&(f.scale=s),o!==void 0&&Hr(f,o,a,l,!1)}const pn=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),gi=()=>({...pn(),attrs:{}}),mn=t=>typeof t=="string"&&t.toLowerCase()==="svg";function yi(t,{style:e,vars:n},s,i){Object.assign(t.style,e,i&&i.getProjectionStyles(s));for(const r in n)t.style.setProperty(r,n[r])}const xi=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function vi(t,e,n,s){yi(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(xi.has(i)?i:rn(i),e.attrs[i])}const le={};function Yr(t){Object.assign(le,t)}function wi(t,{layout:e,layoutId:n}){return dt.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!le[t]||t==="opacity")}function gn(t,e,n){var s;const{style:i}=t,r={};for(const o in i)(N(i[o])||e.style&&N(e.style[o])||wi(o,t)||((s=n==null?void 0:n.getValue(o))===null||s===void 0?void 0:s.liveStyle)!==void 0)&&(r[o]=i[o]);return r}function Si(t,e,n){const s=gn(t,e,n);for(const i in t)if(N(t[i])||N(e[i])){const r=Vt.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[r]=t[i]}return s}function qr(t,e){try{e.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{e.dimensions={x:0,y:0,width:0,height:0}}}const $n=["x","y","width","height","cx","cy","r"],Zr={useVisualState:di({scrapeMotionValuesFromProps:Si,createRenderState:gi,onUpdate:({props:t,prevProps:e,current:n,renderState:s,latestValues:i})=>{if(!n)return;let r=!!t.drag;if(!r){for(const a in i)if(dt.has(a)){r=!0;break}}if(!r)return;let o=!e;if(e)for(let a=0;a<$n.length;a++){const l=$n[a];t[l]!==e[l]&&(o=!0)}o&&R.read(()=>{qr(n,s),R.render(()=>{fn(s,i,mn(n.tagName),t.transformTemplate),vi(n,s)})})}})},Qr={useVisualState:di({scrapeMotionValuesFromProps:gn,createRenderState:pn})};function Ti(t,e,n){for(const s in e)!N(e[s])&&!wi(s,n)&&(t[s]=e[s])}function Jr({transformTemplate:t},e){return w.useMemo(()=>{const n=pn();return dn(n,e,t),Object.assign({},n.vars,n.style)},[e])}function ta(t,e){const n=t.style||{},s={};return Ti(s,n,t),Object.assign(s,Jr(t,e)),s}function ea(t,e){const n={},s=ta(t,e);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=s,n}function na(t,e,n,s){const i=w.useMemo(()=>{const r=gi();return fn(r,e,mn(s),t.transformTemplate),{...r.attrs,style:{...r.style}}},[e]);if(t.style){const r={};Ti(r,t.style,t),i.style={...r,...i.style}}return i}function sa(t=!1){return(n,s,i,{latestValues:r},o)=>{const l=(ln(n)?na:ea)(s,r,o,n),c=xr(s,typeof n=="string",t),u=n!==w.Fragment?{...c,...l,ref:i}:{},{children:h}=s,f=w.useMemo(()=>N(h)?h.get():h,[h]);return w.createElement(n,{...u,children:f})}}function ia(t,e){return function(s,{forwardMotionProps:i}={forwardMotionProps:!1}){const o={...ln(s)?Zr:Qr,preloadedFeatures:t,useRender:sa(i),createVisualElement:e,Component:s};return Ar(o)}}function bi(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let s=0;s<n;s++)if(e[s]!==t[s])return!1;return!0}function xe(t,e,n){const s=t.getProps();return cn(s,e,n!==void 0?n:s.custom,t)}const oa=nn(()=>window.ScrollTimeline!==void 0);class ra{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map(e=>"finished"in e?e.finished:e))}getAll(e){return this.animations[0][e]}setAll(e,n){for(let s=0;s<this.animations.length;s++)this.animations[s][e]=n}attachTimeline(e,n){const s=this.animations.map(i=>{if(oa()&&i.attachTimeline)return i.attachTimeline(e);if(typeof n=="function")return n(i)});return()=>{s.forEach((i,r)=>{i&&i(),this.animations[r].stop()})}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get startTime(){return this.getAll("startTime")}get duration(){let e=0;for(let n=0;n<this.animations.length;n++)e=Math.max(e,this.animations[n].duration);return e}runAll(e){this.animations.forEach(n=>n[e]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class aa extends ra{then(e,n){return Promise.all(this.animations).then(e).catch(n)}}function yn(t,e){return t?t[e]||t.default||t:void 0}const Oe=2e4;function Ci(t){let e=0;const n=50;let s=t.next(e);for(;!s.done&&e<Oe;)e+=n,s=t.next(e);return e>=Oe?1/0:e}function xn(t){return typeof t=="function"}function Gn(t,e){t.timeline=e,t.onfinish=null}const vn=t=>Array.isArray(t)&&typeof t[0]=="number",la={linearEasing:void 0};function ca(t,e){const n=nn(t);return()=>{var s;return(s=la[e])!==null&&s!==void 0?s:n()}}const ce=ca(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Pi=(t,e,n=10)=>{let s="";const i=Math.max(Math.round(e/n),2);for(let r=0;r<i;r++)s+=t(Ct(0,i-1,r))+", ";return`linear(${s.substring(0,s.length-2)})`};function ji(t){return!!(typeof t=="function"&&ce()||!t||typeof t=="string"&&(t in _e||ce())||vn(t)||Array.isArray(t)&&t.every(ji))}const Lt=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,_e={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Lt([0,.65,.55,1]),circOut:Lt([.55,0,1,.45]),backIn:Lt([.31,.01,.66,-.59]),backOut:Lt([.33,1.53,.69,.99])};function Ai(t,e){if(t)return typeof t=="function"&&ce()?Pi(t,e):vn(t)?Lt(t):Array.isArray(t)?t.map(n=>Ai(n,e)||_e.easeOut):_e[t]}const Y={x:!1,y:!1};function Di(){return Y.x||Y.y}function ua(t,e,n){var s;if(t instanceof Element)return[t];if(typeof t=="string"){let i=document;const r=(s=void 0)!==null&&s!==void 0?s:i.querySelectorAll(t);return r?Array.from(r):[]}return Array.from(t)}function Vi(t,e){const n=ua(t),s=new AbortController,i={passive:!0,...e,signal:s.signal};return[n,i,()=>s.abort()]}function Hn(t){return e=>{e.pointerType==="touch"||Di()||t(e)}}function ha(t,e,n={}){const[s,i,r]=Vi(t,n),o=Hn(a=>{const{target:l}=a,c=e(a);if(typeof c!="function"||!l)return;const u=Hn(h=>{c(h),l.removeEventListener("pointerleave",u)});l.addEventListener("pointerleave",u,i)});return s.forEach(a=>{a.addEventListener("pointerenter",o,i)}),r}const Mi=(t,e)=>e?t===e?!0:Mi(t,e.parentElement):!1,wn=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,da=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function fa(t){return da.has(t.tagName)||t.tabIndex!==-1}const It=new WeakSet;function Xn(t){return e=>{e.key==="Enter"&&t(e)}}function Ce(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const pa=(t,e)=>{const n=t.currentTarget;if(!n)return;const s=Xn(()=>{if(It.has(n))return;Ce(n,"down");const i=Xn(()=>{Ce(n,"up")}),r=()=>Ce(n,"cancel");n.addEventListener("keyup",i,e),n.addEventListener("blur",r,e)});n.addEventListener("keydown",s,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),e)};function Yn(t){return wn(t)&&!Di()}function ma(t,e,n={}){const[s,i,r]=Vi(t,n),o=a=>{const l=a.currentTarget;if(!Yn(a)||It.has(l))return;It.add(l);const c=e(a),u=(p,m)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",f),!(!Yn(p)||!It.has(l))&&(It.delete(l),typeof c=="function"&&c(p,{success:m}))},h=p=>{u(p,n.useGlobalTarget||Mi(l,p.target))},f=p=>{u(p,!1)};window.addEventListener("pointerup",h,i),window.addEventListener("pointercancel",f,i)};return s.forEach(a=>{!fa(a)&&a.getAttribute("tabindex")===null&&(a.tabIndex=0),(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,i),a.addEventListener("focus",c=>pa(c,i),i)}),r}function ga(t){return t==="x"||t==="y"?Y[t]?null:(Y[t]=!0,()=>{Y[t]=!1}):Y.x||Y.y?null:(Y.x=Y.y=!0,()=>{Y.x=Y.y=!1})}const ki=new Set(["width","height","top","left","right","bottom",...Vt]);let ie;function ya(){ie=void 0}const Z={now:()=>(ie===void 0&&Z.set(_.isProcessing||dr.useManualTiming?_.timestamp:performance.now()),ie),set:t=>{ie=t,queueMicrotask(ya)}};function Sn(t,e){t.indexOf(e)===-1&&t.push(e)}function Tn(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}function xa([...t],e,n){const s=e<0?t.length+e:e;if(s>=0&&s<t.length){const i=n<0?t.length+n:n,[r]=t.splice(e,1);t.splice(i,0,r)}return t}class bn{constructor(){this.subscriptions=[]}add(e){return Sn(this.subscriptions,e),()=>Tn(this.subscriptions,e)}notify(e,n,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,s);else for(let r=0;r<i;r++){const o=this.subscriptions[r];o&&o(e,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function Ri(t,e){return e?t*(1e3/e):0}const qn=30,va=t=>!isNaN(parseFloat(t)),Ft={current:void 0};class wa{constructor(e,n={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(s,i=!0)=>{const r=Z.now();this.updatedAt!==r&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=Z.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=va(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new bn);const s=this.events[e].add(n);return e==="change"?()=>{s(),R.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e,n=!0){!n||!this.passiveEffect?this.updateAndNotify(e,n):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-s}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return Ft.current&&Ft.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const e=Z.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>qn)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,qn);return Ri(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function jt(t,e){return new wa(t,e)}function Sa(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,jt(n))}function Ta(t,e){const n=xe(t,e);let{transitionEnd:s={},transition:i={},...r}=n||{};r={...r,...s};for(const o in r){const a=Er(r[o]);Sa(t,o,a)}}function ba(t){return!!(N(t)&&t.add)}function Ne(t,e){const n=t.getValue("willChange");if(ba(n))return n.add(e)}function Ei(t){return t.props[ci]}const Li=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,Ca=1e-7,Pa=12;function ja(t,e,n,s,i){let r,o,a=0;do o=e+(n-e)/2,r=Li(o,s,i)-t,r>0?n=o:e=o;while(Math.abs(r)>Ca&&++a<Pa);return o}function Ht(t,e,n,s){if(t===e&&n===s)return z;const i=r=>ja(r,0,1,t,n);return r=>r===0||r===1?r:Li(i(r),e,s)}const Ii=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Bi=t=>e=>1-t(1-e),Fi=Ht(.33,1.53,.69,.99),Cn=Bi(Fi),Oi=Ii(Cn),_i=t=>(t*=2)<1?.5*Cn(t):.5*(2-Math.pow(2,-10*(t-1))),Pn=t=>1-Math.sin(Math.acos(t)),Ni=Bi(Pn),Ui=Ii(Pn),Wi=t=>/^0[^.\s]+$/u.test(t);function Aa(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||Wi(t):!0}const Ot=t=>Math.round(t*1e5)/1e5,jn=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Da(t){return t==null}const Va=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,An=(t,e)=>n=>!!(typeof n=="string"&&Va.test(n)&&n.startsWith(t)||e&&!Da(n)&&Object.prototype.hasOwnProperty.call(n,e)),zi=(t,e,n)=>s=>{if(typeof s!="string")return s;const[i,r,o,a]=s.match(jn);return{[t]:parseFloat(i),[e]:parseFloat(r),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},Ma=t=>et(0,255,t),Pe={...Mt,transform:t=>Math.round(Ma(t))},ut={test:An("rgb","red"),parse:zi("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+Pe.transform(t)+", "+Pe.transform(e)+", "+Pe.transform(n)+", "+Ot(zt.transform(s))+")"};function ka(t){let e="",n="",s="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,s+=s,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const Ue={test:An("#"),parse:ka,transform:ut.transform},wt={test:An("hsl","hue"),parse:zi("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+q.transform(Ot(e))+", "+q.transform(Ot(n))+", "+Ot(zt.transform(s))+")"},U={test:t=>ut.test(t)||Ue.test(t)||wt.test(t),parse:t=>ut.test(t)?ut.parse(t):wt.test(t)?wt.parse(t):Ue.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?ut.transform(t):wt.transform(t)},Ra=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Ea(t){var e,n;return isNaN(t)&&typeof t=="string"&&(((e=t.match(jn))===null||e===void 0?void 0:e.length)||0)+(((n=t.match(Ra))===null||n===void 0?void 0:n.length)||0)>0}const Ki="number",$i="color",La="var",Ia="var(",Zn="${}",Ba=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Kt(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let r=0;const a=e.replace(Ba,l=>(U.test(l)?(s.color.push(r),i.push($i),n.push(U.parse(l))):l.startsWith(Ia)?(s.var.push(r),i.push(La),n.push(l)):(s.number.push(r),i.push(Ki),n.push(parseFloat(l))),++r,Zn)).split(Zn);return{values:n,split:a,indexes:s,types:i}}function Gi(t){return Kt(t).values}function Hi(t){const{split:e,types:n}=Kt(t),s=e.length;return i=>{let r="";for(let o=0;o<s;o++)if(r+=e[o],i[o]!==void 0){const a=n[o];a===Ki?r+=Ot(i[o]):a===$i?r+=U.transform(i[o]):r+=i[o]}return r}}const Fa=t=>typeof t=="number"?0:t;function Oa(t){const e=Gi(t);return Hi(t)(e.map(Fa))}const it={test:Ea,parse:Gi,createTransformer:Hi,getAnimatableNone:Oa},_a=new Set(["brightness","contrast","saturate","opacity"]);function Na(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(jn)||[];if(!s)return t;const i=n.replace(s,"");let r=_a.has(e)?1:0;return s!==n&&(r*=100),e+"("+r+i+")"}const Ua=/\b([a-z-]*)\(.*?\)/gu,We={...it,getAnimatableNone:t=>{const e=t.match(Ua);return e?e.map(Na).join(" "):t}},Wa={...hn,color:U,backgroundColor:U,outlineColor:U,fill:U,stroke:U,borderColor:U,borderTopColor:U,borderRightColor:U,borderBottomColor:U,borderLeftColor:U,filter:We,WebkitFilter:We},Dn=t=>Wa[t];function Xi(t,e){let n=Dn(t);return n!==We&&(n=it),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const za=new Set(["auto","none","0"]);function Ka(t,e,n){let s=0,i;for(;s<t.length&&!i;){const r=t[s];typeof r=="string"&&!za.has(r)&&Kt(r).values.length&&(i=t[s]),s++}if(i&&n)for(const r of e)t[r]=Xi(n,i)}const Qn=t=>t===Mt||t===j,Jn=(t,e)=>parseFloat(t.split(", ")[e]),ts=(t,e)=>(n,{transform:s})=>{if(s==="none"||!s)return 0;const i=s.match(/^matrix3d\((.+)\)$/u);if(i)return Jn(i[1],e);{const r=s.match(/^matrix\((.+)\)$/u);return r?Jn(r[1],t):0}},$a=new Set(["x","y","z"]),Ga=Vt.filter(t=>!$a.has(t));function Ha(t){const e=[];return Ga.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}const At={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:ts(4,13),y:ts(5,14)};At.translateX=At.x;At.translateY=At.y;const ht=new Set;let ze=!1,Ke=!1;function Yi(){if(Ke){const t=Array.from(ht).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{const i=Ha(s);i.length&&(n.set(s,i),s.render())}),t.forEach(s=>s.measureInitialState()),e.forEach(s=>{s.render();const i=n.get(s);
vendor: 3,285 bytes, line 1
1i&&i.forEach(([r,o])=>{var a;(a=s.getValue(r))===null||a===void 0||a.set(o)})}),t.forEach(s=>s.measureEndState()),t.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}Ke=!1,ze=!1,ht.forEach(t=>t.complete()),ht.clear()}function qi(){ht.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Ke=!0)})}function Xa(){qi(),Yi()}class Vn{constructor(e,n,s,i,r,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=s,this.motionValue=i,this.element=r,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(ht.add(this),ze||(ze=!0,R.read(qi),R.resolveKeyframes(Yi))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:s,motionValue:i}=this;for(let r=0;r<e.length;r++)if(e[r]===null)if(r===0){const o=i==null?void 0:i.get(),a=e[e.length-1];if(o!==void 0)e[0]=o;else if(s&&n){const l=s.readValue(n,a);l!=null&&(e[0]=l)}e[0]===void 0&&(e[0]=a),i&&o===void 0&&i.set(e[0])}else e[r]=e[r-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),ht.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,ht.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Zi=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),Ya=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function qa(t){const e=Ya.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n??s}`,i]}function Qi(t,e,n=1){const[s,i]=qa(t);if(!s)return;const r=window.getComputedStyle(e).getPropertyValue(s);if(r){const o=r.trim();return Zi(o)?parseFloat(o):o}return un(i)?Qi(i,e,n+1):i}const Ji=t=>e=>e.test(t),Za={test:t=>t==="auto",parse:t=>t},to=[Mt,j,q,nt,_r,Or,Za],es=t=>to.find(Ji(t));class eo extends Vn{constructor(e,n,s,i,r){super(e,n,s,i,r,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<e.length;l++){let c=e[l];if(typeof c=="string"&&(c=c.trim(),un(c))){const u=Qi(c,n.current);u!==void 0&&(e[l]=u),l===e.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!ki.has(s)||e.length!==2)return;const[i,r]=e,o=es(i),a=es(r);if(o!==a)if(Qn(o)&&Qn(a))for(let l=0;l<e.length;l++){const c=e[l];typeof c=="string"&&(e[l]=parseFloat(c))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,s=[];for(let i=0;i<e.length;i++)Aa(e[i])&&s.push(i);s.length&&Ka(e,s,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:s}=this;if(!e||!e.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=At[s](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&e.getValue(s,i).jump(i,!1)}measureEndState(){var e;const{element:n,name:s,unresolvedKeyframes:i}=this;if(!n||!n.current)return;const r=n.getValue(s);r&&r.jump(this.measuredOrigin,!1);const o=i.length-1,a=i[o];i[o]=At[s](n.measureViewportBox(),window.getComputedStyle(n.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),!((e=this.removedTransforms)===null||e===void 0)&&e.length&&this.removedTransforms.forEac
vendor: 6,179 bytes, line 1
1h(([l,c])=>{n.getValue(l).set(c)}),this.resolveNoneKeyframes()}}const ns=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(it.test(t)||t==="0")&&!t.startsWith("url("));function Qa(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function Ja(t,e,n,s){const i=t[0];if(i===null)return!1;if(e==="display"||e==="visibility")return!0;const r=t[t.length-1],o=ns(i,e),a=ns(r,e);return!o||!a?!1:Qa(t)||(n==="spring"||xn(n))&&s}const tl=t=>t!==null;function ve(t,{repeat:e,repeatType:n="loop"},s){const i=t.filter(tl),r=e&&n!=="loop"&&e%2===1?0:i.length-1;return!r||s===void 0?i[r]:s}const el=40;class no{constructor({autoplay:e=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:r=0,repeatType:o="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Z.now(),this.options={autoplay:e,delay:n,type:s,repeat:i,repeatDelay:r,repeatType:o,...a},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>el?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&Xa(),this._resolved}onKeyframesResolved(e,n){this.resolvedAt=Z.now(),this.hasAttemptedResolve=!0;const{name:s,type:i,velocity:r,delay:o,onComplete:a,onUpdate:l,isGenerator:c}=this.options;if(!c&&!Ja(e,s,i,r))if(o)this.options.duration=0;else{l&&l(ve(e,this.options,n)),a&&a(),this.resolveFinishedPromise();return}const u=this.initPlayback(e,n);u!==!1&&(this._resolved={keyframes:e,finalKeyframe:n,...u},this.onPostResolved())}onPostResolved(){}then(e,n){return this.currentFinishedPromise.then(e,n)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(e=>{this.resolveFinishedPromise=e})}}const E=(t,e,n)=>t+(e-t)*n;function je(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function nl({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,e/=100,n/=100;let i=0,r=0,o=0;if(!e)i=r=o=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;i=je(l,a,t+1/3),r=je(l,a,t),o=je(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(r*255),blue:Math.round(o*255),alpha:s}}function ue(t,e){return n=>n>0?e:t}const Ae=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},sl=[Ue,ut,wt],il=t=>sl.find(e=>e.test(t));function ss(t){const e=il(t);if(!e)return!1;let n=e.parse(t);return e===wt&&(n=nl(n)),n}const is=(t,e)=>{const n=ss(t),s=ss(e);if(!n||!s)return ue(t,e);const i={...n};return r=>(i.red=Ae(n.red,s.red,r),i.green=Ae(n.green,s.green,r),i.blue=Ae(n.blue,s.blue,r),i.alpha=E(n.alpha,s.alpha,r),ut.transform(i))},ol=(t,e)=>n=>e(t(n)),Xt=(...t)=>t.reduce(ol),$e=new Set(["none","hidden"]);function rl(t,e){return $e.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function al(t,e){return n=>E(t,e,n)}function Mn(t){return typeof t=="number"?al:typeof t=="string"?un(t)?ue:U.test(t)?is:ul:Array.isArray(t)?so:typeof t=="object"?U.test(t)?is:ll:ue}function so(t,e){const n=[...t],s=n.length,i=t.map((r,o)=>Mn(r)(r,e[o]));return r=>{for(let o=0;o<s;o++)n[o]=i[o](r);return n}}function ll(t,e){const n={...t,...e},s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=Mn(t[i])(t[i],e[i]));return i=>{for(const r in s)n[r]=s[r](i);return n}}function cl(t,e){var n;const s=[],i={color:0,var:0,number:0};for(let r=0;r<e.values.length;r++){const o=e.types[r],a=t.indexes[o][i[o]],l=(n=t.values[a])!==null&&n!==void 0?n:0;s[r]=l,i[o]++}return s}const ul=(t,e)=>{const n=it.createTransformer(e),s=Kt(t),i=Kt(e);return s.indexes.var.length===i.indexes.var.length&&s.indexes.color.length===i.indexes.color.length&&s.indexes.number.length>=i.indexes.number.length?$e.has(t)&&!i.values.length||$e.has(e)&&!s.values.length?rl(t,e):Xt(so(cl(s,i),i.values),n):ue(t,e)};function io(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?E(t,e,n):Mn(t)(t,e)}const hl=5;function oo(t,e,n){const s=Math.max(e-hl,0);return Ri(n-t(s),e-s)}const I={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},De=.001;function dl({duration:t=I.duration,bounce:e=I.bounce,velocity:n=I.velocity,mass:s=I.mass}){let i,r,o=1-e;o=et(I.minDamping,I.maxDamping,o),t=et(I.minDuration,I.maxDuration,J(t)),o<1?(i=c=>{const u=c*o,h=u*t,f=u-n,p=Ge(c,o),m=Math.exp(-h);return De-f/p*m},r=c=>{const h=c*o*t,f=h*n+n,p=Math.pow(o,2)*Math.pow(c,2)*t,m=Math.exp(-h),g=Ge(Math.pow(c,2),o);return(-i(c)+De>0?-1:1)*((f-p)*m)/g}):(i=c=>{const u=Math.exp(-c*t),h=(c-n)*t+1;return-De+u*h},r=c=>{const u=Math.exp(-c*t),h=(n-c)*(t*t);return u*h});const a=5/t,l=pl(i,r,a);if(t=Q(t),isNaN(l))return{stiffness:I.stiffness,damping:I.damping,duration:t};{const c=Math.pow(l,2)*s;return{stiffness:c,damping:o*2*Math.sqrt(s*c),duration:t}}}const fl=12;function pl(t,e,n){let s=n;for(let i=1;i<fl;i++)s=s-t(s)/e(s);return s}function Ge(t,e){return t*Math.sqrt(1-e*e)}const ml=["duration","bounce"],gl=["stiffness","damping","mass"];function os(t,e){return e.some(n=>t[n]!==void 0)}function yl(t){let e={velocity:I.velocity,stiffness:I.stiffness,damping:I.damping,mass:I.mass,isResolvedFromDuration:!1,...t};if(!os(t,gl)&&os(t,ml))if(t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,r=2*et(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:I.mass,stiffness:i,damping:r}}else{const n=dl(t);e={...e,...n,mass:I.mass},e.isResolvedFromDuration=!0}return e}function ro(t=I.visualDuration,e=I.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:s,restDelta:i}=n;const r=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:r},{stiffness:l,damping:c,mass:u,duration:h,velocity:f,isResolvedFromDuration:p}=yl({...n,velocity:-J(n.velocity||0)}),m=f||0,g=c/(2*Math.sqrt(l*u)),y=o-r,x=J(Math.sqrt(l/u)),T=Math.abs(y)<5;s||(s=T?I.restSpeed.granular:I.restSpeed.default),i||(i=T?I.restDelta.granular:I.restDelta.default);let S;if(g<1){const b=Ge(x,g);S=M=>{const A=Math.exp(-g*x*M);return o-A*((m+g*x*y)/b*Math.sin(b*M)+y*Math.cos(b*M))}}else if(g===1)S=b=>
vendor: 4,482 bytes, line 1
1o-Math.exp(-x*b)*(y+(m+x*y)*b);else{const b=x*Math.sqrt(g*g-1);S=M=>{const A=Math.exp(-g*x*M),C=Math.min(b*M,300);return o-A*((m+g*x*y)*Math.sinh(C)+b*y*Math.cosh(C))/b}}const V={calculatedDuration:p&&h||null,next:b=>{const M=S(b);if(p)a.done=b>=h;else{let A=0;g<1&&(A=b===0?Q(m):oo(S,b,M));const C=Math.abs(A)<=s,k=Math.abs(o-M)<=i;a.done=C&&k}return a.value=a.done?o:M,a},toString:()=>{const b=Math.min(Ci(V),Oe),M=Pi(A=>V.next(b*A).value,b,30);return b+"ms "+M}};return V}function rs({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:r=500,modifyTarget:o,min:a,max:l,restDelta:c=.5,restSpeed:u}){const h=t[0],f={done:!1,value:h},p=C=>a!==void 0&&C<a||l!==void 0&&C>l,m=C=>a===void 0?l:l===void 0||Math.abs(a-C)<Math.abs(l-C)?a:l;let g=n*e;const y=h+g,x=o===void 0?y:o(y);x!==y&&(g=x-h);const T=C=>-g*Math.exp(-C/s),S=C=>x+T(C),V=C=>{const k=T(C),W=S(C);f.done=Math.abs(k)<=c,f.value=f.done?x:W};let b,M;const A=C=>{p(f.value)&&(b=C,M=ro({keyframes:[f.value,m(f.value)],velocity:oo(S,C,f.value),damping:i,stiffness:r,restDelta:c,restSpeed:u}))};return A(0),{calculatedDuration:null,next:C=>{let k=!1;return!M&&b===void 0&&(k=!0,V(C),A(C)),b!==void 0&&C>=b?M.next(C-b):(!k&&V(C),f)}}}const xl=Ht(.42,0,1,1),vl=Ht(0,0,.58,1),ao=Ht(.42,0,.58,1),wl=t=>Array.isArray(t)&&typeof t[0]!="number",Sl={linear:z,easeIn:xl,easeInOut:ao,easeOut:vl,circIn:Pn,circInOut:Ui,circOut:Ni,backIn:Cn,backInOut:Oi,backOut:Fi,anticipate:_i},as=t=>{if(vn(t)){ii(t.length===4);const[e,n,s,i]=t;return Ht(e,n,s,i)}else if(typeof t=="string")return Sl[t];return t};function Tl(t,e,n){const s=[],i=n||io,r=t.length-1;for(let o=0;o<r;o++){let a=i(t[o],t[o+1]);if(e){const l=Array.isArray(e)?e[o]||z:e;a=Xt(l,a)}s.push(a)}return s}function lo(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const r=t.length;if(ii(r===e.length),r===1)return()=>e[0];if(r===2&&e[0]===e[1])return()=>e[1];const o=t[0]===t[1];t[0]>t[r-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=Tl(e,s,i),l=a.length,c=u=>{if(o&&u<t[0])return e[0];let h=0;if(l>1)for(;h<t.length-2&&!(u<t[h+1]);h++);const f=Ct(t[h],t[h+1],u);return a[h](f)};return n?u=>c(et(t[0],t[r-1],u)):c}function bl(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=Ct(0,e,s);t.push(E(n,1,i))}}function Cl(t){const e=[0];return bl(e,t.length-1),e}function Pl(t,e){return t.map(n=>n*e)}function jl(t,e){return t.map(()=>e||ao).splice(0,t.length-1)}function he({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=wl(s)?s.map(as):as(s),r={done:!1,value:e[0]},o=Pl(n&&n.length===e.length?n:Cl(e),t),a=lo(o,e,{ease:Array.isArray(i)?i:jl(e,i)});return{calculatedDuration:t,next:l=>(r.value=a(l),r.done=l>=t,r)}}const Al=t=>{const e=({timestamp:n})=>t(n);return{start:()=>R.update(e,!0),stop:()=>tt(e),now:()=>_.isProcessing?_.timestamp:Z.now()}},Dl={decay:rs,inertia:rs,tween:he,keyframes:he,spring:ro},Vl=t=>t/100;class kn extends no{constructor(e){super(e),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:l}=this.options;l&&l()};const{name:n,motionValue:s,element:i,keyframes:r}=this.options,o=(i==null?void 0:i.KeyframeResolver)||Vn,a=(l,c)=>this.onKeyframesResolved(l,c);this.resolver=new o(r,a,n,s,i),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(e){const{type:n="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:r,velocity:o=0}=this.options,a=xn(n)?n:Dl[n]||he;let l,c;a!==he&&typeof e[0]!="number"&&(l=Xt(Vl,io(e[0],e[1])),e=[0,100]);const u=a({...this.options,keyframes:e});r==="mirror"&&(c=a({...this.options,keyframes:[...e].reverse(),velocity:-o})),u.calculatedDuration===null&&(u.calculatedDuration=Ci(u));const{calculatedDuration:h}=u,f=h+i,p=f*(s+1)-i;return{generator:u,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:h,resolvedDuration:f,totalDuration:p}}onPostResolved(){const{autoplay:e=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!e?this.pause():this.state=this.pendingPlayState}tick(e,n=!1){const{resolved:s}=this;if(!s){const{keyframes:C}=this.options;return{done:!0,value:C[C.length-1]}}const{finalKeyframe:i,generator:r,mirroredGenerator:o,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:c,totalDuration:u,resolvedDuration:h}=s;
vendor: 54,799 bytes, line 1
1if(this.startTime===null)return r.next(0);const{delay:f,repeat:p,repeatType:m,repeatDelay:g,onUpdate:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-u/this.speed,this.startTime)),n?this.currentTime=e:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(e-this.startTime)*this.speed;const x=this.currentTime-f*(this.speed>=0?1:-1),T=this.speed>=0?x<0:x>u;this.currentTime=Math.max(x,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let S=this.currentTime,V=r;if(p){const C=Math.min(this.currentTime,u)/h;let k=Math.floor(C),W=C%1;!W&&C>=1&&(W=1),W===1&&k--,k=Math.min(k,p+1),!!(k%2)&&(m==="reverse"?(W=1-W,g&&(W-=g/h)):m==="mirror"&&(V=o)),S=et(0,1,W)*h}const b=T?{done:!1,value:l[0]}:V.next(S);a&&(b.value=a(b.value));let{done:M}=b;!T&&c!==null&&(M=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const A=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&M);return A&&i!==void 0&&(b.value=ve(l,this.options,i)),y&&y(b.value),A&&this.finish(),b}get duration(){const{resolved:e}=this;return e?J(e.calculatedDuration):0}get time(){return J(this.currentTime)}set time(e){e=Q(e),this.currentTime=e,this.holdTime!==null||this.speed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}get speed(){return this.playbackSpeed}set speed(e){const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=J(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:e=Al,onPlay:n,startTime:s}=this.options;this.driver||(this.driver=e(r=>this.tick(r))),n&&n();const i=this.driver.now();this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=i):this.startTime=s??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var e;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(e=this.currentTime)!==null&&e!==void 0?e:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:e}=this.options;e&&e()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}}const Ml=new Set(["opacity","clipPath","filter","transform"]);function kl(t,e,n,{delay:s=0,duration:i=300,repeat:r=0,repeatType:o="loop",ease:a="easeInOut",times:l}={}){const c={[e]:n};l&&(c.offset=l);const u=Ai(a,i);return Array.isArray(u)&&(c.easing=u),t.animate(c,{delay:s,duration:i,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:r+1,direction:o==="reverse"?"alternate":"normal"})}const Rl=nn(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),de=10,El=2e4;function Ll(t){return xn(t.type)||t.type==="spring"||!ji(t.ease)}function Il(t,e){const n=new kn({...e,keyframes:t,repeat:0,delay:0,isGenerator:!0});let s={done:!1,value:t[0]};const i=[];let r=0;for(;!s.done&&r<El;)s=n.sample(r),i.push(s.value),r+=de;return{times:void 0,keyframes:i,duration:r-de,ease:"linear"}}const co={anticipate:_i,backInOut:Oi,circInOut:Ui};function Bl(t){return t in co}class ls extends no{constructor(e){super(e);const{name:n,motionValue:s,element:i,keyframes:r}=this.options;this.resolver=new eo(r,(o,a)=>this.onKeyframesResolved(o,a),n,s,i),this.resolver.scheduleResolve()}initPlayback(e,n){let{duration:s=300,times:i,ease:r,type:o,motionValue:a,name:l,startTime:c}=this.options;if(!a.owner||!a.owner.current)return!1;if(typeof r=="string"&&ce()&&Bl(r)&&(r=co[r]),Ll(this.options)){const{onComplete:h,onUpdate:f,motionValue:p,element:m,...g}=this.options,y=Il(e,g);e=y.keyframes,e.length===1&&(e[1]=e[0]),s=y.duration,i=y.times,r=y.ease,o="keyframes"}const u=kl(a.owner.current,l,e,{...this.options,duration:s,times:i,ease:r});return u.startTime=c??this.calcStartTime(),this.pendingTimeline?(Gn(u,this.pendingTimeline),this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:h}=this.options;a.set(ve(e,this.options,n)),h&&h(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:s,times:i,type:o,ease:r,keyframes:e}}get duration(){const{resolved:e}=this;if(!e)return 0;const{duration:n}=e;return J(n)}get time(){const{resolved:e}=this;if(!e)return 0;const{animation:n}=e;return J(n.currentTime||0)}set time(e){const{resolved:n}=this;if(!n)return;const{animation:s}=n;s.currentTime=Q(e)}get speed(){const{resolved:e}=this;if(!e)return 1;const{animation:n}=e;return n.playbackRate}set speed(e){const{resolved:n}=this;if(!n)return;const{animation:s}=n;s.playbackRate=e}get state(){const{resolved:e}=this;if(!e)return"idle";const{animation:n}=e;return n.playState}get startTime(){const{resolved:e}=this;if(!e)return null;const{animation:n}=e;return n.startTime}attachTimeline(e){if(!this._resolved)this.pendingTimeline=e;else{const{resolved:n}=this;if(!n)return z;const{animation:s}=n;Gn(s,e)}return z}play(){if(this.isStopped)return;const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:e}=this;if(!e)return;const{animation:n,keyframes:s,duration:i,type:r,ease:o,times:a}=e;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:c,onUpdate:u,onComplete:h,element:f,...p}=this.options,m=new kn({...p,keyframes:s,duration:i,type:r,ease:o,times:a,isGenerator:!0}),g=Q(this.time);c.setWithVelocity(m.sample(g-de).value,m.sample(g).value,de)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:e}=this;e&&e.animation.finish()}cancel(){const{resolved:e}=this;e&&e.animation.cancel()}static supports(e){const{motionValue:n,name:s,repeatDelay:i,repeatType:r,damping:o,type:a}=e;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=n.owner.getProps();return Rl()&&s&&Ml.has(s)&&!l&&!c&&!i&&r!=="mirror"&&o!==0&&a!=="inertia"}}const Fl={type:"spring",stiffness:500,damping:25,restSpeed:10},Ol=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),_l={type:"keyframes",duration:.8},Nl={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Ul=(t,{keyframes:e})=>e.length>2?_l:dt.has(t)?t.startsWith("scale")?Ol(e[1]):Fl:Nl;function Wl({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:r,repeatType:o,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}const Rn=(t,e,n,s={},i,r)=>o=>{const a=yn(s,t)||{},l=a.delay||s.delay||0;let{elapsed:c=0}=s;c=c-Q(l);let u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-c,onUpdate:f=>{e.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:r?void 0:i};Wl(a)||(u={...u,...Ul(t,u)}),u.duration&&(u.duration=Q(u.duration)),u.repeatDelay&&(u.repeatDelay=Q(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let h=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(u.duration=0,u.delay===0&&(h=!0)),h&&!r&&e.get()!==void 0){const f=ve(u.keyframes,a);if(f!==void 0)return R.update(()=>{u.onUpdate(f),u.onComplete()}),new aa([])}return!r&&ls.supports(u)?new ls(u):new kn(u)};function zl({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function uo(t,e,{delay:n=0,transitionOverride:s,type:i}={}){var r;let{transition:o=t.getDefaultTransition(),transitionEnd:a,...l}=e;s&&(o=s);const c=[],u=i&&t.animationState&&t.animationState.getState()[i];for(const h in l){const f=t.getValue(h,(r=t.latestValues[h])!==null&&r!==void 0?r:null),p=l[h];if(p===void 0||u&&zl(u,h))continue;const m={delay:n,...yn(o||{},h)};let g=!1;if(window.MotionHandoffAnimation){const x=Ei(t);if(x){const T=window.MotionHandoffAnimation(x,h,R);T!==null&&(m.startTime=T,g=!0)}}Ne(t,h),f.start(Rn(h,f,p,t.shouldReduceMotion&&ki.has(h)?{type:!1}:m,t,g));const y=f.animation;y&&c.push(y)}return a&&Promise.all(c).then(()=>{R.update(()=>{a&&Ta(t,a)})}),c}function He(t,e,n={}){var s;const i=xe(t,e,n.type==="exit"?(s=t.presenceContext)===null||s===void 0?void 0:s.custom:void 0);let{transition:r=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(r=n.transitionOverride);const o=i?()=>Promise.all(uo(t,i,n)):()=>Promise.resolve(),a=t.variantChildren&&t.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:h,staggerDirection:f}=r;return Kl(t,e,u+c,h,f,n)}:()=>Promise.resolve(),{when:l}=r;if(l){const[c,u]=l==="beforeChildren"?[o,a]:[a,o];return c().then(()=>u())}else return Promise.all([o(),a(n.delay)])}function Kl(t,e,n=0,s=0,i=1,r){const o=[],a=(t.variantChildren.size-1)*s,l=i===1?(c=0)=>c*s:(c=0)=>a-c*s;return Array.from(t.variantChildren).sort($l).forEach((c,u)=>{c.notify("AnimationStart",e),o.push(He(c,e,{...r,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",e)))}),Promise.all(o)}function $l(t,e){return t.sortNodePosition(e)}function Gl(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(r=>He(t,r,n));s=Promise.all(i)}else if(typeof e=="string")s=He(t,e,n);else{const i=typeof e=="function"?xe(t,e,n.custom):e;s=Promise.all(uo(t,i,n))}return s.then(()=>{t.notify("AnimationComplete",e)})}const Hl=on.length;function ho(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?ho(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<Hl;n++){const s=on[n],i=t.props[s];(Wt(i)||i===!1)&&(e[s]=i)}return e}const Xl=[...sn].reverse(),Yl=sn.length;function ql(t){return e=>Promise.all(e.map(({animation:n,options:s})=>Gl(t,n,s)))}function Zl(t){let e=ql(t),n=cs(),s=!0;const i=l=>(c,u)=>{var h;const f=xe(t,u,l==="exit"?(h=t.presenceContext)===null||h===void 0?void 0:h.custom:void 0);if(f){const{transition:p,transitionEnd:m,...g}=f;c={...c,...g,...m}}return c};function r(l){e=l(t)}function o(l){const{props:c}=t,u=ho(t.parent)||{},h=[],f=new Set;let p={},m=1/0;for(let y=0;y<Yl;y++){const x=Xl[y],T=n[x],S=c[x]!==void 0?c[x]:u[x],V=Wt(S),b=x===l?T.isActive:null;b===!1&&(m=y);let M=S===u[x]&&S!==c[x]&&V;if(M&&s&&t.manuallyAnimateOnMount&&(M=!1),T.protectedKeys={...p},!T.isActive&&b===null||!S&&!T.prevProp||ge(S)||typeof S=="boolean")continue;const A=Ql(T.prevProp,S);let C=A||x===l&&T.isActive&&!M&&V||y>m&&V,k=!1;const W=Array.isArray(S)?S:[S];let H=W.reduce(i(x),{});b===!1&&(H={});const{prevResolvedValues:qt={}}=T,we={...qt,...H},Zt=F=>{C=!0,f.has(F)&&(k=!0,f.delete(F)),T.needsAnimating[F]=!0;const X=t.getValue(F);X&&(X.liveStyle=!1)};for(const F in we){const X=H[F],kt=qt[F];if(p.hasOwnProperty(F))continue;let Rt=!1;Fe(X)&&Fe(kt)?Rt=!bi(X,kt):Rt=X!==kt,Rt?X!=null?Zt(F):f.add(F):X!==void 0&&f.has(F)?Zt(F):T.protectedKeys[F]=!0}T.prevProp=S,T.prevResolvedValues=H,T.isActive&&(p={...p,...H}),s&&t.blockInitialAnimation&&(C=!1),C&&(!(M&&A)||k)&&h.push(...W.map(F=>({animation:F,options:{type:x}})))}if(f.size){const y={};f.forEach(x=>{const T=t.getBaseTarget(x),S=t.getValue(x);S&&(S.liveStyle=!0),y[x]=T??null}),h.push({animation:y})}let g=!!h.length;return s&&(c.initial===!1||c.initial===c.animate)&&!t.manuallyAnimateOnMount&&(g=!1),s=!1,g?e(h):Promise.resolve()}function a(l,c){var u;if(n[l].isActive===c)return Promise.resolve();(u=t.variantChildren)===null||u===void 0||u.forEach(f=>{var p;return(p=f.animationState)===null||p===void 0?void 0:p.setActive(l,c)}),n[l].isActive=c;const h=o(l);for(const f in n)n[f].protectedKeys={};return h}return{animateChanges:o,setActive:a,setAnimateFunction:r,getState:()=>n,reset:()=>{n=cs(),s=!0}}}function Ql(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!bi(e,t):!1}function at(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function cs(){return{animate:at(!0),whileInView:at(),whileHover:at(),whileTap:at(),whileDrag:at(),whileFocus:at(),exit:at()}}class ot{constructor(e){this.isMounted=!1,this.node=e}update(){}}class Jl extends ot{constructor(e){super(e),e.animationState||(e.animationState=Zl(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();ge(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),(e=this.unmountControls)===null||e===void 0||e.call(this)}}let tc=0;class ec extends ot{constructor(){super(...arguments),this.id=tc++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===s)return;const i=this.node.animationState.setActive("exit",!e);n&&!e&&i.then(()=>n(this.id))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}const nc={animation:{Feature:Jl},exit:{Feature:ec}};function $t(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}function Yt(t){return{point:{x:t.pageX,y:t.pageY}}}const sc=t=>e=>wn(e)&&t(e,Yt(e));function _t(t,e,n,s){return $t(t,e,sc(n),s)}const us=(t,e)=>Math.abs(t-e);function ic(t,e){const n=us(t.x,e.x),s=us(t.y,e.y);return Math.sqrt(n**2+s**2)}class fo{constructor(e,n,{transformPagePoint:s,contextWindow:i,dragSnapToOrigin:r=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const h=Me(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,p=ic(h.offset,{x:0,y:0})>=3;if(!f&&!p)return;const{point:m}=h,{timestamp:g}=_;this.history.push({...m,timestamp:g});const{onStart:y,onMove:x}=this.handlers;f||(y&&y(this.lastMoveEvent,h),this.startEvent=this.lastMoveEvent),x&&x(this.lastMoveEvent,h)},this.handlePointerMove=(h,f)=>{this.lastMoveEvent=h,this.lastMoveEventInfo=Ve(f,this.transformPagePoint),R.update(this.updatePoint,!0)},this.handlePointerUp=(h,f)=>{this.end();const{onEnd:p,onSessionEnd:m,resumeAnimation:g}=this.handlers;if(this.dragSnapToOrigin&&g&&g(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const y=Me(h.type==="pointercancel"?this.lastMoveEventInfo:Ve(f,this.transformPagePoint),this.history);this.startEvent&&p&&p(h,y),m&&m(h,y)},!wn(e))return;this.dragSnapToOrigin=r,this.handlers=n,this.transformPagePoint=s,this.contextWindow=i||window;const o=Yt(e),a=Ve(o,this.transformPagePoint),{point:l}=a,{timestamp:c}=_;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(e,Me(a,this.history)),this.removeListeners=Xt(_t(this.contextWindow,"pointermove",this.handlePointerMove),_t(this.contextWindow,"pointerup",this.handlePointerUp),_t(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),tt(this.updatePoint)}}function Ve(t,e){return e?{point:e(t.point)}:t}function hs(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Me({point:t},e){return{point:t,delta:hs(t,po(e)),offset:hs(t,oc(e)),velocity:rc(e,.1)}}function oc(t){return t[0]}function po(t){return t[t.length-1]}function rc(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=po(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>Q(e)));)n--;if(!s)return{x:0,y:0};const r=J(i.timestamp-s.timestamp);if(r===0)return{x:0,y:0};const o={x:(i.x-s.x)/r,y:(i.y-s.y)/r};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}const mo=1e-4,ac=1-mo,lc=1+mo,go=.01,cc=0-go,uc=0+go;function K(t){return t.max-t.min}function hc(t,e,n){return Math.abs(t-e)<=n}function ds(t,e,n,s=.5){t.origin=s,t.originPoint=E(e.min,e.max,t.origin),t.scale=K(n)/K(e),t.translate=E(n.min,n.max,t.origin)-t.originPoint,(t.scale>=ac&&t.scale<=lc||isNaN(t.scale))&&(t.scale=1),(t.translate>=cc&&t.translate<=uc||isNaN(t.translate))&&(t.translate=0)}function Nt(t,e,n,s){ds(t.x,e.x,n.x,s?s.originX:void 0),ds(t.y,e.y,n.y,s?s.originY:void 0)}function fs(t,e,n){t.min=n.min+e.min,t.max=t.min+K(e)}function dc(t,e,n){fs(t.x,e.x,n.x),fs(t.y,e.y,n.y)}function ps(t,e,n){t.min=e.min-n.min,t.max=t.min+K(e)}function Ut(t,e,n){ps(t.x,e.x,n.x),ps(t.y,e.y,n.y)}function fc(t,{min:e,max:n},s){return e!==void 0&&t<e?t=s?E(e,t,s.min):Math.max(t,e):n!==void 0&&t>n&&(t=s?E(n,t,s.max):Math.min(t,n)),t}function ms(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function pc(t,{top:e,left:n,bottom:s,right:i}){return{x:ms(t.x,n,i),y:ms(t.y,e,s)}}function gs(t,e){let n=e.min-t.min,s=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,s]=[s,n]),{min:n,max:s}}function mc(t,e){return{x:gs(t.x,e.x),y:gs(t.y,e.y)}}function gc(t,e){let n=.5;const s=K(t),i=K(e);return i>s?n=Ct(e.min,e.max-s,t.min):s>i&&(n=Ct(t.min,t.max-i,e.min)),et(0,1,n)}function yc(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const Xe=.35;function xc(t=Xe){return t===!1?t=0:t===!0&&(t=Xe),{x:ys(t,"left","right"),y:ys(t,"top","bottom")}}function ys(t,e,n){return{min:xs(t,e),max:xs(t,n)}}function xs(t,e){return typeof t=="number"?t:t[e]||0}const vs=()=>({translate:0,scale:1,origin:0,originPoint:0}),St=()=>({x:vs(),y:vs()}),ws=()=>({min:0,max:0}),B=()=>({x:ws(),y:ws()});function G(t){return[t("x"),t("y")]}function yo({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function vc({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function wc(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function ke(t){return t===void 0||t===1}function Ye({scale:t,scaleX:e,scaleY:n}){return!ke(t)||!ke(e)||!ke(n)}function lt(t){return Ye(t)||xo(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function xo(t){return Ss(t.x)||Ss(t.y)}function Ss(t){return t&&t!=="0%"}function fe(t,e,n){const s=t-n,i=e*s;return n+i}function Ts(t,e,n,s,i){return i!==void 0&&(t=fe(t,i,s)),fe(t,n,s)+e}function qe(t,e=0,n=1,s,i){t.min=Ts(t.min,e,n,s,i),t.max=Ts(t.max,e,n,s,i)}function vo(t,{x:e,y:n}){qe(t.x,e.translate,e.scale,e.originPoint),qe(t.y,n.translate,n.scale,n.originPoint)}const bs=.999999999999,Cs=1.0000000000001;function Sc(t,e,n,s=!1){const i=n.length;if(!i)return;e.x=e.y=1;let r,o;for(let a=0;a<i;a++){r=n[a],o=r.projectionDelta;const{visualElement:l}=r.options;l&&l.props.style&&l.props.style.display==="contents"||(s&&r.options.layoutScroll&&r.scroll&&r!==r.root&&bt(t,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),o&&(e.x*=o.x.scale,e.y*=o.y.scale,vo(t,o)),s&&lt(r.latestValues)&&bt(t,r.latestValues))}e.x<Cs&&e.x>bs&&(e.x=1),e.y<Cs&&e.y>bs&&(e.y=1)}function Tt(t,e){t.min=t.min+e,t.max=t.max+e}function Ps(t,e,n,s,i=.5){const r=E(t.min,t.max,i);qe(t,e,n,r,s)}function bt(t,e){Ps(t.x,e.x,e.scaleX,e.scale,e.originX),Ps(t.y,e.y,e.scaleY,e.scale,e.originY)}function wo(t,e){return yo(wc(t.getBoundingClientRect(),e))}function Tc(t,e,n){const s=wo(t,n),{scroll:i}=e;return i&&(Tt(s.x,i.offset.x),Tt(s.y,i.offset.y)),s}const So=({current:t})=>t?t.ownerDocument.defaultView:null,bc=new WeakMap;class Cc{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=B(),this.visualElement=e}start(e,{snapToCursor:n=!1}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const i=u=>{const{dragSnapToOrigin:h}=this.getProps();h?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Yt(u).point)},r=(u,h)=>{const{drag:f,dragPropagation:p,onDragStart:m}=this.getProps();if(f&&!p&&(this.openDragLock&&this.openDragLock(),this.openDragLock=ga(f),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),G(y=>{let x=this.getAxisMotionValue(y).get()||0;if(q.test(x)){const{projection:T}=this.visualElement;if(T&&T.layout){const S=T.layout.layoutBox[y];S&&(x=K(S)*(parseFloat(x)/100))}}this.originPoint[y]=x}),m&&R.postRender(()=>m(u,h)),Ne(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},o=(u,h)=>{const{dragPropagation:f,dragDirectionLock:p,onDirectionLock:m,onDrag:g}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:y}=h;if(p&&this.currentDirection===null){this.currentDirection=Pc(y),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",h.point,y),this.updateAxis("y",h.point,y),this.visualElement.render(),g&&g(u,h)},a=(u,h)=>this.stop(u,h),l=()=>G(u=>{var h;return this.getAnimationState(u)==="paused"&&((h=this.getAxisMotionValue(u).animation)===null||h===void 0?void 0:h.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new fo(e,{onSessionStart:i,onStart:r,onMove:o,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:So(this.visualElement)})}stop(e,n){const s=this.isDragging;if(this.cancel(),!s)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:r}=this.getProps();r&&R.postRender(()=>r(e,n))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:s}=this.getProps();!s&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(e,n,s){const{drag:i}=this.getProps();if(!s||!ee(e,i,this.currentDirection))return;const r=this.getAxisMotionValue(e);let o=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(o=fc(o,this.constraints[e],this.elastic[e])),r.set(o)}resolveConstraints(){var e;const{dragConstraints:n,dragElastic:s}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(e=this.visualElement.projection)===null||e===void 0?void 0:e.layout,r=this.constraints;n&&vt(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&i?this.constraints=pc(i.layoutBox,n):this.constraints=!1,this.elastic=xc(s),r!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&G(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=yc(i.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!vt(e))return!1;const s=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const r=Tc(s,i.root,this.visualElement.getTransformPagePoint());let o=mc(i.layout.layoutBox,r);if(n){const a=n(vc(o));this.hasMutatedConstraints=!!a,a&&(o=yo(a))}return o}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:r,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=G(u=>{if(!ee(u,n,this.currentDirection))return;let h=l&&l[u]||{};o&&(h={min:0,max:0});const f=i?200:1e6,p=i?40:1e7,m={type:"inertia",velocity:s?e[u]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...r,...h};return this.startAxisValueAnimation(u,m)});return Promise.all(c).then(a)}startAxisValueAnimation(e,n){const s=this.getAxisMotionValue(e);return Ne(this.visualElement,e),s.start(Rn(e,s,0,n,this.visualElement,!1))}stopAnimation(){G(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){G(e=>{var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(e){var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,s=this.visualElement.getProps(),i=s[n];return i||this.visualElement.getValue(e,(s.initial?s.initial[e]:void 0)||0)}snapToCursor(e){G(n=>{const{drag:s}=this.getProps();if(!ee(n,s,this.currentDirection))return;const{projection:i}=this.visualElement,r=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:a}=i.layout.layoutBox[n];r.set(e[n]-E(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!vt(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};G(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();i[o]=gc({min:l,max:l},this.constraints[o])}});const{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.resolveConstraints(),G(o=>{if(!ee(o,e,null))return;const a=this.getAxisMotionValue(o),{min:l,max:c}=this.constraints[o];a.set(E(l,c,i[o]))})}addListeners(){if(!this.visualElement.current)return;bc.set(this.visualElement,this);const e=this.visualElement.current,n=_t(e,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),s=()=>{const{dragConstraints:l}=this.getProps();vt(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,r=i.addEventListener("measure",s);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),R.read(s);const o=$t(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(G(u=>{const h=this.getAxisMotionValue(u);h&&(this.originPoint[u]+=l[u].translate,h.set(h.get()+l[u].translate))}),this.visualElement.render())}));return()=>{o(),n(),r(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:r=!1,dragElastic:o=Xe,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:r,dragElastic:o,dragMomentum:a}}}function ee(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function Pc(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class jc extends ot{constructor(e){super(e),this.removeGroupControls=z,this.removeListeners=z,this.controls=new Cc(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||z}unmount(){this.removeGroupControls(),this.removeListeners()}}const js=t=>(e,n)=>{t&&R.postRender(()=>t(e,n))};class Ac extends ot{constructor(){super(...arguments),this.removePointerDownListener=z}onPointerDown(e){this.session=new fo(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:So(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:js(e),onStart:js(n),onMove:s,onEnd:(r,o)=>{delete this.session,i&&R.postRender(()=>i(r,o))}}}mount(){this.removePointerDownListener=_t(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const oe={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function As(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Et={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(j.test(t))t=parseFloat(t);else return t;const n=As(t,e.target.x),s=As(t,e.target.y);return`${n}% ${s}%`}},Dc={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=it.parse(t);if(i.length>5)return s;const r=it.createTransformer(t),o=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;i[0+o]/=a,i[1+o]/=l;const c=E(a,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=c),typeof i[3+o]=="number"&&(i[3+o]/=c),r(i)}};class Vc extends w.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:r}=e;Yr(Mc),r&&(n.group&&n.group.add(r),s&&s.register&&i&&s.register(r),r.root.didUpdate(),r.addEventListener("animationComplete",()=>{this.safeToRemove()}),r.setOptions({...r.options,onExitComplete:()=>this.safeToRemove()})),oe.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:s,drag:i,isPresent:r}=this.props,o=s.projection;return o&&(o.isPresent=r,i||e.layoutDependency!==n||n===void 0?o.willUpdate():this.safeToRemove(),e.isPresent!==r&&(r?o.promote():o.relegate()||R.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),an.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:i}=e;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),s&&s.deregister&&s.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function To(t){const[e,n]=hr(),s=w.useContext(ni);return d.jsx(Vc,{...t,layoutGroup:s,switchLayoutGroup:w.useContext(ui),isPresent:e,safeToRemove:n})}const Mc={borderRadius:{...Et,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Et,borderTopRightRadius:Et,borderBottomLeftRadius:Et,borderBottomRightRadius:Et,boxShadow:Dc};function kc(t,e,n){const s=N(t)?t:jt(t);return s.start(Rn("",s,e,n)),s.animation}function Rc(t){return t instanceof SVGElement&&t.tagName!=="svg"}const Ec=(t,e)=>t.depth-e.depth;class Lc{constructor(){this.children=[],this.isDirty=!1}add(e){Sn(this.children,e),this.isDirty=!0}remove(e){Tn(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Ec),this.isDirty=!1,this.children.forEach(e)}}function Ic(t,e){const n=Z.now(),s=({timestamp:i})=>{const r=i-n;r>=e&&(tt(s),t(r-e))};return R.read(s,!0),()=>tt(s)}const bo=["TopLeft","TopRight","BottomLeft","BottomRight"],Bc=bo.length,Ds=t=>typeof t=="string"?parseFloat(t):t,Vs=t=>typeof t=="number"||j.test(t);function Fc(t,e,n,s,i,r){i?(t.opacity=E(0,n.opacity!==void 0?n.opacity:1,Oc(s)),t.opacityExit=E(e.opacity!==void 0?e.opacity:1,0,_c(s))):r&&(t.opacity=E(e.opacity!==void 0?e.opacity:1,n.opacity!==void 0?n.opacity:1,s));for(let o=0;o<Bc;o++){const a=`border${bo[o]}Radius`;let l=Ms(e,a),c=Ms(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||Vs(l)===Vs(c)?(t[a]=Math.max(E(Ds(l),Ds(c),s),0),(q.test(c)||q.test(l))&&(t[a]+="%")):t[a]=c}(e.rotate||n.rotate)&&(t.rotate=E(e.rotate||0,n.rotate||0,s))}function Ms(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const Oc=Co(0,.5,Ni),_c=Co(.5,.95,z);function Co(t,e,n){return s=>s<t?0:s>e?1:n(Ct(t,e,s))}function ks(t,e){t.min=e.min,t.max=e.max}function $(t,e){ks(t.x,e.x),ks(t.y,e.y)}function Rs(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function Es(t,e,n,s,i){return t-=e,t=fe(t,1/n,s),i!==void 0&&(t=fe(t,1/i,s)),t}function Nc(t,e=0,n=1,s=.5,i,r=t,o=t){if(q.test(e)&&(e=parseFloat(e),e=E(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=E(r.min,r.max,s);t===r&&(a-=e),t.min=Es(t.min,e,n,a,i),t.max=Es(t.max,e,n,a,i)}function Ls(t,e,[n,s,i],r,o){Nc(t,e[n],e[s],e[i],e.scale,r,o)}const Uc=["x","scaleX","originX"],Wc=["y","scaleY","originY"];function Is(t,e,n,s){Ls(t.x,e,Uc,n?n.x:void 0,s?s.x:void 0),Ls(t.y,e,Wc,n?n.y:void 0,s?s.y:void 0)}function Bs(t){return t.translate===0&&t.scale===1}function Po(t){return Bs(t.x)&&Bs(t.y)}function Fs(t,e){return t.min===e.min&&t.max===e.max}function zc(t,e){return Fs(t.x,e.x)&&Fs(t.y,e.y)}function Os(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function jo(t,e){return Os(t.x,e.x)&&Os(t.y,e.y)}function _s(t){return K(t.x)/K(t.y)}function Ns(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class Kc{constructor(){this.members=[]}add(e){Sn(this.members,e),e.scheduleRender()}remove(e){if(Tn(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(i=>e===i);if(n===0)return!1;let s;for(let i=n;i>=0;i--){const r=this.members[i];if(r.isPresent!==!1){s=r;break}}return s?(this.promote(s),!0):!1}promote(e,n){const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.instance&&s.scheduleRender(),e.scheduleRender(),e.resumeFrom=s,n&&(e.resumeFrom.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;i===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:s}=e;n.onExitComplete&&n.onExitComplete(),s&&s.options.onExitComplete&&s.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function $c(t,e,n){let s="";const i=t.x.translate/e.x,r=t.y.translate/e.y,o=(n==null?void 0:n.z)||0;if((i||r||o)&&(s=`translate3d(${i}px, ${r}px, ${o}px) `),(e.x!==1||e.y!==1)&&(s+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:h,rotateY:f,skewX:p,skewY:m}=n;c&&(s=`perspective(${c}px) ${s}`),u&&(s+=`rotate(${u}deg) `),h&&(s+=`rotateX(${h}deg) `),f&&(s+=`rotateY(${f}deg) `),p&&(s+=`skewX(${p}deg) `),m&&(s+=`skewY(${m}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return(a!==1||l!==1)&&(s+=`scale(${a}, ${l})`),s||"none"}const ct={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Bt=typeof window<"u"&&window.MotionDebug!==void 0,Re=["","X","Y","Z"],Gc={visibility:"hidden"},Us=1e3;let Hc=0;function Ee(t,e,n,s){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),s&&(s[t]=0))}function Ao(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=Ei(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:r}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",R,!(i||r))}const{parent:s}=t;s&&!s.hasCheckedOptimisedAppear&&Ao(s)}function Do({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(o={},a=e==null?void 0:e()){this.id=Hc++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,Bt&&(ct.totalNodes=ct.resolvedTargetDeltas=ct.recalculatedProjection=0),this.nodes.forEach(qc),this.nodes.forEach(eu),this.nodes.forEach(nu),this.nodes.forEach(Zc),Bt&&window.MotionDebug.record(ct)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new Lc)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new bn),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const l=this.eventHandlers.get(o);l&&l.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=Rc(o),this.instance=o;const{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(c||l)&&(this.isLayoutDirty=!0),t){let h;const f=()=>this.root.updateBlockedByResize=!1;t(o,()=>{this.root.updateBlockedByResize=!0,h&&h(),h=Ic(f,250),oe.hasAnimatedSinceResize&&(oe.hasAnimatedSinceResize=!1,this.nodes.forEach(zs))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:h,hasLayoutChanged:f,hasRelativeTargetChanged:p,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||u.getDefaultTransition()||au,{onLayoutAnimationStart:y,onLayoutAnimationComplete:x}=u.getProps(),T=!this.targetLayout||!jo(this.targetLayout,m)||p,S=!f&&p;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||S||f&&(T||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(h,S);const V={...yn(g,"layout"),onPlay:y,onComplete:x};(u.shouldReduceMotion||this.options.layoutRoot)&&(V.delay=0,V.type=!1),this.startAnimation(V)}else f||zs(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,tt(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(su),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Ao(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const h=this.path[u];h.shouldResetTransform=!0,h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Ws);return}this.isUpdating||this.nodes.forEach(Jc),this.isUpdating=!1,this.nodes.forEach(tu),this.nodes.forEach(Xc),this.nodes.forEach(Yc),this.clearAllSnapshots();const a=Z.now();_.delta=et(0,1e3/60,a-_.timestamp),_.timestamp=a,_.isProcessing=!0,be.update.process(_),be.preRender.process(_),be.render.process(_),_.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,an.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Qc),this.sharedNodes.forEach(iu)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,R.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){R.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutCorrected=B(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a){const l=s(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Po(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;o&&(a||lt(this.latestValues)||u)&&(i(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),lu(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var o;const{visualElement:a}=this.options;if(!a)return B();const l=a.measureViewportBox();if(!(((o=this.scroll)===null||o===void 0?void 0:o.wasRoot)||this.path.some(cu))){const{scroll:u}=this.root;u&&(Tt(l.x,u.offset.x),Tt(l.y,u.offset.y))}return l}removeElementScroll(o){var a;const l=B();if($(l,o),!((a=this.scroll)===null||a===void 0)&&a.wasRoot)return l;for(let c=0;c<this.path.length;c++){const u=this.path[c],{scroll:h,options:f}=u;u!==this.root&&h&&f.layoutScroll&&(h.wasRoot&&$(l,o),Tt(l.x,h.offset.x),Tt(l.y,h.offset.y))}return l}applyTransform(o,a=!1){const l=B();$(l,o);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&bt(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),lt(u.latestValues)&&bt(l,u.latestValues)}return lt(this.latestValues)&&bt(l,this.latestValues),l}removeTransform(o){const a=B();$(a,o);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!lt(c.latestValues))continue;Ye(c.latestValues)&&c.updateSnapshot();const u=B(),h=c.measurePageBox();$(u,h),Is(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return lt(this.latestValues)&&Is(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==_.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var a;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(o||c&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:h,layoutId:f}=this.options;if(!(!this.layout||!(h||f))){if(this.resolvedRelativeTargetAt=_.timestamp,!this.targetDelta&&!this.relativeTarget){const p=this.getClosestProjectingParent();p&&p.layout&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=B(),this.relativeTargetOrigin=B(),Ut(this.relativeTargetOrigin,this.layout.layoutBox,p.layout.layoutBox),$(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=B(),this.targetWithTransforms=B()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),dc(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):$(this.target,this.layout.layoutBox),vo(this.target,this.targetDelta)):$(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const p=this.getClosestProjectingParent();p&&!!p.resumingFrom==!!this.resumingFrom&&!p.options.layoutScroll&&p.target&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=B(),this.relativeTargetOrigin=B(),Ut(this.relativeTargetOrigin,this.target,p.target),$(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Bt&&ct.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||Ye(this.parent.latestValues)||xo(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var o;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||!((o=this.parent)===null||o===void 0)&&o.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===_.timestamp&&(c=!1),c)return;const{layout:u,layoutId:h}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||h))return;$(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,p=this.treeScale.y;Sc(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=B());const{target:m}=a;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Rs(this.prevProjectionDelta.x,this.projectionDelta.x),Rs(this.prevProjectionDelta.y,this.projectionDelta.y)),Nt(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==p||!Ns(this.projectionDelta.x,this.prevProjectionDelta.x)||!Ns(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m)),Bt&&ct.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var a;if((a=this.options.visualElement)===null||a===void 0||a.scheduleRender(),o){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=St(),this.projectionDelta=St(),this.projectionDeltaWithTransform=St()}setAnimationOrigin(o,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},h=St();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=B(),p=l?l.source:void 0,m=this.layout?this.layout.source:void 0,g=p!==m,y=this.getStack(),x=!y||y.members.length<=1,T=!!(g&&!x&&this.options.crossfade===!0&&!this.path.some(ru));this.animationProgress=0;let S;this.mixTargetDelta=V=>{const b=V/1e3;Ks(h.x,o.x,b),Ks(h.y,o.y,b),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ut(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),ou(this.relativeTarget,this.relativeTargetOrigin,f,b),S&&zc(this.relativeTarget,S)&&(this.isProjectionDirty=!1),S||(S=B()),$(S,this.relativeTarget)),g&&(this.animationValues=u,Fc(u,c,this.latestValues,b,T,x)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=b},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(tt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=R.update(()=>{oe.hasAnimatedSinceResize=!0,this.currentAnimation=kc(0,Us,{...o,onUpdate:a=>{this.mixTargetDelta(a),o.onUpdate&&o.onUpdate(a)},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Us),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=o;if(!(!a||!l||!c)){if(this!==o&&this.layout&&c&&Vo(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||B();const h=K(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+h;const f=K(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+f}$(a,l),bt(a,u),Nt(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new Kc),this.sharedNodes.get(o).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var o;const{layoutId:a}=this.options;return a?((o=this.getStack())===null||o===void 0?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:a}=this.options;return a?(o=this.getStack())===null||o===void 0?void 0:o.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&Ee("z",o,c,this.animationValues);for(let u=0;u<Re.length;u++)Ee(`rotate${Re[u]}`,o,c,this.animationValues),Ee(`skew${Re[u]}`,o,c,this.animationValues);o.render();for(const u in c)o.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);o.scheduleRender()}getProjectionStyles(o){var a,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return Gc;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=se(o==null?void 0:o.pointerEvents)||"",c.transform=u?u(this.latestValues,""):"none",c;const h=this.getLead();if(!this.projectionDelta||!this.layout||!h.target){const g={};return this.options.layoutId&&(g.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,g.pointerEvents=se(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!lt(this.latestValues)&&(g.transform=u?u({},""):"none",this.hasProjected=!1),g}const f=h.animationValues||h.latestValues;this.applyTransformsToTarget(),c.transform=$c(this.projectionDeltaWithTransform,this.treeScale,f),u&&(c.transform=u(f,c.transform));const{x:p,y:m}=this.projectionDelta;c.transformOrigin=`${p.origin*100}% ${m.origin*100}% 0`,h.animationValues?c.opacity=h===this?(l=(a=f.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:c.opacity=h===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(const g in le){if(f[g]===void 0)continue;const{correct:y,applyTo:x}=le[g],T=c.transform==="none"?f[g]:y(f[g],h);if(x){const S=x.length;for(let V=0;V<S;V++)c[x[V]]=T}else c[g]=T}return this.options.layoutId&&(c.pointerEvents=h===this?se(o==null?void 0:o.pointerEvents)||"":"none"),c}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var a;return(a=o.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(Ws),this.root.sharedNodes.clear()}}}function Xc(t){t.updateLayout()}function Yc(t){var e;const n=((e=t.resumeFrom)===null||e===void 0?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:i}=t.layout,{animationType:r}=t.options,o=n.source!==t.layout.source;r==="size"?G(h=>{const f=o?n.measuredBox[h]:n.layoutBox[h],p=K(f);f.min=s[h].min,f.max=f.min+p}):Vo(r,n.layoutBox,s)&&G(h=>{const f=o?n.measuredBox[h]:n.layoutBox[h],p=K(s[h]);f.max=f.min+p,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[h].max=t.relativeTarget[h].min+p)});const a=St();Nt(a,s,n.layoutBox);const l=St();o?Nt(l,t.applyTransform(i,!0),n.measuredBox):Nt(l,s,n.layoutBox);const c=!Po(a);let u=!1;if(!t.resumeFrom){const h=t.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:f,layout:p}=h;if(f&&p){const m=B();Ut(m,n.layoutBox,f.layoutBox);const g=B();Ut(g,s,p.layoutBox),jo(m,g)||(u=!0),h.options.layoutRoot&&(t.relativeTarget=g,t.relativeTargetOrigin=m,t.relativeParent=h)}}}t.notifyListeners("didUpdate",{layout:s,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeTargetChanged:u})}else if(t.isLead()){const{onExitComplete:s}=t.options;s&&s()}t.options.transition=void 0}function qc(t){Bt&&ct.totalNodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.
vendor: 7,234 bytes, line 1
1isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function Zc(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Qc(t){t.clearSnapshot()}function Ws(t){t.clearMeasurements()}function Jc(t){t.isLayoutDirty=!1}function tu(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function zs(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function eu(t){t.resolveTargetDelta()}function nu(t){t.calcProjection()}function su(t){t.resetSkewAndRotation()}function iu(t){t.removeLeadSnapshot()}function Ks(t,e,n){t.translate=E(e.translate,0,n),t.scale=E(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function $s(t,e,n,s){t.min=E(e.min,n.min,s),t.max=E(e.max,n.max,s)}function ou(t,e,n,s){$s(t.x,e.x,n.x,s),$s(t.y,e.y,n.y,s)}function ru(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const au={duration:.45,ease:[.4,0,.1,1]},Gs=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Hs=Gs("applewebkit/")&&!Gs("chrome/")?Math.round:z;function Xs(t){t.min=Hs(t.min),t.max=Hs(t.max)}function lu(t){Xs(t.x),Xs(t.y)}function Vo(t,e,n){return t==="position"||t==="preserve-aspect"&&!hc(_s(e),_s(n),.2)}function cu(t){var e;return t!==t.root&&((e=t.scroll)===null||e===void 0?void 0:e.wasRoot)}const uu=Do({attachResizeListener:(t,e)=>$t(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Le={current:void 0},Mo=Do({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Le.current){const t=new uu({});t.mount(window),t.setOptions({layoutScroll:!0}),Le.current=t}return Le.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),hu={pan:{Feature:Ac},drag:{Feature:jc,ProjectionNode:Mo,MeasureLayout:To}};function Ys(t,e,n){const{props:s}=t;t.animationState&&s.whileHover&&t.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,r=s[i];r&&R.postRender(()=>r(e,Yt(e)))}class du extends ot{mount(){const{current:e}=this.node;e&&(this.unmount=ha(e,n=>(Ys(this.node,n,"Start"),s=>Ys(this.node,s,"End"))))}unmount(){}}class fu extends ot{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Xt($t(this.node.current,"focus",()=>this.onFocus()),$t(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function qs(t,e,n){const{props:s}=t;t.animationState&&s.whileTap&&t.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),r=s[i];r&&R.postRender(()=>r(e,Yt(e)))}class pu extends ot{mount(){const{current:e}=this.node;e&&(this.unmount=ma(e,n=>(qs(this.node,n,"Start"),(s,{success:i})=>qs(this.node,s,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Ze=new WeakMap,Ie=new WeakMap,mu=t=>{const e=Ze.get(t.target);e&&e(t)},gu=t=>{t.forEach(mu)};function yu({root:t,...e}){const n=t||document;Ie.has(n)||Ie.set(n,{});const s=Ie.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(gu,{root:t,...e})),s[i]}function xu(t,e,n){const s=yu(e);return Ze.set(t,n),s.observe(t),()=>{Ze.delete(t),s.unobserve(t)}}const vu={some:0,all:1};class wu extends ot{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:s,amount:i="some",once:r}=e,o={root:n?n.current:void 0,rootMargin:s,threshold:typeof i=="number"?i:vu[i]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,r&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:h}=this.node.getProps(),f=c?u:h;f&&f(l)};return xu(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(Su(e,n))&&this.startObserver()}unmount(){}}function Su({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const Tu={inView:{Feature:wu},tap:{Feature:pu},focus:{Feature:fu},hover:{Feature:du}},bu={layout:{ProjectionNode:Mo,MeasureLayout:To}},Qe={current:null},ko={current:!1};function Cu(){if(ko.current=!0,!!en)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Qe.current=t.matches;t.addListener(e),e()}else Qe.current=!1}const Pu=[...to,U,it],ju=t=>Pu.find(Ji(t)),Zs=new WeakMap;function Au(t,e,n){for(const s in e){const i=e[s],r=n[s];if(N(i))t.addValue(s,i);else if(N(r))t.addValue(s,jt(i,{owner:t}));else if(r!==i)if(t.hasValue(s)){const o=t.getValue(s);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=t.getStaticValue(s);t.addValue(s,jt(o!==void 0?o:i,{owner:t}))}}for(const s in n)e[s]===void 0&&t.removeValue(s);return e}const Qs=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Du{scrapeMotionValuesFromProps(e,n,s){return{}}constructor({parent:e,props:n,presenceContext:s,reducedMotionConfig:i,blockInitialAnimation:r,visualState:o},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Vn,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const p=Z.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,R.render(this.render,!1,!0))};const{latestValues:l,renderState:c,onUpdate:u}=o;this.onUpdate=u,this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=e,this.props=n,this.presenceContext=s,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!r,this.isControllingVariants=ye(n),this.isVariantNode=li(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:h,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const p in f){const m=f[p];l[p]!==void 0&&N(m)&&m.set(l[p],!1)}}mount(e){this.current=e,Zs.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEac
vendor: 6,286 bytes, line 1
1h((n,s)=>this.bindToMotionValue(s,n)),ko.current||Cu(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Qe.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Zs.delete(this.current),this.projection&&this.projection.unmount(),tt(this.notifyUpdate),tt(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const n=this.features[e];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(e,n){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const s=dt.has(e),i=n.on("change",a=>{this.latestValues[e]=a,this.props.onUpdate&&R.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0)}),r=n.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{i(),r(),o&&o(),n.owner&&n.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in Pt){const n=Pt[e];if(!n)continue;const{isEnabled:s,Feature:i}=n;if(!this.features[e]&&i&&s(this.props)&&(this.features[e]=new i(this)),this.features[e]){const r=this.features[e];r.isMounted?r.update():(r.mount(),r.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):B()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;s<Qs.length;s++){const i=Qs[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const r="on"+i,o=e[r];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=Au(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const s=this.values.get(e);n!==s&&(s&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let s=this.values.get(e);return s===void 0&&n!==void 0&&(s=jt(n===null?void 0:n,{owner:this}),this.addValue(e,s)),s}readValue(e,n){var s;let i=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:(s=this.getBaseTargetFromProps(this.props,e))!==null&&s!==void 0?s:this.readValueFromInstance(this.current,e,this.options);return i!=null&&(typeof i=="string"&&(Zi(i)||Wi(i))?i=parseFloat(i):!ju(i)&&it.test(n)&&(i=Xi(e,n)),this.setBaseTarget(e,N(i)?i.get():i)),N(i)?i.get():i}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var n;const{initial:s}=this.props;let i;if(typeof s=="string"||typeof s=="object"){const o=cn(this.props,s,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);o&&(i=o[e])}if(s&&i!==void 0)return i;const r=this.getBaseTargetFromProps(this.props,e);return r!==void 0&&!N(r)?r:this.initialValues[e]!==void 0&&i===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new bn),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}}class Ro extends Du{constructor(){super(...arguments),this.KeyframeResolver=eo}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[n]:void 0}removeValueFromRenderState(e,{vars:n,style:s}){delete n[e],delete s[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;N(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Vu(t){return window.getComputedStyle(t)}class Mu extends Ro{constructor(){super(...arguments),this.type="html",this.renderInstance=yi}readValueFromInstance(e,n){if(dt.has(n)){const s=Dn(n);return s&&s.default||0}else{const s=Vu(e),i=(pi(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:n}){return wo(e,n)}build(e,n,s){dn(e,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return gn(e,n,s)}}class ku extends Ro{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=B}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(dt.has(n)){const s=Dn(n);return s&&s.default||0}return n=xi.has(n)?n:rn(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,s){return Si(e,n,s)}build(e,n,s){fn(e,n,this.isSVGTag,s.transformTemplate)}renderInstance(e,n,s,i){vi(e,n,s,i)}mount(e){this.isSVGTag=mn(e.tagName),super.mount(e)}}const Ru=(t,e)=>ln(t)?new ku(e):new Mu(e,{allowProjection:t!==w.Fragment}),Eu=ia({...nc,...Tu,...hu,...bu},Ru),Eo=vr(Eu);function Lo(t){const e=Dt(()=>jt(t)),{isStatic:n}=w.useContext(tn);if(n){const[,s]=w.useState(t);w.useEffect(()=>e.on("change",s),[])}return e}function Io(t,e){const n=Lo(e()),s=()=>n.set(e());return s(),si(()=>{const i=()=>R.preRender(s,!1,!0),r=t.map(o=>
1o.on("change",i));return()=>{r.forEach(o=>o()),tt(s)}}),n}const Lu=t=>t&&typeof t=="object"&&t.mix,Iu=t=>Lu(t)?t.mix:void 0;function Bu(...t){const e=!Array.isArray(t[0]),n=e?0:-1,s=t[0+n],i=t[1+n],r=t[2+n],o=t[3+n],a=lo(i,r,{mixer:Iu(r[0]),...o});return e?a(s):a}function Fu(t){Ft.current=[],t();const e=Io(Ft.current,t);return Ft.current=void 0,e}function Ou(t,e,n,s){if(typeof t=="function")return Fu(t);const i=typeof e=="function"?e:Bu(e,n,s);return Array.isArray(t)?Js(t,i):Js([t],([r])=>i(r))}function Js(t,e){const n=Dt(()=>[]);return Io(t,()=>{n.length=0;const s=t.length;for(let i=0;i<s;i++)n[i]=t[i].get();return e(n)})}class _u{constructor(){this.componentControls=new Set}subscribe(e){return this.componentControls.add(e),()=>this.componentControls.delete(e)}start(e,n){this.componentControls.forEach(s=>{s.start(e.nativeEvent||e,n)})}}const Nu=()=>new _u;function Uu(){return Dt(Nu)}const Bo=w.createContext(null);function Wu(t,e,n,s){if(!s)return t;const i=t.findIndex(u=>u.value===e);if(i===-1)return t;const r=s>0?1:-1,o=t[i+r];if(!o)return t;const a=t[i],l=o.layout,c=E(l.min,l.max,.5);return r===1&&a.layout.max+n>c||r===-1&&a.layout.min+n<c?xa(t,i,i+r):t}function zu({children:t,as:e="ul",axis:n="y",onReorder:s,values:i,...r},o){const a=Dt(()=>Eo[e]),l=[],c=w.useRef(!1),u={axis:n,registerItem:(h,f)=>{const p=l.findIndex(m=>h===m.value);p!==-1?l[p].layout=f[n]:l.push({value:h,layout:f[n]}),l.sort(Gu)},updateOrder:(h,f,p)=>{if(c.current)return;const m=Wu(l,h,f,p);l!==m&&(c.current=!0,s(m.map($u).filter(g=>i.indexOf(g)!==-1)))}};return w.useEffect(()=>{c.current=!1}),d.jsx(a,{...r,ref:o,ignoreStrict:!0,children:d.jsx(Bo.Provider,{value:u,children:t})})}const Ku=w.forwardRef(zu);function $u(t){return t.value}function Gu(t,e){return t.layout.min-e.layout.min}function ti(t,e=0){return N(t)?t:Lo(e)}function Hu({children:t,style:e={},value:n,as:s="li",onDrag:i,layout:r=!0,...o},a){const l=Dt(()=>Eo[s]),c=w.useContext(Bo),u={x:ti(e.x),y:ti(e.y)},h=Ou([u.x,u.y],([g,y])=>g||y?1:"unset"),{axis:f,registerItem:p,updateOrder:m}=c;return d.jsx(l,{drag:f,...o,dragSnapToOrigin:!0,style:{...e,x:u.x,y:u.y,zIndex:h},layout:r,onDrag:(g,y)=>{const{velocity:x}=y;x[f]&&m(n,u[f].get(),x[f]),i&&i(g,y)},onLayoutMeasure:g=>p(n,g),ref:a,ignoreStrict:!0,children:t})}const Xu=w.forwardRef(Hu),Yu=({store:t,col:e})=>{const n=pe(),s=Be(n.breakpoints.down("tablet")),i=ne(ei),[r,o]=w.useState((e==null?void 0:e.items)||[]),[a,l]=w.useState(e==null?void 0:e.name),[c,{isLoading:u}]=qo(),[h,{isLoading:f}]=Zo(),[p,{isLoading:m}]=Qo(),[g,y]=w.useState(!1),x=(A,C)=>{C!=="clickaway"&&y(!1)},T=({newItem:A})=>{var C;if((C=e==null?void 0:e.items)!=null&&C.find(k=>k._id===A._id)){y(!0);return}o(k=>[...k,A])},S=({itemId:A})=>{o(C=>C.filter(k=>k._id!==A))},[V,b]=w.useState(""),M=w.useMemo(()=>i?d.jsx(On,{isSuperAdmin:!0,handleAddToCollection:T,disableButton:u,collectionId:e==null?void 0:e._id}):d.jsx(On,{isSuperAdmin:!1,store:t==null?void 0:t.name,handleAddToCollection:T,disableButton:u,collectionId:e==null?void 0:e._id}),[i,t,e==null?void 0:e._id]);return d.jsxs(v,{sx:{py:4,pt:s?6:4,display:"flex",flexDirection:"column",backgroundColor:n.palette.background.parchment},children:[d.jsx(Zu,{collectionName:(e==null?void 0:e.name)||""}),d.jsxs(v,{sx:{px:4},children:[d.jsxs(Te,{sx:{p:2},children:[d.jsxs(v,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[d.jsx(v,{sx:{display:"flex",alignItems:"center",gap:3},children:d.jsx(Fn,{label:"Name",placeholder:e==null?void 0:e.name,value:a,onChange:A=>l(A.target.value)})}),d.jsxs(v,{children:[d.jsx(O,{onClick:()=>{l((e==null?void 0:e.name)||""),o((e==null?void 0:e.items)||[])},sx:{textTransform:"none",fontSize:"18px",fontWeight:"bold"},variant:"contained",color:"secondary",disabled:u||m||a===((e==null?void 0:e.name)||"")&&r.map(A=>A._id).join()===((e==null?void 0:e.items)||[]).map(A=>A._id).join(),children:"Reset"}),d.jsx(O,{onClick:async()=>{var C;const A=await c({invalidate:!0,collectionId:e._id,name:a,items:r.map(k=>k._id)});(C=A==null?void 0:A.data)!=null&&C.collection&&(o(A.data.collection.items),l(A.data.collection.name))},color:"warning",sx:{textTransform:"none",fontSize:"18px",fontWeight:"bold",ml:4},variant:"contained",disabled:u||m||a===((e==null?void 0:e.name)||"")&&r.map(A=>A._id).join()===((e==null?void 0:e.items)||[]).map(A=>A._id).join(),children:"Save"})]})]}),d.jsx(re,{sx:{my:1}}),(r==null?void 0:r.length)>0&&d.jsx(Ku,{axis:"y",values:r,onReorder:o,as:"div",children:r.map(A=>d.jsx(qu,{item:A,handleRemoveFromCollection:S},A._id))})]}),d.jsxs(Te,{sx:{p:2,mt:2,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[d.jsx(D,{variant:"h5",color:"error",children:"Clear Collection"}),d.jsx(O,{color:"error",startIcon:d.jsx(tr,{}),disabled:r.length===0||f,onClick:()=>{e!=null&&e._id&&h({collectionId:e._id})},children:"Clear"})]}),d.jsxs(Te,{sx:{p:2,mt:2},children:[d.jsxs(v,{sx:{display:"flex",alignItems:"center",gap:2},children:[d.jsx(D,{variant:"h5",children:"Bulk UPC Insert"}),d.jsx(O,{disabled:V.length===0,onClick:async()=>{var k;const A=V.split(`
2`),C=await p({collectionId:e==null?void 0:e._id,upcs:A});(k=C==null?void 0:C.data)!=null&&k.collection&&o(C.data.collection.items),b("")},children:"Submit"})]}),d.jsx(D,{color:"text.secondary",sx:{fontSize:"10px"},children:"* UPCs should be separated by a new line"}),d.jsx(Fn,{multiline:!0,value:V,onChange:A=>{b(A.target.value)}})]})]}),M,d.jsx(ar,{open:g,autoHideDuration:2e3,onClose:x,children:d.jsx(lr,{message:"Item already exists in collection",sx:{backgroundColor:n.palette.error.main}})})]})},qu=({item:t,handleRemoveFromCollection:e})=>{const n=Uu();return d.jsxs(Xu,{value:t,as:"div",dragListener:!1,dragControls:n,children:[d.jsxs(v,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[d.jsxs(v,{sx:{display:"flex",alignItems:"center",gap:2},children:[d.jsx(Jo,{className:"rerder-handle",onPointerDown:s=>n.start(s)}),d.jsx(v,{sx:{height:"50px"},children:d.jsx("img",{src:t.image,alt:t.name,style:{objectFit:"cover",height:"100%"}})}),d.jsx(st,{to:`/item/${t._id}`,style:{color:"inherit",textDecoration:"none"},children:d.jsx(D,{variant:"h6",sx:{"&:hover":{textDecoration:"underline"}},children:t.name})}),d.jsx(D,{variant:"body1",color:"text.secondary",sx:{fontSize:"12px"},children:t.artists})]}),d.jsx(O,{color:"error",sx:{textTransform:"none"},onClick:()=>{e({itemId:t._id})},children:"Remove"})]}),d.jsx(re,{sx:{my:1}})]},t._id)},Zu=({collectionName:t})=>d.jsx(v,{sx:{px:4},children:d.jsxs(v,{sx:{display:"flex",flexDirection:"row",gap:"3px",mb:3},children:[d.jsx(st,{to:"/admin/dashboard",style:{WebkitTextDecoration:"none",textDecoration:"none"},children:d.jsx(D,{color:"text.secondary",sx:{fontWeight:600,"&:hover":{textDecoration:"underline"}},children:"Admin"})}),d.jsx(D,{color:"text.secondary",sx:{fontWeight:600},children:" > "}),d.jsx(st,{to:"/admin/collections",style:{WebkitTextDecoration:"none",textDecoration:"none"},children:d.jsx(D,{color:"text.secondary",sx:{fontWeight:600,"&:hover":{textDecoration:"underline"}},children:"Collections"})}),d.jsx(D,{color:"text.secondary",sx:{fontWeight:600},children:" > "}),d.jsx(D,{color:"text.secondary",sx:{fontWeight:600},children:t})]})}),Fh=()=>{var g,y,x;const{collectionId:t}=Ko(),e=$o(),{data:n,isLoading:s,isSuccess:i,isError:r,error:o}=Go({collectionId:t,details:"full"},{skip:!!((g=e.state)!=null&&g.collection)}),a=ne(Ho),l=ne(ei),c=ne(Xo),{data:u,isLoading:h,isSuccess:f}=Yo({storeId:a==null?void 0:a.role.store},{skip:l||!c});if(s||!l&&h)return d.jsx(v,{sx:{height:"100%",width:"100%",display:"flex",alignItems:"center",justifyContent:"center"},children:d.jsx(rr,{color:"warning"})});const m=((y=e.state)==null?void 0:y.collection)||(n==null?void 0:n.collection);return m?d.jsx(Yu,{store:u==null?void 0:u.store,col:m}):d.jsxs(v,{sx:{height:"100%",width:"100%",display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column",gap:1},children:[d.jsx(D,{variant:"h5",children:"Collection not found"}),r?d.jsxs(D,{color:"text.secondary",sx:{fontSize:"12px"},children:[String((o==null?void 0:o.status)||"")," ",String(((x=o==null?void 0:o.data)==null?void 0:x.message)||"")]}):null,d.jsx(st,{to:"/admin/collections",children:d.jsx(O,{variant:"contained",color:"warning",children:"Back to Collections"})})]})};export{Fh as default};

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.