shopify 3.93.1 → 3.93.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/dist/assets/hydrogen/starter/CHANGELOG.md +64 -0
  2. package/dist/assets/hydrogen/starter/app/components/Aside.tsx +4 -2
  3. package/dist/assets/hydrogen/starter/app/components/CartMain.tsx +6 -3
  4. package/dist/assets/hydrogen/starter/app/components/CartSummary.tsx +117 -23
  5. package/dist/assets/hydrogen/starter/app/components/Header.tsx +3 -3
  6. package/dist/assets/hydrogen/starter/app/components/PaginatedResourceSection.tsx +24 -4
  7. package/dist/assets/hydrogen/starter/app/components/ProductPrice.tsx +1 -1
  8. package/dist/assets/hydrogen/starter/app/routes/[robots.txt].tsx +14 -53
  9. package/dist/assets/hydrogen/starter/app/routes/_index.tsx +11 -4
  10. package/dist/assets/hydrogen/starter/app/routes/account.$.tsx +1 -1
  11. package/dist/assets/hydrogen/starter/app/routes/account.addresses.tsx +2 -2
  12. package/dist/assets/hydrogen/starter/app/routes/account.profile.tsx +1 -1
  13. package/dist/assets/hydrogen/starter/package.json +5 -5
  14. package/dist/assets/hydrogen/starter/storefrontapi.generated.d.ts +0 -11
  15. package/dist/assets/hydrogen/starter/vite.config.ts +1 -1
  16. package/dist/assets/hydrogen/vite/vite.config.js +1 -1
  17. package/dist/{chunk-WOERFYNW.js → chunk-4QL77VYJ.js} +2 -2
  18. package/dist/{chunk-TCRHJ3ZH.js → chunk-4VZV4LQX.js} +2 -2
  19. package/dist/{chunk-SVYSLNQH.js → chunk-5FCKEHCK.js} +177 -181
  20. package/dist/{chunk-VLDSGLBP.js → chunk-DDTYWTF2.js} +1 -1
  21. package/dist/{chunk-XV44IQDO.js → chunk-FYQIRCLV.js} +1 -1
  22. package/dist/{chunk-T57REQVZ.js → chunk-IG47ZDRU.js} +1 -1
  23. package/dist/{chunk-PB3UDYWH.js → chunk-MX6WWR5F.js} +1 -1
  24. package/dist/{chunk-P3ASN7B5.js → chunk-XVFYDYZA.js} +1 -1
  25. package/dist/{error-handler-54XVSWV5.js → error-handler-GZ2I7BG5.js} +1 -1
  26. package/dist/hooks/postrun.js +1 -1
  27. package/dist/hooks/prerun.js +1 -1
  28. package/dist/{http-proxy-node16-KBILO6A6.js → http-proxy-node16-DSQMBVDI.js} +1 -1
  29. package/dist/index.js +753 -753
  30. package/dist/{lib-EN3PX6IK.js → lib-GGVLMXY5.js} +1 -1
  31. package/dist/{local-JCUIPKND.js → local-WHQ3ZS4K.js} +1 -1
  32. package/dist/{node-package-manager-P7JQBCHZ.js → node-package-manager-6XMPTNUI.js} +1 -1
  33. package/dist/tsconfig.tsbuildinfo +1 -1
  34. package/dist/{ui-XTVYPIVY.js → ui-GZ7DOSHP.js} +1 -1
  35. package/dist/{workerd-3GJRSBJN.js → workerd-LJU6AVMQ.js} +1 -1
  36. package/oclif.manifest.json +2 -3
  37. package/package.json +7 -7
  38. package/dist/assets/hydrogen/starter/app/routes/api.$version.[graphql.json].tsx +0 -14
  39. /package/dist/{morph-6DCXNO2H.js → morph-Q32V442A.js} +0 -0
