All entries

March 26, 2026

d934d47f845962ae47e1547efc6ecc979ed9a098d6ae1745c1b42098f6171936
Previous: cdc43ba6 Bundle: 88.8 KB

The fetch module gained extensionOriginFetch support, and several modules narrowed their protocol scope to Shopify-only contexts.

Highlights

  • The fetch module now supports an extensionOriginFetch handler that routes requests through a custom fetch implementation when available, affecting both initial and retry-on-session requests.
  • The toast module's show and hide methods now only activate in Shopify protocol contexts, replacing the previous all-protocols behavior.
  • The tools module's register, unregister, and clear methods now scope exclusively to Shopify protocols.
  • The print and sidekick modules also switched from all-protocols to Shopify-only protocol scope.
  • The internal-only module's internalModal show and hide calls were simplified to use optional chaining, removing intermediate variable bindings.
24 files changed +140 -188

Infrastructure Changes

REPORT.md
+17 -17
@@ -1,52 +1,52 @@
# Shopify App Bridge — Unminification Report

Generated: 2026-03-24T11:21:11.827Z
Generated: 2026-03-26T08:14:27.154Z

## Files

| File | Size | Lines | Type |
|------|------|-------|------|
| _bootstrap.js | 32.0KB | 1134 | Infrastructure |
| _bootstrap.js | 31.2KB | 1106 | Infrastructure |
| _remote-ui.js | 6.0KB | 256 | Infrastructure |
| _remote-ui.js | 6.0KB | 254 | Infrastructure |
| _utilities.js | 70.6KB | 2631 | Infrastructure |
| _utilities.js | 69.3KB | 2574 | Infrastructure |
| _web-vitals.js | 11.6KB | 527 | Infrastructure |
| analytics.js | 211B | 11 | Module |
| app.js | 346B | 15 | Module |
| client.js | 303B | 15 | Module |
| environment.js | 241B | 14 | Module |
| fetch.js | 2.8KB | 82 | Module |
| fetch.js | 3.1KB | 94 | Module |
| id-token.js | 661B | 28 | Module |
| id-token.js | 640B | 28 | Module |
| index.js | 2.2KB | 48 | Index |
| intents.js | 2.7KB | 89 | Module |
| internal-only.js | 615B | 30 | Module |
| internal-only.js | 528B | 26 | Module |
| loading.js | 605B | 31 | Module |
| navigation.js | 416B | 19 | Module |
| picker.js | 451B | 18 | Module |
| polaris.js | 240B | 12 | Module |
| pos.js | 5.8KB | 251 | Module |
| pos.js | 5.7KB | 248 | Module |
| print.js | 556B | 25 | Module |
| print.js | 575B | 25 | Module |
| resource-picker.js | 2.8KB | 119 | Module |
| reviews.js | 365B | 16 | Module |
| s-app-nav.js | 175B | 10 | Module |
| s-app-window.js | 228B | 12 | Module |
| save-bar.js | 3.5KB | 141 | Module |
| save-bar.js | 3.4KB | 138 | Module |
| scanner.js | 2.9KB | 101 | Module |
| scanner.js | 2.8KB | 101 | Module |
| scopes.js | 797B | 26 | Module |
| share.js | 1.3KB | 58 | Module |
| shopifyQL.js | 231B | 12 | Module |
| shortcut.js | 461B | 24 | Module |
| shortcut.js | 478B | 24 | Module |
| sidekick.js | 4.6KB | 154 | Module |
| sidekick.js | 4.4KB | 147 | Module |
| support.js | 508B | 21 | Module |
| telemetry.js | 813B | 30 | Module |
| title-bar.js | 7.9KB | 307 | Module |
| title-bar.js | 7.5KB | 284 | Module |
| toast.js | 1.7KB | 73 | Module |
| toast.js | 1.6KB | 71 | Module |
| tools.js | 1.8KB | 66 | Module |
| tools.js | 1.6KB | 57 | Module |
| ui-modal.js | 153B | 10 | Module |
| ui-nav-menu.js | 164B | 10 | Module |
| user.js | 940B | 37 | Module |
| visibility.js | 973B | 34 | Module |
| web-vitals.js | 1.8KB | 64 | Module |
| **Total** | **172.0KB** | **6561** | |
| **Total** | **169.3KB** | **6435** | |

