@cubejs-backend/server-core 0.33.57 → 0.33.58

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/dist/src/core/optionsValidate.js +1 -1
  2. package/dist/src/core/optionsValidate.js.map +1 -1
  3. package/package.json +6 -6
  4. package/playground/assets/{CachePane.1cf63398.js → CachePane.548970b8.js} +1 -1
  5. package/playground/assets/{GraphiQLSandbox.76cdc358.js → GraphiQLSandbox.ddacb292.js} +2 -2
  6. package/playground/assets/{SchemaReference.64c1dd5c.js → SchemaReference.ffa27894.js} +1 -1
  7. package/playground/assets/{SqlQueryTab.f5501cee.js → SqlQueryTab.b46c1670.js} +1 -1
  8. package/playground/assets/{brace-fold.fd9774c5.js → brace-fold.c566857c.js} +1 -1
  9. package/playground/assets/{closebrackets.ff57a9c7.js → closebrackets.0b0c6f53.js} +1 -1
  10. package/playground/assets/{codemirror.11533b4b.js → codemirror.2a5f1abe.js} +1 -1
  11. package/playground/assets/{comment.76af6c7e.js → comment.12c87967.js} +1 -1
  12. package/playground/assets/{dialog.72370f3b.js → dialog.050edb65.js} +1 -1
  13. package/playground/assets/{dialog.7221d0b6.js → dialog.63f8c2de.js} +1 -1
  14. package/playground/assets/{foldgutter.8a38fe39.js → foldgutter.5381e4dc.js} +1 -1
  15. package/playground/assets/{hint.4e36fe21.js → hint.4b884fa5.js} +1 -1
  16. package/playground/assets/{hint.9b78c58d.js → hint.9e073359.js} +1 -1
  17. package/playground/assets/{index.dd7ba2ee.js → index.a5394c23.js} +1 -1
  18. package/playground/assets/{index.6c1b8bbf.js → index.acec7836.js} +2 -2
  19. package/playground/assets/{index.a5d082eb.js → index.ce440862.js} +1 -1
  20. package/playground/assets/{info-addon.2de7b9e6.js → info-addon.119b3948.js} +1 -1
  21. package/playground/assets/{info.c7ecc9ad.js → info.605ffd1c.js} +1 -1
  22. package/playground/assets/{javascript.d6a5a378.js → javascript.42d64c49.js} +1 -1
  23. package/playground/assets/{jump-to-line.f4e61d28.js → jump-to-line.a6276322.js} +1 -1
  24. package/playground/assets/{jump.dd638b2d.js → jump.6610f958.js} +1 -1
  25. package/playground/assets/{lint.3604e1d5.js → lint.6a8d9dd0.js} +1 -1
  26. package/playground/assets/{lint.5d42946d.js → lint.c5f66526.js} +1 -1
  27. package/playground/assets/{lint.cbe5bd3e.js → lint.d680b2f4.js} +1 -1
  28. package/playground/assets/{matchbrackets.089f10bd.js → matchbrackets.176d14be.js} +1 -1
  29. package/playground/assets/{matchbrackets.34ad88dc.js → matchbrackets.7d52f360.js} +1 -1
  30. package/playground/assets/{mode.7edc14e4.js → mode.354068be.js} +1 -1
  31. package/playground/assets/{mode.b1c14a94.js → mode.4f5efc13.js} +1 -1
  32. package/playground/assets/{mode.20457d0f.js → mode.d545fa2a.js} +1 -1
  33. package/playground/assets/{search.e9a68413.js → search.13d7960e.js} +1 -1
  34. package/playground/assets/{searchcursor.da23250b.js → searchcursor.af9c1341.js} +1 -1
  35. package/playground/assets/{searchcursor.b15988c1.js → searchcursor.b321c9d3.js} +1 -1
  36. package/playground/assets/{show-hint.632a43c1.js → show-hint.18f8a154.js} +1 -1
  37. package/playground/assets/{sublime.386bc077.js → sublime.aed02094.js} +1 -1
  38. package/playground/index.html +1 -1
@@ -253,7 +253,7 @@ object-assign
253
253
  `:""}function margin(s){const j=s.margin;if(typeof j=="string")return j;if(typeof j=="number")return`${j*STEP}px`;if(Array.isArray(j)){const{length:et}=j;if(et===2){const[tt,rt]=j;return`${tt*STEP}px ${rt*STEP}px`}else if(et>2)return j.fill(0,0,4).map(tt=>`${tt*STEP}`).join(" ")}return j&&Object.keys(j||{}).length?Object.entries(j).map(([et,tt])=>{if(et==="top")return`${margin({margin:tt})} 0 0 0`;if(et==="bottom")return`0 0 ${margin({margin:tt})} 0`}):null}const Box=styled.div`
254
254
  align-self: ${s=>s.align};
255
255
  flex-grow: ${s=>s.grow};
