@syncify/cli 0.1.1-beta → 0.1.3-beta

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 (3) hide show
  1. package/dist/cjs.js +24 -24
  2. package/package.json +1 -1
  3. package/readme.md +3 -3
package/dist/cjs.js CHANGED
@@ -1,19 +1,19 @@
1
1
  'use strict';
2
2
 
3
- var Io = require('node-notifier');
3
+ var jo = require('node-notifier');
4
4
  var la = require('axios');
5
5
  var events = require('events');
6
6
  var module$1 = require('module');
7
7
  var da = require('zlib');
8
8
  var perf_hooks = require('perf_hooks');
9
9
  var ha = require('os');
10
- var uo = require('readline');
10
+ var ao = require('readline');
11
11
  var stream = require('stream');
12
12
  var console$1 = require('console');
13
- var bo = require('process');
13
+ var vo = require('process');
14
14
  var path = require('path');
15
15
  var ll = require('cross-spawn');
16
- var Nn = require('fast-glob');
16
+ var Mn = require('fast-glob');
17
17
  var fsExtra = require('fs-extra');
18
18
  require('prompts');
19
19
  var Vu = require('anymatch');
@@ -32,24 +32,24 @@ var url = require('url');
32
32
  var esbuild = require('esbuild');
33
33
  var loadTsconfig = require('load-tsconfig');
34
34
 