## Pipeline Stages


modules/_bootstrap.js Truncated
+15 -24
@@ -4,8 +4,6 @@
 */

(function () {
  var t;
  var n;
  try {
    if ('then' in (self.shopify?.ready || {})) return;
  } catch (err) {}
@@ -58,15 +56,12 @@
    throw Error(
      'Shopify’s App Bridge must be included as the first <script> tag and must link to Shopify’s CDN. Do not use async, defer or type=module. Aborting.',
    );
  if (!((n = document.currentScript) == null)) {
  document.currentScript;
    n.src;
  const { config: t, params: n } = (function () {
  }
  const { config: i, params: o } = (function () {
    var n;
    const searchParams = new URLSearchParams(location.search);
      (function () {
        try {
          const n = sessionStorage.getItem('app-bridge-config');
@@ -80,58 +75,56 @@
        }
      })(),
    );
    b(i, (n = window.shopify?.config) != null ? n : {});
    m(n, window.shopify?.config ?? {});
      (function () {
        var t;
        const t = Array.from(document.getElementsByTagName('script'));
        const n = Array.from(document.getElementsByTagName('script'));
        if (document.currentScript) {
        }
            try {
                  if (t) {
                  }
                });
              }
            } catch (err) {}
            try {
              b(e, JSON.parse((t = o.textContent) != null ? t : '{}'));
              m(n, JSON.parse(i.textContent ?? '{}'));
            } catch (err) {
              console.warn('App Bridge Next: failed to parse configuration. ' + err);
            }
      })(),
    );
      (function () {
        var t;
        const t = Array.from(document.querySelectorAll('meta[name^="shopify-"i]'));
        const n = Array.from(document.querySelectorAll('meta[name^="shopify-"i]'));
        const n = {};
        const e = {};
        for (const e of t) {
        for (const i of n) {
          if (!e.hasAttribute('name')) continue;
          if (!i.hasAttribute('name')) continue;
          const t = e
          const n = i
            .getAttribute('name')
            .replace(/shopify-/i, '')
            .toLowerCase()
            .replace(/-+(.)/g, (t, n) => n.toUpperCase());
          e[n] = ht(n, (t = i.getAttribute('content')) != null ? t : undefined);
          n[t] = lt(t, e.getAttribute('content') ?? undefined);
        }
      })(),
    );
      (function (t) {
        return {
          shop: t.get('shop'),
@@ -179,11 +172,11 @@
          removeEventListener: globalThis.removeEventListener.bind(globalThis),
          postMessage: globalThis.parent.postMessage.bind(globalThis.parent),
        });
    let n = null;
    let e = t ? null : new Set();
    var i = interceptProperty('value');
    var i = privateKeyCounter('value');
    var o = interceptProperty('callbacks');
    var o = privateKeyCounter('callbacks');
    class r {
      constructor(t) {
        var n;
@@ -195,24 +188,24 @@
          writable: true,
          value: new Set(),
        });
        ORIGINAL_SYMBOL(this, i)[i] = t;
        createPrivateKey(this, i)[i] = t;
        if (!((n = e) == null)) {
          n.add(this);
        }
      }
      get value() {
        return ORIGINAL_SYMBOL(this, i)[i];
        return createPrivateKey(this, i)[i];
      }
      set value(t) {
        if (t !== ORIGINAL_SYMBOL(this, i)[i]) {
          ORIGINAL_SYMBOL(this, i)[i] = t;
... (truncated)

Diff truncated at 200 lines

modules/_remote-ui.js Truncated
+2 -5
@@ -4,22 +4,20 @@
 * @description Remote procedure call and memory management for remote rendering
 */

var t;
var e;
const retainSymbol =
  Symbol.for('RemoteUi::Retain'); /* Symbol for retaining a remote object in memory */
const releaseSymbol =
  Symbol.for('RemoteUi::Release'); /* Symbol for releasing a remote object from memory */
const retainedBySymbol =
  Symbol.for('RemoteUi::RetainedBy'); /* Symbol for tracking which retainers hold this object */
  constructor() {
    this.memoryManaged = new Set();
  }
  }
  release() {
    for (const t of this.memoryManaged) {
@@ -29,192 +27,192 @@ class a {
    this.memoryManaged.clear();
  }
}
}
}
  }
      const i = t.reduce((t, i) => l(i, n, e) || t, r);
      const t = n.reduce((t, n) => a(n, e, i) || t, s);
    }
    }
  }
}
}
    t[releaseSymbol]();
  }
    if (Array.isArray(t)) {
    }
    }
  }
}
  if (t == null || typeof t != 'object') return false;
  const n = Object.getPrototypeOf(t);
  return n == null || n === Object.prototype;
}
const remoteFunctionMarker = '_@f'; /* Function marker for RPC serialization */
  const map = new Map();
  const c = new Map();
  return {
            o.map((n) => {
            n.map((n) => {
            }),
          ];
        }
              return {
              };
            }, {}),
            t,