256
- `,AppContext$1=react.exports.createContext({});function AppContextProvider({children:s,...j}){const[et,tt]=react.exports.useState(j||null),rt=react.exports.useCallback(nt=>{tt(at=>({...at,...nt,playgroundContext:{...at==null?void 0:at.playgroundContext,...nt==null?void 0:nt.playgroundContext}}))},[]);return jsx(AppContext$1.Provider,{value:{apiUrl:null,schemaVersion:0,ready:!1,...et,token:(et==null?void 0:et.token)||null,playgroundContext:(et==null?void 0:et.playgroundContext)||{},setContext:rt},children:s})}function AppContextConsumer({onReady:s}){const j=useAppContext();return react.exports.useEffect(()=>{s(j)},[j]),null}function useAppContext(){return react.exports.useContext(AppContext$1)}function usePlaygroundContext(){const{playgroundContext:s}=useAppContext();return s}function useToken(){const{token:s}=useAppContext();return s}var getRandomValues,rnds8=new Uint8Array(16);function rng(){if(!getRandomValues&&(getRandomValues=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!getRandomValues))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return getRandomValues(rnds8)}const REGEX=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function validate(s){return typeof s=="string"&&REGEX.test(s)}var byteToHex=[];for(var i$1=0;i$1<256;++i$1)byteToHex.push((i$1+256).toString(16).substr(1));function stringify(s){var j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,et=(byteToHex[s[j+0]]+byteToHex[s[j+1]]+byteToHex[s[j+2]]+byteToHex[s[j+3]]+"-"+byteToHex[s[j+4]]+byteToHex[s[j+5]]+"-"+byteToHex[s[j+6]]+byteToHex[s[j+7]]+"-"+byteToHex[s[j+8]]+byteToHex[s[j+9]]+"-"+byteToHex[s[j+10]]+byteToHex[s[j+11]]+byteToHex[s[j+12]]+byteToHex[s[j+13]]+byteToHex[s[j+14]]+byteToHex[s[j+15]]).toLowerCase();if(!validate(et))throw TypeError("Stringified UUID is invalid");return et}function v4(s,j,et){s=s||{};var tt=s.random||(s.rng||rng)();if(tt[6]=tt[6]&15|64,tt[8]=tt[8]&63|128,j){et=et||0;for(var rt=0;rt<16;++rt)j[et+rt]=tt[rt];return j}return stringify(tt)}var dayjs_min={exports:{}};(function(s,j){(function(et,tt){s.exports=tt()})(commonjsGlobal$1,function(){var et=1e3,tt=6e4,rt=36e5,nt="millisecond",at="second",it="minute",ot="hour",st="day",lt="week",ct="month",ut="quarter",dt="year",ft="date",vt="Invalid Date",mt=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,pt=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,ht={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},gt=function(Tt,wt,Et){var Dt=String(Tt);return!Dt||Dt.length>=wt?Tt:""+Array(wt+1-Dt.length).join(Et)+Tt},yt={s:gt,z:function(Tt){var wt=-Tt.utcOffset(),Et=Math.abs(wt),Dt=Math.floor(Et/60),jt=Et%60;return(wt<=0?"+":"-")+gt(Dt,2,"0")+":"+gt(jt,2,"0")},m:function Tt(wt,Et){if(wt.date()<Et.date())return-Tt(Et,wt);var Dt=12*(Et.year()-wt.year())+(Et.month()-wt.month()),jt=wt.clone().add(Dt,ct),Rt=Et-jt<0,At=wt.clone().add(Dt+(Rt?-1:1),ct);return+(-(Dt+(Et-jt)/(Rt?jt-At:At-jt))||0)},a:function(Tt){return Tt<0?Math.ceil(Tt)||0:Math.floor(Tt)},p:function(Tt){return{M:ct,y:dt,w:lt,d:st,D:ft,h:ot,m:it,s:at,ms:nt,Q:ut}[Tt]||String(Tt||"").toLowerCase().replace(/s$/,"")},u:function(Tt){return Tt===void 0}},xt="en",Ct={};Ct[xt]=ht;var St=function(Tt){return Tt instanceof Pt},bt=function(Tt,wt,Et){var Dt;if(!Tt)return xt;if(typeof Tt=="string")Ct[Tt]&&(Dt=Tt),wt&&(Ct[Tt]=wt,Dt=Tt);else{var jt=Tt.name;Ct[jt]=Tt,Dt=jt}return!Et&&Dt&&(xt=Dt),Dt||!Et&&xt},$t=function(Tt,wt){if(St(Tt))return Tt.clone();var Et=typeof wt=="object"?wt:{};return Et.date=Tt,Et.args=arguments,new Pt(Et)},Ot=yt;Ot.l=bt,Ot.i=St,Ot.w=function(Tt,wt){return $t(Tt,{locale:wt.$L,utc:wt.$u,x:wt.$x,$offset:wt.$offset})};var Pt=function(){function Tt(Et){this.$L=bt(Et.locale,null,!0),this.parse(Et)}var wt=Tt.prototype;return wt.parse=function(Et){this.$d=function(Dt){var jt=Dt.date,Rt=Dt.utc;if(jt===null)return new Date(NaN);if(Ot.u(jt))return new Date;if(jt instanceof Date)return new Date(jt);if(typeof jt=="string"&&!/Z$/i.test(jt)){var At=jt.match(mt);if(At){var It=At[2]-1||0,kt=(At[7]||"0").substring(0,3);return Rt?new Date(Date.UTC(At[1],It,At[3]||1,At[4]||0,At[5]||0,At[6]||0,kt)):new Date(At[1],It,At[3]||1,At[4]||0,At[5]||0,At[6]||0,kt)}}return new Date(jt)}(Et),this.$x=Et.x||{},this.init()},wt.init=function(){var Et=this.$d;this.$y=Et.getFullYear(),this.$M=Et.getMonth(),this.$D=Et.getDate(),this.$W=Et.getDay(),this.$H=Et.getHours(),this.$m=Et.getMinutes(),this.$s=Et.getSeconds(),this.$ms=Et.getMilliseconds()},wt.$utils=function(){return Ot},wt.isValid=function(){return this.$d.toString()!==vt},wt.isSame=function(Et,Dt){var jt=$t(Et);return this.startOf(Dt)<=jt&&jt<=this.endOf(Dt)},wt.isAfter=function(Et,Dt){return $t(Et)<this.startOf(Dt)},wt.isBefore=function(Et,Dt){return this.endOf(Dt)<$t(Et)},wt.$g=function(Et,Dt,jt){return Ot.u(Et)?this[Dt]:this.set(jt,Et)},wt.unix=function(){return Math.floor(this.valueOf()/1e3)},wt.valueOf=function(){return this.$d.getTime()},wt.startOf=function(Et,Dt){var jt=this,Rt=!!Ot.u(Dt)||Dt,At=Ot.p(Et),It=function(Ut,Vt){var zt=Ot.w(jt.$u?Date.UTC(jt.$y,Vt,Ut):new Date(jt.$y,Vt,Ut),jt);return Rt?zt:zt.endOf(st)},kt=function(Ut,Vt){return Ot.w(jt.toDate()[Ut].apply(jt.toDate("s"),(Rt?[0,0,0,0]:[23,59,59,999]).slice(Vt)),jt)},_t=this.$W,Mt=this.$M,Ft=this.$D,qt="set"+(this.$u?"UTC":"");switch(At){case dt:return Rt?It(1,0):It(31,11);case ct:return Rt?It(1,Mt):It(0,Mt+1);case lt:var Lt=this.$locale().weekStart||0,Bt=(_t<Lt?_t+7:_t)-Lt;return It(Rt?Ft-Bt:Ft+(6-Bt),Mt);case st:case ft:return kt(qt+"Hours",0);case ot:return kt(qt+"Minutes",1);case it:return kt(qt+"Seconds",2);case at:return kt(qt+"Milliseconds",3);default:return this.clone()}},wt.endOf=function(Et){return this.startOf(Et,!1)},wt.$set=function(Et,Dt){var jt,Rt=Ot.p(Et),At="set"+(this.$u?"UTC":""),It=(jt={},jt[st]=At+"Date",jt[ft]=At+"Date",jt[ct]=At+"Month",jt[dt]=At+"FullYear",jt[ot]=At+"Hours",jt[it]=At+"Minutes",jt[at]=At+"Seconds",jt[nt]=At+"Milliseconds",jt)[Rt],kt=Rt===st?this.$D+(Dt-this.$W):Dt;if(Rt===ct||Rt===dt){var _t=this.clone().set(ft,1);_t.$d[It](kt),_t.init(),this.$d=_t.set(ft,Math.min(this.$D,_t.daysInMonth())).$d}else It&&this.$d[It](kt);return this.init(),this},wt.set=function(Et,Dt){return this.clone().$set(Et,Dt)},wt.get=function(Et){return this[Ot.p(Et)]()},wt.add=function(Et,Dt){var jt,Rt=this;Et=Number(Et);var At=Ot.p(Dt),It=function(Mt){var Ft=$t(Rt);return Ot.w(Ft.date(Ft.date()+Math.round(Mt*Et)),Rt)};if(At===ct)return this.set(ct,this.$M+Et);if(At===dt)return this.set(dt,this.$y+Et);if(At===st)return It(1);if(At===lt)return It(7);var kt=(jt={},jt[it]=tt,jt[ot]=rt,jt[at]=et,jt)[At]||1,_t=this.$d.getTime()+Et*kt;return Ot.w(_t,this)},wt.subtract=function(Et,Dt){return this.add(-1*Et,Dt)},wt.format=function(Et){var Dt=this,jt=this.$locale();if(!this.isValid())return jt.invalidDate||vt;var Rt=Et||"YYYY-MM-DDTHH:mm:ssZ",At=Ot.z(this),It=this.$H,kt=this.$m,_t=this.$M,Mt=jt.weekdays,Ft=jt.months,qt=function(Vt,zt,Kt,Wt){return Vt&&(Vt[zt]||Vt(Dt,Rt))||Kt[zt].substr(0,Wt)},Lt=function(Vt){return Ot.s(It%12||12,Vt,"0")},Bt=jt.meridiem||function(Vt,zt,Kt){var Wt=Vt<12?"AM":"PM";return Kt?Wt.toLowerCase():Wt},Ut={YY:String(this.$y).slice(-2),YYYY:this.$y,M:_t+1,MM:Ot.s(_t+1,2,"0"),MMM:qt(jt.monthsShort,_t,Ft,3),MMMM:qt(Ft,_t),D:this.$D,DD:Ot.s(this.$D,2,"0"),d:String(this.$W),dd:qt(jt.weekdaysMin,this.$W,Mt,2),ddd:qt(jt.weekdaysShort,this.$W,Mt,3),dddd:Mt[this.$W],H:String(It),HH:Ot.s(It,2,"0"),h:Lt(1),hh:Lt(2),a:Bt(It,kt,!0),A:Bt(It,kt,!1),m:String(kt),mm:Ot.s(kt,2,"0"),s:String(this.$s),ss:Ot.s(this.$s,2,"0"),SSS:Ot.s(this.$ms,3,"0"),Z:At};return Rt.replace(pt,function(Vt,zt){return zt||Ut[Vt]||At.replace(":","")})},wt.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},wt.diff=function(Et,Dt,jt){var Rt,At=Ot.p(Dt),It=$t(Et),kt=(It.utcOffset()-this.utcOffset())*tt,_t=this-It,Mt=Ot.m(this,It);return Mt=(Rt={},Rt[dt]=Mt/12,Rt[ct]=Mt,Rt[ut]=Mt/3,Rt[lt]=(_t-kt)/6048e5,Rt[st]=(_t-kt)/864e5,Rt[ot]=_t/rt,Rt[it]=_t/tt,Rt[at]=_t/et,Rt)[At]||_t,jt?Mt:Ot.a(Mt)},wt.daysInMonth=function(){return this.endOf(ct).$D},wt.$locale=function(){return Ct[this.$L]},wt.locale=function(Et,Dt){if(!Et)return this.$L;var jt=this.clone(),Rt=bt(Et,Dt,!0);return Rt&&(jt.$L=Rt),jt},wt.clone=function(){return Ot.w(this.$d,this)},wt.toDate=function(){return new Date(this.valueOf())},wt.toJSON=function(){return this.isValid()?this.toISOString():null},wt.toISOString=function(){return this.$d.toISOString()},wt.toString=function(){return this.$d.toUTCString()},Tt}(),Nt=Pt.prototype;return $t.prototype=Nt,[["$ms",nt],["$s",at],["$m",it],["$H",ot],["$W",st],["$M",ct],["$y",dt],["$D",ft]].forEach(function(Tt){Nt[Tt[1]]=function(wt){return this.$g(wt,Tt[0],Tt[1])}}),$t.extend=function(Tt,wt){return Tt.$i||(Tt(wt,Pt,$t),Tt.$i=!0),$t},$t.locale=bt,$t.isDayjs=St,$t.unix=function(Tt){return $t(1e3*Tt)},$t.en=Ct[xt],$t.Ls=Ct,$t.p={},$t})})(dayjs_min);const dayjs=dayjs_min.exports;var quarterOfYear$1={exports:{}};(function(s,j){(function(et,tt){s.exports=tt()})(commonjsGlobal$1,function(){var et="month",tt="quarter";return function(rt,nt){var at=nt.prototype;at.quarter=function(st){return this.$utils().u(st)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(st-1))};var it=at.add;at.add=function(st,lt){return st=Number(st),this.$utils().p(lt)===tt?this.add(3*st,et):it.bind(this)(st,lt)};var ot=at.startOf;at.startOf=function(st,lt){var ct=this.$utils(),ut=!!ct.u(lt)||lt;if(ct.p(st)===tt){var dt=this.quarter()-1;return ut?this.month(3*dt).startOf(et).startOf("day"):this.month(3*dt+2).endOf(et).endOf("day")}return ot.bind(this)(st,lt)}}})})(quarterOfYear$1);const quarterOfYear=quarterOfYear$1.exports;var en$1={exports:{}};(function(s,j){(function(et,tt){s.exports=tt()})(commonjsGlobal$1,function(){return{name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")}})})(en$1);const en=en$1.exports;function _isPlaceholder$1(s){return s!=null&&typeof s=="object"&&s["@@functional/placeholder"]===!0}function _curry1$1(s){return function j(et){return arguments.length===0||_isPlaceholder$1(et)?j:s.apply(this,arguments)}}function _curry2$1(s){return function j(et,tt){switch(arguments.length){case 0:return j;case 1:return _isPlaceholder$1(et)?j:_curry1$1(function(rt){return s(et,rt)});default:return _isPlaceholder$1(et)&&_isPlaceholder$1(tt)?j:_isPlaceholder$1(et)?_curry1$1(function(rt){return s(rt,tt)}):_isPlaceholder$1(tt)?_curry1$1(function(rt){return s(et,rt)}):s(et,tt)}}}function _arity$1(s,j){switch(s){case 0:return function(){return j.apply(this,arguments)};case 1:return function(et){return j.apply(this,arguments)};case 2:return function(et,tt){return j.apply(this,arguments)};case 3:return function(et,tt,rt){return j.apply(this,arguments)};case 4:return function(et,tt,rt,nt){return j.apply(this,arguments)};case 5:return function(et,tt,rt,nt,at){return j.apply(this,arguments)};case 6:return function(et,tt,rt,nt,at,it){return j.apply(this,arguments)};case 7:return function(et,tt,rt,nt,at,it,ot){return j.apply(this,arguments)};case 8:return function(et,tt,rt,nt,at,it,ot,st){return j.apply(this,arguments)};case 9:return function(et,tt,rt,nt,at,it,ot,st,lt){return j.apply(this,arguments)};case 10:return function(et,tt,rt,nt,at,it,ot,st,lt,ct){return j.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}function _curryN$1(s,j,et){return function(){for(var tt=[],rt=0,nt=s,at=0;at<j.length||rt<arguments.length;){var it;at<j.length&&(!_isPlaceholder$1(j[at])||rt>=arguments.length)?it=j[at]:(it=arguments[rt],rt+=1),tt[at]=it,_isPlaceholder$1(it)||(nt-=1),at+=1}return nt<=0?et.apply(this,tt):_arity$1(nt,_curryN$1(s,tt,et))}}var curryN=_curry2$1(function(j,et){return j===1?_curry1$1(et):_arity$1(j,_curryN$1(j,[],et))});const curryN$1=curryN;function _curry3(s){return function j(et,tt,rt){switch(arguments.length){case 0:return j;case 1:return _isPlaceholder$1(et)?j:_curry2$1(function(nt,at){return s(et,nt,at)});case 2:return _isPlaceholder$1(et)&&_isPlaceholder$1(tt)?j:_isPlaceholder$1(et)?_curry2$1(function(nt,at){return s(nt,tt,at)}):_isPlaceholder$1(tt)?_curry2$1(function(nt,at){return s(et,nt,at)}):_curry1$1(function(nt){return s(et,tt,nt)});default:return _isPlaceholder$1(et)&&_isPlaceholder$1(tt)&&_isPlaceholder$1(rt)?j:_isPlaceholder$1(et)&&_isPlaceholder$1(tt)?_curry2$1(function(nt,at){return s(nt,at,rt)}):_isPlaceholder$1(et)&&_isPlaceholder$1(rt)?_curry2$1(function(nt,at){return s(nt,tt,at)}):_isPlaceholder$1(tt)&&_isPlaceholder$1(rt)?_curry2$1(function(nt,at){return s(et,nt,at)}):_isPlaceholder$1(et)?_curry1$1(function(nt){return s(nt,tt,rt)}):_isPlaceholder$1(tt)?_curry1$1(function(nt){return s(et,nt,rt)}):_isPlaceholder$1(rt)?_curry1$1(function(nt){return s(et,tt,nt)}):s(et,tt,rt)}}}const _isArray$1=Array.isArray||function(j){return j!=null&&j.length>=0&&Object.prototype.toString.call(j)==="[object Array]"};function _isTransformer$1(s){return s!=null&&typeof s["@@transducer/step"]=="function"}function _dispatchable$1(s,j,et){return function(){if(arguments.length===0)return et();var tt=Array.prototype.slice.call(arguments,0),rt=tt.pop();if(!_isArray$1(rt)){for(var nt=0;nt<s.length;){if(typeof rt[s[nt]]=="function")return rt[s[nt]].apply(rt,tt);nt+=1}if(_isTransformer$1(rt)){var at=j.apply(null,tt);return at(rt)}}return et.apply(this,arguments)}}function _reduced(s){return s&&s["@@transducer/reduced"]?s:{"@@transducer/value":s,"@@transducer/reduced":!0}}const _xfBase$1={init:function(){return this.xf["@@transducer/init"]()},result:function(s){return this.xf["@@transducer/result"](s)}};function _map(s,j){for(var et=0,tt=j.length,rt=Array(tt);et<tt;)rt[et]=s(j[et]),et+=1;return rt}function _isString$1(s){return Object.prototype.toString.call(s)==="[object String]"}var _isArrayLike$2=_curry1$1(function(j){return _isArray$1(j)?!0:!j||typeof j!="object"||_isString$1(j)?!1:j.nodeType===1?!!j.length:j.length===0?!0:j.length>0?j.hasOwnProperty(0)&&j.hasOwnProperty(j.length-1):!1});const _isArrayLike$3=_isArrayLike$2;var XWrap$1=function(){function s(j){this.f=j}return s.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},s.prototype["@@transducer/result"]=function(j){return j},s.prototype["@@transducer/step"]=function(j,et){return this.f(j,et)},s}();function _xwrap$1(s){return new XWrap$1(s)}var bind$2=_curry2$1(function(j,et){return _arity$1(j.length,function(){return j.apply(et,arguments)})});const bind$3=bind$2;function _arrayReduce$1(s,j,et){for(var tt=0,rt=et.length;tt<rt;){if(j=s["@@transducer/step"](j,et[tt]),j&&j["@@transducer/reduced"]){j=j["@@transducer/value"];break}tt+=1}return s["@@transducer/result"](j)}function _iterableReduce$1(s,j,et){for(var tt=et.next();!tt.done;){if(j=s["@@transducer/step"](j,tt.value),j&&j["@@transducer/reduced"]){j=j["@@transducer/value"];break}tt=et.next()}return s["@@transducer/result"](j)}function _methodReduce$1(s,j,et,tt){return s["@@transducer/result"](et[tt](bind$3(s["@@transducer/step"],s),j))}var symIterator$1=typeof Symbol!="undefined"?Symbol.iterator:"@@iterator";function _reduce$1(s,j,et){if(typeof s=="function"&&(s=_xwrap$1(s)),_isArrayLike$3(et))return _arrayReduce$1(s,j,et);if(typeof et["fantasy-land/reduce"]=="function")return _methodReduce$1(s,j,et,"fantasy-land/reduce");if(et[symIterator$1]!=null)return _iterableReduce$1(s,j,et[symIterator$1]());if(typeof et.next=="function")return _iterableReduce$1(s,j,et);if(typeof et.reduce=="function")return _methodReduce$1(s,j,et,"reduce");throw new TypeError("reduce: list must be array or iterable")}var XMap=function(){function s(j,et){this.xf=et,this.f=j}return s.prototype["@@transducer/init"]=_xfBase$1.init,s.prototype["@@transducer/result"]=_xfBase$1.result,s.prototype["@@transducer/step"]=function(j,et){return this.xf["@@transducer/step"](j,this.f(et))},s}(),_xmap=_curry2$1(function(j,et){return new XMap(j,et)});const _xmap$1=_xmap;function _has$1(s,j){return Object.prototype.hasOwnProperty.call(j,s)}var toString$1=Object.prototype.toString,_isArguments$2=function(){return toString$1.call(arguments)==="[object Arguments]"?function(j){return toString$1.call(j)==="[object Arguments]"}:function(j){return _has$1("callee",j)}}();const _isArguments$3=_isArguments$2;var hasEnumBug$1=!{toString:null}.propertyIsEnumerable("toString"),nonEnumerableProps$1=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],hasArgsEnumBug$1=function(){return arguments.propertyIsEnumerable("length")}(),contains$1=function(j,et){for(var tt=0;tt<j.length;){if(j[tt]===et)return!0;tt+=1}return!1},keys$2=_curry1$1(typeof Object.keys=="function"&&!hasArgsEnumBug$1?function(j){return Object(j)!==j?[]:Object.keys(j)}:function(j){if(Object(j)!==j)return[];var et,tt,rt=[],nt=hasArgsEnumBug$1&&_isArguments$3(j);for(et in j)_has$1(et,j)&&(!nt||et!=="length")&&(rt[rt.length]=et);if(hasEnumBug$1)for(tt=nonEnumerableProps$1.length-1;tt>=0;)et=nonEnumerableProps$1[tt],_has$1(et,j)&&!contains$1(rt,et)&&(rt[rt.length]=et),tt-=1;return rt});const keys$3=keys$2;var map$1=_curry2$1(_dispatchable$1(["fantasy-land/map","map"],_xmap$1,function(j,et){switch(Object.prototype.toString.call(et)){case"[object Function]":return curryN$1(et.length,function(){return j.call(this,et.apply(this,arguments))});case"[object Object]":return _reduce$1(function(tt,rt){return tt[rt]=j(et[rt]),tt},{},keys$3(et));default:return _map(j,et)}}));const map$2=map$1,_isInteger$1=Number.isInteger||function(j){return j<<0===j};var nth$2=_curry2$1(function(j,et){var tt=j<0?et.length+j:j;return _isString$1(et)?et.charAt(tt):et[tt]});const nth$3=nth$2;var paths$2=_curry2$1(function(j,et){return j.map(function(tt){for(var rt=et,nt=0,at;nt<tt.length;){if(rt==null)return;at=tt[nt],rt=_isInteger$1(at)?nth$3(at,rt):rt[at],nt+=1}return rt})});const paths$3=paths$2;var path$2=_curry2$1(function(j,et){return paths$3([j],et)[0]});const path$3=path$2;var prop$2=_curry2$1(function(j,et){return path$3([j],et)});const prop$3=prop$2;var pluck=_curry2$1(function(j,et){return map$2(prop$3(j),et)});const pluck$1=pluck;var reduce=_curry3(_reduce$1);const reduce$1=reduce;function _makeFlat(s){return function j(et){for(var tt,rt,nt,at=[],it=0,ot=et.length;it<ot;){if(_isArrayLike$3(et[it]))for(tt=s?j(et[it]):et[it],nt=0,rt=tt.length;nt<rt;)at[at.length]=tt[nt],nt+=1;else at[at.length]=et[it];it+=1}return at}}function _forceReduced(s){return{"@@transducer/value":s,"@@transducer/reduced":!0}}var preservingReduced=function(s){return{"@@transducer/init":_xfBase$1.init,"@@transducer/result":function(j){return s["@@transducer/result"](j)},"@@transducer/step":function(j,et){var tt=s["@@transducer/step"](j,et);return tt["@@transducer/reduced"]?_forceReduced(tt):tt}}},_flatCat=function(j){var et=preservingReduced(j);return{"@@transducer/init":_xfBase$1.init,"@@transducer/result":function(tt){return et["@@transducer/result"](tt)},"@@transducer/step":function(tt,rt){return _isArrayLike$3(rt)?_reduce$1(et,tt,rt):_reduce$1(et,tt,[rt])}}};const _flatCat$1=_flatCat;var _xchain=_curry2$1(function(j,et){return map$2(j,_flatCat$1(et))});const _xchain$1=_xchain;var chain=_curry2$1(_dispatchable$1(["fantasy-land/chain","chain"],_xchain$1,function(j,et){return typeof et=="function"?function(tt){return j(et(tt))(tt)}:_makeFlat(!1)(map$2(j,et))}));const chain$1=chain;function _cloneRegExp$1(s){return new RegExp(s.source,(s.global?"g":"")+(s.ignoreCase?"i":"")+(s.multiline?"m":"")+(s.sticky?"y":"")+(s.unicode?"u":""))}var type$4=_curry1$1(function(j){return j===null?"Null":j===void 0?"Undefined":Object.prototype.toString.call(j).slice(8,-1)});const type$5=type$4;function _clone$1(s,j,et,tt){var rt=function(at){for(var it=j.length,ot=0;ot<it;){if(s===j[ot])return et[ot];ot+=1}j[ot+1]=s,et[ot+1]=at;for(var st in s)at[st]=tt?_clone$1(s[st],j,et,!0):s[st];return at};switch(type$5(s)){case"Object":return rt({});case"Array":return rt([]);case"Date":return new Date(s.valueOf());case"RegExp":return _cloneRegExp$1(s);default:return s}}var clone$2=_curry1$1(function(j){return j!=null&&typeof j.clone=="function"?j.clone():_clone$1(j,[],[],!0)});const clone$3=clone$2;function _pipe(s,j){return function(){return j.call(this,s.apply(this,arguments))}}function _checkForMethod(s,j){return function(){var et=arguments.length;if(et===0)return j();var tt=arguments[et-1];return _isArray$1(tt)||typeof tt[s]!="function"?j.apply(this,arguments):tt[s].apply(tt,Array.prototype.slice.call(arguments,0,et-1))}}var slice=_curry3(_checkForMethod("slice",function(j,et,tt){return Array.prototype.slice.call(tt,j,et)}));const slice$1=slice;var tail=_curry1$1(_checkForMethod("tail",slice$1(1,1/0)));const tail$1=tail;function pipe(){if(arguments.length===0)throw new Error("pipe requires at least one argument");return _arity$1(arguments[0].length,reduce$1(_pipe,arguments[0],tail$1(arguments)))}function _identity$1(s){return s}var identity$2=_curry1$1(_identity$1);const identity$3=identity$2;function _arrayFromIterator$1(s){for(var j=[],et;!(et=s.next()).done;)j.push(et.value);return j}function _includesWith$1(s,j,et){for(var tt=0,rt=et.length;tt<rt;){if(s(j,et[tt]))return!0;tt+=1}return!1}function _functionName$1(s){var j=String(s).match(/^function (\w*)/);return j==null?"":j[1]}function _objectIs$2(s,j){return s===j?s!==0||1/s===1/j:s!==s&&j!==j}const _objectIs$3=typeof Object.is=="function"?Object.is:_objectIs$2;function _uniqContentEquals$1(s,j,et,tt){var rt=_arrayFromIterator$1(s),nt=_arrayFromIterator$1(j);function at(it,ot){return _equals$1(it,ot,et.slice(),tt.slice())}return!_includesWith$1(function(it,ot){return!_includesWith$1(at,ot,it)},nt,rt)}function _equals$1(s,j,et,tt){if(_objectIs$3(s,j))return!0;var rt=type$5(s);if(rt!==type$5(j)||s==null||j==null)return!1;if(typeof s["fantasy-land/equals"]=="function"||typeof j["fantasy-land/equals"]=="function")return typeof s["fantasy-land/equals"]=="function"&&s["fantasy-land/equals"](j)&&typeof j["fantasy-land/equals"]=="function"&&j["fantasy-land/equals"](s);if(typeof s.equals=="function"||typeof j.equals=="function")return typeof s.equals=="function"&&s.equals(j)&&typeof j.equals=="function"&&j.equals(s);switch(rt){case"Arguments":case"Array":case"Object":if(typeof s.constructor=="function"&&_functionName$1(s.constructor)==="Promise")return s===j;break;case"Boolean":case"Number":case"String":if(!(typeof s==typeof j&&_objectIs$3(s.valueOf(),j.valueOf())))return!1;break;case"Date":if(!_objectIs$3(s.valueOf(),j.valueOf()))return!1;break;case"Error":return s.name===j.name&&s.message===j.message;case"RegExp":if(!(s.source===j.source&&s.global===j.global&&s.ignoreCase===j.ignoreCase&&s.multiline===j.multiline&&s.sticky===j.sticky&&s.unicode===j.unicode))return!1;break}for(var nt=et.length-1;nt>=0;){if(et[nt]===s)return tt[nt]===j;nt-=1}switch(rt){case"Map":return s.size!==j.size?!1:_uniqContentEquals$1(s.entries(),j.entries(),et.concat([s]),tt.concat([j]));case"Set":return s.size!==j.size?!1:_uniqContentEquals$1(s.values(),j.values(),et.concat([s]),tt.concat([j]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var at=keys$3(s);if(at.length!==keys$3(j).length)return!1;var it=et.concat([s]),ot=tt.concat([j]);for(nt=at.length-1;nt>=0;){var st=at[nt];if(!(_has$1(st,j)&&_equals$1(j[st],s[st],it,ot)))return!1;nt-=1}return!0}var equals$2=_curry2$1(function(j,et){return _equals$1(j,et,[],[])});const equals$3=equals$2;function _indexOf$1(s,j,et){var tt,rt;if(typeof s.indexOf=="function")switch(typeof j){case"number":if(j===0){for(tt=1/j;et<s.length;){if(rt=s[et],rt===0&&1/rt===tt)return et;et+=1}return-1}else if(j!==j){for(;et<s.length;){if(rt=s[et],typeof rt=="number"&&rt!==rt)return et;et+=1}return-1}return s.indexOf(j,et);case"string":case"boolean":case"function":case"undefined":return s.indexOf(j,et);case"object":if(j===null)return s.indexOf(j,et)}for(;et<s.length;){if(equals$3(s[et],j))return et;et+=1}return-1}function _includes$1(s,j){return _indexOf$1(j,s,0)>=0}function _filter(s,j){for(var et=0,tt=j.length,rt=[];et<tt;)s(j[et])&&(rt[rt.length]=j[et]),et+=1;return rt}function _isObject(s){return Object.prototype.toString.call(s)==="[object Object]"}var XFilter=function(){function s(j,et){this.xf=et,this.f=j}return s.prototype["@@transducer/init"]=_xfBase$1.init,s.prototype["@@transducer/result"]=_xfBase$1.result,s.prototype["@@transducer/step"]=function(j,et){return this.f(et)?this.xf["@@transducer/step"](j,et):j},s}(),_xfilter=_curry2$1(function(j,et){return new XFilter(j,et)});const _xfilter$1=_xfilter;var filter$1=_curry2$1(_dispatchable$1(["filter"],_xfilter$1,function(s,j){return _isObject(j)?_reduce$1(function(et,tt){return s(j[tt])&&(et[tt]=j[tt]),et},{},keys$3(j)):_filter(s,j)}));const filter$2=filter$1;var XReduceBy$1=function(){function s(j,et,tt,rt){this.valueFn=j,this.valueAcc=et,this.keyFn=tt,this.xf=rt,this.inputs={}}return s.prototype["@@transducer/init"]=_xfBase$1.init,s.prototype["@@transducer/result"]=function(j){var et;for(et in this.inputs)if(_has$1(et,this.inputs)&&(j=this.xf["@@transducer/step"](j,this.inputs[et]),j["@@transducer/reduced"])){j=j["@@transducer/value"];break}return this.inputs=null,this.xf["@@transducer/result"](j)},s.prototype["@@transducer/step"]=function(j,et){var tt=this.keyFn(et);return this.inputs[tt]=this.inputs[tt]||[tt,this.valueAcc],this.inputs[tt][1]=this.valueFn(this.inputs[tt][1],et),j},s}(),_xreduceBy$2=_curryN$1(4,[],function(j,et,tt,rt){return new XReduceBy$1(j,et,tt,rt)});const _xreduceBy$3=_xreduceBy$2;var reduceBy$2=_curryN$1(4,[],_dispatchable$1([],_xreduceBy$3,function(j,et,tt,rt){return _reduce$1(function(nt,at){var it=tt(at);return nt[it]=j(_has$1(it,nt)?nt[it]:_clone$1(et,[],[],!1),at),nt},{},rt)}));const reduceBy$3=reduceBy$2;var _Set$2=function(){function s(){this._nativeSet=typeof Set=="function"?new Set:null,this._items={}}return s.prototype.add=function(j){return!hasOrAdd$1(j,!0,this)},s.prototype.has=function(j){return hasOrAdd$1(j,!1,this)},s}();function hasOrAdd$1(s,j,et){var tt=typeof s,rt,nt;switch(tt){case"string":case"number":return s===0&&1/s===-1/0?et._items["-0"]?!0:(j&&(et._items["-0"]=!0),!1):et._nativeSet!==null?j?(rt=et._nativeSet.size,et._nativeSet.add(s),nt=et._nativeSet.size,nt===rt):et._nativeSet.has(s):tt in et._items?s in et._items[tt]?!0:(j&&(et._items[tt][s]=!0),!1):(j&&(et._items[tt]={},et._items[tt][s]=!0),!1);case"boolean":if(tt in et._items){var at=s?1:0;return et._items[tt][at]?!0:(j&&(et._items[tt][at]=!0),!1)}else return j&&(et._items[tt]=s?[!1,!0]:[!0,!1]),!1;case"function":return et._nativeSet!==null?j?(rt=et._nativeSet.size,et._nativeSet.add(s),nt=et._nativeSet.size,nt===rt):et._nativeSet.has(s):tt in et._items?_includes$1(s,et._items[tt])?!0:(j&&et._items[tt].push(s),!1):(j&&(et._items[tt]=[s]),!1);case"undefined":return et._items[tt]?!0:(j&&(et._items[tt]=!0),!1);case"object":if(s===null)return et._items.null?!0:(j&&(et._items.null=!0),!1);default:return tt=Object.prototype.toString.call(s),tt in et._items?_includes$1(s,et._items[tt])?!0:(j&&et._items[tt].push(s),!1):(j&&(et._items[tt]=[s]),!1)}}const _Set$3=_Set$2;var XTake=function(){function s(j,et){this.xf=et,this.n=j,this.i=0}return s.prototype["@@transducer/init"]=_xfBase$1.init,s.prototype["@@transducer/result"]=_xfBase$1.result,s.prototype["@@transducer/step"]=function(j,et){this.i+=1;var tt=this.n===0?j:this.xf["@@transducer/step"](j,et);return this.n>=0&&this.i>=this.n?_reduced(tt):tt},s}(),_xtake=_curry2$1(function(j,et){return new XTake(j,et)});const _xtake$1=_xtake;var take=_curry2$1(_dispatchable$1(["take"],_xtake$1,function(j,et){return slice$1(0,j<0?1/0:j,et)}));const take$1=take;function dropLast$2(s,j){return take$1(s<j.length?j.length-s:0,j)}var XDropLast=function(){function s(j,et){this.xf=et,this.pos=0,this.full=!1,this.acc=new Array(j)}return s.prototype["@@transducer/init"]=_xfBase$1.init,s.prototype["@@transducer/result"]=function(j){return this.acc=null,this.xf["@@transducer/result"](j)},s.prototype["@@transducer/step"]=function(j,et){return this.full&&(j=this.xf["@@transducer/step"](j,this.acc[this.pos])),this.store(et),j},s.prototype.store=function(j){this.acc[this.pos]=j,this.pos+=1,this.pos===this.acc.length&&(this.pos=0,this.full=!0)},s}(),_xdropLast=_curry2$1(function(j,et){return new XDropLast(j,et)});const _xdropLast$1=_xdropLast;var dropLast=_curry2$1(_dispatchable$1([],_xdropLast$1,dropLast$2));const dropLast$1=dropLast;var flatten$1=_curry1$1(_makeFlat(!0));const flatten$2=flatten$1;var fromPairs$2=_curry1$1(function(j){for(var et={},tt=0;tt<j.length;)et[j[tt][0]]=j[tt][1],tt+=1;return et});const fromPairs$3=fromPairs$2;var groupBy=_curry2$1(_checkForMethod("groupBy",reduceBy$3(function(s,j){return s==null&&(s=[]),s.push(j),s},null)));const groupBy$1=groupBy;var uniqBy$2=_curry2$1(function(j,et){for(var tt=new _Set$3,rt=[],nt=0,at,it;nt<et.length;)it=et[nt],at=j(it),tt.add(at)&&rt.push(it),nt+=1;return rt});const uniqBy$3=uniqBy$2;var uniq$2=uniqBy$3(identity$3);const uniq$3=uniq$2;function _objectAssign(s){if(s==null)throw new TypeError("Cannot convert undefined or null to object");for(var j=Object(s),et=1,tt=arguments.length;et<tt;){var rt=arguments[et];if(rt!=null)for(var nt in rt)_has$1(nt,rt)&&(j[nt]=rt[nt]);et+=1}return j}const _objectAssign$1=typeof Object.assign=="function"?Object.assign:_objectAssign;var maxBy=_curry3(function(j,et,tt){return j(tt)>j(et)?tt:et});const maxBy$1=maxBy;var mergeAll=_curry1$1(function(j){return _objectAssign$1.apply(null,[{}].concat(j))});const mergeAll$1=mergeAll;var mergeWithKey=_curry3(function(j,et,tt){var rt={},nt;for(nt in et)_has$1(nt,et)&&(rt[nt]=_has$1(nt,tt)?j(nt,et[nt],tt[nt]):et[nt]);for(nt in tt)_has$1(nt,tt)&&!_has$1(nt,rt)&&(rt[nt]=tt[nt]);return rt});const mergeWithKey$1=mergeWithKey;var mergeDeepWithKey=_curry3(function s(j,et,tt){return mergeWithKey$1(function(rt,nt,at){return _isObject(nt)&&_isObject(at)?s(j,nt,at):j(rt,nt,at)},et,tt)});const mergeDeepWithKey$1=mergeDeepWithKey;var mergeDeepLeft=_curry2$1(function(j,et){return mergeDeepWithKey$1(function(tt,rt,nt){return rt},j,et)});const mergeDeepLeft$1=mergeDeepLeft;var minBy=_curry3(function(j,et,tt){return j(tt)<j(et)?tt:et});const minBy$1=minBy;var toPairs$2=_curry1$1(function(j){var et=[];for(var tt in j)_has$1(tt,j)&&(et[et.length]=[tt,j[tt]]);return et});const toPairs$3=toPairs$2;var unnest$1=chain$1(_identity$1);const unnest$1$1=unnest$1;var browserPonyfill={exports:{}};(function(s,j){var et=typeof self!="undefined"?self:commonjsGlobal$1,tt=function(){function nt(){this.fetch=!1,this.DOMException=et.DOMException}return nt.prototype=et,new nt}();(function(nt){(function(at){var it={searchParams:"URLSearchParams"in nt,iterable:"Symbol"in nt&&"iterator"in Symbol,blob:"FileReader"in nt&&"Blob"in nt&&function(){try{return new Blob,!0}catch(wt){return!1}}(),formData:"FormData"in nt,arrayBuffer:"ArrayBuffer"in nt};function ot(wt){return wt&&DataView.prototype.isPrototypeOf(wt)}if(it.arrayBuffer)var st=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],lt=ArrayBuffer.isView||function(wt){return wt&&st.indexOf(Object.prototype.toString.call(wt))>-1};function ct(wt){if(typeof wt!="string"&&(wt=String(wt)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(wt))throw new TypeError("Invalid character in header field name");return wt.toLowerCase()}function ut(wt){return typeof wt!="string"&&(wt=String(wt)),wt}function dt(wt){var Et={next:function(){var Dt=wt.shift();return{done:Dt===void 0,value:Dt}}};return it.iterable&&(Et[Symbol.iterator]=function(){return Et}),Et}function ft(wt){this.map={},wt instanceof ft?wt.forEach(function(Et,Dt){this.append(Dt,Et)},this):Array.isArray(wt)?wt.forEach(function(Et){this.append(Et[0],Et[1])},this):wt&&Object.getOwnPropertyNames(wt).forEach(function(Et){this.append(Et,wt[Et])},this)}ft.prototype.append=function(wt,Et){wt=ct(wt),Et=ut(Et);var Dt=this.map[wt];this.map[wt]=Dt?Dt+", "+Et:Et},ft.prototype.delete=function(wt){delete this.map[ct(wt)]},ft.prototype.get=function(wt){return wt=ct(wt),this.has(wt)?this.map[wt]:null},ft.prototype.has=function(wt){return this.map.hasOwnProperty(ct(wt))},ft.prototype.set=function(wt,Et){this.map[ct(wt)]=ut(Et)},ft.prototype.forEach=function(wt,Et){for(var Dt in this.map)this.map.hasOwnProperty(Dt)&&wt.call(Et,this.map[Dt],Dt,this)},ft.prototype.keys=function(){var wt=[];return this.forEach(function(Et,Dt){wt.push(Dt)}),dt(wt)},ft.prototype.values=function(){var wt=[];return this.forEach(function(Et){wt.push(Et)}),dt(wt)},ft.prototype.entries=function(){var wt=[];return this.forEach(function(Et,Dt){wt.push([Dt,Et])}),dt(wt)},it.iterable&&(ft.prototype[Symbol.iterator]=ft.prototype.entries);function vt(wt){if(wt.bodyUsed)return Promise.reject(new TypeError("Already read"));wt.bodyUsed=!0}function mt(wt){return new Promise(function(Et,Dt){wt.onload=function(){Et(wt.result)},wt.onerror=function(){Dt(wt.error)}})}function pt(wt){var Et=new FileReader,Dt=mt(Et);return Et.readAsArrayBuffer(wt),Dt}function ht(wt){var Et=new FileReader,Dt=mt(Et);return Et.readAsText(wt),Dt}function gt(wt){for(var Et=new Uint8Array(wt),Dt=new Array(Et.length),jt=0;jt<Et.length;jt++)Dt[jt]=String.fromCharCode(Et[jt]);return Dt.join("")}function yt(wt){if(wt.slice)return wt.slice(0);var Et=new Uint8Array(wt.byteLength);return Et.set(new Uint8Array(wt)),Et.buffer}function xt(){return this.bodyUsed=!1,this._initBody=function(wt){this._bodyInit=wt,wt?typeof wt=="string"?this._bodyText=wt:it.blob&&Blob.prototype.isPrototypeOf(wt)?this._bodyBlob=wt:it.formData&&FormData.prototype.isPrototypeOf(wt)?this._bodyFormData=wt:it.searchParams&&URLSearchParams.prototype.isPrototypeOf(wt)?this._bodyText=wt.toString():it.arrayBuffer&&it.blob&&ot(wt)?(this._bodyArrayBuffer=yt(wt.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):it.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(wt)||lt(wt))?this._bodyArrayBuffer=yt(wt):this._bodyText=wt=Object.prototype.toString.call(wt):this._bodyText="",this.headers.get("content-type")||(typeof wt=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):it.searchParams&&URLSearchParams.prototype.isPrototypeOf(wt)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},it.blob&&(this.blob=function(){var wt=vt(this);if(wt)return wt;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?vt(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(pt)}),this.text=function(){var wt=vt(this);if(wt)return wt;if(this._bodyBlob)return ht(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(gt(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},it.formData&&(this.formData=function(){return this.text().then($t)}),this.json=function(){return this.text().then(JSON.parse)},this}var Ct=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function St(wt){var Et=wt.toUpperCase();return Ct.indexOf(Et)>-1?Et:wt}function bt(wt,Et){Et=Et||{};var Dt=Et.body;if(wt instanceof bt){if(wt.bodyUsed)throw new TypeError("Already read");this.url=wt.url,this.credentials=wt.credentials,Et.headers||(this.headers=new ft(wt.headers)),this.method=wt.method,this.mode=wt.mode,this.signal=wt.signal,!Dt&&wt._bodyInit!=null&&(Dt=wt._bodyInit,wt.bodyUsed=!0)}else this.url=String(wt);if(this.credentials=Et.credentials||this.credentials||"same-origin",(Et.headers||!this.headers)&&(this.headers=new ft(Et.headers)),this.method=St(Et.method||this.method||"GET"),this.mode=Et.mode||this.mode||null,this.signal=Et.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&Dt)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(Dt)}bt.prototype.clone=function(){return new bt(this,{body:this._bodyInit})};function $t(wt){var Et=new FormData;return wt.trim().split("&").forEach(function(Dt){if(Dt){var jt=Dt.split("="),Rt=jt.shift().replace(/\+/g," "),At=jt.join("=").replace(/\+/g," ");Et.append(decodeURIComponent(Rt),decodeURIComponent(At))}}),Et}function Ot(wt){var Et=new ft,Dt=wt.replace(/\r?\n[\t ]+/g," ");return Dt.split(/\r?\n/).forEach(function(jt){var Rt=jt.split(":"),At=Rt.shift().trim();if(At){var It=Rt.join(":").trim();Et.append(At,It)}}),Et}xt.call(bt.prototype);function Pt(wt,Et){Et||(Et={}),this.type="default",this.status=Et.status===void 0?200:Et.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in Et?Et.statusText:"OK",this.headers=new ft(Et.headers),this.url=Et.url||"",this._initBody(wt)}xt.call(Pt.prototype),Pt.prototype.clone=function(){return new Pt(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new ft(this.headers),url:this.url})},Pt.error=function(){var wt=new Pt(null,{status:0,statusText:""});return wt.type="error",wt};var Nt=[301,302,303,307,308];Pt.redirect=function(wt,Et){if(Nt.indexOf(Et)===-1)throw new RangeError("Invalid status code");return new Pt(null,{status:Et,headers:{location:wt}})},at.DOMException=nt.DOMException;try{new at.DOMException}catch(wt){at.DOMException=function(Et,Dt){this.message=Et,this.name=Dt;var jt=Error(Et);this.stack=jt.stack},at.DOMException.prototype=Object.create(Error.prototype),at.DOMException.prototype.constructor=at.DOMException}function Tt(wt,Et){return new Promise(function(Dt,jt){var Rt=new bt(wt,Et);if(Rt.signal&&Rt.signal.aborted)return jt(new at.DOMException("Aborted","AbortError"));var At=new XMLHttpRequest;function It(){At.abort()}At.onload=function(){var kt={status:At.status,statusText:At.statusText,headers:Ot(At.getAllResponseHeaders()||"")};kt.url="responseURL"in At?At.responseURL:kt.headers.get("X-Request-URL");var _t="response"in At?At.response:At.responseText;Dt(new Pt(_t,kt))},At.onerror=function(){jt(new TypeError("Network request failed"))},At.ontimeout=function(){jt(new TypeError("Network request failed"))},At.onabort=function(){jt(new at.DOMException("Aborted","AbortError"))},At.open(Rt.method,Rt.url,!0),Rt.credentials==="include"?At.withCredentials=!0:Rt.credentials==="omit"&&(At.withCredentials=!1),"responseType"in At&&it.blob&&(At.responseType="blob"),Rt.headers.forEach(function(kt,_t){At.setRequestHeader(_t,kt)}),Rt.signal&&(Rt.signal.addEventListener("abort",It),At.onreadystatechange=function(){At.readyState===4&&Rt.signal.removeEventListener("abort",It)}),At.send(typeof Rt._bodyInit=="undefined"?null:Rt._bodyInit)})}return Tt.polyfill=!0,nt.fetch||(nt.fetch=Tt,nt.Headers=ft,nt.Request=bt,nt.Response=Pt),at.Headers=ft,at.Request=bt,at.Response=Pt,at.fetch=Tt,Object.defineProperty(at,"__esModule",{value:!0}),at})({})})(tt),tt.fetch.ponyfill=!0,delete tt.fetch.polyfill;var rt=tt;j=rt.fetch,j.default=rt.fetch,j.fetch=rt.fetch,j.Headers=rt.Headers,j.Request=rt.Request,j.Response=rt.Response,s.exports=j})(browserPonyfill,browserPonyfill.exports);const fetch$1=getDefaultExportFromCjs(browserPonyfill.exports);(function(s){var j=s.URLSearchParams&&s.URLSearchParams.prototype.get?s.URLSearchParams:null,et=j&&new j({a:1}).toString()==="a=1",tt=j&&new j("s=%2B").get("s")==="+",rt="__URLSearchParams__",nt=j?function(){var ht=new j;return ht.append("s"," &"),ht.toString()==="s=+%26"}():!0,at=ot.prototype,it=!!(s.Symbol&&s.Symbol.iterator);if(j&&et&&tt&&nt)return;function ot(ht){ht=ht||"",(ht instanceof URLSearchParams||ht instanceof ot)&&(ht=ht.toString()),this[rt]=vt(ht)}at.append=function(ht,gt){mt(this[rt],ht,gt)},at.delete=function(ht){delete this[rt][ht]},at.get=function(ht){var gt=this[rt];return ht in gt?gt[ht][0]:null},at.getAll=function(ht){var gt=this[rt];return ht in gt?gt[ht].slice(0):[]},at.has=function(ht){return ht in this[rt]},at.set=function(gt,yt){this[rt][gt]=[""+yt]},at.toString=function(){var ht=this[rt],gt=[],yt,xt,Ct,St;for(xt in ht)for(Ct=ut(xt),yt=0,St=ht[xt];yt<St.length;yt++)gt.push(Ct+"="+ut(St[yt]));return gt.join("&")};var st=!tt,lt=!st&&j&&!et&&s.Proxy;Object.defineProperty(s,"URLSearchParams",{value:lt?new Proxy(j,{construct:function(ht,gt){return new ht(new ot(gt[0]).toString())}}):ot});var ct=s.URLSearchParams.prototype;ct.polyfill=!0,ct.forEach=ct.forEach||function(ht,gt){var yt=vt(this.toString());Object.getOwnPropertyNames(yt).forEach(function(xt){yt[xt].forEach(function(Ct){ht.call(gt,Ct,xt,this)},this)},this)},ct.sort=ct.sort||function(){var ht=vt(this.toString()),gt=[],yt,xt,Ct;for(yt in ht)gt.push(yt);for(gt.sort(),xt=0;xt<gt.length;xt++)this.delete(gt[xt]);for(xt=0;xt<gt.length;xt++){var St=gt[xt],bt=ht[St];for(Ct=0;Ct<bt.length;Ct++)this.append(St,bt[Ct])}},ct.keys=ct.keys||function(){var ht=[];return this.forEach(function(gt,yt){ht.push(yt)}),ft(ht)},ct.values=ct.values||function(){var ht=[];return this.forEach(function(gt){ht.push(gt)}),ft(ht)},ct.entries=ct.entries||function(){var ht=[];return this.forEach(function(gt,yt){ht.push([yt,gt])}),ft(ht)},it&&(ct[s.Symbol.iterator]=ct[s.Symbol.iterator]||ct.entries);function ut(ht){var gt={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(ht).replace(/[!'\(\)~]|%20|%00/g,function(yt){return gt[yt]})}function dt(ht){return ht.replace(/[ +]/g,"%20").replace(/(%[a-f0-9]{2})+/ig,function(gt){return decodeURIComponent(gt)})}function ft(ht){var gt={next:function(){var yt=ht.shift();return{done:yt===void 0,value:yt}}};return it&&(gt[s.Symbol.iterator]=function(){return gt}),gt}function vt(ht){var gt={};if(typeof ht=="object")if(pt(ht))for(var yt=0;yt<ht.length;yt++){var xt=ht[yt];if(pt(xt)&&xt.length===2)mt(gt,xt[0],xt[1]);else throw new TypeError("Failed to construct 'URLSearchParams': Sequence initializer must only contain pair elements")}else for(var Ct in ht)ht.hasOwnProperty(Ct)&&mt(gt,Ct,ht[Ct]);else{ht.indexOf("?")===0&&(ht=ht.slice(1));for(var St=ht.split("&"),bt=0;bt<St.length;bt++){var $t=St[bt],Ot=$t.indexOf("=");-1<Ot?mt(gt,dt($t.slice(0,Ot)),dt($t.slice(Ot+1))):$t&&mt(gt,dt($t),"")}}return gt}function mt(ht,gt,yt){var xt=typeof yt=="string"?yt:yt!=null&&typeof yt.toString=="function"?yt.toString():JSON.stringify(yt);gt in ht?ht[gt].push(xt):ht[gt]=[xt]}function pt(ht){return!!ht&&Object.prototype.toString.call(ht)==="[object Array]"}})(typeof commonjsGlobal$1!="undefined"?commonjsGlobal$1:typeof window!="undefined"?window:commonjsGlobal$1);const DEFAULT_GRANULARITY="day",GRANULARITIES=[{name:void 0,title:"w/o grouping"},{name:"second",title:"Second"},{name:"minute",title:"Minute"},{name:"hour",title:"Hour"},{name:"day",title:"Day"},{name:"week",title:"Week"},{name:"month",title:"Month"},{name:"quarter",title:"Quarter"},{name:"year",title:"Year"}];function removeEmptyQueryFields(s){return fromPairs$3(toPairs$3(s||{}).map(([et,tt])=>{if(["measures","dimensions","segments","timeDimensions","filters"].includes(et)&&Array.isArray(tt)&&tt.length===0)return null;if(et==="order"&&tt){if(Array.isArray(tt)&&!tt.length)return null;if(!Object.keys(tt).length)return null}return[et,tt]}).filter(Boolean))}function validateQuery(s){const j=s||{};return removeEmptyQueryFields({...j,filters:(j.filters||[]).filter(et=>et.operator),timeDimensions:(j.timeDimensions||[]).filter(et=>!(!et.dateRange&&!et.granularity))})}function areQueriesEqual(s={},j={}){return equals$3(Object.entries(s&&s.order||{}),Object.entries(j&&j.order||{}))&&equals$3(s,j)}function defaultOrder(s){const j=(s.timeDimensions||[]).find(et=>et.granularity);return j?{[j.dimension]:"asc"}:(s.measures||[]).length>0&&(s.dimensions||[]).length>0?{[s.measures[0]]:"desc"}:(s.dimensions||[]).length>0?{[s.dimensions[0]]:"asc"}:{}}function defaultHeuristics(s,j={},et){const{query:tt,...rt}=clone$3(s),{meta:nt,sessionGranularity:at}=et,it=at||DEFAULT_GRANULARITY;let ot={query:tt,...rt},st=null;if(areQueriesEqual(tt,j)||(st=tt),Array.isArray(st)||Array.isArray(j))return s;if(st){if((j.timeDimensions||[]).length===1&&(st.timeDimensions||[]).length===1&&st.timeDimensions[0].granularity&&j.timeDimensions[0].granularity!==st.timeDimensions[0].granularity&&(ot={...ot,sessionGranularity:st.timeDimensions[0].granularity}),(j.measures||[]).length===0&&(st.measures||[]).length>0||(j.measures||[]).length===1&&(st.measures||[]).length===1&&j.measures[0]!==st.measures[0]){const[lt]=st.timeDimensions||[],ct=nt.defaultTimeDimensionNameFor(st.measures[0]);return st={...st,timeDimensions:ct?[{dimension:ct,granularity:lt&&lt.granularity||it,dateRange:lt&&lt.dateRange}]:[]},{...ot,pivotConfig:null,shouldApplyHeuristicOrder:!0,query:st,chartType:ct?"line":"number"}}return(j.dimensions||[]).length===0&&(st.dimensions||[]).length>0?(st={...st,timeDimensions:(st.timeDimensions||[]).map(lt=>({...lt,granularity:void 0}))},{...ot,pivotConfig:null,shouldApplyHeuristicOrder:!0,query:st,chartType:"table"}):(j.dimensions||[]).length>0&&(st.dimensions||[]).length===0?(st={...st,timeDimensions:(st.timeDimensions||[]).map(lt=>({...lt,granularity:lt.granularity||it}))},{...ot,pivotConfig:null,shouldApplyHeuristicOrder:!0,query:st,chartType:(st.timeDimensions||[]).length?"line":"number"}):((j.dimensions||[]).length>0||(j.measures||[]).length>0)&&(st.dimensions||[]).length===0&&(st.measures||[]).length===0?(st={...st,timeDimensions:[],filters:[]},{...ot,pivotConfig:null,shouldApplyHeuristicOrder:!0,query:st,sessionGranularity:null}):ot}if(ot.chartType){const lt=ot.chartType;if((lt==="line"||lt==="area")&&(j.timeDimensions||[]).length===1&&!j.timeDimensions[0].granularity){const[ct]=j.timeDimensions;return{...ot,pivotConfig:null,query:{...j,timeDimensions:[{...ct,granularity:it}]}}}if((lt==="pie"||lt==="table"||lt==="number")&&(j.timeDimensions||[]).length===1&&j.timeDimensions[0].granularity){const[ct]=j.timeDimensions;return{...ot,pivotConfig:null,shouldApplyHeuristicOrder:!0,query:{...j,timeDimensions:[{...ct,granularity:void 0}]}}}}return ot}function isQueryPresent(s){return s?(Array.isArray(s)?s:[s]).every(j=>j.measures&&j.measures.length||j.dimensions&&j.dimensions.length||j.timeDimensions&&j.timeDimensions.length):!1}function movePivotItem(s,j,et,tt,rt){const nt={...s,x:[...s.x],y:[...s.y]},at=s[tt][j],it=nt[rt].length-1;return at==="measures"?et=it+1:et>=it&&nt[rt][it]==="measures"&&(et=it-1),nt[tt].splice(j,1),nt[rt].splice(et,0,at),nt}function moveItemInArray(s,j,et){const tt=[...s],[rt]=tt.splice(j,1);return tt.splice(et,0,rt),tt}function flattenFilters(s=[]){return s.reduce((j,et)=>et.or||et.and?[...j,...flattenFilters(et.or||et.and)]:[...j,et],[])}function getQueryMembers(s={}){const j=["measures","dimensions","segments"],et=new Set;return j.forEach(tt=>(s[tt]||[]).forEach(rt=>et.add(rt))),(s.timeDimensions||[]).forEach(tt=>et.add(tt.dimension)),flattenFilters(s.filters).forEach(tt=>et.add(tt.dimension||tt.member)),[...et]}function aliasSeries(s,j,et,tt){const rt=s.filter(nt=>nt!=null);return et&&et.aliasSeries&&et.aliasSeries[j]?[et.aliasSeries[j],...rt]:tt.has(rt[0])?[j,...rt]:rt}dayjs.extend(quarterOfYear);const internalDayjs=(...s)=>dayjs(...s).locale({...en,weekStart:1}),TIME_SERIES={day:s=>s.by("d").map(j=>j.format("YYYY-MM-DDT00:00:00.000")),month:s=>s.snapTo("month").by("M").map(j=>j.format("YYYY-MM-01T00:00:00.000")),year:s=>s.snapTo("year").by("y").map(j=>j.format("YYYY-01-01T00:00:00.000")),hour:s=>s.by("h").map(j=>j.format("YYYY-MM-DDTHH:00:00.000")),minute:s=>s.by("m").map(j=>j.format("YYYY-MM-DDTHH:mm:00.000")),second:s=>s.by("s").map(j=>j.format("YYYY-MM-DDTHH:mm:ss.000")),week:s=>s.snapTo("week").by("w").map(j=>j.startOf("week").format("YYYY-MM-DDT00:00:00.000")),quarter:s=>s.snapTo("quarter").by("quarter").map(j=>j.startOf("quarter").format("YYYY-MM-DDT00:00:00.000"))},DateRegex=/^\d\d\d\d-\d\d-\d\d$/,LocalDateRegex=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z?$/,groupByToPairs=s=>{const j=new Map;return et=>(et.forEach(tt=>{const rt=s(tt);j.has(rt)||j.set(rt,[]),j.get(rt).push(tt)}),Array.from(j.entries()))},unnest=s=>{const j=[];return s.forEach(et=>{et.forEach(tt=>j.push(tt))}),j},dayRange=(s,j)=>({by:et=>{const tt=[];let rt=internalDayjs(s);const nt=internalDayjs(j);for(;rt.isBefore(nt)||rt.isSame(nt);)tt.push(rt),rt=rt.add(1,et);return tt},snapTo:et=>dayRange(internalDayjs(s).startOf(et),internalDayjs(j).endOf(et)),start:internalDayjs(s),end:internalDayjs(j)}),QUERY_TYPE={REGULAR_QUERY:"regularQuery",COMPARE_DATE_RANGE_QUERY:"compareDateRangeQuery",BLENDING_QUERY:"blendingQuery"};class ResultSet{static measureFromAxis(j){return j[j.length-1]}static timeDimensionMember(j){return`${j.dimension}.${j.granularity}`}static deserialize(j,et={}){return new ResultSet(j.loadResponse,et)}constructor(j,et={}){if(this.loadResponse=j,this.loadResponse.queryType!=null?(this.queryType=j.queryType,this.loadResponses=j.results):(this.queryType=QUERY_TYPE.REGULAR_QUERY,this.loadResponse.pivotQuery={...j.query,queryType:this.queryType},this.loadResponses=[j]),!Object.values(QUERY_TYPE).includes(this.queryType))throw new Error("Unknown query type");this.parseDateMeasures=et.parseDateMeasures,this.options=et,this.backwardCompatibleData=[]}drillDown(j,et){if(this.queryType===QUERY_TYPE.COMPARE_DATE_RANGE_QUERY)throw new Error("compareDateRange drillDown query is not currently supported");if(this.queryType===QUERY_TYPE.BLENDING_QUERY)throw new Error("Data blending drillDown query is not currently supported");const{query:tt}=this.loadResponses[0],{xValues:rt=[],yValues:nt=[]}=j,at=this.normalizePivotConfig(et),it=[];at.x.forEach((ft,vt)=>it.push([ft,rt[vt]])),at.y.forEach((ft,vt)=>it.push([ft,nt[vt]]));const{filters:ot=[],segments:st=[]}=this.query(),{measures:lt}=this.loadResponses[0].annotation;let[,ct]=it.find(([ft])=>ft==="measures")||[];if(ct===void 0&&([ct]=Object.keys(lt)),!(lt[ct]&&lt[ct].drillMembers||[]).length)return null;const ut=[{member:ct,operator:"measureFilter"},...ot],dt=[];return it.filter(([ft])=>ft!=="measures").forEach(([ft,vt])=>{const[mt,pt,ht]=ft.split(".");if(ht!==void 0){const gt=dayRange(vt,vt).snapTo(ht),yt=tt.timeDimensions.find(Ct=>Ct.dimension);let xt=[gt.start,gt.end];if(yt){const[Ct,St]=yt.dateRange;xt=[dayjs(Ct)>gt.start?dayjs(Ct):gt.start,dayjs(St)<gt.end?dayjs(St):gt.end]}dt.push({dimension:[mt,pt].join("."),dateRange:xt.map(Ct=>Ct.format("YYYY-MM-DDTHH:mm:ss.SSS"))})}else vt==null?ut.push({member:ft,operator:"notSet"}):ut.push({member:ft,operator:"equals",values:[vt.toString()]})}),dt.length===0&&tt.timeDimensions.length>0&&tt.timeDimensions[0].granularity==null&&dt.push(tt.timeDimensions[0]),{...lt[ct].drillMembersGrouped,filters:ut,...st.length>0?{segments:st}:{},timeDimensions:dt,segments:st,timezone:tt.timezone}}series(j){return this.seriesNames(j).map(({title:et,shortTitle:tt,key:rt})=>({title:et,shortTitle:tt,key:rt,series:this.chartPivot(j).map(({x:nt,...at})=>({value:at[rt],x:nt}))}))}axisValues(j,et=0){const{query:tt}=this.loadResponses[et];return rt=>{const nt=at=>j.filter(it=>it!=="measures").map(it=>rt[it]!=null?rt[it]:null).concat(at?[at]:[]);return j.find(at=>at==="measures")&&(tt.measures||[]).length?tt.measures.map(nt):[nt()]}}axisValuesString(j,et){const tt=rt=>rt==null?"\u2205":rt===""?"[Empty string]":rt;return j.map(tt).join(et||", ")}static getNormalizedPivotConfig(j={},et=null){const tt={x:[],y:[],fillMissingDates:!0,joinDateRange:!1},{measures:rt=[],dimensions:nt=[]}=j,at=(j.timeDimensions||[]).filter(ct=>!!ct.granularity);et=et||(at.length?{x:at.map(ct=>ResultSet.timeDimensionMember(ct)),y:nt}:{x:nt,y:[]}),et=mergeDeepLeft$1(et,tt);const it=ct=>ct.map(ut=>at.find(dt=>dt.dimension===ut)&&!nt.find(dt=>dt===ut)?ResultSet.timeDimensionMember(j.timeDimensions.find(dt=>dt.dimension===ut)):ut);et.x=it(et.x),et.y=it(et.y);const ot=et.x.concat(et.y),st=at.map(ct=>ResultSet.timeDimensionMember(ct)).concat(nt),lt=ct=>st.includes(ct)||ct==="measures";return et.x=et.x.concat(st.filter(ct=>!ot.includes(ct)&&ct!=="compareDateRange")).filter(lt),et.y=et.y.filter(lt),et.x.concat(et.y).find(ct=>ct==="measures")||et.y.push("measures"),nt.includes("compareDateRange")&&!et.y.concat(et.x).includes("compareDateRange")&&et.y.unshift("compareDateRange"),rt.length||(et.x=et.x.filter(ct=>ct!=="measures"),et.y=et.y.filter(ct=>ct!=="measures")),et}normalizePivotConfig(j){return ResultSet.getNormalizedPivotConfig(this.loadResponse.pivotQuery,j)}timeSeries(j,et){if(!j.granularity)return null;let{dateRange:tt}=j;if(!tt){const ot=ResultSet.timeDimensionMember(j),st=pipe(map$2(lt=>lt[ot]&&internalDayjs(lt[ot])),filter$2(Boolean))(this.timeDimensionBackwardCompatibleData(et));tt=st.length&&[reduce$1(minBy$1(lt=>lt.toDate()),st[0],st),reduce$1(maxBy$1(lt=>lt.toDate()),st[0],st)]||null}if(!tt)return null;const rt=j.dateRange?j.dateRange.find(ot=>ot.match(DateRegex)):!["hour","minute","second"].includes(j.granularity),[nt,at]=tt,it=dayRange(nt,at);if(!TIME_SERIES[j.granularity])throw new Error(`Unsupported time granularity: ${j.granularity}`);return TIME_SERIES[j.granularity](rt?it.snapTo("d"):it)}pivot(j){j=this.normalizePivotConfig(j);const{pivotQuery:et}=this.loadResponse,tt=(nt=0)=>{let at=groupByToPairs(({xValues:ut})=>this.axisValuesString(ut));const it=(ut,dt)=>ut[dt]||0;if(j.fillMissingDates&&j.x.length===1&&equals$3(j.x,(et.timeDimensions||[]).filter(ut=>Boolean(ut.granularity)).map(ut=>ResultSet.timeDimensionMember(ut)))){const ut=this.loadResponses.map(dt=>this.timeSeries(dt.query.timeDimensions[0],nt));ut[0]&&(at=dt=>{const ft=groupBy$1(({xValues:vt})=>vt[0],dt);return ut[nt].map(vt=>[vt,ft[vt]||[{xValues:[vt],row:{}}]])})}const ot=pipe(map$2(ut=>this.axisValues(j.x,nt)(ut).map(dt=>({xValues:dt,row:ut}))),unnest,at)(this.timeDimensionBackwardCompatibleData(nt)),st={};ot.forEach(([,ut])=>{ut.forEach(({row:dt})=>{this.axisValues(j.y,nt)(dt).forEach(ft=>{Object.keys(dt).length>0&&(st[ft.join()]=ft)})})});const lt=Object.values(st),ct=Boolean(j.x.find(ut=>ut==="measures"));return ot.map(([,ut])=>{const{xValues:dt}=ut[0],ft={};return ut.forEach(({row:vt})=>{this.axisValues(j.y,nt)(vt).map(pt=>({yValues:pt,row:vt})).forEach(pt=>{ft[this.axisValuesString(pt.yValues)]=pt})}),{xValues:dt,yValuesArray:unnest(lt.map(vt=>{const mt=ct?ResultSet.measureFromAxis(dt):ResultSet.measureFromAxis(vt);return[[vt,it((ft[this.axisValuesString(vt)]||{row:{}}).row,mt)]]}))}})},rt=this.loadResponses.length>1?this.loadResponses.map((nt,at)=>tt(at)):[];return rt.length?this.mergePivots(rt,j.joinDateRange):tt()}mergePivots(j,et){const tt=j.reduce((rt,nt)=>rt!=null&&nt.length>=rt.length?rt:nt,null);return tt.map((rt,nt)=>({xValues:et?[j.map(it=>it[nt]&&it[nt].xValues||[]).join(", ")]:tt[nt].xValues,yValuesArray:unnest(j.map(it=>it[nt].yValuesArray))}))}pivotedRows(j){return this.chartPivot(j)}chartPivot(j){const et=rt=>this.parseDateMeasures&&LocalDateRegex.test(rt)?new Date(rt):Number.isNaN(Number.parseFloat(rt))?rt:Number.parseFloat(rt),tt=new Set;return this.queryType===QUERY_TYPE.BLENDING_QUERY&&flatten$2(this.loadResponses.map(({query:nt})=>nt.measures)).filter((nt,at,it)=>it.indexOf(nt)!==at).forEach(nt=>tt.add(nt)),this.pivot(j).map(({xValues:rt,yValuesArray:nt})=>{const at={};return nt.forEach(([it,ot],st)=>{at[this.axisValuesString(aliasSeries(it,st,j,tt),",")]=ot&&et(ot)}),{x:this.axisValuesString(rt,","),xValues:rt,...at}})}tablePivot(j){const et=this.normalizePivotConfig(j||{}),tt=et.x.concat(et.y).includes("measures");return this.pivot(et).map(({xValues:rt,yValuesArray:nt})=>fromPairs$3(et.x.map((at,it)=>[at,rt[it]]).concat(tt?nt.map(([at,it])=>[at.length?at.join():"value",it]):[])))}tableColumns(j){const et=this.normalizePivotConfig(j||{}),tt=pipe(pluck$1("annotation"),reduce$1(mergeDeepLeft$1(),{}))(this.loadResponses),rt=Object.values(tt).reduce((lt,ct)=>({...lt,...ct}),{}),nt={},at=lt=>{const{title:ct,shortTitle:ut,type:dt,format:ft,meta:vt}=rt[lt]||{};return{key:lt,title:ct,shortTitle:ut,type:dt,format:ft,meta:vt}},it=this.pivot(et);(it[0]&&it[0].yValuesArray||[]).forEach(([lt])=>{if(lt.length>0){let ct=nt;lt.forEach((ut,dt)=>{ct[`_${ut}`]={key:ut,memberId:et.y[dt]==="measures"?ut:et.y[dt],children:ct[`_${ut}`]&&ct[`_${ut}`].children||{}},ct=ct[`_${ut}`].children})}});const ot=(lt={},ct=[])=>Object.keys(lt).length===0?[]:Object.values(lt).map(({key:ut,...dt})=>{const ft=ot(dt.children,[...ct,ut]),{title:vt,shortTitle:mt,...pt}=at(dt.memberId),ht=ut!==dt.memberId||vt==null?ut:"";return ft.length?{...pt,key:ut,title:[vt,ht].join(" ").trim(),shortTitle:ht||mt,children:ft}:{...pt,key:ut,dataIndex:[...ct,ut].join(),title:[vt,ht].join(" ").trim(),shortTitle:ht||mt}});let st=[];return!it.length&&et.y.includes("measures")&&(st=(this.loadResponses[0].query.measures||[]).map(lt=>({...at(lt),dataIndex:lt}))),!et.y.length&&et.x.includes("measures")&&st.push({key:"value",dataIndex:"value",title:"Value",shortTitle:"Value",type:"string"}),et.x.map(lt=>lt==="measures"?{key:"measures",dataIndex:"measures",title:"Measures",shortTitle:"Measures",type:"string"}:{...at(lt),dataIndex:lt}).concat(ot(nt)).concat(st)}totalRow(j){return this.chartPivot(j)[0]}categories(j){return this.chartPivot(j)}seriesNames(j){j=this.normalizePivotConfig(j);const et=pipe(pluck$1("annotation"),pluck$1("measures"),mergeAll$1)(this.loadResponses),tt=unnest(this.loadResponses.map((nt,at)=>pipe(map$2(this.axisValues(j.y,at)),unnest,uniq$3)(this.timeDimensionBackwardCompatibleData(at)))),rt=new Set;return this.queryType===QUERY_TYPE.BLENDING_QUERY&&flatten$2(this.loadResponses.map(({query:at})=>at.measures)).filter((at,it,ot)=>ot.indexOf(at)!==it).forEach(at=>rt.add(at)),tt.map((nt,at)=>{const it=aliasSeries(nt,at,j,rt);return{title:this.axisValuesString(j.y.find(ot=>ot==="measures")?dropLast$1(1,it).concat(et[ResultSet.measureFromAxis(nt)].title):it,", "),shortTitle:this.axisValuesString(j.y.find(ot=>ot==="measures")?dropLast$1(1,it).concat(et[ResultSet.measureFromAxis(nt)].shortTitle):it,", "),key:this.axisValuesString(it,","),yValues:nt}})}query(){if(this.queryType!==QUERY_TYPE.REGULAR_QUERY)throw new Error(`Method is not supported for a '${this.queryType}' query type. Please use decompose`);return this.loadResponses[0].query}pivotQuery(){return this.loadResponse.pivotQuery||null}rawData(){if(this.queryType!==QUERY_TYPE.REGULAR_QUERY)throw new Error(`Method is not supported for a '${this.queryType}' query type. Please use decompose`);return this.loadResponses[0].data}annotation(){if(this.queryType!==QUERY_TYPE.REGULAR_QUERY)throw new Error(`Method is not supported for a '${this.queryType}' query type. Please use decompose`);return this.loadResponses[0].annotation}timeDimensionBackwardCompatibleData(j){if(j===void 0)throw new Error("resultIndex is required");if(!this.backwardCompatibleData[j]){const{data:et,query:tt}=this.loadResponses[j],rt=(tt.timeDimensions||[]).filter(nt=>Boolean(nt.granularity));this.backwardCompatibleData[j]=et.map(nt=>({...nt,...fromPairs$3(Object.keys(nt).filter(at=>rt.find(it=>it.dimension===at)&&!nt[ResultSet.timeDimensionMember(rt.find(it=>it.dimension===at))]).map(at=>[ResultSet.timeDimensionMember(rt.find(it=>it.dimension===at)),nt[at]]))}))}return this.backwardCompatibleData[j]}decompose(){return this.loadResponses.map(j=>new ResultSet({queryType:QUERY_TYPE.REGULAR_QUERY,pivotQuery:{...j.query,queryType:QUERY_TYPE.REGULAR_QUERY},results:[j]},this.options))}serialize(){return{loadResponse:clone$3(this.loadResponse)}}}class SqlQuery{constructor(j){this.sqlQuery=j}rawQuery(){return this.sqlQuery.sql}sql(){return this.rawQuery().sql[0]}}const memberMap=s=>fromPairs$3(s.map(j=>[j.name,j])),operators={string:[{name:"contains",title:"contains"},{name:"notContains",title:"does not contain"},{name:"equals",title:"equals"},{name:"notEquals",title:"does not equal"},{name:"set",title:"is set"},{name:"notSet",title:"is not set"},{name:"startsWith",title:"starts with"},{name:"notStartsWith",title:"does not start with"},{name:"endsWith",title:"ends with"},{name:"notEndsWith",title:"does not end with"}],number:[{name:"equals",title:"equals"},{name:"notEquals",title:"does not equal"},{name:"set",title:"is set"},{name:"notSet",title:"is not set"},{name:"gt",title:">"},{name:"gte",title:">="},{name:"lt",title:"<"},{name:"lte",title:"<="}],time:[{name:"equals",title:"equals"},{name:"notEquals",title:"does not equal"},{name:"inDateRange",title:"in date range"},{name:"notInDateRange",title:"not in date range"},{name:"afterDate",title:"after date"},{name:"beforeDate",title:"before date"}]};class Meta{constructor(j){this.meta=j;const{cubes:et}=this.meta;this.cubes=et,this.cubesMap=fromPairs$3(et.map(tt=>[tt.name,{measures:memberMap(tt.measures),dimensions:memberMap(tt.dimensions),segments:memberMap(tt.segments)}]))}membersForQuery(j,et){return unnest$1$1(this.cubes.map(tt=>tt[et])).sort((tt,rt)=>tt.title>rt.title?1:-1)}membersGroupedByCube(){const j=["measures","dimensions","segments","timeDimensions"];return this.cubes.reduce((et,tt)=>(j.forEach(rt=>{let nt=tt[rt];rt==="timeDimensions"&&(nt=tt.dimensions.filter(at=>at.type==="time")),et[rt]=[...et[rt],{cubeName:tt.name,cubeTitle:tt.title,type:tt.type,public:tt.public,members:nt}]}),et),{measures:[],dimensions:[],segments:[],timeDimensions:[]})}resolveMember(j,et){const[tt]=j.split(".");if(!this.cubesMap[tt])return{title:j,error:`Cube not found ${tt} for path '${j}'`};const nt=(Array.isArray(et)?et:[et]).map(at=>this.cubesMap[tt][at]&&this.cubesMap[tt][at][j]).find(at=>at);return nt||{title:j,error:`Path not found '${j}'`}}defaultTimeDimensionNameFor(j){const[et]=j.split(".");return this.cubesMap[et]?Object.keys(this.cubesMap[et].dimensions||{}).find(tt=>this.cubesMap[et].dimensions[tt].type==="time"):null}filterOperatorsForMember(j,et){const tt=this.resolveMember(j,et);return operators[tt.type]||operators.string}}class ProgressResult{constructor(j){this.progressResponse=j}stage(){return this.progressResponse.stage}timeElapsed(){return this.progressResponse.timeElapsed}}class HttpTransport{constructor({authorization:j,apiUrl:et,method:tt,headers:rt={},credentials:nt}){this.authorization=j,this.apiUrl=et,this.method=tt,this.headers=rt,this.credentials=nt}request(j,{baseRequestId:et,...tt}){let rt=1;const nt=new URLSearchParams(tt&&Object.keys(tt).map(st=>({[st]:typeof tt[st]=="object"?JSON.stringify(tt[st]):tt[st]})).reduce((st,lt)=>({...st,...lt}),{}));let at=`${this.apiUrl}/${j}${nt.toString().length?`?${nt}`:""}`;const it=this.method||(at.length<2e3?"GET":"POST");it==="POST"&&(at=`${this.apiUrl}/${j}`,this.headers["Content-Type"]="application/json");const ot=()=>fetch$1(at,{method:it,headers:{Authorization:this.authorization,"x-request-id":et&&`${et}-span-${rt++}`,...this.headers},credentials:this.credentials,body:it==="POST"?JSON.stringify(tt):null});return{async subscribe(st){let lt={error:"network Error"};try{lt=await ot()}finally{return st(lt,()=>this.subscribe(st))}}}}}class RequestError extends Error{constructor(j,et,tt){super(j),this.response=et,this.status=tt}}let mutexCounter=0;const MUTEX_ERROR="Mutex has been changed",ResultType={DEFAULT:"default",COMPACT:"compact"};function mutexPromise(s){return new Promise(async(j,et)=>{try{j(await s)}catch(tt){tt!==MUTEX_ERROR&&et(tt)}})}class CubejsApi{constructor(j,et){if(j!==null&&!Array.isArray(j)&&typeof j=="object"&&(et=j,j=void 0),et=et||{},!et.transport&&!et.apiUrl)throw new Error("The `apiUrl` option is required");this.apiToken=j,this.apiUrl=et.apiUrl,this.method=et.method,this.headers=et.headers||{},this.credentials=et.credentials,this.transport=et.transport||new HttpTransport({authorization:typeof j=="function"?void 0:j,apiUrl:this.apiUrl,method:this.method,headers:this.headers,credentials:this.credentials}),this.pollInterval=et.pollInterval||5,this.parseDateMeasures=et.parseDateMeasures,this.updateAuthorizationPromise=null}request(j,et){return this.transport.request(j,{baseRequestId:v4(),...et})}loadMethod(j,et,tt,rt){const nt=++mutexCounter;typeof tt=="function"&&!rt&&(rt=tt,tt=void 0),tt=tt||{};const at=tt.mutexKey||"default";tt.mutexObj&&(tt.mutexObj[at]=nt);const it=this.updateTransportAuthorization().then(()=>j());let ot=!0,st=!1;const lt=async()=>{const dt=await it;if(tt.mutexObj&&tt.mutexObj[at]!==nt)throw st=!0,dt.unsubscribe&&await dt.unsubscribe(),MUTEX_ERROR},ct=async(dt,ft)=>{const vt=await it,mt=async()=>tt.subscribe&&!st?(vt.unsubscribe||await new Promise(xt=>setTimeout(()=>xt(),this.pollInterval*1e3)),ft()):null,pt=async xt=>st?null:(xt&&await new Promise(Ct=>setTimeout(()=>Ct(),this.pollInterval*1e3)),ft());if(tt.subscribe&&!ot&&await this.updateTransportAuthorization(),ot=!1,dt.status===502)return await lt(),pt(!0);let ht={},gt="";try{gt=await dt.text(),ht=JSON.parse(gt)}catch(xt){ht.error=gt}if(ht.error==="Continue wait")return await lt(),tt.progressCallback&&tt.progressCallback(new ProgressResult(ht)),pt();if(dt.status!==200){await lt(),!tt.subscribe&&vt.unsubscribe&&await vt.unsubscribe();const xt=new RequestError(ht.error,ht,dt.status);if(rt)rt(xt);else throw xt;return mt()}await lt(),!tt.subscribe&&vt.unsubscribe&&await vt.unsubscribe();const yt=et(ht);if(rt)rt(null,yt);else return yt;return mt()},ut=it.then(dt=>mutexPromise(dt.subscribe(ct)));return rt?{unsubscribe:async()=>{const dt=await it;return st=!0,dt.unsubscribe?dt.unsubscribe():null}}:ut}async updateTransportAuthorization(){if(this.updateAuthorizationPromise){await this.updateAuthorizationPromise;return}typeof this.apiToken=="function"&&(this.updateAuthorizationPromise=new Promise(async(j,et)=>{try{const tt=await this.apiToken();this.transport.authorization!==tt&&(this.transport.authorization=tt),j()}catch(tt){et(tt)}finally{this.updateAuthorizationPromise=null}}),await this.updateAuthorizationPromise)}patchQueryInternal(j,et){return et===ResultType.COMPACT&&j.responseFormat!==ResultType.COMPACT?{...j,responseFormat:ResultType.COMPACT}:j}loadResponseInternal(j,et={}){return j.results.length&&(et.castNumerics&&j.results.forEach(tt=>{const rt=Object.entries({...tt.annotation.measures,...tt.annotation.dimensions}).map(([nt,at])=>{if(at.type==="number")return nt}).filter(Boolean);tt.data=tt.data.map(nt=>(rt.forEach(at=>{nt[at]!=null&&(nt[at]=Number(nt[at]))}),nt))}),j.results[0].query.responseFormat&&j.results[0].query.responseFormat===ResultType.COMPACT&&j.results.forEach((tt,rt)=>{const nt=[];tt.data.dataset.forEach(at=>{const it={};tt.data.members.forEach((ot,st)=>{it[ot]=at[st]}),nt.push(it)}),j.results[rt].data=nt})),new ResultSet(j,{parseDateMeasures:this.parseDateMeasures})}load(j,et,tt,rt=ResultType.DEFAULT){return rt===ResultType.COMPACT&&(Array.isArray(j)?j=j.map(nt=>this.patchQueryInternal(nt,ResultType.COMPACT)):j=this.patchQueryInternal(j,ResultType.COMPACT)),this.loadMethod(()=>this.request("load",{query:j,queryType:"multi"}),nt=>this.loadResponseInternal(nt,et),et,tt)}subscribe(j,et,tt,rt=ResultType.DEFAULT){return rt===ResultType.COMPACT&&(Array.isArray(j)?j=j.map(nt=>this.patchQueryInternal(nt,ResultType.COMPACT)):j=this.patchQueryInternal(j,ResultType.COMPACT)),this.loadMethod(()=>this.request("subscribe",{query:j,queryType:"multi"}),nt=>this.loadResponseInternal(nt,et),{...et,subscribe:!0},tt)}sql(j,et,tt){return this.loadMethod(()=>this.request("sql",{query:j}),rt=>Array.isArray(rt)?rt.map(nt=>new SqlQuery(nt)):new SqlQuery(rt),et,tt)}meta(j,et){return this.loadMethod(()=>this.request("meta"),tt=>new Meta(tt),j,et)}dryRun(j,et,tt){return this.loadMethod(()=>this.request("dry-run",{query:j}),rt=>rt,et,tt)}}var index=(s,j)=>new CubejsApi(s,j);function useCubejsApi(s,j){return react.exports.useMemo(()=>!j||!s||j==="undefined"?null:index(j,{apiUrl:s}),[s,j])}var fastDeepEqual=function s(j,et){if(j===et)return!0;if(j&&et&&typeof j=="object"&&typeof et=="object"){if(j.constructor!==et.constructor)return!1;var tt,rt,nt;if(Array.isArray(j)){if(tt=j.length,tt!=et.length)return!1;for(rt=tt;rt--!==0;)if(!s(j[rt],et[rt]))return!1;return!0}if(j.constructor===RegExp)return j.source===et.source&&j.flags===et.flags;if(j.valueOf!==Object.prototype.valueOf)return j.valueOf()===et.valueOf();if(j.toString!==Object.prototype.toString)return j.toString()===et.toString();if(nt=Object.keys(j),tt=nt.length,tt!==Object.keys(et).length)return!1;for(rt=tt;rt--!==0;)if(!Object.prototype.hasOwnProperty.call(et,nt[rt]))return!1;for(rt=tt;rt--!==0;){var at=nt[rt];if(!s(j[at],et[at]))return!1}return!0}return j!==j&&et!==et};function useDeepDependencies(s){const j=react.exports.useRef();return fastDeepEqual(j.current,s)||(j.current=s),j.current}function useDeepEffect(s,j){const et=useDeepDependencies(j);return react.exports.useEffect(s,et)}function useDeepMemo(s,j){const et=useDeepDependencies(j);return react.exports.useMemo(s,et)}function useIdentifier(){const{identifier:s}=useAppContext();return s||""}function useIsMounted$1(){const s=react.exports.useRef(!1),j=react.exports.useCallback(()=>s.current,[]);return react.exports.useEffect(()=>(s.current=!0,()=>{s.current=!1}),[]),j}function playgroundFetch(s,j={}){const{retries:et=0,...tt}=j;return fetch(s,tt).then(async rt=>{if(rt.status===500){let nt=await rt.text();try{nt=JSON.parse(nt).error}catch(at){}throw nt}return rt}).catch(rt=>{if(rt.message==="Network request failed"&&et>0)return playgroundFetch(s,{options:j,retries:et-1});throw rt})}function openWindow({url:s,title:j="",width:et=640,height:tt=720}){var ut;const rt=window.screenLeft!==void 0?window.screenLeft:window.screenX,nt=window.screenTop!==void 0?window.screenTop:window.screenY,at=window.innerWidth?window.innerWidth:document.documentElement.clientWidth?document.documentElement.clientWidth:screen.width,it=window.innerHeight?window.innerHeight:document.documentElement.clientHeight?document.documentElement.clientHeight:screen.height,ot=at/window.screen.availWidth,st=(at-et)/2/ot+rt,lt=(it-tt)/2/ot+nt,ct=window.open(s,j,`
256
+ `,AppContext$1=react.exports.createContext({});function AppContextProvider({children:s,...j}){const[et,tt]=react.exports.useState(j||null),rt=react.exports.useCallback(nt=>{tt(at=>({...at,...nt,playgroundContext:{...at==null?void 0:at.playgroundContext,...nt==null?void 0:nt.playgroundContext}}))},[]);return jsx(AppContext$1.Provider,{value:{apiUrl:null,schemaVersion:0,ready:!1,...et,token:(et==null?void 0:et.token)||null,playgroundContext:(et==null?void 0:et.playgroundContext)||{},setContext:rt},children:s})}function AppContextConsumer({onReady:s}){const j=useAppContext();return react.exports.useEffect(()=>{s(j)},[j]),null}function useAppContext(){return react.exports.useContext(AppContext$1)}function usePlaygroundContext(){const{playgroundContext:s}=useAppContext();return s}function useToken(){const{token:s}=useAppContext();return s}var getRandomValues,rnds8=new Uint8Array(16);function rng(){if(!getRandomValues&&(getRandomValues=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!getRandomValues))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return getRandomValues(rnds8)}const REGEX=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function validate(s){return typeof s=="string"&&REGEX.test(s)}var byteToHex=[];for(var i$1=0;i$1<256;++i$1)byteToHex.push((i$1+256).toString(16).substr(1));function stringify(s){var j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,et=(byteToHex[s[j+0]]+byteToHex[s[j+1]]+byteToHex[s[j+2]]+byteToHex[s[j+3]]+"-"+byteToHex[s[j+4]]+byteToHex[s[j+5]]+"-"+byteToHex[s[j+6]]+byteToHex[s[j+7]]+"-"+byteToHex[s[j+8]]+byteToHex[s[j+9]]+"-"+byteToHex[s[j+10]]+byteToHex[s[j+11]]+byteToHex[s[j+12]]+byteToHex[s[j+13]]+byteToHex[s[j+14]]+byteToHex[s[j+15]]).toLowerCase();if(!validate(et))throw TypeError("Stringified UUID is invalid");return et}function v4(s,j,et){s=s||{};var tt=s.random||(s.rng||rng)();if(tt[6]=tt[6]&15|64,tt[8]=tt[8]&63|128,j){et=et||0;for(var rt=0;rt<16;++rt)j[et+rt]=tt[rt];return j}return stringify(tt)}var dayjs_min={exports:{}};(function(s,j){(function(et,tt){s.exports=tt()})(commonjsGlobal$1,function(){var et=1e3,tt=6e4,rt=36e5,nt="millisecond",at="second",it="minute",ot="hour",st="day",lt="week",ct="month",ut="quarter",dt="year",ft="date",vt="Invalid Date",mt=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,pt=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,ht={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},gt=function(Tt,wt,Et){var Dt=String(Tt);return!Dt||Dt.length>=wt?Tt:""+Array(wt+1-Dt.length).join(Et)+Tt},yt={s:gt,z:function(Tt){var wt=-Tt.utcOffset(),Et=Math.abs(wt),Dt=Math.floor(Et/60),jt=Et%60;return(wt<=0?"+":"-")+gt(Dt,2,"0")+":"+gt(jt,2,"0")},m:function Tt(wt,Et){if(wt.date()<Et.date())return-Tt(Et,wt);var Dt=12*(Et.year()-wt.year())+(Et.month()-wt.month()),jt=wt.clone().add(Dt,ct),Rt=Et-jt<0,At=wt.clone().add(Dt+(Rt?-1:1),ct);return+(-(Dt+(Et-jt)/(Rt?jt-At:At-jt))||0)},a:function(Tt){return Tt<0?Math.ceil(Tt)||0:Math.floor(Tt)},p:function(Tt){return{M:ct,y:dt,w:lt,d:st,D:ft,h:ot,m:it,s:at,ms:nt,Q:ut}[Tt]||String(Tt||"").toLowerCase().replace(/s$/,"")},u:function(Tt){return Tt===void 0}},xt="en",Ct={};Ct[xt]=ht;var St=function(Tt){return Tt instanceof Pt},bt=function(Tt,wt,Et){var Dt;if(!Tt)return xt;if(typeof Tt=="string")Ct[Tt]&&(Dt=Tt),wt&&(Ct[Tt]=wt,Dt=Tt);else{var jt=Tt.name;Ct[jt]=Tt,Dt=jt}return!Et&&Dt&&(xt=Dt),Dt||!Et&&xt},$t=function(Tt,wt){if(St(Tt))return Tt.clone();var Et=typeof wt=="object"?wt:{};return Et.date=Tt,Et.args=arguments,new Pt(Et)},Ot=yt;Ot.l=bt,Ot.i=St,Ot.w=function(Tt,wt){return $t(Tt,{locale:wt.$L,utc:wt.$u,x:wt.$x,$offset:wt.$offset})};var Pt=function(){function Tt(Et){this.$L=bt(Et.locale,null,!0),this.parse(Et)}var wt=Tt.prototype;return wt.parse=function(Et){this.$d=function(Dt){var jt=Dt.date,Rt=Dt.utc;if(jt===null)return new Date(NaN);if(Ot.u(jt))return new Date;if(jt instanceof Date)return new Date(jt);if(typeof jt=="string"&&!/Z$/i.test(jt)){var At=jt.match(mt);if(At){var It=At[2]-1||0,kt=(At[7]||"0").substring(0,3);return Rt?new Date(Date.UTC(At[1],It,At[3]||1,At[4]||0,At[5]||0,At[6]||0,kt)):new Date(At[1],It,At[3]||1,At[4]||0,At[5]||0,At[6]||0,kt)}}return new Date(jt)}(Et),this.$x=Et.x||{},this.init()},wt.init=function(){var Et=this.$d;this.$y=Et.getFullYear(),this.$M=Et.getMonth(),this.$D=Et.getDate(),this.$W=Et.getDay(),this.$H=Et.getHours(),this.$m=Et.getMinutes(),this.$s=Et.getSeconds(),this.$ms=Et.getMilliseconds()},wt.$utils=function(){return Ot},wt.isValid=function(){return this.$d.toString()!==vt},wt.isSame=function(Et,Dt){var jt=$t(Et);return this.startOf(Dt)<=jt&&jt<=this.endOf(Dt)},wt.isAfter=function(Et,Dt){return $t(Et)<this.startOf(Dt)},wt.isBefore=function(Et,Dt){return this.endOf(Dt)<$t(Et)},wt.$g=function(Et,Dt,jt){return Ot.u(Et)?this[Dt]:this.set(jt,Et)},wt.unix=function(){return Math.floor(this.valueOf()/1e3)},wt.valueOf=function(){return this.$d.getTime()},wt.startOf=function(Et,Dt){var jt=this,Rt=!!Ot.u(Dt)||Dt,At=Ot.p(Et),It=function(Ut,Vt){var zt=Ot.w(jt.$u?Date.UTC(jt.$y,Vt,Ut):new Date(jt.$y,Vt,Ut),jt);return Rt?zt:zt.endOf(st)},kt=function(Ut,Vt){return Ot.w(jt.toDate()[Ut].apply(jt.toDate("s"),(Rt?[0,0,0,0]:[23,59,59,999]).slice(Vt)),jt)},_t=this.$W,Mt=this.$M,Ft=this.$D,qt="set"+(this.$u?"UTC":"");switch(At){case dt:return Rt?It(1,0):It(31,11);case ct:return Rt?It(1,Mt):It(0,Mt+1);case lt:var Lt=this.$locale().weekStart||0,Bt=(_t<Lt?_t+7:_t)-Lt;return It(Rt?Ft-Bt:Ft+(6-Bt),Mt);case st:case ft:return kt(qt+"Hours",0);case ot:return kt(qt+"Minutes",1);case it:return kt(qt+"Seconds",2);case at:return kt(qt+"Milliseconds",3);default:return this.clone()}},wt.endOf=function(Et){return this.startOf(Et,!1)},wt.$set=function(Et,Dt){var jt,Rt=Ot.p(Et),At="set"+(this.$u?"UTC":""),It=(jt={},jt[st]=At+"Date",jt[ft]=At+"Date",jt[ct]=At+"Month",jt[dt]=At+"FullYear",jt[ot]=At+"Hours",jt[it]=At+"Minutes",jt[at]=At+"Seconds",jt[nt]=At+"Milliseconds",jt)[Rt],kt=Rt===st?this.$D+(Dt-this.$W):Dt;if(Rt===ct||Rt===dt){var _t=this.clone().set(ft,1);_t.$d[It](kt),_t.init(),this.$d=_t.set(ft,Math.min(this.$D,_t.daysInMonth())).$d}else It&&this.$d[It](kt);return this.init(),this},wt.set=function(Et,Dt){return this.clone().$set(Et,Dt)},wt.get=function(Et){return this[Ot.p(Et)]()},wt.add=function(Et,Dt){var jt,Rt=this;Et=Number(Et);var At=Ot.p(Dt),It=function(Mt){var Ft=$t(Rt);return Ot.w(Ft.date(Ft.date()+Math.round(Mt*Et)),Rt)};if(At===ct)return this.set(ct,this.$M+Et);if(At===dt)return this.set(dt,this.$y+Et);if(At===st)return It(1);if(At===lt)return It(7);var kt=(jt={},jt[it]=tt,jt[ot]=rt,jt[at]=et,jt)[At]||1,_t=this.$d.getTime()+Et*kt;return Ot.w(_t,this)},wt.subtract=function(Et,Dt){return this.add(-1*Et,Dt)},wt.format=function(Et){var Dt=this,jt=this.$locale();if(!this.isValid())return jt.invalidDate||vt;var Rt=Et||"YYYY-MM-DDTHH:mm:ssZ",At=Ot.z(this),It=this.$H,kt=this.$m,_t=this.$M,Mt=jt.weekdays,Ft=jt.months,qt=function(Vt,zt,Kt,Wt){return Vt&&(Vt[zt]||Vt(Dt,Rt))||Kt[zt].substr(0,Wt)},Lt=function(Vt){return Ot.s(It%12||12,Vt,"0")},Bt=jt.meridiem||function(Vt,zt,Kt){var Wt=Vt<12?"AM":"PM";return Kt?Wt.toLowerCase():Wt},Ut={YY:String(this.$y).slice(-2),YYYY:this.$y,M:_t+1,MM:Ot.s(_t+1,2,"0"),MMM:qt(jt.monthsShort,_t,Ft,3),MMMM:qt(Ft,_t),D:this.$D,DD:Ot.s(this.$D,2,"0"),d:String(this.$W),dd:qt(jt.weekdaysMin,this.$W,Mt,2),ddd:qt(jt.weekdaysShort,this.$W,Mt,3),dddd:Mt[this.$W],H:String(It),HH:Ot.s(It,2,"0"),h:Lt(1),hh:Lt(2),a:Bt(It,kt,!0),A:Bt(It,kt,!1),m:String(kt),mm:Ot.s(kt,2,"0"),s:String(this.$s),ss:Ot.s(this.$s,2,"0"),SSS:Ot.s(this.$ms,3,"0"),Z:At};return Rt.replace(pt,function(Vt,zt){return zt||Ut[Vt]||At.replace(":","")})},wt.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},wt.diff=function(Et,Dt,jt){var Rt,At=Ot.p(Dt),It=$t(Et),kt=(It.utcOffset()-this.utcOffset())*tt,_t=this-It,Mt=Ot.m(this,It);return Mt=(Rt={},Rt[dt]=Mt/12,Rt[ct]=Mt,Rt[ut]=Mt/3,Rt[lt]=(_t-kt)/6048e5,Rt[st]=(_t-kt)/864e5,Rt[ot]=_t/rt,Rt[it]=_t/tt,Rt[at]=_t/et,Rt)[At]||_t,jt?Mt:Ot.a(Mt)},wt.daysInMonth=function(){return this.endOf(ct).$D},wt.$locale=function(){return Ct[this.$L]},wt.locale=function(Et,Dt){if(!Et)return this.$L;var jt=this.clone(),Rt=bt(Et,Dt,!0);return Rt&&(jt.$L=Rt),jt},wt.clone=function(){return Ot.w(this.$d,this)},wt.toDate=function(){return new Date(this.valueOf())},wt.toJSON=function(){return this.isValid()?this.toISOString():null},wt.toISOString=function(){return this.$d.toISOString()},wt.toString=function(){return this.$d.toUTCString()},Tt}(),Nt=Pt.prototype;return $t.prototype=Nt,[["$ms",nt],["$s",at],["$m",it],["$H",ot],["$W",st],["$M",ct],["$y",dt],["$D",ft]].forEach(function(Tt){Nt[Tt[1]]=function(wt){return this.$g(wt,Tt[0],Tt[1])}}),$t.extend=function(Tt,wt){return Tt.$i||(Tt(wt,Pt,$t),Tt.$i=!0),$t},$t.locale=bt,$t.isDayjs=St,$t.unix=function(Tt){return $t(1e3*Tt)},$t.en=Ct[xt],$t.Ls=Ct,$t.p={},$t})})(dayjs_min);const dayjs=dayjs_min.exports;var quarterOfYear$1={exports:{}};(function(s,j){(function(et,tt){s.exports=tt()})(commonjsGlobal$1,function(){var et="month",tt="quarter";return function(rt,nt){var at=nt.prototype;at.quarter=function(st){return this.$utils().u(st)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(st-1))};var it=at.add;at.add=function(st,lt){return st=Number(st),this.$utils().p(lt)===tt?this.add(3*st,et):it.bind(this)(st,lt)};var ot=at.startOf;at.startOf=function(st,lt){var ct=this.$utils(),ut=!!ct.u(lt)||lt;if(ct.p(st)===tt){var dt=this.quarter()-1;return ut?this.month(3*dt).startOf(et).startOf("day"):this.month(3*dt+2).endOf(et).endOf("day")}return ot.bind(this)(st,lt)}}})})(quarterOfYear$1);const quarterOfYear=quarterOfYear$1.exports;var en$1={exports:{}};(function(s,j){(function(et,tt){s.exports=tt()})(commonjsGlobal$1,function(){return{name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")}})})(en$1);const en=en$1.exports;function _isPlaceholder$1(s){return s!=null&&typeof s=="object"&&s["@@functional/placeholder"]===!0}function _curry1$1(s){return function j(et){return arguments.length===0||_isPlaceholder$1(et)?j:s.apply(this,arguments)}}function _curry2$1(s){return function j(et,tt){switch(arguments.length){case 0:return j;case 1:return _isPlaceholder$1(et)?j:_curry1$1(function(rt){return s(et,rt)});default:return _isPlaceholder$1(et)&&_isPlaceholder$1(tt)?j:_isPlaceholder$1(et)?_curry1$1(function(rt){return s(rt,tt)}):_isPlaceholder$1(tt)?_curry1$1(function(rt){return s(et,rt)}):s(et,tt)}}}function _arity$1(s,j){switch(s){case 0:return function(){return j.apply(this,arguments)};case 1:return function(et){return j.apply(this,arguments)};case 2:return function(et,tt){return j.apply(this,arguments)};case 3:return function(et,tt,rt){return j.apply(this,arguments)};case 4:return function(et,tt,rt,nt){return j.apply(this,arguments)};case 5:return function(et,tt,rt,nt,at){return j.apply(this,arguments)};case 6:return function(et,tt,rt,nt,at,it){return j.apply(this,arguments)};case 7:return function(et,tt,rt,nt,at,it,ot){return j.apply(this,arguments)};case 8:return function(et,tt,rt,nt,at,it,ot,st){return j.apply(this,arguments)};case 9:return function(et,tt,rt,nt,at,it,ot,st,lt){return j.apply(this,arguments)};case 10:return function(et,tt,rt,nt,at,it,ot,st,lt,ct){return j.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}function _curryN$1(s,j,et){return function(){for(var tt=[],rt=0,nt=s,at=0;at<j.length||rt<arguments.length;){var it;at<j.length&&(!_isPlaceholder$1(j[at])||rt>=arguments.length)?it=j[at]:(it=arguments[rt],rt+=1),tt[at]=it,_isPlaceholder$1(it)||(nt-=1),at+=1}return nt<=0?et.apply(this,tt):_arity$1(nt,_curryN$1(s,tt,et))}}var curryN=_curry2$1(function(j,et){return j===1?_curry1$1(et):_arity$1(j,_curryN$1(j,[],et))});const curryN$1=curryN;function _curry3(s){return function j(et,tt,rt){switch(arguments.length){case 0:return j;case 1:return _isPlaceholder$1(et)?j:_curry2$1(function(nt,at){return s(et,nt,at)});case 2:return _isPlaceholder$1(et)&&_isPlaceholder$1(tt)?j:_isPlaceholder$1(et)?_curry2$1(function(nt,at){return s(nt,tt,at)}):_isPlaceholder$1(tt)?_curry2$1(function(nt,at){return s(et,nt,at)}):_curry1$1(function(nt){return s(et,tt,nt)});default:return _isPlaceholder$1(et)&&_isPlaceholder$1(tt)&&_isPlaceholder$1(rt)?j:_isPlaceholder$1(et)&&_isPlaceholder$1(tt)?_curry2$1(function(nt,at){return s(nt,at,rt)}):_isPlaceholder$1(et)&&_isPlaceholder$1(rt)?_curry2$1(function(nt,at){return s(nt,tt,at)}):_isPlaceholder$1(tt)&&_isPlaceholder$1(rt)?_curry2$1(function(nt,at){return s(et,nt,at)}):_isPlaceholder$1(et)?_curry1$1(function(nt){return s(nt,tt,rt)}):_isPlaceholder$1(tt)?_curry1$1(function(nt){return s(et,nt,rt)}):_isPlaceholder$1(rt)?_curry1$1(function(nt){return s(et,tt,nt)}):s(et,tt,rt)}}}const _isArray$1=Array.isArray||function(j){return j!=null&&j.length>=0&&Object.prototype.toString.call(j)==="[object Array]"};function _isTransformer$1(s){return s!=null&&typeof s["@@transducer/step"]=="function"}function _dispatchable$1(s,j,et){return function(){if(arguments.length===0)return et();var tt=Array.prototype.slice.call(arguments,0),rt=tt.pop();if(!_isArray$1(rt)){for(var nt=0;nt<s.length;){if(typeof rt[s[nt]]=="function")return rt[s[nt]].apply(rt,tt);nt+=1}if(_isTransformer$1(rt)){var at=j.apply(null,tt);return at(rt)}}return et.apply(this,arguments)}}function _reduced(s){return s&&s["@@transducer/reduced"]?s:{"@@transducer/value":s,"@@transducer/reduced":!0}}const _xfBase$1={init:function(){return this.xf["@@transducer/init"]()},result:function(s){return this.xf["@@transducer/result"](s)}};function _map(s,j){for(var et=0,tt=j.length,rt=Array(tt);et<tt;)rt[et]=s(j[et]),et+=1;return rt}function _isString$1(s){return Object.prototype.toString.call(s)==="[object String]"}var _isArrayLike$2=_curry1$1(function(j){return _isArray$1(j)?!0:!j||typeof j!="object"||_isString$1(j)?!1:j.nodeType===1?!!j.length:j.length===0?!0:j.length>0?j.hasOwnProperty(0)&&j.hasOwnProperty(j.length-1):!1});const _isArrayLike$3=_isArrayLike$2;var XWrap$1=function(){function s(j){this.f=j}return s.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},s.prototype["@@transducer/result"]=function(j){return j},s.prototype["@@transducer/step"]=function(j,et){return this.f(j,et)},s}();function _xwrap$1(s){return new XWrap$1(s)}var bind$2=_curry2$1(function(j,et){return _arity$1(j.length,function(){return j.apply(et,arguments)})});const bind$3=bind$2;function _arrayReduce$1(s,j,et){for(var tt=0,rt=et.length;tt<rt;){if(j=s["@@transducer/step"](j,et[tt]),j&&j["@@transducer/reduced"]){j=j["@@transducer/value"];break}tt+=1}return s["@@transducer/result"](j)}function _iterableReduce$1(s,j,et){for(var tt=et.next();!tt.done;){if(j=s["@@transducer/step"](j,tt.value),j&&j["@@transducer/reduced"]){j=j["@@transducer/value"];break}tt=et.next()}return s["@@transducer/result"](j)}function _methodReduce$1(s,j,et,tt){return s["@@transducer/result"](et[tt](bind$3(s["@@transducer/step"],s),j))}var symIterator$1=typeof Symbol!="undefined"?Symbol.iterator:"@@iterator";function _reduce$1(s,j,et){if(typeof s=="function"&&(s=_xwrap$1(s)),_isArrayLike$3(et))return _arrayReduce$1(s,j,et);if(typeof et["fantasy-land/reduce"]=="function")return _methodReduce$1(s,j,et,"fantasy-land/reduce");if(et[symIterator$1]!=null)return _iterableReduce$1(s,j,et[symIterator$1]());if(typeof et.next=="function")return _iterableReduce$1(s,j,et);if(typeof et.reduce=="function")return _methodReduce$1(s,j,et,"reduce");throw new TypeError("reduce: list must be array or iterable")}var XMap=function(){function s(j,et){this.xf=et,this.f=j}return s.prototype["@@transducer/init"]=_xfBase$1.init,s.prototype["@@transducer/result"]=_xfBase$1.result,s.prototype["@@transducer/step"]=function(j,et){return this.xf["@@transducer/step"](j,this.f(et))},s}(),_xmap=_curry2$1(function(j,et){return new XMap(j,et)});const _xmap$1=_xmap;function _has$1(s,j){return Object.prototype.hasOwnProperty.call(j,s)}var toString$1=Object.prototype.toString,_isArguments$2=function(){return toString$1.call(arguments)==="[object Arguments]"?function(j){return toString$1.call(j)==="[object Arguments]"}:function(j){return _has$1("callee",j)}}();const _isArguments$3=_isArguments$2;var hasEnumBug$1=!{toString:null}.propertyIsEnumerable("toString"),nonEnumerableProps$1=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],hasArgsEnumBug$1=function(){return arguments.propertyIsEnumerable("length")}(),contains$1=function(j,et){for(var tt=0;tt<j.length;){if(j[tt]===et)return!0;tt+=1}return!1},keys$2=_curry1$1(typeof Object.keys=="function"&&!hasArgsEnumBug$1?function(j){return Object(j)!==j?[]:Object.keys(j)}:function(j){if(Object(j)!==j)return[];var et,tt,rt=[],nt=hasArgsEnumBug$1&&_isArguments$3(j);for(et in j)_has$1(et,j)&&(!nt||et!=="length")&&(rt[rt.length]=et);if(hasEnumBug$1)for(tt=nonEnumerableProps$1.length-1;tt>=0;)et=nonEnumerableProps$1[tt],_has$1(et,j)&&!contains$1(rt,et)&&(rt[rt.length]=et),tt-=1;return rt});const keys$3=keys$2;var map$1=_curry2$1(_dispatchable$1(["fantasy-land/map","map"],_xmap$1,function(j,et){switch(Object.prototype.toString.call(et)){case"[object Function]":return curryN$1(et.length,function(){return j.call(this,et.apply(this,arguments))});case"[object Object]":return _reduce$1(function(tt,rt){return tt[rt]=j(et[rt]),tt},{},keys$3(et));default:return _map(j,et)}}));const map$2=map$1,_isInteger$1=Number.isInteger||function(j){return j<<0===j};var nth$2=_curry2$1(function(j,et){var tt=j<0?et.length+j:j;return _isString$1(et)?et.charAt(tt):et[tt]});const nth$3=nth$2;var paths$2=_curry2$1(function(j,et){return j.map(function(tt){for(var rt=et,nt=0,at;nt<tt.length;){if(rt==null)return;at=tt[nt],rt=_isInteger$1(at)?nth$3(at,rt):rt[at],nt+=1}return rt})});const paths$3=paths$2;var path$2=_curry2$1(function(j,et){return paths$3([j],et)[0]});const path$3=path$2;var prop$2=_curry2$1(function(j,et){return path$3([j],et)});const prop$3=prop$2;var pluck=_curry2$1(function(j,et){return map$2(prop$3(j),et)});const pluck$1=pluck;var reduce=_curry3(_reduce$1);const reduce$1=reduce;function _makeFlat(s){return function j(et){for(var tt,rt,nt,at=[],it=0,ot=et.length;it<ot;){if(_isArrayLike$3(et[it]))for(tt=s?j(et[it]):et[it],nt=0,rt=tt.length;nt<rt;)at[at.length]=tt[nt],nt+=1;else at[at.length]=et[it];it+=1}return at}}function _forceReduced(s){return{"@@transducer/value":s,"@@transducer/reduced":!0}}var preservingReduced=function(s){return{"@@transducer/init":_xfBase$1.init,"@@transducer/result":function(j){return s["@@transducer/result"](j)},"@@transducer/step":function(j,et){var tt=s["@@transducer/step"](j,et);return tt["@@transducer/reduced"]?_forceReduced(tt):tt}}},_flatCat=function(j){var et=preservingReduced(j);return{"@@transducer/init":_xfBase$1.init,"@@transducer/result":function(tt){return et["@@transducer/result"](tt)},"@@transducer/step":function(tt,rt){return _isArrayLike$3(rt)?_reduce$1(et,tt,rt):_reduce$1(et,tt,[rt])}}};const _flatCat$1=_flatCat;var _xchain=_curry2$1(function(j,et){return map$2(j,_flatCat$1(et))});const _xchain$1=_xchain;var chain=_curry2$1(_dispatchable$1(["fantasy-land/chain","chain"],_xchain$1,function(j,et){return typeof et=="function"?function(tt){return j(et(tt))(tt)}:_makeFlat(!1)(map$2(j,et))}));const chain$1=chain;function _cloneRegExp$1(s){return new RegExp(s.source,(s.global?"g":"")+(s.ignoreCase?"i":"")+(s.multiline?"m":"")+(s.sticky?"y":"")+(s.unicode?"u":""))}var type$4=_curry1$1(function(j){return j===null?"Null":j===void 0?"Undefined":Object.prototype.toString.call(j).slice(8,-1)});const type$5=type$4;function _clone$1(s,j,et,tt){var rt=function(at){for(var it=j.length,ot=0;ot<it;){if(s===j[ot])return et[ot];ot+=1}j[ot+1]=s,et[ot+1]=at;for(var st in s)at[st]=tt?_clone$1(s[st],j,et,!0):s[st];return at};switch(type$5(s)){case"Object":return rt({});case"Array":return rt([]);case"Date":return new Date(s.valueOf());case"RegExp":return _cloneRegExp$1(s);default:return s}}var clone$2=_curry1$1(function(j){return j!=null&&typeof j.clone=="function"?j.clone():_clone$1(j,[],[],!0)});const clone$3=clone$2;function _pipe(s,j){return function(){return j.call(this,s.apply(this,arguments))}}function _checkForMethod(s,j){return function(){var et=arguments.length;if(et===0)return j();var tt=arguments[et-1];return _isArray$1(tt)||typeof tt[s]!="function"?j.apply(this,arguments):tt[s].apply(tt,Array.prototype.slice.call(arguments,0,et-1))}}var slice=_curry3(_checkForMethod("slice",function(j,et,tt){return Array.prototype.slice.call(tt,j,et)}));const slice$1=slice;var tail=_curry1$1(_checkForMethod("tail",slice$1(1,1/0)));const tail$1=tail;function pipe(){if(arguments.length===0)throw new Error("pipe requires at least one argument");return _arity$1(arguments[0].length,reduce$1(_pipe,arguments[0],tail$1(arguments)))}function _identity$1(s){return s}var identity$2=_curry1$1(_identity$1);const identity$3=identity$2;function _arrayFromIterator$1(s){for(var j=[],et;!(et=s.next()).done;)j.push(et.value);return j}function _includesWith$1(s,j,et){for(var tt=0,rt=et.length;tt<rt;){if(s(j,et[tt]))return!0;tt+=1}return!1}function _functionName$1(s){var j=String(s).match(/^function (\w*)/);return j==null?"":j[1]}function _objectIs$2(s,j){return s===j?s!==0||1/s===1/j:s!==s&&j!==j}const _objectIs$3=typeof Object.is=="function"?Object.is:_objectIs$2;function _uniqContentEquals$1(s,j,et,tt){var rt=_arrayFromIterator$1(s),nt=_arrayFromIterator$1(j);function at(it,ot){return _equals$1(it,ot,et.slice(),tt.slice())}return!_includesWith$1(function(it,ot){return!_includesWith$1(at,ot,it)},nt,rt)}function _equals$1(s,j,et,tt){if(_objectIs$3(s,j))return!0;var rt=type$5(s);if(rt!==type$5(j)||s==null||j==null)return!1;if(typeof s["fantasy-land/equals"]=="function"||typeof j["fantasy-land/equals"]=="function")return typeof s["fantasy-land/equals"]=="function"&&s["fantasy-land/equals"](j)&&typeof j["fantasy-land/equals"]=="function"&&j["fantasy-land/equals"](s);if(typeof s.equals=="function"||typeof j.equals=="function")return typeof s.equals=="function"&&s.equals(j)&&typeof j.equals=="function"&&j.equals(s);switch(rt){case"Arguments":case"Array":case"Object":if(typeof s.constructor=="function"&&_functionName$1(s.constructor)==="Promise")return s===j;break;case"Boolean":case"Number":case"String":if(!(typeof s==typeof j&&_objectIs$3(s.valueOf(),j.valueOf())))return!1;break;case"Date":if(!_objectIs$3(s.valueOf(),j.valueOf()))return!1;break;case"Error":return s.name===j.name&&s.message===j.message;case"RegExp":if(!(s.source===j.source&&s.global===j.global&&s.ignoreCase===j.ignoreCase&&s.multiline===j.multiline&&s.sticky===j.sticky&&s.unicode===j.unicode))return!1;break}for(var nt=et.length-1;nt>=0;){if(et[nt]===s)return tt[nt]===j;nt-=1}switch(rt){case"Map":return s.size!==j.size?!1:_uniqContentEquals$1(s.entries(),j.entries(),et.concat([s]),tt.concat([j]));case"Set":return s.size!==j.size?!1:_uniqContentEquals$1(s.values(),j.values(),et.concat([s]),tt.concat([j]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var at=keys$3(s);if(at.length!==keys$3(j).length)return!1;var it=et.concat([s]),ot=tt.concat([j]);for(nt=at.length-1;nt>=0;){var st=at[nt];if(!(_has$1(st,j)&&_equals$1(j[st],s[st],it,ot)))return!1;nt-=1}return!0}var equals$2=_curry2$1(function(j,et){return _equals$1(j,et,[],[])});const equals$3=equals$2;function _indexOf$1(s,j,et){var tt,rt;if(typeof s.indexOf=="function")switch(typeof j){case"number":if(j===0){for(tt=1/j;et<s.length;){if(rt=s[et],rt===0&&1/rt===tt)return et;et+=1}return-1}else if(j!==j){for(;et<s.length;){if(rt=s[et],typeof rt=="number"&&rt!==rt)return et;et+=1}return-1}return s.indexOf(j,et);case"string":case"boolean":case"function":case"undefined":return s.indexOf(j,et);case"object":if(j===null)return s.indexOf(j,et)}for(;et<s.length;){if(equals$3(s[et],j))return et;et+=1}return-1}function _includes$1(s,j){return _indexOf$1(j,s,0)>=0}function _filter(s,j){for(var et=0,tt=j.length,rt=[];et<tt;)s(j[et])&&(rt[rt.length]=j[et]),et+=1;return rt}function _isObject(s){return Object.prototype.toString.call(s)==="[object Object]"}var XFilter=function(){function s(j,et){this.xf=et,this.f=j}return s.prototype["@@transducer/init"]=_xfBase$1.init,s.prototype["@@transducer/result"]=_xfBase$1.result,s.prototype["@@transducer/step"]=function(j,et){return this.f(et)?this.xf["@@transducer/step"](j,et):j},s}(),_xfilter=_curry2$1(function(j,et){return new XFilter(j,et)});const _xfilter$1=_xfilter;var filter$1=_curry2$1(_dispatchable$1(["filter"],_xfilter$1,function(s,j){return _isObject(j)?_reduce$1(function(et,tt){return s(j[tt])&&(et[tt]=j[tt]),et},{},keys$3(j)):_filter(s,j)}));const filter$2=filter$1;var XReduceBy$1=function(){function s(j,et,tt,rt){this.valueFn=j,this.valueAcc=et,this.keyFn=tt,this.xf=rt,this.inputs={}}return s.prototype["@@transducer/init"]=_xfBase$1.init,s.prototype["@@transducer/result"]=function(j){var et;for(et in this.inputs)if(_has$1(et,this.inputs)&&(j=this.xf["@@transducer/step"](j,this.inputs[et]),j["@@transducer/reduced"])){j=j["@@transducer/value"];break}return this.inputs=null,this.xf["@@transducer/result"](j)},s.prototype["@@transducer/step"]=function(j,et){var tt=this.keyFn(et);return this.inputs[tt]=this.inputs[tt]||[tt,this.valueAcc],this.inputs[tt][1]=this.valueFn(this.inputs[tt][1],et),j},s}(),_xreduceBy$2=_curryN$1(4,[],function(j,et,tt,rt){return new XReduceBy$1(j,et,tt,rt)});const _xreduceBy$3=_xreduceBy$2;var reduceBy$2=_curryN$1(4,[],_dispatchable$1([],_xreduceBy$3,function(j,et,tt,rt){return _reduce$1(function(nt,at){var it=tt(at);return nt[it]=j(_has$1(it,nt)?nt[it]:_clone$1(et,[],[],!1),at),nt},{},rt)}));const reduceBy$3=reduceBy$2;var _Set$2=function(){function s(){this._nativeSet=typeof Set=="function"?new Set:null,this._items={}}return s.prototype.add=function(j){return!hasOrAdd$1(j,!0,this)},s.prototype.has=function(j){return hasOrAdd$1(j,!1,this)},s}();function hasOrAdd$1(s,j,et){var tt=typeof s,rt,nt;switch(tt){case"string":case"number":return s===0&&1/s===-1/0?et._items["-0"]?!0:(j&&(et._items["-0"]=!0),!1):et._nativeSet!==null?j?(rt=et._nativeSet.size,et._nativeSet.add(s),nt=et._nativeSet.size,nt===rt):et._nativeSet.has(s):tt in et._items?s in et._items[tt]?!0:(j&&(et._items[tt][s]=!0),!1):(j&&(et._items[tt]={},et._items[tt][s]=!0),!1);case"boolean":if(tt in et._items){var at=s?1:0;return et._items[tt][at]?!0:(j&&(et._items[tt][at]=!0),!1)}else return j&&(et._items[tt]=s?[!1,!0]:[!0,!1]),!1;case"function":return et._nativeSet!==null?j?(rt=et._nativeSet.size,et._nativeSet.add(s),nt=et._nativeSet.size,nt===rt):et._nativeSet.has(s):tt in et._items?_includes$1(s,et._items[tt])?!0:(j&&et._items[tt].push(s),!1):(j&&(et._items[tt]=[s]),!1);case"undefined":return et._items[tt]?!0:(j&&(et._items[tt]=!0),!1);case"object":if(s===null)return et._items.null?!0:(j&&(et._items.null=!0),!1);default:return tt=Object.prototype.toString.call(s),tt in et._items?_includes$1(s,et._items[tt])?!0:(j&&et._items[tt].push(s),!1):(j&&(et._items[tt]=[s]),!1)}}const _Set$3=_Set$2;var XTake=function(){function s(j,et){this.xf=et,this.n=j,this.i=0}return s.prototype["@@transducer/init"]=_xfBase$1.init,s.prototype["@@transducer/result"]=_xfBase$1.result,s.prototype["@@transducer/step"]=function(j,et){this.i+=1;var tt=this.n===0?j:this.xf["@@transducer/step"](j,et);return this.n>=0&&this.i>=this.n?_reduced(tt):tt},s}(),_xtake=_curry2$1(function(j,et){return new XTake(j,et)});const _xtake$1=_xtake;var take=_curry2$1(_dispatchable$1(["take"],_xtake$1,function(j,et){return slice$1(0,j<0?1/0:j,et)}));const take$1=take;function dropLast$2(s,j){return take$1(s<j.length?j.length-s:0,j)}var XDropLast=function(){function s(j,et){this.xf=et,this.pos=0,this.full=!1,this.acc=new Array(j)}return s.prototype["@@transducer/init"]=_xfBase$1.init,s.prototype["@@transducer/result"]=function(j){return this.acc=null,this.xf["@@transducer/result"](j)},s.prototype["@@transducer/step"]=function(j,et){return this.full&&(j=this.xf["@@transducer/step"](j,this.acc[this.pos])),this.store(et),j},s.prototype.store=function(j){this.acc[this.pos]=j,this.pos+=1,this.pos===this.acc.length&&(this.pos=0,this.full=!0)},s}(),_xdropLast=_curry2$1(function(j,et){return new XDropLast(j,et)});const _xdropLast$1=_xdropLast;var dropLast=_curry2$1(_dispatchable$1([],_xdropLast$1,dropLast$2));const dropLast$1=dropLast;var flatten$1=_curry1$1(_makeFlat(!0));const flatten$2=flatten$1;var fromPairs$2=_curry1$1(function(j){for(var et={},tt=0;tt<j.length;)et[j[tt][0]]=j[tt][1],tt+=1;return et});const fromPairs$3=fromPairs$2;var groupBy=_curry2$1(_checkForMethod("groupBy",reduceBy$3(function(s,j){return s==null&&(s=[]),s.push(j),s},null)));const groupBy$1=groupBy;var uniqBy$2=_curry2$1(function(j,et){for(var tt=new _Set$3,rt=[],nt=0,at,it;nt<et.length;)it=et[nt],at=j(it),tt.add(at)&&rt.push(it),nt+=1;return rt});const uniqBy$3=uniqBy$2;var uniq$2=uniqBy$3(identity$3);const uniq$3=uniq$2;function _objectAssign(s){if(s==null)throw new TypeError("Cannot convert undefined or null to object");for(var j=Object(s),et=1,tt=arguments.length;et<tt;){var rt=arguments[et];if(rt!=null)for(var nt in rt)_has$1(nt,rt)&&(j[nt]=rt[nt]);et+=1}return j}const _objectAssign$1=typeof Object.assign=="function"?Object.assign:_objectAssign;var maxBy=_curry3(function(j,et,tt){return j(tt)>j(et)?tt:et});const maxBy$1=maxBy;var mergeAll=_curry1$1(function(j){return _objectAssign$1.apply(null,[{}].concat(j))});const mergeAll$1=mergeAll;var mergeWithKey=_curry3(function(j,et,tt){var rt={},nt;for(nt in et)_has$1(nt,et)&&(rt[nt]=_has$1(nt,tt)?j(nt,et[nt],tt[nt]):et[nt]);for(nt in tt)_has$1(nt,tt)&&!_has$1(nt,rt)&&(rt[nt]=tt[nt]);return rt});const mergeWithKey$1=mergeWithKey;var mergeDeepWithKey=_curry3(function s(j,et,tt){return mergeWithKey$1(function(rt,nt,at){return _isObject(nt)&&_isObject(at)?s(j,nt,at):j(rt,nt,at)},et,tt)});const mergeDeepWithKey$1=mergeDeepWithKey;var mergeDeepLeft=_curry2$1(function(j,et){return mergeDeepWithKey$1(function(tt,rt,nt){return rt},j,et)});const mergeDeepLeft$1=mergeDeepLeft;var minBy=_curry3(function(j,et,tt){return j(tt)<j(et)?tt:et});const minBy$1=minBy;var toPairs$2=_curry1$1(function(j){var et=[];for(var tt in j)_has$1(tt,j)&&(et[et.length]=[tt,j[tt]]);return et});const toPairs$3=toPairs$2;var unnest$1=chain$1(_identity$1);const unnest$1$1=unnest$1;var browserPonyfill={exports:{}};(function(s,j){var et=typeof self!="undefined"?self:commonjsGlobal$1,tt=function(){function nt(){this.fetch=!1,this.DOMException=et.DOMException}return nt.prototype=et,new nt}();(function(nt){(function(at){var it={searchParams:"URLSearchParams"in nt,iterable:"Symbol"in nt&&"iterator"in Symbol,blob:"FileReader"in nt&&"Blob"in nt&&function(){try{return new Blob,!0}catch(wt){return!1}}(),formData:"FormData"in nt,arrayBuffer:"ArrayBuffer"in nt};function ot(wt){return wt&&DataView.prototype.isPrototypeOf(wt)}if(it.arrayBuffer)var st=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],lt=ArrayBuffer.isView||function(wt){return wt&&st.indexOf(Object.prototype.toString.call(wt))>-1};function ct(wt){if(typeof wt!="string"&&(wt=String(wt)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(wt))throw new TypeError("Invalid character in header field name");return wt.toLowerCase()}function ut(wt){return typeof wt!="string"&&(wt=String(wt)),wt}function dt(wt){var Et={next:function(){var Dt=wt.shift();return{done:Dt===void 0,value:Dt}}};return it.iterable&&(Et[Symbol.iterator]=function(){return Et}),Et}function ft(wt){this.map={},wt instanceof ft?wt.forEach(function(Et,Dt){this.append(Dt,Et)},this):Array.isArray(wt)?wt.forEach(function(Et){this.append(Et[0],Et[1])},this):wt&&Object.getOwnPropertyNames(wt).forEach(function(Et){this.append(Et,wt[Et])},this)}ft.prototype.append=function(wt,Et){wt=ct(wt),Et=ut(Et);var Dt=this.map[wt];this.map[wt]=Dt?Dt+", "+Et:Et},ft.prototype.delete=function(wt){delete this.map[ct(wt)]},ft.prototype.get=function(wt){return wt=ct(wt),this.has(wt)?this.map[wt]:null},ft.prototype.has=function(wt){return this.map.hasOwnProperty(ct(wt))},ft.prototype.set=function(wt,Et){this.map[ct(wt)]=ut(Et)},ft.prototype.forEach=function(wt,Et){for(var Dt in this.map)this.map.hasOwnProperty(Dt)&&wt.call(Et,this.map[Dt],Dt,this)},ft.prototype.keys=function(){var wt=[];return this.forEach(function(Et,Dt){wt.push(Dt)}),dt(wt)},ft.prototype.values=function(){var wt=[];return this.forEach(function(Et){wt.push(Et)}),dt(wt)},ft.prototype.entries=function(){var wt=[];return this.forEach(function(Et,Dt){wt.push([Dt,Et])}),dt(wt)},it.iterable&&(ft.prototype[Symbol.iterator]=ft.prototype.entries);function vt(wt){if(wt.bodyUsed)return Promise.reject(new TypeError("Already read"));wt.bodyUsed=!0}function mt(wt){return new Promise(function(Et,Dt){wt.onload=function(){Et(wt.result)},wt.onerror=function(){Dt(wt.error)}})}function pt(wt){var Et=new FileReader,Dt=mt(Et);return Et.readAsArrayBuffer(wt),Dt}function ht(wt){var Et=new FileReader,Dt=mt(Et);return Et.readAsText(wt),Dt}function gt(wt){for(var Et=new Uint8Array(wt),Dt=new Array(Et.length),jt=0;jt<Et.length;jt++)Dt[jt]=String.fromCharCode(Et[jt]);return Dt.join("")}function yt(wt){if(wt.slice)return wt.slice(0);var Et=new Uint8Array(wt.byteLength);return Et.set(new Uint8Array(wt)),Et.buffer}function xt(){return this.bodyUsed=!1,this._initBody=function(wt){this._bodyInit=wt,wt?typeof wt=="string"?this._bodyText=wt:it.blob&&Blob.prototype.isPrototypeOf(wt)?this._bodyBlob=wt:it.formData&&FormData.prototype.isPrototypeOf(wt)?this._bodyFormData=wt:it.searchParams&&URLSearchParams.prototype.isPrototypeOf(wt)?this._bodyText=wt.toString():it.arrayBuffer&&it.blob&&ot(wt)?(this._bodyArrayBuffer=yt(wt.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):it.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(wt)||lt(wt))?this._bodyArrayBuffer=yt(wt):this._bodyText=wt=Object.prototype.toString.call(wt):this._bodyText="",this.headers.get("content-type")||(typeof wt=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):it.searchParams&&URLSearchParams.prototype.isPrototypeOf(wt)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},it.blob&&(this.blob=function(){var wt=vt(this);if(wt)return wt;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?vt(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(pt)}),this.text=function(){var wt=vt(this);if(wt)return wt;if(this._bodyBlob)return ht(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(gt(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},it.formData&&(this.formData=function(){return this.text().then($t)}),this.json=function(){return this.text().then(JSON.parse)},this}var Ct=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function St(wt){var Et=wt.toUpperCase();return Ct.indexOf(Et)>-1?Et:wt}function bt(wt,Et){Et=Et||{};var Dt=Et.body;if(wt instanceof bt){if(wt.bodyUsed)throw new TypeError("Already read");this.url=wt.url,this.credentials=wt.credentials,Et.headers||(this.headers=new ft(wt.headers)),this.method=wt.method,this.mode=wt.mode,this.signal=wt.signal,!Dt&&wt._bodyInit!=null&&(Dt=wt._bodyInit,wt.bodyUsed=!0)}else this.url=String(wt);if(this.credentials=Et.credentials||this.credentials||"same-origin",(Et.headers||!this.headers)&&(this.headers=new ft(Et.headers)),this.method=St(Et.method||this.method||"GET"),this.mode=Et.mode||this.mode||null,this.signal=Et.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&Dt)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(Dt)}bt.prototype.clone=function(){return new bt(this,{body:this._bodyInit})};function $t(wt){var Et=new FormData;return wt.trim().split("&").forEach(function(Dt){if(Dt){var jt=Dt.split("="),Rt=jt.shift().replace(/\+/g," "),At=jt.join("=").replace(/\+/g," ");Et.append(decodeURIComponent(Rt),decodeURIComponent(At))}}),Et}function Ot(wt){var Et=new ft,Dt=wt.replace(/\r?\n[\t ]+/g," ");return Dt.split(/\r?\n/).forEach(function(jt){var Rt=jt.split(":"),At=Rt.shift().trim();if(At){var It=Rt.join(":").trim();Et.append(At,It)}}),Et}xt.call(bt.prototype);function Pt(wt,Et){Et||(Et={}),this.type="default",this.status=Et.status===void 0?200:Et.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in Et?Et.statusText:"OK",this.headers=new ft(Et.headers),this.url=Et.url||"",this._initBody(wt)}xt.call(Pt.prototype),Pt.prototype.clone=function(){return new Pt(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new ft(this.headers),url:this.url})},Pt.error=function(){var wt=new Pt(null,{status:0,statusText:""});return wt.type="error",wt};var Nt=[301,302,303,307,308];Pt.redirect=function(wt,Et){if(Nt.indexOf(Et)===-1)throw new RangeError("Invalid status code");return new Pt(null,{status:Et,headers:{location:wt}})},at.DOMException=nt.DOMException;try{new at.DOMException}catch(wt){at.DOMException=function(Et,Dt){this.message=Et,this.name=Dt;var jt=Error(Et);this.stack=jt.stack},at.DOMException.prototype=Object.create(Error.prototype),at.DOMException.prototype.constructor=at.DOMException}function Tt(wt,Et){return new Promise(function(Dt,jt){var Rt=new bt(wt,Et);if(Rt.signal&&Rt.signal.aborted)return jt(new at.DOMException("Aborted","AbortError"));var At=new XMLHttpRequest;function It(){At.abort()}At.onload=function(){var kt={status:At.status,statusText:At.statusText,headers:Ot(At.getAllResponseHeaders()||"")};kt.url="responseURL"in At?At.responseURL:kt.headers.get("X-Request-URL");var _t="response"in At?At.response:At.responseText;Dt(new Pt(_t,kt))},At.onerror=function(){jt(new TypeError("Network request failed"))},At.ontimeout=function(){jt(new TypeError("Network request failed"))},At.onabort=function(){jt(new at.DOMException("Aborted","AbortError"))},At.open(Rt.method,Rt.url,!0),Rt.credentials==="include"?At.withCredentials=!0:Rt.credentials==="omit"&&(At.withCredentials=!1),"responseType"in At&&it.blob&&(At.responseType="blob"),Rt.headers.forEach(function(kt,_t){At.setRequestHeader(_t,kt)}),Rt.signal&&(Rt.signal.addEventListener("abort",It),At.onreadystatechange=function(){At.readyState===4&&Rt.signal.removeEventListener("abort",It)}),At.send(typeof Rt._bodyInit=="undefined"?null:Rt._bodyInit)})}return Tt.polyfill=!0,nt.fetch||(nt.fetch=Tt,nt.Headers=ft,nt.Request=bt,nt.Response=Pt),at.Headers=ft,at.Request=bt,at.Response=Pt,at.fetch=Tt,Object.defineProperty(at,"__esModule",{value:!0}),at})({})})(tt),tt.fetch.ponyfill=!0,delete tt.fetch.polyfill;var rt=tt;j=rt.fetch,j.default=rt.fetch,j.fetch=rt.fetch,j.Headers=rt.Headers,j.Request=rt.Request,j.Response=rt.Response,s.exports=j})(browserPonyfill,browserPonyfill.exports);const fetch$1=getDefaultExportFromCjs(browserPonyfill.exports);(function(s){var j=s.URLSearchParams&&s.URLSearchParams.prototype.get?s.URLSearchParams:null,et=j&&new j({a:1}).toString()==="a=1",tt=j&&new j("s=%2B").get("s")==="+",rt="__URLSearchParams__",nt=j?function(){var ht=new j;return ht.append("s"," &"),ht.toString()==="s=+%26"}():!0,at=ot.prototype,it=!!(s.Symbol&&s.Symbol.iterator);if(j&&et&&tt&&nt)return;function ot(ht){ht=ht||"",(ht instanceof URLSearchParams||ht instanceof ot)&&(ht=ht.toString()),this[rt]=vt(ht)}at.append=function(ht,gt){mt(this[rt],ht,gt)},at.delete=function(ht){delete this[rt][ht]},at.get=function(ht){var gt=this[rt];return ht in gt?gt[ht][0]:null},at.getAll=function(ht){var gt=this[rt];return ht in gt?gt[ht].slice(0):[]},at.has=function(ht){return ht in this[rt]},at.set=function(gt,yt){this[rt][gt]=[""+yt]},at.toString=function(){var ht=this[rt],gt=[],yt,xt,Ct,St;for(xt in ht)for(Ct=ut(xt),yt=0,St=ht[xt];yt<St.length;yt++)gt.push(Ct+"="+ut(St[yt]));return gt.join("&")};var st=!tt,lt=!st&&j&&!et&&s.Proxy;Object.defineProperty(s,"URLSearchParams",{value:lt?new Proxy(j,{construct:function(ht,gt){return new ht(new ot(gt[0]).toString())}}):ot});var ct=s.URLSearchParams.prototype;ct.polyfill=!0,ct.forEach=ct.forEach||function(ht,gt){var yt=vt(this.toString());Object.getOwnPropertyNames(yt).forEach(function(xt){yt[xt].forEach(function(Ct){ht.call(gt,Ct,xt,this)},this)},this)},ct.sort=ct.sort||function(){var ht=vt(this.toString()),gt=[],yt,xt,Ct;for(yt in ht)gt.push(yt);for(gt.sort(),xt=0;xt<gt.length;xt++)this.delete(gt[xt]);for(xt=0;xt<gt.length;xt++){var St=gt[xt],bt=ht[St];for(Ct=0;Ct<bt.length;Ct++)this.append(St,bt[Ct])}},ct.keys=ct.keys||function(){var ht=[];return this.forEach(function(gt,yt){ht.push(yt)}),ft(ht)},ct.values=ct.values||function(){var ht=[];return this.forEach(function(gt){ht.push(gt)}),ft(ht)},ct.entries=ct.entries||function(){var ht=[];return this.forEach(function(gt,yt){ht.push([yt,gt])}),ft(ht)},it&&(ct[s.Symbol.iterator]=ct[s.Symbol.iterator]||ct.entries);function ut(ht){var gt={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(ht).replace(/[!'\(\)~]|%20|%00/g,function(yt){return gt[yt]})}function dt(ht){return ht.replace(/[ +]/g,"%20").replace(/(%[a-f0-9]{2})+/ig,function(gt){return decodeURIComponent(gt)})}function ft(ht){var gt={next:function(){var yt=ht.shift();return{done:yt===void 0,value:yt}}};return it&&(gt[s.Symbol.iterator]=function(){return gt}),gt}function vt(ht){var gt={};if(typeof ht=="object")if(pt(ht))for(var yt=0;yt<ht.length;yt++){var xt=ht[yt];if(pt(xt)&&xt.length===2)mt(gt,xt[0],xt[1]);else throw new TypeError("Failed to construct 'URLSearchParams': Sequence initializer must only contain pair elements")}else for(var Ct in ht)ht.hasOwnProperty(Ct)&&mt(gt,Ct,ht[Ct]);else{ht.indexOf("?")===0&&(ht=ht.slice(1));for(var St=ht.split("&"),bt=0;bt<St.length;bt++){var $t=St[bt],Ot=$t.indexOf("=");-1<Ot?mt(gt,dt($t.slice(0,Ot)),dt($t.slice(Ot+1))):$t&&mt(gt,dt($t),"")}}return gt}function mt(ht,gt,yt){var xt=typeof yt=="string"?yt:yt!=null&&typeof yt.toString=="function"?yt.toString():JSON.stringify(yt);gt in ht?ht[gt].push(xt):ht[gt]=[xt]}function pt(ht){return!!ht&&Object.prototype.toString.call(ht)==="[object Array]"}})(typeof commonjsGlobal$1!="undefined"?commonjsGlobal$1:typeof window!="undefined"?window:commonjsGlobal$1);const DEFAULT_GRANULARITY="day",GRANULARITIES=[{name:void 0,title:"w/o grouping"},{name:"second",title:"Second"},{name:"minute",title:"Minute"},{name:"hour",title:"Hour"},{name:"day",title:"Day"},{name:"week",title:"Week"},{name:"month",title:"Month"},{name:"quarter",title:"Quarter"},{name:"year",title:"Year"}];function removeEmptyQueryFields(s){return fromPairs$3(toPairs$3(s||{}).map(([et,tt])=>{if(["measures","dimensions","segments","timeDimensions","filters"].includes(et)&&Array.isArray(tt)&&tt.length===0)return null;if(et==="order"&&tt){if(Array.isArray(tt)&&!tt.length)return null;if(!Object.keys(tt).length)return null}return[et,tt]}).filter(Boolean))}function validateQuery(s){const j=s||{};return removeEmptyQueryFields({...j,filters:(j.filters||[]).filter(et=>et.operator),timeDimensions:(j.timeDimensions||[]).filter(et=>!(!et.dateRange&&!et.granularity))})}function areQueriesEqual(s={},j={}){return equals$3(Object.entries(s&&s.order||{}),Object.entries(j&&j.order||{}))&&equals$3(s,j)}function defaultOrder(s){const j=(s.timeDimensions||[]).find(et=>et.granularity);return j?{[j.dimension]:"asc"}:(s.measures||[]).length>0&&(s.dimensions||[]).length>0?{[s.measures[0]]:"desc"}:(s.dimensions||[]).length>0?{[s.dimensions[0]]:"asc"}:{}}function defaultHeuristics(s,j={},et){const{query:tt,...rt}=clone$3(s),{meta:nt,sessionGranularity:at}=et,it=at||DEFAULT_GRANULARITY;let ot={query:tt,...rt},st=null;if(areQueriesEqual(tt,j)||(st=tt),Array.isArray(st)||Array.isArray(j))return s;if(st){if((j.timeDimensions||[]).length===1&&(st.timeDimensions||[]).length===1&&st.timeDimensions[0].granularity&&j.timeDimensions[0].granularity!==st.timeDimensions[0].granularity&&(ot={...ot,sessionGranularity:st.timeDimensions[0].granularity}),(j.measures||[]).length===0&&(st.measures||[]).length>0||(j.measures||[]).length===1&&(st.measures||[]).length===1&&j.measures[0]!==st.measures[0]){const[lt]=st.timeDimensions||[],ct=nt.defaultTimeDimensionNameFor(st.measures[0]);return st={...st,timeDimensions:ct?[{dimension:ct,granularity:lt&&lt.granularity||it,dateRange:lt&&lt.dateRange}]:[]},{...ot,pivotConfig:null,shouldApplyHeuristicOrder:!0,query:st,chartType:ct?"line":"number"}}return(j.dimensions||[]).length===0&&(st.dimensions||[]).length>0?(st={...st,timeDimensions:(st.timeDimensions||[]).map(lt=>({...lt,granularity:void 0}))},{...ot,pivotConfig:null,shouldApplyHeuristicOrder:!0,query:st,chartType:"table"}):(j.dimensions||[]).length>0&&(st.dimensions||[]).length===0?(st={...st,timeDimensions:(st.timeDimensions||[]).map(lt=>({...lt,granularity:lt.granularity||it}))},{...ot,pivotConfig:null,shouldApplyHeuristicOrder:!0,query:st,chartType:(st.timeDimensions||[]).length?"line":"number"}):((j.dimensions||[]).length>0||(j.measures||[]).length>0)&&(st.dimensions||[]).length===0&&(st.measures||[]).length===0?(st={...st,timeDimensions:[],filters:[]},{...ot,pivotConfig:null,shouldApplyHeuristicOrder:!0,query:st,sessionGranularity:null}):ot}if(ot.chartType){const lt=ot.chartType;if((lt==="line"||lt==="area")&&(j.timeDimensions||[]).length===1&&!j.timeDimensions[0].granularity){const[ct]=j.timeDimensions;return{...ot,pivotConfig:null,query:{...j,timeDimensions:[{...ct,granularity:it}]}}}if((lt==="pie"||lt==="table"||lt==="number")&&(j.timeDimensions||[]).length===1&&j.timeDimensions[0].granularity){const[ct]=j.timeDimensions;return{...ot,pivotConfig:null,shouldApplyHeuristicOrder:!0,query:{...j,timeDimensions:[{...ct,granularity:void 0}]}}}}return ot}function isQueryPresent(s){return s?(Array.isArray(s)?s:[s]).every(j=>j.measures&&j.measures.length||j.dimensions&&j.dimensions.length||j.timeDimensions&&j.timeDimensions.length):!1}function movePivotItem(s,j,et,tt,rt){const nt={...s,x:[...s.x],y:[...s.y]},at=s[tt][j],it=nt[rt].length-1;return at==="measures"?et=it+1:et>=it&&nt[rt][it]==="measures"&&(et=it-1),nt[tt].splice(j,1),nt[rt].splice(et,0,at),nt}function moveItemInArray(s,j,et){const tt=[...s],[rt]=tt.splice(j,1);return tt.splice(et,0,rt),tt}function flattenFilters(s=[]){return s.reduce((j,et)=>et.or||et.and?[...j,...flattenFilters(et.or||et.and)]:[...j,et],[])}function getQueryMembers(s={}){const j=["measures","dimensions","segments"],et=new Set;return j.forEach(tt=>(s[tt]||[]).forEach(rt=>et.add(rt))),(s.timeDimensions||[]).forEach(tt=>et.add(tt.dimension)),flattenFilters(s.filters).forEach(tt=>et.add(tt.dimension||tt.member)),[...et]}function aliasSeries(s,j,et,tt){const rt=s.filter(nt=>nt!=null);return et&&et.aliasSeries&&et.aliasSeries[j]?[et.aliasSeries[j],...rt]:tt.has(rt[0])?[j,...rt]:rt}dayjs.extend(quarterOfYear);const internalDayjs=(...s)=>dayjs(...s).locale({...en,weekStart:1}),TIME_SERIES={day:s=>s.by("d").map(j=>j.format("YYYY-MM-DDT00:00:00.000")),month:s=>s.snapTo("month").by("M").map(j=>j.format("YYYY-MM-01T00:00:00.000")),year:s=>s.snapTo("year").by("y").map(j=>j.format("YYYY-01-01T00:00:00.000")),hour:s=>s.by("h").map(j=>j.format("YYYY-MM-DDTHH:00:00.000")),minute:s=>s.by("m").map(j=>j.format("YYYY-MM-DDTHH:mm:00.000")),second:s=>s.by("s").map(j=>j.format("YYYY-MM-DDTHH:mm:ss.000")),week:s=>s.snapTo("week").by("w").map(j=>j.startOf("week").format("YYYY-MM-DDT00:00:00.000")),quarter:s=>s.snapTo("quarter").by("quarter").map(j=>j.startOf("quarter").format("YYYY-MM-DDT00:00:00.000"))},DateRegex=/^\d\d\d\d-\d\d-\d\d$/,LocalDateRegex=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z?$/,groupByToPairs=s=>{const j=new Map;return et=>(et.forEach(tt=>{const rt=s(tt);j.has(rt)||j.set(rt,[]),j.get(rt).push(tt)}),Array.from(j.entries()))},unnest=s=>{const j=[];return s.forEach(et=>{et.forEach(tt=>j.push(tt))}),j},dayRange=(s,j)=>({by:et=>{const tt=[];let rt=internalDayjs(s);const nt=internalDayjs(j);for(;rt.isBefore(nt)||rt.isSame(nt);)tt.push(rt),rt=rt.add(1,et);return tt},snapTo:et=>dayRange(internalDayjs(s).startOf(et),internalDayjs(j).endOf(et)),start:internalDayjs(s),end:internalDayjs(j)}),QUERY_TYPE={REGULAR_QUERY:"regularQuery",COMPARE_DATE_RANGE_QUERY:"compareDateRangeQuery",BLENDING_QUERY:"blendingQuery"};class ResultSet{static measureFromAxis(j){return j[j.length-1]}static timeDimensionMember(j){return`${j.dimension}.${j.granularity}`}static deserialize(j,et={}){return new ResultSet(j.loadResponse,et)}constructor(j,et={}){if(this.loadResponse=j,this.loadResponse.queryType!=null?(this.queryType=j.queryType,this.loadResponses=j.results):(this.queryType=QUERY_TYPE.REGULAR_QUERY,this.loadResponse.pivotQuery={...j.query,queryType:this.queryType},this.loadResponses=[j]),!Object.values(QUERY_TYPE).includes(this.queryType))throw new Error("Unknown query type");this.parseDateMeasures=et.parseDateMeasures,this.options=et,this.backwardCompatibleData=[]}drillDown(j,et){if(this.queryType===QUERY_TYPE.COMPARE_DATE_RANGE_QUERY)throw new Error("compareDateRange drillDown query is not currently supported");if(this.queryType===QUERY_TYPE.BLENDING_QUERY)throw new Error("Data blending drillDown query is not currently supported");const{query:tt}=this.loadResponses[0],{xValues:rt=[],yValues:nt=[]}=j,at=this.normalizePivotConfig(et),it=[];at.x.forEach((ft,vt)=>it.push([ft,rt[vt]])),at.y.forEach((ft,vt)=>it.push([ft,nt[vt]]));const{filters:ot=[],segments:st=[]}=this.query(),{measures:lt}=this.loadResponses[0].annotation;let[,ct]=it.find(([ft])=>ft==="measures")||[];if(ct===void 0&&([ct]=Object.keys(lt)),!(lt[ct]&&lt[ct].drillMembers||[]).length)return null;const ut=[{member:ct,operator:"measureFilter"},...ot],dt=[];return it.filter(([ft])=>ft!=="measures").forEach(([ft,vt])=>{const[mt,pt,ht]=ft.split(".");if(ht!==void 0){const gt=dayRange(vt,vt).snapTo(ht),yt=tt.timeDimensions.find(Ct=>Ct.dimension);let xt=[gt.start,gt.end];if(yt!=null&&yt.dateRange){const[Ct,St]=yt.dateRange;xt=[dayjs(Ct)>gt.start?dayjs(Ct):gt.start,dayjs(St)<gt.end?dayjs(St):gt.end]}dt.push({dimension:[mt,pt].join("."),dateRange:xt.map(Ct=>Ct.format("YYYY-MM-DDTHH:mm:ss.SSS"))})}else vt==null?ut.push({member:ft,operator:"notSet"}):ut.push({member:ft,operator:"equals",values:[vt.toString()]})}),dt.length===0&&tt.timeDimensions.length>0&&tt.timeDimensions[0].granularity==null&&dt.push(tt.timeDimensions[0]),{...lt[ct].drillMembersGrouped,filters:ut,...st.length>0?{segments:st}:{},timeDimensions:dt,segments:st,timezone:tt.timezone}}series(j){return this.seriesNames(j).map(({title:et,shortTitle:tt,key:rt})=>({title:et,shortTitle:tt,key:rt,series:this.chartPivot(j).map(({x:nt,...at})=>({value:at[rt],x:nt}))}))}axisValues(j,et=0){const{query:tt}=this.loadResponses[et];return rt=>{const nt=at=>j.filter(it=>it!=="measures").map(it=>rt[it]!=null?rt[it]:null).concat(at?[at]:[]);return j.find(at=>at==="measures")&&(tt.measures||[]).length?tt.measures.map(nt):[nt()]}}axisValuesString(j,et){const tt=rt=>rt==null?"\u2205":rt===""?"[Empty string]":rt;return j.map(tt).join(et||", ")}static getNormalizedPivotConfig(j={},et=null){const tt={x:[],y:[],fillMissingDates:!0,joinDateRange:!1},{measures:rt=[],dimensions:nt=[]}=j,at=(j.timeDimensions||[]).filter(ct=>!!ct.granularity);et=et||(at.length?{x:at.map(ct=>ResultSet.timeDimensionMember(ct)),y:nt}:{x:nt,y:[]}),et=mergeDeepLeft$1(et,tt);const it=ct=>ct.map(ut=>at.find(dt=>dt.dimension===ut)&&!nt.find(dt=>dt===ut)?ResultSet.timeDimensionMember(j.timeDimensions.find(dt=>dt.dimension===ut)):ut);et.x=it(et.x),et.y=it(et.y);const ot=et.x.concat(et.y),st=at.map(ct=>ResultSet.timeDimensionMember(ct)).concat(nt),lt=ct=>st.includes(ct)||ct==="measures";return et.x=et.x.concat(st.filter(ct=>!ot.includes(ct)&&ct!=="compareDateRange")).filter(lt),et.y=et.y.filter(lt),et.x.concat(et.y).find(ct=>ct==="measures")||et.y.push("measures"),nt.includes("compareDateRange")&&!et.y.concat(et.x).includes("compareDateRange")&&et.y.unshift("compareDateRange"),rt.length||(et.x=et.x.filter(ct=>ct!=="measures"),et.y=et.y.filter(ct=>ct!=="measures")),et}normalizePivotConfig(j){return ResultSet.getNormalizedPivotConfig(this.loadResponse.pivotQuery,j)}timeSeries(j,et){if(!j.granularity)return null;let{dateRange:tt}=j;if(!tt){const ot=ResultSet.timeDimensionMember(j),st=pipe(map$2(lt=>lt[ot]&&internalDayjs(lt[ot])),filter$2(Boolean))(this.timeDimensionBackwardCompatibleData(et));tt=st.length&&[reduce$1(minBy$1(lt=>lt.toDate()),st[0],st),reduce$1(maxBy$1(lt=>lt.toDate()),st[0],st)]||null}if(!tt)return null;const rt=j.dateRange?j.dateRange.find(ot=>ot.match(DateRegex)):!["hour","minute","second"].includes(j.granularity),[nt,at]=tt,it=dayRange(nt,at);if(!TIME_SERIES[j.granularity])throw new Error(`Unsupported time granularity: ${j.granularity}`);return TIME_SERIES[j.granularity](rt?it.snapTo("d"):it)}pivot(j){j=this.normalizePivotConfig(j);const{pivotQuery:et}=this.loadResponse,tt=(nt=0)=>{let at=groupByToPairs(({xValues:ut})=>this.axisValuesString(ut));const it=(ut,dt)=>ut[dt]||0;if(j.fillMissingDates&&j.x.length===1&&equals$3(j.x,(et.timeDimensions||[]).filter(ut=>Boolean(ut.granularity)).map(ut=>ResultSet.timeDimensionMember(ut)))){const ut=this.loadResponses.map(dt=>this.timeSeries(dt.query.timeDimensions[0],nt));ut[0]&&(at=dt=>{const ft=groupBy$1(({xValues:vt})=>vt[0],dt);return ut[nt].map(vt=>[vt,ft[vt]||[{xValues:[vt],row:{}}]])})}const ot=pipe(map$2(ut=>this.axisValues(j.x,nt)(ut).map(dt=>({xValues:dt,row:ut}))),unnest,at)(this.timeDimensionBackwardCompatibleData(nt)),st={};ot.forEach(([,ut])=>{ut.forEach(({row:dt})=>{this.axisValues(j.y,nt)(dt).forEach(ft=>{Object.keys(dt).length>0&&(st[ft.join()]=ft)})})});const lt=Object.values(st),ct=Boolean(j.x.find(ut=>ut==="measures"));return ot.map(([,ut])=>{const{xValues:dt}=ut[0],ft={};return ut.forEach(({row:vt})=>{this.axisValues(j.y,nt)(vt).map(pt=>({yValues:pt,row:vt})).forEach(pt=>{ft[this.axisValuesString(pt.yValues)]=pt})}),{xValues:dt,yValuesArray:unnest(lt.map(vt=>{const mt=ct?ResultSet.measureFromAxis(dt):ResultSet.measureFromAxis(vt);return[[vt,it((ft[this.axisValuesString(vt)]||{row:{}}).row,mt)]]}))}})},rt=this.loadResponses.length>1?this.loadResponses.map((nt,at)=>tt(at)):[];return rt.length?this.mergePivots(rt,j.joinDateRange):tt()}mergePivots(j,et){const tt=j.reduce((rt,nt)=>rt!=null&&nt.length>=rt.length?rt:nt,null);return tt.map((rt,nt)=>({xValues:et?[j.map(it=>it[nt]&&it[nt].xValues||[]).join(", ")]:tt[nt].xValues,yValuesArray:unnest(j.map(it=>it[nt].yValuesArray))}))}pivotedRows(j){return this.chartPivot(j)}chartPivot(j){const et=rt=>this.parseDateMeasures&&LocalDateRegex.test(rt)?new Date(rt):Number.isNaN(Number.parseFloat(rt))?rt:Number.parseFloat(rt),tt=new Set;return this.queryType===QUERY_TYPE.BLENDING_QUERY&&flatten$2(this.loadResponses.map(({query:nt})=>nt.measures)).filter((nt,at,it)=>it.indexOf(nt)!==at).forEach(nt=>tt.add(nt)),this.pivot(j).map(({xValues:rt,yValuesArray:nt})=>{const at={};return nt.forEach(([it,ot],st)=>{at[this.axisValuesString(aliasSeries(it,st,j,tt),",")]=ot&&et(ot)}),{x:this.axisValuesString(rt,","),xValues:rt,...at}})}tablePivot(j){const et=this.normalizePivotConfig(j||{}),tt=et.x.concat(et.y).includes("measures");return this.pivot(et).map(({xValues:rt,yValuesArray:nt})=>fromPairs$3(et.x.map((at,it)=>[at,rt[it]]).concat(tt?nt.map(([at,it])=>[at.length?at.join():"value",it]):[])))}tableColumns(j){const et=this.normalizePivotConfig(j||{}),tt=pipe(pluck$1("annotation"),reduce$1(mergeDeepLeft$1(),{}))(this.loadResponses),rt=Object.values(tt).reduce((lt,ct)=>({...lt,...ct}),{}),nt={},at=lt=>{const{title:ct,shortTitle:ut,type:dt,format:ft,meta:vt}=rt[lt]||{};return{key:lt,title:ct,shortTitle:ut,type:dt,format:ft,meta:vt}},it=this.pivot(et);(it[0]&&it[0].yValuesArray||[]).forEach(([lt])=>{if(lt.length>0){let ct=nt;lt.forEach((ut,dt)=>{ct[`_${ut}`]={key:ut,memberId:et.y[dt]==="measures"?ut:et.y[dt],children:ct[`_${ut}`]&&ct[`_${ut}`].children||{}},ct=ct[`_${ut}`].children})}});const ot=(lt={},ct=[])=>Object.keys(lt).length===0?[]:Object.values(lt).map(({key:ut,...dt})=>{const ft=ot(dt.children,[...ct,ut]),{title:vt,shortTitle:mt,...pt}=at(dt.memberId),ht=ut!==dt.memberId||vt==null?ut:"";return ft.length?{...pt,key:ut,title:[vt,ht].join(" ").trim(),shortTitle:ht||mt,children:ft}:{...pt,key:ut,dataIndex:[...ct,ut].join(),title:[vt,ht].join(" ").trim(),shortTitle:ht||mt}});let st=[];return!it.length&&et.y.includes("measures")&&(st=(this.loadResponses[0].query.measures||[]).map(lt=>({...at(lt),dataIndex:lt}))),!et.y.length&&et.x.includes("measures")&&st.push({key:"value",dataIndex:"value",title:"Value",shortTitle:"Value",type:"string"}),et.x.map(lt=>lt==="measures"?{key:"measures",dataIndex:"measures",title:"Measures",shortTitle:"Measures",type:"string"}:{...at(lt),dataIndex:lt}).concat(ot(nt)).concat(st)}totalRow(j){return this.chartPivot(j)[0]}categories(j){return this.chartPivot(j)}seriesNames(j){j=this.normalizePivotConfig(j);const et=pipe(pluck$1("annotation"),pluck$1("measures"),mergeAll$1)(this.loadResponses),tt=unnest(this.loadResponses.map((nt,at)=>pipe(map$2(this.axisValues(j.y,at)),unnest,uniq$3)(this.timeDimensionBackwardCompatibleData(at)))),rt=new Set;return this.queryType===QUERY_TYPE.BLENDING_QUERY&&flatten$2(this.loadResponses.map(({query:at})=>at.measures)).filter((at,it,ot)=>ot.indexOf(at)!==it).forEach(at=>rt.add(at)),tt.map((nt,at)=>{const it=aliasSeries(nt,at,j,rt);return{title:this.axisValuesString(j.y.find(ot=>ot==="measures")?dropLast$1(1,it).concat(et[ResultSet.measureFromAxis(nt)].title):it,", "),shortTitle:this.axisValuesString(j.y.find(ot=>ot==="measures")?dropLast$1(1,it).concat(et[ResultSet.measureFromAxis(nt)].shortTitle):it,", "),key:this.axisValuesString(it,","),yValues:nt}})}query(){if(this.queryType!==QUERY_TYPE.REGULAR_QUERY)throw new Error(`Method is not supported for a '${this.queryType}' query type. Please use decompose`);return this.loadResponses[0].query}pivotQuery(){return this.loadResponse.pivotQuery||null}rawData(){if(this.queryType!==QUERY_TYPE.REGULAR_QUERY)throw new Error(`Method is not supported for a '${this.queryType}' query type. Please use decompose`);return this.loadResponses[0].data}annotation(){if(this.queryType!==QUERY_TYPE.REGULAR_QUERY)throw new Error(`Method is not supported for a '${this.queryType}' query type. Please use decompose`);return this.loadResponses[0].annotation}timeDimensionBackwardCompatibleData(j){if(j===void 0)throw new Error("resultIndex is required");if(!this.backwardCompatibleData[j]){const{data:et,query:tt}=this.loadResponses[j],rt=(tt.timeDimensions||[]).filter(nt=>Boolean(nt.granularity));this.backwardCompatibleData[j]=et.map(nt=>({...nt,...fromPairs$3(Object.keys(nt).filter(at=>rt.find(it=>it.dimension===at)&&!nt[ResultSet.timeDimensionMember(rt.find(it=>it.dimension===at))]).map(at=>[ResultSet.timeDimensionMember(rt.find(it=>it.dimension===at)),nt[at]]))}))}return this.backwardCompatibleData[j]}decompose(){return this.loadResponses.map(j=>new ResultSet({queryType:QUERY_TYPE.REGULAR_QUERY,pivotQuery:{...j.query,queryType:QUERY_TYPE.REGULAR_QUERY},results:[j]},this.options))}serialize(){return{loadResponse:clone$3(this.loadResponse)}}}class SqlQuery{constructor(j){this.sqlQuery=j}rawQuery(){return this.sqlQuery.sql}sql(){return this.rawQuery().sql[0]}}const memberMap=s=>fromPairs$3(s.map(j=>[j.name,j])),operators={string:[{name:"contains",title:"contains"},{name:"notContains",title:"does not contain"},{name:"equals",title:"equals"},{name:"notEquals",title:"does not equal"},{name:"set",title:"is set"},{name:"notSet",title:"is not set"},{name:"startsWith",title:"starts with"},{name:"notStartsWith",title:"does not start with"},{name:"endsWith",title:"ends with"},{name:"notEndsWith",title:"does not end with"}],number:[{name:"equals",title:"equals"},{name:"notEquals",title:"does not equal"},{name:"set",title:"is set"},{name:"notSet",title:"is not set"},{name:"gt",title:">"},{name:"gte",title:">="},{name:"lt",title:"<"},{name:"lte",title:"<="}],time:[{name:"equals",title:"equals"},{name:"notEquals",title:"does not equal"},{name:"inDateRange",title:"in date range"},{name:"notInDateRange",title:"not in date range"},{name:"afterDate",title:"after date"},{name:"beforeDate",title:"before date"}]};class Meta{constructor(j){this.meta=j;const{cubes:et}=this.meta;this.cubes=et,this.cubesMap=fromPairs$3(et.map(tt=>[tt.name,{measures:memberMap(tt.measures),dimensions:memberMap(tt.dimensions),segments:memberMap(tt.segments)}]))}membersForQuery(j,et){return unnest$1$1(this.cubes.map(tt=>tt[et])).sort((tt,rt)=>tt.title>rt.title?1:-1)}membersGroupedByCube(){const j=["measures","dimensions","segments","timeDimensions"];return this.cubes.reduce((et,tt)=>(j.forEach(rt=>{let nt=tt[rt];rt==="timeDimensions"&&(nt=tt.dimensions.filter(at=>at.type==="time")),et[rt]=[...et[rt],{cubeName:tt.name,cubeTitle:tt.title,type:tt.type,public:tt.public,members:nt}]}),et),{measures:[],dimensions:[],segments:[],timeDimensions:[]})}resolveMember(j,et){const[tt]=j.split(".");if(!this.cubesMap[tt])return{title:j,error:`Cube not found ${tt} for path '${j}'`};const nt=(Array.isArray(et)?et:[et]).map(at=>this.cubesMap[tt][at]&&this.cubesMap[tt][at][j]).find(at=>at);return nt||{title:j,error:`Path not found '${j}'`}}defaultTimeDimensionNameFor(j){const[et]=j.split(".");return this.cubesMap[et]?Object.keys(this.cubesMap[et].dimensions||{}).find(tt=>this.cubesMap[et].dimensions[tt].type==="time"):null}filterOperatorsForMember(j,et){const tt=this.resolveMember(j,et);return operators[tt.type]||operators.string}}class ProgressResult{constructor(j){this.progressResponse=j}stage(){return this.progressResponse.stage}timeElapsed(){return this.progressResponse.timeElapsed}}class HttpTransport{constructor({authorization:j,apiUrl:et,method:tt,headers:rt={},credentials:nt}){this.authorization=j,this.apiUrl=et,this.method=tt,this.headers=rt,this.credentials=nt}request(j,{baseRequestId:et,...tt}){let rt=1;const nt=new URLSearchParams(tt&&Object.keys(tt).map(st=>({[st]:typeof tt[st]=="object"?JSON.stringify(tt[st]):tt[st]})).reduce((st,lt)=>({...st,...lt}),{}));let at=`${this.apiUrl}/${j}${nt.toString().length?`?${nt}`:""}`;const it=this.method||(at.length<2e3?"GET":"POST");it==="POST"&&(at=`${this.apiUrl}/${j}`,this.headers["Content-Type"]="application/json");const ot=()=>fetch$1(at,{method:it,headers:{Authorization:this.authorization,"x-request-id":et&&`${et}-span-${rt++}`,...this.headers},credentials:this.credentials,body:it==="POST"?JSON.stringify(tt):null});return{async subscribe(st){let lt={error:"network Error"};try{lt=await ot()}finally{return st(lt,()=>this.subscribe(st))}}}}}class RequestError extends Error{constructor(j,et,tt){super(j),this.response=et,this.status=tt}}let mutexCounter=0;const MUTEX_ERROR="Mutex has been changed",ResultType={DEFAULT:"default",COMPACT:"compact"};function mutexPromise(s){return new Promise(async(j,et)=>{try{j(await s)}catch(tt){tt!==MUTEX_ERROR&&et(tt)}})}class CubejsApi{constructor(j,et){if(j!==null&&!Array.isArray(j)&&typeof j=="object"&&(et=j,j=void 0),et=et||{},!et.transport&&!et.apiUrl)throw new Error("The `apiUrl` option is required");this.apiToken=j,this.apiUrl=et.apiUrl,this.method=et.method,this.headers=et.headers||{},this.credentials=et.credentials,this.transport=et.transport||new HttpTransport({authorization:typeof j=="function"?void 0:j,apiUrl:this.apiUrl,method:this.method,headers:this.headers,credentials:this.credentials}),this.pollInterval=et.pollInterval||5,this.parseDateMeasures=et.parseDateMeasures,this.updateAuthorizationPromise=null}request(j,et){return this.transport.request(j,{baseRequestId:v4(),...et})}loadMethod(j,et,tt,rt){const nt=++mutexCounter;typeof tt=="function"&&!rt&&(rt=tt,tt=void 0),tt=tt||{};const at=tt.mutexKey||"default";tt.mutexObj&&(tt.mutexObj[at]=nt);const it=this.updateTransportAuthorization().then(()=>j());let ot=!0,st=!1;const lt=async()=>{const dt=await it;if(tt.mutexObj&&tt.mutexObj[at]!==nt)throw st=!0,dt.unsubscribe&&await dt.unsubscribe(),MUTEX_ERROR},ct=async(dt,ft)=>{const vt=await it,mt=async()=>tt.subscribe&&!st?(vt.unsubscribe||await new Promise(xt=>setTimeout(()=>xt(),this.pollInterval*1e3)),ft()):null,pt=async xt=>st?null:(xt&&await new Promise(Ct=>setTimeout(()=>Ct(),this.pollInterval*1e3)),ft());if(tt.subscribe&&!ot&&await this.updateTransportAuthorization(),ot=!1,dt.status===502)return await lt(),pt(!0);let ht={},gt="";try{gt=await dt.text(),ht=JSON.parse(gt)}catch(xt){ht.error=gt}if(ht.error==="Continue wait")return await lt(),tt.progressCallback&&tt.progressCallback(new ProgressResult(ht)),pt();if(dt.status!==200){await lt(),!tt.subscribe&&vt.unsubscribe&&await vt.unsubscribe();const xt=new RequestError(ht.error,ht,dt.status);if(rt)rt(xt);else throw xt;return mt()}await lt(),!tt.subscribe&&vt.unsubscribe&&await vt.unsubscribe();const yt=et(ht);if(rt)rt(null,yt);else return yt;return mt()},ut=it.then(dt=>mutexPromise(dt.subscribe(ct)));return rt?{unsubscribe:async()=>{const dt=await it;return st=!0,dt.unsubscribe?dt.unsubscribe():null}}:ut}async updateTransportAuthorization(){if(this.updateAuthorizationPromise){await this.updateAuthorizationPromise;return}typeof this.apiToken=="function"&&(this.updateAuthorizationPromise=new Promise(async(j,et)=>{try{const tt=await this.apiToken();this.transport.authorization!==tt&&(this.transport.authorization=tt),j()}catch(tt){et(tt)}finally{this.updateAuthorizationPromise=null}}),await this.updateAuthorizationPromise)}patchQueryInternal(j,et){return et===ResultType.COMPACT&&j.responseFormat!==ResultType.COMPACT?{...j,responseFormat:ResultType.COMPACT}:j}loadResponseInternal(j,et={}){return j.results.length&&(et.castNumerics&&j.results.forEach(tt=>{const rt=Object.entries({...tt.annotation.measures,...tt.annotation.dimensions}).map(([nt,at])=>{if(at.type==="number")return nt}).filter(Boolean);tt.data=tt.data.map(nt=>(rt.forEach(at=>{nt[at]!=null&&(nt[at]=Number(nt[at]))}),nt))}),j.results[0].query.responseFormat&&j.results[0].query.responseFormat===ResultType.COMPACT&&j.results.forEach((tt,rt)=>{const nt=[];tt.data.dataset.forEach(at=>{const it={};tt.data.members.forEach((ot,st)=>{it[ot]=at[st]}),nt.push(it)}),j.results[rt].data=nt})),new ResultSet(j,{parseDateMeasures:this.parseDateMeasures})}load(j,et,tt,rt=ResultType.DEFAULT){return rt===ResultType.COMPACT&&(Array.isArray(j)?j=j.map(nt=>this.patchQueryInternal(nt,ResultType.COMPACT)):j=this.patchQueryInternal(j,ResultType.COMPACT)),this.loadMethod(()=>this.request("load",{query:j,queryType:"multi"}),nt=>this.loadResponseInternal(nt,et),et,tt)}subscribe(j,et,tt,rt=ResultType.DEFAULT){return rt===ResultType.COMPACT&&(Array.isArray(j)?j=j.map(nt=>this.patchQueryInternal(nt,ResultType.COMPACT)):j=this.patchQueryInternal(j,ResultType.COMPACT)),this.loadMethod(()=>this.request("subscribe",{query:j,queryType:"multi"}),nt=>this.loadResponseInternal(nt,et),{...et,subscribe:!0},tt)}sql(j,et,tt){return this.loadMethod(()=>this.request("sql",{query:j}),rt=>Array.isArray(rt)?rt.map(nt=>new SqlQuery(nt)):new SqlQuery(rt),et,tt)}meta(j,et){return this.loadMethod(()=>this.request("meta"),tt=>new Meta(tt),j,et)}dryRun(j,et,tt){return this.loadMethod(()=>this.request("dry-run",{query:j}),rt=>rt,et,tt)}}var index=(s,j)=>new CubejsApi(s,j);function useCubejsApi(s,j){return react.exports.useMemo(()=>!j||!s||j==="undefined"?null:index(j,{apiUrl:s}),[s,j])}var fastDeepEqual=function s(j,et){if(j===et)return!0;if(j&&et&&typeof j=="object"&&typeof et=="object"){if(j.constructor!==et.constructor)return!1;var tt,rt,nt;if(Array.isArray(j)){if(tt=j.length,tt!=et.length)return!1;for(rt=tt;rt--!==0;)if(!s(j[rt],et[rt]))return!1;return!0}if(j.constructor===RegExp)return j.source===et.source&&j.flags===et.flags;if(j.valueOf!==Object.prototype.valueOf)return j.valueOf()===et.valueOf();if(j.toString!==Object.prototype.toString)return j.toString()===et.toString();if(nt=Object.keys(j),tt=nt.length,tt!==Object.keys(et).length)return!1;for(rt=tt;rt--!==0;)if(!Object.prototype.hasOwnProperty.call(et,nt[rt]))return!1;for(rt=tt;rt--!==0;){var at=nt[rt];if(!s(j[at],et[at]))return!1}return!0}return j!==j&&et!==et};function useDeepDependencies(s){const j=react.exports.useRef();return fastDeepEqual(j.current,s)||(j.current=s),j.current}function useDeepEffect(s,j){const et=useDeepDependencies(j);return react.exports.useEffect(s,et)}function useDeepMemo(s,j){const et=useDeepDependencies(j);return react.exports.useMemo(s,et)}function useIdentifier(){const{identifier:s}=useAppContext();return s||""}function useIsMounted$1(){const s=react.exports.useRef(!1),j=react.exports.useCallback(()=>s.current,[]);return react.exports.useEffect(()=>(s.current=!0,()=>{s.current=!1}),[]),j}function playgroundFetch(s,j={}){const{retries:et=0,...tt}=j;return fetch(s,tt).then(async rt=>{if(rt.status===500){let nt=await rt.text();try{nt=JSON.parse(nt).error}catch(at){}throw nt}return rt}).catch(rt=>{if(rt.message==="Network request failed"&&et>0)return playgroundFetch(s,{options:j,retries:et-1});throw rt})}function openWindow({url:s,title:j="",width:et=640,height:tt=720}){var ut;const rt=window.screenLeft!==void 0?window.screenLeft:window.screenX,nt=window.screenTop!==void 0?window.screenTop:window.screenY,at=window.innerWidth?window.innerWidth:document.documentElement.clientWidth?document.documentElement.clientWidth:screen.width,it=window.innerHeight?window.innerHeight:document.documentElement.clientHeight?document.documentElement.clientHeight:screen.height,ot=at/window.screen.availWidth,st=(at-et)/2/ot+rt,lt=(it-tt)/2/ot+nt,ct=window.open(s,j,`
257
257
  scrollbars=yes,
