PageSourceSearch

https://www.sleepnumber.com/build/assets/dist-Cfjz6g1W.js

js sleepnumber.com collected 2026-10-01 10:29:16 UTC 2,540 bytes, 2 lines download raw bytes

1import{$ as e,it as t}from"./jsx-runtime-CfwYrey9.js";import{n}from"./dist-CNr0D3WG.js";var r=t(e(),1);function i(e,t){return r.useReducer((e,n)=>t[e][n]??e,e)}var a=e=>{let{present:t,children:n}=e,i=o(t),a=typeof n==`function`?n({present:i.isPresent}):r.Children.only(n),s=c(i.ref,u(a));return typeof n==`function`||i.isPresent?r.cloneElement(a,{ref:s}):null};a.displayName=`Presence`;function o(e){let[t,a]=r.useState(),o=r.useRef(null),s=r.useRef(e),c=r.useRef(`none`),u=r.useRef(void 0),[d,f]=i(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return r.useEffect(()=>{d===`mounted`?(c.current=u.current??l(o.current),u.current=void 0):c.current=`none`},[d]),n(()=>{let t=o.current,n=s.current;if(n!==e){let r=c.current,i=l(t);e?(u.current=i,f(`MOUNT`)):i===`none`||t?.display===`none`?f(`UNMOUNT`):f(n&&r!==i?`ANIMATION_OUT`:`UNMOUNT`),s.current=e}},[e,f]),n(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,r=r=>{let i=l(o.current).includes(CSS.escape(r.animationName));if(r.target===t&&i&&(f(`ANIMATION_END`),!s.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},i=e=>{e.target===t&&(c.current=l(o.current))};return t.addEventListener(`animationstart`,i),t.addEventListener(`animationcancel`,r),t.addEventListener(`animationend`,r),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,i),t.removeEventListener(`animationcancel`,r),t.removeEventListener(`animationend`,r)}}else f(`ANIMATION_END`)},[t,f]),{isPresent:[`mounted`,`unmountSuspended`].includes(d),ref:r.useCallback(e=>{if(e){let t=getComputedStyle(e);o.current=t,u.current=l(t)}else o.current=null;a(e)},[])}}function s(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function c(...e){let t=r.useRef(e);return t.current=e,r.useCallback(e=>{let n=t.current,r=!1,i=n.map(t=>{let n=s(t,e);return!r&&typeof n==`function`&&(r=!0),n});if(r)return()=>{for(let e=0;e<i.length;e++){let t=i[e];typeof t==`function`?t():s(n[e],null)}}},[])}function l(e){return e?.animationName||`none`}function u(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}export{a as t};
2//# sourceMappingURL=dist-Cfjz6g1W.js.map

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.