35
- var Zu=Object.create;var Bs=Object.defineProperty;var ea=Object.getOwnPropertyDescriptor;var ta=Object.getOwnPropertyNames;var ra=Object.getPrototypeOf,sa=Object.prototype.hasOwnProperty;var Zn=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,s)=>(typeof require<"u"?require:t)[s]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')});var Ne=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Wt=(e,t)=>{for(var s in t)Bs(e,s,{get:t[s],enumerable:!0});},na=(e,t,s,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of ta(t))!sa.call(e,n)&&n!==s&&Bs(e,n,{get:()=>t[n],enumerable:!(r=ea(t,n))||r.enumerable});return e};var Et=(e,t,s)=>(s=e!=null?Zu(ra(e)):{},na(t||!e||!e.__esModule?Bs(s,"default",{value:e,enumerable:!0}):s,e));var fi=Ne((Bp,Ts)=>{var oa=Object.prototype.hasOwnProperty,ce="~";function Vt(){}Object.create&&(Vt.prototype=Object.create(null),new Vt().__proto__||(ce=!1));function ua(e,t,s){this.fn=e,this.context=t,this.once=s||!1;}function ci(e,t,s,r,n){if(typeof s!="function")throw new TypeError("The listener must be a function");var i=new ua(s,r||e,n),o=ce?ce+t:t;return e._events[o]?e._events[o].fn?e._events[o]=[e._events[o],i]:e._events[o].push(i):(e._events[o]=i,e._eventsCount++),e}function Sr(e,t){--e._eventsCount===0?e._events=new Vt:delete e._events[t];}function le(){this._events=new Vt,this._eventsCount=0;}le.prototype.eventNames=function(){var t=[],s,r;if(this._eventsCount===0)return t;for(r in s=this._events)oa.call(s,r)&&t.push(ce?r.slice(1):r);return Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(s)):t};le.prototype.listeners=function(t){var s=ce?ce+t:t,r=this._events[s];if(!r)return [];if(r.fn)return [r.fn];for(var n=0,i=r.length,o=new Array(i);n<i;n++)o[n]=r[n].fn;return o};le.prototype.listenerCount=function(t){var s=ce?ce+t:t,r=this._events[s];return r?r.fn?1:r.length:0};le.prototype.emit=function(t,s,r,n,i,o){var a=ce?ce+t:t;if(!this._events[a])return !1;var u=this._events[a],c=arguments.length,f,d;if(u.fn){switch(u.once&&this.removeListener(t,u.fn,void 0,!0),c){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,s),!0;case 3:return u.fn.call(u.context,s,r),!0;case 4:return u.fn.call(u.context,s,r,n),!0;case 5:return u.fn.call(u.context,s,r,n,i),!0;case 6:return u.fn.call(u.context,s,r,n,i,o),!0}for(d=1,f=new Array(c-1);d<c;d++)f[d-1]=arguments[d];u.fn.apply(u.context,f);}else {var h=u.length,w;for(d=0;d<h;d++)switch(u[d].once&&this.removeListener(t,u[d].fn,void 0,!0),c){case 1:u[d].fn.call(u[d].context);break;case 2:u[d].fn.call(u[d].context,s);break;case 3:u[d].fn.call(u[d].context,s,r);break;case 4:u[d].fn.call(u[d].context,s,r,n);break;default:if(!f)for(w=1,f=new Array(c-1);w<c;w++)f[w-1]=arguments[w];u[d].fn.apply(u[d].context,f);}}return !0};le.prototype.on=function(t,s,r){return ci(this,t,s,r,!1)};le.prototype.once=function(t,s,r){return ci(this,t,s,r,!0)};le.prototype.removeListener=function(t,s,r,n){var i=ce?ce+t:t;if(!this._events[i])return this;if(!s)return Sr(this,i),this;var o=this._events[i];if(o.fn)o.fn===s&&(!n||o.once)&&(!r||o.context===r)&&Sr(this,i);else {for(var a=0,u=[],c=o.length;a<c;a++)(o[a].fn!==s||n&&!o[a].once||r&&o[a].context!==r)&&u.push(o[a]);u.length?this._events[i]=u.length===1?u[0]:u:Sr(this,i);}return this};le.prototype.removeAllListeners=function(t){var s;return t?(s=ce?ce+t:t,this._events[s]&&Sr(this,s)):(this._events=new Vt,this._eventsCount=0),this};le.prototype.off=le.prototype.removeListener;le.prototype.addListener=le.prototype.on;le.prefixed=ce;le.EventEmitter=le;typeof Ts<"u"&&(Ts.exports=le);});var Mi=Ne((rD,Qs)=>{var Ze={};typeof Qs>"u"?window.eastasianwidth=Ze:Qs.exports=Ze;Ze.eastAsianWidth=function(e){var t=e.charCodeAt(0),s=e.length==2?e.charCodeAt(1):0,r=t;return 55296<=t&&t<=56319&&56320<=s&&s<=57343&&(t&=1023,s&=1023,r=t<<10|s,r+=65536),r==12288||65281<=r&&r<=65376||65504<=r&&r<=65510?"F":r==8361||65377<=r&&r<=65470||65474<=r&&r<=65479||65482<=r&&r<=65487||65490<=r&&r<=65495||65498<=r&&r<=65500||65512<=r&&r<=65518?"H":4352<=r&&r<=4447||4515<=r&&r<=4519||4602<=r&&r<=4607||9001<=r&&r<=9002||11904<=r&&r<=11929||11931<=r&&r<=12019||12032<=r&&r<=12245||12272<=r&&r<=12283||12289<=r&&r<=12350||12353<=r&&r<=12438||12441<=r&&r<=12543||12549<=r&&r<=12589||12593<=r&&r<=12686||12688<=r&&r<=12730||12736<=r&&r<=12771||12784<=r&&r<=12830||12832<=r&&r<=12871||12880<=r&&r<=13054||13056<=r&&r<=19903||19968<=r&&r<=42124||42128<=r&&r<=42182||43360<=r&&r<=43388||44032<=r&&r<=55203||55216<=r&&r<=55238||55243<=r&&r<=55291||63744<=r&&r<=64255||65040<=r&&r<=65049||65072<=r&&r<=65106||65108<=r&&r<=65126||65128<=r&&r<=65131||110592<=r&&r<=110593||127488<=r&&r<=127490||127504<=r&&r<=127546||127552<=r&&r<=127560||127568<=r&&r<=127569||131072<=r&&r<=194367||177984<=r&&r<=196605||196608<=r&&r<=262141?"W":32<=r&&r<=126||162<=r&&r<=163||165<=r&&r<=166||r==172||r==175||10214<=r&&r<=10221||10629<=r&&r<=10630?"Na":r==161||r==164||167<=r&&r<=168||r==170||173<=r&&r<=174||176<=r&&r<=180||182<=r&&r<=186||188<=r&&r<=191||r==198||r==208||215<=r&&r<=216||222<=r&&r<=225||r==230||232<=r&&r<=234||236<=r&&r<=237||r==240||242<=r&&r<=243||247<=r&&r<=250||r==252||r==254||r==257||r==273||r==275||r==283||294<=r&&r<=295||r==299||305<=r&&r<=307||r==312||319<=r&&r<=322||r==324||328<=r&&r<=331||r==333||338<=r&&r<=339||358<=r&&r<=359||r==363||r==462||r==464||r==466||r==468||r==470||r==472||r==474||r==476||r==593||r==609||r==708||r==711||713<=r&&r<=715||r==717||r==720||728<=r&&r<=731||r==733||r==735||768<=r&&r<=879||913<=r&&r<=929||931<=r&&r<=937||945<=r&&r<=961||963<=r&&r<=969||r==1025||1040<=r&&r<=1103||r==1105||r==8208||8211<=r&&r<=8214||8216<=r&&r<=8217||8220<=r&&r<=8221||8224<=r&&r<=8226||8228<=r&&r<=8231||r==8240||8242<=r&&r<=8243||r==8245||r==8251||r==8254||r==8308||r==8319||8321<=r&&r<=8324||r==8364||r==8451||r==8453||r==8457||r==8467||r==8470||8481<=r&&r<=8482||r==8486||r==8491||8531<=r&&r<=8532||8539<=r&&r<=8542||8544<=r&&r<=8555||8560<=r&&r<=8569||r==8585||8592<=r&&r<=8601||8632<=r&&r<=8633||r==8658||r==8660||r==8679||r==8704||8706<=r&&r<=8707||8711<=r&&r<=8712||r==8715||r==8719||r==8721||r==8725||r==8730||8733<=r&&r<=8736||r==8739||r==8741||8743<=r&&r<=8748||r==8750||8756<=r&&r<=8759||8764<=r&&r<=8765||r==8776||r==8780||r==8786||8800<=r&&r<=8801||8804<=r&&r<=8807||8810<=r&&r<=8811||8814<=r&&r<=8815||8834<=r&&r<=8835||8838<=r&&r<=8839||r==8853||r==8857||r==8869||r==8895||r==8978||9312<=r&&r<=9449||9451<=r&&r<=9547||9552<=r&&r<=9587||9600<=r&&r<=9615||9618<=r&&r<=9621||9632<=r&&r<=9633||9635<=r&&r<=9641||9650<=r&&r<=9651||9654<=r&&r<=9655||9660<=r&&r<=9661||9664<=r&&r<=9665||9670<=r&&r<=9672||r==9675||9678<=r&&r<=9681||9698<=r&&r<=9701||r==9711||9733<=r&&r<=9734||r==9737||9742<=r&&r<=9743||9748<=r&&r<=9749||r==9756||r==9758||r==9792||r==9794||9824<=r&&r<=9825||9827<=r&&r<=9829||9831<=r&&r<=9834||9836<=r&&r<=9837||r==9839||9886<=r&&r<=9887||9918<=r&&r<=9919||9924<=r&&r<=9933||9935<=r&&r<=9953||r==9955||9960<=r&&r<=9983||r==10045||r==10071||10102<=r&&r<=10111||11093<=r&&r<=11097||12872<=r&&r<=12879||57344<=r&&r<=63743||65024<=r&&r<=65039||r==65533||127232<=r&&r<=127242||127248<=r&&r<=127277||127280<=r&&r<=127337||127344<=r&&r<=127386||917760<=r&&r<=917999||983040<=r&&r<=1048573||1048576<=r&&r<=1114109?"A":"N"};Ze.characterLength=function(e){var t=this.eastAsianWidth(e);return t=="F"||t=="W"||t=="A"?2:1};function Ni(e){return e.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}Ze.length=function(e){for(var t=Ni(e),s=0,r=0;r<t.length;r++)s=s+this.characterLength(t[r]);return s};Ze.slice=function(e,t,s){textLen=Ze.length(e),t=t||0,s=s||1,t<0&&(t=textLen+t),s<0&&(s=textLen+s);for(var r="",n=0,i=Ni(e),o=0;o<i.length;o++){var a=i[o],u=Ze.length(a);if(n>=t-(u==2?1:0))if(n+u<=s)r+=a;else break;n+=u;}return r};});var Li=Ne((sD,qi)=>{qi.exports=function(){return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g};});var so=Ne(Mr=>{Object.defineProperty(Mr,"__esModule",{value:!0});var en=e=>{let[,t]=/([a-f\d]{3,6})/i.exec(e)||[],s=t?t.length:0;if(s===3)t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2];else if(s!==6)return [0,0,0];let r=parseInt(t,16);return [r>>16&255,r>>8&255,255&r]},et=(e,t,s)=>t>e?t:e>s?s:e,Aa=(e,t,s)=>{if(t==="")return e;let r=e.indexOf(t);if(r<0)return e;let n=t.length,i=0,o="";for(;~r;)o+=e.slice(i,r)+s,i=r+n,r=e.indexOf(t,i);return o+e.slice(i)},Zi={open:"",close:""},C=(e=>{let t=w=>!!o.find(B=>w.test(B)),s=e||(typeof process<"u"?process:{}),{stdout:r,platform:n}=s,i=s.env||{},o=s.argv||[],a="FORCE_COLOR"in i,u=i.FORCE_COLOR,c=u==="true"||parseInt(u)>0,f="NO_COLOR"in i||a&&!c||t(/^-{1,2}(no-color|color=false|color=never)$/),d=a&&c||t(/^-{1,2}(color|color=true|color=always)$/),h=r&&"isTTY"in r&&/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(i.TERM);return !f&&(d||h||n==="win32"||"CI"in i)})()?(e,t)=>({open:`\x1B[${e}m`,close:`\x1B[${t}m`}):()=>Zi,tn=(e,t,s)=>C(`38;2;${e};${t};${s}`,39),Ki=(e,t,s)=>C(`48;2;${e};${t};${s}`,49),$a={visible:Zi,reset:C(0,0),inverse:C(7,27),hidden:C(8,28),bold:C(1,22),dim:C(2,22),faint:C(2,22),italic:C(3,23),underline:C(4,24),doubleUnderline:C(21,24),strikethrough:C(9,29),strike:C(9,29),frame:C(51,54),encircle:C(52,54),overline:C(53,55),black:C(30,39),red:C(31,39),green:C(32,39),yellow:C(33,39),blue:C(34,39),magenta:C(35,39),cyan:C(36,39),white:C(37,39),grey:C(90,39),gray:C(90,39),blackBright:C(90,39),redBright:C(91,39),greenBright:C(92,39),yellowBright:C(93,39),blueBright:C(94,39),magentaBright:C(95,39),cyanBright:C(96,39),whiteBright:C(97,39),bgBlack:C(40,49),bgRed:C(41,49),bgGreen:C(42,49),bgYellow:C(43,49),bgBlue:C(44,49),bgMagenta:C(45,49),bgCyan:C(46,49),bgWhite:C(47,49),bgBlackBright:C(100,49),bgRedBright:C(101,49),bgGreenBright:C(102,49),bgYellowBright:C(103,49),bgBlueBright:C(104,49),bgMagentaBright:C(105,49),bgCyanBright:C(106,49),bgWhiteBright:C(107,49)},{defineProperty:Ta,defineProperties:_a,setPrototypeOf:eo}=Object,ka=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g,Ra=/(\r*\n)/g,to=function(){let e=t=>t;return e.strip=t=>t.replace(ka,""),e.extend=t=>{for(let s in t){let r=t[s],n=r.open!=null?r:tn(...en(r));We[s]={get(){let i=ro(this,n);return Ta(this,s,{value:i}),i}};}rn=_a(()=>{},We),eo(e,rn);},e.extend($a),e},ro=({props:e},{open:t,close:s})=>{let r=(o,...a)=>Pa(o,a,r.props),n=t,i=s;return e!==void 0&&(n=e.openStack+t,i=s+e.closeStack),eo(r,rn),r.props={open:t,close:s,openStack:n,closeStack:i,parent:e},r.open=n,r.close=i,r},Pa=(e,t,s)=>{if(!e)return "";let{openStack:r,closeStack:n}=s,i=e.raw!=null?String.raw(e,...t):e;if(~i.indexOf("\x1B"))for(;s!==void 0;)i=Aa(i,s.close,s.open),s=s.parent;return ~i.indexOf(`
36
- `)&&(i=i.replace(Ra,n+"$1"+r)),r+i+n},Xi={ansi:e=>(t=>C(`38;5;${t}`,39))(et(e,0,255)),bgAnsi:e=>(t=>C(`48;5;${t}`,49))(et(e,0,255)),hex:e=>tn(...en(e)),bgHex:e=>Ki(...en(e)),rgb:(e,t,s)=>tn(et(e,0,255),et(t,0,255),et(s,0,255)),bgRgb:(e,t,s)=>Ki(et(e,0,255),et(t,0,255),et(s,0,255))},We={},rn;for(let e in Xi)We[e]={get(){return (...t)=>ro(this,Xi[e](...t))}};We.ansi256=We.fg=We.ansi,We.bgAnsi256=We.bg=We.bgAnsi;var Oa=new to;Mr.Ansis=to,Mr.default=Oa;});var io=Ne((mD,sn)=>{var no=so();sn.exports=no.default;sn.exports.Ansis=no.Ansis;});var Do=Ne((RD,mn)=>{var po=(e,t)=>{for(let s of Reflect.ownKeys(t))Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(t,s));return e};mn.exports=po;mn.exports.default=po;});var ho=Ne((PD,Jr)=>{var rl=Do(),Hr=new WeakMap,mo=(e,t={})=>{if(typeof e!="function")throw new TypeError("Expected a function");let s,r=0,n=e.displayName||e.name||"<anonymous>",i=function(...o){if(Hr.set(i,++r),r===1)s=e.apply(this,o),e=null;else if(t.throw===!0)throw new Error(`Function \`${n}\` can only be called once`);return s};return rl(i,e),Hr.set(i,r),i};Jr.exports=mo;Jr.exports.default=mo;Jr.exports.callCount=e=>{if(!Hr.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return Hr.get(e)};});var go=Ne((OD,Yr)=>{Yr.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];process.platform!=="win32"&&Yr.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&Yr.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED");});var Eo=Ne((ID,Tt)=>{var H=global.process,dt=function(e){return e&&typeof e=="object"&&typeof e.removeListener=="function"&&typeof e.emit=="function"&&typeof e.reallyExit=="function"&&typeof e.listeners=="function"&&typeof e.kill=="function"&&typeof e.pid=="number"&&typeof e.on=="function"};dt(H)?(yo=Zn("assert"),At=go(),Fo=/^win/i.test(H.platform),lr=Zn("events"),typeof lr!="function"&&(lr=lr.EventEmitter),H.__signal_exit_emitter__?ue=H.__signal_exit_emitter__:(ue=H.__signal_exit_emitter__=new lr,ue.count=0,ue.emitted={}),ue.infinite||(ue.setMaxListeners(1/0),ue.infinite=!0),Tt.exports=function(e,t){if(!dt(global.process))return function(){};yo.equal(typeof e,"function","a callback must be provided for exit handler"),$t===!1&&dn();var s="exit";t&&t.alwaysLast&&(s="afterexit");var r=function(){ue.removeListener(s,e),ue.listeners("exit").length===0&&ue.listeners("afterexit").length===0&&Qr();};return ue.on(s,e),r},Qr=function(){!$t||!dt(global.process)||($t=!1,At.forEach(function(t){try{H.removeListener(t,Kr[t]);}catch{}}),H.emit=Xr,H.reallyExit=hn,ue.count-=1);},Tt.exports.unload=Qr,ht=function(t,s,r){ue.emitted[t]||(ue.emitted[t]=!0,ue.emit(t,s,r));},Kr={},At.forEach(function(e){Kr[e]=function(){if(!!dt(global.process)){var s=H.listeners(e);s.length===ue.count&&(Qr(),ht("exit",null,e),ht("afterexit",null,e),Fo&&e==="SIGHUP"&&(e="SIGINT"),H.kill(H.pid,e));}};}),Tt.exports.signals=function(){return At},$t=!1,dn=function(){$t||!dt(global.process)||($t=!0,ue.count+=1,At=At.filter(function(t){try{return H.on(t,Kr[t]),!0}catch{return !1}}),H.emit=Co,H.reallyExit=xo);},Tt.exports.load=dn,hn=H.reallyExit,xo=function(t){!dt(global.process)||(H.exitCode=t||0,ht("exit",H.exitCode,null),ht("afterexit",H.exitCode,null),hn.call(H,H.exitCode));},Xr=H.emit,Co=function(t,s){if(t==="exit"&&dt(global.process)){s!==void 0&&(H.exitCode=s);var r=Xr.apply(this,arguments);return ht("exit",H.exitCode,null),ht("afterexit",H.exitCode,null),r}else return Xr.apply(this,arguments)}):Tt.exports=function(){return function(){}};var yo,At,Fo,lr,ue,Qr,ht,Kr,$t,dn,hn,xo,Xr,Co;});function oe(e){if(e===null)return "Null";if(e===void 0)return "Undefined";if(Number.isNaN(e))return "NaN";let t=Object.prototype.toString.call(e).slice(8,-1);return t==="AsyncFunction"?"Promise":t}var{isArray:ze}=Array;function wt(e){return ze(e)?e.length>0:oe(e)==="Object"?Object.keys(e).length>0:Boolean(e)}function St(...e){let t=0;for(;t<e.length;){let s=e[t];if(oe(s)==="Function"){if(wt(s()))return !1}else if(wt(s))return !1;t++;}return !0}function De(...e){let t=0;for(;t<e.length;){let s=e[t];if(oe(s)==="Function"){if(wt(s()))return !0}else if(wt(s))return !0;t++;}return !1}function Fr(e,t="."){return typeof e=="string"?e.split(t):e}function bs(e,t){if(arguments.length===1)return i=>bs(e,i);if(t==null)return;let s=t,r=0,n=Fr(e);for(;r<n.length;){if(s==null||s[n[r]]===null)return;s=s[n[r]],r++;}return s}function Ut(e,t){if(!ze(t))throw new Error(`Cannot read property 'indexOf' of ${t}`);let s=oe(e);if(!["Object","Array","NaN","RegExp"].includes(s))return t.indexOf(e);let r=-1,n=-1,{length:i}=t;for(;++r<i&&n===-1;)xr(t[r],e)&&(n=r);return n}function ei(e){let t=[],s;for(;!(s=e.next()).done;)t.push(s.value);return t}function ia(e,t){if(e.size!==t.size)return !1;let s=ei(e.values()),r=ei(t.values());return s.filter(i=>Ut(i,r)===-1).length===0}function ti(e){let t=e.__proto__.toString();return ["Error","TypeError"].includes(t)?[t,e.message]:[]}function ri(e){return e.toDateString?[!0,e.getTime()]:[!1]}function si(e){return e.constructor!==RegExp?[!1]:[!0,e.toString()]}function xr(e,t){if(arguments.length===1)return c=>xr(e,c);let s=oe(e);if(s!==oe(t))return !1;if(s==="Function")return e.name===void 0?!1:e.name===t.name;if(["NaN","Undefined","Null"].includes(s))return !0;if(s==="Number")return Object.is(-0,e)!==Object.is(-0,t)?!1:e.toString()===t.toString();if(["String","Boolean"].includes(s))return e.toString()===t.toString();if(s==="Array"){let c=Array.from(e),f=Array.from(t);if(c.toString()!==f.toString())return !1;let d=!0;return c.forEach((h,w)=>{d&&h!==f[w]&&!xr(h,f[w])&&(d=!1);}),d}let r=si(e),n=si(t);if(r[0])return n[0]?r[1]===n[1]:!1;if(n[0])return !1;let i=ri(e),o=ri(t);if(i[0])return o[0]?i[1]===o[1]:!1;if(o[0])return !1;let a=ti(e),u=ti(t);if(a[0])return u[0]?a[0]===u[0]&&a[1]===u[1]:!1;if(s==="Set")return ia(e,t);if(s==="Object"){let c=Object.keys(e);if(c.length!==Object.keys(t).length)return !1;let f=!0;return c.forEach(d=>{if(f){let h=e[d],w=t[d];h!==w&&!xr(h,w)&&(f=!1);}}),f}return !1}function vs(e,t){if(arguments.length===1)return s=>vs(e,s);if(typeof t=="string")return t.includes(e);if(!t)throw new TypeError(`Cannot read property 'indexOf' of ${t}`);return ze(t)?Ut(e,t)>-1:!1}async function ni(e,t){if(ze(t)){let r=[],n=0;for(let i of t)r.push(await e(i,n++));return r}let s={};for(let r in t)s[r]=await e(t[r],r);return s}function He(e,t){return arguments.length===1?async s=>ni(e,s):new Promise((s,r)=>{ni(e,t).then(s).catch(r);})}function X(e,t){return arguments.length===1?s=>X(e,s):oe(t)===e}async function ii(e,t){let s=t.map((r,n)=>e(r,n));return Promise.all(s)}function Je(e,t){return arguments.length===1?async s=>ii(e,s):new Promise((s,r)=>{ii(e,t).then(s).catch(r);})}function As(e,t){if(arguments.length===1)return n=>As(e,n);if(t==null)return;let s=Fr(e,","),r={};for(let n in t)s.includes(n)||(r[n]=t[n]);return r}var Cr=class{constructor(){this.set=new Set,this.items={};}checkUniqueness(t){let s=oe(t);if(["Null","Undefined","NaN"].includes(s))return s in this.items?!1:(this.items[s]=!0,!0);if(!["Object","Array"].includes(s)){let r=this.set.size;return this.set.add(t),this.set.size!==r}return s in this.items?Ut(t,this.items[s])===-1?(this.items[s].push(t),!0):!1:(this.items[s]=[t],!0)}};function Er(e){let t=new Cr,s=[];return e.forEach(r=>{t.checkUniqueness(r)&&s.push(r);}),s}function m(e,t){return arguments.length===1?s=>m(e,s):t?t.hasOwnProperty(e):!1}function Re(e,t){return arguments.length===1?s=>Re(e,s):bs(e,t)!==void 0}function me(e){let t=oe(e);return ["Undefined","NaN","Number","Null"].includes(t)?!1:e?t==="Object"?Object.keys(e).length===0:t==="Array"?e.length===0:!1:!0}function M(e){return e==null}function oi(e){return typeof e=="string"?e[e.length-1]||"":e[e.length-1]}var{error:Q,log:A,warn:ui}=console,E="",de=" ",Me=e=>de.repeat(e),y=`
37
- `,_=e=>y.repeat(e);var v=Object.assign,Ce=Object.defineProperty,we=Object.keys,$s=Object.values,Ye=Array.from;Buffer.from;var b=Array.isArray,he=Buffer.isBuffer,q=X("Undefined"),j=X("Object"),ge=X("Boolean"),ai=X("RegExp"),wr=X("Number"),P=X("String"),fe=X("Function");X("Async");var D={};Wt(D,{build:()=>fl,changed:()=>gl,clear:()=>Dt,deleted:()=>El,err:()=>pl,external:()=>ml,failed:()=>Al,hook:()=>dl,ignored:()=>bl,invalid:()=>vl,minified:()=>wl,nwl:()=>jo,out:()=>A,process:()=>No,reloaded:()=>Sl,retrying:()=>Cl,skipped:()=>Bl,spawn:()=>Tl,start:()=>Po,syncing:()=>Fl,throws:()=>$l,transform:()=>xl,unhook:()=>hl,update:()=>_o,upload:()=>yl,write:()=>Dl});var pe={},re={current:null,count:0,process:{}},V={json:{assets:!0,config:!0,locales:!0,metafields:!0,templates:!0,exclude:[]},script:{minifySyntax:!0,minifyIdentifiers:!0,minifyWhitespace:!0,mangleProps:void 0,legalComments:"none",mangleQuoted:!1,keepNames:!1},liquid:{minifyScript:!0,minifyStyle:!0,minifySchema:!0,removeComments:!0,stripDashes:!0,exclude:[]},html:{caseSensitive:!1,collapseBooleanAttributes:!1,collapseInlineTagWhitespace:!1,conservativeCollapse:!1,keepClosingSlash:!1,noNewlinesBeforeTagClose:!1,preventAttributesEscaping:!1,removeEmptyAttributes:!1,removeEmptyElements:!1,removeOptionalTags:!1,removeRedundantAttributes:!0,removeScriptTypeAttributes:!0,removeStyleLinkTypeAttributes:!0,useShortDoctype:!0,collapseWhitespace:!0,continueOnParseError:!0,removeComments:!0,trimCustomFragments:!0,ignoreCustomFragments:[/(?<=\bstyle\b=["']\s?)[\s\S]*?(?="[\s\n>]?)/,/<style[\s\S]*?<\/style>/,/<script[\s\S]*?<\/script>/,/{%-?\s*liquid[\s\S]*?%}/,/{%[\s\S]*?%}/]}},L={json:{indent:2,useTab:!1,crlf:!1,exclude:null},postcss:{installed:!1,loaded:!1,file:!1,config:[]},sass:{installed:!1,loaded:!1,file:!1,config:{warnings:!0,style:"compressed",sourcemap:!0,include:["node_modules"]}},esbuild:{installed:!1,loaded:!1,file:!1,config:{bundle:!0,format:"esm",splitting:!1,sourcemap:!0,write:!1,logLevel:"silent",plugins:[]}},sharp:{installed:!1,required:!1,loaded:!1,file:!1,config:{}},sprite:{installed:!1,loaded:!1,file:!1,config:{mode:{inline:!0,symbol:{example:!1}},shape:{transform:["svgo"],id:{generator:"svg-%s"}},svg:{xmlDeclaration:!1,doctypeDeclaration:!1,dimensionAttributes:!1,namespaceClassnames:!1,namespaceIDs:!1}}},svgo:{installed:!1,loaded:!1,file:!1,config:{multipass:!0,datauri:"enc",js2svg:{indent:2,pretty:!0},plugins:["preset-default","prefixIds"]}}},te={input:"source",output:"theme",import:"import",export:"export",config:".",hot:!1,stores:null,spawn:{build:null,watch:null},logger:{clear:!0,silent:!1,stats:!0,warnings:!0},paths:{assets:"assets/*",config:"config/*.json",layout:"layout/*.liquid",locales:"locales/*.json",sections:"sections/**/*.liquid",snippets:"snippets/*.liquid",metafields:"metafields/**/*.json",redirects:"redirects.yaml",pages:["pages/*.html","pages/*.md"],templates:["templates/customers/*.liquid","templates/customers/*.json"],customers:["templates/customers/*.liquid","templates/customers/*.json"]},views:{sections:{prefixDir:!1,separator:"-",global:[]},snippets:{prefixDir:!1,separator:"-",global:[]},pages:{author:"",language:"html"}},transforms:{svg:null,style:null,script:null},minify:{json:!1,views:!1,script:!1}},Bt={onBuild:[],onChange:[],onReload:[],onTransform:[],onWatch:[]},l={version:null,cli:!1,cwd:null,silent:!1,prod:!1,dev:!0,hot:{inject:!0,server:3e3,socket:8089,method:"hot",scroll:"preserved",layouts:["theme.liquid"],label:"visible",renderer:"{% render 'hot.js', server: 3000, socket: 8089 %}",snippet:null,output:null,alive:{}},dirs:{},sync:{themes:[],stores:[]},mode:{build:!1,prompt:!1,watch:!1,clean:!1,upload:!1,download:!1,metafields:!1,minify:!1,hot:!1,pages:!1,pull:!1,push:!1,vsc:!1,script:!1,image:!1,style:!1,svg:!1,redirects:!1,export:!1},spawn:{paths:new Set,invoked:!1,commands:{}},watch:new Set,logger:{},paths:{transforms:new Map},section:{prefixDir:!1,separator:"-",global:[]},cmd:{},json:{},page:{export:{quotes:"\u201C\u201D\u2018\u2019",html:!0,linkify:!1,typographer:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-"},import:{codeBlockStyle:"fenced",emDelimiter:"_",fence:"```",headingStyle:"atx",hr:"***",linkReferenceStyle:"full",linkStyle:"inlined",strongDelimiter:"**",bulletListMarker:"-"}},image:[],style:[],script:[],svg:[],set config(e){v(te,e);},get config(){return te},get processor(){return L},minify:{json:!1,views:!1,script:!1,get options(){return V}}};var xi=Et(fi(),1);var zt=class extends Error{constructor(t){super(t),this.name="TimeoutError";}},_s=class extends Error{constructor(t){super(),this.name="AbortError",this.message=t;}},pi=e=>globalThis.DOMException===void 0?new _s(e):new DOMException(e),Di=e=>{let t=e.reason===void 0?pi("This operation was aborted."):e.reason;return t instanceof Error?t:pi(t)};function ks(e,t,s,r){let n,i=new Promise((o,a)=>{if(typeof t!="number"||Math.sign(t)!==1)throw new TypeError(`Expected \`milliseconds\` to be a positive number, got \`${t}\``);if(t===Number.POSITIVE_INFINITY){o(e);return}if(r={customTimers:{setTimeout,clearTimeout},...r},r.signal){let{signal:u}=r;u.aborted&&a(Di(u)),u.addEventListener("abort",()=>{a(Di(u));});}n=r.customTimers.setTimeout.call(void 0,()=>{if(typeof s=="function"){try{o(s());}catch(f){a(f);}return}let u=typeof s=="string"?s:`Promise timed out after ${t} milliseconds`,c=s instanceof Error?s:new zt(u);typeof e.cancel=="function"&&e.cancel(),a(c);},t),(async()=>{try{o(await e);}catch(u){a(u);}finally{r.customTimers.clearTimeout.call(void 0,n);}})();});return i.clear=()=>{clearTimeout(n),n=void 0;},i}function Rs(e,t,s){let r=0,n=e.length;for(;n>0;){let i=Math.trunc(n/2),o=r+i;s(e[o],t)<=0?(r=++o,n-=i+1):n=i;}return r}var ut=function(e,t,s,r){if(s==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return s==="m"?r:s==="a"?r.call(e):r?r.value:t.get(e)},qe,Ht=class{constructor(){qe.set(this,[]);}enqueue(t,s){s={priority:0,...s};let r={priority:s.priority,run:t};if(this.size&&ut(this,qe,"f")[this.size-1].priority>=s.priority){ut(this,qe,"f").push(r);return}let n=Rs(ut(this,qe,"f"),r,(i,o)=>o.priority-i.priority);ut(this,qe,"f").splice(n,0,r);}dequeue(){let t=ut(this,qe,"f").shift();return t?.run}filter(t){return ut(this,qe,"f").filter(s=>s.priority===t.priority).map(s=>s.run)}get size(){return ut(this,qe,"f").length}};qe=new WeakMap;var J=function(e,t,s,r,n){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?n.call(e,s):n?n.value=s:t.set(e,s),s},F=function(e,t,s,r){if(s==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return s==="m"?r:s==="a"?r.call(e):r?r.value:t.get(e)},Z,Yt,Qt,Ke,Tr,Kt,Br,Se,Jt,ye,br,Fe,Xt,Qe,vr,mi,di,Fi,hi,gi,yi,Ar,Ps,Os,_r,$r,aa=new zt,Is=class extends Error{},Zt=class extends xi.default{constructor(t){var s,r,n,i;if(super(),Z.add(this),Yt.set(this,void 0),Qt.set(this,void 0),Ke.set(this,0),Tr.set(this,void 0),Kt.set(this,void 0),Br.set(this,0),Se.set(this,void 0),Jt.set(this,void 0),ye.set(this,void 0),br.set(this,void 0),Fe.set(this,0),Xt.set(this,void 0),Qe.set(this,void 0),vr.set(this,void 0),Object.defineProperty(this,"timeout",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),t={carryoverConcurrencyCount:!1,intervalCap:Number.POSITIVE_INFINITY,interval:0,concurrency:Number.POSITIVE_INFINITY,autoStart:!0,queueClass:Ht,...t},!(typeof t.intervalCap=="number"&&t.intervalCap>=1))throw new TypeError(`Expected \`intervalCap\` to be a number from 1 and up, got \`${(r=(s=t.intervalCap)===null||s===void 0?void 0:s.toString())!==null&&r!==void 0?r:""}\` (${typeof t.intervalCap})`);if(t.interval===void 0||!(Number.isFinite(t.interval)&&t.interval>=0))throw new TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${(i=(n=t.interval)===null||n===void 0?void 0:n.toString())!==null&&i!==void 0?i:""}\` (${typeof t.interval})`);J(this,Yt,t.carryoverConcurrencyCount,"f"),J(this,Qt,t.intervalCap===Number.POSITIVE_INFINITY||t.interval===0,"f"),J(this,Tr,t.intervalCap,"f"),J(this,Kt,t.interval,"f"),J(this,ye,new t.queueClass,"f"),J(this,br,t.queueClass,"f"),this.concurrency=t.concurrency,this.timeout=t.timeout,J(this,vr,t.throwOnTimeout===!0,"f"),J(this,Qe,t.autoStart===!1,"f");}get concurrency(){return F(this,Xt,"f")}set concurrency(t){if(!(typeof t=="number"&&t>=1))throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${t}\` (${typeof t})`);J(this,Xt,t,"f"),F(this,Z,"m",_r).call(this);}async add(t,s={}){return new Promise((r,n)=>{let i=async()=>{var o,a,u;J(this,Fe,(a=F(this,Fe,"f"),a++,a),"f"),J(this,Ke,(u=F(this,Ke,"f"),u++,u),"f");try{if(!((o=s.signal)===null||o===void 0)&&o.aborted){n(new Is("The task was aborted."));return}let f=await(this.timeout===void 0&&s.timeout===void 0?t({signal:s.signal}):ks(Promise.resolve(t({signal:s.signal})),s.timeout===void 0?this.timeout:s.timeout,()=>{(s.throwOnTimeout===void 0?F(this,vr,"f"):s.throwOnTimeout)&&n(aa);}));r(f),this.emit("completed",f);}catch(c){n(c),this.emit("error",c);}F(this,Z,"m",Fi).call(this);};F(this,ye,"f").enqueue(i,s),F(this,Z,"m",Ar).call(this),this.emit("add");})}async addAll(t,s){return Promise.all(t.map(async r=>this.add(r,s)))}start(){return F(this,Qe,"f")?(J(this,Qe,!1,"f"),F(this,Z,"m",_r).call(this),this):this}pause(){J(this,Qe,!0,"f");}clear(){J(this,ye,new(F(this,br,"f")),"f");}async onEmpty(){F(this,ye,"f").size!==0&&await F(this,Z,"m",$r).call(this,"empty");}async onSizeLessThan(t){F(this,ye,"f").size<t||await F(this,Z,"m",$r).call(this,"next",()=>F(this,ye,"f").size<t);}async onIdle(){F(this,Fe,"f")===0&&F(this,ye,"f").size===0||await F(this,Z,"m",$r).call(this,"idle");}get size(){return F(this,ye,"f").size}sizeBy(t){return F(this,ye,"f").filter(t).length}get pending(){return F(this,Fe,"f")}get isPaused(){return F(this,Qe,"f")}};Yt=new WeakMap,Qt=new WeakMap,Ke=new WeakMap,Tr=new WeakMap,Kt=new WeakMap,Br=new WeakMap,Se=new WeakMap,Jt=new WeakMap,ye=new WeakMap,br=new WeakMap,Fe=new WeakMap,Xt=new WeakMap,Qe=new WeakMap,vr=new WeakMap,Z=new WeakSet,mi=function(){return F(this,Qt,"f")||F(this,Ke,"f")<F(this,Tr,"f")},di=function(){return F(this,Fe,"f")<F(this,Xt,"f")},Fi=function(){var t;J(this,Fe,(t=F(this,Fe,"f"),t--,t),"f"),F(this,Z,"m",Ar).call(this),this.emit("next");},hi=function(){this.emit("empty"),F(this,Fe,"f")===0&&this.emit("idle");},gi=function(){F(this,Z,"m",Os).call(this),F(this,Z,"m",Ps).call(this),J(this,Jt,void 0,"f");},yi=function(){let t=Date.now();if(F(this,Se,"f")===void 0){let s=F(this,Br,"f")-t;if(s<0)J(this,Ke,F(this,Yt,"f")?F(this,Fe,"f"):0,"f");else return F(this,Jt,"f")===void 0&&J(this,Jt,setTimeout(()=>{F(this,Z,"m",gi).call(this);},s),"f"),!0}return !1},Ar=function(){if(F(this,ye,"f").size===0)return F(this,Se,"f")&&clearInterval(F(this,Se,"f")),J(this,Se,void 0,"f"),F(this,Z,"m",hi).call(this),!1;if(!F(this,Qe,"f")){let t=!F(this,Z,"a",yi);if(F(this,Z,"a",mi)&&F(this,Z,"a",di)){let s=F(this,ye,"f").dequeue();return s?(this.emit("active"),s(),t&&F(this,Z,"m",Ps).call(this),!0):!1}}return !1},Ps=function(){F(this,Qt,"f")||F(this,Se,"f")!==void 0||(J(this,Se,setInterval(()=>{F(this,Z,"m",Os).call(this);},F(this,Kt,"f")),"f"),J(this,Br,Date.now()+F(this,Kt,"f"),"f"));},Os=function(){F(this,Ke,"f")===0&&F(this,Fe,"f")===0&&F(this,Se,"f")&&(clearInterval(F(this,Se,"f")),J(this,Se,void 0,"f")),J(this,Ke,F(this,Yt,"f")?F(this,Fe,"f"):0,"f"),F(this,Z,"m",_r).call(this);},_r=function(){for(;F(this,Z,"m",Ar).call(this););},$r=async function(t,s){return new Promise(r=>{let n=()=>{s&&!s()||(this.off(t,n),r());};this.on(t,n);})};var Le=la.create({responseType:"json",headers:{}}),O=new Zt({concurrency:5,interval:250,intervalCap:5});function kr(e){return e===429||e===500?!0:(O.isPaused||O.pause(),!1)}var js=Symbol("singleComment"),Ci=Symbol("multiComment"),ca=()=>"",fa=(e,t,s)=>e.slice(t,s).replace(/\S/g," "),pa=(e,t)=>{let s=t-1,r=0;for(;e[s]==="\\";)s-=1,r+=1;return Boolean(r%2)};function er(e,{whitespace:t=!0,trailingCommas:s=!1}={}){if(typeof e!="string")throw new TypeError(`Expected argument \`jsonString\` to be a \`string\`, got \`${typeof e}\``);let r=t?fa:ca,n=!1,i=!1,o=0,a="",u="",c=-1;for(let f=0;f<e.length;f++){let d=e[f],h=e[f+1];if(!i&&d==='"'&&(pa(e,f)||(n=!n)),!n)if(!i&&d+h==="//")a+=e.slice(o,f),o=f,i=js,f++;else if(i===js&&d+h===`\r
35
+ var Zu=Object.create;var Bs=Object.defineProperty;var ea=Object.getOwnPropertyDescriptor;var ta=Object.getOwnPropertyNames;var ra=Object.getPrototypeOf,sa=Object.prototype.hasOwnProperty;var ei=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,s)=>(typeof require<"u"?require:t)[s]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')});var Ne=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Wt=(e,t)=>{for(var s in t)Bs(e,s,{get:t[s],enumerable:!0});},na=(e,t,s,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of ta(t))!sa.call(e,n)&&n!==s&&Bs(e,n,{get:()=>t[n],enumerable:!(r=ea(t,n))||r.enumerable});return e};var Et=(e,t,s)=>(s=e!=null?Zu(ra(e)):{},na(t||!e||!e.__esModule?Bs(s,"default",{value:e,enumerable:!0}):s,e));var pi=Ne((Bp,Ts)=>{var oa=Object.prototype.hasOwnProperty,ce="~";function Vt(){}Object.create&&(Vt.prototype=Object.create(null),new Vt().__proto__||(ce=!1));function ua(e,t,s){this.fn=e,this.context=t,this.once=s||!1;}function fi(e,t,s,r,n){if(typeof s!="function")throw new TypeError("The listener must be a function");var i=new ua(s,r||e,n),o=ce?ce+t:t;return e._events[o]?e._events[o].fn?e._events[o]=[e._events[o],i]:e._events[o].push(i):(e._events[o]=i,e._eventsCount++),e}function Sr(e,t){--e._eventsCount===0?e._events=new Vt:delete e._events[t];}function le(){this._events=new Vt,this._eventsCount=0;}le.prototype.eventNames=function(){var t=[],s,r;if(this._eventsCount===0)return t;for(r in s=this._events)oa.call(s,r)&&t.push(ce?r.slice(1):r);return Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(s)):t};le.prototype.listeners=function(t){var s=ce?ce+t:t,r=this._events[s];if(!r)return [];if(r.fn)return [r.fn];for(var n=0,i=r.length,o=new Array(i);n<i;n++)o[n]=r[n].fn;return o};le.prototype.listenerCount=function(t){var s=ce?ce+t:t,r=this._events[s];return r?r.fn?1:r.length:0};le.prototype.emit=function(t,s,r,n,i,o){var a=ce?ce+t:t;if(!this._events[a])return !1;var u=this._events[a],c=arguments.length,f,d;if(u.fn){switch(u.once&&this.removeListener(t,u.fn,void 0,!0),c){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,s),!0;case 3:return u.fn.call(u.context,s,r),!0;case 4:return u.fn.call(u.context,s,r,n),!0;case 5:return u.fn.call(u.context,s,r,n,i),!0;case 6:return u.fn.call(u.context,s,r,n,i,o),!0}for(d=1,f=new Array(c-1);d<c;d++)f[d-1]=arguments[d];u.fn.apply(u.context,f);}else {var h=u.length,w;for(d=0;d<h;d++)switch(u[d].once&&this.removeListener(t,u[d].fn,void 0,!0),c){case 1:u[d].fn.call(u[d].context);break;case 2:u[d].fn.call(u[d].context,s);break;case 3:u[d].fn.call(u[d].context,s,r);break;case 4:u[d].fn.call(u[d].context,s,r,n);break;default:if(!f)for(w=1,f=new Array(c-1);w<c;w++)f[w-1]=arguments[w];u[d].fn.apply(u[d].context,f);}}return !0};le.prototype.on=function(t,s,r){return fi(this,t,s,r,!1)};le.prototype.once=function(t,s,r){return fi(this,t,s,r,!0)};le.prototype.removeListener=function(t,s,r,n){var i=ce?ce+t:t;if(!this._events[i])return this;if(!s)return Sr(this,i),this;var o=this._events[i];if(o.fn)o.fn===s&&(!n||o.once)&&(!r||o.context===r)&&Sr(this,i);else {for(var a=0,u=[],c=o.length;a<c;a++)(o[a].fn!==s||n&&!o[a].once||r&&o[a].context!==r)&&u.push(o[a]);u.length?this._events[i]=u.length===1?u[0]:u:Sr(this,i);}return this};le.prototype.removeAllListeners=function(t){var s;return t?(s=ce?ce+t:t,this._events[s]&&Sr(this,s)):(this._events=new Vt,this._eventsCount=0),this};le.prototype.off=le.prototype.removeListener;le.prototype.addListener=le.prototype.on;le.prefixed=ce;le.EventEmitter=le;typeof Ts<"u"&&(Ts.exports=le);});var qi=Ne((rD,Qs)=>{var Ze={};typeof Qs>"u"?window.eastasianwidth=Ze:Qs.exports=Ze;Ze.eastAsianWidth=function(e){var t=e.charCodeAt(0),s=e.length==2?e.charCodeAt(1):0,r=t;return 55296<=t&&t<=56319&&56320<=s&&s<=57343&&(t&=1023,s&=1023,r=t<<10|s,r+=65536),r==12288||65281<=r&&r<=65376||65504<=r&&r<=65510?"F":r==8361||65377<=r&&r<=65470||65474<=r&&r<=65479||65482<=r&&r<=65487||65490<=r&&r<=65495||65498<=r&&r<=65500||65512<=r&&r<=65518?"H":4352<=r&&r<=4447||4515<=r&&r<=4519||4602<=r&&r<=4607||9001<=r&&r<=9002||11904<=r&&r<=11929||11931<=r&&r<=12019||12032<=r&&r<=12245||12272<=r&&r<=12283||12289<=r&&r<=12350||12353<=r&&r<=12438||12441<=r&&r<=12543||12549<=r&&r<=12589||12593<=r&&r<=12686||12688<=r&&r<=12730||12736<=r&&r<=12771||12784<=r&&r<=12830||12832<=r&&r<=12871||12880<=r&&r<=13054||13056<=r&&r<=19903||19968<=r&&r<=42124||42128<=r&&r<=42182||43360<=r&&r<=43388||44032<=r&&r<=55203||55216<=r&&r<=55238||55243<=r&&r<=55291||63744<=r&&r<=64255||65040<=r&&r<=65049||65072<=r&&r<=65106||65108<=r&&r<=65126||65128<=r&&r<=65131||110592<=r&&r<=110593||127488<=r&&r<=127490||127504<=r&&r<=127546||127552<=r&&r<=127560||127568<=r&&r<=127569||131072<=r&&r<=194367||177984<=r&&r<=196605||196608<=r&&r<=262141?"W":32<=r&&r<=126||162<=r&&r<=163||165<=r&&r<=166||r==172||r==175||10214<=r&&r<=10221||10629<=r&&r<=10630?"Na":r==161||r==164||167<=r&&r<=168||r==170||173<=r&&r<=174||176<=r&&r<=180||182<=r&&r<=186||188<=r&&r<=191||r==198||r==208||215<=r&&r<=216||222<=r&&r<=225||r==230||232<=r&&r<=234||236<=r&&r<=237||r==240||242<=r&&r<=243||247<=r&&r<=250||r==252||r==254||r==257||r==273||r==275||r==283||294<=r&&r<=295||r==299||305<=r&&r<=307||r==312||319<=r&&r<=322||r==324||328<=r&&r<=331||r==333||338<=r&&r<=339||358<=r&&r<=359||r==363||r==462||r==464||r==466||r==468||r==470||r==472||r==474||r==476||r==593||r==609||r==708||r==711||713<=r&&r<=715||r==717||r==720||728<=r&&r<=731||r==733||r==735||768<=r&&r<=879||913<=r&&r<=929||931<=r&&r<=937||945<=r&&r<=961||963<=r&&r<=969||r==1025||1040<=r&&r<=1103||r==1105||r==8208||8211<=r&&r<=8214||8216<=r&&r<=8217||8220<=r&&r<=8221||8224<=r&&r<=8226||8228<=r&&r<=8231||r==8240||8242<=r&&r<=8243||r==8245||r==8251||r==8254||r==8308||r==8319||8321<=r&&r<=8324||r==8364||r==8451||r==8453||r==8457||r==8467||r==8470||8481<=r&&r<=8482||r==8486||r==8491||8531<=r&&r<=8532||8539<=r&&r<=8542||8544<=r&&r<=8555||8560<=r&&r<=8569||r==8585||8592<=r&&r<=8601||8632<=r&&r<=8633||r==8658||r==8660||r==8679||r==8704||8706<=r&&r<=8707||8711<=r&&r<=8712||r==8715||r==8719||r==8721||r==8725||r==8730||8733<=r&&r<=8736||r==8739||r==8741||8743<=r&&r<=8748||r==8750||8756<=r&&r<=8759||8764<=r&&r<=8765||r==8776||r==8780||r==8786||8800<=r&&r<=8801||8804<=r&&r<=8807||8810<=r&&r<=8811||8814<=r&&r<=8815||8834<=r&&r<=8835||8838<=r&&r<=8839||r==8853||r==8857||r==8869||r==8895||r==8978||9312<=r&&r<=9449||9451<=r&&r<=9547||9552<=r&&r<=9587||9600<=r&&r<=9615||9618<=r&&r<=9621||9632<=r&&r<=9633||9635<=r&&r<=9641||9650<=r&&r<=9651||9654<=r&&r<=9655||9660<=r&&r<=9661||9664<=r&&r<=9665||9670<=r&&r<=9672||r==9675||9678<=r&&r<=9681||9698<=r&&r<=9701||r==9711||9733<=r&&r<=9734||r==9737||9742<=r&&r<=9743||9748<=r&&r<=9749||r==9756||r==9758||r==9792||r==9794||9824<=r&&r<=9825||9827<=r&&r<=9829||9831<=r&&r<=9834||9836<=r&&r<=9837||r==9839||9886<=r&&r<=9887||9918<=r&&r<=9919||9924<=r&&r<=9933||9935<=r&&r<=9953||r==9955||9960<=r&&r<=9983||r==10045||r==10071||10102<=r&&r<=10111||11093<=r&&r<=11097||12872<=r&&r<=12879||57344<=r&&r<=63743||65024<=r&&r<=65039||r==65533||127232<=r&&r<=127242||127248<=r&&r<=127277||127280<=r&&r<=127337||127344<=r&&r<=127386||917760<=r&&r<=917999||983040<=r&&r<=1048573||1048576<=r&&r<=1114109?"A":"N"};Ze.characterLength=function(e){var t=this.eastAsianWidth(e);return t=="F"||t=="W"||t=="A"?2:1};function Mi(e){return e.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}Ze.length=function(e){for(var t=Mi(e),s=0,r=0;r<t.length;r++)s=s+this.characterLength(t[r]);return s};Ze.slice=function(e,t,s){textLen=Ze.length(e),t=t||0,s=s||1,t<0&&(t=textLen+t),s<0&&(s=textLen+s);for(var r="",n=0,i=Mi(e),o=0;o<i.length;o++){var a=i[o],u=Ze.length(a);if(n>=t-(u==2?1:0))if(n+u<=s)r+=a;else break;n+=u;}return r};});var Gi=Ne((sD,Li)=>{Li.exports=function(){return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g};});var no=Ne(Mr=>{Object.defineProperty(Mr,"__esModule",{value:!0});var en=e=>{let[,t]=/([a-f\d]{3,6})/i.exec(e)||[],s=t?t.length:0;if(s===3)t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2];else if(s!==6)return [0,0,0];let r=parseInt(t,16);return [r>>16&255,r>>8&255,255&r]},et=(e,t,s)=>t>e?t:e>s?s:e,Aa=(e,t,s)=>{if(t==="")return e;let r=e.indexOf(t);if(r<0)return e;let n=t.length,i=0,o="";for(;~r;)o+=e.slice(i,r)+s,i=r+n,r=e.indexOf(t,i);return o+e.slice(i)},eo={open:"",close:""},C=(e=>{let t=w=>!!o.find(B=>w.test(B)),s=e||(typeof process<"u"?process:{}),{stdout:r,platform:n}=s,i=s.env||{},o=s.argv||[],a="FORCE_COLOR"in i,u=i.FORCE_COLOR,c=u==="true"||parseInt(u)>0,f="NO_COLOR"in i||a&&!c||t(/^-{1,2}(no-color|color=false|color=never)$/),d=a&&c||t(/^-{1,2}(color|color=true|color=always)$/),h=r&&"isTTY"in r&&/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(i.TERM);return !f&&(d||h||n==="win32"||"CI"in i)})()?(e,t)=>({open:`\x1B[${e}m`,close:`\x1B[${t}m`}):()=>eo,tn=(e,t,s)=>C(`38;2;${e};${t};${s}`,39),Xi=(e,t,s)=>C(`48;2;${e};${t};${s}`,49),$a={visible:eo,reset:C(0,0),inverse:C(7,27),hidden:C(8,28),bold:C(1,22),dim:C(2,22),faint:C(2,22),italic:C(3,23),underline:C(4,24),doubleUnderline:C(21,24),strikethrough:C(9,29),strike:C(9,29),frame:C(51,54),encircle:C(52,54),overline:C(53,55),black:C(30,39),red:C(31,39),green:C(32,39),yellow:C(33,39),blue:C(34,39),magenta:C(35,39),cyan:C(36,39),white:C(37,39),grey:C(90,39),gray:C(90,39),blackBright:C(90,39),redBright:C(91,39),greenBright:C(92,39),yellowBright:C(93,39),blueBright:C(94,39),magentaBright:C(95,39),cyanBright:C(96,39),whiteBright:C(97,39),bgBlack:C(40,49),bgRed:C(41,49),bgGreen:C(42,49),bgYellow:C(43,49),bgBlue:C(44,49),bgMagenta:C(45,49),bgCyan:C(46,49),bgWhite:C(47,49),bgBlackBright:C(100,49),bgRedBright:C(101,49),bgGreenBright:C(102,49),bgYellowBright:C(103,49),bgBlueBright:C(104,49),bgMagentaBright:C(105,49),bgCyanBright:C(106,49),bgWhiteBright:C(107,49)},{defineProperty:Ta,defineProperties:_a,setPrototypeOf:to}=Object,ka=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g,Ra=/(\r*\n)/g,ro=function(){let e=t=>t;return e.strip=t=>t.replace(ka,""),e.extend=t=>{for(let s in t){let r=t[s],n=r.open!=null?r:tn(...en(r));We[s]={get(){let i=so(this,n);return Ta(this,s,{value:i}),i}};}rn=_a(()=>{},We),to(e,rn);},e.extend($a),e},so=({props:e},{open:t,close:s})=>{let r=(o,...a)=>Pa(o,a,r.props),n=t,i=s;return e!==void 0&&(n=e.openStack+t,i=s+e.closeStack),to(r,rn),r.props={open:t,close:s,openStack:n,closeStack:i,parent:e},r.open=n,r.close=i,r},Pa=(e,t,s)=>{if(!e)return "";let{openStack:r,closeStack:n}=s,i=e.raw!=null?String.raw(e,...t):e;if(~i.indexOf("\x1B"))for(;s!==void 0;)i=Aa(i,s.close,s.open),s=s.parent;return ~i.indexOf(`
36
+ `)&&(i=i.replace(Ra,n+"$1"+r)),r+i+n},Zi={ansi:e=>(t=>C(`38;5;${t}`,39))(et(e,0,255)),bgAnsi:e=>(t=>C(`48;5;${t}`,49))(et(e,0,255)),hex:e=>tn(...en(e)),bgHex:e=>Xi(...en(e)),rgb:(e,t,s)=>tn(et(e,0,255),et(t,0,255),et(s,0,255)),bgRgb:(e,t,s)=>Xi(et(e,0,255),et(t,0,255),et(s,0,255))},We={},rn;for(let e in Zi)We[e]={get(){return (...t)=>so(this,Zi[e](...t))}};We.ansi256=We.fg=We.ansi,We.bgAnsi256=We.bg=We.bgAnsi;var Oa=new ro;Mr.Ansis=ro,Mr.default=Oa;});var oo=Ne((mD,sn)=>{var io=no();sn.exports=io.default;sn.exports.Ansis=io.Ansis;});var mo=Ne((RD,mn)=>{var Do=(e,t)=>{for(let s of Reflect.ownKeys(t))Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(t,s));return e};mn.exports=Do;mn.exports.default=Do;});var go=Ne((PD,Jr)=>{var rl=mo(),Hr=new WeakMap,ho=(e,t={})=>{if(typeof e!="function")throw new TypeError("Expected a function");let s,r=0,n=e.displayName||e.name||"<anonymous>",i=function(...o){if(Hr.set(i,++r),r===1)s=e.apply(this,o),e=null;else if(t.throw===!0)throw new Error(`Function \`${n}\` can only be called once`);return s};return rl(i,e),Hr.set(i,r),i};Jr.exports=ho;Jr.exports.default=ho;Jr.exports.callCount=e=>{if(!Hr.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return Hr.get(e)};});var yo=Ne((OD,Yr)=>{Yr.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];process.platform!=="win32"&&Yr.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&Yr.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED");});var wo=Ne((ID,Tt)=>{var H=global.process,dt=function(e){return e&&typeof e=="object"&&typeof e.removeListener=="function"&&typeof e.emit=="function"&&typeof e.reallyExit=="function"&&typeof e.listeners=="function"&&typeof e.kill=="function"&&typeof e.pid=="number"&&typeof e.on=="function"};dt(H)?(Fo=ei("assert"),At=yo(),xo=/^win/i.test(H.platform),lr=ei("events"),typeof lr!="function"&&(lr=lr.EventEmitter),H.__signal_exit_emitter__?ue=H.__signal_exit_emitter__:(ue=H.__signal_exit_emitter__=new lr,ue.count=0,ue.emitted={}),ue.infinite||(ue.setMaxListeners(1/0),ue.infinite=!0),Tt.exports=function(e,t){if(!dt(global.process))return function(){};Fo.equal(typeof e,"function","a callback must be provided for exit handler"),$t===!1&&dn();var s="exit";t&&t.alwaysLast&&(s="afterexit");var r=function(){ue.removeListener(s,e),ue.listeners("exit").length===0&&ue.listeners("afterexit").length===0&&Qr();};return ue.on(s,e),r},Qr=function(){!$t||!dt(global.process)||($t=!1,At.forEach(function(t){try{H.removeListener(t,Kr[t]);}catch{}}),H.emit=Xr,H.reallyExit=hn,ue.count-=1);},Tt.exports.unload=Qr,ht=function(t,s,r){ue.emitted[t]||(ue.emitted[t]=!0,ue.emit(t,s,r));},Kr={},At.forEach(function(e){Kr[e]=function(){if(!!dt(global.process)){var s=H.listeners(e);s.length===ue.count&&(Qr(),ht("exit",null,e),ht("afterexit",null,e),xo&&e==="SIGHUP"&&(e="SIGINT"),H.kill(H.pid,e));}};}),Tt.exports.signals=function(){return At},$t=!1,dn=function(){$t||!dt(global.process)||($t=!0,ue.count+=1,At=At.filter(function(t){try{return H.on(t,Kr[t]),!0}catch{return !1}}),H.emit=Eo,H.reallyExit=Co);},Tt.exports.load=dn,hn=H.reallyExit,Co=function(t){!dt(global.process)||(H.exitCode=t||0,ht("exit",H.exitCode,null),ht("afterexit",H.exitCode,null),hn.call(H,H.exitCode));},Xr=H.emit,Eo=function(t,s){if(t==="exit"&&dt(global.process)){s!==void 0&&(H.exitCode=s);var r=Xr.apply(this,arguments);return ht("exit",H.exitCode,null),ht("afterexit",H.exitCode,null),r}else return Xr.apply(this,arguments)}):Tt.exports=function(){return function(){}};var Fo,At,xo,lr,ue,Qr,ht,Kr,$t,dn,hn,Co,Xr,Eo;});function oe(e){if(e===null)return "Null";if(e===void 0)return "Undefined";if(Number.isNaN(e))return "NaN";let t=Object.prototype.toString.call(e).slice(8,-1);return t==="AsyncFunction"?"Promise":t}var{isArray:ze}=Array;function wt(e){return ze(e)?e.length>0:oe(e)==="Object"?Object.keys(e).length>0:Boolean(e)}function St(...e){let t=0;for(;t<e.length;){let s=e[t];if(oe(s)==="Function"){if(wt(s()))return !1}else if(wt(s))return !1;t++;}return !0}function De(...e){let t=0;for(;t<e.length;){let s=e[t];if(oe(s)==="Function"){if(wt(s()))return !0}else if(wt(s))return !0;t++;}return !1}function Fr(e,t="."){return typeof e=="string"?e.split(t):e}function bs(e,t){if(arguments.length===1)return i=>bs(e,i);if(t==null)return;let s=t,r=0,n=Fr(e);for(;r<n.length;){if(s==null||s[n[r]]===null)return;s=s[n[r]],r++;}return s}function Ut(e,t){if(!ze(t))throw new Error(`Cannot read property 'indexOf' of ${t}`);let s=oe(e);if(!["Object","Array","NaN","RegExp"].includes(s))return t.indexOf(e);let r=-1,n=-1,{length:i}=t;for(;++r<i&&n===-1;)xr(t[r],e)&&(n=r);return n}function ti(e){let t=[],s;for(;!(s=e.next()).done;)t.push(s.value);return t}function ia(e,t){if(e.size!==t.size)return !1;let s=ti(e.values()),r=ti(t.values());return s.filter(i=>Ut(i,r)===-1).length===0}function ri(e){let t=e.__proto__.toString();return ["Error","TypeError"].includes(t)?[t,e.message]:[]}function si(e){return e.toDateString?[!0,e.getTime()]:[!1]}function ni(e){return e.constructor!==RegExp?[!1]:[!0,e.toString()]}function xr(e,t){if(arguments.length===1)return c=>xr(e,c);let s=oe(e);if(s!==oe(t))return !1;if(s==="Function")return e.name===void 0?!1:e.name===t.name;if(["NaN","Undefined","Null"].includes(s))return !0;if(s==="Number")return Object.is(-0,e)!==Object.is(-0,t)?!1:e.toString()===t.toString();if(["String","Boolean"].includes(s))return e.toString()===t.toString();if(s==="Array"){let c=Array.from(e),f=Array.from(t);if(c.toString()!==f.toString())return !1;let d=!0;return c.forEach((h,w)=>{d&&h!==f[w]&&!xr(h,f[w])&&(d=!1);}),d}let r=ni(e),n=ni(t);if(r[0])return n[0]?r[1]===n[1]:!1;if(n[0])return !1;let i=si(e),o=si(t);if(i[0])return o[0]?i[1]===o[1]:!1;if(o[0])return !1;let a=ri(e),u=ri(t);if(a[0])return u[0]?a[0]===u[0]&&a[1]===u[1]:!1;if(s==="Set")return ia(e,t);if(s==="Object"){let c=Object.keys(e);if(c.length!==Object.keys(t).length)return !1;let f=!0;return c.forEach(d=>{if(f){let h=e[d],w=t[d];h!==w&&!xr(h,w)&&(f=!1);}}),f}return !1}function vs(e,t){if(arguments.length===1)return s=>vs(e,s);if(typeof t=="string")return t.includes(e);if(!t)throw new TypeError(`Cannot read property 'indexOf' of ${t}`);return ze(t)?Ut(e,t)>-1:!1}async function ii(e,t){if(ze(t)){let r=[],n=0;for(let i of t)r.push(await e(i,n++));return r}let s={};for(let r in t)s[r]=await e(t[r],r);return s}function He(e,t){return arguments.length===1?async s=>ii(e,s):new Promise((s,r)=>{ii(e,t).then(s).catch(r);})}function X(e,t){return arguments.length===1?s=>X(e,s):oe(t)===e}async function oi(e,t){let s=t.map((r,n)=>e(r,n));return Promise.all(s)}function Je(e,t){return arguments.length===1?async s=>oi(e,s):new Promise((s,r)=>{oi(e,t).then(s).catch(r);})}function As(e,t){if(arguments.length===1)return n=>As(e,n);if(t==null)return;let s=Fr(e,","),r={};for(let n in t)s.includes(n)||(r[n]=t[n]);return r}var Cr=class{constructor(){this.set=new Set,this.items={};}checkUniqueness(t){let s=oe(t);if(["Null","Undefined","NaN"].includes(s))return s in this.items?!1:(this.items[s]=!0,!0);if(!["Object","Array"].includes(s)){let r=this.set.size;return this.set.add(t),this.set.size!==r}return s in this.items?Ut(t,this.items[s])===-1?(this.items[s].push(t),!0):!1:(this.items[s]=[t],!0)}};function Er(e){let t=new Cr,s=[];return e.forEach(r=>{t.checkUniqueness(r)&&s.push(r);}),s}function m(e,t){return arguments.length===1?s=>m(e,s):t?t.hasOwnProperty(e):!1}function Re(e,t){return arguments.length===1?s=>Re(e,s):bs(e,t)!==void 0}function me(e){let t=oe(e);return ["Undefined","NaN","Number","Null"].includes(t)?!1:e?t==="Object"?Object.keys(e).length===0:t==="Array"?e.length===0:!1:!0}function M(e){return e==null}function ui(e){return typeof e=="string"?e[e.length-1]||"":e[e.length-1]}var{error:Q,log:A,warn:ai}=console,E="",de=" ",Me=e=>de.repeat(e),y=`
37
+ `,_=e=>y.repeat(e);var v=Object.assign,Ce=Object.defineProperty,we=Object.keys,$s=Object.values,Ye=Array.from;Buffer.from;var b=Array.isArray,he=Buffer.isBuffer,q=X("Undefined"),j=X("Object"),ge=X("Boolean"),li=X("RegExp"),wr=X("Number"),P=X("String"),fe=X("Function");X("Async");var D={};Wt(D,{build:()=>fl,changed:()=>gl,clear:()=>Dt,deleted:()=>El,err:()=>pl,external:()=>ml,failed:()=>Al,hook:()=>dl,ignored:()=>bl,invalid:()=>vl,minified:()=>wl,nwl:()=>No,out:()=>A,process:()=>Mo,reloaded:()=>Sl,retrying:()=>Cl,skipped:()=>Bl,spawn:()=>Tl,start:()=>Oo,syncing:()=>Fl,throws:()=>$l,transform:()=>xl,unhook:()=>hl,update:()=>ko,upload:()=>yl,write:()=>Dl});var pe={},re={current:null,count:0,process:{}},V={json:{assets:!0,config:!0,locales:!0,metafields:!0,templates:!0,exclude:[]},script:{minifySyntax:!0,minifyIdentifiers:!0,minifyWhitespace:!0,mangleProps:void 0,legalComments:"none",mangleQuoted:!1,keepNames:!1},liquid:{minifyScript:!0,minifyStyle:!0,minifySchema:!0,removeComments:!0,stripDashes:!0,exclude:[]},html:{caseSensitive:!1,collapseBooleanAttributes:!1,collapseInlineTagWhitespace:!1,conservativeCollapse:!1,keepClosingSlash:!1,noNewlinesBeforeTagClose:!1,preventAttributesEscaping:!1,removeEmptyAttributes:!1,removeEmptyElements:!1,removeOptionalTags:!1,removeRedundantAttributes:!0,removeScriptTypeAttributes:!0,removeStyleLinkTypeAttributes:!0,useShortDoctype:!0,collapseWhitespace:!0,continueOnParseError:!0,removeComments:!0,trimCustomFragments:!0,ignoreCustomFragments:[/(?<=\bstyle\b=["']\s?)[\s\S]*?(?="[\s\n>]?)/,/<style[\s\S]*?<\/style>/,/<script[\s\S]*?<\/script>/,/{%-?\s*liquid[\s\S]*?%}/,/{%[\s\S]*?%}/]}},L={json:{indent:2,useTab:!1,crlf:!1,exclude:null},postcss:{installed:!1,loaded:!1,file:!1,config:[]},sass:{installed:!1,loaded:!1,file:!1,config:{warnings:!0,style:"compressed",sourcemap:!0,include:["node_modules"]}},esbuild:{installed:!1,loaded:!1,file:!1,config:{bundle:!0,format:"esm",splitting:!1,sourcemap:!0,write:!1,logLevel:"silent",plugins:[]}},sharp:{installed:!1,required:!1,loaded:!1,file:!1,config:{}},sprite:{installed:!1,loaded:!1,file:!1,config:{mode:{inline:!0,symbol:{example:!1}},shape:{transform:["svgo"],id:{generator:"svg-%s"}},svg:{xmlDeclaration:!1,doctypeDeclaration:!1,dimensionAttributes:!1,namespaceClassnames:!1,namespaceIDs:!1}}},svgo:{installed:!1,loaded:!1,file:!1,config:{multipass:!0,datauri:"enc",js2svg:{indent:2,pretty:!0},plugins:["preset-default","prefixIds"]}}},te={input:"source",output:"theme",import:"import",export:"export",config:".",hot:!1,stores:null,spawn:{build:null,watch:null},logger:{clear:!0,silent:!1,stats:!0,warnings:!0},paths:{assets:"assets/*",config:"config/*.json",layout:"layout/*.liquid",locales:"locales/*.json",sections:"sections/**/*.liquid",snippets:"snippets/*.liquid",metafields:"metafields/**/*.json",redirects:"redirects.yaml",pages:["pages/*.html","pages/*.md"],templates:["templates/customers/*.liquid","templates/customers/*.json"],customers:["templates/customers/*.liquid","templates/customers/*.json"]},views:{sections:{prefixDir:!1,separator:"-",global:[]},snippets:{prefixDir:!1,separator:"-",global:[]},pages:{author:"",language:"html"}},transforms:{svg:null,style:null,script:null},minify:{json:!1,views:!1,script:!1}},Bt={onBuild:[],onChange:[],onReload:[],onTransform:[],onWatch:[]},l={version:null,cli:!1,cwd:null,silent:!1,prod:!1,dev:!0,hot:{inject:!0,server:3e3,socket:8089,method:"hot",scroll:"preserved",layouts:["theme.liquid"],label:"visible",renderer:"{% render 'hot.js', server: 3000, socket: 8089 %}",snippet:null,output:null,alive:{}},dirs:{},sync:{themes:[],stores:[]},mode:{build:!1,prompt:!1,watch:!1,clean:!1,upload:!1,download:!1,metafields:!1,minify:!1,hot:!1,pages:!1,pull:!1,push:!1,vsc:!1,script:!1,image:!1,style:!1,svg:!1,redirects:!1,export:!1},spawn:{paths:new Set,invoked:!1,commands:{}},watch:new Set,logger:{},paths:{transforms:new Map},section:{prefixDir:!1,separator:"-",global:[]},cmd:{},json:{},page:{export:{quotes:"\u201C\u201D\u2018\u2019",html:!0,linkify:!1,typographer:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-"},import:{codeBlockStyle:"fenced",emDelimiter:"_",fence:"```",headingStyle:"atx",hr:"***",linkReferenceStyle:"full",linkStyle:"inlined",strongDelimiter:"**",bulletListMarker:"-"}},image:[],style:[],script:[],svg:[],set config(e){v(te,e);},get config(){return te},get processor(){return L},minify:{json:!1,views:!1,script:!1,get options(){return V}}};var Ci=Et(pi(),1);var zt=class extends Error{constructor(t){super(t),this.name="TimeoutError";}},_s=class extends Error{constructor(t){super(),this.name="AbortError",this.message=t;}},Di=e=>globalThis.DOMException===void 0?new _s(e):new DOMException(e),mi=e=>{let t=e.reason===void 0?Di("This operation was aborted."):e.reason;return t instanceof Error?t:Di(t)};function ks(e,t,s,r){let n,i=new Promise((o,a)=>{if(typeof t!="number"||Math.sign(t)!==1)throw new TypeError(`Expected \`milliseconds\` to be a positive number, got \`${t}\``);if(t===Number.POSITIVE_INFINITY){o(e);return}if(r={customTimers:{setTimeout,clearTimeout},...r},r.signal){let{signal:u}=r;u.aborted&&a(mi(u)),u.addEventListener("abort",()=>{a(mi(u));});}n=r.customTimers.setTimeout.call(void 0,()=>{if(typeof s=="function"){try{o(s());}catch(f){a(f);}return}let u=typeof s=="string"?s:`Promise timed out after ${t} milliseconds`,c=s instanceof Error?s:new zt(u);typeof e.cancel=="function"&&e.cancel(),a(c);},t),(async()=>{try{o(await e);}catch(u){a(u);}finally{r.customTimers.clearTimeout.call(void 0,n);}})();});return i.clear=()=>{clearTimeout(n),n=void 0;},i}function Rs(e,t,s){let r=0,n=e.length;for(;n>0;){let i=Math.trunc(n/2),o=r+i;s(e[o],t)<=0?(r=++o,n-=i+1):n=i;}return r}var ut=function(e,t,s,r){if(s==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return s==="m"?r:s==="a"?r.call(e):r?r.value:t.get(e)},qe,Ht=class{constructor(){qe.set(this,[]);}enqueue(t,s){s={priority:0,...s};let r={priority:s.priority,run:t};if(this.size&&ut(this,qe,"f")[this.size-1].priority>=s.priority){ut(this,qe,"f").push(r);return}let n=Rs(ut(this,qe,"f"),r,(i,o)=>o.priority-i.priority);ut(this,qe,"f").splice(n,0,r);}dequeue(){let t=ut(this,qe,"f").shift();return t?.run}filter(t){return ut(this,qe,"f").filter(s=>s.priority===t.priority).map(s=>s.run)}get size(){return ut(this,qe,"f").length}};qe=new WeakMap;var J=function(e,t,s,r,n){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?n.call(e,s):n?n.value=s:t.set(e,s),s},F=function(e,t,s,r){if(s==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return s==="m"?r:s==="a"?r.call(e):r?r.value:t.get(e)},Z,Yt,Qt,Ke,Tr,Kt,Br,Se,Jt,ye,br,Fe,Xt,Qe,vr,di,hi,xi,gi,yi,Fi,Ar,Ps,Os,_r,$r,aa=new zt,Is=class extends Error{},Zt=class extends Ci.default{constructor(t){var s,r,n,i;if(super(),Z.add(this),Yt.set(this,void 0),Qt.set(this,void 0),Ke.set(this,0),Tr.set(this,void 0),Kt.set(this,void 0),Br.set(this,0),Se.set(this,void 0),Jt.set(this,void 0),ye.set(this,void 0),br.set(this,void 0),Fe.set(this,0),Xt.set(this,void 0),Qe.set(this,void 0),vr.set(this,void 0),Object.defineProperty(this,"timeout",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),t={carryoverConcurrencyCount:!1,intervalCap:Number.POSITIVE_INFINITY,interval:0,concurrency:Number.POSITIVE_INFINITY,autoStart:!0,queueClass:Ht,...t},!(typeof t.intervalCap=="number"&&t.intervalCap>=1))throw new TypeError(`Expected \`intervalCap\` to be a number from 1 and up, got \`${(r=(s=t.intervalCap)===null||s===void 0?void 0:s.toString())!==null&&r!==void 0?r:""}\` (${typeof t.intervalCap})`);if(t.interval===void 0||!(Number.isFinite(t.interval)&&t.interval>=0))throw new TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${(i=(n=t.interval)===null||n===void 0?void 0:n.toString())!==null&&i!==void 0?i:""}\` (${typeof t.interval})`);J(this,Yt,t.carryoverConcurrencyCount,"f"),J(this,Qt,t.intervalCap===Number.POSITIVE_INFINITY||t.interval===0,"f"),J(this,Tr,t.intervalCap,"f"),J(this,Kt,t.interval,"f"),J(this,ye,new t.queueClass,"f"),J(this,br,t.queueClass,"f"),this.concurrency=t.concurrency,this.timeout=t.timeout,J(this,vr,t.throwOnTimeout===!0,"f"),J(this,Qe,t.autoStart===!1,"f");}get concurrency(){return F(this,Xt,"f")}set concurrency(t){if(!(typeof t=="number"&&t>=1))throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${t}\` (${typeof t})`);J(this,Xt,t,"f"),F(this,Z,"m",_r).call(this);}async add(t,s={}){return new Promise((r,n)=>{let i=async()=>{var o,a,u;J(this,Fe,(a=F(this,Fe,"f"),a++,a),"f"),J(this,Ke,(u=F(this,Ke,"f"),u++,u),"f");try{if(!((o=s.signal)===null||o===void 0)&&o.aborted){n(new Is("The task was aborted."));return}let f=await(this.timeout===void 0&&s.timeout===void 0?t({signal:s.signal}):ks(Promise.resolve(t({signal:s.signal})),s.timeout===void 0?this.timeout:s.timeout,()=>{(s.throwOnTimeout===void 0?F(this,vr,"f"):s.throwOnTimeout)&&n(aa);}));r(f),this.emit("completed",f);}catch(c){n(c),this.emit("error",c);}F(this,Z,"m",xi).call(this);};F(this,ye,"f").enqueue(i,s),F(this,Z,"m",Ar).call(this),this.emit("add");})}async addAll(t,s){return Promise.all(t.map(async r=>this.add(r,s)))}start(){return F(this,Qe,"f")?(J(this,Qe,!1,"f"),F(this,Z,"m",_r).call(this),this):this}pause(){J(this,Qe,!0,"f");}clear(){J(this,ye,new(F(this,br,"f")),"f");}async onEmpty(){F(this,ye,"f").size!==0&&await F(this,Z,"m",$r).call(this,"empty");}async onSizeLessThan(t){F(this,ye,"f").size<t||await F(this,Z,"m",$r).call(this,"next",()=>F(this,ye,"f").size<t);}async onIdle(){F(this,Fe,"f")===0&&F(this,ye,"f").size===0||await F(this,Z,"m",$r).call(this,"idle");}get size(){return F(this,ye,"f").size}sizeBy(t){return F(this,ye,"f").filter(t).length}get pending(){return F(this,Fe,"f")}get isPaused(){return F(this,Qe,"f")}};Yt=new WeakMap,Qt=new WeakMap,Ke=new WeakMap,Tr=new WeakMap,Kt=new WeakMap,Br=new WeakMap,Se=new WeakMap,Jt=new WeakMap,ye=new WeakMap,br=new WeakMap,Fe=new WeakMap,Xt=new WeakMap,Qe=new WeakMap,vr=new WeakMap,Z=new WeakSet,di=function(){return F(this,Qt,"f")||F(this,Ke,"f")<F(this,Tr,"f")},hi=function(){return F(this,Fe,"f")<F(this,Xt,"f")},xi=function(){var t;J(this,Fe,(t=F(this,Fe,"f"),t--,t),"f"),F(this,Z,"m",Ar).call(this),this.emit("next");},gi=function(){this.emit("empty"),F(this,Fe,"f")===0&&this.emit("idle");},yi=function(){F(this,Z,"m",Os).call(this),F(this,Z,"m",Ps).call(this),J(this,Jt,void 0,"f");},Fi=function(){let t=Date.now();if(F(this,Se,"f")===void 0){let s=F(this,Br,"f")-t;if(s<0)J(this,Ke,F(this,Yt,"f")?F(this,Fe,"f"):0,"f");else return F(this,Jt,"f")===void 0&&J(this,Jt,setTimeout(()=>{F(this,Z,"m",yi).call(this);},s),"f"),!0}return !1},Ar=function(){if(F(this,ye,"f").size===0)return F(this,Se,"f")&&clearInterval(F(this,Se,"f")),J(this,Se,void 0,"f"),F(this,Z,"m",gi).call(this),!1;if(!F(this,Qe,"f")){let t=!F(this,Z,"a",Fi);if(F(this,Z,"a",di)&&F(this,Z,"a",hi)){let s=F(this,ye,"f").dequeue();return s?(this.emit("active"),s(),t&&F(this,Z,"m",Ps).call(this),!0):!1}}return !1},Ps=function(){F(this,Qt,"f")||F(this,Se,"f")!==void 0||(J(this,Se,setInterval(()=>{F(this,Z,"m",Os).call(this);},F(this,Kt,"f")),"f"),J(this,Br,Date.now()+F(this,Kt,"f"),"f"));},Os=function(){F(this,Ke,"f")===0&&F(this,Fe,"f")===0&&F(this,Se,"f")&&(clearInterval(F(this,Se,"f")),J(this,Se,void 0,"f")),J(this,Ke,F(this,Yt,"f")?F(this,Fe,"f"):0,"f"),F(this,Z,"m",_r).call(this);},_r=function(){for(;F(this,Z,"m",Ar).call(this););},$r=async function(t,s){return new Promise(r=>{let n=()=>{s&&!s()||(this.off(t,n),r());};this.on(t,n);})};var Le=la.create({responseType:"json",headers:{}}),O=new Zt({concurrency:5,interval:250,intervalCap:5});function kr(e){return e===429||e===500?!0:(O.isPaused||O.pause(),!1)}var js=Symbol("singleComment"),Ei=Symbol("multiComment"),ca=()=>"",fa=(e,t,s)=>e.slice(t,s).replace(/\S/g," "),pa=(e,t)=>{let s=t-1,r=0;for(;e[s]==="\\";)s-=1,r+=1;return Boolean(r%2)};function er(e,{whitespace:t=!0,trailingCommas:s=!1}={}){if(typeof e!="string")throw new TypeError(`Expected argument \`jsonString\` to be a \`string\`, got \`${typeof e}\``);let r=t?fa:ca,n=!1,i=!1,o=0,a="",u="",c=-1;for(let f=0;f<e.length;f++){let d=e[f],h=e[f+1];if(!i&&d==='"'&&(pa(e,f)||(n=!n)),!n)if(!i&&d+h==="//")a+=e.slice(o,f),o=f,i=js,f++;else if(i===js&&d+h===`\r
38
38
  `){f++,i=!1,a+=r(e,o,f),o=f;continue}else if(i===js&&d===`
39
- `)i=!1,a+=r(e,o,f),o=f;else if(!i&&d+h==="/*"){a+=e.slice(o,f),o=f,i=Ci,f++;continue}else if(i===Ci&&d+h==="*/"){f++,i=!1,a+=r(e,o,f+1),o=f+1;continue}else s&&!i&&(c!==-1?d==="}"||d==="]"?(a+=e.slice(o,f),u+=r(a,0,1)+a.slice(1),a="",o=f,c=-1):d!==" "&&d!==" "&&d!=="\r"&&d!==`
40
- `&&(a+=e.slice(o,f),o=f,c=-1):d===","&&(u+=a+e.slice(o,f),a="",o=f,c=f));}return u+a+(i?r(e.slice(o)):e.slice(o))}var tr="hot.js.liquid",Ei="hot.js";var wi=["style","script","svg","metafields","pages","sections","redirects","vscode"],Si=[["input","source"],["output","theme"],["export","export"],["import","import"],["config","."]],Bi=["assets","config","layout","customers","locales","sections","snippets","templates","metafields","pages","redirects"],bi=["templates","templates/customers","assets","config","layout","locales","sections","snippets"];var Ns=["b","kb","mb","gb","tb"],Ms=["assert","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"],qs=["You cannot use script minification without esbuild installed","and configured as a processor. Install esbuild and configure Syncify","to apply transforms to leverage script minification."],Ls="__injected_dirname__",Gs="__injected_filename__",Ws="__injected_import_meta_url__",Rr=/\.(mjs|cjs|ts|js|tsx|jsx)$/,vi=/(\()(line\s[0-9]+)(\))(:)/g,Ai=/(['"][\w\s]+['"])/g,$i=/({{2}-?)([a-zA-Z0-9_\-.'"[\]]+)(-?}{2})/g,Ti=/((?:www|http:|https:)+[^\s]+[\w])/g,_i=/(\/)(.*?)(\/)/g,Us={404:"The requested resource was not found.",400:"The request was not understood by the server, generally due to bad syntax or because the Content-Type header was not correctly set to application / json. This status is also returned when the request provides an invalid code parameter during the OAuth token exchange process.",303:"The response to the request can be found under a different URL in the Location header and can be retrieved using a GET method on that resource.",401:"The necessary authentication credentials are not present in the request or are incorrect",402:"The requested shop is currently frozen. The shop owner needs to log in to the shop's admin, and pay the outstanding balance to unfreeze the shop.",406:"The requested resource is only capable of generating content not acceptable according to the Accept headers sent in the request.",423:"The requested shop is currently locked. Shops are locked if they repeatedly exceed their API request limit. or if there is an issue with the account, such as a detected compromise or fraud risk.",403:"The server is refusing to respond to the request. This is generally because you have not requested the appropriate scope for this action.",501:"The requested endpoint is not available on that particular shop, e.g. requesting access to a Shopify Plus\u2013only API on a non-Plus shop. This response may also indicate that this endpoint is reserved for future use.",503:"The server is currently unavailable. Check the Shopify status page for reported service outages. See https://www.shopifystatus.com"};var Pr=new events.EventEmitter;function ki(e){try{return JSON.parse(er(e).trim())}catch(t){throw new Error(t)}}function Ge(e,t){return t>1?`${e}s`:e}function bt(e){return he(e)?e.toString():j(e)||b(e)?JSON.stringify(e):String(e)}async function Ri(e,{format:t}){return t==="esm"?s=>import(s):zs(e)}function Pi(e){return e===".mjs"||e===".cjs"?"js":e.slice(1)}function Or(e){return e.charAt(0).toUpperCase()+e.slice(1)}function xe(e){return P(e)?Buffer.from(e).toString().length:e.toString().length}function Pe(e){if(e===0)return "0b";let t=parseInt(`${Math.floor(Math.log(e)/Math.log(1024))}`,10);return t===0?`${x(String(e))}${Ns[t]}`:`${x((e/1024**t).toFixed(1))}${Ns[t]}`}function Be(e,t){let s=xe(e),r=Pe(da.gzipSync(e).length),n=Pe(t),i=Pe(s),o=Pe(t-s);return {isSmaller:s>t||s===t,gzip:r,before:n,after:i,saved:o}}function rr(){let e=new Date,t=e.getHours(),s=e.getMinutes(),r=e.getSeconds(),n=p(":");return (t<10?`0${t}`:t)+n+(s<10?`0${s}`:s)+n+(r<10?`0${r}`:r)}function Vs(e){let t=e%10,s=e%100;return e+(t===1&&s!==11?"st":t===2&&s!==12?"nd":t===3&&s!==13?"rd":"th")}function zs(e){return fe(globalThis.require)?globalThis.require(e):module$1.createRequire((typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('out.js', document.baseURI).href)))(e)}function Xe(){return Math.random().toString(36).slice(2)}var Ir=[],jr=()=>U(!0),W=()=>{Ir.push(perf_hooks.performance.now());};function U(e=!1){let t=e?Ir[Ir.length-2]:Ir.pop(),s=perf_hooks.performance.now()-t;if(s<1e3)return `${s.toFixed(0)}ms`;let r=s/1e3;if(r<60)return `${r.toFixed(0)}s ${+s.toFixed(0).slice(1)}ms`;let n=(r/60).toFixed(0);return `${n}m ${r-60*Number(n)}s ${+s.toFixed(0).slice(1)}ms`}var R={};Wt(R,{esbuild:()=>Za,postcss:()=>el,request:()=>Qa,sass:()=>Xa,spawn:()=>fn,write:()=>Ka});function Hs(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var ga=()=>ha.homedir().replace(/\\/g,"/"),Ii=ga;var ji=/\s+at.*[(\s](.*)\)?/,ya=/^(?:(?:(?:node|node:[\w/]+|(?:(?:node:)?internal\/[\w/]*|.*node_modules\/(?:babel-polyfill|pirates)\/.*)?\w+)(?:\.js)?:\d+:\d+)|native)/;function Js(e,{pretty:t=!1,basePath:s}={}){let r=s&&new RegExp(`(file://)?${Hs(s.replace(/\\/g,"/"))}/?`,"g"),n=t?Ii():"";if(typeof e=="string")return e.replace(/\\/g,"/").split(`
41
- `).filter(i=>{let o=i.match(ji);if(o===null||!o[1])return !0;let a=o[1];return a.includes(".app/Contents/Resources/electron.asar")||a.includes(".app/Contents/Resources/default_app.asar")||a.includes("node_modules/electron/dist/resources/electron.asar")||a.includes("node_modules/electron/dist/resources/default_app.asar")?!1:!ya.test(a)}).filter(i=>i.trim()!=="").map(i=>(r&&(i=i.replace(r,"")),t&&(i=i.replace(ji,(o,a)=>o.replace(a,a.replace(n,"~")))),i)).join(`
42
- `)}function Ys({onlyFirst:e=!1}={}){let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}function at(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(Ys(),"")}var Gi=Et(Mi(),1),Wi=Et(Li(),1);function lt(e,t={}){if(typeof e!="string"||e.length===0||(t={ambiguousIsNarrow:!0,...t},e=at(e),e.length===0))return 0;e=e.replace((0, Wi.default)()," ");let s=t.ambiguousIsNarrow?1:2,r=0;for(let n of e){let i=n.codePointAt(0);if(i<=31||i>=127&&i<=159||i>=768&&i<=879)continue;switch(Gi.default.eastAsianWidth(n)){case"F":case"W":r+=2;break;case"A":r+=s;break;default:r+=1;}}return r}var Ui=(e=0)=>t=>`\x1B[${t+e}m`,Vi=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,zi=(e=0)=>(t,s,r)=>`\x1B[${38+e};2;${t};${s};${r}m`,z={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(z.modifier);var Fa=Object.keys(z.color),xa=Object.keys(z.bgColor);[...Fa,...xa];function Ca(){let e=new Map;for(let[t,s]of Object.entries(z)){for(let[r,n]of Object.entries(s))z[r]={open:`\x1B[${n[0]}m`,close:`\x1B[${n[1]}m`},s[r]=z[r],e.set(n[0],n[1]);Object.defineProperty(z,t,{value:s,enumerable:!1});}return Object.defineProperty(z,"codes",{value:e,enumerable:!1}),z.color.close="\x1B[39m",z.bgColor.close="\x1B[49m",z.color.ansi=Ui(),z.color.ansi256=Vi(),z.color.ansi16m=zi(),z.bgColor.ansi=Ui(10),z.bgColor.ansi256=Vi(10),z.bgColor.ansi16m=zi(10),Object.defineProperties(z,{rgbToAnsi256:{value:(t,s,r)=>t===s&&s===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(s/255*5)+Math.round(r/255*5),enumerable:!1},hexToRgb:{value:t=>{let s=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!s)return [0,0,0];let[r]=s;r.length===3&&(r=[...r].map(i=>i+i).join(""));let n=Number.parseInt(r,16);return [n>>16&255,n>>8&255,n&255]},enumerable:!1},hexToAnsi256:{value:t=>z.rgbToAnsi256(...z.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value:t=>{if(t<8)return 30+t;if(t<16)return 90+(t-8);let s,r,n;if(t>=232)s=((t-232)*10+8)/255,r=s,n=s;else {t-=16;let a=t%36;s=Math.floor(t/36)/5,r=Math.floor(a/6)/5,n=a%6/5;}let i=Math.max(s,r,n)*2;if(i===0)return 30;let o=30+(Math.round(n)<<2|Math.round(r)<<1|Math.round(s));return i===2&&(o+=60),o},enumerable:!1},rgbToAnsi:{value:(t,s,r)=>z.ansi256ToAnsi(z.rgbToAnsi256(t,s,r)),enumerable:!1},hexToAnsi:{value:t=>z.ansi256ToAnsi(z.hexToAnsi256(t)),enumerable:!1}}),z}var Ea=Ca(),sr=Ea;var Nr=new Set(["\x1B","\x9B"]),wa=39,Xs="\x07",Yi="[",Sa="]",Qi="m",Zs=`${Sa}8;;`,Hi=e=>`${Nr.values().next().value}${Yi}${e}${Qi}`,Ji=e=>`${Nr.values().next().value}${Zs}${e}${Xs}`,Ba=e=>e.split(" ").map(t=>lt(t)),Ks=(e,t,s)=>{let r=[...t],n=!1,i=!1,o=lt(at(e[e.length-1]));for(let[a,u]of r.entries()){let c=lt(u);if(o+c<=s?e[e.length-1]+=u:(e.push(u),o=0),Nr.has(u)&&(n=!0,i=r.slice(a+1).join("").startsWith(Zs)),n){i?u===Xs&&(n=!1,i=!1):u===Qi&&(n=!1);continue}o+=c,o===s&&a<r.length-1&&(e.push(""),o=0);}!o&&e[e.length-1].length>0&&e.length>1&&(e[e.length-2]+=e.pop());},ba=e=>{let t=e.split(" "),s=t.length;for(;s>0&&!(lt(t[s-1])>0);)s--;return s===t.length?e:t.slice(0,s).join(" ")+t.slice(s).join("")},va=(e,t,s={})=>{if(s.trim!==!1&&e.trim()==="")return "";let r="",n,i,o=Ba(e),a=[""];for(let[c,f]of e.split(" ").entries()){s.trim!==!1&&(a[a.length-1]=a[a.length-1].trimStart());let d=lt(a[a.length-1]);if(c!==0&&(d>=t&&(s.wordWrap===!1||s.trim===!1)&&(a.push(""),d=0),(d>0||s.trim===!1)&&(a[a.length-1]+=" ",d++)),s.hard&&o[c]>t){let h=t-d,w=1+Math.floor((o[c]-h-1)/t);Math.floor((o[c]-1)/t)<w&&a.push(""),Ks(a,f,t);continue}if(d+o[c]>t&&d>0&&o[c]>0){if(s.wordWrap===!1&&d<t){Ks(a,f,t);continue}a.push("");}if(d+o[c]>t&&s.wordWrap===!1){Ks(a,f,t);continue}a[a.length-1]+=f;}s.trim!==!1&&(a=a.map(c=>ba(c)));let u=[...a.join(`
43
- `)];for(let[c,f]of u.entries()){if(r+=f,Nr.has(f)){let{groups:h}=new RegExp(`(?:\\${Yi}(?<code>\\d+)m|\\${Zs}(?<uri>.*)${Xs})`).exec(u.slice(c).join(""))||{groups:{}};if(h.code!==void 0){let w=Number.parseFloat(h.code);n=w===wa?void 0:w;}else h.uri!==void 0&&(i=h.uri.length===0?void 0:h.uri);}let d=sr.codes.get(Number(n));u[c+1]===`
44
- `?(i&&(r+=Ji("")),n&&d&&(r+=Hi(d))):f===`
45
- `&&(n&&d&&(r+=Hi(n)),i&&(r+=Ji(i)));}return r};function ct(e,t,s){return String(e).normalize().replace(/\r\n/g,`
39
+ `)i=!1,a+=r(e,o,f),o=f;else if(!i&&d+h==="/*"){a+=e.slice(o,f),o=f,i=Ei,f++;continue}else if(i===Ei&&d+h==="*/"){f++,i=!1,a+=r(e,o,f+1),o=f+1;continue}else s&&!i&&(c!==-1?d==="}"||d==="]"?(a+=e.slice(o,f),u+=r(a,0,1)+a.slice(1),a="",o=f,c=-1):d!==" "&&d!==" "&&d!=="\r"&&d!==`
40
+ `&&(a+=e.slice(o,f),o=f,c=-1):d===","&&(u+=a+e.slice(o,f),a="",o=f,c=f));}return u+a+(i?r(e.slice(o)):e.slice(o))}var tr="hot.js.liquid",wi="hot.js";var Si=["style","script","svg","metafields","pages","sections","redirects","vscode"],Bi=[["input","source"],["output","theme"],["export","export"],["import","import"],["config","."]],bi=["assets","config","layout","customers","locales","sections","snippets","templates","metafields","pages","redirects"],vi=["templates","templates/customers","assets","config","layout","locales","sections","snippets"];var Ns=["b","kb","mb","gb","tb"],Ms=["assert","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"],qs=["You cannot use script minification without esbuild installed","and configured as a processor. Install esbuild and configure Syncify","to apply transforms to leverage script minification."],Ls="__injected_dirname__",Gs="__injected_filename__",Ws="__injected_import_meta_url__",Rr=/\.(mjs|cjs|ts|js|tsx|jsx)$/,Ai=/(\()(line\s[0-9]+)(\))(:)/g,$i=/(['"][\w\s]+['"])/g,Ti=/({{2}-?)([a-zA-Z0-9_\-.'"[\]]+)(-?}{2})/g,_i=/((?:www|http:|https:)+[^\s]+[\w])/g,ki=/(\/)(.*?)(\/)/g,Us={404:"The requested resource was not found.",400:"The request was not understood by the server, generally due to bad syntax or because the Content-Type header was not correctly set to application / json. This status is also returned when the request provides an invalid code parameter during the OAuth token exchange process.",303:"The response to the request can be found under a different URL in the Location header and can be retrieved using a GET method on that resource.",401:"The necessary authentication credentials are not present in the request or are incorrect",402:"The requested shop is currently frozen. The shop owner needs to log in to the shop's admin, and pay the outstanding balance to unfreeze the shop.",406:"The requested resource is only capable of generating content not acceptable according to the Accept headers sent in the request.",423:"The requested shop is currently locked. Shops are locked if they repeatedly exceed their API request limit. or if there is an issue with the account, such as a detected compromise or fraud risk.",403:"The server is refusing to respond to the request. This is generally because you have not requested the appropriate scope for this action.",501:"The requested endpoint is not available on that particular shop, e.g. requesting access to a Shopify Plus\u2013only API on a non-Plus shop. This response may also indicate that this endpoint is reserved for future use.",503:"The server is currently unavailable. Check the Shopify status page for reported service outages. See https://www.shopifystatus.com"};var Pr=new events.EventEmitter;function Ri(e){try{return JSON.parse(er(e).trim())}catch(t){throw new Error(t)}}function Ge(e,t){return t>1?`${e}s`:e}function bt(e){return he(e)?e.toString():j(e)||b(e)?JSON.stringify(e):String(e)}async function Pi(e,{format:t}){return t==="esm"?s=>import(s):zs(e)}function Oi(e){return e===".mjs"||e===".cjs"?"js":e.slice(1)}function Or(e){return e.charAt(0).toUpperCase()+e.slice(1)}function xe(e){return P(e)?Buffer.from(e).toString().length:e.toString().length}function Pe(e){if(e===0)return "0b";let t=parseInt(`${Math.floor(Math.log(e)/Math.log(1024))}`,10);return t===0?`${x(String(e))}${Ns[t]}`:`${x((e/1024**t).toFixed(1))}${Ns[t]}`}function Be(e,t){let s=xe(e),r=Pe(da.gzipSync(e).length),n=Pe(t),i=Pe(s),o=Pe(t-s);return {isSmaller:s>t||s===t,gzip:r,before:n,after:i,saved:o}}function rr(){let e=new Date,t=e.getHours(),s=e.getMinutes(),r=e.getSeconds(),n=p(":");return (t<10?`0${t}`:t)+n+(s<10?`0${s}`:s)+n+(r<10?`0${r}`:r)}function Vs(e){let t=e%10,s=e%100;return e+(t===1&&s!==11?"st":t===2&&s!==12?"nd":t===3&&s!==13?"rd":"th")}function zs(e){return fe(globalThis.require)?globalThis.require(e):module$1.createRequire((typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('out.js', document.baseURI).href)))(e)}function Xe(){return Math.random().toString(36).slice(2)}var Ir=[],jr=()=>U(!0),W=()=>{Ir.push(perf_hooks.performance.now());};function U(e=!1){let t=e?Ir[Ir.length-2]:Ir.pop(),s=perf_hooks.performance.now()-t;if(s<1e3)return `${s.toFixed(0)}ms`;let r=s/1e3;if(r<60)return `${r.toFixed(0)}s ${+s.toFixed(0).slice(1)}ms`;let n=(r/60).toFixed(0);return `${n}m ${r-60*Number(n)}s ${+s.toFixed(0).slice(1)}ms`}var R={};Wt(R,{esbuild:()=>Za,postcss:()=>el,request:()=>Qa,sass:()=>Xa,spawn:()=>fn,write:()=>Ka});function Hs(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var ga=()=>ha.homedir().replace(/\\/g,"/"),ji=ga;var Ni=/\s+at.*[(\s](.*)\)?/,ya=/^(?:(?:(?:node|node:[\w/]+|(?:(?:node:)?internal\/[\w/]*|.*node_modules\/(?:babel-polyfill|pirates)\/.*)?\w+)(?:\.js)?:\d+:\d+)|native)/;function Js(e,{pretty:t=!1,basePath:s}={}){let r=s&&new RegExp(`(file://)?${Hs(s.replace(/\\/g,"/"))}/?`,"g"),n=t?ji():"";if(typeof e=="string")return e.replace(/\\/g,"/").split(`
41
+ `).filter(i=>{let o=i.match(Ni);if(o===null||!o[1])return !0;let a=o[1];return a.includes(".app/Contents/Resources/electron.asar")||a.includes(".app/Contents/Resources/default_app.asar")||a.includes("node_modules/electron/dist/resources/electron.asar")||a.includes("node_modules/electron/dist/resources/default_app.asar")?!1:!ya.test(a)}).filter(i=>i.trim()!=="").map(i=>(r&&(i=i.replace(r,"")),t&&(i=i.replace(Ni,(o,a)=>o.replace(a,a.replace(n,"~")))),i)).join(`
42
+ `)}function Ys({onlyFirst:e=!1}={}){let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}function at(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(Ys(),"")}var Wi=Et(qi(),1),Ui=Et(Gi(),1);function lt(e,t={}){if(typeof e!="string"||e.length===0||(t={ambiguousIsNarrow:!0,...t},e=at(e),e.length===0))return 0;e=e.replace((0, Ui.default)()," ");let s=t.ambiguousIsNarrow?1:2,r=0;for(let n of e){let i=n.codePointAt(0);if(i<=31||i>=127&&i<=159||i>=768&&i<=879)continue;switch(Wi.default.eastAsianWidth(n)){case"F":case"W":r+=2;break;case"A":r+=s;break;default:r+=1;}}return r}var Vi=(e=0)=>t=>`\x1B[${t+e}m`,zi=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,Hi=(e=0)=>(t,s,r)=>`\x1B[${38+e};2;${t};${s};${r}m`,z={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(z.modifier);var Fa=Object.keys(z.color),xa=Object.keys(z.bgColor);[...Fa,...xa];function Ca(){let e=new Map;for(let[t,s]of Object.entries(z)){for(let[r,n]of Object.entries(s))z[r]={open:`\x1B[${n[0]}m`,close:`\x1B[${n[1]}m`},s[r]=z[r],e.set(n[0],n[1]);Object.defineProperty(z,t,{value:s,enumerable:!1});}return Object.defineProperty(z,"codes",{value:e,enumerable:!1}),z.color.close="\x1B[39m",z.bgColor.close="\x1B[49m",z.color.ansi=Vi(),z.color.ansi256=zi(),z.color.ansi16m=Hi(),z.bgColor.ansi=Vi(10),z.bgColor.ansi256=zi(10),z.bgColor.ansi16m=Hi(10),Object.defineProperties(z,{rgbToAnsi256:{value:(t,s,r)=>t===s&&s===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(s/255*5)+Math.round(r/255*5),enumerable:!1},hexToRgb:{value:t=>{let s=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!s)return [0,0,0];let[r]=s;r.length===3&&(r=[...r].map(i=>i+i).join(""));let n=Number.parseInt(r,16);return [n>>16&255,n>>8&255,n&255]},enumerable:!1},hexToAnsi256:{value:t=>z.rgbToAnsi256(...z.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value:t=>{if(t<8)return 30+t;if(t<16)return 90+(t-8);let s,r,n;if(t>=232)s=((t-232)*10+8)/255,r=s,n=s;else {t-=16;let a=t%36;s=Math.floor(t/36)/5,r=Math.floor(a/6)/5,n=a%6/5;}let i=Math.max(s,r,n)*2;if(i===0)return 30;let o=30+(Math.round(n)<<2|Math.round(r)<<1|Math.round(s));return i===2&&(o+=60),o},enumerable:!1},rgbToAnsi:{value:(t,s,r)=>z.ansi256ToAnsi(z.rgbToAnsi256(t,s,r)),enumerable:!1},hexToAnsi:{value:t=>z.ansi256ToAnsi(z.hexToAnsi256(t)),enumerable:!1}}),z}var Ea=Ca(),sr=Ea;var Nr=new Set(["\x1B","\x9B"]),wa=39,Xs="\x07",Qi="[",Sa="]",Ki="m",Zs=`${Sa}8;;`,Ji=e=>`${Nr.values().next().value}${Qi}${e}${Ki}`,Yi=e=>`${Nr.values().next().value}${Zs}${e}${Xs}`,Ba=e=>e.split(" ").map(t=>lt(t)),Ks=(e,t,s)=>{let r=[...t],n=!1,i=!1,o=lt(at(e[e.length-1]));for(let[a,u]of r.entries()){let c=lt(u);if(o+c<=s?e[e.length-1]+=u:(e.push(u),o=0),Nr.has(u)&&(n=!0,i=r.slice(a+1).join("").startsWith(Zs)),n){i?u===Xs&&(n=!1,i=!1):u===Ki&&(n=!1);continue}o+=c,o===s&&a<r.length-1&&(e.push(""),o=0);}!o&&e[e.length-1].length>0&&e.length>1&&(e[e.length-2]+=e.pop());},ba=e=>{let t=e.split(" "),s=t.length;for(;s>0&&!(lt(t[s-1])>0);)s--;return s===t.length?e:t.slice(0,s).join(" ")+t.slice(s).join("")},va=(e,t,s={})=>{if(s.trim!==!1&&e.trim()==="")return "";let r="",n,i,o=Ba(e),a=[""];for(let[c,f]of e.split(" ").entries()){s.trim!==!1&&(a[a.length-1]=a[a.length-1].trimStart());let d=lt(a[a.length-1]);if(c!==0&&(d>=t&&(s.wordWrap===!1||s.trim===!1)&&(a.push(""),d=0),(d>0||s.trim===!1)&&(a[a.length-1]+=" ",d++)),s.hard&&o[c]>t){let h=t-d,w=1+Math.floor((o[c]-h-1)/t);Math.floor((o[c]-1)/t)<w&&a.push(""),Ks(a,f,t);continue}if(d+o[c]>t&&d>0&&o[c]>0){if(s.wordWrap===!1&&d<t){Ks(a,f,t);continue}a.push("");}if(d+o[c]>t&&s.wordWrap===!1){Ks(a,f,t);continue}a[a.length-1]+=f;}s.trim!==!1&&(a=a.map(c=>ba(c)));let u=[...a.join(`
43
+ `)];for(let[c,f]of u.entries()){if(r+=f,Nr.has(f)){let{groups:h}=new RegExp(`(?:\\${Qi}(?<code>\\d+)m|\\${Zs}(?<uri>.*)${Xs})`).exec(u.slice(c).join(""))||{groups:{}};if(h.code!==void 0){let w=Number.parseFloat(h.code);n=w===wa?void 0:w;}else h.uri!==void 0&&(i=h.uri.length===0?void 0:h.uri);}let d=sr.codes.get(Number(n));u[c+1]===`
44
+ `?(i&&(r+=Yi("")),n&&d&&(r+=Ji(d))):f===`
45
+ `&&(n&&d&&(r+=Ji(n)),i&&(r+=Yi(i)));}return r};function ct(e,t,s){return String(e).normalize().replace(/\r\n/g,`
46
46
  `).split(`
47
47
  `).map(r=>va(r,t,s)).join(`
48
- `)}var ae={};Wt(ae,{clear:()=>Dt,closer:()=>Ur,context:()=>Ae,indent:()=>st,message:()=>ln,multiline:()=>cn,opener:()=>Wr,sample:()=>mt,shopify:()=>Vr,stack:()=>ao,suffix:()=>Y});var ve={};Wt(ve,{arrow:()=>pt,blue:()=>be,blueBright:()=>nn,bold:()=>x,check:()=>Ha,clear:()=>Va,close:()=>an,colon:()=>S,cyan:()=>T,cyanBright:()=>Ia,gray:()=>p,green:()=>Na,greenBright:()=>Ma,italic:()=>La,lightGray:()=>ir,line:()=>g,lpr:()=>Ja,magenta:()=>Lr,magentaBright:()=>qa,neonCyan:()=>un,neonGreen:()=>oo,neonRouge:()=>Ua,newline:()=>ft,open:()=>or,orange:()=>Wa,pink:()=>Ue,purge:()=>za,red:()=>$,redBright:()=>ja,reset:()=>nr,rpr:()=>Ya,strike:()=>Ga,time:()=>ur,underline:()=>on,warning:()=>Gr,white:()=>se,whiteBright:()=>rt,yellow:()=>qr,yellowBright:()=>K});var tt=Et(io());var{cyan:T,cyanBright:Ia,red:$,redBright:ja,green:Na,greenBright:Ma,yellow:qr,yellowBright:K,magenta:Lr,magentaBright:qa,blue:be,blueBright:nn,white:se,whiteBright:rt,gray:p,underline:on,bold:x,reset:nr,italic:La,strike:Ga}=tt.default,ir=tt.default.hex("#2a2a2e"),Ue=tt.default.hex("#ff75d1"),Wa=tt.default.hex("#FFAB40"),oo=tt.default.hex("#56ef83"),un=tt.default.hex("#69d5fd"),Ua=tt.default.hex("#D47179"),or=ir("\u250C\u2500 "),g={gray:ir("\u2502 "),red:$.dim("\u2502 "),yellow:qr.dim("\u2502 ")},ft=ir(`${y}\u2502${y}`),an=ir("\u2514\u2500 "),Va="\x1B[H\x1B[2J",za="\x1B[2J\x1B[3J\x1B[H\x1Bc",Ha=oo("\u2713 "),S=p(": "),pt=p(" \u2192 "),Ja=p("("),Ya=p(")"),Gr=K(` ~ Type ${x("w")} and press ${x("enter")} to view`),ur=e=>e?nr.gray(` ~ ${e}`):E;var ao=E;function Dt(){let e=process.stdout.rows-2,t=e>0?_(e):E;A(t),uo.cursorTo(process.stdout,0,0),uo.clearScreenDown(process.stdout);}function Y(e,t,s){return (t==="invalid"||t==="failed"?g.red:t==="warning"?g.yellow:g.gray)+ve[e](t)+Me(10-t.length)+pt+ve[e](s)}function Wr(e){return y+or+p(`${e} ~ ${rr()}`)}function Ur(e){return g.gray+y+an+p(`${e} ~ ${rr()}`)}function ln(e,t){return g.gray+ve[e](t)}function Vr(e){let t=b(e)?e.map(Vr).join(y):$(e).replace(vi,p("$1")+se("$2")+p("$3")+se("$4")+_(2)).replace(Ai,K.bold("$1")).replace($i,T("$1")+rt("$2")+T("$3")).replace(Ti,on("$1")).replace(_i,Lr("$1")+T("$2")+Lr("$3"));return st(t,{line:g.red})}function mt(e,t={}){let s=m("line",t)?t.line:g.gray;if(Re("span.start",t)){let r=m("end",t.span)?t.span.end:t.span.start+1,n=`${s}${be(`${t.span.start-1}`)}${S+y}${s}${be(`${t.span.start}`)}${S} ${e+y}${s}${be(`${r}`)}${S+y}`;return s+y+n}return s+y+s+e}function st(e,t={}){let s=b(e)?e:e.split(y),r=m("line",t)?t.line:g.gray,n=m("nwl",t)?`${r+y}`:E;for(;s.length!==0;){let i=s.shift();i.trim().length>0?i.trim().startsWith(r)?n+=(m("text",t)?t.text(i):i)+y:n+=r+(m("text",t)?t.text(i.trimStart()):i.trimStart())+y:n+=r+y;}return n}function Ae(e){let t=0,s=g.red+y;for(let r in e.entries)t<r.length&&(t=r.length);for(let r in e.entries)s+=g.red+$(r)+S+Me(t-r.length)+p(`${e.entries[r]}`)+y;return e.stack&&(ao=e.stack,s+=g.red+$("stack")+S+Me(t-5)+p(`Type ${x("s")} and press ${x("enter")} to view stack trace`)+y+g.gray),s}function cn(e,t){let s=g.gray,r=se;e==="error"?(s=g.red,r=$):e==="warning"&&(s=g.yellow,r=K);let n=[],i=process.stdout.columns-5,o=t.trim(),a=ct(o,i).split(y);for(;a.length!==0;){let u=a.shift();u.trim().length>0&&n.push(s+r(u));}return s+y+n.join(y)}function fn(e){let t=[],s=[g.red],r=e.search(/(?:\n {4}at .*)/),n=process.stdout.columns-5,i=[];if(/\berror\b:?/i.test(e)&&r>0){i=e.slice(0,r).split(y);let o=Js(e.slice(r),{pretty:!0,basePath:l.cwd}),a=ct(o,n).split(y);for(s.push(y);a.length!==0;){let u=a.shift();u.trim().length>0&&s.push(nr(g.red+u));}}for(i.length===0&&(i=e.split(y));i.length!==0;){let o=i.shift();o.trim().length>0&&t.push(nr(g.gray)+o);}Q(`${t.join(y)}${s.length>1?s.join(y):E}`);}function Qa(e,t){console.log(t);let s=Re("error.asset",t.data)?t.data.error.asset:Re("errors.asset",t.data)?t.data.errors.asset:null;t.status===422?Q(g.red+y+Vr(s)+Ae({stack:!1,entries:{source:`~${e}`,status:t.status,message:t.statusText,details:"Shopify has not accepted the request."}})):t.status in Us?Q(g.red+y+cn("error",Us[t.status])+Ae({stack:!1,entries:{source:`~${e}`,status:t.status,message:t.statusText}})):Q(g.red+y+$("Unknown error has occured")+Ae({stack:!1,entries:{source:`~${e}`,status:t.status,message:t.statusText}}));}var Ka=(e,t)=>s=>{Q(st(e,{nwl:!0,line:g.red,text:$.bold})+Ae({stack:s.stack,entries:{...t,code:s.code,name:s.name,details:s.message}}));};function Xa(e,t){Q(st(t.message,{nwl:!0,line:g.red,text:$})+Ae({stack:t.sassStack,entries:{input:e.relative,message:t.sassMessage}}));}function Za(e){Q(st(e.text,{nwl:!0,line:g.red,text:$})+mt(e.location.lineText,{line:g.red,span:{start:e.location.line,end:e.location.line+1}})+Ae({stack:!1,entries:{file:e.location.file,column:e.location.column,line:e.location.line,plugin:e.pluginName}}));}function el(e){}var pn=new Map;function co(e){let t=new stream.PassThrough,s=new stream.PassThrough;t.write=n=>e("stdout",n),s.write=n=>e("stderr",n);let r=new console$1.Console(t,s);for(let n of Ms)pn.set(n,console[n]),console[n]=r[n];return ()=>{for(let n of Ms)console[n]=pn.get(n);pn.clear();}}var N="\x1B[",ar="\x1B]",vt="\x07",zr=";",fo=process.env.TERM_PROGRAM==="Apple_Terminal",k={};k.cursorTo=(e,t)=>{if(typeof e!="number")throw new TypeError("The `x` argument is required");return typeof t!="number"?N+(e+1)+"G":N+(t+1)+";"+(e+1)+"H"};k.cursorMove=(e,t)=>{if(typeof e!="number")throw new TypeError("The `x` argument is required");let s="";return e<0?s+=N+-e+"D":e>0&&(s+=N+e+"C"),t<0?s+=N+-t+"A":t>0&&(s+=N+t+"B"),s};k.cursorUp=(e=1)=>N+e+"A";k.cursorDown=(e=1)=>N+e+"B";k.cursorForward=(e=1)=>N+e+"C";k.cursorBackward=(e=1)=>N+e+"D";k.cursorLeft=N+"G";k.cursorSavePosition=fo?"\x1B7":N+"s";k.cursorRestorePosition=fo?"\x1B8":N+"u";k.cursorGetPosition=N+"6n";k.cursorNextLine=N+"E";k.cursorPrevLine=N+"F";k.cursorHide=N+"?25l";k.cursorShow=N+"?25h";k.eraseLines=e=>{let t="";for(let s=0;s<e;s++)t+=k.eraseLine+(s<e-1?k.cursorUp():"");return e&&(t+=k.cursorLeft),t};k.eraseEndLine=N+"K";k.eraseStartLine=N+"1K";k.eraseLine=N+"2K";k.eraseDown=N+"J";k.eraseUp=N+"1J";k.eraseScreen=N+"2J";k.scrollUp=N+"S";k.scrollDown=N+"T";k.clearScreen="\x1Bc";k.clearTerminal=process.platform==="win32"?`${k.eraseScreen}${N}0f`:`${k.eraseScreen}${N}3J${N}H`;k.beep=vt;k.link=(e,t)=>[ar,"8",zr,zr,t,vt,e,ar,"8",zr,zr,vt].join("");k.image=(e,t={})=>{let s=`${ar}1337;File=inline=1`;return t.width&&(s+=`;width=${t.width}`),t.height&&(s+=`;height=${t.height}`),t.preserveAspectRatio===!1&&(s+=";preserveAspectRatio=0"),s+":"+e.toString("base64")+vt};k.iTerm={setCwd:(e=process.cwd())=>`${ar}50;CurrentDir=${e}${vt}`,annotation:(e,t={})=>{let s=`${ar}1337;`,r=typeof t.x<"u",n=typeof t.y<"u";if((r||n)&&!(r&&n&&typeof t.length<"u"))throw new Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");return e=e.replace(/\|/g,""),s+=t.isHidden?"AddHiddenAnnotation=":"AddAnnotation=",t.length>0?s+=(r?[e,t.length,t.x,t.y]:[t.length,e]).join("|"):s+=e,s+vt}};var Dn=k;var wo=Et(ho(),1),So=Et(Eo(),1);var nl=(0, wo.default)(()=>{(0, So.default)(()=>{bo.stderr.write("\x1B[?25h");},{alwaysLast:!0});}),Bo=nl;var Zr=!1,_t={};_t.show=(e=bo.stderr)=>{!e.isTTY||(Zr=!1,e.write("\x1B[?25h"));};_t.hide=(e=bo.stderr)=>{!e.isTTY||(Bo(),Zr=!0,e.write("\x1B[?25l"));};_t.toggle=(e,t)=>{e!==void 0&&(Zr=e),Zr?_t.show(t):_t.hide(t);};var gn=_t;function yn(e){return Number.isInteger(e)?e>=4352&&(e<=4447||e===9001||e===9002||11904<=e&&e<=12871&&e!==12351||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141):!1}var il=/^[\uD800-\uDBFF][\uDC00-\uDFFF]$/,Ao=["\x1B","\x9B"],es=e=>`${Ao[0]}[${e}m`,vo=(e,t,s)=>{let r=[];e=[...e];for(let n of e){let i=n;n.includes(";")&&(n=n.split(";")[0][0]+"0");let o=sr.codes.get(Number.parseInt(n,10));if(o){let a=e.indexOf(o.toString());a===-1?r.push(es(t?o:i)):e.splice(a,1);}else if(t){r.push(es(0));break}else r.push(es(i));}if(t&&(r=r.filter((n,i)=>r.indexOf(n)===i),s!==void 0)){let n=es(sr.codes.get(Number.parseInt(s,10)));r=r.reduce((i,o)=>o===n?[o,...i]:[...i,o],[]);}return r.join("")};function Fn(e,t,s){let r=[...e],n=[],i=typeof s=="number"?s:r.length,o=!1,a,u=0,c="";for(let[f,d]of r.entries()){let h=!1;if(Ao.includes(d)){let w=/\d[^m]*/.exec(e.slice(f,f+18));a=w&&w.length>0?w[0]:void 0,u<i&&(o=!0,a!==void 0&&n.push(a));}else o&&d==="m"&&(o=!1,h=!0);if(!o&&!h&&u++,!il.test(d)&&yn(d.codePointAt())&&(u++,typeof s!="number"&&i++),u>t&&u<=i)c+=d;else if(u===t&&!o&&a!==void 0)c=vo(n);else if(u>=i){c+=vo(n,!0,a);break}}return c}var ol=24,ts=e=>{let{columns:t}=e;return t||80},ul=(e,t)=>{let s=e.rows||ol,r=t.split(`
48
+ `)}var ae={};Wt(ae,{clear:()=>Dt,closer:()=>Ur,context:()=>Ae,indent:()=>st,message:()=>ln,multiline:()=>cn,opener:()=>Wr,sample:()=>mt,shopify:()=>Vr,stack:()=>lo,suffix:()=>Y});var ve={};Wt(ve,{arrow:()=>pt,blue:()=>be,blueBright:()=>nn,bold:()=>x,check:()=>Ha,clear:()=>Va,close:()=>an,colon:()=>S,cyan:()=>T,cyanBright:()=>Ia,gray:()=>p,green:()=>Na,greenBright:()=>Ma,italic:()=>La,lightGray:()=>ir,line:()=>g,lpr:()=>Ja,magenta:()=>Lr,magentaBright:()=>qa,neonCyan:()=>un,neonGreen:()=>uo,neonRouge:()=>Ua,newline:()=>ft,open:()=>or,orange:()=>Wa,pink:()=>Ue,purge:()=>za,red:()=>$,redBright:()=>ja,reset:()=>nr,rpr:()=>Ya,strike:()=>Ga,time:()=>ur,underline:()=>on,warning:()=>Gr,white:()=>se,whiteBright:()=>rt,yellow:()=>qr,yellowBright:()=>K});var tt=Et(oo());var{cyan:T,cyanBright:Ia,red:$,redBright:ja,green:Na,greenBright:Ma,yellow:qr,yellowBright:K,magenta:Lr,magentaBright:qa,blue:be,blueBright:nn,white:se,whiteBright:rt,gray:p,underline:on,bold:x,reset:nr,italic:La,strike:Ga}=tt.default,ir=tt.default.hex("#2a2a2e"),Ue=tt.default.hex("#ff75d1"),Wa=tt.default.hex("#FFAB40"),uo=tt.default.hex("#56ef83"),un=tt.default.hex("#69d5fd"),Ua=tt.default.hex("#D47179"),or=ir("\u250C\u2500 "),g={gray:ir("\u2502 "),red:$.dim("\u2502 "),yellow:qr.dim("\u2502 ")},ft=ir(`${y}\u2502${y}`),an=ir("\u2514\u2500 "),Va="\x1B[H\x1B[2J",za="\x1B[2J\x1B[3J\x1B[H\x1Bc",Ha=uo("\u2713 "),S=p(": "),pt=p(" \u2192 "),Ja=p("("),Ya=p(")"),Gr=K(` ~ Type ${x("w")} and press ${x("enter")} to view`),ur=e=>e?nr.gray(` ~ ${e}`):E;var lo=E;function Dt(){let e=process.stdout.rows-2,t=e>0?_(e):E;A(t),ao.cursorTo(process.stdout,0,0),ao.clearScreenDown(process.stdout);}function Y(e,t,s){return (t==="invalid"||t==="failed"?g.red:t==="warning"?g.yellow:g.gray)+ve[e](t)+Me(10-t.length)+pt+ve[e](s)}function Wr(e){return y+or+p(`${e} ~ ${rr()}`)}function Ur(e){return g.gray+y+an+p(`${e} ~ ${rr()}`)}function ln(e,t){return g.gray+ve[e](t)}function Vr(e){let t=b(e)?e.map(Vr).join(y):$(e).replace(Ai,p("$1")+se("$2")+p("$3")+se("$4")+_(2)).replace($i,K.bold("$1")).replace(Ti,T("$1")+rt("$2")+T("$3")).replace(_i,on("$1")).replace(ki,Lr("$1")+T("$2")+Lr("$3"));return st(t,{line:g.red})}function mt(e,t={}){let s=m("line",t)?t.line:g.gray;if(Re("span.start",t)){let r=m("end",t.span)?t.span.end:t.span.start+1,n=`${s}${be(`${t.span.start-1}`)}${S+y}${s}${be(`${t.span.start}`)}${S} ${e+y}${s}${be(`${r}`)}${S+y}`;return s+y+n}return s+y+s+e}function st(e,t={}){let s=b(e)?e:e.split(y),r=m("line",t)?t.line:g.gray,n=m("nwl",t)?`${r+y}`:E;for(;s.length!==0;){let i=s.shift();i.trim().length>0?i.trim().startsWith(r)?n+=(m("text",t)?t.text(i):i)+y:n+=r+(m("text",t)?t.text(i.trimStart()):i.trimStart())+y:n+=r+y;}return n}function Ae(e){let t=0,s=g.red+y;for(let r in e.entries)t<r.length&&(t=r.length);for(let r in e.entries)s+=g.red+$(r)+S+Me(t-r.length)+p(`${e.entries[r]}`)+y;return e.stack&&(lo=e.stack,s+=g.red+$("stack")+S+Me(t-5)+p(`Type ${x("s")} and press ${x("enter")} to view stack trace`)+y+g.gray),s}function cn(e,t){let s=g.gray,r=se;e==="error"?(s=g.red,r=$):e==="warning"&&(s=g.yellow,r=K);let n=[],i=process.stdout.columns-5,o=t.trim(),a=ct(o,i).split(y);for(;a.length!==0;){let u=a.shift();u.trim().length>0&&n.push(s+r(u));}return s+y+n.join(y)}function fn(e){let t=[],s=[g.red],r=e.search(/(?:\n {4}at .*)/),n=process.stdout.columns-5,i=[];if(/\berror\b:?/i.test(e)&&r>0){i=e.slice(0,r).split(y);let o=Js(e.slice(r),{pretty:!0,basePath:l.cwd}),a=ct(o,n).split(y);for(s.push(y);a.length!==0;){let u=a.shift();u.trim().length>0&&s.push(nr(g.red+u));}}for(i.length===0&&(i=e.split(y));i.length!==0;){let o=i.shift();o.trim().length>0&&t.push(nr(g.gray)+o);}Q(`${t.join(y)}${s.length>1?s.join(y):E}`);}function Qa(e,t){console.log(t);let s=Re("error.asset",t.data)?t.data.error.asset:Re("errors.asset",t.data)?t.data.errors.asset:null;t.status===422?Q(g.red+y+Vr(s)+Ae({stack:!1,entries:{source:`~${e}`,status:t.status,message:t.statusText,details:"Shopify has not accepted the request."}})):t.status in Us?Q(g.red+y+cn("error",Us[t.status])+Ae({stack:!1,entries:{source:`~${e}`,status:t.status,message:t.statusText}})):Q(g.red+y+$("Unknown error has occured")+Ae({stack:!1,entries:{source:`~${e}`,status:t.status,message:t.statusText}}));}var Ka=(e,t)=>s=>{Q(st(e,{nwl:!0,line:g.red,text:$.bold})+Ae({stack:s.stack,entries:{...t,code:s.code,name:s.name,details:s.message}}));};function Xa(e,t){Q(st(t.message,{nwl:!0,line:g.red,text:$})+Ae({stack:t.sassStack,entries:{input:e.relative,message:t.sassMessage}}));}function Za(e){Q(st(e.text,{nwl:!0,line:g.red,text:$})+mt(e.location.lineText,{line:g.red,span:{start:e.location.line,end:e.location.line+1}})+Ae({stack:!1,entries:{file:e.location.file,column:e.location.column,line:e.location.line,plugin:e.pluginName}}));}function el(e){}var pn=new Map;function fo(e){let t=new stream.PassThrough,s=new stream.PassThrough;t.write=n=>e("stdout",n),s.write=n=>e("stderr",n);let r=new console$1.Console(t,s);for(let n of Ms)pn.set(n,console[n]),console[n]=r[n];return ()=>{for(let n of Ms)console[n]=pn.get(n);pn.clear();}}var N="\x1B[",ar="\x1B]",vt="\x07",zr=";",po=process.env.TERM_PROGRAM==="Apple_Terminal",k={};k.cursorTo=(e,t)=>{if(typeof e!="number")throw new TypeError("The `x` argument is required");return typeof t!="number"?N+(e+1)+"G":N+(t+1)+";"+(e+1)+"H"};k.cursorMove=(e,t)=>{if(typeof e!="number")throw new TypeError("The `x` argument is required");let s="";return e<0?s+=N+-e+"D":e>0&&(s+=N+e+"C"),t<0?s+=N+-t+"A":t>0&&(s+=N+t+"B"),s};k.cursorUp=(e=1)=>N+e+"A";k.cursorDown=(e=1)=>N+e+"B";k.cursorForward=(e=1)=>N+e+"C";k.cursorBackward=(e=1)=>N+e+"D";k.cursorLeft=N+"G";k.cursorSavePosition=po?"\x1B7":N+"s";k.cursorRestorePosition=po?"\x1B8":N+"u";k.cursorGetPosition=N+"6n";k.cursorNextLine=N+"E";k.cursorPrevLine=N+"F";k.cursorHide=N+"?25l";k.cursorShow=N+"?25h";k.eraseLines=e=>{let t="";for(let s=0;s<e;s++)t+=k.eraseLine+(s<e-1?k.cursorUp():"");return e&&(t+=k.cursorLeft),t};k.eraseEndLine=N+"K";k.eraseStartLine=N+"1K";k.eraseLine=N+"2K";k.eraseDown=N+"J";k.eraseUp=N+"1J";k.eraseScreen=N+"2J";k.scrollUp=N+"S";k.scrollDown=N+"T";k.clearScreen="\x1Bc";k.clearTerminal=process.platform==="win32"?`${k.eraseScreen}${N}0f`:`${k.eraseScreen}${N}3J${N}H`;k.beep=vt;k.link=(e,t)=>[ar,"8",zr,zr,t,vt,e,ar,"8",zr,zr,vt].join("");k.image=(e,t={})=>{let s=`${ar}1337;File=inline=1`;return t.width&&(s+=`;width=${t.width}`),t.height&&(s+=`;height=${t.height}`),t.preserveAspectRatio===!1&&(s+=";preserveAspectRatio=0"),s+":"+e.toString("base64")+vt};k.iTerm={setCwd:(e=process.cwd())=>`${ar}50;CurrentDir=${e}${vt}`,annotation:(e,t={})=>{let s=`${ar}1337;`,r=typeof t.x<"u",n=typeof t.y<"u";if((r||n)&&!(r&&n&&typeof t.length<"u"))throw new Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");return e=e.replace(/\|/g,""),s+=t.isHidden?"AddHiddenAnnotation=":"AddAnnotation=",t.length>0?s+=(r?[e,t.length,t.x,t.y]:[t.length,e]).join("|"):s+=e,s+vt}};var Dn=k;var So=Et(go(),1),Bo=Et(wo(),1);var nl=(0, So.default)(()=>{(0, Bo.default)(()=>{vo.stderr.write("\x1B[?25h");},{alwaysLast:!0});}),bo=nl;var Zr=!1,_t={};_t.show=(e=vo.stderr)=>{!e.isTTY||(Zr=!1,e.write("\x1B[?25h"));};_t.hide=(e=vo.stderr)=>{!e.isTTY||(bo(),Zr=!0,e.write("\x1B[?25l"));};_t.toggle=(e,t)=>{e!==void 0&&(Zr=e),Zr?_t.show(t):_t.hide(t);};var gn=_t;function yn(e){return Number.isInteger(e)?e>=4352&&(e<=4447||e===9001||e===9002||11904<=e&&e<=12871&&e!==12351||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141):!1}var il=/^[\uD800-\uDBFF][\uDC00-\uDFFF]$/,$o=["\x1B","\x9B"],es=e=>`${$o[0]}[${e}m`,Ao=(e,t,s)=>{let r=[];e=[...e];for(let n of e){let i=n;n.includes(";")&&(n=n.split(";")[0][0]+"0");let o=sr.codes.get(Number.parseInt(n,10));if(o){let a=e.indexOf(o.toString());a===-1?r.push(es(t?o:i)):e.splice(a,1);}else if(t){r.push(es(0));break}else r.push(es(i));}if(t&&(r=r.filter((n,i)=>r.indexOf(n)===i),s!==void 0)){let n=es(sr.codes.get(Number.parseInt(s,10)));r=r.reduce((i,o)=>o===n?[o,...i]:[...i,o],[]);}return r.join("")};function Fn(e,t,s){let r=[...e],n=[],i=typeof s=="number"?s:r.length,o=!1,a,u=0,c="";for(let[f,d]of r.entries()){let h=!1;if($o.includes(d)){let w=/\d[^m]*/.exec(e.slice(f,f+18));a=w&&w.length>0?w[0]:void 0,u<i&&(o=!0,a!==void 0&&n.push(a));}else o&&d==="m"&&(o=!1,h=!0);if(!o&&!h&&u++,!il.test(d)&&yn(d.codePointAt())&&(u++,typeof s!="number"&&i++),u>t&&u<=i)c+=d;else if(u===t&&!o&&a!==void 0)c=Ao(n);else if(u>=i){c+=Ao(n,!0,a);break}}return c}var ol=24,ts=e=>{let{columns:t}=e;return t||80},ul=(e,t)=>{let s=e.rows||ol,r=t.split(`
49
49
  `),n=r.length-s;return n<=0?t:Fn(t,at(r.slice(0,n).join(`
50
- `)).length+1)};function To(e,{showCursor:t=!1}={}){let s=0,r=ts(e),n="",i=(...o)=>{t||gn.hide();let a=o.join(" ")+`
50
+ `)).length+1)};function _o(e,{showCursor:t=!1}={}){let s=0,r=ts(e),n="",i=(...o)=>{t||gn.hide();let a=o.join(" ")+`
51
51
  `;a=ul(e,a);let u=ts(e);a===n&&r===u||(n=a,r=u,a=ct(a,u,{trim:!1,hard:!0,wordWrap:!1}),e.write(Dn.eraseLines(s)+a),s=a.split(`
52
- `).length);};return i.clear=()=>{e.write(Dn.eraseLines(s)),n="",r=ts(e),s=0;},i.done=()=>{n="",r=ts(e),s=0,t||gn.show();},i}var al=To(bo.stdout),_o=al;To(bo.stderr);var gt={};function $e(e){return m(e,gt)||(gt[e]=[]),(t,s)=>{q(s)?gt[e].push(g.yellow+K(t)):gt[e].push(g.yellow+K(t+S+de+x(s)));}}function I(e,t,s,r){Q(_(2),$(`${x(`Invalid ${T(e)} type value provided`)}`)+_(2),$(`The ${T(t)} option has an incorrect type value`)+_(2),$(`provided${S}${K(oe(s).toLowerCase())}`)+y,$(`expected${S}${be(r.replace(/([|,])/g,p("$1")))}`)+_(2),$(`at${S}${p.underline(l.file)}`)+_(2),se.bold("How to fix?")+S+y,`
52
+ `).length);};return i.clear=()=>{e.write(Dn.eraseLines(s)),n="",r=ts(e),s=0;},i.done=()=>{n="",r=ts(e),s=0,t||gn.show();},i}var al=_o(vo.stdout),ko=al;_o(vo.stderr);var gt={};function $e(e){return m(e,gt)||(gt[e]=[]),(t,s)=>{q(s)?gt[e].push(g.yellow+K(t)):gt[e].push(g.yellow+K(t+S+de+x(s)));}}function I(e,t,s,r){Q(_(2),$(`${x(`Invalid ${T(e)} type value provided`)}`)+_(2),$(`The ${T(t)} option has an incorrect type value`)+_(2),$(`provided${S}${K(oe(s).toLowerCase())}`)+y,$(`expected${S}${be(r.replace(/([|,])/g,p("$1")))}`)+_(2),$(`at${S}${p.underline(l.file)}`)+_(2),se.bold("How to fix?")+S+y,`
53
53
  ${p("You need to change the option value to use the")} ${be("expected")} ${p("type.")}
54
54
  ${p(`Use the ${T("defineConfig")} named export for type checking`)}
55
55
  `),process.exit(0);}function Te(e){P(e)?Q(_(2),$(`${x(`Missing ${T(e)} dependency`)}`)+_(2),$(`You need to install ${T(e)} to use it as a processor`)+_(2),se.bold("How to fix?")+S+y,`
@@ -62,12 +62,12 @@ var Zu=Object.create;var Bs=Object.defineProperty;var ea=Object.getOwnPropertyDe
62
62
 
63
63
  ${p("If you are using a different package manager (ie: Yarn or NPM) then")}
64
64
  ${p("please consider adopting pnpm. Pnpm is dope and does dope shit.")}
65
- `),process.exit(0);}function ko(e,t,s,r){Q(_(2),$(`${x(`Missing ${T(e)} configuration option`)}`)+_(2),$(`The ${T(t)} option needs to be defined`)+_(2),$(`expects${S}${be(s.replace(/([|,])/g,p("$1")))}`)+_(2),$(`at${S}${p.underline(l.file)}`)+_(2),se.bold("Why?")+S+y,`
65
+ `),process.exit(0);}function Ro(e,t,s,r){Q(_(2),$(`${x(`Missing ${T(e)} configuration option`)}`)+_(2),$(`The ${T(t)} option needs to be defined`)+_(2),$(`expects${S}${be(s.replace(/([|,])/g,p("$1")))}`)+_(2),$(`at${S}${p.underline(l.file)}`)+_(2),se.bold("Why?")+S+y,`
66
66
  ${p(r)}
67
67
  `),process.exit(0);}function ne(e,t,s,r){Q(_(2),$(`${x(`Invalid ${T(e)} configuration`)}`)+_(2),$(`The ${T(t)} option has an invalid or missing value`)+_(2),$(`provided${S}${K(s)}`)+y,$(`expected${S}${be(r.replace(/([|,])/g,p("$1")))}`)+_(2),se.bold("How to fix?")+S+y,`
68
68
  ${p("You need to update the option and use one of the expected values.")}
69
69
  ${p(`Use the ${T("defineConfig")} named export for type checking`)}
70
- `),process.exit(0);}function Ro(e){Q(_(2),$(`${x(`Missing ${T("syncify.config.js")} configuration`)}`)+_(2),$("Unable to resolve a configuration file within the workspace")+_(2),$(`at${S+p.underline(e)}`)+_(2),se.bold("How to fix?")+S+y,`
70
+ `),process.exit(0);}function Po(e){Q(_(2),$(`${x(`Missing ${T("syncify.config.js")} configuration`)}`)+_(2),$("Unable to resolve a configuration file within the workspace")+_(2),$(`at${S+p.underline(e)}`)+_(2),se.bold("How to fix?")+S+y,`
71
71
  ${p("You need to add one the following files to your project"+S)}
72
72
 
73
73
  ${p("-")} ${se("syncify.config.ts")}
@@ -78,10 +78,10 @@ var Zu=Object.create;var Bs=Object.defineProperty;var ea=Object.getOwnPropertyDe
78
78
 
79
79
  ${p("You can also provide configuration in your")} ${se("package.json")}
80
80
  ${p("file using a")} ${K("syncify")} ${p("property.")}
81
- `),process.exit(0);}function ee(e,t){Q(_(2),$.bold(e)+_(2),se.bold("How to fix?")+S+y,p(b(t)?t.join(y).trimStart():t),_(2)),process.exit(0);}function Ie(e,t){Q(_(2),$.bold(`Unknown ${e} option`)+_(2),$(`The ${x(t)} option in invalid, remove it from the config`),_(2)),process.exit(0);}var kt=new Map,xn=(e,t,s)=>{let r=ll(t.cmd,t.args,{stdio:"pipe"});r.stdio[0].on("data",s),r.stdio[1].on("data",s),r.stdio[2].on("data",s),t.pid=r.pid,kt.set(e,r);};function Po(e){let t=[];if(e.mode.metafields)return E;t.push(`${or}${p("Syncify")} ${p("~")} ${p(rr())}`,`${g.gray}`,`${g.gray}${rt.bold(`v${e.version}`)}`,`${g.gray}`);let s=e.sync.stores.length,r=we(e.sync.themes).length,n=we(e.spawn.commands).length,{mode:i}=e,o=T.bold(String(s))+(s>1?" stores":" store"),a=T.bold(String(r))+(r>1?" themes":" theme"),u=T.bold(`${e.dev?"development":"production"}`);i.build?t.push(`${g.gray}Running ${T.bold("build")} in ${u}`):i.watch?t.push(`${g.gray}Running ${T.bold("watch")} in ${u}`):i.upload?t.push(`${g.gray}Running ${T.bold("upload")} mode`):i.download?t.push(`${g.gray}Running ${T.bold("download")} mode`):i.vsc?t.push(`${g.gray}Generate ${T.bold("vscode")} schema`):i.clean?t.push(`${g.gray}Running ${T.bold("clean")} mode`):i.export&&t.push(`${g.gray}Running ${T.bold("export")} mode`),t.push(`${g.gray}${s>0&&r>0?`Syncing ${a} to ${o}`:E}`);let c=!1,f=path.basename(e.file);for(let d in gt){let h=gt[d];if(h.length>0){c||(c=!0,t.push(g.gray+y+g.yellow+K(`${x("Warnings")} in ${x(f)}`)+S));let w=qr.bold(`${h.length} ${d} ${Ge("warning",h.length)}`);t.push(g.yellow+y+g.yellow+w+y+g.yellow+y+h.join(y));}}if(De(i.build,i.watch)&&n>0?t.push(`Spawned ${T.bold(`${n}`)} child ${n>1?"processes":"process"}${y}`):t.push(g.gray),St(i.upload,i.download,i.build,i.clean,i.vsc)){if(n>0){let d=Ye(kt),h=d.reduce((B,[ie])=>ie.length>B?ie.length:B,0),w=d.map(([B,ie])=>g.gray+de.repeat(h-B.length)+rt(Or(B))+p(":")+de+p("PID")+" \u2192 "+p("#")+Ue(`${ie.pid}`));t.push(`${g.gray}${x("Processes:")}${ft}${w.join(y)}${r>0?y:E}`);}if(r>0){let d=$s(e.sync.themes),h=d.reduce((B,{target:ie})=>ie.length>B?ie.length:B,0),w=d.map(({id:B,store:ie,target:Gt})=>Me(h-Gt.length)+ft+g.gray+Ue(`${ie.slice(0,ie.indexOf("."))} \u2192 `)+Ue.bold(Gt)+Ue(" \u2192 ")+p.underline(`https://${ie}/admin/themes/${B}/editor`));t.push(`${g.gray}${x("Theme Editors:")}${w.join(y)}${y}${g.gray}`);}if(r>0){let d=$s(e.sync.themes),h=d.reduce((B,{target:ie})=>ie.length>B?ie.length:B,0),w=d.map(({id:B,store:ie,target:Gt})=>Me(h-Gt.length)+ft+g.gray+Ue(`${ie.slice(0,ie.indexOf("."))} \u2192 `)+Ue.bold(Gt)+Ue(" \u2192 ")+p.underline("https://"+ie+"?preview_theme_id="+B));t.push(`${g.gray}${x("Theme Previews:")}${w.join(y)}${y}${g.gray}`);}}A(t.join(y));}var Cn=new Set,wn=null,En=!1,yt="Syncify",rs=E,Oo=E;function fl(e,{report:t}){for(let{name:s}of t)A(g.gray+" - "+un(s));}function jo(e="gray"){me(e)?A(y):A(g[e]);}function pl(e){b(e)?Q($(e.map(t=>g.red+bt(t)).join(y))):Q(g.red+bt(e));}function Dl(e){b(e)?A(e.map(t=>g.gray+bt(t)).join(y)):A(g.gray+bt(e));}function ml(e){A(Y("cyan","external",e));}function dl(e){re.current!==e&&(re.current=e),m(e,re.process)||(re.current=e,re.process[e]=new Set),wn=co((t,s)=>{if(s.charCodeAt(0)===9474)No[t].write(s);else {re.count+=1;let r=s.split(`
82
- `);for(;r.length!==0;)re.process[e].add(`${K(r.shift().trimStart())}`);}});}function hl(){wn(),wn=null;}function gl(e){let t=rs!==e.relative;W(),t&&A(Ur(yt)),yt!=="Syncify"&&t&&Dt(),yt=e.namespace,t&&(Dt(),A(Wr(e.kind)),rs=e.relative),m(e.relative,re)||(re[e.relative]=new Set),Oo!==e.relative&&(Oo=e.relative),l.mode.watch&&(jo(),A(Y("neonCyan","changed",e.relative)));}function yl(e){Cn.add([e.target,e.store,U()]),!En&&(En=!0,O.onIdle().then(()=>{Cn.forEach(([t,s,r])=>{A(Y("neonGreen","uploaded",`${x(t)} \u2192 ${s}`+ur(r)));}),Cn.clear(),En=!1;}));}function Fl(e){re.count>0&&Y("yellowBright","warning",`${re.count} ${Ge("warning",re.count)}`),l.mode.hot?(A(Y("neonRouge","reloaded",`${x("HOT RELOAD")}${ur(jr())}`)),A(Y("magentaBright","syncing",e)),O.pending>2&&A(Y("orange","queued",`${e} ~ ${x(Vs(O.pending))} in queue`))):(A(Y("magentaBright","syncing",e)),O.pending>0&&A(Y("orange","queued",`${e} ~ ${x(Vs(O.pending))} in queue`)));}function No(e,t){l.mode.build||A(Y("whiteBright","process",e+ur(t)));}function xl(e){l.mode.build||A(Y("whiteBright","transform",e));}function Cl(e,t){A(Y("orange","retrying",`${e} \u2192 ${t.target} ${p(`~ ${t.store}`)}`));}function El(e,t){A(Y("blueBright","deleted",`${e} \u2192 ${t.target} ${p(`~ ${t.store}`)}`));}function wl(e,t,s,r){let n=`${x(e)} ${pt}${t} > ${s} ${p(`~ saved ${r}`)}`;A(Y("whiteBright","minified",n));}function Sl(e,t){A(Y("whiteBright","reloaded",e+t));}function Bl(e,t){l.mode.build||A(g.gray+p(`${e.key} ~ ${t}`));}function bl(e){A(Y("gray","ignored",e));}function vl(e){A(Y("red","invalid",e)),Io.notify({title:"Syncify Error",sound:"Pop",open:e,subtitle:e,message:"Invalid error"}).notify();}function Al(e){A(Y("red","failed",e)),Io.notify({title:"Syncify Error",sound:"Pop",open:e,subtitle:e,message:"Request failed"}).notify();}function $l(e){throw new Error(e)}function Tl(e){return (...t)=>{l.spawn.invoked||(l.spawn.invoked=!0),yt!=="Spawn"&&(A(Ur(yt)),yt!=="Syncify"&&Dt(),A(Wr("Spawn")),yt="Spawn"),rs!==e&&(A(ln("pink",e)),rs=e),fn(bt(t.shift()));}}var cr={};Wt(cr,{postcss:()=>kl,sass:()=>_l,warnings:()=>_e});var _e={},_l=e=>(t,s)=>{let r=E;m(e.input,_e)?_e[e.input].has("sass")||_e[e.input].set("sass",new Set):_e[e.input]=new Map([["sass",new Set]]);let n=_e[e.input].get("sass");if(r+=st(t,{nwl:!0,line:g.yellow,text:K.bold}),m("span",s)){let i=m("start",s.span)&&m("end",s.span)?{start:s.span.start.line,end:s.span.end.line}:null,o=m("context",s.span)?s.span.context:m("text",s.span)?s.span.text:null;o!==null&&(i!==null?r+=mt(o,{line:g.yellow,span:i}):r+=mt(o));}r+=Ae({stack:s.stack,entries:{file:e.relative,deprecated:s.deprecation?"Yes":"No"}}),n.has(r)?A(Y("yellowBright","warning",`${n.size} ${Ge("warning",n.size)+Gr}`)):(n.add(r),A(Y("yellowBright","warning",`${n.size} ${Ge("warning",n.size)+Gr}`)));},kl=(e,t)=>{let s=E;m(e.input,_e)?_e[e.input].has("postcss")||_e[e.input].set("postcss",new Set):_e[e.input]=new Map([["postcss",new Set]]);let r=_e[e.input].get("postcss");s+=mt(t.node.toString(),{line:g.yellow,span:wr(t.endLine)?{start:t.line,end:t.endLine}:{start:t.line,end:t.endLine}}),s+=Ae({stack:!1,entries:{column:t.column,file:e.relative,plugin:t.plugin}}),r.has(s)||(r.add(s),ui(s));};function Mo(){D.nwl(E),D.out(p("SIGINT")),process.exit();}function qo(e,t){D.nwl(),D.err(`Unhandled Promise Rejection at: ${t}`),D.nwl("red"),D.out(p(e));}function Lo(e){D.nwl(),D.err(`Uncaught Exception: ${e.message}`),D.nwl("red"),D.err(`${e.stack}`);}async function Go(e,t){return Le({...l.sync.stores[t.sidx].client,method:"get",url:t.url,params:{"asset[key]":e}}).then(({data:s})=>s.asset).catch(()=>!1)}async function Sn(e,t){let s=v({},l.sync.stores[t.theme.sidx].client,{method:"put",url:t.theme.url,data:{asset:{key:t.key,value:e}}});return Le(s).then(()=>!0).catch(r=>(D.failed(t.key),R.request(t.key,r.response),!1))}async function Bn(e,t){return Le.get(e,t).then(({data:s})=>s).catch(s=>{D.failed(e),R.request(e,s.response);})}var ss;async function bn(e,t,s){return O.isPaused?void 0:(O.concurrency>1?(ss>=20&&O.concurrency--,ss>=35&&O.concurrency--):O.concurrency<3&&ss<30&&O.concurrency++,W(),Le(s).then(({headers:n,data:i})=>{if(s.method==="get")return i;s.method==="delete"?D.deleted(t.relative,e):D.upload(e),ss=parseInt(n["x-shopify-shop-api-call-limit"].slice(0,2),10);}).catch(n=>{n.response&&(n.response.status===429||n.response.status===500)?(D.retrying(t.key,e),O.add(()=>bn(e,t,s))):(D.failed(t.key),R.request(t.relative,n.response));}))}var An=class{constructor(t=process.stdin){this.onKeypress=(s,r)=>{if(r.ctrl&&r.name==="c")return process.exit(0)},this.isBlocked=()=>this.blocked,this.block=()=>this.toggle(!0),this.unblock=()=>this.toggle(!1),this.toggle=(s=!this.blocked)=>{this.blocked=s,s?(this.stream.isTTY&&this.stream.setRawMode(!0),this.interface=uo.createInterface({input:this.stream,escapeCodeTimeout:50}),uo.emitKeypressEvents(this.stream,this.interface),this.stream.on("keypress",this.onKeypress)):(this.stream.isTTY&&this.stream.setRawMode(!1),this.interface&&this.interface.close(),this.stream.off("keypress",this.onKeypress));},this.stream=t,this.blocked=!1;}},Uo=An;new Uo;var Rl=globalThis.process?.env||{},Pl=globalThis.process?.argv||[];!("NO_COLOR"in Rl)&&!Pl.includes("--no-color");var zo=process.platform==="linux",Ho=process.platform==="win32";var $n=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];Ho||$n.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");zo&&$n.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED");var Jo=$n;var Tn=class{constructor(){this.callbacks=new Set,this.exited=!1,this.hooked=!1,this.exit=t=>{if(!this.exited){this.exited=!0;for(let s of this.callbacks)s();t&&process.kill(process.pid,t);}},this.hook=()=>{if(!this.hooked){this.hooked=!0,process.once("exit",()=>this.exit());for(let t of Jo)process.once(t,()=>this.exit(t));}},this.register=t=>(this.hook(),this.callbacks.add(t),()=>{this.callbacks.delete(t);});}},Yo=new Tn;var Ol=Yo.register,Qo=Ol;var _n=class{constructor(t=process.stdout){this.has=()=>this.visible,this.hide=()=>this.toggle(!1),this.show=()=>this.toggle(!0),this.toggle=(s=!this.visible)=>{if(!this.stream.isTTY)return;this.visible=s;let r=s?"\x1B[?25h":"\x1B[?25l";this.stream.write(r);},this.stream=t,this.visible=!0,Qo(this.show);}},Ko=_n;new Ko;async function Xo(e,t){if(is(arguments.length,1))return s=>Xo(e,s);if(St(m("namespace",t),m("key",t))){D.error("invalid fields");return}return Le.get("metafields.json",e.client).then(({data:s})=>s.metafields.find(r=>t.namespace===r.namespace&&t.key===r.key)).catch(s=>{console.log(s);})}async function kn(e,t){return is(arguments.length,1)?s=>kn(e,s):(t.type="json",t.namespace="email",t.value_type="json_string",t.key="eng",Le.post("metafields.json",{metafield:t},e.client).then(({data:s})=>(console.log("created",s),s.metafield)).catch(s=>{if(console.log(s),!e.queue)return R(t.namespace,s.response);if(kr(s.response.status)){O.add(()=>kn(e,t));return}else return R(e.store,s.response)}))}async function Rn(e,t,s){return is(arguments.length,1)?(r,n)=>Rn(e,r,n):Le.put(`metafields/${t}.json`,{metafield:s},e.client).then(r=>(console.log("created"),r.data.metafield)).catch(r=>{if(!e.queue)return R(s.namespace,r.response);if(kr(r.response.status))O.add(()=>Rn(e,t,s));else return R(e.store,r.response)})}async function ns(e,t){if(is(arguments.length,1))return r=>ns(e,r);let s=await Xo(e,t);return s?Rn(e,s.id,v(t,{id:s.id,type:"json"})).catch(r=>{if(!e.queue)return R(t.namespace,r.response);if(kr(r.response.status))O.add(()=>ns(e,t));else return R(e.store,r.response)}):kn(e,t)}var os=({stores:e,themes:t})=>({assets:async(s,r,n)=>{let i=q(n)?{method:s,params:{"asset[key]":r.key}}:{method:s,data:{asset:{key:r.key,value:n}}};await O.add(()=>Je(async o=>{await bn(o,r,v({url:o.url},e[o.sidx].client,i));},t));},pages:s=>O.add(function(){return Je(async function(r){},e)}),metafields:s=>O.add(function(){return Je(async function(r){await ns(r,s);},e)})});function nt(e){return b(e)?e.filter(t=>/\*/.test(t)):/\*/.test(e)?e:null}function Ee(e){if(b(e))return e.map(Ee);if(e.indexOf("/")===-1)return e;let t=path.dirname(e),s=t.lastIndexOf("/")+1;return t.slice(s)}function us(e){if(b(e))return e.map(us);let t=e.lastIndexOf("/");if(t===-1)return e;let s=e.indexOf("*");return s===-1?e.slice(0,t):e.slice(0,s)}function Rt(e){let t=new RegExp(`^\\.?\\/?${e}\\/`);return function s(r){if(b(r))return r.map(s);let n=r.charCodeAt(0)===33;return n&&(r=r.slice(1)),t.test(r)?n?"!"+r:r:(r.charCodeAt(0)===46&&r.charCodeAt(1)===46&&r.charCodeAt(2)===47&&ee(`Invalid path defined at: ${S}${K(`"${r}"`)}`,"Paths must be relative to source"),(n?"!":"")+path.join(e,r))}}var eu=e=>t=>{if(t.indexOf("*")!==-1&&ee(`Base directory path cannot contain glob${S}${K(`"${t}"`)}`,"Ensure that path you are resolving is correctly formed"),t.charCodeAt(0)===46){if(t.length===1)return e+"/";t.charCodeAt(1)===47?t=t.slice(1):ee(`Directory path is invalid at${S}${K(`"${t}"`)}`,"Ensure that path you are resolving is correctly formed");}if(t.charCodeAt(0)===47){if(t.length===1)return e+"/";t=t.slice(1);}if(/^[a-zA-Z0-9_-]+/.test(t))return t=path.join(e,t),oi(t).charCodeAt(0)===47?t:t+"/";ee(`Directory path is invalid at${S}${K(`"${t}"`)}`,"Ensure that path you are resolving is correctly formed");};function ru(e){let t=l.svg.filter(s=>s.input.has(e.input)?!0:s.match(e.input)?(s.input.add(e.input),!0):!1);return q(t)||Ce(e,"config",{get(){return t}}),e}function as(e){let t=l.style.find(s=>s.watch(e.input));return q(t)||(Ce(e,"config",{get(){return t}}),t.snippet?(e.namespace="snippets",e.key=path.join("snippets",t.rename)):e.key=path.join("assets",t.rename),e.config.rename!==path.basename(e.output)&&(t.snippet?e.output=path.join(l.dirs.output,e.key):e.output=path.join(us(e.output),e.config.rename))),e}function Ft(e){let t=l.script.find(s=>s.watch(e.input));return q(t)||(Ce(e,"config",{get(){return t}}),t.snippet?(e.namespace="snippets",/\.liquid$/.test(t.rename)?e.key=path.join("snippets",t.rename):e.key=path.join("snippets",t.rename+".liquid")):e.key=path.join("assets",t.rename),t.rename!==path.basename(e.output)&&(t.snippet?e.output=path.join(l.dirs.output,e.key):e.output=path.join(us(e.output),t.rename))),e}function su(e){if(l.section.prefixDir){if(ai(l.section.global)&&l.section.global.test(e.input))return e;let t=Ee(e.input)+l.section.separator+e.base;e.name=t,e.key=path.join(e.namespace,t),e.output=path.join(path.dirname(e.output),t);}return e}function fr({name:e,dir:t,ext:s,namespace:r},n){let i=n;return /\[dir\]/.test(i)&&(i=i.replace(/\[dir\]/g,t)),/\[file\]/.test(i)&&(i=i.replace(/\[file\]/g,e)),/\[ext\]/.test(i)&&(i=i.replace(/\[ext\]/g,s)),r==="snippets"&&n.endsWith(".liquid")===!1?i+".liquid":!n.endsWith(".[ext]")||!n.endsWith(s)?/\.[a-z]+$/.test(n)?i:i+s:i}function iu(e,t,s){return (r,n,i)=>{let o;return n===13||n===14?(o=path.join(Ee(e.dir),e.base),s=null):(o=path.join(r,e.base),s=path.join(s,o)),v({},e,{type:n,input:t,output:s,key:o,namespace:r,kind:i,relative:path.relative(l.cwd,t),config:void 0,size:NaN})}}function ls(e,t){return s=>{let r=path.parse(s),n=iu(r,s,t);if(r.ext===".liquid"){if(e.sections(s))return su(n("sections",4,"Liquid"));if(e.snippets(s))return n("snippets",3,"Liquid");if(e.layout(s))return n("layout",2,"Liquid");if(e.templates(s))return n("templates",1,"Liquid");if(e.customers(s))return n("templates/customers",1,"Liquid");if(e.transforms.has(s))switch(e.transforms.get(s)){case 8:return Ft(n("snippets",8,"JavaScript"));case 7:return Ft(n("snippets",7,"CSS"))}}else {if(r.ext===".md"||r.ext===".html")return n("pages",14,r.ext===".html"?"HTML":"Markdown");if(r.ext===".json"){if(e.metafields(s))return n("metafields",13,"JSON");if(e.templates(s))return n("templates",1,"JSON");if(e.config(s))return n("config",5,"JSON");if(e.locales(s))return n("locales",6,"JSON");if(e.customers(s))return n("templates/customers",1,"JSON")}else {if(r.ext===".svg")return ru(n("assets",9,"SVG"));if(r.ext===".css")return as(n("assets",7,"CSS"));if(r.ext===".scss")return as(n("assets",7,"SCSS"));if(r.ext===".sass")return as(n("assets",7,"SASS"));if(r.ext===".js")return Ft(n("assets",8,"JavaScript"));if(r.ext===".ts")return Ft(n("assets",8,"TypeScript"));if(r.ext===".jsx")return Ft(n("assets",8,"JSX"));if(r.ext===".tsx")return Ft(n("assets",8,"TSK"));if(e.assets(s)){if(l.spawn.invoked)return n("assets",15);if(r.ext===".jpg"||r.ext===".png"||r.ext===".gif"||r.ext===".pjpg")return n("assets",12,"Image");if(r.ext===".mov"||r.ext===".mp4"||r.ext===".webm"||r.ext===".ogg")return n("assets",12,"Video");if(r.ext===".pdf")return n("assets",12,"PDF");if(r.ext===".eot"||r.ext===".ttf"||r.ext===".woff"||r.ext===".woff2")return n("assets",12,"Font")}}}}}var ou=e=>t=>{let s=path.parse(t),r=iu(s,t,e);switch(path.basename(s.dir)){case"sections":return r("sections",4);case"snippets":return r("snippets",3);case"layout":return r("layout",2);case"templates":return r("templates",1);case"customers":return r("templates/customers",1);case"config":return r("config",5);case"locales":return r("locales",6);case"assets":return r("assets",12)}};async function uu(e){W();let t=ou(l.dirs.output),s=Nn.sync(`${l.dirs.output}/**`).sort(),r=os(l.sync),n=fe(e);return await Je(async i=>{let o=t(i),a=await fsExtra.readFile(i);if(D.write(o.key),!n)return r.assets("put",o,a.toString());let u=e.apply({...o},a.toString());return q(u)||u===!1?r.assets("put",o,a.toString()):P(u)?r.assets("put",o,u):he(u)?r.assets("put",o,u.toString()):r.assets("put",o,a.toString())},s),O.onIdle().then(()=>D.write("Completed Upload"))}async function au(e){W();let t=fe(e);for(let s of l.sync.stores){let r=l.sync.themes[s.domain],{assets:n}=await Bn(r.url,s.client);for(let{key:i}of n)try{let o=v({},s.client,{params:{"asset[key]":i}}),{asset:a}=await Bn(r.url,o),u=path.join(l.dirs.import,s.domain,r.target,i),c=m("attachment",a)?Buffer.from(a.attachment,"base64"):Buffer.from(a.value||null,"utf8");if(t){let f=e.apply({asset:a,output:u},c);q(f)||f===!1?await fsExtra.writeFile(u,c):P(f)||he(f)?await fsExtra.writeFile(u,f):await fsExtra.writeFile(u,c);}else await fsExtra.writeFile(u,c);}catch(o){D.error(o);}}}var Jl=e=>async t=>(e.type!==15&&await fsExtra.writeFile(e.output,t).catch(R.write("Error writing asset to output",{file:e.relative,source:e.relative})),t);async function fs(e,t){let s=Jl(e),r=await fsExtra.readFile(e.input).catch(R.write("Error reading asset file",{file:e.relative,source:e.relative}));if(r){if(!fe(t))return s(r);let n=t.apply({...e},r);return q(n)||n===!1?s(r):X(n)?s(n):he(n)?s(n.toString()):s(r)}}var Kl=/{%-?\s*#[\s\S]+?%}/g,Xl=/{%-?\s*comment\s*-?%}[\s\S]+?{%-?\s*endcomment\s*-?%}/g,Zl=/{%-?\s*liquid[\s\S]+?%}/g,ec=/[^,:'"a-zA-Z0-9=] +[^'"a-zA-Z0-9=}{]/g;function ps(e){return V.liquid.removeComments?e.replace(Xl,E).replace(Kl,E):e}function tc(e){return e.replace(Zl,t=>`
81
+ `),process.exit(0);}function ee(e,t){Q(_(2),$.bold(e)+_(2),se.bold("How to fix?")+S+y,p(b(t)?t.join(y).trimStart():t),_(2)),process.exit(0);}function Ie(e,t){Q(_(2),$.bold(`Unknown ${e} option`)+_(2),$(`The ${x(t)} option in invalid, remove it from the config`),_(2)),process.exit(0);}var kt=new Map,xn=(e,t,s)=>{let r=ll(t.cmd,t.args,{stdio:"pipe"});r.stdio[0].on("data",s),r.stdio[1].on("data",s),r.stdio[2].on("data",s),t.pid=r.pid,kt.set(e,r);};function Oo(e){let t=[];if(e.mode.metafields)return E;t.push(`${or}${p("Syncify")} ${p("~")} ${p(rr())}`,`${g.gray}`,`${g.gray}${rt.bold(`v${e.version}`)}`,`${g.gray}`);let s=e.sync.stores.length,r=we(e.sync.themes).length,n=we(e.spawn.commands).length,{mode:i}=e,o=T.bold(String(s))+(s>1?" stores":" store"),a=T.bold(String(r))+(r>1?" themes":" theme"),u=T.bold(`${e.dev?"development":"production"}`);i.build?t.push(`${g.gray}Running ${T.bold("build")} in ${u}`):i.watch?t.push(`${g.gray}Running ${T.bold("watch")} in ${u}`):i.upload?t.push(`${g.gray}Running ${T.bold("upload")} mode`):i.download?t.push(`${g.gray}Running ${T.bold("download")} mode`):i.vsc?t.push(`${g.gray}Generate ${T.bold("vscode")} schema`):i.clean?t.push(`${g.gray}Running ${T.bold("clean")} mode`):i.export&&t.push(`${g.gray}Running ${T.bold("export")} mode`),t.push(`${g.gray}${s>0&&r>0?`Syncing ${a} to ${o}`:E}`);let c=!1,f=path.basename(e.file);for(let d in gt){let h=gt[d];if(h.length>0){c||(c=!0,t.push(g.gray+y+g.yellow+K(`${x("Warnings")} in ${x(f)}`)+S));let w=qr.bold(`${h.length} ${d} ${Ge("warning",h.length)}`);t.push(g.yellow+y+g.yellow+w+y+g.yellow+y+h.join(y));}}if(De(i.build,i.watch)&&n>0?t.push(`Spawned ${T.bold(`${n}`)} child ${n>1?"processes":"process"}${y}`):t.push(g.gray),St(i.upload,i.download,i.build,i.clean,i.vsc)){if(n>0){let d=Ye(kt),h=d.reduce((B,[ie])=>ie.length>B?ie.length:B,0),w=d.map(([B,ie])=>g.gray+de.repeat(h-B.length)+rt(Or(B))+p(":")+de+p("PID")+" \u2192 "+p("#")+Ue(`${ie.pid}`));t.push(`${g.gray}${x("Processes:")}${ft}${w.join(y)}${r>0?y:E}`);}if(r>0){let d=$s(e.sync.themes),h=d.reduce((B,{target:ie})=>ie.length>B?ie.length:B,0),w=d.map(({id:B,store:ie,target:Gt})=>Me(h-Gt.length)+ft+g.gray+Ue(`${ie.slice(0,ie.indexOf("."))} \u2192 `)+Ue.bold(Gt)+Ue(" \u2192 ")+p.underline(`https://${ie}/admin/themes/${B}/editor`));t.push(`${g.gray}${x("Theme Editors:")}${w.join(y)}${y}${g.gray}`);}if(r>0){let d=$s(e.sync.themes),h=d.reduce((B,{target:ie})=>ie.length>B?ie.length:B,0),w=d.map(({id:B,store:ie,target:Gt})=>Me(h-Gt.length)+ft+g.gray+Ue(`${ie.slice(0,ie.indexOf("."))} \u2192 `)+Ue.bold(Gt)+Ue(" \u2192 ")+p.underline("https://"+ie+"?preview_theme_id="+B));t.push(`${g.gray}${x("Theme Previews:")}${w.join(y)}${y}${g.gray}`);}}A(t.join(y));}var Cn=new Set,wn=null,En=!1,yt="Syncify",rs=E,Io=E;function fl(e,{report:t}){for(let{name:s}of t)A(g.gray+" - "+un(s));}function No(e="gray"){me(e)?A(y):A(g[e]);}function pl(e){b(e)?Q($(e.map(t=>g.red+bt(t)).join(y))):Q(g.red+bt(e));}function Dl(e){b(e)?A(e.map(t=>g.gray+bt(t)).join(y)):A(g.gray+bt(e));}function ml(e){A(Y("cyan","external",e));}function dl(e){re.current!==e&&(re.current=e),m(e,re.process)||(re.current=e,re.process[e]=new Set),wn=fo((t,s)=>{if(s.charCodeAt(0)===9474)Mo[t].write(s);else {re.count+=1;let r=s.split(`
82
+ `);for(;r.length!==0;)re.process[e].add(`${K(r.shift().trimStart())}`);}});}function hl(){wn(),wn=null;}function gl(e){let t=rs!==e.relative;W(),t&&A(Ur(yt)),yt!=="Syncify"&&t&&Dt(),yt=e.namespace,t&&(Dt(),A(Wr(e.kind)),rs=e.relative),m(e.relative,re)||(re[e.relative]=new Set),Io!==e.relative&&(Io=e.relative),l.mode.watch&&(No(),A(Y("neonCyan","changed",e.relative)));}function yl(e){Cn.add([e.target,e.store,U()]),!En&&(En=!0,O.onIdle().then(()=>{Cn.forEach(([t,s,r])=>{A(Y("neonGreen","uploaded",`${x(t)} \u2192 ${s}`+ur(r)));}),Cn.clear(),En=!1;}));}function Fl(e){re.count>0&&Y("yellowBright","warning",`${re.count} ${Ge("warning",re.count)}`),l.mode.hot?(A(Y("neonRouge","reloaded",`${x("HOT RELOAD")}${ur(jr())}`)),A(Y("magentaBright","syncing",e)),O.pending>2&&A(Y("orange","queued",`${e} ~ ${x(Vs(O.pending))} in queue`))):(A(Y("magentaBright","syncing",e)),O.pending>0&&A(Y("orange","queued",`${e} ~ ${x(Vs(O.pending))} in queue`)));}function Mo(e,t){l.mode.build||A(Y("whiteBright","process",e+ur(t)));}function xl(e){l.mode.build||A(Y("whiteBright","transform",e));}function Cl(e,t){A(Y("orange","retrying",`${e} \u2192 ${t.target} ${p(`~ ${t.store}`)}`));}function El(e,t){A(Y("blueBright","deleted",`${e} \u2192 ${t.target} ${p(`~ ${t.store}`)}`));}function wl(e,t,s,r){let n=`${x(e)} ${pt}${t} > ${s} ${p(`~ saved ${r}`)}`;A(Y("whiteBright","minified",n));}function Sl(e,t){A(Y("whiteBright","reloaded",e+t));}function Bl(e,t){l.mode.build||A(g.gray+p(`${e.key} ~ ${t}`));}function bl(e){A(Y("gray","ignored",e));}function vl(e){A(Y("red","invalid",e)),jo.notify({title:"Syncify Error",sound:"Pop",open:e,subtitle:e,message:"Invalid error"}).notify();}function Al(e){A(Y("red","failed",e)),jo.notify({title:"Syncify Error",sound:"Pop",open:e,subtitle:e,message:"Request failed"}).notify();}function $l(e){throw new Error(e)}function Tl(e){return (...t)=>{l.spawn.invoked||(l.spawn.invoked=!0),yt!=="Spawn"&&(A(Ur(yt)),yt!=="Syncify"&&Dt(),A(Wr("Spawn")),yt="Spawn"),rs!==e&&(A(ln("pink",e)),rs=e),fn(bt(t.shift()));}}var cr={};Wt(cr,{postcss:()=>kl,sass:()=>_l,warnings:()=>_e});var _e={},_l=e=>(t,s)=>{let r=E;m(e.input,_e)?_e[e.input].has("sass")||_e[e.input].set("sass",new Set):_e[e.input]=new Map([["sass",new Set]]);let n=_e[e.input].get("sass");if(r+=st(t,{nwl:!0,line:g.yellow,text:K.bold}),m("span",s)){let i=m("start",s.span)&&m("end",s.span)?{start:s.span.start.line,end:s.span.end.line}:null,o=m("context",s.span)?s.span.context:m("text",s.span)?s.span.text:null;o!==null&&(i!==null?r+=mt(o,{line:g.yellow,span:i}):r+=mt(o));}r+=Ae({stack:s.stack,entries:{file:e.relative,deprecated:s.deprecation?"Yes":"No"}}),n.has(r)?A(Y("yellowBright","warning",`${n.size} ${Ge("warning",n.size)+Gr}`)):(n.add(r),A(Y("yellowBright","warning",`${n.size} ${Ge("warning",n.size)+Gr}`)));},kl=(e,t)=>{let s=E;m(e.input,_e)?_e[e.input].has("postcss")||_e[e.input].set("postcss",new Set):_e[e.input]=new Map([["postcss",new Set]]);let r=_e[e.input].get("postcss");s+=mt(t.node.toString(),{line:g.yellow,span:wr(t.endLine)?{start:t.line,end:t.endLine}:{start:t.line,end:t.endLine}}),s+=Ae({stack:!1,entries:{column:t.column,file:e.relative,plugin:t.plugin}}),r.has(s)||(r.add(s),ai(s));};function qo(){D.nwl(E),D.out(p("SIGINT")),process.exit();}function Lo(e,t){D.nwl(),D.err(`Unhandled Promise Rejection at: ${t}`),D.nwl("red"),D.out(p(e));}function Go(e){D.nwl(),D.err(`Uncaught Exception: ${e.message}`),D.nwl("red"),D.err(`${e.stack}`);}async function Wo(e,t){return Le({...l.sync.stores[t.sidx].client,method:"get",url:t.url,params:{"asset[key]":e}}).then(({data:s})=>s.asset).catch(()=>!1)}async function Sn(e,t){let s=v({},l.sync.stores[t.theme.sidx].client,{method:"put",url:t.theme.url,data:{asset:{key:t.key,value:e}}});return Le(s).then(()=>!0).catch(r=>(D.failed(t.key),R.request(t.key,r.response),!1))}async function Bn(e,t){return Le.get(e,t).then(({data:s})=>s).catch(s=>{D.failed(e),R.request(e,s.response);})}var ss;async function bn(e,t,s){return O.isPaused?void 0:(O.concurrency>1?(ss>=20&&O.concurrency--,ss>=35&&O.concurrency--):O.concurrency<3&&ss<30&&O.concurrency++,W(),Le(s).then(({headers:n,data:i})=>{if(s.method==="get")return i;s.method==="delete"?D.deleted(t.relative,e):D.upload(e),ss=parseInt(n["x-shopify-shop-api-call-limit"].slice(0,2),10);}).catch(n=>{n.response&&(n.response.status===429||n.response.status===500)?(D.retrying(t.key,e),O.add(()=>bn(e,t,s))):(D.failed(t.key),R.request(t.relative,n.response));}))}var An=class{constructor(t=process.stdin){this.onKeypress=(s,r)=>{if(r.ctrl&&r.name==="c")return process.exit(0)},this.isBlocked=()=>this.blocked,this.block=()=>this.toggle(!0),this.unblock=()=>this.toggle(!1),this.toggle=(s=!this.blocked)=>{this.blocked=s,s?(this.stream.isTTY&&this.stream.setRawMode(!0),this.interface=ao.createInterface({input:this.stream,escapeCodeTimeout:50}),ao.emitKeypressEvents(this.stream,this.interface),this.stream.on("keypress",this.onKeypress)):(this.stream.isTTY&&this.stream.setRawMode(!1),this.interface&&this.interface.close(),this.stream.off("keypress",this.onKeypress));},this.stream=t,this.blocked=!1;}},Vo=An;new Vo;var Rl=globalThis.process?.env||{},Pl=globalThis.process?.argv||[];!("NO_COLOR"in Rl)&&!Pl.includes("--no-color");var Ho=process.platform==="linux",Jo=process.platform==="win32";var $n=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];Jo||$n.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");Ho&&$n.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED");var Yo=$n;var Tn=class{constructor(){this.callbacks=new Set,this.exited=!1,this.hooked=!1,this.exit=t=>{if(!this.exited){this.exited=!0;for(let s of this.callbacks)s();t&&process.kill(process.pid,t);}},this.hook=()=>{if(!this.hooked){this.hooked=!0,process.once("exit",()=>this.exit());for(let t of Yo)process.once(t,()=>this.exit(t));}},this.register=t=>(this.hook(),this.callbacks.add(t),()=>{this.callbacks.delete(t);});}},Qo=new Tn;var Ol=Qo.register,Ko=Ol;var _n=class{constructor(t=process.stdout){this.has=()=>this.visible,this.hide=()=>this.toggle(!1),this.show=()=>this.toggle(!0),this.toggle=(s=!this.visible)=>{if(!this.stream.isTTY)return;this.visible=s;let r=s?"\x1B[?25h":"\x1B[?25l";this.stream.write(r);},this.stream=t,this.visible=!0,Ko(this.show);}},Xo=_n;new Xo;async function Zo(e,t){if(is(arguments.length,1))return s=>Zo(e,s);if(St(m("namespace",t),m("key",t))){D.error("invalid fields");return}return Le.get("metafields.json",e.client).then(({data:s})=>s.metafields.find(r=>t.namespace===r.namespace&&t.key===r.key)).catch(s=>{console.log(s);})}async function kn(e,t){return is(arguments.length,1)?s=>kn(e,s):(t.type="json",t.namespace="email",t.value_type="json_string",t.key="eng",Le.post("metafields.json",{metafield:t},e.client).then(({data:s})=>(console.log("created",s),s.metafield)).catch(s=>{if(console.log(s),!e.queue)return R(t.namespace,s.response);if(kr(s.response.status)){O.add(()=>kn(e,t));return}else return R(e.store,s.response)}))}async function Rn(e,t,s){return is(arguments.length,1)?(r,n)=>Rn(e,r,n):Le.put(`metafields/${t}.json`,{metafield:s},e.client).then(r=>(console.log("created"),r.data.metafield)).catch(r=>{if(!e.queue)return R(s.namespace,r.response);if(kr(r.response.status))O.add(()=>Rn(e,t,s));else return R(e.store,r.response)})}async function ns(e,t){if(is(arguments.length,1))return r=>ns(e,r);let s=await Zo(e,t);return s?Rn(e,s.id,v(t,{id:s.id,type:"json"})).catch(r=>{if(!e.queue)return R(t.namespace,r.response);if(kr(r.response.status))O.add(()=>ns(e,t));else return R(e.store,r.response)}):kn(e,t)}var os=({stores:e,themes:t})=>({assets:async(s,r,n)=>{let i=q(n)?{method:s,params:{"asset[key]":r.key}}:{method:s,data:{asset:{key:r.key,value:n}}};await O.add(()=>Je(async o=>{await bn(o,r,v({url:o.url},e[o.sidx].client,i));},t));},pages:s=>O.add(function(){return Je(async function(r){},e)}),metafields:s=>O.add(function(){return Je(async function(r){await ns(r,s);},e)})});function nt(e){return b(e)?e.filter(t=>/\*/.test(t)):/\*/.test(e)?e:null}function Ee(e){if(b(e))return e.map(Ee);if(e.indexOf("/")===-1)return e;let t=path.dirname(e),s=t.lastIndexOf("/")+1;return t.slice(s)}function us(e){if(b(e))return e.map(us);let t=e.lastIndexOf("/");if(t===-1)return e;let s=e.indexOf("*");return s===-1?e.slice(0,t):e.slice(0,s)}function Rt(e){let t=new RegExp(`^\\.?\\/?${e}\\/`);return function s(r){if(b(r))return r.map(s);let n=r.charCodeAt(0)===33;return n&&(r=r.slice(1)),t.test(r)?n?"!"+r:r:(r.charCodeAt(0)===46&&r.charCodeAt(1)===46&&r.charCodeAt(2)===47&&ee(`Invalid path defined at: ${S}${K(`"${r}"`)}`,"Paths must be relative to source"),(n?"!":"")+path.join(e,r))}}var tu=e=>t=>{if(t.indexOf("*")!==-1&&ee(`Base directory path cannot contain glob${S}${K(`"${t}"`)}`,"Ensure that path you are resolving is correctly formed"),t.charCodeAt(0)===46){if(t.length===1)return e+"/";t.charCodeAt(1)===47?t=t.slice(1):ee(`Directory path is invalid at${S}${K(`"${t}"`)}`,"Ensure that path you are resolving is correctly formed");}if(t.charCodeAt(0)===47){if(t.length===1)return e+"/";t=t.slice(1);}if(/^[a-zA-Z0-9_-]+/.test(t))return t=path.join(e,t),ui(t).charCodeAt(0)===47?t:t+"/";ee(`Directory path is invalid at${S}${K(`"${t}"`)}`,"Ensure that path you are resolving is correctly formed");};function su(e){let t=l.svg.filter(s=>s.input.has(e.input)?!0:s.match(e.input)?(s.input.add(e.input),!0):!1);return q(t)||Ce(e,"config",{get(){return t}}),e}function as(e){let t=l.style.find(s=>s.watch(e.input));return q(t)||(Ce(e,"config",{get(){return t}}),t.snippet?(e.namespace="snippets",e.key=path.join("snippets",t.rename)):e.key=path.join("assets",t.rename),e.config.rename!==path.basename(e.output)&&(t.snippet?e.output=path.join(l.dirs.output,e.key):e.output=path.join(us(e.output),e.config.rename))),e}function Ft(e){let t=l.script.find(s=>s.watch(e.input));return q(t)||(Ce(e,"config",{get(){return t}}),t.snippet?(e.namespace="snippets",/\.liquid$/.test(t.rename)?e.key=path.join("snippets",t.rename):e.key=path.join("snippets",t.rename+".liquid")):e.key=path.join("assets",t.rename),t.rename!==path.basename(e.output)&&(t.snippet?e.output=path.join(l.dirs.output,e.key):e.output=path.join(us(e.output),t.rename))),e}function Pn(e){if(l.section.prefixDir){if(li(l.section.global)&&l.section.global.test(e.input))return e;let t=Ee(e.input)+l.section.separator+e.base;e.name=t,e.key=path.join(e.namespace,t),e.output=path.join(path.dirname(e.output),t);}return e}function fr({name:e,dir:t,ext:s,namespace:r},n){let i=n;return /\[dir\]/.test(i)&&(i=i.replace(/\[dir\]/g,t)),/\[file\]/.test(i)&&(i=i.replace(/\[file\]/g,e)),/\[ext\]/.test(i)&&(i=i.replace(/\[ext\]/g,s)),r==="snippets"&&n.endsWith(".liquid")===!1?i+".liquid":!n.endsWith(".[ext]")||!n.endsWith(s)?/\.[a-z]+$/.test(n)?i:i+s:i}function iu(e,t,s){return (r,n,i)=>{let o;return n===13||n===14?(o=path.join(Ee(e.dir),e.base),s=null):(o=path.join(r,e.base),s=path.join(s,o)),v({},e,{type:n,input:t,output:s,key:o,namespace:r,kind:i,relative:path.relative(l.cwd,t),config:void 0,size:NaN})}}function ls(e,t){return s=>{let r=path.parse(s),n=iu(r,s,t);if(r.ext===".liquid"){if(e.sections(s))return Pn(n("sections",4,"Liquid"));if(e.snippets(s))return n("snippets",3,"Liquid");if(e.layout(s))return n("layout",2,"Liquid");if(e.templates(s))return n("templates",1,"Liquid");if(e.customers(s))return n("templates/customers",1,"Liquid");if(e.transforms.has(s))switch(e.transforms.get(s)){case 8:return Ft(n("snippets",8,"JavaScript"));case 7:return Ft(n("snippets",7,"CSS"))}}else {if(r.ext===".md"||r.ext===".html")return n("pages",14,r.ext===".html"?"HTML":"Markdown");if(r.ext===".json"){if(e.metafields(s))return n("metafields",13,"JSON");if(e.sections(s))return Pn(n("sections",4,"JSON"));if(e.templates(s))return n("templates",1,"JSON");if(e.config(s))return n("config",5,"JSON");if(e.locales(s))return n("locales",6,"JSON");if(e.customers(s))return n("templates/customers",1,"JSON")}else {if(r.ext===".svg")return su(n("assets",9,"SVG"));if(r.ext===".css")return as(n("assets",7,"CSS"));if(r.ext===".scss")return as(n("assets",7,"SCSS"));if(r.ext===".sass")return as(n("assets",7,"SASS"));if(r.ext===".js")return Ft(n("assets",8,"JavaScript"));if(r.ext===".ts")return Ft(n("assets",8,"TypeScript"));if(r.ext===".jsx")return Ft(n("assets",8,"JSX"));if(r.ext===".tsx")return Ft(n("assets",8,"TSK"));if(e.assets(s)){if(l.spawn.invoked)return n("assets",15);if(r.ext===".jpg"||r.ext===".png"||r.ext===".gif"||r.ext===".pjpg")return n("assets",12,"Image");if(r.ext===".mov"||r.ext===".mp4"||r.ext===".webm"||r.ext===".ogg")return n("assets",12,"Video");if(r.ext===".pdf")return n("assets",12,"PDF");if(r.ext===".eot"||r.ext===".ttf"||r.ext===".woff"||r.ext===".woff2")return n("assets",12,"Font")}}}}}var ou=e=>t=>{let s=path.parse(t),r=iu(s,t,e);switch(path.basename(s.dir)){case"sections":return r("sections",4);case"snippets":return r("snippets",3);case"layout":return r("layout",2);case"templates":return r("templates",1);case"customers":return r("templates/customers",1);case"config":return r("config",5);case"locales":return r("locales",6);case"assets":return r("assets",12)}};async function uu(e){W();let t=ou(l.dirs.output),s=Mn.sync(`${l.dirs.output}/**`).sort(),r=os(l.sync),n=fe(e);return await Je(async i=>{let o=t(i),a=await fsExtra.readFile(i);if(D.write(o.key),!n)return r.assets("put",o,a.toString());let u=e.apply({...o},a.toString());return q(u)||u===!1?r.assets("put",o,a.toString()):P(u)?r.assets("put",o,u):he(u)?r.assets("put",o,u.toString()):r.assets("put",o,a.toString())},s),O.onIdle().then(()=>D.write("Completed Upload"))}async function au(e){W();let t=fe(e);for(let s of l.sync.stores){let r=l.sync.themes[s.domain],{assets:n}=await Bn(r.url,s.client);for(let{key:i}of n)try{let o=v({},s.client,{params:{"asset[key]":i}}),{asset:a}=await Bn(r.url,o),u=path.join(l.dirs.import,s.domain,r.target,i),c=m("attachment",a)?Buffer.from(a.attachment,"base64"):Buffer.from(a.value||null,"utf8");if(t){let f=e.apply({asset:a,output:u},c);q(f)||f===!1?await fsExtra.writeFile(u,c):P(f)||he(f)?await fsExtra.writeFile(u,f):await fsExtra.writeFile(u,c);}else await fsExtra.writeFile(u,c);}catch(o){D.error(o);}}}var Jl=e=>async t=>(e.type!==15&&await fsExtra.writeFile(e.output,t).catch(R.write("Error writing asset to output",{file:e.relative,source:e.relative})),t);async function fs(e,t){let s=Jl(e),r=await fsExtra.readFile(e.input).catch(R.write("Error reading asset file",{file:e.relative,source:e.relative}));if(r){if(!fe(t))return s(r);let n=t.apply({...e},r);return q(n)||n===!1?s(r):X(n)?s(n):he(n)?s(n.toString()):s(r)}}var Kl=/{%-?\s*#[\s\S]+?%}/g,Xl=/{%-?\s*comment\s*-?%}[\s\S]+?{%-?\s*endcomment\s*-?%}/g,Zl=/{%-?\s*liquid[\s\S]+?%}/g,ec=/[^,:'"a-zA-Z0-9=] +[^'"a-zA-Z0-9=}{]/g;function ps(e){return V.liquid.removeComments?e.replace(Xl,E).replace(Kl,E):e}function tc(e){return e.replace(Zl,t=>`
83
83
  `+t.replace(/#.*?$/gm,E)+`
84
- `)}function rc(e,t){if(!V.liquid.minifySchema)return ps(t);let s=t.search(/{%-?\s*schema/);if(s>-1){let r=t.indexOf("%}",s+2)+2,n=t.slice(r),i=r+n.search(/{%-?\s*endschema/);if(i>-1){let o=JSON.parse(t.slice(r,i)),a=JSON.stringify(o,null,0),u=t.slice(0,r)+a+t.slice(i);return ps(u)}D.invalid(e.relative);}return ps(t)}function sc(e){return V.liquid.stripDashes,e}async function nc(e,t){try{return await htmlMinifierTerser.minify(t,V.html)}catch(s){return D.invalid(e.relative),console.error(s),null}}var ic=e=>async t=>{if(!l.mode.minify)return await fsExtra.writeFile(e.output,t),D.transform(`${e.namespace} \u2192 ${Pe(e.size)}`),t;let s;if(e.base.endsWith(".js.liquid"))s=t.replace(ec,E).replace(/(?<=[:,]) +(?=['"{[])/g,E);else if(e.base.endsWith(".json.liquid"))s=JSON.stringify(JSON.parse(t),null,0);else {let n=e.type===4?rc(e,t):ps(t),i=await nc(e,n);s=tc(i);}if(D.process("HTML Terser",jr()),M(s))return await fsExtra.writeFile(e.output,t),t;let r=sc(s).replace(/^\s+/gm,E);if(await fsExtra.writeFile(e.output,r),!l.mode.build){let n=Be(t,e.size);n.isSmaller?D.transform(`${e.namespace} ${n.before} \u2192 gzip ${n.gzip}`):D.minified("Liquid",n.before,n.after,n.saved);}return r};async function xt(e,t){l.mode.watch&&W();let s=await fsExtra.readFile(e.input);e.size=xe(s);let r=ic(e),n=s.toString();if(!X("Function",t))return r(n);let i=t.apply({...e},n);return X("Undefined",i)||i===!1?r(n):X("String",i)?r(i):Buffer.isBuffer(i)?r(i.toString()):r(n)}function In(e){try{return JSON.parse(e)}catch(t){return console.log(t),null}}function ac(e,t=0){try{return JSON.stringify(e,null,t)}catch(s){return console.log(s),null}}async function Ot(e,t,s=0){let r=ac(t,s);if(M(r))return l.mode.watch&&U(),t;if(!l.mode.build)if(s===0){let n=Be(r,e.size);D.minified("JSON",n.before,n.after,n.saved);}else D.transform(`${e.namespace} \u2192 ${Pe(e.size)}`);return e.type===13||fsExtra.writeFile(e.output,r).catch(R.write("Error writing JSON",{file:e.relative})),r}async function Ct(e,t){l.mode.watch&&W();let s=await fsExtra.readFile(e.input).catch(R.write("Error reading JSON file",{file:e.relative}));if(he(s)){let r=s.toString();if(e.size=xe(r),r.trim().length===0)return D.skipped(e,"empty file"),null;let n=In(r);if(me(n))return D.skipped(e,"empty file"),null;let i=l.processor.json.indent;if(l.mode.minify&&(e.type===12?V.json.assets&&(i=0):e.type===6?V.json.locales&&(i=0):e.type===1?V.json.templates&&(i=0):e.type===13?V.json.metafields&&(i=0):e.type===5&&V.json.config&&(i=0)),!fe(t))return Ot(e,n,i);let o=t.apply({...e},n);return q(o)?Ot(e,n,i):b(o)||j(o)?Ot(e,o,i):P(o)?Ot(e,In(o),i):he(o)?Ot(e,In(o.toString()),i):Ot(e,n,i)}}async function pr(e,t){let s=await fsExtra.readFile(e.input);if(me(s.toString()))return l.mode.watch&&D.skipped(e,"empty file"),null;let{data:r,content:n}=pc(s);m("title",r)||(r.title=""),m("html",r)&&(l.page.export.html=r.html),m("linkify",r)&&(l.page.export.linkify=r.linkify),m("breaks",r)&&(l.page.export.breaks=r.breaks);let i=Dc(l.page.export).render(n);return fsExtra.writeFile(path.join(pe.pages.uri,e.base),i).catch(R.write("Error writing Page reference",{file:e.relative})),l.mode.build?i:{title:r.title,body_html:i}}var Ds=new Set,ms={},It=null,Mn=async e=>{if(j(e))m(e.uuid,ms)&&(await ms[e.uuid].dispose(),l.minify.script===!0&&v(e.esbuild,V.script,{sourcemap:!1})),ms[e.uuid]=await It.context(e.esbuild);else return It=zs("esbuild"),M(It)?(It=null,!1):!0};function ds(e){let{compilerOptions:t}=L.esbuild.tsconfig;if(!m("paths",t))return;let s=we(t.paths),r=new RegExp(`^(${s.join("|")})`);return {name:"syncify-paths",setup(n){n.onResolve({filter:r},function(i){let o=s.find(c=>new RegExp(`^${c}`).test(i.path)),[a]=o.split("*"),u=i.path.replace(a,E);u===i.path&&(u=E);for(let c of t.paths[o]){let f=path.normalize(path.resolve(l.cwd,c).replace("*",u));if(!f.endsWith("*"))return Ds.has(i.path)||(L.esbuild.loaded?Pr.emit("script:watch",i.path):e.watch.push(f)),{path:f};let[d]=Nn.sync(`${f}.*`);if(!d){let[h]=Nn.sync(`${f}/index.*`);d=h;}if(d)return {path:d}}return {path:i.path}});}}}function Dr(e){let t=new Set;return {name:"syncify-watch",setup(s){s.onResolve({filter:/.*/},r=>{if(!/node_modules/.test(r.importer)&&/^[./]/.test(r.path)){if(t.has(r.resolveDir))return;if(r.importer!==E){t.add(r.resolveDir);let n=Nn.sync(path.join(r.resolveDir,"*"),{cwd:l.cwd});for(let i of n)!Ds.has(i)&&!i.endsWith(".liquid")&&(Ds.add(i),L.esbuild.loaded===!1?e.watch.push(i):Pr.emit("script:watch",i));}else Ds.has(r.path)||(L.esbuild.loaded?Pr.emit("script:watch",r.path):e.watch.push(r.path));}});}}}var gc=e=>"<script>"+e+"<\/script>";async function yc(e,t,s,r){let n=t.config,i=n.esbuild;for(let{text:o,path:a}of e)if(/\.map$/.test(a)){let u=path.join(pe.script.uri,t.base);fsExtra.writeFile(u,o).catch(R.write("Error writing JavaScript Source Map to cache",{file:path.relative(l.cwd,u),source:t.relative}));}else {l.mode.watch&&D.process(x("ESBuild"),U()),D.transform(`${x(i.format.toUpperCase())} bundle \u2192 ${x(Pe(xe(o)))}`);let u;if(n.snippet){if(u=gc(o),X("Function",r)){let c=r.apply({...t},u);if(c===!1){D.external("cancelled");continue}else X("String",c)?(D.external("augment"),u=c):Buffer.isBuffer(c)&&(D.external("augment"),u=c.toString());}await fsExtra.writeFile(t.output,u).catch(R.write("Error writing inline <script> snippet",{file:t.relative})),D.transform(`exported as ${x("snippet")}`),l.mode.build||(l.mode.hot?s("put",t,u):await s("put",t,u));}else {if(u=o,X("Function",r)){let c=r.apply({...t},o);if(c===!1){D.external("cancelled");continue}else X("String",c)?(D.external("augment"),u=c):Buffer.isBuffer(c)&&(D.external("augment"),u=c.toString());}await fsExtra.writeFile(t.output,o).catch(R.write("Error writing JavaScript asset",{file:t.relative})),l.mode.build||(l.mode.hot?s("put",t,o):await s("put",t,o));}}}async function hs(e,t,s){l.mode.watch&&W();try{let r=await ms[e.config.uuid].rebuild();await yc(r.outputFiles,e,t,s),l.mode.hot&&(D.syncing(e.key),this.script(e.key));}catch(r){if(D.invalid(e.relative),m("errors",r))for(let n of r.errors)r.esbuild(n);return null}}var gs=null,qn=null;async function Ln(e){if(e==="postcss")return gs=(await import('postcss')).default,M(gs)===!1;if(e==="sass")return qn=(await import('sass')).default,M(qn)===!1}function Cc(e,t){let s=fe(t)?{...e}:!1;return async function(r){if(M(r))return null;let n;if(s!==!1){let o=t.apply({...e},Buffer.from(r));q(o)||o===!1?n=r:(P(o)||he(o))&&(n=o);}else n=r;fsExtra.writeFile(e.output,n).catch(R.write("Error writing stylesheet to output",{input:e.relative,output:path.relative(l.cwd,e.output)}));let i=Be(r,e.size);return i.isSmaller?D.transform(`${x("CSS")} ${i.before} \u2192 gzip ${i.gzip}`):D.minified("CSS",i.before,i.after,i.saved),n}}async function Ec(e){let{config:t}=e,s=t.sass===!0?L.sass.config:t.sass;if(e.ext===".scss"||e.ext===".sass"){l.mode.watch&&W();try{let{css:r,sourceMap:n}=qn.compile(t.input,{loadPaths:s.include,sourceMapIncludeSources:!1,sourceMap:s.sourcemap,style:s.style,logger:{debug:i=>console.log("DEBUG",i),warn:cr.sass(e)}});if(s.sourcemap){let i=path.join(pe.style.uri,e.base+".map");fsExtra.writeFile(i,JSON.stringify(n)).catch(R.write("Error writing SASS Source Map file to the cache directory",{file:path.relative(l.cwd,i),source:e.relative}));}return l.mode.watch&&D.process(`${x("SASS Dart")}`,U()),e.size=xe(r),{css:r,map:n}}catch(r){return D.invalid(e.relative),R.sass(e,r),null}}try{let r=await fsExtra.readFile(e.input);return e.size=xe(r),{css:r.toString(),map:null}}catch(r){return D.invalid(e.relative),D.throws(r),null}}async function wc(e,t,s){let{config:r}=e;try{l.mode.watch&&W();let n=await gs(L.postcss.config).process(t,{from:r.rename,to:r.rename,map:s?{prev:s,inline:!1}:null});l.mode.watch&&D.process(`${x("PostCSS")}`,U());let i=n.warnings();if(i.length>0)for(let o of i)cr.postcss(e,o);return n.toString()}catch(n){return D.invalid(e.relative),console.log(n),null}}function cu(e){return `<style type="text/css">${y+Me(2)+e}</style>`}async function ys(e,t){l.mode.watch&&W();let s=Cc(e,t);try{let r=await Ec(e);if(r===null)return null;if(M(gs)||!e.config.postcss&&!e.config.snippet)return s(r.css);if(e.config.postcss){let n=await wc(e,r.css,r.map);if(n===null)return null;if(e.config.snippet)return s(cu(n))}return e.config.snippet?s(cu(r.css)):s(r.css)}catch(r){return console.log(r),null}}async function Du(e){W();let t=ls(l.paths,l.dirs.output),s=Vu(Ye(l.watch.values())),n=(await Nn("**",{onlyFiles:!0,absolute:!0,cwd:l.dirs.input})).filter(s).reduce((o,a)=>{let u=t(a);if(q(u))return o;switch(u.type){case 7:o.styles.files.push(u);break;case 8:o.scripts.files.push(u);break;case 4:o.sections.files.push(u);break;case 2:o.layouts.files.push(u);break;case 3:o.snippets.files.push(u);break;case 6:o.locales.files.push(u);break;case 5:o.configs.files.push(u);break;case 1:o.templates.files.push(u);break;case 14:o.pages.files.push(u);break;case 12:o.assets.files.push(u);break;case 13:o.metafields.files.push(u);break;case 9:o.svgs.files.push(u);break}return o},{styles:{time:E,files:[],report:null},scripts:{time:E,files:[],report:null},svgs:{time:E,files:[],report:null},sections:{time:E,files:[],report:null},layouts:{time:E,files:[],report:null},templates:{time:E,files:[],report:null},snippets:{time:E,files:[],report:null},locales:{time:E,files:[],report:null},configs:{time:E,files:[],report:null},pages:{time:E,files:[],report:null},metafields:{time:E,files:[],report:null},assets:{time:E,files:[],report:null}}),i=o=>async a=>{W();try{let u=await(a.ext===".json"?Ct(a,e):o(a,e));if(u===null||isNaN(a.size))return {name:a.base,time:U(),output:a.key,error:"Skipped File"};let{before:c,after:f,saved:d,gzip:h}=Be(u,a.size);return {name:a.base,time:U(),output:Ee(a.output),error:null,size:{before:c,after:f,saved:d,gzip:h}}}catch(u){return {name:a.base,time:U(),output:Ee(a.output),error:u.message}}};for(let o in n)D.write(x(`${ft+g.gray}${n[o].files.length} ${Or(o)}`)),W(),o==="styles"?(n[o].report=await He(i(ys),n[o].files),n[o].time=U(),D.build(o,n[o])):o==="scripts"?(n[o].report=await He(i(hs),n[o].files),n[o].time=U(),D.build(o,n[o])):o==="layouts"||o==="snippets"||o==="sections"||o==="templates"?(n[o].report=await He(i(xt),n[o].files),n[o].time=U(),D.build(o,n[o])):o==="locales"||o==="configs"||o==="metafields"?(n[o].report=await He(i(Ct),n[o].files),n[o].time=U(),D.build(o,n[o])):o==="pages"?(n[o].report=await He(i(pr),n[o].files),n[o].time=U(),D.build(o,n[o])):o==="assets"?(n[o].report=await He(i(fs),n[o].files),n[o].time=U(),D.build(o,n[o])):o==="svgs"&&(n[o].report=await He(i(pr),n[o].files),n[o].time=U(),D.build(o,n[o]));D.update(`${g.gray}Build Completed ${p(`~ ${U()}`)}`),process.exit(0);}var Fs=new RegExp(`{%-?\\s*render\\s+['"]${Ei}['"][,\\slablsockvetr:0-9'"]+?-?%}\\s+`);async function du(){let e=`snippets/${tr}`,[t]=l.sync.themes,s=await fsExtra.readFile(l.hot.snippet),r=await Sn(s.toString(),{theme:t,key:e});return D.update(ae.message("gray",`${e} uploaded snippet injection`)),r}function hu(e){if(!Fs.test(e))return gu(e)}function $c(e){let t=e.search(Fs);if(t>-1){let s=e.slice(0,t),r=e.slice(e.indexOf("%}")+2);return s+r}return e}function gu(e){let t=e.indexOf("<head>")+6;return e.slice(0,t)+y+l.hot.renderer+y+e.slice(t)}async function yu(e){if(!await fsExtra.pathExists(e))return null;let r=(await fsExtra.readFile(e)).toString();Fs.test(r)||(r=gu(r),await fsExtra.writeFile(e,r),D.update(ae.message("gray","injected render tag in output layout")));let[n]=l.sync.themes,i=path.basename(e),o=`layout/${i}`,a=await Go(`layout/${i}`,n);return Fs.test(a)&&(r=$c(r)),await Sn(r,{theme:n,key:o})?(D.update(ae.message("gray","uploaded and inject render tag")),!0):!1}var Gn=null,Wn=null;async function Un(e){if(e==="svg-sprite")return Wn=(await import('svg-sprite')).default,M(Wn)===!1;if(e==="svgo")return Gn=(await import('svgo')).default,M(Gn)===!1}async function _c(e){let t=await fsExtra.readFile(e);return [e,t.toString(),xe(t)]}function kc(e){return new Promise(function(t,s){e.compile((r,n)=>{if(r)return s(r);for(let i in n)for(let o in n[i])t(n[i][o].contents.toString());});})}function Rc(e,t,s){async function r(n){let i=v({},e);l.mode.watch&&W(),i.kind="SVG Sprite",n.snippet?(i.namespace="snippets",i.key=path.join("snippets",fr(i,n.rename)),i.output=path.join(l.dirs.output,i.key)):(i.key=path.join("assets",fr(i,n.rename)),i.output=path.join(l.dirs.output,i.key));let o=n.sprite===!0?L.sprite.config:n.sprite,a=new Wn(o),u=await Je(_c,Ye(n.input)).catch(R.write("Error reading an SVG file",{file:i.base,source:i.relative}));if(u){i.size=0;for(let[d,h,w]of u)a.add(d,null,h),i.size=i.size+w;let c=await kc(a);D.process(`${x("SVG Sprite")} ${pt}${u.length} ${Ge("SVG",u.length)}`,U()),await fsExtra.writeFile(i.output,c).catch(R.write("Error writing SVG Sprite",{file:i.key,caller:e.relative}));let f=Be(c,i.size);f.isSmaller?D.transform(`${i.kind} ${f.before} \u2192 gzip ${f.gzip}`):D.minified(i.kind,f.before,f.after,f.saved),D.syncing(i.key),await t("put",i,c);}}return r}function Pc(e,t,s){let r=v({},e);async function n(i){l.mode.watch&&W(),i.snippet?(r.namespace="snippets",r.key=path.join("snippets",fr(r,i.rename)),r.output=path.join(l.dirs.output,r.key)):(r.key=path.join("assets",fr(r,i.rename)),r.output=path.join(l.dirs.output,r.key));let o=i.svgo===!0?L.svgo:i.svgo,a=await fsExtra.readFile(r.input);r.size=xe(a);let u;try{u=Gn.optimize(a.toString(),o);}catch(f){return D.err(f.toString()),null}l.mode.watch&&D.process(x("SVGO"),U());let{data:c}=u;if(!l.mode.build){let f=Be(c,r.size);f.isSmaller?D.transform(`${r.kind} ${f.before} \u2192 gzip ${f.gzip}`):D.minified(r.kind,f.before,f.after,f.saved);}await fsExtra.writeFile(r.output,c).catch(R.write("Error writing SVG",{file:r.key,caller:e.relative})),D.syncing(r.key),await t("put",r,c);}return n}async function Cu(e,t,s){l.mode.watch&&W();let r=Rc(e,t),n=Pc(e,t),i=e.config.length;for(let o=0;o<i;o++){let a=e.config[o];o>0&&D.changed(e),a.format==="sprite"&&await r(a),a.format==="file"&&await n(a);}}var Eu=!1,wu=!1,Vn=new Set;function xs(e,t){Eu||(Eu=!0,Vn.forEach(s=>s()),e&&process.exit(128+t));}function Cs(e){return Vn.add(e),wu||(wu=!0,process.once("exit",xs),process.once("SIGINT",xs.bind(void 0,!0,2)),process.once("SIGTERM",xs.bind(void 0,!0,15)),process.on("message",t=>{t==="shutdown"&&xs(!0,-128);})),()=>Vn.delete(e)}async function Gc(){if(D.update(ae.message("gray","validating snippet injection")),await du()){D.update(ae.message("gray","validating layouts"));for(let t in l.hot.alive){if(!await fsExtra.pathExists(t)){D.update(ae.message("gray","layout has not yet been bundled, building now..."));let n=b(l.config.paths.layout)?l.config.paths.layout:[l.config.paths.layout];for(let i of n){let o=path.join(l.dirs.input,i),a=await fsExtra.readFile(o);await fsExtra.writeFile(t,a);}D.update(ae.message("gray","layout was bundled from source, injecting hot snippet"));}await yu(t)||(D.update.clear(),D.err("Failed to inject hot reload render tag"));}D.update.clear();}else D.update.clear(),D.err("Failed to upload snippet");}async function bu(){D.out(ae.message("whiteBright",x(`${l.hot.method==="hot"?"HOT":"LIVE"} Reloading:`))),D.nwl(),D.update(ae.message("gray","configuring HOT Reload")),await Gc();function e(n){n.setHeader("Access-Control-Allow-Origin","*"),n.setHeader("Cache-Control","public, max-age=0");}let t=Ic(path.join(l.dirs.output,"assets"),{setHeaders:e}),s=Nc.createServer((n,i)=>t(n,i,jc(n,i))),r=`http://localhost:${l.hot.server}`;s.listen(l.hot.server),D.out(ae.message("pink",`server \u2192 ${x("assets")} \u2192 ${p.underline(r)}`));}function vu(){if(l.mode.hot===!1)return;let e=new ws$1.Server({port:l.hot.socket,path:"/ws"});return Cs(()=>e.removeAllListeners()),e.on("connection",t=>{e.on("script",s=>t.send(`script,${s}`)),e.on("stylesheet",s=>t.send(`stylesheet,${s}`)),e.on("section",s=>t.send(`section,${s}`)),e.on("svg",s=>t.send(`svg,${s}`)),e.on("assets",()=>t.send("assets")),e.on("reload",()=>t.send("reload")),e.on("replace",()=>t.send("replace"));}),{script:t=>e.emit("script",path.basename(t)),stylesheet:t=>e.emit("stylesheet",path.basename(t)),section:t=>e.emit("section",t),svg:t=>e.emit("svg",t),assets:()=>e.emit("assets"),reload:()=>e.emit("reload"),replace:()=>e.emit("replace")}}function Au(e){let t=vu(),s=os(l.sync),r=ls(l.paths,l.dirs.output);Wc.watch(Ye(l.watch.values()),{persistent:!0,ignoreInitial:!0,usePolling:!0,interval:75,binaryInterval:100,ignored:["**/*.map"]}).on("all",function(o,a){let u=r(a);if(!q(u)){if(u.type!==15&&D.changed(u),o==="change"||o==="add")i(u);else if(o==="unlink")return s.assets("delete",u)}});async function i(o){try{let a=null;if(o.type===8)return hs.apply(t,[o,s.assets,e]);if(o.type===14)return pr(o,e);if(o.type===9)return Cu(o,s.assets,e);if(o.type===7)a=await ys(o,e),l.mode.hot&&t.stylesheet(o.key);else if(o.type===4)a=await xt(o,e);else if(o.type===2)a=await xt(o,e),l.mode.hot&&(a=hu(a));else if(o.type===3)a=await xt(o,e);else if(o.type===6||o.type===5)a=await Ct(o,e);else {if(o.type===13)return a=await Ct(o,e),s.metafields({value:a,namespace:o.namespace,key:o.key});o.type===1&&o.kind==="JSON"?a=await Ct(o,e):o.type===1&&o.kind==="Liquid"?a=await xt(o,e):(o.type===12||o.type===15)&&(a=await fs(o,e));}M(a)||(D.syncing(o.key),await s.assets("put",o,a),l.mode.hot&&(o.type===4?t.section(o.name):o.type!==8&&o.type!==7&&await O.onIdle().then(()=>t.replace())));}catch(a){D.err(a),console.error(a);}}}function $u(e){let t=e.toString().trim().toLowerCase();if(t!=="s"){if(t==="w"){for(let s in re.process)if(re.process[s].size!==0){D.nwl(),D.nwl();for(let r of re.process[s].values())typeof r=="string"&&r.length>0;re.process[s].clear();}re.count=0;}}}`
84
+ `)}function rc(e,t){if(!V.liquid.minifySchema)return ps(t);let s=t.search(/{%-?\s*schema/);if(s>-1){let r=t.indexOf("%}",s+2)+2,n=t.slice(r),i=r+n.search(/{%-?\s*endschema/);if(i>-1){let o=JSON.parse(t.slice(r,i)),a=JSON.stringify(o,null,0),u=t.slice(0,r)+a+t.slice(i);return ps(u)}D.invalid(e.relative);}return ps(t)}function sc(e){return V.liquid.stripDashes,e}async function nc(e,t){try{return await htmlMinifierTerser.minify(t,V.html)}catch(s){return D.invalid(e.relative),console.error(s),null}}var ic=e=>async t=>{if(!l.mode.minify)return await fsExtra.writeFile(e.output,t),D.transform(`${e.namespace} \u2192 ${Pe(e.size)}`),t;let s;if(e.base.endsWith(".js.liquid"))s=t.replace(ec,E).replace(/(?<=[:,]) +(?=['"{[])/g,E).replace(/{{%/g,"{ {%").replace(/%}}/g,"%} }").replace(/(?<=[%}]})\s+(?=[\]}])/g," ").replace(/>\s+(?=[{[])/,">").replace(/(?<=[}\]])\s<\//g,"</");else if(e.base.endsWith(".json.liquid"))s=JSON.stringify(JSON.parse(t),null,0);else {let n=e.type===4?rc(e,t):ps(t),i=await nc(e,n);s=tc(i);}if(D.process("HTML Terser",jr()),M(s))return await fsExtra.writeFile(e.output,t),t;let r=sc(s).replace(/^\s+/gm,E);if(await fsExtra.writeFile(e.output,r),!l.mode.build){let n=Be(t,e.size);n.isSmaller?D.transform(`${e.namespace} ${n.before} \u2192 gzip ${n.gzip}`):D.minified("Liquid",n.before,n.after,n.saved);}return r};async function xt(e,t){l.mode.watch&&W();let s=await fsExtra.readFile(e.input);e.size=xe(s);let r=ic(e),n=s.toString();if(!X("Function",t))return r(n);let i=t.apply({...e},n);return X("Undefined",i)||i===!1?r(n):X("String",i)?r(i):Buffer.isBuffer(i)?r(i.toString()):r(n)}function jn(e){try{return JSON.parse(e)}catch(t){return console.log(t),null}}function ac(e,t=0){try{return JSON.stringify(e,null,t)}catch(s){return console.log(s),null}}async function Ot(e,t,s=0){let r=ac(t,s);if(M(r))return l.mode.watch&&U(),t;if(!l.mode.build)if(s===0){let n=Be(r,e.size);D.minified("JSON",n.before,n.after,n.saved);}else D.transform(`${e.namespace} \u2192 ${Pe(e.size)}`);return e.type===13||fsExtra.writeFile(e.output,r).catch(R.write("Error writing JSON",{file:e.relative})),r}async function Ct(e,t){l.mode.watch&&W();let s=await fsExtra.readFile(e.input).catch(R.write("Error reading JSON file",{file:e.relative}));if(he(s)){let r=s.toString();if(e.size=xe(r),r.trim().length===0)return D.skipped(e,"empty file"),null;let n=jn(r);if(me(n))return D.skipped(e,"empty file"),null;let i=l.processor.json.indent;if(l.mode.minify&&(e.type===12?V.json.assets&&(i=0):e.type===6?V.json.locales&&(i=0):e.type===1?V.json.templates&&(i=0):e.type===13?V.json.metafields&&(i=0):e.type===5&&V.json.config&&(i=0)),!fe(t))return Ot(e,n,i);let o=t.apply({...e},n);return q(o)?Ot(e,n,i):b(o)||j(o)?Ot(e,o,i):P(o)?Ot(e,jn(o),i):he(o)?Ot(e,jn(o.toString()),i):Ot(e,n,i)}}async function pr(e,t){let s=await fsExtra.readFile(e.input);if(me(s.toString()))return l.mode.watch&&D.skipped(e,"empty file"),null;let{data:r,content:n}=pc(s);m("title",r)||(r.title=""),m("html",r)&&(l.page.export.html=r.html),m("linkify",r)&&(l.page.export.linkify=r.linkify),m("breaks",r)&&(l.page.export.breaks=r.breaks);let i=Dc(l.page.export).render(n);return fsExtra.writeFile(path.join(pe.pages.uri,e.base),i).catch(R.write("Error writing Page reference",{file:e.relative})),l.mode.build?i:{title:r.title,body_html:i}}var Ds=new Set,ms={},It=null,qn=async e=>{if(j(e))m(e.uuid,ms)&&await ms[e.uuid].dispose(),l.minify.script===!0&&v(e.esbuild,V.script,{sourcemap:!1}),ms[e.uuid]=await It.context(e.esbuild);else return It=zs("esbuild"),M(It)?(It=null,!1):!0};function ds(e){let{compilerOptions:t}=L.esbuild.tsconfig;if(!m("paths",t))return;let s=we(t.paths),r=new RegExp(`^(${s.join("|")})`);return {name:"syncify-paths",setup(n){n.onResolve({filter:r},function(i){let o=s.find(c=>new RegExp(`^${c}`).test(i.path)),[a]=o.split("*"),u=i.path.replace(a,E);u===i.path&&(u=E);for(let c of t.paths[o]){let f=path.normalize(path.resolve(l.cwd,c).replace("*",u));if(!f.endsWith("*"))return Ds.has(i.path)||(L.esbuild.loaded?Pr.emit("script:watch",i.path):e.watch.push(f)),{path:f};let[d]=Mn.sync(`${f}.*`);if(!d){let[h]=Mn.sync(`${f}/index.*`);d=h;}if(d)return {path:d}}return {path:i.path}});}}}function Dr(e){let t=new Set;return {name:"syncify-watch",setup(s){s.onResolve({filter:/.*/},r=>{if(!/node_modules/.test(r.importer)&&/^[./]/.test(r.path)){if(t.has(r.resolveDir))return;if(r.importer!==E){t.add(r.resolveDir);let n=Mn.sync(path.join(r.resolveDir,"*"),{cwd:l.cwd});for(let i of n)!Ds.has(i)&&!i.endsWith(".liquid")&&(Ds.add(i),L.esbuild.loaded===!1?e.watch.push(i):Pr.emit("script:watch",i));}else Ds.has(r.path)||(L.esbuild.loaded?Pr.emit("script:watch",r.path):e.watch.push(r.path));}});}}}var gc=e=>"<script>"+e+"<\/script>";async function yc(e,t,s,r){let n=t.config,i=n.esbuild;for(let{text:o,path:a}of e)if(/\.map$/.test(a)){let u=path.join(pe.script.uri,t.base);fsExtra.writeFile(u,o).catch(R.write("Error writing JavaScript Source Map to cache",{file:path.relative(l.cwd,u),source:t.relative}));}else {l.mode.watch&&D.process(x("ESBuild"),U()),D.transform(`${x(i.format.toUpperCase())} bundle \u2192 ${x(Pe(xe(o)))}`);let u;if(n.snippet){if(u=gc(o),X("Function",r)){let c=r.apply({...t},u);if(c===!1){D.external("cancelled");continue}else X("String",c)?(D.external("augment"),u=c):Buffer.isBuffer(c)&&(D.external("augment"),u=c.toString());}await fsExtra.writeFile(t.output,u).catch(R.write("Error writing inline <script> snippet",{file:t.relative})),D.transform(`exported as ${x("snippet")}`),l.mode.build||(l.mode.hot?s("put",t,u):await s("put",t,u));}else {if(u=o,X("Function",r)){let c=r.apply({...t},o);if(c===!1){D.external("cancelled");continue}else X("String",c)?(D.external("augment"),u=c):Buffer.isBuffer(c)&&(D.external("augment"),u=c.toString());}await fsExtra.writeFile(t.output,o).catch(R.write("Error writing JavaScript asset",{file:t.relative})),l.mode.build||(l.mode.hot?s("put",t,o):await s("put",t,o));}}}async function hs(e,t,s){l.mode.watch&&W();try{let r=await ms[e.config.uuid].rebuild();await yc(r.outputFiles,e,t,s),l.mode.hot&&(D.syncing(e.key),this.script(e.key));}catch(r){if(D.invalid(e.relative),m("errors",r))for(let n of r.errors)r.esbuild(n);return null}}var gs=null,Ln=null;async function Gn(e){if(e==="postcss")return gs=(await import('postcss')).default,M(gs)===!1;if(e==="sass")return Ln=(await import('sass')).default,M(Ln)===!1}function Cc(e,t){let s=fe(t)?{...e}:!1;return async function(r){if(M(r))return null;let n;if(s!==!1){let o=t.apply({...e},Buffer.from(r));q(o)||o===!1?n=r:(P(o)||he(o))&&(n=o);}else n=r;fsExtra.writeFile(e.output,n).catch(R.write("Error writing stylesheet to output",{input:e.relative,output:path.relative(l.cwd,e.output)}));let i=Be(r,e.size);return i.isSmaller?D.transform(`${x("CSS")} ${i.before} \u2192 gzip ${i.gzip}`):D.minified("CSS",i.before,i.after,i.saved),n}}async function Ec(e){let{config:t}=e,s=t.sass===!0?L.sass.config:t.sass;if(e.ext===".scss"||e.ext===".sass"){l.mode.watch&&W();try{let{css:r,sourceMap:n}=Ln.compile(t.input,{loadPaths:s.include,sourceMapIncludeSources:!1,sourceMap:s.sourcemap,style:s.style,logger:{debug:i=>console.log("DEBUG",i),warn:cr.sass(e)}});if(s.sourcemap){let i=path.join(pe.style.uri,e.base+".map");fsExtra.writeFile(i,JSON.stringify(n)).catch(R.write("Error writing SASS Source Map file to the cache directory",{file:path.relative(l.cwd,i),source:e.relative}));}return l.mode.watch&&D.process(`${x("SASS Dart")}`,U()),e.size=xe(r),{css:r,map:n}}catch(r){return D.invalid(e.relative),R.sass(e,r),null}}try{let r=await fsExtra.readFile(e.input);return e.size=xe(r),{css:r.toString(),map:null}}catch(r){return D.invalid(e.relative),D.throws(r),null}}async function wc(e,t,s){let{config:r}=e;try{l.mode.watch&&W();let n=await gs(L.postcss.config).process(t,{from:r.rename,to:r.rename,map:s?{prev:s,inline:!1}:null});l.mode.watch&&D.process(`${x("PostCSS")}`,U());let i=n.warnings();if(i.length>0)for(let o of i)cr.postcss(e,o);return n.toString()}catch(n){return D.invalid(e.relative),console.log(n),null}}function cu(e){return `<style type="text/css">${y+Me(2)+e}</style>`}async function ys(e,t){l.mode.watch&&W();let s=Cc(e,t);try{let r=await Ec(e);if(r===null)return null;if(M(gs)||!e.config.postcss&&!e.config.snippet)return s(r.css);if(e.config.postcss){let n=await wc(e,r.css,r.map);if(n===null)return null;if(e.config.snippet)return s(cu(n))}return e.config.snippet?s(cu(r.css)):s(r.css)}catch(r){return console.log(r),null}}async function Du(e){W();let t=ls(l.paths,l.dirs.output),s=Vu(Ye(l.watch.values())),n=(await Mn("**",{onlyFiles:!0,absolute:!0,cwd:l.dirs.input})).filter(s).reduce((o,a)=>{let u=t(a);if(q(u))return o;switch(u.type){case 7:o.styles.files.push(u);break;case 8:o.scripts.files.push(u);break;case 4:o.sections.files.push(u);break;case 2:o.layouts.files.push(u);break;case 3:o.snippets.files.push(u);break;case 6:o.locales.files.push(u);break;case 5:o.configs.files.push(u);break;case 1:o.templates.files.push(u);break;case 14:o.pages.files.push(u);break;case 12:o.assets.files.push(u);break;case 13:o.metafields.files.push(u);break;case 9:o.svgs.files.push(u);break}return o},{styles:{time:E,files:[],report:null},scripts:{time:E,files:[],report:null},svgs:{time:E,files:[],report:null},sections:{time:E,files:[],report:null},layouts:{time:E,files:[],report:null},templates:{time:E,files:[],report:null},snippets:{time:E,files:[],report:null},locales:{time:E,files:[],report:null},configs:{time:E,files:[],report:null},pages:{time:E,files:[],report:null},metafields:{time:E,files:[],report:null},assets:{time:E,files:[],report:null}}),i=o=>async a=>{W();try{let u=await(a.ext===".json"?Ct(a,e):o(a,e));if(u===null||isNaN(a.size))return {name:a.base,time:U(),output:a.key,error:"Skipped File"};let{before:c,after:f,saved:d,gzip:h}=Be(u,a.size);return {name:a.base,time:U(),output:Ee(a.output),error:null,size:{before:c,after:f,saved:d,gzip:h}}}catch(u){return {name:a.base,time:U(),output:Ee(a.output),error:u.message}}};for(let o in n)D.write(x(`${ft+g.gray}${n[o].files.length} ${Or(o)}`)),W(),o==="styles"?(n[o].report=await He(i(ys),n[o].files),n[o].time=U(),D.build(o,n[o])):o==="scripts"?(n[o].report=await He(i(hs),n[o].files),n[o].time=U(),D.build(o,n[o])):o==="layouts"||o==="snippets"||o==="sections"||o==="templates"?(n[o].report=await He(i(xt),n[o].files),n[o].time=U(),D.build(o,n[o])):o==="locales"||o==="configs"||o==="metafields"?(n[o].report=await He(i(Ct),n[o].files),n[o].time=U(),D.build(o,n[o])):o==="pages"?(n[o].report=await He(i(pr),n[o].files),n[o].time=U(),D.build(o,n[o])):o==="assets"?(n[o].report=await He(i(fs),n[o].files),n[o].time=U(),D.build(o,n[o])):o==="svgs"&&(n[o].report=await He(i(pr),n[o].files),n[o].time=U(),D.build(o,n[o]));D.update(`${g.gray}Build Completed ${p(`~ ${U()}`)}`),process.exit(0);}var Fs=new RegExp(`{%-?\\s*render\\s+['"]${wi}['"][,\\slablsockvetr:0-9'"]+?-?%}\\s+`);async function du(){let e=`snippets/${tr}`,[t]=l.sync.themes,s=await fsExtra.readFile(l.hot.snippet),r=await Sn(s.toString(),{theme:t,key:e});return D.update(ae.message("gray",`${e} uploaded snippet injection`)),r}function hu(e){if(!Fs.test(e))return gu(e)}function $c(e){let t=e.search(Fs);if(t>-1){let s=e.slice(0,t),r=e.slice(e.indexOf("%}")+2);return s+r}return e}function gu(e){let t=e.indexOf("<head>")+6;return e.slice(0,t)+y+l.hot.renderer+y+e.slice(t)}async function yu(e){if(!await fsExtra.pathExists(e))return null;let r=(await fsExtra.readFile(e)).toString();Fs.test(r)||(r=gu(r),await fsExtra.writeFile(e,r),D.update(ae.message("gray","injected render tag in output layout")));let[n]=l.sync.themes,i=path.basename(e),o=`layout/${i}`,a=await Wo(`layout/${i}`,n);return Fs.test(a)&&(r=$c(r)),await Sn(r,{theme:n,key:o})?(D.update(ae.message("gray","uploaded and inject render tag")),!0):!1}var Wn=null,Un=null;async function Vn(e){if(e==="svg-sprite")return Un=(await import('svg-sprite')).default,M(Un)===!1;if(e==="svgo")return Wn=(await import('svgo')).default,M(Wn)===!1}async function _c(e){let t=await fsExtra.readFile(e);return [e,t.toString(),xe(t)]}function kc(e){return new Promise(function(t,s){e.compile((r,n)=>{if(r)return s(r);for(let i in n)for(let o in n[i])t(n[i][o].contents.toString());});})}function Rc(e,t,s){async function r(n){let i=v({},e);l.mode.watch&&W(),i.kind="SVG Sprite",n.snippet?(i.namespace="snippets",i.key=path.join("snippets",fr(i,n.rename)),i.output=path.join(l.dirs.output,i.key)):(i.key=path.join("assets",fr(i,n.rename)),i.output=path.join(l.dirs.output,i.key));let o=n.sprite===!0?L.sprite.config:n.sprite,a=new Un(o),u=await Je(_c,Ye(n.input)).catch(R.write("Error reading an SVG file",{file:i.base,source:i.relative}));if(u){i.size=0;for(let[d,h,w]of u)a.add(d,null,h),i.size=i.size+w;let c=await kc(a);D.process(`${x("SVG Sprite")} ${pt}${u.length} ${Ge("SVG",u.length)}`,U()),await fsExtra.writeFile(i.output,c).catch(R.write("Error writing SVG Sprite",{file:i.key,caller:e.relative}));let f=Be(c,i.size);f.isSmaller?D.transform(`${i.kind} ${f.before} \u2192 gzip ${f.gzip}`):D.minified(i.kind,f.before,f.after,f.saved),D.syncing(i.key),await t("put",i,c);}}return r}function Pc(e,t,s){let r=v({},e);async function n(i){l.mode.watch&&W(),i.snippet?(r.namespace="snippets",r.key=path.join("snippets",fr(r,i.rename)),r.output=path.join(l.dirs.output,r.key)):(r.key=path.join("assets",fr(r,i.rename)),r.output=path.join(l.dirs.output,r.key));let o=i.svgo===!0?L.svgo:i.svgo,a=await fsExtra.readFile(r.input);r.size=xe(a);let u;try{u=Wn.optimize(a.toString(),o);}catch(f){return D.err(f.toString()),null}l.mode.watch&&D.process(x("SVGO"),U());let{data:c}=u;if(!l.mode.build){let f=Be(c,r.size);f.isSmaller?D.transform(`${r.kind} ${f.before} \u2192 gzip ${f.gzip}`):D.minified(r.kind,f.before,f.after,f.saved);}await fsExtra.writeFile(r.output,c).catch(R.write("Error writing SVG",{file:r.key,caller:e.relative})),D.syncing(r.key),await t("put",r,c);}return n}async function Cu(e,t,s){l.mode.watch&&W();let r=Rc(e,t),n=Pc(e,t),i=e.config.length;for(let o=0;o<i;o++){let a=e.config[o];o>0&&D.changed(e),a.format==="sprite"&&await r(a),a.format==="file"&&await n(a);}}var Eu=!1,wu=!1,zn=new Set;function xs(e,t){Eu||(Eu=!0,zn.forEach(s=>s()),e&&process.exit(128+t));}function Cs(e){return zn.add(e),wu||(wu=!0,process.once("exit",xs),process.once("SIGINT",xs.bind(void 0,!0,2)),process.once("SIGTERM",xs.bind(void 0,!0,15)),process.on("message",t=>{t==="shutdown"&&xs(!0,-128);})),()=>zn.delete(e)}async function Gc(){if(D.update(ae.message("gray","validating snippet injection")),await du()){D.update(ae.message("gray","validating layouts"));for(let t in l.hot.alive){if(!await fsExtra.pathExists(t)){D.update(ae.message("gray","layout has not yet been bundled, building now..."));let n=b(l.config.paths.layout)?l.config.paths.layout:[l.config.paths.layout];for(let i of n){let o=path.join(l.dirs.input,i),a=await fsExtra.readFile(o);await fsExtra.writeFile(t,a);}D.update(ae.message("gray","layout was bundled from source, injecting hot snippet"));}await yu(t)||(D.update.clear(),D.err("Failed to inject hot reload render tag"));}D.update.clear();}else D.update.clear(),D.err("Failed to upload snippet");}async function bu(){D.out(ae.message("whiteBright",x(`${l.hot.method==="hot"?"HOT":"LIVE"} Reloading:`))),D.nwl(),D.update(ae.message("gray","configuring HOT Reload")),await Gc();function e(n){n.setHeader("Access-Control-Allow-Origin","*"),n.setHeader("Cache-Control","public, max-age=0");}let t=Ic(path.join(l.dirs.output,"assets"),{setHeaders:e}),s=Nc.createServer((n,i)=>t(n,i,jc(n,i))),r=`http://localhost:${l.hot.server}`;s.listen(l.hot.server),D.out(ae.message("pink",`server \u2192 ${x("assets")} \u2192 ${p.underline(r)}`));}function vu(){if(l.mode.hot===!1)return;let e=new ws$1.Server({port:l.hot.socket,path:"/ws"});return Cs(()=>e.removeAllListeners()),e.on("connection",t=>{e.on("script",s=>t.send(`script,${s}`)),e.on("stylesheet",s=>t.send(`stylesheet,${s}`)),e.on("section",s=>t.send(`section,${s}`)),e.on("svg",s=>t.send(`svg,${s}`)),e.on("assets",()=>t.send("assets")),e.on("reload",()=>t.send("reload")),e.on("replace",()=>t.send("replace"));}),{script:t=>e.emit("script",path.basename(t)),stylesheet:t=>e.emit("stylesheet",path.basename(t)),section:t=>e.emit("section",t),svg:t=>e.emit("svg",t),assets:()=>e.emit("assets"),reload:()=>e.emit("reload"),replace:()=>e.emit("replace")}}function Au(e){let t=vu(),s=os(l.sync),r=ls(l.paths,l.dirs.output);Wc.watch(Ye(l.watch.values()),{persistent:!0,ignoreInitial:!0,usePolling:!0,interval:75,binaryInterval:100,ignored:["**/*.map"]}).on("all",function(o,a){let u=r(a);if(!q(u)){if(u.type!==15&&D.changed(u),o==="change"||o==="add")i(u);else if(o==="unlink")return s.assets("delete",u)}});async function i(o){try{let a=null;if(o.type===8)return hs.apply(t,[o,s.assets,e]);if(o.type===14)return pr(o,e);if(o.type===9)return Cu(o,s.assets,e);if(o.type===7)a=await ys(o,e),l.mode.hot&&t.stylesheet(o.key);else if(o.type===4)a=await xt(o,e);else if(o.type===2)a=await xt(o,e),l.mode.hot&&(a=hu(a));else if(o.type===3)a=await xt(o,e);else if(o.type===6||o.type===5)a=await Ct(o,e);else {if(o.type===13)return a=await Ct(o,e),s.metafields({value:a,namespace:o.namespace,key:o.key});o.type===1&&o.kind==="JSON"?a=await Ct(o,e):o.type===1&&o.kind==="Liquid"?a=await xt(o,e):(o.type===12||o.type===15)&&(a=await fs(o,e));}M(a)||(D.syncing(o.key),await s.assets("put",o,a),l.mode.hot&&(o.type===4?t.section(o.name):o.type!==8&&o.type!==7&&await O.onIdle().then(()=>t.replace())));}catch(a){D.err(a);}}}function $u(e){let t=e.toString().trim().toLowerCase();if(t!=="s"){if(t==="w"){for(let s in re.process)if(re.process[s].size!==0){D.nwl(),D.nwl();for(let r of re.process[s].values())typeof r=="string"&&r.length>0;re.process[s].clear();}re.count=0;}}}`
85
85
  ${p("-----------------------------------------------------------------------------")}
86
86
  ${x("Syncify CLI Examples")} ${p("by Panoply")}
87
87
  ${p("-----------------------------------------------------------------------------")}
@@ -179,9 +179,9 @@ var Zu=Object.create;var Bs=Object.defineProperty;var ea=Object.getOwnPropertyDe
179
179
 
180
180
  ${p("-----------------------------------------------------------------------------")}
181
181
 
182
- `;var Uc=Object.assign||((e,t)=>(t&&Object.keys(t).forEach(s=>e[s]=t[s]),e)),zn=(e,t,s)=>{let r=typeof s;if(s&&r==="object")if(Array.isArray(s))for(let n of s)t=zn(e,t,n);else for(let n of Object.keys(s)){let i=s[n];typeof i=="function"?t[n]=i(t[n],Es):i===void 0?e&&!isNaN(n)?t.splice(n,1):delete t[n]:i===null||typeof i!="object"||Array.isArray(i)?t[n]=i:typeof t[n]=="object"?t[n]=i===t[n]?i:Es(t[n],i):t[n]=zn(!1,{},i);}else r==="function"&&(t=s(t,Es));return t},Es=(e,...t)=>{let s=Array.isArray(e);return zn(s,s?e.slice():Uc({},e),t)},je=Es;function Xc(e,t){return e.replace(Rr,`.bundled_${Xe()}.${t==="esm"?"mjs":"cjs"}`)}function Zc(e){if(typeof jest>"u")return "cjs";let t=path.extname(e);return t===".js"?l.pkg.type==="module"?"esm":"cjs":t===".ts"||t===".mjs"?"esm":"cjs"}function ef(e){return we(e||{}).map(t=>new RegExp(`^${t.replace(/\*/,".*")}$`))}function _u(e,t){return t?t.some(s=>s instanceof RegExp?s.test(e):e===s||e.startsWith(s+"/")):!1}function tf({external:e,notExternal:t}={}){return {name:"bundle-require:external",setup({onResolve:s}){s({filter:/.*/},async r=>{if(!(r.path.charCodeAt(0)===46||path.isAbsolute(r.path))){if(_u(r.path,e))return {external:!0};if(!_u(r.path,t))return {external:!0}}});}}}function rf(){return {name:"bundle-require:inject-file-scope",setup(e){e.initialOptions.define={...e.initialOptions.define,__dirname:Ls,__filename:Gs,"import.meta.url":Ws},e.onLoad({filter:Rr},async t=>{let s=await fsExtra.readFile(t.path,"utf-8");return {contents:[`const ${Gs} = ${JSON.stringify(t.path)};`,`const ${Ls} = ${JSON.stringify(path.dirname(t.path))};`,`const ${Ws} = ${JSON.stringify(url.pathToFileURL(t.path).href)};`].join("")+s,loader:Pi(path.extname(t.path))}});}}}async function mr(e){if(!Rr.test(e.filepath))throw new Error(`${e.filepath} is not a valid JS file`);let t=e.preserveTemporaryFile??!!process.env.BUNDLE_REQUIRE_PRESERVE,s=e.cwd||process.cwd(),r=e.format??Zc(e.filepath),n=loadTsconfig.loadTsConfig(s,e.tsconfig),i=ef(n?.data.compilerOptions?.paths||{});async function o(c){if(!c.outputFiles)throw new Error("[bundle-require] no output files");let{text:f}=c.outputFiles[0],h=(e.getOutputFile||Xc)(e.filepath,r);await fsExtra.writeFile(h,f,"utf8");let w,B=e.require||Ri;try{w=await B(r==="esm"?url.pathToFileURL(h).href:h,{format:r});}finally{t||await fsExtra.unlink(h);}return {mod:w,dependencies:c.metafile?we(c.metafile.inputs):[]}}let a=await esbuild.build({...e.esbuildOptions,entryPoints:[e.filepath],absWorkingDir:s,outfile:"out.js",format:r,write:!1,platform:"node",sourcemap:"inline",bundle:!0,metafile:!0,plugins:[...e.esbuildOptions?.plugins||[],tf({external:e.external,notExternal:i}),rf()]});return await o(a)}async function Iu(e){let t=null;for(let s of ["syncify.config.js","syncify.config.mjs","syncify.config.cjs","syncify.config.ts","syncify.config.json"]){if(t=path.join(e,s),await fsExtra.pathExists(t))break;t=null;}if(t===null)return null;try{if(t.endsWith(".json")){l.file=t;let s=await fsExtra.readFile(t);return ki(s.toString())}else {l.file=t;let s=await mr({filepath:t});return s.mod.syncify||s.mod.default||s.mod}}catch(s){console.log(s);let r=path.join(e,"syncify.config.json");return await fsExtra.pathExists(r)?fsExtra.readJson(r):null}}async function ju(e){let t;if(t=path.join(e,"tsconfig.json"),!await fsExtra.pathExists(t)&&(t=path.join(e,"jsconfig.json"),!await fsExtra.pathExists(t)))return null;try{let r=await fsExtra.readFile(t),n=er(r.toString());return JSON.parse(n)}catch(r){throw new Error(r)}}async function Nu(e){let t=path.join(e,"package.json");if(!await fsExtra.pathExists(t))throw new Error('Missing "package.json" file');try{return await fsExtra.readJson(t)}catch(r){throw new Error(r)}}async function Mu(e,t={purge:!1}){if(l.dirs.cache=`${e}/`,!await fsExtra.pathExists(e))try{await fsExtra.mkdir(e);}catch(r){throw new Error(r)}for(let r of wi)if(r==="sections")pe[r]=[];else {pe[r]={};let n=path.join(e,r,"/");if(await fsExtra.pathExists(n))t.purge&&await fsExtra.emptyDir(n);else {try{await fsExtra.mkdir(n);}catch(o){throw new Error(o)}v(pe[r],{uri:n,data:{}});}v(pe[r],{uri:n,data:{}});}fsExtra.writeJson(path.join(e,"store.map"),pe,{spaces:0},r=>{if(r)throw r});}async function Jn(e){if(await fsExtra.pathExists(e)){if(l.mode.clean)try{await fsExtra.emptyDir(e);}catch(s){console.error(s);}}else try{await fsExtra.mkdir(e);}catch(s){throw new Error(s)}for(let s of bi){let r=path.join(e,s);if(!await fsExtra.pathExists(r))try{await fsExtra.mkdir(r);}catch(i){throw new Error(i)}}}function qu(e,t){let s=eu(e.cwd);for(let[r,n]of Si){let i;if(e[r]===n)if(t[r]===n){l.dirs[r]=s(e[r]);continue}else i=t[r];else i=e[r];if(b(i)){let o=Er(i.map(s));l.dirs[r]=o.length===1?o[0]:o;}else P(i)?l.dirs[r]=s(i):I("config",r,t[r],"string");}l.watch.add(l.file);}async function Lu({dirs:e,sync:t,mode:s}){if(!s.download)return;if(!await fsExtra.pathExists(e.import))try{await fsExtra.mkdir(e.import);}catch(n){throw new Error(n)}for(let n in t.themes){let{store:i,target:o}=t.themes[n],a=path.join(e.import,i);if(await fsExtra.pathExists(a)){if(s.clean)try{await fsExtra.emptyDir(a);}catch(c){console.error(c);}}else try{await fsExtra.mkdir(a);}catch(c){throw new Error(c)}await Jn(path.join(a,o));}}var Gu=e=>{if(!m("sections",e.views))return;let{sections:t}=e.views;j(e.views.sections)||Ie("sections",e.views.sections);for(let s in l.section){if(m(s,t)||Ie("sections",s),s==="prefixDir")if(ge(t[s])){l.section[s]=t[s];continue}else I("sections",s,t[s],"boolean");if(s==="separator")if(P(t[s]))if(/[@:_-]/.test(t[s])){l.section[s]=t[s];continue}else ne("sections",s,t[s],"@ | _ | : | -");else I("sections",s,t[s],"string");if(s==="global"){let r=P(t[s])?[t[s]]:t[s];if(b(r)){l.section[s]=new RegExp(`${r.join("|")}`);continue}else I("sections",s,t[s],"string | string[]");}}};function Wu(e){if(!m("json",e.processors))return;let{json:t}=e.processors;j(t)||Ie("json",t);for(let s in t){if(s==="indent")if(wr(t[s])){L.json[s]=t[s];continue}else I("json",s,t[s],"number");if(s==="useTab")if(ge(t[s])){L.json[s]=t[s];continue}else I("json",s,t[s],"boolean");if(s==="exclude"){let r=P(t[s])?[t[s]]:t[s];if(b(r)){L.json[s]=Vu(r);continue}else I("exclude",s,r[s],"string | string[]");}}}function yr(e,t){return !!(m("devDependencies",e)&&m(t,e.devDependencies)&&m(t,e.devDependencies)||m("dependencies",e)&&m(t,e.dependencies)||m("peerDependencies",e)&&m(t,e.peerDependencies)||m("optionalDependencies",e)&&m(t,e.peerDependencies))}async function lf(e){for(let t of ["js","cjs","mjs"]){let s=`${e}.${t}`;if(await fsExtra.pathExists(`${s}.${t}`))return s}return null}async function ws(e){try{let t=await lf(e);if(t!==null){let s=await mr({filepath:t});return {path:t,config:s.mod.syncify||s.mod.default||s.mod}}return null}catch{return null}}function Yn(e,t){let s=t,r=Ee(e),n=path.extname(e),i=path.basename(e,n);return q(t)?{dir:r,ext:n,file:i,name:i}:(/(\[dir\])/.test(s)&&(s=s.replace("[dir]",r)),/(\[file\])/.test(s)&&(s=s.replace("[file]",i)),/(\[ext\])/.test(s)&&(s=s.replace(".[ext]",n)),{ext:n,file:i,dir:r,name:t.replace(t,s)})}function Kn(e,t,s){let r=e+"_api_token";if(m(r,t)||(r=r.toUpperCase()),m(r,t))return {baseURL:`https://${e}.myshopify.com/admin`,headers:{"X-Shopify-Access-Token":t[r]}};let n=e+"_api_key",i=e+"_api_secret";if(m(n,t)||(n=n.toUpperCase()),m(i,t)||(i=i.toUpperCase()),m(n,t)&&m(i,t))return {baseURL:`https://${e}.myshopify.com/admin`,auth:{username:t[n],password:t[i]}};s===1?ee(`Invalid or missing ${T(e+".myshopify.com")} credentials`,[`Your shop credentials in the ${T.bold(".env")} file could`,"not be read correctly or are missing."]):s===2&&ee(`Missing credentials for: ${T(e+".myshopify.com")}`,`
182
+ `;var Uc=Object.assign||((e,t)=>(t&&Object.keys(t).forEach(s=>e[s]=t[s]),e)),Hn=(e,t,s)=>{let r=typeof s;if(s&&r==="object")if(Array.isArray(s))for(let n of s)t=Hn(e,t,n);else for(let n of Object.keys(s)){let i=s[n];typeof i=="function"?t[n]=i(t[n],Es):i===void 0?e&&!isNaN(n)?t.splice(n,1):delete t[n]:i===null||typeof i!="object"||Array.isArray(i)?t[n]=i:typeof t[n]=="object"?t[n]=i===t[n]?i:Es(t[n],i):t[n]=Hn(!1,{},i);}else r==="function"&&(t=s(t,Es));return t},Es=(e,...t)=>{let s=Array.isArray(e);return Hn(s,s?e.slice():Uc({},e),t)},je=Es;function Xc(e,t){return e.replace(Rr,`.bundled_${Xe()}.${t==="esm"?"mjs":"cjs"}`)}function Zc(e){if(typeof jest>"u")return "cjs";let t=path.extname(e);return t===".js"?l.pkg.type==="module"?"esm":"cjs":t===".ts"||t===".mjs"?"esm":"cjs"}function ef(e){return we(e||{}).map(t=>new RegExp(`^${t.replace(/\*/,".*")}$`))}function _u(e,t){return t?t.some(s=>s instanceof RegExp?s.test(e):e===s||e.startsWith(s+"/")):!1}function tf({external:e,notExternal:t}={}){return {name:"bundle-require:external",setup({onResolve:s}){s({filter:/.*/},async r=>{if(!(r.path.charCodeAt(0)===46||path.isAbsolute(r.path))){if(_u(r.path,e))return {external:!0};if(!_u(r.path,t))return {external:!0}}});}}}function rf(){return {name:"bundle-require:inject-file-scope",setup(e){e.initialOptions.define={...e.initialOptions.define,__dirname:Ls,__filename:Gs,"import.meta.url":Ws},e.onLoad({filter:Rr},async t=>{let s=await fsExtra.readFile(t.path,"utf-8");return {contents:[`const ${Gs} = ${JSON.stringify(t.path)};`,`const ${Ls} = ${JSON.stringify(path.dirname(t.path))};`,`const ${Ws} = ${JSON.stringify(url.pathToFileURL(t.path).href)};`].join("")+s,loader:Oi(path.extname(t.path))}});}}}async function mr(e){if(!Rr.test(e.filepath))throw new Error(`${e.filepath} is not a valid JS file`);let t=e.preserveTemporaryFile??!!process.env.BUNDLE_REQUIRE_PRESERVE,s=e.cwd||process.cwd(),r=e.format??Zc(e.filepath),n=loadTsconfig.loadTsConfig(s,e.tsconfig),i=ef(n?.data.compilerOptions?.paths||{});async function o(c){if(!c.outputFiles)throw new Error("[bundle-require] no output files");let{text:f}=c.outputFiles[0],h=(e.getOutputFile||Xc)(e.filepath,r);await fsExtra.writeFile(h,f,"utf8");let w,B=e.require||Pi;try{w=await B(r==="esm"?url.pathToFileURL(h).href:h,{format:r});}finally{t||await fsExtra.unlink(h);}return {mod:w,dependencies:c.metafile?we(c.metafile.inputs):[]}}let a=await esbuild.build({...e.esbuildOptions,entryPoints:[e.filepath],absWorkingDir:s,outfile:"out.js",format:r,write:!1,platform:"node",sourcemap:"inline",bundle:!0,metafile:!0,plugins:[...e.esbuildOptions?.plugins||[],tf({external:e.external,notExternal:i}),rf()]});return await o(a)}async function Iu(e){let t=null;for(let s of ["syncify.config.js","syncify.config.mjs","syncify.config.cjs","syncify.config.ts","syncify.config.json"]){if(t=path.join(e,s),await fsExtra.pathExists(t))break;t=null;}if(t===null)return null;try{if(t.endsWith(".json")){l.file=t;let s=await fsExtra.readFile(t);return Ri(s.toString())}else {l.file=t;let s=await mr({filepath:t});return s.mod.syncify||s.mod.default||s.mod}}catch(s){console.log(s);let r=path.join(e,"syncify.config.json");return await fsExtra.pathExists(r)?fsExtra.readJson(r):null}}async function ju(e){let t;if(t=path.join(e,"tsconfig.json"),!await fsExtra.pathExists(t)&&(t=path.join(e,"jsconfig.json"),!await fsExtra.pathExists(t)))return null;try{let r=await fsExtra.readFile(t),n=er(r.toString());return JSON.parse(n)}catch(r){throw new Error(r)}}async function Nu(e){let t=path.join(e,"package.json");if(!await fsExtra.pathExists(t))throw new Error('Missing "package.json" file');try{return await fsExtra.readJson(t)}catch(r){throw new Error(r)}}async function Mu(e,t={purge:!1}){if(l.dirs.cache=`${e}/`,!await fsExtra.pathExists(e))try{await fsExtra.mkdir(e);}catch(r){throw new Error(r)}for(let r of Si)if(r==="sections")pe[r]=[];else {pe[r]={};let n=path.join(e,r,"/");if(await fsExtra.pathExists(n))t.purge&&await fsExtra.emptyDir(n);else {try{await fsExtra.mkdir(n);}catch(o){throw new Error(o)}v(pe[r],{uri:n,data:{}});}v(pe[r],{uri:n,data:{}});}fsExtra.writeJson(path.join(e,"store.map"),pe,{spaces:0},r=>{if(r)throw r});}async function Yn(e){if(await fsExtra.pathExists(e)){if(l.mode.clean)try{await fsExtra.emptyDir(e);}catch(s){console.error(s);}}else try{await fsExtra.mkdir(e);}catch(s){throw new Error(s)}for(let s of vi){let r=path.join(e,s);if(!await fsExtra.pathExists(r))try{await fsExtra.mkdir(r);}catch(i){throw new Error(i)}}}function qu(e,t){let s=tu(e.cwd);for(let[r,n]of Bi){let i;if(e[r]===n)if(t[r]===n){l.dirs[r]=s(e[r]);continue}else i=t[r];else i=e[r];if(b(i)){let o=Er(i.map(s));l.dirs[r]=o.length===1?o[0]:o;}else P(i)?l.dirs[r]=s(i):I("config",r,t[r],"string");}l.watch.add(l.file);}async function Lu({dirs:e,sync:t,mode:s}){if(!s.download)return;if(!await fsExtra.pathExists(e.import))try{await fsExtra.mkdir(e.import);}catch(n){throw new Error(n)}for(let n in t.themes){let{store:i,target:o}=t.themes[n],a=path.join(e.import,i);if(await fsExtra.pathExists(a)){if(s.clean)try{await fsExtra.emptyDir(a);}catch(c){console.error(c);}}else try{await fsExtra.mkdir(a);}catch(c){throw new Error(c)}await Yn(path.join(a,o));}}var Gu=e=>{if(!m("sections",e.views))return;let{sections:t}=e.views;j(e.views.sections)||Ie("sections",e.views.sections);for(let s in l.section){if(m(s,t)||Ie("sections",s),s==="prefixDir")if(ge(t[s])){l.section[s]=t[s];continue}else I("sections",s,t[s],"boolean");if(s==="separator")if(P(t[s]))if(/[@:_-]/.test(t[s])){l.section[s]=t[s];continue}else ne("sections",s,t[s],"@ | _ | : | -");else I("sections",s,t[s],"string");if(s==="global"){let r=P(t[s])?[t[s]]:t[s];if(b(r)){l.section[s]=new RegExp(`${r.join("|")}`);continue}else I("sections",s,t[s],"string | string[]");}}};function Wu(e){if(!m("json",e.processors))return;let{json:t}=e.processors;j(t)||Ie("json",t);for(let s in t){if(s==="indent")if(wr(t[s])){L.json[s]=t[s];continue}else I("json",s,t[s],"number");if(s==="useTab")if(ge(t[s])){L.json[s]=t[s];continue}else I("json",s,t[s],"boolean");if(s==="exclude"){let r=P(t[s])?[t[s]]:t[s];if(b(r)){L.json[s]=Vu(r);continue}else I("exclude",s,r[s],"string | string[]");}}}function yr(e,t){return !!(m("devDependencies",e)&&m(t,e.devDependencies)&&m(t,e.devDependencies)||m("dependencies",e)&&m(t,e.dependencies)||m("peerDependencies",e)&&m(t,e.peerDependencies)||m("optionalDependencies",e)&&m(t,e.peerDependencies))}async function lf(e){for(let t of ["js","cjs","mjs"]){let s=`${e}.${t}`;if(await fsExtra.pathExists(`${s}.${t}`))return s}return null}async function ws(e){try{let t=await lf(e);if(t!==null){let s=await mr({filepath:t});return {path:t,config:s.mod.syncify||s.mod.default||s.mod}}return null}catch{return null}}function Qn(e,t){let s=t,r=Ee(e),n=path.extname(e),i=path.basename(e,n);return q(t)?{dir:r,ext:n,file:i,name:i}:(/(\[dir\])/.test(s)&&(s=s.replace("[dir]",r)),/(\[file\])/.test(s)&&(s=s.replace("[file]",i)),/(\[ext\])/.test(s)&&(s=s.replace(".[ext]",n)),{ext:n,file:i,dir:r,name:t.replace(t,s)})}function Xn(e,t,s){let r=e+"_api_token";if(m(r,t)||(r=r.toUpperCase()),m(r,t))return {baseURL:`https://${e}.myshopify.com/admin`,headers:{"X-Shopify-Access-Token":t[r]}};let n=e+"_api_key",i=e+"_api_secret";if(m(n,t)||(n=n.toUpperCase()),m(i,t)||(i=i.toUpperCase()),m(n,t)&&m(i,t))return {baseURL:`https://${e}.myshopify.com/admin`,auth:{username:t[n],password:t[i]}};s===1?ee(`Invalid or missing ${T(e+".myshopify.com")} credentials`,[`Your shop credentials in the ${T.bold(".env")} file could`,"not be read correctly or are missing."]):s===2&&ee(`Missing credentials for: ${T(e+".myshopify.com")}`,`
183
183
  You need to provide shop credentials within a ${T.bold(".env")} file.
184
- Please check you project setup and ensure you have correctly provided authorization.`);}function Ve(e,t){let{cwd:s}=l,r=fe(t)?[]:!1,n=$e("Path Resolver"),i=Rt(l.dirs.input);if(b(e)){let o=[];for(let a of e){let u=i(a),c=Nn.sync(u,{cwd:s,absolute:!0});if(r){let f=t(u);P(f)?r.push(f):b(f)&&r.push(...f);}c.length===0?n("No files can be resolved in",a):o.push(...c);}return r?{paths:o,match:Vu(r)}:o}if(P(e)){let o=i(e),a=Nn.sync(o,{cwd:s});if(a.length===0&&n("No files can be resolved in",e),r){let u=t(o);P(u)?r.push(u):b(u)&&r.push(...u);}return r?{paths:a,match:Vu(r)}:a}I("uri","uri/path",e,"string | string[]");}function Mt(e,t){if(P(e)){let{paths:s,match:r}=Ve(e,n=>(t.addWatch&&l.watch.add(n),nt(n)));if(s)return t.flatten?s.map(n=>({input:n,rename:path.basename(n),snippet:!1})):[{input:s,snippet:!1,rename:"[name].[ext]",match:r}]}else if(b(e)){if(e.every(P)){let{paths:s,match:r}=Ve(e,n=>(t.addWatch&&l.watch.add(n),nt(n)));if(s)return t.flatten?s.map(n=>({input:n,rename:path.basename(n),snippet:!1})):[{input:s,snippet:!1,rename:"[name].[ext]",match:r}]}else if(e.every(j))return e.map(s=>{m("input",s)||ne("tranform","input",s,"{ input: string | string[] }");let{paths:r,match:n}=Ve(e,i=>(t.addWatch&&l.watch.add(i),nt(i)));return s.match=n,s.input=r,m("snippet",s)||(s.snippet=!1),m("rename",s)||(s.rename=s.snippet?"[name].liquid":"[name].[ext]"),s})}else if(j(e)){let s=[];if(m("input",e)){let{paths:r,match:n}=Ve(e.input,i=>(t.addWatch&&l.watch.add(i),nt(i)));if(m("snippet",e)||(e.snippet=!1),m("rename",e)||(e.rename=e.snippet?"[name].liquid":"[name].[ext]"),t.flatten)for(let i of r)s.push(v(e,{input:i}));else e.input=r,e.match=n,s.push(e);}else for(let r in e){let n={snippet:r.startsWith("snippets/")},i=r.startsWith("assets/"),o=e[r],a=i||n.snippet;if(P(o)){a&&(n.rename=i?r.slice(7):r.slice(9));let{paths:u,match:c}=Ve(o,f=>(t.addWatch&&l.watch.add(f),nt(f)));if(u)if(t.flatten)for(let f of u)s.push(v({},n,{input:f}));else s.push(v({},n,{input:u,match:c}));}else if(j(o)){m("input",o)||ne("tranform",r,o,"{ input: string | string[] }");let{paths:u,match:c}=Ve(o.input,f=>(t.addWatch&&l.watch.add(f),nt(f)));if(u){let f=a?v({},o,n,{rename:i?r.slice(7):r.slice(9)}):v({},n,o);if(t.flatten)for(let d of u)s.push(v(f,{input:d}));else s.push(v(f,{input:u,match:c}));}}else if(b(o))if(o.every(P)){let{paths:u,match:c}=Ve(o,f=>(t.addWatch&&l.watch.add(f),nt(f)));if(u)if(t.flatten)for(let f of u)s.push(v({},n,o,{input:f}));else s.push(v({},n,o,{input:u,match:c}));}else I("transform",r,o,"string[]");}return s}}function Xn(e,t){return De(m("devDependencies",e)&&m(t,e.devDependencies),m("dependencies",e)&&m(t,e.dependencies),m("peerDependencies",e)&&m(t,e.peerDependencies),m("optionalDependencies",e)&&m(t,e.peerDependencies))}function zu(e,t){let s=t,r=Ee(e),n=path.extname(e),i=path.basename(e,n);return q(t)?{dir:r,ext:n,file:i,name:i}:(/(\[dir\])/.test(s)&&(s=s.replace("[dir]",r)),/(\[file\])/.test(s)&&(s=s.replace("[file]",i)),/(\[ext\])/.test(s)&&(s=s.replace(".[ext]",n)),{ext:n,file:i,dir:r,name:t.replace(t,s)})}async function Hu(e,t){if(!m("script",e.transforms))return;let{esbuild:s}=L,{script:r}=e.transforms,n=$e("script transform option");if(s.installed=yr(t,"esbuild"),s.installed){await Mn()||ee("failed to import ESBuild","Ensure you have installed esbuild");let c=await ws("esbuild.config");c!==null&&(s.file=c.path,s.config=je(s.config,c.config));}else Te("esbuild");m("entryPoints",s.config)&&(n("processor config is not allowed and was omitted","entryPoints"),delete s.config.entryPoints);let i=await ju(l.cwd),o=Mt(r,{addWatch:!1,flatten:!0}),a=As(["input","watch","rename","snippet"]);Ce(s,"tsconfig",{get(){return i}}),s.config.plugins.length>0?s.config.plugins.unshift(ds(),Dr()):s.config.plugins.push(ds(),Dr()),s.config.absWorkingDir=l.cwd;for(let u of o){l.watch.has(u.input)&&n("input already in use",path.relative(l.cwd,u.input));let c={uuid:Xe(),input:u.input,snippet:u.snippet,rename:null,watch:null,esbuild:null},f=v({entryPoints:[u.input]},s.config),d=a(u),{name:h}=zu(u.input,u.rename);if(!h.endsWith(".js")&&!h.endsWith(".mjs")?c.rename=h+".js":h.endsWith(".cjs")?ne("rename","file extension",h,".js | .mjs"):c.rename=h,u.snippet?(h.endsWith(".liquid")||(c.rename=h+".liquid"),l.watch.add(`!${path.join(l.cwd,e.output,"snippets",c.rename)}`),l.paths.transforms.set(c.input,8)):(h.endsWith(".liquid")&&n("Using .liquid extension rename for asset",h),l.watch.add(`!${path.join(l.cwd,e.output,"assets",c.rename)}`)),me(d))Ce(c,"esbuild",{get(){return f}});else {for(let B in d)B==="entryPoints"?n('Option is not allowed, use Syncify "input" instead',B):B==="outdir"?n("Option is not allowed, Syncify will handle output",B):B==="watch"?n("Option is not allowed, declare watch using Syncify",B):B==="absWorkingDir"||B==="watch"||B==="incremental"||B==="write"||B==="logLevel"?n("Option is not allowed and will be ignored",B):B==="plugins"?f[B].push(...d[B]):f[B]=d[B];Ce(c,"esbuild",{get(){return f}});}m("watch",u)||(u.watch=[]),b(u.watch)||I("script","watch",u.watch,"string[]");let w=v({},j(u.esbuild)?u.esbuild:s.config,{entryPoints:[u.input],write:!1,sourcemap:!1,absWorkingDir:l.cwd,plugins:[],outdir:u.snippet?path.join(l.dirs.output,"snippets"):path.join(l.dirs.output,"assets"),loader:{".liquid":"file"}});s.tsconfig!==null&&Re("compilerOptions.paths",s.tsconfig)?w.plugins.push(ds(u),Dr(u)):w.plugins.push(Dr(u));try{await It.build(w);}catch(B){throw new Error(B)}u.watch.forEach(B=>{l.watch.has(B)||l.watch.add(B);}),c.watch=Vu(u.watch),await Mn(c),l.script.push(c);}s.loaded=!0;}async function Yu(e,t){if(!m("style",e.transforms))return;let{postcss:s,sass:r}=L,n=$e("style transform option");if(r.installed=yr(t,"sass"),r.installed&&(await Ln("sass")||ee("Unable to dynamically import SASS","Ensure you have installed sass")),s.installed=yr(t,"postcss"),s.installed){await Ln("postcss")||ee("Unable to dynamically import PostCSS","Ensure you have installed postcss");let u=await ws("postcss.config");u!==null&&(s.file=u.path,s.config=u.config);}let i=Mt(e.transforms.style,{addWatch:!1,flatten:!0}),o=Rt(e.input);for(let a of i){let u={uuid:Xe(),input:a.input,watch:null,postcss:!1,sass:!1};if(m("postcss",a)){let d=j(a.postcss);(ge(a.postcss)||d)&&!M(a.postcss)?a.postcss!==!1&&(s.installed||Te("postcss"),u.postcss=d?je(s.config,a.postcss):!0):I("style","postcss",u.postcss,"boolean | {}");}if(m("sass",a)&&a.sass!==!1||r.installed===!0){let d=j(a.sass);if((ge(a.sass)||d)&&!M(a.sass))if(r.installed||Te("sass"),!d)Ce(u,"sass",{get(){return a.sass}});else {u.sass=v(r.config,a.sass);for(let h in a.sass)h==="sourcemap"||h==="warnings"?ge(a.sass[h])?u.sass[h]=a.sass[h]:I("sass",h,a.sass[h],"boolean"):h==="style"?(P(a.sass[h])||I("sass",h,a.sass[h],"string"),a.sass[h]==="expanded"||a.sass[h]==="compressed"?u.sass[h]=a.sass[h]:ne("sass",h,a.sass[h],"expanded | compressed")):h==="includePaths"&&(b(a.sass[h])?u.sass[h]=Er(a.sass[h]).map(w=>path.join(l.cwd,w)):I("sass",h,a.sass[h],"string[]"));}else I("style","sass",a.sass,"boolean | {}");!a.snippet&&!/\.s[ac]ss/.test(path.extname(u.input))&&n("Input is not a sass file",u.input);}let c=Yn(a.rename);m("rename",a)&&!M(a)&&(P(a.rename)||I("styles","rename",a.rename,"string"),c=Yn(u.input,a.rename),/[a-zA-Z0-9_.-]+/.test(c.name)||I("sass","rename",c,"Invalid rename augment"),c.name.endsWith(".css")?u.rename=c.name:c.name.endsWith(".scss")?c.name=c.name.replace(".scss",".css"):c.name.endsWith(".sass")?c.name=c.name.replace(".sass",".css"):c.name.endsWith(".liquid")||(c.name=c.name+".css"));let f=[];if(l.mode.watch&&m("watch",a)){b(a.watch)||I("styles","watch",a.watch,"string[]");for(let d of a.watch){let h=await Nn(path.join(l.cwd,o(d)));h.length===0&&d[0]!=="!"&&n("Cannot resolve watch glob/path uri",d);for(let w of h)fsExtra.existsSync(w)?f.push(w):n("No file exists in path",w);}f.push(u.input),f.forEach(d=>l.watch.add(d)),u.watch=Vu(f);}else u.watch=Vu([u.input]),l.watch.add(u.input);typeof u.sass=="object"&&(u.sass.include.unshift(l.cwd,path.join(l.cwd,c.dir)),Re("sass.include",a)&&(u.sass.include=a.sass.include.map(d=>path.join(l.cwd,d)))),m("snippet",a)&&(ge(a.snippet)||I("styles","snippet",a.snippet,"boolean"),u.snippet=a.snippet),u.snippet?(m("rename",u)||(u.rename=c.name),(!c.name.endsWith(".liquid")||!u.rename.endsWith(".liquid"))&&(u.rename=c.name+".liquid"),l.paths.transforms.set(u.input,7),l.watch.add(`!${path.join(l.cwd,e.output,"snippets",u.rename)}`)):(u.rename=c.name,l.watch.add(`!${path.join(l.cwd,e.output,"assets",c.name)}`)),l.style.push(u);}}async function Qu(e,t){if(!m("svg",e.transforms))return;let{sprite:s,svgo:r}=L,n=$e("svg transform");r.installed=Xn(t,"svgo"),r.installed&&(await Un("svgo")||ee("Unable to dynamically import SVGO","Ensure you have installed svgo")),s.installed=Xn(t,"svg-sprite"),s.installed&&(await Un("svg-sprite")||ee("Unable to dynamically import SVG Sprite","Ensure you have installed svg-sprite")),!s.installed&&!r.installed&&Te(["svgo","svg-sprite"]);let i=Mt(e.transforms.svg,{addWatch:!0,flatten:!1});for(let o of i){let a=o.input.filter(c=>path.extname(c)!==".svg"?(n("Excluded file which is not an SVG type",path.relative(l.cwd,c)),!1):!0);if(a.length===0){n("No SVG file paths were resolved");continue}let u={uuid:Xe(),input:new Set(a),match:o.match,format:null,rename:o.rename,snippet:o.snippet};m("svgo",o)&&m("sprite",o)&&ne("transform","svg","svgo AND sprite","svgo OR sprite"),m("format",o)?o.format==="file"||o.format==="sprite"?(u.format=o.format,o.format==="file"?(u.svgo=!0,r.installed||Te("svgo")):(u.sprite=!0,s.installed||Te("svg-sprite"))):ne("transform > svg","format",o.format,'"sprite" | "file"'):m("svgo",o)?(r.installed||Te("svgo"),u.format="file",u.svgo=j(o.svgo)?je(r.config,o.svgo):!0):m("sprite",o)?(s.installed||Te("svg-sprite"),u.format="sprite",u.sprite=j(o.sprite)?je(s.config,o.sprite):!0):r.installed&&s.installed?ko("transform > svg","format","sprite | file",[`SVG transforms require you to define ${T("format")} when both SVGO and SVG Sprite`,"processors are installed. Syncify needs to knows how is should handle the input and","which processor to use for the transform."].join(y)):r.installed&&!s.installed?(u.format="file",u.svgo=!0):s.installed&&!r.installed?(u.format="sprite",u.sprite=!0):Ie("transform > svg","Cannot resolve processor, try defining a format."),l.svg.push(u);}}var Ku=e=>{if(!(l.mode.minify===!1&&e.minify===!1)){if(l.mode.minify===!1&&e.minify===!0&&(l.mode.minify=!0),ge(e.minify)&&e.minify===!0)L.esbuild.installed||ee("esbuild is not installed",qs);else if(j(e.minify))for(let t in e.minify){if(e.minify[t]===!1||M(e.minify[t])){l.mode.minify===!0&&(l.minify[t]=!0);continue}if(t==="script"&&(L.esbuild.installed||ee("esbuild is not installed",qs)),ge(e.minify[t]))l.minify[t]=!0;else if(j(V[t])&&me(V[t])===!1)for(let s in e.minify[t]){let r=t==="views"?"liquid":t;m(s,V[r])||Ie(`minify > ${t}`,s),!M(e.minify[t][s])&&typeof V[r][s]!=typeof e.minify[t][s]&&I(`minify > ${t}`,s,typeof e.minify[t][s],typeof V[r][s]),s==="exclude"&&!me(e.minify[t][s])?V[t][s]=Ve(e.minify[t][s]):s==="collapseWhitespace"?V.html.collapseWhitespace=e.minify[t][s]:V[t][s]=e.minify[t][s];}else ne("minify",t,typeof V[t],"boolean | {}");}}};async function Xu(e,t){D.clear();let s=await Nu(e.cwd);Ce(l,"pkg",{get(){return s}}),l.config=await Tf(s,e),l.mode=Af(e),l.cli=e.cli,l.version=s.version,l.cwd=e.cwd,l.silent=e.silent,l.prod=e.prod,l.dev=e.dev&&!e.prod,l.logger=te.logger,process.env.SYNCIFY_ENV=l.dev?"dev":"prod",process.env.SYNCIFY_WATCH=String(l.mode.watch);let r=await Promise.all([qu(e,te),$f(l.cwd),Jn(l.dirs.output),Lu(l),_f(e,te),kf(te),Bf(te),Gu(te),Wu(te),Hu(te,s),Yu(te,s),Qu(te,s),vf(te,l),bf(te,l),Ku(te),Sf(te)]).catch(n=>{console.log(n);});return D.start(l),r}async function Sf(e){if(l.mode.watch!==!0||l.mode.hot===!1&&e.hot===!1)return;l.mode.hot===!1&&e.hot===!0&&(l.mode.hot=!0);let t=$e("HOT Reloads");if(l.sync.stores.length>1){t("HOT Reload can only be used on 1 store");return}else if(l.sync.themes.length>1){t("HOT Reload can only be used on 1 theme");return}St(j(e.hot),ge(e.hot),M(e.hot))&&I("hot","hot",e.hot,"boolean | {}");let{hot:s}=l;if(j(e.hot)&&me(e.hot)===!1)for(let r in e.hot)m(r,l.hot)?r==="label"?e.hot[r]==="visible"||e.hot[r]==="hidden"?s[r]=e.hot[r]:ne("hot",r,e.hot[r],"visible | hidden"):r==="method"?e.hot[r]==="hot"||e.hot[r]==="refresh"?s[r]=e.hot[r]:ne("hot",r,e.hot[r],"hot | refresh"):r==="scroll"?e.hot[r]==="preserved"||e.hot[r]==="top"?s[r]=e.hot[r]:ne("hot",r,e.hot[r],"preserved | top"):typeof s[r]==typeof e.hot[r]?s[r]=e.hot[r]:I("hot",r,e.hot[r],typeof s[r]):Ie(`hot > ${r}`,e.hot[r]);s.snippet=path.join(l.cwd,"node_modules","@syncify/cli",tr),s.output=path.join(l.dirs.output,"snippets",tr);for(let r of s.layouts)s.alive[path.join(l.dirs.output,"layout",r)]=!1;}function Bf(e){for(let t in e.processors)L[t].config=b(e.processors[t])?e.processors[t]:v(L[t].config,e.processors[t]);}function bf(e,t){if(!!m("plugins",e)&&!!b(e.plugins))for(let s of e.plugins)m("onInit",s)&&s.onInit.call({...t},e),m("onChange",s)&&Bt.onChange.push([s.name,s.onChange]),m("onTransform",s)&&Bt.onTransform.push([s.name,s.onTransform]),t.mode.watch&&(m("onWatch",s)&&Bt.onWatch.push([s.name,s.onWatch]),m("onReload",s)&&Bt.onReload.push([s.name,s.onReload])),t.mode.build&&m("onBuild",s)&&Bt.onBuild.push([s.name,s.onBuild]);}function vf(e,t){if(!m("spawn",e)||M(e.spawn))return;j(e.spawn)||I("config","spawn",e.spawn,"{ build: {}, watch: {} }");let s=null;if(t.mode.build&&m("build",e.spawn)&&(s="build"),t.mode.watch&&m("watch",e.spawn)&&(s="watch"),!(M(s)||M(e.spawn[s])||(j(e.spawn[s])||I("spawn",s,e.spawn.build,"string | string[]"),we(e.spawn[s]).length===0))){for(let n in e.spawn[s]){let i=e.spawn[s][n];if(P(i)){t.spawn.commands[n]={cmd:E,args:[],pid:NaN};let o=i.trimStart().indexOf(de)>-1?i.trimStart().split(de):[i];t.spawn.commands[n].cmd=o.shift(),t.spawn.commands[n].args=o,xn(n,t.spawn.commands[n],D.spawn(n));}else if(b(i)){let o=i.shift();t.spawn.commands[n]={cmd:o,args:i,pid:NaN},xn(n,t.spawn.commands[n],D.spawn(n));}else I("spawn",s,e.spawn[s],"string | string[]");}Cs(()=>{O.pause(),O.clear(),D.nwl(E),kt.forEach((n,i)=>{Q(`- ${p(`pid: #${n.pid} (${i}) process exited`)}`),n.kill();}),D.nwl(E),kt.clear(),process.exit(0);});}}function Af(e){let t=De(e.pages,e.metafields,e.redirects),s=De(e.style,e.script,e.image,e.svg),r=De(t,e.upload,e.download)?!1:e.watch;return {watch:r,hot:r&&e.hot,vsc:e.vsc,export:e.export,redirects:e.redirects,metafields:e.metafields,pages:e.pages,prompt:e.prompt,pull:e.pull,push:e.push,script:s?e.script:!1,style:s?e.style:!1,image:s?e.image:!1,svg:s?e.svg:!1,minify:De(e.minify,e.prod),clean:De(t,s,e.upload)?!1:e.clean,build:De(s,e.upload,e.watch,e.download)?!1:e.build,upload:De(s,r)?!1:e.upload,download:De(t,s,e.upload,e.watch,e.build)?!1:e.download}}async function $f(e){let t=path.join(e,"node_modules/.syncify"),s=path.join(t,"store.map");if(!await fsExtra.pathExists(s))return Mu(t);l.dirs.cache=`${t}/`;let n=await fsExtra.readJson(s);v(pe,n);}async function Tf(e,t){let s=await Iu(t.cwd);if(s!==null)return je(te,s);if(m("syncify",e))return je(te,e.syncify);Ro(t.cwd);}function _f(e,t){if(e._.length===0)return;let s=e._[0].split(","),r=xf.config({path:path.join(l.cwd,".env")}),i=(b(t.stores)?t.stores:[t.stores]).filter(({domain:a})=>vs(a,s)),o=i.length>1;for(let a of i){let u=`${a.domain}.myshopify.com`.toLowerCase(),c=r.error?Kn(a.domain,process.env,2):Kn(a.domain,r.parsed,1),f=l.sync.stores.push({store:a.domain,domain:u,client:c,queue:o})-1;if(l.mode.metafields||l.mode.pages)return;let d=m("theme",e)?e.theme.split(","):m(a.domain,e)?e[a.domain].split(","):we(a.themes);for(let h of d)m(h,a.themes)||ne("theme","target",h,"string"),l.sync.themes.push({target:h,sidx:f,store:u,id:a.themes[h],url:`/themes/${a.themes[h]}/assets.json`});}l.sync.stores.length===0&&l.mode.build===!0&&ee("Unknown, missing or invalid store/theme targets","Check your store config");}async function kf(e){let t=Rt(l.dirs.input),s=$e("path resolution");for(let r of Bi){let n;r==="customers"?n=m(r,e.paths)?b(e.paths[r])?e.paths[r].map(t):[t(e.paths[r])]:[t("templates/customers")]:m(r,e.paths)?(n=b(e.paths[r])?e.paths[r].map(t):[t(e.paths[r])],r==="assets"&&n.push(path.join(l.dirs.output,"assets/*"))):r==="redirects"?n=[path.join(l.cwd,e.paths[r])]:n=[t(r)];for(let i of n)(await Nn(i)).length===0&&s("No files could be resolved in",path.relative(l.cwd,i)),l.watch.add(i);l.paths[r]=Vu(n);}}var _x={get dev(){return process.env.SYNCIFY_ENV==="dev"},get prod(){return process.env.SYNCIFY_ENV==="prod"},get watch(){return process.env.SYNCIFY_WATCH==="true"},get options(){return l.config}};async function Lt(e,t,s){if(process.stdin.on("data",$u),m("_",e)&&(e._=e._.slice(1)),e.help)return console.info(Tu);await Xu(e),process.on("SIGINT",Mo),process.on("uncaughtException",Lo),process.on("unhandledRejection",qo),l.mode.hot&&await bu();try{if(l.mode.build)return Du(s);if(l.mode.watch)return Au(s);if(l.mode.upload)return uu(s);if(l.mode.download)return au(s)}catch(r){D.throws(r);}}var Ix=e=>e;function Rf(e,t){if(P(e)){if(/watch|build|download|upload/.test(e))return s=>Lt({cli:!1,[e]:!0},t,s)}else if(j(e)){if(!q(t))throw new Error("You cannot provide options when running instance");return {watch:s=>Lt({cli:!1,watch:!0},t,s),build:s=>Lt({cli:!1,build:!0},t,s),download:s=>Lt({cli:!1,download:!0},t,s),upload:s=>Lt({cli:!1,upload:!0},t,s)}}}var jx=Rf;
184
+ Please check you project setup and ensure you have correctly provided authorization.`);}function Ve(e,t){let{cwd:s}=l,r=fe(t)?[]:!1,n=$e("Path Resolver"),i=Rt(l.dirs.input);if(b(e)){let o=[];for(let a of e){let u=i(a),c=Mn.sync(u,{cwd:s,absolute:!0});if(r){let f=t(u);P(f)?r.push(f):b(f)&&r.push(...f);}c.length===0?n("No files can be resolved in",a):o.push(...c);}return r?{paths:o,match:Vu(r)}:o}if(P(e)){let o=i(e),a=Mn.sync(o,{cwd:s});if(a.length===0&&n("No files can be resolved in",e),r){let u=t(o);P(u)?r.push(u):b(u)&&r.push(...u);}return r?{paths:a,match:Vu(r)}:a}I("uri","uri/path",e,"string | string[]");}function Mt(e,t){if(P(e)){let{paths:s,match:r}=Ve(e,n=>(t.addWatch&&l.watch.add(n),nt(n)));if(s)return t.flatten?s.map(n=>({input:n,rename:path.basename(n),snippet:!1})):[{input:s,snippet:!1,rename:"[name].[ext]",match:r}]}else if(b(e)){if(e.every(P)){let{paths:s,match:r}=Ve(e,n=>(t.addWatch&&l.watch.add(n),nt(n)));if(s)return t.flatten?s.map(n=>({input:n,rename:path.basename(n),snippet:!1})):[{input:s,snippet:!1,rename:"[name].[ext]",match:r}]}else if(e.every(j))return e.map(s=>{m("input",s)||ne("tranform","input",s,"{ input: string | string[] }");let{paths:r,match:n}=Ve(e,i=>(t.addWatch&&l.watch.add(i),nt(i)));return s.match=n,s.input=r,m("snippet",s)||(s.snippet=!1),m("rename",s)||(s.rename=s.snippet?"[name].liquid":"[name].[ext]"),s})}else if(j(e)){let s=[];if(m("input",e)){let{paths:r,match:n}=Ve(e.input,i=>(t.addWatch&&l.watch.add(i),nt(i)));if(m("snippet",e)||(e.snippet=!1),m("rename",e)||(e.rename=e.snippet?"[name].liquid":"[name].[ext]"),t.flatten)for(let i of r)s.push(v(e,{input:i}));else e.input=r,e.match=n,s.push(e);}else for(let r in e){let n={snippet:r.startsWith("snippets/")},i=r.startsWith("assets/"),o=e[r],a=i||n.snippet;if(P(o)){a&&(n.rename=i?r.slice(7):r.slice(9));let{paths:u,match:c}=Ve(o,f=>(t.addWatch&&l.watch.add(f),nt(f)));if(u)if(t.flatten)for(let f of u)s.push(v({},n,{input:f}));else s.push(v({},n,{input:u,match:c}));}else if(j(o)){m("input",o)||ne("tranform",r,o,"{ input: string | string[] }");let{paths:u,match:c}=Ve(o.input,f=>(t.addWatch&&l.watch.add(f),nt(f)));if(u){let f=a?v({},o,n,{rename:i?r.slice(7):r.slice(9)}):v({},n,o);if(t.flatten)for(let d of u)s.push(v(f,{input:d}));else s.push(v(f,{input:u,match:c}));}}else if(b(o))if(o.every(P)){let{paths:u,match:c}=Ve(o,f=>(t.addWatch&&l.watch.add(f),nt(f)));if(u)if(t.flatten)for(let f of u)s.push(v({},n,o,{input:f}));else s.push(v({},n,o,{input:u,match:c}));}else I("transform",r,o,"string[]");}return s}}function Zn(e,t){return De(m("devDependencies",e)&&m(t,e.devDependencies),m("dependencies",e)&&m(t,e.dependencies),m("peerDependencies",e)&&m(t,e.peerDependencies),m("optionalDependencies",e)&&m(t,e.peerDependencies))}function zu(e,t){let s=t,r=Ee(e),n=path.extname(e),i=path.basename(e,n);return q(t)?{dir:r,ext:n,file:i,name:i}:(/(\[dir\])/.test(s)&&(s=s.replace("[dir]",r)),/(\[file\])/.test(s)&&(s=s.replace("[file]",i)),/(\[ext\])/.test(s)&&(s=s.replace(".[ext]",n)),{ext:n,file:i,dir:r,name:t.replace(t,s)})}async function Hu(e,t){if(!m("script",e.transforms))return;let{esbuild:s}=L,{script:r}=e.transforms,n=$e("script transform option");if(s.installed=yr(t,"esbuild"),s.installed){await qn()||ee("failed to import ESBuild","Ensure you have installed esbuild");let c=await ws("esbuild.config");c!==null&&(s.file=c.path,s.config=je(s.config,c.config));}else Te("esbuild");m("entryPoints",s.config)&&(n("processor config is not allowed and was omitted","entryPoints"),delete s.config.entryPoints);let i=await ju(l.cwd),o=Mt(r,{addWatch:!1,flatten:!0}),a=As(["input","watch","rename","snippet"]);Ce(s,"tsconfig",{get(){return i}}),s.config.plugins.length>0?s.config.plugins.unshift(ds(),Dr()):s.config.plugins.push(ds(),Dr()),s.config.absWorkingDir=l.cwd;for(let u of o){l.watch.has(u.input)&&n("input already in use",path.relative(l.cwd,u.input));let c={uuid:Xe(),input:u.input,snippet:u.snippet,rename:null,watch:null,esbuild:null},f=v({entryPoints:[u.input]},s.config),d=a(u),{name:h}=zu(u.input,u.rename);if(!h.endsWith(".js")&&!h.endsWith(".mjs")?c.rename=h+".js":h.endsWith(".cjs")?ne("rename","file extension",h,".js | .mjs"):c.rename=h,u.snippet?(h.endsWith(".liquid")||(c.rename=h+".liquid"),l.watch.add(`!${path.join(l.cwd,e.output,"snippets",c.rename)}`),l.paths.transforms.set(c.input,8)):(h.endsWith(".liquid")&&n("Using .liquid extension rename for asset",h),l.watch.add(`!${path.join(l.cwd,e.output,"assets",c.rename)}`)),me(d))Ce(c,"esbuild",{get(){return f}});else {for(let B in d)B==="entryPoints"?n('Option is not allowed, use Syncify "input" instead',B):B==="outdir"?n("Option is not allowed, Syncify will handle output",B):B==="watch"?n("Option is not allowed, declare watch using Syncify",B):B==="absWorkingDir"||B==="watch"||B==="incremental"||B==="write"||B==="logLevel"?n("Option is not allowed and will be ignored",B):B==="plugins"?f[B].push(...d[B]):f[B]=d[B];Ce(c,"esbuild",{get(){return f}});}m("watch",u)||(u.watch=[]),b(u.watch)||I("script","watch",u.watch,"string[]");let w=v({},j(u.esbuild)?u.esbuild:s.config,{entryPoints:[u.input],write:!1,sourcemap:!1,absWorkingDir:l.cwd,plugins:[],outdir:u.snippet?path.join(l.dirs.output,"snippets"):path.join(l.dirs.output,"assets"),loader:{".liquid":"file"}});s.tsconfig!==null&&Re("compilerOptions.paths",s.tsconfig)?w.plugins.push(ds(u),Dr(u)):w.plugins.push(Dr(u));try{await It.build(w);}catch(B){throw new Error(B)}u.watch.forEach(B=>{l.watch.has(B)||l.watch.add(B);}),c.watch=Vu(u.watch),await qn(c),l.script.push(c);}s.loaded=!0;}async function Yu(e,t){if(!m("style",e.transforms))return;let{postcss:s,sass:r}=L,n=$e("style transform option");if(r.installed=yr(t,"sass"),r.installed&&(await Gn("sass")||ee("Unable to dynamically import SASS","Ensure you have installed sass")),s.installed=yr(t,"postcss"),s.installed){await Gn("postcss")||ee("Unable to dynamically import PostCSS","Ensure you have installed postcss");let u=await ws("postcss.config");u!==null&&(s.file=u.path,s.config=u.config);}let i=Mt(e.transforms.style,{addWatch:!1,flatten:!0}),o=Rt(e.input);for(let a of i){let u={uuid:Xe(),input:a.input,watch:null,postcss:!1,sass:!1};if(m("postcss",a)){let d=j(a.postcss);(ge(a.postcss)||d)&&!M(a.postcss)?a.postcss!==!1&&(s.installed||Te("postcss"),u.postcss=d?je(s.config,a.postcss):!0):I("style","postcss",u.postcss,"boolean | {}");}if(m("sass",a)&&a.sass!==!1||r.installed===!0){let d=j(a.sass);if((ge(a.sass)||d)&&!M(a.sass))if(r.installed||Te("sass"),!d)Ce(u,"sass",{get(){return a.sass}});else {u.sass=v(r.config,a.sass);for(let h in a.sass)h==="sourcemap"||h==="warnings"?ge(a.sass[h])?u.sass[h]=a.sass[h]:I("sass",h,a.sass[h],"boolean"):h==="style"?(P(a.sass[h])||I("sass",h,a.sass[h],"string"),a.sass[h]==="expanded"||a.sass[h]==="compressed"?u.sass[h]=a.sass[h]:ne("sass",h,a.sass[h],"expanded | compressed")):h==="includePaths"&&(b(a.sass[h])?u.sass[h]=Er(a.sass[h]).map(w=>path.join(l.cwd,w)):I("sass",h,a.sass[h],"string[]"));}else I("style","sass",a.sass,"boolean | {}");!a.snippet&&!/\.s[ac]ss/.test(path.extname(u.input))&&n("Input is not a sass file",u.input);}let c=Qn(a.rename);m("rename",a)&&!M(a)&&(P(a.rename)||I("styles","rename",a.rename,"string"),c=Qn(u.input,a.rename),/[a-zA-Z0-9_.-]+/.test(c.name)||I("sass","rename",c,"Invalid rename augment"),c.name.endsWith(".css")?u.rename=c.name:c.name.endsWith(".scss")?c.name=c.name.replace(".scss",".css"):c.name.endsWith(".sass")?c.name=c.name.replace(".sass",".css"):c.name.endsWith(".liquid")||(c.name=c.name+".css"));let f=[];if(l.mode.watch&&m("watch",a)){b(a.watch)||I("styles","watch",a.watch,"string[]");for(let d of a.watch){let h=await Mn(path.join(l.cwd,o(d)));h.length===0&&d[0]!=="!"&&n("Cannot resolve watch glob/path uri",d);for(let w of h)fsExtra.existsSync(w)?f.push(w):n("No file exists in path",w);}f.push(u.input),f.forEach(d=>l.watch.add(d)),u.watch=Vu(f);}else u.watch=Vu([u.input]),l.watch.add(u.input);typeof u.sass=="object"&&(u.sass.include.unshift(l.cwd,path.join(l.cwd,c.dir)),Re("sass.include",a)&&(u.sass.include=a.sass.include.map(d=>path.join(l.cwd,d)))),m("snippet",a)&&(ge(a.snippet)||I("styles","snippet",a.snippet,"boolean"),u.snippet=a.snippet),u.snippet?(m("rename",u)||(u.rename=c.name),(!c.name.endsWith(".liquid")||!u.rename.endsWith(".liquid"))&&(u.rename=c.name+".liquid"),l.paths.transforms.set(u.input,7),l.watch.add(`!${path.join(l.cwd,e.output,"snippets",u.rename)}`)):(u.rename=c.name,l.watch.add(`!${path.join(l.cwd,e.output,"assets",c.name)}`)),l.style.push(u);}}async function Qu(e,t){if(!m("svg",e.transforms))return;let{sprite:s,svgo:r}=L,n=$e("svg transform");r.installed=Zn(t,"svgo"),r.installed&&(await Vn("svgo")||ee("Unable to dynamically import SVGO","Ensure you have installed svgo")),s.installed=Zn(t,"svg-sprite"),s.installed&&(await Vn("svg-sprite")||ee("Unable to dynamically import SVG Sprite","Ensure you have installed svg-sprite")),!s.installed&&!r.installed&&Te(["svgo","svg-sprite"]);let i=Mt(e.transforms.svg,{addWatch:!0,flatten:!1});for(let o of i){let a=o.input.filter(c=>path.extname(c)!==".svg"?(n("Excluded file which is not an SVG type",path.relative(l.cwd,c)),!1):!0);if(a.length===0){n("No SVG file paths were resolved");continue}let u={uuid:Xe(),input:new Set(a),match:o.match,format:null,rename:o.rename,snippet:o.snippet};m("svgo",o)&&m("sprite",o)&&ne("transform","svg","svgo AND sprite","svgo OR sprite"),m("format",o)?o.format==="file"||o.format==="sprite"?(u.format=o.format,o.format==="file"?(u.svgo=!0,r.installed||Te("svgo")):(u.sprite=!0,s.installed||Te("svg-sprite"))):ne("transform > svg","format",o.format,'"sprite" | "file"'):m("svgo",o)?(r.installed||Te("svgo"),u.format="file",u.svgo=j(o.svgo)?je(r.config,o.svgo):!0):m("sprite",o)?(s.installed||Te("svg-sprite"),u.format="sprite",u.sprite=j(o.sprite)?je(s.config,o.sprite):!0):r.installed&&s.installed?Ro("transform > svg","format","sprite | file",[`SVG transforms require you to define ${T("format")} when both SVGO and SVG Sprite`,"processors are installed. Syncify needs to knows how is should handle the input and","which processor to use for the transform."].join(y)):r.installed&&!s.installed?(u.format="file",u.svgo=!0):s.installed&&!r.installed?(u.format="sprite",u.sprite=!0):Ie("transform > svg","Cannot resolve processor, try defining a format."),l.svg.push(u);}}var Ku=e=>{if(!(l.mode.minify===!1&&e.minify===!1)&&(l.mode.minify===!1&&e.minify===!0&&(l.mode.minify=!0),ge(e.minify)&&e.minify===!0&&(L.esbuild.installed||ee("esbuild is not installed",qs)),j(e.minify)))for(let t in e.minify){if(e.minify[t]===!1||M(e.minify[t])){l.mode.minify===!0&&(l.minify[t]=!0);continue}if(t==="script"&&(L.esbuild.installed||ee("esbuild is not installed",qs)),ge(e.minify[t]))l.minify[t]=!0;else if(j(V[t])&&me(V[t])===!1)for(let s in e.minify[t]){let r=t==="views"?"liquid":t;m(s,V[r])||Ie(`minify > ${t}`,s),!M(e.minify[t][s])&&typeof V[r][s]!=typeof e.minify[t][s]&&I(`minify > ${t}`,s,typeof e.minify[t][s],typeof V[r][s]),s==="exclude"&&!me(e.minify[t][s])?V[t][s]=Ve(e.minify[t][s]):s==="collapseWhitespace"?V.html.collapseWhitespace=e.minify[t][s]:V[t][s]=e.minify[t][s];}else ne("minify",t,typeof V[t],"boolean | {}");}};async function Xu(e,t){D.clear();let s=await Nu(e.cwd);Ce(l,"pkg",{get(){return s}}),l.config=await Tf(s,e),l.mode=Af(e),l.cli=e.cli,l.version=s.version,l.cwd=e.cwd,l.silent=e.silent,l.prod=e.prod,l.dev=e.dev&&!e.prod,l.logger=te.logger,process.env.SYNCIFY_ENV=l.dev?"dev":"prod",process.env.SYNCIFY_WATCH=String(l.mode.watch);let r=await Promise.all([qu(e,te),$f(l.cwd),Yn(l.dirs.output),Lu(l),_f(e,te),kf(te),Bf(te),Ku(te),Gu(te),Wu(te),Hu(te,s),Yu(te,s),Qu(te,s),vf(te,l),bf(te,l),Sf(te)]).catch(n=>{console.log(n);});return D.start(l),r}async function Sf(e){if(l.mode.watch!==!0||l.mode.hot===!1&&e.hot===!1)return;l.mode.hot===!1&&e.hot===!0&&(l.mode.hot=!0);let t=$e("HOT Reloads");if(l.sync.stores.length>1){t("HOT Reload can only be used on 1 store");return}else if(l.sync.themes.length>1){t("HOT Reload can only be used on 1 theme");return}St(j(e.hot),ge(e.hot),M(e.hot))&&I("hot","hot",e.hot,"boolean | {}");let{hot:s}=l;if(j(e.hot)&&me(e.hot)===!1)for(let r in e.hot)m(r,l.hot)?r==="label"?e.hot[r]==="visible"||e.hot[r]==="hidden"?s[r]=e.hot[r]:ne("hot",r,e.hot[r],"visible | hidden"):r==="method"?e.hot[r]==="hot"||e.hot[r]==="refresh"?s[r]=e.hot[r]:ne("hot",r,e.hot[r],"hot | refresh"):r==="scroll"?e.hot[r]==="preserved"||e.hot[r]==="top"?s[r]=e.hot[r]:ne("hot",r,e.hot[r],"preserved | top"):typeof s[r]==typeof e.hot[r]?s[r]=e.hot[r]:I("hot",r,e.hot[r],typeof s[r]):Ie(`hot > ${r}`,e.hot[r]);s.snippet=path.join(l.cwd,"node_modules","@syncify/cli",tr),s.output=path.join(l.dirs.output,"snippets",tr);for(let r of s.layouts)s.alive[path.join(l.dirs.output,"layout",r)]=!1;}function Bf(e){for(let t in e.processors)L[t].config=b(e.processors[t])?e.processors[t]:v(L[t].config,e.processors[t]);}function bf(e,t){if(!!m("plugins",e)&&!!b(e.plugins))for(let s of e.plugins)m("onInit",s)&&s.onInit.call({...t},e),m("onChange",s)&&Bt.onChange.push([s.name,s.onChange]),m("onTransform",s)&&Bt.onTransform.push([s.name,s.onTransform]),t.mode.watch&&(m("onWatch",s)&&Bt.onWatch.push([s.name,s.onWatch]),m("onReload",s)&&Bt.onReload.push([s.name,s.onReload])),t.mode.build&&m("onBuild",s)&&Bt.onBuild.push([s.name,s.onBuild]);}function vf(e,t){if(!m("spawn",e)||M(e.spawn))return;j(e.spawn)||I("config","spawn",e.spawn,"{ build: {}, watch: {} }");let s=null;if(t.mode.build&&m("build",e.spawn)&&(s="build"),t.mode.watch&&m("watch",e.spawn)&&(s="watch"),!(M(s)||M(e.spawn[s])||(j(e.spawn[s])||I("spawn",s,e.spawn.build,"string | string[]"),we(e.spawn[s]).length===0))){for(let n in e.spawn[s]){let i=e.spawn[s][n];if(P(i)){t.spawn.commands[n]={cmd:E,args:[],pid:NaN};let o=i.trimStart().indexOf(de)>-1?i.trimStart().split(de):[i];t.spawn.commands[n].cmd=o.shift(),t.spawn.commands[n].args=o,xn(n,t.spawn.commands[n],D.spawn(n));}else if(b(i)){let o=i.shift();t.spawn.commands[n]={cmd:o,args:i,pid:NaN},xn(n,t.spawn.commands[n],D.spawn(n));}else I("spawn",s,e.spawn[s],"string | string[]");}Cs(()=>{O.pause(),O.clear(),D.nwl(E),kt.forEach((n,i)=>{Q(`- ${p(`pid: #${n.pid} (${i}) process exited`)}`),n.kill();}),D.nwl(E),kt.clear(),process.exit(0);});}}function Af(e){let t=De(e.pages,e.metafields,e.redirects),s=De(e.style,e.script,e.image,e.svg),r=De(t,e.upload,e.download)?!1:e.watch;return {watch:r,hot:r&&e.hot,vsc:e.vsc,export:e.export,redirects:e.redirects,metafields:e.metafields,pages:e.pages,prompt:e.prompt,pull:e.pull,push:e.push,script:s?e.script:!1,style:s?e.style:!1,image:s?e.image:!1,svg:s?e.svg:!1,minify:De(e.minify,e.prod),clean:De(t,s,e.upload)?!1:e.clean,build:De(s,e.upload,e.watch,e.download)?!1:e.build,upload:De(s,r)?!1:e.upload,download:De(t,s,e.upload,e.watch,e.build)?!1:e.download}}async function $f(e){let t=path.join(e,"node_modules/.syncify"),s=path.join(t,"store.map");if(!await fsExtra.pathExists(s))return Mu(t);l.dirs.cache=`${t}/`;let n=await fsExtra.readJson(s);v(pe,n);}async function Tf(e,t){let s=await Iu(t.cwd);if(s!==null)return je(te,s);if(m("syncify",e))return je(te,e.syncify);Po(t.cwd);}function _f(e,t){if(e._.length===0)return;let s=e._[0].split(","),r=xf.config({path:path.join(l.cwd,".env")}),i=(b(t.stores)?t.stores:[t.stores]).filter(({domain:a})=>vs(a,s)),o=i.length>1;for(let a of i){let u=`${a.domain}.myshopify.com`.toLowerCase(),c=r.error?Xn(a.domain,process.env,2):Xn(a.domain,r.parsed,1),f=l.sync.stores.push({store:a.domain,domain:u,client:c,queue:o})-1;if(l.mode.metafields||l.mode.pages)return;let d=m("theme",e)?e.theme.split(","):m(a.domain,e)?e[a.domain].split(","):we(a.themes);for(let h of d)m(h,a.themes)||ne("theme","target",h,"string"),l.sync.themes.push({target:h,sidx:f,store:u,id:a.themes[h],url:`/themes/${a.themes[h]}/assets.json`});}l.sync.stores.length===0&&l.mode.build===!0&&ee("Unknown, missing or invalid store/theme targets","Check your store config");}async function kf(e){let t=Rt(l.dirs.input),s=$e("path resolution");for(let r of bi){let n;r==="customers"?n=m(r,e.paths)?b(e.paths[r])?e.paths[r].map(t):[t(e.paths[r])]:[t("templates/customers")]:m(r,e.paths)?(n=b(e.paths[r])?e.paths[r].map(t):[t(e.paths[r])],r==="assets"&&n.push(path.join(l.dirs.output,"assets/*"))):r==="redirects"?n=[path.join(l.cwd,e.paths[r])]:n=[t(r)];for(let i of n)(await Mn(i)).length===0&&s("No files could be resolved in",path.relative(l.cwd,i)),l.watch.add(i);l.paths[r]=Vu(n);}}var _x={get dev(){return process.env.SYNCIFY_ENV==="dev"},get prod(){return process.env.SYNCIFY_ENV==="prod"},get watch(){return process.env.SYNCIFY_WATCH==="true"},get options(){return l.config}};async function Lt(e,t,s){if(process.stdin.on("data",$u),m("_",e)&&(e._=e._.slice(1)),e.help)return console.info(Tu);await Xu(e),process.on("SIGINT",qo),process.on("uncaughtException",Go),process.on("unhandledRejection",Lo),l.mode.hot&&await bu();try{if(l.mode.build)return Du(s);if(l.mode.watch)return Au(s);if(l.mode.upload)return uu(s);if(l.mode.download)return au(s)}catch(r){D.throws(r);}}var Ix=e=>e;function Rf(e,t){if(P(e)){if(/watch|build|download|upload/.test(e))return s=>Lt({cli:!1,[e]:!0},t,s)}else if(j(e)){if(!q(t))throw new Error("You cannot provide options when running instance");return {watch:s=>Lt({cli:!1,watch:!0},t,s),build:s=>Lt({cli:!1,build:!0},t,s),download:s=>Lt({cli:!1,download:!0},t,s),upload:s=>Lt({cli:!1,upload:!0},t,s)}}}var jx=Rf;
185
185
 
186
186
  exports.a = D;
187
187
  exports.b = Ix;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@syncify/cli",
3
3
  "description": "The next generation build tool for Shopify theme development.",
4
- "version": "0.1.1-beta",
4
+ "version": "0.1.3-beta",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/panoply/syncify",
7
7
  "bugs": "https://github.com/panoply/syncify/issues",
package/readme.md CHANGED
@@ -32,19 +32,19 @@ Install as development dependency in your project.
32
32
  **PNPM**
33
33
 
34
34
  ```cli
35
- pnpm add @syncify/syncify -D
35
+ pnpm add @syncify/cli -D
36
36
  ```
37
37
 
38
38
  **NPM**
39
39
 
40
40
  ```cli
41
- npm i @syncify/syncify --save-dev
41
+ npm i @syncify/cli --save-dev
42
42
  ```
43
43
 
44
44
  **Yarn**
45
45
 
46
46
  ```cli
47
- yarn add @syncify/syncify --dev
47
+ yarn add @syncify/cli --dev
48
48
  ```
49
49
 
50
50
  # Overview