258
258
  width=${et/ot},
259
259
  height=${tt/ot},
@@ -1234,7 +1234,7 @@ PERFORMANCE OF THIS SOFTWARE.
1234
1234
  & .ant-tabs-extra-content {
1235
1235
  margin-left: 32px;
1236
1236
  }
1237
- `;function QueryTabs({query:s,children:j,sidebar:et=null,onTabChange:tt}){const{setChartRendererReady:rt,setQueryStatus:nt,setQueryError:at,setResultSetExists:it,setQueryLoading:ot,setBuildInProgress:st,setSlowQuery:lt,setSlowQueryFromCache:ct,setQueryRequestId:ut}=useChartRendererStateMethods(),[dt,ft]=react.exports.useState(),[vt,mt]=react.exports.useState(""),[pt,ht]=react.exports.useState(!1),[gt,yt]=useLocalStorage("queryTabs",{activeId:"1",tabs:[{id:"1",query:s||{}}]}),[xt,Ct]=react.exports.useState({});react.exports.useEffect(()=>{window.__cubejsPlayground={...window.__cubejsPlayground,forQuery(wt){return{onChartRendererReady(){rt(wt,!0)},onQueryStart:()=>{ot(wt,!0)},onQueryLoad:({resultSet:Et,error:Dt})=>{var Rt;let jt;if(Et){const{loadResponse:At}=Et.serialize(),{requestId:It,external:kt,dbType:_t,extDbType:Mt,usedPreAggregations:Ft={}}=At.results[0]||{};It&&ut(wt,It),ct(wt,Boolean(At.slowQuery)),Boolean(At.slowQuery)&&lt(wt,!1),it(wt,!0),jt=Object.keys(Ft).length>0,event(jt?"load_request_success_aggregated:frontend":"load_request_success:frontend",{dbType:_t,...jt?{external:kt}:null,...kt?{extDbType:Mt}:null});const qt=Et.serialize(),[Lt]=qt.loadResponse.results,Bt=(Rt=Object.values(Lt.usedPreAggregations||{})[0])==null?void 0:Rt.type,Ut=Lt.transformedQuery;nt(wt,{resultSet:Et,error:Dt,isAggregated:jt,preAggregationType:Bt,transformedQuery:Ut,extDbType:Mt,external:kt})}Dt&&(nt(wt,null),at(wt,Dt)),(Et||Dt)&&ot(wt,!1)},onQueryProgress:Et=>{var jt,Rt;st(wt,Boolean((jt=Et==null?void 0:Et.stage)==null?void 0:jt.stage.includes("pre-aggregation")));const Dt=((Rt=Et==null?void 0:Et.stage)==null?void 0:Rt.stage.includes("Executing query"))&&(Et.stage.timeElapsed||0)>=5e3;lt(wt,Dt),Dt&&ct(wt,!1)},onQueryDrilldown:(Et,Dt)=>{Ct({query:Et,pivotConfig:Dt})}}}}},[]),react.exports.useEffect(()=>{if(pt)return;const wt=gt.tabs.find(Et=>Et.id===gt.activeId);if(s&&!fastDeepEqual(validateQuery(wt==null?void 0:wt.query),validateQuery(s))){const Et=$t();yt({activeId:Et,tabs:[...gt.tabs,{id:Et,query:s}]})}ht(!0)},[pt]),react.exports.useEffect(()=>{if(pt&&gt.activeId){const wt=gt.tabs.find(Et=>Et.id===gt.activeId);wt&&(tt==null||tt(wt))}},[pt,gt.activeId]);const{activeId:St,tabs:bt}=gt;function $t(){const wt=bt.map(({id:Et})=>Et);for(let Et=1;Et<=bt.length+1;Et++)if(!wt.includes(Et.toString()))return Et.toString();return(bt.length+1).toString()}function Ot(wt){yt({...gt,tabs:bt.map(Et=>St===Et.id?{...Et,...wt}:Et)})}function Pt(wt,Et){yt({...gt,tabs:bt.map(Dt=>wt===Dt.id?{...Dt,name:Et}:Dt)})}function Nt(wt){yt({activeId:wt,tabs:bt})}function Tt(){Ct({})}return!pt||!gt.activeId?null:jsx(StyledTabs,{"data-testid":"query-tabs",activeKey:St,type:"editable-card",tabBarExtraContent:{right:et},hideAdd:!1,onChange:Nt,onEdit:wt=>{if(typeof wt=="string"){let Et=Number.MAX_VALUE;const Dt=bt.filter(({id:jt},Rt)=>(jt===wt&&(Et=Rt),jt!==wt));yt({activeId:Dt[Math.min(Et,Dt.length-1)].id,tabs:Dt})}else{const Et=$t();yt({activeId:Et,tabs:[...bt,{id:Et,query:{}}]})}},children:bt.map(wt=>jsxs(TabPane,{"data-testid":`query-tab-${wt.id}`,closable:bt.length>1,tab:dt===wt.id?jsx(Input$2,{autoFocus:!0,size:"small",value:vt,onKeyDown:Et=>{Et.key==="Enter"&&(ft(void 0),vt.trim()&&(Pt(wt.id,vt.trim()),mt(""))),Et.stopPropagation()},onChange:Et=>mt(Et.target.value),onBlur:()=>{vt.trim()&&(Pt(wt.id,vt.trim()),mt("")),ft(void 0)}}):jsx("span",{style:{userSelect:"none"},onDoubleClick:()=>{mt(wt.name||`Query ${wt.id}`),ft(wt.id)},children:wt.name?wt.name:`Query ${wt.id}`}),children:[j(wt,Ot),xt.query?jsx(DrilldownModal,{query:xt.query,pivotConfig:xt.pivotConfig,onClose:Tt}):null]},wt.id))})}const scriptRel="modulepreload",assetsURL=function(s){return"/"+s},seen={},__vitePreload=function s(j,et,tt){if(!et||et.length===0)return j();const rt=document.getElementsByTagName("link");return Promise.all(et.map(nt=>{if(nt=assetsURL(nt),nt in seen)return;seen[nt]=!0;const at=nt.endsWith(".css"),it=at?'[rel="stylesheet"]':"";if(!!tt)for(let lt=rt.length-1;lt>=0;lt--){const ct=rt[lt];if(ct.href===nt&&(!at||ct.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${nt}"]${it}`))return;const st=document.createElement("link");if(st.rel=at?"stylesheet":scriptRel,at||(st.as="script",st.crossOrigin=""),st.href=nt,document.head.appendChild(st),at)return new Promise((lt,ct)=>{st.addEventListener("load",lt),st.addEventListener("error",()=>ct(new Error(`Unable to preload CSS for ${nt}`)))})})).then(()=>j())};var define={},lzString={exports:{}};(function(s){var j=function(){var et=String.fromCharCode,tt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",rt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",nt={};function at(ot,st){if(!nt[ot]){nt[ot]={};for(var lt=0;lt<ot.length;lt++)nt[ot][ot.charAt(lt)]=lt}return nt[ot][st]}var it={compressToBase64:function(ot){if(ot==null)return"";var st=it._compress(ot,6,function(lt){return tt.charAt(lt)});switch(st.length%4){default:case 0:return st;case 1:return st+"===";case 2:return st+"==";case 3:return st+"="}},decompressFromBase64:function(ot){return ot==null?"":ot==""?null:it._decompress(ot.length,32,function(st){return at(tt,ot.charAt(st))})},compressToUTF16:function(ot){return ot==null?"":it._compress(ot,15,function(st){return et(st+32)})+" "},decompressFromUTF16:function(ot){return ot==null?"":ot==""?null:it._decompress(ot.length,16384,function(st){return ot.charCodeAt(st)-32})},compressToUint8Array:function(ot){for(var st=it.compress(ot),lt=new Uint8Array(st.length*2),ct=0,ut=st.length;ct<ut;ct++){var dt=st.charCodeAt(ct);lt[ct*2]=dt>>>8,lt[ct*2+1]=dt%256}return lt},decompressFromUint8Array:function(ot){if(ot==null)return it.decompress(ot);for(var st=new Array(ot.length/2),lt=0,ct=st.length;lt<ct;lt++)st[lt]=ot[lt*2]*256+ot[lt*2+1];var ut=[];return st.forEach(function(dt){ut.push(et(dt))}),it.decompress(ut.join(""))},compressToEncodedURIComponent:function(ot){return ot==null?"":it._compress(ot,6,function(st){return rt.charAt(st)})},decompressFromEncodedURIComponent:function(ot){return ot==null?"":ot==""?null:(ot=ot.replace(/ /g,"+"),it._decompress(ot.length,32,function(st){return at(rt,ot.charAt(st))}))},compress:function(ot){return it._compress(ot,16,function(st){return et(st)})},_compress:function(ot,st,lt){if(ot==null)return"";var ct,ut,dt={},ft={},vt="",mt="",pt="",ht=2,gt=3,yt=2,xt=[],Ct=0,St=0,bt;for(bt=0;bt<ot.length;bt+=1)if(vt=ot.charAt(bt),Object.prototype.hasOwnProperty.call(dt,vt)||(dt[vt]=gt++,ft[vt]=!0),mt=pt+vt,Object.prototype.hasOwnProperty.call(dt,mt))pt=mt;else{if(Object.prototype.hasOwnProperty.call(ft,pt)){if(pt.charCodeAt(0)<256){for(ct=0;ct<yt;ct++)Ct=Ct<<1,St==st-1?(St=0,xt.push(lt(Ct)),Ct=0):St++;for(ut=pt.charCodeAt(0),ct=0;ct<8;ct++)Ct=Ct<<1|ut&1,St==st-1?(St=0,xt.push(lt(Ct)),Ct=0):St++,ut=ut>>1}else{for(ut=1,ct=0;ct<yt;ct++)Ct=Ct<<1|ut,St==st-1?(St=0,xt.push(lt(Ct)),Ct=0):St++,ut=0;for(ut=pt.charCodeAt(0),ct=0;ct<16;ct++)Ct=Ct<<1|ut&1,St==st-1?(St=0,xt.push(lt(Ct)),Ct=0):St++,ut=ut>>1}ht--,ht==0&&(ht=Math.pow(2,yt),yt++),delete ft[pt]}else for(ut=dt[pt],ct=0;ct<yt;ct++)Ct=Ct<<1|ut&1,St==st-1?(St=0,xt.push(lt(Ct)),Ct=0):St++,ut=ut>>1;ht--,ht==0&&(ht=Math.pow(2,yt),yt++),dt[mt]=gt++,pt=String(vt)}if(pt!==""){if(Object.prototype.hasOwnProperty.call(ft,pt)){if(pt.charCodeAt(0)<256){for(ct=0;ct<yt;ct++)Ct=Ct<<1,St==st-1?(St=0,xt.push(lt(Ct)),Ct=0):St++;for(ut=pt.charCodeAt(0),ct=0;ct<8;ct++)Ct=Ct<<1|ut&1,St==st-1?(St=0,xt.push(lt(Ct)),Ct=0):St++,ut=ut>>1}else{for(ut=1,ct=0;ct<yt;ct++)Ct=Ct<<1|ut,St==st-1?(St=0,xt.push(lt(Ct)),Ct=0):St++,ut=0;for(ut=pt.charCodeAt(0),ct=0;ct<16;ct++)Ct=Ct<<1|ut&1,St==st-1?(St=0,xt.push(lt(Ct)),Ct=0):St++,ut=ut>>1}ht--,ht==0&&(ht=Math.pow(2,yt),yt++),delete ft[pt]}else for(ut=dt[pt],ct=0;ct<yt;ct++)Ct=Ct<<1|ut&1,St==st-1?(St=0,xt.push(lt(Ct)),Ct=0):St++,ut=ut>>1;ht--,ht==0&&(ht=Math.pow(2,yt),yt++)}for(ut=2,ct=0;ct<yt;ct++)Ct=Ct<<1|ut&1,St==st-1?(St=0,xt.push(lt(Ct)),Ct=0):St++,ut=ut>>1;for(;;)if(Ct=Ct<<1,St==st-1){xt.push(lt(Ct));break}else St++;return xt.join("")},decompress:function(ot){return ot==null?"":ot==""?null:it._decompress(ot.length,32768,function(st){return ot.charCodeAt(st)})},_decompress:function(ot,st,lt){var ct=[],ut=4,dt=4,ft=3,vt="",mt=[],pt,ht,gt,yt,xt,Ct,St,bt={val:lt(0),position:st,index:1};for(pt=0;pt<3;pt+=1)ct[pt]=pt;for(gt=0,xt=Math.pow(2,2),Ct=1;Ct!=xt;)yt=bt.val&bt.position,bt.position>>=1,bt.position==0&&(bt.position=st,bt.val=lt(bt.index++)),gt|=(yt>0?1:0)*Ct,Ct<<=1;switch(gt){case 0:for(gt=0,xt=Math.pow(2,8),Ct=1;Ct!=xt;)yt=bt.val&bt.position,bt.position>>=1,bt.position==0&&(bt.position=st,bt.val=lt(bt.index++)),gt|=(yt>0?1:0)*Ct,Ct<<=1;St=et(gt);break;case 1:for(gt=0,xt=Math.pow(2,16),Ct=1;Ct!=xt;)yt=bt.val&bt.position,bt.position>>=1,bt.position==0&&(bt.position=st,bt.val=lt(bt.index++)),gt|=(yt>0?1:0)*Ct,Ct<<=1;St=et(gt);break;case 2:return""}for(ct[3]=St,ht=St,mt.push(St);;){if(bt.index>ot)return"";for(gt=0,xt=Math.pow(2,ft),Ct=1;Ct!=xt;)yt=bt.val&bt.position,bt.position>>=1,bt.position==0&&(bt.position=st,bt.val=lt(bt.index++)),gt|=(yt>0?1:0)*Ct,Ct<<=1;switch(St=gt){case 0:for(gt=0,xt=Math.pow(2,8),Ct=1;Ct!=xt;)yt=bt.val&bt.position,bt.position>>=1,bt.position==0&&(bt.position=st,bt.val=lt(bt.index++)),gt|=(yt>0?1:0)*Ct,Ct<<=1;ct[dt++]=et(gt),St=dt-1,ut--;break;case 1:for(gt=0,xt=Math.pow(2,16),Ct=1;Ct!=xt;)yt=bt.val&bt.position,bt.position>>=1,bt.position==0&&(bt.position=st,bt.val=lt(bt.index++)),gt|=(yt>0?1:0)*Ct,Ct<<=1;ct[dt++]=et(gt),St=dt-1,ut--;break;case 2:return mt.join("")}if(ut==0&&(ut=Math.pow(2,ft),ft++),ct[St])vt=ct[St];else if(St===dt)vt=ht+ht.charAt(0);else return null;mt.push(vt),ct[dt++]=ht+vt.charAt(0),ut--,ht=vt,ut==0&&(ut=Math.pow(2,ft),ft++)}}};return it}();s!=null&&(s.exports=j)})(lzString);Object.defineProperty(define,"__esModule",{value:!0});var getParameters_1=define.getParameters=void 0,LZString=lzString.exports;function compress(s){return LZString.compressToBase64(s).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function getParameters(s){return compress(JSON.stringify(s))}getParameters_1=define.getParameters=getParameters;const GraphQLIcon=()=>jsx(Icon$1,{component:()=>jsx("svg",{version:"1.1",height:"1em",width:"1em",x:"0px",y:"0px",viewBox:"0 0 400 400",enableBackground:"new 0 0 400 400",fill:"currentColor",children:jsxs("g",{children:[jsx("rect",{x:"122",y:"-0.4",transform:"matrix(-0.866 -0.5 0.5 -0.866 163.3196 363.3136)",width:"16.6",height:"320.3"}),jsx("rect",{x:"39.8",y:"272.2",width:"320.3",height:"16.6"}),jsx("rect",{x:"37.9",y:"312.2",transform:"matrix(-0.866 -0.5 0.5 -0.866 83.0693 663.3409)",width:"185",height:"16.6"}),jsx("rect",{x:"177.1",y:"71.1",transform:"matrix(-0.866 -0.5 0.5 -0.866 463.3409 283.0693)",width:"185",height:"16.6"}),jsx("rect",{x:"122.1",y:"-13",transform:"matrix(-0.5 -0.866 0.866 -0.5 126.7903 232.1221)",width:"16.6",height:"185"}),jsx("rect",{x:"109.6",y:"151.6",transform:"matrix(-0.5 -0.866 0.866 -0.5 266.0828 473.3766)",width:"320.3",height:"16.6"}),jsx("rect",{x:"52.5",y:"107.5",width:"16.6",height:"185"}),jsx("rect",{x:"330.9",y:"107.5",width:"16.6",height:"185"}),jsx("rect",{x:"262.4",y:"240.1",transform:"matrix(-0.5 -0.866 0.866 -0.5 126.7953 714.2875)",width:"14.5",height:"160.9"}),jsx("path",{d:"M369.5,297.9c-9.6,16.7-31,22.4-47.7,12.8c-16.7-9.6-22.4-31-12.8-47.7c9.6-16.7,31-22.4,47.7-12.8 C373.5,259.9,379.2,281.2,369.5,297.9"}),jsx("path",{d:"M90.9,137c-9.6,16.7-31,22.4-47.7,12.8c-16.7-9.6-22.4-31-12.8-47.7c9.6-16.7,31-22.4,47.7-12.8 C94.8,99,100.5,120.3,90.9,137"}),jsx("path",{d:"M30.5,297.9c-9.6-16.7-3.9-38,12.8-47.7c16.7-9.6,38-3.9,47.7,12.8c9.6,16.7,3.9,38-12.8,47.7 C61.4,320.3,40.1,314.6,30.5,297.9"}),jsx("path",{d:"M309.1,137c-9.6-16.7-3.9-38,12.8-47.7c16.7-9.6,38-3.9,47.7,12.8c9.6,16.7,3.9,38-12.8,47.7 C340.1,159.4,318.7,153.7,309.1,137"}),jsx("path",{d:"M200,395.8c-19.3,0-34.9-15.6-34.9-34.9c0-19.3,15.6-34.9,34.9-34.9c19.3,0,34.9,15.6,34.9,34.9 C234.9,380.1,219.3,395.8,200,395.8"}),jsx("path",{d:"M200,74c-19.3,0-34.9-15.6-34.9-34.9c0-19.3,15.6-34.9,34.9-34.9c19.3,0,34.9,15.6,34.9,34.9 C234.9,58.4,219.3,74,200,74"})]})})});function handleChunkLoadError(s){if(!s.message.includes("Failed to fetch dynamically"))throw s;const j=Number(localStorage.getItem("lastLocationReload")||"0");Date.now()-Number(j)>=6e4&&(window.location.reload(),localStorage.setItem("lastLocationReload",Date.now().toString()))}function loadable(s,j){const et=react.exports.lazy(async()=>{try{return await s()}catch(tt){handleChunkLoadError(tt)}return{default:()=>react.exports.createElement("div",null,null)}});return et.loaded=!1,et.load=async(tt,rt)=>{if(et.loaded){rt==null||rt();return}tt==null||tt();try{await s()}catch(nt){handleChunkLoadError(nt)}tt==null||tt(),et.loaded=!0,rt==null||rt()},j&&setTimeout(()=>{et.loaded||et.load()},j),et}const GraphiQLSandbox=loadable(()=>__vitePreload(()=>import("./GraphiQLSandbox.76cdc358.js").then(s=>s.cz),["assets/GraphiQLSandbox.76cdc358.js","assets/GraphiQLSandbox.42d66bcc.css"])),SqlQueryTab=loadable(()=>__vitePreload(()=>import("./SqlQueryTab.f5501cee.js"),["assets/SqlQueryTab.f5501cee.js","assets/sqlFormatter.56fb71f9.js"])),CachePane=loadable(()=>__vitePreload(()=>import("./CachePane.1cf63398.js"),["assets/CachePane.1cf63398.js","assets/sqlFormatter.56fb71f9.js"])),frameworkToTemplate={react:"create-react-app",angular:"angular-cli",vue:"vue-cli"},StyledCard$1=styled(StyledCard$2)`
1237
+ `;function QueryTabs({query:s,children:j,sidebar:et=null,onTabChange:tt}){const{setChartRendererReady:rt,setQueryStatus:nt,setQueryError:at,setResultSetExists:it,setQueryLoading:ot,setBuildInProgress:st,setSlowQuery:lt,setSlowQueryFromCache:ct,setQueryRequestId:ut}=useChartRendererStateMethods(),[dt,ft]=react.exports.useState(),[vt,mt]=react.exports.useState(""),[pt,ht]=react.exports.useState(!1),[gt,yt]=useLocalStorage("queryTabs",{activeId:"1",tabs:[{id:"1",query:s||{}}]}),[xt,Ct]=react.exports.useState({});react.exports.useEffect(()=>{window.__cubejsPlayground={...window.__cubejsPlayground,forQuery(wt){return{onChartRendererReady(){rt(wt,!0)},onQueryStart:()=>{ot(wt,!0)},onQueryLoad:({resultSet:Et,error:Dt})=>{var Rt;let jt;if(Et){const{loadResponse:At}=Et.serialize(),{requestId:It,external:kt,dbType:_t,extDbType:Mt,usedPreAggregations:Ft={}}=At.results[0]||{};It&&ut(wt,It),ct(wt,Boolean(At.slowQuery)),Boolean(At.slowQuery)&&lt(wt,!1),it(wt,!0),jt=Object.keys(Ft).length>0,event(jt?"load_request_success_aggregated:frontend":"load_request_success:frontend",{dbType:_t,...jt?{external:kt}:null,...kt?{extDbType:Mt}:null});const qt=Et.serialize(),[Lt]=qt.loadResponse.results,Bt=(Rt=Object.values(Lt.usedPreAggregations||{})[0])==null?void 0:Rt.type,Ut=Lt.transformedQuery;nt(wt,{resultSet:Et,error:Dt,isAggregated:jt,preAggregationType:Bt,transformedQuery:Ut,extDbType:Mt,external:kt})}Dt&&(nt(wt,null),at(wt,Dt)),(Et||Dt)&&ot(wt,!1)},onQueryProgress:Et=>{var jt,Rt;st(wt,Boolean((jt=Et==null?void 0:Et.stage)==null?void 0:jt.stage.includes("pre-aggregation")));const Dt=((Rt=Et==null?void 0:Et.stage)==null?void 0:Rt.stage.includes("Executing query"))&&(Et.stage.timeElapsed||0)>=5e3;lt(wt,Dt),Dt&&ct(wt,!1)},onQueryDrilldown:(Et,Dt)=>{Ct({query:Et,pivotConfig:Dt})}}}}},[]),react.exports.useEffect(()=>{if(pt)return;const wt=gt.tabs.find(Et=>Et.id===gt.activeId);if(s&&!fastDeepEqual(validateQuery(wt==null?void 0:wt.query),validateQuery(s))){const Et=$t();yt({activeId:Et,tabs:[...gt.tabs,{id:Et,query:s}]})}ht(!0)},[pt]),react.exports.useEffect(()=>{if(pt&&gt.activeId){const wt=gt.tabs.find(Et=>Et.id===gt.activeId);wt&&(tt==null||tt(wt))}},[pt,gt.activeId]);const{activeId:St,tabs:bt}=gt;function $t(){const wt=bt.map(({id:Et})=>Et);for(let Et=1;Et<=bt.length+1;Et++)if(!wt.includes(Et.toString()))return Et.toString();return(bt.length+1).toString()}function Ot(wt){yt({...gt,tabs:bt.map(Et=>St===Et.id?{...Et,...wt}:Et)})}function Pt(wt,Et){yt({...gt,tabs:bt.map(Dt=>wt===Dt.id?{...Dt,name:Et}:Dt)})}function Nt(wt){yt({activeId:wt,tabs:bt})}function Tt(){Ct({})}return!pt||!gt.activeId?null:jsx(StyledTabs,{"data-testid":"query-tabs",activeKey:St,type:"editable-card",tabBarExtraContent:{right:et},hideAdd:!1,onChange:Nt,onEdit:wt=>{if(typeof wt=="string"){let Et=Number.MAX_VALUE;const Dt=bt.filter(({id:jt},Rt)=>(jt===wt&&(Et=Rt),jt!==wt));yt({activeId:Dt[Math.min(Et,Dt.length-1)].id,tabs:Dt})}else{const Et=$t();yt({activeId:Et,tabs:[...bt,{id:Et,query:{}}]})}},children:bt.map(wt=>jsxs(TabPane,{"data-testid":`query-tab-${wt.id}`,closable:bt.length>1,tab:dt===wt.id?jsx(Input$2,{autoFocus:!0,size:"small",value:vt,onKeyDown:Et=>{Et.key==="Enter"&&(ft(void 0),vt.trim()&&(Pt(wt.id,vt.trim()),mt(""))),Et.stopPropagation()},onChange:Et=>mt(Et.target.value),onBlur:()=>{vt.trim()&&(Pt(wt.id,vt.trim()),mt("")),ft(void 0)}}):jsx("span",{style:{userSelect:"none"},onDoubleClick:()=>{mt(wt.name||`Query ${wt.id}`),ft(wt.id)},children:wt.name?wt.name:`Query ${wt.id}`}),children:[j(wt,Ot),xt.query?jsx(DrilldownModal,{query:xt.query,pivotConfig:xt.pivotConfig,onClose:Tt}):null]},wt.id))})}const scriptRel="modulepreload",assetsURL=function(s){return"/"+s},seen={},__vitePreload=function s(j,et,tt){if(!et||et.length===0)return j();const rt=document.getElementsByTagName("link");return Promise.all(et.map(nt=>{if(nt=assetsURL(nt),nt in seen)return;seen[nt]=!0;const at=nt.endsWith(".css"),it=at?'[rel="stylesheet"]':"";if(!!tt)for(let lt=rt.length-1;lt>=0;lt--){const ct=rt[lt];if(ct.href===nt&&(!at||ct.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${nt}"]${it}`))return;const st=document.createElement("link");if(st.rel=at?"stylesheet":scriptRel,at||(st.as="script",st.crossOrigin=""),st.href=nt,document.head.appendChild(st),at)return new Promise((lt,ct)=>{st.addEventListener("load",lt),st.addEventListener("error",()=>ct(new Error(`Unable to preload CSS for ${nt}`)))})})).then(()=>j())};var define={},lzString={exports:{}};(function(s){var j=function(){var et=String.fromCharCode,tt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",rt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",nt={};function at(ot,st){if(!nt[ot]){nt[ot]={};for(var lt=0;lt<ot.length;lt++)nt[ot][ot.charAt(lt)]=lt}return nt[ot][st]}var it={compressToBase64:function(ot){if(ot==null)return"";var st=it._compress(ot,6,function(lt){return tt.charAt(lt)});switch(st.length%4){default:case 0:return st;case 1:return st+"===";case 2:return st+"==";case 3:return st+"="}},decompressFromBase64:function(ot){return ot==null?"":ot==""?null:it._decompress(ot.length,32,function(st){return at(tt,ot.charAt(st))})},compressToUTF16:function(ot){return ot==null?"":it._compress(ot,15,function(st){return et(st+32)})+" "},decompressFromUTF16:function(ot){return ot==null?"":ot==""?null:it._decompress(ot.length,16384,function(st){return ot.charCodeAt(st)-32})},compressToUint8Array:function(ot){for(var st=it.compress(ot),lt=new Uint8Array(st.length*2),ct=0,ut=st.length;ct<ut;ct++){var dt=st.charCodeAt(ct);lt[ct*2]=dt>>>8,lt[ct*2+1]=dt%256}return lt},decompressFromUint8Array:function(ot){if(ot==null)return it.decompress(ot);for(var st=new Array(ot.length/2),lt=0,ct=st.length;lt<ct;lt++)st[lt]=ot[lt*2]*256+ot[lt*2+1];var ut=[];return st.forEach(function(dt){ut.push(et(dt))}),it.decompress(ut.join(""))},compressToEncodedURIComponent:function(ot){return ot==null?"":it._compress(ot,6,function(st){return rt.charAt(st)})},decompressFromEncodedURIComponent:function(ot){return ot==null?"":ot==""?null:(ot=ot.replace(/ /g,"+"),it._decompress(ot.length,32,function(st){return at(rt,ot.charAt(st))}))},compress:function(ot){return it._compress(ot,16,function(st){return et(st)})},_compress:function(ot,st,lt){if(ot==null)return"";var ct,ut,dt={},ft={},vt="",mt="",pt="",ht=2,gt=3,yt=2,xt=[],Ct=0,St=0,bt;for(bt=0;bt<ot.length;bt+=1)if(vt=ot.charAt(bt),Object.prototype.hasOwnProperty.call(dt,vt)||(dt[vt]=gt++,ft[vt]=!0),mt=pt+vt,Object.prototype.hasOwnProperty.call(dt,mt))pt=mt;else{if(Object.prototype.hasOwnProperty.call(ft,pt)){if(pt.charCodeAt(0)<256){for(ct=0;ct<yt;ct++)Ct=Ct<<1,St==st-1?(St=0,xt.push(lt(Ct)),Ct=0):St++;for(ut=pt.charCodeAt(0),ct=0;ct<8;ct++)Ct=Ct<<1|ut&1,St==st-1?(St=0,xt.push(lt(Ct)),Ct=0):St++,ut=ut>>1}else{for(ut=1,ct=0;ct<yt;ct++)Ct=Ct<<1|ut,St==st-1?(St=0,xt.push(lt(Ct)),Ct=0):St++,ut=0;for(ut=pt.charCodeAt(0),ct=0;ct<16;ct++)Ct=Ct<<1|ut&1,St==st-1?(St=0,xt.push(lt(Ct)),Ct=0):St++,ut=ut>>1}ht--,ht==0&&(ht=Math.pow(2,yt),yt++),delete ft[pt]}else for(ut=dt[pt],ct=0;ct<yt;ct++)Ct=Ct<<1|ut&1,St==st-1?(St=0,xt.push(lt(Ct)),Ct=0):St++,ut=ut>>1;ht--,ht==0&&(ht=Math.pow(2,yt),yt++),dt[mt]=gt++,pt=String(vt)}if(pt!==""){if(Object.prototype.hasOwnProperty.call(ft,pt)){if(pt.charCodeAt(0)<256){for(ct=0;ct<yt;ct++)Ct=Ct<<1,St==st-1?(St=0,xt.push(lt(Ct)),Ct=0):St++;for(ut=pt.charCodeAt(0),ct=0;ct<8;ct++)Ct=Ct<<1|ut&1,St==st-1?(St=0,xt.push(lt(Ct)),Ct=0):St++,ut=ut>>1}else{for(ut=1,ct=0;ct<yt;ct++)Ct=Ct<<1|ut,St==st-1?(St=0,xt.push(lt(Ct)),Ct=0):St++,ut=0;for(ut=pt.charCodeAt(0),ct=0;ct<16;ct++)Ct=Ct<<1|ut&1,St==st-1?(St=0,xt.push(lt(Ct)),Ct=0):St++,ut=ut>>1}ht--,ht==0&&(ht=Math.pow(2,yt),yt++),delete ft[pt]}else for(ut=dt[pt],ct=0;ct<yt;ct++)Ct=Ct<<1|ut&1,St==st-1?(St=0,xt.push(lt(Ct)),Ct=0):St++,ut=ut>>1;ht--,ht==0&&(ht=Math.pow(2,yt),yt++)}for(ut=2,ct=0;ct<yt;ct++)Ct=Ct<<1|ut&1,St==st-1?(St=0,xt.push(lt(Ct)),Ct=0):St++,ut=ut>>1;for(;;)if(Ct=Ct<<1,St==st-1){xt.push(lt(Ct));break}else St++;return xt.join("")},decompress:function(ot){return ot==null?"":ot==""?null:it._decompress(ot.length,32768,function(st){return ot.charCodeAt(st)})},_decompress:function(ot,st,lt){var ct=[],ut=4,dt=4,ft=3,vt="",mt=[],pt,ht,gt,yt,xt,Ct,St,bt={val:lt(0),position:st,index:1};for(pt=0;pt<3;pt+=1)ct[pt]=pt;for(gt=0,xt=Math.pow(2,2),Ct=1;Ct!=xt;)yt=bt.val&bt.position,bt.position>>=1,bt.position==0&&(bt.position=st,bt.val=lt(bt.index++)),gt|=(yt>0?1:0)*Ct,Ct<<=1;switch(gt){case 0:for(gt=0,xt=Math.pow(2,8),Ct=1;Ct!=xt;)yt=bt.val&bt.position,bt.position>>=1,bt.position==0&&(bt.position=st,bt.val=lt(bt.index++)),gt|=(yt>0?1:0)*Ct,Ct<<=1;St=et(gt);break;case 1:for(gt=0,xt=Math.pow(2,16),Ct=1;Ct!=xt;)yt=bt.val&bt.position,bt.position>>=1,bt.position==0&&(bt.position=st,bt.val=lt(bt.index++)),gt|=(yt>0?1:0)*Ct,Ct<<=1;St=et(gt);break;case 2:return""}for(ct[3]=St,ht=St,mt.push(St);;){if(bt.index>ot)return"";for(gt=0,xt=Math.pow(2,ft),Ct=1;Ct!=xt;)yt=bt.val&bt.position,bt.position>>=1,bt.position==0&&(bt.position=st,bt.val=lt(bt.index++)),gt|=(yt>0?1:0)*Ct,Ct<<=1;switch(St=gt){case 0:for(gt=0,xt=Math.pow(2,8),Ct=1;Ct!=xt;)yt=bt.val&bt.position,bt.position>>=1,bt.position==0&&(bt.position=st,bt.val=lt(bt.index++)),gt|=(yt>0?1:0)*Ct,Ct<<=1;ct[dt++]=et(gt),St=dt-1,ut--;break;case 1:for(gt=0,xt=Math.pow(2,16),Ct=1;Ct!=xt;)yt=bt.val&bt.position,bt.position>>=1,bt.position==0&&(bt.position=st,bt.val=lt(bt.index++)),gt|=(yt>0?1:0)*Ct,Ct<<=1;ct[dt++]=et(gt),St=dt-1,ut--;break;case 2:return mt.join("")}if(ut==0&&(ut=Math.pow(2,ft),ft++),ct[St])vt=ct[St];else if(St===dt)vt=ht+ht.charAt(0);else return null;mt.push(vt),ct[dt++]=ht+vt.charAt(0),ut--,ht=vt,ut==0&&(ut=Math.pow(2,ft),ft++)}}};return it}();s!=null&&(s.exports=j)})(lzString);Object.defineProperty(define,"__esModule",{value:!0});var getParameters_1=define.getParameters=void 0,LZString=lzString.exports;function compress(s){return LZString.compressToBase64(s).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function getParameters(s){return compress(JSON.stringify(s))}getParameters_1=define.getParameters=getParameters;const GraphQLIcon=()=>jsx(Icon$1,{component:()=>jsx("svg",{version:"1.1",height:"1em",width:"1em",x:"0px",y:"0px",viewBox:"0 0 400 400",enableBackground:"new 0 0 400 400",fill:"currentColor",children:jsxs("g",{children:[jsx("rect",{x:"122",y:"-0.4",transform:"matrix(-0.866 -0.5 0.5 -0.866 163.3196 363.3136)",width:"16.6",height:"320.3"}),jsx("rect",{x:"39.8",y:"272.2",width:"320.3",height:"16.6"}),jsx("rect",{x:"37.9",y:"312.2",transform:"matrix(-0.866 -0.5 0.5 -0.866 83.0693 663.3409)",width:"185",height:"16.6"}),jsx("rect",{x:"177.1",y:"71.1",transform:"matrix(-0.866 -0.5 0.5 -0.866 463.3409 283.0693)",width:"185",height:"16.6"}),jsx("rect",{x:"122.1",y:"-13",transform:"matrix(-0.5 -0.866 0.866 -0.5 126.7903 232.1221)",width:"16.6",height:"185"}),jsx("rect",{x:"109.6",y:"151.6",transform:"matrix(-0.5 -0.866 0.866 -0.5 266.0828 473.3766)",width:"320.3",height:"16.6"}),jsx("rect",{x:"52.5",y:"107.5",width:"16.6",height:"185"}),jsx("rect",{x:"330.9",y:"107.5",width:"16.6",height:"185"}),jsx("rect",{x:"262.4",y:"240.1",transform:"matrix(-0.5 -0.866 0.866 -0.5 126.7953 714.2875)",width:"14.5",height:"160.9"}),jsx("path",{d:"M369.5,297.9c-9.6,16.7-31,22.4-47.7,12.8c-16.7-9.6-22.4-31-12.8-47.7c9.6-16.7,31-22.4,47.7-12.8 C373.5,259.9,379.2,281.2,369.5,297.9"}),jsx("path",{d:"M90.9,137c-9.6,16.7-31,22.4-47.7,12.8c-16.7-9.6-22.4-31-12.8-47.7c9.6-16.7,31-22.4,47.7-12.8 C94.8,99,100.5,120.3,90.9,137"}),jsx("path",{d:"M30.5,297.9c-9.6-16.7-3.9-38,12.8-47.7c16.7-9.6,38-3.9,47.7,12.8c9.6,16.7,3.9,38-12.8,47.7 C61.4,320.3,40.1,314.6,30.5,297.9"}),jsx("path",{d:"M309.1,137c-9.6-16.7-3.9-38,12.8-47.7c16.7-9.6,38-3.9,47.7,12.8c9.6,16.7,3.9,38-12.8,47.7 C340.1,159.4,318.7,153.7,309.1,137"}),jsx("path",{d:"M200,395.8c-19.3,0-34.9-15.6-34.9-34.9c0-19.3,15.6-34.9,34.9-34.9c19.3,0,34.9,15.6,34.9,34.9 C234.9,380.1,219.3,395.8,200,395.8"}),jsx("path",{d:"M200,74c-19.3,0-34.9-15.6-34.9-34.9c0-19.3,15.6-34.9,34.9-34.9c19.3,0,34.9,15.6,34.9,34.9 C234.9,58.4,219.3,74,200,74"})]})})});function handleChunkLoadError(s){if(!s.message.includes("Failed to fetch dynamically"))throw s;const j=Number(localStorage.getItem("lastLocationReload")||"0");Date.now()-Number(j)>=6e4&&(window.location.reload(),localStorage.setItem("lastLocationReload",Date.now().toString()))}function loadable(s,j){const et=react.exports.lazy(async()=>{try{return await s()}catch(tt){handleChunkLoadError(tt)}return{default:()=>react.exports.createElement("div",null,null)}});return et.loaded=!1,et.load=async(tt,rt)=>{if(et.loaded){rt==null||rt();return}tt==null||tt();try{await s()}catch(nt){handleChunkLoadError(nt)}tt==null||tt(),et.loaded=!0,rt==null||rt()},j&&setTimeout(()=>{et.loaded||et.load()},j),et}const GraphiQLSandbox=loadable(()=>__vitePreload(()=>import("./GraphiQLSandbox.ddacb292.js").then(s=>s.cz),["assets/GraphiQLSandbox.ddacb292.js","assets/GraphiQLSandbox.42d66bcc.css"])),SqlQueryTab=loadable(()=>__vitePreload(()=>import("./SqlQueryTab.b46c1670.js"),["assets/SqlQueryTab.b46c1670.js","assets/sqlFormatter.56fb71f9.js"])),CachePane=loadable(()=>__vitePreload(()=>import("./CachePane.548970b8.js"),["assets/CachePane.548970b8.js","assets/sqlFormatter.56fb71f9.js"])),frameworkToTemplate={react:"create-react-app",angular:"angular-cli",vue:"vue-cli"},StyledCard$1=styled(StyledCard$2)`
1238
1238
  min-height: 420px;
1239
1239
 
1240
1240
  .ant-card-head {
@@ -1,4 +1,4 @@
1
- import{b as ye}from"./index.6c1b8bbf.js";import{S as $,T as z,a as J,i as I,R as s,C as S,g as M,I as be,G as se,b as R,c as ke,d as Fe,e as Ie,f as Ne,h as Oe,j as K,D,k as _e,l as Ae,m as oe,n as ce,o as U,v as Z,p as le,q as w,r as ee,K as q,s as ue,t as Me,u as ae,w as Le,x as H,y as je,z as Re,A as Ce,B as he,E as xe,F as Ve,H as Pe,J as Ue,L as we,P as Ge,M as Be,N as Qe,O as Ye,Q as $e,U as ze,V as Je,W as Ke,X as qe,Y as He,Z as We,_ as Xe,$ as Ze,a0 as en,a1 as nn,a2 as tn,a3 as rn,a4 as an}from"./GraphiQLSandbox.76cdc358.js";function de(e){let t;return fe(e,n=>{switch(n.kind){case"Query":case"ShortQuery":case"Mutation":case"Subscription":case"FragmentDefinition":t=n;break}}),t}function W(e,t,n){return n===$.name&&e.getQueryType()===t?$:n===z.name&&e.getQueryType()===t?z:n===J.name&&I(t)?J:"getFields"in t?t.getFields()[n]:null}function fe(e,t){const n=[];let i=e;for(;i&&i.kind;)n.push(i),i=i.prevState;for(let r=n.length-1;r>=0;r--)t(n[r])}function N(e){const t=Object.keys(e),n=t.length,i=new Array(n);for(let r=0;r<n;++r)i[r]=e[t[r]];return i}function b(e,t){return sn(t,pe(e.string))}function sn(e,t){if(!t)return Y(e,i=>!i.isDeprecated);const n=e.map(i=>({proximity:on(pe(i.label),t),entry:i}));return Y(Y(n,i=>i.proximity<=2),i=>!i.entry.isDeprecated).sort((i,r)=>(i.entry.isDeprecated?1:0)-(r.entry.isDeprecated?1:0)||i.proximity-r.proximity||i.entry.label.length-r.entry.label.length).map(i=>i.entry)}function Y(e,t){const n=e.filter(t);return n.length===0?e:n}function pe(e){return e.toLowerCase().replace(/\W/g,"")}function on(e,t){let n=cn(t,e);return e.length>t.length&&(n-=e.length-t.length-1,n+=e.indexOf(t)===0?0:.5),n}function cn(e,t){let n,i;const r=[],a=e.length,l=t.length;for(n=0;n<=a;n++)r[n]=[n];for(i=1;i<=l;i++)r[0][i]=i;for(n=1;n<=a;n++)for(i=1;i<=l;i++){const c=e[n-1]===t[i-1]?0:1;r[n][i]=Math.min(r[n-1][i]+1,r[n][i-1]+1,r[n-1][i-1]+c),n>1&&i>1&&e[n-1]===t[i-2]&&e[n-2]===t[i-1]&&(r[n][i]=Math.min(r[n][i],r[n-2][i-2]+c))}return r[a][l]}const ne={command:"editor.action.triggerSuggest",title:"Suggestions"},ln=e=>{const t=[];return e&&Z(le(e),{FragmentDefinition(n){t.push(n)}}),t};function un(e,t,n,i,r,a){var l;const c=Object.assign(Object.assign({},a),{schema:e}),u=i||ie(t,n),o=u.state.kind==="Invalid"?u.state.prevState:u.state;if(!o)return[];const d=o.kind,f=o.step,v=re(e,u.state);if(d===s.DOCUMENT)return b(u,[{label:"query",kind:S.Function},{label:"mutation",kind:S.Function},{label:"subscription",kind:S.Function},{label:"fragment",kind:S.Function},{label:"{",kind:S.Constructor}]);if(d===s.IMPLEMENTS||d===s.NAMED_TYPE&&((l=o.prevState)===null||l===void 0?void 0:l.kind)===s.IMPLEMENTS)return Tn(u,o,e,t,v);if(d===s.SELECTION_SET||d===s.FIELD||d===s.ALIASED_FIELD)return fn(u,v,c);if(d===s.ARGUMENTS||d===s.ARGUMENT&&f===0){const p=v.argDefs;if(p)return b(u,p.map(T=>{var g;return{label:T.name,insertText:T.name+": ",command:ne,detail:String(T.type),documentation:(g=T.description)!==null&&g!==void 0?g:void 0,kind:S.Variable,type:T.type}}))}if((d===s.OBJECT_VALUE||d===s.OBJECT_FIELD&&f===0)&&v.objectFieldDefs){const p=N(v.objectFieldDefs),T=d===s.OBJECT_VALUE?S.Value:S.Field;return b(u,p.map(g=>{var k;return{label:g.name,detail:String(g.type),documentation:(k=g.description)!==null&&k!==void 0?k:void 0,kind:T,type:g.type}}))}if(d===s.ENUM_VALUE||d===s.LIST_VALUE&&f===1||d===s.OBJECT_FIELD&&f===2||d===s.ARGUMENT&&f===2)return pn(u,v,t,e);if(d===s.VARIABLE&&f===1){const p=M(v.inputType),T=te(t,e,u);return b(u,T.filter(g=>g.detail===(p==null?void 0:p.name)))}return d===s.TYPE_CONDITION&&f===1||d===s.NAMED_TYPE&&o.prevState!=null&&o.prevState.kind===s.TYPE_CONDITION?mn(u,v,e):d===s.FRAGMENT_SPREAD&&f===1?gn(u,v,e,t,Array.isArray(r)?r:ln(r)):d===s.VARIABLE_DEFINITION&&f===2||d===s.LIST_TYPE&&f===1||d===s.NAMED_TYPE&&o.prevState&&(o.prevState.kind===s.VARIABLE_DEFINITION||o.prevState.kind===s.LIST_TYPE||o.prevState.kind===s.NON_NULL_TYPE)?vn(u,e):d===s.DIRECTIVE?Dn(u,o,e):[]}const P=` {
1
+ import{b as ye}from"./index.acec7836.js";import{S as $,T as z,a as J,i as I,R as s,C as S,g as M,I as be,G as se,b as R,c as ke,d as Fe,e as Ie,f as Ne,h as Oe,j as K,D,k as _e,l as Ae,m as oe,n as ce,o as U,v as Z,p as le,q as w,r as ee,K as q,s as ue,t as Me,u as ae,w as Le,x as H,y as je,z as Re,A as Ce,B as he,E as xe,F as Ve,H as Pe,J as Ue,L as we,P as Ge,M as Be,N as Qe,O as Ye,Q as $e,U as ze,V as Je,W as Ke,X as qe,Y as He,Z as We,_ as Xe,$ as Ze,a0 as en,a1 as nn,a2 as tn,a3 as rn,a4 as an}from"./GraphiQLSandbox.ddacb292.js";function de(e){let t;return fe(e,n=>{switch(n.kind){case"Query":case"ShortQuery":case"Mutation":case"Subscription":case"FragmentDefinition":t=n;break}}),t}function W(e,t,n){return n===$.name&&e.getQueryType()===t?$:n===z.name&&e.getQueryType()===t?z:n===J.name&&I(t)?J:"getFields"in t?t.getFields()[n]:null}function fe(e,t){const n=[];let i=e;for(;i&&i.kind;)n.push(i),i=i.prevState;for(let r=n.length-1;r>=0;r--)t(n[r])}function N(e){const t=Object.keys(e),n=t.length,i=new Array(n);for(let r=0;r<n;++r)i[r]=e[t[r]];return i}function b(e,t){return sn(t,pe(e.string))}function sn(e,t){if(!t)return Y(e,i=>!i.isDeprecated);const n=e.map(i=>({proximity:on(pe(i.label),t),entry:i}));return Y(Y(n,i=>i.proximity<=2),i=>!i.entry.isDeprecated).sort((i,r)=>(i.entry.isDeprecated?1:0)-(r.entry.isDeprecated?1:0)||i.proximity-r.proximity||i.entry.label.length-r.entry.label.length).map(i=>i.entry)}function Y(e,t){const n=e.filter(t);return n.length===0?e:n}function pe(e){return e.toLowerCase().replace(/\W/g,"")}function on(e,t){let n=cn(t,e);return e.length>t.length&&(n-=e.length-t.length-1,n+=e.indexOf(t)===0?0:.5),n}function cn(e,t){let n,i;const r=[],a=e.length,l=t.length;for(n=0;n<=a;n++)r[n]=[n];for(i=1;i<=l;i++)r[0][i]=i;for(n=1;n<=a;n++)for(i=1;i<=l;i++){const c=e[n-1]===t[i-1]?0:1;r[n][i]=Math.min(r[n-1][i]+1,r[n][i-1]+1,r[n-1][i-1]+c),n>1&&i>1&&e[n-1]===t[i-2]&&e[n-2]===t[i-1]&&(r[n][i]=Math.min(r[n][i],r[n-2][i-2]+c))}return r[a][l]}const ne={command:"editor.action.triggerSuggest",title:"Suggestions"},ln=e=>{const t=[];return e&&Z(le(e),{FragmentDefinition(n){t.push(n)}}),t};function un(e,t,n,i,r,a){var l;const c=Object.assign(Object.assign({},a),{schema:e}),u=i||ie(t,n),o=u.state.kind==="Invalid"?u.state.prevState:u.state;if(!o)return[];const d=o.kind,f=o.step,v=re(e,u.state);if(d===s.DOCUMENT)return b(u,[{label:"query",kind:S.Function},{label:"mutation",kind:S.Function},{label:"subscription",kind:S.Function},{label:"fragment",kind:S.Function},{label:"{",kind:S.Constructor}]);if(d===s.IMPLEMENTS||d===s.NAMED_TYPE&&((l=o.prevState)===null||l===void 0?void 0:l.kind)===s.IMPLEMENTS)return Tn(u,o,e,t,v);if(d===s.SELECTION_SET||d===s.FIELD||d===s.ALIASED_FIELD)return fn(u,v,c);if(d===s.ARGUMENTS||d===s.ARGUMENT&&f===0){const p=v.argDefs;if(p)return b(u,p.map(T=>{var g;return{label:T.name,insertText:T.name+": ",command:ne,detail:String(T.type),documentation:(g=T.description)!==null&&g!==void 0?g:void 0,kind:S.Variable,type:T.type}}))}if((d===s.OBJECT_VALUE||d===s.OBJECT_FIELD&&f===0)&&v.objectFieldDefs){const p=N(v.objectFieldDefs),T=d===s.OBJECT_VALUE?S.Value:S.Field;return b(u,p.map(g=>{var k;return{label:g.name,detail:String(g.type),documentation:(k=g.description)!==null&&k!==void 0?k:void 0,kind:T,type:g.type}}))}if(d===s.ENUM_VALUE||d===s.LIST_VALUE&&f===1||d===s.OBJECT_FIELD&&f===2||d===s.ARGUMENT&&f===2)return pn(u,v,t,e);if(d===s.VARIABLE&&f===1){const p=M(v.inputType),T=te(t,e,u);return b(u,T.filter(g=>g.detail===(p==null?void 0:p.name)))}return d===s.TYPE_CONDITION&&f===1||d===s.NAMED_TYPE&&o.prevState!=null&&o.prevState.kind===s.TYPE_CONDITION?mn(u,v,e):d===s.FRAGMENT_SPREAD&&f===1?gn(u,v,e,t,Array.isArray(r)?r:ln(r)):d===s.VARIABLE_DEFINITION&&f===2||d===s.LIST_TYPE&&f===1||d===s.NAMED_TYPE&&o.prevState&&(o.prevState.kind===s.VARIABLE_DEFINITION||o.prevState.kind===s.LIST_TYPE||o.prevState.kind===s.NON_NULL_TYPE)?vn(u,e):d===s.DIRECTIVE?Dn(u,o,e):[]}const P=` {
2
2
  $1
3
3
  }`,dn=e=>{const t=e.type;return I(t)||w(t)&&I(t.ofType)||ee(t)&&(I(t.ofType)||w(t.ofType)&&I(t.ofType.ofType))?P:null};function fn(e,t,n){var i;if(t.parentType){const r=t.parentType;let a=[];return"getFields"in r&&(a=N(r.getFields())),I(r)&&a.push(J),r===((i=n==null?void 0:n.schema)===null||i===void 0?void 0:i.getQueryType())&&a.push($,z),b(e,a.map((l,c)=>{var u;const o={sortText:String(c)+l.name,label:l.name,detail:String(l.type),documentation:(u=l.description)!==null&&u!==void 0?u:void 0,deprecated:Boolean(l.deprecationReason),isDeprecated:Boolean(l.deprecationReason),deprecationReason:l.deprecationReason,kind:S.Field,type:l.type},d=dn(l);return d&&(o.insertText=l.name+d,o.insertTextFormat=be.Snippet,o.command=ne),o}))}return[]}function pn(e,t,n,i){const r=M(t.inputType),a=te(n,i,e).filter(l=>l.detail===r.name);if(r instanceof se){const l=r.getValues();return b(e,l.map(c=>{var u;return{label:c.name,detail:String(r),documentation:(u=c.description)!==null&&u!==void 0?u:void 0,deprecated:Boolean(c.deprecationReason),isDeprecated:Boolean(c.deprecationReason),deprecationReason:c.deprecationReason,kind:S.EnumMember,type:r}}).concat(a))}else if(r===R)return b(e,a.concat([{label:"true",detail:String(R),documentation:"Not false.",kind:S.Variable,type:R},{label:"false",detail:String(R),documentation:"Not true.",kind:S.Variable,type:R}]));return a}function Tn(e,t,n,i,r){if(t.needsSeperator)return[];const a=n.getTypeMap(),l=N(a).filter(ke),c=l.map(({name:p})=>p),u=new Set;G(i,(p,T)=>{var g,k,O,y,_;if(T.name&&(T.kind===s.INTERFACE_DEF&&!c.includes(T.name)&&u.add(T.name),T.kind===s.NAMED_TYPE&&((g=T.prevState)===null||g===void 0?void 0:g.kind)===s.IMPLEMENTS)){if(r.interfaceDef){if((k=r.interfaceDef)===null||k===void 0?void 0:k.getInterfaces().find(({name:Q})=>Q===T.name))return;const B=n.getType(T.name),j=(O=r.interfaceDef)===null||O===void 0?void 0:O.toConfig();r.interfaceDef=new U(Object.assign(Object.assign({},j),{interfaces:[...j.interfaces,B||new U({name:T.name,fields:{}})]}))}else if(r.objectTypeDef){if((y=r.objectTypeDef)===null||y===void 0?void 0:y.getInterfaces().find(({name:Q})=>Q===T.name))return;const B=n.getType(T.name),j=(_=r.objectTypeDef)===null||_===void 0?void 0:_.toConfig();r.objectTypeDef=new ce(Object.assign(Object.assign({},j),{interfaces:[...j.interfaces,B||new U({name:T.name,fields:{}})]}))}}});const o=r.interfaceDef||r.objectTypeDef,f=((o==null?void 0:o.getInterfaces())||[]).map(({name:p})=>p),v=l.concat([...u].map(p=>({name:p}))).filter(({name:p})=>p!==(o==null?void 0:o.name)&&!f.includes(p));return b(e,v.map(p=>{const T={label:p.name,kind:S.Interface,type:p};return p!=null&&p.description&&(T.documentation=p.description),T}))}function mn(e,t,n,i){let r;if(t.parentType)if(Fe(t.parentType)){const a=Ie(t.parentType),l=n.getPossibleTypes(a),c=Object.create(null);l.forEach(u=>{u.getInterfaces().forEach(o=>{c[o.name]=o})}),r=l.concat(N(c))}else r=[t.parentType];else{const a=n.getTypeMap();r=N(a).filter(I)}return b(e,r.map(a=>{const l=M(a);return{label:String(a),documentation:l&&l.description||"",kind:S.Field}}))}function gn(e,t,n,i,r){if(!i)return[];const a=n.getTypeMap(),l=de(e.state),c=Te(i);r&&r.length>0&&c.push(...r);const u=c.filter(o=>a[o.typeCondition.name.value]&&!(l&&l.kind===s.FRAGMENT_DEFINITION&&l.name===o.name.value)&&I(t.parentType)&&I(a[o.typeCondition.name.value])&&Ne(n,t.parentType,a[o.typeCondition.name.value]));return b(e,u.map(o=>({label:o.name.value,detail:String(a[o.typeCondition.name.value]),documentation:`fragment ${o.name.value} on ${o.typeCondition.name.value}`,kind:S.Field,type:a[o.typeCondition.name.value]})))}const En=(e,t)=>{var n,i,r,a,l,c,u,o,d,f;if(((n=e.prevState)===null||n===void 0?void 0:n.kind)===t)return e.prevState;if(((r=(i=e.prevState)===null||i===void 0?void 0:i.prevState)===null||r===void 0?void 0:r.kind)===t)return e.prevState.prevState;if(((c=(l=(a=e.prevState)===null||a===void 0?void 0:a.prevState)===null||l===void 0?void 0:l.prevState)===null||c===void 0?void 0:c.kind)===t)return e.prevState.prevState.prevState;if(((f=(d=(o=(u=e.prevState)===null||u===void 0?void 0:u.prevState)===null||o===void 0?void 0:o.prevState)===null||d===void 0?void 0:d.prevState)===null||f===void 0?void 0:f.kind)===t)return e.prevState.prevState.prevState.prevState};function te(e,t,n){let i=null,r;const a=Object.create({});return G(e,(l,c)=>{if((c==null?void 0:c.kind)===s.VARIABLE&&c.name&&(i=c.name),(c==null?void 0:c.kind)===s.NAMED_TYPE&&i){const u=En(c,s.TYPE);u!=null&&u.type&&(r=t.getType(u==null?void 0:u.type))}i&&r&&(a[i]||(a[i]={detail:r.toString(),insertText:n.string==="$"?i:"$"+i,label:i,type:r,kind:S.Variable},i=null,r=null))}),N(a)}function Te(e){const t=[];return G(e,(n,i)=>{i.kind===s.FRAGMENT_DEFINITION&&i.name&&i.type&&t.push({kind:s.FRAGMENT_DEFINITION,name:{kind:q.NAME,value:i.name},selectionSet:{kind:s.SELECTION_SET,selections:[]},typeCondition:{kind:s.NAMED_TYPE,name:{kind:q.NAME,value:i.type}}})}),t}function vn(e,t,n){const i=t.getTypeMap(),r=N(i).filter(Oe);return b(e,r.map(a=>({label:a.name,documentation:a.description,kind:S.Variable})))}function Dn(e,t,n,i){if(t.prevState&&t.prevState.kind){const r=n.getDirectives().filter(a=>me(t.prevState,a));return b(e,r.map(a=>({label:a.name,documentation:a.description||"",kind:S.Function})))}return[]}function ie(e,t){let n=null,i=null,r=null;const a=G(e,(l,c,u,o)=>{if(o===t.line&&l.getCurrentPosition()>=t.character)return n=u,i=Object.assign({},c),r=l.current(),"BREAK"});return{start:a.start,end:a.end,string:r||a.string,state:i||a.state,style:n||a.style}}function G(e,t){const n=e.split(`
4
4
  `),i=ue();let r=i.startState(),a="",l=new K("");for(let c=0;c<n.length;c++){for(l=new K(n[c]);!l.eol()&&(a=i.token(l,r),t(l,r,a,c)!=="BREAK"););t(l,r,a,c),r.kind||(r=i.startState())}return{start:l.getStartOfToken(),end:l.getCurrentPosition(),string:l.current(),state:r,style:a}}function me(e,t){if(!e||!e.kind)return!1;const n=e.kind,i=t.locations;switch(n){case s.QUERY:return i.indexOf(D.QUERY)!==-1;case s.MUTATION:return i.indexOf(D.MUTATION)!==-1;case s.SUBSCRIPTION:return i.indexOf(D.SUBSCRIPTION)!==-1;case s.FIELD:case s.ALIASED_FIELD:return i.indexOf(D.FIELD)!==-1;case s.FRAGMENT_DEFINITION:return i.indexOf(D.FRAGMENT_DEFINITION)!==-1;case s.FRAGMENT_SPREAD:return i.indexOf(D.FRAGMENT_SPREAD)!==-1;case s.INLINE_FRAGMENT:return i.indexOf(D.INLINE_FRAGMENT)!==-1;case s.SCHEMA_DEF:return i.indexOf(D.SCHEMA)!==-1;case s.SCALAR_DEF:return i.indexOf(D.SCALAR)!==-1;case s.OBJECT_TYPE_DEF:return i.indexOf(D.OBJECT)!==-1;case s.FIELD_DEF:return i.indexOf(D.FIELD_DEFINITION)!==-1;case s.INTERFACE_DEF:return i.indexOf(D.INTERFACE)!==-1;case s.UNION_DEF:return i.indexOf(D.UNION)!==-1;case s.ENUM_DEF:return i.indexOf(D.ENUM)!==-1;case s.ENUM_VALUE:return i.indexOf(D.ENUM_VALUE)!==-1;case s.INPUT_DEF:return i.indexOf(D.INPUT_OBJECT)!==-1;case s.INPUT_VALUE_DEF:switch(e.prevState&&e.prevState.kind){case s.ARGUMENTS_DEF:return i.indexOf(D.ARGUMENT_DEFINITION)!==-1;case s.INPUT_DEF:return i.indexOf(D.INPUT_FIELD_DEFINITION)!==-1}}return!1}function re(e,t){let n,i,r,a,l,c,u,o,d,f,v;return fe(t,p=>{switch(p.kind){case s.QUERY:case"ShortQuery":f=e.getQueryType();break;case s.MUTATION:f=e.getMutationType();break;case s.SUBSCRIPTION:f=e.getSubscriptionType();break;case s.INLINE_FRAGMENT:case s.FRAGMENT_DEFINITION:p.type&&(f=e.getType(p.type));break;case s.FIELD:case s.ALIASED_FIELD:{!f||!p.name?l=null:(l=d?W(e,d,p.name):null,f=l?l.type:null);break}case s.SELECTION_SET:d=M(f);break;case s.DIRECTIVE:r=p.name?e.getDirective(p.name):null;break;case s.INTERFACE_DEF:p.name&&(u=null,v=new U({name:p.name,interfaces:[],fields:{}}));break;case s.OBJECT_TYPE_DEF:p.name&&(v=null,u=new ce({name:p.name,interfaces:[],fields:{}}));break;case s.ARGUMENTS:{if(!p.prevState)i=null;else switch(p.prevState.kind){case s.FIELD:i=l&&l.args;break;case s.DIRECTIVE:i=r&&r.args;break;case s.ALIASED_FIELD:{const y=p.prevState&&p.prevState.name;if(!y){i=null;break}const _=d?W(e,d,y):null;if(!_){i=null;break}i=_.args;break}default:i=null;break}break}case s.ARGUMENT:if(i){for(let y=0;y<i.length;y++)if(i[y].name===p.name){n=i[y];break}}c=n&&n.type;break;case s.ENUM_VALUE:const T=M(c);a=T instanceof se?T.getValues().find(y=>y.value===p.name):null;break;case s.LIST_VALUE:const g=Ae(c);c=g instanceof oe?g.ofType:null;break;case s.OBJECT_VALUE:const k=M(c);o=k instanceof _e?k.getFields():null;break;case s.OBJECT_FIELD:const O=p.name&&o?o[p.name]:null;c=O&&O.type;break;case s.NAMED_TYPE:p.name&&(f=e.getType(p.name));break}}),{argDef:n,argDefs:i,directiveDef:r,enumValue:a,fieldDef:l,inputType:c,objectFieldDefs:o,parentType:d,type:f,interfaceDef:v,objectTypeDef:u}}function A(e,t){e.push(t)}function X(e,t){ee(t)?(X(e,t.ofType),A(e,"!")):w(t)?(A(e,"["),X(e,t.ofType),A(e,"]")):A(e,t.name)}function F(e,t){const n=[];return t&&A(n,"```graphql\n"),X(n,e),t&&A(n,"\n```"),n.join("")}const Sn={Int:"integer",String:"string",Float:"number",ID:"string",Boolean:"boolean",DateTime:"string"};function V(e,t){var n;let i=!1,r=Object.create(null);const a=Object.create(null);if("defaultValue"in e&&e.defaultValue!==void 0&&(r.default=e.defaultValue),Me(e)&&(r.type="string",r.enum=e.getValues().map(l=>l.name)),ae(e)&&(r.type=(n=Sn[e.name])!==null&&n!==void 0?n:"any"),w(e)){r.type="array";const{definition:l,definitions:c}=V(e.ofType,t);l.$ref?r.items={$ref:l.$ref}:r.items=l,c&&Object.keys(c).forEach(u=>{a[u]=c[u]})}if(ee(e)){i=!0;const{definition:l,definitions:c}=V(e.ofType,t);r=l,c&&Object.keys(c).forEach(u=>{a[u]=c[u]})}if(Le(e)){r.$ref=`#/definitions/${e.name}`;const l=e.getFields(),c={type:"object",properties:{},required:[]};e.description?(c.description=e.description+`
@@ -1 +1 @@
1
- import{o as c}from"./index.6c1b8bbf.js";import{a as h}from"./codemirror.11533b4b.js";function T(e,o){for(var r=0;r<o.length;r++){const t=o[r];if(typeof t!="string"&&!Array.isArray(t)){for(const n in t)if(n!=="default"&&!(n in e)){const i=Object.getOwnPropertyDescriptor(t,n);i&&Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:()=>t[n]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var m={},y=c&&c.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(m,"__esModule",{value:!0});var u=y(h.exports);u.default.defineOption("info",!1,function(e,o,r){if(r&&r!==u.default.Init){var t=e.state.info.onMouseOver;u.default.off(e.getWrapperElement(),"mouseover",t),clearTimeout(e.state.info.hoverTimeout),delete e.state.info}if(o){var n=e.state.info=M(o);n.onMouseOver=_.bind(null,e),u.default.on(e.getWrapperElement(),"mouseover",n.onMouseOver)}});function M(e){return{options:e instanceof Function?{render:e}:e===!0?{}:e}}function O(e){var o=e.state.info.options;return o&&o.hoverTime||500}function _(e,o){var r=e.state.info,t=o.target||o.srcElement;if(t instanceof HTMLElement&&!(t.nodeName!=="SPAN"||r.hoverTimeout!==void 0)){var n=t.getBoundingClientRect(),i=function(){clearTimeout(r.hoverTimeout),r.hoverTimeout=setTimeout(f,p)},a=function(){u.default.off(document,"mousemove",i),u.default.off(e.getWrapperElement(),"mouseout",a),clearTimeout(r.hoverTimeout),r.hoverTimeout=void 0},f=function(){u.default.off(document,"mousemove",i),u.default.off(e.getWrapperElement(),"mouseout",a),r.hoverTimeout=void 0,w(e,n)},p=O(e);r.hoverTimeout=setTimeout(f,p),u.default.on(document,"mousemove",i),u.default.on(e.getWrapperElement(),"mouseout",a)}}function w(e,o){var r=e.coordsChar({left:(o.left+o.right)/2,top:(o.top+o.bottom)/2}),t=e.state.info,n=t.options,i=n.render||e.getHelper(r,"info");if(i){var a=e.getTokenAt(r,!0);if(a){var f=i(a,n,e,r);f&&E(e,o,f)}}}function E(e,o,r){var t=document.createElement("div");t.className="CodeMirror-info",t.appendChild(r),document.body.appendChild(t);var n=t.getBoundingClientRect(),i=window.getComputedStyle(t),a=n.right-n.left+parseFloat(i.marginLeft)+parseFloat(i.marginRight),f=n.bottom-n.top+parseFloat(i.marginTop)+parseFloat(i.marginBottom),p=o.bottom;f>window.innerHeight-o.bottom-15&&o.top>window.innerHeight-o.bottom&&(p=o.top-f),p<0&&(p=o.bottom);var s=Math.max(0,window.innerWidth-a-15);s>o.left&&(s=o.left),t.style.opacity="1",t.style.top=p+"px",t.style.left=s+"px";var d,v=function(){clearTimeout(d)},l=function(){clearTimeout(d),d=setTimeout(g,200)},g=function(){u.default.off(t,"mouseover",v),u.default.off(t,"mouseout",l),u.default.off(e.getWrapperElement(),"mouseout",l),t.style.opacity?(t.style.opacity="0",setTimeout(function(){t.parentNode&&t.parentNode.removeChild(t)},600)):t.parentNode&&t.parentNode.removeChild(t)};u.default.on(t,"mouseover",v),u.default.on(t,"mouseout",l),u.default.on(e.getWrapperElement(),"mouseout",l)}const W=T({__proto__:null,default:m},[m]);export{W as i};
1
+ import{o as c}from"./index.acec7836.js";import{a as h}from"./codemirror.2a5f1abe.js";function T(e,o){for(var r=0;r<o.length;r++){const t=o[r];if(typeof t!="string"&&!Array.isArray(t)){for(const n in t)if(n!=="default"&&!(n in e)){const i=Object.getOwnPropertyDescriptor(t,n);i&&Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:()=>t[n]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var m={},y=c&&c.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(m,"__esModule",{value:!0});var u=y(h.exports);u.default.defineOption("info",!1,function(e,o,r){if(r&&r!==u.default.Init){var t=e.state.info.onMouseOver;u.default.off(e.getWrapperElement(),"mouseover",t),clearTimeout(e.state.info.hoverTimeout),delete e.state.info}if(o){var n=e.state.info=M(o);n.onMouseOver=_.bind(null,e),u.default.on(e.getWrapperElement(),"mouseover",n.onMouseOver)}});function M(e){return{options:e instanceof Function?{render:e}:e===!0?{}:e}}function O(e){var o=e.state.info.options;return o&&o.hoverTime||500}function _(e,o){var r=e.state.info,t=o.target||o.srcElement;if(t instanceof HTMLElement&&!(t.nodeName!=="SPAN"||r.hoverTimeout!==void 0)){var n=t.getBoundingClientRect(),i=function(){clearTimeout(r.hoverTimeout),r.hoverTimeout=setTimeout(f,p)},a=function(){u.default.off(document,"mousemove",i),u.default.off(e.getWrapperElement(),"mouseout",a),clearTimeout(r.hoverTimeout),r.hoverTimeout=void 0},f=function(){u.default.off(document,"mousemove",i),u.default.off(e.getWrapperElement(),"mouseout",a),r.hoverTimeout=void 0,w(e,n)},p=O(e);r.hoverTimeout=setTimeout(f,p),u.default.on(document,"mousemove",i),u.default.on(e.getWrapperElement(),"mouseout",a)}}function w(e,o){var r=e.coordsChar({left:(o.left+o.right)/2,top:(o.top+o.bottom)/2}),t=e.state.info,n=t.options,i=n.render||e.getHelper(r,"info");if(i){var a=e.getTokenAt(r,!0);if(a){var f=i(a,n,e,r);f&&E(e,o,f)}}}function E(e,o,r){var t=document.createElement("div");t.className="CodeMirror-info",t.appendChild(r),document.body.appendChild(t);var n=t.getBoundingClientRect(),i=window.getComputedStyle(t),a=n.right-n.left+parseFloat(i.marginLeft)+parseFloat(i.marginRight),f=n.bottom-n.top+parseFloat(i.marginTop)+parseFloat(i.marginBottom),p=o.bottom;f>window.innerHeight-o.bottom-15&&o.top>window.innerHeight-o.bottom&&(p=o.top-f),p<0&&(p=o.bottom);var s=Math.max(0,window.innerWidth-a-15);s>o.left&&(s=o.left),t.style.opacity="1",t.style.top=p+"px",t.style.left=s+"px";var d,v=function(){clearTimeout(d)},l=function(){clearTimeout(d),d=setTimeout(g,200)},g=function(){u.default.off(t,"mouseover",v),u.default.off(t,"mouseout",l),u.default.off(e.getWrapperElement(),"mouseout",l),t.style.opacity?(t.style.opacity="0",setTimeout(function(){t.parentNode&&t.parentNode.removeChild(t)},600)):t.parentNode&&t.parentNode.removeChild(t)};u.default.on(t,"mouseover",v),u.default.on(t,"mouseout",l),u.default.on(e.getWrapperElement(),"mouseout",l)}const W=T({__proto__:null,default:m},[m]);export{W as i};
@@ -1 +1 @@
1
- import{o as v}from"./index.6c1b8bbf.js";import{r as T}from"./index.dd7ba2ee.js";import{a as D}from"./codemirror.11533b4b.js";import{g as E,S as N}from"./SchemaReference.64c1dd5c.js";import"./info-addon.2de7b9e6.js";function C(a,e){for(var i=0;i<e.length;i++){const r=e[i];if(typeof r!="string"&&!Array.isArray(r)){for(const n in r)if(n!=="default"&&!(n in a)){const d=Object.getOwnPropertyDescriptor(r,n);d&&Object.defineProperty(a,n,d.get?d:{enumerable:!0,get:()=>r[n]})}}}return Object.freeze(Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}))}var m={},p=v&&v.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(m,"__esModule",{value:!0});var s=T,x=p(D.exports),y=p(E),f=N;x.default.registerHelper("info","graphql",function(a,e){if(!(!e.schema||!a.state)){var i=a.state,r=i.kind,n=i.step,d=y.default(e.schema,a.state);if(r==="Field"&&n===0&&d.fieldDef||r==="AliasedField"&&n===2&&d.fieldDef){var t=document.createElement("div");return R(t,d,e),u(t,e,d.fieldDef),t}else if(r==="Directive"&&n===1&&d.directiveDef){var t=document.createElement("div");return _(t,d,e),u(t,e,d.directiveDef),t}else if(r==="Argument"&&n===0&&d.argDef){var t=document.createElement("div");return b(t,d,e),u(t,e,d.argDef),t}else if(r==="EnumValue"&&d.enumValue&&d.enumValue.description){var t=document.createElement("div");return j(t,d,e),u(t,e,d.enumValue),t}else if(r==="NamedType"&&d.type&&d.type.description){var t=document.createElement("div");return c(t,d,e,d.type),u(t,e,d.type),t}}});function R(a,e,i){g(a,e,i),o(a,e,i,e.type)}function g(a,e,i){var r,n=((r=e.fieldDef)===null||r===void 0?void 0:r.name)||"";n.slice(0,2)!=="__"&&(c(a,e,i,e.parentType),l(a,".")),l(a,n,"field-name",i,f.getFieldReference(e))}function _(a,e,i){var r,n="@"+(((r=e.directiveDef)===null||r===void 0?void 0:r.name)||"");l(a,n,"directive-name",i,f.getDirectiveReference(e))}function b(a,e,i){var r;e.directiveDef?_(a,e,i):e.fieldDef&&g(a,e,i);var n=((r=e.argDef)===null||r===void 0?void 0:r.name)||"";l(a,"("),l(a,n,"arg-name",i,f.getArgumentReference(e)),o(a,e,i,e.inputType),l(a,")")}function o(a,e,i,r){l(a,": "),c(a,e,i,r)}function j(a,e,i){var r,n=((r=e.enumValue)===null||r===void 0?void 0:r.name)||"";c(a,e,i,e.inputType),l(a,"."),l(a,n,"enum-value",i,f.getEnumValueReference(e))}function c(a,e,i,r){r instanceof s.GraphQLNonNull?(c(a,e,i,r.ofType),l(a,"!")):r instanceof s.GraphQLList?(l(a,"["),c(a,e,i,r.ofType),l(a,"]")):l(a,(r==null?void 0:r.name)||"","type-name",i,f.getTypeReference(e,r))}function u(a,e,i){var r=i.description;if(r){var n=document.createElement("div");n.className="info-description",e.renderDescription?n.innerHTML=e.renderDescription(r):n.appendChild(document.createTextNode(r)),a.appendChild(n)}A(a,e,i)}function A(a,e,i){var r=i.deprecationReason;if(r){var n=document.createElement("div");n.className="info-deprecation",e.renderDescription?n.innerHTML=e.renderDescription(r):n.appendChild(document.createTextNode(r));var d=document.createElement("span");d.className="info-deprecation-label",d.appendChild(document.createTextNode("Deprecated: ")),n.insertBefore(d,n.firstChild),a.appendChild(n)}}function l(a,e,i,r,n){if(i===void 0&&(i=""),r===void 0&&(r={onClick:null}),n===void 0&&(n=null),i){var d=r.onClick,t=void 0;d?(t=document.createElement("a"),t.href="javascript:void 0",t.addEventListener("click",function(h){d(n,h)})):t=document.createElement("span"),t.className=i,t.appendChild(document.createTextNode(e)),a.appendChild(t)}else a.appendChild(document.createTextNode(e))}const S=C({__proto__:null,default:m},[m]);export{S as i};
1
+ import{o as v}from"./index.acec7836.js";import{r as T}from"./index.a5394c23.js";import{a as D}from"./codemirror.2a5f1abe.js";import{g as E,S as N}from"./SchemaReference.ffa27894.js";import"./info-addon.119b3948.js";function C(a,e){for(var i=0;i<e.length;i++){const r=e[i];if(typeof r!="string"&&!Array.isArray(r)){for(const n in r)if(n!=="default"&&!(n in a)){const d=Object.getOwnPropertyDescriptor(r,n);d&&Object.defineProperty(a,n,d.get?d:{enumerable:!0,get:()=>r[n]})}}}return Object.freeze(Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}))}var m={},p=v&&v.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(m,"__esModule",{value:!0});var s=T,x=p(D.exports),y=p(E),f=N;x.default.registerHelper("info","graphql",function(a,e){if(!(!e.schema||!a.state)){var i=a.state,r=i.kind,n=i.step,d=y.default(e.schema,a.state);if(r==="Field"&&n===0&&d.fieldDef||r==="AliasedField"&&n===2&&d.fieldDef){var t=document.createElement("div");return R(t,d,e),u(t,e,d.fieldDef),t}else if(r==="Directive"&&n===1&&d.directiveDef){var t=document.createElement("div");return _(t,d,e),u(t,e,d.directiveDef),t}else if(r==="Argument"&&n===0&&d.argDef){var t=document.createElement("div");return b(t,d,e),u(t,e,d.argDef),t}else if(r==="EnumValue"&&d.enumValue&&d.enumValue.description){var t=document.createElement("div");return j(t,d,e),u(t,e,d.enumValue),t}else if(r==="NamedType"&&d.type&&d.type.description){var t=document.createElement("div");return c(t,d,e,d.type),u(t,e,d.type),t}}});function R(a,e,i){g(a,e,i),o(a,e,i,e.type)}function g(a,e,i){var r,n=((r=e.fieldDef)===null||r===void 0?void 0:r.name)||"";n.slice(0,2)!=="__"&&(c(a,e,i,e.parentType),l(a,".")),l(a,n,"field-name",i,f.getFieldReference(e))}function _(a,e,i){var r,n="@"+(((r=e.directiveDef)===null||r===void 0?void 0:r.name)||"");l(a,n,"directive-name",i,f.getDirectiveReference(e))}function b(a,e,i){var r;e.directiveDef?_(a,e,i):e.fieldDef&&g(a,e,i);var n=((r=e.argDef)===null||r===void 0?void 0:r.name)||"";l(a,"("),l(a,n,"arg-name",i,f.getArgumentReference(e)),o(a,e,i,e.inputType),l(a,")")}function o(a,e,i,r){l(a,": "),c(a,e,i,r)}function j(a,e,i){var r,n=((r=e.enumValue)===null||r===void 0?void 0:r.name)||"";c(a,e,i,e.inputType),l(a,"."),l(a,n,"enum-value",i,f.getEnumValueReference(e))}function c(a,e,i,r){r instanceof s.GraphQLNonNull?(c(a,e,i,r.ofType),l(a,"!")):r instanceof s.GraphQLList?(l(a,"["),c(a,e,i,r.ofType),l(a,"]")):l(a,(r==null?void 0:r.name)||"","type-name",i,f.getTypeReference(e,r))}function u(a,e,i){var r=i.description;if(r){var n=document.createElement("div");n.className="info-description",e.renderDescription?n.innerHTML=e.renderDescription(r):n.appendChild(document.createTextNode(r)),a.appendChild(n)}A(a,e,i)}function A(a,e,i){var r=i.deprecationReason;if(r){var n=document.createElement("div");n.className="info-deprecation",e.renderDescription?n.innerHTML=e.renderDescription(r):n.appendChild(document.createTextNode(r));var d=document.createElement("span");d.className="info-deprecation-label",d.appendChild(document.createTextNode("Deprecated: ")),n.insertBefore(d,n.firstChild),a.appendChild(n)}}function l(a,e,i,r,n){if(i===void 0&&(i=""),r===void 0&&(r={onClick:null}),n===void 0&&(n=null),i){var d=r.onClick,t=void 0;d?(t=document.createElement("a"),t.href="javascript:void 0",t.addEventListener("click",function(h){d(n,h)})):t=document.createElement("span"),t.className=i,t.appendChild(document.createTextNode(e)),a.appendChild(t)}else a.appendChild(document.createTextNode(e))}const S=C({__proto__:null,default:m},[m]);export{S as i};