@@ -1,4 +1,4 @@
1
- import{a as wh,c as Zu,d as b3}from"./chunk-PRKBO42R.js";import{F as w3,G as D1,a as Qr,b as Qt,c as S3,f as x3,g as O3,h as D3,i as x1,j as N3,k as C3,l as R3,p as P3,r as O1}from"./chunk-PB3UDYWH.js";import{A as SH,B as xH,Bb as N1,Bd as Wi,C as m3,Cb as ec,D as OH,Db as C1,Dd as n6,E as DH,Eb as F3,Ed as Z,F as h3,Fb as R1,Fc as M3,G as NH,Gc as B3,Hc as U3,Hd as i6,I as v3,Ic as k3,J as CH,Jc as tt,K as y3,Kc as j3,L as Ih,Lc as Lt,M as E3,Mc as V3,N as _3,Nc as q3,O as RH,Oc as G3,P as g3,Pc as $3,Q as PH,Qc as tc,R as IH,Rc as K3,S as wH,T as LH,U as FH,V as T3,W as A3,Wc as P1,Yc as H3,Zc as z3,a as b1,c as Ai,d as l3,dd as Y3,e as p3,ed as Q3,f as d3,fd as Lh,g as S1,gd as W3,hd as J3,i as mH,ib as MH,id as ts,l as f3,nb as I3,nd as X3,o as hH,od as Fh,p as vH,pd as I1,q as yH,r as EH,rd as Z3,s as _H,sd as e6,t as gH,ud as t6,v as TH,w as AH,wd as Ke,x as bH,xd as r6,yb as L3,yd as me,zb as UH}from"./chunk-WOERFYNW.js";import{s as BH}from"./chunk-P3ASN7B5.js";import{b as Rh,c as Ph,e as s3,f as u3,n as es,p as c3}from"./chunk-NOSKVZWJ.js";import{a as oe,b as V,c as h,d as Xu,e as et,f as ue,g as l}from"./chunk-VPRTJUIN.js";var h6=h(ns=>{"use strict";l();Object.defineProperty(ns,"__esModule",{value:!0});ns.versionInfo=ns.version=void 0;var GH="16.10.0";ns.version=GH;var $H=Object.freeze({major:16,minor:10,patch:0,preReleaseTag:null});ns.versionInfo=$H});var pr=h(kh=>{"use strict";l();Object.defineProperty(kh,"__esModule",{value:!0});kh.devAssert=KH;function KH(t,e){if(!!!t)throw new Error(e)}});var U1=h(jh=>{"use strict";l();Object.defineProperty(jh,"__esModule",{value:!0});jh.isPromise=HH;function HH(t){return typeof t?.then=="function"}});var $n=h(Vh=>{"use strict";l();Object.defineProperty(Vh,"__esModule",{value:!0});Vh.isObjectLike=zH;function zH(t){return typeof t=="object"&&t!==null}});var tr=h(qh=>{"use strict";l();Object.defineProperty(qh,"__esModule",{value:!0});qh.invariant=YH;function YH(t,e){if(!!!t)throw new Error(e??"Unexpected invariant triggered.")}});var k1=h(Gh=>{"use strict";l();Object.defineProperty(Gh,"__esModule",{value:!0});Gh.getLocation=JH;var QH=tr(),WH=/\r\n|[\n\r]/g;function JH(t,e){let r=0,o=1;for(let a of t.body.matchAll(WH)){if(typeof a.index=="number"||(0,QH.invariant)(!1),a.index>=e)break;r=a.index+a[0].length,o+=1}return{line:o,column:e+1-r}}});var $h=h(j1=>{"use strict";l();Object.defineProperty(j1,"__esModule",{value:!0});j1.printLocation=ZH;j1.printSourceLocation=y6;var XH=k1();function ZH(t){return y6(t.source,(0,XH.getLocation)(t.source,t.start))}function y6(t,e){let r=t.locationOffset.column-1,o="".padStart(r)+t.body,a=e.line-1,s=t.locationOffset.line-1,i=e.line+s,n=e.line===1?r:0,u=e.column+n,c=`${t.name}:${i}:${u}
1
+ import{a as wh,c as Zu,d as b3}from"./chunk-PRKBO42R.js";import{F as w3,G as D1,a as Qr,b as Qt,c as S3,f as x3,g as O3,h as D3,i as x1,j as N3,k as C3,l as R3,p as P3,r as O1}from"./chunk-MX6WWR5F.js";import{A as SH,B as xH,Bb as N1,Bd as Wi,C as m3,Cb as ec,D as OH,Db as C1,Dd as n6,E as DH,Eb as F3,Ed as Z,F as h3,Fb as R1,Fc as M3,G as NH,Gc as B3,Hc as U3,Hd as i6,I as v3,Ic as k3,J as CH,Jc as tt,K as y3,Kc as j3,L as Ih,Lc as Lt,M as E3,Mc as V3,N as _3,Nc as q3,O as RH,Oc as G3,P as g3,Pc as $3,Q as PH,Qc as tc,R as IH,Rc as K3,S as wH,T as LH,U as FH,V as T3,W as A3,Wc as P1,Yc as H3,Zc as z3,a as b1,c as Ai,d as l3,dd as Y3,e as p3,ed as Q3,f as d3,fd as Lh,g as S1,gd as W3,hd as J3,i as mH,ib as MH,id as ts,l as f3,nb as I3,nd as X3,o as hH,od as Fh,p as vH,pd as I1,q as yH,r as EH,rd as Z3,s as _H,sd as e6,t as gH,ud as t6,v as TH,w as AH,wd as Ke,x as bH,xd as r6,yb as L3,yd as me,zb as UH}from"./chunk-4QL77VYJ.js";import{s as BH}from"./chunk-XVFYDYZA.js";import{b as Rh,c as Ph,e as s3,f as u3,n as es,p as c3}from"./chunk-NOSKVZWJ.js";import{a as oe,b as V,c as h,d as Xu,e as et,f as ue,g as l}from"./chunk-VPRTJUIN.js";var h6=h(ns=>{"use strict";l();Object.defineProperty(ns,"__esModule",{value:!0});ns.versionInfo=ns.version=void 0;var GH="16.10.0";ns.version=GH;var $H=Object.freeze({major:16,minor:10,patch:0,preReleaseTag:null});ns.versionInfo=$H});var pr=h(kh=>{"use strict";l();Object.defineProperty(kh,"__esModule",{value:!0});kh.devAssert=KH;function KH(t,e){if(!!!t)throw new Error(e)}});var U1=h(jh=>{"use strict";l();Object.defineProperty(jh,"__esModule",{value:!0});jh.isPromise=HH;function HH(t){return typeof t?.then=="function"}});var $n=h(Vh=>{"use strict";l();Object.defineProperty(Vh,"__esModule",{value:!0});Vh.isObjectLike=zH;function zH(t){return typeof t=="object"&&t!==null}});var tr=h(qh=>{"use strict";l();Object.defineProperty(qh,"__esModule",{value:!0});qh.invariant=YH;function YH(t,e){if(!!!t)throw new Error(e??"Unexpected invariant triggered.")}});var k1=h(Gh=>{"use strict";l();Object.defineProperty(Gh,"__esModule",{value:!0});Gh.getLocation=JH;var QH=tr(),WH=/\r\n|[\n\r]/g;function JH(t,e){let r=0,o=1;for(let a of t.body.matchAll(WH)){if(typeof a.index=="number"||(0,QH.invariant)(!1),a.index>=e)break;r=a.index+a[0].length,o+=1}return{line:o,column:e+1-r}}});var $h=h(j1=>{"use strict";l();Object.defineProperty(j1,"__esModule",{value:!0});j1.printLocation=ZH;j1.printSourceLocation=y6;var XH=k1();function ZH(t){return y6(t.source,(0,XH.getLocation)(t.source,t.start))}function y6(t,e){let r=t.locationOffset.column-1,o="".padStart(r)+t.body,a=e.line-1,s=t.locationOffset.line-1,i=e.line+s,n=e.line===1?r:0,u=e.column+n,c=`${t.name}:${i}:${u}
2
2
  `,p=o.split(/\r\n|[\n\r]/g),d=p[a];if(d.length>120){let _=Math.floor(u/80),T=u%80,b=[];for(let R=0;R<d.length;R+=80)b.push(d.slice(R,R+80));return c+v6([[`${i} |`,b[0]],...b.slice(1,_+1).map(R=>["|",R]),["|","^".padStart(T)],["|",b[_+1]]])}return c+v6([[`${i-1} |`,p[a-1]],[`${i} |`,d],["|","^".padStart(u)],[`${i+1} |`,p[a+1]]])}function v6(t){let e=t.filter(([o,a])=>a!==void 0),r=Math.max(...e.map(([o])=>o.length));return e.map(([o,a])=>o.padStart(r)+(a?" "+a:"")).join(`
3
3
  `)}});var ne=h(is=>{"use strict";l();Object.defineProperty(is,"__esModule",{value:!0});is.GraphQLError=void 0;is.formatError=nz;is.printError=rz;var ez=$n(),E6=k1(),_6=$h();function tz(t){let e=t[0];return e==null||"kind"in e||"length"in e?{nodes:e,source:t[1],positions:t[2],path:t[3],originalError:t[4],extensions:t[5]}:e}var Kh=class t extends Error{constructor(e,...r){var o,a,s;let{nodes:i,source:n,positions:u,path:c,originalError:p,extensions:d}=tz(r);super(e),this.name="GraphQLError",this.path=c??void 0,this.originalError=p??void 0,this.nodes=g6(Array.isArray(i)?i:i?[i]:void 0);let _=g6((o=this.nodes)===null||o===void 0?void 0:o.map(b=>b.loc).filter(b=>b!=null));this.source=n??(_==null||(a=_[0])===null||a===void 0?void 0:a.source),this.positions=u??_?.map(b=>b.start),this.locations=u&&n?u.map(b=>(0,E6.getLocation)(n,b)):_?.map(b=>(0,E6.getLocation)(b.source,b.start));let T=(0,ez.isObjectLike)(p?.extensions)?p?.extensions:void 0;this.extensions=(s=d??T)!==null&&s!==void 0?s:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),p!=null&&p.stack?Object.defineProperty(this,"stack",{value:p.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,t):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let e=this.message;if(this.nodes)for(let r of this.nodes)r.loc&&(e+=`
4
4
 
@@ -770,7 +770,7 @@ metadata was removed`},g=le(f,null,null,{redactedPaths:Wb,redactedKeys:E})),g},E
770
770
  `).slice(3).join(`
771
771
  `)},Ja.maybeUseFallbackStack=function(f,E){var g=f.stack.split(`
772
772
  `);return(g.length===1||g.length===2&&/at Error \(native\)/.test(g[1]))&&(f.stack=g[0]+`
773
- `+E),f};var _1={},CK=Ja.getStack;_1={name:"contextualize",load:function(f){var E=function(g,y){var A=CK(),O=bh(f);return O.fallbackStack=A,O.addOnError(y),f._clientContext.run(O,g)};return E}},_1.default=_1;var g1={},RK=Ja.getStack,PK=Ja.maybeUseFallbackStack;g1={name:"intercept",load:function(f){var E=function(g,y){g===void 0&&(g=function(){}),typeof y!="function"&&(y=g,g=function(){});var A=RK();return function(O){if(O){O.stack&&PK(O,A);var C=f.Event.create(O,!0,{severity:"warning",unhandled:!1,severityReason:{type:"callbackErrorIntercept"}},"intercept()",1);f._notify(C,g);return}for(var j=arguments.length,K=new Array(j>1?j-1:0),_e=1;_e<j;_e++)K[_e-1]=arguments[_e];y.apply(void 0,K)}};return E}},g1.default=g1;function T1(){return T1=Object.assign?Object.assign.bind():function(f){for(var E=1;E<arguments.length;E++){var g=arguments[E];for(var y in g)({}).hasOwnProperty.call(g,y)&&(f[y]=g[y])}return f},T1.apply(null,arguments)}var Ju=oe("os"),IK={load:function(f){var E={osName:Ju.platform()+" ("+Ju.arch()+")",osVersion:Ju.release(),totalMemory:Ju.totalmem(),hostname:f._config.hostname,runtimeVersions:{node:process.versions.node}};f._addOnSessionPayload(function(g){g.device=T1({},g.device,E)}),f.addOnError(function(g){g.device=T1({},g.device,E,{freeMemory:Ju.freemem(),time:new Date})},!0)}},n3=oe("path"),wK=n3.join,LK=n3.resolve,i3=function(f){return wK(LK(f),"/")},FK={load:function(f){return f.addOnError(function(E){if(f._config.projectRoot){var g=i3(f._config.projectRoot),y=E.errors.reduce(function(A,O){return A.concat(O.stacktrace)},[]);y.map(function(A){A.inProject=typeof A.file=="string"&&A.file.indexOf(g)===0&&!/\/node_modules\//.test(A.file)})}})}};function Sh(){return Sh=Object.assign?Object.assign.bind():function(f){for(var E=1;E<arguments.length;E++){var g=arguments[E];for(var y in g)({}).hasOwnProperty.call(g,y)&&(f[y]=g[y])}return f},Sh.apply(null,arguments)}function MK(f,E){f.prototype=Object.create(E.prototype),f.prototype.constructor=f,xh(f,E)}function xh(f,E){return xh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(g,y){return g.__proto__=y,g},xh(f,E)}var o3=3,a3=200,BK=oe("fs"),UK=BK.createReadStream,kK=oe("stream"),jK=kK.Writable,VK=B$(),qK=k$(),GK=oe("path"),$K={load:function(f){if(f._config.sendCode){var E=function(g,y){return new Promise(function(A,O){try{if(!g.lineNumber||!g.file)return A(g);var C=GK.resolve(f._config.projectRoot,g.file),j=C+"@"+g.lineNumber;if(j in y)return g.code=y[j],A(g);KK(C,g.lineNumber,function(K,_e){return K||(g.code=y[j]=_e),A(g)})}catch{return A(g)}})};f.addOnError(function(g){return new Promise(function(y,A){var O=Object.create(null),C=g.errors.reduce(function(j,K){return j.concat(K.stacktrace)},[]);zK(C.map(function(j){return function(){return E(j,O)}})).then(y).catch(A)})})}},configSchema:{sendCode:{defaultValue:function(){return!0},validate:function(f){return f===!0||f===!1},message:"should be true or false"}}},KK=function(f,E,g){var y=E-o3,A=E+o3,O=UK(f,{encoding:"utf8"}),C=new qK.LineStream({keepEmptyLines:!0}),j=new HK({start:y,end:A});j.on("done",function(){return O.destroy()}),VK(O,C,j,function(K){if(K&&K.message!=="premature close")return g(K);g(null,j.getCode())})},HK=(function(f){function E(y){var A;return A=f.call(this,Sh({},y,{decodeStrings:!1}))||this,A._start=y.start,A._end=y.end,A._n=0,A._code={},A}MK(E,f);var g=E.prototype;return g._write=function(A,O,C){return this._n++,this._n<this._start?C(null):this._n<=this._end?(this._code[String(this._n)]=A.length<=a3?A:A.substr(0,a3),C(null)):(this.emit("done"),C(null))},g.getCode=function(){return this._code},E})(jK),zK=function(f){return new Promise(function(E,g){var y=[];f.reduce(function(A,O){return A.then(function(C){return y.push(C),O()})},Promise.resolve()).then(function(A){y.push(A)}).then(function(){E(y.slice(1))})})},YK=Ja.maybeUseFallbackStack,Oh,QK={load:function(f){f._config.autoDetectErrors&&f._config.enabledErrorTypes.unhandledExceptions&&(Oh=function(E){var g=f._clientContext&&f._clientContext.getStore(),y=g||f;E.stack&&y.fallbackStack&&YK(E,y.fallbackStack);var A=y.Event.create(E,!1,{severity:"error",unhandled:!0,severityReason:{type:"unhandledException"}},"uncaughtException handler",1);return new Promise(function(O){y._notify(A,function(){},function(C,j){C&&y._logger.error("Failed to send event to Bugsnag"),y._config.onUncaughtException(E,j,y._logger),O()})})},process.prependListener("uncaughtException",Oh))},destroy:function(){process.removeListener("uncaughtException",Oh)}},A1,WK={load:function(f){!f._config.autoDetectErrors||!f._config.enabledErrorTypes.unhandledRejections||(A1=function(E){var g=f._clientContext&&f._clientContext.getStore(),y=g||f,A=!f._config.reportUnhandledPromiseRejectionsAsHandled,O=y.Event.create(E,!1,{severity:"error",unhandled:A,severityReason:{type:"unhandledPromiseRejection"}},"unhandledRejection handler",1);return new Promise(function(C){y._notify(O,function(){},function(j,K){j&&y._logger.error("Failed to send event to Bugsnag"),y._config.onUnhandledRejection(E,K,y._logger),C()})})},process.prependListener?process.prependListener("unhandledRejection",A1):process.on("unhandledRejection",A1))},destroy:function(){process.removeListener("unhandledRejection",A1)}},JK=Dh;function Dh(f){f=f||{},this.ms=f.min||100,this.max=f.max||1e4,this.factor=f.factor||2,this.jitter=f.jitter>0&&f.jitter<=1?f.jitter:0,this.attempts=0}Dh.prototype.duration=function(){var f=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var E=Math.random(),g=Math.floor(E*this.jitter*f);f=(Math.floor(E*10)&1)==0?f-g:f+g}return Math.min(f,this.max)|0},Dh.prototype.reset=function(){this.attempts=0};function XK(f,E){f.prototype=Object.create(E.prototype),f.prototype.constructor=f,Nh(f,E)}function Nh(f,E){return Nh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(g,y){return g.__proto__=y,g},Nh(f,E)}var ZK=10*1e3,eH=oe("events").EventEmitter,tH=(function(f){function E(y){var A;return A=f.call(this)||this,A._sessions=new Map,A._interval=null,A._intervalLength=y||ZK,A._summarize=A._summarize.bind(A),A}XK(E,f);var g=E.prototype;return g.start=function(){this._interval||(this._interval=setInterval(this._summarize,this._intervalLength).unref())},g.stop=function(){clearInterval(this._interval),this._interval=null},g.track=function(A){var O=rH(A.startedAt),C=this._sessions.get(O);return this._sessions.set(O,typeof C>"u"?1:C+1),A},g._summarize=function(){var A=this,O=[];this._sessions.forEach(function(C,j){O.push({startedAt:j,sessionsStarted:C}),A._sessions.delete(j)}),O.length&&this.emit("summary",O)},E})(eH),rH=function(f){var E=new Date(f);return E.setSeconds(0),E.setMilliseconds(0),E.toISOString()},nH={load:function(f){var E=null;f._sessionDelegate={startSession:function(g,y){return E||(E=new tH(g._config.sessionSummaryInterval),E.on("summary",iH(g)),E.start()),g._session=y,g._pausedSession=null,E.track(g._session),g},pauseSession:function(g){g._pausedSession=g._session,g._session=null},resumeSession:function(g){return g._session?g:g._pausedSession?(g._session=g._pausedSession,g._pausedSession=null,g):g.startSession()}}},configSchema:{sessionSummaryInterval:{defaultValue:function(){},validate:function(f){return f===void 0||T()(f)},message:"should be a positive integer"}}},iH=function(f){return function(E){if(f._config.enabledReleaseStages!==null&&!f._config.enabledReleaseStages.includes(f._config.releaseStage)){f._logger.warn("Session not sent due to releaseStage/enabledReleaseStages configuration");return}if(!E.length)return;var g=new JK({min:1e3,max:1e4}),y=10;O(A);function A(C){if(!C){var j=E.reduce(function(K,_e){return K+_e.sessionsStarted},0);return f._logger.debug(j+" session(s) reported")}if(g.attempts===10){f._logger.error("Session delivery failed, max retries exceeded",C);return}f._logger.debug("Session delivery failed, retry #"+(g.attempts+1)+"/"+y,C),setTimeout(function(){return O(A)},g.duration())}function O(C){var j={notifier:f._notifier,device:{},app:{releaseStage:f._config.releaseStage,version:f._config.appVersion,type:f._config.appType},sessionCounts:E},K=vh(f._cbs.sp,j,"onSessionPayload",f._logger);if(K)return f._logger.debug("Session not sent due to onSessionPayload callback"),C(null);f._delivery.sendSession(j,C)}}},oH={load:function(f){f.addOnError(function(E){var g=E.errors.reduce(function(y,A){return y.concat(A.stacktrace)},[]);g.forEach(function(y){typeof y.file=="string"&&(y.file=y.file.replace(/\\/g,"/"))})})}},aH={load:function(f){return f.addOnError(function(E){if(f._config.projectRoot){var g=i3(f._config.projectRoot),y=E.errors.reduce(function(A,O){return A.concat(O.stacktrace)},[]);y.map(function(A){typeof A.file=="string"&&A.file.indexOf(g)===0&&(A.file=A.file.replace(g,""))})}})}},qo={};function Ch(){return Ch=Object.assign?Object.assign.bind():function(f){for(var E=1;E<arguments.length;E++){var g=arguments[E];for(var y in g)({}).hasOwnProperty.call(g,y)&&(f[y]=g[y])}return f},Ch.apply(null,arguments)}var sH="Bugsnag Node",uH="8.8.0",cH="https://github.com/bugsnag/bugsnag-js",lH=oe("async_hooks"),pH=lH.AsyncLocalStorage;m1.__type="nodejs";var dH=Ch({},I.schema,SK),fH=[NK,$K,FK,aH,nH,IK,QK,WK,g1,_1,oH,Ah],_n={_client:null,createClient:function(f){typeof f=="string"&&(f={apiKey:f}),f||(f={});var E=new y1(f,dH,fH,{name:sH,version:uH,url:cH});return Object.keys(y1.prototype).forEach(function(g){var y=E[g];E[g]=function(){var A=E._clientContext&&typeof E._clientContext.getStore=="function"?E._clientContext.getStore():null,O=A||E,C=A?A[g]:y;O._depth+=1;var j=C.apply(O,arguments);return O._depth-=1,j}}),E._clientContext=new pH,E._setDelivery(gK),E._logger.debug("Loaded!"),E},start:function(f){return _n._client?(_n._client._logger.warn("Bugsnag.start() was called more than once. Ignoring."),_n._client):(_n._client=_n.createClient(f),_n._client)},isStarted:function(){return _n._client!=null}};return Object.keys(y1.prototype).forEach(function(f){/^_/.test(f)||(_n[f]=function(){var E=_n._client,g=E&&E._clientContext&&E._clientContext.getStore();if(g&&(E=g),!E)return console.error("Bugsnag."+f+"() was called before Bugsnag.start()");E._depth+=1;var y=E[f].apply(E,arguments);return E._depth-=1,y})}),qo=_n,qo.Client=y1,qo.Event=m1,qo.Session=_h,qo.Breadcrumb=a,qo.default=_n,qo})});var G$=h((yQe,q$)=>{l();q$.exports=V$()});l();l();l();l();l();l();import w1 from"crypto";function o6(t){return w1.createHash("sha1").update(t).digest("hex")}function V4e(t){return w1.createHash("md5").update(t).digest("hex")}function q4e(){return w1.randomUUID()}function Wr(t){return w1.createHash("sha1").update(Buffer.from("6ba7b810-9dad-11d1-80b4-00c04fd430c8".replace(/-/g,""),"hex")).update(t).digest().toString("hex").replace(/(.{8})(.{4})(.{4})(.{4})(.{12})/,"$1-$2-$3-$4-$5")}function Ji(){return process.env}function Go(){let t=Ji();return t[Ai.appAutomationToken]??t[Ai.partnersToken]}function Q4e(){let t=Ji()[l3.backendPort];if(t&&!isNaN(Number(t)))return Number(t)}function a6(){let t=Ji()[Ai.identityToken],e=Ji()[Ai.refreshToken];if(!(!t||!e))return{accessToken:t,refreshToken:e,userId:Wr(t)}}function W4e(t=Ji()){return c3()||b1(t[Ai.json])}function s6(){return b1(Ji()[Ai.neverUsePartnersApi])}function u6(t=Ji()){return b1(t[Ai.skipNetworkLevelRetry])}function Mh(t=Ji()){let e=t[Ai.maxRequestTimeForNetworkCalls];return e&&!isNaN(Number(e))?Number(e):30*1e3}l();function rs(t){let e=new URL(t);return e.searchParams.has("subject_token")&&e.searchParams.set("subject_token","****"),e.searchParams.has("token")&&e.searchParams.set("token","****"),e.toString()}l();l();var Xi="3.93.1";import kH from"https";var Bh=class extends tt{constructor(e,r){let o=r===403?"Ensure you are using the correct account. You can switch with `shopify auth login`":void 0;super(e,o),this.statusCode=r}},L1=class extends Bh{constructor(e,r,o){super(e,r),this.errors=o,this.stack=void 0}};function Zi(t){let e={},r=["token","authorization","subject_token"];return Object.keys(t).forEach(o=>{r.find(a=>o.toLocaleLowerCase().includes(a))===void 0&&(e[o]=t[o])}),Object.keys(e).map(o=>` - ${o}: ${e[o]}`).join(`
773
+ `+E),f};var _1={},CK=Ja.getStack;_1={name:"contextualize",load:function(f){var E=function(g,y){var A=CK(),O=bh(f);return O.fallbackStack=A,O.addOnError(y),f._clientContext.run(O,g)};return E}},_1.default=_1;var g1={},RK=Ja.getStack,PK=Ja.maybeUseFallbackStack;g1={name:"intercept",load:function(f){var E=function(g,y){g===void 0&&(g=function(){}),typeof y!="function"&&(y=g,g=function(){});var A=RK();return function(O){if(O){O.stack&&PK(O,A);var C=f.Event.create(O,!0,{severity:"warning",unhandled:!1,severityReason:{type:"callbackErrorIntercept"}},"intercept()",1);f._notify(C,g);return}for(var j=arguments.length,K=new Array(j>1?j-1:0),_e=1;_e<j;_e++)K[_e-1]=arguments[_e];y.apply(void 0,K)}};return E}},g1.default=g1;function T1(){return T1=Object.assign?Object.assign.bind():function(f){for(var E=1;E<arguments.length;E++){var g=arguments[E];for(var y in g)({}).hasOwnProperty.call(g,y)&&(f[y]=g[y])}return f},T1.apply(null,arguments)}var Ju=oe("os"),IK={load:function(f){var E={osName:Ju.platform()+" ("+Ju.arch()+")",osVersion:Ju.release(),totalMemory:Ju.totalmem(),hostname:f._config.hostname,runtimeVersions:{node:process.versions.node}};f._addOnSessionPayload(function(g){g.device=T1({},g.device,E)}),f.addOnError(function(g){g.device=T1({},g.device,E,{freeMemory:Ju.freemem(),time:new Date})},!0)}},n3=oe("path"),wK=n3.join,LK=n3.resolve,i3=function(f){return wK(LK(f),"/")},FK={load:function(f){return f.addOnError(function(E){if(f._config.projectRoot){var g=i3(f._config.projectRoot),y=E.errors.reduce(function(A,O){return A.concat(O.stacktrace)},[]);y.map(function(A){A.inProject=typeof A.file=="string"&&A.file.indexOf(g)===0&&!/\/node_modules\//.test(A.file)})}})}};function Sh(){return Sh=Object.assign?Object.assign.bind():function(f){for(var E=1;E<arguments.length;E++){var g=arguments[E];for(var y in g)({}).hasOwnProperty.call(g,y)&&(f[y]=g[y])}return f},Sh.apply(null,arguments)}function MK(f,E){f.prototype=Object.create(E.prototype),f.prototype.constructor=f,xh(f,E)}function xh(f,E){return xh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(g,y){return g.__proto__=y,g},xh(f,E)}var o3=3,a3=200,BK=oe("fs"),UK=BK.createReadStream,kK=oe("stream"),jK=kK.Writable,VK=B$(),qK=k$(),GK=oe("path"),$K={load:function(f){if(f._config.sendCode){var E=function(g,y){return new Promise(function(A,O){try{if(!g.lineNumber||!g.file)return A(g);var C=GK.resolve(f._config.projectRoot,g.file),j=C+"@"+g.lineNumber;if(j in y)return g.code=y[j],A(g);KK(C,g.lineNumber,function(K,_e){return K||(g.code=y[j]=_e),A(g)})}catch{return A(g)}})};f.addOnError(function(g){return new Promise(function(y,A){var O=Object.create(null),C=g.errors.reduce(function(j,K){return j.concat(K.stacktrace)},[]);zK(C.map(function(j){return function(){return E(j,O)}})).then(y).catch(A)})})}},configSchema:{sendCode:{defaultValue:function(){return!0},validate:function(f){return f===!0||f===!1},message:"should be true or false"}}},KK=function(f,E,g){var y=E-o3,A=E+o3,O=UK(f,{encoding:"utf8"}),C=new qK.LineStream({keepEmptyLines:!0}),j=new HK({start:y,end:A});j.on("done",function(){return O.destroy()}),VK(O,C,j,function(K){if(K&&K.message!=="premature close")return g(K);g(null,j.getCode())})},HK=(function(f){function E(y){var A;return A=f.call(this,Sh({},y,{decodeStrings:!1}))||this,A._start=y.start,A._end=y.end,A._n=0,A._code={},A}MK(E,f);var g=E.prototype;return g._write=function(A,O,C){return this._n++,this._n<this._start?C(null):this._n<=this._end?(this._code[String(this._n)]=A.length<=a3?A:A.substr(0,a3),C(null)):(this.emit("done"),C(null))},g.getCode=function(){return this._code},E})(jK),zK=function(f){return new Promise(function(E,g){var y=[];f.reduce(function(A,O){return A.then(function(C){return y.push(C),O()})},Promise.resolve()).then(function(A){y.push(A)}).then(function(){E(y.slice(1))})})},YK=Ja.maybeUseFallbackStack,Oh,QK={load:function(f){f._config.autoDetectErrors&&f._config.enabledErrorTypes.unhandledExceptions&&(Oh=function(E){var g=f._clientContext&&f._clientContext.getStore(),y=g||f;E.stack&&y.fallbackStack&&YK(E,y.fallbackStack);var A=y.Event.create(E,!1,{severity:"error",unhandled:!0,severityReason:{type:"unhandledException"}},"uncaughtException handler",1);return new Promise(function(O){y._notify(A,function(){},function(C,j){C&&y._logger.error("Failed to send event to Bugsnag"),y._config.onUncaughtException(E,j,y._logger),O()})})},process.prependListener("uncaughtException",Oh))},destroy:function(){process.removeListener("uncaughtException",Oh)}},A1,WK={load:function(f){!f._config.autoDetectErrors||!f._config.enabledErrorTypes.unhandledRejections||(A1=function(E){var g=f._clientContext&&f._clientContext.getStore(),y=g||f,A=!f._config.reportUnhandledPromiseRejectionsAsHandled,O=y.Event.create(E,!1,{severity:"error",unhandled:A,severityReason:{type:"unhandledPromiseRejection"}},"unhandledRejection handler",1);return new Promise(function(C){y._notify(O,function(){},function(j,K){j&&y._logger.error("Failed to send event to Bugsnag"),y._config.onUnhandledRejection(E,K,y._logger),C()})})},process.prependListener?process.prependListener("unhandledRejection",A1):process.on("unhandledRejection",A1))},destroy:function(){process.removeListener("unhandledRejection",A1)}},JK=Dh;function Dh(f){f=f||{},this.ms=f.min||100,this.max=f.max||1e4,this.factor=f.factor||2,this.jitter=f.jitter>0&&f.jitter<=1?f.jitter:0,this.attempts=0}Dh.prototype.duration=function(){var f=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var E=Math.random(),g=Math.floor(E*this.jitter*f);f=(Math.floor(E*10)&1)==0?f-g:f+g}return Math.min(f,this.max)|0},Dh.prototype.reset=function(){this.attempts=0};function XK(f,E){f.prototype=Object.create(E.prototype),f.prototype.constructor=f,Nh(f,E)}function Nh(f,E){return Nh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(g,y){return g.__proto__=y,g},Nh(f,E)}var ZK=10*1e3,eH=oe("events").EventEmitter,tH=(function(f){function E(y){var A;return A=f.call(this)||this,A._sessions=new Map,A._interval=null,A._intervalLength=y||ZK,A._summarize=A._summarize.bind(A),A}XK(E,f);var g=E.prototype;return g.start=function(){this._interval||(this._interval=setInterval(this._summarize,this._intervalLength).unref())},g.stop=function(){clearInterval(this._interval),this._interval=null},g.track=function(A){var O=rH(A.startedAt),C=this._sessions.get(O);return this._sessions.set(O,typeof C>"u"?1:C+1),A},g._summarize=function(){var A=this,O=[];this._sessions.forEach(function(C,j){O.push({startedAt:j,sessionsStarted:C}),A._sessions.delete(j)}),O.length&&this.emit("summary",O)},E})(eH),rH=function(f){var E=new Date(f);return E.setSeconds(0),E.setMilliseconds(0),E.toISOString()},nH={load:function(f){var E=null;f._sessionDelegate={startSession:function(g,y){return E||(E=new tH(g._config.sessionSummaryInterval),E.on("summary",iH(g)),E.start()),g._session=y,g._pausedSession=null,E.track(g._session),g},pauseSession:function(g){g._pausedSession=g._session,g._session=null},resumeSession:function(g){return g._session?g:g._pausedSession?(g._session=g._pausedSession,g._pausedSession=null,g):g.startSession()}}},configSchema:{sessionSummaryInterval:{defaultValue:function(){},validate:function(f){return f===void 0||T()(f)},message:"should be a positive integer"}}},iH=function(f){return function(E){if(f._config.enabledReleaseStages!==null&&!f._config.enabledReleaseStages.includes(f._config.releaseStage)){f._logger.warn("Session not sent due to releaseStage/enabledReleaseStages configuration");return}if(!E.length)return;var g=new JK({min:1e3,max:1e4}),y=10;O(A);function A(C){if(!C){var j=E.reduce(function(K,_e){return K+_e.sessionsStarted},0);return f._logger.debug(j+" session(s) reported")}if(g.attempts===10){f._logger.error("Session delivery failed, max retries exceeded",C);return}f._logger.debug("Session delivery failed, retry #"+(g.attempts+1)+"/"+y,C),setTimeout(function(){return O(A)},g.duration())}function O(C){var j={notifier:f._notifier,device:{},app:{releaseStage:f._config.releaseStage,version:f._config.appVersion,type:f._config.appType},sessionCounts:E},K=vh(f._cbs.sp,j,"onSessionPayload",f._logger);if(K)return f._logger.debug("Session not sent due to onSessionPayload callback"),C(null);f._delivery.sendSession(j,C)}}},oH={load:function(f){f.addOnError(function(E){var g=E.errors.reduce(function(y,A){return y.concat(A.stacktrace)},[]);g.forEach(function(y){typeof y.file=="string"&&(y.file=y.file.replace(/\\/g,"/"))})})}},aH={load:function(f){return f.addOnError(function(E){if(f._config.projectRoot){var g=i3(f._config.projectRoot),y=E.errors.reduce(function(A,O){return A.concat(O.stacktrace)},[]);y.map(function(A){typeof A.file=="string"&&A.file.indexOf(g)===0&&(A.file=A.file.replace(g,""))})}})}},qo={};function Ch(){return Ch=Object.assign?Object.assign.bind():function(f){for(var E=1;E<arguments.length;E++){var g=arguments[E];for(var y in g)({}).hasOwnProperty.call(g,y)&&(f[y]=g[y])}return f},Ch.apply(null,arguments)}var sH="Bugsnag Node",uH="8.8.0",cH="https://github.com/bugsnag/bugsnag-js",lH=oe("async_hooks"),pH=lH.AsyncLocalStorage;m1.__type="nodejs";var dH=Ch({},I.schema,SK),fH=[NK,$K,FK,aH,nH,IK,QK,WK,g1,_1,oH,Ah],_n={_client:null,createClient:function(f){typeof f=="string"&&(f={apiKey:f}),f||(f={});var E=new y1(f,dH,fH,{name:sH,version:uH,url:cH});return Object.keys(y1.prototype).forEach(function(g){var y=E[g];E[g]=function(){var A=E._clientContext&&typeof E._clientContext.getStore=="function"?E._clientContext.getStore():null,O=A||E,C=A?A[g]:y;O._depth+=1;var j=C.apply(O,arguments);return O._depth-=1,j}}),E._clientContext=new pH,E._setDelivery(gK),E._logger.debug("Loaded!"),E},start:function(f){return _n._client?(_n._client._logger.warn("Bugsnag.start() was called more than once. Ignoring."),_n._client):(_n._client=_n.createClient(f),_n._client)},isStarted:function(){return _n._client!=null}};return Object.keys(y1.prototype).forEach(function(f){/^_/.test(f)||(_n[f]=function(){var E=_n._client,g=E&&E._clientContext&&E._clientContext.getStore();if(g&&(E=g),!E)return console.error("Bugsnag."+f+"() was called before Bugsnag.start()");E._depth+=1;var y=E[f].apply(E,arguments);return E._depth-=1,y})}),qo=_n,qo.Client=y1,qo.Event=m1,qo.Session=_h,qo.Breadcrumb=a,qo.default=_n,qo})});var G$=h((yQe,q$)=>{l();q$.exports=V$()});l();l();l();l();l();l();import w1 from"crypto";function o6(t){return w1.createHash("sha1").update(t).digest("hex")}function V4e(t){return w1.createHash("md5").update(t).digest("hex")}function q4e(){return w1.randomUUID()}function Wr(t){return w1.createHash("sha1").update(Buffer.from("6ba7b810-9dad-11d1-80b4-00c04fd430c8".replace(/-/g,""),"hex")).update(t).digest().toString("hex").replace(/(.{8})(.{4})(.{4})(.{4})(.{12})/,"$1-$2-$3-$4-$5")}function Ji(){return process.env}function Go(){let t=Ji();return t[Ai.appAutomationToken]??t[Ai.partnersToken]}function Q4e(){let t=Ji()[l3.backendPort];if(t&&!isNaN(Number(t)))return Number(t)}function a6(){let t=Ji()[Ai.identityToken],e=Ji()[Ai.refreshToken];if(!(!t||!e))return{accessToken:t,refreshToken:e,userId:Wr(t)}}function W4e(t=Ji()){return c3()||b1(t[Ai.json])}function s6(){return b1(Ji()[Ai.neverUsePartnersApi])}function u6(t=Ji()){return b1(t[Ai.skipNetworkLevelRetry])}function Mh(t=Ji()){let e=t[Ai.maxRequestTimeForNetworkCalls];return e&&!isNaN(Number(e))?Number(e):30*1e3}l();function rs(t){let e=new URL(t);return e.searchParams.has("subject_token")&&e.searchParams.set("subject_token","****"),e.searchParams.has("token")&&e.searchParams.set("token","****"),e.toString()}l();l();var Xi="3.93.2";import kH from"https";var Bh=class extends tt{constructor(e,r){let o=r===403?"Ensure you are using the correct account. You can switch with `shopify auth login`":void 0;super(e,o),this.statusCode=r}},L1=class extends Bh{constructor(e,r,o){super(e,r),this.errors=o,this.stack=void 0}};function Zi(t){let e={},r=["token","authorization","subject_token"];return Object.keys(t).forEach(o=>{r.find(a=>o.toLocaleLowerCase().includes(a))===void 0&&(e[o]=t[o])}),Object.keys(e).map(o=>` - ${o}: ${e[o]}`).join(`
774
774
  `)}function Uh(t){let r={"User-Agent":`Shopify CLI; v=${Xi}`,"Keep-Alive":"timeout=30","Sec-CH-UA-PLATFORM":process.platform,"Content-Type":"application/json",...ts()&&{"X-Shopify-Cli-Employee":"1"}};if(t){let o=t.match(/^shp(at|ua|ca|tka)/)?t:`Bearer ${t}`;r.authorization=o,r["X-Shopify-Access-Token"]=o}return r}async function F1(){return new kH.Agent({rejectUnauthorized:!0,keepAlive:!0})}l();l();var jH=300,M1=1e4;function VH(t,e,r=M1/3){if(t===0)return 0;let o=2**(t-1);return Math.min(e*o,r)}async function*qH(t,e){let r=0;for(;;){let o=VH(r,e);if(!t(o))return{remainingMs:0,iterations:r};await P1(o/1e3),yield o,r++}}async function*c6(t=M1,e=jH){if(t<=0)return{remainingMs:0,iterations:0};let r=Date.now(),o=qH(i=>Date.now()-r+i<=t,e),a=0;for await(let i of o)yield i,a++;let s=Date.now()-r;return{remainingMs:t-s,iterations:a}}l();l();var B1=JSON;l();var l6=t=>t.toUpperCase(),p6=t=>{let e={};return t.forEach((r,o)=>{e[o]=r}),e};l();var d6=(t,e,r)=>t.document?t:{document:t,variables:e,requestHeaders:r,signal:void 0},f6=(t,e,r)=>t.query?t:{query:t,variables:e,requestHeaders:r,signal:void 0},m6=(t,e)=>t.documents?t:{documents:t,requestHeaders:e,signal:void 0};l();var nd=et(g9(),1),T9=t=>{let e,r=t.definitions.filter(o=>o.kind==="OperationDefinition");return r.length===1&&(e=r[0]?.name?.value),e},Ri=t=>{if(typeof t=="string"){let r;try{let o=(0,nd.parse)(t);r=T9(o)}catch{}return{query:t,operationName:r}}let e=T9(t);return{query:(0,nd.print)(t),operationName:e}};l();var Ar=class t extends Error{constructor(e,r){let o=`${t.extractMessage(e)}: ${JSON.stringify({response:e,request:r})}`;super(o),Object.setPrototypeOf(this,t.prototype),this.response=e,this.request=r,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,t)}static extractMessage(e){return e.errors?.[0]?.message??`GraphQL Error (Code: ${e.status})`}};var Eo=et(n8(),1);l();var roe="connection_init",noe="connection_ack",o8="ping",a8="pong",ioe="subscribe",ooe="next",aoe="error",s8="complete",yo=class t{get type(){return this._type}get id(){return this._id}get payload(){return this._payload}constructor(e,r,o){this._type=e,this._payload=r,this._id=o}get text(){let e={type:this.type};return this.id!=null&&this.id!=null&&(e.id=this.id),this.payload!=null&&this.payload!=null&&(e.payload=this.payload),JSON.stringify(e)}static parse(e,r){let{type:o,payload:a,id:s}=JSON.parse(e);return new t(o,r(a),s)}},Ed=class{constructor(e,{onInit:r,onAcknowledged:o,onPing:a,onPong:s}){this.socketState={acknowledged:!1,lastRequestId:0,subscriptions:{}},this.socket=e,e.addEventListener("open",async i=>{this.socketState.acknowledged=!1,this.socketState.subscriptions={},e.send(uoe(r?await r():null).text)}),e.addEventListener("close",i=>{this.socketState.acknowledged=!1,this.socketState.subscriptions={}}),e.addEventListener("error",i=>{console.error(i)}),e.addEventListener("message",i=>{try{let n=soe(i.data);switch(n.type){case noe:{this.socketState.acknowledged?console.warn("Duplicate CONNECTION_ACK message ignored"):(this.socketState.acknowledged=!0,o&&o(n.payload));return}case o8:{a?a(n.payload).then(d=>e.send(i8(d).text)):e.send(i8(null).text);return}case a8:{s&&s(n.payload);return}}if(!this.socketState.acknowledged||n.id===void 0||n.id===null||!this.socketState.subscriptions[n.id])return;let{query:u,variables:c,subscriber:p}=this.socketState.subscriptions[n.id];switch(n.type){case ooe:{!n.payload.errors&&n.payload.data&&p.next&&p.next(n.payload.data),n.payload.errors&&p.error&&p.error(new Ar({...n.payload,status:200},{query:u,variables:c}));return}case aoe:{p.error&&p.error(new Ar({errors:n.payload,status:200},{query:u,variables:c}));return}case s8:{p.complete&&p.complete(),delete this.socketState.subscriptions[n.id];return}}}catch(n){console.error(n),e.close(1006)}e.close(4400,"Unknown graphql-ws message.")})}makeSubscribe(e,r,o,a){let s=(this.socketState.lastRequestId++).toString();return this.socketState.subscriptions[s]={query:e,variables:a,subscriber:o},this.socket.send(loe(s,{query:e,operationName:r,variables:a}).text),()=>{this.socket.send(poe(s).text),delete this.socketState.subscriptions[s]}}rawRequest(e,r){return new Promise((o,a)=>{let s;this.rawSubscribe(e,{next:(i,n)=>s={data:i,extensions:n},error:a,complete:()=>o(s)},r)})}request(e,r){return new Promise((o,a)=>{let s;this.subscribe(e,{next:i=>s=i,error:a,complete:()=>o(s)},r)})}subscribe(e,r,o){let{query:a,operationName:s}=Ri(e);return this.makeSubscribe(a,s,r,o)}rawSubscribe(e,r,o){return this.makeSubscribe(e,void 0,r,o)}ping(e){this.socket.send(coe(e).text)}close(){this.socket.close(1e3)}};Ed.PROTOCOL="graphql-transport-ws";function soe(t,e=r=>r){return yo.parse(t,e)}function uoe(t){return new yo(roe,t)}function coe(t){return new yo(o8,t,void 0)}function i8(t){return new yo(a8,t,void 0)}function loe(t,e){return new yo(ioe,e,t)}function poe(t){return new yo(s8,void 0,t)}var Rs=t=>{let e={};return t&&(typeof Headers<"u"&&t instanceof Headers||Eo&&Eo.Headers&&t instanceof Eo.Headers?e=p6(t):Array.isArray(t)?t.forEach(([r,o])=>{r&&o!==void 0&&(e[r]=o)}):e=t),e},u8=t=>t.replace(/([\s,]|#[^\n\r]+)+/g," ").trim(),doe=t=>{if(!Array.isArray(t.query)){let o=t,a=[`query=${encodeURIComponent(u8(o.query))}`];return t.variables&&a.push(`variables=${encodeURIComponent(o.jsonSerializer.stringify(o.variables))}`),o.operationName&&a.push(`operationName=${encodeURIComponent(o.operationName)}`),a.join("&")}if(typeof t.variables<"u"&&!Array.isArray(t.variables))throw new Error("Cannot create query with given variable type, array expected");let e=t,r=t.query.reduce((o,a,s)=>(o.push({query:u8(a),variables:e.variables?e.jsonSerializer.stringify(e.variables[s]):void 0}),o),[]);return`query=${encodeURIComponent(e.jsonSerializer.stringify(r))}`},foe=t=>async e=>{let{url:r,query:o,variables:a,operationName:s,fetch:i,fetchOptions:n,middleware:u}=e,c={...e.headers},p="",d;t==="POST"?(d=moe(o,a,s,n.jsonSerializer),typeof d=="string"&&(c["Content-Type"]="application/json")):p=doe({query:o,variables:a,operationName:s,jsonSerializer:n.jsonSerializer??B1});let _={method:t,headers:c,body:d,...n},T=r,b=_;if(u){let R=await Promise.resolve(u({..._,url:r,operationName:s,variables:a})),{url:I,...B}=R;T=I,b=B}return p&&(T=`${T}?${p}`),await i(T,b)},_d=class{constructor(e,r={}){this.url=e,this.requestConfig=r,this.rawRequest=async(...o)=>{let[a,s,i]=o,n=f6(a,s,i),{headers:u,fetch:c=Eo.default,method:p="POST",requestMiddleware:d,responseMiddleware:_,...T}=this.requestConfig,{url:b}=this;n.signal!==void 0&&(T.signal=n.signal);let{operationName:R}=Ri(n.query);return t_({url:b,query:n.query,variables:n.variables,headers:{...Rs(r_(u)),...Rs(n.requestHeaders)},operationName:R,fetch:c,method:p,fetchOptions:T,middleware:d}).then(I=>(_&&_(I),I)).catch(I=>{throw _&&_(I),I})}}async request(e,...r){let[o,a]=r,s=d6(e,o,a),{headers:i,fetch:n=Eo.default,method:u="POST",requestMiddleware:c,responseMiddleware:p,...d}=this.requestConfig,{url:_}=this;s.signal!==void 0&&(d.signal=s.signal);let{query:T,operationName:b}=Ri(s.document);return t_({url:_,query:T,variables:s.variables,headers:{...Rs(r_(i)),...Rs(s.requestHeaders)},operationName:b,fetch:n,method:u,fetchOptions:d,middleware:c}).then(R=>(p&&p(R),R.data)).catch(R=>{throw p&&p(R),R})}batchRequests(e,r){let o=m6(e,r),{headers:a,...s}=this.requestConfig;o.signal!==void 0&&(s.signal=o.signal);let i=o.documents.map(({document:u})=>Ri(u).query),n=o.documents.map(({variables:u})=>u);return t_({url:this.url,query:i,variables:n,headers:{...Rs(r_(a)),...Rs(o.requestHeaders)},operationName:void 0,fetch:this.requestConfig.fetch??Eo.default,method:this.requestConfig.method||"POST",fetchOptions:s,middleware:this.requestConfig.requestMiddleware}).then(u=>(this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(u),u.data)).catch(u=>{throw this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(u),u})}setHeaders(e){return this.requestConfig.headers=e,this}setHeader(e,r){let{headers:o}=this.requestConfig;return o?o[e]=r:this.requestConfig.headers={[e]:r},this}setEndpoint(e){return this.url=e,this}},t_=async t=>{let{query:e,variables:r,fetchOptions:o}=t,a=foe(l6(t.method??"post")),s=Array.isArray(t.query),i=await a(t),n=await hoe(i,o.jsonSerializer??B1),u=Array.isArray(n)?!n.some(({data:p})=>!p):!!n.data,c=Array.isArray(n)||!n.errors||Array.isArray(n.errors)&&!n.errors.length||o.errorPolicy==="all"||o.errorPolicy==="ignore";if(i.ok&&c&&u){let{errors:p,...d}=(Array.isArray(n),n),_=o.errorPolicy==="ignore"?d:n;return{...s?{data:_}:_,headers:i.headers,status:i.status}}else{let p=typeof n=="string"?{error:n}:n;throw new Ar({...p,status:i.status,headers:i.headers},{query:e,variables:r})}};var moe=(t,e,r,o)=>{let a=o??B1;if(!Array.isArray(t))return a.stringify({query:t,variables:e,operationName:r});if(typeof e<"u"&&!Array.isArray(e))throw new Error("Cannot create request body with given variable type, array expected");let s=t.reduce((i,n,u)=>(i.push({query:n,variables:e?e[u]:void 0}),i),[]);return a.stringify(s)},hoe=async(t,e)=>{let r;return t.headers.forEach((o,a)=>{a.toLowerCase()==="content-type"&&(r=o)}),r&&(r.toLowerCase().startsWith("application/json")||r.toLowerCase().startsWith("application/graphql+json")||r.toLowerCase().startsWith("application/graphql-response+json"))?e.parse(await t.text()):t.text()},r_=t=>typeof t=="function"?t():t,J5e=(t,...e)=>t.reduce((r,o,a)=>`${r}${o}${a in e?String(e[a]):""}`,"");import{performance as n_}from"perf_hooks";var l8=["admin","storefront-renderer","partners","business-platform","app-management"],voe=1e3,yoe=10,Eoe=new Set(["cache-control","content-type","etag","x-request-id","server-timing","retry-after"]);function c8(t){return Eoe.has(t)}function p8(t){if(t instanceof Error){let e=["socket hang up","econnreset","econnaborted","enotfound","enetunreach","network socket disconnected","etimedout","econnrefused","eai_again","epipe","the operation was aborted","timeout","premature close","getaddrinfo"],r=t.message.toLowerCase(),o=e.some(s=>r.includes(s)),a=/^request to .* failed, reason:\s*$/.test(r);return o||a}return!1}function cDe(t){if(p8(t))return!0;if(t instanceof Error){let e=["certificate","cert","tls","ssl","altnames"],r=t.message.toLowerCase();return e.some(o=>r.includes(o))}return!1}async function _oe(t){if(!t.useNetworkLevelRetry)return t.request();let e;for await(let r of c6(t.maxRetryTimeMs))try{return await t.request()}catch(o){if(e=o,!p8(o))throw o;t.recordCommandRetries&&o_(t.url,`network-retry:${o.message}`),Z(`Retrying request to ${t.url} due to network error ${o}`)}throw e}async function i_(t){let e=n_.now(),r=0,o={},a=rs(t.url),s={};try{s=await _oe(t),s.headers.forEach((n,u)=>{c8(u)&&(o[u]=n)})}catch(n){let u=n_.now();if(r=Math.round(u-e),n instanceof Ar){if(n.response.headers)for(let[p,d]of n.response.headers)c8(p)&&(o[p]=d);let c=Zi(o);if(goe(n)){let p;try{p=o["retry-after"]?Number.parseInt(o["retry-after"],10):void 0}catch{}return{status:"can-retry",clientError:n,duration:r,sanitizedHeaders:c,sanitizedUrl:a,requestId:o["x-request-id"],delayMs:p}}else if(n.response.status===401)return{status:"unauthorized",clientError:n,duration:r,sanitizedHeaders:c,sanitizedUrl:a,requestId:o["x-request-id"],delayMs:500};return{status:"client-error",clientError:n,duration:r,sanitizedHeaders:c,sanitizedUrl:a,requestId:o["x-request-id"]}}return{status:"unknown-error",error:n,duration:r,sanitizedHeaders:Zi(o),sanitizedUrl:a,requestId:o["x-request-id"]}}let i=n_.now();return r=Math.round(i-e),{status:"ok",response:s,duration:r,sanitizedHeaders:Zi(o),sanitizedUrl:a,requestId:o["x-request-id"]}}function goe(t){return t.response.status===429?!0:typeof t.response.errors=="string"?!1:t.response.errors?.some(e=>e.extensions?.code==="429")??!1}async function d8(t,e){let r=await i_(t);switch(Z(`Request to ${r.sanitizedUrl} completed in ${r.duration} ms
775
775
  With response headers:
776
776
  ${r.sanitizedHeaders}