@bluepic/embed 0.1.36 → 0.1.38

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.
@@ -98838,8 +98838,9 @@ class BluepicEmbed extends EventTarget {
98838
98838
  );
98839
98839
  }
98840
98840
  init() {
98841
+ const c = `bluepic-app-${nanoid()}`;
98841
98842
  this.element.innerHTML = `
98842
- <div id="app" class="bluepic-app-wrapper" style="height: 100%;">
98843
+ <div id="${c}" class="bluepic-app-wrapper" style="height: 100%;">
98843
98844
  <bluepic-embedded-editor
98844
98845
  ref="editorRef"
98845
98846
  :template-id="templateId"
@@ -98861,52 +98862,52 @@ class BluepicEmbed extends EventTarget {
98861
98862
  />
98862
98863
  </div>
98863
98864
  `;
98864
- const c = this;
98865
+ const de = this;
98865
98866
  nextTick$3(() => {
98866
98867
  createApp({
98867
98868
  components: {
98868
98869
  BluepicEmbeddedEditor
98869
98870
  },
98870
98871
  setup() {
98871
- return provide("darkmode", c.darkmode), {
98872
+ return provide("darkmode", de.darkmode), {
98872
98873
  bridge: {
98873
- async handleUpload({ blob: ye, context: ke, width: xe, height: Ze, name: ie, onProgress: ii }) {
98874
- const { variants: di, filename: li, id: mi } = await uploadImage(
98875
- c.templateId.value,
98874
+ async handleUpload({ blob: ke, context: xe, width: Ze, height: ie, name: ii, onProgress: di }) {
98875
+ const { variants: li, filename: mi, id: Ei } = await uploadImage(
98876
+ de.templateId.value,
98877
+ xe,
98876
98878
  ke,
98877
- ye,
98878
- ie,
98879
- (Ai, Ci) => {
98880
- ii(Ai / Ci);
98879
+ ii,
98880
+ (Ci, Bi) => {
98881
+ di(Ci / Bi);
98881
98882
  }
98882
- ), Ei = di.find((Ai) => parseCloudflareImagesDeliveryUrl(Ai).variant === "public");
98883
- if (!Ei)
98883
+ ), Ai = li.find((Ci) => parseCloudflareImagesDeliveryUrl(Ci).variant === "public");
98884
+ if (!Ai)
98884
98885
  throw new Error("No public variant");
98885
98886
  return {
98886
- width: xe,
98887
- height: Ze,
98888
- key: mi,
98889
- name: li,
98890
- src: Ei
98887
+ width: Ze,
98888
+ height: ie,
98889
+ key: Ei,
98890
+ name: mi,
98891
+ src: Ai
98891
98892
  };
98892
98893
  }
98893
98894
  },
98894
- editorRef: c.editorRef,
98895
- theme: c.theme,
98896
- allowPanAndZoom: c.allowPanAndZoom,
98897
- darkmode: c.darkmode,
98898
- templateId: c.templateId,
98899
- studioResourcesBaseUrl: c.studioResourcesBaseUrl,
98900
- cloudflarePagesHostname: c.cloudflarePagesHostname,
98901
- data: c.data,
98902
- serial: c.serial,
98903
- ready: c.ready,
98904
- displayMode: c.displayMode,
98905
- bxCoreVersion: c.bxCoreVersion,
98906
- publishedSlug: c.publishedSlug
98895
+ editorRef: de.editorRef,
98896
+ theme: de.theme,
98897
+ allowPanAndZoom: de.allowPanAndZoom,
98898
+ darkmode: de.darkmode,
98899
+ templateId: de.templateId,
98900
+ studioResourcesBaseUrl: de.studioResourcesBaseUrl,
98901
+ cloudflarePagesHostname: de.cloudflarePagesHostname,
98902
+ data: de.data,
98903
+ serial: de.serial,
98904
+ ready: de.ready,
98905
+ displayMode: de.displayMode,
98906
+ bxCoreVersion: de.bxCoreVersion,
98907
+ publishedSlug: de.publishedSlug
98907
98908
  };
98908
98909
  }
98909
- }).mount("#app");
98910
+ }).mount(`#${c}`);
98910
98911
  });
98911
98912
  }
98912
98913
  setVariable(c, de) {
@@ -2602,8 +2602,8 @@ Use Save As... to download, then click back to return to this page.`)&&(location
2602
2602
  Use "options.replacer" or "options.ignoreUnknown"
2603
2603
  `)},_domwindow:function(){return tr("domwindow")},_bigint:function(lr){return tr("bigint:"+lr.toString())},_process:function(){return tr("process")},_timer:function(){return tr("timer")},_pipe:function(){return tr("pipe")},_tcp:function(){return tr("tcp")},_udp:function(){return tr("udp")},_tty:function(){return tr("tty")},_statwatcher:function(){return tr("statwatcher")},_securecontext:function(){return tr("securecontext")},_connection:function(){return tr("connection")},_zlib:function(){return tr("zlib")},_context:function(){return tr("context")},_nodescript:function(){return tr("nodescript")},_httpparser:function(){return tr("httpparser")},_dataview:function(){return tr("dataview")},_signal:function(){return tr("signal")},_fsevent:function(){return tr("fsevent")},_tlswrap:function(){return tr("tlswrap")}}}function or(){return{buf:"",write:function(rr){this.buf+=rr},end:function(rr){this.buf+=rr},read:function(){return this.buf}}}ke.writeToStream=function(rr,cr,ar){return ar===void 0&&(ar=cr,cr={}),Gi(cr=Oi(rr,cr),ar).dispatch(rr)}}).call(this,de("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},de("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/fake_9a5aa49d.js","/")},{buffer:3,crypto:5,lYpoI2:11}],2:[function(de,ye,ke){(function(xe,Ze,ie,ii,di,li,mi,Ei,Ai){(function(Ci){var Bi=typeof Uint8Array<"u"?Uint8Array:Array,Di="+".charCodeAt(0),Wi="/".charCodeAt(0),Oi="0".charCodeAt(0),Ui="a".charCodeAt(0),Gi="A".charCodeAt(0),or="-".charCodeAt(0),rr="_".charCodeAt(0);function cr(ar){return ar=ar.charCodeAt(0),ar===Di||ar===or?62:ar===Wi||ar===rr?63:ar<Oi?-1:ar<Oi+10?ar-Oi+26+26:ar<Gi+26?ar-Gi:ar<Ui+26?ar-Ui+26:void 0}Ci.toByteArray=function(ar){var tr,lr;if(0<ar.length%4)throw new Error("Invalid string. Length must be a multiple of 4");var hi=ar.length,hi=ar.charAt(hi-2)==="="?2:ar.charAt(hi-1)==="="?1:0,Me=new Bi(3*ar.length/4-hi),ze=0<hi?ar.length-4:ar.length,qe=0;function ei(ai){Me[qe++]=ai}for(tr=0;tr<ze;tr+=4,0)ei((16711680&(lr=cr(ar.charAt(tr))<<18|cr(ar.charAt(tr+1))<<12|cr(ar.charAt(tr+2))<<6|cr(ar.charAt(tr+3))))>>16),ei((65280&lr)>>8),ei(255&lr);return hi==2?ei(255&(lr=cr(ar.charAt(tr))<<2|cr(ar.charAt(tr+1))>>4)):hi==1&&(ei((lr=cr(ar.charAt(tr))<<10|cr(ar.charAt(tr+1))<<4|cr(ar.charAt(tr+2))>>2)>>8&255),ei(255&lr)),Me},Ci.fromByteArray=function(ar){var tr,lr,hi,Me,ze=ar.length%3,qe="";function ei(ai){return"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(ai)}for(tr=0,hi=ar.length-ze;tr<hi;tr+=3)lr=(ar[tr]<<16)+(ar[tr+1]<<8)+ar[tr+2],qe+=ei((Me=lr)>>18&63)+ei(Me>>12&63)+ei(Me>>6&63)+ei(63&Me);switch(ze){case 1:qe=(qe+=ei((lr=ar[ar.length-1])>>2))+ei(lr<<4&63)+"==";break;case 2:qe=(qe=(qe+=ei((lr=(ar[ar.length-2]<<8)+ar[ar.length-1])>>10))+ei(lr>>4&63))+ei(lr<<2&63)+"="}return qe}})(ke===void 0?this.base64js={}:ke)}).call(this,de("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},de("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/base64-js/lib/b64.js","/node_modules/gulp-browserify/node_modules/base64-js/lib")},{buffer:3,lYpoI2:11}],3:[function(de,ye,ke){(function(xe,Ze,Di,ii,di,li,mi,Ei,Ai){var Ci=de("base64-js"),Bi=de("ieee754");function Di(Qi,Zi,yr){if(!(this instanceof Di))return new Di(Qi,Zi,yr);var fr,Dr,Vr,hn,an=typeof Qi;if(Zi==="base64"&&an=="string")for(Qi=(hn=Qi).trim?hn.trim():hn.replace(/^\s+|\s+$/g,"");Qi.length%4!=0;)Qi+="=";if(an=="number")fr=gi(Qi);else if(an=="string")fr=Di.byteLength(Qi,Zi);else{if(an!="object")throw new Error("First argument needs to be a number, array or string.");fr=gi(Qi.length)}if(Di._useTypedArrays?Dr=Di._augment(new Uint8Array(fr)):((Dr=this).length=fr,Dr._isBuffer=!0),Di._useTypedArrays&&typeof Qi.byteLength=="number")Dr._set(Qi);else if(ri(hn=Qi)||Di.isBuffer(hn)||hn&&typeof hn=="object"&&typeof hn.length=="number")for(Vr=0;Vr<fr;Vr++)Di.isBuffer(Qi)?Dr[Vr]=Qi.readUInt8(Vr):Dr[Vr]=Qi[Vr];else if(an=="string")Dr.write(Qi,0,Zi);else if(an=="number"&&!Di._useTypedArrays&&!yr)for(Vr=0;Vr<fr;Vr++)Dr[Vr]=0;return Dr}function Wi(Qi,Zi,yr,fr){return Di._charsWritten=Hi(function(Dr){for(var Vr=[],hn=0;hn<Dr.length;hn++)Vr.push(255&Dr.charCodeAt(hn));return Vr}(Zi),Qi,yr,fr)}function Oi(Qi,Zi,yr,fr){return Di._charsWritten=Hi(function(Dr){for(var Vr,hn,an=[],Wn=0;Wn<Dr.length;Wn++)hn=Dr.charCodeAt(Wn),Vr=hn>>8,hn=hn%256,an.push(hn),an.push(Vr);return an}(Zi),Qi,yr,fr)}function Ui(Qi,Zi,yr){var fr="";yr=Math.min(Qi.length,yr);for(var Dr=Zi;Dr<yr;Dr++)fr+=String.fromCharCode(Qi[Dr]);return fr}function Gi(Qi,Zi,yr,Vr){Vr||(xr(typeof yr=="boolean","missing or invalid endian"),xr(Zi!=null,"missing offset"),xr(Zi+1<Qi.length,"Trying to read beyond buffer length"));var Dr,Vr=Qi.length;if(!(Vr<=Zi))return yr?(Dr=Qi[Zi],Zi+1<Vr&&(Dr|=Qi[Zi+1]<<8)):(Dr=Qi[Zi]<<8,Zi+1<Vr&&(Dr|=Qi[Zi+1])),Dr}function or(Qi,Zi,yr,Vr){Vr||(xr(typeof yr=="boolean","missing or invalid endian"),xr(Zi!=null,"missing offset"),xr(Zi+3<Qi.length,"Trying to read beyond buffer length"));var Dr,Vr=Qi.length;if(!(Vr<=Zi))return yr?(Zi+2<Vr&&(Dr=Qi[Zi+2]<<16),Zi+1<Vr&&(Dr|=Qi[Zi+1]<<8),Dr|=Qi[Zi],Zi+3<Vr&&(Dr+=Qi[Zi+3]<<24>>>0)):(Zi+1<Vr&&(Dr=Qi[Zi+1]<<16),Zi+2<Vr&&(Dr|=Qi[Zi+2]<<8),Zi+3<Vr&&(Dr|=Qi[Zi+3]),Dr+=Qi[Zi]<<24>>>0),Dr}function rr(Qi,Zi,yr,fr){if(fr||(xr(typeof yr=="boolean","missing or invalid endian"),xr(Zi!=null,"missing offset"),xr(Zi+1<Qi.length,"Trying to read beyond buffer length")),!(Qi.length<=Zi))return fr=Gi(Qi,Zi,yr,!0),32768&fr?-1*(65535-fr+1):fr}function cr(Qi,Zi,yr,fr){if(fr||(xr(typeof yr=="boolean","missing or invalid endian"),xr(Zi!=null,"missing offset"),xr(Zi+3<Qi.length,"Trying to read beyond buffer length")),!(Qi.length<=Zi))return fr=or(Qi,Zi,yr,!0),2147483648&fr?-1*(4294967295-fr+1):fr}function ar(Qi,Zi,yr,fr){return fr||(xr(typeof yr=="boolean","missing or invalid endian"),xr(Zi+3<Qi.length,"Trying to read beyond buffer length")),Bi.read(Qi,Zi,yr,23,4)}function tr(Qi,Zi,yr,fr){return fr||(xr(typeof yr=="boolean","missing or invalid endian"),xr(Zi+7<Qi.length,"Trying to read beyond buffer length")),Bi.read(Qi,Zi,yr,52,8)}function lr(Qi,Zi,yr,fr,Dr){if(Dr||(xr(Zi!=null,"missing value"),xr(typeof fr=="boolean","missing or invalid endian"),xr(yr!=null,"missing offset"),xr(yr+1<Qi.length,"trying to write beyond buffer length"),Cr(Zi,65535)),Dr=Qi.length,!(Dr<=yr))for(var Vr=0,hn=Math.min(Dr-yr,2);Vr<hn;Vr++)Qi[yr+Vr]=(Zi&255<<8*(fr?Vr:1-Vr))>>>8*(fr?Vr:1-Vr)}function hi(Qi,Zi,yr,fr,Dr){if(Dr||(xr(Zi!=null,"missing value"),xr(typeof fr=="boolean","missing or invalid endian"),xr(yr!=null,"missing offset"),xr(yr+3<Qi.length,"trying to write beyond buffer length"),Cr(Zi,4294967295)),Dr=Qi.length,!(Dr<=yr))for(var Vr=0,hn=Math.min(Dr-yr,4);Vr<hn;Vr++)Qi[yr+Vr]=Zi>>>8*(fr?Vr:3-Vr)&255}function Me(Qi,Zi,yr,fr,Dr){Dr||(xr(Zi!=null,"missing value"),xr(typeof fr=="boolean","missing or invalid endian"),xr(yr!=null,"missing offset"),xr(yr+1<Qi.length,"Trying to write beyond buffer length"),br(Zi,32767,-32768)),Qi.length<=yr||lr(Qi,0<=Zi?Zi:65535+Zi+1,yr,fr,Dr)}function ze(Qi,Zi,yr,fr,Dr){Dr||(xr(Zi!=null,"missing value"),xr(typeof fr=="boolean","missing or invalid endian"),xr(yr!=null,"missing offset"),xr(yr+3<Qi.length,"Trying to write beyond buffer length"),br(Zi,2147483647,-2147483648)),Qi.length<=yr||hi(Qi,0<=Zi?Zi:4294967295+Zi+1,yr,fr,Dr)}function qe(Qi,Zi,yr,fr,Dr){Dr||(xr(Zi!=null,"missing value"),xr(typeof fr=="boolean","missing or invalid endian"),xr(yr!=null,"missing offset"),xr(yr+3<Qi.length,"Trying to write beyond buffer length"),ir(Zi,34028234663852886e22,-34028234663852886e22)),Qi.length<=yr||Bi.write(Qi,Zi,yr,fr,23,4)}function ei(Qi,Zi,yr,fr,Dr){Dr||(xr(Zi!=null,"missing value"),xr(typeof fr=="boolean","missing or invalid endian"),xr(yr!=null,"missing offset"),xr(yr+7<Qi.length,"Trying to write beyond buffer length"),ir(Zi,17976931348623157e292,-17976931348623157e292)),Qi.length<=yr||Bi.write(Qi,Zi,yr,fr,52,8)}ke.Buffer=Di,ke.SlowBuffer=Di,ke.INSPECT_MAX_BYTES=50,Di.poolSize=8192,Di._useTypedArrays=function(){try{var Qi=new ArrayBuffer(0),Zi=new Uint8Array(Qi);return Zi.foo=function(){return 42},Zi.foo()===42&&typeof Zi.subarray=="function"}catch{return!1}}(),Di.isEncoding=function(Qi){switch(String(Qi).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},Di.isBuffer=function(Qi){return!(Qi==null||!Qi._isBuffer)},Di.byteLength=function(Qi,Zi){var yr;switch(Qi+="",Zi||"utf8"){case"hex":yr=Qi.length/2;break;case"utf8":case"utf-8":yr=si(Qi).length;break;case"ascii":case"binary":case"raw":yr=Qi.length;break;case"base64":yr=Ii(Qi).length;break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":yr=2*Qi.length;break;default:throw new Error("Unknown encoding")}return yr},Di.concat=function(Qi,Zi){if(xr(ri(Qi),`Usage: Buffer.concat(list, [totalLength])
2604
2604
  list should be an Array.`),Qi.length===0)return new Di(0);if(Qi.length===1)return Qi[0];if(typeof Zi!="number")for(Dr=Zi=0;Dr<Qi.length;Dr++)Zi+=Qi[Dr].length;for(var yr=new Di(Zi),fr=0,Dr=0;Dr<Qi.length;Dr++){var Vr=Qi[Dr];Vr.copy(yr,fr),fr+=Vr.length}return yr},Di.prototype.write=function(Qi,Zi,yr,fr){isFinite(Zi)?isFinite(yr)||(fr=yr,yr=void 0):(Wn=fr,fr=Zi,Zi=yr,yr=Wn),Zi=Number(Zi)||0;var Dr,Vr,hn,an,Wn=this.length-Zi;switch((!yr||Wn<(yr=Number(yr)))&&(yr=Wn),fr=String(fr||"utf8").toLowerCase()){case"hex":Dr=function(Zr,Nr,In,yn){In=Number(In)||0;var Cn=Zr.length-In;(!yn||Cn<(yn=Number(yn)))&&(yn=Cn),xr((Cn=Nr.length)%2==0,"Invalid hex string"),Cn/2<yn&&(yn=Cn/2);for(var Eo=0;Eo<yn;Eo++){var mn=parseInt(Nr.substr(2*Eo,2),16);xr(!isNaN(mn),"Invalid hex string"),Zr[In+Eo]=mn}return Di._charsWritten=2*Eo,Eo}(this,Qi,Zi,yr);break;case"utf8":case"utf-8":Vr=this,hn=Zi,an=yr,Dr=Di._charsWritten=Hi(si(Qi),Vr,hn,an);break;case"ascii":case"binary":Dr=Wi(this,Qi,Zi,yr);break;case"base64":Vr=this,hn=Zi,an=yr,Dr=Di._charsWritten=Hi(Ii(Qi),Vr,hn,an);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":Dr=Oi(this,Qi,Zi,yr);break;default:throw new Error("Unknown encoding")}return Dr},Di.prototype.toString=function(Qi,Zi,yr){var fr,Dr,Vr,hn,an=this;if(Qi=String(Qi||"utf8").toLowerCase(),Zi=Number(Zi)||0,(yr=yr!==void 0?Number(yr):an.length)===Zi)return"";switch(Qi){case"hex":fr=function(Wn,Zr,Nr){var In=Wn.length;(!Zr||Zr<0)&&(Zr=0),(!Nr||Nr<0||In<Nr)&&(Nr=In);for(var yn="",Cn=Zr;Cn<Nr;Cn++)yn+=De(Wn[Cn]);return yn}(an,Zi,yr);break;case"utf8":case"utf-8":fr=function(Wn,Zr,Nr){var In="",yn="";Nr=Math.min(Wn.length,Nr);for(var Cn=Zr;Cn<Nr;Cn++)Wn[Cn]<=127?(In+=pr(yn)+String.fromCharCode(Wn[Cn]),yn=""):yn+="%"+Wn[Cn].toString(16);return In+pr(yn)}(an,Zi,yr);break;case"ascii":case"binary":fr=Ui(an,Zi,yr);break;case"base64":Dr=an,hn=yr,fr=(Vr=Zi)===0&&hn===Dr.length?Ci.fromByteArray(Dr):Ci.fromByteArray(Dr.slice(Vr,hn));break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":fr=function(Wn,Zr,Nr){for(var In=Wn.slice(Zr,Nr),yn="",Cn=0;Cn<In.length;Cn+=2)yn+=String.fromCharCode(In[Cn]+256*In[Cn+1]);return yn}(an,Zi,yr);break;default:throw new Error("Unknown encoding")}return fr},Di.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},Di.prototype.copy=function(Qi,Zi,yr,fr){if(Zi=Zi||0,(fr=fr||fr===0?fr:this.length)!==(yr=yr||0)&&Qi.length!==0&&this.length!==0){xr(yr<=fr,"sourceEnd < sourceStart"),xr(0<=Zi&&Zi<Qi.length,"targetStart out of bounds"),xr(0<=yr&&yr<this.length,"sourceStart out of bounds"),xr(0<=fr&&fr<=this.length,"sourceEnd out of bounds"),fr>this.length&&(fr=this.length);var Dr=(fr=Qi.length-Zi<fr-yr?Qi.length-Zi+yr:fr)-yr;if(Dr<100||!Di._useTypedArrays)for(var Vr=0;Vr<Dr;Vr++)Qi[Vr+Zi]=this[Vr+yr];else Qi._set(this.subarray(yr,yr+Dr),Zi)}},Di.prototype.slice=function(Qi,Zi){var yr=this.length;if(Qi=pi(Qi,yr,0),Zi=pi(Zi,yr,yr),Di._useTypedArrays)return Di._augment(this.subarray(Qi,Zi));for(var fr=Zi-Qi,Dr=new Di(fr,void 0,!0),Vr=0;Vr<fr;Vr++)Dr[Vr]=this[Vr+Qi];return Dr},Di.prototype.get=function(Qi){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(Qi)},Di.prototype.set=function(Qi,Zi){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(Qi,Zi)},Di.prototype.readUInt8=function(Qi,Zi){if(Zi||(xr(Qi!=null,"missing offset"),xr(Qi<this.length,"Trying to read beyond buffer length")),!(Qi>=this.length))return this[Qi]},Di.prototype.readUInt16LE=function(Qi,Zi){return Gi(this,Qi,!0,Zi)},Di.prototype.readUInt16BE=function(Qi,Zi){return Gi(this,Qi,!1,Zi)},Di.prototype.readUInt32LE=function(Qi,Zi){return or(this,Qi,!0,Zi)},Di.prototype.readUInt32BE=function(Qi,Zi){return or(this,Qi,!1,Zi)},Di.prototype.readInt8=function(Qi,Zi){if(Zi||(xr(Qi!=null,"missing offset"),xr(Qi<this.length,"Trying to read beyond buffer length")),!(Qi>=this.length))return 128&this[Qi]?-1*(255-this[Qi]+1):this[Qi]},Di.prototype.readInt16LE=function(Qi,Zi){return rr(this,Qi,!0,Zi)},Di.prototype.readInt16BE=function(Qi,Zi){return rr(this,Qi,!1,Zi)},Di.prototype.readInt32LE=function(Qi,Zi){return cr(this,Qi,!0,Zi)},Di.prototype.readInt32BE=function(Qi,Zi){return cr(this,Qi,!1,Zi)},Di.prototype.readFloatLE=function(Qi,Zi){return ar(this,Qi,!0,Zi)},Di.prototype.readFloatBE=function(Qi,Zi){return ar(this,Qi,!1,Zi)},Di.prototype.readDoubleLE=function(Qi,Zi){return tr(this,Qi,!0,Zi)},Di.prototype.readDoubleBE=function(Qi,Zi){return tr(this,Qi,!1,Zi)},Di.prototype.writeUInt8=function(Qi,Zi,yr){yr||(xr(Qi!=null,"missing value"),xr(Zi!=null,"missing offset"),xr(Zi<this.length,"trying to write beyond buffer length"),Cr(Qi,255)),Zi>=this.length||(this[Zi]=Qi)},Di.prototype.writeUInt16LE=function(Qi,Zi,yr){lr(this,Qi,Zi,!0,yr)},Di.prototype.writeUInt16BE=function(Qi,Zi,yr){lr(this,Qi,Zi,!1,yr)},Di.prototype.writeUInt32LE=function(Qi,Zi,yr){hi(this,Qi,Zi,!0,yr)},Di.prototype.writeUInt32BE=function(Qi,Zi,yr){hi(this,Qi,Zi,!1,yr)},Di.prototype.writeInt8=function(Qi,Zi,yr){yr||(xr(Qi!=null,"missing value"),xr(Zi!=null,"missing offset"),xr(Zi<this.length,"Trying to write beyond buffer length"),br(Qi,127,-128)),Zi>=this.length||(0<=Qi?this.writeUInt8(Qi,Zi,yr):this.writeUInt8(255+Qi+1,Zi,yr))},Di.prototype.writeInt16LE=function(Qi,Zi,yr){Me(this,Qi,Zi,!0,yr)},Di.prototype.writeInt16BE=function(Qi,Zi,yr){Me(this,Qi,Zi,!1,yr)},Di.prototype.writeInt32LE=function(Qi,Zi,yr){ze(this,Qi,Zi,!0,yr)},Di.prototype.writeInt32BE=function(Qi,Zi,yr){ze(this,Qi,Zi,!1,yr)},Di.prototype.writeFloatLE=function(Qi,Zi,yr){qe(this,Qi,Zi,!0,yr)},Di.prototype.writeFloatBE=function(Qi,Zi,yr){qe(this,Qi,Zi,!1,yr)},Di.prototype.writeDoubleLE=function(Qi,Zi,yr){ei(this,Qi,Zi,!0,yr)},Di.prototype.writeDoubleBE=function(Qi,Zi,yr){ei(this,Qi,Zi,!1,yr)},Di.prototype.fill=function(Qi,Zi,yr){if(Zi=Zi||0,yr=yr||this.length,xr(typeof(Qi=typeof(Qi=Qi||0)=="string"?Qi.charCodeAt(0):Qi)=="number"&&!isNaN(Qi),"value is not a number"),xr(Zi<=yr,"end < start"),yr!==Zi&&this.length!==0){xr(0<=Zi&&Zi<this.length,"start out of bounds"),xr(0<=yr&&yr<=this.length,"end out of bounds");for(var fr=Zi;fr<yr;fr++)this[fr]=Qi}},Di.prototype.inspect=function(){for(var Qi=[],Zi=this.length,yr=0;yr<Zi;yr++)if(Qi[yr]=De(this[yr]),yr===ke.INSPECT_MAX_BYTES){Qi[yr+1]="...";break}return"<Buffer "+Qi.join(" ")+">"},Di.prototype.toArrayBuffer=function(){if(typeof Uint8Array>"u")throw new Error("Buffer.toArrayBuffer not supported in this browser");if(Di._useTypedArrays)return new Di(this).buffer;for(var Qi=new Uint8Array(this.length),Zi=0,yr=Qi.length;Zi<yr;Zi+=1)Qi[Zi]=this[Zi];return Qi.buffer};var ai=Di.prototype;function pi(Qi,Zi,yr){return typeof Qi!="number"?yr:Zi<=(Qi=~~Qi)?Zi:0<=Qi||0<=(Qi+=Zi)?Qi:0}function gi(Qi){return(Qi=~~Math.ceil(+Qi))<0?0:Qi}function ri(Qi){return(Array.isArray||function(Zi){return Object.prototype.toString.call(Zi)==="[object Array]"})(Qi)}function De(Qi){return Qi<16?"0"+Qi.toString(16):Qi.toString(16)}function si(Qi){for(var Zi=[],yr=0;yr<Qi.length;yr++){var fr=Qi.charCodeAt(yr);if(fr<=127)Zi.push(Qi.charCodeAt(yr));else for(var Dr=yr,Vr=(55296<=fr&&fr<=57343&&yr++,encodeURIComponent(Qi.slice(Dr,yr+1)).substr(1).split("%")),hn=0;hn<Vr.length;hn++)Zi.push(parseInt(Vr[hn],16))}return Zi}function Ii(Qi){return Ci.toByteArray(Qi)}function Hi(Qi,Zi,yr,fr){for(var Dr=0;Dr<fr&&!(Dr+yr>=Zi.length||Dr>=Qi.length);Dr++)Zi[Dr+yr]=Qi[Dr];return Dr}function pr(Qi){try{return decodeURIComponent(Qi)}catch{return String.fromCharCode(65533)}}function Cr(Qi,Zi){xr(typeof Qi=="number","cannot write a non-number as a number"),xr(0<=Qi,"specified a negative value for writing an unsigned value"),xr(Qi<=Zi,"value is larger than maximum value for type"),xr(Math.floor(Qi)===Qi,"value has a fractional component")}function br(Qi,Zi,yr){xr(typeof Qi=="number","cannot write a non-number as a number"),xr(Qi<=Zi,"value larger than maximum allowed value"),xr(yr<=Qi,"value smaller than minimum allowed value"),xr(Math.floor(Qi)===Qi,"value has a fractional component")}function ir(Qi,Zi,yr){xr(typeof Qi=="number","cannot write a non-number as a number"),xr(Qi<=Zi,"value larger than maximum allowed value"),xr(yr<=Qi,"value smaller than minimum allowed value")}function xr(Qi,Zi){if(!Qi)throw new Error(Zi||"Failed assertion")}Di._augment=function(Qi){return Qi._isBuffer=!0,Qi._get=Qi.get,Qi._set=Qi.set,Qi.get=ai.get,Qi.set=ai.set,Qi.write=ai.write,Qi.toString=ai.toString,Qi.toLocaleString=ai.toString,Qi.toJSON=ai.toJSON,Qi.copy=ai.copy,Qi.slice=ai.slice,Qi.readUInt8=ai.readUInt8,Qi.readUInt16LE=ai.readUInt16LE,Qi.readUInt16BE=ai.readUInt16BE,Qi.readUInt32LE=ai.readUInt32LE,Qi.readUInt32BE=ai.readUInt32BE,Qi.readInt8=ai.readInt8,Qi.readInt16LE=ai.readInt16LE,Qi.readInt16BE=ai.readInt16BE,Qi.readInt32LE=ai.readInt32LE,Qi.readInt32BE=ai.readInt32BE,Qi.readFloatLE=ai.readFloatLE,Qi.readFloatBE=ai.readFloatBE,Qi.readDoubleLE=ai.readDoubleLE,Qi.readDoubleBE=ai.readDoubleBE,Qi.writeUInt8=ai.writeUInt8,Qi.writeUInt16LE=ai.writeUInt16LE,Qi.writeUInt16BE=ai.writeUInt16BE,Qi.writeUInt32LE=ai.writeUInt32LE,Qi.writeUInt32BE=ai.writeUInt32BE,Qi.writeInt8=ai.writeInt8,Qi.writeInt16LE=ai.writeInt16LE,Qi.writeInt16BE=ai.writeInt16BE,Qi.writeInt32LE=ai.writeInt32LE,Qi.writeInt32BE=ai.writeInt32BE,Qi.writeFloatLE=ai.writeFloatLE,Qi.writeFloatBE=ai.writeFloatBE,Qi.writeDoubleLE=ai.writeDoubleLE,Qi.writeDoubleBE=ai.writeDoubleBE,Qi.fill=ai.fill,Qi.inspect=ai.inspect,Qi.toArrayBuffer=ai.toArrayBuffer,Qi}}).call(this,de("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},de("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/buffer/index.js","/node_modules/gulp-browserify/node_modules/buffer")},{"base64-js":2,buffer:3,ieee754:10,lYpoI2:11}],4:[function(de,ye,ke){(function(xe,Ze,Ci,ii,di,li,mi,Ei,Ai){var Ci=de("buffer").Buffer,Bi=4,Di=new Ci(Bi);Di.fill(0),ye.exports={hash:function(Wi,Oi,Ui,Gi){for(var or=Oi(function(lr,hi){lr.length%Bi!=0&&(Me=lr.length+(Bi-lr.length%Bi),lr=Ci.concat([lr,Di],Me));for(var Me,ze=[],qe=hi?lr.readInt32BE:lr.readInt32LE,ei=0;ei<lr.length;ei+=Bi)ze.push(qe.call(lr,ei));return ze}(Wi=Ci.isBuffer(Wi)?Wi:new Ci(Wi),Gi),8*Wi.length),Oi=Gi,rr=new Ci(Ui),cr=Oi?rr.writeInt32BE:rr.writeInt32LE,ar=0;ar<or.length;ar++)cr.call(rr,or[ar],4*ar,!0);return rr}}}).call(this,de("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},de("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/helpers.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{buffer:3,lYpoI2:11}],5:[function(de,ye,ke){(function(xe,Ze,Ci,ii,di,li,mi,Ei,Ai){var Ci=de("buffer").Buffer,Bi=de("./sha"),Di=de("./sha256"),Wi=de("./rng"),Oi={sha1:Bi,sha256:Di,md5:de("./md5")},Ui=64,Gi=new Ci(Ui);function or(lr,hi){var Me=Oi[lr=lr||"sha1"],ze=[];return Me||rr("algorithm:",lr,"is not yet supported"),{update:function(qe){return Ci.isBuffer(qe)||(qe=new Ci(qe)),ze.push(qe),qe.length,this},digest:function(qe){var ei=Ci.concat(ze),ei=hi?function(ai,pi,gi){Ci.isBuffer(pi)||(pi=new Ci(pi)),Ci.isBuffer(gi)||(gi=new Ci(gi)),pi.length>Ui?pi=ai(pi):pi.length<Ui&&(pi=Ci.concat([pi,Gi],Ui));for(var ri=new Ci(Ui),De=new Ci(Ui),si=0;si<Ui;si++)ri[si]=54^pi[si],De[si]=92^pi[si];return gi=ai(Ci.concat([ri,gi])),ai(Ci.concat([De,gi]))}(Me,hi,ei):Me(ei);return ze=null,qe?ei.toString(qe):ei}}}function rr(){var lr=[].slice.call(arguments).join(" ");throw new Error([lr,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join(`
2605
- `))}Gi.fill(0),ke.createHash=function(lr){return or(lr)},ke.createHmac=or,ke.randomBytes=function(lr,hi){if(!hi||!hi.call)return new Ci(Wi(lr));try{hi.call(this,void 0,new Ci(Wi(lr)))}catch(Me){hi(Me)}};var cr,ar=["createCredentials","createCipher","createCipheriv","createDecipher","createDecipheriv","createSign","createVerify","createDiffieHellman","pbkdf2"],tr=function(lr){ke[lr]=function(){rr("sorry,",lr,"is not implemented yet")}};for(cr in ar)tr(ar[cr])}).call(this,de("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},de("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/index.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./md5":6,"./rng":7,"./sha":8,"./sha256":9,buffer:3,lYpoI2:11}],6:[function(de,ye,ke){(function(xe,Ze,ie,ii,di,li,mi,Ei,Ai){var Ci=de("./helpers");function Bi(rr,cr){rr[cr>>5]|=128<<cr%32,rr[14+(cr+64>>>9<<4)]=cr;for(var ar=1732584193,tr=-271733879,lr=-1732584194,hi=271733878,Me=0;Me<rr.length;Me+=16){var ze=ar,qe=tr,ei=lr,ai=hi,ar=Wi(ar,tr,lr,hi,rr[Me+0],7,-680876936),hi=Wi(hi,ar,tr,lr,rr[Me+1],12,-389564586),lr=Wi(lr,hi,ar,tr,rr[Me+2],17,606105819),tr=Wi(tr,lr,hi,ar,rr[Me+3],22,-1044525330);ar=Wi(ar,tr,lr,hi,rr[Me+4],7,-176418897),hi=Wi(hi,ar,tr,lr,rr[Me+5],12,1200080426),lr=Wi(lr,hi,ar,tr,rr[Me+6],17,-1473231341),tr=Wi(tr,lr,hi,ar,rr[Me+7],22,-45705983),ar=Wi(ar,tr,lr,hi,rr[Me+8],7,1770035416),hi=Wi(hi,ar,tr,lr,rr[Me+9],12,-1958414417),lr=Wi(lr,hi,ar,tr,rr[Me+10],17,-42063),tr=Wi(tr,lr,hi,ar,rr[Me+11],22,-1990404162),ar=Wi(ar,tr,lr,hi,rr[Me+12],7,1804603682),hi=Wi(hi,ar,tr,lr,rr[Me+13],12,-40341101),lr=Wi(lr,hi,ar,tr,rr[Me+14],17,-1502002290),ar=Oi(ar,tr=Wi(tr,lr,hi,ar,rr[Me+15],22,1236535329),lr,hi,rr[Me+1],5,-165796510),hi=Oi(hi,ar,tr,lr,rr[Me+6],9,-1069501632),lr=Oi(lr,hi,ar,tr,rr[Me+11],14,643717713),tr=Oi(tr,lr,hi,ar,rr[Me+0],20,-373897302),ar=Oi(ar,tr,lr,hi,rr[Me+5],5,-701558691),hi=Oi(hi,ar,tr,lr,rr[Me+10],9,38016083),lr=Oi(lr,hi,ar,tr,rr[Me+15],14,-660478335),tr=Oi(tr,lr,hi,ar,rr[Me+4],20,-405537848),ar=Oi(ar,tr,lr,hi,rr[Me+9],5,568446438),hi=Oi(hi,ar,tr,lr,rr[Me+14],9,-1019803690),lr=Oi(lr,hi,ar,tr,rr[Me+3],14,-187363961),tr=Oi(tr,lr,hi,ar,rr[Me+8],20,1163531501),ar=Oi(ar,tr,lr,hi,rr[Me+13],5,-1444681467),hi=Oi(hi,ar,tr,lr,rr[Me+2],9,-51403784),lr=Oi(lr,hi,ar,tr,rr[Me+7],14,1735328473),ar=Ui(ar,tr=Oi(tr,lr,hi,ar,rr[Me+12],20,-1926607734),lr,hi,rr[Me+5],4,-378558),hi=Ui(hi,ar,tr,lr,rr[Me+8],11,-2022574463),lr=Ui(lr,hi,ar,tr,rr[Me+11],16,1839030562),tr=Ui(tr,lr,hi,ar,rr[Me+14],23,-35309556),ar=Ui(ar,tr,lr,hi,rr[Me+1],4,-1530992060),hi=Ui(hi,ar,tr,lr,rr[Me+4],11,1272893353),lr=Ui(lr,hi,ar,tr,rr[Me+7],16,-155497632),tr=Ui(tr,lr,hi,ar,rr[Me+10],23,-1094730640),ar=Ui(ar,tr,lr,hi,rr[Me+13],4,681279174),hi=Ui(hi,ar,tr,lr,rr[Me+0],11,-358537222),lr=Ui(lr,hi,ar,tr,rr[Me+3],16,-722521979),tr=Ui(tr,lr,hi,ar,rr[Me+6],23,76029189),ar=Ui(ar,tr,lr,hi,rr[Me+9],4,-640364487),hi=Ui(hi,ar,tr,lr,rr[Me+12],11,-421815835),lr=Ui(lr,hi,ar,tr,rr[Me+15],16,530742520),ar=Gi(ar,tr=Ui(tr,lr,hi,ar,rr[Me+2],23,-995338651),lr,hi,rr[Me+0],6,-198630844),hi=Gi(hi,ar,tr,lr,rr[Me+7],10,1126891415),lr=Gi(lr,hi,ar,tr,rr[Me+14],15,-1416354905),tr=Gi(tr,lr,hi,ar,rr[Me+5],21,-57434055),ar=Gi(ar,tr,lr,hi,rr[Me+12],6,1700485571),hi=Gi(hi,ar,tr,lr,rr[Me+3],10,-1894986606),lr=Gi(lr,hi,ar,tr,rr[Me+10],15,-1051523),tr=Gi(tr,lr,hi,ar,rr[Me+1],21,-2054922799),ar=Gi(ar,tr,lr,hi,rr[Me+8],6,1873313359),hi=Gi(hi,ar,tr,lr,rr[Me+15],10,-30611744),lr=Gi(lr,hi,ar,tr,rr[Me+6],15,-1560198380),tr=Gi(tr,lr,hi,ar,rr[Me+13],21,1309151649),ar=Gi(ar,tr,lr,hi,rr[Me+4],6,-145523070),hi=Gi(hi,ar,tr,lr,rr[Me+11],10,-1120210379),lr=Gi(lr,hi,ar,tr,rr[Me+2],15,718787259),tr=Gi(tr,lr,hi,ar,rr[Me+9],21,-343485551),ar=or(ar,ze),tr=or(tr,qe),lr=or(lr,ei),hi=or(hi,ai)}return Array(ar,tr,lr,hi)}function Di(rr,cr,ar,tr,lr,hi){return or((cr=or(or(cr,rr),or(tr,hi)))<<lr|cr>>>32-lr,ar)}function Wi(rr,cr,ar,tr,lr,hi,Me){return Di(cr&ar|~cr&tr,rr,cr,lr,hi,Me)}function Oi(rr,cr,ar,tr,lr,hi,Me){return Di(cr&tr|ar&~tr,rr,cr,lr,hi,Me)}function Ui(rr,cr,ar,tr,lr,hi,Me){return Di(cr^ar^tr,rr,cr,lr,hi,Me)}function Gi(rr,cr,ar,tr,lr,hi,Me){return Di(ar^(cr|~tr),rr,cr,lr,hi,Me)}function or(rr,cr){var ar=(65535&rr)+(65535&cr);return(rr>>16)+(cr>>16)+(ar>>16)<<16|65535&ar}ye.exports=function(rr){return Ci.hash(rr,Bi,16)}}).call(this,de("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},de("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/md5.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],7:[function(de,ye,ke){(function(xe,Ze,ie,ii,di,li,mi,Ei,Ai){ye.exports=function(Ci){for(var Bi,Di=new Array(Ci),Wi=0;Wi<Ci;Wi++)(3&Wi)==0&&(Bi=4294967296*Math.random()),Di[Wi]=Bi>>>((3&Wi)<<3)&255;return Di}}).call(this,de("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},de("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/rng.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{buffer:3,lYpoI2:11}],8:[function(de,ye,ke){(function(xe,Ze,ie,ii,di,li,mi,Ei,Ai){var Ci=de("./helpers");function Bi(Oi,Ui){Oi[Ui>>5]|=128<<24-Ui%32,Oi[15+(Ui+64>>9<<4)]=Ui;for(var Gi,or,rr,cr=Array(80),ar=1732584193,tr=-271733879,lr=-1732584194,hi=271733878,Me=-1009589776,ze=0;ze<Oi.length;ze+=16){for(var qe=ar,ei=tr,ai=lr,pi=hi,gi=Me,ri=0;ri<80;ri++){cr[ri]=ri<16?Oi[ze+ri]:Wi(cr[ri-3]^cr[ri-8]^cr[ri-14]^cr[ri-16],1);var De=Di(Di(Wi(ar,5),(De=tr,or=lr,rr=hi,(Gi=ri)<20?De&or|~De&rr:!(Gi<40)&&Gi<60?De&or|De&rr|or&rr:De^or^rr)),Di(Di(Me,cr[ri]),(Gi=ri)<20?1518500249:Gi<40?1859775393:Gi<60?-1894007588:-899497514)),Me=hi,hi=lr,lr=Wi(tr,30),tr=ar,ar=De}ar=Di(ar,qe),tr=Di(tr,ei),lr=Di(lr,ai),hi=Di(hi,pi),Me=Di(Me,gi)}return Array(ar,tr,lr,hi,Me)}function Di(Oi,Ui){var Gi=(65535&Oi)+(65535&Ui);return(Oi>>16)+(Ui>>16)+(Gi>>16)<<16|65535&Gi}function Wi(Oi,Ui){return Oi<<Ui|Oi>>>32-Ui}ye.exports=function(Oi){return Ci.hash(Oi,Bi,20,!0)}}).call(this,de("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},de("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/sha.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],9:[function(de,ye,ke){(function(xe,Ze,ie,ii,di,li,mi,Ei,Ai){function Ci(Ui,Gi){var or=(65535&Ui)+(65535&Gi);return(Ui>>16)+(Gi>>16)+(or>>16)<<16|65535&or}function Bi(Ui,Gi){var or,rr=new Array(1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298),cr=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),ar=new Array(64);Ui[Gi>>5]|=128<<24-Gi%32,Ui[15+(Gi+64>>9<<4)]=Gi;for(var tr,lr,hi=0;hi<Ui.length;hi+=16){for(var Me=cr[0],ze=cr[1],qe=cr[2],ei=cr[3],ai=cr[4],pi=cr[5],gi=cr[6],ri=cr[7],De=0;De<64;De++)ar[De]=De<16?Ui[De+hi]:Ci(Ci(Ci((lr=ar[De-2],Wi(lr,17)^Wi(lr,19)^Oi(lr,10)),ar[De-7]),(lr=ar[De-15],Wi(lr,7)^Wi(lr,18)^Oi(lr,3))),ar[De-16]),or=Ci(Ci(Ci(Ci(ri,Wi(lr=ai,6)^Wi(lr,11)^Wi(lr,25)),ai&pi^~ai&gi),rr[De]),ar[De]),tr=Ci(Wi(tr=Me,2)^Wi(tr,13)^Wi(tr,22),Me&ze^Me&qe^ze&qe),ri=gi,gi=pi,pi=ai,ai=Ci(ei,or),ei=qe,qe=ze,ze=Me,Me=Ci(or,tr);cr[0]=Ci(Me,cr[0]),cr[1]=Ci(ze,cr[1]),cr[2]=Ci(qe,cr[2]),cr[3]=Ci(ei,cr[3]),cr[4]=Ci(ai,cr[4]),cr[5]=Ci(pi,cr[5]),cr[6]=Ci(gi,cr[6]),cr[7]=Ci(ri,cr[7])}return cr}var Di=de("./helpers"),Wi=function(Ui,Gi){return Ui>>>Gi|Ui<<32-Gi},Oi=function(Ui,Gi){return Ui>>>Gi};ye.exports=function(Ui){return Di.hash(Ui,Bi,32,!0)}}).call(this,de("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},de("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/sha256.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],10:[function(de,ye,ke){(function(xe,Ze,ie,ii,di,li,mi,Ei,Ai){ke.read=function(Ci,Bi,Di,Wi,hi){var Ui,Gi,or=8*hi-Wi-1,rr=(1<<or)-1,cr=rr>>1,ar=-7,tr=Di?hi-1:0,lr=Di?-1:1,hi=Ci[Bi+tr];for(tr+=lr,Ui=hi&(1<<-ar)-1,hi>>=-ar,ar+=or;0<ar;Ui=256*Ui+Ci[Bi+tr],tr+=lr,ar-=8);for(Gi=Ui&(1<<-ar)-1,Ui>>=-ar,ar+=Wi;0<ar;Gi=256*Gi+Ci[Bi+tr],tr+=lr,ar-=8);if(Ui===0)Ui=1-cr;else{if(Ui===rr)return Gi?NaN:1/0*(hi?-1:1);Gi+=Math.pow(2,Wi),Ui-=cr}return(hi?-1:1)*Gi*Math.pow(2,Ui-Wi)},ke.write=function(Ci,Bi,Di,Wi,Oi,Me){var Gi,or,rr=8*Me-Oi-1,cr=(1<<rr)-1,ar=cr>>1,tr=Oi===23?Math.pow(2,-24)-Math.pow(2,-77):0,lr=Wi?0:Me-1,hi=Wi?1:-1,Me=Bi<0||Bi===0&&1/Bi<0?1:0;for(Bi=Math.abs(Bi),isNaN(Bi)||Bi===1/0?(or=isNaN(Bi)?1:0,Gi=cr):(Gi=Math.floor(Math.log(Bi)/Math.LN2),Bi*(Wi=Math.pow(2,-Gi))<1&&(Gi--,Wi*=2),2<=(Bi+=1<=Gi+ar?tr/Wi:tr*Math.pow(2,1-ar))*Wi&&(Gi++,Wi/=2),cr<=Gi+ar?(or=0,Gi=cr):1<=Gi+ar?(or=(Bi*Wi-1)*Math.pow(2,Oi),Gi+=ar):(or=Bi*Math.pow(2,ar-1)*Math.pow(2,Oi),Gi=0));8<=Oi;Ci[Di+lr]=255&or,lr+=hi,or/=256,Oi-=8);for(Gi=Gi<<Oi|or,rr+=Oi;0<rr;Ci[Di+lr]=255&Gi,lr+=hi,Gi/=256,rr-=8);Ci[Di+lr-hi]|=128*Me}}).call(this,de("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},de("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/ieee754/index.js","/node_modules/gulp-browserify/node_modules/ieee754")},{buffer:3,lYpoI2:11}],11:[function(de,ye,ke){(function(xe,Ze,ie,ii,di,li,mi,Ei,Ai){var Ci,Bi,Di;function Wi(){}(xe=ye.exports={}).nextTick=(Bi=typeof window<"u"&&window.setImmediate,Di=typeof window<"u"&&window.postMessage&&window.addEventListener,Bi?function(Oi){return window.setImmediate(Oi)}:Di?(Ci=[],window.addEventListener("message",function(Oi){var Ui=Oi.source;Ui!==window&&Ui!==null||Oi.data!=="process-tick"||(Oi.stopPropagation(),0<Ci.length&&Ci.shift()())},!0),function(Oi){Ci.push(Oi),window.postMessage("process-tick","*")}):function(Oi){setTimeout(Oi,0)}),xe.title="browser",xe.browser=!0,xe.env={},xe.argv=[],xe.on=Wi,xe.addListener=Wi,xe.once=Wi,xe.off=Wi,xe.removeListener=Wi,xe.removeAllListeners=Wi,xe.emit=Wi,xe.binding=function(Oi){throw new Error("process.binding is not supported")},xe.cwd=function(){return"/"},xe.chdir=function(Oi){throw new Error("process.chdir is not supported")}}).call(this,de("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},de("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/process/browser.js","/node_modules/gulp-browserify/node_modules/process")},{buffer:3,lYpoI2:11}]},{},[1])(1)})})(object_hash);const hash=object_hash.exports,embedAPIV2BaseUrl={}.V_EMBEDV2_BACKEDND_URL,IMAGE_TTL_IN_SECONDS=60*60*24*1;function parseCloudflareImagesDeliveryUrl(m){try{const c=new URL(m);if(c.hostname==="imagedelivery.net"){const[,de,ye,ke]=c.pathname.split("/")||[];if(de&&ye&&ke)return{scopeId:de,imageId:ye,variant:ke};throw new Error("Invalid Cloudflare Images URL")}throw new Error("Invalid Cloudflare Images URL")}catch{throw new Error("Invalid URL")}}async function uploadImage(m,c,de,ye,ke){const xe=`${embedAPIV2BaseUrl}/api/image/session?${new URLSearchParams({key:hash({field:c.field,templateId:m}),ttl:String(IMAGE_TTL_IN_SECONDS)})}`,Ze=new FormData;Ze.append("file",de,ye);const ie=await fetchWithProgressV1({url:xe,method:"POST",data:Ze,onUploadProgress:ke});if(ie.type==="application/json")return JSON.parse(await ie.text());throw new Error("Invalid response from Cloudflare Images")}const colorNames={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},reverseNames=Object.create(null);for(const m in colorNames)Object.hasOwn(colorNames,m)&&(reverseNames[colorNames[m]]=m);const cs={to:{},get:{}};cs.get=function(m){const c=m.slice(0,3).toLowerCase();let de,ye;switch(c){case"hsl":{de=cs.get.hsl(m),ye="hsl";break}case"hwb":{de=cs.get.hwb(m),ye="hwb";break}default:{de=cs.get.rgb(m),ye="rgb";break}}return de?{model:ye,value:de}:null},cs.get.rgb=function(m){if(!m)return null;const c=/^#([a-f\d]{3,4})$/i,de=/^#([a-f\d]{6})([a-f\d]{2})?$/i,ye=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|/]\s*([+-]?[\d.]+)(%?)\s*)?\)$/,ke=/^rgba?\(\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[,|/]\s*([+-]?[\d.]+)(%?)\s*)?\)$/,xe=/^(\w+)$/;let Ze=[0,0,0,1],ie,ii,di;if(ie=m.match(de)){for(di=ie[2],ie=ie[1],ii=0;ii<3;ii++){const li=ii*2;Ze[ii]=Number.parseInt(ie.slice(li,li+2),16)}di&&(Ze[3]=Number.parseInt(di,16)/255)}else if(ie=m.match(c)){for(ie=ie[1],di=ie[3],ii=0;ii<3;ii++)Ze[ii]=Number.parseInt(ie[ii]+ie[ii],16);di&&(Ze[3]=Number.parseInt(di+di,16)/255)}else if(ie=m.match(ye)){for(ii=0;ii<3;ii++)Ze[ii]=Number.parseInt(ie[ii+1],10);ie[4]&&(Ze[3]=ie[5]?Number.parseFloat(ie[4])*.01:Number.parseFloat(ie[4]))}else if(ie=m.match(ke)){for(ii=0;ii<3;ii++)Ze[ii]=Math.round(Number.parseFloat(ie[ii+1])*2.55);ie[4]&&(Ze[3]=ie[5]?Number.parseFloat(ie[4])*.01:Number.parseFloat(ie[4]))}else return(ie=m.match(xe))?ie[1]==="transparent"?[0,0,0,0]:Object.hasOwn(colorNames,ie[1])?(Ze=colorNames[ie[1]],Ze[3]=1,Ze):null:null;for(ii=0;ii<3;ii++)Ze[ii]=clamp(Ze[ii],0,255);return Ze[3]=clamp(Ze[3],0,1),Ze},cs.get.hsl=function(m){if(!m)return null;const c=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[,|/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,de=m.match(c);if(de){const ye=Number.parseFloat(de[4]),ke=(Number.parseFloat(de[1])%360+360)%360,xe=clamp(Number.parseFloat(de[2]),0,100),Ze=clamp(Number.parseFloat(de[3]),0,100),ie=clamp(Number.isNaN(ye)?1:ye,0,1);return[ke,xe,Ze,ie]}return null},cs.get.hwb=function(m){if(!m)return null;const c=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d.]+)%\s*,\s*([+-]?[\d.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,de=m.match(c);if(de){const ye=Number.parseFloat(de[4]),ke=(Number.parseFloat(de[1])%360+360)%360,xe=clamp(Number.parseFloat(de[2]),0,100),Ze=clamp(Number.parseFloat(de[3]),0,100),ie=clamp(Number.isNaN(ye)?1:ye,0,1);return[ke,xe,Ze,ie]}return null},cs.to.hex=function(...m){return"#"+hexDouble(m[0])+hexDouble(m[1])+hexDouble(m[2])+(m[3]<1?hexDouble(Math.round(m[3]*255)):"")},cs.to.rgb=function(...m){return m.length<4||m[3]===1?"rgb("+Math.round(m[0])+", "+Math.round(m[1])+", "+Math.round(m[2])+")":"rgba("+Math.round(m[0])+", "+Math.round(m[1])+", "+Math.round(m[2])+", "+m[3]+")"},cs.to.rgb.percent=function(...m){const c=Math.round(m[0]/255*100),de=Math.round(m[1]/255*100),ye=Math.round(m[2]/255*100);return m.length<4||m[3]===1?"rgb("+c+"%, "+de+"%, "+ye+"%)":"rgba("+c+"%, "+de+"%, "+ye+"%, "+m[3]+")"},cs.to.hsl=function(...m){return m.length<4||m[3]===1?"hsl("+m[0]+", "+m[1]+"%, "+m[2]+"%)":"hsla("+m[0]+", "+m[1]+"%, "+m[2]+"%, "+m[3]+")"},cs.to.hwb=function(...m){let c="";return m.length>=4&&m[3]!==1&&(c=", "+m[3]),"hwb("+m[0]+", "+m[1]+"%, "+m[2]+"%"+c+")"},cs.to.keyword=function(...m){return reverseNames[m.slice(0,3)]};function clamp(m,c,de){return Math.min(Math.max(c,m),de)}function hexDouble(m){const c=Math.round(m).toString(16).toUpperCase();return c.length<2?"0"+c:c}const cssKeywords={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},reverseKeywords={};for(const m of Object.keys(cssKeywords))reverseKeywords[cssKeywords[m]]=m;const convert$1={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}},LAB_FT=(6/29)**3;for(const m of Object.keys(convert$1)){if(!("channels"in convert$1[m]))throw new Error("missing channels property: "+m);if(!("labels"in convert$1[m]))throw new Error("missing channel labels property: "+m);if(convert$1[m].labels.length!==convert$1[m].channels)throw new Error("channel and label counts mismatch: "+m);const{channels:c,labels:de}=convert$1[m];delete convert$1[m].channels,delete convert$1[m].labels,Object.defineProperty(convert$1[m],"channels",{value:c}),Object.defineProperty(convert$1[m],"labels",{value:de})}convert$1.rgb.hsl=function(m){const c=m[0]/255,de=m[1]/255,ye=m[2]/255,ke=Math.min(c,de,ye),xe=Math.max(c,de,ye),Ze=xe-ke;let ie,ii;switch(xe){case ke:{ie=0;break}case c:{ie=(de-ye)/Ze;break}case de:{ie=2+(ye-c)/Ze;break}case ye:{ie=4+(c-de)/Ze;break}}ie=Math.min(ie*60,360),ie<0&&(ie+=360);const di=(ke+xe)/2;return xe===ke?ii=0:di<=.5?ii=Ze/(xe+ke):ii=Ze/(2-xe-ke),[ie,ii*100,di*100]},convert$1.rgb.hsv=function(m){let c,de,ye,ke,xe;const Ze=m[0]/255,ie=m[1]/255,ii=m[2]/255,di=Math.max(Ze,ie,ii),li=di-Math.min(Ze,ie,ii),mi=function(Ei){return(di-Ei)/6/li+1/2};if(li===0)ke=0,xe=0;else{switch(xe=li/di,c=mi(Ze),de=mi(ie),ye=mi(ii),di){case Ze:{ke=ye-de;break}case ie:{ke=1/3+c-ye;break}case ii:{ke=2/3+de-c;break}}ke<0?ke+=1:ke>1&&(ke-=1)}return[ke*360,xe*100,di*100]},convert$1.rgb.hwb=function(m){const c=m[0],de=m[1];let ye=m[2];const ke=convert$1.rgb.hsl(m)[0],xe=1/255*Math.min(c,Math.min(de,ye));return ye=1-1/255*Math.max(c,Math.max(de,ye)),[ke,xe*100,ye*100]},convert$1.rgb.cmyk=function(m){const c=m[0]/255,de=m[1]/255,ye=m[2]/255,ke=Math.min(1-c,1-de,1-ye),xe=(1-c-ke)/(1-ke)||0,Ze=(1-de-ke)/(1-ke)||0,ie=(1-ye-ke)/(1-ke)||0;return[xe*100,Ze*100,ie*100,ke*100]};function comparativeDistance(m,c){return(m[0]-c[0])**2+(m[1]-c[1])**2+(m[2]-c[2])**2}convert$1.rgb.keyword=function(m){const c=reverseKeywords[m];if(c)return c;let de=Number.POSITIVE_INFINITY,ye;for(const ke of Object.keys(cssKeywords)){const xe=cssKeywords[ke],Ze=comparativeDistance(m,xe);Ze<de&&(de=Ze,ye=ke)}return ye},convert$1.keyword.rgb=function(m){return cssKeywords[m]},convert$1.rgb.xyz=function(m){let c=m[0]/255,de=m[1]/255,ye=m[2]/255;c=c>.04045?((c+.055)/1.055)**2.4:c/12.92,de=de>.04045?((de+.055)/1.055)**2.4:de/12.92,ye=ye>.04045?((ye+.055)/1.055)**2.4:ye/12.92;const ke=c*.4124564+de*.3575761+ye*.1804375,xe=c*.2126729+de*.7151522+ye*.072175,Ze=c*.0193339+de*.119192+ye*.9503041;return[ke*100,xe*100,Ze*100]},convert$1.rgb.lab=function(m){const c=convert$1.rgb.xyz(m);let de=c[0],ye=c[1],ke=c[2];de/=95.047,ye/=100,ke/=108.883,de=de>LAB_FT?de**(1/3):7.787*de+16/116,ye=ye>LAB_FT?ye**(1/3):7.787*ye+16/116,ke=ke>LAB_FT?ke**(1/3):7.787*ke+16/116;const xe=116*ye-16,Ze=500*(de-ye),ie=200*(ye-ke);return[xe,Ze,ie]},convert$1.hsl.rgb=function(m){const c=m[0]/360,de=m[1]/100,ye=m[2]/100;let ke,xe;if(de===0)return xe=ye*255,[xe,xe,xe];const Ze=ye<.5?ye*(1+de):ye+de-ye*de,ie=2*ye-Ze,ii=[0,0,0];for(let di=0;di<3;di++)ke=c+1/3*-(di-1),ke<0&&ke++,ke>1&&ke--,6*ke<1?xe=ie+(Ze-ie)*6*ke:2*ke<1?xe=Ze:3*ke<2?xe=ie+(Ze-ie)*(2/3-ke)*6:xe=ie,ii[di]=xe*255;return ii},convert$1.hsl.hsv=function(m){const c=m[0];let de=m[1]/100,ye=m[2]/100,ke=de;const xe=Math.max(ye,.01);ye*=2,de*=ye<=1?ye:2-ye,ke*=xe<=1?xe:2-xe;const Ze=(ye+de)/2,ie=ye===0?2*ke/(xe+ke):2*de/(ye+de);return[c,ie*100,Ze*100]},convert$1.hsv.rgb=function(m){const c=m[0]/60,de=m[1]/100;let ye=m[2]/100;const ke=Math.floor(c)%6,xe=c-Math.floor(c),Ze=255*ye*(1-de),ie=255*ye*(1-de*xe),ii=255*ye*(1-de*(1-xe));switch(ye*=255,ke){case 0:return[ye,ii,Ze];case 1:return[ie,ye,Ze];case 2:return[Ze,ye,ii];case 3:return[Ze,ie,ye];case 4:return[ii,Ze,ye];case 5:return[ye,Ze,ie]}},convert$1.hsv.hsl=function(m){const c=m[0],de=m[1]/100,ye=m[2]/100,ke=Math.max(ye,.01);let xe,Ze;Ze=(2-de)*ye;const ie=(2-de)*ke;return xe=de*ke,xe/=ie<=1?ie:2-ie,xe=xe||0,Ze/=2,[c,xe*100,Ze*100]},convert$1.hwb.rgb=function(m){const c=m[0]/360;let de=m[1]/100,ye=m[2]/100;const ke=de+ye;let xe;ke>1&&(de/=ke,ye/=ke);const Ze=Math.floor(6*c),ie=1-ye;xe=6*c-Ze,(Ze&1)!==0&&(xe=1-xe);const ii=de+xe*(ie-de);let di,li,mi;switch(Ze){default:case 6:case 0:{di=ie,li=ii,mi=de;break}case 1:{di=ii,li=ie,mi=de;break}case 2:{di=de,li=ie,mi=ii;break}case 3:{di=de,li=ii,mi=ie;break}case 4:{di=ii,li=de,mi=ie;break}case 5:{di=ie,li=de,mi=ii;break}}return[di*255,li*255,mi*255]},convert$1.cmyk.rgb=function(m){const c=m[0]/100,de=m[1]/100,ye=m[2]/100,ke=m[3]/100,xe=1-Math.min(1,c*(1-ke)+ke),Ze=1-Math.min(1,de*(1-ke)+ke),ie=1-Math.min(1,ye*(1-ke)+ke);return[xe*255,Ze*255,ie*255]},convert$1.xyz.rgb=function(m){const c=m[0]/100,de=m[1]/100,ye=m[2]/100;let ke,xe,Ze;return ke=c*3.2404542+de*-1.5371385+ye*-.4985314,xe=c*-.969266+de*1.8760108+ye*.041556,Ze=c*.0556434+de*-.2040259+ye*1.0572252,ke=ke>.0031308?1.055*ke**(1/2.4)-.055:ke*12.92,xe=xe>.0031308?1.055*xe**(1/2.4)-.055:xe*12.92,Ze=Ze>.0031308?1.055*Ze**(1/2.4)-.055:Ze*12.92,ke=Math.min(Math.max(0,ke),1),xe=Math.min(Math.max(0,xe),1),Ze=Math.min(Math.max(0,Ze),1),[ke*255,xe*255,Ze*255]},convert$1.xyz.lab=function(m){let c=m[0],de=m[1],ye=m[2];c/=95.047,de/=100,ye/=108.883,c=c>LAB_FT?c**(1/3):7.787*c+16/116,de=de>LAB_FT?de**(1/3):7.787*de+16/116,ye=ye>LAB_FT?ye**(1/3):7.787*ye+16/116;const ke=116*de-16,xe=500*(c-de),Ze=200*(de-ye);return[ke,xe,Ze]},convert$1.lab.xyz=function(m){const c=m[0],de=m[1],ye=m[2];let ke,xe,Ze;xe=(c+16)/116,ke=de/500+xe,Ze=xe-ye/200;const ie=xe**3,ii=ke**3,di=Ze**3;return xe=ie>LAB_FT?ie:(xe-16/116)/7.787,ke=ii>LAB_FT?ii:(ke-16/116)/7.787,Ze=di>LAB_FT?di:(Ze-16/116)/7.787,ke*=95.047,xe*=100,Ze*=108.883,[ke,xe,Ze]},convert$1.lab.lch=function(m){const c=m[0],de=m[1],ye=m[2];let ke;ke=Math.atan2(ye,de)*360/2/Math.PI,ke<0&&(ke+=360);const Ze=Math.sqrt(de*de+ye*ye);return[c,Ze,ke]},convert$1.lch.lab=function(m){const c=m[0],de=m[1],ke=m[2]/360*2*Math.PI,xe=de*Math.cos(ke),Ze=de*Math.sin(ke);return[c,xe,Ze]},convert$1.rgb.ansi16=function(m,c=null){const[de,ye,ke]=m;let xe=c===null?convert$1.rgb.hsv(m)[2]:c;if(xe=Math.round(xe/50),xe===0)return 30;let Ze=30+(Math.round(ke/255)<<2|Math.round(ye/255)<<1|Math.round(de/255));return xe===2&&(Ze+=60),Ze},convert$1.hsv.ansi16=function(m){return convert$1.rgb.ansi16(convert$1.hsv.rgb(m),m[2])},convert$1.rgb.ansi256=function(m){const c=m[0],de=m[1],ye=m[2];return c>>4===de>>4&&de>>4===ye>>4?c<8?16:c>248?231:Math.round((c-8)/247*24)+232:16+36*Math.round(c/255*5)+6*Math.round(de/255*5)+Math.round(ye/255*5)},convert$1.ansi16.rgb=function(m){m=m[0];let c=m%10;if(c===0||c===7)return m>50&&(c+=3.5),c=c/10.5*255,[c,c,c];const de=(Math.trunc(m>50)+1)*.5,ye=(c&1)*de*255,ke=(c>>1&1)*de*255,xe=(c>>2&1)*de*255;return[ye,ke,xe]},convert$1.ansi256.rgb=function(m){if(m=m[0],m>=232){const xe=(m-232)*10+8;return[xe,xe,xe]}m-=16;let c;const de=Math.floor(m/36)/5*255,ye=Math.floor((c=m%36)/6)/5*255,ke=c%6/5*255;return[de,ye,ke]},convert$1.rgb.hex=function(m){const de=(((Math.round(m[0])&255)<<16)+((Math.round(m[1])&255)<<8)+(Math.round(m[2])&255)).toString(16).toUpperCase();return"000000".slice(de.length)+de},convert$1.hex.rgb=function(m){const c=m.toString(16).match(/[a-f\d]{6}|[a-f\d]{3}/i);if(!c)return[0,0,0];let de=c[0];c[0].length===3&&(de=[...de].map(ie=>ie+ie).join(""));const ye=Number.parseInt(de,16),ke=ye>>16&255,xe=ye>>8&255,Ze=ye&255;return[ke,xe,Ze]},convert$1.rgb.hcg=function(m){const c=m[0]/255,de=m[1]/255,ye=m[2]/255,ke=Math.max(Math.max(c,de),ye),xe=Math.min(Math.min(c,de),ye),Ze=ke-xe;let ie;const ii=Ze<1?xe/(1-Ze):0;return Ze<=0?ie=0:ke===c?ie=(de-ye)/Ze%6:ke===de?ie=2+(ye-c)/Ze:ie=4+(c-de)/Ze,ie/=6,ie%=1,[ie*360,Ze*100,ii*100]},convert$1.hsl.hcg=function(m){const c=m[1]/100,de=m[2]/100,ye=de<.5?2*c*de:2*c*(1-de);let ke=0;return ye<1&&(ke=(de-.5*ye)/(1-ye)),[m[0],ye*100,ke*100]},convert$1.hsv.hcg=function(m){const c=m[1]/100,de=m[2]/100,ye=c*de;let ke=0;return ye<1&&(ke=(de-ye)/(1-ye)),[m[0],ye*100,ke*100]},convert$1.hcg.rgb=function(m){const c=m[0]/360,de=m[1]/100,ye=m[2]/100;if(de===0)return[ye*255,ye*255,ye*255];const ke=[0,0,0],xe=c%1*6,Ze=xe%1,ie=1-Ze;let ii=0;switch(Math.floor(xe)){case 0:{ke[0]=1,ke[1]=Ze,ke[2]=0;break}case 1:{ke[0]=ie,ke[1]=1,ke[2]=0;break}case 2:{ke[0]=0,ke[1]=1,ke[2]=Ze;break}case 3:{ke[0]=0,ke[1]=ie,ke[2]=1;break}case 4:{ke[0]=Ze,ke[1]=0,ke[2]=1;break}default:ke[0]=1,ke[1]=0,ke[2]=ie}return ii=(1-de)*ye,[(de*ke[0]+ii)*255,(de*ke[1]+ii)*255,(de*ke[2]+ii)*255]},convert$1.hcg.hsv=function(m){const c=m[1]/100,de=m[2]/100,ye=c+de*(1-c);let ke=0;return ye>0&&(ke=c/ye),[m[0],ke*100,ye*100]},convert$1.hcg.hsl=function(m){const c=m[1]/100,ye=m[2]/100*(1-c)+.5*c;let ke=0;return ye>0&&ye<.5?ke=c/(2*ye):ye>=.5&&ye<1&&(ke=c/(2*(1-ye))),[m[0],ke*100,ye*100]},convert$1.hcg.hwb=function(m){const c=m[1]/100,de=m[2]/100,ye=c+de*(1-c);return[m[0],(ye-c)*100,(1-ye)*100]},convert$1.hwb.hcg=function(m){const c=m[1]/100,ye=1-m[2]/100,ke=ye-c;let xe=0;return ke<1&&(xe=(ye-ke)/(1-ke)),[m[0],ke*100,xe*100]},convert$1.apple.rgb=function(m){return[m[0]/65535*255,m[1]/65535*255,m[2]/65535*255]},convert$1.rgb.apple=function(m){return[m[0]/255*65535,m[1]/255*65535,m[2]/255*65535]},convert$1.gray.rgb=function(m){return[m[0]/100*255,m[0]/100*255,m[0]/100*255]},convert$1.gray.hsl=function(m){return[0,0,m[0]]},convert$1.gray.hsv=convert$1.gray.hsl,convert$1.gray.hwb=function(m){return[0,100,m[0]]},convert$1.gray.cmyk=function(m){return[0,0,0,m[0]]},convert$1.gray.lab=function(m){return[m[0],0,0]},convert$1.gray.hex=function(m){const c=Math.round(m[0]/100*255)&255,ye=((c<<16)+(c<<8)+c).toString(16).toUpperCase();return"000000".slice(ye.length)+ye},convert$1.rgb.gray=function(m){return[(m[0]+m[1]+m[2])/3/255*100]};function buildGraph(){const m={},c=Object.keys(convert$1);for(let{length:de}=c,ye=0;ye<de;ye++)m[c[ye]]={distance:-1,parent:null};return m}function deriveBFS(m){const c=buildGraph(),de=[m];for(c[m].distance=0;de.length>0;){const ye=de.pop(),ke=Object.keys(convert$1[ye]);for(let{length:xe}=ke,Ze=0;Ze<xe;Ze++){const ie=ke[Ze],ii=c[ie];ii.distance===-1&&(ii.distance=c[ye].distance+1,ii.parent=ye,de.unshift(ie))}}return c}function link(m,c){return function(de){return c(m(de))}}function wrapConversion(m,c){const de=[c[m].parent,m];let ye=convert$1[c[m].parent][m],ke=c[m].parent;for(;c[ke].parent;)de.unshift(c[ke].parent),ye=link(convert$1[c[ke].parent][ke],ye),ke=c[ke].parent;return ye.conversion=de,ye}function route(m){const c=deriveBFS(m),de={},ye=Object.keys(c);for(let{length:ke}=ye,xe=0;xe<ke;xe++){const Ze=ye[xe];c[Ze].parent!==null&&(de[Ze]=wrapConversion(Ze,c))}return de}const convert={},models=Object.keys(convert$1);function wrapRaw(m){const c=function(...de){const ye=de[0];return ye==null?ye:(ye.length>1&&(de=ye),m(de))};return"conversion"in m&&(c.conversion=m.conversion),c}function wrapRounded(m){const c=function(...de){const ye=de[0];if(ye==null)return ye;ye.length>1&&(de=ye);const ke=m(de);if(typeof ke=="object")for(let{length:xe}=ke,Ze=0;Ze<xe;Ze++)ke[Ze]=Math.round(ke[Ze]);return ke};return"conversion"in m&&(c.conversion=m.conversion),c}for(const m of models){convert[m]={},Object.defineProperty(convert[m],"channels",{value:convert$1[m].channels}),Object.defineProperty(convert[m],"labels",{value:convert$1[m].labels});const c=route(m),de=Object.keys(c);for(const ye of de){const ke=c[ye];convert[m][ye]=wrapRounded(ke),convert[m][ye].raw=wrapRaw(ke)}}const skippedModels=["keyword","gray","hex"],hashedModelKeys={};for(const m of Object.keys(convert))hashedModelKeys[[...convert[m].labels].sort().join("")]=m;const limiters={};function Color(m,c){if(!(this instanceof Color))return new Color(m,c);if(c&&c in skippedModels&&(c=null),c&&!(c in convert))throw new Error("Unknown model: "+c);let de,ye;if(m==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(m instanceof Color)this.model=m.model,this.color=[...m.color],this.valpha=m.valpha;else if(typeof m=="string"){const ke=cs.get(m);if(ke===null)throw new Error("Unable to parse color from string: "+m);this.model=ke.model,ye=convert[this.model].channels,this.color=ke.value.slice(0,ye),this.valpha=typeof ke.value[ye]=="number"?ke.value[ye]:1}else if(m.length>0){this.model=c||"rgb",ye=convert[this.model].channels;const ke=Array.prototype.slice.call(m,0,ye);this.color=zeroArray(ke,ye),this.valpha=typeof m[ye]=="number"?m[ye]:1}else if(typeof m=="number")this.model="rgb",this.color=[m>>16&255,m>>8&255,m&255],this.valpha=1;else{this.valpha=1;const ke=Object.keys(m);"alpha"in m&&(ke.splice(ke.indexOf("alpha"),1),this.valpha=typeof m.alpha=="number"?m.alpha:0);const xe=ke.sort().join("");if(!(xe in hashedModelKeys))throw new Error("Unable to parse color from object: "+JSON.stringify(m));this.model=hashedModelKeys[xe];const{labels:Ze}=convert[this.model],ie=[];for(de=0;de<Ze.length;de++)ie.push(m[Ze[de]]);this.color=zeroArray(ie)}if(limiters[this.model])for(ye=convert[this.model].channels,de=0;de<ye;de++){const ke=limiters[this.model][de];ke&&(this.color[de]=ke(this.color[de]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}Color.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(m){let c=this.model in cs.to?this:this.rgb();c=c.round(typeof m=="number"?m:1);const de=c.valpha===1?c.color:[...c.color,this.valpha];return cs.to[c.model](...de)},percentString(m){const c=this.rgb().round(typeof m=="number"?m:1),de=c.valpha===1?c.color:[...c.color,this.valpha];return cs.to.rgb.percent(...de)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){const m={},{channels:c}=convert[this.model],{labels:de}=convert[this.model];for(let ye=0;ye<c;ye++)m[de[ye]]=this.color[ye];return this.valpha!==1&&(m.alpha=this.valpha),m},unitArray(){const m=this.rgb().color;return m[0]/=255,m[1]/=255,m[2]/=255,this.valpha!==1&&m.push(this.valpha),m},unitObject(){const m=this.rgb().object();return m.r/=255,m.g/=255,m.b/=255,this.valpha!==1&&(m.alpha=this.valpha),m},round(m){return m=Math.max(m||0,0),new Color([...this.color.map(roundToPlace(m)),this.valpha],this.model)},alpha(m){return m!==void 0?new Color([...this.color,Math.max(0,Math.min(1,m))],this.model):this.valpha},red:getset("rgb",0,maxfn(255)),green:getset("rgb",1,maxfn(255)),blue:getset("rgb",2,maxfn(255)),hue:getset(["hsl","hsv","hsl","hwb","hcg"],0,m=>(m%360+360)%360),saturationl:getset("hsl",1,maxfn(100)),lightness:getset("hsl",2,maxfn(100)),saturationv:getset("hsv",1,maxfn(100)),value:getset("hsv",2,maxfn(100)),chroma:getset("hcg",1,maxfn(100)),gray:getset("hcg",2,maxfn(100)),white:getset("hwb",1,maxfn(100)),wblack:getset("hwb",2,maxfn(100)),cyan:getset("cmyk",0,maxfn(100)),magenta:getset("cmyk",1,maxfn(100)),yellow:getset("cmyk",2,maxfn(100)),black:getset("cmyk",3,maxfn(100)),x:getset("xyz",0,maxfn(95.047)),y:getset("xyz",1,maxfn(100)),z:getset("xyz",2,maxfn(108.833)),l:getset("lab",0,maxfn(100)),a:getset("lab",1),b:getset("lab",2),keyword(m){return m!==void 0?new Color(m):convert[this.model].keyword(this.color)},hex(m){return m!==void 0?new Color(m):cs.to.hex(...this.rgb().round().color)},hexa(m){if(m!==void 0)return new Color(m);const c=this.rgb().round().color;let de=Math.round(this.valpha*255).toString(16).toUpperCase();return de.length===1&&(de="0"+de),cs.to.hex(...c)+de},rgbNumber(){const m=this.rgb().color;return(m[0]&255)<<16|(m[1]&255)<<8|m[2]&255},luminosity(){const m=this.rgb().color,c=[];for(const[de,ye]of m.entries()){const ke=ye/255;c[de]=ke<=.04045?ke/12.92:((ke+.055)/1.055)**2.4}return .2126*c[0]+.7152*c[1]+.0722*c[2]},contrast(m){const c=this.luminosity(),de=m.luminosity();return c>de?(c+.05)/(de+.05):(de+.05)/(c+.05)},level(m){const c=this.contrast(m);return c>=7?"AAA":c>=4.5?"AA":""},isDark(){const m=this.rgb().color;return(m[0]*2126+m[1]*7152+m[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){const m=this.rgb();for(let c=0;c<3;c++)m.color[c]=255-m.color[c];return m},lighten(m){const c=this.hsl();return c.color[2]+=c.color[2]*m,c},darken(m){const c=this.hsl();return c.color[2]-=c.color[2]*m,c},saturate(m){const c=this.hsl();return c.color[1]+=c.color[1]*m,c},desaturate(m){const c=this.hsl();return c.color[1]-=c.color[1]*m,c},whiten(m){const c=this.hwb();return c.color[1]+=c.color[1]*m,c},blacken(m){const c=this.hwb();return c.color[2]+=c.color[2]*m,c},grayscale(){const m=this.rgb().color,c=m[0]*.3+m[1]*.59+m[2]*.11;return Color.rgb(c,c,c)},fade(m){return this.alpha(this.valpha-this.valpha*m)},opaquer(m){return this.alpha(this.valpha+this.valpha*m)},rotate(m){const c=this.hsl();let de=c.color[0];return de=(de+m)%360,de=de<0?360+de:de,c.color[0]=de,c},mix(m,c){if(!m||!m.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof m);const de=m.rgb(),ye=this.rgb(),ke=c===void 0?.5:c,xe=2*ke-1,Ze=de.alpha()-ye.alpha(),ie=((xe*Ze===-1?xe:(xe+Ze)/(1+xe*Ze))+1)/2,ii=1-ie;return Color.rgb(ie*de.red()+ii*ye.red(),ie*de.green()+ii*ye.green(),ie*de.blue()+ii*ye.blue(),de.alpha()*ke+ye.alpha()*(1-ke))}};for(const m of Object.keys(convert)){if(skippedModels.includes(m))continue;const{channels:c}=convert[m];Color.prototype[m]=function(...de){return this.model===m?new Color(this):de.length>0?new Color(de,m):new Color([...assertArray(convert[this.model][m].raw(this.color)),this.valpha],m)},Color[m]=function(...de){let ye=de[0];return typeof ye=="number"&&(ye=zeroArray(de,c)),new Color(ye,m)}}function roundTo(m,c){return Number(m.toFixed(c))}function roundToPlace(m){return function(c){return roundTo(c,m)}}function getset(m,c,de){m=Array.isArray(m)?m:[m];for(const ye of m)(limiters[ye]||=[])[c]=de;return m=m[0],function(ye){let ke;return ye!==void 0?(de&&(ye=de(ye)),ke=this[m](),ke.color[c]=ye,ke):(ke=this[m]().color[c],de&&(ke=de(ke)),ke)}}function maxfn(m){return function(c){return Math.max(0,Math.min(m,c))}}function assertArray(m){return Array.isArray(m)?m:[m]}function zeroArray(m,c){for(let de=0;de<c;de++)typeof m[de]!="number"&&(m[de]=0);return m}class BluepicEmbed extends EventTarget{element;studioResourcesBaseUrl=vue.ref("https://studio-resources.staging.bluepic.io");cloudflarePagesHostname=vue.ref("bluepic-core-sandbox.pages.dev");editorRef=vue.ref();templateId;data=vue.ref();serial=vue.ref();allowPanAndZoom=vue.ref(!1);darkmode=vue.ref(!0);ready=vue.ref(!1);displayMode=vue.ref("auto");bxCoreVersion=vue.ref("auto");publishedSlug=vue.ref("latest");theme=vue.ref();branding=vue.ref(!0);constructor(c,de,ye){if(super(),typeof c=="string"){const ke=document.querySelector(c);if(!ke||!(ke instanceof HTMLElement))throw new Error(`Element with selector "${c}" not found or not an HTMLElement`);this.element=ke}else if(c instanceof HTMLElement)this.element=c;else throw new Error("Invalid element or selector provided");this.init(),this.displayMode.value=ye?.displayMode??this.displayMode.value,this.darkmode.value=ye?.darkmode??this.darkmode.value,this.allowPanAndZoom.value=ye?.allowPanAndZoom??this.allowPanAndZoom.value,this.studioResourcesBaseUrl.value=ye?.studioResourcesBaseUrl??this.studioResourcesBaseUrl.value,this.cloudflarePagesHostname.value=ye?.cloudflarePagesHostname??this.cloudflarePagesHostname.value,this.bxCoreVersion.value=ye?.bxCoreVersion??this.bxCoreVersion.value,this.publishedSlug.value=ye?.publishedSlug??this.publishedSlug.value,this.theme.value=ye?.theme??this.theme.value,this.branding.value=ye?.branding??this.branding.value,this.templateId=vue.ref(de),this.data.value=ye?.initData??this.data.value,vue.watch(this.ready,(ke,xe)=>{if(ke&&!xe){const Ze=new CustomEvent("ready",{detail:{templateId:this.templateId.value,data:vue.unref(this.data.value)}});this.dispatchEvent(Ze)}}),vue.watch(this.data,()=>{const ke=new CustomEvent("data",{detail:{data:vue.unref(this.data.value)}});this.dispatchEvent(ke)},{deep:!0})}init(){this.element.innerHTML=`
2606
- <div id="app" class="bluepic-app-wrapper" style="height: 100%;">
2605
+ `))}Gi.fill(0),ke.createHash=function(lr){return or(lr)},ke.createHmac=or,ke.randomBytes=function(lr,hi){if(!hi||!hi.call)return new Ci(Wi(lr));try{hi.call(this,void 0,new Ci(Wi(lr)))}catch(Me){hi(Me)}};var cr,ar=["createCredentials","createCipher","createCipheriv","createDecipher","createDecipheriv","createSign","createVerify","createDiffieHellman","pbkdf2"],tr=function(lr){ke[lr]=function(){rr("sorry,",lr,"is not implemented yet")}};for(cr in ar)tr(ar[cr])}).call(this,de("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},de("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/index.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./md5":6,"./rng":7,"./sha":8,"./sha256":9,buffer:3,lYpoI2:11}],6:[function(de,ye,ke){(function(xe,Ze,ie,ii,di,li,mi,Ei,Ai){var Ci=de("./helpers");function Bi(rr,cr){rr[cr>>5]|=128<<cr%32,rr[14+(cr+64>>>9<<4)]=cr;for(var ar=1732584193,tr=-271733879,lr=-1732584194,hi=271733878,Me=0;Me<rr.length;Me+=16){var ze=ar,qe=tr,ei=lr,ai=hi,ar=Wi(ar,tr,lr,hi,rr[Me+0],7,-680876936),hi=Wi(hi,ar,tr,lr,rr[Me+1],12,-389564586),lr=Wi(lr,hi,ar,tr,rr[Me+2],17,606105819),tr=Wi(tr,lr,hi,ar,rr[Me+3],22,-1044525330);ar=Wi(ar,tr,lr,hi,rr[Me+4],7,-176418897),hi=Wi(hi,ar,tr,lr,rr[Me+5],12,1200080426),lr=Wi(lr,hi,ar,tr,rr[Me+6],17,-1473231341),tr=Wi(tr,lr,hi,ar,rr[Me+7],22,-45705983),ar=Wi(ar,tr,lr,hi,rr[Me+8],7,1770035416),hi=Wi(hi,ar,tr,lr,rr[Me+9],12,-1958414417),lr=Wi(lr,hi,ar,tr,rr[Me+10],17,-42063),tr=Wi(tr,lr,hi,ar,rr[Me+11],22,-1990404162),ar=Wi(ar,tr,lr,hi,rr[Me+12],7,1804603682),hi=Wi(hi,ar,tr,lr,rr[Me+13],12,-40341101),lr=Wi(lr,hi,ar,tr,rr[Me+14],17,-1502002290),ar=Oi(ar,tr=Wi(tr,lr,hi,ar,rr[Me+15],22,1236535329),lr,hi,rr[Me+1],5,-165796510),hi=Oi(hi,ar,tr,lr,rr[Me+6],9,-1069501632),lr=Oi(lr,hi,ar,tr,rr[Me+11],14,643717713),tr=Oi(tr,lr,hi,ar,rr[Me+0],20,-373897302),ar=Oi(ar,tr,lr,hi,rr[Me+5],5,-701558691),hi=Oi(hi,ar,tr,lr,rr[Me+10],9,38016083),lr=Oi(lr,hi,ar,tr,rr[Me+15],14,-660478335),tr=Oi(tr,lr,hi,ar,rr[Me+4],20,-405537848),ar=Oi(ar,tr,lr,hi,rr[Me+9],5,568446438),hi=Oi(hi,ar,tr,lr,rr[Me+14],9,-1019803690),lr=Oi(lr,hi,ar,tr,rr[Me+3],14,-187363961),tr=Oi(tr,lr,hi,ar,rr[Me+8],20,1163531501),ar=Oi(ar,tr,lr,hi,rr[Me+13],5,-1444681467),hi=Oi(hi,ar,tr,lr,rr[Me+2],9,-51403784),lr=Oi(lr,hi,ar,tr,rr[Me+7],14,1735328473),ar=Ui(ar,tr=Oi(tr,lr,hi,ar,rr[Me+12],20,-1926607734),lr,hi,rr[Me+5],4,-378558),hi=Ui(hi,ar,tr,lr,rr[Me+8],11,-2022574463),lr=Ui(lr,hi,ar,tr,rr[Me+11],16,1839030562),tr=Ui(tr,lr,hi,ar,rr[Me+14],23,-35309556),ar=Ui(ar,tr,lr,hi,rr[Me+1],4,-1530992060),hi=Ui(hi,ar,tr,lr,rr[Me+4],11,1272893353),lr=Ui(lr,hi,ar,tr,rr[Me+7],16,-155497632),tr=Ui(tr,lr,hi,ar,rr[Me+10],23,-1094730640),ar=Ui(ar,tr,lr,hi,rr[Me+13],4,681279174),hi=Ui(hi,ar,tr,lr,rr[Me+0],11,-358537222),lr=Ui(lr,hi,ar,tr,rr[Me+3],16,-722521979),tr=Ui(tr,lr,hi,ar,rr[Me+6],23,76029189),ar=Ui(ar,tr,lr,hi,rr[Me+9],4,-640364487),hi=Ui(hi,ar,tr,lr,rr[Me+12],11,-421815835),lr=Ui(lr,hi,ar,tr,rr[Me+15],16,530742520),ar=Gi(ar,tr=Ui(tr,lr,hi,ar,rr[Me+2],23,-995338651),lr,hi,rr[Me+0],6,-198630844),hi=Gi(hi,ar,tr,lr,rr[Me+7],10,1126891415),lr=Gi(lr,hi,ar,tr,rr[Me+14],15,-1416354905),tr=Gi(tr,lr,hi,ar,rr[Me+5],21,-57434055),ar=Gi(ar,tr,lr,hi,rr[Me+12],6,1700485571),hi=Gi(hi,ar,tr,lr,rr[Me+3],10,-1894986606),lr=Gi(lr,hi,ar,tr,rr[Me+10],15,-1051523),tr=Gi(tr,lr,hi,ar,rr[Me+1],21,-2054922799),ar=Gi(ar,tr,lr,hi,rr[Me+8],6,1873313359),hi=Gi(hi,ar,tr,lr,rr[Me+15],10,-30611744),lr=Gi(lr,hi,ar,tr,rr[Me+6],15,-1560198380),tr=Gi(tr,lr,hi,ar,rr[Me+13],21,1309151649),ar=Gi(ar,tr,lr,hi,rr[Me+4],6,-145523070),hi=Gi(hi,ar,tr,lr,rr[Me+11],10,-1120210379),lr=Gi(lr,hi,ar,tr,rr[Me+2],15,718787259),tr=Gi(tr,lr,hi,ar,rr[Me+9],21,-343485551),ar=or(ar,ze),tr=or(tr,qe),lr=or(lr,ei),hi=or(hi,ai)}return Array(ar,tr,lr,hi)}function Di(rr,cr,ar,tr,lr,hi){return or((cr=or(or(cr,rr),or(tr,hi)))<<lr|cr>>>32-lr,ar)}function Wi(rr,cr,ar,tr,lr,hi,Me){return Di(cr&ar|~cr&tr,rr,cr,lr,hi,Me)}function Oi(rr,cr,ar,tr,lr,hi,Me){return Di(cr&tr|ar&~tr,rr,cr,lr,hi,Me)}function Ui(rr,cr,ar,tr,lr,hi,Me){return Di(cr^ar^tr,rr,cr,lr,hi,Me)}function Gi(rr,cr,ar,tr,lr,hi,Me){return Di(ar^(cr|~tr),rr,cr,lr,hi,Me)}function or(rr,cr){var ar=(65535&rr)+(65535&cr);return(rr>>16)+(cr>>16)+(ar>>16)<<16|65535&ar}ye.exports=function(rr){return Ci.hash(rr,Bi,16)}}).call(this,de("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},de("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/md5.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],7:[function(de,ye,ke){(function(xe,Ze,ie,ii,di,li,mi,Ei,Ai){ye.exports=function(Ci){for(var Bi,Di=new Array(Ci),Wi=0;Wi<Ci;Wi++)(3&Wi)==0&&(Bi=4294967296*Math.random()),Di[Wi]=Bi>>>((3&Wi)<<3)&255;return Di}}).call(this,de("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},de("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/rng.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{buffer:3,lYpoI2:11}],8:[function(de,ye,ke){(function(xe,Ze,ie,ii,di,li,mi,Ei,Ai){var Ci=de("./helpers");function Bi(Oi,Ui){Oi[Ui>>5]|=128<<24-Ui%32,Oi[15+(Ui+64>>9<<4)]=Ui;for(var Gi,or,rr,cr=Array(80),ar=1732584193,tr=-271733879,lr=-1732584194,hi=271733878,Me=-1009589776,ze=0;ze<Oi.length;ze+=16){for(var qe=ar,ei=tr,ai=lr,pi=hi,gi=Me,ri=0;ri<80;ri++){cr[ri]=ri<16?Oi[ze+ri]:Wi(cr[ri-3]^cr[ri-8]^cr[ri-14]^cr[ri-16],1);var De=Di(Di(Wi(ar,5),(De=tr,or=lr,rr=hi,(Gi=ri)<20?De&or|~De&rr:!(Gi<40)&&Gi<60?De&or|De&rr|or&rr:De^or^rr)),Di(Di(Me,cr[ri]),(Gi=ri)<20?1518500249:Gi<40?1859775393:Gi<60?-1894007588:-899497514)),Me=hi,hi=lr,lr=Wi(tr,30),tr=ar,ar=De}ar=Di(ar,qe),tr=Di(tr,ei),lr=Di(lr,ai),hi=Di(hi,pi),Me=Di(Me,gi)}return Array(ar,tr,lr,hi,Me)}function Di(Oi,Ui){var Gi=(65535&Oi)+(65535&Ui);return(Oi>>16)+(Ui>>16)+(Gi>>16)<<16|65535&Gi}function Wi(Oi,Ui){return Oi<<Ui|Oi>>>32-Ui}ye.exports=function(Oi){return Ci.hash(Oi,Bi,20,!0)}}).call(this,de("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},de("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/sha.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],9:[function(de,ye,ke){(function(xe,Ze,ie,ii,di,li,mi,Ei,Ai){function Ci(Ui,Gi){var or=(65535&Ui)+(65535&Gi);return(Ui>>16)+(Gi>>16)+(or>>16)<<16|65535&or}function Bi(Ui,Gi){var or,rr=new Array(1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298),cr=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),ar=new Array(64);Ui[Gi>>5]|=128<<24-Gi%32,Ui[15+(Gi+64>>9<<4)]=Gi;for(var tr,lr,hi=0;hi<Ui.length;hi+=16){for(var Me=cr[0],ze=cr[1],qe=cr[2],ei=cr[3],ai=cr[4],pi=cr[5],gi=cr[6],ri=cr[7],De=0;De<64;De++)ar[De]=De<16?Ui[De+hi]:Ci(Ci(Ci((lr=ar[De-2],Wi(lr,17)^Wi(lr,19)^Oi(lr,10)),ar[De-7]),(lr=ar[De-15],Wi(lr,7)^Wi(lr,18)^Oi(lr,3))),ar[De-16]),or=Ci(Ci(Ci(Ci(ri,Wi(lr=ai,6)^Wi(lr,11)^Wi(lr,25)),ai&pi^~ai&gi),rr[De]),ar[De]),tr=Ci(Wi(tr=Me,2)^Wi(tr,13)^Wi(tr,22),Me&ze^Me&qe^ze&qe),ri=gi,gi=pi,pi=ai,ai=Ci(ei,or),ei=qe,qe=ze,ze=Me,Me=Ci(or,tr);cr[0]=Ci(Me,cr[0]),cr[1]=Ci(ze,cr[1]),cr[2]=Ci(qe,cr[2]),cr[3]=Ci(ei,cr[3]),cr[4]=Ci(ai,cr[4]),cr[5]=Ci(pi,cr[5]),cr[6]=Ci(gi,cr[6]),cr[7]=Ci(ri,cr[7])}return cr}var Di=de("./helpers"),Wi=function(Ui,Gi){return Ui>>>Gi|Ui<<32-Gi},Oi=function(Ui,Gi){return Ui>>>Gi};ye.exports=function(Ui){return Di.hash(Ui,Bi,32,!0)}}).call(this,de("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},de("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/sha256.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],10:[function(de,ye,ke){(function(xe,Ze,ie,ii,di,li,mi,Ei,Ai){ke.read=function(Ci,Bi,Di,Wi,hi){var Ui,Gi,or=8*hi-Wi-1,rr=(1<<or)-1,cr=rr>>1,ar=-7,tr=Di?hi-1:0,lr=Di?-1:1,hi=Ci[Bi+tr];for(tr+=lr,Ui=hi&(1<<-ar)-1,hi>>=-ar,ar+=or;0<ar;Ui=256*Ui+Ci[Bi+tr],tr+=lr,ar-=8);for(Gi=Ui&(1<<-ar)-1,Ui>>=-ar,ar+=Wi;0<ar;Gi=256*Gi+Ci[Bi+tr],tr+=lr,ar-=8);if(Ui===0)Ui=1-cr;else{if(Ui===rr)return Gi?NaN:1/0*(hi?-1:1);Gi+=Math.pow(2,Wi),Ui-=cr}return(hi?-1:1)*Gi*Math.pow(2,Ui-Wi)},ke.write=function(Ci,Bi,Di,Wi,Oi,Me){var Gi,or,rr=8*Me-Oi-1,cr=(1<<rr)-1,ar=cr>>1,tr=Oi===23?Math.pow(2,-24)-Math.pow(2,-77):0,lr=Wi?0:Me-1,hi=Wi?1:-1,Me=Bi<0||Bi===0&&1/Bi<0?1:0;for(Bi=Math.abs(Bi),isNaN(Bi)||Bi===1/0?(or=isNaN(Bi)?1:0,Gi=cr):(Gi=Math.floor(Math.log(Bi)/Math.LN2),Bi*(Wi=Math.pow(2,-Gi))<1&&(Gi--,Wi*=2),2<=(Bi+=1<=Gi+ar?tr/Wi:tr*Math.pow(2,1-ar))*Wi&&(Gi++,Wi/=2),cr<=Gi+ar?(or=0,Gi=cr):1<=Gi+ar?(or=(Bi*Wi-1)*Math.pow(2,Oi),Gi+=ar):(or=Bi*Math.pow(2,ar-1)*Math.pow(2,Oi),Gi=0));8<=Oi;Ci[Di+lr]=255&or,lr+=hi,or/=256,Oi-=8);for(Gi=Gi<<Oi|or,rr+=Oi;0<rr;Ci[Di+lr]=255&Gi,lr+=hi,Gi/=256,rr-=8);Ci[Di+lr-hi]|=128*Me}}).call(this,de("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},de("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/ieee754/index.js","/node_modules/gulp-browserify/node_modules/ieee754")},{buffer:3,lYpoI2:11}],11:[function(de,ye,ke){(function(xe,Ze,ie,ii,di,li,mi,Ei,Ai){var Ci,Bi,Di;function Wi(){}(xe=ye.exports={}).nextTick=(Bi=typeof window<"u"&&window.setImmediate,Di=typeof window<"u"&&window.postMessage&&window.addEventListener,Bi?function(Oi){return window.setImmediate(Oi)}:Di?(Ci=[],window.addEventListener("message",function(Oi){var Ui=Oi.source;Ui!==window&&Ui!==null||Oi.data!=="process-tick"||(Oi.stopPropagation(),0<Ci.length&&Ci.shift()())},!0),function(Oi){Ci.push(Oi),window.postMessage("process-tick","*")}):function(Oi){setTimeout(Oi,0)}),xe.title="browser",xe.browser=!0,xe.env={},xe.argv=[],xe.on=Wi,xe.addListener=Wi,xe.once=Wi,xe.off=Wi,xe.removeListener=Wi,xe.removeAllListeners=Wi,xe.emit=Wi,xe.binding=function(Oi){throw new Error("process.binding is not supported")},xe.cwd=function(){return"/"},xe.chdir=function(Oi){throw new Error("process.chdir is not supported")}}).call(this,de("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},de("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/process/browser.js","/node_modules/gulp-browserify/node_modules/process")},{buffer:3,lYpoI2:11}]},{},[1])(1)})})(object_hash);const hash=object_hash.exports,embedAPIV2BaseUrl={}.V_EMBEDV2_BACKEDND_URL,IMAGE_TTL_IN_SECONDS=60*60*24*1;function parseCloudflareImagesDeliveryUrl(m){try{const c=new URL(m);if(c.hostname==="imagedelivery.net"){const[,de,ye,ke]=c.pathname.split("/")||[];if(de&&ye&&ke)return{scopeId:de,imageId:ye,variant:ke};throw new Error("Invalid Cloudflare Images URL")}throw new Error("Invalid Cloudflare Images URL")}catch{throw new Error("Invalid URL")}}async function uploadImage(m,c,de,ye,ke){const xe=`${embedAPIV2BaseUrl}/api/image/session?${new URLSearchParams({key:hash({field:c.field,templateId:m}),ttl:String(IMAGE_TTL_IN_SECONDS)})}`,Ze=new FormData;Ze.append("file",de,ye);const ie=await fetchWithProgressV1({url:xe,method:"POST",data:Ze,onUploadProgress:ke});if(ie.type==="application/json")return JSON.parse(await ie.text());throw new Error("Invalid response from Cloudflare Images")}const colorNames={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},reverseNames=Object.create(null);for(const m in colorNames)Object.hasOwn(colorNames,m)&&(reverseNames[colorNames[m]]=m);const cs={to:{},get:{}};cs.get=function(m){const c=m.slice(0,3).toLowerCase();let de,ye;switch(c){case"hsl":{de=cs.get.hsl(m),ye="hsl";break}case"hwb":{de=cs.get.hwb(m),ye="hwb";break}default:{de=cs.get.rgb(m),ye="rgb";break}}return de?{model:ye,value:de}:null},cs.get.rgb=function(m){if(!m)return null;const c=/^#([a-f\d]{3,4})$/i,de=/^#([a-f\d]{6})([a-f\d]{2})?$/i,ye=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|/]\s*([+-]?[\d.]+)(%?)\s*)?\)$/,ke=/^rgba?\(\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[,|/]\s*([+-]?[\d.]+)(%?)\s*)?\)$/,xe=/^(\w+)$/;let Ze=[0,0,0,1],ie,ii,di;if(ie=m.match(de)){for(di=ie[2],ie=ie[1],ii=0;ii<3;ii++){const li=ii*2;Ze[ii]=Number.parseInt(ie.slice(li,li+2),16)}di&&(Ze[3]=Number.parseInt(di,16)/255)}else if(ie=m.match(c)){for(ie=ie[1],di=ie[3],ii=0;ii<3;ii++)Ze[ii]=Number.parseInt(ie[ii]+ie[ii],16);di&&(Ze[3]=Number.parseInt(di+di,16)/255)}else if(ie=m.match(ye)){for(ii=0;ii<3;ii++)Ze[ii]=Number.parseInt(ie[ii+1],10);ie[4]&&(Ze[3]=ie[5]?Number.parseFloat(ie[4])*.01:Number.parseFloat(ie[4]))}else if(ie=m.match(ke)){for(ii=0;ii<3;ii++)Ze[ii]=Math.round(Number.parseFloat(ie[ii+1])*2.55);ie[4]&&(Ze[3]=ie[5]?Number.parseFloat(ie[4])*.01:Number.parseFloat(ie[4]))}else return(ie=m.match(xe))?ie[1]==="transparent"?[0,0,0,0]:Object.hasOwn(colorNames,ie[1])?(Ze=colorNames[ie[1]],Ze[3]=1,Ze):null:null;for(ii=0;ii<3;ii++)Ze[ii]=clamp(Ze[ii],0,255);return Ze[3]=clamp(Ze[3],0,1),Ze},cs.get.hsl=function(m){if(!m)return null;const c=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[,|/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,de=m.match(c);if(de){const ye=Number.parseFloat(de[4]),ke=(Number.parseFloat(de[1])%360+360)%360,xe=clamp(Number.parseFloat(de[2]),0,100),Ze=clamp(Number.parseFloat(de[3]),0,100),ie=clamp(Number.isNaN(ye)?1:ye,0,1);return[ke,xe,Ze,ie]}return null},cs.get.hwb=function(m){if(!m)return null;const c=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d.]+)%\s*,\s*([+-]?[\d.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,de=m.match(c);if(de){const ye=Number.parseFloat(de[4]),ke=(Number.parseFloat(de[1])%360+360)%360,xe=clamp(Number.parseFloat(de[2]),0,100),Ze=clamp(Number.parseFloat(de[3]),0,100),ie=clamp(Number.isNaN(ye)?1:ye,0,1);return[ke,xe,Ze,ie]}return null},cs.to.hex=function(...m){return"#"+hexDouble(m[0])+hexDouble(m[1])+hexDouble(m[2])+(m[3]<1?hexDouble(Math.round(m[3]*255)):"")},cs.to.rgb=function(...m){return m.length<4||m[3]===1?"rgb("+Math.round(m[0])+", "+Math.round(m[1])+", "+Math.round(m[2])+")":"rgba("+Math.round(m[0])+", "+Math.round(m[1])+", "+Math.round(m[2])+", "+m[3]+")"},cs.to.rgb.percent=function(...m){const c=Math.round(m[0]/255*100),de=Math.round(m[1]/255*100),ye=Math.round(m[2]/255*100);return m.length<4||m[3]===1?"rgb("+c+"%, "+de+"%, "+ye+"%)":"rgba("+c+"%, "+de+"%, "+ye+"%, "+m[3]+")"},cs.to.hsl=function(...m){return m.length<4||m[3]===1?"hsl("+m[0]+", "+m[1]+"%, "+m[2]+"%)":"hsla("+m[0]+", "+m[1]+"%, "+m[2]+"%, "+m[3]+")"},cs.to.hwb=function(...m){let c="";return m.length>=4&&m[3]!==1&&(c=", "+m[3]),"hwb("+m[0]+", "+m[1]+"%, "+m[2]+"%"+c+")"},cs.to.keyword=function(...m){return reverseNames[m.slice(0,3)]};function clamp(m,c,de){return Math.min(Math.max(c,m),de)}function hexDouble(m){const c=Math.round(m).toString(16).toUpperCase();return c.length<2?"0"+c:c}const cssKeywords={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},reverseKeywords={};for(const m of Object.keys(cssKeywords))reverseKeywords[cssKeywords[m]]=m;const convert$1={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}},LAB_FT=(6/29)**3;for(const m of Object.keys(convert$1)){if(!("channels"in convert$1[m]))throw new Error("missing channels property: "+m);if(!("labels"in convert$1[m]))throw new Error("missing channel labels property: "+m);if(convert$1[m].labels.length!==convert$1[m].channels)throw new Error("channel and label counts mismatch: "+m);const{channels:c,labels:de}=convert$1[m];delete convert$1[m].channels,delete convert$1[m].labels,Object.defineProperty(convert$1[m],"channels",{value:c}),Object.defineProperty(convert$1[m],"labels",{value:de})}convert$1.rgb.hsl=function(m){const c=m[0]/255,de=m[1]/255,ye=m[2]/255,ke=Math.min(c,de,ye),xe=Math.max(c,de,ye),Ze=xe-ke;let ie,ii;switch(xe){case ke:{ie=0;break}case c:{ie=(de-ye)/Ze;break}case de:{ie=2+(ye-c)/Ze;break}case ye:{ie=4+(c-de)/Ze;break}}ie=Math.min(ie*60,360),ie<0&&(ie+=360);const di=(ke+xe)/2;return xe===ke?ii=0:di<=.5?ii=Ze/(xe+ke):ii=Ze/(2-xe-ke),[ie,ii*100,di*100]},convert$1.rgb.hsv=function(m){let c,de,ye,ke,xe;const Ze=m[0]/255,ie=m[1]/255,ii=m[2]/255,di=Math.max(Ze,ie,ii),li=di-Math.min(Ze,ie,ii),mi=function(Ei){return(di-Ei)/6/li+1/2};if(li===0)ke=0,xe=0;else{switch(xe=li/di,c=mi(Ze),de=mi(ie),ye=mi(ii),di){case Ze:{ke=ye-de;break}case ie:{ke=1/3+c-ye;break}case ii:{ke=2/3+de-c;break}}ke<0?ke+=1:ke>1&&(ke-=1)}return[ke*360,xe*100,di*100]},convert$1.rgb.hwb=function(m){const c=m[0],de=m[1];let ye=m[2];const ke=convert$1.rgb.hsl(m)[0],xe=1/255*Math.min(c,Math.min(de,ye));return ye=1-1/255*Math.max(c,Math.max(de,ye)),[ke,xe*100,ye*100]},convert$1.rgb.cmyk=function(m){const c=m[0]/255,de=m[1]/255,ye=m[2]/255,ke=Math.min(1-c,1-de,1-ye),xe=(1-c-ke)/(1-ke)||0,Ze=(1-de-ke)/(1-ke)||0,ie=(1-ye-ke)/(1-ke)||0;return[xe*100,Ze*100,ie*100,ke*100]};function comparativeDistance(m,c){return(m[0]-c[0])**2+(m[1]-c[1])**2+(m[2]-c[2])**2}convert$1.rgb.keyword=function(m){const c=reverseKeywords[m];if(c)return c;let de=Number.POSITIVE_INFINITY,ye;for(const ke of Object.keys(cssKeywords)){const xe=cssKeywords[ke],Ze=comparativeDistance(m,xe);Ze<de&&(de=Ze,ye=ke)}return ye},convert$1.keyword.rgb=function(m){return cssKeywords[m]},convert$1.rgb.xyz=function(m){let c=m[0]/255,de=m[1]/255,ye=m[2]/255;c=c>.04045?((c+.055)/1.055)**2.4:c/12.92,de=de>.04045?((de+.055)/1.055)**2.4:de/12.92,ye=ye>.04045?((ye+.055)/1.055)**2.4:ye/12.92;const ke=c*.4124564+de*.3575761+ye*.1804375,xe=c*.2126729+de*.7151522+ye*.072175,Ze=c*.0193339+de*.119192+ye*.9503041;return[ke*100,xe*100,Ze*100]},convert$1.rgb.lab=function(m){const c=convert$1.rgb.xyz(m);let de=c[0],ye=c[1],ke=c[2];de/=95.047,ye/=100,ke/=108.883,de=de>LAB_FT?de**(1/3):7.787*de+16/116,ye=ye>LAB_FT?ye**(1/3):7.787*ye+16/116,ke=ke>LAB_FT?ke**(1/3):7.787*ke+16/116;const xe=116*ye-16,Ze=500*(de-ye),ie=200*(ye-ke);return[xe,Ze,ie]},convert$1.hsl.rgb=function(m){const c=m[0]/360,de=m[1]/100,ye=m[2]/100;let ke,xe;if(de===0)return xe=ye*255,[xe,xe,xe];const Ze=ye<.5?ye*(1+de):ye+de-ye*de,ie=2*ye-Ze,ii=[0,0,0];for(let di=0;di<3;di++)ke=c+1/3*-(di-1),ke<0&&ke++,ke>1&&ke--,6*ke<1?xe=ie+(Ze-ie)*6*ke:2*ke<1?xe=Ze:3*ke<2?xe=ie+(Ze-ie)*(2/3-ke)*6:xe=ie,ii[di]=xe*255;return ii},convert$1.hsl.hsv=function(m){const c=m[0];let de=m[1]/100,ye=m[2]/100,ke=de;const xe=Math.max(ye,.01);ye*=2,de*=ye<=1?ye:2-ye,ke*=xe<=1?xe:2-xe;const Ze=(ye+de)/2,ie=ye===0?2*ke/(xe+ke):2*de/(ye+de);return[c,ie*100,Ze*100]},convert$1.hsv.rgb=function(m){const c=m[0]/60,de=m[1]/100;let ye=m[2]/100;const ke=Math.floor(c)%6,xe=c-Math.floor(c),Ze=255*ye*(1-de),ie=255*ye*(1-de*xe),ii=255*ye*(1-de*(1-xe));switch(ye*=255,ke){case 0:return[ye,ii,Ze];case 1:return[ie,ye,Ze];case 2:return[Ze,ye,ii];case 3:return[Ze,ie,ye];case 4:return[ii,Ze,ye];case 5:return[ye,Ze,ie]}},convert$1.hsv.hsl=function(m){const c=m[0],de=m[1]/100,ye=m[2]/100,ke=Math.max(ye,.01);let xe,Ze;Ze=(2-de)*ye;const ie=(2-de)*ke;return xe=de*ke,xe/=ie<=1?ie:2-ie,xe=xe||0,Ze/=2,[c,xe*100,Ze*100]},convert$1.hwb.rgb=function(m){const c=m[0]/360;let de=m[1]/100,ye=m[2]/100;const ke=de+ye;let xe;ke>1&&(de/=ke,ye/=ke);const Ze=Math.floor(6*c),ie=1-ye;xe=6*c-Ze,(Ze&1)!==0&&(xe=1-xe);const ii=de+xe*(ie-de);let di,li,mi;switch(Ze){default:case 6:case 0:{di=ie,li=ii,mi=de;break}case 1:{di=ii,li=ie,mi=de;break}case 2:{di=de,li=ie,mi=ii;break}case 3:{di=de,li=ii,mi=ie;break}case 4:{di=ii,li=de,mi=ie;break}case 5:{di=ie,li=de,mi=ii;break}}return[di*255,li*255,mi*255]},convert$1.cmyk.rgb=function(m){const c=m[0]/100,de=m[1]/100,ye=m[2]/100,ke=m[3]/100,xe=1-Math.min(1,c*(1-ke)+ke),Ze=1-Math.min(1,de*(1-ke)+ke),ie=1-Math.min(1,ye*(1-ke)+ke);return[xe*255,Ze*255,ie*255]},convert$1.xyz.rgb=function(m){const c=m[0]/100,de=m[1]/100,ye=m[2]/100;let ke,xe,Ze;return ke=c*3.2404542+de*-1.5371385+ye*-.4985314,xe=c*-.969266+de*1.8760108+ye*.041556,Ze=c*.0556434+de*-.2040259+ye*1.0572252,ke=ke>.0031308?1.055*ke**(1/2.4)-.055:ke*12.92,xe=xe>.0031308?1.055*xe**(1/2.4)-.055:xe*12.92,Ze=Ze>.0031308?1.055*Ze**(1/2.4)-.055:Ze*12.92,ke=Math.min(Math.max(0,ke),1),xe=Math.min(Math.max(0,xe),1),Ze=Math.min(Math.max(0,Ze),1),[ke*255,xe*255,Ze*255]},convert$1.xyz.lab=function(m){let c=m[0],de=m[1],ye=m[2];c/=95.047,de/=100,ye/=108.883,c=c>LAB_FT?c**(1/3):7.787*c+16/116,de=de>LAB_FT?de**(1/3):7.787*de+16/116,ye=ye>LAB_FT?ye**(1/3):7.787*ye+16/116;const ke=116*de-16,xe=500*(c-de),Ze=200*(de-ye);return[ke,xe,Ze]},convert$1.lab.xyz=function(m){const c=m[0],de=m[1],ye=m[2];let ke,xe,Ze;xe=(c+16)/116,ke=de/500+xe,Ze=xe-ye/200;const ie=xe**3,ii=ke**3,di=Ze**3;return xe=ie>LAB_FT?ie:(xe-16/116)/7.787,ke=ii>LAB_FT?ii:(ke-16/116)/7.787,Ze=di>LAB_FT?di:(Ze-16/116)/7.787,ke*=95.047,xe*=100,Ze*=108.883,[ke,xe,Ze]},convert$1.lab.lch=function(m){const c=m[0],de=m[1],ye=m[2];let ke;ke=Math.atan2(ye,de)*360/2/Math.PI,ke<0&&(ke+=360);const Ze=Math.sqrt(de*de+ye*ye);return[c,Ze,ke]},convert$1.lch.lab=function(m){const c=m[0],de=m[1],ke=m[2]/360*2*Math.PI,xe=de*Math.cos(ke),Ze=de*Math.sin(ke);return[c,xe,Ze]},convert$1.rgb.ansi16=function(m,c=null){const[de,ye,ke]=m;let xe=c===null?convert$1.rgb.hsv(m)[2]:c;if(xe=Math.round(xe/50),xe===0)return 30;let Ze=30+(Math.round(ke/255)<<2|Math.round(ye/255)<<1|Math.round(de/255));return xe===2&&(Ze+=60),Ze},convert$1.hsv.ansi16=function(m){return convert$1.rgb.ansi16(convert$1.hsv.rgb(m),m[2])},convert$1.rgb.ansi256=function(m){const c=m[0],de=m[1],ye=m[2];return c>>4===de>>4&&de>>4===ye>>4?c<8?16:c>248?231:Math.round((c-8)/247*24)+232:16+36*Math.round(c/255*5)+6*Math.round(de/255*5)+Math.round(ye/255*5)},convert$1.ansi16.rgb=function(m){m=m[0];let c=m%10;if(c===0||c===7)return m>50&&(c+=3.5),c=c/10.5*255,[c,c,c];const de=(Math.trunc(m>50)+1)*.5,ye=(c&1)*de*255,ke=(c>>1&1)*de*255,xe=(c>>2&1)*de*255;return[ye,ke,xe]},convert$1.ansi256.rgb=function(m){if(m=m[0],m>=232){const xe=(m-232)*10+8;return[xe,xe,xe]}m-=16;let c;const de=Math.floor(m/36)/5*255,ye=Math.floor((c=m%36)/6)/5*255,ke=c%6/5*255;return[de,ye,ke]},convert$1.rgb.hex=function(m){const de=(((Math.round(m[0])&255)<<16)+((Math.round(m[1])&255)<<8)+(Math.round(m[2])&255)).toString(16).toUpperCase();return"000000".slice(de.length)+de},convert$1.hex.rgb=function(m){const c=m.toString(16).match(/[a-f\d]{6}|[a-f\d]{3}/i);if(!c)return[0,0,0];let de=c[0];c[0].length===3&&(de=[...de].map(ie=>ie+ie).join(""));const ye=Number.parseInt(de,16),ke=ye>>16&255,xe=ye>>8&255,Ze=ye&255;return[ke,xe,Ze]},convert$1.rgb.hcg=function(m){const c=m[0]/255,de=m[1]/255,ye=m[2]/255,ke=Math.max(Math.max(c,de),ye),xe=Math.min(Math.min(c,de),ye),Ze=ke-xe;let ie;const ii=Ze<1?xe/(1-Ze):0;return Ze<=0?ie=0:ke===c?ie=(de-ye)/Ze%6:ke===de?ie=2+(ye-c)/Ze:ie=4+(c-de)/Ze,ie/=6,ie%=1,[ie*360,Ze*100,ii*100]},convert$1.hsl.hcg=function(m){const c=m[1]/100,de=m[2]/100,ye=de<.5?2*c*de:2*c*(1-de);let ke=0;return ye<1&&(ke=(de-.5*ye)/(1-ye)),[m[0],ye*100,ke*100]},convert$1.hsv.hcg=function(m){const c=m[1]/100,de=m[2]/100,ye=c*de;let ke=0;return ye<1&&(ke=(de-ye)/(1-ye)),[m[0],ye*100,ke*100]},convert$1.hcg.rgb=function(m){const c=m[0]/360,de=m[1]/100,ye=m[2]/100;if(de===0)return[ye*255,ye*255,ye*255];const ke=[0,0,0],xe=c%1*6,Ze=xe%1,ie=1-Ze;let ii=0;switch(Math.floor(xe)){case 0:{ke[0]=1,ke[1]=Ze,ke[2]=0;break}case 1:{ke[0]=ie,ke[1]=1,ke[2]=0;break}case 2:{ke[0]=0,ke[1]=1,ke[2]=Ze;break}case 3:{ke[0]=0,ke[1]=ie,ke[2]=1;break}case 4:{ke[0]=Ze,ke[1]=0,ke[2]=1;break}default:ke[0]=1,ke[1]=0,ke[2]=ie}return ii=(1-de)*ye,[(de*ke[0]+ii)*255,(de*ke[1]+ii)*255,(de*ke[2]+ii)*255]},convert$1.hcg.hsv=function(m){const c=m[1]/100,de=m[2]/100,ye=c+de*(1-c);let ke=0;return ye>0&&(ke=c/ye),[m[0],ke*100,ye*100]},convert$1.hcg.hsl=function(m){const c=m[1]/100,ye=m[2]/100*(1-c)+.5*c;let ke=0;return ye>0&&ye<.5?ke=c/(2*ye):ye>=.5&&ye<1&&(ke=c/(2*(1-ye))),[m[0],ke*100,ye*100]},convert$1.hcg.hwb=function(m){const c=m[1]/100,de=m[2]/100,ye=c+de*(1-c);return[m[0],(ye-c)*100,(1-ye)*100]},convert$1.hwb.hcg=function(m){const c=m[1]/100,ye=1-m[2]/100,ke=ye-c;let xe=0;return ke<1&&(xe=(ye-ke)/(1-ke)),[m[0],ke*100,xe*100]},convert$1.apple.rgb=function(m){return[m[0]/65535*255,m[1]/65535*255,m[2]/65535*255]},convert$1.rgb.apple=function(m){return[m[0]/255*65535,m[1]/255*65535,m[2]/255*65535]},convert$1.gray.rgb=function(m){return[m[0]/100*255,m[0]/100*255,m[0]/100*255]},convert$1.gray.hsl=function(m){return[0,0,m[0]]},convert$1.gray.hsv=convert$1.gray.hsl,convert$1.gray.hwb=function(m){return[0,100,m[0]]},convert$1.gray.cmyk=function(m){return[0,0,0,m[0]]},convert$1.gray.lab=function(m){return[m[0],0,0]},convert$1.gray.hex=function(m){const c=Math.round(m[0]/100*255)&255,ye=((c<<16)+(c<<8)+c).toString(16).toUpperCase();return"000000".slice(ye.length)+ye},convert$1.rgb.gray=function(m){return[(m[0]+m[1]+m[2])/3/255*100]};function buildGraph(){const m={},c=Object.keys(convert$1);for(let{length:de}=c,ye=0;ye<de;ye++)m[c[ye]]={distance:-1,parent:null};return m}function deriveBFS(m){const c=buildGraph(),de=[m];for(c[m].distance=0;de.length>0;){const ye=de.pop(),ke=Object.keys(convert$1[ye]);for(let{length:xe}=ke,Ze=0;Ze<xe;Ze++){const ie=ke[Ze],ii=c[ie];ii.distance===-1&&(ii.distance=c[ye].distance+1,ii.parent=ye,de.unshift(ie))}}return c}function link(m,c){return function(de){return c(m(de))}}function wrapConversion(m,c){const de=[c[m].parent,m];let ye=convert$1[c[m].parent][m],ke=c[m].parent;for(;c[ke].parent;)de.unshift(c[ke].parent),ye=link(convert$1[c[ke].parent][ke],ye),ke=c[ke].parent;return ye.conversion=de,ye}function route(m){const c=deriveBFS(m),de={},ye=Object.keys(c);for(let{length:ke}=ye,xe=0;xe<ke;xe++){const Ze=ye[xe];c[Ze].parent!==null&&(de[Ze]=wrapConversion(Ze,c))}return de}const convert={},models=Object.keys(convert$1);function wrapRaw(m){const c=function(...de){const ye=de[0];return ye==null?ye:(ye.length>1&&(de=ye),m(de))};return"conversion"in m&&(c.conversion=m.conversion),c}function wrapRounded(m){const c=function(...de){const ye=de[0];if(ye==null)return ye;ye.length>1&&(de=ye);const ke=m(de);if(typeof ke=="object")for(let{length:xe}=ke,Ze=0;Ze<xe;Ze++)ke[Ze]=Math.round(ke[Ze]);return ke};return"conversion"in m&&(c.conversion=m.conversion),c}for(const m of models){convert[m]={},Object.defineProperty(convert[m],"channels",{value:convert$1[m].channels}),Object.defineProperty(convert[m],"labels",{value:convert$1[m].labels});const c=route(m),de=Object.keys(c);for(const ye of de){const ke=c[ye];convert[m][ye]=wrapRounded(ke),convert[m][ye].raw=wrapRaw(ke)}}const skippedModels=["keyword","gray","hex"],hashedModelKeys={};for(const m of Object.keys(convert))hashedModelKeys[[...convert[m].labels].sort().join("")]=m;const limiters={};function Color(m,c){if(!(this instanceof Color))return new Color(m,c);if(c&&c in skippedModels&&(c=null),c&&!(c in convert))throw new Error("Unknown model: "+c);let de,ye;if(m==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(m instanceof Color)this.model=m.model,this.color=[...m.color],this.valpha=m.valpha;else if(typeof m=="string"){const ke=cs.get(m);if(ke===null)throw new Error("Unable to parse color from string: "+m);this.model=ke.model,ye=convert[this.model].channels,this.color=ke.value.slice(0,ye),this.valpha=typeof ke.value[ye]=="number"?ke.value[ye]:1}else if(m.length>0){this.model=c||"rgb",ye=convert[this.model].channels;const ke=Array.prototype.slice.call(m,0,ye);this.color=zeroArray(ke,ye),this.valpha=typeof m[ye]=="number"?m[ye]:1}else if(typeof m=="number")this.model="rgb",this.color=[m>>16&255,m>>8&255,m&255],this.valpha=1;else{this.valpha=1;const ke=Object.keys(m);"alpha"in m&&(ke.splice(ke.indexOf("alpha"),1),this.valpha=typeof m.alpha=="number"?m.alpha:0);const xe=ke.sort().join("");if(!(xe in hashedModelKeys))throw new Error("Unable to parse color from object: "+JSON.stringify(m));this.model=hashedModelKeys[xe];const{labels:Ze}=convert[this.model],ie=[];for(de=0;de<Ze.length;de++)ie.push(m[Ze[de]]);this.color=zeroArray(ie)}if(limiters[this.model])for(ye=convert[this.model].channels,de=0;de<ye;de++){const ke=limiters[this.model][de];ke&&(this.color[de]=ke(this.color[de]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}Color.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(m){let c=this.model in cs.to?this:this.rgb();c=c.round(typeof m=="number"?m:1);const de=c.valpha===1?c.color:[...c.color,this.valpha];return cs.to[c.model](...de)},percentString(m){const c=this.rgb().round(typeof m=="number"?m:1),de=c.valpha===1?c.color:[...c.color,this.valpha];return cs.to.rgb.percent(...de)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){const m={},{channels:c}=convert[this.model],{labels:de}=convert[this.model];for(let ye=0;ye<c;ye++)m[de[ye]]=this.color[ye];return this.valpha!==1&&(m.alpha=this.valpha),m},unitArray(){const m=this.rgb().color;return m[0]/=255,m[1]/=255,m[2]/=255,this.valpha!==1&&m.push(this.valpha),m},unitObject(){const m=this.rgb().object();return m.r/=255,m.g/=255,m.b/=255,this.valpha!==1&&(m.alpha=this.valpha),m},round(m){return m=Math.max(m||0,0),new Color([...this.color.map(roundToPlace(m)),this.valpha],this.model)},alpha(m){return m!==void 0?new Color([...this.color,Math.max(0,Math.min(1,m))],this.model):this.valpha},red:getset("rgb",0,maxfn(255)),green:getset("rgb",1,maxfn(255)),blue:getset("rgb",2,maxfn(255)),hue:getset(["hsl","hsv","hsl","hwb","hcg"],0,m=>(m%360+360)%360),saturationl:getset("hsl",1,maxfn(100)),lightness:getset("hsl",2,maxfn(100)),saturationv:getset("hsv",1,maxfn(100)),value:getset("hsv",2,maxfn(100)),chroma:getset("hcg",1,maxfn(100)),gray:getset("hcg",2,maxfn(100)),white:getset("hwb",1,maxfn(100)),wblack:getset("hwb",2,maxfn(100)),cyan:getset("cmyk",0,maxfn(100)),magenta:getset("cmyk",1,maxfn(100)),yellow:getset("cmyk",2,maxfn(100)),black:getset("cmyk",3,maxfn(100)),x:getset("xyz",0,maxfn(95.047)),y:getset("xyz",1,maxfn(100)),z:getset("xyz",2,maxfn(108.833)),l:getset("lab",0,maxfn(100)),a:getset("lab",1),b:getset("lab",2),keyword(m){return m!==void 0?new Color(m):convert[this.model].keyword(this.color)},hex(m){return m!==void 0?new Color(m):cs.to.hex(...this.rgb().round().color)},hexa(m){if(m!==void 0)return new Color(m);const c=this.rgb().round().color;let de=Math.round(this.valpha*255).toString(16).toUpperCase();return de.length===1&&(de="0"+de),cs.to.hex(...c)+de},rgbNumber(){const m=this.rgb().color;return(m[0]&255)<<16|(m[1]&255)<<8|m[2]&255},luminosity(){const m=this.rgb().color,c=[];for(const[de,ye]of m.entries()){const ke=ye/255;c[de]=ke<=.04045?ke/12.92:((ke+.055)/1.055)**2.4}return .2126*c[0]+.7152*c[1]+.0722*c[2]},contrast(m){const c=this.luminosity(),de=m.luminosity();return c>de?(c+.05)/(de+.05):(de+.05)/(c+.05)},level(m){const c=this.contrast(m);return c>=7?"AAA":c>=4.5?"AA":""},isDark(){const m=this.rgb().color;return(m[0]*2126+m[1]*7152+m[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){const m=this.rgb();for(let c=0;c<3;c++)m.color[c]=255-m.color[c];return m},lighten(m){const c=this.hsl();return c.color[2]+=c.color[2]*m,c},darken(m){const c=this.hsl();return c.color[2]-=c.color[2]*m,c},saturate(m){const c=this.hsl();return c.color[1]+=c.color[1]*m,c},desaturate(m){const c=this.hsl();return c.color[1]-=c.color[1]*m,c},whiten(m){const c=this.hwb();return c.color[1]+=c.color[1]*m,c},blacken(m){const c=this.hwb();return c.color[2]+=c.color[2]*m,c},grayscale(){const m=this.rgb().color,c=m[0]*.3+m[1]*.59+m[2]*.11;return Color.rgb(c,c,c)},fade(m){return this.alpha(this.valpha-this.valpha*m)},opaquer(m){return this.alpha(this.valpha+this.valpha*m)},rotate(m){const c=this.hsl();let de=c.color[0];return de=(de+m)%360,de=de<0?360+de:de,c.color[0]=de,c},mix(m,c){if(!m||!m.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof m);const de=m.rgb(),ye=this.rgb(),ke=c===void 0?.5:c,xe=2*ke-1,Ze=de.alpha()-ye.alpha(),ie=((xe*Ze===-1?xe:(xe+Ze)/(1+xe*Ze))+1)/2,ii=1-ie;return Color.rgb(ie*de.red()+ii*ye.red(),ie*de.green()+ii*ye.green(),ie*de.blue()+ii*ye.blue(),de.alpha()*ke+ye.alpha()*(1-ke))}};for(const m of Object.keys(convert)){if(skippedModels.includes(m))continue;const{channels:c}=convert[m];Color.prototype[m]=function(...de){return this.model===m?new Color(this):de.length>0?new Color(de,m):new Color([...assertArray(convert[this.model][m].raw(this.color)),this.valpha],m)},Color[m]=function(...de){let ye=de[0];return typeof ye=="number"&&(ye=zeroArray(de,c)),new Color(ye,m)}}function roundTo(m,c){return Number(m.toFixed(c))}function roundToPlace(m){return function(c){return roundTo(c,m)}}function getset(m,c,de){m=Array.isArray(m)?m:[m];for(const ye of m)(limiters[ye]||=[])[c]=de;return m=m[0],function(ye){let ke;return ye!==void 0?(de&&(ye=de(ye)),ke=this[m](),ke.color[c]=ye,ke):(ke=this[m]().color[c],de&&(ke=de(ke)),ke)}}function maxfn(m){return function(c){return Math.max(0,Math.min(m,c))}}function assertArray(m){return Array.isArray(m)?m:[m]}function zeroArray(m,c){for(let de=0;de<c;de++)typeof m[de]!="number"&&(m[de]=0);return m}class BluepicEmbed extends EventTarget{element;studioResourcesBaseUrl=vue.ref("https://studio-resources.staging.bluepic.io");cloudflarePagesHostname=vue.ref("bluepic-core-sandbox.pages.dev");editorRef=vue.ref();templateId;data=vue.ref();serial=vue.ref();allowPanAndZoom=vue.ref(!1);darkmode=vue.ref(!0);ready=vue.ref(!1);displayMode=vue.ref("auto");bxCoreVersion=vue.ref("auto");publishedSlug=vue.ref("latest");theme=vue.ref();branding=vue.ref(!0);constructor(c,de,ye){if(super(),typeof c=="string"){const ke=document.querySelector(c);if(!ke||!(ke instanceof HTMLElement))throw new Error(`Element with selector "${c}" not found or not an HTMLElement`);this.element=ke}else if(c instanceof HTMLElement)this.element=c;else throw new Error("Invalid element or selector provided");this.init(),this.displayMode.value=ye?.displayMode??this.displayMode.value,this.darkmode.value=ye?.darkmode??this.darkmode.value,this.allowPanAndZoom.value=ye?.allowPanAndZoom??this.allowPanAndZoom.value,this.studioResourcesBaseUrl.value=ye?.studioResourcesBaseUrl??this.studioResourcesBaseUrl.value,this.cloudflarePagesHostname.value=ye?.cloudflarePagesHostname??this.cloudflarePagesHostname.value,this.bxCoreVersion.value=ye?.bxCoreVersion??this.bxCoreVersion.value,this.publishedSlug.value=ye?.publishedSlug??this.publishedSlug.value,this.theme.value=ye?.theme??this.theme.value,this.branding.value=ye?.branding??this.branding.value,this.templateId=vue.ref(de),this.data.value=ye?.initData??this.data.value,vue.watch(this.ready,(ke,xe)=>{if(ke&&!xe){const Ze=new CustomEvent("ready",{detail:{templateId:this.templateId.value,data:vue.unref(this.data.value)}});this.dispatchEvent(Ze)}}),vue.watch(this.data,()=>{const ke=new CustomEvent("data",{detail:{data:vue.unref(this.data.value)}});this.dispatchEvent(ke)},{deep:!0})}init(){const c=`bluepic-app-${nanoid()}`;this.element.innerHTML=`
2606
+ <div id="${c}" class="bluepic-app-wrapper" style="height: 100%;">
2607
2607
  <bluepic-embedded-editor
2608
2608
  ref="editorRef"
2609
2609
  :template-id="templateId"
@@ -2624,4 +2624,4 @@ list should be an Array.`),Qi.length===0)return new Di(0);if(Qi.length===1)retur
2624
2624
  :branding="branding"
2625
2625
  />
2626
2626
  </div>
2627
- `;const c=this;vue.nextTick(()=>{vue.createApp({components:{BluepicEmbeddedEditor},setup(){return vue.provide("darkmode",c.darkmode),{bridge:{async handleUpload({blob:ye,context:ke,width:xe,height:Ze,name:ie,onProgress:ii}){const{variants:di,filename:li,id:mi}=await uploadImage(c.templateId.value,ke,ye,ie,(Ai,Ci)=>{ii(Ai/Ci)}),Ei=di.find(Ai=>parseCloudflareImagesDeliveryUrl(Ai).variant==="public");if(!Ei)throw new Error("No public variant");return{width:xe,height:Ze,key:mi,name:li,src:Ei}}},editorRef:c.editorRef,theme:c.theme,allowPanAndZoom:c.allowPanAndZoom,darkmode:c.darkmode,templateId:c.templateId,studioResourcesBaseUrl:c.studioResourcesBaseUrl,cloudflarePagesHostname:c.cloudflarePagesHostname,data:c.data,serial:c.serial,ready:c.ready,displayMode:c.displayMode,bxCoreVersion:c.bxCoreVersion,publishedSlug:c.publishedSlug}}}).mount("#app")})}setVariable(c,de){this.data.value||(this.data.value={}),this.data.value[c]=de}setData(c,de=!1){if(de)this.data.value=c;else{this.data.value||(this.data.value={});for(const ye in c)this.setVariable(ye,c[ye])}}}async function getProjectWithRetries(m,c,de,ye,ke){let xe=0;for(;xe<de;){try{console.log(`\u{1F504} Versuch ${xe+1}/${de}: Hole Public Config...`);const Ze=await fetch(`https://embed-api-v2.bluepic.workers.dev/api/public/project?${new URLSearchParams({hostname:m,slug:c,env:ke})}`,{method:"GET"});return console.log(`\u2705 Erfolgreich nach ${xe+1} Versuchen`),await Ze.json()}catch(Ze){if(console.error(`\u274C Fehler bei Versuch ${xe+1}:`,Ze),xe<de-1)console.log(`\u23F3 Warte ${ye}ms vor erneutem Versuch...`),await new Promise(ie=>setTimeout(ie,ye));else throw console.error(`\u{1F6A8} Maximalanzahl von ${de} Versuchen erreicht. Abbruch.`),Ze}xe++}throw new Error("Unbekannter Fehler in getPublicConfigWithRetries")}window.addEventListener("load",async()=>{const m=document.querySelectorAll(".bluepic-embed");console.log("Auto-BluepicEmbed elements",m);for(const c of m){const de=c.getAttribute("data-embed-project-id"),ye=c.getAttribute("data-template-id"),ke=c.getAttribute("data-stripe-env")??"prod",xe=c.getAttribute("data-init-data"),Ze=c.getAttribute("data-studio-resources-base-url")??void 0,ie=c.getAttribute("data-cloudflare-pages-hostname")??void 0,ii=c.getAttribute("data-bx-core-version")??void 0,di=c.getAttribute("data-published-slug")??void 0,li=xe?JSON.parse(xe):void 0;if(de){const mi=await getProjectWithRetries("live.bluepic.io",de,3,2e3,ke);if(!mi){console.error("No embedProject found");continue}const Ei=Color(mi.config.backgroundColor).isDark(),Ai=new BluepicEmbed(c,mi.templates[0],{initData:li,displayMode:mi.config.layout,allowPanAndZoom:mi.config.allowPanAndZoom,studioResourcesBaseUrl:Ze,cloudflarePagesHostname:ie,bxCoreVersion:ii,publishedSlug:di,darkmode:Ei,theme:(()=>{if(mi.config.backgroundColor){const Ci=mi.config.backgroundColor,Bi=Ei?Color(Ci).darken(.1).hex():Color(Ci).lighten(.1).hex();return{fieldsViewBackgroundColor:Ci,editorViewBackgroundColor:Bi}}})(),branding:mi.isAllowedToDisableBranding?mi.config.bluepicBranding:!0});console.log("!",c,Ai)}else if(ye){const mi=c.getAttribute("data-display-mode"),Ei=c.getAttribute("data-allow-pan-and-zoom"),Ai=c.getAttribute("data-darkmode"),Ci=c.getAttribute("data-bx-core-version")??void 0,Bi=c.getAttribute("data-published-slug")??void 0,Di=c.getAttribute("data-theme"),Wi=xe?JSON.parse(xe):void 0,Oi=Di?JSON.parse(Di):void 0,Ui=Ei==="true",Gi=Ai==="true",or=mi==="mobile"?"mobile":mi==="stack"?"stack":"auto",rr=c.getAttribute("data-branding")==="false",cr=new BluepicEmbed(c,ye,{initData:Wi,displayMode:or,allowPanAndZoom:Ui,darkmode:Gi,studioResourcesBaseUrl:Ze,cloudflarePagesHostname:ie,bxCoreVersion:Ci,publishedSlug:Bi,theme:Oi,branding:rr});console.log("!",c,cr)}}});const GLOBAL_APP_WRAPPER_CLASS="bluepic-app-wrapper",GLOBAL_APP_WRAPPER_SELECTOR=`.${GLOBAL_APP_WRAPPER_CLASS}`;window.bluepicPopupProvider=new BluepicPopupProvider;function haha(){console.log("haha")}exports.AdjustImage=AdjustImage,exports.BluepicBatchEditor=BluepicBatchEditor,exports.BluepicEmbed=BluepicEmbed,exports.BluepicEmbedded=BluepicEmbedded,exports.BluepicEmbeddedEditor=BluepicEmbeddedEditor,exports.BluepicFieldComponents=BluepciFieldComponents,exports.BluepicSpinner=BluepicSpinner,exports.BxAvatar=BxAvatar,exports.BxButton=BxButton,exports.BxCard=BxCard,exports.BxCheckbox=BxCheckbox,exports.BxColorPicker=BxColorPicker,exports.BxDropdown=BxDropdown,exports.BxFields=_sfc_main$p,exports.BxIcon=BxIcon,exports.BxInput=BxInput,exports.BxList=BxList,exports.BxListItem=BxListItem,exports.BxMenu=BxMenu,exports.BxPopover=BxPopover,exports.BxPopup=_sfc_main$17,exports.BxRadio=BxRadio,exports.BxRadioGroup=BxRadioGroup,exports.BxSelect=BxSelect,exports.BxSlider=BxSlider,exports.BxSpin=BxSpin,exports.BxSwitch=BxSwitch,exports.BxTab=BxTab,exports.BxTabs=BxTabs,exports.BxTag=BxTag,exports.BxTooltip=BxTooltip,exports.BxUserMenu=BxUserMenu,exports.GLOBAL_APP_WRAPPER_CLASS=GLOBAL_APP_WRAPPER_CLASS,exports.GLOBAL_APP_WRAPPER_SELECTOR=GLOBAL_APP_WRAPPER_SELECTOR,exports.MapboxMap=MapboxMap,exports.SlidesNavigation=SlidesNavigation,exports.applyColorMatricesToImage=applyColorMatricesToImage,exports.applyColorMatrix=applyColorMatrix,exports.applyColorMatrixToColor=applyColorMatrixToColor,exports.convertDeprecatedField=convertDeprecatedField,exports.createMessage=createMessage,exports.createPopup=createPopup,exports.cropImage=cropImage,exports.cropToVisibleBBox=cropToVisibleBBox,exports.getDefaultValueForFieldModel=getDefaultValueForFieldModel,exports.getTemplateLiveUrl=getTemplateLiveUrl,exports.getTemplateSerialUrl=getTemplateSerialUrl,exports.getVisibleBBox=getVisibleBBox,exports.groupFeatureByLinebreaks=groupFeatureByLinebreaks$1,exports.haha=haha,exports.normalizeAdjust=normalizeAdjust,exports.normalizeCrop=normalizeCrop,exports.rasterize=rasterize,exports.realizeField=realizeField,exports.renderFieldIcon=renderFieldIcon,exports.renderSVG=renderSVG,exports.stringifyField=stringifyField,exports.ungroupFeaturesDividedByLinebreaks=ungroupFeaturesDividedByLinebreaks,exports.waitUntil=waitUntil,Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
2627
+ `;const de=this;vue.nextTick(()=>{vue.createApp({components:{BluepicEmbeddedEditor},setup(){return vue.provide("darkmode",de.darkmode),{bridge:{async handleUpload({blob:ke,context:xe,width:Ze,height:ie,name:ii,onProgress:di}){const{variants:li,filename:mi,id:Ei}=await uploadImage(de.templateId.value,xe,ke,ii,(Ci,Bi)=>{di(Ci/Bi)}),Ai=li.find(Ci=>parseCloudflareImagesDeliveryUrl(Ci).variant==="public");if(!Ai)throw new Error("No public variant");return{width:Ze,height:ie,key:Ei,name:mi,src:Ai}}},editorRef:de.editorRef,theme:de.theme,allowPanAndZoom:de.allowPanAndZoom,darkmode:de.darkmode,templateId:de.templateId,studioResourcesBaseUrl:de.studioResourcesBaseUrl,cloudflarePagesHostname:de.cloudflarePagesHostname,data:de.data,serial:de.serial,ready:de.ready,displayMode:de.displayMode,bxCoreVersion:de.bxCoreVersion,publishedSlug:de.publishedSlug}}}).mount(`#${c}`)})}setVariable(c,de){this.data.value||(this.data.value={}),this.data.value[c]=de}setData(c,de=!1){if(de)this.data.value=c;else{this.data.value||(this.data.value={});for(const ye in c)this.setVariable(ye,c[ye])}}}async function getProjectWithRetries(m,c,de,ye,ke){let xe=0;for(;xe<de;){try{console.log(`\u{1F504} Versuch ${xe+1}/${de}: Hole Public Config...`);const Ze=await fetch(`https://embed-api-v2.bluepic.workers.dev/api/public/project?${new URLSearchParams({hostname:m,slug:c,env:ke})}`,{method:"GET"});return console.log(`\u2705 Erfolgreich nach ${xe+1} Versuchen`),await Ze.json()}catch(Ze){if(console.error(`\u274C Fehler bei Versuch ${xe+1}:`,Ze),xe<de-1)console.log(`\u23F3 Warte ${ye}ms vor erneutem Versuch...`),await new Promise(ie=>setTimeout(ie,ye));else throw console.error(`\u{1F6A8} Maximalanzahl von ${de} Versuchen erreicht. Abbruch.`),Ze}xe++}throw new Error("Unbekannter Fehler in getPublicConfigWithRetries")}window.addEventListener("load",async()=>{const m=document.querySelectorAll(".bluepic-embed");console.log("Auto-BluepicEmbed elements",m);for(const c of m){const de=c.getAttribute("data-embed-project-id"),ye=c.getAttribute("data-template-id"),ke=c.getAttribute("data-stripe-env")??"prod",xe=c.getAttribute("data-init-data"),Ze=c.getAttribute("data-studio-resources-base-url")??void 0,ie=c.getAttribute("data-cloudflare-pages-hostname")??void 0,ii=c.getAttribute("data-bx-core-version")??void 0,di=c.getAttribute("data-published-slug")??void 0,li=xe?JSON.parse(xe):void 0;if(de){const mi=await getProjectWithRetries("live.bluepic.io",de,3,2e3,ke);if(!mi){console.error("No embedProject found");continue}const Ei=Color(mi.config.backgroundColor).isDark(),Ai=new BluepicEmbed(c,mi.templates[0],{initData:li,displayMode:mi.config.layout,allowPanAndZoom:mi.config.allowPanAndZoom,studioResourcesBaseUrl:Ze,cloudflarePagesHostname:ie,bxCoreVersion:ii,publishedSlug:di,darkmode:Ei,theme:(()=>{if(mi.config.backgroundColor){const Ci=mi.config.backgroundColor,Bi=Ei?Color(Ci).darken(.1).hex():Color(Ci).lighten(.1).hex();return{fieldsViewBackgroundColor:Ci,editorViewBackgroundColor:Bi}}})(),branding:mi.isAllowedToDisableBranding?mi.config.bluepicBranding:!0});console.log("!",c,Ai)}else if(ye){const mi=c.getAttribute("data-display-mode"),Ei=c.getAttribute("data-allow-pan-and-zoom"),Ai=c.getAttribute("data-darkmode"),Ci=c.getAttribute("data-bx-core-version")??void 0,Bi=c.getAttribute("data-published-slug")??void 0,Di=c.getAttribute("data-theme"),Wi=xe?JSON.parse(xe):void 0,Oi=Di?JSON.parse(Di):void 0,Ui=Ei==="true",Gi=Ai==="true",or=mi==="mobile"?"mobile":mi==="stack"?"stack":"auto",rr=c.getAttribute("data-branding")==="false",cr=new BluepicEmbed(c,ye,{initData:Wi,displayMode:or,allowPanAndZoom:Ui,darkmode:Gi,studioResourcesBaseUrl:Ze,cloudflarePagesHostname:ie,bxCoreVersion:Ci,publishedSlug:Bi,theme:Oi,branding:rr});console.log("!",c,cr)}}});const GLOBAL_APP_WRAPPER_CLASS="bluepic-app-wrapper",GLOBAL_APP_WRAPPER_SELECTOR=`.${GLOBAL_APP_WRAPPER_CLASS}`;window.bluepicPopupProvider=new BluepicPopupProvider;function haha(){console.log("haha")}exports.AdjustImage=AdjustImage,exports.BluepicBatchEditor=BluepicBatchEditor,exports.BluepicEmbed=BluepicEmbed,exports.BluepicEmbedded=BluepicEmbedded,exports.BluepicEmbeddedEditor=BluepicEmbeddedEditor,exports.BluepicFieldComponents=BluepciFieldComponents,exports.BluepicSpinner=BluepicSpinner,exports.BxAvatar=BxAvatar,exports.BxButton=BxButton,exports.BxCard=BxCard,exports.BxCheckbox=BxCheckbox,exports.BxColorPicker=BxColorPicker,exports.BxDropdown=BxDropdown,exports.BxFields=_sfc_main$p,exports.BxIcon=BxIcon,exports.BxInput=BxInput,exports.BxList=BxList,exports.BxListItem=BxListItem,exports.BxMenu=BxMenu,exports.BxPopover=BxPopover,exports.BxPopup=_sfc_main$17,exports.BxRadio=BxRadio,exports.BxRadioGroup=BxRadioGroup,exports.BxSelect=BxSelect,exports.BxSlider=BxSlider,exports.BxSpin=BxSpin,exports.BxSwitch=BxSwitch,exports.BxTab=BxTab,exports.BxTabs=BxTabs,exports.BxTag=BxTag,exports.BxTooltip=BxTooltip,exports.BxUserMenu=BxUserMenu,exports.GLOBAL_APP_WRAPPER_CLASS=GLOBAL_APP_WRAPPER_CLASS,exports.GLOBAL_APP_WRAPPER_SELECTOR=GLOBAL_APP_WRAPPER_SELECTOR,exports.MapboxMap=MapboxMap,exports.SlidesNavigation=SlidesNavigation,exports.applyColorMatricesToImage=applyColorMatricesToImage,exports.applyColorMatrix=applyColorMatrix,exports.applyColorMatrixToColor=applyColorMatrixToColor,exports.convertDeprecatedField=convertDeprecatedField,exports.createMessage=createMessage,exports.createPopup=createPopup,exports.cropImage=cropImage,exports.cropToVisibleBBox=cropToVisibleBBox,exports.getDefaultValueForFieldModel=getDefaultValueForFieldModel,exports.getTemplateLiveUrl=getTemplateLiveUrl,exports.getTemplateSerialUrl=getTemplateSerialUrl,exports.getVisibleBBox=getVisibleBBox,exports.groupFeatureByLinebreaks=groupFeatureByLinebreaks$1,exports.haha=haha,exports.normalizeAdjust=normalizeAdjust,exports.normalizeCrop=normalizeCrop,exports.rasterize=rasterize,exports.realizeField=realizeField,exports.renderFieldIcon=renderFieldIcon,exports.renderSVG=renderSVG,exports.stringifyField=stringifyField,exports.ungroupFeaturesDividedByLinebreaks=ungroupFeaturesDividedByLinebreaks,exports.waitUntil=waitUntil,Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bluepic/embed",
3
3
  "private": false,
4
- "version": "0.1.36",
4
+ "version": "0.1.38",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "package.json",