UNPKG

158 kBJavaScriptView Raw
1!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("app-bridge-react",[],e):"object"==typeof exports?exports["app-bridge-react"]=e():t["app-bridge-react"]=e()}(window,(function(){return function(t){var e={};function n(o){if(e[o])return e[o].exports;var r=e[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(o,r,function(e){return t[e]}.bind(null,r));return o},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=63)}([function(t,e,n){"use strict";var o,r=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},a=this&&this.__spreadArrays||function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var o=Array(t),r=0;for(e=0;e<n;e++)for(var i=arguments[e],a=0,c=i.length;a<c;a++,r++)o[r]=i[a];return o},c=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.NonSnakeCaseGroup=e.findMatchInEnum=e.forEachInEnum=e.getMergedProps=e.updateActionFromPayload=e.ActionSetWithChildren=e.ActionSet=e.isValidOptionalString=e.isValidOptionalNumber=e.getEventNameSpace=e.getVersion=e.actionWrapper=void 0;var u=n(10),s=n(18),p=n(8),l=n(29),d=c(n(73)),f=n(1),h=c(n(74)),y=n(75);function A(){return y.version}function v(t,n,o){var r=function(t){if(e.NonSnakeCaseGroup.includes(t))return t.toUpperCase();return(n=t,n.replace(/([A-Z])/g,(function(t,e,n){return(0!==n?"_":"")+t[0].toLowerCase()}))).toUpperCase();var n}(t);if(o){var i=o.subgroups,a=o.type;i&&i.length>0&&(r+=r.length>0?l.SEPARATOR:"",i.forEach((function(t,e){r+=""+t.toUpperCase()+(e<i.length-1?l.SEPARATOR:"")}))),a!==t&&a&&(r+=""+(r.length>0?l.SEPARATOR:"")+a.toUpperCase())}return r&&(r+=""+(r.length>0?l.SEPARATOR:"")+n.toUpperCase()),""+l.PREFIX+l.SEPARATOR+r}e.actionWrapper=function(t){return i(i({},t),{version:A(),clientInterface:{name:y.name,version:A()}})},e.getVersion=A,e.getEventNameSpace=v,e.isValidOptionalNumber=function(t){return null==t||"number"==typeof t},e.isValidOptionalString=function(t){return null==t||"string"==typeof t};var P=function(){function t(t,e,n,o){var r=this;this.app=t,this.type=e,this.group=n,this.subgroups=[],this.subscriptions=[],t||p.throwError(p.ActionType.INVALID_OPTIONS,"Missing required `app`"),this.id=o||h.default(),this.defaultGroup=n;var i=this.set;this.set=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return r.app.hooks?(t=r.app.hooks).run.apply(t,a([u.LifecycleHook.UpdateAction,i,r],e)):i.apply(r,e)}}return t.prototype.set=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e]},Object.defineProperty(t.prototype,"component",{get:function(){return{id:this.id,subgroups:this.subgroups,type:this.type}},enumerable:!1,configurable:!0}),t.prototype.updateSubscription=function(t,e,n){var o,r=t.eventType,i=t.callback,a=t.component;return(o=this.subscriptions.findIndex((function(e){return e===t})))>=0?this.subscriptions[o].unsubscribe():o=void 0,this.group=e,this.subgroups=n,Object.assign(a,{subgroups:this.subgroups}),this.subscribe(r,i,a,o)},t.prototype.error=function(t){var e=this,n=[];return E(p.Action,(function(o){n.push(e.subscriptions.length),e.subscribe(o,t)})),function(){n.map((function(t){return e.subscriptions[t]})).forEach((function(t){s.removeFromCollection(e.subscriptions,t,(function(t){t.unsubscribe()}))}))}},t.prototype.subscribe=function(t,e,n,o){var r,a=this,c=n||this.component,u=t.toUpperCase(),s="number"==typeof o?e:e.bind(this);r=p.isErrorEventName(t)?v(f.Group.Error,t,i(i({},c),{type:""})):v(this.group,t,c);var l=this.app.subscribe(r,s,n?n.id:this.id),d={eventType:u,unsubscribe:l,callback:s,component:c,updateSubscribe:function(t,e){return a.updateSubscription.call(a,d,t,e)}};return"number"==typeof o&&o>=0&&o<this.subscriptions.length?this.subscriptions[o]=d:this.subscriptions.push(d),l},t.prototype.unsubscribe=function(t){return void 0===t&&(t=!1),_(this.subscriptions,this.defaultGroup,t),this},t}();e.ActionSet=P;var O=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.children=[],e}return r(e,t),e.prototype.unsubscribe=function(t,n){return void 0===t&&(t=!0),void 0===n&&(n=!1),_(this.subscriptions,this.defaultGroup,n),this.children.forEach((function(n){e.prototype.isPrototypeOf(n)?n.unsubscribe(t,!t):n.unsubscribe(!t)})),this},e.prototype.getChild=function(t){var e=this.children.findIndex((function(e){return e.id===t}));return e>=0?this.children[e]:void 0},e.prototype.getChildIndex=function(t){return this.children.findIndex((function(e){return e.id===t}))},e.prototype.getChildSubscriptions=function(t,e){return this.subscriptions.filter((function(n){return n.component.id===t&&(!e||e===n.eventType)}))},e.prototype.addChild=function(t,n,o){var r=this,i=t.subscriptions;return this.getChild(t.id)||this.children.push(t),!i||n===t.group&&o===t.subgroups?this:(i.forEach((function(t){(0,t.updateSubscribe)(n,o)})),Object.assign(t,{group:n,subgroups:o}),e.prototype.isPrototypeOf(t)&&t.children.forEach((function(t){return r.addChild(t,n,o)})),this)},e.prototype.removeChild=function(t){var e=this;return s.removeFromCollection(this.children,this.getChild(t),(function(){e.subscriptions.filter((function(e){return e.component.id===t})).forEach((function(t){s.removeFromCollection(e.subscriptions,t,(function(t){t.unsubscribe()}))}))})),this},e.prototype.subscribeToChild=function(t,e,n){var o=this,r=n.bind(this);if(e instanceof Array)return e.forEach((function(e){return o.subscribeToChild(t,e,n)})),this;if("string"!=typeof e)return this;var i=e.toUpperCase(),a=this.getChildSubscriptions(t.id,i);if(a.length>0)a.forEach((function(e){return e.updateSubscribe(o.group,t.subgroups)}));else{var c={id:t.id,subgroups:t.subgroups,type:t.type};this.subscribe(i,r,c)}return this},e.prototype.getUpdatedChildActions=function(t,e){if(0!==t.length){for(var n=t.filter((function(t,e,n){return e===n.indexOf(t)})),o=n.map((function(t){return t.id})),r=e.filter((function(t){return o.indexOf(t.id)<0}));r.length>0;){if(!(i=r.pop()))break;this.removeChild(i.id)}return n}for(;e.length>0;){var i;if(!(i=e.pop()))break;this.removeChild(i.id)}},e}(P);function _(t,e,n){void 0===n&&(n=!1),t.forEach((function(t){n?(0,t.updateSubscribe)(e,[]):(0,t.unsubscribe)()})),n||(t.length=0)}function b(t,e){var n=d.default(t,e);return n||Object.assign(t,e)}function E(t,e){Object.keys(t).forEach((function(n){e(t[n])}))}e.ActionSetWithChildren=O,e.updateActionFromPayload=function(t,e){return t.id===e.id&&(Object.assign(t,b(t,e)),!0)},e.getMergedProps=b,e.forEachInEnum=E,e.findMatchInEnum=function(t,e){var n=Object.keys(t).find((function(n){return e===t[n]}));return n?t[n]:void 0},e.NonSnakeCaseGroup=[f.Group.AuthCode,f.Group.Button,f.Group.ButtonGroup,f.Group.Cart,f.Group.Error,f.Group.Features,f.Group.Fullscreen,f.Group.Link,f.Group.Loading,f.Group.Menu,f.Group.Modal,f.Group.Navigation,f.Group.Pos,f.Group.Print,f.Group.ResourcePicker,f.Group.Scanner,f.Group.SessionToken,f.Group.Share,f.Group.TitleBar,f.Group.Toast]},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ComponentType=e.Group=void 0,function(t){t.AuthCode="AuthCode",t.Button="Button",t.ButtonGroup="ButtonGroup",t.Cart="Cart",t.ContextualSaveBar="ContextualSaveBar",t.Error="Error",t.Features="Features",t.FeedbackModal="FeedbackModal",t.Fullscreen="Fullscreen",t.LeaveConfirmation="LeaveConfirmation",t.Link="Link",t.Loading="Loading",t.Menu="Menu",t.Modal="Modal",t.Navigation="Navigation",t.Performance="Performance",t.Pos="Pos",t.Print="Print",t.ResourcePicker="Resource_Picker",t.Scanner="Scanner",t.SessionToken="SessionToken",t.Share="Share",t.TitleBar="TitleBar",t.Toast="Toast",t.MarketingExternalActivityTopBar="MarketingExternalActivityTopBar"}(e.Group||(e.Group={})),function(t){t.Button="Button",t.ButtonGroup="ButtonGroup"}(e.ComponentType||(e.ComponentType={}))},function(t,e,n){"use strict";var o=this&&this.__assign||function(){return(o=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},r=this&&this.__spreadArrays||function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var o=Array(t),r=0;for(e=0;e<n;e++)for(var i=arguments[e],a=0,c=i.length;a<c;a++,r++)o[r]=i[a];return o};Object.defineProperty(e,"__esModule",{value:!0}),e.validate=e.composeSchemas=e.makeOptional=e.matchesObject=e.matchesArray=e.matchesEnum=e.matchesPositiveNumber=e.matchesPositiveInteger=e.matchesString=e.matchesBoolean=void 0;var i="type_error_expected";function a(t,e,n){return void 0===n&&(n={message:void 0}),[{value:t,error:e,message:"function"==typeof n.message?n.message(e,t):n.message}]}function c(t,e,n){var r=n?t[n]:t,i=n?"['"+n+"']":void 0,a=e(r);if(a)return a.map((function(t){return o(o({},t),{path:""+(i||"")+(t.path||"")||void 0})}))}e.matchesBoolean=function(t){return function(e){return"boolean"==typeof e?void 0:a(e,i+"_boolean",t)}},e.matchesString=function(t){return function(e){return"string"==typeof e?void 0:a(e,i+"_string",t)}},e.matchesPositiveInteger=function(t){return function(e){return!Number.isInteger(e)||e<0?a(e,i+"_integer",t):void 0}},e.matchesPositiveNumber=function(t){return function(e){return Number.isNaN(e)||!Number.isFinite(e)||e<0?a(e,i+"_number",t):void 0}},e.matchesEnum=function(t,e){return function(n){var r=Object.keys(t).map((function(e){return t[e]})),i=e&&e.message||"expected:"+r.map((function(t){return"`"+t+"`"})).join(" or ");return r.includes(n)?void 0:a(n,"invalid_enum_value",o(o({},e),{message:i}))}},e.matchesArray=function(t,e){return function(n){if(!Array.isArray(n))return a(n,i+"_array",e);if(t){var r=[];return n.forEach((function(e,n){var i=t(e);i&&(r=r.concat(i.map((function(t){return o(o({},t),{path:"['"+n+"']"+(t.path||"")})}))))})),r.length?r:void 0}}},e.matchesObject=function(t,e){return function(n){if("object"!=typeof n||!n||Array.isArray(n))return a(n,i+"_object",e);var o=Object.keys(t).reduce((function(e,o){return r(e,c(n,t[o],o)||[])}),[]);return o.length?o:void 0}},e.makeOptional=function(t){return function(e){if(null!=e)return t(e)}},e.composeSchemas=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){for(var n,o=0,r=t.length;!n&&o<r;){if(n=t[o](e))return n;o++}}},e.validate=function(t,e){return c(t,e)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.mixedAppClientCheck=e.relativePathSchema=e.relativeUrlSchema=e.isValidRelativePath=e.actionMessage=e.createActionValidator=void 0;var o=n(2);function r(t){return"string"==typeof t&&(""===t||t.startsWith("/"))}e.createActionValidator=function(t,e,n,r){void 0===e&&(e=void 0),void 0===n&&(n=!1),void 0===r&&(r=!1);var i=o.matchesObject({id:r?o.matchesString():o.makeOptional(o.matchesString())}),a=e?o.composeSchemas(i,e):i;return o.matchesObject({type:o.matchesEnum(t,{message:function(t,e){return"The action type `"+e+"` is invalid or unsupported"}}),payload:n?a:o.makeOptional(a)})},e.actionMessage=function(t){return t.map((function(t){var e=t.path,n=t.error,o=t.message,r=t.value;return"`"+n+"` thrown for"+(e?" path: "+e+" and":"")+" value: `"+("object"==typeof r?JSON.stringify(r):r)+"`"+(o?" with message: "+o:"")})).join(" | ")},e.isValidRelativePath=r,e.relativeUrlSchema=o.composeSchemas(o.matchesString(),(function(t){return r(t)?void 0:[{error:"invalid_relative_path",value:t,message:"expected string to start with `/`"}]})),e.relativePathSchema=o.matchesObject({path:e.relativeUrlSchema}),e.mixedAppClientCheck=function(t){t.addEventListener("DOMContentLoaded",(function(){t.hasOwnProperty("ShopifyApp")&&console.error("%cException Detected 🚫\n\n%cAn instance of the EASDK client was detected while initializing Shopify App Bridge. Using Shopify App Bridge and the EASDK simultaneously is not supported.\n\nIf you're migrating an existing app that was built with the shopify_app gem, then the EASDK client might have been included in the home page view template. In this case, remove it from your app before initializing Shopify App Bridge again.","font-size: large;","font-size: normal;")}),{once:!0})}},function(t,e,n){"use strict";t.exports=n(66)},function(t,e,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),r=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.hasOwnProperty.call(t,n)&&o(e,t,n);return r(e,t),e},a=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||e.hasOwnProperty(n)||o(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),e.Performance=e.Pos=e.AppLink=e.ChannelMenu=e.NavigationMenu=e.Share=e.ContextualSaveBar=e.MarketingExternalActivityTopBar=e.TitleBar=e.SessionToken=e.ResourcePicker=e.Redirect=e.Print=e.Modal=e.Loading=e.LeaveConfirmation=e.History=e.Toast=e.Fullscreen=e.FeedbackModal=e.Features=e.Flash=e.Error=e.Cart=e.Scanner=e.ButtonGroup=e.Button=e.AuthCode=void 0;var c=i(n(95));e.AuthCode=c;var u=i(n(7));e.Button=u;var s=i(n(11));e.ButtonGroup=s;var p=i(n(36));e.Cart=p;var l=i(n(8));e.Error=l;var d=i(n(97));e.Flash=d;var f=i(n(100));e.Features=f;var h=i(n(39));e.FeedbackModal=h;var y=i(n(40));e.Fullscreen=y;var A=i(n(41));e.LeaveConfirmation=A;var v=i(n(42));e.Loading=v;var P=i(n(44));e.Modal=P;var O=i(n(102));e.History=O;var _=i(n(49));e.Redirect=_;var b=i(n(19));e.Print=b;var E=i(n(51));e.ResourcePicker=E;var m=i(n(34));e.Scanner=m;var T=i(n(106));e.SessionToken=T;var g=i(n(53));e.TitleBar=g;var S=i(n(15));e.Toast=S;var C=i(n(38));e.ContextualSaveBar=C;var R=i(n(109));e.Share=R;var I=i(n(110));e.NavigationMenu=I;var M=i(n(112));e.ChannelMenu=M;var j=i(n(16));e.AppLink=j;var D=i(n(114));e.Pos=D;var N=i(n(115));e.MarketingExternalActivityTopBar=N;var U=i(n(116));e.Performance=U;var w=n(31);Object.defineProperty(e,"isAppBridgeAction",{enumerable:!0,get:function(){return w.isAppBridgeAction}}),a(n(1),e)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AppBridgeContext=void 0;var o=n(4);e.AppBridgeContext=o.createContext(null)},function(t,e,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),r=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||e.hasOwnProperty(n)||o(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),r(n(80),e),r(n(33),e)},function(t,e,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),r=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||e.hasOwnProperty(n)||o(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),r(n(72),e),r(n(28),e)},function(t,e,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),r=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||e.hasOwnProperty(n)||o(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0});var i=n(27);r(n(10),e),r(n(27),e),e.default=i.createClientApp},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LifecycleHook=e.MessageType=e.PermissionType=void 0,function(t){t.Dispatch="Dispatch",t.Subscribe="Subscribe"}(e.PermissionType||(e.PermissionType={})),function(t){t.GetState="getState",t.Dispatch="dispatch",t.Subscribe="subscribe",t.Unsubscribe="unsubscribe"}(e.MessageType||(e.MessageType={})),function(t){t.UpdateAction="UpdateAction",t.DispatchAction="DispatchAction"}(e.LifecycleHook||(e.LifecycleHook={}))},function(t,e,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),r=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||e.hasOwnProperty(n)||o(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),r(n(96),e),r(n(46),e)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createTransportListener=e.fromWindow=e.fromFrame=e.Context=void 0;var o=n(8),r=n(31),i=n(10),a=n(18),c=n(17);!function(t){t.Modal="Modal",t.Main="Main"}(e.Context||(e.Context={})),e.fromFrame=function(t,e,n){var i=[];if(void 0===t||!t.ownerDocument||!t.ownerDocument.defaultView)throw o.fromAction("App frame is undefined",o.AppActionType.WINDOW_UNDEFINED);var c=t.ownerDocument.defaultView;return c.addEventListener("message",(function(t){if(t.origin===e&&r.isAppMessage(t))for(var n=0,o=i;n<o.length;n++){(0,o[n])(t)}})),{context:n,localOrigin:e,frameWindow:t.contentWindow,hostFrame:c,dispatch:function(n){var o=t.contentWindow;o&&o.postMessage(n,e)},subscribe:function(t){return a.addAndRemoveFromCollection(i,t)}}},e.fromWindow=function(t,e){var n=[];return void 0!==typeof window&&window.addEventListener("message",(function(e){if((window!==t||c.isFrameless)&&e.source===t&&(r.isAppBridgeAction(e.data.payload)||r.isAppMessage(e)))for(var o=0,i=n;o<i.length;o++){(0,i[o])(e)}})),{localOrigin:e,hostFrame:t,dispatch:function(e){if(e.source&&e.source.shopOrigin)if(c.isFrameless&&window&&window.SmartWebView)window.SmartWebView.handleMessage("frameless://fromClient",JSON.stringify(e));else{var n="https://"+e.source.shopOrigin;t.postMessage(e,n)}},subscribe:function(t){return a.addAndRemoveFromCollection(n,t)}}},e.createTransportListener=function(){var t=[],e={};return{createSubscribeHandler:function(n){return function(){if(arguments.length<2)return a.addAndRemoveFromCollection(t,{callback:arguments[0]});var o=Array.from(arguments),r=o[0],c=o[1],u=o[2],s={callback:c,id:u},p={type:r,id:u};return Object.prototype.hasOwnProperty.call(e,r)||(e[r]=[]),n&&n(i.MessageType.Subscribe,p),a.addAndRemoveFromCollection(e[r],s,(function(){n&&n(i.MessageType.Unsubscribe,p)}))}},handleMessage:function(e){t.forEach((function(t){return t.callback(e)}))},handleActionDispatch:function(t){var n=t.type,o=t.payload,r=!1;if(Object.prototype.hasOwnProperty.call(e,n))for(var i=0,a=e[n];i<a.length;i++){var c=a[i],u=c.id,s=c.callback;!(o&&o.id===u)&&u||(s(o),r=!0)}return r}}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ActionType=e.validateAction=e.validateProps=e.buttonSchemaWithId=e.buttonSchema=void 0;var o=n(7);Object.defineProperty(e,"ActionType",{enumerable:!0,get:function(){return o.ActionType}});var r=n(2),i=n(3);e.buttonSchema=r.matchesObject({disabled:r.makeOptional(r.matchesBoolean()),label:r.matchesString(),style:r.makeOptional(r.matchesEnum(o.Style)),icon:r.makeOptional(r.matchesEnum(o.Icon)),loading:r.makeOptional(r.matchesBoolean())}),e.buttonSchemaWithId=r.composeSchemas(r.matchesObject({id:r.matchesString()}),e.buttonSchema),e.validateProps=function(t){return r.validate(t,e.buttonSchema)},e.validateAction=function(t){var n=i.createActionValidator(o.ActionType,t.type===o.ActionType.UPDATE?e.buttonSchema:void 0,!0,!0);return r.validate(t,n)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getSingleButton=void 0;var o=n(7);e.getSingleButton=function(t,e,n,r){return t.addChild(e,t.group,n),t.subscribeToChild(e,o.Action.UPDATE,r),e.payload}},function(t,e,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),r=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||e.hasOwnProperty(n)||o(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),r(n(99),e),r(n(21),e)},function(t,e,n){"use strict";var o,r=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.AppLink=e.update=e.ActionType=e.Action=void 0;var i,a=n(0),c=n(1),u=n(49);function s(t){return a.actionWrapper({group:c.Group.Link,type:i.UPDATE,payload:t})}!function(t){t.UPDATE="UPDATE"}(e.Action||(e.Action={})),function(t){t.UPDATE="APP::LINK::UPDATE"}(i=e.ActionType||(e.ActionType={})),e.update=s;var p=function(t){function e(e,n){var o=t.call(this,e,c.Group.Link,c.Group.Link)||this;return o.label="",o.destination="",o.set(n,!1),o}return r(e,t),Object.defineProperty(e.prototype,"options",{get:function(){return{label:this.label,destination:this.destination,redirectType:u.Action.APP}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"payload",{get:function(){var t=this.options,e=t.label,n=t.destination,o=t.redirectType,r=n;return{id:this.id,label:e,destination:{path:r},redirectType:o}},enumerable:!1,configurable:!0}),e.prototype.set=function(t,e){void 0===e&&(e=!0);var n=a.getMergedProps(this.options,t),o=n.label,r=n.destination;return this.label=o,this.destination=r,e&&this.dispatch(i.UPDATE),this},e.prototype.dispatch=function(t){switch(t){case i.UPDATE:this.app.dispatch(s(this.payload))}return this},e}(a.ActionSet);e.AppLink=p,e.create=function(t,e){return new p(t,e)}},function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.isFrameless=e.isDevelopmentClient=e.isProduction=e.isDevelopment=e.isClient=e.isServer=void 0,e.isServer="undefined"==typeof window,e.isClient=!e.isServer,e.isDevelopment=void 0!==t&&t.env&&!1,e.isProduction=!e.isDevelopment,e.isDevelopmentClient=e.isDevelopment&&e.isClient,e.isFrameless=!e.isServer&&window.navigator.userAgent.indexOf(" Frameless ")>0}).call(this,n(68))},function(t,e,n){"use strict";function o(t,e,n){var o=t.findIndex((function(t){return t===e}));return o>=0&&(t.splice(o,1),n&&n(e),!0)}Object.defineProperty(e,"__esModule",{value:!0}),e.removeFromCollection=e.addAndRemoveFromCollection=void 0,e.addAndRemoveFromCollection=function(t,e,n){return t.push(e),function(){return o(t,e,n)}},e.removeFromCollection=o},function(t,e,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),r=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||e.hasOwnProperty(n)||o(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),r(n(76),e),r(n(30),e)},function(t,e,n){"use strict";function o(){return r()?window.location:void 0}function r(){return"undefined"!=typeof window}Object.defineProperty(e,"__esModule",{value:!0}),e.getWindow=e.getLocation=e.redirect=e.shouldRedirect=void 0,e.shouldRedirect=function(t){return t===window},e.redirect=function(t){var e=o();e&&e.assign(t)},e.getLocation=o,e.getWindow=function(){return r()?window:void 0}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Action=e.ActionType=void 0,function(t){t.SHOW="APP::TOAST::SHOW",t.CLEAR="APP::TOAST::CLEAR"}(e.ActionType||(e.ActionType={})),function(t){t.SHOW="SHOW",t.CLEAR="CLEAR"}(e.Action||(e.Action={}))},function(t,e,n){"use strict";var o=this&&this.__awaiter||function(t,e,n,o){return new(n||(n=Promise))((function(r,i){function a(t){try{u(o.next(t))}catch(t){i(t)}}function c(t){try{u(o.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,c)}u((o=o.apply(t,e||[])).next())}))},r=this&&this.__generator||function(t,e){var n,o,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,o&&(r=2&i[0]?o.return:i[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,i[1])).done)return r;switch(o=0,r&&(i=[2&i[0],r.value]),i[0]){case 0:case 1:r=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,o=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(r=(r=a.trys).length>0&&r[r.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]<r[3])){a.label=i[1];break}if(6===i[0]&&a.label<r[1]){a.label=r[1],r=i;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(i);break}r[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],o=0}finally{n=r=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.updateHistory=void 0;var i=n(26),a=n(5),c=n(131),u=["hmac","locale","protocol","session","shop","timestamp"];e.updateHistory=function(t,e){return o(this,void 0,void 0,(function(){var n,o,s,p,l,d,f,h,y;return r(this,(function(r){switch(r.label){case 0:return n=c.getSelfWindow(),o=c.getTopWindow(),s=n===o,[4,t.getState("context").then((function(t){return t===i.Context.Main}))];case 1:return p=r.sent(),s||!p?[2]:(l=function(t){var e=c.getOrigin();if("string"==typeof t)return new URL(t,e);var n=t.pathname,o=t.search,r=t.hash;return new URL(""+n+o+r,e)}(e),u.forEach((function(t){return l.searchParams.delete(t)})),d=l.pathname,f=l.search,h=l.hash,y=""+d+f+h,a.History.create(t).dispatch(a.History.Action.REPLACE,y),[2])}}))}))}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.useAppBridge=void 0;var o=n(4),r=n(6);e.useAppBridge=function(){var t=o.useContext(r.AppBridgeContext);if(!t)throw new Error("No AppBridge context provided. Your component must be wrapped in an AppBridge <Context> component.");return t}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.handleRouteChange=void 0;var o=n(5);e.handleRouteChange=function(t,e){return t.subscribe(o.Redirect.ActionType.APP,(function(t){var n=t.path;e.replace(n)}))}},function(t,e,n){"use strict";var o,r=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),a=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),c=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.hasOwnProperty.call(t,n)&&i(e,t,n);return a(e,t),e},u=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.setClientInterfaceHook=void 0;var s=u(n(4)),p=c(n(26)),l=n(6),d=n(122),f=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.app=e.appInstance,e}return r(n,t),Object.defineProperty(n.prototype,"appInstance",{get:function(){return this.app||(this.app=p.default(this.props.config),this.app&&this.app.hooks&&this.app.hooks.set(p.LifecycleHook.DispatchAction,e.setClientInterfaceHook)),this.app},enumerable:!1,configurable:!0}),n.prototype.render=function(){return s.default.createElement(l.AppBridgeContext.Provider,{value:this.appInstance},this.props.children)},n}(s.default.Component);e.default=f,e.setClientInterfaceHook=function(t){return function(e){return e.clientInterface={name:"@shopify/app-bridge-react",version:d.version},t(e)}}},function(t,e,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),r=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||e.hasOwnProperty(n)||o(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0});var i=n(17).isDevelopment?n(69).default:n(57).default;e.default=i,r(n(12),e),r(n(9),e)},function(t,e,n){"use strict";var o=this&&this.__assign||function(){return(o=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.createApp=e.createAppWrapper=e.createClientApp=e.getShopOrigin=e.getUrlParams=e.WINDOW_UNDEFINED_MESSAGE=void 0;var i=n(0),a=n(8),c=n(19),u=n(12),s=n(32),p=n(17),l=n(77),d=n(20),f=n(10),h=r(n(78));function y(){var t={},e=d.getLocation();return e?e.search.slice(e.search.indexOf("?")+1).split("&").reduce((function(t,e){var n,r=e.split("="),i=r[0],a=r[1];return o(o({},t),((n={})[decodeURIComponent(i)]=decodeURIComponent(a),n))}),t):t}function A(t,n,o){if(void 0===o&&(o=[]),!t)throw a.fromAction(e.WINDOW_UNDEFINED_MESSAGE,a.AppActionType.WINDOW_UNDEFINED);var r=d.getLocation(),i=n||r&&r.origin;if(!i)throw a.fromAction("local origin cannot be blank",a.AppActionType.MISSING_LOCAL_ORIGIN);var c=u.fromWindow(t,i);return e.createClientApp(c,o)}function v(t){var e=d.getWindow();return e?A(e.top)(t):s.serverAppBridge}e.WINDOW_UNDEFINED_MESSAGE="window is not defined. Running an app outside a browser is not supported",e.getUrlParams=y,e.getShopOrigin=function(){return y().shop},e.createClientApp=function(t,e){void 0===e&&(e=[]);var n=[],o=u.createTransportListener();return t.subscribe((function(t){var e=t.data,r=e.type,c=e.payload;switch(r){case"getState":n.splice(0).forEach((function(t){return t(c)}));break;case"dispatch":if(o.handleMessage(c),o.handleActionDispatch(c))return;var u=i.findMatchInEnum(a.ActionType,c.type);u&&a.throwError(u,c)}})),function(r){if(!r.shopOrigin)throw a.fromAction("shopOrigin must be provided",a.AppActionType.INVALID_CONFIG);var u=/^https?:\/\//;if(u.test(r.shopOrigin)){var s="shopOrigin should not include protocol, please use: "+r.shopOrigin.replace(u,"");throw a.fromAction(s,a.AppActionType.INVALID_CONFIG)}if(!r.apiKey)throw a.fromAction("apiKey must be provided",a.AppActionType.INVALID_CONFIG);var y=function(t,e){return function(n,o){t.dispatch({payload:o,source:e,type:n})}}(t,r),A=o.createSubscribeHandler(y);function v(t){return y(f.MessageType.Dispatch,t),t}y(f.MessageType.Unsubscribe),function(t,e){var n=e.apiKey,o=e.shopOrigin,r=e.forceRedirect,i=void 0===r?!p.isDevelopmentClient:r,a=d.getLocation();if(!p.isFrameless&&a&&n&&o&&i&&d.shouldRedirect(t)){var c="https://"+o+"/admin/apps/"+n+a.pathname+(a.search||"");d.redirect(c)}}(t.hostFrame,r);for(var P=new h.default,O={localOrigin:t.localOrigin,hooks:P,dispatch:function(t){return O.hooks?O.hooks.run(f.LifecycleHook.DispatchAction,v,O,t):v(t)},featuresAvailable:function(t){return O.getState("features").then((function(e){return t&&Object.keys(e).forEach((function(n){t.includes(n)||delete e[n]})),e}))},getState:function(t){return new Promise((function(t){n.push(t),y(f.MessageType.GetState)})).then((function(e){return t?t.split(".").reduce((function(t,n){if("object"==typeof e&&!Array.isArray(e))return t=e[n],e=t,t}),void 0):e}))},subscribe:A,error:function(t,e){var n=[];return i.forEachInEnum(a.ActionType,(function(o){n.push(A(o,t,e))})),function(){n.forEach((function(t){return t()}))}}},_=0,b=e;_<b.length;_++){(0,b[_])(P,O)}return function(t){t.subscribe(c.ActionType.APP,l.handleAppPrint)}(O),O}},e.createAppWrapper=A,e.createApp=v,e.default=v},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AppActionType=e.ActionType=e.Action=void 0,function(t){t.INVALID_ACTION="INVALID_ACTION",t.INVALID_ACTION_TYPE="INVALID_ACTION_TYPE",t.INVALID_OPTIONS="INVALID_OPTIONS",t.INVALID_PAYLOAD="INVALID_PAYLOAD",t.UNEXPECTED_ACTION="UNEXPECTED_ACTION",t.PERSISTENCE="PERSISTENCE",t.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",t.NETWORK="NETWORK",t.PERMISSION="PERMISSION"}(e.Action||(e.Action={})),function(t){t.INVALID_ACTION="APP::ERROR::INVALID_ACTION",t.INVALID_ACTION_TYPE="APP::ERROR::INVALID_ACTION_TYPE",t.INVALID_PAYLOAD="APP::ERROR::INVALID_PAYLOAD",t.INVALID_OPTIONS="APP::ERROR::INVALID_OPTIONS",t.UNEXPECTED_ACTION="APP::ERROR::UNEXPECTED_ACTION",t.PERSISTENCE="APP::ERROR::PERSISTENCE",t.UNSUPPORTED_OPERATION="APP::ERROR::UNSUPPORTED_OPERATION",t.NETWORK="APP::ERROR::NETWORK",t.PERMISSION="APP::ERROR::PERMISSION",t.FAILED_AUTHENTICATION="APP::ERROR::FAILED_AUTHENTICATION"}(e.ActionType||(e.ActionType={})),function(t){t.INVALID_CONFIG="APP::ERROR::INVALID_CONFIG",t.MISSING_CONFIG="APP::APP_ERROR::MISSING_CONFIG",t.MISSING_APP_BRIDGE_MIDDLEWARE="APP::APP_ERROR::MISSING_APP_BRIDGE_MIDDLEWARE",t.WINDOW_UNDEFINED="APP::APP_ERROR::WINDOW_UNDEFINED",t.MISSING_LOCAL_ORIGIN="APP::APP_ERROR::MISSING_LOCAL_ORIGIN",t.MISSING_HOST_PROVIDER="APP::APP_ERROR::MISSING_HOST_PROVIDER",t.MISSING_ROUTER_CONTEXT="APP::APP_ERROR::MISSING_ROUTER_CONTEXT",t.MISSING_HISTORY_BLOCK="APP::APP_ERROR::MISSING_HISTORY_BLOCK"}(e.AppActionType||(e.AppActionType={}))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SEPARATOR=e.PREFIX=void 0,e.PREFIX="APP",e.SEPARATOR="::"},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Action=e.ActionType=void 0,function(t){t.APP="APP::PRINT::APP"}(e.ActionType||(e.ActionType={})),function(t){t.APP="APP"}(e.Action||(e.Action={}))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isAppMessage=e.isPermitted=e.getPermissionKey=e.isFromApp=e.isAppBridgeAction=void 0;var o=n(10),r=n(29),i=n(0);function a(t){return t.replace(new RegExp("^"+r.PREFIX+r.SEPARATOR+"\\w+"+r.SEPARATOR),"")}e.isAppBridgeAction=function(t){return t instanceof Object&&t.hasOwnProperty("type")&&t.type.toString().startsWith(r.PREFIX)},e.isFromApp=function(t){return"object"==typeof t&&"object"==typeof t.source&&"string"==typeof t.source.apiKey},e.getPermissionKey=a,e.isPermitted=function(t,e,n){var o=e.group,r=e.type;if(!o||!t.hasOwnProperty(o))return!1;var i=t[o];if(!i)return!1;var c=a(r);return!!i[c]&&!0===i[c][n]},e.isAppMessage=function(t){if("object"!=typeof t||!t.data||"object"!=typeof t.data)return!1;var e=t.data;return e.hasOwnProperty("type")&&void 0!==i.findMatchInEnum(o.MessageType,e.type)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.serverAppBridge=void 0;var o=n(8),r=function(){};e.serverAppBridge={dispatch:function(){return{}},error:function(){return r},featuresAvailable:function(){return Promise.reject(o.fromAction("Feature detection is only available on the client side.",o.AppActionType.WINDOW_UNDEFINED))},getState:function(){return Promise.reject(o.fromAction("State is only available on the client side.",o.AppActionType.WINDOW_UNDEFINED))},localOrigin:"",subscribe:function(){return r}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Style=e.Icon=e.ActionType=e.Action=void 0,function(t){t.CLICK="CLICK",t.UPDATE="UPDATE"}(e.Action||(e.Action={})),function(t){t.CLICK="APP::BUTTON::CLICK",t.UPDATE="APP::BUTTON::UPDATE"}(e.ActionType||(e.ActionType={})),function(t){t.Print="print"}(e.Icon||(e.Icon={})),function(t){t.Danger="danger"}(e.Style||(e.Style={}))},function(t,e,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),r=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||e.hasOwnProperty(n)||o(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),r(n(82),e),r(n(35),e)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Action=e.ActionType=void 0,function(t){t.OPEN_CAMERA="APP::SCANNER::OPEN::CAMERA",t.OPEN_NFC="APP::SCANNER::OPEN::NFC",t.CAPTURE="APP::SCANNER::CAPTURE"}(e.ActionType||(e.ActionType={})),function(t){t.OPEN_CAMERA="OPEN::CAMERA",t.OPEN_NFC="OPEN::NFC",t.CAPTURE="CAPTURE"}(e.Action||(e.Action={}))},function(t,e,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),r=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||e.hasOwnProperty(n)||o(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),r(n(84),e),r(n(37),e)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Action=e.ActionType=void 0,function(t){t.FETCH="APP::CART::FETCH",t.UPDATE="APP::CART::UPDATE",t.SET_CUSTOMER="APP::CART::SET_CUSTOMER",t.REMOVE_CUSTOMER="APP::CART::REMOVE_CUSTOMER",t.ADD_CUSTOMER_ADDRESS="APP::CART::ADD_CUSTOMER_ADDRESS",t.UPDATE_CUSTOMER_ADDRESS="APP::CART::UPDATE_CUSTOMER_ADDRESS",t.SET_DISCOUNT="APP::CART::SET_DISCOUNT",t.REMOVE_DISCOUNT="APP::CART::REMOVE_DISCOUNT",t.SET_PROPERTIES="APP::CART::SET_PROPERTIES",t.REMOVE_PROPERTIES="APP::CART::REMOVE_PROPERTIES",t.CLEAR="APP::CART::CLEAR",t.ADD_LINE_ITEM="APP::CART::ADD_LINE_ITEM",t.UPDATE_LINE_ITEM="APP::CART::UPDATE_LINE_ITEM",t.REMOVE_LINE_ITEM="APP::CART::REMOVE_LINE_ITEM",t.SET_LINE_ITEM_DISCOUNT="APP::CART::SET_LINE_ITEM_DISCOUNT",t.REMOVE_LINE_ITEM_DISCOUNT="APP::CART::REMOVE_LINE_ITEM_DISCOUNT",t.SET_LINE_ITEM_PROPERTIES="APP::CART::SET_LINE_ITEM_PROPERTIES",t.REMOVE_LINE_ITEM_PROPERTIES="APP::CART::REMOVE_LINE_ITEM_PROPERTIES"}(e.ActionType||(e.ActionType={})),function(t){t.FETCH="FETCH",t.UPDATE="UPDATE",t.SET_CUSTOMER="SET_CUSTOMER",t.REMOVE_CUSTOMER="REMOVE_CUSTOMER",t.ADD_CUSTOMER_ADDRESS="ADD_CUSTOMER_ADDRESS",t.UPDATE_CUSTOMER_ADDRESS="UPDATE_CUSTOMER_ADDRESS",t.SET_DISCOUNT="SET_DISCOUNT",t.REMOVE_DISCOUNT="REMOVE_DISCOUNT",t.SET_PROPERTIES="SET_PROPERTIES",t.REMOVE_PROPERTIES="REMOVE_PROPERTIES",t.CLEAR="CLEAR",t.ADD_LINE_ITEM="ADD_LINE_ITEM",t.UPDATE_LINE_ITEM="UPDATE_LINE_ITEM",t.REMOVE_LINE_ITEM="REMOVE_LINE_ITEM",t.SET_LINE_ITEM_DISCOUNT="SET_LINE_ITEM_DISCOUNT",t.REMOVE_LINE_ITEM_DISCOUNT="REMOVE_LINE_ITEM_DISCOUNT",t.SET_LINE_ITEM_PROPERTIES="SET_LINE_ITEM_PROPERTIES",t.REMOVE_LINE_ITEM_PROPERTIES="REMOVE_LINE_ITEM_PROPERTIES"}(e.Action||(e.Action={}))},function(t,e,n){"use strict";var o,r=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.ContextualSaveBar=e.discard=e.save=e.hide=e.show=e.ActionType=e.Action=void 0;var a,c,u=n(0),s=n(1);function p(t,e){return u.actionWrapper({group:s.Group.ContextualSaveBar,type:c[t],payload:e})}!function(t){t.DISCARD="DISCARD",t.SAVE="SAVE",t.SHOW="SHOW",t.HIDE="HIDE",t.UPDATE="UPDATE"}(a=e.Action||(e.Action={})),function(t){t.DISCARD="APP::CONTEXTUAL_SAVE_BAR::DISCARD",t.SAVE="APP::CONTEXTUAL_SAVE_BAR::SAVE",t.SHOW="APP::CONTEXTUAL_SAVE_BAR::SHOW",t.HIDE="APP::CONTEXTUAL_SAVE_BAR::HIDE",t.UPDATE="APP::CONTEXTUAL_SAVE_BAR::UPDATE"}(c=e.ActionType||(e.ActionType={})),e.show=function(t){return p(a.SHOW,t)},e.hide=function(t){return p(a.HIDE,t)},e.save=function(t){return p(a.SAVE,t)},e.discard=function(t){return p(a.DISCARD,t)};var l=function(t){function e(e,n){void 0===n&&(n={});var o=t.call(this,e,s.Group.ContextualSaveBar,s.Group.ContextualSaveBar)||this;return o.options=n,o.set(n,!1),o}return r(e,t),Object.defineProperty(e.prototype,"payload",{get:function(){return i({id:this.id},this.options)},enumerable:!1,configurable:!0}),e.prototype.set=function(t,e){void 0===e&&(e=!0);var n=u.getMergedProps(this.options,t);return this.options=n,e&&this.dispatch(a.UPDATE),this},e.prototype.dispatch=function(t){return this.app.dispatch(p(t,this.payload)),this},e}(u.ActionSet);e.ContextualSaveBar=l,e.create=function(t,e){return new l(t,e)}},function(t,e,n){"use strict";var o,r=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.FeedbackModal=e.close=e.open=e.ActionType=e.Action=void 0;var a,c,u=n(0),s=n(1);function p(t){return u.actionWrapper({group:s.Group.FeedbackModal,payload:t,type:c.OPEN})}function l(t){return u.actionWrapper({group:s.Group.FeedbackModal,payload:t,type:c.CLOSE})}!function(t){t.OPEN="OPEN",t.CLOSE="CLOSE"}(a=e.Action||(e.Action={})),function(t){t.OPEN="APP::FEEDBACK_MODAL::OPEN",t.CLOSE="APP::FEEDBACK_MODAL::CLOSE"}(c=e.ActionType||(e.ActionType={})),e.open=p,e.close=l;var d=function(t){function e(e,n){var o=t.call(this,e,s.Group.FeedbackModal,s.Group.FeedbackModal)||this;return o.options=n,o.set(n),o}return r(e,t),Object.defineProperty(e.prototype,"payload",{get:function(){return i({id:this.id},this.options)},enumerable:!1,configurable:!0}),e.prototype.set=function(t){return this.options=u.getMergedProps(this.options,t),this},e.prototype.dispatch=function(t){switch(t){case a.OPEN:var e=p(this.payload);this.app.dispatch(e);break;case a.CLOSE:var n=l(this.payload);this.app.dispatch(n)}return this},e}(u.ActionSet);e.FeedbackModal=d,e.create=function(t,e){return new d(t,e)}},function(t,e,n){"use strict";var o,r=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.Fullscreen=e.exit=e.enter=e.ActionType=e.Action=void 0;var i,a=n(0),c=n(1);!function(t){t.ENTER="ENTER",t.EXIT="EXIT"}(e.Action||(e.Action={})),function(t){t.ENTER="APP::FULLSCREEN::ENTER",t.EXIT="APP::FULLSCREEN::EXIT"}(i=e.ActionType||(e.ActionType={})),e.enter=function(){return a.actionWrapper({group:c.Group.Fullscreen,type:i.ENTER})},e.exit=function(){return a.actionWrapper({group:c.Group.Fullscreen,type:i.EXIT})};var u=function(t){function e(e){return t.call(this,e,c.Group.Fullscreen,c.Group.Fullscreen)||this}return r(e,t),Object.defineProperty(e.prototype,"payload",{get:function(){return{id:this.id}},enumerable:!1,configurable:!0}),e.prototype.dispatch=function(t){return this.app.dispatch(a.actionWrapper({group:this.group,type:i[t],payload:this.payload})),this},e}(a.ActionSet);e.Fullscreen=u,e.create=function(t){return new u(t)}},function(t,e,n){"use strict";var o,r=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.LeaveConfirmation=e.confirm=e.disable=e.enable=e.ActionType=e.Action=void 0;var a,c,u=n(0),s=n(1);function p(t){return void 0===t&&(t={}),u.actionWrapper({group:s.Group.LeaveConfirmation,payload:t,type:c.ENABLE})}function l(t){return void 0===t&&(t={}),u.actionWrapper({group:s.Group.LeaveConfirmation,payload:t,type:c.DISABLE})}function d(t){return void 0===t&&(t={}),u.actionWrapper({group:s.Group.LeaveConfirmation,payload:t,type:c.CONFIRM})}!function(t){t.ENABLE="ENABLE",t.DISABLE="DISABLE",t.CONFIRM="CONFIRM"}(a=e.Action||(e.Action={})),function(t){t.ENABLE="APP::LEAVE_CONFIRMATION::ENABLE",t.DISABLE="APP::LEAVE_CONFIRMATION::DISABLE",t.CONFIRM="APP::LEAVE_CONFIRMATION::CONFIRM"}(c=e.ActionType||(e.ActionType={})),e.enable=p,e.disable=l,e.confirm=d;var f=function(t){function e(e,n){void 0===n&&(n={});var o=t.call(this,e,s.Group.LeaveConfirmation,s.Group.LeaveConfirmation)||this;return o.options=n,o.set(n),o}return r(e,t),Object.defineProperty(e.prototype,"payload",{get:function(){return i({id:this.id},this.options)},enumerable:!1,configurable:!0}),e.prototype.set=function(t){return this.options=u.getMergedProps(this.options,t),this},e.prototype.dispatch=function(t){switch(t){case a.ENABLE:var e=p(this.payload);this.app.dispatch(e);break;case a.DISABLE:var n=l(this.payload);this.app.dispatch(n);break;case a.CONFIRM:var o=d(this.payload);this.app.dispatch(o)}return this},e}(u.ActionSet);e.LeaveConfirmation=f,e.create=function(t,e){return void 0===e&&(e={}),new f(t,e)}},function(t,e,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),r=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||e.hasOwnProperty(n)||o(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),r(n(90),e),r(n(43),e)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Action=e.ActionType=void 0,function(t){t.START="APP::LOADING::START",t.STOP="APP::LOADING::STOP"}(e.ActionType||(e.ActionType={})),function(t){t.START="START",t.STOP="STOP"}(e.Action||(e.Action={}))},function(t,e,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),r=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||e.hasOwnProperty(n)||o(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),r(n(92),e),r(n(45),e)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Size=e.ActionType=e.Action=void 0,function(t){t.OPEN="OPEN",t.CLOSE="CLOSE",t.UPDATE="UPDATE",t.UPDATE_SIZE="UPDATE_SIZE",t.DATA="DATA"}(e.Action||(e.Action={})),function(t){t.OPEN="APP::MODAL::OPEN",t.CLOSE="APP::MODAL::CLOSE",t.UPDATE="APP::MODAL::UPDATE",t.FOOTER_BUTTON_CLICK="APP::MODAL::FOOTER::BUTTON::CLICK",t.FOOTER_BUTTON_UPDATE="APP::MODAL::FOOTER::BUTTON::UPDATE",t.UPDATE_SIZE="APP::MODAL::UPDATE_SIZE",t.DATA="APP::MODAL::DATA"}(e.ActionType||(e.ActionType={})),function(t){t.Small="small",t.Medium="medium",t.Large="large",t.Full="full",t.Auto="auto"}(e.Size||(e.Size={}))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ActionType=e.Action=void 0,function(t){t.UPDATE="UPDATE"}(e.Action||(e.Action={})),function(t){t.UPDATE="APP::BUTTONGROUP::UPDATE"}(e.ActionType||(e.ActionType={}))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Action=e.ActionType=void 0,function(t){t.UPDATE="APP::FEATURES::UPDATE",t.REQUEST="APP::FEATURES::REQUEST",t.REQUEST_UPDATE="APP::FEATURES::REQUEST::UPDATE"}(e.ActionType||(e.ActionType={})),function(t){t.UPDATE="UPDATE",t.REQUEST="REQUEST",t.REQUEST_UPDATE="REQUEST::UPDATE"}(e.Action||(e.Action={}))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Action=e.ActionType=void 0,function(t){t.PUSH="APP::NAVIGATION::HISTORY::PUSH",t.REPLACE="APP::NAVIGATION::HISTORY::REPLACE"}(e.ActionType||(e.ActionType={})),function(t){t.PUSH="PUSH",t.REPLACE="REPLACE"}(e.Action||(e.Action={}))},function(t,e,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),r=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||e.hasOwnProperty(n)||o(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),r(n(104),e),r(n(50),e)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ResourceType=e.ActionType=e.Action=void 0,function(t){t.ADMIN_PATH="ADMIN::PATH",t.ADMIN_SECTION="ADMIN::SECTION",t.REMOTE="REMOTE",t.APP="APP"}(e.Action||(e.Action={})),function(t){t.ADMIN_SECTION="APP::NAVIGATION::REDIRECT::ADMIN::SECTION",t.ADMIN_PATH="APP::NAVIGATION::REDIRECT::ADMIN::PATH",t.REMOTE="APP::NAVIGATION::REDIRECT::REMOTE",t.APP="APP::NAVIGATION::REDIRECT::APP"}(e.ActionType||(e.ActionType={})),function(t){t.Product="products",t.Collection="collections",t.Order="orders",t.Customer="customers",t.Discount="discounts"}(e.ResourceType||(e.ResourceType={}))},function(t,e,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),r=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||e.hasOwnProperty(n)||o(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),r(n(105),e),r(n(52),e)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ActionVerb=e.ResourceType=e.ProductVariantInventoryManagement=e.ProductVariantInventoryPolicy=e.WeightUnit=e.FulfillmentServiceType=e.CollectionSortOrder=e.ActionType=e.Action=void 0,function(t){t.OPEN="OPEN",t.SELECT="SELECT",t.CLOSE="CLOSE",t.UPDATE="UPDATE",t.CANCEL="CANCEL"}(e.Action||(e.Action={})),function(t){t.OPEN="APP::RESOURCE_PICKER::OPEN",t.SELECT="APP::RESOURCE_PICKER::SELECT",t.CLOSE="APP::RESOURCE_PICKER::CLOSE",t.UPDATE="APP::RESOURCE_PICKER::UPDATE",t.CANCEL="APP::RESOURCE_PICKER::CANCEL"}(e.ActionType||(e.ActionType={})),function(t){t.Manual="MANUAL",t.BestSelling="BEST_SELLING",t.AlphaAsc="ALPHA_ASC",t.AlphaDesc="ALPHA_DESC",t.PriceDesc="PRICE_DESC",t.PriceAsc="PRICE_ASC",t.CreatedDesc="CREATED_DESC",t.Created="CREATED"}(e.CollectionSortOrder||(e.CollectionSortOrder={})),function(t){t.GiftCard="GIFT_CARD",t.Manual="MANUAL",t.ThirdParty="THIRD_PARTY"}(e.FulfillmentServiceType||(e.FulfillmentServiceType={})),function(t){t.Kilograms="KILOGRAMS",t.Grams="GRAMS",t.Pounds="POUNDS",t.Ounces="OUNCES"}(e.WeightUnit||(e.WeightUnit={})),function(t){t.Deny="DENY",t.Continue="CONTINUE"}(e.ProductVariantInventoryPolicy||(e.ProductVariantInventoryPolicy={})),function(t){t.Shopify="SHOPIFY",t.NotManaged="NOT_MANAGED",t.FulfillmentService="FULFILLMENT_SERVICE"}(e.ProductVariantInventoryManagement||(e.ProductVariantInventoryManagement={})),function(t){t.Product="product",t.ProductVariant="variant",t.Collection="collection"}(e.ResourceType||(e.ResourceType={})),function(t){t.Add="add",t.Select="select"}(e.ActionVerb||(e.ActionVerb={}))},function(t,e,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),r=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||e.hasOwnProperty(n)||o(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),r(n(107),e),r(n(54),e)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ActionType=e.Action=void 0,function(t){t.UPDATE="UPDATE"}(e.Action||(e.Action={})),function(t){t.UPDATE="APP::TITLEBAR::UPDATE",t.BUTTON_CLICK="APP::TITLEBAR::BUTTONS::BUTTON::CLICK",t.BUTTON_UPDATE="APP::TITLEBAR::BUTTONS::BUTTON::UPDATE",t.BUTTON_GROUP_UPDATE="APP::TITLEBAR::BUTTONS::BUTTONGROUP::UPDATE",t.BREADCRUMBS_CLICK="APP::TITLEBAR::BREADCRUMBS::BUTTON::CLICK",t.BREADCRUMBS_UPDATE="APP::TITLEBAR::BREADCRUMBS::BUTTON::UPDATE"}(e.ActionType||(e.ActionType={}))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ActionType=e.validateAction=e.validateProps=e.buttonGroupSchema=void 0;var o=n(11);Object.defineProperty(e,"ActionType",{enumerable:!0,get:function(){return o.ActionType}});var r=n(2),i=n(3),a=n(13);e.buttonGroupSchema=r.composeSchemas(a.buttonSchema,r.matchesObject({buttons:r.matchesArray(r.makeOptional(a.buttonSchemaWithId))})),e.validateProps=function(t){return r.validate(t,e.buttonGroupSchema)},e.validateAction=function(t){var n=i.createActionValidator(o.ActionType,e.buttonGroupSchema,!0,!0);return r.validate(t,n)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ActionType=e.validateAction=e.validateProps=e.linkActionSchema=e.linkPropsSchema=void 0;var o,r=n(5),i=n(2),a=n(3),c=n(16);Object.defineProperty(e,"ActionType",{enumerable:!0,get:function(){return c.ActionType}}),function(t){t.APP="APP"}(o||(o={})),e.linkPropsSchema=i.matchesObject({label:i.matchesString(),destination:a.relativeUrlSchema,redirectType:i.matchesEnum(o)}),e.linkActionSchema=i.matchesObject({label:i.matchesString(),destination:a.relativePathSchema,redirectType:i.matchesEnum(o)}),e.validateProps=function(t){return i.validate(t,e.linkPropsSchema)},e.validateAction=function(t){var n,o=r.AppLink.ActionType;switch(t.type){case r.AppLink.ActionType.UPDATE:o=r.AppLink.ActionType,n=e.linkActionSchema}return i.validate(t,a.createActionValidator(o,n,!0,!0))}},function(t,e,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),r=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||e.hasOwnProperty(n)||o(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),r(n(12),e),r(n(9),e);var i=n(57);Object.defineProperty(e,"default",{enumerable:!0,get:function(){return i.createApp}})},function(t,e,n){"use strict";var o,r=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_TOAST_DURATION=void 0;var a=i(n(4)),c=n(5),u=n(6);e.DEFAULT_TOAST_DURATION=5e3;var s=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return r(n,t),n.prototype.componentDidMount=function(){var t=this.context,n=this.props,o=n.error,r=n.content,i=n.duration,a=void 0===i?e.DEFAULT_TOAST_DURATION:i,u=n.onDismiss;this.toast=c.Toast.create(t,{message:r,duration:a,isError:o}),this.toast.subscribe(c.Toast.Action.CLEAR,u),this.toast.dispatch(c.Toast.Action.SHOW)},n.prototype.componentWillUnmount=function(){this.toast.unsubscribe()},n.prototype.render=function(){return null},n.contextType=u.AppBridgeContext,n}(a.default.PureComponent);e.default=s},function(t,e,n){"use strict";var o,r=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=i(n(4)),c=n(5),u=n(60),s=n(6),p=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.componentDidMount=function(){var t=this.context;this.titleBar=c.TitleBar.create(t,this.transformProps())},e.prototype.componentDidUpdate=function(){this.titleBar.unsubscribe(),this.titleBar.set(this.transformProps())},e.prototype.componentWillUnmount=function(){this.titleBar.unsubscribe()},e.prototype.render=function(){return null},e.prototype.transformProps=function(){var t=this.context,e=this.props,n=e.title,o=e.primaryAction,r=e.secondaryActions,i=e.actionGroups;return{title:n,buttons:u.transformActions(t,{primaryAction:o,secondaryActions:r,actionGroups:i}),breadcrumbs:this.transformBreadcrumbs()}},e.prototype.transformBreadcrumbs=function(){var t=this.context,e=this.props.breadcrumbs;if(null!=e&&0!==e.length){var n=e[e.length-1],o=n.url,r=n.onAction,i=n.target,a=n.content,s=c.Button.create(t,{label:a||""}),p=u.generateRedirect(t,o,i);return null!=p&&s.subscribe(c.Button.Action.CLICK,p),null!=r&&s.subscribe(c.Button.Action.CLICK,r),s}},e.contextType=s.AppBridgeContext,e}(a.default.PureComponent);e.default=p},function(t,e,n){"use strict";var o=this&&this.__spreadArrays||function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var o=Array(t),r=0;for(e=0;e<n;e++)for(var i=arguments[e],a=0,c=i.length;a<c;a++,r++)o[r]=i[a];return o};Object.defineProperty(e,"__esModule",{value:!0}),e.transformActions=e.generateRedirect=void 0;var r=n(5);function i(t,e,n,o){if(void 0===n&&(n="APP"),null!=e){var i=r.Redirect.create(t),a=!0===o?{url:e,newContext:!0}:e;return function(){i.dispatch(function(t,e){if(!0===e)return r.Redirect.Action.REMOTE;return r.Redirect.Action[t]}(n,o),a)}}}function a(t,e){var n=!0===e.destructive?r.Button.Style.Danger:void 0,o=r.Button.create(t,{label:e.content||"",disabled:e.disabled,loading:e.loading,style:n});e.onAction&&o.subscribe(r.Button.Action.CLICK,e.onAction);var a=i(t,e.url,e.target,e.external);return null!=a&&o.subscribe(r.Button.Action.CLICK,a),o}e.generateRedirect=i,e.transformActions=function(t,e){var n=e.primaryAction,i=e.secondaryActions,c=e.actionGroups;return{primary:function(t,e){if(null==e)return;return a(t,e)}(t,n),secondary:o(function(t,e){void 0===e&&(e=[]);return o(e.map((function(e){return a(t,e)})))}(t,i),function(t,e){void 0===e&&(e=[]);return o(e.map((function(e){var n=e.actions.map((function(e){return a(t,e)}));return r.ButtonGroup.create(t,{label:e.title,buttons:n})})))}(t,c))}}},function(t,e,n){"use strict";var o,r=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var c=a(n(4)),u=n(5),s=n(60),p=n(6),l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.focusReturnPoint=null,e}return r(e,t),e.prototype.componentDidMount=function(){var t=this.props,e=t.open,n=t.onClose,o=this.context;this.modal=u.Modal.create(o,this.transformProps()),null!=n&&this.modal.subscribe(u.Modal.Action.CLOSE,n),e&&(this.focusReturnPoint=document.activeElement,this.modal.dispatch(u.Modal.Action.OPEN))},e.prototype.componentDidUpdate=function(t){var e,n=this.props,o=n.open,r=n.onClose,i=t.open,a=this.transformProps();this.modal.unsubscribe(),"string"==typeof(e=a).url||e.path,this.modal.set(a,o),null!=r&&this.modal.subscribe(u.Modal.Action.CLOSE,r),i!==o&&(o?this.modal.dispatch(u.Modal.Action.OPEN):this.modal.dispatch(u.Modal.Action.CLOSE)),!i&&o?this.focusReturnPoint=document.activeElement:i&&!o&&null!=this.focusReturnPoint&&document.contains(this.focusReturnPoint)&&(this.focusReturnPoint.focus(),this.focusReturnPoint=null)},e.prototype.componentWillUnmount=function(){this.modal.unsubscribe(),this.props.open&&this.modal.dispatch(u.Modal.Action.CLOSE)},e.prototype.render=function(){return null},e.prototype.transformProps=function(){var t=this.props,e=t.title,n=t.size,o=t.message,r=t.src,a=t.primaryAction,c=t.secondaryActions,p=this.context,l=null==n?void 0:u.Modal.Size[n],d={};return null!=r&&(r.match("^https?://")?d.url=r:d.path=r),i(i({title:e,message:o,size:l},d),{footer:{buttons:s.transformActions(p,{primaryAction:a,secondaryActions:c})}})},e.contextType=p.AppBridgeContext,e}(c.default.PureComponent);e.default=l},function(t,e,n){"use strict";var o,r=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=i(n(4)),c=n(5),u=n(6),s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.focusReturnPoint=null,e}return r(e,t),e.prototype.componentDidMount=function(){var t=this.props,e=t.open,n=t.resourceType,o=t.initialQuery,r=t.initialSelectionIds,i=t.showHidden,a=t.allowMultiple,u=t.showVariants,s=t.actionVerb,p=t.onSelection,l=t.onCancel,d=this.context;this.picker=c.ResourcePicker.create(d,{resourceType:c.ResourcePicker.ResourceType[n],options:{initialQuery:o,initialSelectionIds:r,showHidden:i,selectMultiple:a,showVariants:u,actionVerb:s}}),null!=p&&this.picker.subscribe(c.ResourcePicker.Action.SELECT,p),null!=l&&this.picker.subscribe(c.ResourcePicker.Action.CANCEL,l),e&&(this.focusReturnPoint=document.activeElement,this.picker.dispatch(c.ResourcePicker.Action.OPEN))},e.prototype.componentDidUpdate=function(t){var e=t.open,n=this.props,o=n.open,r=n.initialQuery,i=n.initialSelectionIds,a=n.showHidden,u=n.allowMultiple,s=n.showVariants,p=n.actionVerb,l=n.onCancel,d=n.onSelection;this.picker.unsubscribe(),this.picker.set({initialQuery:r,initialSelectionIds:i,showHidden:a,selectMultiple:u,showVariants:s,actionVerb:p}),null!=d&&this.picker.subscribe(c.ResourcePicker.Action.SELECT,d),null!=l&&this.picker.subscribe(c.ResourcePicker.Action.CANCEL,l),e!==o&&(o?this.picker.dispatch(c.ResourcePicker.Action.OPEN):this.picker.dispatch(c.ResourcePicker.Action.CLOSE)),!e&&o?this.focusReturnPoint=document.activeElement:e&&!o&&null!=this.focusReturnPoint&&document.contains(this.focusReturnPoint)&&(this.focusReturnPoint.focus(),this.focusReturnPoint=null)},e.prototype.componentWillUnmount=function(){this.picker.unsubscribe()},e.prototype.render=function(){return null},e.contextType=u.AppBridgeContext,e.ActionVerb=c.ResourcePicker.ActionVerb,e}(a.default.PureComponent);e.default=s},function(t,e,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),r=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||e.hasOwnProperty(n)||o(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),r(n(64),e);var i=n(6);Object.defineProperty(e,"Context",{enumerable:!0,get:function(){return i.AppBridgeContext}});var a=n(23);Object.defineProperty(e,"useAppBridge",{enumerable:!0,get:function(){return a.useAppBridge}})},function(t,e,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),r=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||e.hasOwnProperty(n)||o(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0});var i=n(65);Object.defineProperty(e,"Provider",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"ProviderProps",{enumerable:!0,get:function(){return i.Props}});var a=n(123);Object.defineProperty(e,"Loading",{enumerable:!0,get:function(){return a.default}});var c=n(125);Object.defineProperty(e,"Toast",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(e,"ToastProps",{enumerable:!0,get:function(){return c.Props}});var u=n(126);Object.defineProperty(e,"TitleBar",{enumerable:!0,get:function(){return u.default}});var s=n(127);Object.defineProperty(e,"Modal",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"ModalProps",{enumerable:!0,get:function(){return s.Props}});var p=n(128);Object.defineProperty(e,"ResourcePicker",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(e,"ResourcePickerProps",{enumerable:!0,get:function(){return p.Props}}),r(n(129),e),r(n(133),e)},function(t,e,n){"use strict";var o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var r=o(n(25)),i=n(25);Object.defineProperty(e,"Props",{enumerable:!0,get:function(){return i.Props}}),e.default=r.default},function(t,e,n){"use strict";
2/** @license React v16.12.0
3 * react.production.min.js
4 *
5 * Copyright (c) Facebook, Inc. and its affiliates.
6 *
7 * This source code is licensed under the MIT license found in the
8 * LICENSE file in the root directory of this source tree.
9 */var o=n(67),r="function"==typeof Symbol&&Symbol.for,i=r?Symbol.for("react.element"):60103,a=r?Symbol.for("react.portal"):60106,c=r?Symbol.for("react.fragment"):60107,u=r?Symbol.for("react.strict_mode"):60108,s=r?Symbol.for("react.profiler"):60114,p=r?Symbol.for("react.provider"):60109,l=r?Symbol.for("react.context"):60110,d=r?Symbol.for("react.forward_ref"):60112,f=r?Symbol.for("react.suspense"):60113;r&&Symbol.for("react.suspense_list");var h=r?Symbol.for("react.memo"):60115,y=r?Symbol.for("react.lazy"):60116;r&&Symbol.for("react.fundamental"),r&&Symbol.for("react.responder"),r&&Symbol.for("react.scope");var A="function"==typeof Symbol&&Symbol.iterator;function v(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n<arguments.length;n++)e+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var P={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},O={};function _(t,e,n){this.props=t,this.context=e,this.refs=O,this.updater=n||P}function b(){}function E(t,e,n){this.props=t,this.context=e,this.refs=O,this.updater=n||P}_.prototype.isReactComponent={},_.prototype.setState=function(t,e){if("object"!=typeof t&&"function"!=typeof t&&null!=t)throw Error(v(85));this.updater.enqueueSetState(this,t,e,"setState")},_.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")},b.prototype=_.prototype;var m=E.prototype=new b;m.constructor=E,o(m,_.prototype),m.isPureReactComponent=!0;var T={current:null},g={current:null},S=Object.prototype.hasOwnProperty,C={key:!0,ref:!0,__self:!0,__source:!0};function R(t,e,n){var o,r={},a=null,c=null;if(null!=e)for(o in void 0!==e.ref&&(c=e.ref),void 0!==e.key&&(a=""+e.key),e)S.call(e,o)&&!C.hasOwnProperty(o)&&(r[o]=e[o]);var u=arguments.length-2;if(1===u)r.children=n;else if(1<u){for(var s=Array(u),p=0;p<u;p++)s[p]=arguments[p+2];r.children=s}if(t&&t.defaultProps)for(o in u=t.defaultProps)void 0===r[o]&&(r[o]=u[o]);return{$$typeof:i,type:t,key:a,ref:c,props:r,_owner:g.current}}function I(t){return"object"==typeof t&&null!==t&&t.$$typeof===i}var M=/\/+/g,j=[];function D(t,e,n,o){if(j.length){var r=j.pop();return r.result=t,r.keyPrefix=e,r.func=n,r.context=o,r.count=0,r}return{result:t,keyPrefix:e,func:n,context:o,count:0}}function N(t){t.result=null,t.keyPrefix=null,t.func=null,t.context=null,t.count=0,10>j.length&&j.push(t)}function U(t,e,n){return null==t?0:function t(e,n,o,r){var c=typeof e;"undefined"!==c&&"boolean"!==c||(e=null);var u=!1;if(null===e)u=!0;else switch(c){case"string":case"number":u=!0;break;case"object":switch(e.$$typeof){case i:case a:u=!0}}if(u)return o(r,e,""===n?"."+w(e,0):n),1;if(u=0,n=""===n?".":n+":",Array.isArray(e))for(var s=0;s<e.length;s++){var p=n+w(c=e[s],s);u+=t(c,p,o,r)}else if(null===e||"object"!=typeof e?p=null:p="function"==typeof(p=A&&e[A]||e["@@iterator"])?p:null,"function"==typeof p)for(e=p.call(e),s=0;!(c=e.next()).done;)u+=t(c=c.value,p=n+w(c,s++),o,r);else if("object"===c)throw o=""+e,Error(v(31,"[object Object]"===o?"object with keys {"+Object.keys(e).join(", ")+"}":o,""));return u}(t,"",e,n)}function w(t,e){return"object"==typeof t&&null!==t&&null!=t.key?function(t){var e={"=":"=0",":":"=2"};return"$"+(""+t).replace(/[=:]/g,(function(t){return e[t]}))}(t.key):e.toString(36)}function L(t,e){t.func.call(t.context,e,t.count++)}function B(t,e,n){var o=t.result,r=t.keyPrefix;t=t.func.call(t.context,e,t.count++),Array.isArray(t)?k(t,o,n,(function(t){return t})):null!=t&&(I(t)&&(t=function(t,e){return{$$typeof:i,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}(t,r+(!t.key||e&&e.key===t.key?"":(""+t.key).replace(M,"$&/")+"/")+n)),o.push(t))}function k(t,e,n,o,r){var i="";null!=n&&(i=(""+n).replace(M,"$&/")+"/"),U(t,B,e=D(e,i,o,r)),N(e)}function G(){var t=T.current;if(null===t)throw Error(v(321));return t}var x={Children:{map:function(t,e,n){if(null==t)return t;var o=[];return k(t,o,null,e,n),o},forEach:function(t,e,n){if(null==t)return t;U(t,L,e=D(null,null,e,n)),N(e)},count:function(t){return U(t,(function(){return null}),null)},toArray:function(t){var e=[];return k(t,e,null,(function(t){return t})),e},only:function(t){if(!I(t))throw Error(v(143));return t}},createRef:function(){return{current:null}},Component:_,PureComponent:E,createContext:function(t,e){return void 0===e&&(e=null),(t={$$typeof:l,_calculateChangedBits:e,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:p,_context:t},t.Consumer=t},forwardRef:function(t){return{$$typeof:d,render:t}},lazy:function(t){return{$$typeof:y,_ctor:t,_status:-1,_result:null}},memo:function(t,e){return{$$typeof:h,type:t,compare:void 0===e?null:e}},useCallback:function(t,e){return G().useCallback(t,e)},useContext:function(t,e){return G().useContext(t,e)},useEffect:function(t,e){return G().useEffect(t,e)},useImperativeHandle:function(t,e,n){return G().useImperativeHandle(t,e,n)},useDebugValue:function(){},useLayoutEffect:function(t,e){return G().useLayoutEffect(t,e)},useMemo:function(t,e){return G().useMemo(t,e)},useReducer:function(t,e,n){return G().useReducer(t,e,n)},useRef:function(t){return G().useRef(t)},useState:function(t){return G().useState(t)},Fragment:c,Profiler:s,StrictMode:u,Suspense:f,createElement:R,cloneElement:function(t,e,n){if(null==t)throw Error(v(267,t));var r=o({},t.props),a=t.key,c=t.ref,u=t._owner;if(null!=e){if(void 0!==e.ref&&(c=e.ref,u=g.current),void 0!==e.key&&(a=""+e.key),t.type&&t.type.defaultProps)var s=t.type.defaultProps;for(p in e)S.call(e,p)&&!C.hasOwnProperty(p)&&(r[p]=void 0===e[p]&&void 0!==s?s[p]:e[p])}var p=arguments.length-2;if(1===p)r.children=n;else if(1<p){s=Array(p);for(var l=0;l<p;l++)s[l]=arguments[l+2];r.children=s}return{$$typeof:i,type:t.type,key:a,ref:c,props:r,_owner:u}},createFactory:function(t){var e=R.bind(null,t);return e.type=t,e},isValidElement:I,version:"16.12.0",__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentDispatcher:T,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:g,IsSomeRendererActing:{current:!1},assign:o}},V={default:x},F=V&&x||V;t.exports=F.default||F},function(t,e,n){"use strict";
10/*
11object-assign
12(c) Sindre Sorhus
13@license MIT
14*/var o=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function a(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(t){return e[t]})).join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach((function(t){o[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var n,c,u=a(t),s=1;s<arguments.length;s++){for(var p in n=Object(arguments[s]))r.call(n,p)&&(u[p]=n[p]);if(o){c=o(n);for(var l=0;l<c.length;l++)i.call(n,c[l])&&(u[c[l]]=n[c[l]])}}return u}},function(t,e){var n,o,r=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function c(t){if(n===setTimeout)return setTimeout(t,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(t){n=i}try{o="function"==typeof clearTimeout?clearTimeout:a}catch(t){o=a}}();var u,s=[],p=!1,l=-1;function d(){p&&u&&(p=!1,u.length?s=u.concat(s):l=-1,s.length&&f())}function f(){if(!p){var t=c(d);p=!0;for(var e=s.length;e;){for(u=s,s=[];++l<e;)u&&u[l].run();l=-1,e=s.length}u=null,p=!1,function(t){if(o===clearTimeout)return clearTimeout(t);if((o===a||!o)&&clearTimeout)return o=clearTimeout,clearTimeout(t);try{o(t)}catch(e){try{return o.call(null,t)}catch(e){return o.call(this,t)}}}(t)}}function h(t,e){this.fun=t,this.array=e}function y(){}r.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];s.push(new h(t,e)),1!==s.length||p||c(f)},h.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=y,r.addListener=y,r.once=y,r.off=y,r.removeListener=y,r.removeAllListeners=y,r.emit=y,r.prependListener=y,r.prependOnceListener=y,r.listeners=function(t){return[]},r.binding=function(t){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(t){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},function(t,e,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),r=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||e.hasOwnProperty(n)||o(e,t,n)},i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.createApp=void 0;var a=i(n(70)),c=n(3),u=n(20),s=n(9),p=n(32);function l(t){var e=u.getWindow();return e?(c.mixedAppClientCheck(e),s.createAppWrapper(e.top,e.location.origin,[a.default])(t)):p.serverAppBridge}e.createApp=l,e.default=l,r(n(12),e),r(n(9),e)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(71);e.default=o.validatorMiddleware},function(t,e,n){"use strict";var o=this&&this.__spreadArrays||function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var o=Array(t),r=0;for(e=0;e<n;e++)for(var i=arguments[e],a=0,c=i.length;a<c;a++,r++)o[r]=i[a];return o};Object.defineProperty(e,"__esModule",{value:!0}),e.validatorMiddleware=e.connectValidatorToDispatchHook=e.connectValidatorToUpdateHook=void 0;var r=n(9),i=n(1),a=n(8),c=n(0),u=n(79),s=n(2),p=n(3);function l(t,e,n){switch(e){case i.Group.Button:return u.Button.validateProps(n);case i.Group.ButtonGroup:return u.ButtonGroup.validateProps(n);case i.Group.Modal:return u.Modal.validateProps(n,t);case i.Group.Menu:return u.Menu.validateProps(n);case i.Group.Link:return u.Link.validateProps(n);case i.Group.TitleBar:return u.TitleBar.validateProps(n);case i.Group.ResourcePicker:return u.ResourcePicker.validateProps(n);case i.Group.Toast:return u.Toast.validateProps(n);case i.Group.ContextualSaveBar:return u.ContextualSaveBar.validateProps(n)}}function d(t,e){var n=s.validate(t,s.matchesObject({group:s.matchesEnum(i.Group,{message:function(t,e){return"Unknown or unsupported action group `"+e+"`"}}),version:s.matchesString()}));if(n)return a.invalidAction(t,p.actionMessage(n));var o=function(t,e){switch(t.group){case i.Group.Button:return u.Button.validateAction(t);case i.Group.ButtonGroup:return u.ButtonGroup.validateAction(t);case i.Group.Modal:return u.Modal.validateAction(t,e);case i.Group.Menu:return u.Menu.validateAction(t);case i.Group.TitleBar:return u.TitleBar.validateAction(t);case i.Group.ResourcePicker:return u.ResourcePicker.validateAction(t);case i.Group.Loading:return u.Loading.validateAction(t);case i.Group.Toast:return u.Toast.validateAction(t);case i.Group.Cart:return u.Cart.validateAction(t);case i.Group.Navigation:return u.Navigation.validateAction(t);case i.Group.Print:return u.Print.validateAction(t);case i.Group.Scanner:return u.Scanner.validateAction(t);case i.Group.Fullscreen:return u.Fullscreen.validateAction(t);case i.Group.ContextualSaveBar:return u.ContextualSaveBar.validateAction(t);case i.Group.Link:return u.Link.validateAction(t)}}(t,e);return o?a.invalidPayload(t,p.actionMessage(o)):t}e.connectValidatorToUpdateHook=function(t){return function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var i=c.getMergedProps(this.options,e),u=l(this.app.localOrigin,this.defaultGroup,i);if(u)throw a.fromAction(p.actionMessage(u),a.ActionType.INVALID_OPTIONS);return t.apply(void 0,o([e],n))}},e.connectValidatorToDispatchHook=function(t){return function(e){var n=d(e,this.localOrigin);return t(n)}},e.validatorMiddleware=function(t){t.set(r.LifecycleHook.UpdateAction,e.connectValidatorToUpdateHook),t.set(r.LifecycleHook.DispatchAction,e.connectValidatorToDispatchHook)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.throwError=e.fromAction=e.AppBridgeError=e.isErrorEventName=e.permissionAction=e.networkAction=e.persistenceAction=e.unsupportedOperationAction=e.unexpectedAction=e.invalidAction=e.invalidActionType=e.invalidPayload=e.Message=void 0;var o=n(0),r=n(1),i=n(28);function a(t,e,n){var i=e.payload;return o.actionWrapper({type:t,group:r.Group.Error,payload:{action:e,message:n,type:t,id:i&&i.id?i.id:void 0}})}!function(t){t.MISSING_PAYLOAD="Missing payload",t.INVALID_PAYLOAD_ID="Id in payload is missing or invalid"}(e.Message||(e.Message={})),e.invalidPayload=function(t,e){return a(i.ActionType.INVALID_PAYLOAD,t,e||"The action's payload is missing required properties or has invalid properties")},e.invalidActionType=function(t,e){return o.actionWrapper({group:r.Group.Error,payload:{action:t,message:e||"The action type is invalid or unsupported",type:i.ActionType.INVALID_ACTION_TYPE},type:i.ActionType.INVALID_ACTION_TYPE})},e.invalidAction=function(t,e){return o.actionWrapper({group:r.Group.Error,payload:{action:t,message:e||"The action's has missing/invalid values for `group`, `type` or `version`",type:i.ActionType.INVALID_ACTION},type:i.ActionType.INVALID_ACTION})},e.unexpectedAction=function(t,e){return o.actionWrapper({group:r.Group.Error,payload:{action:t,message:e||"Action cannot be called at this time",type:i.ActionType.UNEXPECTED_ACTION},type:i.ActionType.UNEXPECTED_ACTION})},e.unsupportedOperationAction=function(t,e){return a(i.ActionType.UNSUPPORTED_OPERATION,t,e||"The action type is unsupported")},e.persistenceAction=function(t,e){return a(i.ActionType.PERSISTENCE,t,e||"Action cannot be persisted on server")},e.networkAction=function(t,e){return a(i.ActionType.NETWORK,t,e||"Network error")},e.permissionAction=function(t,e){return a(i.ActionType.PERMISSION,t,e||"Action is not permitted")},e.isErrorEventName=function(t){return"string"==typeof o.findMatchInEnum(i.Action,t)};var c=function(t){this.name="AppBridgeError",this.message=t,"function"==typeof Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error(this.message).stack};function u(t,e,n){var o=new c(t?e+": "+t:e);return o.action=n,o.type=e,o}e.AppBridgeError=c,c.prototype=Object.create(Error.prototype),e.fromAction=u,e.throwError=function(){var t,e,n=arguments[0];throw"string"==typeof arguments[1]?t=arguments[1]:(e=arguments[1],t=arguments[2]||""),u(t,n,e)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function t(e,n){if(null==n)return n;if(void 0===e||!Object.getPrototypeOf(e).isPrototypeOf(n)||"Object"!==n.constructor.name&&"Array"!==n.constructor.name)return n;var o={};return Object.keys(n).forEach((function(r){e.hasOwnProperty(r)?"object"!=typeof e[r]||Array.isArray(e[r])?o[r]=n[r]:o[r]=t(e[r],n[r]):o[r]=n[r]})),Object.keys(e).forEach((function(t){n.hasOwnProperty(t)||(o[t]=e[t])})),Object.setPrototypeOf(o,Object.getPrototypeOf(e)),o}},function(t,e,n){"use strict";function o(t){return Array.from(t).map((function(t){return("00"+t.toString(16)).slice(-2)})).join("")}function r(t){if("function"==typeof Uint8Array&&"object"==typeof window&&window.crypto){var e=new Uint8Array(t),n=window.crypto.getRandomValues(e);if(n)return n}return Array.from(new Array(t),(function(){return 255*Math.random()|0}))}function i(){var t=r(1),e=r(2);return t[0]&=191,e[0]&=79,[o(r(4)),"-",o(r(2)),"-",o(e),"-",o(t),o(r(1)),"-",o(r(6))].join("")}Object.defineProperty(e,"__esModule",{value:!0}),e.generateUuid=void 0,e.generateUuid=i,e.default=i},function(t){t.exports=JSON.parse('{"name":"@shopify/app-bridge","version":"1.27.1","types":"index.d.ts","main":"index.js","unpkg":"umd/index.js","jsdelivr":"umd/index.js","files":["/actions/","/client/","/umd/","/util/","/validate/","/MessageTransport.d.ts","/MessageTransport.js","/development.d.ts","/development.js","/index.d.ts","/index.js","/production.d.ts","/production.js"],"private":false,"publishConfig":{"access":"public","@shopify:registry":"https://registry.npmjs.org"},"repository":"git@github.com:Shopify/app-bridge.git","homepage":"https://shopify.dev/tools/app-bridge","author":"Shopify Inc.","license":"MIT","scripts":{"build":"yarn build:tsc && yarn build:umd","build:tsc":"NODE_ENV=production tsc","build:umd":"NODE_ENV=production webpack -p","check":"tsc","clean":"cat package.json | node -pe \\"JSON.parse(require(\'fs\').readFileSync(\'/dev/stdin\').toString()).files.map(f => \'./\'+f).join(\' \')\\" | xargs rm -rf","pack":"yarn pack","size":"size-limit"},"sideEffects":false,"size-limit":[{"limit":"16 KB","path":"production.js"}],"devDependencies":{"@types/node":"^10.12.5"}}')},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.app=void 0;var o=n(0),r=n(1),i=n(30);e.app=function(){return o.actionWrapper({group:r.Group.Print,type:i.ActionType.APP})}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.handleAppPrint=void 0;var o=n(20);function r(){o.getWindow()&&window.print()}function i(){var t=function(){var t=o.getWindow();if(t&&t.document&&t.document.body){var e=window.document.createElement("input");return e.style.display="none",window.document.body.appendChild(e),e}}();t&&(t.select(),r(),t.remove())}e.handleAppPrint=function(){navigator.userAgent.indexOf("iOS")>=0?i():r()}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(18),r=function(){function t(){this.map={}}return t.prototype.set=function(t,e){this.map.hasOwnProperty(t)||(this.map[t]=[]);var n={handler:e,remove:function(){}},r=o.addAndRemoveFromCollection(this.map[t],n);return n={handler:e,remove:r},r},t.prototype.get=function(t){var e=this.map[t];return e?e.map((function(t){return t.handler})):void 0},t.prototype.run=function(t,e,n){for(var o=[],r=3;r<arguments.length;r++)o[r-3]=arguments[r];var i=0,a=this.get(t)||[];function c(){for(var t=[],o=0;o<arguments.length;o++)t[o]=arguments[o];var r=a[i++];return r?r(c).apply(n,t):e.apply(n,t)}return c.apply(n,o)},t}();e.default=r},function(t,e,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),r=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.hasOwnProperty.call(t,n)&&o(e,t,n);return r(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.Link=e.Menu=e.TitleBar=e.Toast=e.ResourcePicker=e.Print=e.Navigation=e.Modal=e.Loading=e.LeaveConfirmation=e.Fullscreen=e.FeedbackModal=e.ContextualSaveBar=e.Cart=e.Scanner=e.ButtonGroup=e.Button=void 0;var a=i(n(13));e.Button=a;var c=i(n(81));e.Scanner=c;var u=i(n(83));e.Cart=u;var s=i(n(85));e.ContextualSaveBar=s;var p=i(n(86));e.FeedbackModal=p;var l=i(n(87));e.Fullscreen=l;var d=i(n(88));e.LeaveConfirmation=d;var f=i(n(89));e.Loading=f;var h=i(n(91));e.Modal=h;var y=i(n(94));e.Navigation=y;var A=i(n(117));e.Print=A;var v=i(n(55));e.ButtonGroup=v;var P=i(n(118));e.ResourcePicker=P;var O=i(n(119));e.Toast=O;var _=i(n(120));e.TitleBar=_;var b=i(n(121));e.Menu=b;var E=i(n(56));e.Link=E},function(t,e,n){"use strict";var o,r=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.Button=e.isValidButtonProps=e.update=e.clickButton=void 0;var a=n(0),c=n(1),u=n(33);function s(t,e,n){var o=e.id,r=a.getEventNameSpace(t,u.Action.CLICK,e),i={id:o,payload:n};return a.actionWrapper({type:r,group:t,payload:i})}function p(t,e,n){var o=e.id,r=n.label,c=a.getEventNameSpace(t,u.Action.UPDATE,e),s=i(i({},n),{id:o,label:r});return a.actionWrapper({type:c,group:t,payload:s})}e.clickButton=s,e.update=p,e.isValidButtonProps=function(t){return"string"==typeof t.id&&"string"==typeof t.label};var l=function(t){function e(e,n){var o=t.call(this,e,c.ComponentType.Button,c.Group.Button)||this;return o.disabled=!1,o.loading=!1,o.set(n,!1),o}return r(e,t),Object.defineProperty(e.prototype,"options",{get:function(){return{disabled:this.disabled,icon:this.icon,label:this.label,style:this.style,loading:this.loading}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"payload",{get:function(){return i(i({},this.options),{id:this.id})},enumerable:!1,configurable:!0}),e.prototype.set=function(t,e){void 0===e&&(e=!0);var n=a.getMergedProps(this.options,t),o=n.label,r=n.disabled,i=n.icon,c=n.style,s=n.loading;return this.label=o,this.disabled=Boolean(r),this.icon=i,this.style=c,this.loading=Boolean(s),e&&this.dispatch(u.Action.UPDATE),this},e.prototype.dispatch=function(t,e){switch(t){case u.Action.CLICK:this.app.dispatch(s(this.group,this.component,e));break;case u.Action.UPDATE:var n=p(this.group,this.component,this.payload);this.app.dispatch(n)}return this},e}(a.ActionSet);e.Button=l,e.create=function(t,e){return new l(t,e)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ActionType=e.validateAction=void 0;var o=n(34);Object.defineProperty(e,"ActionType",{enumerable:!0,get:function(){return o.ActionType}});var r=n(2),i=n(3);e.validateAction=function(t){return r.validate(t,i.createActionValidator(o.ActionType))}},function(t,e,n){"use strict";var o,r=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.Scanner=void 0;var i=n(0),a=n(1),c=n(35),u=function(t){function e(e,n){return t.call(this,e,a.Group.Scanner,a.Group.Scanner,n?n.id:void 0)||this}return r(e,t),e.prototype.dispatch=function(t){switch(t){case c.Action.OPEN_CAMERA:this.dispatchScannerAction(c.ActionType.OPEN_CAMERA);break;case c.Action.OPEN_NFC:this.dispatchScannerAction(c.ActionType.OPEN_NFC)}return this},e.prototype.dispatchScannerAction=function(t){this.app.dispatch(i.actionWrapper({type:t,group:a.Group.Scanner,payload:{id:this.id}}))},e}(i.ActionSet);e.Scanner=u,e.create=function(t,e){return new u(t,e)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ActionType=e.validateAction=void 0;var o=n(36);Object.defineProperty(e,"ActionType",{enumerable:!0,get:function(){return o.ActionType}});var r=n(2),i=n(3),a=r.matchesObject({address1:r.makeOptional(r.matchesString()),address2:r.makeOptional(r.matchesString()),city:r.makeOptional(r.matchesString()),company:r.makeOptional(r.matchesString()),firstName:r.makeOptional(r.matchesString()),lastName:r.makeOptional(r.matchesString()),phone:r.makeOptional(r.matchesString()),province:r.makeOptional(r.matchesString()),country:r.makeOptional(r.matchesString()),zip:r.makeOptional(r.matchesString()),name:r.makeOptional(r.matchesString()),provinceCode:r.makeOptional(r.matchesString()),countryCode:r.makeOptional(r.matchesString())}),c=r.matchesObject({amount:r.makeOptional(r.matchesPositiveInteger()),discountDescription:r.makeOptional(r.matchesString()),type:r.makeOptional(r.matchesString()),discountCode:r.makeOptional(r.matchesString())}),u=r.matchesObject({amount:r.matchesPositiveNumber(),discountDescription:r.makeOptional(r.matchesString()),type:r.makeOptional(r.matchesString())}),s=r.matchesObject({discountCode:r.matchesString()}),p=r.matchesObject({price:r.makeOptional(r.matchesPositiveNumber()),quantity:r.makeOptional(r.matchesPositiveInteger()),title:r.makeOptional(r.matchesString()),variantId:r.makeOptional(r.matchesPositiveInteger()),discount:r.makeOptional(u)}),l=r.matchesObject({quantity:r.matchesPositiveInteger()}),d=r.matchesObject({id:r.makeOptional(r.matchesPositiveInteger()),email:r.makeOptional(r.matchesString()),firstName:r.makeOptional(r.matchesString()),lastName:r.makeOptional(r.matchesString()),note:r.makeOptional(r.matchesString()),addresses:r.makeOptional(r.matchesArray(a))}),f=r.matchesObject({name:r.matchesString(),value:r.matchesString()}),h=r.matchesObject({cartDiscount:r.makeOptional(c),customer:r.makeOptional(d),grandTotal:r.makeOptional(r.matchesString()),lineItems:r.makeOptional(r.matchesArray(p)),noteAttributes:r.makeOptional(r.matchesArray(f)),subTotal:r.makeOptional(r.matchesString()),taxTotal:r.makeOptional(r.matchesString())}),y=r.composeSchemas(r.matchesObject({}),(function(t){var e=r.matchesString(),n=Object.keys(t).reduce((function(t,n){return t[n]=e,t}),{});return r.validate(t,r.matchesObject(n))})),A=r.matchesArray(r.matchesString());function v(t){return i.createActionValidator(o.ActionType,t?r.matchesObject({data:t}):void 0,!0,!0)}function P(t){var e=r.matchesObject({index:r.matchesPositiveInteger()});if(t){var n=r.matchesObject({data:t});return i.createActionValidator(o.ActionType,r.composeSchemas(e,n),!0,!0)}return i.createActionValidator(o.ActionType,e,!0,!0)}e.validateAction=function(t){switch(t.type){case o.ActionType.UPDATE:return r.validate(t,v(h));case o.ActionType.SET_CUSTOMER:return r.validate(t,v(d));case o.ActionType.ADD_CUSTOMER_ADDRESS:return r.validate(t,v(a));case o.ActionType.UPDATE_CUSTOMER_ADDRESS:return r.validate(t,P(a));case o.ActionType.SET_DISCOUNT:return r.validate(t,v(t.payload.data.amount?u:s));case o.ActionType.SET_PROPERTIES:return r.validate(t,v(y));case o.ActionType.REMOVE_PROPERTIES:return r.validate(t,v(A));case o.ActionType.ADD_LINE_ITEM:return r.validate(t,v(p));case o.ActionType.UPDATE_LINE_ITEM:return r.validate(t,P(l));case o.ActionType.REMOVE_LINE_ITEM:return r.validate(t,P());case o.ActionType.SET_LINE_ITEM_DISCOUNT:return r.validate(t,P(u));case o.ActionType.REMOVE_LINE_ITEM_DISCOUNT:return r.validate(t,P());case o.ActionType.SET_LINE_ITEM_PROPERTIES:return r.validate(t,P(y));case o.ActionType.REMOVE_LINE_ITEM_PROPERTIES:return r.validate(t,P(A));case o.ActionType.FETCH:case o.ActionType.REMOVE_CUSTOMER:case o.ActionType.REMOVE_DISCOUNT:case o.ActionType.CLEAR:default:return r.validate(t,i.createActionValidator(o.ActionType,void 0,!1,!0))}}},function(t,e,n){"use strict";var o,r=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.Cart=void 0;var a=n(0),c=n(1),u=n(37),s=function(t){function e(e,n){return t.call(this,e,c.Group.Cart,c.Group.Cart,n?n.id:void 0)||this}return r(e,t),e.prototype.dispatch=function(t,e){switch(t){case u.Action.FETCH:this.dispatchCartAction(u.ActionType.FETCH);break;case u.Action.UPDATE:this.dispatchCartAction(u.ActionType.UPDATE,e);break;case u.Action.SET_CUSTOMER:this.dispatchCartAction(u.ActionType.SET_CUSTOMER,e);break;case u.Action.REMOVE_CUSTOMER:this.dispatchCartAction(u.ActionType.REMOVE_CUSTOMER,e);break;case u.Action.ADD_CUSTOMER_ADDRESS:this.dispatchCartAction(u.ActionType.ADD_CUSTOMER_ADDRESS,e);break;case u.Action.UPDATE_CUSTOMER_ADDRESS:this.dispatchCartAction(u.ActionType.UPDATE_CUSTOMER_ADDRESS,e);break;case u.Action.SET_DISCOUNT:this.dispatchCartAction(u.ActionType.SET_DISCOUNT,e);break;case u.Action.REMOVE_DISCOUNT:this.dispatchCartAction(u.ActionType.REMOVE_DISCOUNT,e);break;case u.Action.SET_PROPERTIES:this.dispatchCartAction(u.ActionType.SET_PROPERTIES,e);break;case u.Action.REMOVE_PROPERTIES:this.dispatchCartAction(u.ActionType.REMOVE_PROPERTIES,e);break;case u.Action.CLEAR:this.dispatchCartAction(u.ActionType.CLEAR,e);break;case u.Action.ADD_LINE_ITEM:this.dispatchCartAction(u.ActionType.ADD_LINE_ITEM,e);break;case u.Action.UPDATE_LINE_ITEM:this.dispatchCartAction(u.ActionType.UPDATE_LINE_ITEM,e);break;case u.Action.REMOVE_LINE_ITEM:this.dispatchCartAction(u.ActionType.REMOVE_LINE_ITEM,e);break;case u.Action.SET_LINE_ITEM_DISCOUNT:this.dispatchCartAction(u.ActionType.SET_LINE_ITEM_DISCOUNT,e);break;case u.Action.REMOVE_LINE_ITEM_DISCOUNT:this.dispatchCartAction(u.ActionType.REMOVE_LINE_ITEM_DISCOUNT,e);break;case u.Action.SET_LINE_ITEM_PROPERTIES:this.dispatchCartAction(u.ActionType.SET_LINE_ITEM_PROPERTIES,e);break;case u.Action.REMOVE_LINE_ITEM_PROPERTIES:this.dispatchCartAction(u.ActionType.REMOVE_LINE_ITEM_PROPERTIES,e)}return this},e.prototype.dispatchCartAction=function(t,e){this.app.dispatch(a.actionWrapper({type:t,group:c.Group.Cart,payload:i(i({},e||{}),{id:this.id})}))},e}(a.ActionSet);e.Cart=s,e.create=function(t,e){return new s(t,e)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ActionType=e.validateAction=e.validateProps=e.contextSaveBarSchema=void 0;var o=n(2),r=n(38);Object.defineProperty(e,"ActionType",{enumerable:!0,get:function(){return r.ActionType}});var i=n(3);e.contextSaveBarSchema=o.makeOptional(o.matchesObject({fullWidth:o.makeOptional(o.matchesBoolean()),discardAction:o.makeOptional(o.matchesObject({disabled:o.makeOptional(o.matchesBoolean()),discardConfirmationModal:o.makeOptional(o.matchesBoolean())})),saveAction:o.makeOptional(o.matchesObject({disabled:o.makeOptional(o.matchesBoolean())})),leaveConfirmationDisable:o.makeOptional(o.matchesBoolean())})),e.validateProps=function(t){return o.validate(t,e.contextSaveBarSchema)},e.validateAction=function(t){var n=i.createActionValidator(r.ActionType,e.contextSaveBarSchema);return o.validate(t,n)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ActionType=e.validateAction=e.validateProps=e.feedbackModalSchema=void 0;var o=n(39);Object.defineProperty(e,"ActionType",{enumerable:!0,get:function(){return o.ActionType}});var r=n(2),i=n(3);e.feedbackModalSchema=r.matchesObject({formId:r.matchesPositiveInteger()}),e.validateProps=function(t){return r.validate(t,e.feedbackModalSchema)},e.validateAction=function(t){switch(t.type){case o.ActionType.OPEN:return r.validate(t,i.createActionValidator(o.ActionType,e.feedbackModalSchema,!0));case o.ActionType.CLOSE:default:return r.validate(t,i.createActionValidator(o.ActionType))}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ActionType=e.validateAction=void 0;var o=n(40);Object.defineProperty(e,"ActionType",{enumerable:!0,get:function(){return o.ActionType}});var r=n(2),i=n(3);e.validateAction=function(t){var e=i.createActionValidator(o.ActionType);return r.validate(t,e)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ActionType=e.validateAction=void 0;var o=n(41);Object.defineProperty(e,"ActionType",{enumerable:!0,get:function(){return o.ActionType}});var r=n(2),i=n(3);e.validateAction=function(t){var e=i.createActionValidator(o.ActionType);return r.validate(t,e)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ActionType=e.validateAction=void 0;var o=n(42);Object.defineProperty(e,"ActionType",{enumerable:!0,get:function(){return o.ActionType}});var r=n(2),i=n(3);e.validateAction=function(t){var e=i.createActionValidator(o.ActionType);return r.validate(t,e)}},function(t,e,n){"use strict";var o,r=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.Loading=e.stop=e.start=void 0;var i=n(0),a=n(1),c=n(43);function u(t){return i.actionWrapper({payload:t,group:a.Group.Loading,type:c.ActionType.START})}function s(t){return i.actionWrapper({payload:t,group:a.Group.Loading,type:c.ActionType.STOP})}e.start=u,e.stop=s;var p=function(t){function e(e){return t.call(this,e,a.Group.Loading,a.Group.Loading)||this}return r(e,t),Object.defineProperty(e.prototype,"payload",{get:function(){return{id:this.id}},enumerable:!1,configurable:!0}),e.prototype.dispatch=function(t){switch(t){case c.Action.START:this.app.dispatch(u(this.payload));break;case c.Action.STOP:this.app.dispatch(s(this.payload))}return this},e}(i.ActionSet);e.Loading=p,e.create=function(t){return new p(t)}},function(t,e,n){"use strict";var o=this&&this.__assign||function(){return(o=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.ActionType=e.validateAction=e.validateProps=void 0;var r=n(2),i=n(3),a=n(44);Object.defineProperty(e,"ActionType",{enumerable:!0,get:function(){return a.ActionType}});var c=n(7),u=n(93),s=n(13);function p(t,e){void 0===t&&(t={});var n=r.matchesObject({title:r.makeOptional(r.matchesString()),footer:r.makeOptional(r.matchesObject({buttons:r.matchesObject({primary:r.makeOptional(s.buttonSchemaWithId),secondary:r.makeOptional(r.matchesArray(s.buttonSchemaWithId))})})),size:r.makeOptional((function(t){var e=[a.Size.Small,a.Size.Medium,a.Size.Large];if(!e.includes(t)){var n="expected:"+e.map((function(t){return"`"+t+"`"})).join(" or ");return t===a.Size.Full&&(n+=". Size `"+t+"` is deprecated as of version 1.6.5 and will fall back to size `medium`"),t===a.Size.Auto&&(n+=". Size `"+t+"` is deprecated as of version 1.12.x and will fall back to size `medium`. Use the `setUpModalAutoSizing` utility from `app-bridge-utils` instead"),[{error:"invalid_enum_value",value:t,message:n}]}}))});if(a.isIframeModal(t)){if(t.url){var o=r.matchesObject({url:r.composeSchemas(r.matchesString(),(function(t){return t.startsWith("https://")?void 0:[{error:"invalid_secure_url",value:t,message:"expected string to start with `https://`"}]}),(function(t){return e?function(t,e){var n;try{n=new URL(e).hostname}catch(t){return[{error:"invalid_app_origin",value:e,message:"Provided value for app origin: `"+e+"` is invalid"}]}if(!u.isSafe(t,{requireAbsolute:!0,requireSSL:!0,allowedDomains:[n]}))return[{error:"not_matching_app_origin",value:t,message:"Provided URL origin does not match app origin `"+n+"`"}]}(t,e):void 0}))});return r.composeSchemas(n,o)}return r.composeSchemas(n,i.relativePathSchema)}return r.composeSchemas(n,r.matchesObject({message:r.matchesString()}))}e.validateProps=function(t,e){return r.validate(t,p(t,e))},e.validateAction=function(t,e){var n=p(t.payload,e);switch(t.type){case a.ActionType.OPEN:case a.ActionType.UPDATE:return r.validate(t,i.createActionValidator(a.ActionType,n,!0,t.type===a.ActionType.UPDATE));case a.ActionType.FOOTER_BUTTON_CLICK:return s.validateAction(o(o({},t),{type:c.ActionType.CLICK}));case a.ActionType.FOOTER_BUTTON_UPDATE:return s.validateAction(o(o({},t),{type:c.ActionType.UPDATE}));case a.ActionType.CLOSE:default:return r.validate(t,i.createActionValidator(a.ActionType))}}},function(t,e,n){"use strict";var o,r=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.ModalIframe=e.ModalMessage=e.Modal=e.isMessageModal=e.isIframeModal=e.data=e.update=e.clickFooterButton=e.updateModalSize=e.closeModal=e.openModal=void 0;var a=n(14),c=n(0),u=n(1),s=n(7),p=n(45),l={group:u.Group.Modal,subgroups:["Footer"],type:u.ComponentType.Button};function d(t){return c.actionWrapper({group:u.Group.Modal,payload:t,type:p.ActionType.OPEN})}function f(t){return c.actionWrapper({group:u.Group.Modal,payload:t,type:p.ActionType.CLOSE})}function h(t){return c.actionWrapper({payload:t,group:u.Group.Modal,type:p.ActionType.UPDATE})}function y(t){return c.actionWrapper({payload:t,group:u.Group.Modal,type:p.ActionType.DATA})}function A(t){return"string"==typeof t.url||"string"==typeof t.path}e.openModal=d,e.closeModal=f,e.updateModalSize=function(t){return c.actionWrapper({group:u.Group.Modal,payload:t,type:p.ActionType.UPDATE_SIZE})},e.clickFooterButton=function(t,e){var n=i({id:t},l);return s.clickButton(u.Group.Modal,n,e)},e.update=h,e.data=y,e.isIframeModal=A,e.isMessageModal=function(t){return"string"==typeof t.message};var v=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.size=p.Size.Small,e}return r(e,t),Object.defineProperty(e.prototype,"footer",{get:function(){if(this.footerPrimary||this.footerSecondary)return{buttons:{primary:this.footerPrimary,secondary:this.footerSecondary}}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"footerOptions",{get:function(){if(this.footerPrimaryOptions||this.footerSecondaryOptions)return{buttons:{primary:this.footerPrimaryOptions,secondary:this.footerSecondaryOptions}}},enumerable:!1,configurable:!0}),e.prototype.close=function(){this.app.dispatch(f({id:this.id}))},e.prototype.setFooterPrimaryButton=function(t,e){var n=this,o=l.subgroups;this.footerPrimaryOptions=this.getChildButton(t,this.footerPrimaryOptions),this.footerPrimary=this.footerPrimaryOptions?a.getSingleButton(this,this.footerPrimaryOptions,o,(function(t){n.updatePrimaryFooterButton(t,e)})):void 0},e.prototype.setFooterSecondaryButtons=function(t,e){var n=this,o=l.subgroups,r=t||[],i=this.footerOptions&&this.footerOptions.buttons.secondary||[];this.footerSecondaryOptions=this.getUpdatedChildActions(r,i),this.footerSecondary=this.footerSecondaryOptions?this.footerSecondaryOptions.map((function(t){return a.getSingleButton(n,t,o,(function(t){n.updateSecondaryFooterButton(t,e)}))})):void 0},e.prototype.getChildButton=function(t,e){var n=t?[t]:[],o=e?[e]:[],r=this.getUpdatedChildActions(n,o);return r?r[0]:void 0},e.prototype.updatePrimaryFooterButton=function(t,e){this.footer&&this.footer.buttons.primary&&c.updateActionFromPayload(this.footer.buttons.primary,t)&&e()},e.prototype.updateSecondaryFooterButton=function(t,e){if(this.footer&&this.footer.buttons&&this.footer.buttons.secondary){for(var n,o=0,r=this.footer.buttons.secondary;o<r.length;o++){var i=r[o];if(n=c.updateActionFromPayload(i,t))break}n&&e()}},e}(c.ActionSetWithChildren);e.Modal=v;var P=function(t){function e(e,n){var o=t.call(this,e,u.Group.Modal,u.Group.Modal)||this;return o.set(n,!1),o}return r(e,t),Object.defineProperty(e.prototype,"payload",{get:function(){return i(i({},this.options),{footer:this.footer,id:this.id})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"options",{get:function(){return{footer:this.footerOptions,message:this.message,size:this.size,title:this.title}},enumerable:!1,configurable:!0}),e.prototype.set=function(t,e){var n=this;void 0===e&&(e=!0);var o=c.getMergedProps(this.options,t),r=o.title,i=o.footer,a=o.message,u=o.size;return this.title=r,this.message=a,this.size=u,this.setFooterPrimaryButton(i?i.buttons.primary:void 0,(function(){n.dispatch(p.Action.UPDATE)})),this.setFooterSecondaryButtons(i?i.buttons.secondary:void 0,(function(){n.dispatch(p.Action.UPDATE)})),e&&this.dispatch(p.Action.UPDATE),this},e.prototype.dispatch=function(t){switch(t){case p.Action.OPEN:this.app.dispatch(d(this.payload));break;case p.Action.CLOSE:this.close();break;case p.Action.UPDATE:this.app.dispatch(h(this.payload))}return this},e}(v);e.ModalMessage=P;var O=function(t){function e(e,n){var o=t.call(this,e,u.Group.Modal,u.Group.Modal)||this;return o.set(n,!1),o}return r(e,t),Object.defineProperty(e.prototype,"payload",{get:function(){return i(i({},this.options),{footer:this.footer,id:this.id})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"options",{get:function(){return{footer:this.footerOptions,path:this.path,size:this.size,title:this.title,url:this.url}},enumerable:!1,configurable:!0}),e.prototype.set=function(t,e){var n=this;void 0===e&&(e=!0);var o=c.getMergedProps(this.options,t),r=o.title,i=o.footer,a=o.path,u=o.url,s=o.size;return this.title=r,this.url=u,this.path=a,this.size=s,this.setFooterPrimaryButton(i?i.buttons.primary:void 0,(function(){n.dispatch(p.Action.UPDATE)})),this.setFooterSecondaryButtons(i?i.buttons.secondary:void 0,(function(){n.dispatch(p.Action.UPDATE)})),e&&this.dispatch(p.Action.UPDATE),this},e.prototype.dispatch=function(t,e){switch(t){case p.Action.OPEN:this.app.dispatch(d(this.payload));break;case p.Action.CLOSE:this.close();break;case p.Action.UPDATE:this.app.dispatch(h(this.payload));break;case p.Action.DATA:this.app.dispatch(y(e||{}))}return this},e}(v);e.ModalIframe=O,e.create=function(t,e){return A(e)?new O(t,e):new P(t,e)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.makeSafe=e.isSafe=void 0;var o=/\/\/\//,r=/[/\\][/\\]/,i=["https:","http:"];function a(t,e){var n,a=void 0===e?{}:e,u=a.allowedDomains,s=void 0===u?[]:u,p=a.subdomains,l=void 0===p?[]:p,d=a.matchPath,f=a.requireAbsolute,h=a.requireSSL;if(o.test(t))return!1;if(t.startsWith("/"))return!(s.length>0||l.length>0||f||h)&&(d?c(new URL(t,"http://test.com"),t,d):!r.test(t));try{n=new URL(t)}catch(t){return!1}return!!i.includes(n.protocol)&&((!h||"https:"===n.protocol)&&(!n.username&&!n.password&&(!(d&&!c(n,t,d))&&!!function(t,e,n){if(!n.every((function(t){return t.startsWith(".")})))throw new TypeError("Subdomains must begin with .");var o=t.hostname;return 0===e.length&&0===n.length||e.includes(o)||n.some((function(t){return o.endsWith(t)}))}(n,s,l))))}function c(t,e,n){var o=t.pathname,r=e.replace(t.origin,"").split("?")[0];return"string"==typeof n?o===n&&r===n:n.test(o)&&n.test(r)}e.isSafe=a,e.makeSafe=function(t,e,n){return a(t,n)?encodeURI(t):e}},function(t,e,n){"use strict";var o=this&&this.__assign||function(){return(o=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.validateAction=e.getSectionSchema=e.matchesAbsolutePath=void 0;var r=n(5),i=n(2),a=n(3);function c(t){return t.match("^https?://")?void 0:[{value:t,error:"invalid_absolute_url",message:"expected string to start with `https://` or `http://`"}]}function u(t){var e=t&&t.section&&t.section.resource&&t.section.name===r.Redirect.ResourceType.Product,n={create:i.makeOptional(i.matchesBoolean()),id:i.makeOptional(i.matchesString())},a=o(o({},n),{variant:i.makeOptional(i.matchesObject(n))});return i.matchesObject({section:i.matchesObject({name:i.matchesEnum(r.Redirect.ResourceType),resource:i.makeOptional(i.matchesObject(e?a:n))})})}e.matchesAbsolutePath=c,e.getSectionSchema=u,e.validateAction=function(t){var e,n=i.matchesObject({newContext:i.makeOptional(i.matchesBoolean())}),o=r.Redirect.ActionType;switch(t.type){case r.History.ActionType.PUSH:case r.History.ActionType.REPLACE:o=r.History.ActionType,e=a.relativePathSchema;break;case r.Redirect.ActionType.APP:e=a.relativePathSchema;break;case r.Redirect.ActionType.REMOTE:e=i.composeSchemas(i.matchesObject({url:i.composeSchemas(i.matchesString(),(function(t){return c(t)}))}),n);break;case r.Redirect.ActionType.ADMIN_PATH:e=i.composeSchemas(a.relativePathSchema,n);break;case r.Redirect.ActionType.ADMIN_SECTION:e=i.composeSchemas(u(t.payload),n)}return i.validate(t,a.createActionValidator(o,e))}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.respond=e.request=e.Action=e.ActionType=void 0;var o,r=n(0),i=n(1);!function(t){t.REQUEST="APP::AUTH_CODE::REQUEST",t.RESPOND="APP::AUTH_CODE::RESPOND"}(o=e.ActionType||(e.ActionType={})),function(t){t.REQUEST="REQUEST",t.RESPOND="RESPOND"}(e.Action||(e.Action={})),e.request=function(){return r.actionWrapper({group:i.Group.AuthCode,type:o.REQUEST})},e.respond=function(t){return r.actionWrapper({payload:t,group:i.Group.AuthCode,type:o.RESPOND})}},function(t,e,n){"use strict";var o,r=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.ButtonGroup=e.isGroupedButtonPayload=e.isGroupedButton=e.update=void 0;var a=n(14),c=n(0),u=n(1),s=n(46);function p(t,e,n){return function(t,e,n,o,r){var a=e.id,u=o.label,s=c.getEventNameSpace(t,n,e),p=i(i({},o),{id:a,label:u,payload:r});return c.actionWrapper({type:s,group:t,payload:p})}(t,e,s.Action.UPDATE,n)}e.update=p,e.isGroupedButton=function(t){var e=t;return e.buttons&&e.buttons.length>0&&void 0!==e.label},e.isGroupedButtonPayload=function(t){var e=t;return Array.isArray(e.buttons)&&"string"==typeof e.id&&"string"==typeof e.label};var l=function(t){function e(e,n){var o=t.call(this,e,u.ComponentType.ButtonGroup,u.Group.ButtonGroup)||this;return o.disabled=!1,o.buttonsOptions=[],o.buttons=[],o.set(n,!1),o}return r(e,t),Object.defineProperty(e.prototype,"options",{get:function(){return{buttons:this.buttonsOptions,disabled:this.disabled,label:this.label}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"payload",{get:function(){return i(i({},this.options),{buttons:this.buttons,id:this.id})},enumerable:!1,configurable:!0}),e.prototype.set=function(t,e){void 0===e&&(e=!0);var n=c.getMergedProps(this.options,t),o=n.label,r=n.disabled,i=n.buttons;return this.label=o,this.disabled=Boolean(r),this.buttons=this.getButtons(i),e&&this.dispatch(s.Action.UPDATE),this},e.prototype.dispatch=function(t){switch(t){case s.Action.UPDATE:var e=p(this.group,this.component,this.payload);this.app.dispatch(e)}return this},e.prototype.updateButtons=function(t){if(this.buttons&&0!==this.buttons.length){for(var e,n=0,o=this.buttons;n<o.length;n++){var r=o[n];if(e=c.updateActionFromPayload(r,t))break}e&&this.dispatch(s.Action.UPDATE)}},e.prototype.getSingleButton=function(t){return a.getSingleButton(this,t,this.subgroups,this.updateButtons)},e.prototype.getButtons=function(t){var e=this,n=[];return t?(t.forEach((function(t){var o=a.getSingleButton(e,t,e.subgroups,e.updateButtons);n.push(o)})),this.buttonsOptions=t,n):[]},e}(c.ActionSetWithChildren);e.ButtonGroup=l,e.create=function(t,e){return new l(t,e)}},function(t,e,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),r=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||e.hasOwnProperty(n)||o(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),r(n(98),e),r(n(21),e)},function(t,e,n){"use strict";var o,r=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.Flash=void 0;var i=n(15),a=n(15);Object.defineProperty(e,"clear",{enumerable:!0,get:function(){return a.clear}}),Object.defineProperty(e,"show",{enumerable:!0,get:function(){return a.show}});var c=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e}(i.Toast);e.Flash=c,e.create=function(t,e){return new c(t,e)}},function(t,e,n){"use strict";var o,r=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.Toast=e.clear=e.show=void 0;var a=n(0),c=n(1),u=n(21);function s(t){return a.actionWrapper({group:c.Group.Toast,payload:t,type:u.ActionType.SHOW})}function p(t){return a.actionWrapper({payload:t,group:c.Group.Toast,type:u.ActionType.CLEAR})}e.show=s,e.clear=p;var l=function(t){function e(e,n){var o=t.call(this,e,c.Group.Toast,c.Group.Toast)||this;return o.message="",o.duration=5e3,o.set(n),o}return r(e,t),Object.defineProperty(e.prototype,"options",{get:function(){return{duration:this.duration,isError:this.isError,message:this.message}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"payload",{get:function(){return i({id:this.id},this.options)},enumerable:!1,configurable:!0}),e.prototype.set=function(t){var e=a.getMergedProps(this.options,t),n=e.message,o=e.duration,r=e.isError;return this.message=n,this.duration=o,this.isError=r,this},e.prototype.dispatch=function(t){switch(t){case u.Action.SHOW:var e=s(this.payload);this.app.dispatch(e);break;case u.Action.CLEAR:this.app.dispatch(p({id:this.id}))}return this},e}(a.ActionSet);e.Toast=l,e.create=function(t,e){return new l(t,e)}},function(t,e,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),r=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||e.hasOwnProperty(n)||o(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),r(n(101),e),r(n(47),e)},function(t,e,n){"use strict";var o,r=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.Features=void 0;var a=n(0),c=n(1),u=n(47),s=function(t){function e(e,n){return t.call(this,e,c.Group.Features,c.Group.Features,n?n.id:void 0)||this}return r(e,t),e.prototype.dispatch=function(t,e){switch(t){case u.Action.REQUEST:this.dispatchFeaturesAction(u.ActionType.REQUEST,e)}return this},e.prototype.dispatchFeaturesAction=function(t,e){this.app.dispatch(a.actionWrapper({group:c.Group.Features,type:t,payload:i(i({},e||{}),{id:this.id})}))},e}(a.ActionSet);e.Features=s,e.create=function(t,e){return new s(t,e)}},function(t,e,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),r=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||e.hasOwnProperty(n)||o(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),r(n(103),e),r(n(48),e)},function(t,e,n){"use strict";var o,r=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.History=e.replace=e.push=void 0;var a=n(0),c=n(1),u=n(48);function s(t){return a.actionWrapper({payload:t,group:c.Group.Navigation,type:u.ActionType.PUSH})}function p(t){return a.actionWrapper({payload:t,group:c.Group.Navigation,type:u.ActionType.REPLACE})}e.push=s,e.replace=p;var l=function(t){function e(e){return t.call(this,e,"History",c.Group.Navigation)||this}return r(e,t),Object.defineProperty(e.prototype,"payload",{get:function(){return{id:this.id}},enumerable:!1,configurable:!0}),e.prototype.dispatch=function(t,e){var n=i(i({},this.payload),{path:e});switch(t){case u.Action.PUSH:this.app.dispatch(s(n));break;case u.Action.REPLACE:this.app.dispatch(p(n))}return this},e}(a.ActionSet);e.History=l,e.create=function(t){return new l(t)}},function(t,e,n){"use strict";var o,r=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.Redirect=e.isRemotePayload=e.isAdminSectionPayload=e.isAdminPathPayload=e.isAppPayload=e.toDestination=e.toApp=e.toRemote=e.toAdminSection=e.toAdminPath=e.isProductVariantCreateResourcePayload=e.isProductVariantResourcePayload=e.isCreateResourcePayload=e.isResourcePayload=void 0;var a=n(0),c=n(1),u=n(50);function s(t){return!0===t.create}function p(t){var e=t;return void 0!==e.id&&void 0!==e.variant}function l(t){return a.actionWrapper({payload:t,group:c.Group.Navigation,type:u.ActionType.ADMIN_PATH})}function d(t){return a.actionWrapper({payload:t,group:c.Group.Navigation,type:u.ActionType.ADMIN_SECTION})}function f(t){return a.actionWrapper({payload:t,group:c.Group.Navigation,type:u.ActionType.REMOTE})}function h(t){return a.actionWrapper({payload:t,group:c.Group.Navigation,type:u.ActionType.APP})}function y(t,e,n){switch(t){case u.Action.APP:var o=A(e)?e:{path:e};return h(i({id:n},o));case u.Action.ADMIN_PATH:var r=v(e)?e:{path:e};return l(i({id:n},r));case u.Action.ADMIN_SECTION:var a=P(e)?e:{section:e};return d(i({id:n},a));case u.Action.REMOTE:var c=O(e)?e:{url:e};return f(i({id:n},c))}}function A(t){return"object"==typeof t&&t.hasOwnProperty("path")}function v(t){return"object"==typeof t&&t.hasOwnProperty("path")}function P(t){return"object"==typeof t&&"object"==typeof t.section&&t.section.hasOwnProperty("name")}function O(t){return"object"==typeof t&&t.hasOwnProperty("url")}e.isResourcePayload=function(t){return"string"==typeof t.id},e.isCreateResourcePayload=s,e.isProductVariantResourcePayload=p,e.isProductVariantCreateResourcePayload=function(t){return!!p(t)&&s(t.variant)},e.toAdminPath=l,e.toAdminSection=d,e.toRemote=f,e.toApp=h,e.toDestination=y,e.isAppPayload=A,e.isAdminPathPayload=v,e.isAdminSectionPayload=P,e.isRemotePayload=O;var _=function(t){function e(e){return t.call(this,e,"Redirect",c.Group.Navigation)||this}return r(e,t),Object.defineProperty(e.prototype,"payload",{get:function(){return{id:this.id}},enumerable:!1,configurable:!0}),e.prototype.dispatch=function(t,e){var n=y(t,e,this.payload.id);return this.app.dispatch(n),this},e}(a.ActionSet);e.Redirect=_,e.create=function(t){return new _(t)}},function(t,e,n){"use strict";var o,r=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.ResourcePicker=e.update=e.close=e.cancel=e.open=e.select=void 0;var a=n(0),c=n(1),u=n(52);function s(t){return a.actionWrapper({payload:t,group:c.Group.ResourcePicker,type:u.ActionType.SELECT})}function p(t){return a.actionWrapper({payload:t,group:c.Group.ResourcePicker,type:u.ActionType.OPEN})}function l(t){return a.actionWrapper({payload:t,group:c.Group.ResourcePicker,type:u.ActionType.CANCEL})}function d(t){return a.actionWrapper({payload:t,group:c.Group.ResourcePicker,type:u.ActionType.UPDATE})}e.select=s,e.open=p,e.cancel=l,e.close=function(t){return a.actionWrapper({payload:t,group:c.Group.ResourcePicker,type:u.ActionType.CANCEL})},e.update=d;var f=function(t){function e(e,n,o){var r=t.call(this,e,c.Group.ResourcePicker,c.Group.ResourcePicker)||this;return r.initialSelectionIds=[],r.selection=[],r.resourceType=o,r.set(n,!1),r}return r(e,t),Object.defineProperty(e.prototype,"payload",{get:function(){return i(i({},this.options),{id:this.id,resourceType:this.resourceType})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"options",{get:function(){var t={initialQuery:this.initialQuery,selectMultiple:this.selectMultiple,initialSelectionIds:this.initialSelectionIds,showHidden:this.showHidden,actionVerb:this.actionVerb};return this.resourceType===u.ResourceType.Product?i(i({},t),{showVariants:this.showVariants}):t},enumerable:!1,configurable:!0}),e.prototype.set=function(t,e){void 0===e&&(e=!0);var n=a.getMergedProps(this.options,t),o=n.initialQuery,r=n.initialSelectionIds,i=void 0===r?[]:r,c=n.showHidden,s=void 0===c||c,p=n.showVariants,l=void 0===p||p,d=n.selectMultiple,f=void 0===d||d,h=n.actionVerb,y=void 0===h?u.ActionVerb.Add:h;return this.initialQuery=o,this.initialSelectionIds=i,this.showHidden=Boolean(s),this.showVariants=Boolean(l),this.selectMultiple=Boolean(f),this.actionVerb=y,e&&this.update(),this},e.prototype.dispatch=function(t,e){return t===u.Action.OPEN?this.open():t===u.Action.UPDATE?this.update():t===u.Action.CLOSE||t===u.Action.CANCEL?this.cancel():t===u.Action.SELECT&&(this.selection=e,this.app.dispatch(s({id:this.id,selection:this.selection}))),this},e.prototype.update=function(){this.app.dispatch(d(this.payload))},e.prototype.open=function(){this.app.dispatch(p(this.payload))},e.prototype.cancel=function(){this.app.dispatch(l({id:this.id}))},e.prototype.close=function(){this.cancel()},e}(a.ActionSet);e.ResourcePicker=f,e.create=function(t,e){var n=e.resourceType,o=e.options;return new f(t,void 0===o?{}:o,n)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.respond=e.request=e.Action=e.ActionType=void 0;var o,r=n(0),i=n(1);!function(t){t.REQUEST="APP::SESSION_TOKEN::REQUEST",t.RESPOND="APP::SESSION_TOKEN::RESPOND"}(o=e.ActionType||(e.ActionType={})),function(t){t.REQUEST="REQUEST",t.RESPOND="RESPOND"}(e.Action||(e.Action={})),e.request=function(){return r.actionWrapper({group:i.Group.SessionToken,type:o.REQUEST})},e.respond=function(t){return r.actionWrapper({payload:t,group:i.Group.SessionToken,type:o.RESPOND})}},function(t,e,n){"use strict";var o,r=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.TitleBar=e.update=e.clickBreadcrumb=e.clickActionButton=void 0;var a=n(7),c=n(11),u=n(108),s=n(14),p=n(0),l=n(1),d=n(54),f={group:l.Group.TitleBar,subgroups:["Buttons"]},h={group:l.Group.TitleBar,subgroups:["Breadcrumbs"],type:l.ComponentType.Button};function y(t){return p.actionWrapper({payload:t,group:l.Group.TitleBar,type:d.ActionType.UPDATE})}e.clickActionButton=function(t,e){var n=l.ComponentType.Button,o=i({id:t,type:n},f);return a.clickButton(l.Group.TitleBar,o,e)},e.clickBreadcrumb=function(t,e){var n=i({id:t},h);return a.clickButton(l.Group.TitleBar,n,e)},e.update=y;var A=function(t){function e(e,n){var o=t.call(this,e,l.Group.TitleBar,l.Group.TitleBar)||this;return o.set(n),o}return r(e,t),Object.defineProperty(e.prototype,"buttons",{get:function(){if(this.primary||this.secondary)return{primary:this.primary,secondary:this.secondary}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"buttonsOptions",{get:function(){if(this.primaryOptions||this.secondaryOptions)return{primary:this.primaryOptions,secondary:this.secondaryOptions}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"options",{get:function(){return{breadcrumbs:this.breadcrumbsOption,buttons:this.buttonsOptions,title:this.title}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"payload",{get:function(){return i(i({},this.options),{breadcrumbs:this.breadcrumb,buttons:this.buttons,id:this.id})},enumerable:!1,configurable:!0}),e.prototype.set=function(t,e){void 0===e&&(e=!0);var n=p.getMergedProps(this.options,t),o=n.title,r=n.buttons,i=n.breadcrumbs;return this.title=o,this.setBreadcrumbs(i),this.setPrimaryButton(r?r.primary:void 0),this.setSecondaryButton(r?r.secondary:void 0),e&&this.dispatch(d.Action.UPDATE),this},e.prototype.dispatch=function(t){switch(t){case d.Action.UPDATE:this.app.dispatch(y(this.payload))}return this},e.prototype.getButton=function(t,e,n){return t instanceof c.ButtonGroup?u.getGroupedButton(this,t,e,n):s.getSingleButton(this,t,e,n)},e.prototype.updatePrimaryButton=function(t){this.primary&&p.updateActionFromPayload(this.primary,t)&&this.dispatch(d.Action.UPDATE)},e.prototype.updateSecondaryButtons=function(t){if(this.secondary){var e=this.secondary.find((function(e){return e.id===t.id}));if(e){(c.isGroupedButtonPayload(t),p.updateActionFromPayload(e,t))&&this.dispatch(d.Action.UPDATE)}}},e.prototype.updateBreadcrumbButton=function(t){this.breadcrumb&&p.updateActionFromPayload(this.breadcrumb,t)&&this.dispatch(d.Action.UPDATE)},e.prototype.setPrimaryButton=function(t){this.primaryOptions=this.getChildButton(t,this.primaryOptions),this.primary=this.primaryOptions?this.getButton(this.primaryOptions,f.subgroups,this.updatePrimaryButton):void 0},e.prototype.setSecondaryButton=function(t){var e=this,n=t||[],o=this.secondaryOptions||[];this.secondaryOptions=this.getUpdatedChildActions(n,o),this.secondary=this.secondaryOptions?this.secondaryOptions.map((function(t){return e.getButton(t,f.subgroups,e.updateSecondaryButtons)})):void 0},e.prototype.setBreadcrumbs=function(t){this.breadcrumbsOption=this.getChildButton(t,this.breadcrumbsOption),this.breadcrumb=this.breadcrumbsOption?this.getButton(this.breadcrumbsOption,h.subgroups,this.updateBreadcrumbButton):void 0},e.prototype.getChildButton=function(t,e){var n=t?[t]:[],o=e?[e]:[],r=this.getUpdatedChildActions(n,o);return r?r[0]:void 0},e}(p.ActionSetWithChildren);e.TitleBar=A,e.create=function(t,e){return new A(t,e)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getGroupedButton=void 0;var o=n(11);e.getGroupedButton=function(t,e,n,r){t.addChild(e,t.group,n);var i=e.id,a=e.label,c=e.disabled,u=e.buttons;return t.subscribeToChild(e,o.Action.UPDATE,r),{id:i,label:a,buttons:u,disabled:c}}},function(t,e,n){"use strict";var o,r=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.Share=e.Action=e.ActionType=void 0;var a,c,u=n(1),s=n(0);!function(t){t.SHOW="APP::SHARE::SHOW",t.CLOSE="APP::SHARE::CLOSE"}(a=e.ActionType||(e.ActionType={})),function(t){t.SHOW="SHOW",t.CLOSE="CLOSE"}(c=e.Action||(e.Action={}));var p=function(t){function e(e){return t.call(this,e,u.Group.Share,u.Group.Share)||this}return r(e,t),e.prototype.dispatch=function(t,e){switch(t){case c.SHOW:this.dispatchShareAction(a.SHOW,e);break;default:throw"Action: "+t+" not supported"}return this},e.prototype.dispatchShareAction=function(t,e){this.app.dispatch(s.actionWrapper({type:t,group:u.Group.Share,payload:i({id:this.id},e)}))},e}(s.ActionSet);e.Share=p,e.create=function(t){return new p(t)}},function(t,e,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),r=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||e.hasOwnProperty(n)||o(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),r(n(111),e)},function(t,e,n){"use strict";var o,r=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.NavigationMenu=e.update=e.ActionType=e.Action=void 0;var a,c,u=n(16),s=n(0),p=n(1),l=["Navigation_Menu"];function d(t){return s.actionWrapper({payload:t,group:p.Group.Menu,type:c.UPDATE})}!function(t){t.UPDATE="UPDATE",t.LINK_UPDATE="LINK::UPDATE"}(a=e.Action||(e.Action={})),function(t){t.UPDATE="APP::MENU::NAVIGATION_MENU::UPDATE",t.LINK_UPDATE="APP::MENU::NAVIGATION_MENU::LINK::UPDATE"}(c=e.ActionType||(e.ActionType={})),e.update=d;var f=function(t){function e(e,n){var o=t.call(this,e,"Navigation_Menu",p.Group.Menu)||this;return o.items=[],o.set(n),o}return r(e,t),Object.defineProperty(e.prototype,"options",{get:function(){return{items:this.itemsOptions,active:this.activeOptions}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"payload",{get:function(){return i(i({},this.options),{active:this.active,items:this.items,id:this.id})},enumerable:!1,configurable:!0}),e.prototype.set=function(t,e){void 0===e&&(e=!0);var n=s.getMergedProps(this.options,t),o=n.items,r=n.active;return this.setItems(o),this.activeOptions=r,this.active=r&&r.id,e&&this.dispatch(a.UPDATE),this},e.prototype.dispatch=function(t){switch(t){case a.UPDATE:this.app.dispatch(d(this.payload))}return this},e.prototype.updateItem=function(t){if(this.items){var e=this.items.find((function(e){return e.id===t.id}));e&&s.updateActionFromPayload(e,t)&&this.dispatch(a.UPDATE)}},e.prototype.setItems=function(t){var e=this,n=t||[],o=this.itemsOptions||[];this.itemsOptions=this.getUpdatedChildActions(n,o),this.items=this.itemsOptions?this.itemsOptions.map((function(t){return e.addChild(t,e.group,l),e.subscribeToChild(t,u.Action.UPDATE,e.updateItem),t.payload})):[]},e}(s.ActionSetWithChildren);e.NavigationMenu=f,e.create=function(t,e){return new f(t,e)}},function(t,e,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),r=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||e.hasOwnProperty(n)||o(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),r(n(113),e)},function(t,e,n){"use strict";var o,r=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.ChannelMenu=e.update=e.ActionType=e.Action=void 0;var a,c,u=n(16),s=n(0),p=n(1),l=["Channel_Menu"];function d(t){return s.actionWrapper({payload:t,group:p.Group.Menu,type:c.UPDATE})}!function(t){t.UPDATE="UPDATE",t.LINK_UPDATE="LINK::UPDATE"}(a=e.Action||(e.Action={})),function(t){t.UPDATE="APP::MENU::CHANNEL_MENU::UPDATE",t.LINK_UPDATE="APP::MENU::CHANNEL_MENU::LINK::UPDATE"}(c=e.ActionType||(e.ActionType={})),e.update=d;var f=function(t){function e(e,n){var o=t.call(this,e,"Channel_Menu",p.Group.Menu)||this;return o.items=[],o.set(n),o}return r(e,t),Object.defineProperty(e.prototype,"options",{get:function(){return{items:this.itemsOptions,active:this.activeOptions}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"payload",{get:function(){return i(i({},this.options),{active:this.active,items:this.items,id:this.id})},enumerable:!1,configurable:!0}),e.prototype.set=function(t,e){void 0===e&&(e=!0);var n=s.getMergedProps(this.options,t),o=n.items,r=n.active;return this.setItems(o),this.activeOptions=r,this.active=r&&r.id,e&&this.dispatch(a.UPDATE),this},e.prototype.dispatch=function(t){switch(t){case a.UPDATE:this.app.dispatch(d(this.payload))}return this},e.prototype.updateItem=function(t){if(this.items){var e=this.items.find((function(e){return e.id===t.id}));e&&s.updateActionFromPayload(e,t)&&this.dispatch(a.UPDATE)}},e.prototype.setItems=function(t){var e=this,n=t||[],o=this.itemsOptions||[];this.itemsOptions=this.getUpdatedChildActions(n,o),this.items=this.itemsOptions?this.itemsOptions.map((function(t){return e.addChild(t,e.group,l),e.subscribeToChild(t,u.Action.UPDATE,e.updateItem),t.payload})):[]},e}(s.ActionSetWithChildren);e.ChannelMenu=f,e.create=function(t,e){return new f(t,e)}},function(t,e,n){"use strict";var o,r=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.Pos=e.close=e.ActionType=e.Action=void 0;var i,a=n(0),c=n(1);function u(){return a.actionWrapper({group:c.Group.Pos,type:i.CLOSE})}!function(t){t.CLOSE="CLOSE"}(e.Action||(e.Action={})),function(t){t.CLOSE="APP::POS::CLOSE",t.LOCATION_UPDATE="APP::POS::LOCATION::UPDATE",t.USER_UPDATE="APP::POS::USER::UPDATE",t.DEVICE_UPDATE="APP::POS::DEVICE::UPDATE"}(i=e.ActionType||(e.ActionType={})),e.close=u;var s=function(t){function e(e){return t.call(this,e,c.Group.Pos,c.Group.Pos)||this}return r(e,t),e.prototype.dispatch=function(t){switch(t){case i.CLOSE:this.app.dispatch(u())}return this},e}(a.ActionSet);e.Pos=s,e.create=function(t){return new s(t)}},function(t,e,n){"use strict";var o,r=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.MarketingExternalActivityTopBar=e.update=e.clickActionButton=e.MarketingActivityStatusBadgeType=e.ActionType=e.Action=void 0;var a,c,u=n(7),s=n(14),p=n(0),l=n(1);!function(t){t.UPDATE="UPDATE"}(a=e.Action||(e.Action={})),function(t){t.UPDATE="APP::MARKETING_EXTERNAL_ACTIVITY_TOP_BAR::UPDATE",t.BUTTON_CLICK="APP::MARKETING_EXTERNAL_ACTIVITY_TOP_BAR::BUTTONS::BUTTON::CLICK",t.BUTTON_UPDATE="APP::MARKETING_EXTERNAL_ACTIVITY_TOP_BAR::BUTTONS::BUTTON::UPDATE"}(c=e.ActionType||(e.ActionType={})),function(t){t.Default="DEFAULT",t.Success="SUCCESS",t.Attention="ATTENTION",t.Warning="WARNING",t.Info="INFO"}(e.MarketingActivityStatusBadgeType||(e.MarketingActivityStatusBadgeType={}));var d={group:l.Group.MarketingExternalActivityTopBar,subgroups:["Buttons"]};function f(t){return p.actionWrapper({payload:t,group:l.Group.MarketingExternalActivityTopBar,type:c.UPDATE})}e.clickActionButton=function(t,e){var n=l.ComponentType.Button,o=i({id:t,type:n},d);return u.clickButton(l.Group.MarketingExternalActivityTopBar,o,e)},e.update=f;var h=function(t){function e(e,n){var o=t.call(this,e,l.Group.MarketingExternalActivityTopBar,l.Group.MarketingExternalActivityTopBar)||this;return o.set(n),o}return r(e,t),Object.defineProperty(e.prototype,"buttons",{get:function(){if(this.primary||this.secondary)return{primary:this.primary,secondary:this.secondary}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"buttonsOptions",{get:function(){if(this.primaryOptions||this.secondaryOptions)return{primary:this.primaryOptions,secondary:this.secondaryOptions}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"options",{get:function(){return{title:this.title,status:this.status,saving:this.saving,saved:this.saved,buttons:this.buttonsOptions}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"payload",{get:function(){return i(i({},this.options),{buttons:this.buttons,id:this.id})},enumerable:!1,configurable:!0}),e.prototype.set=function(t,e){void 0===e&&(e=!0);var n=p.getMergedProps(this.options,t),o=n.title,r=n.buttons,i=n.saved,c=n.saving,u=n.status;return this.title=o,this.saving=c,this.saved=i,this.status=u,this.setPrimaryButton(r?r.primary:void 0),this.setSecondaryButtons(r?r.secondary:void 0),e&&this.dispatch(a.UPDATE),this},e.prototype.dispatch=function(t){switch(t){case a.UPDATE:this.app.dispatch(f(this.payload))}return this},e.prototype.getButton=function(t,e,n){return s.getSingleButton(this,t,e,n)},e.prototype.updatePrimaryButton=function(t){this.primary&&p.updateActionFromPayload(this.primary,t)&&this.dispatch(a.UPDATE)},e.prototype.updateSecondaryButtons=function(t){if(this.secondary){var e=this.secondary.find((function(e){return e.id===t.id}));if(e)p.updateActionFromPayload(e,t)&&this.dispatch(a.UPDATE)}},e.prototype.setPrimaryButton=function(t){this.primaryOptions=this.getChildButton(t,this.primaryOptions),this.primary=this.primaryOptions?this.getButton(this.primaryOptions,d.subgroups,this.updatePrimaryButton):void 0},e.prototype.setSecondaryButtons=function(t){var e=this,n=t||[],o=this.secondaryOptions||[];this.secondaryOptions=this.getUpdatedChildActions(n,o),this.secondary=this.secondaryOptions?this.secondaryOptions.map((function(t){return e.getButton(t,d.subgroups,e.updateSecondaryButtons)})):void 0},e.prototype.updateSaving=function(t){this.saving=t,this.dispatch(a.UPDATE)},e.prototype.updateSaved=function(t){this.saved=t,this.dispatch(a.UPDATE)},e.prototype.updateStatus=function(t){this.status=t,this.dispatch(a.UPDATE)},e.prototype.getChildButton=function(t,e){var n=t?[t]:[],o=e?[e]:[],r=this.getUpdatedChildActions(n,o);return r?r[0]:void 0},e}(p.ActionSetWithChildren);e.MarketingExternalActivityTopBar=h,e.create=function(t,e){return new h(t,e)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.fullPageLoad=e.skeletonPageLoad=e.Action=e.ActionType=void 0;var o,r=n(1),i=n(0);!function(t){t.SKELETON_PAGE_LOAD="APP::PERFORMANCE::SKELETON_PAGE_LOAD",t.FULL_PAGE_LOAD="APP::PERFORMANCE::FULL_PAGE_LOAD"}(o=e.ActionType||(e.ActionType={})),function(t){t.SKELETON_PAGE_LOAD="SKELETON_PAGE_LOAD",t.FULL_PAGE_LOAD="FULL_PAGE_LOAD"}(e.Action||(e.Action={})),e.skeletonPageLoad=function(){return i.actionWrapper({group:r.Group.Performance,type:o.SKELETON_PAGE_LOAD})},e.fullPageLoad=function(){return i.actionWrapper({group:r.Group.Performance,type:o.FULL_PAGE_LOAD})}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ActionType=e.validateAction=void 0;var o=n(19);Object.defineProperty(e,"ActionType",{enumerable:!0,get:function(){return o.ActionType}});var r=n(2),i=n(3);e.validateAction=function(t){return r.validate(t,i.createActionValidator(o.ActionType))}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ActionType=e.validateAction=e.validateProps=void 0;var o=n(51);Object.defineProperty(e,"ActionType",{enumerable:!0,get:function(){return o.ActionType}});var r=n(2),i=n(3),a=r.matchesArray(r.matchesObject({id:r.matchesString()})),c=r.matchesObject({initialQuery:r.makeOptional(r.matchesString()),initialSelectionIds:r.makeOptional(a),selectMultiple:r.makeOptional(r.matchesBoolean()),showHidden:r.makeOptional(r.matchesBoolean()),showVariants:r.makeOptional(r.matchesBoolean()),actionVerb:r.makeOptional(r.matchesEnum(o.ActionVerb))}),u=r.matchesObject({resourceType:r.matchesEnum(o.ResourceType),options:r.makeOptional(c)}),s=r.matchesObject({selection:a});e.validateProps=function(t){return r.validate(t,c)},e.validateAction=function(t){switch(t.type){case o.ActionType.UPDATE:case o.ActionType.OPEN:return r.validate(t,i.createActionValidator(o.ActionType,u,!1,!0));case o.ActionType.SELECT:return r.validate(t,i.createActionValidator(o.ActionType,s,!0,!0));case o.ActionType.CANCEL:case o.ActionType.CLOSE:default:return r.validate(t,i.createActionValidator(o.ActionType))}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ActionType=e.validateAction=e.validateProps=e.toastSchema=void 0;var o=n(15);Object.defineProperty(e,"ActionType",{enumerable:!0,get:function(){return o.ActionType}});var r=n(2),i=n(3);e.toastSchema=r.matchesObject({message:r.matchesString(),duration:r.matchesPositiveInteger(),isError:r.makeOptional(r.matchesBoolean())}),e.validateProps=function(t){return r.validate(t,e.toastSchema)},e.validateAction=function(t){switch(t.type){case o.ActionType.SHOW:return r.validate(t,i.createActionValidator(o.ActionType,e.toastSchema,!0));default:return r.validate(t,i.createActionValidator(o.ActionType))}}},function(t,e,n){"use strict";var o=this&&this.__assign||function(){return(o=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.ActionType=e.validateAction=e.validateProps=e.titleBarSchema=void 0;var r=n(53);Object.defineProperty(e,"ActionType",{enumerable:!0,get:function(){return r.ActionType}});var i=n(7),a=n(11),c=n(2),u=n(3),s=n(13),p=n(55),l=c.composeSchemas(s.buttonSchema,c.matchesObject({id:c.matchesString()}));e.titleBarSchema=c.matchesObject({breadcrumbs:c.makeOptional(s.buttonSchema),title:c.makeOptional(c.matchesString()),buttons:c.makeOptional(c.matchesObject({primary:c.makeOptional(l),secondary:c.makeOptional(c.matchesArray(c.composeSchemas(l,c.matchesObject({buttons:c.makeOptional(c.matchesArray(l))}))))}))}),e.validateProps=function(t){return c.validate(t,e.titleBarSchema)},e.validateAction=function(t){switch(t.type){default:case r.ActionType.UPDATE:return c.validate(t,u.createActionValidator(r.ActionType,e.titleBarSchema,!0,!1));case r.ActionType.BUTTON_CLICK:case r.ActionType.BREADCRUMBS_CLICK:return s.validateAction(o(o({},t),{type:i.ActionType.CLICK}));case r.ActionType.BUTTON_UPDATE:case r.ActionType.BREADCRUMBS_UPDATE:return s.validateAction(o(o({},t),{type:i.ActionType.UPDATE}));case r.ActionType.BUTTON_GROUP_UPDATE:return p.validateAction(o(o({},t),{type:a.ActionType.UPDATE}))}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.validateAction=e.validateProps=void 0;var o=n(5),r=n(2),i=n(3),a=n(56),c=r.matchesObject({id:r.matchesString(),options:a.linkPropsSchema});function u(t){return[{error:"invalid_active_item",value:t,message:"expected active item to exist in menu items"}]}e.validateProps=function(t){return r.validate(t,function(t){var e=r.matchesObject({items:r.makeOptional(r.matchesArray(c)),active:r.makeOptional(c)}),n=t.items,o=t.active;if(n&&o){var i=r.matchesObject({active:r.composeSchemas(c,(function(t){return n.find((function(e){return e.id===t.id}))?void 0:u(t)}))});return r.composeSchemas(e,i)}return e}(t))},e.validateAction=function(t){var e=o.NavigationMenu.ActionType;return t.type!==o.ChannelMenu.ActionType.LINK_UPDATE&&t.type!==o.ChannelMenu.ActionType.UPDATE||(e=o.ChannelMenu.ActionType),r.validate(t,i.createActionValidator(e,function(t){var e=r.matchesObject({items:r.makeOptional(r.matchesArray(a.linkActionSchema)),active:r.makeOptional(r.matchesString())}),n=t.items,o=t.active;if(n&&o){var i=r.matchesObject({active:r.composeSchemas(r.matchesString(),(function(t){return n.find((function(e){return e.id===t}))?void 0:u(t)}))});return r.composeSchemas(e,i)}return e}(t.payload),!0,!1))}},function(t){t.exports=JSON.parse('{"name":"@shopify/app-bridge-react","version":"1.27.1","types":"index.d.ts","main":"index.js","unpkg":"umd/index.js","jsdelivr":"umd/index.js","files":["/components/","/context.d.ts","/context.js","/useAppBridge.d.ts","/useAppBridge.js","/index.d.ts","/index.js","/umd/","/utilities/","/types.d.ts","/types.js"],"private":false,"publishConfig":{"access":"public","@shopify:registry":"https://registry.npmjs.org"},"repository":"git@github.com:Shopify/app-bridge.git","homepage":"https://shopify.dev/tools/app-bridge/react-components","author":"Shopify Inc.","license":"MIT","scripts":{"build":"yarn build:tsc && yarn build:umd","build:tsc":"NODE_ENV=production tsc","build:umd":"NODE_ENV=production webpack -p","check":"tsc","clean":"cat package.json | node -pe \\"JSON.parse(require(\'fs\').readFileSync(\'/dev/stdin\').toString()).files.map(f => \'./\'+f).join(\' \')\\" | xargs rm -rf","pack":"yarn pack","size":"size-limit"},"sideEffects":false,"size-limit":[{"limit":"27 KB","path":"index.js"}],"dependencies":{"@shopify/app-bridge":"^1.27.1"},"devDependencies":{"@types/react":"^16.7.3","enzyme":"3.11.0"},"peerDependencies":{"react":"^16.0.0"}}')},function(t,e,n){"use strict";var o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var r=o(n(124));e.default=r.default},function(t,e,n){"use strict";var o,r=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=i(n(4)),c=n(5),u=n(6),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.componentDidMount=function(){var t=this.context;this.loading=c.Loading.create(t),null!=this.loading&&this.loading.dispatch(c.Loading.Action.START)},e.prototype.componentWillUnmount=function(){null!=this.loading&&this.loading.dispatch(c.Loading.Action.STOP)},e.prototype.render=function(){return null},e.contextType=u.AppBridgeContext,e}(a.default.Component);e.default=s},function(t,e,n){"use strict";var o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var r=o(n(58)),i=n(58);Object.defineProperty(e,"Props",{enumerable:!0,get:function(){return i.Props}}),e.default=r.default},function(t,e,n){"use strict";var o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var r=o(n(59)),i=n(59);Object.defineProperty(e,"Props",{enumerable:!0,get:function(){return i.Props}}),e.default=r.default},function(t,e,n){"use strict";var o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var r=o(n(61)),i=n(61);Object.defineProperty(e,"Props",{enumerable:!0,get:function(){return i.Props}}),e.default=r.default},function(t,e,n){"use strict";var o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var r=o(n(62)),i=n(62);Object.defineProperty(e,"Props",{enumerable:!0,get:function(){return i.Props}}),e.default=r.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(130);Object.defineProperty(e,"RoutePropagator",{enumerable:!0,get:function(){return o.default}});var r=n(132);Object.defineProperty(e,"useRoutePropagation",{enumerable:!0,get:function(){return r.default}});var i=n(22);Object.defineProperty(e,"LocationOrHref",{enumerable:!0,get:function(){return i.LocationOrHref}})},function(t,e,n){"use strict";var o,r=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=i(n(4)),c=n(6),u=n(22),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.componentDidMount=function(){var t=this.props.location;u.updateHistory(this.context,t)},e.prototype.componentDidUpdate=function(t){var e=t.location,n=this.props.location;n!==e&&u.updateHistory(this.context,n)},e.prototype.render=function(){return null},e.contextType=c.AppBridgeContext,e}(a.default.Component);e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getOrigin=e.getTopWindow=e.getSelfWindow=void 0,e.getSelfWindow=function(){return window.self},e.getTopWindow=function(){return window.top},e.getOrigin=function(){return location.origin}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(4),r=n(23),i=n(22);e.default=function(t){var e=r.useAppBridge();o.useEffect((function(){i.updateHistory(e,t)}),[e,t])}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(134);Object.defineProperty(e,"ClientRouter",{enumerable:!0,get:function(){return o.default}});var r=n(135);Object.defineProperty(e,"useClientRouting",{enumerable:!0,get:function(){return r.default}});var i=n(24);Object.defineProperty(e,"History",{enumerable:!0,get:function(){return i.History}})},function(t,e,n){"use strict";var o,r=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=i(n(4)),c=n(6),u=n(24),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.componentDidMount=function(){var t=this.props.history;this.unsubscribe=u.handleRouteChange(this.context,t)},e.prototype.componentWillUnmount=function(){this.unsubscribe&&this.unsubscribe()},e.prototype.render=function(){return null},e.contextType=c.AppBridgeContext,e}(a.default.Component);e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(4),r=n(23),i=n(24);e.default=function(t){var e=r.useAppBridge();o.useEffect((function(){return i.handleRouteChange(e,t)}),[e,t])}}])}));
\No newline at end of file