... (truncated)

Diff truncated at 200 lines

modules/_utilities.js Truncated
+14 -15
@@ -4,13 +4,13 @@
 *           error types, DOM validation framework, navigation menu base
 */

  return `${w()}-${w()}-${w()}-${w()}`;
  return `${p()}-${p()}-${p()}-${p()}`;
}
  return Math.floor(Math.random() * Number.MAX_SAFE_INTEGER).toString(16);
}
  if (n)
    for (let e in n) {
      const i = n[e];
@@ -19,13 +19,13 @@ function b(t, n) {
      }
    }
}
  if (!customElements.get(t)) {
    customElements.define(t, n);
  }
}
const g = (t = globalThis.HTMLElement) != null ? t : class {};
const b = globalThis.HTMLElement ?? class {};
  constructor() {
    super();
    this.attachShadow({
@@ -33,42 +33,41 @@ class A extends g {
    }).innerHTML = '<style>:host{display: none;}</style><slot></slot>';
  }
}
  return t.replace(/-([a-z])/gi, (t, n) => n.toUpperCase());
}
  try {
    return navigator.userAgent.toLowerCase().includes(t.toLowerCase());
  } catch (err) {
    return false;
  }
}
}
}
}
}
  var t;
  const [, t, n, e] = window.name.match(S) ?? [];
  const [, n, e, i] = (t = window.name.match(I)) != null ? t : [];
  return {
  };
})();
  'hmac',
  'locale',
  'protocol',
