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AAOmN,OAErB,EAXA,SAAWnN,GACPA,EAAc,MAAI,kBAClBA,EAAwB,gBAAI,6BAC5BA,EAAoB,YAAI,yBACxBA,EAAsB,cAAI,0BAC7B,CALD,CAKGA,EAASP,EAAQO,SAAWP,EAAQO,OAAS,CAAC,IAOjDP,EAAQqO,MAAQA,EAChB,IAAIoY,EAAqB,SAAUjlB,GAE/B,SAASilB,EAAIhlB,GACT,OAAOD,EAAOxC,KAAKV,KAAMmD,EAAKf,EAAQmB,MAAM4kB,IAAK/lB,EAAQmB,MAAM4kB,MAAQnoB,IAC3E,CASA,OAZAD,EAAUooB,EAAKjlB,GAIfilB,EAAI3nB,UAAU6D,SAAW,SAAU5B,GAC/B,GAAQA,IACCR,EAAOmN,MACRpP,KAAKmD,IAAIkB,SAAS0L,KAG1B,OAAO/P,IACX,EACOmoB,CACX,CAdwB,CActBhmB,EAAYoC,WACd7C,EAAQymB,IAAMA,C,+BCtDdhoB,OAAOsB,eAAeC,EAAS,aAAc,CAAEC,OAAO,IACtDD,EAAQX,OAASW,EAAQ6G,aAAe7G,EAAQO,YAAS,EACzD,IAAIwG,EAAiB,EAAQ,OAC7BtI,OAAOsB,eAAeC,EAAS,eAAgB,CAAEqC,YAAY,EAAMH,IAAK,WAAc,OAAO6E,EAAeF,YAAc,IAC1H,IAAI6oC,EAAiB,EAAQ,OAC7BjxC,OAAOsB,eAAeC,EAAS,SAAU,CAAEqC,YAAY,EAAMH,IAAK,WAAc,OAAOwtC,EAAenvC,MAAQ,IAO9GP,EAAQX,OAHR,SAAgBoC,EAAKC,GACjB,OAAO,IAAIqF,EAAeF,aAAapF,EAAKC,EAChD,C","sources":["webpack://editorder/./node_modules/@shopify/app-bridge-core/actions/Button/index.js","webpack://editorder/./node_modules/@shopify/app-bridge-react/components/RoutePropagator/RoutePropagator.js","webpack://editorder/./node_modules/@shopify/app-bridge-react/components/Provider/index.js","webpack://editorder/./node_modules/@shopify/app-bridge-react/hooks/useAuthenticatedFetch/useAuthenticatedFetch.js","webpack://editorder/./node_modules/@shopify/app-bridge-react/hooks/useNavigationHistory/index.js","webpack://editorder/./node_modules/@shopify/app-bridge-react/components/RoutePropagator/globals.js","webpack://editorder/./node_modules/@shopify/app-bridge/actions/Navigation/History/index.js","webpack://editorder/./node_modules/@shopify/app-bridge/actions/Performance/index.js","webpack://editorder/./node_modules/@shopify/app-bridge-react/components/unstable_Picker/index.js","webpack://editorder/./node_modules/@shopify/app-bridge-react/hooks/useOnceEffect/index.js","webpack://editorder/./node_modules/@shopify/app-bridge/actions/Features/index.js","webpack://editorder/./node_modules/@shopify/app-bridge/client/types.js","webpack://editorder/./node_modules/@shopify/app-bridge/actions/Flash/actions.js","webpack://editorder/./node_modules/@shopify/app-bridge-react/components/Modal/index.js","webpack://editorder/./node_modules/@shopify/app-bridge-react/hooks/useNavigate/index.js","webpack://editorder/./node_modules/@shopify/app-bridge-core/actions/merge.js","webpack://editorder/./node_modules/@shopify/app-bridge-react/components/TitleBar/index.js","webpack://editorder/./node_modules/@shopify/app-bridge/client/Hooks.js","webpack://editorder/./node_modules/@shopify/app-bridge-core/actions/uuid.js","webpack://editorder/./node_modules/@shopify/app-bridge-react/utilities/transformers.js","webpack://editorder/./node_modules/@shopify/app-bridge-core/actions/Modal/index.js","webpack://editorder/./node_modules/@shopify/app-bridge-core/actions/MarketingExternalActivityTopBar/index.js","webpack://editorder/./node_modules/@shopify/app-bridge/utilities/authorization-code/index.js","webpack://editorder/./node_modules/@shopify/app-bridge-react/hooks/useContextualSaveBar/useContextualSaveBar.js","webpack://editorder/./node_modules/@shopify/app-bridge-core/actions/Client/index.js","webpack://editorder/./node_modules/@shopify/app-bridge-react/components/Provider/Provider.js","webpack://editorder/./node_modules/@shopify/app-bridge/actions/TitleBar/index.js","webpack://editorder/./node_modules/@shopify/app-bridge/utilities/platform.js","webpack://editorder/./node_modules/@shopify/app-bridge/actions/ButtonGroup/index.js","webpack://editorder/./node_modules/@shopify/app-bridge-react/hooks/useFeaturesAvailable/index.js","webpack://editorder/./node_modules/@shopify/app-bridge-core/actions/Fullscreen/index.js","webpack://editorder/./node_modules/@shopify/app-bridge/client/print.js","webpack://editorder/./node_modules/@shopify/app-bridge/actions/Menu/ChannelMenu/index.js","webpack://editorder/./node_modules/@shopify/app-bridge-core/actions/Menu/NavigationMenu/index.js","webpack://editorder/./node_modules/@shopify/app-bridge/actions/buttonHelper.js","webpack://editorder/./node_modules/@shopify/app-bridge/node_modules/web-vitals/dist/web-vitals.umd.cjs","webpack://editorder/./node_modules/@shopify/app-bridge-core/util/env.js","webpack://editorder/./node_modules/@shopify/app-bridge/actions/Toast/index.js","webpack://editorder/./node_modules/@shopify/app-bridge-react/hooks/useNavigationHistory/useNavigationHistory.js","webpack://editorder/./node_modules/@shopify/app-bridge/production.js","webpack://editorder/./node_modules/@shopify/app-bridge-core/actions/validator.js","webpack://editorder/./node_modules/@shopify/app-bridge/actions/Error/index.js","webpack://editorder/./node_modules/@shopify/app-bridge-react/components/Loading/index.js","webpack://editorder/./node_modules/@shopify/app-bridge/actions/WebVitals/actions.js","webpack://editorder/./node_modules/@shopify/app-bridge/actions/AuthCode/index.js","webpack://editorder/./node_modules/@shopify/app-bridge/utilities/authorization-code/user-authorized-fetch.js","webpack://editorder/./node_modules/@shopify/app-bridge/actions/ResourcePicker/index.js","webpack://editorder/./node_modules/@shopify/app-bridge/actions/ContextualSaveBar/index.js","webpack://editorder/./node_modules/@shopify/app-bridge/actions/LeaveConfirmation/index.js","webpack://editorder/./node_modules/@shopify/app-bridge/actions/Pos/index.js","webpack://editorder/./node_modules/@shopify/app-bridge-react/hooks/useFeaturesAvailable/useFeaturesAvailable.js","webpack://editorder/./node_modules/@shopify/app-bridge/actions/Link/AppLink/index.js","webpack://editorder/./node_modules/@shopify/app-bridge-core/actions/buttonHelper.js","webpack://editorder/./node_modules/@shopify/app-bridge-core/MessageTransport.js","webpack://editorder/./node_modules/@shopify/app-bridge-react/components/ClientRouter/hook.js","webpack://editorder/./node_modules/@shopify/app-bridge-react/context.js","webpack://editorder/./node_modules/@shopify/app-bridge-core/actions/Scanner/index.js","webpack://editorder/./node_modules/@shopify/app-bridge-react/components/ContextualSaveBar/index.js","webpack://editorder/./node_modules/@shopify/app-bridge/actions/WebVitals/index.js","webpack://editorder/./node_modules/@shopify/app-bridge-core/actions/Link/AppLink/index.js","webpack://editorder/./node_modules/@shopify/app-bridge-core/actions/ContextualSaveBar/index.js","webpack://editorder/./node_modules/@shopify/app-bridge/utilities/index.js","webpack://editorder/./node_modules/@shopify/app-bridge-react/components/NavigationMenu/index.js","webpack://editorder/./node_modules/@shopify/app-bridge-react/components/ResourcePicker/index.js","webpack://editorder/./node_modules/@shopify/app-bridge-core/actions/Features/actions.js","webpack://editorder/./node_modules/@shopify/app-bridge-core/actions/Modal/ModalContent/index.js","webpack://editorder/./node_modules/@shopify/app-bridge/actions/Cart/index.js","webpack://editorder/./node_modules/@shopify/app-bridge-react/hooks/useContextualSaveBar/index.js","webpack://editorder/./node_modules/@shopify/app-bridge-core/actions/ResourcePicker/index.js","webpack://editorder/./node_modules/@shopify/app-bridge-react/index.js","webpack://editorder/./node_modules/@shopify/app-bridge-core/actions/Navigation/Redirect/index.js","webpack://editorder/./node_modules/@shopify/app-bridge/actions/Picker/index.js","webpack://editorder/./node_modules/@shopify/app-bridge-react/components/Modal/ModalContent/index.js","webpack://editorder/./node_modules/@shopify/app-bridge-core/actions/helper.js","webpack://editorder/./node_modules/@shopify/app-bridge-react/components/ResourcePicker/ResourcePicker.js","webpack://editorder/./node_modules/@shopify/app-bridge-core/actions/types.js","webpack://editorder/./node_modules/@shopify/app-bridge-react/components/Loading/Loading.js","webpack://editorder/./node_modules/@shopify/app-bridge-react/components/ClientRouter/index.js","webpack://editorder/./node_modules/@shopify/app-bridge-react/components/Modal/Modal.js","webpack://editorder/./node_modules/@shopify/app-bridge-react/hooks/index.js","webpack://editorder/./node_modules/@shopify/app-bridge-core/actions/Features/index.js","webpack://editorder/./node_modules/@shopify/app-bridge/client/redirect.js","webpack://editorder/./node_modules/@shopify/app-bridge-core/actions/TitleBar/index.js","webpack://editorder/./node_modules/@shopify/app-bridge/actions/helper.js","webpack://editorder/./node_modules/@shopify/app-bridge-react/hooks/useAppBridgeState/useAppBridgeState.js","webpack://editorder/./node_modules/@shopify/app-bridge-react/hooks/useAppBridgeState/index.js","webpack://editorder/./node_modules/@shopify/app-bridge-core/actions/SessionToken/index.js","webpack://editorder/./node_modules/@shopify/app-bridge-core/util/collection.js","webpack://editorder/./node_modules/@shopify/app-bridge-core/actions/ButtonGroup/index.js","webpack://editorder/./node_modules/@shopify/app-bridge/client/Client.js","webpack://editorder/./node_modules/@shopify/app-bridge/utilities/modal.js","webpack://editorder/./node_modules/@shopify/app-bridge/actions/validator.js","webpack://editorder/./node_modules/@shopify/app-bridge-react/hooks/useToast/index.js","webpack://editorder/./node_modules/@shopify/app-bridge/actions/Fullscreen/index.js","webpack://editorder/./node_modules/@shopify/app-bridge-react/hooks/useFeatureRequest/useFeatureRequest.js","webpack://editorder/./node_modules/@shopify/app-bridge/util/collection.js","webpack://editorder/./node_modules/@shopify/app-bridge-core/actions/Menu/ChannelMenu/index.js","webpack://editorder/./node_modules/@shopify/app-bridge/actions/Share/index.js","webpack://editorder/./node_modules/@shopify/app-bridge-react/components/NavigationMenu/NavigationMenu.js","webpack://editorder/./node_modules/@shopify/app-bridge-react/hooks/useAuthenticatedFetch/index.js","webpack://editorder/./node_modules/@shopify/app-bridge/actions/Scanner/index.js","webpack://editorder/./node_modules/@shopify/app-bridge-core/actions/Navigation/History/index.js","webpack://editorder/./node_modules/@shopify/app-bridge-react/components/Toast/Toast.js","webpack://editorder/./node_modules/@shopify/app-bridge-react/components/Toast/index.js","webpack://editorder/./node_modules/@shopify/app-bridge/actions/index.js","webpack://editorder/./node_modules/@shopify/app-bridge/utilities/session-token/session-token.js","webpack://editorder/./node_modules/@shopify/app-bridge-react/useAppBridge.js","webpack://editorder/./node_modules/@shopify/app-bridge-react/components/unstable_Picker/unstable_Picker.js","webpack://editorder/./node_modules/@shopify/app-bridge-react/components/RoutePropagator/index.js","webpack://editorder/./node_modules/@shopify/app-bridge/utilities/authorization-code/authorization-code.js","webpack://editorder/./node_modules/@shopify/app-bridge-react/hooks/useLocale/index.js","webpack://editorder/./node_modules/@shopify/app-bridge-core/actions/Loading/index.js","webpack://editorder/./node_modules/@shopify/app-bridge-react/components/RoutePropagator/route-propagator.js","webpack://editorder/./node_modules/@shopify/app-bridge-react/components/ClientRouter/ClientRouter.js","webpack://editorder/./node_modules/tslib/tslib.es6.js","webpack://editorder/./node_modules/lower-case/dist.es2015/index.js","webpack://editorder/./node_modules/no-case/dist.es2015/index.js","webpack://editorder/./node_modules/pascal-case/dist.es2015/index.js","webpack://editorder/./node_modules/camel-case/dist.es2015/index.js","webpack://editorder/./node_modules/capital-case/dist.es2015/index.js","webpack://editorder/./node_modules/upper-case-first/dist.es2015/index.js","webpack://editorder/./node_modules/axios-case-converter/es/decorators.js","webpack://editorder/./node_modules/axios-case-converter/es/util.js","webpack://editorder/./node_modules/axios-case-converter/es/transformers.js","webpack://editorder/./node_modules/snake-case/dist.es2015/index.js","webpack://editorder/./node_modules/dot-case/dist.es2015/index.js","webpack://editorder/./node_modules/header-case/dist.es2015/index.js","webpack://editorder/./node_modules/axios-case-converter/es/middleware.js","webpack://editorder/./node_modules/axios-case-converter/es/index.js","webpack://editorder/./node_modules/@shopify/app-bridge/actions/Client/index.js","webpack://editorder/./node_modules/@shopify/app-bridge/actions/Navigation/Redirect/index.js","webpack://editorder/./node_modules/@shopify/app-bridge/client/index.js","webpack://editorder/./node_modules/@shopify/app-bridge/index.js","webpack://editorder/./node_modules/@shopify/app-bridge-react/components/TitleBar/TitleBar.js","webpack://editorder/./node_modules/@shopify/app-bridge-react/hooks/useOnceEffect/useOnceEffect.js","webpack://editorder/./node_modules/@shopify/app-bridge/MessageTransport.js","webpack://editorder/./node_modules/@shopify/app-bridge-core/actions/ActionSet.js","webpack://editorder/./node_modules/@shopify/app-bridge/actions/Menu/NavigationMenu/index.js","webpack://editorder/./node_modules/@shopify/app-bridge/actions/MarketingExternalActivityTopBar/index.js","webpack://editorder/./node_modules/@shopify/app-bridge-react/hooks/useFeatureRequest/index.js","webpack://editorder/./node_modules/@shopify/app-bridge/utilities/session-token/index.js","webpack://editorder/./node_modules/@shopify/app-bridge-core/actions/Picker/index.js","webpack://editorder/./node_modules/@shopify/app-bridge/actions/Button/index.js","webpack://editorder/./node_modules/@shopify/app-bridge-react/components/Modal/ModalContent/ModalContent.js","webpack://editorder/./node_modules/@shopify/app-bridge-react/components/ContextualSaveBar/ContextualSaveBar.js","webpack://editorder/./node_modules/@shopify/app-bridge-core/actions/Print/index.js","webpack://editorder/./node_modules/@shopify/app-bridge/actions/Loading/index.js","webpack://editorder/./node_modules/@shopify/app-bridge-core/actions/Share/index.js","webpack://editorder/./node_modules/@shopify/app-bridge/actions/uuid.js","webpack://editorder/./node_modules/@shopify/app-bridge/actions/Modal/index.js","webpack://editorder/./node_modules/react-router-scroll-memory/dist/ScrollMemory.min.js","webpack://editorder/./node_modules/@shopify/app-bridge-react/hooks/useLocale/useLocale.js","webpack://editorder/./node_modules/@shopify/app-bridge-core/actions/WebVitals/index.js","webpack://editorder/./node_modules/@shopify/app-bridge/actions/FeedbackModal/index.js","webpack://editorder/./node_modules/@shopify/app-bridge-react/hooks/useToast/useToast.js","webpack://editorder/./node_modules/@shopify/app-bridge-react/components/index.js","webpack://editorder/./node_modules/@shopify/app-bridge/actions/Features/actions.js","webpack://editorder/./node_modules/@shopify/app-bridge-core/actions/Error/index.js","webpack://editorder/./node_modules/@shopify/app-bridge-react/components/RoutePropagator/hook.js","webpack://editorder/./node_modules/@shopify/app-bridge/actions/ActionSet.js","webpack://editorder/./node_modules/@shopify/app-bridge-core/actions/LeaveConfirmation/index.js","webpack://editorder/./node_modules/@shopify/app-bridge-core/actions/FeedbackModal/index.js","webpack://editorder/./node_modules/@shopify/app-bridge/util/env.js","webpack://editorder/./node_modules/@shopify/app-bridge/actions/Features/types.js","webpack://editorder/./node_modules/@shopify/app-bridge-core/actions/buttonGroupHelper.js","webpack://editorder/./node_modules/@shopify/app-bridge/utilities/session-token/authenticated-fetch.js","webpack://editorder/./node_modules/@shopify/app-bridge-core/actions/constants.js","webpack://editorder/./node_modules/@shopify/app-bridge/util/shared.js","webpack://editorder/./node_modules/@shopify/app-bridge-react/hooks/useNavigate/useNavigate.js","webpack://editorder/./node_modules/@shopify/app-bridge/actions/types.js","webpack://editorder/./node_modules/@shopify/app-bridge-core/client/types.js","webpack://editorder/./node_modules/@shopify/app-bridge-core/actions/AuthCode/index.js","webpack://editorder/./node_modules/@shopify/app-bridge-core/actions/Features/types.js","webpack://editorder/./node_modules/@shopify/app-bridge/actions/Print/index.js","webpack://editorder/./node_modules/@shopify/app-bridge-core/actions/Toast/index.js","webpack://editorder/./node_modules/@shopify/app-bridge/actions/SessionToken/index.js","webpack://editorder/./node_modules/@shopify/app-bridge-core/actions/Performance/index.js","webpack://editorder/./node_modules/@shopify/app-bridge-core/actions/Cart/index.js","webpack://editorder/./node_modules/@shopify/app-bridge-react/components/ClientRouter/router.js","webpack://editorder/./node_modules/@shopify/app-bridge/actions/Flash/index.js","webpack://editorder/./node_modules/@shopify/app-bridge-core/actions/Pos/index.js","webpack://editorder/./node_modules/@shopify/app-bridge/actions/Modal/ModalContent/index.js"],"sourcesContent":["\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Button = exports.update = exports.clickButton = exports.Style = exports.Icon = exports.Action = void 0;\nvar helper_1 = require(\"../helper\");\nvar ActionSet_1 = require(\"../ActionSet\");\nvar types_1 = require(\"../types\");\nvar Action;\n(function (Action) {\n Action[\"CLICK\"] = \"CLICK\";\n Action[\"UPDATE\"] = \"UPDATE\";\n})(Action = exports.Action || (exports.Action = {}));\nvar Icon;\n(function (Icon) {\n Icon[\"Print\"] = \"print\";\n})(Icon = exports.Icon || (exports.Icon = {}));\nvar Style;\n(function (Style) {\n Style[\"Danger\"] = \"danger\";\n})(Style = exports.Style || (exports.Style = {}));\nfunction clickButton(group, component, payload) {\n var id = component.id;\n var action = helper_1.getEventNameSpace(group, Action.CLICK, component);\n var buttonPayload = {\n id: id,\n payload: payload,\n };\n return helper_1.actionWrapper({ type: action, group: group, payload: buttonPayload });\n}\nexports.clickButton = clickButton;\nfunction update(group, component, props) {\n var id = component.id;\n var label = props.label;\n var action = helper_1.getEventNameSpace(group, Action.UPDATE, component);\n var buttonPayload = __assign(__assign({}, props), { id: id, label: label });\n return helper_1.actionWrapper({ type: action, group: group, payload: buttonPayload });\n}\nexports.update = update;\nvar Button = /** @class */ (function (_super) {\n __extends(Button, _super);\n function Button(app, options) {\n var _this = _super.call(this, app, types_1.ComponentType.Button, types_1.Group.Button) || this;\n _this.disabled = false;\n _this.loading = false;\n _this.plain = false;\n _this.set(options, false);\n return _this;\n }\n Object.defineProperty(Button.prototype, \"options\", {\n get: function () {\n return {\n disabled: this.disabled,\n icon: this.icon,\n label: this.label,\n style: this.style,\n loading: this.loading,\n plain: this.plain,\n };\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Button.prototype, \"payload\", {\n get: function () {\n return __assign(__assign({}, this.options), { id: this.id });\n },\n enumerable: false,\n configurable: true\n });\n Button.prototype.set = function (options, shouldUpdate) {\n if (shouldUpdate === void 0) { shouldUpdate = true; }\n var mergedOptions = helper_1.getMergedProps(this.options, options);\n var label = mergedOptions.label, disabled = mergedOptions.disabled, icon = mergedOptions.icon, style = mergedOptions.style, loading = mergedOptions.loading, plain = mergedOptions.plain;\n this.label = label;\n this.disabled = Boolean(disabled);\n this.icon = icon;\n this.style = style;\n this.loading = Boolean(loading);\n this.plain = Boolean(plain);\n if (shouldUpdate) {\n this.dispatch(Action.UPDATE);\n }\n return this;\n };\n Button.prototype.dispatch = function (action, payload) {\n switch (action) {\n case Action.CLICK:\n this.app.dispatch(clickButton(this.group, this.component, payload));\n break;\n case Action.UPDATE: {\n var updateAction = update(this.group, this.component, this.payload);\n this.app.dispatch(updateAction);\n break;\n }\n }\n return this;\n };\n return Button;\n}(ActionSet_1.ActionSet));\nexports.Button = Button;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar react_1 = __importDefault(require(\"react\"));\nvar context_1 = require(\"../../context\");\nvar route_propagator_1 = require(\"./route-propagator\");\n/**\n * RoutePropagator component\n *\n * @remarks\n * React component which keeps the Shopify admin url in sync with the app url\n *\n * @public\n */\nvar RoutePropagator = /** @class */ (function (_super) {\n __extends(RoutePropagator, _super);\n function RoutePropagator() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n RoutePropagator.prototype.componentDidMount = function () {\n var location = this.props.location;\n route_propagator_1.updateHistory(this.context, location);\n };\n RoutePropagator.prototype.componentDidUpdate = function (_a) {\n var prevLocation = _a.location;\n var location = this.props.location;\n if (location !== prevLocation) {\n route_propagator_1.updateHistory(this.context, location);\n }\n };\n RoutePropagator.prototype.render = function () {\n return null;\n };\n RoutePropagator.contextType = context_1.AppBridgeContext;\n return RoutePropagator;\n}(react_1.default.Component));\nexports.default = RoutePropagator;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Provider_1 = __importDefault(require(\"./Provider\"));\nexports.default = Provider_1.default;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.useAuthenticatedFetch = void 0;\nvar react_1 = require(\"react\");\nvar utilities_1 = require(\"@shopify/app-bridge/utilities\");\nvar useAppBridge_1 = require(\"../../useAppBridge\");\n/**\n * useAuthenticatedFetch hook\n *\n * @public\n * @remarks\n * React hook that wraps the Shopify App Bridge authenticatedFetch method.\n *\n * @param options - Options for the hook\n */\nfunction useAuthenticatedFetch(options) {\n if (options === void 0) { options = undefined; }\n var app = useAppBridge_1.useAppBridge();\n var fetchFunction = react_1.useMemo(function () { return utilities_1.authenticatedFetch(app, options); }, [app, options]);\n return fetchFunction;\n}\nexports.useAuthenticatedFetch = useAuthenticatedFetch;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.useNavigationHistory = void 0;\nvar useNavigationHistory_1 = require(\"./useNavigationHistory\");\nObject.defineProperty(exports, \"useNavigationHistory\", { enumerable: true, get: function () { return useNavigationHistory_1.useNavigationHistory; } });\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getOrigin = exports.getTopWindow = exports.getSelfWindow = void 0;\nfunction getSelfWindow() {\n return window.self;\n}\nexports.getSelfWindow = getSelfWindow;\nfunction getTopWindow() {\n return window.top;\n}\nexports.getTopWindow = getTopWindow;\nfunction getOrigin() {\n return location.origin;\n}\nexports.getOrigin = getOrigin;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.create = exports.replace = exports.push = exports.Action = exports.History = void 0;\nvar History_1 = require(\"@shopify/app-bridge-core/actions/Navigation/History\");\nObject.defineProperty(exports, \"History\", { enumerable: true, get: function () { return History_1.History; } });\nvar History_2 = require(\"@shopify/app-bridge-core/actions/Navigation/History\");\nObject.defineProperty(exports, \"Action\", { enumerable: true, get: function () { return History_2.Action; } });\nObject.defineProperty(exports, \"push\", { enumerable: true, get: function () { return History_2.push; } });\nObject.defineProperty(exports, \"replace\", { enumerable: true, get: function () { return History_2.replace; } });\nfunction create(app) {\n return new History_1.History(app);\n}\nexports.create = create;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fullPageLoad = exports.skeletonPageLoad = exports.Action = void 0;\nvar Performance_1 = require(\"@shopify/app-bridge-core/actions/Performance\");\nObject.defineProperty(exports, \"Action\", { enumerable: true, get: function () { return Performance_1.Action; } });\nObject.defineProperty(exports, \"skeletonPageLoad\", { enumerable: true, get: function () { return Performance_1.skeletonPageLoad; } });\nObject.defineProperty(exports, \"fullPageLoad\", { enumerable: true, get: function () { return Performance_1.fullPageLoad; } });\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar unstable_Picker_1 = __importDefault(require(\"./unstable_Picker\"));\nexports.default = unstable_Picker_1.default;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./useOnceEffect\"), exports);\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./actions\"), exports);\n__exportStar(require(\"./types\"), exports);\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isV1Config = exports.MessageType = exports.LifecycleHook = exports.PermissionType = void 0;\nvar types_1 = require(\"@shopify/app-bridge-core/client/types\");\nObject.defineProperty(exports, \"MessageType\", { enumerable: true, get: function () { return types_1.MessageType; } });\nvar types_2 = require(\"@shopify/app-bridge-core/client/types\");\nObject.defineProperty(exports, \"PermissionType\", { enumerable: true, get: function () { return types_2.PermissionType; } });\nObject.defineProperty(exports, \"LifecycleHook\", { enumerable: true, get: function () { return types_2.LifecycleHook; } });\n/**\n * @internal\n * @param config\n */\nfunction isV1Config(config) {\n return !config.host;\n}\nexports.isV1Config = isV1Config;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.create = exports.Flash = exports.show = exports.clear = void 0;\nvar Toast_1 = require(\"@shopify/app-bridge-core/actions/Toast\");\nObject.defineProperty(exports, \"clear\", { enumerable: true, get: function () { return Toast_1.clear; } });\nObject.defineProperty(exports, \"show\", { enumerable: true, get: function () { return Toast_1.show; } });\nvar Flash = /** @class */ (function (_super) {\n __extends(Flash, _super);\n function Flash() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return Flash;\n}(Toast_1.Toast));\nexports.Flash = Flash;\nfunction create(app, options) {\n return new Flash(app, options);\n}\nexports.create = create;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ModalContent = void 0;\nvar Modal_1 = __importDefault(require(\"./Modal\"));\nvar ModalContent_1 = require(\"./ModalContent\");\nObject.defineProperty(exports, \"ModalContent\", { enumerable: true, get: function () { return __importDefault(ModalContent_1).default; } });\nexports.default = Modal_1.default;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.useNavigate = void 0;\nvar useNavigate_1 = require(\"./useNavigate\");\nObject.defineProperty(exports, \"useNavigate\", { enumerable: true, get: function () { return useNavigate_1.useNavigate; } });\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * Returns a deeply merged object with properties from the 2 provided objects\n * @remarks - Only deeply merge objects. The second argument overrides the\n * first if it is provided as `null`, `undefined` or an array.\n * @public\n * */\nfunction mergeProps(obj, newObj) {\n if (newObj == null) {\n return newObj;\n }\n // If setting to a different prototype or a non-object or non-array, don't merge any props\n if (typeof obj === 'undefined' ||\n !Object.prototype.isPrototypeOf.call(Object.getPrototypeOf(obj), newObj) ||\n (newObj.constructor.name !== 'Object' && newObj.constructor.name !== 'Array')) {\n return newObj;\n }\n var clone = {};\n Object.keys(newObj).forEach(function (key) {\n var exists = Object.prototype.hasOwnProperty.call(obj, key);\n if (!exists) {\n clone[key] = newObj[key];\n }\n else if (typeof obj[key] === 'object' && !Array.isArray(obj[key])) {\n clone[key] = mergeProps(obj[key], newObj[key]);\n }\n else {\n clone[key] = newObj[key];\n }\n });\n // Copy old props that are not present in new object only if this is a simple object\n Object.keys(obj).forEach(function (key) {\n var exists = Object.prototype.hasOwnProperty.call(newObj, key);\n if (!exists) {\n clone[key] = obj[key];\n }\n });\n // Set prototype of cloned object to match original\n Object.setPrototypeOf(clone, Object.getPrototypeOf(obj));\n return clone;\n}\nexports.default = mergeProps;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TitleBar_1 = __importDefault(require(\"./TitleBar\"));\nexports.default = TitleBar_1.default;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar collection_1 = require(\"../util/collection\");\n/**\n * Shopify App Bridge can be extended with hooks, which run when actions are dispatched and updated.\n * Hooks are middleware functions that can modify or cancel actions.\n *\n * The [validation middleware](../validate/README.md) is implemented using hooks.\n *\n * @remarks\n * Here’s an example hook that modifies all Toast show actions to have a duration of five seconds.\n *\n * ```ts\n * import createApp, {LifecycleHook, DispatchActionHook} from '@shopify/app-bridge';\n * import {Toast} from '@shopify/app-bridge/actions'\n *\n * const app = createApp({apiKey: API_KEY, host: HOST});\n *\n * function makeToastsFiveSeconds: DispatchActionHook(next) {\n * return function(action){\n * if(action.type === Toast.Action.SHOW) {\n * const modifiedAction = {\n * ...action,\n * payload: {\n * ...action.payload,\n * duration: 5000,\n * },\n * };\n * return next(modifiedAction);\n * } else {\n * // don’t modify non-Toast actions\n * return next(action);\n * }\n * }\n * }\n *\n * app.hooks.set(LifecycleHook.DispatchAction, makeToastsFiveSeconds);\n * ```\n *\n * The hook function `makeToastsFiveSeconds()` takes a `next()` function as its argument.\n * The hook function returns an anonymous function, which takes the action being dispatched as its argument.\n *\n * To modify an action, call `next()` with the modified action, as in the example.\n * To cancel an action, don’t call `next()`, and the action will not be dispatched.\n */\nvar Hooks = /** @class */ (function () {\n function Hooks() {\n this.map = {};\n }\n Hooks.prototype.set = function (hook, handler) {\n if (!Object.prototype.hasOwnProperty.call(this.map, hook)) {\n this.map[hook] = [];\n }\n var value = { handler: handler, remove: function () { } };\n var remove = collection_1.addAndRemoveFromCollection(this.map[hook], value);\n value = { handler: handler, remove: remove };\n return remove;\n };\n Hooks.prototype.get = function (hook) {\n var value = this.map[hook];\n return value ? value.map(function (val) { return val.handler; }) : undefined;\n };\n // eslint-disable-next-line @typescript-eslint/ban-types\n Hooks.prototype.run = function (hook, final, context) {\n var initialArgs = [];\n for (var _i = 3; _i < arguments.length; _i++) {\n initialArgs[_i - 3] = arguments[_i];\n }\n var index = 0;\n var handlers = this.get(hook) || [];\n function handler() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var childHandler = handlers[index++];\n if (childHandler) {\n return childHandler(handler).apply(context, args);\n }\n return final.apply(context, args);\n }\n return handler.apply(context, initialArgs);\n };\n return Hooks;\n}());\nexports.default = Hooks;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.generateUuid = void 0;\n/**\n * Convert a number or array of integers to a string of padded hex octets.\n */\nfunction asHex(value) {\n return Array.from(value)\n .map(function (i) { return (\"00\" + i.toString(16)).slice(-2); })\n .join('');\n}\n/**\n * Attempt to securely generate random bytes/\n */\nfunction getRandomBytes(size) {\n // SPRNG\n if (typeof Uint8Array === 'function' && typeof window === 'object' && window.crypto) {\n var buffer = new Uint8Array(size);\n var randomValues = window.crypto.getRandomValues(buffer);\n if (randomValues) {\n return randomValues;\n }\n }\n // Insecure random\n return Array.from(new Array(size), function () { return (Math.random() * 255) | 0; });\n}\n/**\n * Generate a RFC4122-compliant v4 UUID.\n *\n * @see http://www.ietf.org/rfc/rfc4122.txt\n */\nfunction generateUuid() {\n var version = 64;\n var clockSeqHiAndReserved = getRandomBytes(1);\n var timeHiAndVersion = getRandomBytes(2);\n clockSeqHiAndReserved[0] &= 63 | 128;\n // tslint:disable-next-line:binary-expression-operand-order\n timeHiAndVersion[0] &= 15 | version;\n return [\n // time-low\n asHex(getRandomBytes(4)),\n '-',\n // time-mid\n asHex(getRandomBytes(2)),\n '-',\n // time-high-and-version\n asHex(timeHiAndVersion),\n '-',\n // clock-seq-and-reserved\n asHex(clockSeqHiAndReserved),\n // clock-seq-loq\n asHex(getRandomBytes(1)),\n '-',\n // node\n asHex(getRandomBytes(6)),\n ].join('');\n}\nexports.generateUuid = generateUuid;\nexports.default = generateUuid;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from) {\n for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)\n to[j] = from[i];\n return to;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.transformActions = exports.generateRedirect = void 0;\nvar Button = __importStar(require(\"@shopify/app-bridge/actions/Button\"));\nvar ButtonGroup = __importStar(require(\"@shopify/app-bridge/actions/ButtonGroup\"));\nvar Redirect = __importStar(require(\"@shopify/app-bridge/actions/Navigation/Redirect\"));\nfunction generateRedirect(appBridge, url, target, external) {\n if (target === void 0) { target = 'APP'; }\n if (url == null) {\n return undefined;\n }\n var redirect = Redirect.create(appBridge);\n var payload = external === true\n ? {\n url: url,\n newContext: true,\n }\n : url;\n return function () {\n redirect.dispatch(redirectAction(target, external), payload);\n };\n}\nexports.generateRedirect = generateRedirect;\nfunction redirectAction(target, external) {\n if (external === true) {\n return Redirect.Action.REMOTE;\n }\n return Redirect.Action[target];\n}\nfunction transformActions(appBridge, _a) {\n var primaryAction = _a.primaryAction, secondaryActions = _a.secondaryActions, actionGroups = _a.actionGroups;\n var primary = transformPrimaryAction(appBridge, primaryAction);\n var secondary = __spreadArray(__spreadArray([], transformSecondaryActions(appBridge, secondaryActions)), transformActionGroups(appBridge, actionGroups));\n return {\n primary: primary,\n secondary: secondary,\n };\n}\nexports.transformActions = transformActions;\nfunction transformAction(appBridge, action) {\n var style = action.destructive === true ? Button.Style.Danger : undefined;\n var button = Button.create(appBridge, {\n label: action.content || '',\n disabled: action.disabled,\n loading: action.loading,\n plain: action.plain,\n style: style,\n });\n if (action.onAction) {\n button.subscribe(Button.Action.CLICK, action.onAction);\n }\n var redirect = generateRedirect(appBridge, action.url, action.target, action.external);\n if (redirect != null) {\n button.subscribe(Button.Action.CLICK, redirect);\n }\n return button;\n}\nfunction transformPrimaryAction(appBridge, primaryAction) {\n if (primaryAction == null) {\n return undefined;\n }\n var primary = transformAction(appBridge, primaryAction);\n return primary;\n}\nfunction transformSecondaryActions(appBridge, secondaryActions) {\n if (secondaryActions === void 0) { secondaryActions = []; }\n var secondary = __spreadArray([], secondaryActions.map(function (secondaryAction) {\n return transformAction(appBridge, secondaryAction);\n }));\n return secondary;\n}\nfunction transformActionGroups(appBridge, actionGroups) {\n if (actionGroups === void 0) { actionGroups = []; }\n var buttonGroups = __spreadArray([], actionGroups.map(function (group) {\n var buttons = group.actions.map(function (groupAction) {\n return transformAction(appBridge, groupAction);\n });\n return ButtonGroup.create(appBridge, { label: group.title, plain: group.plain, buttons: buttons });\n }));\n return buttonGroups;\n}\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ModalIframe = exports.ModalMessage = exports.Modal = exports.isMessageModal = exports.isIframeModal = exports.data = exports.update = exports.clickFooterButton = exports.updateModalSize = exports.closeModal = exports.openModal = exports.Size = exports.Action = void 0;\nvar buttonHelper_1 = require(\"../buttonHelper\");\nvar helper_1 = require(\"../helper\");\nvar ActionSet_1 = require(\"../ActionSet\");\nvar types_1 = require(\"../types\");\nvar Button_1 = require(\"../Button\");\nvar Action;\n(function (Action) {\n Action[\"OPEN\"] = \"APP::MODAL::OPEN\";\n Action[\"CLOSE\"] = \"APP::MODAL::CLOSE\";\n Action[\"UPDATE\"] = \"APP::MODAL::UPDATE\";\n Action[\"UPDATE_CONTENT\"] = \"APP::MODAL::CONTENT::UPDATE\";\n Action[\"FOOTER_BUTTON_CLICK\"] = \"APP::MODAL::FOOTER::BUTTON::CLICK\";\n Action[\"FOOTER_BUTTON_UPDATE\"] = \"APP::MODAL::FOOTER::BUTTON::UPDATE\";\n Action[\"UPDATE_SIZE\"] = \"APP::MODAL::UPDATE_SIZE\";\n Action[\"DATA\"] = \"APP::MODAL::DATA\";\n})(Action = exports.Action || (exports.Action = {}));\n/**\n * Options available to the Modal `size` param\n * @public\n */\nvar Size;\n(function (Size) {\n /** Small modal size */\n Size[\"Small\"] = \"small\";\n /** Medium modal size */\n Size[\"Medium\"] = \"medium\";\n /** Large modal size (wider than medium) */\n Size[\"Large\"] = \"large\";\n /** @deprecated as of 1.6.5 */\n Size[\"Full\"] = \"full\";\n /**\n * @deprecated as of 1.12.x\n * @remarks\n * This option has been removed in favour of the `setUpModalAutoSizing` utility.\n */\n Size[\"Auto\"] = \"auto\";\n})(Size = exports.Size || (exports.Size = {}));\nvar FOOTER_BUTTON_PROPS = {\n group: types_1.Group.Modal,\n subgroups: ['Footer'],\n type: types_1.ComponentType.Button,\n};\nfunction openModal(modalPayload) {\n return helper_1.actionWrapper({\n group: types_1.Group.Modal,\n payload: modalPayload,\n type: Action.OPEN,\n });\n}\nexports.openModal = openModal;\nfunction closeModal(modalClosePayload) {\n return helper_1.actionWrapper({\n group: types_1.Group.Modal,\n payload: modalClosePayload,\n type: Action.CLOSE,\n });\n}\nexports.closeModal = closeModal;\n/**\n * Action creator for modal update size action\n * @internal\n */\nfunction updateModalSize(updateSizePayload) {\n return helper_1.actionWrapper({\n group: types_1.Group.Modal,\n payload: updateSizePayload,\n type: Action.UPDATE_SIZE,\n });\n}\nexports.updateModalSize = updateModalSize;\nfunction clickFooterButton(id, payload) {\n var component = __assign({ id: id }, FOOTER_BUTTON_PROPS);\n return Button_1.clickButton(types_1.Group.Modal, component, payload);\n}\nexports.clickFooterButton = clickFooterButton;\nfunction update(payload) {\n return helper_1.actionWrapper({\n payload: payload,\n group: types_1.Group.Modal,\n type: Action.UPDATE,\n });\n}\nexports.update = update;\nfunction data(payload) {\n return helper_1.actionWrapper({\n payload: payload,\n group: types_1.Group.Modal,\n type: Action.DATA,\n });\n}\nexports.data = data;\nfunction isIframeModal(options) {\n return (typeof options.url === 'string' ||\n typeof options.path === 'string');\n}\nexports.isIframeModal = isIframeModal;\nfunction isMessageModal(options) {\n return typeof options.message === 'string';\n}\nexports.isMessageModal = isMessageModal;\nvar Modal = /** @class */ (function (_super) {\n __extends(Modal, _super);\n function Modal() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.size = Size.Small;\n return _this;\n }\n Object.defineProperty(Modal.prototype, \"footer\", {\n get: function () {\n if (!this.footerPrimary && !this.footerSecondary) {\n return undefined;\n }\n return {\n buttons: {\n primary: this.footerPrimary,\n secondary: this.footerSecondary,\n },\n };\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Modal.prototype, \"footerOptions\", {\n get: function () {\n if (!this.footerPrimaryOptions && !this.footerSecondaryOptions) {\n return undefined;\n }\n return {\n buttons: {\n primary: this.footerPrimaryOptions,\n secondary: this.footerSecondaryOptions,\n },\n };\n },\n enumerable: false,\n configurable: true\n });\n Modal.prototype.close = function () {\n this.app.dispatch(closeModal({ id: this.id }));\n };\n Modal.prototype.setFooterPrimaryButton = function (newOptions, updateCb) {\n var _this = this;\n var subgroups = FOOTER_BUTTON_PROPS.subgroups;\n this.footerPrimaryOptions = this.getChildButton(newOptions, this.footerPrimaryOptions);\n this.footerPrimary = this.footerPrimaryOptions\n ? buttonHelper_1.getSingleButton(this, this.footerPrimaryOptions, subgroups, function (newPayload) {\n _this.updatePrimaryFooterButton(newPayload, updateCb);\n })\n : undefined;\n };\n Modal.prototype.setFooterSecondaryButtons = function (newOptions, updateCb) {\n var _this = this;\n var subgroups = FOOTER_BUTTON_PROPS.subgroups;\n var newButtons = newOptions || [];\n var currentOptions = (this.footerOptions && this.footerOptions.buttons.secondary) || [];\n this.footerSecondaryOptions = this.getUpdatedChildActions(newButtons, currentOptions);\n this.footerSecondary = this.footerSecondaryOptions\n ? this.footerSecondaryOptions.map(function (action) {\n return buttonHelper_1.getSingleButton(_this, action, subgroups, function (newPayload) {\n _this.updateSecondaryFooterButton(newPayload, updateCb);\n });\n })\n : undefined;\n };\n Modal.prototype.getChildButton = function (newAction, currentAction) {\n var newButtons = newAction ? [newAction] : [];\n var currentButtons = currentAction ? [currentAction] : [];\n var updatedButton = this.getUpdatedChildActions(newButtons, currentButtons);\n return updatedButton ? updatedButton[0] : undefined;\n };\n Modal.prototype.updatePrimaryFooterButton = function (newPayload, updateCb) {\n if (!this.footer || !this.footer.buttons.primary) {\n return;\n }\n if (helper_1.updateActionFromPayload(this.footer.buttons.primary, newPayload)) {\n updateCb();\n }\n };\n Modal.prototype.updateSecondaryFooterButton = function (newPayload, updateCb) {\n if (!this.footer || !this.footer.buttons || !this.footer.buttons.secondary) {\n return;\n }\n var updated;\n for (var _i = 0, _a = this.footer.buttons.secondary; _i < _a.length; _i++) {\n var action = _a[_i];\n updated = helper_1.updateActionFromPayload(action, newPayload);\n if (updated) {\n break;\n }\n }\n if (updated) {\n updateCb();\n }\n };\n return Modal;\n}(ActionSet_1.ActionSetWithChildren));\nexports.Modal = Modal;\nvar ModalMessage = /** @class */ (function (_super) {\n __extends(ModalMessage, _super);\n function ModalMessage(app, options) {\n var _this = _super.call(this, app, types_1.Group.Modal, types_1.Group.Modal) || this;\n _this.set(options, false);\n return _this;\n }\n Object.defineProperty(ModalMessage.prototype, \"payload\", {\n get: function () {\n return __assign(__assign({}, this.options), { footer: this.footer, id: this.id });\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ModalMessage.prototype, \"options\", {\n get: function () {\n return {\n footer: this.footerOptions,\n message: this.message,\n size: this.size,\n title: this.title,\n };\n },\n enumerable: false,\n configurable: true\n });\n ModalMessage.prototype.set = function (options, shouldUpdate) {\n var _this = this;\n if (shouldUpdate === void 0) { shouldUpdate = true; }\n var mergedOptions = helper_1.getMergedProps(this.options, options);\n var title = mergedOptions.title, footer = mergedOptions.footer, message = mergedOptions.message, size = mergedOptions.size;\n this.title = title;\n this.message = message;\n this.size = size;\n this.setFooterPrimaryButton(footer ? footer.buttons.primary : undefined, function () {\n _this.dispatch(Action.UPDATE);\n });\n this.setFooterSecondaryButtons(footer ? footer.buttons.secondary : undefined, function () {\n _this.dispatch(Action.UPDATE);\n });\n if (shouldUpdate) {\n this.dispatch(Action.UPDATE);\n }\n return this;\n };\n ModalMessage.prototype.dispatch = function (action) {\n switch (action) {\n case Action.OPEN:\n this.app.dispatch(openModal(this.payload));\n break;\n case Action.CLOSE:\n this.close();\n break;\n case Action.UPDATE:\n this.app.dispatch(update(this.payload));\n break;\n }\n return this;\n };\n return ModalMessage;\n}(Modal));\nexports.ModalMessage = ModalMessage;\nvar ModalIframe = /** @class */ (function (_super) {\n __extends(ModalIframe, _super);\n function ModalIframe(app, options) {\n var _this = _super.call(this, app, types_1.Group.Modal, types_1.Group.Modal) || this;\n _this.set(options, false);\n return _this;\n }\n Object.defineProperty(ModalIframe.prototype, \"payload\", {\n get: function () {\n return __assign(__assign({}, this.options), { footer: this.footer, id: this.id });\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ModalIframe.prototype, \"options\", {\n get: function () {\n return {\n footer: this.footerOptions,\n path: this.path,\n size: this.size,\n title: this.title,\n url: this.url,\n loading: this.loading,\n };\n },\n enumerable: false,\n configurable: true\n });\n ModalIframe.prototype.set = function (options, shouldUpdate) {\n var _this = this;\n if (shouldUpdate === void 0) { shouldUpdate = true; }\n var mergedOptions = helper_1.getMergedProps(this.options, options);\n var title = mergedOptions.title, footer = mergedOptions.footer, path = mergedOptions.path, url = mergedOptions.url, size = mergedOptions.size, loading = mergedOptions.loading;\n this.title = title;\n this.url = url;\n this.path = path;\n this.size = size;\n this.loading = loading;\n this.setFooterPrimaryButton(footer ? footer.buttons.primary : undefined, function () {\n _this.dispatch(Action.UPDATE);\n });\n this.setFooterSecondaryButtons(footer ? footer.buttons.secondary : undefined, function () {\n _this.dispatch(Action.UPDATE);\n });\n if (shouldUpdate) {\n this.dispatch(Action.UPDATE);\n }\n return this;\n };\n ModalIframe.prototype.dispatch = function (action, payload) {\n switch (action) {\n case Action.OPEN:\n this.app.dispatch(openModal(this.payload));\n break;\n case Action.CLOSE:\n this.close();\n break;\n case Action.UPDATE:\n this.app.dispatch(update(this.payload));\n break;\n case Action.DATA:\n this.app.dispatch(data(payload || {}));\n break;\n }\n return this;\n };\n return ModalIframe;\n}(Modal));\nexports.ModalIframe = ModalIframe;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Action = void 0;\nvar Action;\n(function (Action) {\n Action[\"UPDATE\"] = \"APP::MARKETING_EXTERNAL_ACTIVITY_TOP_BAR::UPDATE\";\n Action[\"BUTTON_CLICK\"] = \"APP::MARKETING_EXTERNAL_ACTIVITY_TOP_BAR::BUTTONS::BUTTON::CLICK\";\n Action[\"BUTTON_UPDATE\"] = \"APP::MARKETING_EXTERNAL_ACTIVITY_TOP_BAR::BUTTONS::BUTTON::UPDATE\";\n})(Action = exports.Action || (exports.Action = {}));\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./authorization-code\"), exports);\n__exportStar(require(\"./user-authorized-fetch\"), exports);\n","\"use strict\";\nvar __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.useContextualSaveBar = void 0;\nvar react_1 = require(\"react\");\nvar ContextualSaveBar_1 = require(\"@shopify/app-bridge/actions/ContextualSaveBar\");\nvar useAppBridge_1 = require(\"../../useAppBridge\");\n/**\n * useContextualSaveBar hook\n *\n * @remarks\n * React hook which wraps the Shopify App Bridge ContextualSaveBar action.\n *\n * @public\n */\nfunction useContextualSaveBar() {\n var app = useAppBridge_1.useAppBridge();\n var visibleRef = react_1.useRef(false);\n var _a = react_1.useState(), onSaveAction = _a[0], setOnSaveAction = _a[1];\n var _b = react_1.useState(), onDiscardAction = _b[0], setOnDiscardAction = _b[1];\n var contextualSaveBar = react_1.useMemo(function () {\n return ContextualSaveBar_1.create(app);\n }, [app]);\n var show = react_1.useCallback(function (options) {\n // Update options first\n if (options) {\n contextualSaveBar.set(options, false);\n }\n // Updated options will be sent with the \"SHOW\" action\n contextualSaveBar.dispatch(ContextualSaveBar_1.Action.SHOW);\n visibleRef.current = true;\n }, [contextualSaveBar]);\n var hide = react_1.useCallback(function () {\n contextualSaveBar.dispatch(ContextualSaveBar_1.Action.HIDE);\n visibleRef.current = false;\n }, [contextualSaveBar]);\n var saveAction = react_1.useMemo(function () { return ({\n setOptions: function (_a) {\n var onAction = _a.onAction, saveAction = __rest(_a, [\"onAction\"]);\n var shouldUpdate = JSON.stringify(contextualSaveBar.options.saveAction) !== JSON.stringify(saveAction) &&\n visibleRef.current;\n setOnSaveAction(function () { return onAction; });\n contextualSaveBar.set({ saveAction: saveAction }, shouldUpdate);\n },\n }); }, [contextualSaveBar]);\n var discardAction = react_1.useMemo(function () { return ({\n setOptions: function (_a) {\n var onAction = _a.onAction, discardAction = __rest(_a, [\"onAction\"]);\n var shouldUpdate = JSON.stringify(contextualSaveBar.options.discardAction) !==\n JSON.stringify(discardAction) && visibleRef.current;\n setOnDiscardAction(function () { return onAction; });\n contextualSaveBar.set({ discardAction: discardAction }, shouldUpdate);\n },\n }); }, [contextualSaveBar]);\n // Hide contextual save bar on unmount\n react_1.useEffect(function () {\n return function () {\n if (visibleRef.current) {\n hide();\n }\n };\n }, []);\n react_1.useEffect(function () {\n return contextualSaveBar.subscribe(ContextualSaveBar_1.Action.DISCARD, function () {\n onDiscardAction === null || onDiscardAction === void 0 ? void 0 : onDiscardAction();\n });\n }, [contextualSaveBar, onDiscardAction]);\n react_1.useEffect(function () {\n return contextualSaveBar.subscribe(ContextualSaveBar_1.Action.SAVE, function () {\n onSaveAction === null || onSaveAction === void 0 ? void 0 : onSaveAction();\n });\n }, [contextualSaveBar, onSaveAction]);\n return { show: show, hide: hide, saveAction: saveAction, discardAction: discardAction };\n}\nexports.useContextualSaveBar = useContextualSaveBar;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Action = void 0;\nvar Action;\n(function (Action) {\n Action[\"INITIALIZE\"] = \"APP::CLIENT::INITIALIZE\";\n})(Action = exports.Action || (exports.Action = {}));\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.useRouter = exports.setClientInterfaceHook = void 0;\nvar react_1 = __importStar(require(\"react\"));\nvar app_bridge_1 = __importStar(require(\"@shopify/app-bridge\"));\nvar context_1 = require(\"../../context\");\nvar ClientRouter_1 = require(\"../ClientRouter\");\nvar RoutePropagator_1 = require(\"../RoutePropagator\");\n// eslint-disable-next-line @typescript-eslint/no-var-requires\nvar packageJson = require('../../package.json');\n/**\n * Create an App Bridge client application from a config and pass it as the\n * value to the context provider.\n *\n * @public\n */\nfunction Provider(_a) {\n var config = _a.config, router = _a.router, children = _a.children;\n /**\n * We are intentionally ignoring the `config` prop here as it yields a\n * bug on apps build with Next.js which loses the `host` query param\n * upon redirect.\n *\n * This was the behavior of the original `Provider` component prior to\n * the refactor in version 2.0.25.\n */\n var app = react_1.useMemo(function () { return app_bridge_1.default(config); }, []);\n react_1.useEffect(function () {\n if (app === null || app === void 0 ? void 0 : app.hooks) {\n app.hooks.set(app_bridge_1.LifecycleHook.DispatchAction, exports.setClientInterfaceHook);\n }\n }, [app]);\n var routerMarkup = (router === null || router === void 0 ? void 0 : router.history) && (router === null || router === void 0 ? void 0 : router.location) ? react_1.default.createElement(Router, { router: router }, children) : children;\n return react_1.default.createElement(context_1.AppBridgeContext.Provider, { value: app }, routerMarkup);\n}\n/**\n * Augment actions with clientInterface metadata, identifying use of this library\n *\n * @internal\n */\nvar setClientInterfaceHook = function (next) {\n return function (action) {\n action.clientInterface = {\n name: '@shopify/app-bridge-react',\n version: packageJson.version,\n };\n return next(action);\n };\n};\nexports.setClientInterfaceHook = setClientInterfaceHook;\nvar RouterContext = react_1.createContext(undefined);\nfunction useRouter() {\n return react_1.useContext(RouterContext);\n}\nexports.useRouter = useRouter;\nfunction Router(_a) {\n var router = _a.router, children = _a.children;\n ClientRouter_1.useClientRouting(router.history);\n RoutePropagator_1.useRoutePropagation(router.location);\n return react_1.default.createElement(RouterContext.Provider, { value: router }, children);\n}\nexports.default = Provider;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.create = exports.TitleBar = exports.update = exports.clickBreadcrumb = exports.clickActionButton = exports.Action = void 0;\nvar TitleBar_1 = require(\"@shopify/app-bridge-core/actions/TitleBar\");\nObject.defineProperty(exports, \"TitleBar\", { enumerable: true, get: function () { return TitleBar_1.TitleBar; } });\nvar TitleBar_2 = require(\"@shopify/app-bridge-core/actions/TitleBar\");\nObject.defineProperty(exports, \"Action\", { enumerable: true, get: function () { return TitleBar_2.Action; } });\nObject.defineProperty(exports, \"clickActionButton\", { enumerable: true, get: function () { return TitleBar_2.clickActionButton; } });\nObject.defineProperty(exports, \"clickBreadcrumb\", { enumerable: true, get: function () { return TitleBar_2.clickBreadcrumb; } });\nObject.defineProperty(exports, \"update\", { enumerable: true, get: function () { return TitleBar_2.update; } });\nfunction create(app, options) {\n return new TitleBar_1.TitleBar(app, options);\n}\nexports.create = create;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isShopifyPing = exports.isShopifyPOS = exports.isShopifyMobile = exports.isShopifyEmbedded = exports.isMobile = void 0;\nvar env_1 = require(\"../util/env\");\nfunction isMobile() {\n return isShopifyMobile() || isShopifyPOS() || isShopifyPing();\n}\nexports.isMobile = isMobile;\nfunction isShopifyEmbedded() {\n return (env_1.isClient && window.top !== window.self) || env_1.isUnframed;\n}\nexports.isShopifyEmbedded = isShopifyEmbedded;\nfunction isShopifyMobile() {\n return typeof navigator !== 'undefined' && navigator.userAgent.indexOf('Shopify Mobile') >= 0;\n}\nexports.isShopifyMobile = isShopifyMobile;\nfunction isShopifyPOS() {\n return typeof navigator !== 'undefined' && navigator.userAgent.indexOf('Shopify POS') >= 0;\n}\nexports.isShopifyPOS = isShopifyPOS;\nfunction isShopifyPing() {\n return typeof navigator !== 'undefined' && navigator.userAgent.indexOf('Shopify Ping') >= 0;\n}\nexports.isShopifyPing = isShopifyPing;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.create = exports.ButtonGroup = exports.isGroupedButtonPayload = exports.isGroupedButton = exports.update = exports.Action = void 0;\nvar ButtonGroup_1 = require(\"@shopify/app-bridge-core/actions/ButtonGroup\");\nObject.defineProperty(exports, \"ButtonGroup\", { enumerable: true, get: function () { return ButtonGroup_1.ButtonGroup; } });\nvar ButtonGroup_2 = require(\"@shopify/app-bridge-core/actions/ButtonGroup\");\nObject.defineProperty(exports, \"Action\", { enumerable: true, get: function () { return ButtonGroup_2.Action; } });\nObject.defineProperty(exports, \"update\", { enumerable: true, get: function () { return ButtonGroup_2.update; } });\nObject.defineProperty(exports, \"isGroupedButton\", { enumerable: true, get: function () { return ButtonGroup_2.isGroupedButton; } });\nObject.defineProperty(exports, \"isGroupedButtonPayload\", { enumerable: true, get: function () { return ButtonGroup_2.isGroupedButtonPayload; } });\nfunction create(app, options) {\n return new ButtonGroup_1.ButtonGroup(app, options);\n}\nexports.create = create;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.useFeaturesAvailable = void 0;\nvar useFeaturesAvailable_1 = require(\"./useFeaturesAvailable\");\nObject.defineProperty(exports, \"useFeaturesAvailable\", { enumerable: true, get: function () { return useFeaturesAvailable_1.useFeaturesAvailable; } });\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Fullscreen = exports.exit = exports.enter = exports.Action = void 0;\nvar helper_1 = require(\"../helper\");\nvar ActionSet_1 = require(\"../ActionSet\");\nvar types_1 = require(\"../types\");\n/**\n * Fullscreen action type enum\n * @remarks includes the action prefix and group\n *\n * @beta\n */\nvar Action;\n(function (Action) {\n Action[\"ENTER\"] = \"APP::FULLSCREEN::ENTER\";\n Action[\"EXIT\"] = \"APP::FULLSCREEN::EXIT\";\n})(Action = exports.Action || (exports.Action = {}));\nfunction enter() {\n return helper_1.actionWrapper({\n group: types_1.Group.Fullscreen,\n type: Action.ENTER,\n });\n}\nexports.enter = enter;\nfunction exit() {\n return helper_1.actionWrapper({\n group: types_1.Group.Fullscreen,\n type: Action.EXIT,\n });\n}\nexports.exit = exit;\n/**\n * Fullscreen action set\n * @beta\n */\nvar Fullscreen = /** @class */ (function (_super) {\n __extends(Fullscreen, _super);\n /**\n * Returns a new instance of a Fullscreen action set\n * @param app the client application\n */\n function Fullscreen(app) {\n return _super.call(this, app, types_1.Group.Fullscreen, types_1.Group.Fullscreen) || this;\n }\n Object.defineProperty(Fullscreen.prototype, \"payload\", {\n /**\n * Returns the action set payload\n */\n get: function () {\n return { id: this.id };\n },\n enumerable: false,\n configurable: true\n });\n /**\n * Dispatches a given action with the action set payload\n * @param action the action enum\n * @returns the action set instance\n */\n Fullscreen.prototype.dispatch = function (action) {\n this.app.dispatch(helper_1.actionWrapper({\n group: this.group,\n type: action,\n payload: this.payload,\n }));\n return this;\n };\n return Fullscreen;\n}(ActionSet_1.ActionSet));\nexports.Fullscreen = Fullscreen;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.handleAppPrint = void 0;\nvar redirect_1 = require(\"./redirect\");\nfunction isRunningOniOS() {\n return navigator.userAgent.indexOf('iOS') >= 0;\n}\nfunction createHiddenInput() {\n var currentWindow = redirect_1.getWindow();\n if (!currentWindow || !currentWindow.document || !currentWindow.document.body) {\n return;\n }\n var inputElement = currentWindow.document.createElement('input');\n inputElement.style.display = 'none';\n currentWindow.document.body.appendChild(inputElement);\n return inputElement;\n}\nfunction printWindow() {\n var _a;\n (_a = redirect_1.getWindow()) === null || _a === void 0 ? void 0 : _a.print();\n}\nfunction handleMobileAppPrint() {\n var input = createHiddenInput();\n if (!input) {\n return;\n }\n input.select();\n printWindow();\n input.remove();\n}\nfunction handleAppPrint() {\n if (isRunningOniOS()) {\n handleMobileAppPrint();\n }\n else {\n printWindow();\n }\n}\nexports.handleAppPrint = handleAppPrint;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.create = exports.ChannelMenu = exports.update = exports.Action = void 0;\nvar ChannelMenu_1 = require(\"@shopify/app-bridge-core/actions/Menu/ChannelMenu\");\nObject.defineProperty(exports, \"ChannelMenu\", { enumerable: true, get: function () { return ChannelMenu_1.ChannelMenu; } });\nvar ChannelMenu_2 = require(\"@shopify/app-bridge-core/actions/Menu/ChannelMenu\");\nObject.defineProperty(exports, \"Action\", { enumerable: true, get: function () { return ChannelMenu_2.Action; } });\nObject.defineProperty(exports, \"update\", { enumerable: true, get: function () { return ChannelMenu_2.update; } });\nfunction create(app, options) {\n return new ChannelMenu_1.ChannelMenu(app, options);\n}\nexports.create = create;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.NavigationMenu = exports.update = exports.Action = void 0;\nvar AppLink_1 = require(\"../../Link/AppLink\");\nvar helper_1 = require(\"../../helper\");\nvar ActionSet_1 = require(\"../../ActionSet\");\nvar types_1 = require(\"../../types\");\nvar SUBGROUPS = ['Navigation_Menu'];\nvar Action;\n(function (Action) {\n Action[\"UPDATE\"] = \"APP::MENU::NAVIGATION_MENU::UPDATE\";\n Action[\"LINK_UPDATE\"] = \"APP::MENU::NAVIGATION_MENU::LINK::UPDATE\";\n})(Action = exports.Action || (exports.Action = {}));\nfunction update(payload) {\n return helper_1.actionWrapper({\n payload: payload,\n group: types_1.Group.Menu,\n type: Action.UPDATE,\n });\n}\nexports.update = update;\nvar NavigationMenu = /** @class */ (function (_super) {\n __extends(NavigationMenu, _super);\n function NavigationMenu(app, options) {\n var _this = _super.call(this, app, 'Navigation_Menu', types_1.Group.Menu) || this;\n _this.items = [];\n // Trigger 'update' on creation\n _this.set(options);\n return _this;\n }\n Object.defineProperty(NavigationMenu.prototype, \"options\", {\n get: function () {\n return {\n items: this.itemsOptions,\n active: this.activeOptions,\n };\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(NavigationMenu.prototype, \"payload\", {\n get: function () {\n return __assign(__assign({}, this.options), { active: this.active, items: this.items, id: this.id });\n },\n enumerable: false,\n configurable: true\n });\n NavigationMenu.prototype.set = function (options, shouldUpdate) {\n if (shouldUpdate === void 0) { shouldUpdate = true; }\n var mergedOptions = helper_1.getMergedProps(this.options, options);\n var items = mergedOptions.items, active = mergedOptions.active;\n this.setItems(items);\n this.activeOptions = active;\n this.active = active && active.id;\n if (shouldUpdate) {\n this.dispatch(Action.UPDATE);\n }\n return this;\n };\n NavigationMenu.prototype.dispatch = function (action) {\n switch (action) {\n case Action.UPDATE:\n this.app.dispatch(update(this.payload));\n break;\n }\n return this;\n };\n NavigationMenu.prototype.updateItem = function (newPayload) {\n if (!this.items) {\n return;\n }\n var itemToUpdate = this.items.find(function (action) { return action.id === newPayload.id; });\n if (!itemToUpdate) {\n return;\n }\n if (helper_1.updateActionFromPayload(itemToUpdate, newPayload)) {\n this.dispatch(Action.UPDATE);\n }\n };\n NavigationMenu.prototype.setItems = function (newOptions) {\n var _this = this;\n var newItems = newOptions || [];\n var currentItems = this.itemsOptions || [];\n this.itemsOptions = this.getUpdatedChildActions(newItems, currentItems);\n this.items = this.itemsOptions\n ? this.itemsOptions.map(function (action) {\n _this.addChild(action, _this.group, SUBGROUPS);\n _this.subscribeToChild(action, AppLink_1.Action.UPDATE, _this.updateItem);\n return action.payload;\n })\n : [];\n };\n return NavigationMenu;\n}(ActionSet_1.ActionSetWithChildren));\nexports.NavigationMenu = NavigationMenu;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getSingleButton = void 0;\nvar buttonHelper_1 = require(\"@shopify/app-bridge-core/actions/buttonHelper\");\nObject.defineProperty(exports, \"getSingleButton\", { enumerable: true, get: function () { return buttonHelper_1.getSingleButton; } });\n","!function(e,n){\"object\"==typeof exports&&\"undefined\"!=typeof module?n(exports):\"function\"==typeof define&&define.amd?define([\"exports\"],n):n((e=\"undefined\"!=typeof globalThis?globalThis:e||self).webVitals={})}(this,(function(e){\"use strict\";var n,t,i,r,o,a=-1,c=function(e){addEventListener(\"pageshow\",(function(n){n.persisted&&(a=n.timeStamp,e(n))}),!0)},u=function(){return window.performance&&performance.getEntriesByType&&performance.getEntriesByType(\"navigation\")[0]},s=function(){var e=u();return e&&e.activationStart||0},f=function(e,n){var t=u(),i=\"navigate\";return a>=0?i=\"back-forward-cache\":t&&(i=document.prerendering||s()>0?\"prerender\":document.wasDiscarded?\"restore\":t.type.replace(/_/g,\"-\")),{name:e,value:void 0===n?-1:n,rating:\"good\",delta:0,entries:[],id:\"v3-\".concat(Date.now(),\"-\").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:i}},d=function(e,n,t){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var i=new PerformanceObserver((function(e){Promise.resolve().then((function(){n(e.getEntries())}))}));return i.observe(Object.assign({type:e,buffered:!0},t||{})),i}}catch(e){}},l=function(e,n,t,i){var r,o;return function(a){n.value>=0&&(a||i)&&((o=n.value-(r||0))||void 0===r)&&(r=n.value,n.delta=o,n.rating=function(e,n){return e>n[1]?\"poor\":e>n[0]?\"needs-improvement\":\"good\"}(n.value,t),e(n))}},p=function(e){requestAnimationFrame((function(){return requestAnimationFrame((function(){return e()}))}))},v=function(e){var n=function(n){\"pagehide\"!==n.type&&\"hidden\"!==document.visibilityState||e(n)};addEventListener(\"visibilitychange\",n,!0),addEventListener(\"pagehide\",n,!0)},m=function(e){var n=!1;return function(t){n||(e(t),n=!0)}},h=-1,g=function(){return\"hidden\"!==document.visibilityState||document.prerendering?1/0:0},T=function(e){\"hidden\"===document.visibilityState&&h>-1&&(h=\"visibilitychange\"===e.type?e.timeStamp:0,C())},y=function(){addEventListener(\"visibilitychange\",T,!0),addEventListener(\"prerenderingchange\",T,!0)},C=function(){removeEventListener(\"visibilitychange\",T,!0),removeEventListener(\"prerenderingchange\",T,!0)},E=function(){return h<0&&(h=g(),y(),c((function(){setTimeout((function(){h=g(),y()}),0)}))),{get firstHiddenTime(){return h}}},L=function(e){document.prerendering?addEventListener(\"prerenderingchange\",(function(){return e()}),!0):e()},b=[1800,3e3],S=function(e,n){n=n||{},L((function(){var t,i=E(),r=f(\"FCP\"),o=d(\"paint\",(function(e){e.forEach((function(e){\"first-contentful-paint\"===e.name&&(o.disconnect(),e.startTimei.value&&(i.value=r,i.entries=o,t())},u=d(\"layout-shift\",a);u&&(t=l(e,i,w,n.reportAllChanges),v((function(){a(u.takeRecords()),t(!0)})),c((function(){r=0,i=f(\"CLS\",0),t=l(e,i,w,n.reportAllChanges),p((function(){return t()}))})),setTimeout(t,0))})))},F={passive:!0,capture:!0},I=new Date,A=function(e,r){n||(n=r,t=e,i=new Date,k(removeEventListener),M())},M=function(){if(t>=0&&t1e12?new Date:performance.now())-e.timeStamp;\"pointerdown\"==e.type?function(e,n){var t=function(){A(e,n),r()},i=function(){r()},r=function(){removeEventListener(\"pointerup\",t,F),removeEventListener(\"pointercancel\",i,F)};addEventListener(\"pointerup\",t,F),addEventListener(\"pointercancel\",i,F)}(n,e):A(n,e)}},k=function(e){[\"mousedown\",\"keydown\",\"touchstart\",\"pointerdown\"].forEach((function(n){return e(n,D,F)}))},x=[100,300],B=function(e,i){i=i||{},L((function(){var o,a=E(),u=f(\"FID\"),s=function(e){e.startTimen.latency){if(t)t.entries.push(e),t.latency=Math.max(t.latency,e.duration);else{var i={id:e.interactionId,latency:e.duration,entries:[e]};J[i.id]=i,G.push(i)}G.sort((function(e,n){return n.latency-e.latency})),G.splice(10).forEach((function(e){delete J[e.id]}))}},Q=function(e,n){n=n||{},L((function(){_();var t,i=f(\"INP\"),r=function(e){e.forEach((function(e){(e.interactionId&&K(e),\"first-input\"===e.entryType)&&(!G.some((function(n){return n.entries.some((function(n){return e.duration===n.duration&&e.startTime===n.startTime}))}))&&K(e))}));var n,r=(n=Math.min(G.length-1,Math.floor(z()/50)),G[n]);r&&r.latency!==i.value&&(i.value=r.latency,i.entries=r.entries,t())},o=d(\"event\",r,{durationThreshold:n.durationThreshold||40});t=l(e,i,q,n.reportAllChanges),o&&(o.observe({type:\"first-input\",buffered:!0}),v((function(){r(o.takeRecords()),i.value<0&&z()>0&&(i.value=0,i.entries=[]),t(!0)})),c((function(){G=[],V=j(),i=f(\"INP\"),t=l(e,i,q,n.reportAllChanges)})))}))},U=[2500,4e3],W={},X=function(e,n){n=n||{},L((function(){var t,i=E(),r=f(\"LCP\"),o=function(e){var n=e[e.length-1];n&&n.startTimeperformance.now())return;t.value=Math.max(o-s(),0),t.entries=[r],i(!0),c((function(){t=f(\"TTFB\",0),(i=l(e,t,Y,n.reportAllChanges))(!0)}))}}))};e.CLSThresholds=w,e.FCPThresholds=b,e.FIDThresholds=x,e.INPThresholds=q,e.LCPThresholds=U,e.TTFBThresholds=Y,e.getCLS=P,e.getFCP=S,e.getFID=B,e.getINP=Q,e.getLCP=X,e.getTTFB=$,e.onCLS=P,e.onFCP=S,e.onFID=B,e.onINP=Q,e.onLCP=X,e.onTTFB=$,Object.defineProperty(e,\"__esModule\",{value:!0})}));\n","\"use strict\";\nvar _a, _b;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isUnframed = exports.isClient = exports.isServer = void 0;\nexports.isServer = typeof window === 'undefined';\nexports.isClient = !exports.isServer;\n// eslint-disable-next-line ssr-friendly/no-dom-globals-in-module-scope\nexports.isUnframed = exports.isClient && ((_b = (_a = window.navigator) === null || _a === void 0 ? void 0 : _a.userAgent) === null || _b === void 0 ? void 0 : _b.indexOf('Unframed')) > 0;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.create = exports.Toast = exports.primaryAction = exports.clear = exports.show = exports.Action = void 0;\nvar Toast_1 = require(\"@shopify/app-bridge-core/actions/Toast\");\nObject.defineProperty(exports, \"Toast\", { enumerable: true, get: function () { return Toast_1.Toast; } });\nvar Toast_2 = require(\"@shopify/app-bridge-core/actions/Toast\");\nObject.defineProperty(exports, \"Action\", { enumerable: true, get: function () { return Toast_2.Action; } });\nObject.defineProperty(exports, \"show\", { enumerable: true, get: function () { return Toast_2.show; } });\nObject.defineProperty(exports, \"clear\", { enumerable: true, get: function () { return Toast_2.clear; } });\nObject.defineProperty(exports, \"primaryAction\", { enumerable: true, get: function () { return Toast_2.primaryAction; } });\nfunction create(app, options) {\n return new Toast_1.Toast(app, options);\n}\nexports.create = create;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.useNavigationHistory = void 0;\nvar react_1 = require(\"react\");\nvar actions_1 = require(\"@shopify/app-bridge/actions\");\nvar useAppBridge_1 = require(\"../../useAppBridge\");\n/**\n * useNavigationHistory hook\n *\n * @remarks\n * React hook which wraps the Shopify App Bridge History action.\n *\n * @public\n */\nfunction useNavigationHistory() {\n var app = useAppBridge_1.useAppBridge();\n return react_1.useMemo(function () {\n var history = actions_1.History.create(app);\n function push(location) {\n history.dispatch(actions_1.History.Action.PUSH, location.pathname);\n }\n function replace(location) {\n history.dispatch(actions_1.History.Action.REPLACE, location.pathname);\n }\n return { push: push, replace: replace };\n }, []);\n}\nexports.useNavigationHistory = useNavigationHistory;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = void 0;\nvar client_1 = require(\"./client\");\nObject.defineProperty(exports, \"default\", { enumerable: true, get: function () { return client_1.createApp; } });\n__exportStar(require(\"./MessageTransport\"), exports);\n__exportStar(require(\"./client\"), exports);\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isPermitted = exports.getPermissionKey = exports.isPerformanceOrWebVitalsAction = exports.isAppMessage = exports.isAppBridgeAction = void 0;\nvar types_1 = require(\"../client/types\");\nvar constants_1 = require(\"./constants\");\nvar helper_1 = require(\"./helper\");\n/**\n * Predicate to determine if an action is an App Bridge action.\n * @public\n */\nfunction isAppBridgeAction(action) {\n return (action instanceof Object &&\n Object.prototype.hasOwnProperty.call(action, 'type') &&\n action.type.toString().startsWith(constants_1.PREFIX));\n}\nexports.isAppBridgeAction = isAppBridgeAction;\n/**\n * Predicate to determine if an event originated from an application.\n * @internal\n */\nfunction isAppMessage(event) {\n if (typeof event !== 'object' || !event.data || typeof event.data !== 'object') {\n return false;\n }\n var data = event.data;\n return (Object.prototype.hasOwnProperty.call(data, 'type') &&\n helper_1.findMatchInEnum(types_1.MessageType, data.type) !== undefined);\n}\nexports.isAppMessage = isAppMessage;\n/**\n * Function used to determine if an action is in the Performance or WebVitals groups\n * @public\n */\nfunction isPerformanceOrWebVitalsAction(_a) {\n var type = _a.type;\n return type.match(/^APP::(PERFORMANCE|WEB_VITALS)::/);\n}\nexports.isPerformanceOrWebVitalsAction = isPerformanceOrWebVitalsAction;\n/**\n * Returns the action type without the prefix and group\n * @internal\n */\nfunction getPermissionKey(type) {\n return type.replace(new RegExp(\"^\" + constants_1.PREFIX + constants_1.SEPARATOR + \"\\\\w+\" + constants_1.SEPARATOR), '');\n}\nexports.getPermissionKey = getPermissionKey;\n/**\n * Predicate to determine if an action is permitted\n * @internal\n */\nfunction isPermitted(features, _a, permissionType) {\n var group = _a.group, type = _a.type;\n if (!group || !Object.prototype.hasOwnProperty.call(features, group)) {\n return false;\n }\n var feature = features[group];\n if (!feature) {\n return false;\n }\n var actionType = getPermissionKey(type);\n return feature[actionType] ? feature[actionType][permissionType] === true : false;\n}\nexports.isPermitted = isPermitted;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.networkAction = exports.persistenceAction = exports.unsupportedOperationAction = exports.unexpectedAction = exports.invalidAction = exports.invalidActionType = exports.invalidPayload = exports.Message = exports.fromAction = exports.Action = exports.permissionAction = exports.isErrorEventName = exports.throwError = exports.invalidOriginAction = exports.AppBridgeError = exports.AppActionType = void 0;\nvar Error_1 = require(\"@shopify/app-bridge-core/actions/Error\");\nObject.defineProperty(exports, \"Action\", { enumerable: true, get: function () { return Error_1.Action; } });\nObject.defineProperty(exports, \"fromAction\", { enumerable: true, get: function () { return Error_1.fromAction; } });\nvar helper_1 = require(\"../helper\");\nvar types_1 = require(\"../types\");\nvar Error_2 = require(\"@shopify/app-bridge-core/actions/Error\");\nObject.defineProperty(exports, \"AppActionType\", { enumerable: true, get: function () { return Error_2.AppActionType; } });\nObject.defineProperty(exports, \"AppBridgeError\", { enumerable: true, get: function () { return Error_2.AppBridgeError; } });\nObject.defineProperty(exports, \"invalidOriginAction\", { enumerable: true, get: function () { return Error_2.invalidOriginAction; } });\nObject.defineProperty(exports, \"throwError\", { enumerable: true, get: function () { return Error_2.throwError; } });\nObject.defineProperty(exports, \"isErrorEventName\", { enumerable: true, get: function () { return Error_2.isErrorEventName; } });\nObject.defineProperty(exports, \"permissionAction\", { enumerable: true, get: function () { return Error_2.permissionAction; } });\nfunction errorActionWrapperWithId(type, action, message) {\n var castPayload = action.payload;\n return helper_1.actionWrapper({\n type: type,\n group: types_1.Group.Error,\n payload: {\n action: action,\n message: message,\n type: type,\n id: castPayload && castPayload.id ? castPayload.id : undefined,\n },\n });\n}\nvar Message;\n(function (Message) {\n Message[\"MISSING_PAYLOAD\"] = \"Missing payload\";\n Message[\"INVALID_PAYLOAD_ID\"] = \"Id in payload is missing or invalid\";\n})(Message = exports.Message || (exports.Message = {}));\nfunction invalidPayload(action, message) {\n return errorActionWrapperWithId(Error_1.Action.INVALID_PAYLOAD, action, message || \"The action's payload is missing required properties or has invalid properties\");\n}\nexports.invalidPayload = invalidPayload;\nfunction invalidActionType(action, message) {\n return helper_1.actionWrapper({\n group: types_1.Group.Error,\n payload: {\n action: action,\n message: message || 'The action type is invalid or unsupported',\n type: Error_1.Action.INVALID_ACTION_TYPE,\n },\n type: Error_1.Action.INVALID_ACTION_TYPE,\n });\n}\nexports.invalidActionType = invalidActionType;\nfunction invalidAction(action, message) {\n return helper_1.actionWrapper({\n group: types_1.Group.Error,\n payload: {\n action: action,\n message: message || \"The action's has missing/invalid values for `group`, `type` or `version`\",\n type: Error_1.Action.INVALID_ACTION,\n },\n type: Error_1.Action.INVALID_ACTION,\n });\n}\nexports.invalidAction = invalidAction;\nfunction unexpectedAction(action, message) {\n return helper_1.actionWrapper({\n group: types_1.Group.Error,\n payload: {\n action: action,\n message: message || 'Action cannot be called at this time',\n type: Error_1.Action.UNEXPECTED_ACTION,\n },\n type: Error_1.Action.UNEXPECTED_ACTION,\n });\n}\nexports.unexpectedAction = unexpectedAction;\nfunction unsupportedOperationAction(action, message) {\n return errorActionWrapperWithId(Error_1.Action.UNSUPPORTED_OPERATION, action, message || 'The action type is unsupported');\n}\nexports.unsupportedOperationAction = unsupportedOperationAction;\nfunction persistenceAction(action, message) {\n return errorActionWrapperWithId(Error_1.Action.PERSISTENCE, action, message || 'Action cannot be persisted on server');\n}\nexports.persistenceAction = persistenceAction;\nfunction networkAction(action, message) {\n return errorActionWrapperWithId(Error_1.Action.NETWORK, action, message || 'Network error');\n}\nexports.networkAction = networkAction;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Loading_1 = __importDefault(require(\"./Loading\"));\nexports.default = Loading_1.default;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.initializeWebVitals = exports.interactionToNextPaint = exports.timeToFirstByte = exports.firstContentfulPaint = exports.cumulativeLayoutShift = exports.firstInputDelay = exports.largestContentfulPaint = exports.Action = void 0;\nvar web_vitals_1 = require(\"web-vitals\");\nvar WebVitals_1 = require(\"@shopify/app-bridge-core/actions/WebVitals\");\nObject.defineProperty(exports, \"Action\", { enumerable: true, get: function () { return WebVitals_1.Action; } });\nvar env_1 = require(\"../../util/env\");\nvar types_1 = require(\"../types\");\nvar helper_1 = require(\"../helper\");\nvar platform_1 = require(\"../../utilities/platform\");\nfunction largestContentfulPaint(payload) {\n return helper_1.actionWrapper({\n group: types_1.Group.WebVitals,\n type: WebVitals_1.Action.LARGEST_CONTENTFUL_PAINT,\n payload: payload,\n });\n}\nexports.largestContentfulPaint = largestContentfulPaint;\nfunction firstInputDelay(payload) {\n return helper_1.actionWrapper({\n group: types_1.Group.WebVitals,\n type: WebVitals_1.Action.FIRST_INPUT_DELAY,\n payload: payload,\n });\n}\nexports.firstInputDelay = firstInputDelay;\nfunction cumulativeLayoutShift(payload) {\n return helper_1.actionWrapper({\n group: types_1.Group.WebVitals,\n type: WebVitals_1.Action.CUMULATIVE_LAYOUT_SHIFT,\n payload: payload,\n });\n}\nexports.cumulativeLayoutShift = cumulativeLayoutShift;\nfunction firstContentfulPaint(payload) {\n return helper_1.actionWrapper({\n group: types_1.Group.WebVitals,\n type: WebVitals_1.Action.FIRST_CONTENTFUL_PAINT,\n payload: payload,\n });\n}\nexports.firstContentfulPaint = firstContentfulPaint;\nfunction timeToFirstByte(payload) {\n return helper_1.actionWrapper({\n group: types_1.Group.WebVitals,\n type: WebVitals_1.Action.TIME_TO_FIRST_BYTE,\n payload: payload,\n });\n}\nexports.timeToFirstByte = timeToFirstByte;\nfunction interactionToNextPaint(payload) {\n return helper_1.actionWrapper({\n group: types_1.Group.WebVitals,\n type: WebVitals_1.Action.INTERACTION_TO_NEXT_PAINT,\n payload: payload,\n });\n}\nexports.interactionToNextPaint = interactionToNextPaint;\nfunction initializeWebVitals(app) {\n function onReport(cb) {\n return function (data) {\n var id = data.id, metricName = data.name, value = data.value;\n var payload = { id: id, metricName: metricName, value: value };\n var event = cb(payload);\n app.dispatch(event);\n };\n }\n var untypedWindow = window;\n if (env_1.isServer || (env_1.isClient && untypedWindow.__is_web_vitals_initialized__) || platform_1.isMobile()) {\n // We need to prevent the Web Vitals functions from being called more than once per page load,\n // which can cause a memory leak as per the web-vitals docs.\n return;\n }\n untypedWindow.__is_web_vitals_initialized__ = true;\n web_vitals_1.onLCP(onReport(largestContentfulPaint));\n web_vitals_1.onFID(onReport(firstInputDelay));\n web_vitals_1.onCLS(onReport(cumulativeLayoutShift));\n web_vitals_1.onFCP(onReport(firstContentfulPaint));\n web_vitals_1.onTTFB(onReport(timeToFirstByte));\n web_vitals_1.onINP(onReport(interactionToNextPaint));\n}\nexports.initializeWebVitals = initializeWebVitals;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.request = exports.Action = exports.respond = void 0;\nvar AuthCode_1 = require(\"@shopify/app-bridge-core/actions/AuthCode\");\nObject.defineProperty(exports, \"Action\", { enumerable: true, get: function () { return AuthCode_1.Action; } });\nvar helper_1 = require(\"../helper\");\nvar types_1 = require(\"../types\");\nvar AuthCode_2 = require(\"@shopify/app-bridge-core/actions/AuthCode\");\nObject.defineProperty(exports, \"respond\", { enumerable: true, get: function () { return AuthCode_2.respond; } });\nfunction request(id) {\n return helper_1.actionWrapper({\n group: types_1.Group.AuthCode,\n type: AuthCode_1.Action.REQUEST,\n payload: { id: id },\n });\n}\nexports.request = request;\n","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.userAuthorizedFetch = void 0;\nvar authorization_code_1 = require(\"./authorization-code\");\nvar DEFAULT_CALLBACK_URI = 'auth/shopify/callback';\nfunction needsAuthorizationCode(response) {\n var headerValue = response.headers.get('X-Shopify-API-Request-Failure-Unauthorized');\n if (headerValue) {\n return headerValue.toLowerCase() === 'true';\n }\n return false;\n}\nfunction userAuthorizedFetch(_a) {\n var _this = this;\n var app = _a.app, _b = _a.callbackUri, callbackUri = _b === void 0 ? DEFAULT_CALLBACK_URI : _b, _c = _a.isAuthorizationCodeRequired, isAuthorizationCodeRequired = _c === void 0 ? needsAuthorizationCode : _c, fetchOperation = _a.fetchOperation;\n return function (uri, options) { return __awaiter(_this, void 0, void 0, function () {\n var response, _a, code, hmac, shop, timestamp, formattedCallbackUri, callbackResponse;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0: return [4 /*yield*/, fetchOperation(uri, options)];\n case 1:\n response = _b.sent();\n if (!isAuthorizationCodeRequired(response)) {\n return [2 /*return*/, response];\n }\n return [4 /*yield*/, authorization_code_1.getAuthorizationCodePayload(app)];\n case 2:\n _a = _b.sent(), code = _a.code, hmac = _a.hmac, shop = _a.shop, timestamp = _a.timestamp;\n formattedCallbackUri = encodeURI(\"https://\" + window.location.hostname + \"/\" + callbackUri + \"?code=\" + code + \"&hmac=\" + hmac + \"&shop=\" + shop + \"×tamp=\" + timestamp);\n return [4 /*yield*/, fetchOperation(formattedCallbackUri, {})];\n case 3:\n callbackResponse = _b.sent();\n if (!callbackResponse.ok) {\n throw new Error('Failed to authorize request.');\n }\n return [2 /*return*/, fetchOperation(uri, options)];\n }\n });\n }); };\n}\nexports.userAuthorizedFetch = userAuthorizedFetch;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.create = exports.ResourcePicker = exports.WeightUnit = exports.update = exports.select = exports.ResourceType = exports.ProductVariantInventoryPolicy = exports.ProductVariantInventoryManagement = exports.ProductStatus = exports.open = exports.FulfillmentServiceType = exports.CollectionSortOrder = exports.close = exports.cancel = exports.ActionVerb = exports.Action = void 0;\nvar ResourcePicker_1 = require(\"@shopify/app-bridge-core/actions/ResourcePicker\");\nObject.defineProperty(exports, \"ResourcePicker\", { enumerable: true, get: function () { return ResourcePicker_1.ResourcePicker; } });\nvar ResourcePicker_2 = require(\"@shopify/app-bridge-core/actions/ResourcePicker\");\nObject.defineProperty(exports, \"Action\", { enumerable: true, get: function () { return ResourcePicker_2.Action; } });\nObject.defineProperty(exports, \"ActionVerb\", { enumerable: true, get: function () { return ResourcePicker_2.ActionVerb; } });\nObject.defineProperty(exports, \"cancel\", { enumerable: true, get: function () { return ResourcePicker_2.cancel; } });\nObject.defineProperty(exports, \"close\", { enumerable: true, get: function () { return ResourcePicker_2.close; } });\nObject.defineProperty(exports, \"CollectionSortOrder\", { enumerable: true, get: function () { return ResourcePicker_2.CollectionSortOrder; } });\nObject.defineProperty(exports, \"FulfillmentServiceType\", { enumerable: true, get: function () { return ResourcePicker_2.FulfillmentServiceType; } });\nObject.defineProperty(exports, \"open\", { enumerable: true, get: function () { return ResourcePicker_2.open; } });\nObject.defineProperty(exports, \"ProductStatus\", { enumerable: true, get: function () { return ResourcePicker_2.ProductStatus; } });\nObject.defineProperty(exports, \"ProductVariantInventoryManagement\", { enumerable: true, get: function () { return ResourcePicker_2.ProductVariantInventoryManagement; } });\nObject.defineProperty(exports, \"ProductVariantInventoryPolicy\", { enumerable: true, get: function () { return ResourcePicker_2.ProductVariantInventoryPolicy; } });\nObject.defineProperty(exports, \"ResourceType\", { enumerable: true, get: function () { return ResourcePicker_2.ResourceType; } });\nObject.defineProperty(exports, \"select\", { enumerable: true, get: function () { return ResourcePicker_2.select; } });\nObject.defineProperty(exports, \"update\", { enumerable: true, get: function () { return ResourcePicker_2.update; } });\nObject.defineProperty(exports, \"WeightUnit\", { enumerable: true, get: function () { return ResourcePicker_2.WeightUnit; } });\nvar create = function (app, baseOptions) {\n var resourceType = baseOptions.resourceType, _a = baseOptions.options, options = _a === void 0 ? {} : _a;\n return new ResourcePicker_1.ResourcePicker(app, options, resourceType);\n};\nexports.create = create;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.create = exports.ContextualSaveBar = exports.update = exports.discard = exports.save = exports.hide = exports.show = exports.Action = void 0;\nvar ContextualSaveBar_1 = require(\"@shopify/app-bridge-core/actions/ContextualSaveBar\");\nObject.defineProperty(exports, \"Action\", { enumerable: true, get: function () { return ContextualSaveBar_1.Action; } });\nObject.defineProperty(exports, \"show\", { enumerable: true, get: function () { return ContextualSaveBar_1.show; } });\nObject.defineProperty(exports, \"hide\", { enumerable: true, get: function () { return ContextualSaveBar_1.hide; } });\nObject.defineProperty(exports, \"save\", { enumerable: true, get: function () { return ContextualSaveBar_1.save; } });\nObject.defineProperty(exports, \"discard\", { enumerable: true, get: function () { return ContextualSaveBar_1.discard; } });\nObject.defineProperty(exports, \"update\", { enumerable: true, get: function () { return ContextualSaveBar_1.update; } });\nObject.defineProperty(exports, \"ContextualSaveBar\", { enumerable: true, get: function () { return ContextualSaveBar_1.ContextualSaveBar; } });\n/**\n * Returns a new instance of a ContextualSaveBar action set\n * @param app the client application\n *\n */\nfunction create(app, options) {\n return new ContextualSaveBar_1.ContextualSaveBar(app, options);\n}\nexports.create = create;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.create = exports.LeaveConfirmation = exports.confirm = exports.disable = exports.enable = exports.Action = void 0;\nvar LeaveConfirmation_1 = require(\"@shopify/app-bridge-core/actions/LeaveConfirmation\");\nObject.defineProperty(exports, \"LeaveConfirmation\", { enumerable: true, get: function () { return LeaveConfirmation_1.LeaveConfirmation; } });\nvar LeaveConfirmation_2 = require(\"@shopify/app-bridge-core/actions/LeaveConfirmation\");\nObject.defineProperty(exports, \"Action\", { enumerable: true, get: function () { return LeaveConfirmation_2.Action; } });\nObject.defineProperty(exports, \"enable\", { enumerable: true, get: function () { return LeaveConfirmation_2.enable; } });\nObject.defineProperty(exports, \"disable\", { enumerable: true, get: function () { return LeaveConfirmation_2.disable; } });\nObject.defineProperty(exports, \"confirm\", { enumerable: true, get: function () { return LeaveConfirmation_2.confirm; } });\n/**\n * Returns a new instance of a Leave Confirmation action set\n * @param app the client application\n */\nfunction create(app, options) {\n if (options === void 0) { options = {}; }\n return new LeaveConfirmation_1.LeaveConfirmation(app, options);\n}\nexports.create = create;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.create = exports.Pos = exports.close = exports.Action = void 0;\nvar Pos_1 = require(\"@shopify/app-bridge-core/actions/Pos\");\nObject.defineProperty(exports, \"Pos\", { enumerable: true, get: function () { return Pos_1.Pos; } });\nvar Pos_2 = require(\"@shopify/app-bridge-core/actions/Pos\");\nObject.defineProperty(exports, \"Action\", { enumerable: true, get: function () { return Pos_2.Action; } });\nObject.defineProperty(exports, \"close\", { enumerable: true, get: function () { return Pos_2.close; } });\nfunction create(app) {\n return new Pos_1.Pos(app);\n}\nexports.create = create;\n","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.useFeaturesAvailable = void 0;\nvar react_1 = require(\"react\");\nvar types_1 = require(\"@shopify/app-bridge/actions/Features/types\");\nvar useAppBridge_1 = require(\"../../useAppBridge\");\n/**\n * useFeaturesAvailable hook\n *\n * @remarks\n * React hook that wraps the Shopify App Bridge getFeaturesAvailable method.\n *\n * @public\n */\nfunction useFeaturesAvailable() {\n var _this = this;\n var query = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n query[_i] = arguments[_i];\n }\n var app = useAppBridge_1.useAppBridge();\n var _a = react_1.useState(), state = _a[0], setState = _a[1];\n var queryRef = react_1.useRef([]);\n var refresh = react_1.useCallback(function () {\n var isUnmounted = false;\n (function () { return __awaiter(_this, void 0, void 0, function () {\n var features;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, app.featuresAvailable.apply(app, queryRef.current)];\n case 1:\n features = _a.sent();\n if (!isUnmounted) {\n setState(function (currentFeatures) {\n if (JSON.stringify(currentFeatures) === JSON.stringify(features)) {\n return currentFeatures;\n }\n return features;\n });\n }\n return [2 /*return*/];\n }\n });\n }); })();\n return function () {\n isUnmounted = true;\n };\n }, [app]);\n react_1.useEffect(function () {\n queryRef.current = query;\n return refresh();\n }, [JSON.stringify(query)]);\n react_1.useEffect(function () {\n var onRefreshCleanup;\n var unsubscribe = app.subscribe(types_1.Action.UPDATE, function () {\n onRefreshCleanup = refresh();\n });\n return function () {\n unsubscribe();\n onRefreshCleanup === null || onRefreshCleanup === void 0 ? void 0 : onRefreshCleanup();\n };\n }, [app, refresh]);\n return state;\n}\nexports.useFeaturesAvailable = useFeaturesAvailable;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.create = exports.AppLink = exports.update = exports.Action = void 0;\nvar AppLink_1 = require(\"@shopify/app-bridge-core/actions/Link/AppLink\");\nObject.defineProperty(exports, \"AppLink\", { enumerable: true, get: function () { return AppLink_1.AppLink; } });\nvar AppLink_2 = require(\"@shopify/app-bridge-core/actions/Link/AppLink\");\nObject.defineProperty(exports, \"Action\", { enumerable: true, get: function () { return AppLink_2.Action; } });\nObject.defineProperty(exports, \"update\", { enumerable: true, get: function () { return AppLink_2.update; } });\nfunction create(app, options) {\n return new AppLink_1.AppLink(app, options);\n}\nexports.create = create;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getSingleButton = void 0;\nvar Button_1 = require(\"./Button\");\nfunction getSingleButton(action, button, subgroups, updateCb) {\n action.addChild(button, action.group, subgroups);\n action.subscribeToChild(button, Button_1.Action.UPDATE, updateCb);\n return button.payload;\n}\nexports.getSingleButton = getSingleButton;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createTransportListener = exports.fromWindow = exports.fromFrame = exports.Context = void 0;\nvar Error_1 = require(\"./actions/Error\");\nvar validator_1 = require(\"./actions/validator\");\nvar types_1 = require(\"./client/types\");\nvar collection_1 = require(\"./util/collection\");\nvar env_1 = require(\"./util/env\");\nvar Context;\n(function (Context) {\n Context[\"Modal\"] = \"Modal\";\n Context[\"Main\"] = \"Main\";\n})(Context = exports.Context || (exports.Context = {}));\n/**\n * Create a MessageTransport from a Frame.\n * @remarks\n * Used on the host-side to create a postMessage MessageTransport.\n * @beta\n */\nfunction fromFrame(frame, localOrigin, context) {\n var handlers = [];\n var host = frame.host, frameWindow = frame.window;\n if (!host) {\n throw Error_1.fromAction('App frame is undefined', Error_1.AppActionType.WINDOW_UNDEFINED);\n }\n if (env_1.isUnframed && window.MobileWebView) {\n Object.assign(window.MobileWebView, {\n postMessageToIframe: function (message, origin) {\n frameWindow === null || frameWindow === void 0 ? void 0 : frameWindow.postMessage(message, origin);\n if (isDispatchAction(message)) {\n host.postMessage(JSON.stringify(message.payload), location.origin);\n }\n },\n updateIframeUrl: function (newUrl) {\n var currentWindowLocation = window.location;\n var frameWindowLocation = (frame.window || {}).location;\n try {\n var newUrlOrigin = new URL(newUrl).origin;\n if (newUrlOrigin === localOrigin && frameWindowLocation) {\n frameWindowLocation.replace(newUrl);\n }\n else {\n currentWindowLocation.href = newUrl;\n }\n }\n catch (_) {\n // Noop\n }\n },\n });\n }\n host.addEventListener('message', function (event) {\n if (event.source === host || !validator_1.isAppMessage(event)) {\n return;\n }\n if (event.origin !== localOrigin) {\n var errorMessage = \"Message origin '\" + event.origin + \"' does not match app origin '\" + localOrigin + \"'.\";\n var payload = Error_1.invalidOriginAction(errorMessage);\n var message = {\n type: 'dispatch',\n payload: payload,\n };\n frameWindow === null || frameWindow === void 0 ? void 0 : frameWindow.postMessage(message, event.origin);\n return;\n }\n if (env_1.isUnframed && window.MobileWebView) {\n var payload = JSON.stringify({\n id: 'unframed://fromClient',\n origin: localOrigin,\n data: event.data,\n });\n window.MobileWebView.postMessage(payload);\n return;\n }\n for (var _i = 0, handlers_1 = handlers; _i < handlers_1.length; _i++) {\n var handler = handlers_1[_i];\n handler(event);\n }\n });\n return {\n context: context,\n localOrigin: localOrigin,\n frameWindow: frameWindow,\n hostFrame: host,\n dispatch: function (message) {\n frameWindow === null || frameWindow === void 0 ? void 0 : frameWindow.postMessage(message, localOrigin);\n },\n subscribe: function (handler) {\n return collection_1.addAndRemoveFromCollection(handlers, handler);\n },\n };\n}\nexports.fromFrame = fromFrame;\n/**\n * Create a MessageTransport from a parent window.\n * @remarks\n * Used on the client-side to create a postMessage MessageTransport.\n * @internalremarks\n * In unframed mode, message should be dispatched via MobileWebView.postMessage instead of postMessage.\n * @beta\n */\nfunction fromWindow(contentWindow, localOrigin) {\n var handlers = [];\n if (typeof window !== undefined) {\n window.addEventListener('message', function (event) {\n if ((window === contentWindow && !env_1.isUnframed) ||\n event.source !== contentWindow ||\n !(validator_1.isAppBridgeAction(event.data.payload) || validator_1.isAppMessage(event))) {\n return;\n }\n for (var _i = 0, handlers_2 = handlers; _i < handlers_2.length; _i++) {\n var handler = handlers_2[_i];\n handler(event);\n }\n });\n }\n return {\n localOrigin: localOrigin,\n hostFrame: contentWindow,\n dispatch: function (message) {\n var _a;\n if (!((_a = message.source) === null || _a === void 0 ? void 0 : _a.host)) {\n return;\n }\n if (env_1.isUnframed && window && window.MobileWebView) {\n var payload = JSON.stringify({\n id: 'unframed://fromClient',\n origin: localOrigin,\n data: message,\n });\n window.MobileWebView.postMessage(payload);\n return;\n }\n var messageOrigin = new URL(\"https://\" + message.source.host).origin;\n contentWindow.postMessage(message, messageOrigin);\n },\n subscribe: function (handler) {\n return collection_1.addAndRemoveFromCollection(handlers, handler);\n },\n };\n}\nexports.fromWindow = fromWindow;\nfunction createTransportListener() {\n var listeners = [];\n var actionListeners = {};\n function createSubscribeHandler(dispatcher) {\n function subscribe() {\n if (arguments.length < 2) {\n // eslint-disable-next-line prefer-rest-params\n return collection_1.addAndRemoveFromCollection(listeners, { callback: arguments[0] });\n }\n // eslint-disable-next-line prefer-rest-params\n var _a = Array.from(arguments), type = _a[0], callback = _a[1], id = _a[2];\n var actionCallback = { callback: callback, id: id };\n var payload = { type: type, id: id };\n if (!Object.prototype.hasOwnProperty.call(actionListeners, type)) {\n actionListeners[type] = [];\n }\n if (dispatcher) {\n dispatcher(types_1.MessageType.Subscribe, payload);\n }\n return collection_1.addAndRemoveFromCollection(actionListeners[type], actionCallback, function () {\n if (dispatcher) {\n dispatcher(types_1.MessageType.Unsubscribe, payload);\n }\n });\n }\n return subscribe;\n }\n return {\n createSubscribeHandler: createSubscribeHandler,\n handleMessage: function (message) {\n listeners.forEach(function (listener) { return listener.callback(message); });\n },\n handleActionDispatch: function (_a) {\n var type = _a.type, payload = _a.payload;\n var hasCallback = false;\n if (Object.prototype.hasOwnProperty.call(actionListeners, type)) {\n for (var _i = 0, _b = actionListeners[type]; _i < _b.length; _i++) {\n var listener = _b[_i];\n var id = listener.id, callback = listener.callback;\n var matchId = payload && payload.id === id;\n if (matchId || !id) {\n callback(payload);\n hasCallback = true;\n }\n }\n }\n return hasCallback;\n },\n };\n}\nexports.createTransportListener = createTransportListener;\nfunction isDispatchAction(message) {\n return (message !== null &&\n typeof message === 'object' &&\n !Array.isArray(message) &&\n message.type === 'dispatch' &&\n typeof message.payload === 'object');\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar react_1 = require(\"react\");\nvar useAppBridge_1 = require(\"../../useAppBridge\");\nvar router_1 = require(\"./router\");\n/**\n * useRoutePropagation\n *\n * @remarks\n * A hook which keeps the Shopify admin url in sync with the app url\n *\n * @public\n */\nfunction useClientRouting(history) {\n var app = useAppBridge_1.useAppBridge();\n react_1.useEffect(function () {\n return router_1.handleRouteChange(app, history);\n }, [app, history]);\n}\nexports.default = useClientRouting;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AppBridgeContext = void 0;\nvar react_1 = require(\"react\");\n/**\n * App Bridge context.\n *\n * @public\n */\nexports.AppBridgeContext = react_1.createContext(null);\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.capture = exports.openCamera = exports.Scanner = exports.Action = void 0;\nvar helper_1 = require(\"../helper\");\nvar ActionSet_1 = require(\"../ActionSet\");\nvar types_1 = require(\"../types\");\n/**\n * Action Types for the Features group\n * @public\n */\nvar Action;\n(function (Action) {\n Action[\"OPEN_CAMERA\"] = \"APP::SCANNER::OPEN::CAMERA\";\n Action[\"CAPTURE\"] = \"APP::SCANNER::CAPTURE\";\n})(Action = exports.Action || (exports.Action = {}));\n/**\n * A set of Actions for displaying a Camera Scanner component\n * @public\n */\nvar Scanner = /** @class */ (function (_super) {\n __extends(Scanner, _super);\n function Scanner(app, options) {\n return _super.call(this, app, types_1.Group.Scanner, types_1.Group.Scanner, options ? options.id : undefined) || this;\n }\n /**\n * @public\n */\n Scanner.prototype.dispatch = function (action) {\n switch (action) {\n case Action.OPEN_CAMERA:\n this.dispatchScannerAction(Action.OPEN_CAMERA);\n break;\n }\n return this;\n };\n /**\n * @internal\n */\n Scanner.prototype.dispatchScannerAction = function (type) {\n this.app.dispatch(helper_1.actionWrapper({\n type: type,\n group: types_1.Group.Scanner,\n payload: {\n id: this.id,\n },\n }));\n };\n return Scanner;\n}(ActionSet_1.ActionSet));\nexports.Scanner = Scanner;\nfunction openCamera() {\n return helper_1.actionWrapper({\n group: types_1.Group.Scanner,\n type: Action.OPEN_CAMERA,\n });\n}\nexports.openCamera = openCamera;\nfunction capture(payload) {\n return helper_1.actionWrapper({\n group: types_1.Group.Scanner,\n type: Action.CAPTURE,\n payload: payload,\n });\n}\nexports.capture = capture;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar ContextualSaveBar_1 = __importDefault(require(\"./ContextualSaveBar\"));\nexports.default = ContextualSaveBar_1.default;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./actions\"), exports);\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AppLink = exports.update = exports.Action = void 0;\nvar helper_1 = require(\"../../helper\");\nvar ActionSet_1 = require(\"../../ActionSet\");\nvar types_1 = require(\"../../types\");\nvar Redirect_1 = require(\"../../Navigation/Redirect\");\nvar Action;\n(function (Action) {\n Action[\"UPDATE\"] = \"UPDATE\";\n})(Action = exports.Action || (exports.Action = {}));\nfunction update(group, component, updatePayload) {\n var id = component.id;\n var label = updatePayload.label, destination = updatePayload.destination;\n var linkPayload = __assign(__assign({}, updatePayload), { id: id, label: label, destination: destination });\n return helper_1.actionWrapper({\n group: group,\n type: helper_1.getEventNameSpace(group, Action.UPDATE, component),\n payload: linkPayload,\n });\n}\nexports.update = update;\nvar AppLink = /** @class */ (function (_super) {\n __extends(AppLink, _super);\n function AppLink(app, options) {\n var _this = _super.call(this, app, types_1.Group.Link, types_1.Group.Link) || this;\n _this.label = '';\n _this.destination = '';\n _this.set(options, false);\n return _this;\n }\n Object.defineProperty(AppLink.prototype, \"options\", {\n get: function () {\n var _a = this, label = _a.label, destination = _a.destination;\n return {\n label: label,\n destination: destination,\n redirectType: Redirect_1.Action.APP,\n };\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AppLink.prototype, \"payload\", {\n get: function () {\n var _a = this.options, label = _a.label, destination = _a.destination, redirectType = _a.redirectType;\n var path = destination;\n return {\n id: this.id,\n label: label,\n destination: { path: path },\n redirectType: redirectType,\n };\n },\n enumerable: false,\n configurable: true\n });\n AppLink.prototype.set = function (options, shouldUpdate) {\n if (shouldUpdate === void 0) { shouldUpdate = true; }\n var _a = helper_1.getMergedProps(this.options, options), label = _a.label, destination = _a.destination;\n this.label = label;\n this.destination = destination;\n if (shouldUpdate) {\n this.dispatch(Action.UPDATE);\n }\n return this;\n };\n AppLink.prototype.dispatch = function (action) {\n switch (action) {\n case Action.UPDATE: {\n var updateAction = update(this.group, this.component, this.payload);\n this.app.dispatch(updateAction);\n break;\n }\n }\n return this;\n };\n return AppLink;\n}(ActionSet_1.ActionSet));\nexports.AppLink = AppLink;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ContextualSaveBar = exports.update = exports.discard = exports.save = exports.hide = exports.show = exports.Action = void 0;\nvar helper_1 = require(\"../helper\");\nvar ActionSet_1 = require(\"../ActionSet\");\nvar types_1 = require(\"../types\");\n/**\n * ContextualSaveBar action enum\n */\nvar Action;\n(function (Action) {\n Action[\"DISCARD\"] = \"APP::CONTEXTUAL_SAVE_BAR::DISCARD\";\n Action[\"SAVE\"] = \"APP::CONTEXTUAL_SAVE_BAR::SAVE\";\n Action[\"SHOW\"] = \"APP::CONTEXTUAL_SAVE_BAR::SHOW\";\n Action[\"HIDE\"] = \"APP::CONTEXTUAL_SAVE_BAR::HIDE\";\n Action[\"UPDATE\"] = \"APP::CONTEXTUAL_SAVE_BAR::UPDATE\";\n})(Action = exports.Action || (exports.Action = {}));\nfunction createContextBarAction(action, payload) {\n return helper_1.actionWrapper({\n group: types_1.Group.ContextualSaveBar,\n type: action,\n payload: payload,\n });\n}\nfunction show(payload) {\n return createContextBarAction(Action.SHOW, payload);\n}\nexports.show = show;\nfunction hide(payload) {\n return createContextBarAction(Action.HIDE, payload);\n}\nexports.hide = hide;\nfunction save(payload) {\n return createContextBarAction(Action.SAVE, payload);\n}\nexports.save = save;\nfunction discard(payload) {\n return createContextBarAction(Action.DISCARD, payload);\n}\nexports.discard = discard;\nfunction update(payload) {\n return createContextBarAction(Action.UPDATE, payload);\n}\nexports.update = update;\n/**\n * ContextualSaveBar action set\n */\nvar ContextualSaveBar = /** @class */ (function (_super) {\n __extends(ContextualSaveBar, _super);\n /**\n * Returns a new instance of a ContextualSaveBar action set\n * @param app the client application\n */\n function ContextualSaveBar(app, options) {\n if (options === void 0) { options = {}; }\n var _this = _super.call(this, app, types_1.Group.ContextualSaveBar, types_1.Group.ContextualSaveBar) || this;\n _this.options = options;\n _this.set(options, false);\n return _this;\n }\n Object.defineProperty(ContextualSaveBar.prototype, \"payload\", {\n /**\n * Returns the action set payload\n */\n get: function () {\n return __assign({ id: this.id }, this.options);\n },\n enumerable: false,\n configurable: true\n });\n ContextualSaveBar.prototype.set = function (options, shouldUpdate) {\n if (shouldUpdate === void 0) { shouldUpdate = true; }\n var mergedOptions = helper_1.getMergedProps(this.options, options);\n this.options = mergedOptions;\n if (shouldUpdate) {\n this.dispatch(Action.UPDATE);\n }\n return this;\n };\n /**\n * Dispatches a given action with the action set payload\n * @param action the action enum\n * @returns the action set instance\n */\n ContextualSaveBar.prototype.dispatch = function (action) {\n this.app.dispatch(createContextBarAction(action, this.payload));\n return this;\n };\n return ContextualSaveBar;\n}(ActionSet_1.ActionSet));\nexports.ContextualSaveBar = ContextualSaveBar;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./modal\"), exports);\n__exportStar(require(\"./platform\"), exports);\n__exportStar(require(\"./session-token\"), exports);\n__exportStar(require(\"./authorization-code\"), exports);\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar NavigationMenu_1 = __importDefault(require(\"./NavigationMenu\"));\nexports.default = NavigationMenu_1.default;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar ResourcePicker_1 = __importDefault(require(\"./ResourcePicker\"));\nexports.default = ResourcePicker_1.default;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Features = void 0;\nvar helper_1 = require(\"../helper\");\nvar ActionSet_1 = require(\"../ActionSet\");\nvar types_1 = require(\"../types\");\nvar types_2 = require(\"./types\");\n/**\n * A set of Actions for Updating, Requesting Features of AppBridge\n * @public\n */\nvar Features = /** @class */ (function (_super) {\n __extends(Features, _super);\n function Features(app, options) {\n return _super.call(this, app, types_1.Group.Features, types_1.Group.Features, options ? options.id : undefined) || this;\n }\n /**\n * @public\n */\n Features.prototype.dispatch = function (action, payload) {\n switch (action) {\n case types_2.Action.REQUEST:\n this.dispatchFeaturesAction(types_2.Action.REQUEST, payload);\n break;\n }\n return this;\n };\n /**\n * @internal\n */\n Features.prototype.dispatchFeaturesAction = function (type, payload) {\n this.app.dispatch(helper_1.actionWrapper({\n group: types_1.Group.Features,\n type: type,\n payload: __assign(__assign({}, (payload || {})), { id: this.id }),\n }));\n };\n return Features;\n}(ActionSet_1.ActionSet));\nexports.Features = Features;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ModalContent = exports.Action = void 0;\nvar helper_1 = require(\"../../helper\");\nvar ActionSet_1 = require(\"../../ActionSet\");\nvar types_1 = require(\"../../types\");\nvar index_1 = require(\"../index\");\nvar Action;\n(function (Action) {\n Action[\"LOADING\"] = \"LOADING\";\n Action[\"LOADED\"] = \"LOADED\";\n})(Action = exports.Action || (exports.Action = {}));\n/**\n * A set of Actions for updating the modal component\n * @public\n */\nvar ModalContent = /** @class */ (function (_super) {\n __extends(ModalContent, _super);\n function ModalContent(app, options) {\n return _super.call(this, app, types_1.Group.Modal, types_1.Group.Modal, options ? options.id : undefined) || this;\n }\n ModalContent.prototype.loaded = function () {\n this.dispatch(Action.LOADED);\n };\n ModalContent.prototype.loading = function () {\n this.dispatch(Action.LOADING);\n };\n /**\n * @private\n */\n ModalContent.prototype.dispatch = function (action) {\n switch (action) {\n case Action.LOADED:\n this.dispatchModalAction(index_1.Action.UPDATE_CONTENT, { loading: false });\n break;\n case Action.LOADING:\n this.dispatchModalAction(index_1.Action.UPDATE_CONTENT, { loading: true });\n break;\n }\n return this;\n };\n /**\n * @internal\n */\n ModalContent.prototype.dispatchModalAction = function (type, payload) {\n return __awaiter(this, void 0, void 0, function () {\n var updateAction;\n return __generator(this, function (_a) {\n updateAction = helper_1.actionWrapper({\n type: type,\n group: types_1.Group.Modal,\n payload: __assign({}, payload),\n });\n this.app.dispatch(updateAction);\n return [2 /*return*/];\n });\n });\n };\n return ModalContent;\n}(ActionSet_1.ActionSet));\nexports.ModalContent = ModalContent;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.create = exports.setLineItemProperties = exports.removeLineItemDiscount = exports.setLineItemDiscount = exports.removeLineItem = exports.updateLineItem = exports.addLineItem = exports.removeProperties = exports.setProperties = exports.setDiscount = exports.updateCustomerAddress = exports.addCustomerAddress = exports.setCustomer = exports.update = exports.fetch = exports.Cart = exports.Action = void 0;\nvar Cart_1 = require(\"@shopify/app-bridge-core/actions/Cart\");\nObject.defineProperty(exports, \"Action\", { enumerable: true, get: function () { return Cart_1.Action; } });\nObject.defineProperty(exports, \"Cart\", { enumerable: true, get: function () { return Cart_1.Cart; } });\nObject.defineProperty(exports, \"fetch\", { enumerable: true, get: function () { return Cart_1.fetch; } });\nObject.defineProperty(exports, \"update\", { enumerable: true, get: function () { return Cart_1.update; } });\nObject.defineProperty(exports, \"setCustomer\", { enumerable: true, get: function () { return Cart_1.setCustomer; } });\nObject.defineProperty(exports, \"addCustomerAddress\", { enumerable: true, get: function () { return Cart_1.addCustomerAddress; } });\nObject.defineProperty(exports, \"updateCustomerAddress\", { enumerable: true, get: function () { return Cart_1.updateCustomerAddress; } });\nObject.defineProperty(exports, \"setDiscount\", { enumerable: true, get: function () { return Cart_1.setDiscount; } });\nObject.defineProperty(exports, \"setProperties\", { enumerable: true, get: function () { return Cart_1.setProperties; } });\nObject.defineProperty(exports, \"removeProperties\", { enumerable: true, get: function () { return Cart_1.removeProperties; } });\nObject.defineProperty(exports, \"addLineItem\", { enumerable: true, get: function () { return Cart_1.addLineItem; } });\nObject.defineProperty(exports, \"updateLineItem\", { enumerable: true, get: function () { return Cart_1.updateLineItem; } });\nObject.defineProperty(exports, \"removeLineItem\", { enumerable: true, get: function () { return Cart_1.removeLineItem; } });\nObject.defineProperty(exports, \"setLineItemDiscount\", { enumerable: true, get: function () { return Cart_1.setLineItemDiscount; } });\nObject.defineProperty(exports, \"removeLineItemDiscount\", { enumerable: true, get: function () { return Cart_1.removeLineItemDiscount; } });\nObject.defineProperty(exports, \"setLineItemProperties\", { enumerable: true, get: function () { return Cart_1.setLineItemProperties; } });\nfunction create(app, options) {\n return new Cart_1.Cart(app, options);\n}\nexports.create = create;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.useContextualSaveBar = void 0;\nvar useContextualSaveBar_1 = require(\"./useContextualSaveBar\");\nObject.defineProperty(exports, \"useContextualSaveBar\", { enumerable: true, get: function () { return useContextualSaveBar_1.useContextualSaveBar; } });\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ResourcePicker = exports.update = exports.close = exports.cancel = exports.open = exports.select = exports.ActionVerb = exports.ResourceType = exports.ProductStatus = exports.ProductVariantInventoryManagement = exports.ProductVariantInventoryPolicy = exports.WeightUnit = exports.FulfillmentServiceType = exports.CollectionSortOrder = exports.Action = void 0;\nvar helper_1 = require(\"../helper\");\nvar ActionSet_1 = require(\"../ActionSet\");\nvar types_1 = require(\"../types\");\nvar Action;\n(function (Action) {\n Action[\"OPEN\"] = \"APP::RESOURCE_PICKER::OPEN\";\n Action[\"SELECT\"] = \"APP::RESOURCE_PICKER::SELECT\";\n // Deprecated in 0.5.0 use 'APP::RESOURCE_PICKER::CANCEL' instead\n Action[\"CLOSE\"] = \"APP::RESOURCE_PICKER::CLOSE\";\n Action[\"UPDATE\"] = \"APP::RESOURCE_PICKER::UPDATE\";\n Action[\"CANCEL\"] = \"APP::RESOURCE_PICKER::CANCEL\";\n})(Action = exports.Action || (exports.Action = {}));\nvar CollectionSortOrder;\n(function (CollectionSortOrder) {\n CollectionSortOrder[\"Manual\"] = \"MANUAL\";\n CollectionSortOrder[\"BestSelling\"] = \"BEST_SELLING\";\n CollectionSortOrder[\"AlphaAsc\"] = \"ALPHA_ASC\";\n CollectionSortOrder[\"AlphaDesc\"] = \"ALPHA_DESC\";\n CollectionSortOrder[\"PriceDesc\"] = \"PRICE_DESC\";\n CollectionSortOrder[\"PriceAsc\"] = \"PRICE_ASC\";\n CollectionSortOrder[\"CreatedDesc\"] = \"CREATED_DESC\";\n CollectionSortOrder[\"Created\"] = \"CREATED\";\n CollectionSortOrder[\"MostRelevant\"] = \"MOST_RELEVANT\";\n})(CollectionSortOrder = exports.CollectionSortOrder || (exports.CollectionSortOrder = {}));\nvar FulfillmentServiceType;\n(function (FulfillmentServiceType) {\n FulfillmentServiceType[\"GiftCard\"] = \"GIFT_CARD\";\n FulfillmentServiceType[\"Manual\"] = \"MANUAL\";\n FulfillmentServiceType[\"ThirdParty\"] = \"THIRD_PARTY\";\n})(FulfillmentServiceType = exports.FulfillmentServiceType || (exports.FulfillmentServiceType = {}));\nvar WeightUnit;\n(function (WeightUnit) {\n WeightUnit[\"Kilograms\"] = \"KILOGRAMS\";\n WeightUnit[\"Grams\"] = \"GRAMS\";\n WeightUnit[\"Pounds\"] = \"POUNDS\";\n WeightUnit[\"Ounces\"] = \"OUNCES\";\n})(WeightUnit = exports.WeightUnit || (exports.WeightUnit = {}));\nvar ProductVariantInventoryPolicy;\n(function (ProductVariantInventoryPolicy) {\n ProductVariantInventoryPolicy[\"Deny\"] = \"DENY\";\n ProductVariantInventoryPolicy[\"Continue\"] = \"CONTINUE\";\n})(ProductVariantInventoryPolicy = exports.ProductVariantInventoryPolicy || (exports.ProductVariantInventoryPolicy = {}));\nvar ProductVariantInventoryManagement;\n(function (ProductVariantInventoryManagement) {\n ProductVariantInventoryManagement[\"Shopify\"] = \"SHOPIFY\";\n ProductVariantInventoryManagement[\"NotManaged\"] = \"NOT_MANAGED\";\n ProductVariantInventoryManagement[\"FulfillmentService\"] = \"FULFILLMENT_SERVICE\";\n})(ProductVariantInventoryManagement = exports.ProductVariantInventoryManagement || (exports.ProductVariantInventoryManagement = {}));\nvar ProductStatus;\n(function (ProductStatus) {\n ProductStatus[\"Active\"] = \"ACTIVE\";\n ProductStatus[\"Archived\"] = \"ARCHIVED\";\n ProductStatus[\"Draft\"] = \"DRAFT\";\n})(ProductStatus = exports.ProductStatus || (exports.ProductStatus = {}));\nvar ResourceType;\n(function (ResourceType) {\n ResourceType[\"Product\"] = \"product\";\n ResourceType[\"ProductVariant\"] = \"variant\";\n ResourceType[\"Collection\"] = \"collection\";\n})(ResourceType = exports.ResourceType || (exports.ResourceType = {}));\nvar ActionVerb;\n(function (ActionVerb) {\n ActionVerb[\"Add\"] = \"add\";\n ActionVerb[\"Select\"] = \"select\";\n})(ActionVerb = exports.ActionVerb || (exports.ActionVerb = {}));\nfunction select(payload) {\n return helper_1.actionWrapper({\n payload: payload,\n group: types_1.Group.ResourcePicker,\n type: Action.SELECT,\n });\n}\nexports.select = select;\nfunction open(payload) {\n return helper_1.actionWrapper({\n payload: payload,\n group: types_1.Group.ResourcePicker,\n type: Action.OPEN,\n });\n}\nexports.open = open;\nfunction cancel(payload) {\n return helper_1.actionWrapper({\n payload: payload,\n group: types_1.Group.ResourcePicker,\n type: Action.CANCEL,\n });\n}\nexports.cancel = cancel;\nfunction close(payload) {\n return helper_1.actionWrapper({\n payload: payload,\n group: types_1.Group.ResourcePicker,\n type: Action.CANCEL,\n });\n}\nexports.close = close;\nfunction update(payload) {\n return helper_1.actionWrapper({\n payload: payload,\n group: types_1.Group.ResourcePicker,\n type: Action.UPDATE,\n });\n}\nexports.update = update;\nvar ResourcePicker = /** @class */ (function (_super) {\n __extends(ResourcePicker, _super);\n function ResourcePicker(app, options, resourceType) {\n var _this = _super.call(this, app, types_1.Group.ResourcePicker, types_1.Group.ResourcePicker) || this;\n _this.initialSelectionIds = [];\n _this.selection = [];\n _this.resourceType = resourceType;\n _this.set(options, false);\n return _this;\n }\n Object.defineProperty(ResourcePicker.prototype, \"payload\", {\n get: function () {\n return __assign(__assign({}, this.options), { id: this.id, resourceType: this.resourceType });\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ResourcePicker.prototype, \"options\", {\n get: function () {\n var options = {\n initialQuery: this.initialQuery,\n selectMultiple: this.selectMultiple,\n initialSelectionIds: this.initialSelectionIds,\n showHidden: this.showHidden,\n actionVerb: this.actionVerb,\n };\n if (this.resourceType === ResourceType.Product) {\n var productOptions = __assign(__assign({}, options), { showVariants: this.showVariants, showDraft: this.showDraft, showArchived: this.showArchived, showDraftBadge: this.showDraftBadge, showArchivedBadge: this.showArchivedBadge });\n return productOptions;\n }\n return options;\n },\n enumerable: false,\n configurable: true\n });\n ResourcePicker.prototype.set = function (options, shouldUpdate) {\n if (shouldUpdate === void 0) { shouldUpdate = true; }\n var mergedOptions = helper_1.getMergedProps(this.options, options);\n var initialQuery = mergedOptions.initialQuery, _a = mergedOptions.initialSelectionIds, initialSelectionIds = _a === void 0 ? [] : _a, _b = mergedOptions.showHidden, showHidden = _b === void 0 ? true : _b, _c = mergedOptions.showVariants, showVariants = _c === void 0 ? true : _c, _d = mergedOptions.showDraft, showDraft = _d === void 0 ? true : _d, _e = mergedOptions.showArchived, showArchived = _e === void 0 ? true : _e, _f = mergedOptions.showDraftBadge, showDraftBadge = _f === void 0 ? false : _f, _g = mergedOptions.showArchivedBadge, showArchivedBadge = _g === void 0 ? false : _g, _h = mergedOptions.selectMultiple, selectMultiple = _h === void 0 ? true : _h, _j = mergedOptions.actionVerb, actionVerb = _j === void 0 ? ActionVerb.Add : _j;\n this.initialQuery = initialQuery;\n this.initialSelectionIds = initialSelectionIds;\n this.showHidden = showHidden;\n this.showVariants = showVariants;\n this.showDraft = showDraft;\n this.showArchived = showArchived;\n this.showDraftBadge = showDraftBadge;\n this.showArchivedBadge = showArchivedBadge;\n this.selectMultiple = selectMultiple;\n this.actionVerb = actionVerb;\n if (shouldUpdate) {\n this.update();\n }\n return this;\n };\n ResourcePicker.prototype.dispatch = function (action, selection) {\n if (action === Action.OPEN) {\n this.open();\n }\n else if (action === Action.UPDATE) {\n this.update();\n }\n else if (action === Action.CLOSE || action === Action.CANCEL) {\n this.cancel();\n }\n else if (action === Action.SELECT) {\n this.selection = selection;\n this.app.dispatch(select({ id: this.id, selection: this.selection }));\n }\n return this;\n };\n ResourcePicker.prototype.update = function () {\n this.app.dispatch(update(this.payload));\n };\n ResourcePicker.prototype.open = function () {\n this.app.dispatch(open(this.payload));\n };\n ResourcePicker.prototype.cancel = function () {\n this.app.dispatch(cancel({ id: this.id }));\n };\n ResourcePicker.prototype.close = function () {\n this.cancel();\n };\n return ResourcePicker;\n}(ActionSet_1.ActionSet));\nexports.ResourcePicker = ResourcePicker;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.useAppBridge = exports.Context = void 0;\nvar context_1 = require(\"./context\");\nObject.defineProperty(exports, \"Context\", { enumerable: true, get: function () { return context_1.AppBridgeContext; } });\nvar useAppBridge_1 = require(\"./useAppBridge\");\nObject.defineProperty(exports, \"useAppBridge\", { enumerable: true, get: function () { return useAppBridge_1.useAppBridge; } });\n__exportStar(require(\"./components\"), exports);\n__exportStar(require(\"./hooks\"), exports);\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Redirect = exports.isProductVariantResourcePayload = exports.isCreateResourcePayload = exports.isAdminSection = exports.isRemotePayload = exports.isAdminSectionPayload = exports.isAdminPathPayload = exports.isAppPayload = exports.getRelativePath = exports.normalizeUrl = exports.getPathWithSearchAndHash = exports.toDestination = exports.toApp = exports.toRemote = exports.toAdminSection = exports.toAdminPath = exports.isResourcePayload = exports.ResourceType = exports.Action = void 0;\nvar helper_1 = require(\"../../helper\");\nvar ActionSet_1 = require(\"../../ActionSet\");\nvar types_1 = require(\"../../types\");\nvar Action;\n(function (Action) {\n Action[\"ADMIN_SECTION\"] = \"APP::NAVIGATION::REDIRECT::ADMIN::SECTION\";\n Action[\"ADMIN_PATH\"] = \"APP::NAVIGATION::REDIRECT::ADMIN::PATH\";\n Action[\"REMOTE\"] = \"APP::NAVIGATION::REDIRECT::REMOTE\";\n Action[\"APP\"] = \"APP::NAVIGATION::REDIRECT::APP\";\n})(Action = exports.Action || (exports.Action = {}));\nvar ResourceType;\n(function (ResourceType) {\n ResourceType[\"Product\"] = \"products\";\n ResourceType[\"Collection\"] = \"collections\";\n ResourceType[\"Order\"] = \"orders\";\n ResourceType[\"Customer\"] = \"customers\";\n ResourceType[\"Discount\"] = \"discounts\";\n})(ResourceType = exports.ResourceType || (exports.ResourceType = {}));\nfunction isResourcePayload(resource) {\n // tslint:disable-next-line:no-boolean-literal-compare\n return typeof resource.id === 'string';\n}\nexports.isResourcePayload = isResourcePayload;\nfunction toAdminPath(payload) {\n return helper_1.actionWrapper({\n payload: payload,\n group: types_1.Group.Navigation,\n type: Action.ADMIN_PATH,\n });\n}\nexports.toAdminPath = toAdminPath;\nfunction toAdminSection(payload) {\n return helper_1.actionWrapper({\n payload: payload,\n group: types_1.Group.Navigation,\n type: Action.ADMIN_SECTION,\n });\n}\nexports.toAdminSection = toAdminSection;\nfunction toRemote(payload) {\n return helper_1.actionWrapper({\n payload: payload,\n group: types_1.Group.Navigation,\n type: Action.REMOTE,\n });\n}\nexports.toRemote = toRemote;\nfunction toApp(payload) {\n return helper_1.actionWrapper({\n payload: payload,\n group: types_1.Group.Navigation,\n type: Action.APP,\n });\n}\nexports.toApp = toApp;\nfunction toDestination(action, payload, id) {\n switch (action) {\n case Action.APP: {\n var appPayload = isAppPayload(payload) ? payload : { path: payload };\n return toApp(__assign({ id: id }, appPayload));\n }\n case Action.ADMIN_PATH: {\n var adminPathPayload = isAdminPathPayload(payload) ? payload : { path: payload };\n return toAdminPath(__assign({ id: id }, adminPathPayload));\n }\n case Action.ADMIN_SECTION: {\n var adminSectionPayload = isAdminSectionPayload(payload)\n ? payload\n : { section: payload };\n return toAdminSection(__assign({ id: id }, adminSectionPayload));\n }\n case Action.REMOTE: {\n var remotePayload = isRemotePayload(payload) ? payload : { url: payload };\n return toRemote(__assign({ id: id }, remotePayload));\n }\n }\n}\nexports.toDestination = toDestination;\nfunction getPathWithSearchAndHash(_a) {\n var pathname = _a.pathname, search = _a.search, hash = _a.hash;\n return \"\" + pathname + (search || '') + (hash || '');\n}\nexports.getPathWithSearchAndHash = getPathWithSearchAndHash;\nfunction normalizeUrl(to) {\n if (to instanceof URL) {\n return to.toString();\n }\n if (typeof to === 'string') {\n return to;\n }\n return getRelativePath(to);\n}\nexports.normalizeUrl = normalizeUrl;\nfunction getRelativePath(to) {\n if (typeof to === 'string') {\n if (to.startsWith('/')) {\n return to;\n }\n return getPathWithSearchAndHash(new URL(to));\n }\n var search = to.search instanceof URLSearchParams ? to.search.toString() : to.search;\n return getPathWithSearchAndHash(__assign(__assign({}, to), { search: search }));\n}\nexports.getRelativePath = getRelativePath;\nfunction isAppPayload(payload) {\n return typeof payload === 'object' && Object.prototype.hasOwnProperty.call(payload, 'path');\n}\nexports.isAppPayload = isAppPayload;\nfunction isAdminPathPayload(payload) {\n return typeof payload === 'object' && Object.prototype.hasOwnProperty.call(payload, 'path');\n}\nexports.isAdminPathPayload = isAdminPathPayload;\nfunction isAdminSectionPayload(payload) {\n return (typeof payload === 'object' &&\n typeof payload.section === 'object' &&\n Object.prototype.hasOwnProperty.call(payload.section, 'name'));\n}\nexports.isAdminSectionPayload = isAdminSectionPayload;\nfunction isRemotePayload(payload) {\n return typeof payload === 'object' && Object.prototype.hasOwnProperty.call(payload, 'url');\n}\nexports.isRemotePayload = isRemotePayload;\nfunction isAdminSection(to) {\n return typeof to === 'object' && typeof (to === null || to === void 0 ? void 0 : to.name) === 'string';\n}\nexports.isAdminSection = isAdminSection;\nfunction isCreateResourcePayload(resource) {\n // tslint:disable-next-line:no-boolean-literal-compare\n return resource.create === true;\n}\nexports.isCreateResourcePayload = isCreateResourcePayload;\nfunction isProductVariantResourcePayload(resource) {\n var castResource = resource;\n // tslint:disable-next-line:no-boolean-literal-compare\n return castResource.id !== undefined && castResource.variant !== undefined;\n}\nexports.isProductVariantResourcePayload = isProductVariantResourcePayload;\nvar Redirect = /** @class */ (function (_super) {\n __extends(Redirect, _super);\n function Redirect(app) {\n return _super.call(this, app, 'Redirect', types_1.Group.Navigation) || this;\n }\n Object.defineProperty(Redirect.prototype, \"payload\", {\n get: function () {\n return { id: this.id };\n },\n enumerable: false,\n configurable: true\n });\n Redirect.prototype.dispatch = function (action, payload) {\n var redirectAction = toDestination(action, payload, this.payload.id);\n this.app.dispatch(redirectAction);\n return this;\n };\n return Redirect;\n}(ActionSet_1.ActionSet));\nexports.Redirect = Redirect;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.create = exports.unstable_Picker = exports.update = exports.select = exports.search = exports.open = exports.loadMore = exports.cancel = exports.ALL_RESOURCE_VERTICAL_ALIGNMENT = exports.ALL_MEDIA_KINDS = exports.ALL_BADGE_STATUSES = exports.ALL_BADGE_PROGRESSES = exports.Action = void 0;\nvar Picker_1 = require(\"@shopify/app-bridge-core/actions/Picker\");\nObject.defineProperty(exports, \"unstable_Picker\", { enumerable: true, get: function () { return Picker_1.unstable_Picker; } });\nvar Picker_2 = require(\"@shopify/app-bridge-core/actions/Picker\");\nObject.defineProperty(exports, \"Action\", { enumerable: true, get: function () { return Picker_2.Action; } });\nObject.defineProperty(exports, \"ALL_BADGE_PROGRESSES\", { enumerable: true, get: function () { return Picker_2.ALL_BADGE_PROGRESSES; } });\nObject.defineProperty(exports, \"ALL_BADGE_STATUSES\", { enumerable: true, get: function () { return Picker_2.ALL_BADGE_STATUSES; } });\nObject.defineProperty(exports, \"ALL_MEDIA_KINDS\", { enumerable: true, get: function () { return Picker_2.ALL_MEDIA_KINDS; } });\nObject.defineProperty(exports, \"ALL_RESOURCE_VERTICAL_ALIGNMENT\", { enumerable: true, get: function () { return Picker_2.ALL_RESOURCE_VERTICAL_ALIGNMENT; } });\nObject.defineProperty(exports, \"cancel\", { enumerable: true, get: function () { return Picker_2.cancel; } });\nObject.defineProperty(exports, \"loadMore\", { enumerable: true, get: function () { return Picker_2.loadMore; } });\nObject.defineProperty(exports, \"open\", { enumerable: true, get: function () { return Picker_2.open; } });\nObject.defineProperty(exports, \"search\", { enumerable: true, get: function () { return Picker_2.search; } });\nObject.defineProperty(exports, \"select\", { enumerable: true, get: function () { return Picker_2.select; } });\nObject.defineProperty(exports, \"update\", { enumerable: true, get: function () { return Picker_2.update; } });\nvar create = function (app, options) {\n // eslint-disable-next-line @babel/new-cap\n return new Picker_1.unstable_Picker(app, options);\n};\nexports.create = create;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar ModalContent_1 = __importDefault(require(\"./ModalContent\"));\nexports.default = ModalContent_1.default;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.updateActionFromPayload = exports.isValidOptionalString = exports.isValidOptionalNumber = exports.forEachInEnum = exports.getMergedProps = exports.findMatchInEnum = exports.getEventNameSpace = exports.NonSnakeCaseGroup = exports.actionWrapper = void 0;\nvar merge_1 = __importDefault(require(\"./merge\"));\nvar constants_1 = require(\"./constants\");\nvar types_1 = require(\"./types\");\nfunction actionWrapper(action) {\n return action;\n}\nexports.actionWrapper = actionWrapper;\nexports.NonSnakeCaseGroup = [\n types_1.Group.AuthCode,\n types_1.Group.Button,\n types_1.Group.ButtonGroup,\n types_1.Group.Cart,\n types_1.Group.Error,\n types_1.Group.Features,\n types_1.Group.Fullscreen,\n types_1.Group.Link,\n types_1.Group.Loading,\n types_1.Group.Menu,\n types_1.Group.Modal,\n types_1.Group.Navigation,\n types_1.Group.Pos,\n types_1.Group.Print,\n types_1.Group.ResourcePicker,\n types_1.Group.Scanner,\n types_1.Group.SessionToken,\n types_1.Group.Share,\n types_1.Group.TitleBar,\n types_1.Group.Toast,\n types_1.Group.unstable_Picker,\n];\nfunction camelCaseToSnakeCase(value) {\n return value.replace(/([A-Z])/g, function (matcher, _val, index) {\n return \"\" + (index === 0 ? '' : '_') + matcher[0].toLowerCase();\n });\n}\n/**\n * Maps the group name to its event name\n * @internal\n * @remarks - This method is necessary for the new pattern of using snake case\n * which makes it more readable and easier to reconstruct the group from an event name.\n * Example: `ContextualSaveBar` becomes `CONTEXTUAL_SAVE_BAR`\n * */\nfunction groupToEventNameSpace(group) {\n if (exports.NonSnakeCaseGroup.includes(group)) {\n return group.toUpperCase();\n }\n return camelCaseToSnakeCase(group).toUpperCase();\n}\n/**\n * Returns full event name with prefix, group, subgroups and type formatted with separators\n * @internal\n * */\nfunction getEventNameSpace(group, eventName, component) {\n if (eventName.startsWith(\"\" + constants_1.PREFIX + constants_1.SEPARATOR)) {\n return eventName;\n }\n var eventNameSpace = groupToEventNameSpace(group);\n if (component) {\n var subgroups_1 = component.subgroups, type = component.type;\n if (subgroups_1 && subgroups_1.length > 0) {\n eventNameSpace += eventNameSpace.length > 0 ? constants_1.SEPARATOR : '';\n subgroups_1.forEach(function (subgroup, index) {\n eventNameSpace += \"\" + subgroup.toUpperCase() + (index < subgroups_1.length - 1 ? constants_1.SEPARATOR : '');\n });\n }\n if (type !== group && type) {\n eventNameSpace += \"\" + (eventNameSpace.length > 0 ? constants_1.SEPARATOR : '') + type.toUpperCase();\n }\n }\n if (eventNameSpace) {\n eventNameSpace += \"\" + (eventNameSpace.length > 0 ? constants_1.SEPARATOR : '') + eventName.toUpperCase();\n }\n return \"\" + constants_1.PREFIX + constants_1.SEPARATOR + eventNameSpace;\n}\nexports.getEventNameSpace = getEventNameSpace;\nfunction findMatchInEnum(types, lookup) {\n var match = Object.keys(types).find(function (key) {\n return lookup === types[key];\n });\n return match ? types[match] : undefined;\n}\nexports.findMatchInEnum = findMatchInEnum;\nfunction getMergedProps(props, newProps) {\n var merged = merge_1.default(props, newProps);\n if (!merged) {\n // tslint:disable-next-line:prefer-object-spread\n var cloned = Object.assign(props, newProps);\n return cloned;\n }\n return merged;\n}\nexports.getMergedProps = getMergedProps;\nfunction forEachInEnum(types, callback) {\n Object.keys(types).forEach(function (key) {\n callback(types[key]);\n });\n}\nexports.forEachInEnum = forEachInEnum;\nfunction isValidOptionalNumber(value) {\n return value === null || value === undefined || typeof value === 'number';\n}\nexports.isValidOptionalNumber = isValidOptionalNumber;\nfunction isValidOptionalString(value) {\n return value === null || value === undefined || typeof value === 'string';\n}\nexports.isValidOptionalString = isValidOptionalString;\nfunction updateActionFromPayload(action, newProps) {\n var id = action.id;\n if (id === newProps.id) {\n // Merge new properties\n Object.assign(action, getMergedProps(action, newProps));\n return true;\n }\n return false;\n}\nexports.updateActionFromPayload = updateActionFromPayload;\n","\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ResourceType = exports.ActionVerb = void 0;\nvar react_1 = require(\"react\");\nvar ResourcePicker_1 = require(\"@shopify/app-bridge/actions/ResourcePicker\");\nObject.defineProperty(exports, \"ActionVerb\", { enumerable: true, get: function () { return ResourcePicker_1.ActionVerb; } });\nObject.defineProperty(exports, \"ResourceType\", { enumerable: true, get: function () { return ResourcePicker_1.ResourceType; } });\nvar useAppBridge_1 = require(\"../../useAppBridge\");\n/**\n * ResourcePicker component\n *\n * @remarks\n * React component which wraps the Shopify App Bridge ResourcePicker action.\n *\n * @public\n */\nfunction ResourcePicker(_a) {\n var open = _a.open, resourceType = _a.resourceType, onSelection = _a.onSelection, onCancel = _a.onCancel, allowMultiple = _a.allowMultiple, selectMultiple = _a.selectMultiple, props = __rest(_a, [\"open\", \"resourceType\", \"onSelection\", \"onCancel\", \"allowMultiple\", \"selectMultiple\"]);\n var options = react_1.useMemo(function () { return (__assign(__assign({}, props), { selectMultiple: selectMultiple !== null && selectMultiple !== void 0 ? selectMultiple : allowMultiple })); }, [allowMultiple, props, selectMultiple]);\n var app = useAppBridge_1.useAppBridge();\n var isUnmountedRef = react_1.useRef(false);\n react_1.useEffect(function () { return function () {\n isUnmountedRef.current = true;\n }; }, []);\n var openRef = react_1.useRef(false);\n var optionsRef = react_1.useRef(options);\n var picker = react_1.useMemo(function () {\n return ResourcePicker_1.create(app, {\n resourceType: ResourcePicker_1.ResourceType[resourceType],\n options: optionsRef.current,\n });\n }, [app, resourceType]);\n react_1.useEffect(function () {\n openRef.current = false;\n return function () {\n if (openRef.current && isUnmountedRef.current) {\n picker.dispatch(ResourcePicker_1.Action.CANCEL);\n }\n };\n }, [picker]);\n var focusReturnPointRef = react_1.useRef(null);\n var storeFocusReturnPoint = react_1.useCallback(function () {\n if (document.activeElement instanceof HTMLElement) {\n focusReturnPointRef.current = document.activeElement;\n }\n }, []);\n var applyFocusReturnPoint = react_1.useCallback(function () {\n var focusReturnPoint = focusReturnPointRef.current;\n focusReturnPointRef.current = null;\n if (focusReturnPoint && document.contains(focusReturnPoint)) {\n focusReturnPoint.focus();\n }\n }, []);\n react_1.useEffect(function () {\n if (open === openRef.current)\n return;\n openRef.current = open;\n if (open) {\n picker.dispatch(ResourcePicker_1.Action.OPEN);\n storeFocusReturnPoint();\n }\n else {\n picker.dispatch(ResourcePicker_1.Action.CLOSE);\n applyFocusReturnPoint();\n }\n }, [picker, open, storeFocusReturnPoint, applyFocusReturnPoint]);\n react_1.useEffect(function () {\n if (!onSelection)\n return;\n return picker.subscribe(ResourcePicker_1.Action.SELECT, function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n openRef.current = false;\n applyFocusReturnPoint();\n return onSelection.apply(void 0, args);\n });\n }, [picker, onSelection, applyFocusReturnPoint]);\n react_1.useEffect(function () {\n if (!onCancel)\n return;\n return picker.subscribe(ResourcePicker_1.Action.CANCEL, function () {\n openRef.current = false;\n applyFocusReturnPoint();\n return onCancel();\n });\n }, [picker, onCancel, applyFocusReturnPoint]);\n react_1.useEffect(function () {\n var shouldUpdate = JSON.stringify(options) !== JSON.stringify(optionsRef.current);\n if (!shouldUpdate)\n return;\n optionsRef.current = options;\n picker.set(options);\n }, [picker, options]);\n return null;\n}\nexports.default = ResourcePicker;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ComponentType = exports.Group = void 0;\n/**\n * Various action groups.\n * @public\n */\nvar Group;\n(function (Group) {\n Group[\"AuthCode\"] = \"AuthCode\";\n Group[\"Button\"] = \"Button\";\n Group[\"ButtonGroup\"] = \"ButtonGroup\";\n Group[\"Cart\"] = \"Cart\";\n Group[\"Client\"] = \"Client\";\n Group[\"ContextualSaveBar\"] = \"ContextualSaveBar\";\n Group[\"Error\"] = \"Error\";\n Group[\"Features\"] = \"Features\";\n Group[\"FeedbackModal\"] = \"FeedbackModal\";\n Group[\"Fullscreen\"] = \"Fullscreen\";\n Group[\"LeaveConfirmation\"] = \"LeaveConfirmation\";\n Group[\"Link\"] = \"Link\";\n Group[\"Loading\"] = \"Loading\";\n Group[\"Menu\"] = \"Menu\";\n Group[\"Modal\"] = \"Modal\";\n Group[\"Navigation\"] = \"Navigation\";\n Group[\"Performance\"] = \"Performance\";\n Group[\"Pos\"] = \"Pos\";\n Group[\"Print\"] = \"Print\";\n Group[\"ResourcePicker\"] = \"Resource_Picker\";\n /**\n * @unstable This API may be updated without warning in the future\n */\n Group[\"unstable_Picker\"] = \"unstable_Picker\";\n Group[\"Scanner\"] = \"Scanner\";\n Group[\"SessionToken\"] = \"SessionToken\";\n Group[\"Share\"] = \"Share\";\n Group[\"TitleBar\"] = \"TitleBar\";\n Group[\"Toast\"] = \"Toast\";\n Group[\"MarketingExternalActivityTopBar\"] = \"MarketingExternalActivityTopBar\";\n Group[\"WebVitals\"] = \"WebVitals\";\n})(Group = exports.Group || (exports.Group = {}));\n/**\n * @internal\n */\nvar ComponentType;\n(function (ComponentType) {\n ComponentType[\"Button\"] = \"Button\";\n ComponentType[\"ButtonGroup\"] = \"ButtonGroup\";\n})(ComponentType = exports.ComponentType || (exports.ComponentType = {}));\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar react_1 = __importDefault(require(\"react\"));\nvar actions_1 = require(\"@shopify/app-bridge/actions\");\nvar context_1 = require(\"../../context\");\n/**\n * Loading component\n *\n * @remarks\n * React component which wraps the Shopify App Bridge Loading action.\n *\n * @public\n */\nvar Loading = /** @class */ (function (_super) {\n __extends(Loading, _super);\n function Loading() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Loading.prototype.componentDidMount = function () {\n var app = this.context;\n this.loading = actions_1.Loading.create(app);\n if (this.loading != null) {\n this.loading.dispatch(actions_1.Loading.Action.START);\n }\n };\n Loading.prototype.componentWillUnmount = function () {\n if (this.loading != null) {\n this.loading.dispatch(actions_1.Loading.Action.STOP);\n }\n };\n Loading.prototype.render = function () {\n return null;\n };\n Loading.contextType = context_1.AppBridgeContext;\n return Loading;\n}(react_1.default.Component));\nexports.default = Loading;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.useClientRouting = exports.ClientRouter = void 0;\nvar ClientRouter_1 = require(\"./ClientRouter\");\nObject.defineProperty(exports, \"ClientRouter\", { enumerable: true, get: function () { return __importDefault(ClientRouter_1).default; } });\nvar hook_1 = require(\"./hook\");\nObject.defineProperty(exports, \"useClientRouting\", { enumerable: true, get: function () { return __importDefault(hook_1).default; } });\n","\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar react_1 = require(\"react\");\nvar Modal_1 = require(\"@shopify/app-bridge/actions/Modal\");\nvar transformers_1 = require(\"../../utilities/transformers\");\nvar useAppBridge_1 = require(\"../../useAppBridge\");\nvar useOnceEffect_1 = require(\"../../hooks/useOnceEffect\");\n/**\n * Modal component\n *\n * @remarks\n * React component which wraps the Shopify App Bridge Modal action.\n *\n * @public\n */\nfunction Modal(props) {\n var app = useAppBridge_1.useAppBridge();\n var focusReturnPoint = react_1.useRef(null);\n // Initialize with open: false so the open action will dispatch on initial load\n var prevProps = react_1.useRef({ open: false });\n var open = props.open;\n var isUnmounted = react_1.useRef(false);\n var modal = react_1.useMemo(function () {\n /**\n * We purposely don't pass buttons here as they will be replaced\n * by the subsequent useEffect to call `set` to update the options.\n * If we pass them in here button subscriptions will be created without\n * being cleaned up.\n */\n var primaryAction = props.primaryAction, secondaryActions = props.secondaryActions, rest = __rest(props, [\"primaryAction\", \"secondaryActions\"]);\n return Modal_1.create(app, transformProps(app, rest));\n }, [app]);\n /**\n * All option updates are handled in this useEffect to avoid race conditions.\n * For example, we need to call `modal.unsubscribe` to clean up button subscriptions\n * but we calling it will also unsubscribe the onClose handler. Therefore we want\n * to ensure all callbacks are handled in a single useEffect with a single clean up\n * call to unsubscribe.\n */\n react_1.useEffect(function () {\n if (isUnmounted.current) {\n prevProps.current = props;\n return;\n }\n var wasOpen = prevProps.current.open;\n var openUpdated = wasOpen !== open;\n /** We only call `set` to update the options if the modal is open.\n * This is because while the modal is closed updates don't take effect on screen.\n */\n if (open) {\n var transformedProps = transformProps(app, props, wasOpen);\n /** We skip dispatching the update action if we're about to update the open state.\n * This is because the OPEN action will always sends the updated options\n * so we don't need to send it twice.\n */\n var shouldSendUpdate = !openUpdated;\n if (isIframeModal(transformedProps)) {\n modal.set(transformedProps, shouldSendUpdate);\n }\n else {\n modal.set(transformedProps, shouldSendUpdate);\n }\n }\n if (openUpdated) {\n if (open) {\n modal.dispatch(Modal_1.Action.OPEN);\n focusReturnPoint.current = document.activeElement;\n }\n else {\n modal.dispatch(Modal_1.Action.CLOSE);\n if (focusReturnPoint.current != null && document.contains(focusReturnPoint.current)) {\n focusReturnPoint.current.focus();\n focusReturnPoint.current = null;\n }\n }\n }\n if (props.onClose != null) {\n modal.subscribe(Modal_1.Action.CLOSE, props.onClose);\n }\n prevProps.current = props;\n return function () {\n // This is important to clean up previous buttons and onClose subscriptions\n modal.unsubscribe();\n };\n }, [props, open]);\n useOnceEffect_1.useOnceEffect(function () {\n return function () {\n if (prevProps.current.open) {\n modal.dispatch(Modal_1.Action.CLOSE);\n }\n };\n }, []);\n return null;\n}\nfunction isIframeModal(options) {\n return (typeof options.url === 'string' ||\n typeof options.path === 'string');\n}\nfunction transformProps(app, props, wasOpen) {\n var title = props.title, size = props.size, message = props.message, src = props.src, primaryAction = props.primaryAction, secondaryActions = props.secondaryActions, loading = props.loading;\n var safeSize = size == null ? undefined : Modal_1.Size[size];\n var srcPayload = {};\n if (src != null) {\n if (src.match('^https?://')) {\n srcPayload.url = src;\n }\n else {\n srcPayload.path = src;\n }\n }\n return __assign(__assign({ title: title, message: message, size: safeSize }, srcPayload), { footer: {\n buttons: transformers_1.transformActions(app, {\n primaryAction: primaryAction,\n secondaryActions: secondaryActions,\n }),\n }, loading: wasOpen ? undefined : loading });\n}\nexports.default = Modal;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.useToast = exports.useNavigationHistory = exports.useNavigate = exports.useLocale = exports.useFeatureRequest = exports.useFeaturesAvailable = exports.useContextualSaveBar = exports.useAuthenticatedFetch = exports.useAppBridgeState = void 0;\nvar useAppBridgeState_1 = require(\"./useAppBridgeState\");\nObject.defineProperty(exports, \"useAppBridgeState\", { enumerable: true, get: function () { return useAppBridgeState_1.useAppBridgeState; } });\nvar useAuthenticatedFetch_1 = require(\"./useAuthenticatedFetch\");\nObject.defineProperty(exports, \"useAuthenticatedFetch\", { enumerable: true, get: function () { return useAuthenticatedFetch_1.useAuthenticatedFetch; } });\nvar useContextualSaveBar_1 = require(\"./useContextualSaveBar\");\nObject.defineProperty(exports, \"useContextualSaveBar\", { enumerable: true, get: function () { return useContextualSaveBar_1.useContextualSaveBar; } });\nvar useFeaturesAvailable_1 = require(\"./useFeaturesAvailable\");\nObject.defineProperty(exports, \"useFeaturesAvailable\", { enumerable: true, get: function () { return useFeaturesAvailable_1.useFeaturesAvailable; } });\nvar useFeatureRequest_1 = require(\"./useFeatureRequest\");\nObject.defineProperty(exports, \"useFeatureRequest\", { enumerable: true, get: function () { return useFeatureRequest_1.useFeatureRequest; } });\nvar useLocale_1 = require(\"./useLocale\");\nObject.defineProperty(exports, \"useLocale\", { enumerable: true, get: function () { return useLocale_1.useLocale; } });\nvar useNavigate_1 = require(\"./useNavigate\");\nObject.defineProperty(exports, \"useNavigate\", { enumerable: true, get: function () { return useNavigate_1.useNavigate; } });\nvar useNavigationHistory_1 = require(\"./useNavigationHistory\");\nObject.defineProperty(exports, \"useNavigationHistory\", { enumerable: true, get: function () { return useNavigationHistory_1.useNavigationHistory; } });\nvar useToast_1 = require(\"./useToast\");\nObject.defineProperty(exports, \"useToast\", { enumerable: true, get: function () { return useToast_1.useToast; } });\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./actions\"), exports);\n__exportStar(require(\"./types\"), exports);\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getWindow = exports.getLocation = exports.redirect = exports.shouldRedirect = void 0;\nfunction shouldRedirect(frame) {\n return frame === window;\n}\nexports.shouldRedirect = shouldRedirect;\nfunction redirect(url) {\n var location = getLocation();\n if (!location) {\n return;\n }\n location.assign(url);\n}\nexports.redirect = redirect;\nfunction getLocation() {\n return hasWindow() ? window.location : undefined;\n}\nexports.getLocation = getLocation;\nfunction getWindow() {\n return hasWindow() ? window : undefined;\n}\nexports.getWindow = getWindow;\nfunction hasWindow() {\n return typeof window !== 'undefined';\n}\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TitleBar = exports.update = exports.clickBreadcrumb = exports.clickActionButton = exports.Action = void 0;\nvar ActionSet_1 = require(\"../ActionSet\");\nvar Button_1 = require(\"../Button\");\nvar ButtonGroup_1 = require(\"../ButtonGroup\");\nvar buttonGroupHelper_1 = require(\"../buttonGroupHelper\");\nvar buttonHelper_1 = require(\"../buttonHelper\");\nvar helper_1 = require(\"../helper\");\nvar types_1 = require(\"../types\");\nvar Action;\n(function (Action) {\n Action[\"UPDATE\"] = \"APP::TITLEBAR::UPDATE\";\n Action[\"BUTTON_CLICK\"] = \"APP::TITLEBAR::BUTTONS::BUTTON::CLICK\";\n Action[\"BUTTON_UPDATE\"] = \"APP::TITLEBAR::BUTTONS::BUTTON::UPDATE\";\n Action[\"BUTTON_GROUP_UPDATE\"] = \"APP::TITLEBAR::BUTTONS::BUTTONGROUP::UPDATE\";\n Action[\"BREADCRUMBS_CLICK\"] = \"APP::TITLEBAR::BREADCRUMBS::BUTTON::CLICK\";\n Action[\"BREADCRUMBS_UPDATE\"] = \"APP::TITLEBAR::BREADCRUMBS::BUTTON::UPDATE\";\n})(Action = exports.Action || (exports.Action = {}));\nvar TITLEBAR_BUTTON_PROPS = {\n group: types_1.Group.TitleBar,\n subgroups: ['Buttons'],\n};\nvar BREADCRUMB_BUTTON_PROPS = {\n group: types_1.Group.TitleBar,\n subgroups: ['Breadcrumbs'],\n type: types_1.ComponentType.Button,\n};\nfunction clickActionButton(id, payload) {\n var type = types_1.ComponentType.Button;\n var component = __assign({ id: id, type: type }, TITLEBAR_BUTTON_PROPS);\n return Button_1.clickButton(types_1.Group.TitleBar, component, payload);\n}\nexports.clickActionButton = clickActionButton;\nfunction clickBreadcrumb(id, payload) {\n var component = __assign({ id: id }, BREADCRUMB_BUTTON_PROPS);\n return Button_1.clickButton(types_1.Group.TitleBar, component, payload);\n}\nexports.clickBreadcrumb = clickBreadcrumb;\nfunction update(payload) {\n return helper_1.actionWrapper({\n payload: payload,\n group: types_1.Group.TitleBar,\n type: Action.UPDATE,\n });\n}\nexports.update = update;\nvar TitleBar = /** @class */ (function (_super) {\n __extends(TitleBar, _super);\n function TitleBar(app, options) {\n var _this = _super.call(this, app, types_1.Group.TitleBar, types_1.Group.TitleBar) || this;\n if (!options.title && !options.breadcrumbs && !options.buttons) {\n return _this;\n }\n // Trigger 'update' on creation\n _this.set(options);\n return _this;\n }\n Object.defineProperty(TitleBar.prototype, \"buttons\", {\n get: function () {\n if (!this.primary && !this.secondary) {\n return undefined;\n }\n return {\n primary: this.primary,\n secondary: this.secondary,\n };\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(TitleBar.prototype, \"buttonsOptions\", {\n get: function () {\n if (!this.primaryOptions && !this.secondaryOptions) {\n return undefined;\n }\n return {\n primary: this.primaryOptions,\n secondary: this.secondaryOptions,\n };\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(TitleBar.prototype, \"options\", {\n get: function () {\n return {\n breadcrumbs: this.breadcrumbsOption,\n buttons: this.buttonsOptions,\n title: this.title,\n };\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(TitleBar.prototype, \"payload\", {\n get: function () {\n return __assign(__assign({}, this.options), { breadcrumbs: this.breadcrumb, buttons: this.buttons, id: this.id });\n },\n enumerable: false,\n configurable: true\n });\n TitleBar.prototype.set = function (options, shouldUpdate) {\n if (shouldUpdate === void 0) { shouldUpdate = true; }\n var mergedOptions = helper_1.getMergedProps(this.options, options);\n var title = mergedOptions.title, buttons = mergedOptions.buttons, breadcrumbs = mergedOptions.breadcrumbs;\n this.title = title;\n this.setBreadcrumbs(breadcrumbs);\n this.setPrimaryButton(buttons ? buttons.primary : undefined);\n this.setSecondaryButton(buttons ? buttons.secondary : undefined);\n if (shouldUpdate) {\n this.dispatch(Action.UPDATE);\n }\n return this;\n };\n TitleBar.prototype.dispatch = function (action) {\n switch (action) {\n case Action.UPDATE:\n this.app.dispatch(update(this.payload));\n break;\n }\n return this;\n };\n TitleBar.prototype.getButton = function (button, subgroups, updateCb) {\n if (button instanceof ButtonGroup_1.ButtonGroup) {\n return buttonGroupHelper_1.getGroupedButton(this, button, subgroups, updateCb);\n }\n return buttonHelper_1.getSingleButton(this, button, subgroups, updateCb);\n };\n TitleBar.prototype.updatePrimaryButton = function (newPayload) {\n if (!this.primary) {\n return;\n }\n if (helper_1.updateActionFromPayload(this.primary, newPayload)) {\n this.dispatch(Action.UPDATE);\n }\n };\n TitleBar.prototype.updateSecondaryButtons = function (newPayload) {\n if (!this.secondary) {\n return;\n }\n var buttonToUpdate = this.secondary.find(function (action) { return action.id === newPayload.id; });\n if (!buttonToUpdate) {\n return;\n }\n var updated = false;\n if (ButtonGroup_1.isGroupedButtonPayload(newPayload)) {\n updated = helper_1.updateActionFromPayload(buttonToUpdate, newPayload);\n }\n else {\n updated = helper_1.updateActionFromPayload(buttonToUpdate, newPayload);\n }\n if (updated) {\n this.dispatch(Action.UPDATE);\n }\n };\n TitleBar.prototype.updateBreadcrumbButton = function (newPayload) {\n if (!this.breadcrumb) {\n return;\n }\n if (helper_1.updateActionFromPayload(this.breadcrumb, newPayload)) {\n this.dispatch(Action.UPDATE);\n }\n };\n TitleBar.prototype.setPrimaryButton = function (newOptions) {\n this.primaryOptions = this.getChildButton(newOptions, this.primaryOptions);\n this.primary = this.primaryOptions\n ? this.getButton(this.primaryOptions, TITLEBAR_BUTTON_PROPS.subgroups, this.updatePrimaryButton)\n : undefined;\n };\n TitleBar.prototype.setSecondaryButton = function (newOptions) {\n var _this = this;\n var newButtons = newOptions || [];\n var currentButtons = this.secondaryOptions || [];\n this.secondaryOptions = this.getUpdatedChildActions(newButtons, currentButtons);\n this.secondary = this.secondaryOptions\n ? this.secondaryOptions.map(function (action) {\n return _this.getButton(action, TITLEBAR_BUTTON_PROPS.subgroups, _this.updateSecondaryButtons);\n })\n : undefined;\n };\n TitleBar.prototype.setBreadcrumbs = function (breadcrumb) {\n this.breadcrumbsOption = this.getChildButton(breadcrumb, this.breadcrumbsOption);\n this.breadcrumb = this.breadcrumbsOption\n ? this.getButton(this.breadcrumbsOption, BREADCRUMB_BUTTON_PROPS.subgroups, this.updateBreadcrumbButton)\n : undefined;\n };\n TitleBar.prototype.getChildButton = function (newAction, currentAction) {\n var newButtons = newAction ? [newAction] : [];\n var currentButtons = currentAction ? [currentAction] : [];\n var updatedButton = this.getUpdatedChildActions(newButtons, currentButtons);\n return updatedButton ? updatedButton[0] : undefined;\n };\n return TitleBar;\n}(ActionSet_1.ActionSetWithChildren));\nexports.TitleBar = TitleBar;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getPackageName = exports.getVersion = exports.getMergedProps = exports.updateActionFromPayload = exports.isValidOptionalString = exports.isValidOptionalNumber = exports.NonSnakeCaseGroup = exports.getEventNameSpace = exports.forEachInEnum = exports.findMatchInEnum = exports.actionWrapper = void 0;\nvar helper_1 = require(\"@shopify/app-bridge-core/actions/helper\");\nObject.defineProperty(exports, \"actionWrapper\", { enumerable: true, get: function () { return helper_1.actionWrapper; } });\nObject.defineProperty(exports, \"findMatchInEnum\", { enumerable: true, get: function () { return helper_1.findMatchInEnum; } });\nObject.defineProperty(exports, \"forEachInEnum\", { enumerable: true, get: function () { return helper_1.forEachInEnum; } });\nObject.defineProperty(exports, \"getEventNameSpace\", { enumerable: true, get: function () { return helper_1.getEventNameSpace; } });\nObject.defineProperty(exports, \"NonSnakeCaseGroup\", { enumerable: true, get: function () { return helper_1.NonSnakeCaseGroup; } });\nObject.defineProperty(exports, \"isValidOptionalNumber\", { enumerable: true, get: function () { return helper_1.isValidOptionalNumber; } });\nObject.defineProperty(exports, \"isValidOptionalString\", { enumerable: true, get: function () { return helper_1.isValidOptionalString; } });\nObject.defineProperty(exports, \"updateActionFromPayload\", { enumerable: true, get: function () { return helper_1.updateActionFromPayload; } });\nObject.defineProperty(exports, \"getMergedProps\", { enumerable: true, get: function () { return helper_1.getMergedProps; } });\n// eslint-disable-next-line @typescript-eslint/no-var-requires\nvar packageJson = require('../package.json');\nfunction getVersion() {\n return packageJson.version;\n}\nexports.getVersion = getVersion;\nfunction getPackageName() {\n return packageJson.name;\n}\nexports.getPackageName = getPackageName;\n","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.useAppBridgeState = void 0;\nvar react_1 = require(\"react\");\nvar useAppBridge_1 = require(\"../../useAppBridge\");\nvar useAppBridgeState = function (query) {\n var app = useAppBridge_1.useAppBridge();\n var _a = react_1.useState(), state = _a[0], setState = _a[1];\n var isUnmounted = react_1.useRef(false);\n var refresh = react_1.useCallback(function () { return __awaiter(void 0, void 0, void 0, function () {\n var newState, _a;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n if (!query) return [3 /*break*/, 2];\n return [4 /*yield*/, app.getState(query)];\n case 1:\n _a = _b.sent();\n return [3 /*break*/, 4];\n case 2: return [4 /*yield*/, app.getState()];\n case 3:\n _a = _b.sent();\n _b.label = 4;\n case 4:\n newState = _a;\n if (isUnmounted.current) {\n return [2 /*return*/];\n }\n setState(function (currentState) {\n if (JSON.stringify(newState) === JSON.stringify(currentState)) {\n return currentState;\n }\n return newState;\n });\n return [2 /*return*/];\n }\n });\n }); }, [app, query]);\n react_1.useEffect(function () {\n refresh();\n // Automatically check to see if the state has changed every time an action has been dispatched\n return app.subscribe(function () {\n refresh();\n });\n }, [app, refresh]);\n react_1.useEffect(function () {\n return function () {\n isUnmounted.current = true;\n };\n }, [app]);\n return state;\n};\nexports.useAppBridgeState = useAppBridgeState;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./useAppBridgeState\"), exports);\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.respond = exports.request = exports.Action = void 0;\nvar helper_1 = require(\"../helper\");\nvar types_1 = require(\"../types\");\nvar Action;\n(function (Action) {\n Action[\"REQUEST\"] = \"APP::SESSION_TOKEN::REQUEST\";\n Action[\"RESPOND\"] = \"APP::SESSION_TOKEN::RESPOND\";\n})(Action = exports.Action || (exports.Action = {}));\nfunction request() {\n return helper_1.actionWrapper({\n group: types_1.Group.SessionToken,\n type: Action.REQUEST,\n });\n}\nexports.request = request;\nfunction respond(sessionToken) {\n return helper_1.actionWrapper({\n payload: sessionToken,\n group: types_1.Group.SessionToken,\n type: Action.RESPOND,\n });\n}\nexports.respond = respond;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.removeFromCollection = exports.addAndRemoveFromCollection = void 0;\n/**\n * Add an item to a collection, return a function that can then be used to\n * remove the item from the collection. Optionally accepting a callback that is\n * invoked when the item is removed from the collection.\n *\n * @internal\n */\nfunction addAndRemoveFromCollection(collection, item, then) {\n collection.push(item);\n return function () {\n return removeFromCollection(collection, item, then);\n };\n}\nexports.addAndRemoveFromCollection = addAndRemoveFromCollection;\n/**\n * Remove the item from the collection. Optionally accepting a callback that is\n * invoked when the item is removed from the collection.\n *\n * @internal\n */\nfunction removeFromCollection(collection, item, then) {\n var idx = collection.findIndex(function (i) { return i === item; });\n if (idx >= 0) {\n collection.splice(idx, 1);\n if (then) {\n then(item);\n }\n return true;\n }\n return false;\n}\nexports.removeFromCollection = removeFromCollection;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.create = exports.ButtonGroup = exports.isGroupedButtonPayload = exports.isGroupedButton = exports.update = exports.Action = void 0;\nvar buttonHelper_1 = require(\"../buttonHelper\");\nvar helper_1 = require(\"../helper\");\nvar ActionSet_1 = require(\"../ActionSet\");\nvar types_1 = require(\"../types\");\nvar Action;\n(function (Action) {\n Action[\"UPDATE\"] = \"UPDATE\";\n})(Action = exports.Action || (exports.Action = {}));\nfunction update(group, component, props) {\n return buttonActionWrapper(group, component, Action.UPDATE, props);\n}\nexports.update = update;\nfunction isGroupedButton(options) {\n var castOptions = options;\n return castOptions.buttons && castOptions.buttons.length > 0 && castOptions.label !== undefined;\n}\nexports.isGroupedButton = isGroupedButton;\nfunction isGroupedButtonPayload(payload) {\n var castOptions = payload;\n return (Array.isArray(castOptions.buttons) &&\n typeof castOptions.id === 'string' &&\n typeof castOptions.label === 'string');\n}\nexports.isGroupedButtonPayload = isGroupedButtonPayload;\nvar ButtonGroup = /** @class */ (function (_super) {\n __extends(ButtonGroup, _super);\n function ButtonGroup(app, options) {\n var _this = _super.call(this, app, types_1.ComponentType.ButtonGroup, types_1.Group.ButtonGroup) || this;\n _this.disabled = false;\n _this.plain = false;\n _this.buttonsOptions = [];\n _this.buttons = [];\n _this.set(options, false);\n return _this;\n }\n Object.defineProperty(ButtonGroup.prototype, \"options\", {\n get: function () {\n return {\n buttons: this.buttonsOptions,\n disabled: this.disabled,\n label: this.label,\n plain: this.plain,\n };\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ButtonGroup.prototype, \"payload\", {\n get: function () {\n return __assign(__assign({}, this.options), { buttons: this.buttons, id: this.id });\n },\n enumerable: false,\n configurable: true\n });\n ButtonGroup.prototype.set = function (options, shouldUpdate) {\n if (shouldUpdate === void 0) { shouldUpdate = true; }\n var mergedOptions = helper_1.getMergedProps(this.options, options);\n var label = mergedOptions.label, disabled = mergedOptions.disabled, buttons = mergedOptions.buttons, plain = mergedOptions.plain;\n this.label = label;\n this.disabled = Boolean(disabled);\n this.buttons = this.getButtons(buttons);\n this.plain = Boolean(plain);\n if (shouldUpdate) {\n this.dispatch(Action.UPDATE);\n }\n return this;\n };\n ButtonGroup.prototype.dispatch = function (action) {\n switch (action) {\n case Action.UPDATE: {\n var updateAction = update(this.group, this.component, this.payload);\n this.app.dispatch(updateAction);\n break;\n }\n }\n return this;\n };\n ButtonGroup.prototype.updateButtons = function (newPayload) {\n if (!this.buttons || this.buttons.length === 0) {\n return;\n }\n var updated;\n for (var _i = 0, _a = this.buttons; _i < _a.length; _i++) {\n var action = _a[_i];\n updated = helper_1.updateActionFromPayload(action, newPayload);\n if (updated) {\n break;\n }\n }\n if (updated) {\n this.dispatch(Action.UPDATE);\n }\n };\n ButtonGroup.prototype.getSingleButton = function (button) {\n return buttonHelper_1.getSingleButton(this, button, this.subgroups, this.updateButtons);\n };\n ButtonGroup.prototype.getButtons = function (buttonOptions) {\n var _this = this;\n var buttons = [];\n if (!buttonOptions) {\n return [];\n }\n buttonOptions.forEach(function (button) {\n var singleButton = buttonHelper_1.getSingleButton(_this, button, _this.subgroups, _this.updateButtons);\n buttons.push(singleButton);\n });\n this.buttonsOptions = buttonOptions;\n return buttons;\n };\n return ButtonGroup;\n}(ActionSet_1.ActionSetWithChildren));\nexports.ButtonGroup = ButtonGroup;\nfunction create(app, options) {\n return new ButtonGroup(app, options);\n}\nexports.create = create;\nfunction buttonActionWrapper(group, component, eventName, props, payload) {\n var id = component.id;\n var label = props.label;\n var action = helper_1.getEventNameSpace(group, eventName, component);\n var buttonPayload = __assign(__assign({}, props), { id: id, label: label, payload: payload });\n return helper_1.actionWrapper({ type: action, group: group, payload: buttonPayload });\n}\n","\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from) {\n for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)\n to[j] = from[i];\n return to;\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createApp = exports.createAppWrapper = exports.createClientApp = exports.WINDOW_UNDEFINED_MESSAGE = void 0;\nvar helper_1 = require(\"../actions/helper\");\nvar Print_1 = require(\"../actions/Print\");\nvar Error_1 = require(\"../actions/Error\");\nvar MessageTransport_1 = require(\"../MessageTransport\");\nvar shared_1 = require(\"../util/shared\");\nvar env_1 = require(\"../util/env\");\nvar Client_1 = require(\"../actions/Client\");\nvar WebVitals_1 = require(\"../actions/WebVitals\");\nvar print_1 = require(\"./print\");\nvar redirect_1 = require(\"./redirect\");\nvar types_1 = require(\"./types\");\nvar Hooks_1 = __importDefault(require(\"./Hooks\"));\nexports.WINDOW_UNDEFINED_MESSAGE = 'window is not defined. Running an app outside a browser is not supported';\nfunction redirectHandler(hostFrame, config) {\n var apiKey = config.apiKey, host = config.host, _a = config.forceRedirect, forceRedirect = _a === void 0 ? !env_1.isDevelopmentClient : _a;\n var location = redirect_1.getLocation();\n if (env_1.isUnframed || !location || !apiKey || !host || !forceRedirect || !redirect_1.shouldRedirect(hostFrame)) {\n return false;\n }\n var url = \"https://\" + host + \"/apps/\" + apiKey + location.pathname + (location.search || '');\n redirect_1.redirect(url);\n return true;\n}\nvar actionWrapper = function (next) {\n return function (action) {\n return next(__assign(__assign({}, action), { version: helper_1.getVersion(), clientInterface: {\n name: helper_1.getPackageName(),\n version: helper_1.getVersion(),\n } }));\n };\n};\nvar actionWrappingMiddleware = function (hooks) {\n hooks.set(types_1.LifecycleHook.DispatchAction, actionWrapper);\n};\nfunction appSetUp(app) {\n app.subscribe(Print_1.Action.APP, print_1.handleAppPrint);\n app.dispatch(Client_1.initialize());\n try {\n WebVitals_1.initializeWebVitals(app);\n }\n catch (err) {\n // eslint-disable-next-line no-console\n console.error('App-Bridge failed to initialize web-vitals', err);\n }\n}\n/**\n * @internal\n */\nvar createClientApp = function (transport, middlewares) {\n if (middlewares === void 0) { middlewares = []; }\n var getStateListeners = [];\n var transportListener = MessageTransport_1.createTransportListener();\n var handler = function (event) {\n var message = event.data;\n var type = message.type, payload = message.payload;\n switch (type) {\n case 'getState': {\n var resolvers = getStateListeners.splice(0);\n resolvers.forEach(function (resolver) { return resolver(payload); });\n break;\n }\n case 'dispatch': {\n transportListener.handleMessage(payload);\n var hasCallback = transportListener.handleActionDispatch(payload);\n if (hasCallback) {\n return;\n }\n // Throw an error if there are no subscriptions to this error\n var errorType = helper_1.findMatchInEnum(Error_1.Action, payload.type);\n if (errorType) {\n Error_1.throwError(errorType, payload);\n }\n break;\n }\n default:\n // Silently swallow unknown actions\n }\n };\n transport.subscribe(handler);\n return function (config) {\n var decodedConfig = validateAndDecodeConfig(config);\n var isRedirecting = redirectHandler(transport.hostFrame, decodedConfig);\n if (isRedirecting) {\n return shared_1.mockAppBridge;\n }\n var dispatcher = createDispatcher(transport, decodedConfig);\n var subscribe = transportListener.createSubscribeHandler(dispatcher);\n // It is possible to initialize an app multiple times\n // Therefore we need to clear subscriptions to be safe\n dispatcher(types_1.MessageType.Unsubscribe);\n function dispatch(action) {\n dispatcher(types_1.MessageType.Dispatch, action);\n return action;\n }\n var hostOrigin = new URL(\"https://\" + decodedConfig.host).origin;\n var hooks = new Hooks_1.default();\n var app = {\n hostOrigin: hostOrigin,\n localOrigin: transport.localOrigin,\n hooks: hooks,\n dispatch: function (action) {\n if (!app.hooks) {\n return dispatch(action);\n }\n return app.hooks.run(types_1.LifecycleHook.DispatchAction, dispatch, app, action);\n },\n featuresAvailable: function () {\n var features = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n features[_i] = arguments[_i];\n }\n var firstItem = features[0];\n var parsedFeatures = Array.isArray(firstItem) ? __spreadArray([], firstItem) : features;\n return app.getState('features').then(function (state) {\n if (parsedFeatures.length) {\n return parsedFeatures.reduce(function (acc, feature) {\n if (Object.keys(state).includes(feature)) {\n acc[feature] = state[feature];\n }\n return acc;\n }, {});\n }\n return state;\n });\n },\n getState: function (query) {\n if (query && typeof query !== 'string') {\n return Promise.resolve(undefined);\n }\n return new Promise(function (resolve) {\n getStateListeners.push(resolve);\n dispatcher(types_1.MessageType.GetState);\n }).then(function (state) {\n var newState = state;\n if (query) {\n for (var _i = 0, _a = query.split('.'); _i < _a.length; _i++) {\n var key = _a[_i];\n if (newState == null ||\n typeof newState !== 'object' ||\n Array.isArray(newState) ||\n !Object.keys(newState).includes(key)) {\n return undefined;\n }\n newState = newState[key];\n }\n }\n return newState;\n });\n },\n subscribe: subscribe,\n error: function (listener, id) {\n var unsubscribeCb = [];\n helper_1.forEachInEnum(Error_1.Action, function (eventNameSpace) {\n unsubscribeCb.push(subscribe(eventNameSpace, listener, id));\n });\n return function () {\n unsubscribeCb.forEach(function (unsubscribe) { return unsubscribe(); });\n };\n },\n };\n for (var _i = 0, middlewares_1 = middlewares; _i < middlewares_1.length; _i++) {\n var middleware = middlewares_1[_i];\n middleware(hooks, app);\n }\n appSetUp(app);\n return app;\n };\n};\nexports.createClientApp = createClientApp;\n/**\n * @internal\n */\nfunction validateAndDecodeConfig(config) {\n var _a;\n if (!config.host) {\n throw Error_1.fromAction('host must be provided', Error_1.AppActionType.INVALID_CONFIG);\n }\n if (!config.apiKey) {\n throw Error_1.fromAction('apiKey must be provided', Error_1.AppActionType.INVALID_CONFIG);\n }\n try {\n var host = atob((_a = config.host) === null || _a === void 0 ? void 0 : _a.replace(/_/g, '/').replace(/-/g, '+'));\n return __assign(__assign({}, config), { host: host });\n }\n catch (_b) {\n var message = \"not a valid host, please use the value provided by Shopify\";\n throw Error_1.fromAction(message, Error_1.AppActionType.INVALID_CONFIG);\n }\n}\n/**\n * @public\n */\nfunction createAppWrapper(frame, localOrigin, middleware) {\n if (middleware === void 0) { middleware = []; }\n if (!frame) {\n throw Error_1.fromAction(exports.WINDOW_UNDEFINED_MESSAGE, Error_1.AppActionType.WINDOW_UNDEFINED);\n }\n var location = redirect_1.getLocation();\n var origin = localOrigin || (location && location.origin);\n if (!origin) {\n throw Error_1.fromAction('local origin cannot be blank', Error_1.AppActionType.MISSING_LOCAL_ORIGIN);\n }\n var transport = MessageTransport_1.fromWindow(frame, origin);\n var appCreator = exports.createClientApp(transport, __spreadArray([actionWrappingMiddleware], middleware));\n return appCreator;\n}\nexports.createAppWrapper = createAppWrapper;\n/**\n * Creates your application instance.\n * @param config - `apiKey` and `host` are both required.\n * @remarks\n * You will need to store `host` during the authentication process and then retrieve it for the code to work properly. To learn more about this process, see {@link https://help.shopify.com/api/embedded-apps/shop-origin | Getting and storing the shop origin}.\n * @public\n */\nfunction createApp(config) {\n var currentWindow = redirect_1.getWindow();\n if (!currentWindow || !currentWindow.top) {\n return shared_1.serverAppBridge;\n }\n return createAppWrapper(currentWindow.top)(config);\n}\nexports.createApp = createApp;\nfunction createDispatcher(transport, config) {\n return function (type, payload) {\n transport.dispatch({\n payload: payload,\n source: config,\n type: type,\n });\n };\n}\n/**\n * {@inheritdocs createApp}\n * @public\n */\nexports.default = createApp;\n","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createMutationObserver = exports.setupModalAutoSizing = void 0;\nvar Modal_1 = require(\"../actions/Modal\");\nvar MessageTransport_1 = require(\"../MessageTransport\");\nvar platform_1 = require(\"./platform\");\nvar AUTO_SIZE_CLASS = 'app-bridge-utils-modal-auto-size';\nvar autoSizeStylesheet = createAutoSizeStylesheet();\nfunction createAutoSizeStylesheet() {\n if (typeof document === 'undefined') {\n return null;\n }\n var autoSizeStylesheet = document.createElement('style');\n autoSizeStylesheet.type = 'text/css';\n autoSizeStylesheet.innerHTML = \".\" + AUTO_SIZE_CLASS + \" { overflow: hidden; height: auto; min-height: auto; }\";\n return autoSizeStylesheet;\n}\nfunction addAutoSizing(app, id) {\n if (!autoSizeStylesheet) {\n return function () { };\n }\n var head = document.getElementsByTagName('head')[0];\n var classList = document.body.classList;\n head.appendChild(autoSizeStylesheet);\n classList.add(AUTO_SIZE_CLASS);\n var mutationObserver = createMutationObserver(app, id);\n return function () {\n classList.remove(AUTO_SIZE_CLASS);\n if (head.contains(autoSizeStylesheet)) {\n head.removeChild(autoSizeStylesheet);\n }\n if (mutationObserver) {\n mutationObserver.disconnect();\n }\n };\n}\n/**\n * Automatically track changes to the document.body height and dispatch and action to update the modal size\n * @remarks This utility should only be used for an app that is meant to open inside a Modal\n * @param app App Bridge client application instance\n * @returns function to remove the auto-size tracker for the document.body\n *\n * @public\n */\nfunction setupModalAutoSizing(app) {\n return __awaiter(this, void 0, void 0, function () {\n function cleanup() {\n if (removeAutoSizing) {\n removeAutoSizing();\n removeAutoSizing = undefined;\n }\n }\n function handleModalSizeUpdate(appState) {\n var context = appState.context, id = appState.modal.id;\n if (platform_1.isMobile() || context !== MessageTransport_1.Context.Modal) {\n cleanup();\n return cleanup;\n }\n if (!removeAutoSizing) {\n removeAutoSizing = addAutoSizing(app, id);\n }\n return cleanup;\n }\n var removeAutoSizing;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, app.getState().then(handleModalSizeUpdate)];\n case 1:\n _a.sent();\n return [2 /*return*/, cleanup];\n }\n });\n });\n}\nexports.setupModalAutoSizing = setupModalAutoSizing;\n/**\n * Sets up modal auto sizing, using a MutationObserver.\n *\n * @param app App Bridge client application instance\n * @param id Currently active modal instance ID\n *\n * @internal\n */\nfunction createMutationObserver(app, id) {\n if (typeof document === 'undefined') {\n return;\n }\n var lastKnownWindowHeight = -1;\n var mutationTimeoutId;\n var mutationObserverConfig = {\n attributes: true,\n attributeOldValue: false,\n characterData: true,\n characterDataOldValue: false,\n childList: true,\n subtree: true,\n };\n var mutationObserver = new MutationObserver(debouncedResizeHandler);\n mutationObserver.observe(document, mutationObserverConfig);\n updateHeight();\n function debouncedResizeHandler() {\n if (mutationTimeoutId) {\n window.clearTimeout(mutationTimeoutId);\n }\n mutationTimeoutId = window.setTimeout(updateHeight, 16);\n }\n function updateHeight() {\n var height = document.body.scrollHeight;\n if (height !== lastKnownWindowHeight) {\n lastKnownWindowHeight = height;\n app.dispatch(Modal_1.updateModalSize({ id: id, height: String(height) }));\n }\n }\n return mutationObserver;\n}\nexports.createMutationObserver = createMutationObserver;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isFromApp = exports.isPerformanceOrWebVitalsAction = exports.getPermissionKey = exports.isPermitted = exports.isAppMessage = exports.isAppBridgeAction = void 0;\nvar validator_1 = require(\"@shopify/app-bridge-core/actions/validator\");\nObject.defineProperty(exports, \"isAppBridgeAction\", { enumerable: true, get: function () { return validator_1.isAppBridgeAction; } });\nObject.defineProperty(exports, \"isAppMessage\", { enumerable: true, get: function () { return validator_1.isAppMessage; } });\nObject.defineProperty(exports, \"isPermitted\", { enumerable: true, get: function () { return validator_1.isPermitted; } });\nObject.defineProperty(exports, \"getPermissionKey\", { enumerable: true, get: function () { return validator_1.getPermissionKey; } });\nObject.defineProperty(exports, \"isPerformanceOrWebVitalsAction\", { enumerable: true, get: function () { return validator_1.isPerformanceOrWebVitalsAction; } });\n/**\n * Predicate to determine if an action originated from an application.\n * @internal\n */\nfunction isFromApp(action) {\n if (typeof action !== 'object' || typeof action.source !== 'object') {\n return false;\n }\n return typeof action.source.apiKey === 'string';\n}\nexports.isFromApp = isFromApp;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.useToast = void 0;\nvar useToast_1 = require(\"./useToast\");\nObject.defineProperty(exports, \"useToast\", { enumerable: true, get: function () { return useToast_1.useToast; } });\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.create = exports.Action = exports.Fullscreen = exports.exit = exports.enter = void 0;\nvar Fullscreen_1 = require(\"@shopify/app-bridge-core/actions/Fullscreen\");\nObject.defineProperty(exports, \"Fullscreen\", { enumerable: true, get: function () { return Fullscreen_1.Fullscreen; } });\nObject.defineProperty(exports, \"Action\", { enumerable: true, get: function () { return Fullscreen_1.Action; } });\nvar Fullscreen_2 = require(\"@shopify/app-bridge-core/actions/Fullscreen\");\nObject.defineProperty(exports, \"enter\", { enumerable: true, get: function () { return Fullscreen_2.enter; } });\nObject.defineProperty(exports, \"exit\", { enumerable: true, get: function () { return Fullscreen_2.exit; } });\n/**\n * Returns a new instance of a Fullscreen action set\n * @param app the client application\n *\n * @beta\n */\nfunction create(app) {\n return new Fullscreen_1.Fullscreen(app);\n}\nexports.create = create;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.useFeatureRequest = void 0;\nvar react_1 = require(\"react\");\nvar Features_1 = require(\"@shopify/app-bridge/actions/Features\");\nvar useAppBridge_1 = require(\"../../useAppBridge\");\nvar useFeaturesAvailable_1 = require(\"../useFeaturesAvailable\");\n/**\n * useFeatureRequest hook\n *\n * @public\n * @remarks\n * React hook performs a feature request and then returns\n * the requested feature when permissions has been updated\n * @param {Group} group - The requested group enum\n * @param {string} action - The requested action. This param is optional\n */\nfunction useFeatureRequest(group, action) {\n var app = useAppBridge_1.useAppBridge();\n var featuresAvailable = useFeaturesAvailable_1.useFeaturesAvailable();\n var _a = react_1.useState(), feature = _a[0], setFeature = _a[1];\n var handleFeatureUpdate = react_1.useCallback(function (featuresAvailable) {\n var updatedFeatures = featuresAvailable === null || featuresAvailable === void 0 ? void 0 : featuresAvailable[group];\n if (action && (updatedFeatures === null || updatedFeatures === void 0 ? void 0 : updatedFeatures[action])) {\n var actionPermission_1 = updatedFeatures === null || updatedFeatures === void 0 ? void 0 : updatedFeatures[action];\n setFeature(function (currentState) {\n if (JSON.stringify(actionPermission_1) !== JSON.stringify(currentState)) {\n return actionPermission_1;\n }\n return currentState;\n });\n return;\n }\n setFeature(function (currentState) {\n if (JSON.stringify(updatedFeatures) !== JSON.stringify(currentState)) {\n return updatedFeatures;\n }\n return currentState;\n });\n }, [group, action]);\n react_1.useEffect(function () {\n Features_1.create(app).dispatch(Features_1.Action.REQUEST, { feature: group, action: action });\n }, [app, group, action]);\n react_1.useEffect(function () {\n handleFeatureUpdate(featuresAvailable);\n }, [featuresAvailable, handleFeatureUpdate]);\n return feature;\n}\nexports.useFeatureRequest = useFeatureRequest;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.removeFromCollection = exports.addAndRemoveFromCollection = void 0;\nvar collection_1 = require(\"@shopify/app-bridge-core/util/collection\");\nObject.defineProperty(exports, \"addAndRemoveFromCollection\", { enumerable: true, get: function () { return collection_1.addAndRemoveFromCollection; } });\nObject.defineProperty(exports, \"removeFromCollection\", { enumerable: true, get: function () { return collection_1.removeFromCollection; } });\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ChannelMenu = exports.update = exports.Action = void 0;\nvar AppLink_1 = require(\"../../Link/AppLink\");\nvar helper_1 = require(\"../../helper\");\nvar ActionSet_1 = require(\"../../ActionSet\");\nvar types_1 = require(\"../../types\");\nvar SUBGROUPS = ['Channel_Menu'];\nvar Action;\n(function (Action) {\n Action[\"UPDATE\"] = \"APP::MENU::CHANNEL_MENU::UPDATE\";\n Action[\"LINK_UPDATE\"] = \"APP::MENU::CHANNEL_MENU::LINK::UPDATE\";\n})(Action = exports.Action || (exports.Action = {}));\nfunction update(payload) {\n return helper_1.actionWrapper({\n payload: payload,\n group: types_1.Group.Menu,\n type: Action.UPDATE,\n });\n}\nexports.update = update;\nvar ChannelMenu = /** @class */ (function (_super) {\n __extends(ChannelMenu, _super);\n function ChannelMenu(app, options) {\n var _this = _super.call(this, app, 'Channel_Menu', types_1.Group.Menu) || this;\n _this.items = [];\n // Trigger 'update' on creation\n _this.set(options);\n return _this;\n }\n Object.defineProperty(ChannelMenu.prototype, \"options\", {\n get: function () {\n return {\n items: this.itemsOptions,\n active: this.activeOptions,\n };\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ChannelMenu.prototype, \"payload\", {\n get: function () {\n return __assign(__assign({}, this.options), { active: this.active, items: this.items, id: this.id });\n },\n enumerable: false,\n configurable: true\n });\n ChannelMenu.prototype.set = function (options, shouldUpdate) {\n if (shouldUpdate === void 0) { shouldUpdate = true; }\n var mergedOptions = helper_1.getMergedProps(this.options, options);\n var items = mergedOptions.items, active = mergedOptions.active;\n this.setItems(items);\n this.activeOptions = active;\n this.active = active && active.id;\n if (shouldUpdate) {\n this.dispatch(Action.UPDATE);\n }\n return this;\n };\n ChannelMenu.prototype.dispatch = function (action) {\n switch (action) {\n case Action.UPDATE:\n this.app.dispatch(update(this.payload));\n break;\n }\n return this;\n };\n ChannelMenu.prototype.updateItem = function (newPayload) {\n if (!this.items) {\n return;\n }\n var itemToUpdate = this.items.find(function (action) { return action.id === newPayload.id; });\n if (!itemToUpdate) {\n return;\n }\n if (helper_1.updateActionFromPayload(itemToUpdate, newPayload)) {\n this.dispatch(Action.UPDATE);\n }\n };\n ChannelMenu.prototype.setItems = function (newOptions) {\n var _this = this;\n var newItems = newOptions || [];\n var currentItems = this.itemsOptions || [];\n this.itemsOptions = this.getUpdatedChildActions(newItems, currentItems);\n this.items = this.itemsOptions\n ? this.itemsOptions.map(function (action) {\n _this.addChild(action, _this.group, SUBGROUPS);\n _this.subscribeToChild(action, AppLink_1.Action.UPDATE, _this.updateItem);\n return action.payload;\n })\n : [];\n };\n return ChannelMenu;\n}(ActionSet_1.ActionSetWithChildren));\nexports.ChannelMenu = ChannelMenu;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.create = exports.Share = exports.close = exports.show = exports.Action = void 0;\nvar Share_1 = require(\"@shopify/app-bridge-core/actions/Share\");\nObject.defineProperty(exports, \"Share\", { enumerable: true, get: function () { return Share_1.Share; } });\nvar Share_2 = require(\"@shopify/app-bridge-core/actions/Share\");\nObject.defineProperty(exports, \"Action\", { enumerable: true, get: function () { return Share_2.Action; } });\nObject.defineProperty(exports, \"show\", { enumerable: true, get: function () { return Share_2.show; } });\nObject.defineProperty(exports, \"close\", { enumerable: true, get: function () { return Share_2.close; } });\n/**\n * @public\n */\nfunction create(app) {\n return new Share_1.Share(app);\n}\nexports.create = create;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar react_1 = require(\"react\");\nvar AppLink_1 = require(\"@shopify/app-bridge/actions/Link/AppLink\");\nvar NavigationMenu_1 = require(\"@shopify/app-bridge/actions/Menu/NavigationMenu\");\nvar useAppBridge_1 = require(\"../../useAppBridge\");\nvar Provider_1 = require(\"../Provider/Provider\");\nfunction defaultMatcher(link, location) {\n var pathname = typeof location === 'string' ? new URL(location).pathname : location.pathname;\n return link.destination.replace(/\\/$/, '') === pathname.replace(/\\/$/, '');\n}\nfunction NavigationMenu(_a) {\n var navigationLinks = _a.navigationLinks, _b = _a.matcher, matcher = _b === void 0 ? defaultMatcher : _b;\n var app = useAppBridge_1.useAppBridge();\n var _c = react_1.useState(), items = _c[0], setItems = _c[1];\n var locationOrHref = (Provider_1.useRouter() || {}).location;\n var location = react_1.useMemo(function () { return locationOrHref !== null && locationOrHref !== void 0 ? locationOrHref : window.location; }, [locationOrHref]);\n react_1.useEffect(function () {\n var items = navigationLinks.map(function (link) { return AppLink_1.create(app, link); });\n setItems(items);\n }, [app, JSON.stringify(navigationLinks)]);\n var activeLink = react_1.useMemo(function () {\n var activeLinkIndex = (items || []).findIndex(function (link) {\n return matcher(link, location);\n });\n if (activeLinkIndex >= 0) {\n return items === null || items === void 0 ? void 0 : items[activeLinkIndex];\n }\n }, [items, matcher, location]);\n react_1.useEffect(function () {\n // Skip creating the navigation menu on initial render\n if (!items) {\n return;\n }\n /**\n * There isn't any advantage to keeping around a consistent instance of\n * the navigation menu as when we create a new one it results in\n * the same UPDATE action to be dispatched\n */\n NavigationMenu_1.create(app, { items: items, active: activeLink });\n }, [items, activeLink, app]);\n return null;\n}\nexports.default = NavigationMenu;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./useAuthenticatedFetch\"), exports);\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.create = exports.capture = exports.openCamera = exports.Scanner = exports.Action = void 0;\nvar Scanner_1 = require(\"@shopify/app-bridge-core/actions/Scanner\");\nObject.defineProperty(exports, \"Action\", { enumerable: true, get: function () { return Scanner_1.Action; } });\nObject.defineProperty(exports, \"Scanner\", { enumerable: true, get: function () { return Scanner_1.Scanner; } });\nObject.defineProperty(exports, \"openCamera\", { enumerable: true, get: function () { return Scanner_1.openCamera; } });\nObject.defineProperty(exports, \"capture\", { enumerable: true, get: function () { return Scanner_1.capture; } });\n/**\n * @public\n */\nfunction create(app, options) {\n return new Scanner_1.Scanner(app, options);\n}\nexports.create = create;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.History = exports.replace = exports.push = exports.Action = void 0;\nvar helper_1 = require(\"../../helper\");\nvar ActionSet_1 = require(\"../../ActionSet\");\nvar types_1 = require(\"../../types\");\nvar Action;\n(function (Action) {\n Action[\"PUSH\"] = \"APP::NAVIGATION::HISTORY::PUSH\";\n Action[\"REPLACE\"] = \"APP::NAVIGATION::HISTORY::REPLACE\";\n})(Action = exports.Action || (exports.Action = {}));\nfunction push(payload) {\n return helper_1.actionWrapper({\n payload: payload,\n group: types_1.Group.Navigation,\n type: Action.PUSH,\n });\n}\nexports.push = push;\nfunction replace(payload) {\n return helper_1.actionWrapper({\n payload: payload,\n group: types_1.Group.Navigation,\n type: Action.REPLACE,\n });\n}\nexports.replace = replace;\nvar History = /** @class */ (function (_super) {\n __extends(History, _super);\n function History(app) {\n return _super.call(this, app, 'History', types_1.Group.Navigation) || this;\n }\n Object.defineProperty(History.prototype, \"payload\", {\n get: function () {\n return { id: this.id };\n },\n enumerable: false,\n configurable: true\n });\n History.prototype.dispatch = function (type, path) {\n var payload = __assign(__assign({}, this.payload), { path: path });\n switch (type) {\n case Action.PUSH:\n this.app.dispatch(push(payload));\n break;\n case Action.REPLACE:\n this.app.dispatch(replace(payload));\n break;\n }\n return this;\n };\n return History;\n}(ActionSet_1.ActionSet));\nexports.History = History;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DEFAULT_TOAST_DURATION = void 0;\nvar react_1 = __importDefault(require(\"react\"));\nvar actions_1 = require(\"@shopify/app-bridge/actions\");\nvar context_1 = require(\"../../context\");\nexports.DEFAULT_TOAST_DURATION = 5000;\n/**\n * Toast component\n *\n * @remarks\n * React component which wraps the Shopify App Bridge Toast action.\n *\n * @public\n */\nvar Toast = /** @class */ (function (_super) {\n __extends(Toast, _super);\n function Toast() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Toast.prototype.componentDidMount = function () {\n var app = this.context;\n var _a = this.props, error = _a.error, content = _a.content, _b = _a.duration, duration = _b === void 0 ? exports.DEFAULT_TOAST_DURATION : _b, onDismiss = _a.onDismiss, action = _a.action;\n this.toast = actions_1.Toast.create(app, {\n message: content,\n duration: duration,\n isError: error,\n action: (action === null || action === void 0 ? void 0 : action.content)\n ? {\n content: action === null || action === void 0 ? void 0 : action.content,\n }\n : undefined,\n });\n if (action === null || action === void 0 ? void 0 : action.onAction) {\n this.toast.subscribe(actions_1.Toast.Action.ACTION, action === null || action === void 0 ? void 0 : action.onAction);\n }\n this.toast.subscribe(actions_1.Toast.Action.CLEAR, onDismiss);\n this.toast.dispatch(actions_1.Toast.Action.SHOW);\n };\n Toast.prototype.componentWillUnmount = function () {\n this.toast.unsubscribe();\n };\n Toast.prototype.render = function () {\n return null;\n };\n Toast.contextType = context_1.AppBridgeContext;\n return Toast;\n}(react_1.default.PureComponent));\nexports.default = Toast;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Toast_1 = __importDefault(require(\"./Toast\"));\nexports.default = Toast_1.default;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.WebVitals = exports.unstable_Picker = exports.Performance = exports.Pos = exports.AppLink = exports.ChannelMenu = exports.NavigationMenu = exports.Share = exports.ContextualSaveBar = exports.MarketingExternalActivityTopBar = exports.TitleBar = exports.SessionToken = exports.ResourcePicker = exports.Redirect = exports.Print = exports.ModalContent = exports.Modal = exports.Loading = exports.LeaveConfirmation = exports.History = exports.Toast = exports.Fullscreen = exports.FeedbackModal = exports.Features = exports.Flash = exports.Error = exports.Client = exports.Cart = exports.Scanner = exports.ButtonGroup = exports.Button = exports.AuthCode = exports.isAppBridgeAction = void 0;\nvar AuthCode = __importStar(require(\"./AuthCode\"));\nexports.AuthCode = AuthCode;\nvar Button = __importStar(require(\"./Button\"));\nexports.Button = Button;\nvar ButtonGroup = __importStar(require(\"./ButtonGroup\"));\nexports.ButtonGroup = ButtonGroup;\nvar Cart = __importStar(require(\"./Cart\"));\nexports.Cart = Cart;\nvar Client = __importStar(require(\"./Client\"));\nexports.Client = Client;\nvar Error = __importStar(require(\"./Error\"));\nexports.Error = Error;\nvar Flash = __importStar(require(\"./Flash\"));\nexports.Flash = Flash;\nvar Features = __importStar(require(\"./Features\"));\nexports.Features = Features;\nvar FeedbackModal = __importStar(require(\"./FeedbackModal\"));\nexports.FeedbackModal = FeedbackModal;\nvar Fullscreen = __importStar(require(\"./Fullscreen\"));\nexports.Fullscreen = Fullscreen;\nvar LeaveConfirmation = __importStar(require(\"./LeaveConfirmation\"));\nexports.LeaveConfirmation = LeaveConfirmation;\nvar Loading = __importStar(require(\"./Loading\"));\nexports.Loading = Loading;\nvar Modal = __importStar(require(\"./Modal\"));\nexports.Modal = Modal;\nvar ModalContent = __importStar(require(\"./Modal/ModalContent\"));\nexports.ModalContent = ModalContent;\nvar History = __importStar(require(\"./Navigation/History\"));\nexports.History = History;\nvar Redirect = __importStar(require(\"./Navigation/Redirect\"));\nexports.Redirect = Redirect;\nvar Print = __importStar(require(\"./Print\"));\nexports.Print = Print;\nvar ResourcePicker = __importStar(require(\"./ResourcePicker\"));\nexports.ResourcePicker = ResourcePicker;\nvar Scanner = __importStar(require(\"./Scanner\"));\nexports.Scanner = Scanner;\nvar SessionToken = __importStar(require(\"./SessionToken\"));\nexports.SessionToken = SessionToken;\nvar TitleBar = __importStar(require(\"./TitleBar\"));\nexports.TitleBar = TitleBar;\nvar Toast = __importStar(require(\"./Toast\"));\nexports.Toast = Toast;\nvar ContextualSaveBar = __importStar(require(\"./ContextualSaveBar\"));\nexports.ContextualSaveBar = ContextualSaveBar;\nvar Share = __importStar(require(\"./Share\"));\nexports.Share = Share;\nvar NavigationMenu = __importStar(require(\"./Menu/NavigationMenu\"));\nexports.NavigationMenu = NavigationMenu;\nvar ChannelMenu = __importStar(require(\"./Menu/ChannelMenu\"));\nexports.ChannelMenu = ChannelMenu;\nvar AppLink = __importStar(require(\"./Link/AppLink\"));\nexports.AppLink = AppLink;\nvar Pos = __importStar(require(\"./Pos\"));\nexports.Pos = Pos;\nvar MarketingExternalActivityTopBar = __importStar(require(\"./MarketingExternalActivityTopBar\"));\nexports.MarketingExternalActivityTopBar = MarketingExternalActivityTopBar;\nvar Performance = __importStar(require(\"./Performance\"));\nexports.Performance = Performance;\nvar unstable_Picker = __importStar(require(\"./Picker\"));\nexports.unstable_Picker = unstable_Picker;\nvar WebVitals = __importStar(require(\"./WebVitals\"));\nexports.WebVitals = WebVitals;\nvar validator_1 = require(\"./validator\");\nObject.defineProperty(exports, \"isAppBridgeAction\", { enumerable: true, get: function () { return validator_1.isAppBridgeAction; } });\n__exportStar(require(\"./types\"), exports);\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getSessionToken = void 0;\nvar Error_1 = require(\"@shopify/app-bridge-core/actions/Error\");\nvar SessionToken = __importStar(require(\"@shopify/app-bridge-core/actions/SessionToken\"));\nfunction getSessionToken(appBridge) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, new Promise(function (resolve, reject) {\n var unsubscribe = appBridge.subscribe(SessionToken.Action.RESPOND, function (_a) {\n var sessionToken = _a.sessionToken;\n if (sessionToken) {\n resolve(sessionToken);\n }\n else {\n reject(Error_1.fromAction('Failed to retrieve a session token', Error_1.Action.FAILED_AUTHENTICATION));\n }\n unsubscribe();\n });\n appBridge.dispatch(SessionToken.request());\n })];\n });\n });\n}\nexports.getSessionToken = getSessionToken;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.useAppBridge = void 0;\nvar react_1 = require(\"react\");\nvar context_1 = require(\"./context\");\nfunction useAppBridge() {\n var appBridge = react_1.useContext(context_1.AppBridgeContext);\n if (!appBridge) {\n throw new Error('No AppBridge context provided. Your component must be wrapped in the component from App Bridge React.');\n }\n return appBridge;\n}\nexports.useAppBridge = useAppBridge;\n","\"use strict\";\nvar __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar react_1 = require(\"react\");\nvar Picker_1 = require(\"@shopify/app-bridge/actions/Picker\");\nvar useAppBridge_1 = require(\"../../useAppBridge\");\nfunction Picker(_a) {\n var open = _a.open, onCancel = _a.onCancel, onSelect = _a.onSelect, onSearch = _a.onSearch, onLoadMore = _a.onLoadMore, options = __rest(_a, [\"open\", \"onCancel\", \"onSelect\", \"onSearch\", \"onLoadMore\"]);\n var app = useAppBridge_1.useAppBridge();\n var isUnmountedRef = react_1.useRef(false);\n react_1.useEffect(function () { return function () {\n isUnmountedRef.current = true;\n }; }, []);\n var openRef = react_1.useRef(false);\n var optionsRef = react_1.useRef(options);\n var picker = react_1.useMemo(function () { return Picker_1.create(app, optionsRef.current); }, [app]);\n react_1.useEffect(function () {\n openRef.current = false;\n return function () {\n if (openRef.current && isUnmountedRef.current) {\n picker.dispatch(Picker_1.Action.CANCEL);\n }\n };\n }, [picker]);\n react_1.useEffect(function () {\n if (open === openRef.current)\n return;\n openRef.current = open;\n if (open) {\n picker.dispatch(Picker_1.Action.OPEN);\n }\n else {\n picker.dispatch(Picker_1.Action.CANCEL);\n }\n }, [picker, open]);\n react_1.useEffect(function () {\n if (!onSelect)\n return;\n return picker.subscribe(Picker_1.Action.SELECT, function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n openRef.current = false;\n return onSelect.apply(void 0, args);\n });\n }, [picker, onSelect]);\n react_1.useEffect(function () {\n if (!onCancel)\n return;\n return picker.subscribe(Picker_1.Action.CANCEL, function () {\n openRef.current = false;\n return onCancel();\n });\n }, [picker, onCancel]);\n react_1.useEffect(function () {\n if (!onSearch)\n return;\n return picker.subscribe(Picker_1.Action.SEARCH, onSearch);\n }, [picker, onSearch]);\n react_1.useEffect(function () {\n if (!onLoadMore)\n return;\n return picker.subscribe(Picker_1.Action.LOAD_MORE, onLoadMore);\n }, [picker, onLoadMore]);\n react_1.useEffect(function () {\n var shouldUpdate = JSON.stringify(options) !== JSON.stringify(optionsRef.current);\n if (!shouldUpdate)\n return;\n optionsRef.current = options;\n picker.set(options, openRef.current);\n }, [picker, options]);\n return null;\n}\nexports.default = Picker;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.useRoutePropagation = exports.RoutePropagator = void 0;\nvar RoutePropagator_1 = require(\"./RoutePropagator\");\nObject.defineProperty(exports, \"RoutePropagator\", { enumerable: true, get: function () { return __importDefault(RoutePropagator_1).default; } });\nvar hook_1 = require(\"./hook\");\nObject.defineProperty(exports, \"useRoutePropagation\", { enumerable: true, get: function () { return __importDefault(hook_1).default; } });\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getAuthorizationCodePayload = void 0;\nvar AuthCode = __importStar(require(\"../../actions/AuthCode\"));\nvar Error_1 = require(\"../../actions/Error\");\nvar uuid_1 = __importDefault(require(\"../../actions/uuid\"));\nfunction getAuthorizationCodePayload(app) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, new Promise(function (resolve, reject) {\n var requestId = uuid_1.default();\n var unsubscribe = app.subscribe(AuthCode.Action.RESPOND, function (payload) {\n switch (payload === null || payload === void 0 ? void 0 : payload.status) {\n case 'needsExchange':\n resolve(payload);\n break;\n default:\n reject(Error_1.fromAction('Failed to retrieve an authorization code', Error_1.Action.FAILED_AUTHENTICATION));\n }\n unsubscribe();\n }, requestId);\n app.dispatch(AuthCode.request(requestId));\n })];\n });\n });\n}\nexports.getAuthorizationCodePayload = getAuthorizationCodePayload;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.useLocale = void 0;\nvar useLocale_1 = require(\"./useLocale\");\nObject.defineProperty(exports, \"useLocale\", { enumerable: true, get: function () { return useLocale_1.useLocale; } });\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Loading = exports.stop = exports.start = exports.Action = void 0;\nvar helper_1 = require(\"../helper\");\nvar ActionSet_1 = require(\"../ActionSet\");\nvar types_1 = require(\"../types\");\nvar Action;\n(function (Action) {\n Action[\"START\"] = \"APP::LOADING::START\";\n Action[\"STOP\"] = \"APP::LOADING::STOP\";\n})(Action = exports.Action || (exports.Action = {}));\nfunction start(payload) {\n return helper_1.actionWrapper({\n payload: payload,\n group: types_1.Group.Loading,\n type: Action.START,\n });\n}\nexports.start = start;\nfunction stop(payload) {\n return helper_1.actionWrapper({\n payload: payload,\n group: types_1.Group.Loading,\n type: Action.STOP,\n });\n}\nexports.stop = stop;\nvar Loading = /** @class */ (function (_super) {\n __extends(Loading, _super);\n function Loading(app) {\n return _super.call(this, app, types_1.Group.Loading, types_1.Group.Loading) || this;\n }\n Object.defineProperty(Loading.prototype, \"payload\", {\n get: function () {\n return { id: this.id };\n },\n enumerable: false,\n configurable: true\n });\n Loading.prototype.dispatch = function (action) {\n switch (action) {\n case Action.START:\n this.app.dispatch(start(this.payload));\n break;\n case Action.STOP:\n this.app.dispatch(stop(this.payload));\n break;\n }\n return this;\n };\n return Loading;\n}(ActionSet_1.ActionSet));\nexports.Loading = Loading;\n","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.updateHistory = void 0;\nvar MessageTransport_1 = require(\"@shopify/app-bridge/MessageTransport\");\nvar actions_1 = require(\"@shopify/app-bridge/actions\");\nvar globals_1 = require(\"./globals\");\n// These parameters are added to the iframe url but we don't want to propagate\n// them up to the address bar as they are not provided by the application\n// Removing hmac is especially important as its presence may cause infinite\n// oauth authentication loops\nvar embeddedFrameParamsToRemove = [\n 'hmac',\n 'locale',\n 'protocol',\n 'session',\n 'shop',\n 'timestamp',\n 'host',\n];\nfunction updateHistory(app, location) {\n return __awaiter(this, void 0, void 0, function () {\n var selfWindow, topWindow, renderedInTheTopWindow, renderedAsMainApp, normalizedLocation, pathname, search, hash, locationStr;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n selfWindow = globals_1.getSelfWindow();\n topWindow = globals_1.getTopWindow();\n renderedInTheTopWindow = selfWindow === topWindow;\n return [4 /*yield*/, app.getState('context').then(function (context) {\n return context === MessageTransport_1.Context.Main;\n })];\n case 1:\n renderedAsMainApp = _a.sent();\n if (renderedInTheTopWindow || !renderedAsMainApp) {\n return [2 /*return*/];\n }\n normalizedLocation = getNormalizedURL(location);\n embeddedFrameParamsToRemove.forEach(function (param) { return normalizedLocation.searchParams.delete(param); });\n pathname = normalizedLocation.pathname, search = normalizedLocation.search, hash = normalizedLocation.hash;\n locationStr = \"\" + pathname + search + hash;\n actions_1.History.create(app).dispatch(actions_1.History.Action.REPLACE, locationStr);\n return [2 /*return*/];\n }\n });\n });\n}\nexports.updateHistory = updateHistory;\nfunction getNormalizedURL(location) {\n var origin = globals_1.getOrigin();\n if (typeof location === 'string') {\n return new URL(location, origin);\n }\n var pathname = location.pathname, search = location.search, hash = location.hash;\n return new URL(\"\" + pathname + search + hash, origin);\n}\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar react_1 = __importDefault(require(\"react\"));\nvar context_1 = require(\"../../context\");\nvar router_1 = require(\"./router\");\n/**\n * ClientRouter component\n *\n * @remarks\n * React component which keeps the Shopify admin url in sync with the app url\n *\n * @public\n */\nvar ClientRouter = /** @class */ (function (_super) {\n __extends(ClientRouter, _super);\n function ClientRouter() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n ClientRouter.prototype.componentDidMount = function () {\n var history = this.props.history;\n this.unsubscribe = router_1.handleRouteChange(this.context, history);\n };\n ClientRouter.prototype.componentWillUnmount = function () {\n if (this.unsubscribe) {\n this.unsubscribe();\n }\n };\n ClientRouter.prototype.render = function () {\n return null;\n };\n ClientRouter.contextType = context_1.AppBridgeContext;\n return ClientRouter;\n}(react_1.default.Component));\nexports.default = ClientRouter;\n","/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n","/**\n * Source: ftp://ftp.unicode.org/Public/UCD/latest/ucd/SpecialCasing.txt\n */\nvar SUPPORTED_LOCALE = {\n tr: {\n regexp: /\\u0130|\\u0049|\\u0049\\u0307/g,\n map: {\n İ: \"\\u0069\",\n I: \"\\u0131\",\n İ: \"\\u0069\",\n },\n },\n az: {\n regexp: /\\u0130/g,\n map: {\n İ: \"\\u0069\",\n I: \"\\u0131\",\n İ: \"\\u0069\",\n },\n },\n lt: {\n regexp: /\\u0049|\\u004A|\\u012E|\\u00CC|\\u00CD|\\u0128/g,\n map: {\n I: \"\\u0069\\u0307\",\n J: \"\\u006A\\u0307\",\n Į: \"\\u012F\\u0307\",\n Ì: \"\\u0069\\u0307\\u0300\",\n Í: \"\\u0069\\u0307\\u0301\",\n Ĩ: \"\\u0069\\u0307\\u0303\",\n },\n },\n};\n/**\n * Localized lower case.\n */\nexport function localeLowerCase(str, locale) {\n var lang = SUPPORTED_LOCALE[locale.toLowerCase()];\n if (lang)\n return lowerCase(str.replace(lang.regexp, function (m) { return lang.map[m]; }));\n return lowerCase(str);\n}\n/**\n * Lower case as a function.\n */\nexport function lowerCase(str) {\n return str.toLowerCase();\n}\n//# sourceMappingURL=index.js.map","import { lowerCase } from \"lower-case\";\n// Support camel case (\"camelCase\" -> \"camel Case\" and \"CAMELCase\" -> \"CAMEL Case\").\nvar DEFAULT_SPLIT_REGEXP = [/([a-z0-9])([A-Z])/g, /([A-Z])([A-Z][a-z])/g];\n// Remove all non-word characters.\nvar DEFAULT_STRIP_REGEXP = /[^A-Z0-9]+/gi;\n/**\n * Normalize the string into something other libraries can manipulate easier.\n */\nexport function noCase(input, options) {\n if (options === void 0) { options = {}; }\n var _a = options.splitRegexp, splitRegexp = _a === void 0 ? DEFAULT_SPLIT_REGEXP : _a, _b = options.stripRegexp, stripRegexp = _b === void 0 ? DEFAULT_STRIP_REGEXP : _b, _c = options.transform, transform = _c === void 0 ? lowerCase : _c, _d = options.delimiter, delimiter = _d === void 0 ? \" \" : _d;\n var result = replace(replace(input, splitRegexp, \"$1\\0$2\"), stripRegexp, \"\\0\");\n var start = 0;\n var end = result.length;\n // Trim the delimiter from around the output string.\n while (result.charAt(start) === \"\\0\")\n start++;\n while (result.charAt(end - 1) === \"\\0\")\n end--;\n // Transform each token independently.\n return result.slice(start, end).split(\"\\0\").map(transform).join(delimiter);\n}\n/**\n * Replace `re` in the input string with the replacement value.\n */\nfunction replace(input, re, value) {\n if (re instanceof RegExp)\n return input.replace(re, value);\n return re.reduce(function (input, re) { return input.replace(re, value); }, input);\n}\n//# sourceMappingURL=index.js.map","import { __assign } from \"tslib\";\nimport { noCase } from \"no-case\";\nexport function pascalCaseTransform(input, index) {\n var firstChar = input.charAt(0);\n var lowerChars = input.substr(1).toLowerCase();\n if (index > 0 && firstChar >= \"0\" && firstChar <= \"9\") {\n return \"_\" + firstChar + lowerChars;\n }\n return \"\" + firstChar.toUpperCase() + lowerChars;\n}\nexport function pascalCaseTransformMerge(input) {\n return input.charAt(0).toUpperCase() + input.slice(1).toLowerCase();\n}\nexport function pascalCase(input, options) {\n if (options === void 0) { options = {}; }\n return noCase(input, __assign({ delimiter: \"\", transform: pascalCaseTransform }, options));\n}\n//# sourceMappingURL=index.js.map","import { __assign } from \"tslib\";\nimport { pascalCase, pascalCaseTransform, pascalCaseTransformMerge, } from \"pascal-case\";\nexport function camelCaseTransform(input, index) {\n if (index === 0)\n return input.toLowerCase();\n return pascalCaseTransform(input, index);\n}\nexport function camelCaseTransformMerge(input, index) {\n if (index === 0)\n return input.toLowerCase();\n return pascalCaseTransformMerge(input);\n}\nexport function camelCase(input, options) {\n if (options === void 0) { options = {}; }\n return pascalCase(input, __assign({ transform: camelCaseTransform }, options));\n}\n//# sourceMappingURL=index.js.map","import { __assign } from \"tslib\";\nimport { noCase } from \"no-case\";\nimport { upperCaseFirst } from \"upper-case-first\";\nexport function capitalCaseTransform(input) {\n return upperCaseFirst(input.toLowerCase());\n}\nexport function capitalCase(input, options) {\n if (options === void 0) { options = {}; }\n return noCase(input, __assign({ delimiter: \" \", transform: capitalCaseTransform }, options));\n}\n//# sourceMappingURL=index.js.map","/**\n * Upper case the first character of an input string.\n */\nexport function upperCaseFirst(input) {\n return input.charAt(0).toUpperCase() + input.substr(1);\n}\n//# sourceMappingURL=index.js.map","import { __assign } from \"tslib\";\nexport var applyCaseOptions = function (fn, defaultOptions) {\n return function (input, options) {\n return fn(input, __assign(__assign({}, defaultOptions), options));\n };\n};\nexport var preserveSpecificKeys = function (fn, keys) {\n var condition = typeof keys === 'function'\n ? keys\n : function (input) { return keys.includes(input); };\n return function (input, options) {\n return condition(input, options) ? input : fn(input, options);\n };\n};\n","export var isURLSearchParams = function (value) {\n return (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams);\n};\nexport var isFormData = function (value) {\n return typeof FormData !== 'undefined' && value instanceof FormData;\n};\nexport var isPlainObject = function (value) {\n if (value == null) {\n return false;\n }\n var proto = Object.getPrototypeOf(value);\n return proto === null || proto === Object.prototype;\n};\nexport var isTransformable = function (value) {\n return (Array.isArray(value) ||\n isPlainObject(value) ||\n isFormData(value) ||\n isURLSearchParams(value));\n};\n// Dirty hack for unexported AxiosHeaders.\n// Don't handle it as Transformable to reduce the scope of the impact.\nexport var isAxiosHeaders = function (value) {\n var _a, _b;\n if (value == null) {\n return false;\n }\n return ((_b = (_a = Object.getPrototypeOf(value)) === null || _a === void 0 ? void 0 : _a.constructor) === null || _b === void 0 ? void 0 : _b.name) === 'AxiosHeaders';\n};\n","import { __assign, __read, __spreadArray, __values } from \"tslib\";\nimport { camelCase as camelCaseString } from 'camel-case';\nimport { snakeCase as snakeCaseString } from 'snake-case';\nimport { headerCase as headerCaseString } from 'header-case';\nimport { applyCaseOptions, preserveSpecificKeys } from './decorators';\nimport { isFormData, isTransformable, isURLSearchParams } from './util';\nvar caseFunctions = {\n snake: snakeCaseString,\n camel: camelCaseString,\n header: headerCaseString,\n};\nvar transformObjectUsingCallbackRecursive = function (data, fn, overwrite) {\n var e_1, _a, e_2, _b, e_3, _c;\n if (!isTransformable(data)) {\n return data;\n }\n /* eslint-disable no-console */\n // Check FormData/URLSearchParams compatibility\n if ((isFormData(data) || isURLSearchParams(data)) &&\n (!data.entries || (overwrite && !data.delete))) {\n var type = isFormData(data) ? 'FormData' : 'URLSearchParams';\n var polyfill = isFormData(data)\n ? 'https://github.com/jimmywarting/FormData'\n : 'https://github.com/jerrybendy/url-search-params-polyfill';\n if (typeof navigator !== 'undefined' &&\n navigator.product === 'ReactNative') {\n // You cannot transform FormData/URLSearchParams on React Native\n console.warn(\"Be careful that \".concat(type, \" cannot be transformed on React Native. If you intentionally implemented, ignore this kind of warning: https://facebook.github.io/react-native/docs/debugging.html\"));\n }\n else {\n if (!data.entries) {\n // You need to polyfill `entries` method\n console.warn(\"You must use polyfill of \".concat(type, \".prototype.entries() on Internet Explorer or Safari: \").concat(polyfill));\n }\n if (overwrite && !data.delete) {\n // You need to polyfill `delete` method for overwriting\n console.warn(\"You must use polyfill of \".concat(type, \".prototype.delete() on Internet Explorer or Safari: \").concat(polyfill));\n }\n }\n return data;\n }\n /* eslint-enable no-console */\n var prototype = Object.getPrototypeOf(data);\n // Storage of new values.\n // New instances are created when overwriting is disabled.\n var store = overwrite\n ? data\n : !prototype\n ? Object.create(null)\n : new prototype.constructor();\n // We need to clean up all entries before overwriting.\n var series;\n if (isFormData(data) || isURLSearchParams(data)) {\n // Create native iterator from FormData/URLSearchParams\n series = data.entries();\n if (overwrite) {\n // When overwriting, native iterator needs to be copied as array.\n series = __spreadArray([], __read(series), false);\n try {\n for (var series_1 = __values(series), series_1_1 = series_1.next(); !series_1_1.done; series_1_1 = series_1.next()) {\n var _d = __read(series_1_1.value, 1), key = _d[0];\n data.delete(key);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (series_1_1 && !series_1_1.done && (_a = series_1.return)) _a.call(series_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n }\n }\n else {\n // Create array from objects\n series = Object.entries(data);\n // Array keys never change, so we don't need to clean up\n if (overwrite && !Array.isArray(data)) {\n try {\n for (var series_2 = __values(series), series_2_1 = series_2.next(); !series_2_1.done; series_2_1 = series_2.next()) {\n var _e = __read(series_2_1.value, 1), key = _e[0];\n delete data[key];\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (series_2_1 && !series_2_1.done && (_b = series_2.return)) _b.call(series_2);\n }\n finally { if (e_2) throw e_2.error; }\n }\n }\n }\n try {\n for (var series_3 = __values(series), series_3_1 = series_3.next(); !series_3_1.done; series_3_1 = series_3.next()) {\n var _f = __read(series_3_1.value, 2), key = _f[0], value = _f[1];\n if (isFormData(store) || isURLSearchParams(store)) {\n store.append(fn(key), value);\n }\n else if (key !== '__proto__') {\n store[fn(typeof key === 'string' ? key : \"\".concat(key))] =\n transformObjectUsingCallbackRecursive(value, fn, overwrite);\n }\n }\n }\n catch (e_3_1) { e_3 = { error: e_3_1 }; }\n finally {\n try {\n if (series_3_1 && !series_3_1.done && (_c = series_3.return)) _c.call(series_3);\n }\n finally { if (e_3) throw e_3.error; }\n }\n return store;\n};\nvar transformObjectUsingCallback = function (data, fn, options) {\n fn = applyCaseOptions(fn, __assign({ stripRegexp: /[^A-Z0-9[\\]]+/gi }, options === null || options === void 0 ? void 0 : options.caseOptions));\n if (options === null || options === void 0 ? void 0 : options.preservedKeys) {\n fn = preserveSpecificKeys(fn, options.preservedKeys);\n }\n return transformObjectUsingCallbackRecursive(data, fn, (options === null || options === void 0 ? void 0 : options.overwrite) || false);\n};\nexport var createObjectTransformer = function (fn) {\n return function (data, options) {\n return transformObjectUsingCallback(data, fn, options);\n };\n};\nexport var createObjectTransformerOf = function (functionName, options) {\n return createObjectTransformer((options === null || options === void 0 ? void 0 : options[functionName]) || caseFunctions[functionName]);\n};\nexport var createObjectTransformers = function (options) {\n var e_4, _a;\n var functionNames = Object.keys(caseFunctions);\n var objectTransformers = {};\n try {\n for (var functionNames_1 = __values(functionNames), functionNames_1_1 = functionNames_1.next(); !functionNames_1_1.done; functionNames_1_1 = functionNames_1.next()) {\n var functionName = functionNames_1_1.value;\n objectTransformers[functionName] = createObjectTransformerOf(functionName, options);\n }\n }\n catch (e_4_1) { e_4 = { error: e_4_1 }; }\n finally {\n try {\n if (functionNames_1_1 && !functionNames_1_1.done && (_a = functionNames_1.return)) _a.call(functionNames_1);\n }\n finally { if (e_4) throw e_4.error; }\n }\n return objectTransformers;\n};\n","import { __assign } from \"tslib\";\nimport { dotCase } from \"dot-case\";\nexport function snakeCase(input, options) {\n if (options === void 0) { options = {}; }\n return dotCase(input, __assign({ delimiter: \"_\" }, options));\n}\n//# sourceMappingURL=index.js.map","import { __assign } from \"tslib\";\nimport { noCase } from \"no-case\";\nexport function dotCase(input, options) {\n if (options === void 0) { options = {}; }\n return noCase(input, __assign({ delimiter: \".\" }, options));\n}\n//# sourceMappingURL=index.js.map","import { __assign } from \"tslib\";\nimport { capitalCase } from \"capital-case\";\nexport function headerCase(input, options) {\n if (options === void 0) { options = {}; }\n return capitalCase(input, __assign({ delimiter: \"-\" }, options));\n}\n//# sourceMappingURL=index.js.map","import { __assign, __read, __spreadArray, __values } from \"tslib\";\nimport { createObjectTransformers } from './transformers';\nimport { isAxiosHeaders, isPlainObject } from './util';\nexport var createSnakeParamsInterceptor = function (options) {\n var snake = createObjectTransformers(options === null || options === void 0 ? void 0 : options.caseFunctions).snake;\n return function (config) {\n if (config.params) {\n config.params = snake(config.params, options);\n }\n return config;\n };\n};\nexport var createSnakeRequestTransformer = function (options) {\n var _a = createObjectTransformers(options === null || options === void 0 ? void 0 : options.caseFunctions), snake = _a.snake, header = _a.header;\n return function (data, headers) {\n overwriteHeadersOrNoop(headers, header, options, [\n 'common',\n 'delete',\n 'get',\n 'head',\n 'post',\n 'put',\n 'patch',\n ]);\n return snake(data, options);\n };\n};\nexport var createCamelResponseTransformer = function (options) {\n var camel = createObjectTransformers(options === null || options === void 0 ? void 0 : options.caseFunctions).camel;\n return function (data, headers) {\n overwriteHeadersOrNoop(headers, camel, options);\n return camel(data, options);\n };\n};\nvar overwriteHeadersOrNoop = function (headers, fn, options, excludedKeys) {\n var e_1, _a, _b, _c;\n if ((options === null || options === void 0 ? void 0 : options.ignoreHeaders) ||\n (!isPlainObject(headers) && !isAxiosHeaders(headers))) {\n return;\n }\n try {\n for (var _d = __values(Object.entries(headers)), _e = _d.next(); !_e.done; _e = _d.next()) {\n var _f = __read(_e.value, 2), key = _f[0], value = _f[1];\n fn(value, __assign({ overwrite: true }, options));\n if ((excludedKeys || []).includes(key)) {\n continue;\n }\n if (isAxiosHeaders(headers)) {\n headers.delete(key);\n headers.set(Object.keys(fn((_b = {}, _b[key] = null, _b), options))[0], value, true);\n }\n else {\n delete headers[key];\n headers[Object.keys(fn((_c = {}, _c[key] = null, _c), options))[0]] = value;\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_e && !_e.done && (_a = _d.return)) _a.call(_d);\n }\n finally { if (e_1) throw e_1.error; }\n }\n};\nexport var applyCaseMiddleware = function (axios, options) {\n var _a, _b, _c;\n axios.defaults.transformRequest = __spreadArray([\n ((_a = options === null || options === void 0 ? void 0 : options.caseMiddleware) === null || _a === void 0 ? void 0 : _a.requestTransformer) ||\n createSnakeRequestTransformer(options)\n ], __read((Array.isArray(axios.defaults.transformRequest)\n ? axios.defaults.transformRequest\n : axios.defaults.transformRequest !== undefined\n ? [axios.defaults.transformRequest]\n : [])), false);\n axios.defaults.transformResponse = __spreadArray(__spreadArray([], __read((Array.isArray(axios.defaults.transformResponse)\n ? axios.defaults.transformResponse\n : axios.defaults.transformResponse !== undefined\n ? [axios.defaults.transformResponse]\n : [])), false), [\n ((_b = options === null || options === void 0 ? void 0 : options.caseMiddleware) === null || _b === void 0 ? void 0 : _b.responseTransformer) ||\n createCamelResponseTransformer(options),\n ], false);\n axios.interceptors.request.use(((_c = options === null || options === void 0 ? void 0 : options.caseMiddleware) === null || _c === void 0 ? void 0 : _c.requestInterceptor) ||\n createSnakeParamsInterceptor(options));\n return axios;\n};\n","import { applyCaseMiddleware } from './middleware';\nexport default applyCaseMiddleware;\nexport * from './types';\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.initialize = exports.Action = void 0;\nvar Client_1 = require(\"@shopify/app-bridge-core/actions/Client\");\nObject.defineProperty(exports, \"Action\", { enumerable: true, get: function () { return Client_1.Action; } });\nvar types_1 = require(\"../types\");\nvar helper_1 = require(\"../helper\");\nfunction initialize() {\n return helper_1.actionWrapper({\n group: types_1.Group.Client,\n type: Client_1.Action.INITIALIZE,\n });\n}\nexports.initialize = initialize;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.create = exports.isProductVariantCreateResourcePayload = exports.isProductVariantResourcePayload = exports.isCreateResourcePayload = exports.isAdminSection = exports.isRemotePayload = exports.isAdminSectionPayload = exports.isAdminPathPayload = exports.isAppPayload = exports.getRelativePath = exports.normalizeUrl = exports.getPathWithSearchAndHash = exports.toDestination = exports.toApp = exports.toRemote = exports.toAdminSection = exports.toAdminPath = exports.isResourcePayload = exports.ResourceType = exports.Action = exports.Redirect = void 0;\nvar Redirect_1 = require(\"@shopify/app-bridge-core/actions/Navigation/Redirect\");\nObject.defineProperty(exports, \"Redirect\", { enumerable: true, get: function () { return Redirect_1.Redirect; } });\nObject.defineProperty(exports, \"isCreateResourcePayload\", { enumerable: true, get: function () { return Redirect_1.isCreateResourcePayload; } });\nObject.defineProperty(exports, \"isProductVariantResourcePayload\", { enumerable: true, get: function () { return Redirect_1.isProductVariantResourcePayload; } });\nvar Redirect_2 = require(\"@shopify/app-bridge-core/actions/Navigation/Redirect\");\nObject.defineProperty(exports, \"Action\", { enumerable: true, get: function () { return Redirect_2.Action; } });\nObject.defineProperty(exports, \"ResourceType\", { enumerable: true, get: function () { return Redirect_2.ResourceType; } });\nObject.defineProperty(exports, \"isResourcePayload\", { enumerable: true, get: function () { return Redirect_2.isResourcePayload; } });\nObject.defineProperty(exports, \"toAdminPath\", { enumerable: true, get: function () { return Redirect_2.toAdminPath; } });\nObject.defineProperty(exports, \"toAdminSection\", { enumerable: true, get: function () { return Redirect_2.toAdminSection; } });\nObject.defineProperty(exports, \"toRemote\", { enumerable: true, get: function () { return Redirect_2.toRemote; } });\nObject.defineProperty(exports, \"toApp\", { enumerable: true, get: function () { return Redirect_2.toApp; } });\nObject.defineProperty(exports, \"toDestination\", { enumerable: true, get: function () { return Redirect_2.toDestination; } });\nObject.defineProperty(exports, \"getPathWithSearchAndHash\", { enumerable: true, get: function () { return Redirect_2.getPathWithSearchAndHash; } });\nObject.defineProperty(exports, \"normalizeUrl\", { enumerable: true, get: function () { return Redirect_2.normalizeUrl; } });\nObject.defineProperty(exports, \"getRelativePath\", { enumerable: true, get: function () { return Redirect_2.getRelativePath; } });\nObject.defineProperty(exports, \"isAppPayload\", { enumerable: true, get: function () { return Redirect_2.isAppPayload; } });\nObject.defineProperty(exports, \"isAdminPathPayload\", { enumerable: true, get: function () { return Redirect_2.isAdminPathPayload; } });\nObject.defineProperty(exports, \"isAdminSectionPayload\", { enumerable: true, get: function () { return Redirect_2.isAdminSectionPayload; } });\nObject.defineProperty(exports, \"isRemotePayload\", { enumerable: true, get: function () { return Redirect_2.isRemotePayload; } });\nObject.defineProperty(exports, \"isAdminSection\", { enumerable: true, get: function () { return Redirect_2.isAdminSection; } });\nfunction isProductVariantCreateResourcePayload(resource) {\n if (!Redirect_1.isProductVariantResourcePayload(resource)) {\n return false;\n }\n return Redirect_1.isCreateResourcePayload(resource.variant);\n}\nexports.isProductVariantCreateResourcePayload = isProductVariantCreateResourcePayload;\nfunction create(app) {\n return new Redirect_1.Redirect(app);\n}\nexports.create = create;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Client_1 = require(\"./Client\");\n__exportStar(require(\"./types\"), exports);\n__exportStar(require(\"./Client\"), exports);\nexports.default = Client_1.createClientApp;\n","if (process.env.NODE_ENV === 'production') {\n module.exports = require('./production');\n} else {\n module.exports = require('./development');\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar react_1 = require(\"react\");\nvar Button_1 = require(\"@shopify/app-bridge/actions/Button\");\nvar TitleBar_1 = require(\"@shopify/app-bridge/actions/TitleBar\");\nvar ButtonGroup_1 = require(\"@shopify/app-bridge/actions/ButtonGroup\");\nvar transformers_1 = require(\"../../utilities/transformers\");\nvar useAppBridge_1 = require(\"../../useAppBridge\");\nfunction TitleBar(props) {\n var app = useAppBridge_1.useAppBridge();\n var currentProps = react_1.useRef();\n var titleBar = react_1.useMemo(function () {\n /**\n * We purposely don't pass buttons here as they will be replaced\n * by the subsequent useEffect to call `set` to update the options.\n * If we pass them in here button subscriptions will be created without\n * being cleaned up.\n */\n return TitleBar_1.create(app, {});\n }, [app]);\n /**\n * All option updates are handled in this useEffect so they can be cleaned up.\n */\n react_1.useEffect(function () {\n var _a;\n var propsChanged = JSON.stringify(currentProps.current) !== JSON.stringify(props);\n currentProps.current = props;\n if (propsChanged) {\n titleBar.set(transformProps(app, props));\n }\n else {\n /**\n * We manually update the button callbacks when no props have changed aside from the\n * callbacks to avoid sending an unnecessary UPDATE action to the host\n */\n var primaryAction = props.primaryAction, secondaryActions = props.secondaryActions, actionGroups = props.actionGroups, breadcrumbs = props.breadcrumbs;\n var breadcrumb = Array.isArray(breadcrumbs)\n ? breadcrumbs[breadcrumbs.length - 1]\n : breadcrumbs;\n updateButton(breadcrumb, titleBar.options.breadcrumbs);\n updateButton(primaryAction, (_a = titleBar.options.buttons) === null || _a === void 0 ? void 0 : _a.primary);\n updateSecondaryActions(titleBar, secondaryActions);\n updateActionGroups(titleBar, actionGroups);\n }\n return function () {\n titleBar.unsubscribe();\n };\n }, [titleBar, props]);\n return null;\n}\nexports.default = TitleBar;\nfunction updateSecondaryActions(titleBar, secondaryActions) {\n var _a, _b;\n var secondaryButtons = ((_b = (_a = titleBar.options.buttons) === null || _a === void 0 ? void 0 : _a.secondary) === null || _b === void 0 ? void 0 : _b.filter(function (button) { return !ButtonGroup_1.isGroupedButton(button); })) || [];\n secondaryButtons === null || secondaryButtons === void 0 ? void 0 : secondaryButtons.forEach(function (secondaryButton, index) {\n return updateButton(secondaryActions === null || secondaryActions === void 0 ? void 0 : secondaryActions[index], \n // This needs to be casted as the React TitleBar component doesn't accept button groups for secondary actions\n secondaryButton);\n });\n}\nfunction updateActionGroups(titleBar, actionGroups) {\n var _a, _b;\n var actionGroupButtons = ((_b = (_a = titleBar.options.buttons) === null || _a === void 0 ? void 0 : _a.secondary) === null || _b === void 0 ? void 0 : _b.filter(ButtonGroup_1.isGroupedButton)) ||\n [];\n actionGroupButtons === null || actionGroupButtons === void 0 ? void 0 : actionGroupButtons.forEach(function (actionBroupButton, index) {\n var actionGroup = actionGroups === null || actionGroups === void 0 ? void 0 : actionGroups[index];\n if (!actionGroup) {\n return;\n }\n actionBroupButton.options.buttons.forEach(function (nestedButton, nestedIndex) {\n return updateButton(actionGroup.actions[nestedIndex], nestedButton);\n });\n });\n}\nfunction transformProps(app, _a) {\n var actionGroups = _a.actionGroups, breadcrumbs = _a.breadcrumbs, primaryAction = _a.primaryAction, secondaryActions = _a.secondaryActions, title = _a.title;\n var breadcrumb = Array.isArray(breadcrumbs) ? breadcrumbs[breadcrumbs.length - 1] : breadcrumbs;\n return {\n title: title,\n buttons: transformers_1.transformActions(app, {\n primaryAction: primaryAction,\n secondaryActions: secondaryActions,\n actionGroups: actionGroups,\n }),\n breadcrumbs: breadcrumb ? transformBreadcrumb(app, breadcrumb) : undefined,\n };\n}\nfunction transformBreadcrumb(app, breadcrumb, updateBreadcrumb) {\n var button = updateBreadcrumb ||\n Button_1.create(app, {\n label: breadcrumb.content || '',\n });\n updateButton(breadcrumb, button);\n return button;\n}\nfunction updateButton(actionProps, button) {\n if (!actionProps || !button) {\n return;\n }\n var redirect = transformers_1.generateRedirect(button.app, actionProps.url, actionProps.target, actionProps.external);\n if (redirect) {\n button.subscribe(Button_1.Action.CLICK, redirect, button);\n }\n if (actionProps === null || actionProps === void 0 ? void 0 : actionProps.onAction) {\n button.subscribe(Button_1.Action.CLICK, actionProps.onAction, button);\n }\n}\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.useOnceEffect = void 0;\nvar react_1 = __importDefault(require(\"react\"));\n/**\n * `useLayoutEffect`, but never runs twice, even in React 18 StrictMode.\n */\nexports.useOnceEffect = react_1.default.useInsertionEffect || react_1.default.useLayoutEffect;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"@shopify/app-bridge-core/MessageTransport\"), exports);\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from) {\n for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)\n to[j] = from[i];\n return to;\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.unsubscribeActions = exports.ActionSetWithChildren = exports.ActionSet = void 0;\nvar types_1 = require(\"../client/types\");\nvar collection_1 = require(\"../util/collection\");\nvar Error_1 = require(\"./Error\");\nvar types_2 = require(\"./types\");\nvar uuid_1 = __importDefault(require(\"./uuid\"));\nvar helper_1 = require(\"./helper\");\nvar ActionSet = /** @class */ (function () {\n function ActionSet(app, type, group, id) {\n var _this = this;\n this.app = app;\n this.type = type;\n this.group = group;\n this.subgroups = [];\n this.subscriptions = [];\n if (!app) {\n Error_1.throwError(Error_1.Action.INVALID_ACTION, 'Missing required `app`');\n }\n this.id = id || uuid_1.default();\n this.defaultGroup = group;\n var defaultSet = this.set;\n this.set = function () {\n var _a;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n if (!_this.app.hooks) {\n return defaultSet.apply(_this, args);\n }\n return (_a = _this.app.hooks).run.apply(_a, __spreadArray([types_1.LifecycleHook.UpdateAction, defaultSet, _this], args));\n };\n }\n ActionSet.prototype.set = function () {\n var _ = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n _[_i] = arguments[_i];\n }\n };\n Object.defineProperty(ActionSet.prototype, \"component\", {\n get: function () {\n return {\n id: this.id,\n subgroups: this.subgroups,\n type: this.type,\n };\n },\n enumerable: false,\n configurable: true\n });\n ActionSet.prototype.updateSubscription = function (subscriptionToRemove, group, subgroups) {\n var eventType = subscriptionToRemove.eventType, callback = subscriptionToRemove.callback, component = subscriptionToRemove.component;\n var currentIndex;\n currentIndex = this.subscriptions.findIndex(function (subscription) { return subscription === subscriptionToRemove; });\n if (currentIndex >= 0) {\n this.subscriptions[currentIndex].unsubscribe();\n }\n else {\n currentIndex = undefined;\n }\n this.group = group;\n this.subgroups = subgroups;\n Object.assign(component, { subgroups: this.subgroups });\n return this.subscribe(eventType, callback, component, currentIndex);\n };\n ActionSet.prototype.error = function (callback) {\n var _this = this;\n var subscriptionIndices = [];\n helper_1.forEachInEnum(Error_1.Action, function (eventNameSpace) {\n // Keep track of subscription index so we can call unsubscribe later\n // This ensure it will continue to work even when the subscription has been updated\n subscriptionIndices.push(_this.subscriptions.length);\n _this.subscribe(eventNameSpace, callback);\n });\n return function () {\n var subscriptionsToRemove = subscriptionIndices.map(function (index) { return _this.subscriptions[index]; });\n subscriptionsToRemove.forEach(function (toRemove) {\n collection_1.removeFromCollection(_this.subscriptions, toRemove, function (removed) {\n removed.unsubscribe();\n });\n });\n };\n };\n ActionSet.prototype.subscribe = function (eventName, callback, component, currentIndex) {\n var _this = this;\n var eventComponent = component || this.component;\n var eventType = eventName.toUpperCase();\n var boundedCallback = typeof currentIndex === 'number' ? callback : callback.bind(this);\n var eventNameSpace;\n if (Error_1.isErrorEventName(eventName)) {\n eventNameSpace = helper_1.getEventNameSpace(types_2.Group.Error, eventName, __assign(__assign({}, eventComponent), { type: '' }));\n }\n else {\n eventNameSpace = helper_1.getEventNameSpace(this.group, eventName, eventComponent);\n }\n var unsubscribe = this.app.subscribe(eventNameSpace, boundedCallback, component ? component.id : this.id);\n var subscription = {\n eventType: eventType,\n unsubscribe: unsubscribe,\n callback: boundedCallback,\n component: eventComponent,\n updateSubscribe: function (group, subgroups) {\n return _this.updateSubscription(subscription, group, subgroups);\n },\n };\n if (typeof currentIndex === 'number' &&\n currentIndex >= 0 &&\n currentIndex < this.subscriptions.length) {\n this.subscriptions[currentIndex] = subscription;\n }\n else {\n this.subscriptions.push(subscription);\n }\n return unsubscribe;\n };\n ActionSet.prototype.unsubscribe = function (resetOnly) {\n if (resetOnly === void 0) { resetOnly = false; }\n unsubscribeActions(this.subscriptions, this.defaultGroup, resetOnly);\n return this;\n };\n return ActionSet;\n}());\nexports.ActionSet = ActionSet;\nvar ActionSetWithChildren = /** @class */ (function (_super) {\n __extends(ActionSetWithChildren, _super);\n function ActionSetWithChildren() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.children = [];\n return _this;\n }\n ActionSetWithChildren.prototype.unsubscribe = function (unsubscribeChildren, resetParentOnly) {\n if (unsubscribeChildren === void 0) { unsubscribeChildren = true; }\n if (resetParentOnly === void 0) { resetParentOnly = false; }\n unsubscribeActions(this.subscriptions, this.defaultGroup, resetParentOnly);\n this.children.forEach(function (child) {\n if (child instanceof ActionSetWithChildren) {\n child.unsubscribe(unsubscribeChildren, !unsubscribeChildren);\n }\n else {\n child.unsubscribe(!unsubscribeChildren);\n }\n });\n return this;\n };\n ActionSetWithChildren.prototype.getChild = function (id) {\n var childIndex = this.children.findIndex(function (child) { return child.id === id; });\n return childIndex >= 0 ? this.children[childIndex] : undefined;\n };\n ActionSetWithChildren.prototype.getChildIndex = function (id) {\n return this.children.findIndex(function (child) { return child.id === id; });\n };\n ActionSetWithChildren.prototype.getChildSubscriptions = function (id, eventType) {\n return this.subscriptions.filter(function (sub) { return sub.component.id === id && (!eventType || eventType === sub.eventType); });\n };\n ActionSetWithChildren.prototype.addChild = function (child, group, subgroups) {\n var _this = this;\n var subscriptions = child.subscriptions;\n var existingChild = this.getChild(child.id);\n // Add child if it doesn't already exist\n if (!existingChild) {\n this.children.push(child);\n }\n if (!subscriptions || (group === child.group && subgroups === child.subgroups)) {\n return this;\n }\n subscriptions.forEach(function (subscription) {\n var updateSubscribe = subscription.updateSubscribe;\n updateSubscribe(group, subgroups);\n });\n // Update child's group and subgroups\n Object.assign(child, { group: group, subgroups: subgroups });\n // Update child's children subscriptions\n if (child instanceof ActionSetWithChildren) {\n child.children.forEach(function (childIter) {\n return _this.addChild(childIter, group, subgroups);\n });\n }\n return this;\n };\n ActionSetWithChildren.prototype.removeChild = function (id) {\n var _this = this;\n collection_1.removeFromCollection(this.children, this.getChild(id), function () {\n var toBeRemoved = _this.subscriptions.filter(function (subs) { return subs.component.id === id; });\n toBeRemoved.forEach(function (toRemove) {\n collection_1.removeFromCollection(_this.subscriptions, toRemove, function (removed) {\n removed.unsubscribe();\n });\n });\n });\n return this;\n };\n ActionSetWithChildren.prototype.subscribeToChild = function (child, eventName, callback) {\n var _this = this;\n var boundedCallback = callback.bind(this);\n if (eventName instanceof Array) {\n eventName.forEach(function (eventNameIter) { return _this.subscribeToChild(child, eventNameIter, callback); });\n return this;\n }\n if (typeof eventName !== 'string') {\n return this;\n }\n var eventType = eventName.toUpperCase();\n var currentSubscriptions = this.getChildSubscriptions(child.id, eventType);\n if (currentSubscriptions.length > 0) {\n // Subscription is already there, simply update it\n currentSubscriptions.forEach(function (subs) { return subs.updateSubscribe(_this.group, child.subgroups); });\n }\n else {\n var childComponent = {\n id: child.id,\n subgroups: child.subgroups,\n type: child.type,\n };\n this.subscribe(eventType, boundedCallback, childComponent);\n }\n return this;\n };\n ActionSetWithChildren.prototype.getUpdatedChildActions = function (newActions, currentActions) {\n if (newActions.length === 0) {\n while (currentActions.length > 0) {\n var action = currentActions.pop();\n if (!action) {\n break;\n }\n this.removeChild(action.id);\n }\n return undefined;\n }\n // Only allow unique actions\n var uniqueActions = newActions.filter(function (action, index, actionsArr) { return index === actionsArr.indexOf(action); });\n var newActionIds = uniqueActions.map(function (action) { return action.id; });\n // Remove unused actions\n var unusedActions = currentActions.filter(function (action) {\n return newActionIds.indexOf(action.id) < 0;\n });\n while (unusedActions.length > 0) {\n var action = unusedActions.pop();\n if (!action) {\n break;\n }\n this.removeChild(action.id);\n }\n return uniqueActions;\n };\n return ActionSetWithChildren;\n}(ActionSet));\nexports.ActionSetWithChildren = ActionSetWithChildren;\nfunction unsubscribeActions(subscriptions, defaultGroup, reassign) {\n if (reassign === void 0) { reassign = false; }\n subscriptions.forEach(function (subscription) {\n if (reassign) {\n var updateSubscribe = subscription.updateSubscribe;\n // eslint-disable-next-line no-warning-comments\n // TODO: Support cases where we don't wipe out group and subgroups to defaults\n updateSubscribe(defaultGroup, []);\n }\n else {\n var unsubscribe = subscription.unsubscribe;\n unsubscribe();\n }\n });\n if (!reassign) {\n subscriptions.length = 0;\n }\n}\nexports.unsubscribeActions = unsubscribeActions;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.create = exports.NavigationMenu = exports.update = exports.Action = void 0;\nvar NavigationMenu_1 = require(\"@shopify/app-bridge-core/actions/Menu/NavigationMenu\");\nObject.defineProperty(exports, \"NavigationMenu\", { enumerable: true, get: function () { return NavigationMenu_1.NavigationMenu; } });\nvar NavigationMenu_2 = require(\"@shopify/app-bridge-core/actions/Menu/NavigationMenu\");\nObject.defineProperty(exports, \"Action\", { enumerable: true, get: function () { return NavigationMenu_2.Action; } });\nObject.defineProperty(exports, \"update\", { enumerable: true, get: function () { return NavigationMenu_2.update; } });\nfunction create(app, options) {\n return new NavigationMenu_1.NavigationMenu(app, options);\n}\nexports.create = create;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.create = exports.MarketingExternalActivityTopBar = exports.update = exports.clickActionButton = exports.MarketingActivityStatusBadgeType = exports.Action = void 0;\nvar MarketingExternalActivityTopBar_1 = require(\"@shopify/app-bridge-core/actions/MarketingExternalActivityTopBar\");\nObject.defineProperty(exports, \"Action\", { enumerable: true, get: function () { return MarketingExternalActivityTopBar_1.Action; } });\nvar Button_1 = require(\"../Button\");\nvar buttonHelper_1 = require(\"../buttonHelper\");\nvar helper_1 = require(\"../helper\");\nvar ActionSet_1 = require(\"../ActionSet\");\nvar types_1 = require(\"../types\");\nvar MarketingActivityStatusBadgeType;\n(function (MarketingActivityStatusBadgeType) {\n MarketingActivityStatusBadgeType[\"Default\"] = \"DEFAULT\";\n MarketingActivityStatusBadgeType[\"Success\"] = \"SUCCESS\";\n MarketingActivityStatusBadgeType[\"Attention\"] = \"ATTENTION\";\n MarketingActivityStatusBadgeType[\"Warning\"] = \"WARNING\";\n MarketingActivityStatusBadgeType[\"Info\"] = \"INFO\";\n})(MarketingActivityStatusBadgeType = exports.MarketingActivityStatusBadgeType || (exports.MarketingActivityStatusBadgeType = {}));\nvar MARKETING_ACTIVITY_TOPBAR_BUTTON_PROPS = {\n group: types_1.Group.MarketingExternalActivityTopBar,\n subgroups: ['Buttons'],\n};\nfunction clickActionButton(id, payload) {\n var type = types_1.ComponentType.Button;\n var component = __assign({ id: id, type: type }, MARKETING_ACTIVITY_TOPBAR_BUTTON_PROPS);\n return Button_1.clickButton(types_1.Group.MarketingExternalActivityTopBar, component, payload);\n}\nexports.clickActionButton = clickActionButton;\nfunction update(payload) {\n return helper_1.actionWrapper({\n payload: payload,\n group: types_1.Group.MarketingExternalActivityTopBar,\n type: MarketingExternalActivityTopBar_1.Action.UPDATE,\n });\n}\nexports.update = update;\nvar MarketingExternalActivityTopBar = /** @class */ (function (_super) {\n __extends(MarketingExternalActivityTopBar, _super);\n function MarketingExternalActivityTopBar(app, options) {\n var _this = _super.call(this, app, types_1.Group.MarketingExternalActivityTopBar, types_1.Group.MarketingExternalActivityTopBar) || this;\n // Trigger 'update' on creation\n _this.set(options);\n return _this;\n }\n Object.defineProperty(MarketingExternalActivityTopBar.prototype, \"buttons\", {\n get: function () {\n if (!this.primary && !this.secondary) {\n return undefined;\n }\n return {\n primary: this.primary,\n secondary: this.secondary,\n };\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(MarketingExternalActivityTopBar.prototype, \"buttonsOptions\", {\n get: function () {\n if (!this.primaryOptions && !this.secondaryOptions) {\n return undefined;\n }\n return {\n primary: this.primaryOptions,\n secondary: this.secondaryOptions,\n };\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(MarketingExternalActivityTopBar.prototype, \"options\", {\n get: function () {\n return {\n title: this.title,\n status: this.status,\n saving: this.saving,\n saved: this.saved,\n buttons: this.buttonsOptions,\n };\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(MarketingExternalActivityTopBar.prototype, \"payload\", {\n get: function () {\n return __assign(__assign({}, this.options), { buttons: this.buttons, id: this.id });\n },\n enumerable: false,\n configurable: true\n });\n MarketingExternalActivityTopBar.prototype.set = function (options, shouldUpdate) {\n if (shouldUpdate === void 0) { shouldUpdate = true; }\n var mergedOptions = helper_1.getMergedProps(this.options, options);\n var title = mergedOptions.title, buttons = mergedOptions.buttons, saved = mergedOptions.saved, saving = mergedOptions.saving, status = mergedOptions.status;\n this.title = title;\n this.saving = saving;\n this.saved = saved;\n this.status = status;\n this.setPrimaryButton(buttons ? buttons.primary : undefined);\n this.setSecondaryButtons(buttons ? buttons.secondary : undefined);\n if (shouldUpdate) {\n this.dispatch(MarketingExternalActivityTopBar_1.Action.UPDATE);\n }\n return this;\n };\n MarketingExternalActivityTopBar.prototype.dispatch = function (action) {\n switch (action) {\n case MarketingExternalActivityTopBar_1.Action.UPDATE:\n this.app.dispatch(update(this.payload));\n break;\n }\n return this;\n };\n MarketingExternalActivityTopBar.prototype.getButton = function (button, subgroups, updateCb) {\n return buttonHelper_1.getSingleButton(this, button, subgroups, updateCb);\n };\n MarketingExternalActivityTopBar.prototype.updatePrimaryButton = function (newPayload) {\n if (!this.primary) {\n return;\n }\n if (helper_1.updateActionFromPayload(this.primary, newPayload)) {\n this.dispatch(MarketingExternalActivityTopBar_1.Action.UPDATE);\n }\n };\n MarketingExternalActivityTopBar.prototype.updateSecondaryButtons = function (newPayload) {\n if (!this.secondary) {\n return;\n }\n var buttonToUpdate = this.secondary.find(function (action) { return action.id === newPayload.id; });\n if (!buttonToUpdate) {\n return;\n }\n var updated = helper_1.updateActionFromPayload(buttonToUpdate, newPayload);\n if (updated) {\n this.dispatch(MarketingExternalActivityTopBar_1.Action.UPDATE);\n }\n };\n MarketingExternalActivityTopBar.prototype.setPrimaryButton = function (newOptions) {\n this.primaryOptions = this.getChildButton(newOptions, this.primaryOptions);\n this.primary = this.primaryOptions\n ? this.getButton(this.primaryOptions, MARKETING_ACTIVITY_TOPBAR_BUTTON_PROPS.subgroups, this.updatePrimaryButton)\n : undefined;\n };\n MarketingExternalActivityTopBar.prototype.setSecondaryButtons = function (newOptions) {\n var _this = this;\n var newButtons = newOptions || [];\n var currentButtons = this.secondaryOptions || [];\n this.secondaryOptions = this.getUpdatedChildActions(newButtons, currentButtons);\n this.secondary = this.secondaryOptions\n ? this.secondaryOptions.map(function (action) {\n return _this.getButton(action, MARKETING_ACTIVITY_TOPBAR_BUTTON_PROPS.subgroups, _this.updateSecondaryButtons);\n })\n : undefined;\n };\n MarketingExternalActivityTopBar.prototype.updateSaving = function (saving) {\n this.saving = saving;\n this.dispatch(MarketingExternalActivityTopBar_1.Action.UPDATE);\n };\n MarketingExternalActivityTopBar.prototype.updateSaved = function (saved) {\n this.saved = saved;\n this.dispatch(MarketingExternalActivityTopBar_1.Action.UPDATE);\n };\n MarketingExternalActivityTopBar.prototype.updateStatus = function (newPayload) {\n this.status = newPayload;\n this.dispatch(MarketingExternalActivityTopBar_1.Action.UPDATE);\n };\n MarketingExternalActivityTopBar.prototype.getChildButton = function (newAction, currentAction) {\n var newButtons = newAction ? [newAction] : [];\n var currentButtons = currentAction ? [currentAction] : [];\n var updatedButton = this.getUpdatedChildActions(newButtons, currentButtons);\n return updatedButton ? updatedButton[0] : undefined;\n };\n return MarketingExternalActivityTopBar;\n}(ActionSet_1.ActionSetWithChildren));\nexports.MarketingExternalActivityTopBar = MarketingExternalActivityTopBar;\nfunction create(app, options) {\n return new MarketingExternalActivityTopBar(app, options);\n}\nexports.create = create;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./useFeatureRequest\"), exports);\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./session-token\"), exports);\n__exportStar(require(\"./authenticated-fetch\"), exports);\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.unstable_Picker = exports.loadMore = exports.search = exports.update = exports.cancel = exports.open = exports.select = exports.ALL_RESOURCE_VERTICAL_ALIGNMENT = exports.ALL_MEDIA_KINDS = exports.ALL_BADGE_STATUSES = exports.ALL_BADGE_PROGRESSES = exports.Action = void 0;\nvar helper_1 = require(\"../helper\");\nvar ActionSet_1 = require(\"../ActionSet\");\nvar types_1 = require(\"../types\");\nvar Action;\n(function (Action) {\n Action[\"OPEN\"] = \"APP::PICKER::OPEN\";\n Action[\"SELECT\"] = \"APP::PICKER::SELECT\";\n Action[\"UPDATE\"] = \"APP::PICKER::UPDATE\";\n Action[\"CANCEL\"] = \"APP::PICKER::CANCEL\";\n Action[\"SEARCH\"] = \"APP::PICKER::SEARCH\";\n Action[\"LOAD_MORE\"] = \"APP::PICKER::LOAD_MORE\";\n})(Action = exports.Action || (exports.Action = {}));\n/**\n * To be used on validator as matchEnum(...). Make sure as new values are added to update\n * the items below\n *\n * Note: Intentionally not using an `enum type` directly as this would cause a dependency\n * of the same enum on the consumer API rather than just the string values.\n */\nexports.ALL_BADGE_PROGRESSES = [\n 'incomplete',\n 'partiallyComplete',\n 'complete',\n];\nexports.ALL_BADGE_STATUSES = [\n 'success',\n 'info',\n 'attention',\n 'critical',\n 'warning',\n 'new',\n];\nexports.ALL_MEDIA_KINDS = ['Avatar', 'Thumbnail'];\nexports.ALL_RESOURCE_VERTICAL_ALIGNMENT = [\n 'leading',\n 'trailing',\n 'center',\n];\nfunction select(payload) {\n return helper_1.actionWrapper({\n payload: payload,\n group: types_1.Group.unstable_Picker,\n type: Action.SELECT,\n });\n}\nexports.select = select;\nfunction open(payload) {\n return helper_1.actionWrapper({\n payload: payload,\n group: types_1.Group.unstable_Picker,\n type: Action.OPEN,\n });\n}\nexports.open = open;\nfunction cancel(payload) {\n return helper_1.actionWrapper({\n payload: payload,\n group: types_1.Group.unstable_Picker,\n type: Action.CANCEL,\n });\n}\nexports.cancel = cancel;\nfunction update(payload) {\n return helper_1.actionWrapper({\n payload: payload,\n group: types_1.Group.unstable_Picker,\n type: Action.UPDATE,\n });\n}\nexports.update = update;\nfunction search(payload) {\n return helper_1.actionWrapper({\n payload: payload,\n group: types_1.Group.unstable_Picker,\n type: Action.SEARCH,\n });\n}\nexports.search = search;\nfunction loadMore(payload) {\n return helper_1.actionWrapper({\n payload: payload,\n group: types_1.Group.unstable_Picker,\n type: Action.LOAD_MORE,\n });\n}\nexports.loadMore = loadMore;\n/**\n * @unstable This API may be updated without warning in the future\n */\nvar unstable_Picker = /** @class */ (function (_super) {\n __extends(unstable_Picker, _super);\n function unstable_Picker(app, options) {\n var _this = _super.call(this, app, types_1.Group.unstable_Picker, types_1.Group.unstable_Picker) || this;\n _this.items = [];\n _this.selectedItems = [];\n _this.set(options, false);\n return _this;\n }\n Object.defineProperty(unstable_Picker.prototype, \"payload\", {\n get: function () {\n return __assign(__assign({}, this.options), { id: this.id });\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(unstable_Picker.prototype, \"options\", {\n get: function () {\n return {\n items: this.items,\n maxSelectable: this.maxSelectable,\n selectedItems: this.selectedItems,\n title: this.title,\n loading: this.loading,\n searchQuery: this.searchQuery,\n searchQueryPlaceholder: this.searchQueryPlaceholder,\n primaryActionLabel: this.primaryActionLabel,\n secondaryActionLabel: this.secondaryActionLabel,\n emptySearchLabel: this.emptySearchLabel,\n canLoadMore: this.canLoadMore,\n loadingMore: this.loadingMore,\n verticalAlignment: this.verticalAlignment,\n allowEmptySelection: this.allowEmptySelection,\n resourceName: this.resourceName,\n };\n },\n enumerable: false,\n configurable: true\n });\n unstable_Picker.prototype.set = function (options, shouldUpdate) {\n if (shouldUpdate === void 0) { shouldUpdate = true; }\n var mergedOptions = helper_1.getMergedProps(this.options, options);\n var _a = mergedOptions.selectedItems, selectedItems = _a === void 0 ? [] : _a, _b = mergedOptions.maxSelectable, maxSelectable = _b === void 0 ? 0 : _b, _c = mergedOptions.items, items = _c === void 0 ? [] : _c, _d = mergedOptions.loading, loading = _d === void 0 ? false : _d, title = mergedOptions.title, searchQuery = mergedOptions.searchQuery, searchQueryPlaceholder = mergedOptions.searchQueryPlaceholder, primaryActionLabel = mergedOptions.primaryActionLabel, secondaryActionLabel = mergedOptions.secondaryActionLabel, emptySearchLabel = mergedOptions.emptySearchLabel, _e = mergedOptions.canLoadMore, canLoadMore = _e === void 0 ? false : _e, _f = mergedOptions.loadingMore, loadingMore = _f === void 0 ? false : _f, verticalAlignment = mergedOptions.verticalAlignment, allowEmptySelection = mergedOptions.allowEmptySelection, resourceName = mergedOptions.resourceName;\n this.title = title;\n this.items = items;\n this.selectedItems = selectedItems;\n this.maxSelectable = maxSelectable;\n this.loading = loading;\n this.searchQuery = searchQuery;\n this.searchQueryPlaceholder = searchQueryPlaceholder;\n this.primaryActionLabel = primaryActionLabel;\n this.secondaryActionLabel = secondaryActionLabel;\n this.emptySearchLabel = emptySearchLabel;\n this.canLoadMore = canLoadMore;\n this.loadingMore = loadingMore;\n this.verticalAlignment = verticalAlignment;\n this.allowEmptySelection = allowEmptySelection;\n this.resourceName = resourceName;\n if (shouldUpdate) {\n this.update();\n }\n return this;\n };\n unstable_Picker.prototype.dispatch = function (action, payload) {\n if (action === Action.OPEN) {\n this.open();\n }\n else if (action === Action.UPDATE) {\n this.update();\n }\n else if (action === Action.CANCEL) {\n this.cancel();\n }\n else if (action === Action.SELECT) {\n this.selectedItems = (payload === null || payload === void 0 ? void 0 : payload.selectedItems) || [];\n this.app.dispatch(select({ id: this.id, selectedItems: this.selectedItems }));\n }\n else if (action === Action.SEARCH) {\n this.searchQuery = (payload === null || payload === void 0 ? void 0 : payload.searchQuery) || '';\n this.app.dispatch(search({ id: this.id, searchQuery: this.searchQuery }));\n }\n else if (action === Action.LOAD_MORE) {\n this.loadMore();\n }\n return this;\n };\n unstable_Picker.prototype.update = function () {\n this.app.dispatch(update(this.payload));\n };\n unstable_Picker.prototype.open = function () {\n this.app.dispatch(open(this.payload));\n };\n unstable_Picker.prototype.cancel = function () {\n this.app.dispatch(cancel({ id: this.id }));\n };\n unstable_Picker.prototype.loadMore = function () {\n this.app.dispatch(loadMore(this.payload));\n };\n return unstable_Picker;\n}(ActionSet_1.ActionSet));\nexports.unstable_Picker = unstable_Picker;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.create = exports.isValidButtonProps = exports.Button = exports.update = exports.Style = exports.Icon = exports.clickButton = exports.Action = void 0;\nvar Button_1 = require(\"@shopify/app-bridge-core/actions/Button\");\nObject.defineProperty(exports, \"Button\", { enumerable: true, get: function () { return Button_1.Button; } });\nvar Button_2 = require(\"@shopify/app-bridge-core/actions/Button\");\nObject.defineProperty(exports, \"Action\", { enumerable: true, get: function () { return Button_2.Action; } });\nObject.defineProperty(exports, \"clickButton\", { enumerable: true, get: function () { return Button_2.clickButton; } });\nObject.defineProperty(exports, \"Icon\", { enumerable: true, get: function () { return Button_2.Icon; } });\nObject.defineProperty(exports, \"Style\", { enumerable: true, get: function () { return Button_2.Style; } });\nObject.defineProperty(exports, \"update\", { enumerable: true, get: function () { return Button_2.update; } });\nfunction isValidButtonProps(button) {\n return typeof button.id === 'string' && typeof button.label === 'string';\n}\nexports.isValidButtonProps = isValidButtonProps;\nfunction create(app, options) {\n return new Button_1.Button(app, options);\n}\nexports.create = create;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar react_1 = __importDefault(require(\"react\"));\nvar actions_1 = require(\"@shopify/app-bridge/actions\");\nvar context_1 = require(\"../../../context\");\n/**\n * Modal Content component\n *\n * @remarks\n * React component which wraps the Shopify App Bridge Modal Content action.\n *\n * @public\n */\nvar ModalContent = /** @class */ (function (_super) {\n __extends(ModalContent, _super);\n function ModalContent() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n ModalContent.prototype.componentDidMount = function () {\n var app = this.context;\n this.modalContent = actions_1.ModalContent.create(app);\n this.syncLoadingStatus();\n };\n ModalContent.prototype.componentDidUpdate = function () {\n this.syncLoadingStatus();\n };\n ModalContent.prototype.syncLoadingStatus = function () {\n if (!this.modalContent)\n return;\n if (this.props.loading) {\n this.modalContent.loading();\n }\n else {\n this.modalContent.loaded();\n }\n };\n ModalContent.prototype.render = function () {\n return null;\n };\n ModalContent.contextType = context_1.AppBridgeContext;\n return ModalContent;\n}(react_1.default.Component));\nexports.default = ModalContent;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar react_1 = require(\"react\");\nvar hooks_1 = require(\"../../hooks\");\nfunction ContextualSaveBar(_a) {\n var _b = _a.discardAction, discardAction = _b === void 0 ? {} : _b, _c = _a.saveAction, saveAction = _c === void 0 ? {} : _c, fullWidth = _a.fullWidth, leaveConfirmationDisable = _a.leaveConfirmationDisable, visible = _a.visible;\n var _d = hooks_1.useContextualSaveBar(), show = _d.show, hide = _d.hide, saveActionSetOptions = _d.saveAction.setOptions, discardActionSetOptions = _d.discardAction.setOptions;\n react_1.useEffect(function () {\n saveActionSetOptions(saveAction);\n }, [saveAction]);\n react_1.useEffect(function () {\n discardActionSetOptions(discardAction);\n }, [discardAction]);\n react_1.useEffect(function () {\n if (visible) {\n show({ fullWidth: fullWidth, leaveConfirmationDisable: leaveConfirmationDisable });\n }\n else {\n hide();\n }\n }, [fullWidth, leaveConfirmationDisable, visible]);\n return null;\n}\nexports.default = ContextualSaveBar;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.app = exports.Action = void 0;\nvar helper_1 = require(\"../helper\");\nvar types_1 = require(\"../types\");\nvar Action;\n(function (Action) {\n Action[\"APP\"] = \"APP::PRINT::APP\";\n})(Action = exports.Action || (exports.Action = {}));\nfunction app() {\n return helper_1.actionWrapper({\n group: types_1.Group.Print,\n type: Action.APP,\n });\n}\nexports.app = app;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.create = exports.stop = exports.start = exports.Action = exports.Loading = void 0;\nvar Loading_1 = require(\"@shopify/app-bridge-core/actions/Loading\");\nObject.defineProperty(exports, \"Loading\", { enumerable: true, get: function () { return Loading_1.Loading; } });\nvar Loading_2 = require(\"@shopify/app-bridge-core/actions/Loading\");\nObject.defineProperty(exports, \"Action\", { enumerable: true, get: function () { return Loading_2.Action; } });\nObject.defineProperty(exports, \"start\", { enumerable: true, get: function () { return Loading_2.start; } });\nObject.defineProperty(exports, \"stop\", { enumerable: true, get: function () { return Loading_2.stop; } });\nfunction create(app) {\n return new Loading_1.Loading(app);\n}\nexports.create = create;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.close = exports.show = exports.Share = exports.Action = void 0;\nvar types_1 = require(\"../types\");\nvar helper_1 = require(\"../helper\");\nvar ActionSet_1 = require(\"../ActionSet\");\n/**\n * Types\n */\n/**\n * @public\n */\nvar Action;\n(function (Action) {\n Action[\"SHOW\"] = \"APP::SHARE::SHOW\";\n Action[\"CLOSE\"] = \"APP::SHARE::CLOSE\";\n})(Action = exports.Action || (exports.Action = {}));\n/**\n * Action\n */\n/**\n * A set of actions for displaying a Share Sheet component\n * @public\n */\nvar Share = /** @class */ (function (_super) {\n __extends(Share, _super);\n function Share(app) {\n return _super.call(this, app, types_1.Group.Share, types_1.Group.Share) || this;\n }\n Share.prototype.dispatch = function (action, payload) {\n switch (action) {\n case Action.SHOW:\n this.dispatchShareAction(Action.SHOW, payload);\n break;\n case Action.CLOSE:\n this.dispatchShareAction(Action.CLOSE, payload);\n break;\n default:\n throw new Error(\"Action: \" + action + \" not supported\");\n }\n return this;\n };\n /**\n * @internal\n */\n Share.prototype.dispatchShareAction = function (actionType, payload) {\n this.app.dispatch(helper_1.actionWrapper({\n type: actionType,\n group: types_1.Group.Share,\n payload: __assign({ id: this.id }, payload),\n }));\n };\n return Share;\n}(ActionSet_1.ActionSet));\nexports.Share = Share;\nfunction show() {\n return helper_1.actionWrapper({\n group: types_1.Group.Share,\n type: Action.SHOW,\n });\n}\nexports.show = show;\nfunction close(payload) {\n return helper_1.actionWrapper({\n group: types_1.Group.Share,\n type: Action.CLOSE,\n payload: payload,\n });\n}\nexports.close = close;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.generateUuid = void 0;\nvar uuid_1 = require(\"@shopify/app-bridge-core/actions/uuid\");\nObject.defineProperty(exports, \"generateUuid\", { enumerable: true, get: function () { return uuid_1.generateUuid; } });\nexports.default = uuid_1.generateUuid;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.create = exports.Modal = exports.isMessageModal = exports.data = exports.update = exports.clickFooterButton = exports.updateModalSize = exports.closeModal = exports.openModal = exports.Size = exports.Action = exports.isIframeModal = exports.ModalMessage = exports.ModalIframe = void 0;\nvar Modal_1 = require(\"@shopify/app-bridge-core/actions/Modal\");\nObject.defineProperty(exports, \"ModalIframe\", { enumerable: true, get: function () { return Modal_1.ModalIframe; } });\nObject.defineProperty(exports, \"ModalMessage\", { enumerable: true, get: function () { return Modal_1.ModalMessage; } });\nObject.defineProperty(exports, \"isIframeModal\", { enumerable: true, get: function () { return Modal_1.isIframeModal; } });\nvar Modal_2 = require(\"@shopify/app-bridge-core/actions/Modal\");\nObject.defineProperty(exports, \"Action\", { enumerable: true, get: function () { return Modal_2.Action; } });\nObject.defineProperty(exports, \"Size\", { enumerable: true, get: function () { return Modal_2.Size; } });\nObject.defineProperty(exports, \"openModal\", { enumerable: true, get: function () { return Modal_2.openModal; } });\nObject.defineProperty(exports, \"closeModal\", { enumerable: true, get: function () { return Modal_2.closeModal; } });\nObject.defineProperty(exports, \"updateModalSize\", { enumerable: true, get: function () { return Modal_2.updateModalSize; } });\nObject.defineProperty(exports, \"clickFooterButton\", { enumerable: true, get: function () { return Modal_2.clickFooterButton; } });\nObject.defineProperty(exports, \"update\", { enumerable: true, get: function () { return Modal_2.update; } });\nObject.defineProperty(exports, \"data\", { enumerable: true, get: function () { return Modal_2.data; } });\nObject.defineProperty(exports, \"isMessageModal\", { enumerable: true, get: function () { return Modal_2.isMessageModal; } });\nObject.defineProperty(exports, \"Modal\", { enumerable: true, get: function () { return Modal_2.Modal; } });\nvar create = function (app, options) {\n if (Modal_1.isIframeModal(options)) {\n return new Modal_1.ModalIframe(app, options);\n }\n return new Modal_1.ModalMessage(app, options);\n};\nexports.create = create;\n","\"use strict\";var react=require(\"react\"),reactRouterDom=require(\"react-router-dom\");function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}function _defineProperties(e,t){for(var o=0;o 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.authenticatedFetch = void 0;\nvar actions_1 = require(\"../../actions\");\nvar session_token_1 = require(\"./session-token\");\nfunction authenticatedFetch(app, fetchOperationOrOptions) {\n var _this = this;\n if (fetchOperationOrOptions === void 0) { fetchOperationOrOptions = undefined; }\n return function (uri, options) {\n if (options === void 0) { options = {}; }\n return __awaiter(_this, void 0, void 0, function () {\n var sessionToken, headers, finalHeaders, authenticatedFetchOptions, fetchOperation, response, reauthorizeUrl_1, requestFailureReauthorizeUrlHeader_1;\n var _a;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0: return [4 /*yield*/, session_token_1.getSessionToken(app)];\n case 1:\n sessionToken = _b.sent();\n headers = new Headers(options.headers);\n headers.append('Authorization', \"Bearer \" + sessionToken);\n headers.append('X-Requested-With', 'XMLHttpRequest');\n finalHeaders = {};\n headers.forEach(function (value, key) {\n finalHeaders[key] = value;\n });\n authenticatedFetchOptions = typeof fetchOperationOrOptions === 'object' ? fetchOperationOrOptions : undefined;\n fetchOperation = typeof fetchOperationOrOptions === 'function'\n ? fetchOperationOrOptions\n : (_a = authenticatedFetchOptions === null || authenticatedFetchOptions === void 0 ? void 0 : authenticatedFetchOptions.fetchOperation) !== null && _a !== void 0 ? _a : fetch;\n return [4 /*yield*/, fetchOperation(uri, __assign(__assign({}, options), { headers: finalHeaders }))];\n case 2:\n response = _b.sent();\n if (authenticatedFetchOptions) {\n reauthorizeUrl_1 = authenticatedFetchOptions.reauthorizeUrl, requestFailureReauthorizeUrlHeader_1 = authenticatedFetchOptions.requestFailureReauthorizeUrlHeader;\n response.headers.forEach(function (value, name) {\n if (requestFailureReauthorizeUrlHeader_1.toLowerCase() === name.toLowerCase()) {\n var redirectUrl = new URL(reauthorizeUrl_1 || value, location.href).href;\n var redirect = actions_1.Redirect.create(app);\n if (redirectUrl) {\n redirect.dispatch(actions_1.Redirect.Action.REMOTE, redirectUrl);\n }\n else {\n // eslint-disable-next-line no-console\n console.warn(\"Couldn't find a fallback auth path to redirect to.\");\n }\n }\n });\n }\n return [2 /*return*/, response];\n }\n });\n });\n };\n}\nexports.authenticatedFetch = authenticatedFetch;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SEPARATOR = exports.PREFIX = void 0;\nexports.PREFIX = 'APP';\nexports.SEPARATOR = '::';\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.mockAppBridge = exports.serverAppBridge = void 0;\nvar Error_1 = require(\"../actions/Error\");\nvar noop = function () { };\nvar noopPromise = new Promise(function () {\n // Noop\n});\n/**\n * @internal\n */\nexports.serverAppBridge = {\n dispatch: function () {\n return {};\n },\n error: function () {\n return noop;\n },\n featuresAvailable: function () {\n return Promise.reject(Error_1.fromAction('Feature detection is only available on the client side.', Error_1.AppActionType.WINDOW_UNDEFINED));\n },\n getState: function () {\n return Promise.reject(Error_1.fromAction('State is only available on the client side.', Error_1.AppActionType.WINDOW_UNDEFINED));\n },\n localOrigin: '',\n hostOrigin: '',\n subscribe: function () {\n return noop;\n },\n};\n/**\n * @internal\n */\nexports.mockAppBridge = {\n dispatch: function () {\n return {};\n },\n error: function () {\n return noop;\n },\n featuresAvailable: function () {\n return noopPromise;\n },\n getState: function () {\n return noopPromise;\n },\n localOrigin: '',\n hostOrigin: '',\n subscribe: function () {\n return noop;\n },\n};\n","\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.useNavigate = void 0;\nvar react_1 = require(\"react\");\nvar Redirect_1 = require(\"@shopify/app-bridge/actions/Navigation/Redirect\");\nvar useAppBridge_1 = require(\"../../useAppBridge\");\nvar useNavigationHistory_1 = require(\"../useNavigationHistory\");\nfunction useNavigate() {\n var app = useAppBridge_1.useAppBridge();\n var history = useNavigationHistory_1.useNavigationHistory();\n var redirect = react_1.useMemo(function () {\n return Redirect_1.create(app);\n }, [app]);\n var handleRedirect = react_1.useCallback(function (to, options) {\n var url = Redirect_1.normalizeUrl(to);\n var isAppUrl = url.startsWith(app.localOrigin);\n var isHostUrl = url.startsWith(app.hostOrigin);\n var isRelative = url.startsWith('/');\n if (isAppUrl || isHostUrl || isRelative) {\n var path = Redirect_1.getRelativePath(url);\n if (isHostUrl || (options === null || options === void 0 ? void 0 : options.target) === 'new' || (options === null || options === void 0 ? void 0 : options.target) === 'host') {\n redirect.dispatch(Redirect_1.Action.ADMIN_PATH, {\n path: path.replace(/^\\/admin/, ''),\n newContext: (options === null || options === void 0 ? void 0 : options.target) === 'new',\n });\n return;\n }\n if (((options === null || options === void 0 ? void 0 : options.target) === 'self' || !(options === null || options === void 0 ? void 0 : options.target)) && (options === null || options === void 0 ? void 0 : options.replace)) {\n history.replace({ pathname: path });\n return;\n }\n redirect.dispatch(Redirect_1.Action.APP, path);\n return;\n }\n redirect.dispatch(Redirect_1.Action.REMOTE, {\n url: url,\n newContext: (options === null || options === void 0 ? void 0 : options.target) === 'new',\n });\n }, [redirect, history]);\n return react_1.useCallback(function (to, options) {\n if (Redirect_1.isAdminSection(to)) {\n var convertedSection = __assign(__assign({}, to), { name: Redirect_1.ResourceType[to.name] });\n redirect.dispatch(Redirect_1.Action.ADMIN_SECTION, {\n section: convertedSection,\n newContext: (options === null || options === void 0 ? void 0 : options.target) === 'new',\n });\n return;\n }\n handleRedirect(to, options);\n }, [handleRedirect, redirect]);\n}\nexports.useNavigate = useNavigate;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ComponentType = exports.Group = void 0;\nvar types_1 = require(\"@shopify/app-bridge-core/actions/types\");\nObject.defineProperty(exports, \"Group\", { enumerable: true, get: function () { return types_1.Group; } });\nObject.defineProperty(exports, \"ComponentType\", { enumerable: true, get: function () { return types_1.ComponentType; } });\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.LifecycleHook = exports.PermissionType = exports.MessageType = void 0;\n/**\n * @internal\n */\nvar MessageType;\n(function (MessageType) {\n MessageType[\"GetState\"] = \"getState\";\n MessageType[\"Dispatch\"] = \"dispatch\";\n MessageType[\"Subscribe\"] = \"subscribe\";\n MessageType[\"Unsubscribe\"] = \"unsubscribe\";\n})(MessageType = exports.MessageType || (exports.MessageType = {}));\n/**\n * @internal\n */\nvar PermissionType;\n(function (PermissionType) {\n PermissionType[\"Dispatch\"] = \"Dispatch\";\n PermissionType[\"Subscribe\"] = \"Subscribe\";\n})(PermissionType = exports.PermissionType || (exports.PermissionType = {}));\n/**\n *\n * There are two types of hooks: `LifecycleHook.DispatchAction` and `LifecycleHook.UpdateAction`.\n *\n * @remarks\n * `DispatchAction` hooks are run when an action is dispatched with the `.dispatch()` function:\n *\n * ```js\n * const toastNotice = Toast.create(app, {message: 'Product saved'});\n * toastNotice.dispatch(Toast.Action.SHOW);\n * ```\n *\n * `UpdateAction` hooks are run when an action is updated, using the `.set()` function:\n *\n * ```js\n * toastNotice.set({message: 'Product could not be saved', isError: true});\n * ```\n *\n * @public\n */\nvar LifecycleHook;\n(function (LifecycleHook) {\n LifecycleHook[\"UpdateAction\"] = \"UpdateAction\";\n LifecycleHook[\"DispatchAction\"] = \"DispatchAction\";\n})(LifecycleHook = exports.LifecycleHook || (exports.LifecycleHook = {}));\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.respond = exports.Action = void 0;\nvar helper_1 = require(\"../helper\");\nvar types_1 = require(\"../types\");\nvar Action;\n(function (Action) {\n Action[\"REQUEST\"] = \"APP::AUTH_CODE::REQUEST\";\n Action[\"RESPOND\"] = \"APP::AUTH_CODE::RESPOND\";\n})(Action = exports.Action || (exports.Action = {}));\nfunction respond(payload) {\n return helper_1.actionWrapper({\n payload: payload,\n group: types_1.Group.AuthCode,\n type: Action.RESPOND,\n });\n}\nexports.respond = respond;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Action = void 0;\n/**\n * Action Types for the Features group\n * @public\n */\nvar Action;\n(function (Action) {\n Action[\"UPDATE\"] = \"APP::FEATURES::UPDATE\";\n Action[\"REQUEST\"] = \"APP::FEATURES::REQUEST\";\n /**\n * @deprecated as of 2.1.0. Use \"APP::FEATURES::UPDATE\" instead\n */\n Action[\"REQUEST_UPDATE\"] = \"APP::FEATURES::REQUEST::UPDATE\";\n})(Action = exports.Action || (exports.Action = {}));\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.app = exports.Action = void 0;\nvar Print_1 = require(\"@shopify/app-bridge-core/actions/Print\");\nObject.defineProperty(exports, \"Action\", { enumerable: true, get: function () { return Print_1.Action; } });\nObject.defineProperty(exports, \"app\", { enumerable: true, get: function () { return Print_1.app; } });\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Toast = exports.primaryAction = exports.clear = exports.show = exports.Action = void 0;\nvar helper_1 = require(\"../helper\");\nvar ActionSet_1 = require(\"../ActionSet\");\nvar types_1 = require(\"../types\");\nvar Action;\n(function (Action) {\n Action[\"SHOW\"] = \"APP::TOAST::SHOW\";\n Action[\"CLEAR\"] = \"APP::TOAST::CLEAR\";\n Action[\"ACTION\"] = \"APP::TOAST::ACTION\";\n})(Action = exports.Action || (exports.Action = {}));\nfunction show(toastMessage) {\n return helper_1.actionWrapper({\n group: types_1.Group.Toast,\n payload: toastMessage,\n type: Action.SHOW,\n });\n}\nexports.show = show;\nfunction clear(payload) {\n return helper_1.actionWrapper({\n payload: payload,\n group: types_1.Group.Toast,\n type: Action.CLEAR,\n });\n}\nexports.clear = clear;\nfunction primaryAction(payload) {\n return helper_1.actionWrapper({\n payload: payload,\n group: types_1.Group.Toast,\n type: Action.ACTION,\n });\n}\nexports.primaryAction = primaryAction;\nvar Toast = /** @class */ (function (_super) {\n __extends(Toast, _super);\n function Toast(app, options) {\n var _this = _super.call(this, app, types_1.Group.Toast, types_1.Group.Toast) || this;\n _this.message = '';\n _this.duration = 5000;\n _this.set(options);\n return _this;\n }\n Object.defineProperty(Toast.prototype, \"options\", {\n get: function () {\n var _a;\n return {\n duration: this.duration,\n isError: this.isError,\n message: this.message,\n action: ((_a = this.action) === null || _a === void 0 ? void 0 : _a.content)\n ? {\n content: this.action.content,\n }\n : undefined,\n };\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Toast.prototype, \"payload\", {\n get: function () {\n return __assign({ id: this.id }, this.options);\n },\n enumerable: false,\n configurable: true\n });\n Toast.prototype.set = function (options) {\n var mergedOptions = helper_1.getMergedProps(this.options, options);\n var message = mergedOptions.message, duration = mergedOptions.duration, isError = mergedOptions.isError, action = mergedOptions.action;\n this.message = message;\n this.duration = duration;\n this.isError = isError;\n this.action = (action === null || action === void 0 ? void 0 : action.content)\n ? {\n content: action.content || '',\n }\n : undefined;\n return this;\n };\n Toast.prototype.dispatch = function (action) {\n switch (action) {\n case Action.SHOW: {\n var openAction = show(this.payload);\n this.app.dispatch(openAction);\n break;\n }\n case Action.CLEAR:\n this.app.dispatch(clear({ id: this.id }));\n break;\n case Action.ACTION:\n this.app.dispatch(primaryAction({ id: this.id }));\n break;\n }\n return this;\n };\n return Toast;\n}(ActionSet_1.ActionSet));\nexports.Toast = Toast;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.respond = exports.request = exports.Action = void 0;\nvar SessionToken_1 = require(\"@shopify/app-bridge-core/actions/SessionToken\");\nObject.defineProperty(exports, \"Action\", { enumerable: true, get: function () { return SessionToken_1.Action; } });\nObject.defineProperty(exports, \"request\", { enumerable: true, get: function () { return SessionToken_1.request; } });\nObject.defineProperty(exports, \"respond\", { enumerable: true, get: function () { return SessionToken_1.respond; } });\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fullPageLoad = exports.skeletonPageLoad = exports.Action = void 0;\nvar types_1 = require(\"../types\");\nvar helper_1 = require(\"../helper\");\nvar Action;\n(function (Action) {\n Action[\"SKELETON_PAGE_LOAD\"] = \"APP::PERFORMANCE::SKELETON_PAGE_LOAD\";\n Action[\"FULL_PAGE_LOAD\"] = \"APP::PERFORMANCE::FULL_PAGE_LOAD\";\n})(Action = exports.Action || (exports.Action = {}));\nfunction skeletonPageLoad() {\n return helper_1.actionWrapper({\n group: types_1.Group.Performance,\n type: Action.SKELETON_PAGE_LOAD,\n });\n}\nexports.skeletonPageLoad = skeletonPageLoad;\nfunction fullPageLoad() {\n return helper_1.actionWrapper({\n group: types_1.Group.Performance,\n type: Action.FULL_PAGE_LOAD,\n });\n}\nexports.fullPageLoad = fullPageLoad;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Cart = exports.setLineItemProperties = exports.removeLineItemDiscount = exports.setLineItemDiscount = exports.removeLineItem = exports.updateLineItem = exports.addLineItem = exports.removeProperties = exports.setProperties = exports.setDiscount = exports.updateCustomerAddress = exports.addCustomerAddress = exports.setCustomer = exports.update = exports.fetch = exports.Action = void 0;\nvar helper_1 = require(\"../helper\");\nvar ActionSet_1 = require(\"../ActionSet\");\nvar types_1 = require(\"../types\");\nvar Action;\n(function (Action) {\n Action[\"FETCH\"] = \"APP::CART::FETCH\";\n Action[\"UPDATE\"] = \"APP::CART::UPDATE\";\n Action[\"SET_CUSTOMER\"] = \"APP::CART::SET_CUSTOMER\";\n Action[\"REMOVE_CUSTOMER\"] = \"APP::CART::REMOVE_CUSTOMER\";\n Action[\"ADD_CUSTOMER_ADDRESS\"] = \"APP::CART::ADD_CUSTOMER_ADDRESS\";\n Action[\"UPDATE_CUSTOMER_ADDRESS\"] = \"APP::CART::UPDATE_CUSTOMER_ADDRESS\";\n Action[\"SET_DISCOUNT\"] = \"APP::CART::SET_DISCOUNT\";\n Action[\"REMOVE_DISCOUNT\"] = \"APP::CART::REMOVE_DISCOUNT\";\n Action[\"SET_PROPERTIES\"] = \"APP::CART::SET_PROPERTIES\";\n Action[\"REMOVE_PROPERTIES\"] = \"APP::CART::REMOVE_PROPERTIES\";\n Action[\"CLEAR\"] = \"APP::CART::CLEAR\";\n Action[\"ADD_LINE_ITEM\"] = \"APP::CART::ADD_LINE_ITEM\";\n Action[\"UPDATE_LINE_ITEM\"] = \"APP::CART::UPDATE_LINE_ITEM\";\n Action[\"REMOVE_LINE_ITEM\"] = \"APP::CART::REMOVE_LINE_ITEM\";\n Action[\"SET_LINE_ITEM_DISCOUNT\"] = \"APP::CART::SET_LINE_ITEM_DISCOUNT\";\n Action[\"REMOVE_LINE_ITEM_DISCOUNT\"] = \"APP::CART::REMOVE_LINE_ITEM_DISCOUNT\";\n Action[\"SET_LINE_ITEM_PROPERTIES\"] = \"APP::CART::SET_LINE_ITEM_PROPERTIES\";\n Action[\"REMOVE_LINE_ITEM_PROPERTIES\"] = \"APP::CART::REMOVE_LINE_ITEM_PROPERTIES\";\n})(Action = exports.Action || (exports.Action = {}));\n/**\n * Cart action\n * @internal\n */\nfunction createCartAction(type, payload) {\n if (payload === void 0) { payload = {}; }\n return helper_1.actionWrapper({\n group: types_1.Group.Cart,\n type: type,\n payload: payload,\n });\n}\nfunction fetch() {\n return createCartAction(Action.FETCH);\n}\nexports.fetch = fetch;\nfunction update(payload) {\n return createCartAction(Action.UPDATE, payload);\n}\nexports.update = update;\nfunction setCustomer(payload) {\n return createCartAction(Action.SET_CUSTOMER, payload);\n}\nexports.setCustomer = setCustomer;\nfunction addCustomerAddress(payload) {\n return createCartAction(Action.ADD_CUSTOMER_ADDRESS, payload);\n}\nexports.addCustomerAddress = addCustomerAddress;\nfunction updateCustomerAddress(payload) {\n return createCartAction(Action.UPDATE_CUSTOMER_ADDRESS, payload);\n}\nexports.updateCustomerAddress = updateCustomerAddress;\nfunction setDiscount(payload) {\n return createCartAction(Action.SET_DISCOUNT, payload);\n}\nexports.setDiscount = setDiscount;\nfunction setProperties(payload) {\n return createCartAction(Action.SET_PROPERTIES, payload);\n}\nexports.setProperties = setProperties;\nfunction removeProperties(payload) {\n return createCartAction(Action.REMOVE_PROPERTIES, payload);\n}\nexports.removeProperties = removeProperties;\nfunction addLineItem(payload) {\n return createCartAction(Action.ADD_LINE_ITEM, payload);\n}\nexports.addLineItem = addLineItem;\nfunction updateLineItem(payload) {\n return createCartAction(Action.UPDATE_LINE_ITEM, payload);\n}\nexports.updateLineItem = updateLineItem;\nfunction removeLineItem(payload) {\n return createCartAction(Action.REMOVE_LINE_ITEM, payload);\n}\nexports.removeLineItem = removeLineItem;\nfunction setLineItemDiscount(payload) {\n return createCartAction(Action.SET_LINE_ITEM_DISCOUNT, payload);\n}\nexports.setLineItemDiscount = setLineItemDiscount;\nfunction removeLineItemDiscount(payload) {\n return createCartAction(Action.REMOVE_LINE_ITEM_DISCOUNT, payload);\n}\nexports.removeLineItemDiscount = removeLineItemDiscount;\nfunction setLineItemProperties(payload) {\n return createCartAction(Action.SET_LINE_ITEM_PROPERTIES, payload);\n}\nexports.setLineItemProperties = setLineItemProperties;\n/**\n * Cart\n */\nvar Cart = /** @class */ (function (_super) {\n __extends(Cart, _super);\n function Cart(app, options) {\n return _super.call(this, app, types_1.Group.Cart, types_1.Group.Cart, options ? options.id : undefined) || this;\n }\n Cart.prototype.dispatch = function (action, payload) {\n switch (action) {\n case Action.FETCH:\n this.dispatchCartAction(Action.FETCH);\n break;\n case Action.UPDATE:\n this.dispatchCartAction(Action.UPDATE, payload);\n break;\n case Action.SET_CUSTOMER:\n this.dispatchCartAction(Action.SET_CUSTOMER, payload);\n break;\n case Action.REMOVE_CUSTOMER:\n this.dispatchCartAction(Action.REMOVE_CUSTOMER, payload);\n break;\n case Action.ADD_CUSTOMER_ADDRESS:\n this.dispatchCartAction(Action.ADD_CUSTOMER_ADDRESS, payload);\n break;\n case Action.UPDATE_CUSTOMER_ADDRESS:\n this.dispatchCartAction(Action.UPDATE_CUSTOMER_ADDRESS, payload);\n break;\n case Action.SET_DISCOUNT:\n this.dispatchCartAction(Action.SET_DISCOUNT, payload);\n break;\n case Action.REMOVE_DISCOUNT:\n this.dispatchCartAction(Action.REMOVE_DISCOUNT, payload);\n break;\n case Action.SET_PROPERTIES:\n this.dispatchCartAction(Action.SET_PROPERTIES, payload);\n break;\n case Action.REMOVE_PROPERTIES:\n this.dispatchCartAction(Action.REMOVE_PROPERTIES, payload);\n break;\n case Action.CLEAR:\n this.dispatchCartAction(Action.CLEAR, payload);\n break;\n case Action.ADD_LINE_ITEM:\n this.dispatchCartAction(Action.ADD_LINE_ITEM, payload);\n break;\n case Action.UPDATE_LINE_ITEM:\n this.dispatchCartAction(Action.UPDATE_LINE_ITEM, payload);\n break;\n case Action.REMOVE_LINE_ITEM:\n this.dispatchCartAction(Action.REMOVE_LINE_ITEM, payload);\n break;\n case Action.SET_LINE_ITEM_DISCOUNT:\n this.dispatchCartAction(Action.SET_LINE_ITEM_DISCOUNT, payload);\n break;\n case Action.REMOVE_LINE_ITEM_DISCOUNT:\n this.dispatchCartAction(Action.REMOVE_LINE_ITEM_DISCOUNT, payload);\n break;\n case Action.SET_LINE_ITEM_PROPERTIES:\n this.dispatchCartAction(Action.SET_LINE_ITEM_PROPERTIES, payload);\n break;\n case Action.REMOVE_LINE_ITEM_PROPERTIES:\n this.dispatchCartAction(Action.REMOVE_LINE_ITEM_PROPERTIES, payload);\n break;\n }\n return this;\n };\n Cart.prototype.dispatchCartAction = function (type, payload) {\n this.app.dispatch(createCartAction(type, __assign(__assign({}, payload), { id: this.id })));\n };\n return Cart;\n}(ActionSet_1.ActionSet));\nexports.Cart = Cart;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.handleRouteChange = void 0;\nvar actions_1 = require(\"@shopify/app-bridge/actions\");\nfunction handleRouteChange(app, history) {\n return app.subscribe(actions_1.Redirect.Action.APP, function (_a) {\n var path = _a.path;\n history.replace(path);\n });\n}\nexports.handleRouteChange = handleRouteChange;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./actions\"), exports);\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Pos = exports.close = exports.Action = void 0;\nvar helper_1 = require(\"../helper\");\nvar ActionSet_1 = require(\"../ActionSet\");\nvar types_1 = require(\"../types\");\n/**\n * Pos action type enum\n * @remarks includes the action prefix and group\n *\n */\nvar Action;\n(function (Action) {\n Action[\"CLOSE\"] = \"APP::POS::CLOSE\";\n Action[\"LOCATION_UPDATE\"] = \"APP::POS::LOCATION::UPDATE\";\n Action[\"USER_UPDATE\"] = \"APP::POS::USER::UPDATE\";\n Action[\"DEVICE_UPDATE\"] = \"APP::POS::DEVICE::UPDATE\";\n})(Action = exports.Action || (exports.Action = {}));\nfunction close() {\n return helper_1.actionWrapper({\n group: types_1.Group.Pos,\n type: Action.CLOSE,\n });\n}\nexports.close = close;\nvar Pos = /** @class */ (function (_super) {\n __extends(Pos, _super);\n function Pos(app) {\n return _super.call(this, app, types_1.Group.Pos, types_1.Group.Pos) || this;\n }\n Pos.prototype.dispatch = function (action) {\n switch (action) {\n case Action.CLOSE:\n this.app.dispatch(close());\n break;\n }\n return this;\n };\n return Pos;\n}(ActionSet_1.ActionSet));\nexports.Pos = Pos;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.create = exports.ModalContent = exports.Action = void 0;\nvar ModalContent_1 = require(\"@shopify/app-bridge-core/actions/Modal/ModalContent\");\nObject.defineProperty(exports, \"ModalContent\", { enumerable: true, get: function () { return ModalContent_1.ModalContent; } });\nvar ModalContent_2 = require(\"@shopify/app-bridge-core/actions/Modal/ModalContent\");\nObject.defineProperty(exports, \"Action\", { enumerable: true, get: function () { return ModalContent_2.Action; } });\n/**\n * @public\n */\nfunction create(app, options) {\n return new ModalContent_1.ModalContent(app, options);\n}\nexports.create = create;\n"],"names":["extendStatics","__extends","this","d","b","Object","setPrototypeOf","__proto__","Array","p","prototype","hasOwnProperty","call","TypeError","String","__","constructor","create","__assign","assign","t","s","i","n","arguments","length","apply","defineProperty","exports","value","Button","update","clickButton","Style","Icon","Action","helper_1","ActionSet_1","types_1","group","component","payload","id","action","getEventNameSpace","CLICK","buttonPayload","actionWrapper","type","props","label","UPDATE","_super","app","options","_this","ComponentType","Group","disabled","loading","plain","set","get","icon","style","enumerable","configurable","shouldUpdate","mergedOptions","getMergedProps","Boolean","dispatch","updateAction","ActionSet","__importDefault","mod","__esModule","react_1","context_1","route_propagator_1","RoutePropagator","componentDidMount","location","updateHistory","context","componentDidUpdate","_a","prevLocation","render","contextType","AppBridgeContext","default","Component","Provider_1","useAuthenticatedFetch","utilities_1","useAppBridge_1","undefined","useAppBridge","useMemo","authenticatedFetch","useNavigationHistory","useNavigationHistory_1","getOrigin","getTopWindow","getSelfWindow","window","self","top","origin","replace","push","History","History_1","History_2","fullPageLoad","skeletonPageLoad","Performance_1","unstable_Picker_1","__createBinding","o","m","k","k2","__exportStar","isV1Config","MessageType","LifecycleHook","PermissionType","types_2","config","host","Flash","show","clear","Toast_1","Toast","ModalContent","Modal_1","ModalContent_1","useNavigate","useNavigate_1","mergeProps","obj","newObj","isPrototypeOf","getPrototypeOf","name","clone","keys","forEach","key","isArray","TitleBar_1","collection_1","Hooks","map","hook","handler","remove","addAndRemoveFromCollection","val","run","final","initialArgs","_i","index","handlers","args","childHandler","asHex","from","toString","slice","join","getRandomBytes","size","Uint8Array","crypto","buffer","randomValues","getRandomValues","Math","random","generateUuid","clockSeqHiAndReserved","timeHiAndVersion","__setModuleDefault","v","__importStar","result","__spreadArray","to","il","j","transformActions","generateRedirect","ButtonGroup","Redirect","appBridge","url","target","external","redirect","newContext","REMOTE","redirectAction","transformAction","destructive","Danger","button","content","onAction","subscribe","primaryAction","secondaryActions","actionGroups","primary","transformPrimaryAction","secondary","secondaryAction","transformSecondaryActions","buttonGroups","buttons","actions","groupAction","title","transformActionGroups","ModalIframe","ModalMessage","Modal","isMessageModal","isIframeModal","data","clickFooterButton","updateModalSize","closeModal","openModal","Size","buttonHelper_1","Button_1","FOOTER_BUTTON_PROPS","subgroups","modalPayload","OPEN","modalClosePayload","CLOSE","DATA","updateSizePayload","UPDATE_SIZE","path","message","Small","footerPrimary","footerSecondary","footerPrimaryOptions","footerSecondaryOptions","close","setFooterPrimaryButton","newOptions","updateCb","getChildButton","getSingleButton","newPayload","updatePrimaryFooterButton","setFooterSecondaryButtons","newButtons","currentOptions","footerOptions","getUpdatedChildActions","updateSecondaryFooterButton","newAction","currentAction","currentButtons","updatedButton","footer","updateActionFromPayload","updated","ActionSetWithChildren","__rest","e","indexOf","getOwnPropertySymbols","propertyIsEnumerable","useContextualSaveBar","ContextualSaveBar_1","visibleRef","useRef","useState","onSaveAction","setOnSaveAction","_b","onDiscardAction","setOnDiscardAction","contextualSaveBar","useCallback","SHOW","current","hide","HIDE","saveAction","setOptions","JSON","stringify","discardAction","useEffect","DISCARD","SAVE","useRouter","setClientInterfaceHook","app_bridge_1","ClientRouter_1","RoutePropagator_1","packageJson","next","clientInterface","version","RouterContext","createContext","Router","router","children","useClientRouting","history","useRoutePropagation","createElement","Provider","useContext","hooks","DispatchAction","routerMarkup","TitleBar","clickBreadcrumb","clickActionButton","TitleBar_2","isShopifyPing","isShopifyPOS","isShopifyMobile","isShopifyEmbedded","isMobile","env_1","navigator","userAgent","isClient","isUnframed","isGroupedButtonPayload","isGroupedButton","ButtonGroup_1","ButtonGroup_2","useFeaturesAvailable","useFeaturesAvailable_1","Fullscreen","exit","enter","ENTER","EXIT","handleAppPrint","redirect_1","printWindow","getWindow","print","handleMobileAppPrint","input","currentWindow","document","body","inputElement","display","appendChild","createHiddenInput","select","ChannelMenu","ChannelMenu_1","ChannelMenu_2","NavigationMenu","AppLink_1","SUBGROUPS","Menu","items","itemsOptions","active","activeOptions","setItems","updateItem","itemToUpdate","find","newItems","currentItems","addChild","subscribeToChild","r","a","c","addEventListener","persisted","timeStamp","u","performance","getEntriesByType","activationStart","f","prerendering","wasDiscarded","rating","delta","entries","concat","Date","now","floor","navigationType","PerformanceObserver","supportedEntryTypes","includes","Promise","resolve","then","getEntries","observe","buffered","l","requestAnimationFrame","visibilityState","h","g","T","C","y","removeEventListener","E","setTimeout","firstHiddenTime","L","S","disconnect","startTime","max","reportAllChanges","w","P","hadRecentInput","takeRecords","F","passive","capture","I","A","M","entryType","cancelable","processingStart","D","x","B","N","R","H","O","interactionId","min","interactionCount","_","durationThreshold","q","V","z","G","J","K","duration","latency","sort","splice","Q","some","U","W","X","Y","Z","readyState","$","responseStart","CLSThresholds","FCPThresholds","FIDThresholds","INPThresholds","LCPThresholds","TTFBThresholds","getCLS","getFCP","getFID","getINP","getLCP","getTTFB","onCLS","onFCP","onFID","onINP","onLCP","onTTFB","isServer","Toast_2","actions_1","PUSH","pathname","REPLACE","client_1","createApp","isPermitted","getPermissionKey","isPerformanceOrWebVitalsAction","isAppMessage","isAppBridgeAction","constants_1","RegExp","PREFIX","SEPARATOR","startsWith","event","findMatchInEnum","match","features","permissionType","feature","actionType","networkAction","persistenceAction","unsupportedOperationAction","unexpectedAction","invalidAction","invalidActionType","invalidPayload","Message","fromAction","permissionAction","isErrorEventName","throwError","invalidOriginAction","AppBridgeError","AppActionType","Error_1","Error_2","errorActionWrapperWithId","castPayload","Error","INVALID_PAYLOAD","INVALID_ACTION_TYPE","INVALID_ACTION","UNEXPECTED_ACTION","UNSUPPORTED_OPERATION","PERSISTENCE","NETWORK","Loading_1","initializeWebVitals","interactionToNextPaint","timeToFirstByte","firstContentfulPaint","cumulativeLayoutShift","firstInputDelay","largestContentfulPaint","web_vitals_1","WebVitals_1","platform_1","WebVitals","LARGEST_CONTENTFUL_PAINT","FIRST_INPUT_DELAY","CUMULATIVE_LAYOUT_SHIFT","FIRST_CONTENTFUL_PAINT","TIME_TO_FIRST_BYTE","INTERACTION_TO_NEXT_PAINT","onReport","cb","metricName","untypedWindow","__is_web_vitals_initialized__","request","respond","AuthCode_1","AuthCode_2","AuthCode","REQUEST","__awaiter","thisArg","_arguments","generator","reject","fulfilled","step","rejected","done","__generator","sent","trys","ops","verb","Symbol","iterator","op","pop","userAuthorizedFetch","authorization_code_1","needsAuthorizationCode","response","headerValue","headers","toLowerCase","callbackUri","_c","isAuthorizationCodeRequired","fetchOperation","uri","code","hmac","shop","timestamp","formattedCallbackUri","getAuthorizationCodePayload","encodeURI","hostname","ok","ResourcePicker","WeightUnit","ResourceType","ProductVariantInventoryPolicy","ProductVariantInventoryManagement","ProductStatus","open","FulfillmentServiceType","CollectionSortOrder","cancel","ActionVerb","ResourcePicker_1","ResourcePicker_2","baseOptions","resourceType","ContextualSaveBar","discard","save","LeaveConfirmation","confirm","disable","enable","LeaveConfirmation_1","LeaveConfirmation_2","Pos","Pos_1","Pos_2","query","state","setState","queryRef","refresh","isUnmounted","featuresAvailable","currentFeatures","onRefreshCleanup","unsubscribe","AppLink","AppLink_2","createTransportListener","fromWindow","fromFrame","Context","validator_1","frame","localOrigin","frameWindow","WINDOW_UNDEFINED","MobileWebView","postMessageToIframe","postMessage","isDispatchAction","updateIframeUrl","newUrl","currentWindowLocation","frameWindowLocation","URL","href","source","handlers_1","errorMessage","hostFrame","contentWindow","handlers_2","messageOrigin","listeners","actionListeners","createSubscribeHandler","dispatcher","callback","actionCallback","Subscribe","Unsubscribe","handleMessage","listener","handleActionDispatch","hasCallback","router_1","handleRouteChange","openCamera","Scanner","OPEN_CAMERA","dispatchScannerAction","CAPTURE","Redirect_1","updatePayload","destination","linkPayload","Link","redirectType","APP","createContextBarAction","NavigationMenu_1","Features","dispatchFeaturesAction","index_1","loaded","LOADED","LOADING","dispatchModalAction","UPDATE_CONTENT","setLineItemProperties","removeLineItemDiscount","setLineItemDiscount","removeLineItem","updateLineItem","addLineItem","removeProperties","setProperties","setDiscount","updateCustomerAddress","addCustomerAddress","setCustomer","fetch","Cart","Cart_1","useContextualSaveBar_1","SELECT","CANCEL","initialSelectionIds","selection","initialQuery","selectMultiple","showHidden","actionVerb","Product","showVariants","showDraft","showArchived","showDraftBadge","showArchivedBadge","_d","_e","_f","_g","_h","_j","Add","isProductVariantResourcePayload","isCreateResourcePayload","isAdminSection","isRemotePayload","isAdminSectionPayload","isAdminPathPayload","isAppPayload","getRelativePath","normalizeUrl","getPathWithSearchAndHash","toDestination","toApp","toRemote","toAdminSection","toAdminPath","isResourcePayload","Navigation","ADMIN_PATH","ADMIN_SECTION","appPayload","adminPathPayload","adminSectionPayload","section","remotePayload","search","hash","URLSearchParams","resource","castResource","variant","unstable_Picker","loadMore","ALL_RESOURCE_VERTICAL_ALIGNMENT","ALL_MEDIA_KINDS","ALL_BADGE_STATUSES","ALL_BADGE_PROGRESSES","Picker_1","Picker_2","isValidOptionalString","isValidOptionalNumber","forEachInEnum","NonSnakeCaseGroup","merge_1","newProps","merged","Loading","Print","SessionToken","Share","eventName","eventNameSpace","toUpperCase","matcher","_val","groupToEventNameSpace","subgroups_1","subgroup","types","lookup","onSelection","onCancel","allowMultiple","isUnmountedRef","openRef","optionsRef","picker","focusReturnPointRef","storeFocusReturnPoint","activeElement","HTMLElement","applyFocusReturnPoint","focusReturnPoint","contains","focus","START","componentWillUnmount","STOP","ClientRouter","hook_1","transformers_1","useOnceEffect_1","transformProps","wasOpen","src","safeSize","srcPayload","prevProps","modal","rest","openUpdated","transformedProps","shouldSendUpdate","onClose","useOnceEffect","useToast","useLocale","useFeatureRequest","useAppBridgeState","useAppBridgeState_1","useAuthenticatedFetch_1","useFeatureRequest_1","useLocale_1","useToast_1","getLocation","hasWindow","shouldRedirect","buttonGroupHelper_1","TITLEBAR_BUTTON_PROPS","BREADCRUMB_BUTTON_PROPS","breadcrumbs","primaryOptions","secondaryOptions","breadcrumbsOption","buttonsOptions","breadcrumb","setBreadcrumbs","setPrimaryButton","setSecondaryButton","getButton","getGroupedButton","updatePrimaryButton","updateSecondaryButtons","buttonToUpdate","updateBreadcrumbButton","getPackageName","getVersion","newState","getState","currentState","sessionToken","RESPOND","removeFromCollection","collection","item","idx","findIndex","buttonActionWrapper","castOptions","getButtons","updateButtons","buttonOptions","singleButton","createAppWrapper","createClientApp","WINDOW_UNDEFINED_MESSAGE","Print_1","MessageTransport_1","shared_1","Client_1","print_1","Hooks_1","actionWrappingMiddleware","middleware","MISSING_LOCAL_ORIGIN","transport","serverAppBridge","middlewares","getStateListeners","transportListener","resolver","errorType","decodedConfig","INVALID_CONFIG","apiKey","atob","validateAndDecodeConfig","isRedirecting","forceRedirect","isDevelopmentClient","redirectHandler","mockAppBridge","createDispatcher","Dispatch","hostOrigin","firstItem","parsedFeatures","reduce","acc","GetState","split","error","unsubscribeCb","middlewares_1","initialize","err","console","appSetUp","createMutationObserver","setupModalAutoSizing","AUTO_SIZE_CLASS","autoSizeStylesheet","innerHTML","createAutoSizeStylesheet","mutationTimeoutId","lastKnownWindowHeight","mutationObserver","MutationObserver","clearTimeout","updateHeight","attributes","attributeOldValue","characterData","characterDataOldValue","childList","subtree","height","scrollHeight","cleanup","removeAutoSizing","handleModalSizeUpdate","appState","head","getElementsByTagName","classList","add","removeChild","addAutoSizing","isFromApp","Fullscreen_1","Fullscreen_2","Features_1","setFeature","handleFeatureUpdate","updatedFeatures","actionPermission_1","Share_1","Share_2","defaultMatcher","link","navigationLinks","locationOrHref","activeLink","activeLinkIndex","Scanner_1","DEFAULT_TOAST_DURATION","onDismiss","toast","isError","ACTION","CLEAR","PureComponent","Performance","MarketingExternalActivityTopBar","FeedbackModal","Client","getSessionToken","FAILED_AUTHENTICATION","onSelect","onSearch","onLoadMore","SEARCH","LOAD_MORE","uuid_1","requestId","status","stop","start","globals_1","embeddedFrameParamsToRemove","selfWindow","topWindow","renderedInTheTopWindow","renderedAsMainApp","normalizedLocation","locationStr","Main","getNormalizedURL","param","searchParams","delete","__values","__read","ar","pack","lowerCase","str","DEFAULT_SPLIT_REGEXP","DEFAULT_STRIP_REGEXP","noCase","splitRegexp","stripRegexp","transform","delimiter","end","charAt","re","pascalCaseTransform","firstChar","lowerChars","substr","camelCaseTransform","capitalCaseTransform","upperCaseFirst","isURLSearchParams","isFormData","FormData","isPlainObject","proto","isAxiosHeaders","caseFunctions","snake","dotCase","camel","pascalCase","header","capitalCase","transformObjectUsingCallbackRecursive","fn","overwrite","e_1","e_2","e_3","isTransformable","polyfill","product","warn","series","store","series_1","series_1_1","e_1_1","return","series_2","series_2_1","e_2_1","series_3","series_3_1","append","e_3_1","transformObjectUsingCallback","defaultOptions","applyCaseOptions","caseOptions","preservedKeys","condition","preserveSpecificKeys","createObjectTransformerOf","functionName","createObjectTransformers","e_4","functionNames","objectTransformers","functionNames_1","functionNames_1_1","e_4_1","createSnakeRequestTransformer","overwriteHeadersOrNoop","createCamelResponseTransformer","excludedKeys","ignoreHeaders","axios","defaults","transformRequest","caseMiddleware","requestTransformer","transformResponse","responseTransformer","interceptors","use","requestInterceptor","params","createSnakeParamsInterceptor","INITIALIZE","isProductVariantCreateResourcePayload","Redirect_2","module","transformBreadcrumb","updateBreadcrumb","updateButton","actionProps","currentProps","titleBar","propsChanged","secondaryButtons","filter","secondaryButton","updateSecondaryActions","actionGroupButtons","actionBroupButton","actionGroup","nestedButton","nestedIndex","updateActionGroups","useInsertionEffect","useLayoutEffect","unsubscribeActions","subscriptions","defaultGroup","defaultSet","UpdateAction","updateSubscription","subscriptionToRemove","currentIndex","eventType","subscription","subscriptionIndices","toRemove","removed","eventComponent","boundedCallback","bind","updateSubscribe","resetOnly","unsubscribeChildren","resetParentOnly","child","getChild","childIndex","getChildIndex","getChildSubscriptions","sub","childIter","subs","eventNameIter","currentSubscriptions","childComponent","newActions","currentActions","uniqueActions","actionsArr","newActionIds","unusedActions","reassign","NavigationMenu_2","MarketingActivityStatusBadgeType","MarketingExternalActivityTopBar_1","MARKETING_ACTIVITY_TOPBAR_BUTTON_PROPS","saving","saved","setSecondaryButtons","updateSaving","updateSaved","updateStatus","selectedItems","maxSelectable","searchQuery","searchQueryPlaceholder","primaryActionLabel","secondaryActionLabel","emptySearchLabel","canLoadMore","loadingMore","verticalAlignment","allowEmptySelection","resourceName","isValidButtonProps","Button_2","modalContent","syncLoadingStatus","hooks_1","fullWidth","leaveConfirmationDisable","visible","saveActionSetOptions","discardActionSetOptions","Loading_2","dispatchShareAction","Modal_2","react","reactRouterDom","_defineProperties","writable","_getPrototypeOf","_setPrototypeOf","_assertThisInitialized","ReferenceError","scrollTo","scrollToElement","getElementById","scrollTop","isBrowser","ScrollMemory","_classCallCheck","_possibleConstructorReturn","detectPop","Map","_inherits","_createClass","elementID","getScrollElement","documentElement","pageYOffset","getScrollPage","ScrollMemory$1","withRouter","FeedbackModal_1","toastList","captureStackTrace","stack","INVALID_ORIGIN","PERMISSION","ENABLE","DISABLE","CONFIRM","enableAction","disableAction","confirmAction","openAction","closeAction","isProduction","isDevelopment","env_2","process","env","session_token_1","fetchOperationOrOptions","finalHeaders","authenticatedFetchOptions","reauthorizeUrl_1","requestFailureReauthorizeUrlHeader_1","Headers","reauthorizeUrl","requestFailureReauthorizeUrlHeader","redirectUrl","noop","noopPromise","handleRedirect","isAppUrl","isHostUrl","isRelative","convertedSection","toastMessage","SessionToken_1","SKELETON_PAGE_LOAD","FULL_PAGE_LOAD","createCartAction","FETCH","SET_CUSTOMER","ADD_CUSTOMER_ADDRESS","UPDATE_CUSTOMER_ADDRESS","SET_DISCOUNT","SET_PROPERTIES","REMOVE_PROPERTIES","ADD_LINE_ITEM","UPDATE_LINE_ITEM","REMOVE_LINE_ITEM","SET_LINE_ITEM_DISCOUNT","REMOVE_LINE_ITEM_DISCOUNT","SET_LINE_ITEM_PROPERTIES","dispatchCartAction","REMOVE_CUSTOMER","REMOVE_DISCOUNT","REMOVE_LINE_ITEM_PROPERTIES","ModalContent_2"],"sourceRoot":""}