PageSourceSearch

https://www.flexport.com/_astro/Drawer.astro_astro_type_script_index_0_lang.Ddb0fSO0.js

js flexport.com collected 2026-10-01 08:32:31 UTC 7,558 bytes, 1 lines download raw bytes

1(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`ac81f103-d798-4960-bfa0-4aa65740271b`,e._sentryDebugIdIdentifier=`sentry-dbid-ac81f103-d798-4960-bfa0-4aa65740271b`)}catch{}})(),globalThis.process??={},globalThis.process.env??={};import{t as e}from"./defer.IHK0MFsg.js";import{t}from"./header.8EC2l9R-.js";import{i as n,n as r,r as i,t as a}from"./protocol.BHsUTYcv.js";import{t as o}from"./protocol.DfVhZUzo.js";var s=`.drawer`,c=`.drawer-underlay`,l=`data-drawer-underlay-for`,u=`data-drawer-open`,d=`data-drawer-trigger`,f=`data-drawer-close`,p=`data-drawer-show`,m=`data-drawer-panel`,h=`data-drawer-page`,g=`root`,_=`data-open`,v=`data-drawer-lifecycle`,y=`data-drawer-locked`,b=`[data-drawer-inerts]`,x=`header[data-drawer-page]`,S=new WeakMap,C=new Map,w=null,T=null;function E(e){let t=S.get(e);return t||(t={lifecycle:`closed`,savedRootScroll:0,lastChildPageId:null,inCriticalSection:!1,triggerSelector:null},S.set(e,t)),t}function D(e,t){return`[${e}="${CSS.escape(t)}"]`}function O(e,t){let n=E(e);n.lifecycle=t,e.setAttribute(v,t)}function k(e){let t=document.getElementById(e);return t instanceof HTMLElement&&t.matches(s)?t:null}function A(e,t){for(let n of document.querySelectorAll(D(`aria-controls`,e.id))){n.setAttribute(`data-state`,t?`open`:`closed`),n.hasAttribute(`aria-expanded`)&&n.setAttribute(`aria-expanded`,t?`true`:`false`);let e=t?n.dataset.labelClose:n.dataset.labelOpen;e&&n.setAttribute(`aria-label`,e)}}function j(e){return e.querySelector(`[${m}="${g}"]`)}function M(e,t){return e.querySelector(`[${m}="${t}"]`)}function N(){let e=document.querySelectorAll(b);T&&(T.size!==e.length||[...e].some(e=>!T?.has(e)))&&I(!1),T??=new Map([...e].map(e=>[e,e.inert])),document.documentElement.setAttribute(y,``)}function P(){document.documentElement.removeAttribute(y),e(F)}function F(){if(T){if(!document.documentElement.hasAttribute(y)){I(!0);return}for(let e of T.keys())e.inert!==!0&&(e.inert=!0)}}function I(e){if(T){for(let[e,t]of T)e.inert=t;T=null}}function L(){document.documentElement.removeAttribute(y),I(!1)}function R(e){let t=document.querySelectorAll(x),n=e.getAttribute(h)??g;for(let e of t)e.setAttribute(h,n)}function z(){for(let e of document.querySelectorAll(x))e.setAttribute(h,``)}function B(e,t,n){e.dispatchEvent(new CustomEvent(t,{bubbles:!0,cancelable:!1,detail:n}))}function V(e){let t=j(e);t?t.focus({preventScroll:!0}):e.focus({preventScroll:!0})}function H(e){let t=C.get(e.id);if(C.delete(e.id),t){let e=document.getElementById(t);if(e&&document.contains(e)){e.focus();return}}let n=E(e).triggerSelector;if(n){let e=document.querySelector(n);if(e){e.focus();return}}let r=document.querySelector(D(`aria-controls`,e.id));r&&r.focus()}function U(e){let t=E(e);w===e.id&&(w=null),L(),t.inCriticalSection=!1,e.removeAttribute(_),z(),O(e,`closed`),A(e,!1)}function W(){(document.documentElement.hasAttribute(y)||T!==null)&&(w===null||k(w)===null)&&(w=null,L())}function G(e){for(let t of e.querySelectorAll(`.nav-card__media[hidden]`))t.hidden=!1}function K(e,t){let n=e.getAttribute(h)??g;if(n===t)return;let r=E(e);n===g&&(r.savedRootScroll=j(e)?.scrollTop??0),t!==g&&(r.lastChildPageId=t),e.setAttribute(h,t);let i=document.querySelector(x);i&&i.setAttribute(h,t);let a=M(e,t),o=M(e,n);a&&G(a);for(let n of e.querySelectorAll(`[${m}]`))n.getAttribute(m)===t?n.setAttribute(`data-drawer-active`,``):n.removeAttribute(`data-drawer-active`);if(a&&(a.inert=!1),a){if(t===g){let t=r.lastChildPageId,n=t?e.querySelector(`[${p}="${t}"]`):null;n?n.focus({preventScroll:!0}):a.focus({preventScroll:!0}),r.lastChildPageId=null}else a.focus({preventScroll:!0})}o&&o!==a&&(o.inert=!0);for(let n of e.querySelectorAll(`[${p}]`)){let e=n.getAttribute(p);e&&e!==g&&n.hasAttribute(`aria-expanded`)&&n.setAttribute(`aria-expanded`,e===t?`true`:`false`)}if(t===g){let t=j(e);t&&(t.scrollTop=r.savedRootScroll)}else{let n=M(e,t);n&&(n.scrollTop=0)}}function q(e,n,r){let a=E(e);if(a.lifecycle===`open`||a.lifecycle===`opening`)return;let o=i(e.id);if(w===null||w===o){a.inCriticalSection=!0;try{n instanceof HTMLElement&&n.id&&C.set(e.id,n.id),a.triggerSelector=D(d,e.id),O(e,`opening`),t(`up`,window.scrollY),w=o,requestAnimationFrame(()=>{J(e,o,r,a)})}catch(e){throw a.inCriticalSection=!1,e}}}function J(e,t,n,r){try{N(),setTimeout(F,0),e.setAttribute(h,g),R(e),r.savedRootScroll=0,r.lastChildPageId=null;for(let t of e.querySelectorAll(`[${m}]`))t.getAttribute(m)===g?(t.setAttribute(`data-drawer-active`,``),t.inert=!1):(t.removeAttribute(`data-drawer-active`),t.inert=!0),t.scrollTop=0;for(let t of e.querySelectorAll(`[${p}]`))t.hasAttribute(`aria-expanded`)&&t.setAttribute(`aria-expanded`,`false`);e.setAttribute(_,``),O(e,`open`),A(e,!0),B(e,a.OPEN,{source:n,drawerId:t}),V(e)}finally{r.inCriticalSection=!1}}function Y(e,n){let r=E(e);if(r.lifecycle!==`closing`&&r.lifecycle!==`closed`){r.inCriticalSection=!0,O(e,`closing`);try{e.removeAttribute(_),A(e,!1),w===e.id&&(w=null),P(),z(),e.setAttribute(h,g),r.savedRootScroll=0,r.lastChildPageId=null,O(e,`closed`),B(e,a.CLOSE,{source:n,drawerId:i(e.id)}),t(`up`,window.scrollY),H(e)}finally{r.inCriticalSection=!1}}}document.addEventListener(`click`,e=>{let t=e.target;if(!(t instanceof Element))return;let r=t.closest(`[${u}]`);if(r){let e=r.getAttribute(u);if(e&&!n(e))return;let t=e?k(e):null;if(t){let e=E(t).lifecycle;
1e===`closed`?q(t,r,`user`):e===`open`&&Y(t,`user`)}return}let i=t.closest(`[${f}]`);if(i){let e=i.closest(s);e&&Y(e,`user`);return}let a=t.closest(c);if(a){let e=a.getAttribute(l);if(e&&!n(e))return;let t=e?k(e):null;t&&Y(t,`user`);return}let o=t.closest(`[${p}]`);if(!o)return;let d=o.getAttribute(p);if(!d)return;let m=o.closest(s);if(!m){let e=o.closest(`[${u}]`)?.getAttribute(u);e&&n(e)&&(m=k(e))}!m&&w!==null&&(m=k(w)),m&&o.tagName!==`A`&&(e.preventDefault(),K(m,d))}),document.addEventListener(`keydown`,e=>{if(e.key===`Escape`)for(let t of document.querySelectorAll(s)){let n=S.get(t);n&&(n.lifecycle===`open`||n.lifecycle===`opening`)&&(e.preventDefault(),Y(t,`user`))}}),window.matchMedia(`(min-width: 64em)`).addEventListener(`change`,e=>{if(e.matches)for(let e of document.querySelectorAll(s)){let t=S.get(e);t&&(t.lifecycle===`open`||t.lifecycle===`opening`)&&Y(e,`programmatic`)}}),window.addEventListener(o.OPEN,()=>{for(let e of document.querySelectorAll(s)){let t=S.get(e);t&&(t.lifecycle===`open`||t.lifecycle===`opening`)&&Y(e,`programmatic`)}}),window.addEventListener(`popstate`,()=>{for(let e of document.querySelectorAll(s)){let t=S.get(e);t&&(t.lifecycle===`open`||t.lifecycle===`opening`)&&Y(e,`programmatic`)}}),document.addEventListener(`astro:before-swap`,()=>{for(let e of document.querySelectorAll(s)){let t=S.get(e);t&&(t.lifecycle===`open`||t.lifecycle===`opening`)&&U(e)}}),window.addEventListener(`pagehide`,()=>{z()}),window.addEventListener(`error`,e=>{let t=e.error,n=t instanceof r||typeof t==`object`&&!!t&&t.brand===r.brand,i=!1;for(let e of document.querySelectorAll(s))if(S.get(e)?.inCriticalSection){i=!0;break}if(n||i&&(t instanceof Error&&typeof t.stack==`string`?t.stack:``).toLowerCase().includes(`drawer`)){for(let e of document.querySelectorAll(s)){let t=S.get(e);t?.inCriticalSection&&U(e),t&&(t.inCriticalSection=!1)}W()}}),document.addEventListener(`pointerdown`,e=>{let t=e.target;if(!(t instanceof Element))return;let n=t.closest(`[${p}]`),r=n?.closest(s),i=n?.getAttribute(p),a=r&&i?M(r,i):null;a&&G(a)},{passive:!0});

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.