@@ -99,12 +98,12 @@ const _ = [
  'UnexpectedAction',
  'UnsupportedOperation',
];
function subscribeAllErrors(t, n, e) {
function x(t, n, e) {
    t.subscribe('Error.' + i, n, e);
  });
}
  let t;
  let n = false;
  const promise = new Promise((n) => {
@@ -123,7 +122,7 @@ function U() {
    },
  };
}
function createDeferred() {
function _() {
  let t = Promise.resolve();
  const n = {};
  return {
@@ -149,7 +148,7 @@ function createDeferred() {
    },
  };
}
function N({ keys, held, handler, keyEvent: i = 'keydown' }) {
function subscribeAllErrors({ keys, held, handler, keyEvent: i = 'keydown' }) {
  let o = [];
  const r = (i) => {
    if (keys.flat().includes(i.key)) {
@@ -191,29 +190,29 @@ function N({ keys, held, handler, keyEvent: i = 'keydown' }) {
    });
  };
}
  const t = window.shopify.config.host;
  return 'https://' + atob(t);
}
const createDeferred = Symbol();
const N = Symbol();
const j = Symbol();
const D = Symbol();
const q = Symbol();
const q = 'data-save-bar';
const W = Symbol();
const W = 'data-discard-confirmation';
const V = Symbol();
const V = 'ui-save-bar';
const z = 'data-save-bar';
const z = 'update';
const G = 'data-discard-confirmation';
function G(t, { onChange, filter: e = () => true }) {
const H = 'ui-save-bar';
const K = 'update';
function X(t, { onChange, filter: e = () => true }) {
  function i() {
    let o = false;
    let r = false;
    for (const t of i) {
      if (o) break;
    }
    for (const t of i) {
... (truncated)

Diff truncated at 200 lines

Module Changes

modules/fetch.js
+22 -10
@@ -3,8 +3,8 @@
 * Intercepted fetch with auth headers and session token refresh
 */

// Registry entry referenced as: It
// Registry entry referenced as: Lt
  const i = self.fetch;
  async function o(t, n) {
    const e = new Headers(n.headers).get('Shopify-Challenge-Required');
@@ -16,66 +16,78 @@ const It = ({ api, protocol, internalApiPromise }) => {
          verified: false,
        };
  }
  Tt(globalThis, 'fetch', async function (r, a) {
  interceptProperty(globalThis, 'fetch', async function (r, a) {
    var s;
    const request = new Request(r instanceof Request ? r.clone() : r, a);
    const url = new URL(request.url);
      (url.protocol === location.protocol &&
        (url.hostname === location.hostname || url.hostname.endsWith('.' + location.hostname))) ||
    const { adminApi: h, trustChallenge: p } = (await internalApiPromise) || {};
    const {
    if (!d && !f && typeof h?.shouldIntercept == 'function' && typeof h.fetch == 'function') {
      adminApi: f,
      trustChallenge: h,
      extensionOriginFetch: p,
    } = (await internalApiPromise) || {};
    if (!l && !d && typeof f?.shouldIntercept == 'function' && typeof f.fetch == 'function') {
      const t = Array.from(request.headers.entries());
      if (n?.intercept) {
        const n = {
          method: request.method,
          url: request.url,
          headers: t,
          body: (s = await request.text()) != null ? s : undefined,
          body: (await request.text()) ?? undefined,
        };
        if (i) {
          return new Response(t.body, t);
        }
        return new Response(e.body, e);
      }
    }
      request.headers.set('Authorization', 'Bearer ' + (await api.idToken()));
    }
      request.headers.set('X-Requested-With', 'XMLHttpRequest');
    }
      request.headers.set('Accept-Language', api.config.locale);
    }
    let w = await i(request);
    let b;
    if (w.headers.get('X-Shopify-Retry-Invalid-Session-Request') && v) {
    if (p?.fetch) {
      m.headers.set('Authorization', 'Bearer ' + (await api.idToken()));
      const t = await restoreProperty(request);
      w = await i(m);
      const n = await p.fetch(t);
      b = Tt(n.body, n);
    } else b = await i(request);
    if (b.headers.get('X-Shopify-Retry-Invalid-Session-Request') && m) {
      w.headers.set('Authorization', 'Bearer ' + (await api.idToken()));
      if (p?.fetch) {
        const t = await restoreProperty(w);
        const n = await p.fetch(t);
        b = Tt(n.body, n);
      } else b = await i(w);
    }
      protocol.send('Navigation.redirect.remote', {
      });
      return new Promise(() => {});
    }
    }
  });
};


modules/id-token.js
+3 -3
@@ -3,8 +3,8 @@
 * Session token (ID token) request/response
 */

// Registry entry referenced as: deepClone
// Registry entry referenced as: It
const deepClone = ({ api, protocol, internalApiPromise }) => {
const It = ({ api, protocol, internalApiPromise }) => {
  api.idToken = async function () {
    const { idToken: t } = (await internalApiPromise) || {};
    return t
@@ -24,4 +24,4 @@ const deepClone = ({ api, protocol, internalApiPromise }) => {
  };
};

const idTokenModule = deepClone;
const idTokenModule = It;

modules/intents.js
+2 -2
@@ -31,7 +31,7 @@ const intentsModule = ({ api, protocol, internalApiPromise }) => {
        'AppFrame.propertiesEvent',
        ({ properties }) => {
          const o = (function (t, n, e) {
            return new safeAsyncCall('configure', 'gid://flow/stepReference/' + t, n, () =>
            return new Mt('configure', 'gid://flow/stepReference/' + t, n, () =>
              e.send('AppFrame.navigateBack'),
            );
          })(
@@ -50,25 +50,25 @@ const intentsModule = ({ api, protocol, internalApiPromise }) => {
      return () => i.abort();
    },
    async invoke(t, n) {
        throw Error('Intents are not supported');
      return new xt(o.intents.invoke(t, n));
      return new safeAsyncCall(i.intents.invoke(t, n));
    },
  };
    async function o() {
      if (
      )
        throw Error('Cannot respond to intent in this context');
      if (abortController.signal.aborted) throw Error('Cannot resolve an intent multiple times');
      abortController.abort();
    }
    api.intents.response = {
      async ok(t) {

modules/internal-only.js
+7 -11
@@ -6,20 +6,16 @@
const internalOnlyModule = ({ api, internalApiPromise }) => {
  const e = {
    async show(t, e) {
      var i;
      const i = xt(e);
      var o;
      const o = await internalApiPromise;
      const r = SHOPIFY_PROTOCOLS(e);
      if (o && o.internalModal) {
      const a = await internalApiPromise;
        await o.internalModal.show?.(t, i);
      if (a && a.internalModal) {
        await (i = a.internalModal).show?.call(i, t, r);
      }
    },
    async hide(t) {
      var e;
      const e = await internalApiPromise;
      var i;
      if (e && e.internalModal) {
      const o = await internalApiPromise;
        await e.internalModal?.hide?.(t);
      if (o && o.internalModal) {
        await o.internalModal?.hide?.call(e, t);
      }
    },
  };

modules/navigation.js
+2 -2
@@ -4,13 +4,13 @@
 */

const navigationModule = (t) => {
  const n = Ht(t);
  const n = generateId(t);
  t.internalApiPromise.then((e) => {
    const { navigation: i } = e || {};
    if (i?.version === 2)
      try {
        n();
        generateId(t);
        zt(t);
      } catch (err) {
        console.error('Failed to set up navigation: ' + err);
      }

modules/pos.js
+4 -7
@@ -30,35 +30,32 @@ const posModule = ({ api, protocol }) => {
  const o = {
    cart: {
      async fetch() {
        const abortController = new AbortController();
        protocol.send('Cart.fetch', {
          id: t,
        });
        protocol.subscribe(
          'Cart.update',
          ({ data }) => {
            var n;
            abortController.abort();
              properties:
                (n = o?.reduce((t, { name, value }) => {
                n?.reduce((t, { name, value }) => {
                  t[name] = value;
                  return t;
                }, {})) != null
                }, {}) ?? {},
                  ? n
              lineItems: o
                  : {},
                ? o.map((t, n) => ({
              lineItems: r
                ? r.map((t, n) => ({
                    ...t,
                    uuid: '' + n,
                  }))
                : [],
            };
          },
          {
            signal: abortController.signal,
modules/print.js
+2 -2
@@ -4,18 +4,18 @@
 */

const printModule = ({ protocol, internalApiPromise }) => {
    Tt(self, 'print', function () {
    interceptProperty(self, 'print', function () {
      ALL_PROTOCOLS(async () => {
      SHOPIFY_PROTOCOLS(async () => {
          });
        } else {
          protocol.send('Print.app', {
          });
        }
      });

modules/resource-picker.js
+1 -1
@@ -80,10 +80,10 @@ const resourcePickerModule = ({ api, protocol, internalApiPromise }) => {
            signal: p,
          },
        );
        subscribeAllErrors(
        x(
          protocol,
          (t) => {
            e(
              Error('ResourcePicker error', {
                cause: t,
modules/s-app-nav.js
+1 -1
@@ -3,7 +3,7 @@
 * Custom <s-app-nav> element for app navigation
 */

// Registry entry referenced as: hn
// Registry entry referenced as: fn


modules/s-app-window.js
+1 -1
@@ -3,9 +3,9 @@
 * Custom <s-app-window> element for app window management
 */

// Registry entry referenced as: zn
// Registry entry referenced as: Vn
  variantLock: 'app-window',
});


modules/save-bar.js
+1 -4
@@ -83,11 +83,8 @@ const saveBarModule = ({ api, saveBarManager, internalApiPromise }) => {
          this.o();
        }
        disconnectedCallback() {
          var t;
          this.hide();
          if (!((t = this.u) == null)) {
          this.l?.disconnect();
            t.disconnect();
          }
        }
        setAttribute(t, n) {
          super.setAttribute(t, n);
modules/scanner.js
+2 -2
@@ -22,7 +22,7 @@ const scannerModule = ({ api, protocol, internalApiPromise }) => {
              );
            }
            function s() {
              subscribeAllErrors(protocol, a, {
              x(protocol, a, {
                signal: r,
                id: i,
              });
@@ -50,14 +50,14 @@ const scannerModule = ({ api, protocol, internalApiPromise }) => {
            protocol.subscribe(
              'getState',
              ({ features }) => {
                  s();
                } else {
                  (function () {
                    const e = new AbortController();
                    abortController.signal.addEventListener('abort', () => e.abort());
                    subscribeAllErrors(
                    x(
                      protocol,
                      (t) => {
                        e.abort();
modules/share.js
+2 -2
@@ -4,18 +4,18 @@
 */

const shareModule = ({ protocol, internalApiPromise }) => {
  const e = navigator.share;
  Tt(navigator, 'share', async function (i) {
  interceptProperty(navigator, 'share', async function (i) {
    if (!i) return e.call(navigator, i);
    const { share: o } = (await internalApiPromise) || {};
    const { title: r, text: a, url: s } = i;
    if (!o)
      return new Promise((n, e) => {
        const abortController = new AbortController();
        const { signal: c } = abortController;
          abortController.abort();
          e(
            Error('Share error', {
@@ -23,7 +23,7 @@ const shareModule = ({ protocol, internalApiPromise }) => {
            }),
          );
        }
        subscribeAllErrors(protocol, l, {
        x(protocol, u, {
          signal: c,
          id: i,
        });
modules/shortcut.js
+1 -1
@@ -4,10 +4,10 @@
 */

const shortcutModule = ({ protocol, internalApiPromise }) => {
      N({
      subscribeAllErrors({
        ...e,
        handler: async () => {
          const { shortcut: i } = (await internalApiPromise) || {};

modules/sidekick.js
+7 -14
@@ -59,24 +59,21 @@ const sidekickModule = ({ api, internalApiPromise, rpcEventTarget }) => {
          i = t;
        },
      });
        ...t,
        onStreamEvent: (n) => {
          var e;
          if (n.event === 'message') {
            i.enqueue(n.data);
          }
          if (!((e = t.onStreamEvent) == null)) {
          t.onStreamEvent?.(n);
            e.call(t, n);
          }
        },
      });
        i.close();
      });
      return {
        content: o,
      };
    },
@@ -107,18 +104,16 @@ const sidekickModule = ({ api, internalApiPromise, rpcEventTarget }) => {
      let i = false;
      function o() {
        i = true;
        if (!(e == null)) {
        e?.();
          e();
        s(e);
        }
        u(e);
        e = undefined;
      }
      ALL_PROTOCOLS(async () => {
      SHOPIFY_PROTOCOLS(async () => {
          throw Error('Sidekick API is not available');
        if (i) {
          o();
        }
@@ -130,18 +125,16 @@ const sidekickModule = ({ api, internalApiPromise, rpcEventTarget }) => {
      let i = false;
      function o() {
        i = true;
        if (!(e == null)) {
        e?.();
          e();
        s(e);
        }
        u(e);
        e = undefined;
      }
      ALL_PROTOCOLS(async () => {
      SHOPIFY_PROTOCOLS(async () => {
          throw Error('Sidekick API is not available');
        if (i) {
          o();
        }
modules/title-bar.js Truncated
+21 -40
@@ -19,28 +19,22 @@ const titleBarModule = ({ protocol, internalApiPromise }) => {
    );
  });
  function o() {
    var t;
    if (e) return e.getAttribute('title') ?? document.title;
    if (e) return (t = e.getAttribute('title')) != null ? t : document.title;
  }
  function r(t) {
    var n;
    const n = document.querySelector('s-page');
    const i = document.querySelector('s-page');
    if (n) {
    if (i) {
      const e = `${On}, ${Mn}, ${Rn}`;
      const n = `${Mn}, ${Rn}, ${xn}`;
      const i = Array.from(n.querySelectorAll(e)).find((n) => n[vn] == t);
      const e = Array.from(i.querySelectorAll(n)).find((n) => n[gn] == t);
      if (i) return void i.click();
      if (e) return void e.click();
      const o = Array.from(document.querySelectorAll('s-menu, s-button-group'));
        const n = Array.from(i.querySelectorAll('s-button')).find((n) => n[gn] == t);
        const e = Array.from(n.querySelectorAll('s-button')).find((n) => n[vn] == t);
      }
    }
    const o = Array.from((n = e?.querySelectorAll('button, a')) != null ? n : []).find(
    const i = Array.from(e?.querySelectorAll('button, a') ?? []).find((n) => n[vn] == t);
      (n) => n[gn] == t,
    i?.click();
    );
    if (!(o == null)) {
      o.click();
    }
  }
  function a(t) {
    const { id: n, label: e, icon: i, tone: o, disabled: a, loading: s } = t;
@@ -58,102 +52,89 @@ const titleBarModule = ({ protocol, internalApiPromise }) => {
    };
  }
  async function s() {
    var r;
    let r;
    var s;
    var c;
    var l;
    var u;
    var d;
    var f;
    var h;
    let p;
    (function () {
      var t;
      const t = document.documentElement?.getElementsByTagName?.(Sn);
      const i = document.documentElement?.getElementsByTagName?.call(t, Tn);
      if (t && t.length) {
      if (i && i.length) {
        for (const n of t)
        for (const o of i)
          if (!Wn(n)) {
          if (!Vn(o)) {
            e = n;
            e = o;
            break;
          }
      } else e = undefined;
    })();
    if (e) {
      const {
      const { primaryButton: t, secondaryButtons: n, breadcrumb: i } = e.buttons?.() ?? {};
        primaryButton: t,
      r = {
        secondaryButtons: n,
        breadcrumb: i,
      } = (s = e.buttons?.call(e)) != null ? s : {};
      p = {
        title: o(),
      };
      if (t) {
        p.buttons = Object.assign((c = p.buttons) != null ? c : {}, {
        r.buttons = Object.assign(r.buttons ?? {}, {
          primary: t,
        });
      }
      if (n) {
        p.buttons = Object.assign((l = p.buttons) != null ? l : {}, {
        r.buttons = Object.assign(r.buttons ?? {}, {
          secondary: n,
        });
      }
      if (i) {
          id: 'breadcrumb',
          label: i,
        };
      }
    } else {
        hideElements: true,
        context: document,
      });
      if (t) {
          title: t.title || o(),
        };
        if (t.breadcrumb) {
        }
        if (t.primaryAction) {
          p.buttons = Object.assign((u = p.buttons) != null ? u : {}, {
          r.buttons = Object.assign(r.buttons ?? {}, {
            primary: n,
          });
        }
        if (t.secondaryActions) {
            hideElements: true,
            context: document,
          });
          p.buttons = Object.assign((d = p.buttons) != null ? d : {}, {
          r.buttons = Object.assign(r.buttons ?? {}, {
            secondary: n,
          });
        }
        if (t.accessory) {
        }
      } else
          title: undefined,
        };
    }
    else {
      const { titleBar: e } = (await internalApiPromise) || {};
      if (e?.set) {
        const t = {
        };
        }
        }
            'buttons' in t
              ? (function (t) {
                  const { label: n, icon: e, disabled: i, buttons: o } = t;

Diff truncated at 200 lines

modules/toast.js
+3 -5
@@ -6,12 +6,12 @@
const toastModule = ({ api, protocol, internalApiPromise }) => {
  api.toast = {
    show(t, i = {}) {
      ALL_PROTOCOLS(async () => {
      SHOPIFY_PROTOCOLS(async () => {
        const { toast: r } = (await internalApiPromise) || {};
        if (r?.show)
          await r.show(t, {
            ...i,
            id: o,
          });
@@ -32,9 +32,7 @@ const toastModule = ({ api, protocol, internalApiPromise }) => {
            'Toast.clear',
            () => {
              abortController.abort();
              if (!(l == null)) {
              u?.();
                l();
              }
            },
            {
              id: o,
@@ -57,7 +55,7 @@ const toastModule = ({ api, protocol, internalApiPromise }) => {
      return o;
    },
    hide(t) {
      ALL_PROTOCOLS(async () => {
      SHOPIFY_PROTOCOLS(async () => {
        const { toast: i } = (await internalApiPromise) || {};
        if (i?.hide) {
          await i.hide(t);

modules/tools.js
+8 -17
@@ -8,39 +8,30 @@ const toolsModule = async ({ api, internalApiPromise }) => {
  api.tools = {
    register(t, o) {
      const abortController = new AbortController();
      ALL_PROTOCOLS(async () => {
      SHOPIFY_PROTOCOLS(async () => {
        var i;
        const { tools: i } = (await internalApiPromise) || {};
        const { tools: a } = (await internalApiPromise) || {};
        if (abortController.signal.aborted) return;
        if (!((i = map.get(t)) == null)) {
        map.get(t)?.();
          i();
        const a = await i.register(t, o);
        }
        const s = await a.register(t, o);
        if (!abortController.signal.aborted) {
        }
      }).finally(() => {
        i.delete(abortController);
      });
      i.add(abortController);
      return () => {
        var n;
        map.get(t)?.();
        if (!((n = map.get(t)) == null)) {
          n();
        }
        map.delete(t);
      };
    },
    unregister(t) {
      var o;
      const abortController = new AbortController();
      i.add(abortController);
      if (!((o = map.get(t)) == null)) {
      map.get(t)?.();
        o();
      }
      map.delete(t);
      ALL_PROTOCOLS(async () => {
      SHOPIFY_PROTOCOLS(async () => {
        const { tools: e } = (await internalApiPromise) || {};
        if (!abortController.signal.aborted) {
          if (!e || typeof e.unregister != 'function') throw Error('Tools API is not available');
@@ -55,7 +46,7 @@ const toolsModule = async ({ api, internalApiPromise }) => {
      map.clear();
      i.forEach((t) => t.abort());
      i.clear();
      ALL_PROTOCOLS(async () => {
      SHOPIFY_PROTOCOLS(async () => {
        const { tools: t } = (await internalApiPromise) || {};
        if (!t || typeof t.clear != 'function') throw Error('Tools API is not available');
        await t.clear();

modules/ui-modal.js
+1 -1
@@ -3,7 +3,7 @@
 * Custom <ui-modal> element
 */

// Registry entry referenced as: Yn
// Registry entry referenced as: Jn


modules/ui-nav-menu.js
+1 -1
@@ -3,7 +3,7 @@
 * Custom <ui-nav-menu> element
 */

// Registry entry referenced as: Qn
// Registry entry referenced as: Yn