PluginProbe
Assistant – Every Day Productivity Apps / 1.5.5.1
Assistant – Every Day Productivity Apps v1.5.5.1
1.5.5.1 1.5.5 trunk 0.1.0 0.2.0 0.2.1 0.2.2 0.3.0 0.3.1 0.4 0.4.1 0.4.2 0.5.0 0.5.1 0.6.0 0.7.0 0.7.0.2 0.7.0.3 0.7.0.4 0.7.0.5 0.7.0.6 0.7.0.7 0.7.0.8 0.7.0.9 0.7.1 All 72 releases
← All changes | build/vendor-bb-cloud.js +1 -2 0.7.0 → 1.5.5.1 View file →
@@ -1,2 +1 @@
1 -/*! For license information please see vendor-bb-cloud.js.LICENSE.txt?var=0.7.0 */
2 -!function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=113)}([function(t,e){t.exports=React},,,,,,,,,,,,,function(t,e,n){"use strict";var r=n(37),o=Object.prototype.toString;function i(t){return"[object Array]"===o.call(t)}function s(t){return void 0===t}function c(t){return null!==t&&"object"==typeof t}function a(t){if("[object Object]"!==o.call(t))return!1;var e=Object.getPrototypeOf(t);return null===e||e===Object.prototype}function u(t){return"[object Function]"===o.call(t)}function l(t,e){if(null!=t)if("object"!=typeof t&&(t=[t]),i(t))for(var n=0,r=t.length;n<r;n++)e.call(null,t[n],n,t);else for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.call(null,t[o],o,t)}t.exports={isArray:i,isArrayBuffer:function(t){return"[object ArrayBuffer]"===o.call(t)},isBuffer:function(t){return null!==t&&!s(t)&&null!==t.constructor&&!s(t.constructor)&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)},isFormData:function(t){return"undefined"!=typeof FormData&&t instanceof FormData},isArrayBufferView:function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&t.buffer instanceof ArrayBuffer},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isObject:c,isPlainObject:a,isUndefined:s,isDate:function(t){return"[object Date]"===o.call(t)},isFile:function(t){return"[object File]"===o.call(t)},isBlob:function(t){return"[object Blob]"===o.call(t)},isFunction:u,isStream:function(t){return c(t)&&u(t.pipe)},isURLSearchParams:function(t){return"undefined"!=typeof URLSearchParams&&t instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:l,merge:function t(){var e={};function n(n,r){a(e[r])&&a(n)?e[r]=t(e[r],n):a(n)?e[r]=t({},n):i(n)?e[r]=n.slice():e[r]=n}for(var r=0,o=arguments.length;r<o;r++)l(arguments[r],n);return e},extend:function(t,e,n){return l(e,(function(e,o){t[o]=n&&"function"==typeof e?r(e,n):e})),t},trim:function(t){return t.replace(/^\s*/,"").replace(/\s*$/,"")},stripBOM:function(t){return 65279===t.charCodeAt(0)&&(t=t.slice(1)),t}}},function(t,e,n){t.exports=n(51)},,,,,,,,,,,,,function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},,,,,,,,,,function(t,e,n){"use strict";t.exports=function(t,e){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return t.apply(e,n)}}},function(t,e,n){"use strict";var r=n(13);function o(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}t.exports=function(t,e,n){if(!e)return t;var i;if(n)i=n(e);else if(r.isURLSearchParams(e))i=e.toString();else{var s=[];r.forEach(e,(function(t,e){null!=t&&(r.isArray(t)?e+="[]":t=[t],r.forEach(t,(function(t){r.isDate(t)?t=t.toISOString():r.isObject(t)&&(t=JSON.stringify(t)),s.push(o(e)+"="+o(t))})))})),i=s.join("&")}if(i){var c=t.indexOf("#");-1!==c&&(t=t.slice(0,c)),t+=(-1===t.indexOf("?")?"?":"&")+i}return t}},function(t,e,n){"use strict";t.exports=function(t){return!(!t||!t.__CANCEL__)}},function(t,e,n){"use strict";(function(e){var r=n(13),o=n(57),i={"Content-Type":"application/x-www-form-urlencoded"};function s(t,e){!r.isUndefined(t)&&r.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var c,a={adapter:(("undefined"!=typeof XMLHttpRequest||void 0!==e&&"[object process]"===Object.prototype.toString.call(e))&&(c=n(41)),c),transformRequest:[function(t,e){return o(e,"Accept"),o(e,"Content-Type"),r.isFormData(t)||r.isArrayBuffer(t)||r.isBuffer(t)||r.isStream(t)||r.isFile(t)||r.isBlob(t)?t:r.isArrayBufferView(t)?t.buffer:r.isURLSearchParams(t)?(s(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):r.isObject(t)?(s(e,"application/json;charset=utf-8"),JSON.stringify(t)):t}],transformResponse:[function(t){if("string"==typeof t)try{t=JSON.parse(t)}catch(t){}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(t){return t>=200&&t<300}};a.headers={common:{Accept:"application/json, text/plain, */*"}},r.forEach(["delete","get","head"],(function(t){a.headers[t]={}})),r.forEach(["post","put","patch"],(function(t){a.headers[t]=r.merge(i)})),t.exports=a}).call(this,n(56))},function(t,e,n){"use strict";var r=n(13),o=n(58),i=n(60),s=n(38),c=n(61),a=n(64),u=n(65),l=n(42);t.exports=function(t){return new Promise((function(e,n){var f=t.data,h=t.headers;r.isFormData(f)&&delete h["Content-Type"];var p=new XMLHttpRequest;if(t.auth){var d=t.auth.username||"",y=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";h.Authorization="Basic "+btoa(d+":"+y)}var v=c(t.baseURL,t.url);if(p.open(t.method.toUpperCase(),s(v,t.params,t.paramsSerializer),!0),p.timeout=t.timeout,p.onreadystatechange=function(){if(p&&4===p.readyState&&(0!==p.status||p.responseURL&&0===p.responseURL.indexOf("file:"))){var r="getAllResponseHeaders"in p?a(p.getAllResponseHeaders()):null,i={data:t.responseType&&"text"!==t.responseType?p.response:p.responseText,status:p.status,statusText:p.statusText,headers:r,config:t,request:p};o(e,n,i),p=null}},p.onabort=function(){p&&(n(l("Request aborted",t,"ECONNABORTED",p)),p=null)},p.onerror=function(){n(l("Network Error",t,null,p)),p=null},p.ontimeout=function(){var e="timeout of "+t.timeout+"ms exceeded";t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),n(l(e,t,"ECONNABORTED",p)),p=null},r.isStandardBrowserEnv()){var m=(t.withCredentials||u(v))&&t.xsrfCookieName?i.read(t.xsrfCookieName):void 0;m&&(h[t.xsrfHeaderName]=m)}if("setRequestHeader"in p&&r.forEach(h,(function(t,e){void 0===f&&"content-type"===e.toLowerCase()?delete h[e]:p.setRequestHeader(e,t)})),r.isUndefined(t.withCredentials)||(p.withCredentials=!!t.withCredentials),t.responseType)try{p.responseType=t.responseType}catch(e){if("json"!==t.responseType)throw e}"function"==typeof t.onDownloadProgress&&p.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&p.upload&&p.upload.addEventListener("progress",t.onUploadProgress),t.cancelToken&&t.cancelToken.promise.then((function(t){p&&(p.abort(),n(t),p=null)})),f||(f=null),p.send(f)}))}},function(t,e,n){"use strict";var r=n(59);t.exports=function(t,e,n,o,i){var s=new Error(t);return r(s,e,n,o,i)}},function(t,e,n){"use strict";var r=n(13);t.exports=function(t,e){e=e||{};var n={},o=["url","method","data"],i=["headers","auth","proxy","params"],s=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],c=["validateStatus"];function a(t,e){return r.isPlainObject(t)&&r.isPlainObject(e)?r.merge(t,e):r.isPlainObject(e)?r.merge({},e):r.isArray(e)?e.slice():e}function u(o){r.isUndefined(e[o])?r.isUndefined(t[o])||(n[o]=a(void 0,t[o])):n[o]=a(t[o],e[o])}r.forEach(o,(function(t){r.isUndefined(e[t])||(n[t]=a(void 0,e[t]))})),r.forEach(i,u),r.forEach(s,(function(o){r.isUndefined(e[o])?r.isUndefined(t[o])||(n[o]=a(void 0,t[o])):n[o]=a(void 0,e[o])})),r.forEach(c,(function(r){r in e?n[r]=a(t[r],e[r]):r in t&&(n[r]=a(void 0,t[r]))}));var l=o.concat(i).concat(s).concat(c),f=Object.keys(t).concat(Object.keys(e)).filter((function(t){return-1===l.indexOf(t)}));return r.forEach(f,u),n}},function(t,e,n){"use strict";function r(t){this.message=t}r.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},r.prototype.__CANCEL__=!0,t.exports=r},,,,,,,function(t,e,n){"use strict";var r=n(13),o=n(37),i=n(52),s=n(43);function c(t){var e=new i(t),n=o(i.prototype.request,e);return r.extend(n,i.prototype,e),r.extend(n,e),n}var a=c(n(40));a.Axios=i,a.create=function(t){return c(s(a.defaults,t))},a.Cancel=n(44),a.CancelToken=n(66),a.isCancel=n(39),a.all=function(t){return Promise.all(t)},a.spread=n(67),a.isAxiosError=n(68),t.exports=a,t.exports.default=a},function(t,e,n){"use strict";var r=n(13),o=n(38),i=n(53),s=n(54),c=n(43);function a(t){this.defaults=t,this.interceptors={request:new i,response:new i}}a.prototype.request=function(t){"string"==typeof t?(t=arguments[1]||{}).url=arguments[0]:t=t||{},(t=c(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var e=[s,void 0],n=Promise.resolve(t);for(this.interceptors.request.forEach((function(t){e.unshift(t.fulfilled,t.rejected)})),this.interceptors.response.forEach((function(t){e.push(t.fulfilled,t.rejected)}));e.length;)n=n.then(e.shift(),e.shift());return n},a.prototype.getUri=function(t){return t=c(this.defaults,t),o(t.url,t.params,t.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(t){a.prototype[t]=function(e,n){return this.request(c(n||{},{method:t,url:e,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(t){a.prototype[t]=function(e,n,r){return this.request(c(r||{},{method:t,url:e,data:n}))}})),t.exports=a},function(t,e,n){"use strict";var r=n(13);function o(){this.handlers=[]}o.prototype.use=function(t,e){return this.handlers.push({fulfilled:t,rejected:e}),this.handlers.length-1},o.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},o.prototype.forEach=function(t){r.forEach(this.handlers,(function(e){null!==e&&t(e)}))},t.exports=o},function(t,e,n){"use strict";var r=n(13),o=n(55),i=n(39),s=n(40);function c(t){t.cancelToken&&t.cancelToken.throwIfRequested()}t.exports=function(t){return c(t),t.headers=t.headers||{},t.data=o(t.data,t.headers,t.transformRequest),t.headers=r.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete t.headers[e]})),(t.adapter||s.adapter)(t).then((function(e){return c(t),e.data=o(e.data,e.headers,t.transformResponse),e}),(function(e){return i(e)||(c(t),e&&e.response&&(e.response.data=o(e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)}))}},function(t,e,n){"use strict";var r=n(13);t.exports=function(t,e,n){return r.forEach(n,(function(n){t=n(t,e)})),t}},function(t,e){var n,r,o=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function c(t){if(n===setTimeout)return setTimeout(t,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(t){n=i}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(t){r=s}}();var a,u=[],l=!1,f=-1;function h(){l&&a&&(l=!1,a.length?u=a.concat(u):f=-1,u.length&&p())}function p(){if(!l){var t=c(h);l=!0;for(var e=u.length;e;){for(a=u,u=[];++f<e;)a&&a[f].run();f=-1,e=u.length}a=null,l=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function d(t,e){this.fun=t,this.array=e}function y(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];u.push(new d(t,e)),1!==u.length||l||c(p)},d.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=y,o.addListener=y,o.once=y,o.off=y,o.removeListener=y,o.removeAllListeners=y,o.emit=y,o.prependListener=y,o.prependOnceListener=y,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(t,e,n){"use strict";var r=n(13);t.exports=function(t,e){r.forEach(t,(function(n,r){r!==e&&r.toUpperCase()===e.toUpperCase()&&(t[e]=n,delete t[r])}))}},function(t,e,n){"use strict";var r=n(42);t.exports=function(t,e,n){var o=n.config.validateStatus;n.status&&o&&!o(n.status)?e(r("Request failed with status code "+n.status,n.config,null,n.request,n)):t(n)}},function(t,e,n){"use strict";t.exports=function(t,e,n,r,o){return t.config=e,n&&(t.code=n),t.request=r,t.response=o,t.isAxiosError=!0,t.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},t}},function(t,e,n){"use strict";var r=n(13);t.exports=r.isStandardBrowserEnv()?{write:function(t,e,n,o,i,s){var c=[];c.push(t+"="+encodeURIComponent(e)),r.isNumber(n)&&c.push("expires="+new Date(n).toGMTString()),r.isString(o)&&c.push("path="+o),r.isString(i)&&c.push("domain="+i),!0===s&&c.push("secure"),document.cookie=c.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(t,e,n){"use strict";var r=n(62),o=n(63);t.exports=function(t,e){return t&&!r(e)?o(t,e):e}},function(t,e,n){"use strict";t.exports=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}},function(t,e,n){"use strict";t.exports=function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}},function(t,e,n){"use strict";var r=n(13),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];t.exports=function(t){var e,n,i,s={};return t?(r.forEach(t.split("\n"),(function(t){if(i=t.indexOf(":"),e=r.trim(t.substr(0,i)).toLowerCase(),n=r.trim(t.substr(i+1)),e){if(s[e]&&o.indexOf(e)>=0)return;s[e]="set-cookie"===e?(s[e]?s[e]:[]).concat([n]):s[e]?s[e]+", "+n:n}})),s):s}},function(t,e,n){"use strict";var r=n(13);t.exports=r.isStandardBrowserEnv()?function(){var t,e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function o(t){var r=t;return e&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return t=o(window.location.href),function(e){var n=r.isString(e)?o(e):e;return n.protocol===t.protocol&&n.host===t.host}}():function(){return!0}},function(t,e,n){"use strict";var r=n(44);function o(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise((function(t){e=t}));var n=this;t((function(t){n.reason||(n.reason=new r(t),e(n.reason))}))}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.source=function(){var t;return{token:new o((function(e){t=e})),cancel:t}},t.exports=o},function(t,e,n){"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}},function(t,e,n){"use strict";t.exports=function(t){return"object"==typeof t&&!0===t.isAxiosError}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,n){"use strict";n.r(e),function(t){n.d(e,"appendFormDataObject",(function(){return te})),n.d(e,"createCloudClient",(function(){return Me})),n.d(e,"useApiRequest",(function(){return $t}));var r=n(14),o=n.n(r),i=n(0),s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{},c=a;function a(t){l.length||u(),l[l.length]=t}var u,l=[],f=0;function h(){for(;f<l.length;){var t=f;if(f+=1,l[t].call(),f>1024){for(var e=0,n=l.length-f;e<n;e++)l[e]=l[e+f];l.length-=f,f=0}}l.length=0,f=0}var p,d,y,v=void 0!==s?s:self,m=v.MutationObserver||v.WebKitMutationObserver;function g(t){return function(){var e=setTimeout(r,0),n=setInterval(r,50);function r(){clearTimeout(e),clearInterval(n),t()}}}function b(){}"function"==typeof m?(p=1,d=new m(h),y=document.createTextNode(""),d.observe(y,{characterData:!0}),u=function(){p=-p,y.data=p}):u=g(h),a.requestFlush=u,a.makeRequestCallFromTimer=g;var w=null,k={},_=S;function S(t){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("Promise constructor's argument is not a function");this._U=0,this._V=0,this._W=null,this._X=null,t!==b&&E(t,this)}function O(t,e){for(;3===t._V;)t=t._W;if(S._Y&&S._Y(t),0===t._V)return 0===t._U?(t._U=1,void(t._X=e)):1===t._U?(t._U=2,void(t._X=[t._X,e])):void t._X.push(e);!function(t,e){c((function(){var n=1===t._V?e.onFulfilled:e.onRejected;if(null!==n){var r=function(t,e){try{return t(e)}catch(t){return w=t,k}}(n,t._W);r===k?C(e.promise,w):T(e.promise,r)}else 1===t._V?T(e.promise,t._W):C(e.promise,t._W)}))}(t,e)}function T(t,e){if(e===t)return C(t,new TypeError("A promise cannot be resolved with itself."));if(e&&("object"==typeof e||"function"==typeof e)){var n=function(t){try{return t.then}catch(t){return w=t,k}}(e);if(n===k)return C(t,w);if(n===t.then&&e instanceof S)return t._V=3,t._W=e,void j(t);if("function"==typeof n)return void E(n.bind(e),t)}t._V=1,t._W=e,j(t)}function C(t,e){t._V=2,t._W=e,S._Z&&S._Z(t,e),j(t)}function j(t){if(1===t._U&&(O(t,t._X),t._X=null),2===t._U){for(var e=0;e<t._X.length;e++)O(t,t._X[e]);t._X=null}}function P(t,e,n){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.promise=n}function E(t,e){var n=!1,r=function(t,e,n){try{t(e,n)}catch(t){return w=t,k}}(t,(function(t){n||(n=!0,T(e,t))}),(function(t){n||(n=!0,C(e,t))}));n||r!==k||(n=!0,C(e,w))}S._Y=null,S._Z=null,S._0=b,S.prototype.then=function(t,e){if(this.constructor!==S)return function(t,e,n){return new t.constructor((function(r,o){var i=new S(b);i.then(r,o),O(t,new P(e,n,i))}))}(this,t,e);var n=new S(b);return O(this,new P(t,e,n)),n},_.prototype.done=function(t,e){var n=arguments.length?this.then.apply(this,arguments):this;n.then(null,(function(t){setTimeout((function(){throw t}),0)}))},_.prototype.finally=function(t){return this.then((function(e){return _.resolve(t()).then((function(){return e}))}),(function(e){return _.resolve(t()).then((function(){throw e}))}))};var x=D(!0),A=D(!1),R=D(null),L=D(void 0),I=D(0),N=D("");function D(t){var e=new _(_._0);return e._V=1,e._W=t,e}_.resolve=function(t){if(t instanceof _)return t;if(null===t)return R;if(void 0===t)return L;if(!0===t)return x;if(!1===t)return A;if(0===t)return I;if(""===t)return N;if("object"==typeof t||"function"==typeof t)try{var e=t.then;if("function"==typeof e)return new _(e.bind(t))}catch(t){return new _((function(e,n){n(t)}))}return D(t)};var q=function(t){return"function"==typeof Array.from?(q=Array.from,Array.from(t)):(q=function(t){return Array.prototype.slice.call(t)},Array.prototype.slice.call(t))};_.all=function(t){var e=q(t);return new _((function(t,n){if(0===e.length)return t([]);var r=e.length;function o(i,s){if(s&&("object"==typeof s||"function"==typeof s)){if(s instanceof _&&s.then===_.prototype.then){for(;3===s._V;)s=s._W;return 1===s._V?o(i,s._W):(2===s._V&&n(s._W),void s.then((function(t){o(i,t)}),n))}var c=s.then;if("function"==typeof c)return void new _(c.bind(s)).then((function(t){o(i,t)}),n)}e[i]=s,0==--r&&t(e)}for(var i=0;i<e.length;i++)o(i,e[i])}))},_.reject=function(t){return new _((function(e,n){n(t)}))},_.race=function(t){return new _((function(e,n){q(t).forEach((function(t){_.resolve(t).then(e,n)}))}))},_.prototype.catch=function(t){return this.then(null,t)};var U=[],M=[],B=c.makeRequestCallFromTimer((function(){if(M.length)throw M.shift()})),F=H;function H(t){var e;(e=U.length?U.pop():new z).task=t,c(e)}function z(){this.task=null}z.prototype.call=function(){try{this.task.call()}catch(t){H.onerror?H.onerror(t):(M.push(t),B())}finally{this.task=null,U[U.length]=this}},_.denodeify=function(t,e){return"number"==typeof e&&e!==1/0?function(t,e){for(var n=[],r=0;r<e;r++)n.push("a"+r);var o=["return function ("+n.join(",")+") {","var self = this;","return new Promise(function (rs, rj) {","var res = fn.call(",["self"].concat(n).concat([X]).join(","),");","if (res &&",'(typeof res === "object" || typeof res === "function") &&','typeof res.then === "function"',") {rs(res);}","});","};"].join("");return Function(["Promise","fn"],o)(_,t)}(t,e):function(t){for(var e=Math.max(t.length-1,3),n=[],r=0;r<e;r++)n.push("a"+r);var o=["return function ("+n.join(",")+") {","var self = this;","var args;","var argLength = arguments.length;","if (arguments.length > "+e+") {","args = new Array(arguments.length + 1);","for (var i = 0; i < arguments.length; i++) {","args[i] = arguments[i];","}","}","return new Promise(function (rs, rj) {","var cb = "+X+";","var res;","switch (argLength) {",n.concat(["extra"]).map((function(t,e){return"case "+e+":res = fn.call("+["self"].concat(n.slice(0,e)).concat("cb").join(",")+");break;"})).join(""),"default:","args[argLength] = cb;","res = fn.apply(self, args);","}","if (res &&",'(typeof res === "object" || typeof res === "function") &&','typeof res.then === "function"',") {rs(res);}","});","};"].join("");return Function(["Promise","fn"],o)(_,t)}(t)};var X="function (err, res) {if (err) { rj(err); } else { rs(res); }}";_.nodeify=function(t){return function(){var e=Array.prototype.slice.call(arguments),n="function"==typeof e[e.length-1]?e.pop():null,r=this;try{return t.apply(this,arguments).nodeify(n,r)}catch(t){if(null==n)return new _((function(e,n){n(t)}));F((function(){n.call(r,t)}))}}},_.prototype.nodeify=function(t,e){if("function"!=typeof t)return this;this.then((function(n){F((function(){t.call(e,null,n)}))}),(function(n){F((function(){t.call(e,n)}))}))},_.enableSynchronous=function(){_.prototype.isPending=function(){return 0==this.getState()},_.prototype.isFulfilled=function(){return 1==this.getState()},_.prototype.isRejected=function(){return 2==this.getState()},_.prototype.getValue=function(){if(3===this._V)return this._W.getValue();if(!this.isFulfilled())throw new Error("Cannot get a value of an unfulfilled promise.");return this._W},_.prototype.getReason=function(){if(3===this._V)return this._W.getReason();if(!this.isRejected())throw new Error("Cannot get a rejection reason of a non-rejected promise.");return this._W},_.prototype.getState=function(){return 3===this._V?this._W.getState():-1===this._V||-2===this._V?0:this._V}},_.disableSynchronous=function(){_.prototype.isPending=void 0,_.prototype.isFulfilled=void 0,_.prototype.isRejected=void 0,_.prototype.getValue=void 0,_.prototype.getReason=void 0,_.prototype.getState=void 0};var V=_;function W(t){return(W="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function J(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Q(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function K(t,e,n){return e&&Q(t.prototype,e),n&&Q(t,n),t}function G(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function $(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Z(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?$(Object(n),!0).forEach((function(e){G(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):$(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Y(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var n=[],r=!0,o=!1,i=void 0;try{for(var s,c=t[Symbol.iterator]();!(r=(s=c.next()).done)&&(n.push(s.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}return n}}(t,e)||function(t,e){if(t){if("string"==typeof t)return tt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?tt(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function tt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var et=function(t,e){if("string"!=typeof t)throw new TypeError("argument str must be a string");for(var n={},r=e||{},o=t.split(it),i=r.decode||rt,s=0;s<o.length;s++){var c=o[s],a=c.indexOf("=");if(!(a<0)){var u=c.substr(0,a).trim(),l=c.substr(++a,c.length).trim();'"'==l[0]&&(l=l.slice(1,-1)),null==n[u]&&(n[u]=ct(l,i))}}return n},nt=function(t,e,n){var r=n||{},o=r.encode||ot;if("function"!=typeof o)throw new TypeError("option encode is invalid");if(!st.test(t))throw new TypeError("argument name is invalid");var i=o(e);if(i&&!st.test(i))throw new TypeError("argument val is invalid");var s=t+"="+i;if(null!=r.maxAge){var c=r.maxAge-0;if(isNaN(c)||!isFinite(c))throw new TypeError("option maxAge is invalid");s+="; Max-Age="+Math.floor(c)}if(r.domain){if(!st.test(r.domain))throw new TypeError("option domain is invalid");s+="; Domain="+r.domain}if(r.path){if(!st.test(r.path))throw new TypeError("option path is invalid");s+="; Path="+r.path}if(r.expires){if("function"!=typeof r.expires.toUTCString)throw new TypeError("option expires is invalid");s+="; Expires="+r.expires.toUTCString()}if(r.httpOnly&&(s+="; HttpOnly"),r.secure&&(s+="; Secure"),r.sameSite)switch("string"==typeof r.sameSite?r.sameSite.toLowerCase():r.sameSite){case!0:s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"strict":s+="; SameSite=Strict";break;case"none":s+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return s},rt=decodeURIComponent,ot=encodeURIComponent,it=/; */,st=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function ct(t,e){try{return e(t)}catch(e){return t}}var at={parse:et,serialize:nt},ut=[],lt=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;ut.map((function(n){return n({token:t,user:e})}))},ft=function(t,e,n){vt(t,n),kt(e,n),lt(t,e)},ht=function(){mt(),_t(),lt()},pt=function(t){return!(!t||"string"!=typeof t)},dt=function(){return pt(yt())},yt=function(){return Ot("fl-cloud-token")},vt=function(t,e){St("fl-cloud-token",t,e)},mt=function(){Tt("fl-cloud-token")},gt=function(t){return!(!t||"object"!==W(t)||!t.email)},bt=function(){return gt(wt())},wt=function(){var t=Ot("fl-cloud-user");return t?JSON.parse(t):null},kt=function(t,e){var n={id:t.id,name:t.name,email:t.email,is_admin:t.is_admin};St("fl-cloud-user",JSON.stringify(n),e)},_t=function(){Tt("fl-cloud-user")},St=function(t,e,n){var r={path:"/"};n&&(r.expires=new Date(Date.now()+12096e5)),document.cookie=at.serialize(t,e,r)},Ot=function(t){var e=at.parse(document.cookie);return e[t]?e[t]:null},Tt=function(t){var e={path:"/",expires:new Date(Date.now()-12096e5)};document.cookie=at.serialize(t,"",e)},Ct=Object.freeze({__proto__:null,subscribe:function(t){ut.push(t)},create:ft,destroy:ht,isValidToken:pt,hasToken:dt,getToken:yt,setToken:vt,removeToken:mt,isValidUser:gt,hasUser:bt,getUser:wt,setUser:kt,removeUser:_t}),jt=function(t){var e={register:function(e,n,r,o,i){var s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},c={first_name:e,last_name:n,username:r,email:o,password:i,password_confirmation:i};return new V((function(e,n){t.post("/account/user/register",c,s).then((function(t){if(t.response)n(t.response.data);else{var r=t.data,o=r.token,i=r.user;e({token:o,user:i})}})).catch(n)}))},authenticate:function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return new V((function(o,i){t.post("/iam/authenticate",{email:e,password:n},r).then((function(t){if(t.response)i(t.response.data);else{var e=t.data,n=e.token,r=e.user;o({token:n,user:r})}})).catch(i)}))},login:function(t,n,r){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return new V((function(i,s){e.authenticate(t,n,o).then((function(t){var e=t.token,n=t.user;ft(e,n,r),i({token:e,user:n})})).catch(s)}))},logout:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new V((function(n,r){t.post("/iam/token/destroy",{},e).then((function(){ht(),n()})).catch(r)}))},refresh:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new V((function(n,r){t.post("/iam/token/refresh",{},e).then((function(t){if(!t.data||!t.data.token)return ht(),void r(t);var e=t.data.token;vt(e),n(t.data)})).catch((function(t){ht(),r(t)}))}))},forgotPassword:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new V((function(r,o){t.post("/iam/password/forgot",{email:e},n).then((function(t){t.response?o(t.response.data):r()})).catch(o)}))},resetPassword:function(e,n,r,o){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},s={email:e,password:n,password_confirmation:r,token:o};return new V((function(e,n){t.post("/iam/password/reset",s,i).then((function(t){t.response?n(t.response.data):e()})).catch(n)}))},changePassword:function(e,n,r){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i={current_password:e,new_password:n,new_password_confirmation:r};return new V((function(e,n){t.post("/iam/password/change",i,o).then((function(t){t.response?n(t.response.data):e()})).catch(n)}))},verifyEmail:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new V((function(r,o){t.get(e,n).then((function(t){t.response?o(t.response.data):(kt(t.data.user),r(t))})).catch(o)}))},resendVerificationEmail:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new V((function(n,r){t.get("/iam/verification/resend",e).then((function(t){t.response?r(t.response.data):n(t)})).catch(r)}))},isConnected:function(){return dt()&&bt()}};return e},Pt=String.prototype.replace,Et=/%20/g,xt="RFC3986",At={default:xt,formatters:{RFC1738:function(t){return Pt.call(t,Et,"+")},RFC3986:function(t){return String(t)}},RFC1738:"RFC1738",RFC3986:xt},Rt=Object.prototype.hasOwnProperty,Lt=Array.isArray,It=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),Nt=function(t,e){for(var n=e&&e.plainObjects?Object.create(null):{},r=0;r<t.length;++r)void 0!==t[r]&&(n[r]=t[r]);return n},Dt={arrayToObject:Nt,assign:function(t,e){return Object.keys(e).reduce((function(t,n){return t[n]=e[n],t}),t)},combine:function(t,e){return[].concat(t,e)},compact:function(t){for(var e=[{obj:{o:t},prop:"o"}],n=[],r=0;r<e.length;++r)for(var o=e[r],i=o.obj[o.prop],s=Object.keys(i),c=0;c<s.length;++c){var a=s[c],u=i[a];"object"==typeof u&&null!==u&&-1===n.indexOf(u)&&(e.push({obj:i,prop:a}),n.push(u))}return function(t){for(;t.length>1;){var e=t.pop(),n=e.obj[e.prop];if(Lt(n)){for(var r=[],o=0;o<n.length;++o)void 0!==n[o]&&r.push(n[o]);e.obj[e.prop]=r}}}(e),t},decode:function(t,e,n){var r=t.replace(/\+/g," ");if("iso-8859-1"===n)return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch(t){return r}},encode:function(t,e,n,r,o){if(0===t.length)return t;var i=t;if("symbol"==typeof t?i=Symbol.prototype.toString.call(t):"string"!=typeof t&&(i=String(t)),"iso-8859-1"===n)return escape(i).replace(/%u[0-9a-f]{4}/gi,(function(t){return"%26%23"+parseInt(t.slice(2),16)+"%3B"}));for(var s="",c=0;c<i.length;++c){var a=i.charCodeAt(c);45===a||46===a||95===a||126===a||a>=48&&a<=57||a>=65&&a<=90||a>=97&&a<=122||o===At.RFC1738&&(40===a||41===a)?s+=i.charAt(c):a<128?s+=It[a]:a<2048?s+=It[192|a>>6]+It[128|63&a]:a<55296||a>=57344?s+=It[224|a>>12]+It[128|a>>6&63]+It[128|63&a]:(c+=1,a=65536+((1023&a)<<10|1023&i.charCodeAt(c)),s+=It[240|a>>18]+It[128|a>>12&63]+It[128|a>>6&63]+It[128|63&a])}return s},isBuffer:function(t){return!(!t||"object"!=typeof t||!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t)))},isRegExp:function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},maybeMap:function(t,e){if(Lt(t)){for(var n=[],r=0;r<t.length;r+=1)n.push(e(t[r]));return n}return e(t)},merge:function t(e,n,r){if(!n)return e;if("object"!=typeof n){if(Lt(e))e.push(n);else{if(!e||"object"!=typeof e)return[e,n];(r&&(r.plainObjects||r.allowPrototypes)||!Rt.call(Object.prototype,n))&&(e[n]=!0)}return e}if(!e||"object"!=typeof e)return[e].concat(n);var o=e;return Lt(e)&&!Lt(n)&&(o=Nt(e,r)),Lt(e)&&Lt(n)?(n.forEach((function(n,o){if(Rt.call(e,o)){var i=e[o];i&&"object"==typeof i&&n&&"object"==typeof n?e[o]=t(i,n,r):e.push(n)}else e[o]=n})),e):Object.keys(n).reduce((function(e,o){var i=n[o];return Rt.call(e,o)?e[o]=t(e[o],i,r):e[o]=i,e}),o)}},qt=Object.prototype.hasOwnProperty,Ut={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,e){return t+"["+e+"]"},repeat:function(t){return t}},Mt=Array.isArray,Bt=Array.prototype.push,Ft=function(t,e){Bt.apply(t,Mt(e)?e:[e])},Ht=Date.prototype.toISOString,zt=At.default,Xt={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:Dt.encode,encodeValuesOnly:!1,format:zt,formatter:At.formatters[zt],indices:!1,serializeDate:function(t){return Ht.call(t)},skipNulls:!1,strictNullHandling:!1},Vt=function t(e,n,r,o,i,s,c,a,u,l,f,h,p,d){var y,v=e;if("function"==typeof c?v=c(n,v):v instanceof Date?v=l(v):"comma"===r&&Mt(v)&&(v=Dt.maybeMap(v,(function(t){return t instanceof Date?l(t):t}))),null===v){if(o)return s&&!p?s(n,Xt.encoder,d,"key",f):n;v=""}if("string"==typeof(y=v)||"number"==typeof y||"boolean"==typeof y||"symbol"==typeof y||"bigint"==typeof y||Dt.isBuffer(v))return s?[h(p?n:s(n,Xt.encoder,d,"key",f))+"="+h(s(v,Xt.encoder,d,"value",f))]:[h(n)+"="+h(String(v))];var m,g=[];if(void 0===v)return g;if("comma"===r&&Mt(v))m=[{value:v.length>0?v.join(",")||null:void 0}];else if(Mt(c))m=c;else{var b=Object.keys(v);m=a?b.sort(a):b}for(var w=0;w<m.length;++w){var k=m[w],_="object"==typeof k&&void 0!==k.value?k.value:v[k];if(!i||null!==_){var S=Mt(v)?"function"==typeof r?r(n,k):n:n+(u?"."+k:"["+k+"]");Ft(g,t(_,S,r,o,i,s,c,a,u,l,f,h,p,d))}}return g},Wt=(Object.prototype.hasOwnProperty,Array.isArray,function(t,e){var n,r=t,o=function(t){if(!t)return Xt;if(null!==t.encoder&&void 0!==t.encoder&&"function"!=typeof t.encoder)throw new TypeError("Encoder has to be a function.");var e=t.charset||Xt.charset;if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=At.default;if(void 0!==t.format){if(!qt.call(At.formatters,t.format))throw new TypeError("Unknown format option provided.");n=t.format}var r=At.formatters[n],o=Xt.filter;return("function"==typeof t.filter||Mt(t.filter))&&(o=t.filter),{addQueryPrefix:"boolean"==typeof t.addQueryPrefix?t.addQueryPrefix:Xt.addQueryPrefix,allowDots:void 0===t.allowDots?Xt.allowDots:!!t.allowDots,charset:e,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:Xt.charsetSentinel,delimiter:void 0===t.delimiter?Xt.delimiter:t.delimiter,encode:"boolean"==typeof t.encode?t.encode:Xt.encode,encoder:"function"==typeof t.encoder?t.encoder:Xt.encoder,encodeValuesOnly:"boolean"==typeof t.encodeValuesOnly?t.encodeValuesOnly:Xt.encodeValuesOnly,filter:o,format:n,formatter:r,serializeDate:"function"==typeof t.serializeDate?t.serializeDate:Xt.serializeDate,skipNulls:"boolean"==typeof t.skipNulls?t.skipNulls:Xt.skipNulls,sort:"function"==typeof t.sort?t.sort:null,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:Xt.strictNullHandling}}(e);"function"==typeof o.filter?r=(0,o.filter)("",r):Mt(o.filter)&&(n=o.filter);var i,s=[];if("object"!=typeof r||null===r)return"";i=e&&e.arrayFormat in Ut?e.arrayFormat:e&&"indices"in e?e.indices?"indices":"repeat":"indices";var c=Ut[i];n||(n=Object.keys(r)),o.sort&&n.sort(o.sort);for(var a=0;a<n.length;++a){var u=n[a];o.skipNulls&&null===r[u]||Ft(s,Vt(r[u],u,c,o.strictNullHandling,o.skipNulls,o.encode?o.encoder:null,o.filter,o.sort,o.allowDots,o.serializeDate,o.format,o.formatter,o.encodeValuesOnly,o.charset))}var l=s.join(o.delimiter),f=!0===o.addQueryPrefix?"?":"";return o.charsetSentinel&&("iso-8859-1"===o.charset?f+="utf8=%26%2310003%3B&":f+="utf8=%E2%9C%93&"),l.length>0?f+l:""}),Jt=function(){function t(e){J(this,t),this.query=e,this.uri=""}return K(t,[{key:"parse",value:function(){return this.includes(),this.appends(),this.fields(),this.filters(),this.sorts(),this.page(),this.limit(),this.params(),this.uri}},{key:"prepend",value:function(){return""===this.uri?"?":"&"}},{key:"includes",value:function(){!this.query.include.length>0||(this.uri+="".concat(this.prepend()+this.query.queryParameters.includes,"=").concat(this.query.include))}},{key:"appends",value:function(){!this.query.append.length>0||(this.uri+="".concat(this.prepend()+this.query.queryParameters.appends,"=").concat(this.query.append))}},{key:"fields",value:function(){if(!(!Object.keys(this.query.fields).length>0)){var t=G({},"".concat(this.query.queryParameters.fields,"[").concat(this.query.model,"]"),this.query.fields);this.uri+=this.prepend()+Wt(t,{encode:!1})}}},{key:"filters",value:function(){if(!(!Object.keys(this.query.filters).length>0)){var t=G({},this.query.queryParameters.filters,this.query.filters);this.uri+=this.prepend()+Wt(t,{encode:!1})}}},{key:"sorts",value:function(){!this.query.sorts.length>0||(this.uri+="".concat(this.prepend()+this.query.queryParameters.sort,"=").concat(this.query.sorts))}},{key:"page",value:function(){null!==this.query.pageValue&&(this.uri+="".concat(this.prepend()+this.query.queryParameters.page,"=").concat(this.query.pageValue))}},{key:"limit",value:function(){null!==this.query.limitValue&&(this.uri+="".concat(this.prepend()+this.query.queryParameters.limit,"=").concat(this.query.limitValue))}},{key:"params",value:function(){null!==this.query.paramsObj&&(this.uri+=this.prepend()+Wt(this.query.paramsObj,{encode:!1}))}}]),t}(),Qt=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};J(this,t),this.model=null,this.base_url=e.base_url||null,this.queryParameters=e.queryParameters||{filters:"filter",fields:"fields",includes:"include",appends:"append",page:"page",limit:"limit",sort:"sort"},this.include=[],this.append=[],this.sorts=[],this.fields={},this.filters={},this.pageValue=null,this.limitValue=null,this.paramsObj=null,this.parser=new Jt(this)}return K(t,[{key:"for",value:function(t){return this.model=t,this}},{key:"get",value:function(){var t=this.base_url?this.base_url+this.parseQuery():this.parseQuery();return this.reset(),t}},{key:"url",value:function(){return this.get()}},{key:"reset",value:function(){this.parser.uri=""}},{key:"parseQuery",value:function(){if(!this.model)throw new Error("Please call the for() method before adding filters or calling url() / get().");return"/".concat(this.model).concat(this.parser.parse())}},{key:"includes",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];if(!e.length)throw new Error("The ".concat(this.queryParameters.includes,"s() function takes at least one argument."));return this.include=e,this}},{key:"appends",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];if(!e.length)throw new Error("The ".concat(this.queryParameters.appends,"s() function takes at least one argument."));return this.append=e,this}},{key:"select",value:function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];if(!n.length)throw new Error("The ".concat(this.queryParameters.fields,"() function takes a single argument of an array."));return(n[0].constructor===String||Array.isArray(n[0]))&&(this.fields=n.join(",")),n[0].constructor===Object&&Object.entries(n[0]).forEach((function(e){var n=Y(e,2),r=n[0],o=n[1];t.fields[r]=o.join(",")})),this}},{key:"where",value:function(t,e){if(void 0===t||void 0===e)throw new Error("The where() function takes 2 arguments both of string values.");if(Array.isArray(e)||e instanceof Object)throw new Error("The second argument to the where() function must be a string. Use whereIn() if you need to pass in an array.");return this.filters[t]=e,this}},{key:"whereIn",value:function(t,e){if(!t||!e)throw new Error("The whereIn() function takes 2 arguments of (string, array).");if(!t&&Array.isArray(t)||"object"===W(t))throw new Error("The first argument for the whereIn() function must be a string or integer.");if(!Array.isArray(e))throw new Error("The second argument for the whereIn() function must be an array.");return this.filters[t]=e.join(","),this}},{key:"sort",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return this.sorts=e,this}},{key:"page",value:function(t){if(!Number.isInteger(t))throw new Error("The page() function takes a single argument of a number");return this.pageValue=t,this}},{key:"limit",value:function(t){if(!Number.isInteger(t))throw new Error("The limit() function takes a single argument of a number.");return this.limitValue=t,this}},{key:"params",value:function(t){if(void 0===t||t.constructor!==Object)throw new Error("The params() function takes a single argument of an object.");return this.paramsObj=t,this}}]),t}(),Kt=function(t,e){return{create:function(n){return e.post(t,n)},update:function(n,r){return e.put("".concat(t,"/").concat(n),r)},delete:function(n){return e.delete("".concat(t,"/").concat(n))},get:function(n){return e.get("".concat(t,"/").concat(n))},getAll:function(){return e.get(t)},search:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){},r=n((new Qt).for(t)).get();return e.get(r.replace("//","/"))}}},Gt=arguments,$t=function(t){var e=Y(Object(i.useState)(!1),2),n=e[0],r=e[1];return[function(){return r(!0),t.apply(null,Gt).finally((function(){return r(!1)}))},n]},Zt=function(t,e){var n=e.model,r=e.getter,o=e.subscribe,s=e.unsubscribe,c=Y(Object(i.useState)(null),2),a=c[0],u=c[1];return Object(i.useEffect)((function(){r(t).then((function(t){return u(t.data)}))}),[t]),Object(i.useEffect)((function(){if(a&&o)return o(t,"updated",(function(t){return u(t[n])})),o(t,"deleted",(function(){return u(null)})),function(){return s&&s(t)}}),[a]),[a,u]},Yt=function(t){var e=t.model,n=t.getter,r=t.subscribe,o=t.unsubscribe,s=Y(Object(i.useState)(null),2),c=s[0],a=s[1];return Object(i.useEffect)((function(){a(null),n().then((function(t){return a(t.data)}))}),[n]),Object(i.useEffect)((function(){if(r&&c)return r(null,"created",(function(t){var n=!1;c.map((function(r){r.id===t[e].id&&(n=!0)})),n||a(c.concat([t[e]]))})),c.map((function(t){var n=t.id;r(n,"updated",(function(t){a(c.map((function(r){return r.id===n?t[e]:r})))})),r(n,"deleted",(function(){a(c.filter((function(t){return t.id!==n})))}))})),function(){return c.map((function(t){return o(t.id)}))}}),[c]),[c,a]},te=function t(e,n,r){r instanceof Array?r.map((function(r,o){var i=n+("object"===W(r)?"":"[".concat(o,"]"));t(e,i,r)})):null==r?e.append(n,""):"object"===W(r)?Object.entries(r).map((function(r){var o=Y(r,2),i=o[0],s=o[1];t(e,"".concat(n,"[").concat(i,"]"),s)})):e.append(n,r)};function ee(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ne(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function re(t,e,n){return e&&ne(t.prototype,e),n&&ne(t,n),t}function oe(){return(oe=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function ie(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&ce(t,e)}function se(t){return(se=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function ce(t,e){return(ce=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function ae(t,e){return!e||"object"!=typeof e&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function ue(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=se(t);if(e){var o=se(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ae(this,n)}}var le,fe,he,pe,de=function(){function t(e){ee(this,t),this._defaultOptions={auth:{headers:{}},authEndpoint:"/broadcasting/auth",broadcaster:"pusher",csrfToken:null,host:null,key:null,namespace:"App.Events"},this.setOptions(e),this.connect()}return re(t,[{key:"setOptions",value:function(t){return this.options=oe(this._defaultOptions,t),this.csrfToken()&&(this.options.auth.headers["X-CSRF-TOKEN"]=this.csrfToken()),t}},{key:"csrfToken",value:function(){var t;return"undefined"!=typeof window&&window.Laravel&&window.Laravel.csrfToken?window.Laravel.csrfToken:this.options.csrfToken?this.options.csrfToken:"undefined"!=typeof document&&"function"==typeof document.querySelector&&(t=document.querySelector('meta[name="csrf-token"]'))?t.getAttribute("content"):null}}]),t}(),ye=function(){function t(){ee(this,t)}return re(t,[{key:"listenForWhisper",value:function(t,e){return this.listen(".client-"+t,e)}},{key:"notification",value:function(t){return this.listen(".Illuminate\\Notifications\\Events\\BroadcastNotificationCreated",t)}},{key:"stopListeningForWhisper",value:function(t){return this.stopListening(".client-"+t)}}]),t}(),ve=function(){function t(e){ee(this,t),this.setNamespace(e)}return re(t,[{key:"format",value:function(t){return"."===t.charAt(0)||"\\"===t.charAt(0)?t.substr(1):(this.namespace&&(t=this.namespace+"."+t),t.replace(/\./g,"\\"))}},{key:"setNamespace",value:function(t){this.namespace=t}}]),t}(),me=function(t){ie(n,ye);var e=ue(n);function n(t,r,o){var i;return ee(this,n),(i=e.call(this)).name=r,i.pusher=t,i.options=o,i.eventFormatter=new ve(i.options.namespace),i.subscribe(),i}return re(n,[{key:"subscribe",value:function(){this.subscription=this.pusher.subscribe(this.name)}},{key:"unsubscribe",value:function(){this.pusher.unsubscribe(this.name)}},{key:"listen",value:function(t,e){return this.on(this.eventFormatter.format(t),e),this}},{key:"stopListening",value:function(t){return this.subscription.unbind(this.eventFormatter.format(t)),this}},{key:"on",value:function(t,e){return this.subscription.bind(t,e),this}}]),n}(),ge=function(t){ie(n,me);var e=ue(n);function n(){return ee(this,n),e.apply(this,arguments)}return re(n,[{key:"whisper",value:function(t,e){return this.pusher.channels.channels[this.name].trigger("client-".concat(t),e),this}}]),n}(),be=function(t){ie(n,me);var e=ue(n);function n(){return ee(this,n),e.apply(this,arguments)}return re(n,[{key:"whisper",value:function(t,e){return this.pusher.channels.channels[this.name].trigger("client-".concat(t),e),this}}]),n}(),we=function(t){ie(n,me);var e=ue(n);function n(){return ee(this,n),e.apply(this,arguments)}return re(n,[{key:"here",value:function(t){return this.on("pusher:subscription_succeeded",(function(e){t(Object.keys(e.members).map((function(t){return e.members[t]})))})),this}},{key:"joining",value:function(t){return this.on("pusher:member_added",(function(e){t(e.info)})),this}},{key:"leaving",value:function(t){return this.on("pusher:member_removed",(function(e){t(e.info)})),this}},{key:"whisper",value:function(t,e){return this.pusher.channels.channels[this.name].trigger("client-".concat(t),e),this}}]),n}(),ke=function(t){ie(n,ye);var e=ue(n);function n(t,r,o){var i;return ee(this,n),(i=e.call(this)).events={},i.name=r,i.socket=t,i.options=o,i.eventFormatter=new ve(i.options.namespace),i.subscribe(),i.configureReconnector(),i}return re(n,[{key:"subscribe",value:function(){this.socket.emit("subscribe",{channel:this.name,auth:this.options.auth||{}})}},{key:"unsubscribe",value:function(){this.unbind(),this.socket.emit("unsubscribe",{channel:this.name,auth:this.options.auth||{}})}},{key:"listen",value:function(t,e){return this.on(this.eventFormatter.format(t),e),this}},{key:"stopListening",value:function(t){var e=this.eventFormatter.format(t);return this.socket.removeListener(e),delete this.events[e],this}},{key:"on",value:function(t,e){var n=this,r=function(t,r){n.name==t&&e(r)};this.socket.on(t,r),this.bind(t,r)}},{key:"configureReconnector",value:function(){var t=this,e=function(){t.subscribe()};this.socket.on("reconnect",e),this.bind("reconnect",e)}},{key:"bind",value:function(t,e){this.events[t]=this.events[t]||[],this.events[t].push(e)}},{key:"unbind",value:function(){var t=this;Object.keys(this.events).forEach((function(e){t.events[e].forEach((function(n){t.socket.removeListener(e,n)})),delete t.events[e]}))}}]),n}(),_e=function(t){ie(n,ke);var e=ue(n);function n(){return ee(this,n),e.apply(this,arguments)}return re(n,[{key:"whisper",value:function(t,e){return this.socket.emit("client event",{channel:this.name,event:"client-".concat(t),data:e}),this}}]),n}(),Se=function(t){ie(n,_e);var e=ue(n);function n(){return ee(this,n),e.apply(this,arguments)}return re(n,[{key:"here",value:function(t){return this.on("presence:subscribed",(function(e){t(e.map((function(t){return t.user_info})))})),this}},{key:"joining",value:function(t){return this.on("presence:joining",(function(e){return t(e.user_info)})),this}},{key:"leaving",value:function(t){return this.on("presence:leaving",(function(e){return t(e.user_info)})),this}}]),n}(),Oe=function(t){ie(n,ye);var e=ue(n);function n(){return ee(this,n),e.apply(this,arguments)}return re(n,[{key:"subscribe",value:function(){}},{key:"unsubscribe",value:function(){}},{key:"listen",value:function(t,e){return this}},{key:"stopListening",value:function(t){return this}},{key:"on",value:function(t,e){return this}}]),n}(),Te=function(t){ie(n,Oe);var e=ue(n);function n(){return ee(this,n),e.apply(this,arguments)}return re(n,[{key:"whisper",value:function(t,e){return this}}]),n}(),Ce=function(t){ie(n,Oe);var e=ue(n);function n(){return ee(this,n),e.apply(this,arguments)}return re(n,[{key:"here",value:function(t){return this}},{key:"joining",value:function(t){return this}},{key:"leaving",value:function(t){return this}},{key:"whisper",value:function(t,e){return this}}]),n}(),je=function(t){ie(n,de);var e=ue(n);function n(){var t;return ee(this,n),(t=e.apply(this,arguments)).channels={},t}return re(n,[{key:"connect",value:function(){void 0!==this.options.client?this.pusher=this.options.client:this.pusher=new Pusher(this.options.key,this.options)}},{key:"listen",value:function(t,e,n){return this.channel(t).listen(e,n)}},{key:"channel",value:function(t){return this.channels[t]||(this.channels[t]=new me(this.pusher,t,this.options)),this.channels[t]}},{key:"privateChannel",value:function(t){return this.channels["private-"+t]||(this.channels["private-"+t]=new ge(this.pusher,"private-"+t,this.options)),this.channels["private-"+t]}},{key:"encryptedPrivateChannel",value:function(t){return this.channels["private-encrypted-"+t]||(this.channels["private-encrypted-"+t]=new be(this.pusher,"private-encrypted-"+t,this.options)),this.channels["private-encrypted-"+t]}},{key:"presenceChannel",value:function(t){return this.channels["presence-"+t]||(this.channels["presence-"+t]=new we(this.pusher,"presence-"+t,this.options)),this.channels["presence-"+t]}},{key:"leave",value:function(t){var e=this;[t,"private-"+t,"presence-"+t].forEach((function(t,n){e.leaveChannel(t)}))}},{key:"leaveChannel",value:function(t){this.channels[t]&&(this.channels[t].unsubscribe(),delete this.channels[t])}},{key:"socketId",value:function(){return this.pusher.connection.socket_id}},{key:"disconnect",value:function(){this.pusher.disconnect()}}]),n}(),Pe=function(t){ie(n,de);var e=ue(n);function n(){var t;return ee(this,n),(t=e.apply(this,arguments)).channels={},t}return re(n,[{key:"connect",value:function(){var t=this.getSocketIO();return this.socket=t(this.options.host,this.options),this.socket}},{key:"getSocketIO",value:function(){if(void 0!==this.options.client)return this.options.client;if("undefined"!=typeof io)return io;throw new Error("Socket.io client not found. Should be globally available or passed via options.client")}},{key:"listen",value:function(t,e,n){return this.channel(t).listen(e,n)}},{key:"channel",value:function(t){return this.channels[t]||(this.channels[t]=new ke(this.socket,t,this.options)),this.channels[t]}},{key:"privateChannel",value:function(t){return this.channels["private-"+t]||(this.channels["private-"+t]=new _e(this.socket,"private-"+t,this.options)),this.channels["private-"+t]}},{key:"presenceChannel",value:function(t){return this.channels["presence-"+t]||(this.channels["presence-"+t]=new Se(this.socket,"presence-"+t,this.options)),this.channels["presence-"+t]}},{key:"leave",value:function(t){var e=this;[t,"private-"+t,"presence-"+t].forEach((function(t){e.leaveChannel(t)}))}},{key:"leaveChannel",value:function(t){this.channels[t]&&(this.channels[t].unsubscribe(),delete this.channels[t])}},{key:"socketId",value:function(){return this.socket.id}},{key:"disconnect",value:function(){this.socket.disconnect()}}]),n}(),Ee=function(t){ie(n,de);var e=ue(n);function n(){var t;return ee(this,n),(t=e.apply(this,arguments)).channels={},t}return re(n,[{key:"connect",value:function(){}},{key:"listen",value:function(t,e,n){return new Oe}},{key:"channel",value:function(t){return new Oe}},{key:"privateChannel",value:function(t){return new Te}},{key:"presenceChannel",value:function(t){return new Ce}},{key:"leave",value:function(t){}},{key:"leaveChannel",value:function(t){}},{key:"socketId",value:function(){return"fake-socket-id"}},{key:"disconnect",value:function(){}}]),n}(),xe=function(){function t(e){ee(this,t),this.options=e,this.connect(),this.options.withoutInterceptors||this.registerInterceptors()}return re(t,[{key:"channel",value:function(t){return this.connector.channel(t)}},{key:"connect",value:function(){"pusher"==this.options.broadcaster?this.connector=new je(this.options):"socket.io"==this.options.broadcaster?this.connector=new Pe(this.options):"null"==this.options.broadcaster?this.connector=new Ee(this.options):"function"==typeof this.options.broadcaster&&(this.connector=new this.options.broadcaster(this.options))}},{key:"disconnect",value:function(){this.connector.disconnect()}},{key:"join",value:function(t){return this.connector.presenceChannel(t)}},{key:"leave",value:function(t){this.connector.leave(t)}},{key:"leaveChannel",value:function(t){this.connector.leaveChannel(t)}},{key:"listen",value:function(t,e,n){return this.connector.listen(t,e,n)}},{key:"private",value:function(t){return this.connector.privateChannel(t)}},{key:"encryptedPrivate",value:function(t){return this.connector.encryptedPrivateChannel(t)}},{key:"socketId",value:function(){return this.connector.socketId()}},{key:"registerInterceptors",value:function(){"function"==typeof Vue&&Vue.http&&this.registerVueRequestInterceptor(),"function"==typeof axios&&this.registerAxiosRequestInterceptor(),"function"==typeof jQuery&&this.registerjQueryAjaxSetup()}},{key:"registerVueRequestInterceptor",value:function(){var t=this;Vue.http.interceptors.push((function(e,n){t.socketId()&&e.headers.set("X-Socket-ID",t.socketId()),n()}))}},{key:"registerAxiosRequestInterceptor",value:function(){var t=this;axios.interceptors.request.use((function(e){return t.socketId()&&(e.headers["X-Socket-Id"]=t.socketId()),e}))}},{key:"registerjQueryAjaxSetup",value:function(){var t=this;void 0!==jQuery.ajax&&jQuery.ajaxPrefilter((function(e,n,r){t.socketId()&&r.setRequestHeader("X-Socket-Id",t.socketId())}))}}]),t}(),Ae=(he=le={exports:{}},le.exports,window,pe=function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=2)}([function(t,e,n){var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=256,s=function(){function t(t){void 0===t&&(t="="),this._paddingCharacter=t}return t.prototype.encodedLength=function(t){return this._paddingCharacter?(t+2)/3*4|0:(8*t+5)/6|0},t.prototype.encode=function(t){for(var e="",n=0;n<t.length-2;n+=3){var r=t[n]<<16|t[n+1]<<8|t[n+2];e+=this._encodeByte(r>>>18&63),e+=this._encodeByte(r>>>12&63),e+=this._encodeByte(r>>>6&63),e+=this._encodeByte(r>>>0&63)}var o=t.length-n;return o>0&&(r=t[n]<<16|(2===o?t[n+1]<<8:0),e+=this._encodeByte(r>>>18&63),e+=this._encodeByte(r>>>12&63),e+=2===o?this._encodeByte(r>>>6&63):this._paddingCharacter||"",e+=this._paddingCharacter||""),e},t.prototype.maxDecodedLength=function(t){return this._paddingCharacter?t/4*3|0:(6*t+7)/8|0},t.prototype.decodedLength=function(t){return this.maxDecodedLength(t.length-this._getPaddingLength(t))},t.prototype.decode=function(t){if(0===t.length)return new Uint8Array(0);for(var e=this._getPaddingLength(t),n=t.length-e,r=new Uint8Array(this.maxDecodedLength(n)),o=0,s=0,c=0,a=0,u=0,l=0,f=0;s<n-4;s+=4)a=this._decodeChar(t.charCodeAt(s+0)),u=this._decodeChar(t.charCodeAt(s+1)),l=this._decodeChar(t.charCodeAt(s+2)),f=this._decodeChar(t.charCodeAt(s+3)),r[o++]=a<<2|u>>>4,r[o++]=u<<4|l>>>2,r[o++]=l<<6|f,c|=a&i,c|=u&i,c|=l&i,c|=f&i;if(s<n-1&&(a=this._decodeChar(t.charCodeAt(s)),u=this._decodeChar(t.charCodeAt(s+1)),r[o++]=a<<2|u>>>4,c|=a&i,c|=u&i),s<n-2&&(l=this._decodeChar(t.charCodeAt(s+2)),r[o++]=u<<4|l>>>2,c|=l&i),s<n-3&&(f=this._decodeChar(t.charCodeAt(s+3)),r[o++]=l<<6|f,c|=f&i),0!==c)throw new Error("Base64Coder: incorrect characters for decoding");return r},t.prototype._encodeByte=function(t){var e=t;return e+=65,e+=25-t>>>8&6,e+=51-t>>>8&-75,e+=61-t>>>8&-15,e+=62-t>>>8&3,String.fromCharCode(e)},t.prototype._decodeChar=function(t){var e=i;return e+=(42-t&t-44)>>>8&-256+t-43+62,e+=(46-t&t-48)>>>8&-256+t-47+63,e+=(47-t&t-58)>>>8&-256+t-48+52,(e+=(64-t&t-91)>>>8&-256+t-65+0)+((96-t&t-123)>>>8&-256+t-97+26)},t.prototype._getPaddingLength=function(t){var e=0;if(this._paddingCharacter){for(var n=t.length-1;n>=0&&t[n]===this._paddingCharacter;n--)e++;if(t.length<4||e>2)throw new Error("Base64Coder: incorrect padding")}return e},t}();e.Coder=s;var c=new s;e.encode=function(t){return c.encode(t)},e.decode=function(t){return c.decode(t)};var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype._encodeByte=function(t){var e=t;return e+=65,e+=25-t>>>8&6,e+=51-t>>>8&-75,e+=61-t>>>8&-13,e+=62-t>>>8&49,String.fromCharCode(e)},e.prototype._decodeChar=function(t){var e=i;return e+=(44-t&t-46)>>>8&-256+t-45+62,e+=(94-t&t-96)>>>8&-256+t-95+63,e+=(47-t&t-58)>>>8&-256+t-48+52,(e+=(64-t&t-91)>>>8&-256+t-65+0)+((96-t&t-123)>>>8&-256+t-97+26)},e}(s);e.URLSafeCoder=a;var u=new a;e.encodeURLSafe=function(t){return u.encode(t)},e.decodeURLSafe=function(t){return u.decode(t)},e.encodedLength=function(t){return c.encodedLength(t)},e.maxDecodedLength=function(t){return c.maxDecodedLength(t)},e.decodedLength=function(t){return c.decodedLength(t)}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r="utf8: invalid string",o="utf8: invalid source encoding";function i(t){for(var e=0,n=0;n<t.length;n++){var o=t.charCodeAt(n);if(o<128)e+=1;else if(o<2048)e+=2;else if(o<55296)e+=3;else{if(!(o<=57343))throw new Error(r);if(n>=t.length-1)throw new Error(r);n++,e+=4}}return e}e.encode=function(t){for(var e=new Uint8Array(i(t)),n=0,r=0;r<t.length;r++){var o=t.charCodeAt(r);o<128?e[n++]=o:o<2048?(e[n++]=192|o>>6,e[n++]=128|63&o):o<55296?(e[n++]=224|o>>12,e[n++]=128|o>>6&63,e[n++]=128|63&o):(r++,o=(1023&o)<<10,o|=1023&t.charCodeAt(r),o+=65536,e[n++]=240|o>>18,e[n++]=128|o>>12&63,e[n++]=128|o>>6&63,e[n++]=128|63&o)}return e},e.encodedLength=i,e.decode=function(t){for(var e=[],n=0;n<t.length;n++){var r=t[n];if(128&r){var i=void 0;if(r<224){if(n>=t.length)throw new Error(o);if(128!=(192&(s=t[++n])))throw new Error(o);r=(31&r)<<6|63&s,i=128}else if(r<240){if(n>=t.length-1)throw new Error(o);var s=t[++n],c=t[++n];if(128!=(192&s)||128!=(192&c))throw new Error(o);r=(15&r)<<12|(63&s)<<6|63&c,i=2048}else{if(!(r<248))throw new Error(o);if(n>=t.length-2)throw new Error(o);s=t[++n],c=t[++n];var a=t[++n];if(128!=(192&s)||128!=(192&c)||128!=(192&a))throw new Error(o);r=(15&r)<<18|(63&s)<<12|(63&c)<<6|63&a,i=65536}if(r<i||r>=55296&&r<=57343)throw new Error(o);if(r>=65536){if(r>1114111)throw new Error(o);r-=65536,e.push(String.fromCharCode(55296|r>>10)),r=56320|1023&r}}e.push(String.fromCharCode(r))}return e.join("")}},function(t,e,n){t.exports=n(3).default},function(t,e,n){n.r(e);var r,o=function(){function t(t,e){this.lastId=0,this.prefix=t,this.name=e}return t.prototype.create=function(t){this.lastId++;var e=this.lastId,n=this.prefix+e,r=this.name+"["+e+"]",o=!1,i=function(){o||(t.apply(null,arguments),o=!0)};return this[e]=i,{number:e,id:n,name:r,callback:i}},t.prototype.remove=function(t){delete this[t.number]},t}(),i=new o("_pusher_script_","Pusher.ScriptReceivers"),s="6.0.3",c=7,a=80,u=443,l="",f="sockjs.pusher.com",h=80,p=443,d="/pusher",y="stats.pusher.com",v="/pusher/auth",m="ajax",g=12e4,b=3e4,w=1e4,k="mt1",_="http://js.pusher.com",S="https://js.pusher.com",O="",T=function(){function t(t){this.options=t,this.receivers=t.receivers||i,this.loading={}}return t.prototype.load=function(t,e,n){var r=this;if(r.loading[t]&&r.loading[t].length>0)r.loading[t].push(n);else{r.loading[t]=[n];var o=Le.createScriptRequest(r.getPath(t,e)),i=r.receivers.create((function(e){if(r.receivers.remove(i),r.loading[t]){var n=r.loading[t];delete r.loading[t];for(var s=function(t){t||o.cleanup()},c=0;c<n.length;c++)n[c](e,s)}}));o.send(i)}},t.prototype.getRoot=function(t){var e=Le.getDocument().location.protocol;return(t&&t.useTLS||"https:"===e?this.options.cdn_https:this.options.cdn_http).replace(/\/*$/,"")+"/"+this.options.version},t.prototype.getPath=function(t,e){return this.getRoot(e)+"/"+t+this.options.suffix+".js"},t}(),C=new o("_pusher_dependencies","Pusher.DependenciesReceivers"),j=new T({cdn_http:_,cdn_https:S,version:s,suffix:O,receivers:C}),P=String.fromCharCode,E="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",x=function(t){var e=t.charCodeAt(0);return e<128?t:e<2048?P(192|e>>>6)+P(128|63&e):P(224|e>>>12&15)+P(128|e>>>6&63)+P(128|63&e)},A=function(t){var e=[0,2,1][t.length%3],n=t.charCodeAt(0)<<16|(t.length>1?t.charCodeAt(1):0)<<8|(t.length>2?t.charCodeAt(2):0);return[E.charAt(n>>>18),E.charAt(n>>>12&63),e>=2?"=":E.charAt(n>>>6&63),e>=1?"=":E.charAt(63&n)].join("")},R=window.btoa||function(t){return t.replace(/[\s\S]{1,3}/g,A)},L=function(){function t(t,e,n,r){var o=this;this.clear=e,this.timer=t((function(){o.timer&&(o.timer=r(o.timer))}),n)}return t.prototype.isRunning=function(){return null!==this.timer},t.prototype.ensureAborted=function(){this.timer&&(this.clear(this.timer),this.timer=null)},t}(),I=(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});function N(t){window.clearTimeout(t)}function D(t){window.clearInterval(t)}var q=function(t){function e(e,n){return t.call(this,setTimeout,N,e,(function(t){return n(),null}))||this}return I(e,t),e}(L),U=function(t){function e(e,n){return t.call(this,setInterval,D,e,(function(t){return n(),t}))||this}return I(e,t),e}(L),M=function(){return Date.now?Date.now():(new Date).valueOf()},B=function(t){return new q(0,t)},F=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var r=Array.prototype.slice.call(arguments,1);return function(e){return e[t].apply(e,r.concat(arguments))}};function H(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r++){var o=e[r];for(var i in o)o[i]&&o[i].constructor&&o[i].constructor===Object?t[i]=H(t[i]||{},o[i]):t[i]=o[i]}return t}function z(){for(var t=["Pusher"],e=0;e<arguments.length;e++)"string"==typeof arguments[e]?t.push(arguments[e]):t.push(Y(arguments[e]));return t.join(" : ")}function X(t,e){var n=Array.prototype.indexOf;if(null===t)return-1;if(n&&t.indexOf===n)return t.indexOf(e);for(var r=0,o=t.length;r<o;r++)if(t[r]===e)return r;return-1}function V(t,e){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e(t[n],n,t)}function W(t){var e=[];return V(t,(function(t,n){e.push(n)})),e}function J(t,e,n){for(var r=0;r<t.length;r++)e.call(n||window,t[r],r,t)}function Q(t,e){for(var n=[],r=0;r<t.length;r++)n.push(e(t[r],r,t,n));return n}function K(t,e){e=e||function(t){return!!t};for(var n=[],r=0;r<t.length;r++)e(t[r],r,t,n)&&n.push(t[r]);return n}function G(t,e){var n={};return V(t,(function(r,o){(e&&e(r,o,t,n)||Boolean(r))&&(n[o]=r)})),n}function $(t,e){for(var n=0;n<t.length;n++)if(e(t[n],n,t))return!0;return!1}function Z(t){return e=function(t){return"object"==typeof t&&(t=Y(t)),encodeURIComponent((e=t.toString(),R(function(t){return t.replace(/[^\x00-\x7F]/g,x)}(e))));var e},n={},V(t,(function(t,r){n[r]=e(t)})),n;var e,n}function Y(t){try{return JSON.stringify(t)}catch(r){return JSON.stringify((e=[],n=[],function t(r,o){var i,s,c;switch(typeof r){case"object":if(!r)return null;for(i=0;i<e.length;i+=1)if(e[i]===r)return{$ref:n[i]};if(e.push(r),n.push(o),"[object Array]"===Object.prototype.toString.apply(r))for(c=[],i=0;i<r.length;i+=1)c[i]=t(r[i],o+"["+i+"]");else for(s in c={},r)Object.prototype.hasOwnProperty.call(r,s)&&(c[s]=t(r[s],o+"["+JSON.stringify(s)+"]"));return c;case"number":case"string":case"boolean":return r}}(t,"$")))}var e,n}var tt=new(function(){function t(){this.globalLog=function(t){window.console&&window.console.log&&window.console.log(t)}}return t.prototype.debug=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.log(this.globalLog,t)},t.prototype.warn=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.log(this.globalLogWarn,t)},t.prototype.error=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.log(this.globalLogError,t)},t.prototype.globalLogWarn=function(t){window.console&&window.console.warn?window.console.warn(t):this.globalLog(t)},t.prototype.globalLogError=function(t){window.console&&window.console.error?window.console.error(t):this.globalLogWarn(t)},t.prototype.log=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var r=z.apply(this,arguments);if(Je.log)Je.log(r);else if(Je.logToConsole){var o=t.bind(this);o(r)}},t}()),et={baseUrl:"https://pusher.com",urls:{authenticationEndpoint:{path:"/docs/authenticating_users"},javascriptQuickStart:{path:"/docs/javascript_quick_start"},triggeringClientEvents:{path:"/docs/client_api_guide/client_events#trigger-events"},encryptedChannelSupport:{fullUrl:"https://github.com/pusher/pusher-js/tree/cc491015371a4bde5743d1c87a0fbac0feb53195#encrypted-channel-support"}}},nt=function(t){var e,n=et.urls[t];return n?(n.fullUrl?e=n.fullUrl:n.path&&(e=et.baseUrl+n.path),e?"See: "+e:""):""},rt=function(t,e,n){var r,o=this;for(var i in(r=Le.createXHR()).open("POST",o.options.authEndpoint,!0),r.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),this.authOptions.headers)r.setRequestHeader(i,this.authOptions.headers[i]);return r.onreadystatechange=function(){if(4===r.readyState)if(200===r.status){var t,e=!1;try{t=JSON.parse(r.responseText),e=!0}catch(t){n(!0,"JSON returned from auth endpoint was invalid, yet status code was 200. Data was: "+r.responseText)}e&&n(!1,t)}else{var i=nt("authenticationEndpoint");tt.error("Unable to retrieve auth string from auth endpoint - received status "+r.status+" from "+o.options.authEndpoint+". Clients must be authenticated to join private or presence channels. "+i),n(!0,r.status)}},r.send(this.composeQuery(e)),r},ot=function(t,e,n){void 0!==this.authOptions.headers&&tt.warn("To send headers with the auth request, you must use AJAX, rather than JSONP.");var r=t.nextAuthCallbackID.toString();t.nextAuthCallbackID++;var o=t.getDocument(),i=o.createElement("script");t.auth_callbacks[r]=function(t){n(!1,t)};var s="Pusher.auth_callbacks['"+r+"']";i.src=this.options.authEndpoint+"?callback="+encodeURIComponent(s)+"&"+this.composeQuery(e);var c=o.getElementsByTagName("head")[0]||o.documentElement;c.insertBefore(i,c.firstChild)},it=function(){function t(t){this.src=t}return t.prototype.send=function(t){var e=this,n="Error loading "+e.src;e.script=document.createElement("script"),e.script.id=t.id,e.script.src=e.src,e.script.type="text/javascript",e.script.charset="UTF-8",e.script.addEventListener?(e.script.onerror=function(){t.callback(n)},e.script.onload=function(){t.callback(null)}):e.script.onreadystatechange=function(){"loaded"!==e.script.readyState&&"complete"!==e.script.readyState||t.callback(null)},void 0===e.script.async&&document.attachEvent&&/opera/i.test(navigator.userAgent)?(e.errorScript=document.createElement("script"),e.errorScript.id=t.id+"_error",e.errorScript.text=t.name+"('"+n+"');",e.script.async=e.errorScript.async=!1):e.script.async=!0;var r=document.getElementsByTagName("head")[0];r.insertBefore(e.script,r.firstChild),e.errorScript&&r.insertBefore(e.errorScript,e.script.nextSibling)},t.prototype.cleanup=function(){this.script&&(this.script.onload=this.script.onerror=null,this.script.onreadystatechange=null),this.script&&this.script.parentNode&&this.script.parentNode.removeChild(this.script),this.errorScript&&this.errorScript.parentNode&&this.errorScript.parentNode.removeChild(this.errorScript),this.script=null,this.errorScript=null},t}(),st=function(){function t(t,e){this.url=t,this.data=e}return t.prototype.send=function(t){if(!this.request){var e=function(t){var e,n;return Q((e=Z(G(t,(function(t){return void 0!==t}))),n=[],V(e,(function(t,e){n.push([e,t])})),n),F("join","=")).join("&")}(this.data),n=this.url+"/"+t.number+"?"+e;this.request=Le.createScriptRequest(n),this.request.send(t)}},t.prototype.cleanup=function(){this.request&&this.request.cleanup()},t}(),ct={name:"jsonp",getAgent:function(t,e){return function(n,r){var o="http"+(e?"s":"")+"://"+(t.host||t.options.host)+t.options.path,s=Le.createJSONPRequest(o,n),c=Le.ScriptReceivers.create((function(e,n){i.remove(c),s.cleanup(),n&&n.host&&(t.host=n.host),r&&r(e,n)}));s.send(c)}}};function at(t,e,n){return t+(e.useTLS?"s":"")+"://"+(e.useTLS?e.hostTLS:e.hostNonTLS)+n}function ut(t,e){return"/app/"+t+"?protocol="+c+"&client=js&version="+s+(e?"&"+e:"")}var lt={getInitial:function(t,e){return at("ws",e,(e.httpPath||"")+ut(t,"flash=false"))}},ft={getInitial:function(t,e){return at("http",e,(e.httpPath||"/pusher")+ut(t))}},ht={getInitial:function(t,e){return at("http",e,e.httpPath||"/pusher")},getPath:function(t,e){return ut(t)}},pt=function(){function t(){this._callbacks={}}return t.prototype.get=function(t){return this._callbacks[dt(t)]},t.prototype.add=function(t,e,n){var r=dt(t);this._callbacks[r]=this._callbacks[r]||[],this._callbacks[r].push({fn:e,context:n})},t.prototype.remove=function(t,e,n){if(t||e||n){var r=t?[dt(t)]:W(this._callbacks);e||n?this.removeCallback(r,e,n):this.removeAllCallbacks(r)}else this._callbacks={}},t.prototype.removeCallback=function(t,e,n){J(t,(function(t){this._callbacks[t]=K(this._callbacks[t]||[],(function(t){return e&&e!==t.fn||n&&n!==t.context})),0===this._callbacks[t].length&&delete this._callbacks[t]}),this)},t.prototype.removeAllCallbacks=function(t){J(t,(function(t){delete this._callbacks[t]}),this)},t}();function dt(t){return"_"+t}var yt=function(){function t(t){this.callbacks=new pt,this.global_callbacks=[],this.failThrough=t}return t.prototype.bind=function(t,e,n){return this.callbacks.add(t,e,n),this},t.prototype.bind_global=function(t){return this.global_callbacks.push(t),this},t.prototype.unbind=function(t,e,n){return this.callbacks.remove(t,e,n),this},t.prototype.unbind_global=function(t){return t?(this.global_callbacks=K(this.global_callbacks||[],(function(e){return e!==t})),this):(this.global_callbacks=[],this)},t.prototype.unbind_all=function(){return this.unbind(),this.unbind_global(),this},t.prototype.emit=function(t,e,n){for(var r=0;r<this.global_callbacks.length;r++)this.global_callbacks[r](t,e);var o=this.callbacks.get(t),i=[];if(n?i.push(e,n):e&&i.push(e),o&&o.length>0)for(r=0;r<o.length;r++)o[r].fn.apply(o[r].context||window,i);else this.failThrough&&this.failThrough(t,e);return this},t}(),vt=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),mt=function(t){function e(e,n,r,o,i){var s=t.call(this)||this;return s.initialize=Le.transportConnectionInitializer,s.hooks=e,s.name=n,s.priority=r,s.key=o,s.options=i,s.state="new",s.timeline=i.timeline,s.activityTimeout=i.activityTimeout,s.id=s.timeline.generateUniqueID(),s}return vt(e,t),e.prototype.handlesActivityChecks=function(){return Boolean(this.hooks.handlesActivityChecks)},e.prototype.supportsPing=function(){return Boolean(this.hooks.supportsPing)},e.prototype.connect=function(){var t=this;if(this.socket||"initialized"!==this.state)return!1;var e=this.hooks.urls.getInitial(this.key,this.options);try{this.socket=this.hooks.getSocket(e,this.options)}catch(e){return B((function(){t.onError(e),t.changeState("closed")})),!1}return this.bindListeners(),tt.debug("Connecting",{transport:this.name,url:e}),this.changeState("connecting"),!0},e.prototype.close=function(){return!!this.socket&&(this.socket.close(),!0)},e.prototype.send=function(t){var e=this;return"open"===this.state&&(B((function(){e.socket&&e.socket.send(t)})),!0)},e.prototype.ping=function(){"open"===this.state&&this.supportsPing()&&this.socket.ping()},e.prototype.onOpen=function(){this.hooks.beforeOpen&&this.hooks.beforeOpen(this.socket,this.hooks.urls.getPath(this.key,this.options)),this.changeState("open"),this.socket.onopen=void 0},e.prototype.onError=function(t){this.emit("error",{type:"WebSocketError",error:t}),this.timeline.error(this.buildTimelineMessage({error:t.toString()}))},e.prototype.onClose=function(t){t?this.changeState("closed",{code:t.code,reason:t.reason,wasClean:t.wasClean}):this.changeState("closed"),this.unbindListeners(),this.socket=void 0},e.prototype.onMessage=function(t){this.emit("message",t)},e.prototype.onActivity=function(){this.emit("activity")},e.prototype.bindListeners=function(){var t=this;this.socket.onopen=function(){t.onOpen()},this.socket.onerror=function(e){t.onError(e)},this.socket.onclose=function(e){t.onClose(e)},this.socket.onmessage=function(e){t.onMessage(e)},this.supportsPing()&&(this.socket.onactivity=function(){t.onActivity()})},e.prototype.unbindListeners=function(){this.socket&&(this.socket.onopen=void 0,this.socket.onerror=void 0,this.socket.onclose=void 0,this.socket.onmessage=void 0,this.supportsPing()&&(this.socket.onactivity=void 0))},e.prototype.changeState=function(t,e){this.state=t,this.timeline.info(this.buildTimelineMessage({state:t,params:e})),this.emit(t,e)},e.prototype.buildTimelineMessage=function(t){return H({cid:this.id},t)},e}(yt),gt=function(){function t(t){this.hooks=t}return t.prototype.isSupported=function(t){return this.hooks.isSupported(t)},t.prototype.createConnection=function(t,e,n,r){return new mt(this.hooks,t,e,n,r)},t}(),bt=new gt({urls:lt,handlesActivityChecks:!1,supportsPing:!1,isInitialized:function(){return Boolean(Le.getWebSocketAPI())},isSupported:function(){return Boolean(Le.getWebSocketAPI())},getSocket:function(t){return Le.createWebSocket(t)}}),wt={urls:ft,handlesActivityChecks:!1,supportsPing:!0,isInitialized:function(){return!0}},kt=H({getSocket:function(t){return Le.HTTPFactory.createStreamingSocket(t)}},wt),_t=H({getSocket:function(t){return Le.HTTPFactory.createPollingSocket(t)}},wt),St={isSupported:function(){return Le.isXHRSupported()}},Ot={ws:bt,xhr_streaming:new gt(H({},kt,St)),xhr_polling:new gt(H({},_t,St))},Tt=new gt({file:"sockjs",urls:ht,handlesActivityChecks:!0,supportsPing:!1,isSupported:function(){return!0},isInitialized:function(){return void 0!==window.SockJS},getSocket:function(t,e){return new window.SockJS(t,null,{js_path:j.getPath("sockjs",{useTLS:e.useTLS}),ignore_null_origin:e.ignoreNullOrigin})},beforeOpen:function(t,e){t.send(JSON.stringify({path:e}))}}),Ct={isSupported:function(t){return Le.isXDRSupported(t.useTLS)}},jt=new gt(H({},kt,Ct)),Pt=new gt(H({},_t,Ct));Ot.xdr_streaming=jt,Ot.xdr_polling=Pt,Ot.sockjs=Tt;var Et=Ot,xt=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),At=new(function(t){function e(){var e=t.call(this)||this,n=e;return void 0!==window.addEventListener&&(window.addEventListener("online",(function(){n.emit("online")}),!1),window.addEventListener("offline",(function(){n.emit("offline")}),!1)),e}return xt(e,t),e.prototype.isOnline=function(){return void 0===window.navigator.onLine||window.navigator.onLine},e}(yt)),Rt=function(){function t(t,e,n){this.manager=t,this.transport=e,this.minPingDelay=n.minPingDelay,this.maxPingDelay=n.maxPingDelay,this.pingDelay=void 0}return t.prototype.createConnection=function(t,e,n,r){var o=this;r=H({},r,{activityTimeout:this.pingDelay});var i=this.transport.createConnection(t,e,n,r),s=null,c=function(){i.unbind("open",c),i.bind("closed",a),s=M()},a=function(t){if(i.unbind("closed",a),1002===t.code||1003===t.code)o.manager.reportDeath();else if(!t.wasClean&&s){var e=M()-s;e<2*o.maxPingDelay&&(o.manager.reportDeath(),o.pingDelay=Math.max(e/2,o.minPingDelay))}};return i.bind("open",c),i},t.prototype.isSupported=function(t){return this.manager.isAlive()&&this.transport.isSupported(t)},t}(),Lt={decodeMessage:function(t){try{var e=JSON.parse(t.data),n=e.data;if("string"==typeof n)try{n=JSON.parse(e.data)}catch(t){}var r={event:e.event,channel:e.channel,data:n};return e.user_id&&(r.user_id=e.user_id),r}catch(e){throw{type:"MessageParseError",error:e,data:t.data}}},encodeMessage:function(t){return JSON.stringify(t)},processHandshake:function(t){var e=Lt.decodeMessage(t);if("pusher:connection_established"===e.event){if(!e.data.activity_timeout)throw"No activity timeout specified in handshake";return{action:"connected",id:e.data.socket_id,activityTimeout:1e3*e.data.activity_timeout}}if("pusher:error"===e.event)return{action:this.getCloseAction(e.data),error:this.getCloseError(e.data)};throw"Invalid handshake"},getCloseAction:function(t){return t.code<4e3?t.code>=1002&&t.code<=1004?"backoff":null:4e3===t.code?"tls_only":t.code<4100?"refused":t.code<4200?"backoff":t.code<4300?"retry":"refused"},getCloseError:function(t){return 1e3!==t.code&&1001!==t.code?{type:"PusherError",data:{code:t.code,message:t.reason||t.message}}:null}},It=Lt,Nt=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Dt=function(t){function e(e,n){var r=t.call(this)||this;return r.id=e,r.transport=n,r.activityTimeout=n.activityTimeout,r.bindListeners(),r}return Nt(e,t),e.prototype.handlesActivityChecks=function(){return this.transport.handlesActivityChecks()},e.prototype.send=function(t){return this.transport.send(t)},e.prototype.send_event=function(t,e,n){var r={event:t,data:e};return n&&(r.channel=n),tt.debug("Event sent",r),this.send(It.encodeMessage(r))},e.prototype.ping=function(){this.transport.supportsPing()?this.transport.ping():this.send_event("pusher:ping",{})},e.prototype.close=function(){this.transport.close()},e.prototype.bindListeners=function(){var t=this,e={message:function(e){var n;try{n=It.decodeMessage(e)}catch(n){t.emit("error",{type:"MessageParseError",error:n,data:e.data})}if(void 0!==n){switch(tt.debug("Event recd",n),n.event){case"pusher:error":t.emit("error",{type:"PusherError",data:n.data});break;case"pusher:ping":t.emit("ping");break;case"pusher:pong":t.emit("pong")}t.emit("message",n)}},activity:function(){t.emit("activity")},error:function(e){t.emit("error",{type:"WebSocketError",error:e})},closed:function(e){n(),e&&e.code&&t.handleCloseEvent(e),t.transport=null,t.emit("closed")}},n=function(){V(e,(function(e,n){t.transport.unbind(n,e)}))};V(e,(function(e,n){t.transport.bind(n,e)}))},e.prototype.handleCloseEvent=function(t){var e=It.getCloseAction(t),n=It.getCloseError(t);n&&this.emit("error",n),e&&this.emit(e,{action:e,error:n})},e}(yt),qt=function(){function t(t,e){this.transport=t,this.callback=e,this.bindListeners()}return t.prototype.close=function(){this.unbindListeners(),this.transport.close()},t.prototype.bindListeners=function(){var t=this;this.onMessage=function(e){var n;t.unbindListeners();try{n=It.processHandshake(e)}catch(e){return t.finish("error",{error:e}),void t.transport.close()}"connected"===n.action?t.finish("connected",{connection:new Dt(n.id,t.transport),activityTimeout:n.activityTimeout}):(t.finish(n.action,{error:n.error}),t.transport.close())},this.onClosed=function(e){t.unbindListeners();var n=It.getCloseAction(e)||"backoff",r=It.getCloseError(e);t.finish(n,{error:r})},this.transport.bind("message",this.onMessage),this.transport.bind("closed",this.onClosed)},t.prototype.unbindListeners=function(){this.transport.unbind("message",this.onMessage),this.transport.unbind("closed",this.onClosed)},t.prototype.finish=function(t,e){this.callback(H({transport:this.transport,action:t},e))},t}(),Ut=function(){function t(t,e){this.channel=t;var n=e.authTransport;if(void 0===Le.getAuthorizers()[n])throw"'"+n+"' is not a recognized auth transport";this.type=n,this.options=e,this.authOptions=e.auth||{}}return t.prototype.composeQuery=function(t){var e="socket_id="+encodeURIComponent(t)+"&channel_name="+encodeURIComponent(this.channel.name);for(var n in this.authOptions.params)e+="&"+encodeURIComponent(n)+"="+encodeURIComponent(this.authOptions.params[n]);return e},t.prototype.authorize=function(e,n){t.authorizers=t.authorizers||Le.getAuthorizers(),t.authorizers[this.type].call(this,Le,e,n)},t}(),Mt=function(){function t(t,e){this.timeline=t,this.options=e||{}}return t.prototype.send=function(t,e){this.timeline.isEmpty()||this.timeline.send(Le.TimelineTransport.getAgent(this,t),e)},t}(),Bt=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ft=function(t){function e(e){var n=this.constructor,r=t.call(this,e)||this;return Object.setPrototypeOf(r,n.prototype),r}return Bt(e,t),e}(Error),Ht=function(t){function e(e){var n=this.constructor,r=t.call(this,e)||this;return Object.setPrototypeOf(r,n.prototype),r}return Bt(e,t),e}(Error),zt=function(t){function e(e){var n=this.constructor,r=t.call(this,e)||this;return Object.setPrototypeOf(r,n.prototype),r}return Bt(e,t),e}(Error),Xt=function(t){function e(e){var n=this.constructor,r=t.call(this,e)||this;return Object.setPrototypeOf(r,n.prototype),r}return Bt(e,t),e}(Error),Vt=function(t){function e(e){var n=this.constructor,r=t.call(this,e)||this;return Object.setPrototypeOf(r,n.prototype),r}return Bt(e,t),e}(Error),Wt=function(t){function e(e){var n=this.constructor,r=t.call(this,e)||this;return Object.setPrototypeOf(r,n.prototype),r}return Bt(e,t),e}(Error),Jt=function(t){function e(e){var n=this.constructor,r=t.call(this,e)||this;return Object.setPrototypeOf(r,n.prototype),r}return Bt(e,t),e}(Error),Qt=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Kt=function(t){function e(e,n){var r=t.call(this,(function(t,n){tt.debug("No callbacks on "+e+" for "+t)}))||this;return r.name=e,r.pusher=n,r.subscribed=!1,r.subscriptionPending=!1,r.subscriptionCancelled=!1,r}return Qt(e,t),e.prototype.authorize=function(t,e){return e(!1,{auth:""})},e.prototype.trigger=function(t,e){if(0!==t.indexOf("client-"))throw new Ft("Event '"+t+"' does not start with 'client-'");if(!this.subscribed){var n=nt("triggeringClientEvents");tt.warn("Client event triggered before channel 'subscription_succeeded' event . "+n)}return this.pusher.send_event(t,e,this.name)},e.prototype.disconnect=function(){this.subscribed=!1,this.subscriptionPending=!1},e.prototype.handleEvent=function(t){var e=t.event,n=t.data;"pusher_internal:subscription_succeeded"===e?this.handleSubscriptionSucceededEvent(t):0!==e.indexOf("pusher_internal:")&&this.emit(e,n,{})},e.prototype.handleSubscriptionSucceededEvent=function(t){this.subscriptionPending=!1,this.subscribed=!0,this.subscriptionCancelled?this.pusher.unsubscribe(this.name):this.emit("pusher:subscription_succeeded",t.data)},e.prototype.subscribe=function(){var t=this;this.subscribed||(this.subscriptionPending=!0,this.subscriptionCancelled=!1,this.authorize(this.pusher.connection.socket_id,(function(e,n){e?(tt.error(n),t.emit("pusher:subscription_error",n)):(n=n,t.pusher.send_event("pusher:subscribe",{auth:n.auth,channel_data:n.channel_data,channel:t.name}))})))},e.prototype.unsubscribe=function(){this.subscribed=!1,this.pusher.send_event("pusher:unsubscribe",{channel:this.name})},e.prototype.cancelSubscription=function(){this.subscriptionCancelled=!0},e.prototype.reinstateSubscription=function(){this.subscriptionCancelled=!1},e}(yt),Gt=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),$t=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Gt(e,t),e.prototype.authorize=function(t,e){return ae.createAuthorizer(this,this.pusher.config).authorize(t,e)},e}(Kt),Zt=function(){function t(){this.reset()}return t.prototype.get=function(t){return Object.prototype.hasOwnProperty.call(this.members,t)?{id:t,info:this.members[t]}:null},t.prototype.each=function(t){var e=this;V(this.members,(function(n,r){t(e.get(r))}))},t.prototype.setMyID=function(t){this.myID=t},t.prototype.onSubscription=function(t){this.members=t.presence.hash,this.count=t.presence.count,this.me=this.get(this.myID)},t.prototype.addMember=function(t){return null===this.get(t.user_id)&&this.count++,this.members[t.user_id]=t.user_info,this.get(t.user_id)},t.prototype.removeMember=function(t){var e=this.get(t.user_id);return e&&(delete this.members[t.user_id],this.count--),e},t.prototype.reset=function(){this.members={},this.count=0,this.myID=null,this.me=null},t}(),Yt=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),te=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.members=new Zt,r}return Yt(e,t),e.prototype.authorize=function(e,n){var r=this;t.prototype.authorize.call(this,e,(function(t,e){if(!t){if(void 0===(e=e).channel_data){var o=nt("authenticationEndpoint");return tt.error("Invalid auth response for channel '"+r.name+"',expected 'channel_data' field. "+o),void n("Invalid auth response")}var i=JSON.parse(e.channel_data);r.members.setMyID(i.user_id)}n(t,e)}))},e.prototype.handleEvent=function(t){var e=t.event;if(0===e.indexOf("pusher_internal:"))this.handleInternalEvent(t);else{var n=t.data,r={};t.user_id&&(r.user_id=t.user_id),this.emit(e,n,r)}},e.prototype.handleInternalEvent=function(t){var e=t.event,n=t.data;switch(e){case"pusher_internal:subscription_succeeded":this.handleSubscriptionSucceededEvent(t);break;case"pusher_internal:member_added":var r=this.members.addMember(n);this.emit("pusher:member_added",r);break;case"pusher_internal:member_removed":var o=this.members.removeMember(n);o&&this.emit("pusher:member_removed",o)}},e.prototype.handleSubscriptionSucceededEvent=function(t){this.subscriptionPending=!1,this.subscribed=!0,this.subscriptionCancelled?this.pusher.unsubscribe(this.name):(this.members.onSubscription(t.data),this.emit("pusher:subscription_succeeded",this.members))},e.prototype.disconnect=function(){this.members.reset(),t.prototype.disconnect.call(this)},e}($t),ee=n(1),ne=n(0),re=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),oe=function(t){function e(e,n,r){var o=t.call(this,e,n)||this;return o.key=null,o.nacl=r,o}return re(e,t),e.prototype.authorize=function(e,n){var r=this;t.prototype.authorize.call(this,e,(function(t,e){if(t)n(!0,e);else{var o=e.shared_secret;if(o)r.key=Object(ne.decode)(o),delete e.shared_secret,n(!1,e);else{var i="No shared_secret key in auth payload for encrypted channel: "+r.name;n(!0,i)}}}))},e.prototype.trigger=function(t,e){throw new Vt("Client events are not currently supported for encrypted channels")},e.prototype.handleEvent=function(e){var n=e.event,r=e.data;0!==n.indexOf("pusher_internal:")&&0!==n.indexOf("pusher:")?this.handleEncryptedEvent(n,r):t.prototype.handleEvent.call(this,e)},e.prototype.handleEncryptedEvent=function(t,e){var n=this;if(this.key)if(e.ciphertext&&e.nonce){var r=Object(ne.decode)(e.ciphertext);if(r.length<this.nacl.secretbox.overheadLength)tt.error("Expected encrypted event ciphertext length to be "+this.nacl.secretbox.overheadLength+", got: "+r.length);else{var o=Object(ne.decode)(e.nonce);if(o.length<this.nacl.secretbox.nonceLength)tt.error("Expected encrypted event nonce length to be "+this.nacl.secretbox.nonceLength+", got: "+o.length);else{var i=this.nacl.secretbox.open(r,o,this.key);if(null===i)return tt.debug("Failed to decrypt an event, probably because it was encrypted with a different key. Fetching a new key from the authEndpoint..."),void this.authorize(this.pusher.connection.socket_id,(function(e,s){e?tt.error("Failed to make a request to the authEndpoint: "+s+". Unable to fetch new key, so dropping encrypted event"):null!==(i=n.nacl.secretbox.open(r,o,n.key))?n.emitJSON(t,Object(ee.decode)(i)):tt.error("Failed to decrypt event with new key. Dropping encrypted event")}));this.emitJSON(t,Object(ee.decode)(i))}}}else tt.error("Unexpected format for encrypted event, expected object with `ciphertext` and `nonce` fields, got: "+e);else tt.debug("Received encrypted event before key has been retrieved from the authEndpoint")},e.prototype.emitJSON=function(t,e){try{this.emit(t,JSON.parse(e))}catch(n){this.emit(t,e)}return this},e}($t),ie=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),se=function(t){function e(e,n){var r=t.call(this)||this;r.state="initialized",r.connection=null,r.key=e,r.options=n,r.timeline=r.options.timeline,r.usingTLS=r.options.useTLS,r.errorCallbacks=r.buildErrorCallbacks(),r.connectionCallbacks=r.buildConnectionCallbacks(r.errorCallbacks),r.handshakeCallbacks=r.buildHandshakeCallbacks(r.errorCallbacks);var o=Le.getNetwork();return o.bind("online",(function(){r.timeline.info({netinfo:"online"}),"connecting"!==r.state&&"unavailable"!==r.state||r.retryIn(0)})),o.bind("offline",(function(){r.timeline.info({netinfo:"offline"}),r.connection&&r.sendActivityCheck()})),r.updateStrategy(),r}return ie(e,t),e.prototype.connect=function(){this.connection||this.runner||(this.strategy.isSupported()?(this.updateState("connecting"),this.startConnecting(),this.setUnavailableTimer()):this.updateState("failed"))},e.prototype.send=function(t){return!!this.connection&&this.connection.send(t)},e.prototype.send_event=function(t,e,n){return!!this.connection&&this.connection.send_event(t,e,n)},e.prototype.disconnect=function(){this.disconnectInternally(),this.updateState("disconnected")},e.prototype.isUsingTLS=function(){return this.usingTLS},e.prototype.startConnecting=function(){var t=this,e=function(n,r){n?t.runner=t.strategy.connect(0,e):"error"===r.action?(t.emit("error",{type:"HandshakeError",error:r.error}),t.timeline.error({handshakeError:r.error})):(t.abortConnecting(),t.handshakeCallbacks[r.action](r))};this.runner=this.strategy.connect(0,e)},e.prototype.abortConnecting=function(){this.runner&&(this.runner.abort(),this.runner=null)},e.prototype.disconnectInternally=function(){this.abortConnecting(),this.clearRetryTimer(),this.clearUnavailableTimer(),this.connection&&this.abandonConnection().close()},e.prototype.updateStrategy=function(){this.strategy=this.options.getStrategy({key:this.key,timeline:this.timeline,useTLS:this.usingTLS})},e.prototype.retryIn=function(t){var e=this;this.timeline.info({action:"retry",delay:t}),t>0&&this.emit("connecting_in",Math.round(t/1e3)),this.retryTimer=new q(t||0,(function(){e.disconnectInternally(),e.connect()}))},e.prototype.clearRetryTimer=function(){this.retryTimer&&(this.retryTimer.ensureAborted(),this.retryTimer=null)},e.prototype.setUnavailableTimer=function(){var t=this;this.unavailableTimer=new q(this.options.unavailableTimeout,(function(){t.updateState("unavailable")}))},e.prototype.clearUnavailableTimer=function(){this.unavailableTimer&&this.unavailableTimer.ensureAborted()},e.prototype.sendActivityCheck=function(){var t=this;this.stopActivityCheck(),this.connection.ping(),this.activityTimer=new q(this.options.pongTimeout,(function(){t.timeline.error({pong_timed_out:t.options.pongTimeout}),t.retryIn(0)}))},e.prototype.resetActivityCheck=function(){var t=this;this.stopActivityCheck(),this.connection&&!this.connection.handlesActivityChecks()&&(this.activityTimer=new q(this.activityTimeout,(function(){t.sendActivityCheck()})))},e.prototype.stopActivityCheck=function(){this.activityTimer&&this.activityTimer.ensureAborted()},e.prototype.buildConnectionCallbacks=function(t){var e=this;return H({},t,{message:function(t){e.resetActivityCheck(),e.emit("message",t)},ping:function(){e.send_event("pusher:pong",{})},activity:function(){e.resetActivityCheck()},error:function(t){e.emit("error",{type:"WebSocketError",error:t})},closed:function(){e.abandonConnection(),e.shouldRetry()&&e.retryIn(1e3)}})},e.prototype.buildHandshakeCallbacks=function(t){var e=this;return H({},t,{connected:function(t){e.activityTimeout=Math.min(e.options.activityTimeout,t.activityTimeout,t.connection.activityTimeout||1/0),e.clearUnavailableTimer(),e.setConnection(t.connection),e.socket_id=e.connection.id,e.updateState("connected",{socket_id:e.socket_id})}})},e.prototype.buildErrorCallbacks=function(){var t=this,e=function(e){return function(n){n.error&&t.emit("error",{type:"WebSocketError",error:n.error}),e(n)}};return{tls_only:e((function(){t.usingTLS=!0,t.updateStrategy(),t.retryIn(0)})),refused:e((function(){t.disconnect()})),backoff:e((function(){t.retryIn(1e3)})),retry:e((function(){t.retryIn(0)}))}},e.prototype.setConnection=function(t){for(var e in this.connection=t,this.connectionCallbacks)this.connection.bind(e,this.connectionCallbacks[e]);this.resetActivityCheck()},e.prototype.abandonConnection=function(){if(this.connection){for(var t in this.stopActivityCheck(),this.connectionCallbacks)this.connection.unbind(t,this.connectionCallbacks[t]);var e=this.connection;return this.connection=null,e}},e.prototype.updateState=function(t,e){var n=this.state;if(this.state=t,n!==t){var r=t;"connected"===r&&(r+=" with new socket ID "+e.socket_id),tt.debug("State changed",n+" -> "+r),this.timeline.info({state:t,params:e}),this.emit("state_change",{previous:n,current:t}),this.emit(t,e)}},e.prototype.shouldRetry=function(){return"connecting"===this.state||"connected"===this.state},e}(yt),ce=function(){function t(){this.channels={}}return t.prototype.add=function(t,e){return this.channels[t]||(this.channels[t]=function(t,e){if(0===t.indexOf("private-encrypted-")){if(e.config.nacl)return ae.createEncryptedChannel(t,e,e.config.nacl);var n=nt("encryptedChannelSupport");throw new Vt("Tried to subscribe to a private-encrypted- channel but no nacl implementation available. "+n)}return 0===t.indexOf("private-")?ae.createPrivateChannel(t,e):0===t.indexOf("presence-")?ae.createPresenceChannel(t,e):ae.createChannel(t,e)}(t,e)),this.channels[t]},t.prototype.all=function(){return function(t){var e=[];return V(t,(function(t){e.push(t)})),e}(this.channels)},t.prototype.find=function(t){return this.channels[t]},t.prototype.remove=function(t){var e=this.channels[t];return delete this.channels[t],e},t.prototype.disconnect=function(){V(this.channels,(function(t){t.disconnect()}))},t}(),ae={createChannels:function(){return new ce},createConnectionManager:function(t,e){return new se(t,e)},createChannel:function(t,e){return new Kt(t,e)},createPrivateChannel:function(t,e){return new $t(t,e)},createPresenceChannel:function(t,e){return new te(t,e)},createEncryptedChannel:function(t,e,n){return new oe(t,e,n)},createTimelineSender:function(t,e){return new Mt(t,e)},createAuthorizer:function(t,e){return e.authorizer?e.authorizer(t,e):new Ut(t,e)},createHandshake:function(t,e){return new qt(t,e)},createAssistantToTheTransportManager:function(t,e,n){return new Rt(t,e,n)}},ue=function(){function t(t){this.options=t||{},this.livesLeft=this.options.lives||1/0}return t.prototype.getAssistant=function(t){return ae.createAssistantToTheTransportManager(this,t,{minPingDelay:this.options.minPingDelay,maxPingDelay:this.options.maxPingDelay})},t.prototype.isAlive=function(){return this.livesLeft>0},t.prototype.reportDeath=function(){this.livesLeft-=1},t}(),le=function(){function t(t,e){this.strategies=t,this.loop=Boolean(e.loop),this.failFast=Boolean(e.failFast),this.timeout=e.timeout,this.timeoutLimit=e.timeoutLimit}return t.prototype.isSupported=function(){return $(this.strategies,F("isSupported"))},t.prototype.connect=function(t,e){var n=this,r=this.strategies,o=0,i=this.timeout,s=null,c=function(a,u){u?e(null,u):(o+=1,n.loop&&(o%=r.length),o<r.length?(i&&(i*=2,n.timeoutLimit&&(i=Math.min(i,n.timeoutLimit))),s=n.tryStrategy(r[o],t,{timeout:i,failFast:n.failFast},c)):e(!0))};return s=this.tryStrategy(r[o],t,{timeout:i,failFast:this.failFast},c),{abort:function(){s.abort()},forceMinPriority:function(e){t=e,s&&s.forceMinPriority(e)}}},t.prototype.tryStrategy=function(t,e,n,r){var o=null,i=null;return n.timeout>0&&(o=new q(n.timeout,(function(){i.abort(),r(!0)}))),i=t.connect(e,(function(t,e){t&&o&&o.isRunning()&&!n.failFast||(o&&o.ensureAborted(),r(t,e))})),{abort:function(){o&&o.ensureAborted(),i.abort()},forceMinPriority:function(t){i.forceMinPriority(t)}}},t}(),fe=function(){function t(t){this.strategies=t}return t.prototype.isSupported=function(){return $(this.strategies,F("isSupported"))},t.prototype.connect=function(t,e){return function(t,e,n){var r=Q(t,(function(t,r,o,i){return t.connect(e,n(r,i))}));return{abort:function(){J(r,he)},forceMinPriority:function(t){J(r,(function(e){e.forceMinPriority(t)}))}}}(this.strategies,t,(function(t,n){return function(r,o){n[t].error=r,r?function(t){return function(t,e){for(var n=0;n<t.length;n++)if(!e(t[n]))return!1;return!0}(t,(function(t){return Boolean(t.error)}))}(n)&&e(!0):(J(n,(function(t){t.forceMinPriority(o.transport.priority)})),e(null,o))}}))},t}();function he(t){t.error||t.aborted||(t.abort(),t.aborted=!0)}var pe=function(){function t(t,e,n){this.strategy=t,this.transports=e,this.ttl=n.ttl||18e5,this.usingTLS=n.useTLS,this.timeline=n.timeline}return t.prototype.isSupported=function(){return this.strategy.isSupported()},t.prototype.connect=function(t,e){var n=this.usingTLS,r=function(t){var e=Le.getLocalStorage();if(e)try{var n=e[de(t)];if(n)return JSON.parse(n)}catch(e){ye(t)}return null}(n),o=[this.strategy];if(r&&r.timestamp+this.ttl>=M()){var i=this.transports[r.transport];i&&(this.timeline.info({cached:!0,transport:r.transport,latency:r.latency}),o.push(new le([i],{timeout:2*r.latency+1e3,failFast:!0})))}var s=M(),c=o.pop().connect(t,(function r(i,a){i?(ye(n),o.length>0?(s=M(),c=o.pop().connect(t,r)):e(i)):(function(t,e,n){var r=Le.getLocalStorage();if(r)try{r[de(t)]=Y({timestamp:M(),transport:e,latency:n})}catch(t){}}(n,a.transport.name,M()-s),e(null,a))}));return{abort:function(){c.abort()},forceMinPriority:function(e){t=e,c&&c.forceMinPriority(e)}}},t}();function de(t){return"pusherTransport"+(t?"TLS":"NonTLS")}function ye(t){var e=Le.getLocalStorage();if(e)try{delete e[de(t)]}catch(t){}}var ve=function(){function t(t,e){var n=e.delay;this.strategy=t,this.options={delay:n}}return t.prototype.isSupported=function(){return this.strategy.isSupported()},t.prototype.connect=function(t,e){var n,r=this.strategy,o=new q(this.options.delay,(function(){n=r.connect(t,e)}));return{abort:function(){o.ensureAborted(),n&&n.abort()},forceMinPriority:function(e){t=e,n&&n.forceMinPriority(e)}}},t}(),me=function(){function t(t,e,n){this.test=t,this.trueBranch=e,this.falseBranch=n}return t.prototype.isSupported=function(){return(this.test()?this.trueBranch:this.falseBranch).isSupported()},t.prototype.connect=function(t,e){return(this.test()?this.trueBranch:this.falseBranch).connect(t,e)},t}(),ge=function(){function t(t){this.strategy=t}return t.prototype.isSupported=function(){return this.strategy.isSupported()},t.prototype.connect=function(t,e){var n=this.strategy.connect(t,(function(t,r){r&&n.abort(),e(t,r)}));return n},t}();function be(t){return function(){return t.isSupported()}}var we,ke={getRequest:function(t){var e=new window.XDomainRequest;return e.ontimeout=function(){t.emit("error",new Ht),t.close()},e.onerror=function(e){t.emit("error",e),t.close()},e.onprogress=function(){e.responseText&&e.responseText.length>0&&t.onChunk(200,e.responseText)},e.onload=function(){e.responseText&&e.responseText.length>0&&t.onChunk(200,e.responseText),t.emit("finished",200),t.close()},e},abortRequest:function(t){t.ontimeout=t.onerror=t.onprogress=t.onload=null,t.abort()}},_e=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Se=function(t){function e(e,n,r){var o=t.call(this)||this;return o.hooks=e,o.method=n,o.url=r,o}return _e(e,t),e.prototype.start=function(t){var e=this;this.position=0,this.xhr=this.hooks.getRequest(this),this.unloader=function(){e.close()},Le.addUnloadListener(this.unloader),this.xhr.open(this.method,this.url,!0),this.xhr.setRequestHeader&&this.xhr.setRequestHeader("Content-Type","application/json"),this.xhr.send(t)},e.prototype.close=function(){this.unloader&&(Le.removeUnloadListener(this.unloader),this.unloader=null),this.xhr&&(this.hooks.abortRequest(this.xhr),this.xhr=null)},e.prototype.onChunk=function(t,e){for(;;){var n=this.advanceBuffer(e);if(!n)break;this.emit("chunk",{status:t,data:n})}this.isBufferTooLong(e)&&this.emit("buffer_too_long")},e.prototype.advanceBuffer=function(t){var e=t.slice(this.position),n=e.indexOf("\n");return-1!==n?(this.position+=n+1,e.slice(0,n)):null},e.prototype.isBufferTooLong=function(t){return this.position===t.length&&t.length>262144},e}(yt);!function(t){t[t.CONNECTING=0]="CONNECTING",t[t.OPEN=1]="OPEN",t[t.CLOSED=3]="CLOSED"}(we||(we={}));var Oe=we,Te=1;function Ce(t){var e=-1===t.indexOf("?")?"?":"&";return t+e+"t="+ +new Date+"&n="+Te++}function je(t){return Math.floor(Math.random()*t)}var Pe,Ee=function(){function t(t,e){this.hooks=t,this.session=je(1e3)+"/"+function(t){for(var e=[],n=0;n<8;n++)e.push(je(32).toString(32));return e.join("")}(),this.location=function(t){var e=/([^\?]*)\/*(\??.*)/.exec(t);return{base:e[1],queryString:e[2]}}(e),this.readyState=Oe.CONNECTING,this.openStream()}return t.prototype.send=function(t){return this.sendRaw(JSON.stringify([t]))},t.prototype.ping=function(){this.hooks.sendHeartbeat(this)},t.prototype.close=function(t,e){this.onClose(t,e,!0)},t.prototype.sendRaw=function(t){if(this.readyState!==Oe.OPEN)return!1;try{return Le.createSocketRequest("POST",Ce(function(t,e){return t.base+"/"+e+"/xhr_send"}(this.location,this.session))).start(t),!0}catch(t){return!1}},t.prototype.reconnect=function(){this.closeStream(),this.openStream()},t.prototype.onClose=function(t,e,n){this.closeStream(),this.readyState=Oe.CLOSED,this.onclose&&this.onclose({code:t,reason:e,wasClean:n})},t.prototype.onChunk=function(t){var e;if(200===t.status)switch(this.readyState===Oe.OPEN&&this.onActivity(),t.data.slice(0,1)){case"o":e=JSON.parse(t.data.slice(1)||"{}"),this.onOpen(e);break;case"a":e=JSON.parse(t.data.slice(1)||"[]");for(var n=0;n<e.length;n++)this.onEvent(e[n]);break;case"m":e=JSON.parse(t.data.slice(1)||"null"),this.onEvent(e);break;case"h":this.hooks.onHeartbeat(this);break;case"c":e=JSON.parse(t.data.slice(1)||"[]"),this.onClose(e[0],e[1],!0)}},t.prototype.onOpen=function(t){var e,n,r;this.readyState===Oe.CONNECTING?(t&&t.hostname&&(this.location.base=(e=this.location.base,n=t.hostname,(r=/(https?:\/\/)([^\/:]+)((\/|:)?.*)/.exec(e))[1]+n+r[3])),this.readyState=Oe.OPEN,this.onopen&&this.onopen()):this.onClose(1006,"Server lost session",!0)},t.prototype.onEvent=function(t){this.readyState===Oe.OPEN&&this.onmessage&&this.onmessage({data:t})},t.prototype.onActivity=function(){this.onactivity&&this.onactivity()},t.prototype.onError=function(t){this.onerror&&this.onerror(t)},t.prototype.openStream=function(){var t=this;this.stream=Le.createSocketRequest("POST",Ce(this.hooks.getReceiveURL(this.location,this.session))),this.stream.bind("chunk",(function(e){t.onChunk(e)})),this.stream.bind("finished",(function(e){t.hooks.onFinished(t,e)})),this.stream.bind("buffer_too_long",(function(){t.reconnect()}));try{this.stream.start()}catch(e){B((function(){t.onError(e),t.onClose(1006,"Could not start streaming",!1)}))}},t.prototype.closeStream=function(){this.stream&&(this.stream.unbind_all(),this.stream.close(),this.stream=null)},t}(),xe={getReceiveURL:function(t,e){return t.base+"/"+e+"/xhr_streaming"+t.queryString},onHeartbeat:function(t){t.sendRaw("[]")},sendHeartbeat:function(t){t.sendRaw("[]")},onFinished:function(t,e){t.onClose(1006,"Connection interrupted ("+e+")",!1)}},Ae={getReceiveURL:function(t,e){return t.base+"/"+e+"/xhr"+t.queryString},onHeartbeat:function(){},sendHeartbeat:function(t){t.sendRaw("[]")},onFinished:function(t,e){200===e?t.reconnect():t.onClose(1006,"Connection interrupted ("+e+")",!1)}},Re={getRequest:function(t){var e=new(Le.getXHRAPI());return e.onreadystatechange=e.onprogress=function(){switch(e.readyState){case 3:e.responseText&&e.responseText.length>0&&t.onChunk(e.status,e.responseText);break;case 4:e.responseText&&e.responseText.length>0&&t.onChunk(e.status,e.responseText),t.emit("finished",e.status),t.close()}},e},abortRequest:function(t){t.onreadystatechange=null,t.abort()}},Le={nextAuthCallbackID:1,auth_callbacks:{},ScriptReceivers:i,DependenciesReceivers:C,getDefaultStrategy:function(t,e,n){var r={};function o(e,o,i,s,c){var a=n(t,e,o,i,s,c);return r[e]=a,a}var i,s=Object.assign({},e,{hostNonTLS:t.wsHost+":"+t.wsPort,hostTLS:t.wsHost+":"+t.wssPort,httpPath:t.wsPath}),c=Object.assign({},s,{useTLS:!0}),a=Object.assign({},e,{hostNonTLS:t.httpHost+":"+t.httpPort,hostTLS:t.httpHost+":"+t.httpsPort,httpPath:t.httpPath}),u={loop:!0,timeout:15e3,timeoutLimit:6e4},l=new ue({lives:2,minPingDelay:1e4,maxPingDelay:t.activityTimeout}),f=new ue({lives:2,minPingDelay:1e4,maxPingDelay:t.activityTimeout}),h=o("ws","ws",3,s,l),p=o("wss","ws",3,c,l),d=o("sockjs","sockjs",1,a),y=o("xhr_streaming","xhr_streaming",1,a,f),v=o("xdr_streaming","xdr_streaming",1,a,f),m=o("xhr_polling","xhr_polling",1,a),g=o("xdr_polling","xdr_polling",1,a),b=new le([h],u),w=new le([p],u),k=new le([d],u),_=new le([new me(be(y),y,v)],u),S=new le([new me(be(m),m,g)],u),O=new le([new me(be(_),new fe([_,new ve(S,{delay:4e3})]),S)],u),T=new me(be(O),O,k);return i=e.useTLS?new fe([b,new ve(T,{delay:2e3})]):new fe([b,new ve(w,{delay:2e3}),new ve(T,{delay:5e3})]),new pe(new ge(new me(be(h),i,T)),r,{ttl:18e5,timeline:e.timeline,useTLS:e.useTLS})},Transports:Et,transportConnectionInitializer:function(){var t=this;t.timeline.info(t.buildTimelineMessage({transport:t.name+(t.options.useTLS?"s":"")})),t.hooks.isInitialized()?t.changeState("initialized"):t.hooks.file?(t.changeState("initializing"),j.load(t.hooks.file,{useTLS:t.options.useTLS},(function(e,n){t.hooks.isInitialized()?(t.changeState("initialized"),n(!0)):(e&&t.onError(e),t.onClose(),n(!1))}))):t.onClose()},HTTPFactory:{createStreamingSocket:function(t){return this.createSocket(xe,t)},createPollingSocket:function(t){return this.createSocket(Ae,t)},createSocket:function(t,e){return new Ee(t,e)},createXHR:function(t,e){return this.createRequest(Re,t,e)},createRequest:function(t,e,n){return new Se(t,e,n)},createXDR:function(t,e){return this.createRequest(ke,t,e)}},TimelineTransport:ct,getXHRAPI:function(){return window.XMLHttpRequest},getWebSocketAPI:function(){return window.WebSocket||window.MozWebSocket},setup:function(t){var e=this;window.Pusher=t;var n=function(){e.onDocumentBody(t.ready)};window.JSON?n():j.load("json2",{},n)},getDocument:function(){return document},getProtocol:function(){return this.getDocument().location.protocol},getAuthorizers:function(){return{ajax:rt,jsonp:ot}},onDocumentBody:function(t){var e=this;document.body?t():setTimeout((function(){e.onDocumentBody(t)}),0)},createJSONPRequest:function(t,e){return new st(t,e)},createScriptRequest:function(t){return new it(t)},getLocalStorage:function(){try{return window.localStorage}catch(t){return}},createXHR:function(){return this.getXHRAPI()?this.createXMLHttpRequest():this.createMicrosoftXHR()},createXMLHttpRequest:function(){return new(this.getXHRAPI())},createMicrosoftXHR:function(){return new ActiveXObject("Microsoft.XMLHTTP")},getNetwork:function(){return At},createWebSocket:function(t){return new(this.getWebSocketAPI())(t)},createSocketRequest:function(t,e){if(this.isXHRSupported())return this.HTTPFactory.createXHR(t,e);if(this.isXDRSupported(0===e.indexOf("https:")))return this.HTTPFactory.createXDR(t,e);throw"Cross-origin HTTP requests are not supported"},isXHRSupported:function(){var t=this.getXHRAPI();return Boolean(t)&&void 0!==(new t).withCredentials},isXDRSupported:function(t){var e=t?"https:":"http:",n=this.getProtocol();return Boolean(window.XDomainRequest)&&n===e},addUnloadListener:function(t){void 0!==window.addEventListener?window.addEventListener("unload",t,!1):void 0!==window.attachEvent&&window.attachEvent("onunload",t)},removeUnloadListener:function(t){void 0!==window.addEventListener?window.removeEventListener("unload",t,!1):void 0!==window.detachEvent&&window.detachEvent("onunload",t)}};!function(t){t[t.ERROR=3]="ERROR",t[t.INFO=6]="INFO",t[t.DEBUG=7]="DEBUG"}(Pe||(Pe={}));var Ie=Pe,Ne=function(){function t(t,e,n){this.key=t,this.session=e,this.events=[],this.options=n||{},this.sent=0,this.uniqueID=0}return t.prototype.log=function(t,e){t<=this.options.level&&(this.events.push(H({},e,{timestamp:M()})),this.options.limit&&this.events.length>this.options.limit&&this.events.shift())},t.prototype.error=function(t){this.log(Ie.ERROR,t)},t.prototype.info=function(t){this.log(Ie.INFO,t)},t.prototype.debug=function(t){this.log(Ie.DEBUG,t)},t.prototype.isEmpty=function(){return 0===this.events.length},t.prototype.send=function(t,e){var n=this,r=H({session:this.session,bundle:this.sent+1,key:this.key,lib:"js",version:this.options.version,cluster:this.options.cluster,features:this.options.features,timeline:this.events},this.options.params);return this.events=[],t(r,(function(t,r){t||n.sent++,e&&e(t,r)})),!0},t.prototype.generateUniqueID=function(){return this.uniqueID++,this.uniqueID},t}(),De=function(){function t(t,e,n,r){this.name=t,this.priority=e,this.transport=n,this.options=r||{}}return t.prototype.isSupported=function(){return this.transport.isSupported({useTLS:this.options.useTLS})},t.prototype.connect=function(t,e){var n=this;if(!this.isSupported())return qe(new Jt,e);if(this.priority<t)return qe(new zt,e);var r=!1,o=this.transport.createConnection(this.name,this.priority,this.options.key,this.options),i=null,s=function(){o.unbind("initialized",s),o.connect()},c=function(){i=ae.createHandshake(o,(function(t){r=!0,l(),e(null,t)}))},a=function(t){l(),e(t)},u=function(){var t;l(),t=Y(o),e(new Xt(t))},l=function(){o.unbind("initialized",s),o.unbind("open",c),o.unbind("error",a),o.unbind("closed",u)};return o.bind("initialized",s),o.bind("open",c),o.bind("error",a),o.bind("closed",u),o.initialize(),{abort:function(){r||(l(),i?i.close():o.close())},forceMinPriority:function(t){r||n.priority<t&&(i?i.close():o.close())}}},t}();function qe(t,e){return B((function(){e(t)})),{abort:function(){},forceMinPriority:function(){}}}var Ue=Le.Transports,Me=function(t,e,n,r,o,i){var s,c=Ue[n];if(!c)throw new Wt(n);return t.enabledTransports&&-1===X(t.enabledTransports,e)||t.disabledTransports&&-1!==X(t.disabledTransports,e)?s=Be:(o=Object.assign({ignoreNullOrigin:t.ignoreNullOrigin},o),s=new De(e,r,i?i.getAssistant(c):c,o)),s},Be={isSupported:function(){return!1},connect:function(t,e){var n=B((function(){e(new Jt)}));return{abort:function(){n.ensureAborted()},forceMinPriority:function(){}}}};function Fe(t){return t.httpHost?t.httpHost:t.cluster?"sockjs-"+t.cluster+".pusher.com":f}function He(t){return t.wsHost?t.wsHost:t.cluster?ze(t.cluster):ze(k)}function ze(t){return"ws-"+t+".pusher.com"}function Xe(t){return"https:"===Le.getProtocol()||!1!==t.forceTLS}function Ve(t){return"enableStats"in t?t.enableStats:"disableStats"in t&&!t.disableStats}var We=function(){function t(e,n){var r,o,i=this;if(function(t){if(null==t)throw"You must pass your app key when you instantiate Pusher."}(e),!(n=n||{}).cluster&&!n.wsHost&&!n.httpHost){var c=nt("javascriptQuickStart");tt.warn("You should always specify a cluster when connecting. "+c)}"disableStats"in n&&tt.warn("The disableStats option is deprecated in favor of enableStats"),this.key=e,this.config=(o={activityTimeout:(r=n).activityTimeout||g,authEndpoint:r.authEndpoint||v,authTransport:r.authTransport||m,cluster:r.cluster||k,httpPath:r.httpPath||d,httpPort:r.httpPort||h,httpsPort:r.httpsPort||p,pongTimeout:r.pongTimeout||b,statsHost:r.statsHost||y,unavailableTimeout:r.unavailableTimeout||w,wsPath:r.wsPath||l,wsPort:r.wsPort||a,wssPort:r.wssPort||u,enableStats:Ve(r),httpHost:Fe(r),useTLS:Xe(r),wsHost:He(r)},"auth"in r&&(o.auth=r.auth),"authorizer"in r&&(o.authorizer=r.authorizer),"disabledTransports"in r&&(o.disabledTransports=r.disabledTransports),"enabledTransports"in r&&(o.enabledTransports=r.enabledTransports),"ignoreNullOrigin"in r&&(o.ignoreNullOrigin=r.ignoreNullOrigin),"timelineParams"in r&&(o.timelineParams=r.timelineParams),"nacl"in r&&(o.nacl=r.nacl),o),this.channels=ae.createChannels(),this.global_emitter=new yt,this.sessionID=Math.floor(1e9*Math.random()),this.timeline=new Ne(this.key,this.sessionID,{cluster:this.config.cluster,features:t.getClientFeatures(),params:this.config.timelineParams||{},limit:50,level:Ie.INFO,version:s}),this.config.enableStats&&(this.timelineSender=ae.createTimelineSender(this.timeline,{host:this.config.statsHost,path:"/timeline/v2/"+Le.TimelineTransport.name})),this.connection=ae.createConnectionManager(this.key,{getStrategy:function(t){return Le.getDefaultStrategy(i.config,t,Me)},timeline:this.timeline,activityTimeout:this.config.activityTimeout,pongTimeout:this.config.pongTimeout,unavailableTimeout:this.config.unavailableTimeout,useTLS:Boolean(this.config.useTLS)}),this.connection.bind("connected",(function(){i.subscribeAll(),i.timelineSender&&i.timelineSender.send(i.connection.isUsingTLS())})),this.connection.bind("message",(function(t){var e=0===t.event.indexOf("pusher_internal:");if(t.channel){var n=i.channel(t.channel);n&&n.handleEvent(t)}e||i.global_emitter.emit(t.event,t.data)})),this.connection.bind("connecting",(function(){i.channels.disconnect()})),this.connection.bind("disconnected",(function(){i.channels.disconnect()})),this.connection.bind("error",(function(t){tt.warn(t)})),t.instances.push(this),this.timeline.info({instances:t.instances.length}),t.isReady&&this.connect()}return t.ready=function(){t.isReady=!0;for(var e=0,n=t.instances.length;e<n;e++)t.instances[e].connect()},t.getClientFeatures=function(){return W(G({ws:Le.Transports.ws},(function(t){return t.isSupported({})})))},t.prototype.channel=function(t){return this.channels.find(t)},t.prototype.allChannels=function(){return this.channels.all()},t.prototype.connect=function(){if(this.connection.connect(),this.timelineSender&&!this.timelineSenderTimer){var t=this.connection.isUsingTLS(),e=this.timelineSender;this.timelineSenderTimer=new U(6e4,(function(){e.send(t)}))}},t.prototype.disconnect=function(){this.connection.disconnect(),this.timelineSenderTimer&&(this.timelineSenderTimer.ensureAborted(),this.timelineSenderTimer=null)},t.prototype.bind=function(t,e,n){return this.global_emitter.bind(t,e,n),this},t.prototype.unbind=function(t,e,n){return this.global_emitter.unbind(t,e,n),this},t.prototype.bind_global=function(t){return this.global_emitter.bind_global(t),this},t.prototype.unbind_global=function(t){return this.global_emitter.unbind_global(t),this},t.prototype.unbind_all=function(t){return this.global_emitter.unbind_all(),this},t.prototype.subscribeAll=function(){var t;for(t in this.channels.channels)this.channels.channels.hasOwnProperty(t)&&this.subscribe(t)},t.prototype.subscribe=function(t){var e=this.channels.add(t,this);return e.subscriptionPending&&e.subscriptionCancelled?e.reinstateSubscription():e.subscriptionPending||"connected"!==this.connection.state||e.subscribe(),e},t.prototype.unsubscribe=function(t){var e=this.channels.find(t);e&&e.subscriptionPending?e.cancelSubscription():(e=this.channels.remove(t))&&"connected"===this.connection.state&&e.unsubscribe()},t.prototype.send_event=function(t,e,n){return this.connection.send_event(t,e,n)},t.prototype.shouldUseTLS=function(){return this.config.useTLS},t.instances=[],t.isReady=!1,t.logToConsole=!1,t.Runtime=Le,t.ScriptReceivers=Le.ScriptReceivers,t.DependenciesReceivers=Le.DependenciesReceivers,t.auth_callbacks=Le.auth_callbacks,t}(),Je=e.default=We;Le.setup(We)}])},he.exports=pe(),le.exports);(fe=Ae)&&fe.__esModule&&Object.prototype.hasOwnProperty.call(fe,"default")&&fe.default;var Re=function(t){if(t){var e=localStorage.getItem("fl-mockup-cache-".concat(t));if(e)return JSON.parse(e)}return null},Le=function(t,e){t&&localStorage.setItem("fl-mockup-cache-".concat(t),JSON.stringify(e))},Ie={"/users/12121212":{get:function(t){return t.selectRow("users",12121212)}},"/libraries?filter[owner_id]=12121212&filter[owner_type]=user&filter[visibility]=public":{get:function(t){return[t.selectRow("libraries",24242424)]}},"/libraries/24242424":{get:function(t){return t.selectRow("libraries",24242424)}},"/libraries/24242424/library-items?sort=name":{get:function(t){return[t.selectRow("library_items",35353535)]}},"/library-items/35353535":{get:function(t){return t.selectRow("library_items",35353535)}}},Ne={users:{schema:{first_name:null,last_name:null,name:null,gravatar:{sm:"https://i.pravatar.cc/75",md:"https://i.pravatar.cc/200",lg:"https://i.pravatar.cc/300"}},rows:[{id:12121212,first_name:"Test",last_name:"User",name:"Test User"}]},libraries:{schema:{visibility:"public",name:null,description:null,owner_id:null,owner_type:"user",owner_name:null,created_by:null,created_at:"2020-09-14T02:18:55.000000Z",updated_at:"2020-09-14T02:18:55.000000Z",collections:[],permissions:{owner:!1,shared:!1,role:null,update:!1,delete:!1,edit_collections:!1,edit_items:!1,view_team:!1},media:{thumb:{id:1,uuid:"a6f7ffba-f977-47b8-9e7e-74cb7fede885",file_name:"screenshot.png",mime_type:"image/png",size:"875.64 KB",model_type:"library-item",model_id:690,upload_hash:"5cbc0832b7a6235f6938221a7bd5532e655a32b3",url:"https://www.fillmurray.com/640/360",sizes:{large:{width:1e3,height:1e3,url:"https://www.fillmurray.com/640/360"},small:{width:250,height:250,url:"https://www.fillmurray.com/640/360"},thumb:{width:300,height:300,url:"https://www.fillmurray.com/640/360"},medium:{width:500,height:500,url:"https://www.fillmurray.com/640/360"},original:{width:1e3,height:1e3,url:"https://www.fillmurray.com/640/360"}}}}},rows:[{id:24242424,name:"Fill Murray",description:"Some images of the man himself.",owner_id:99999999,owner_type:"user",owner_name:"Test User",created_by:99999999}]},library_items:{schema:{library_id:null,type:null,name:null,description:"",collections:[],data:[],created_at:"2020-10-26T17:34:46.000000Z",updated_at:"2020-10-26T17:34:46.000000Z",media:{file:{id:1,uuid:"a6f7ffba-f977-47b8-9e7e-74cb7fede885",file_name:"screenshot.png",mime_type:"image/png",size:"875.64 KB",model_type:"library-item",model_id:690,upload_hash:"5cbc0832b7a6235f6938221a7bd5532e655a32b3",url:"https://www.fillmurray.com/640/360",sizes:{large:{width:1e3,height:1e3,url:"https://www.fillmurray.com/640/360"},small:{width:250,height:250,url:"https://www.fillmurray.com/640/360"},thumb:{width:300,height:300,url:"https://www.fillmurray.com/640/360"},medium:{width:500,height:500,url:"https://www.fillmurray.com/640/360"},original:{width:1e3,height:1e3,url:"https://www.fillmurray.com/640/360"}}}}},rows:[{id:35353535,library_id:24242424,type:"image",name:"Sample Image"}]}},De=function(t){var e=function(){var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).cacheKey,e=Re(t),n=e?Z({},e):{tables:{},schema:{}},r=function(t){for(var e in t){var n=t[e],r=n.schema,i=n.rows;o(e,r,i)}},o=function(e,r){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];n[e]||(n.tables[e]=[],n.schema[e]=r,o.map((function(t){return i(e,t)})),Le(t,n))},i=function(e,r){n.tables[e].push(Z(Z({id:(new Date).getTime()+n.tables[e].length},n.schema[e]),r)),Le(t,n)},s=function(t,e){return n.tables[t].filter((function(t){return t.id===e})).pop()},c=function(e,r,o){var i=n.tables[e];n.tables[e]=i.map((function(t){return t.id===r?Z(Z({},t),o):t})),Le(t,n)},a=function(e,r){var o=n.tables[e];n.tables[e]=o.filter((function(t){return t.id!==r})),Le(t,n)};return{db:n,createTables:r,createTable:o,insertRow:i,selectRow:s,updateRow:c,deleteRow:a}}({cacheKey:"cloud"});e.createTables(Ne),function(t,e){t.interceptors.request.use((function(t){if(Ie[t.url]){var e=new Error;return e.methods=Ie[t.url],e.config=t,V.reject(e)}return t}),V.reject),t.interceptors.response.use((function(t){return t}),(function(t){if(t.methods){var n=t.methods[t.config.method];return n?V.resolve({data:n(e),status:200,statusText:"OK",headers:{},mockup:!0,config:t.config}):V.reject(t)}return V.reject(t)}))}(t,e)},qe={auth:jt,accounts:function(t){return Z(Z({},{publicInfo:function(e,n){return t.get("/accounts/info/".concat(e,"/").concat(n))},publicInfoByUsername:function(e){return t.get("/accounts/info-by-name/".concat(e))},usernameExists:function(e){return t.get("/accounts/exists/".concat(e))}}),{})},user:function(t){return Z(Z({},{get:function(){return t.get("/account/user")},update:function(e){return e.append?e.append("_method","PUT"):e._method="PUT",t.post("/account/user/update",e)},delete:function(){return t.post("/account/user/delete")},getInvites:function(){return t.get("/account/user/invite")},invite:function(e){return t.post("/account/user/invite",{email:e})},resendInvite:function(e){return t.post("/account/user/invite/".concat(e,"/resend"))},cancelInvite:function(e){return t.post("/account/user/invite/".concat(e,"/cancel"))},verifyInvite:function(e){return t.post("/account/user/invite/".concat(e,"/verify"))}}),{})},teams:function(t){var e=Z(Z({},Kt("/account/teams",t)),{},{update:function(e,n){return n.append?n.append("_method","PUT"):n._method="PUT",t.post("/account/teams/".concat(e),n)},getInvites:function(e){return t.get("/account/teams/".concat(e,"/invite"))},invite:function(e,n,r){return t.post("/account/teams/".concat(e,"/invite"),{email:n,role:r})},acceptInvite:function(e){return t.post("/account/teams/invite/".concat(e,"/accept"))},resendInvite:function(e){return t.post("/account/teams/invite/".concat(e,"/resend"))},cancelInvite:function(e){return t.post("/account/teams/invite/".concat(e,"/cancel"))},getMembers:function(e){return t.get("/account/teams/".concat(e,"/members"))},switchRole:function(e,n,r){return t.put("/account/teams/".concat(e,"/members/").concat(n,"/role"),{role:r})},transferToMember:function(e,n){return t.put("/account/teams/".concat(e,"/members/").concat(n,"/transfer"))},removeMember:function(e,n){return t.delete("/account/teams/".concat(e,"/members/").concat(n))},leaveTeam:function(e){return t.delete("/account/teams/".concat(e,"/members/leave"))}}),n={useAll:function(){return Yt({getter:e.getAll})},useOne:function(t){return Zt(t,{getter:e.get})},useInvites:function(t){return Yt({getter:Object(i.useCallback)((function(){return e.getInvites(t)}),[t])})}};return Z(Z({},e),n)},drip:function(t){return{subscribe:function(e){return t.post("/account/drip/subscribe",e)}}},libraries:function(t,e){var n={getAll:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"user",e=arguments.length>1?arguments[1]:void 0;return n.search((function(n){return t&&!e?"object"===W(t)?n.whereIn("owner_type",t):n.where("owner_type",t):e&&(n.where("owner_type","team"),n.where("owner_id",e)),n}))},get:function(e){return t.get("/libraries/".concat(e))},create:function(e){return t.post("/libraries",e)},update:function(e,n){return n.append?n.append("_method","PUT"):n._method="PUT",t.post("/libraries/".concat(e),n)},delete:function(e){return t.delete("/libraries/".concat(e))},duplicate:function(e){return t.post("/libraries/".concat(e,"/duplicate"))},search:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(t){return t},n=(new Qt).for("/libraries"),r=e(n).get().replace("//","/");return t.get(r)},subscribe:function(t,n,r){t?e.private("library.".concat(t)).listen(".library.".concat(n),r):e.private("libraries.".concat(wt().id)).listen(".library.".concat(n),r)},unsubscribe:function(t){e.leave("library.".concat(t)),e.leave("libraries.".concat(wt().id))},getCollections:function(e){return t.get("/libraries/".concat(e,"/library-collections"))},getCollection:function(e){return t.get("/library-collections/".concat(e))},createCollection:function(e,n){return t.post("/libraries/".concat(e,"/library-collections"),n)},updateCollection:function(e,n){return t.put("/library-collections/".concat(e),n)},deleteCollection:function(e){return t.delete("/library-collections/".concat(e))},getItems:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.get("/libraries/".concat(e,"/library-items"),{params:n})},getItem:function(e){return t.get("/library-items/".concat(e))},createItem:function(e,n){return t.post("/libraries/".concat(e,"/library-items"),n)},updateItem:function(e,n){return n.append?n.append("_method","PUT"):n._method="PUT",t.post("/library-items/".concat(e),n)},deleteItem:function(e){return t.delete("/library-items/".concat(e))},searchItems:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(t){return t},r="/libraries/".concat(e,"/library-items"),o=(new Qt).for(r),i=n(o).get().replace("//","/");return t.get(i)},moveItem:function(e,n){return t.put("/library-items/".concat(n,"/move"),{library_id:e})},getInvites:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"share";return t.get("/libraries/".concat(e,"/invite?type=").concat(n))},invite:function(e,n,r){return t.post("/libraries/".concat(e,"/invite"),{email:n,role:r})},requestTransfer:function(e,n){return t.put("/libraries/".concat(e,"/invite/transfer"),{username:n})},acceptInvite:function(e){return t.post("/libraries/invite/".concat(e,"/accept"))},resendInvite:function(e){return t.post("/libraries/invite/".concat(e,"/resend"))},cancelInvite:function(e){return t.post("/libraries/invite/".concat(e,"/cancel"))},join:function(e){return t.put("/libraries/".concat(e,"/members/join"))},getMembers:function(e){return t.get("/libraries/".concat(e,"/members"))},switchRole:function(e,n,r){return t.put("/libraries/".concat(e,"/members/").concat(n,"/role"),{role:r})},transferToMember:function(e,n){return t.put("/libraries/".concat(e,"/members/").concat(n,"/transfer"))},removeMember:function(e,n){return t.delete("/libraries/".concat(e,"/members/").concat(n))},leaveLibrary:function(e){return t.delete("/libraries/".concat(e,"/members/leave"))}},r={useAll:function(t,e){return Yt({model:"library",getter:Object(i.useCallback)((function(){return n.getAll(t,e)}),[t,e])})},useOne:function(t){return Zt(t,{model:"library",getter:n.get})},useCollections:function(t){return Yt({getter:Object(i.useCallback)((function(){return n.getCollections(t)}),[t])})},useCollection:function(t){return Zt(t,{getter:n.getCollection})},useItems:function(t){return Yt({getter:Object(i.useCallback)((function(){return n.getItems(t)}),[t])})},useItem:function(t){return Zt(t,{getter:n.getItem})}};return Z(Z({},n),r)},billing:function(t){var e={getSubscriptionData:function(){return t.get("/billing/subscription/subscription-data")},subscribe:function(e){return t.post("/billing/subscription/subscribe",e)},cancelSubscription:function(){return t.post("/billing/subscription/cancel-subscription")},currentUserHasPlan:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=FL.Assistant.data.getSystemState(),r=n.user,o=n.cloudUser;return r?e.userHasPlan(r,t):!!o&&e.userHasPlan(o,t)},userHasPlan:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=t.subscription_plan;return void 0!==n&&void 0!==n.slug&&(!e||e===n.slug)},teamHasPlan:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=t.subscription_plan;return void 0!==n&&void 0!==n.slug&&(!e||e===n.slug)}};return e}},Ue={users:function(t){return Kt("/admin/users",t)}},Me=function(t){var e=t.apiUrl,n=void 0===e?"":e,r=t.pusherKey,i=void 0===r?"":r,s=t.pusherCluster,c=void 0===s?"":s,a=function(t){var e=t.apiUrl,n=void 0===e?"":e,r=o.a.create({baseURL:"".concat(n,"/api"),crossDomain:!0,headers:{common:{Accept:"application/json","Content-Type":"application/json","X-Requested-With":"XMLHttpRequest","Access-Control-Allow-Origin":"*"}}});r.interceptors.request.use((function(t){return dt()&&(t.headers.Authorization="Bearer "+yt()),t.data instanceof FormData&&(t.headers.common["Content-Type"]="multipart/form-data"),t}),V.reject);var i=[],s=!1;return r.interceptors.response.use((function(t){return t}),(function(t){var e=t.config,n=t.response;return!n||401!==n.status||e.url.includes("/iam/")?V.reject(t):(s||(s=!0,jt(r).refresh().then((function(){i.map((function(t){t.config.headers.Authorization="Bearer "+yt(),t.resolve(r(t.config))}))})).finally((function(){i=[],s=!1}))),new V((function(t,n){i.push({config:e,resolve:t,reject:n})})))})),r}({apiUrl:n}),u=function(t){var e=t.apiUrl,n=t.pusherKey,r=t.pusherCluster;return new xe({broadcaster:"pusher",key:void 0===n?"":n,cluster:void 0===r?"":r,forceTLS:!1,authEndpoint:"".concat(void 0===e?"":e,"/broadcasting/auth"),auth:{headers:{Authorization:"Bearer ".concat(yt())}}})}({apiUrl:n,pusherKey:i,pusherCluster:c}),l={http:a,sockets:u,session:Ct,admin:{}};for(var f in De(a),qe)l[f]=qe[f](a,u);for(var h in Ue)l.admin[h]=Ue[h](a,u);return l}}.call(this,n(27))},,,,,,,,,,,,,,,,function(t,e,n){"use strict";n.r(e);var r=n(97);window.FL=window.FL||{},FL.vendors=FL.vendors||{},FL.vendors.BBCloud=r}]);
1 +(()=>{var t={1928:t=>{"use strict";function e(t){this.message=t}e.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},e.prototype.__CANCEL__=!0,t.exports=e},2012:(t,e,r)=>{"use strict";var n=r(9516),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];t.exports=function(t){var e,r,i,a={};return t?(n.forEach(t.split("\n"),(function(t){if(i=t.indexOf(":"),e=n.trim(t.substr(0,i)).toLowerCase(),r=n.trim(t.substr(i+1)),e){if(a[e]&&o.indexOf(e)>=0)return;a[e]="set-cookie"===e?(a[e]?a[e]:[]).concat([r]):a[e]?a[e]+", "+r:r}})),a):a}},2505:(t,e,r)=>{t.exports=r(8015)},2881:(t,e,r)=>{"use strict";var n=r(9516),o=r(6987);t.exports=function(t,e,r){var i=this||o;return n.forEach(r,(function(r){t=r.call(i,t,e)})),t}},3191:(t,e,r)=>{"use strict";var n=r(1928);function o(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise((function(t){e=t}));var r=this;this.promise.then((function(t){if(r._listeners){var e,n=r._listeners.length;for(e=0;e<n;e++)r._listeners[e](t);r._listeners=null}})),this.promise.then=function(t){var e,n=new Promise((function(t){r.subscribe(t),e=t})).then(t);return n.cancel=function(){r.unsubscribe(e)},n},t((function(t){r.reason||(r.reason=new n(t),e(r.reason))}))}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.prototype.subscribe=function(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]},o.prototype.unsubscribe=function(t){if(this._listeners){var e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}},o.source=function(){var t;return{token:new o((function(e){t=e})),cancel:t}},t.exports=o},3471:(t,e,r)=>{"use strict";var n=r(9516);function o(){this.handlers=[]}o.prototype.use=function(t,e,r){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1},o.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},o.prototype.forEach=function(t){n.forEach(this.handlers,(function(e){null!==e&&t(e)}))},t.exports=o},3864:t=>{"use strict";t.exports=function(t){return!(!t||!t.__CANCEL__)}},3948:(t,e,r)=>{"use strict";var n=r(9516);t.exports=n.isStandardBrowserEnv()?{write:function(t,e,r,o,i,a){var u=[];u.push(t+"="+encodeURIComponent(e)),n.isNumber(r)&&u.push("expires="+new Date(r).toGMTString()),n.isString(o)&&u.push("path="+o),n.isString(i)&&u.push("domain="+i),!0===a&&u.push("secure"),document.cookie=u.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},4202:(t,e,r)=>{"use strict";var n=r(9516);t.exports=n.isStandardBrowserEnv()?function(){var t,e=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function o(t){var n=t;return e&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return t=o(window.location.href),function(e){var r=n.isString(e)?o(e):e;return r.protocol===t.protocol&&r.host===t.host}}():function(){return!0}},4490:(t,e,r)=>{"use strict";var n=r(9516),o=r(2881),i=r(3864),a=r(6987),u=r(1928);function c(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new u("canceled")}t.exports=function(t){return c(t),t.headers=t.headers||{},t.data=o.call(t,t.data,t.headers,t.transformRequest),t.headers=n.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),n.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete t.headers[e]})),(t.adapter||a.adapter)(t).then((function(e){return c(t),e.data=o.call(t,e.data,e.headers,t.transformResponse),e}),(function(e){return i(e)||(c(t),e&&e.response&&(e.response.data=o.call(t,e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)}))}},4680:t=>{"use strict";t.exports=function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}},4841:(t,e,r)=>{"use strict";var n=r(9641).version,o={};["object","boolean","number","function","string","symbol"].forEach((function(t,e){o[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}}));var i={};o.transitional=function(t,e,r){function o(t,e){return"[Axios v"+n+"] Transitional option '"+t+"'"+e+(r?". "+r:"")}return function(r,n,a){if(!1===t)throw new Error(o(n," has been removed"+(e?" in "+e:"")));return e&&!i[n]&&(i[n]=!0,console.warn(o(n," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(r,n,a)}},t.exports={assertOptions:function(t,e,r){if("object"!=typeof t)throw new TypeError("options must be an object");for(var n=Object.keys(t),o=n.length;o-- >0;){var i=n[o],a=e[i];if(a){var u=t[i],c=void 0===u||a(u,i,t);if(!0!==c)throw new TypeError("option "+i+" must be "+c)}else if(!0!==r)throw Error("Unknown option "+i)}},validators:o}},5019:t=>{"use strict";t.exports=function(t){return"object"==typeof t&&!0===t.isAxiosError}},5155:(t,e,r)=>{"use strict";var n=r(9516),o=r(9106),i=r(3471),a=r(4490),u=r(5343),c=r(4841),s=c.validators;function f(t){this.defaults=t,this.interceptors={request:new i,response:new i}}f.prototype.request=function(t){"string"==typeof t?(t=arguments[1]||{}).url=arguments[0]:t=t||{},(t=u(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var e=t.transitional;void 0!==e&&c.assertOptions(e,{silentJSONParsing:s.transitional(s.boolean),forcedJSONParsing:s.transitional(s.boolean),clarifyTimeoutError:s.transitional(s.boolean)},!1);var r=[],n=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(n=n&&e.synchronous,r.unshift(e.fulfilled,e.rejected))}));var o,i=[];if(this.interceptors.response.forEach((function(t){i.push(t.fulfilled,t.rejected)})),!n){var f=[a,void 0];for(Array.prototype.unshift.apply(f,r),f=f.concat(i),o=Promise.resolve(t);f.length;)o=o.then(f.shift(),f.shift());return o}for(var l=t;r.length;){var p=r.shift(),y=r.shift();try{l=p(l)}catch(t){y(t);break}}try{o=a(l)}catch(t){return Promise.reject(t)}for(;i.length;)o=o.then(i.shift(),i.shift());return o},f.prototype.getUri=function(t){return t=u(this.defaults,t),o(t.url,t.params,t.paramsSerializer).replace(/^\?/,"")},n.forEach(["delete","get","head","options"],(function(t){f.prototype[t]=function(e,r){return this.request(u(r||{},{method:t,url:e,data:(r||{}).data}))}})),n.forEach(["post","put","patch"],(function(t){f.prototype[t]=function(e,r,n){return this.request(u(n||{},{method:t,url:e,data:r}))}})),t.exports=f},5343:(t,e,r)=>{"use strict";var n=r(9516);t.exports=function(t,e){e=e||{};var r={};function o(t,e){return n.isPlainObject(t)&&n.isPlainObject(e)?n.merge(t,e):n.isPlainObject(e)?n.merge({},e):n.isArray(e)?e.slice():e}function i(r){return n.isUndefined(e[r])?n.isUndefined(t[r])?void 0:o(void 0,t[r]):o(t[r],e[r])}function a(t){if(!n.isUndefined(e[t]))return o(void 0,e[t])}function u(r){return n.isUndefined(e[r])?n.isUndefined(t[r])?void 0:o(void 0,t[r]):o(void 0,e[r])}function c(r){return r in e?o(t[r],e[r]):r in t?o(void 0,t[r]):void 0}var s={url:a,method:a,data:a,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,responseEncoding:u,validateStatus:c};return n.forEach(Object.keys(t).concat(Object.keys(e)),(function(t){var e=s[t]||i,o=e(t);n.isUndefined(o)&&e!==c||(r[t]=o)})),r}},5449:t=>{"use strict";t.exports=function(t,e,r,n,o){return t.config=e,r&&(t.code=r),t.request=n,t.response=o,t.isAxiosError=!0,t.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}},t}},5592:(t,e,r)=>{"use strict";var n=r(9516),o=r(7522),i=r(3948),a=r(9106),u=r(9615),c=r(2012),s=r(4202),f=r(7763),l=r(6987),p=r(1928);t.exports=function(t){return new Promise((function(e,r){var y,h=t.data,d=t.headers,m=t.responseType;function g(){t.cancelToken&&t.cancelToken.unsubscribe(y),t.signal&&t.signal.removeEventListener("abort",y)}n.isFormData(h)&&delete d["Content-Type"];var v=new XMLHttpRequest;if(t.auth){var b=t.auth.username||"",w=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";d.Authorization="Basic "+btoa(b+":"+w)}var S=u(t.baseURL,t.url);function j(){if(v){var n="getAllResponseHeaders"in v?c(v.getAllResponseHeaders()):null,i={data:m&&"text"!==m&&"json"!==m?v.response:v.responseText,status:v.status,statusText:v.statusText,headers:n,config:t,request:v};o((function(t){e(t),g()}),(function(t){r(t),g()}),i),v=null}}if(v.open(t.method.toUpperCase(),a(S,t.params,t.paramsSerializer),!0),v.timeout=t.timeout,"onloadend"in v?v.onloadend=j:v.onreadystatechange=function(){v&&4===v.readyState&&(0!==v.status||v.responseURL&&0===v.responseURL.indexOf("file:"))&&setTimeout(j)},v.onabort=function(){v&&(r(f("Request aborted",t,"ECONNABORTED",v)),v=null)},v.onerror=function(){r(f("Network Error",t,null,v)),v=null},v.ontimeout=function(){var e="timeout of "+t.timeout+"ms exceeded",n=t.transitional||l.transitional;t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),r(f(e,t,n.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",v)),v=null},n.isStandardBrowserEnv()){var O=(t.withCredentials||s(S))&&t.xsrfCookieName?i.read(t.xsrfCookieName):void 0;O&&(d[t.xsrfHeaderName]=O)}"setRequestHeader"in v&&n.forEach(d,(function(t,e){void 0===h&&"content-type"===e.toLowerCase()?delete d[e]:v.setRequestHeader(e,t)})),n.isUndefined(t.withCredentials)||(v.withCredentials=!!t.withCredentials),m&&"json"!==m&&(v.responseType=t.responseType),"function"==typeof t.onDownloadProgress&&v.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&v.upload&&v.upload.addEventListener("progress",t.onUploadProgress),(t.cancelToken||t.signal)&&(y=function(t){v&&(r(!t||t&&t.type?new p("canceled"):t),v.abort(),v=null)},t.cancelToken&&t.cancelToken.subscribe(y),t.signal&&(t.signal.aborted?y():t.signal.addEventListener("abort",y))),h||(h=null),v.send(h)}))}},6987:(t,e,r)=>{"use strict";var n=r(9516),o=r(7018),i=r(5449),a={"Content-Type":"application/x-www-form-urlencoded"};function u(t,e){!n.isUndefined(t)&&n.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var c,s={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(c=r(5592)),c),transformRequest:[function(t,e){return o(e,"Accept"),o(e,"Content-Type"),n.isFormData(t)||n.isArrayBuffer(t)||n.isBuffer(t)||n.isStream(t)||n.isFile(t)||n.isBlob(t)?t:n.isArrayBufferView(t)?t.buffer:n.isURLSearchParams(t)?(u(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):n.isObject(t)||e&&"application/json"===e["Content-Type"]?(u(e,"application/json"),function(t,e,r){if(n.isString(t))try{return(e||JSON.parse)(t),n.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(r||JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){var e=this.transitional||s.transitional,r=e&&e.silentJSONParsing,o=e&&e.forcedJSONParsing,a=!r&&"json"===this.responseType;if(a||o&&n.isString(t)&&t.length)try{return JSON.parse(t)}catch(t){if(a){if("SyntaxError"===t.name)throw i(t,this,"E_JSON_PARSE");throw t}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};n.forEach(["delete","get","head"],(function(t){s.headers[t]={}})),n.forEach(["post","put","patch"],(function(t){s.headers[t]=n.merge(a)})),t.exports=s},7018:(t,e,r)=>{"use strict";var n=r(9516);t.exports=function(t,e){n.forEach(t,(function(r,n){n!==e&&n.toUpperCase()===e.toUpperCase()&&(t[e]=r,delete t[n])}))}},7522:(t,e,r)=>{"use strict";var n=r(7763);t.exports=function(t,e,r){var o=r.config.validateStatus;r.status&&o&&!o(r.status)?e(n("Request failed with status code "+r.status,r.config,null,r.request,r)):t(r)}},7763:(t,e,r)=>{"use strict";var n=r(5449);t.exports=function(t,e,r,o,i){var a=new Error(t);return n(a,e,r,o,i)}},7980:t=>{"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}},8015:(t,e,r)=>{"use strict";var n=r(9516),o=r(9012),i=r(5155),a=r(5343);var u=function t(e){var r=new i(e),u=o(i.prototype.request,r);return n.extend(u,i.prototype,r),n.extend(u,r),u.create=function(r){return t(a(e,r))},u}(r(6987));u.Axios=i,u.Cancel=r(1928),u.CancelToken=r(3191),u.isCancel=r(3864),u.VERSION=r(9641).version,u.all=function(t){return Promise.all(t)},u.spread=r(7980),u.isAxiosError=r(5019),t.exports=u,t.exports.default=u},9012:t=>{"use strict";t.exports=function(t,e){return function(){for(var r=new Array(arguments.length),n=0;n<r.length;n++)r[n]=arguments[n];return t.apply(e,r)}}},9106:(t,e,r)=>{"use strict";var n=r(9516);function o(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}t.exports=function(t,e,r){if(!e)return t;var i;if(r)i=r(e);else if(n.isURLSearchParams(e))i=e.toString();else{var a=[];n.forEach(e,(function(t,e){null!=t&&(n.isArray(t)?e+="[]":t=[t],n.forEach(t,(function(t){n.isDate(t)?t=t.toISOString():n.isObject(t)&&(t=JSON.stringify(t)),a.push(o(e)+"="+o(t))})))})),i=a.join("&")}if(i){var u=t.indexOf("#");-1!==u&&(t=t.slice(0,u)),t+=(-1===t.indexOf("?")?"?":"&")+i}return t}},9137:t=>{"use strict";t.exports=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}},9516:(t,e,r)=>{"use strict";var n=r(9012),o=Object.prototype.toString;function i(t){return"[object Array]"===o.call(t)}function a(t){return void 0===t}function u(t){return null!==t&&"object"==typeof t}function c(t){if("[object Object]"!==o.call(t))return!1;var e=Object.getPrototypeOf(t);return null===e||e===Object.prototype}function s(t){return"[object Function]"===o.call(t)}function f(t,e){if(null!=t)if("object"!=typeof t&&(t=[t]),i(t))for(var r=0,n=t.length;r<n;r++)e.call(null,t[r],r,t);else for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.call(null,t[o],o,t)}t.exports={isArray:i,isArrayBuffer:function(t){return"[object ArrayBuffer]"===o.call(t)},isBuffer:function(t){return null!==t&&!a(t)&&null!==t.constructor&&!a(t.constructor)&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)},isFormData:function(t){return"undefined"!=typeof FormData&&t instanceof FormData},isArrayBufferView:function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&t.buffer instanceof ArrayBuffer},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isObject:u,isPlainObject:c,isUndefined:a,isDate:function(t){return"[object Date]"===o.call(t)},isFile:function(t){return"[object File]"===o.call(t)},isBlob:function(t){return"[object Blob]"===o.call(t)},isFunction:s,isStream:function(t){return u(t)&&s(t.pipe)},isURLSearchParams:function(t){return"undefined"!=typeof URLSearchParams&&t instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:f,merge:function t(){var e={};function r(r,n){c(e[n])&&c(r)?e[n]=t(e[n],r):c(r)?e[n]=t({},r):i(r)?e[n]=r.slice():e[n]=r}for(var n=0,o=arguments.length;n<o;n++)f(arguments[n],r);return e},extend:function(t,e,r){return f(e,(function(e,o){t[o]=r&&"function"==typeof e?n(e,r):e})),t},trim:function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")},stripBOM:function(t){return 65279===t.charCodeAt(0)&&(t=t.slice(1)),t}}},9615:(t,e,r)=>{"use strict";var n=r(9137),o=r(4680);t.exports=function(t,e){return t&&!n(e)?o(t,e):e}},9641:t=>{t.exports={version:"0.22.0"}}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n](i,i.exports,r),i.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{"use strict";var t={};r.r(t),r.d(t,{appendFormDataObject:()=>un,createCloudClient:()=>An,useApiRequest:()=>nn});var e=r(2505),n=r.n(e);const o=React;var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==r.g?r.g:"undefined"!=typeof self?self:{};var a=u;function u(t){s.length||c(),s[s.length]=t}var c,s=[],f=0;function l(){for(;f<s.length;){var t=f;if(f+=1,s[t].call(),f>1024){for(var e=0,r=s.length-f;e<r;e++)s[e]=s[e+f];s.length-=f,f=0}}s.length=0,f=0}var p,y,h,d=void 0!==i?i:self,m=d.MutationObserver||d.WebKitMutationObserver;function g(t){return function(){var e=setTimeout(n,0),r=setInterval(n,50);function n(){clearTimeout(e),clearInterval(r),t()}}}"function"==typeof m?(p=1,y=new m(l),h=document.createTextNode(""),y.observe(h,{characterData:!0}),c=function(){p=-p,h.data=p}):c=g(l),u.requestFlush=c,u.makeRequestCallFromTimer=g;var v=a;function b(){}var w=null,S={},j=O;function O(t){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("Promise constructor's argument is not a function");this._U=0,this._V=0,this._W=null,this._X=null,t!==b&&k(t,this)}function A(t,e){for(;3===t._V;)t=t._W;if(O._Y&&O._Y(t),0===t._V)return 0===t._U?(t._U=1,void(t._X=e)):1===t._U?(t._U=2,void(t._X=[t._X,e])):void t._X.push(e);!function(t,e){v((function(){var r=1===t._V?e.onFulfilled:e.onRejected;if(null!==r){var n=function(t,e){try{return t(e)}catch(t){return w=t,S}}(r,t._W);n===S?x(e.promise,w):P(e.promise,n)}else 1===t._V?P(e.promise,t._W):x(e.promise,t._W)}))}(t,e)}function P(t,e){if(e===t)return x(t,new TypeError("A promise cannot be resolved with itself."));if(e&&("object"==typeof e||"function"==typeof e)){var r=function(t){try{return t.then}catch(t){return w=t,S}}(e);if(r===S)return x(t,w);if(r===t.then&&e instanceof O)return t._V=3,t._W=e,void E(t);if("function"==typeof r)return void k(r.bind(e),t)}t._V=1,t._W=e,E(t)}function x(t,e){t._V=2,t._W=e,O._Z&&O._Z(t,e),E(t)}function E(t){if(1===t._U&&(A(t,t._X),t._X=null),2===t._U){for(var e=0;e<t._X.length;e++)A(t,t._X[e]);t._X=null}}function _(t,e,r){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.promise=r}function k(t,e){var r=!1,n=function(t,e,r){try{t(e,r)}catch(t){return w=t,S}}(t,(function(t){r||(r=!0,P(e,t))}),(function(t){r||(r=!0,x(e,t))}));r||n!==S||(r=!0,x(e,w))}O._Y=null,O._Z=null,O._0=b,O.prototype.then=function(t,e){if(this.constructor!==O)return function(t,e,r){return new t.constructor((function(n,o){var i=new O(b);i.then(n,o),A(t,new _(e,r,i))}))}(this,t,e);var r=new O(b);return A(this,new _(t,e,r)),r},j.prototype.done=function(t,e){(arguments.length?this.then.apply(this,arguments):this).then(null,(function(t){setTimeout((function(){throw t}),0)}))};var T=j;T.prototype.finally=function(t){return this.then((function(e){return T.resolve(t()).then((function(){return e}))}),(function(e){return T.resolve(t()).then((function(){throw e}))}))};var I=j,C=D(!0),R=D(!1),U=D(null),F=D(void 0),N=D(0),L=D("");function D(t){var e=new I(I._0);return e._V=1,e._W=t,e}I.resolve=function(t){if(t instanceof I)return t;if(null===t)return U;if(void 0===t)return F;if(!0===t)return C;if(!1===t)return R;if(0===t)return N;if(""===t)return L;if("object"==typeof t||"function"==typeof t)try{var e=t.then;if("function"==typeof e)return new I(e.bind(t))}catch(t){return new I((function(e,r){r(t)}))}return D(t)};var B=function(t){return"function"==typeof Array.from?(B=Array.from,Array.from(t)):(B=function(t){return Array.prototype.slice.call(t)},Array.prototype.slice.call(t))};I.all=function(t){var e=B(t);return new I((function(t,r){if(0===e.length)return t([]);var n=e.length;function o(i,a){if(a&&("object"==typeof a||"function"==typeof a)){if(a instanceof I&&a.then===I.prototype.then){for(;3===a._V;)a=a._W;return 1===a._V?o(i,a._W):(2===a._V&&r(a._W),void a.then((function(t){o(i,t)}),r))}var u=a.then;if("function"==typeof u)return void new I(u.bind(a)).then((function(t){o(i,t)}),r)}e[i]=a,0==--n&&t(e)}for(var i=0;i<e.length;i++)o(i,e[i])}))},I.reject=function(t){return new I((function(e,r){r(t)}))},I.race=function(t){return new I((function(e,r){B(t).forEach((function(t){I.resolve(t).then(e,r)}))}))},I.prototype.catch=function(t){return this.then(null,t)};var q=a,M=[],W=[],V=q.makeRequestCallFromTimer((function(){if(W.length)throw W.shift()})),G=H;function H(t){var e;(e=M.length?M.pop():new z).task=t,q(e)}function z(){this.task=null}z.prototype.call=function(){try{this.task.call()}catch(t){H.onerror?H.onerror(t):(W.push(t),V())}finally{this.task=null,M[M.length]=this}};var J=j,X=G;J.denodeify=function(t,e){return"number"==typeof e&&e!==1/0?function(t,e){for(var r=[],n=0;n<e;n++)r.push("a"+n);var o=["return function ("+r.join(",")+") {","var self = this;","return new Promise(function (rs, rj) {","var res = fn.call(",["self"].concat(r).concat([$]).join(","),");","if (res &&",'(typeof res === "object" || typeof res === "function") &&','typeof res.then === "function"',") {rs(res);}","});","};"].join("");return Function(["Promise","fn"],o)(J,t)}(t,e):function(t){for(var e=Math.max(t.length-1,3),r=[],n=0;n<e;n++)r.push("a"+n);var o=["return function ("+r.join(",")+") {","var self = this;","var args;","var argLength = arguments.length;","if (arguments.length > "+e+") {","args = new Array(arguments.length + 1);","for (var i = 0; i < arguments.length; i++) {","args[i] = arguments[i];","}","}","return new Promise(function (rs, rj) {","var cb = "+$+";","var res;","switch (argLength) {",r.concat(["extra"]).map((function(t,e){return"case "+e+":res = fn.call("+["self"].concat(r.slice(0,e)).concat("cb").join(",")+");break;"})).join(""),"default:","args[argLength] = cb;","res = fn.apply(self, args);","}","if (res &&",'(typeof res === "object" || typeof res === "function") &&','typeof res.then === "function"',") {rs(res);}","});","};"].join("");return Function(["Promise","fn"],o)(J,t)}(t)};var $="function (err, res) {if (err) { rj(err); } else { rs(res); }}";J.nodeify=function(t){return function(){var e=Array.prototype.slice.call(arguments),r="function"==typeof e[e.length-1]?e.pop():null,n=this;try{return t.apply(this,arguments).nodeify(r,n)}catch(t){if(null==r)return new J((function(e,r){r(t)}));X((function(){r.call(n,t)}))}}},J.prototype.nodeify=function(t,e){if("function"!=typeof t)return this;this.then((function(r){X((function(){t.call(e,null,r)}))}),(function(r){X((function(){t.call(e,r)}))}))};var Q=j;Q.enableSynchronous=function(){Q.prototype.isPending=function(){return 0==this.getState()},Q.prototype.isFulfilled=function(){return 1==this.getState()},Q.prototype.isRejected=function(){return 2==this.getState()},Q.prototype.getValue=function(){if(3===this._V)return this._W.getValue();if(!this.isFulfilled())throw new Error("Cannot get a value of an unfulfilled promise.");return this._W},Q.prototype.getReason=function(){if(3===this._V)return this._W.getReason();if(!this.isRejected())throw new Error("Cannot get a rejection reason of a non-rejected promise.");return this._W},Q.prototype.getState=function(){return 3===this._V?this._W.getState():-1===this._V||-2===this._V?0:this._V}},Q.disableSynchronous=function(){Q.prototype.isPending=void 0,Q.prototype.isFulfilled=void 0,Q.prototype.isRejected=void 0,Q.prototype.getValue=void 0,Q.prototype.getReason=void 0,Q.prototype.getState=void 0};var Y=j;function Z(t){return Z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Z(t)}var K=function(t,e){if("string"!=typeof t)throw new TypeError("argument str must be a string");for(var r={},n=e||{},o=t.split(nt),i=n.decode||et,a=0;a<o.length;a++){var u=o[a],c=u.indexOf("=");if(!(c<0)){var s=u.substr(0,c).trim(),f=u.substr(++c,u.length).trim();'"'==f[0]&&(f=f.slice(1,-1)),null==r[s]&&(r[s]=it(f,i))}}return r},tt=function(t,e,r){var n=r||{},o=n.encode||rt;if("function"!=typeof o)throw new TypeError("option encode is invalid");if(!ot.test(t))throw new TypeError("argument name is invalid");var i=o(e);if(i&&!ot.test(i))throw new TypeError("argument val is invalid");var a=t+"="+i;if(null!=n.maxAge){var u=n.maxAge-0;if(isNaN(u)||!isFinite(u))throw new TypeError("option maxAge is invalid");a+="; Max-Age="+Math.floor(u)}if(n.domain){if(!ot.test(n.domain))throw new TypeError("option domain is invalid");a+="; Domain="+n.domain}if(n.path){if(!ot.test(n.path))throw new TypeError("option path is invalid");a+="; Path="+n.path}if(n.expires){if("function"!=typeof n.expires.toUTCString)throw new TypeError("option expires is invalid");a+="; Expires="+n.expires.toUTCString()}if(n.httpOnly&&(a+="; HttpOnly"),n.secure&&(a+="; Secure"),n.sameSite)switch("string"==typeof n.sameSite?n.sameSite.toLowerCase():n.sameSite){case!0:a+="; SameSite=Strict";break;case"lax":a+="; SameSite=Lax";break;case"strict":a+="; SameSite=Strict";break;case"none":a+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return a},et=decodeURIComponent,rt=encodeURIComponent,nt=/; */,ot=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function it(t,e){try{return e(t)}catch(e){return t}}var at,ut,ct={exports:{}},st={exports:{}};at="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ut={rotl:function(t,e){return t<<e|t>>>32-e},rotr:function(t,e){return t<<32-e|t>>>e},endian:function(t){if(t.constructor==Number)return 16711935&ut.rotl(t,8)|4278255360&ut.rotl(t,24);for(var e=0;e<t.length;e++)t[e]=ut.endian(t[e]);return t},randomBytes:function(t){for(var e=[];t>0;t--)e.push(Math.floor(256*Math.random()));return e},bytesToWords:function(t){for(var e=[],r=0,n=0;r<t.length;r++,n+=8)e[n>>>5]|=t[r]<<24-n%32;return e},wordsToBytes:function(t){for(var e=[],r=0;r<32*t.length;r+=8)e.push(t[r>>>5]>>>24-r%32&255);return e},bytesToHex:function(t){for(var e=[],r=0;r<t.length;r++)e.push((t[r]>>>4).toString(16)),e.push((15&t[r]).toString(16));return e.join("")},hexToBytes:function(t){for(var e=[],r=0;r<t.length;r+=2)e.push(parseInt(t.substr(r,2),16));return e},bytesToBase64:function(t){for(var e=[],r=0;r<t.length;r+=3)for(var n=t[r]<<16|t[r+1]<<8|t[r+2],o=0;o<4;o++)8*r+6*o<=8*t.length?e.push(at.charAt(n>>>6*(3-o)&63)):e.push("=");return e.join("")},base64ToBytes:function(t){t=t.replace(/[^A-Z0-9+\/]/gi,"");for(var e=[],r=0,n=0;r<t.length;n=++r%4)0!=n&&e.push((at.indexOf(t.charAt(r-1))&Math.pow(2,-2*n+8)-1)<<2*n|at.indexOf(t.charAt(r))>>>6-2*n);return e}},st.exports=ut;var ft={utf8:{stringToBytes:function(t){return ft.bin.stringToBytes(unescape(encodeURIComponent(t)))},bytesToString:function(t){return decodeURIComponent(escape(ft.bin.bytesToString(t)))}},bin:{stringToBytes:function(t){for(var e=[],r=0;r<t.length;r++)e.push(255&t.charCodeAt(r));return e},bytesToString:function(t){for(var e=[],r=0;r<t.length;r++)e.push(String.fromCharCode(t[r]));return e.join("")}}},lt=ft,pt=function(t){return null!=t&&(yt(t)||function(t){return"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&yt(t.slice(0,0))}(t)||!!t._isBuffer)};function yt(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}!function(){var t=st.exports,e=lt.utf8,r=pt,n=lt.bin,o=function(i,a){i.constructor==String?i=a&&"binary"===a.encoding?n.stringToBytes(i):e.stringToBytes(i):r(i)?i=Array.prototype.slice.call(i,0):Array.isArray(i)||i.constructor===Uint8Array||(i=i.toString());for(var u=t.bytesToWords(i),c=8*i.length,s=1732584193,f=-271733879,l=-1732584194,p=271733878,y=0;y<u.length;y++)u[y]=16711935&(u[y]<<8|u[y]>>>24)|4278255360&(u[y]<<24|u[y]>>>8);u[c>>>5]|=128<<c%32,u[14+(c+64>>>9<<4)]=c;var h=o._ff,d=o._gg,m=o._hh,g=o._ii;for(y=0;y<u.length;y+=16){var v=s,b=f,w=l,S=p;s=h(s,f,l,p,u[y+0],7,-680876936),p=h(p,s,f,l,u[y+1],12,-389564586),l=h(l,p,s,f,u[y+2],17,606105819),f=h(f,l,p,s,u[y+3],22,-1044525330),s=h(s,f,l,p,u[y+4],7,-176418897),p=h(p,s,f,l,u[y+5],12,1200080426),l=h(l,p,s,f,u[y+6],17,-1473231341),f=h(f,l,p,s,u[y+7],22,-45705983),s=h(s,f,l,p,u[y+8],7,1770035416),p=h(p,s,f,l,u[y+9],12,-1958414417),l=h(l,p,s,f,u[y+10],17,-42063),f=h(f,l,p,s,u[y+11],22,-1990404162),s=h(s,f,l,p,u[y+12],7,1804603682),p=h(p,s,f,l,u[y+13],12,-40341101),l=h(l,p,s,f,u[y+14],17,-1502002290),s=d(s,f=h(f,l,p,s,u[y+15],22,1236535329),l,p,u[y+1],5,-165796510),p=d(p,s,f,l,u[y+6],9,-1069501632),l=d(l,p,s,f,u[y+11],14,643717713),f=d(f,l,p,s,u[y+0],20,-373897302),s=d(s,f,l,p,u[y+5],5,-701558691),p=d(p,s,f,l,u[y+10],9,38016083),l=d(l,p,s,f,u[y+15],14,-660478335),f=d(f,l,p,s,u[y+4],20,-405537848),s=d(s,f,l,p,u[y+9],5,568446438),p=d(p,s,f,l,u[y+14],9,-1019803690),l=d(l,p,s,f,u[y+3],14,-187363961),f=d(f,l,p,s,u[y+8],20,1163531501),s=d(s,f,l,p,u[y+13],5,-1444681467),p=d(p,s,f,l,u[y+2],9,-51403784),l=d(l,p,s,f,u[y+7],14,1735328473),s=m(s,f=d(f,l,p,s,u[y+12],20,-1926607734),l,p,u[y+5],4,-378558),p=m(p,s,f,l,u[y+8],11,-2022574463),l=m(l,p,s,f,u[y+11],16,1839030562),f=m(f,l,p,s,u[y+14],23,-35309556),s=m(s,f,l,p,u[y+1],4,-1530992060),p=m(p,s,f,l,u[y+4],11,1272893353),l=m(l,p,s,f,u[y+7],16,-155497632),f=m(f,l,p,s,u[y+10],23,-1094730640),s=m(s,f,l,p,u[y+13],4,681279174),p=m(p,s,f,l,u[y+0],11,-358537222),l=m(l,p,s,f,u[y+3],16,-722521979),f=m(f,l,p,s,u[y+6],23,76029189),s=m(s,f,l,p,u[y+9],4,-640364487),p=m(p,s,f,l,u[y+12],11,-421815835),l=m(l,p,s,f,u[y+15],16,530742520),s=g(s,f=m(f,l,p,s,u[y+2],23,-995338651),l,p,u[y+0],6,-198630844),p=g(p,s,f,l,u[y+7],10,1126891415),l=g(l,p,s,f,u[y+14],15,-1416354905),f=g(f,l,p,s,u[y+5],21,-57434055),s=g(s,f,l,p,u[y+12],6,1700485571),p=g(p,s,f,l,u[y+3],10,-1894986606),l=g(l,p,s,f,u[y+10],15,-1051523),f=g(f,l,p,s,u[y+1],21,-2054922799),s=g(s,f,l,p,u[y+8],6,1873313359),p=g(p,s,f,l,u[y+15],10,-30611744),l=g(l,p,s,f,u[y+6],15,-1560198380),f=g(f,l,p,s,u[y+13],21,1309151649),s=g(s,f,l,p,u[y+4],6,-145523070),p=g(p,s,f,l,u[y+11],10,-1120210379),l=g(l,p,s,f,u[y+2],15,718787259),f=g(f,l,p,s,u[y+9],21,-343485551),s=s+v>>>0,f=f+b>>>0,l=l+w>>>0,p=p+S>>>0}return t.endian([s,f,l,p])};o._ff=function(t,e,r,n,o,i,a){var u=t+(e&r|~e&n)+(o>>>0)+a;return(u<<i|u>>>32-i)+e},o._gg=function(t,e,r,n,o,i,a){var u=t+(e&n|r&~n)+(o>>>0)+a;return(u<<i|u>>>32-i)+e},o._hh=function(t,e,r,n,o,i,a){var u=t+(e^r^n)+(o>>>0)+a;return(u<<i|u>>>32-i)+e},o._ii=function(t,e,r,n,o,i,a){var u=t+(r^(e|~n))+(o>>>0)+a;return(u<<i|u>>>32-i)+e},o._blocksize=16,o._digestsize=16,ct.exports=function(e,r){if(null==e)throw new Error("Illegal argument "+e);var i=t.wordsToBytes(o(e,r));return r&&r.asBytes?i:r&&r.asString?n.bytesToString(i):t.bytesToHex(i)}}();var ht=ct.exports,dt="fl-cloud-token",mt="fl-cloud-bb-ext",gt="fl-cloud-user",vt="fl-cloud-admin",bt=12096e5,wt=[],St=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;wt.map((function(n){return n({token:t,user:e,adminUser:r})}))},jt=function(t,e,r){Et(t,r),Ut(e,r),St(t,e,Rt())},Ot=function(){_t(),Lt(),St()},At=function(t){return!(!t||"string"!=typeof t)},Pt=function(){return At(xt())},xt=function(){return qt(dt)},Et=function(t,e){Bt(dt,t,e)},_t=function(){Mt(dt)},kt=function(t){return!(!t||"object"!==Z(t)||!t.email)},Tt=function(){return kt(Ct())},It=function(){return kt(Rt())},Ct=function(){var t=qt(gt);return t?JSON.parse(t):null},Rt=function(){var t=qt(vt);return t?JSON.parse(t):null},Ut=function(t,e){var r={id:t.id,name:t.name,email:t.email,is_admin:t.is_admin};Bt(gt,JSON.stringify(r),e)},Ft=function(){var t=Ct();kt(t)&&t.is_admin&&(t.token=xt(),Bt(vt,JSON.stringify(t),!1))},Nt=function(){var t=Rt();if(kt(t)){var e=t.token;delete t.token,t.email_verified_at=!0,Et(e,!1),Ut(t,!1),Mt(vt),St(e,t)}},Lt=function(){Mt(vt),Mt(gt)},Dt=function(t){return"undefined"!=typeof FL_ASSISTANT_CONFIG?t+"-"+ht(FL_ASSISTANT_CONFIG.homeUrl):t},Bt=function(t,e,n){var o=Dt(t),i={path:"/"};n&&(i.expires=new Date(Date.now()+bt)),"undefined"==typeof window?r.g.cookie=tt(o,e,i):window.parent.document.cookie=tt(o,e,i)},qt=function(t){var e=K("undefined"==typeof window?r.g.cookie:window.parent.document.cookie),n=Dt(t);return e[n]?e[n]:null},Mt=function(t){var e=Dt(t),n={path:"/",expires:new Date(Date.now()-bt)};"undefined"==typeof window?r.g.cookie=tt(e,"",n):window.parent.document.cookie=tt(e,"",n)},Wt=Object.freeze({__proto__:null,subscribe:function(t){wt.push(t)},create:jt,destroy:Ot,isValidToken:At,hasToken:Pt,getToken:xt,setToken:Et,removeToken:_t,isValidUser:kt,hasUser:Tt,hasAdminUser:It,getUser:Ct,getAdminUser:Rt,setUser:Ut,rememberAdmin:Ft,restoreAdmin:Nt,removeUser:Lt,getBBExt:function(){return qt(mt)},setBBExt:function(t,e){Bt(mt,t,e)},isBBExtension:function(){return"site"==qt(mt)}}),Vt=function(t){var e={register:function(e,r,n,o,i){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},u={first_name:e,last_name:r,username:n,email:o,password:i,password_confirmation:i};return new Y((function(e,r){t.post("/account/user/register",u,a).then((function(t){if(t.response)r(t.response.data);else{var n=t.data,o=n.token,i=n.user;e({token:o,user:i})}})).catch(r)}))},authenticate:function(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return new Y((function(o,i){t.post("/iam/authenticate",{email:e,password:r},n).then((function(t){if(t.response)i(t.response.data);else{var e=t.data,r=e.token,n=e.user;o({token:r,user:n})}})).catch(i)}))},login:function(t,r,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return new Y((function(i,a){e.authenticate(t,r,o).then((function(t){var e=t.token,r=t.user;jt(e,r,n),i({token:e,user:r})})).catch(a)}))},loginAsUser:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Y((function(n,o){t.post("/iam/authenticate-as-user",{user_id:e},r).then((function(t){if(t.response)o(t.response.data);else{var e=t.data,r=e.token,i=e.user;Ft(),jt(r,i,!1),n({token:r,user:i})}})).catch(o)}))},me:function(){return t.get("/iam/me")},logoutAsUser:function(){Nt()},logout:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Y((function(r,n){t.post("/iam/token/destroy",{},e).then((function(){Ot(),r()})).catch(n)}))},refresh:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Y((function(r,n){t.post("/iam/token/refresh",{},e).then((function(t){if(!t.data||!t.data.token)return Ot(),void n(t);var e=t.data.token;Et(e),r(t.data)})).catch((function(t){Ot(),n(t)}))}))},forgotPassword:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Y((function(n,o){t.post("/iam/password/forgot",{email:e},r).then((function(t){t.response?o(t.response.data):n()})).catch(o)}))},resetPassword:function(e,r,n,o){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},a={email:e,password:r,password_confirmation:n,token:o};return new Y((function(e,r){t.post("/iam/password/reset",a,i).then((function(t){t.response?r(t.response.data):e()})).catch(r)}))},changePassword:function(e,r,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i={current_password:e,new_password:r,new_password_confirmation:n};return new Y((function(e,r){t.post("/iam/password/change",i,o).then((function(t){t.response?r(t.response.data):e()})).catch(r)}))},verifyEmail:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Y((function(n,o){t.get(e,r).then((function(t){t.response?o(t.response.data):(Ut(t.data.user),n(t))})).catch(o)}))},resendVerificationEmail:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Y((function(r,n){t.get("/iam/verification/resend",e).then((function(t){t.response?n(t.response.data):r(t)})).catch(n)}))},isConnected:function(){return Pt()&&Tt()},isLoggedInAs:function(){return It()}};return e};function Gt(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Ht(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Gt(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Gt(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function zt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Jt(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Xt(t,e,r){return e&&Jt(t.prototype,e),r&&Jt(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function $t(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Qt,Yt="undefined"!=typeof Symbol&&Symbol,Zt=Array.prototype.slice,Kt=Object.prototype.toString,te=Function.prototype.bind||function(t){var e=this;if("function"!=typeof e||"[object Function]"!==Kt.call(e))throw new TypeError("Function.prototype.bind called on incompatible "+e);for(var r,n=Zt.call(arguments,1),o=Math.max(0,e.length-n.length),i=[],a=0;a<o;a++)i.push("$"+a);if(r=Function("binder","return function ("+i.join(",")+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof r){var o=e.apply(this,n.concat(Zt.call(arguments)));return Object(o)===o?o:this}return e.apply(t,n.concat(Zt.call(arguments)))})),e.prototype){var u=function(){};u.prototype=e.prototype,r.prototype=new u,u.prototype=null}return r},ee=te.call(Function.call,Object.prototype.hasOwnProperty),re=SyntaxError,ne=Function,oe=TypeError,ie=function(t){try{return ne('"use strict"; return ('+t+").constructor;")()}catch(t){}},ae=Object.getOwnPropertyDescriptor;if(ae)try{ae({},"")}catch(t){ae=null}var ue=function(){throw new oe},ce=ae?function(){try{return ue}catch(t){try{return ae(arguments,"callee").get}catch(t){return ue}}}():ue,se="function"==typeof Yt&&"function"==typeof Symbol&&"symbol"==typeof Yt("foo")&&"symbol"==typeof Symbol("bar")&&function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(e in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var n=Object.getOwnPropertySymbols(t);if(1!==n.length||n[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(t,e);if(42!==o.value||!0!==o.enumerable)return!1}return!0}(),fe=Object.getPrototypeOf||function(t){return t.__proto__},le={},pe="undefined"==typeof Uint8Array?Qt:fe(Uint8Array),ye={"%AggregateError%":"undefined"==typeof AggregateError?Qt:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?Qt:ArrayBuffer,"%ArrayIteratorPrototype%":se?fe([][Symbol.iterator]()):Qt,"%AsyncFromSyncIteratorPrototype%":Qt,"%AsyncFunction%":le,"%AsyncGenerator%":le,"%AsyncGeneratorFunction%":le,"%AsyncIteratorPrototype%":le,"%Atomics%":"undefined"==typeof Atomics?Qt:Atomics,"%BigInt%":"undefined"==typeof BigInt?Qt:BigInt,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?Qt:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?Qt:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?Qt:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?Qt:FinalizationRegistry,"%Function%":ne,"%GeneratorFunction%":le,"%Int8Array%":"undefined"==typeof Int8Array?Qt:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?Qt:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?Qt:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":se?fe(fe([][Symbol.iterator]())):Qt,"%JSON%":"object"==typeof JSON?JSON:Qt,"%Map%":"undefined"==typeof Map?Qt:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&se?fe((new Map)[Symbol.iterator]()):Qt,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?Qt:Promise,"%Proxy%":"undefined"==typeof Proxy?Qt:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?Qt:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?Qt:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&se?fe((new Set)[Symbol.iterator]()):Qt,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?Qt:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":se?fe(""[Symbol.iterator]()):Qt,"%Symbol%":se?Symbol:Qt,"%SyntaxError%":re,"%ThrowTypeError%":ce,"%TypedArray%":pe,"%TypeError%":oe,"%Uint8Array%":"undefined"==typeof Uint8Array?Qt:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?Qt:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?Qt:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?Qt:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?Qt:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?Qt:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?Qt:WeakSet},he=function t(e){var r;if("%AsyncFunction%"===e)r=ie("async function () {}");else if("%GeneratorFunction%"===e)r=ie("function* () {}");else if("%AsyncGeneratorFunction%"===e)r=ie("async function* () {}");else if("%AsyncGenerator%"===e){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===e){var o=t("%AsyncGenerator%");o&&(r=fe(o.prototype))}return ye[e]=r,r},de={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},me=te,ge=ee,ve=me.call(Function.call,Array.prototype.concat),be=me.call(Function.apply,Array.prototype.splice),we=me.call(Function.call,String.prototype.replace),Se=me.call(Function.call,String.prototype.slice),je=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Oe=/\\(\\)?/g,Ae=function(t,e){var r,n=t;if(ge(de,n)&&(n="%"+(r=de[n])[0]+"%"),ge(ye,n)){var o=ye[n];if(o===le&&(o=he(n)),void 0===o&&!e)throw new oe("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new re("intrinsic "+t+" does not exist!")},Pe=function(t,e){if("string"!=typeof t||0===t.length)throw new oe("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof e)throw new oe('"allowMissing" argument must be a boolean');var r=function(t){var e=Se(t,0,1),r=Se(t,-1);if("%"===e&&"%"!==r)throw new re("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==e)throw new re("invalid intrinsic syntax, expected opening `%`");var n=[];return we(t,je,(function(t,e,r,o){n[n.length]=r?we(o,Oe,"$1"):e||t})),n}(t),n=r.length>0?r[0]:"",o=Ae("%"+n+"%",e),i=o.name,a=o.value,u=!1,c=o.alias;c&&(n=c[0],be(r,ve([0,1],c)));for(var s=1,f=!0;s<r.length;s+=1){var l=r[s],p=Se(l,0,1),y=Se(l,-1);if(('"'===p||"'"===p||"`"===p||'"'===y||"'"===y||"`"===y)&&p!==y)throw new re("property names with quotes must have matching quotes");if("constructor"!==l&&f||(u=!0),ge(ye,i="%"+(n+="."+l)+"%"))a=ye[i];else if(null!=a){if(!(l in a)){if(!e)throw new oe("base intrinsic for "+t+" exists, but the property is not available.");return}if(ae&&s+1>=r.length){var h=ae(a,l);a=(f=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:a[l]}else f=ge(a,l),a=a[l];f&&!u&&(ye[i]=a)}}return a},xe={exports:{}};!function(t){var e=te,r=Pe,n=r("%Function.prototype.apply%"),o=r("%Function.prototype.call%"),i=r("%Reflect.apply%",!0)||e.call(o,n),a=r("%Object.getOwnPropertyDescriptor%",!0),u=r("%Object.defineProperty%",!0),c=r("%Math.max%");if(u)try{u({},"a",{value:1})}catch(t){u=null}t.exports=function(t){var r=i(e,o,arguments);return a&&u&&a(r,"length").configurable&&u(r,"length",{value:1+c(0,t.length-(arguments.length-1))}),r};var s=function(){return i(e,n,arguments)};u?u(t.exports,"apply",{value:s}):t.exports.apply=s}(xe);var Ee=Pe,_e=xe.exports,ke=_e(Ee("String.prototype.indexOf")),Te=function(t){if(t.__esModule)return t;var e=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(t).forEach((function(r){var n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:function(){return t[r]}})})),e}(Object.freeze({__proto__:null,default:{}})),Ie="function"==typeof Map&&Map.prototype,Ce=Object.getOwnPropertyDescriptor&&Ie?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Re=Ie&&Ce&&"function"==typeof Ce.get?Ce.get:null,Ue=Ie&&Map.prototype.forEach,Fe="function"==typeof Set&&Set.prototype,Ne=Object.getOwnPropertyDescriptor&&Fe?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Le=Fe&&Ne&&"function"==typeof Ne.get?Ne.get:null,De=Fe&&Set.prototype.forEach,Be="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,qe="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,Me="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,We=Boolean.prototype.valueOf,Ve=Object.prototype.toString,Ge=Function.prototype.toString,He=String.prototype.match,ze="function"==typeof BigInt?BigInt.prototype.valueOf:null,Je=Object.getOwnPropertySymbols,Xe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,$e="function"==typeof Symbol&&"object"==typeof Symbol.iterator,Qe=Object.prototype.propertyIsEnumerable,Ye=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null),Ze=Te.custom,Ke=Ze&&or(Ze)?Ze:null,tr="function"==typeof Symbol&&void 0!==Symbol.toStringTag?Symbol.toStringTag:null;function er(t,e,r){var n="double"===(r.quoteStyle||e)?'"':"'";return n+t+n}function rr(t){return String(t).replace(/"/g,"&quot;")}function nr(t){return!("[object Array]"!==ur(t)||tr&&"object"==typeof t&&tr in t)}function or(t){if($e)return t&&"object"==typeof t&&t instanceof Symbol;if("symbol"==typeof t)return!0;if(!t||"object"!=typeof t||!Xe)return!1;try{return Xe.call(t),!0}catch(t){}return!1}var ir=Object.prototype.hasOwnProperty||function(t){return t in this};function ar(t,e){return ir.call(t,e)}function ur(t){return Ve.call(t)}function cr(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}function sr(t,e){if(t.length>e.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return sr(t.slice(0,e.maxStringLength),e)+n}return er(t.replace(/(['\\])/g,"\\$1").replace(/[\x00-\x1f]/g,fr),"single",e)}function fr(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+e.toString(16).toUpperCase()}function lr(t){return"Object("+t+")"}function pr(t){return t+" { ? }"}function yr(t,e,r,n){return t+" ("+e+") {"+(n?hr(r,n):r.join(", "))+"}"}function hr(t,e){if(0===t.length)return"";var r="\n"+e.prev+e.base;return r+t.join(","+r)+"\n"+e.prev}function dr(t,e){var r=nr(t),n=[];if(r){n.length=t.length;for(var o=0;o<t.length;o++)n[o]=ar(t,o)?e(t[o],t):""}var i,a="function"==typeof Je?Je(t):[];if($e){i={};for(var u=0;u<a.length;u++)i["$"+a[u]]=a[u]}for(var c in t)ar(t,c)&&(r&&String(Number(c))===c&&c<t.length||$e&&i["$"+c]instanceof Symbol||(/[^\w$]/.test(c)?n.push(e(c,t)+": "+e(t[c],t)):n.push(c+": "+e(t[c],t))));if("function"==typeof Je)for(var s=0;s<a.length;s++)Qe.call(t,a[s])&&n.push("["+e(a[s])+"]: "+e(t[a[s]],t));return n}var mr=Pe,gr=function(t,e){var r=Ee(t,!!e);return"function"==typeof r&&ke(t,".prototype.")>-1?_e(r):r},vr=function t(e,r,n,o){var i=r||{};if(ar(i,"quoteStyle")&&"single"!==i.quoteStyle&&"double"!==i.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(ar(i,"maxStringLength")&&("number"==typeof i.maxStringLength?i.maxStringLength<0&&i.maxStringLength!==1/0:null!==i.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var a=!ar(i,"customInspect")||i.customInspect;if("boolean"!=typeof a&&"symbol"!==a)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(ar(i,"indent")&&null!==i.indent&&"\t"!==i.indent&&!(parseInt(i.indent,10)===i.indent&&i.indent>0))throw new TypeError('options "indent" must be "\\t", an integer > 0, or `null`');if(void 0===e)return"undefined";if(null===e)return"null";if("boolean"==typeof e)return e?"true":"false";if("string"==typeof e)return sr(e,i);if("number"==typeof e)return 0===e?1/0/e>0?"0":"-0":String(e);if("bigint"==typeof e)return String(e)+"n";var u=void 0===i.depth?5:i.depth;if(void 0===n&&(n=0),n>=u&&u>0&&"object"==typeof e)return nr(e)?"[Array]":"[Object]";var c=function(t,e){var r;if("\t"===t.indent)r="\t";else{if(!("number"==typeof t.indent&&t.indent>0))return null;r=Array(t.indent+1).join(" ")}return{base:r,prev:Array(e+1).join(r)}}(i,n);if(void 0===o)o=[];else if(cr(o,e)>=0)return"[Circular]";function s(e,r,a){if(r&&(o=o.slice()).push(r),a){var u={depth:i.depth};return ar(i,"quoteStyle")&&(u.quoteStyle=i.quoteStyle),t(e,u,n+1,o)}return t(e,i,n+1,o)}if("function"==typeof e){var f=function(t){if(t.name)return t.name;var e=He.call(Ge.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}(e),l=dr(e,s);return"[Function"+(f?": "+f:" (anonymous)")+"]"+(l.length>0?" { "+l.join(", ")+" }":"")}if(or(e)){var p=$e?String(e).replace(/^(Symbol\(.*\))_[^)]*$/,"$1"):Xe.call(e);return"object"!=typeof e||$e?p:lr(p)}if(function(t){return!(!t||"object"!=typeof t)&&("undefined"!=typeof HTMLElement&&t instanceof HTMLElement||"string"==typeof t.nodeName&&"function"==typeof t.getAttribute)}(e)){for(var y="<"+String(e.nodeName).toLowerCase(),h=e.attributes||[],d=0;d<h.length;d++)y+=" "+h[d].name+"="+er(rr(h[d].value),"double",i);return y+=">",e.childNodes&&e.childNodes.length&&(y+="..."),y+"</"+String(e.nodeName).toLowerCase()+">"}if(nr(e)){if(0===e.length)return"[]";var m=dr(e,s);return c&&!function(t){for(var e=0;e<t.length;e++)if(cr(t[e],"\n")>=0)return!1;return!0}(m)?"["+hr(m,c)+"]":"[ "+m.join(", ")+" ]"}if(function(t){return!("[object Error]"!==ur(t)||tr&&"object"==typeof t&&tr in t)}(e)){var g=dr(e,s);return 0===g.length?"["+String(e)+"]":"{ ["+String(e)+"] "+g.join(", ")+" }"}if("object"==typeof e&&a){if(Ke&&"function"==typeof e[Ke])return e[Ke]();if("symbol"!==a&&"function"==typeof e.inspect)return e.inspect()}if(function(t){if(!Re||!t||"object"!=typeof t)return!1;try{Re.call(t);try{Le.call(t)}catch(t){return!0}return t instanceof Map}catch(t){}return!1}(e)){var v=[];return Ue.call(e,(function(t,r){v.push(s(r,e,!0)+" => "+s(t,e))})),yr("Map",Re.call(e),v,c)}if(function(t){if(!Le||!t||"object"!=typeof t)return!1;try{Le.call(t);try{Re.call(t)}catch(t){return!0}return t instanceof Set}catch(t){}return!1}(e)){var b=[];return De.call(e,(function(t){b.push(s(t,e))})),yr("Set",Le.call(e),b,c)}if(function(t){if(!Be||!t||"object"!=typeof t)return!1;try{Be.call(t,Be);try{qe.call(t,qe)}catch(t){return!0}return t instanceof WeakMap}catch(t){}return!1}(e))return pr("WeakMap");if(function(t){if(!qe||!t||"object"!=typeof t)return!1;try{qe.call(t,qe);try{Be.call(t,Be)}catch(t){return!0}return t instanceof WeakSet}catch(t){}return!1}(e))return pr("WeakSet");if(function(t){if(!Me||!t||"object"!=typeof t)return!1;try{return Me.call(t),!0}catch(t){}return!1}(e))return pr("WeakRef");if(function(t){return!("[object Number]"!==ur(t)||tr&&"object"==typeof t&&tr in t)}(e))return lr(s(Number(e)));if(function(t){if(!t||"object"!=typeof t||!ze)return!1;try{return ze.call(t),!0}catch(t){}return!1}(e))return lr(s(ze.call(e)));if(function(t){return!("[object Boolean]"!==ur(t)||tr&&"object"==typeof t&&tr in t)}(e))return lr(We.call(e));if(function(t){return!("[object String]"!==ur(t)||tr&&"object"==typeof t&&tr in t)}(e))return lr(s(String(e)));if(!function(t){return!("[object Date]"!==ur(t)||tr&&"object"==typeof t&&tr in t)}(e)&&!function(t){return!("[object RegExp]"!==ur(t)||tr&&"object"==typeof t&&tr in t)}(e)){var w=dr(e,s),S=Ye?Ye(e)===Object.prototype:e instanceof Object||e.constructor===Object,j=e instanceof Object?"":"null prototype",O=!S&&tr&&Object(e)===e&&tr in e?ur(e).slice(8,-1):j?"Object":"",A=(S||"function"!=typeof e.constructor?"":e.constructor.name?e.constructor.name+" ":"")+(O||j?"["+[].concat(O||[],j||[]).join(": ")+"] ":"");return 0===w.length?A+"{}":c?A+"{"+hr(w,c)+"}":A+"{ "+w.join(", ")+" }"}return String(e)},br=mr("%TypeError%"),wr=mr("%WeakMap%",!0),Sr=mr("%Map%",!0),jr=gr("WeakMap.prototype.get",!0),Or=gr("WeakMap.prototype.set",!0),Ar=gr("WeakMap.prototype.has",!0),Pr=gr("Map.prototype.get",!0),xr=gr("Map.prototype.set",!0),Er=gr("Map.prototype.has",!0),_r=function(t,e){for(var r,n=t;null!==(r=n.next);n=r)if(r.key===e)return n.next=r.next,r.next=t.next,t.next=r,r},kr=String.prototype.replace,Tr=/%20/g,Ir="RFC3986",Cr={default:Ir,formatters:{RFC1738:function(t){return kr.call(t,Tr,"+")},RFC3986:function(t){return String(t)}},RFC1738:"RFC1738",RFC3986:Ir},Rr=Cr,Ur=Object.prototype.hasOwnProperty,Fr=Array.isArray,Nr=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),Lr=function(t,e){for(var r=e&&e.plainObjects?Object.create(null):{},n=0;n<t.length;++n)void 0!==t[n]&&(r[n]=t[n]);return r},Dr={arrayToObject:Lr,assign:function(t,e){return Object.keys(e).reduce((function(t,r){return t[r]=e[r],t}),t)},combine:function(t,e){return[].concat(t,e)},compact:function(t){for(var e=[{obj:{o:t},prop:"o"}],r=[],n=0;n<e.length;++n)for(var o=e[n],i=o.obj[o.prop],a=Object.keys(i),u=0;u<a.length;++u){var c=a[u],s=i[c];"object"==typeof s&&null!==s&&-1===r.indexOf(s)&&(e.push({obj:i,prop:c}),r.push(s))}return function(t){for(;t.length>1;){var e=t.pop(),r=e.obj[e.prop];if(Fr(r)){for(var n=[],o=0;o<r.length;++o)void 0!==r[o]&&n.push(r[o]);e.obj[e.prop]=n}}}(e),t},decode:function(t,e,r){var n=t.replace(/\+/g," ");if("iso-8859-1"===r)return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(t){return n}},encode:function(t,e,r,n,o){if(0===t.length)return t;var i=t;if("symbol"==typeof t?i=Symbol.prototype.toString.call(t):"string"!=typeof t&&(i=String(t)),"iso-8859-1"===r)return escape(i).replace(/%u[0-9a-f]{4}/gi,(function(t){return"%26%23"+parseInt(t.slice(2),16)+"%3B"}));for(var a="",u=0;u<i.length;++u){var c=i.charCodeAt(u);45===c||46===c||95===c||126===c||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||o===Rr.RFC1738&&(40===c||41===c)?a+=i.charAt(u):c<128?a+=Nr[c]:c<2048?a+=Nr[192|c>>6]+Nr[128|63&c]:c<55296||c>=57344?a+=Nr[224|c>>12]+Nr[128|c>>6&63]+Nr[128|63&c]:(u+=1,c=65536+((1023&c)<<10|1023&i.charCodeAt(u)),a+=Nr[240|c>>18]+Nr[128|c>>12&63]+Nr[128|c>>6&63]+Nr[128|63&c])}return a},isBuffer:function(t){return!(!t||"object"!=typeof t||!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t)))},isRegExp:function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},maybeMap:function(t,e){if(Fr(t)){for(var r=[],n=0;n<t.length;n+=1)r.push(e(t[n]));return r}return e(t)},merge:function t(e,r,n){if(!r)return e;if("object"!=typeof r){if(Fr(e))e.push(r);else{if(!e||"object"!=typeof e)return[e,r];(n&&(n.plainObjects||n.allowPrototypes)||!Ur.call(Object.prototype,r))&&(e[r]=!0)}return e}if(!e||"object"!=typeof e)return[e].concat(r);var o=e;return Fr(e)&&!Fr(r)&&(o=Lr(e,n)),Fr(e)&&Fr(r)?(r.forEach((function(r,o){if(Ur.call(e,o)){var i=e[o];i&&"object"==typeof i&&r&&"object"==typeof r?e[o]=t(i,r,n):e.push(r)}else e[o]=r})),e):Object.keys(r).reduce((function(e,o){var i=r[o];return Ur.call(e,o)?e[o]=t(e[o],i,n):e[o]=i,e}),o)}},Br=function(){var t,e,r,n={assert:function(t){if(!n.has(t))throw new br("Side channel does not contain "+vr(t))},get:function(n){if(wr&&n&&("object"==typeof n||"function"==typeof n)){if(t)return jr(t,n)}else if(Sr){if(e)return Pr(e,n)}else if(r)return function(t,e){var r=_r(t,e);return r&&r.value}(r,n)},has:function(n){if(wr&&n&&("object"==typeof n||"function"==typeof n)){if(t)return Ar(t,n)}else if(Sr){if(e)return Er(e,n)}else if(r)return function(t,e){return!!_r(t,e)}(r,n);return!1},set:function(n,o){wr&&n&&("object"==typeof n||"function"==typeof n)?(t||(t=new wr),Or(t,n,o)):Sr?(e||(e=new Sr),xr(e,n,o)):(r||(r={key:{},next:null}),function(t,e,r){var n=_r(t,e);n?n.value=r:t.next={key:e,next:t.next,value:r}}(r,n,o))}};return n},qr=Dr,Mr=Cr,Wr=Object.prototype.hasOwnProperty,Vr={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,e){return t+"["+e+"]"},repeat:function(t){return t}},Gr=Array.isArray,Hr=Array.prototype.push,zr=function(t,e){Hr.apply(t,Gr(e)?e:[e])},Jr=Date.prototype.toISOString,Xr=Mr.default,$r={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:qr.encode,encodeValuesOnly:!1,format:Xr,formatter:Mr.formatters[Xr],indices:!1,serializeDate:function(t){return Jr.call(t)},skipNulls:!1,strictNullHandling:!1},Qr=function t(e,r,n,o,i,a,u,c,s,f,l,p,y,h,d){var m,g=e;if(d.has(e))throw new RangeError("Cyclic object value");if("function"==typeof u?g=u(r,g):g instanceof Date?g=f(g):"comma"===n&&Gr(g)&&(g=qr.maybeMap(g,(function(t){return t instanceof Date?f(t):t}))),null===g){if(o)return a&&!y?a(r,$r.encoder,h,"key",l):r;g=""}if("string"==typeof(m=g)||"number"==typeof m||"boolean"==typeof m||"symbol"==typeof m||"bigint"==typeof m||qr.isBuffer(g))return a?[p(y?r:a(r,$r.encoder,h,"key",l))+"="+p(a(g,$r.encoder,h,"value",l))]:[p(r)+"="+p(String(g))];var v,b=[];if(void 0===g)return b;if("comma"===n&&Gr(g))v=[{value:g.length>0?g.join(",")||null:void 0}];else if(Gr(u))v=u;else{var w=Object.keys(g);v=c?w.sort(c):w}for(var S=0;S<v.length;++S){var j=v[S],O="object"==typeof j&&void 0!==j.value?j.value:g[j];if(!i||null!==O){var A=Gr(g)?"function"==typeof n?n(r,j):r:r+(s?"."+j:"["+j+"]");d.set(e,!0);var P=Br();zr(b,t(O,A,n,o,i,a,u,c,s,f,l,p,y,h,P))}}return b},Yr=Dr,Zr=(Object.prototype.hasOwnProperty,Array.isArray,Yr.decode,function(t,e){var r,n=t,o=function(t){if(!t)return $r;if(null!==t.encoder&&void 0!==t.encoder&&"function"!=typeof t.encoder)throw new TypeError("Encoder has to be a function.");var e=t.charset||$r.charset;if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=Mr.default;if(void 0!==t.format){if(!Wr.call(Mr.formatters,t.format))throw new TypeError("Unknown format option provided.");r=t.format}var n=Mr.formatters[r],o=$r.filter;return("function"==typeof t.filter||Gr(t.filter))&&(o=t.filter),{addQueryPrefix:"boolean"==typeof t.addQueryPrefix?t.addQueryPrefix:$r.addQueryPrefix,allowDots:void 0===t.allowDots?$r.allowDots:!!t.allowDots,charset:e,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:$r.charsetSentinel,delimiter:void 0===t.delimiter?$r.delimiter:t.delimiter,encode:"boolean"==typeof t.encode?t.encode:$r.encode,encoder:"function"==typeof t.encoder?t.encoder:$r.encoder,encodeValuesOnly:"boolean"==typeof t.encodeValuesOnly?t.encodeValuesOnly:$r.encodeValuesOnly,filter:o,format:r,formatter:n,serializeDate:"function"==typeof t.serializeDate?t.serializeDate:$r.serializeDate,skipNulls:"boolean"==typeof t.skipNulls?t.skipNulls:$r.skipNulls,sort:"function"==typeof t.sort?t.sort:null,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:$r.strictNullHandling}}(e);"function"==typeof o.filter?n=(0,o.filter)("",n):Gr(o.filter)&&(r=o.filter);var i,a=[];if("object"!=typeof n||null===n)return"";i=e&&e.arrayFormat in Vr?e.arrayFormat:e&&"indices"in e?e.indices?"indices":"repeat":"indices";var u=Vr[i];r||(r=Object.keys(n)),o.sort&&r.sort(o.sort);for(var c=Br(),s=0;s<r.length;++s){var f=r[s];o.skipNulls&&null===n[f]||zr(a,Qr(n[f],f,u,o.strictNullHandling,o.skipNulls,o.encode?o.encoder:null,o.filter,o.sort,o.allowDots,o.serializeDate,o.format,o.formatter,o.encodeValuesOnly,o.charset,c))}var l=a.join(o.delimiter),p=!0===o.addQueryPrefix?"?":"";return o.charsetSentinel&&("iso-8859-1"===o.charset?p+="utf8=%26%2310003%3B&":p+="utf8=%E2%9C%93&"),l.length>0?p+l:""}),Kr=function(){function t(e){zt(this,t),this.query=e,this.uri=""}return Xt(t,[{key:"parse",value:function(){return this.includes(),this.appends(),this.fields(),this.filters(),this.sorts(),this.page(),this.limit(),this.params(),this.uri}},{key:"prepend",value:function(){return""===this.uri?"?":"&"}},{key:"includes",value:function(){!this.query.include.length>0||(this.uri+="".concat(this.prepend()+this.query.queryParameters.includes,"=").concat(this.query.include))}},{key:"appends",value:function(){!this.query.append.length>0||(this.uri+="".concat(this.prepend()+this.query.queryParameters.appends,"=").concat(this.query.append))}},{key:"fields",value:function(){if(!(!Object.keys(this.query.fields).length>0)){var t=$t({},"".concat(this.query.queryParameters.fields,"[").concat(this.query.model,"]"),this.query.fields);this.uri+=this.prepend()+Zr(t,{encode:!1})}}},{key:"filters",value:function(){if(!(!Object.keys(this.query.filters).length>0)){var t=$t({},this.query.queryParameters.filters,this.query.filters);this.uri+=this.prepend()+Zr(t,{encode:!1})}}},{key:"sorts",value:function(){!this.query.sorts.length>0||(this.uri+="".concat(this.prepend()+this.query.queryParameters.sort,"=").concat(this.query.sorts))}},{key:"page",value:function(){null!==this.query.pageValue&&(this.uri+="".concat(this.prepend()+this.query.queryParameters.page,"=").concat(this.query.pageValue))}},{key:"limit",value:function(){null!==this.query.limitValue&&(this.uri+="".concat(this.prepend()+this.query.queryParameters.limit,"=").concat(this.query.limitValue))}},{key:"params",value:function(){null!==this.query.paramsObj&&(this.uri+=this.prepend()+Zr(this.query.paramsObj,{encode:!1}))}}]),t}(),tn=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};zt(this,t),this.model=null,this.base_url=e.base_url||null,this.queryParameters=e.queryParameters||{filters:"filter",fields:"fields",includes:"include",appends:"append",page:"page",limit:"limit",sort:"sort"},this.include=[],this.append=[],this.sorts=[],this.fields={},this.filters={},this.pageValue=null,this.limitValue=null,this.paramsObj=null,this.parser=new Kr(this)}return Xt(t,[{key:"for",value:function(t){return this.model=t,this}},{key:"get",value:function(){var t=this.base_url?this.base_url+this.parseQuery():this.parseQuery();return this.reset(),t}},{key:"url",value:function(){return this.get()}},{key:"reset",value:function(){this.parser.uri=""}},{key:"parseQuery",value:function(){if(!this.model)throw new Error("Please call the for() method before adding filters or calling url() / get().");return"/".concat(this.model).concat(this.parser.parse())}},{key:"includes",value:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];if(!e.length)throw new Error("The ".concat(this.queryParameters.includes,"s() function takes at least one argument."));return this.include=e,this}},{key:"appends",value:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];if(!e.length)throw new Error("The ".concat(this.queryParameters.appends,"s() function takes at least one argument."));return this.append=e,this}},{key:"select",value:function(){for(var t=this,e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];if(!r.length)throw new Error("The ".concat(this.queryParameters.fields,"() function takes a single argument of an array."));return(r[0].constructor===String||Array.isArray(r[0]))&&(this.fields=r.join(",")),r[0].constructor===Object&&Object.entries(r[0]).forEach((function(e){var r=Ht(e,2),n=r[0],o=r[1];t.fields[n]=o.join(",")})),this}},{key:"where",value:function(t,e){if(void 0===t||void 0===e)throw new Error("The where() function takes 2 arguments both of string values.");if(Array.isArray(e)||e instanceof Object)throw new Error("The second argument to the where() function must be a string. Use whereIn() if you need to pass in an array.");return this.filters[t]=e,this}},{key:"whereIn",value:function(t,e){if(!t||!e)throw new Error("The whereIn() function takes 2 arguments of (string, array).");if(!t&&Array.isArray(t)||"object"===Z(t))throw new Error("The first argument for the whereIn() function must be a string or integer.");if(!Array.isArray(e))throw new Error("The second argument for the whereIn() function must be an array.");return this.filters[t]=e.join(","),this}},{key:"sort",value:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return this.sorts=e,this}},{key:"page",value:function(t){if(!Number.isInteger(t))throw new Error("The page() function takes a single argument of a number");return this.pageValue=t,this}},{key:"limit",value:function(t){if(!Number.isInteger(t))throw new Error("The limit() function takes a single argument of a number.");return this.limitValue=t,this}},{key:"params",value:function(t){if(void 0===t||t.constructor!==Object)throw new Error("The params() function takes a single argument of an object.");return this.paramsObj=t,this}}]),t}(),en=function(t,e){return{create:function(r){return e.post(t,r)},update:function(r,n){return e.put("".concat(t,"/").concat(r),n)},delete:function(r){return e.delete("".concat(t,"/").concat(r))},get:function(r){return e.get("".concat(t,"/").concat(r))},getAll:function(){return e.get(t)},search:function(){var r=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){})((new tn).for(t)).get();return e.get(r.replace("//","/"))}}},rn="undefined"==typeof arguments?void 0:arguments,nn=function(t){var e=Ht((0,o.useState)(!1),2),r=e[0],n=e[1];return[function(){return n(!0),t.apply(null,rn).finally((function(){return n(!1)}))},r]},on=function(t,e){var r=e.model,n=e.getter,i=e.subscribe,a=e.unsubscribe,u=Ht((0,o.useState)(null),2),c=u[0],s=u[1];return(0,o.useEffect)((function(){n(t).then((function(t){return s(t.data)}))}),[t]),(0,o.useEffect)((function(){if(c&&i)return i(t,"updated",(function(t){return s(t[r])})),i(t,"deleted",(function(){return s(null)})),function(){return a&&a(t)}}),[c]),[c,s]},an=function(t){var e=t.model,r=t.getter,n=t.subscribe,i=t.unsubscribe,a=Ht((0,o.useState)(null),2),u=a[0],c=a[1];return(0,o.useEffect)((function(){c(null),r().then((function(t){return c(t.data)}))}),[r]),(0,o.useEffect)((function(){if(n&&u)return n(null,"created",(function(t){var r=!1;u.map((function(n){n.id===t[e].id&&(r=!0)})),r||c(u.concat([t[e]]))})),u.map((function(t){var r=t.id;n(r,"updated",(function(t){c(u.map((function(n){return n.id===r?t[e]:n})))})),n(r,"deleted",(function(){c(u.filter((function(t){return t.id!==r})))}))})),function(){return u.map((function(t){return i(t.id)}))}}),[u]),[u,c]},un=function t(e,r,n){n instanceof Array?n.map((function(n,o){var i=r+("object"===Z(n)?"":"[".concat(o,"]"));t(e,i,n)})):null==n?e.append(r,""):"object"===Z(n)?Object.entries(n).map((function(n){var o=Ht(n,2),i=o[0],a=o[1];t(e,"".concat(r,"[").concat(i,"]"),a)})):e.append(r,n)};function cn(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function sn(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?cn(Object(r),!0).forEach((function(e){$t(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):cn(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function fn(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function ln(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?fn(Object(r),!0).forEach((function(e){$t(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):fn(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function pn(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function yn(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?pn(Object(r),!0).forEach((function(e){$t(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):pn(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function hn(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function dn(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){hn(i,n,o,a,u,"next",t)}function u(t){hn(i,n,o,a,u,"throw",t)}a(void 0)}))}}var mn={exports:{}};!function(t){var e=function(t){var e,r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,i=Object.create(o.prototype),a=new _(n||[]);return i._invoke=function(t,e,r){var n=l;return function(o,i){if(n===y)throw new Error("Generator is already running");if(n===h){if("throw"===o)throw i;return T()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=P(a,r);if(u){if(u===d)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===l)throw n=h,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=y;var c=f(t,e,r);if("normal"===c.type){if(n=r.done?h:p,c.arg===d)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n=h,r.method="throw",r.arg=c.arg)}}}(t,r,a),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var l="suspendedStart",p="suspendedYield",y="executing",h="completed",d={};function m(){}function g(){}function v(){}var b={};c(b,i,(function(){return this}));var w=Object.getPrototypeOf,S=w&&w(w(k([])));S&&S!==r&&n.call(S,i)&&(b=S);var j=v.prototype=m.prototype=Object.create(b);function O(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function A(t,e){function r(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var s=c.arg,l=s.value;return l&&"object"==typeof l&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(l).then((function(t){s.value=t,a(s)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var o;this._invoke=function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}}function P(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=e,P(t,r),"throw"===r.method))return d;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var o=f(n,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,d;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,d):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function x(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function _(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function k(t){if(t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}return{next:T}}function T(){return{value:e,done:!0}}return g.prototype=v,c(j,"constructor",v),c(v,"constructor",g),g.displayName=c(v,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,u,"GeneratorFunction")),t.prototype=Object.create(j),t},t.awrap=function(t){return{__await:t}},O(A.prototype),c(A.prototype,a,(function(){return this})),t.AsyncIterator=A,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new A(s(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},O(j),c(j,u,"Generator"),c(j,i,(function(){return this})),c(j,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=k,_.prototype={constructor:_,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(E),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return u.type="throw",u.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(c&&s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:k(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),d}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}}(mn);var gn=mn.exports;function vn(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function bn(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?vn(Object(r),!0).forEach((function(e){$t(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):vn(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function wn(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Sn(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?wn(Object(r),!0).forEach((function(e){$t(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):wn(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var jn={auth:Vt,accounts:function(t){return sn(sn({},{publicInfo:function(e,r){return t.get("/accounts/info/".concat(e,"/").concat(r))},publicInfoByUsername:function(e){return t.get("/accounts/info-by-name/".concat(e))},usernameExists:function(e){return t.get("/accounts/exists/".concat(e))},featuredCreators:function(){return t.get("/accounts/featured-creators")}}),{})},user:function(t){return ln(ln({},{get:function(){return t.get("/account/user")},update:function(e){return e.append?e.append("_method","PUT"):e._method="PUT",t.post("/account/user/update",e)},delete:function(){return t.post("/account/user/delete")},getInvites:function(){return t.get("/account/user/invite")},invite:function(e){return t.post("/account/user/invite",{email:e})},resendInvite:function(e){return t.post("/account/user/invite/".concat(e,"/resend"))},cancelInvite:function(e){return t.post("/account/user/invite/".concat(e,"/cancel"))},verifyInvite:function(e){return t.post("/account/user/invite/".concat(e,"/verify"))},getSellerAccount:function(){return t.get("account/user/seller")},createSellerAccount:function(e){return t.post("/account/user/seller/create",e)},stripeDashboard:function(){return t.post("/account/user/seller/stripe-dashboard")}}),{})},teams:function(t){var e=yn(yn({},en("/account/teams",t)),{},{update:function(e,r){return r.append?r.append("_method","PUT"):r._method="PUT",t.post("/account/teams/".concat(e),r)},getInvites:function(e){return t.get("/account/teams/".concat(e,"/invite"))},invite:function(e,r,n){return t.post("/account/teams/".concat(e,"/invite"),{email:r,role:n})},acceptInvite:function(e){return t.post("/account/teams/invite/".concat(e,"/accept"))},resendInvite:function(e){return t.post("/account/teams/invite/".concat(e,"/resend"))},cancelInvite:function(e){return t.post("/account/teams/invite/".concat(e,"/cancel"))},getMembers:function(e){return t.get("/account/teams/".concat(e,"/members"))},switchRole:function(e,r,n){return t.put("/account/teams/".concat(e,"/members/").concat(r,"/role"),{role:n})},transferToMember:function(e,r){return t.put("/account/teams/".concat(e,"/members/").concat(r,"/transfer"))},removeMember:function(e,r){return t.delete("/account/teams/".concat(e,"/members/").concat(r))},leaveTeam:function(e){return t.delete("/account/teams/".concat(e,"/members/leave"))}}),r={useAll:function(){return an({getter:e.getAll})},useOne:function(t){return on(t,{getter:e.get})},useInvites:function(t){return an({getter:(0,o.useCallback)((function(){return e.getInvites(t)}),[t])})}};return yn(yn({},e),r)},drip:function(t){return{subscribe:function(e){return t.post("/account/drip/subscribe",e)}}},libraries:function(t,e){var r,n,i={getAll:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"user",e=arguments.length>1?arguments[1]:void 0;return i.search((function(r){return t&&!e?"object"===Z(t)?r.whereIn("owner_type",t):r.where("owner_type",t):e&&(r.where("owner_type","team"),r.where("owner_id",e)),r}))},getAllSortedByOwner:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"ASC",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"name",r={user:[],team:{},shared:[],access:[]};return i.search((function(r){return r.sort(("ASC"===t?"":"-")+e),r.whereIn("owner_type",["user","shared","team","access"]),r})).then((function(t){return t.data.map((function(t){t.permissions.shared&&!t.permissions.view_team?r.shared.push(t):!0===t.has_access?r.access.push(t):"user"===t.owner_type?r.user.push(t):"team"===t.owner_type&&(r.team[t.owner_id]||(r.team[t.owner_id]=[]),r.team[t.owner_id].push(t))})),r}))},get:function(e){return t.get("/libraries/".concat(e))},create:function(e){return t.post("/libraries",e)},update:function(e,r){return r.append?r.append("_method","PUT"):r._method="PUT",t.post("/libraries/".concat(e),r)},updateItems:function(e,r){return t.post("/libraries/".concat(e,"/items"),{items:r})},getCommunityStats:function(e){return t.get("/libraries/".concat(e,"/stats"))},getAccess:function(e){return t.post("/libraries/".concat(e,"/get-access"))},archive:function(e){return t.post("/libraries/".concat(e,"/archive"))},unarchive:function(e){return t.post("/libraries/".concat(e,"/unarchive"))},hideAccess:function(e){return t.post("/libraries/".concat(e,"/hide-access"))},showAccess:function(e){return t.post("/libraries/".concat(e,"/show-access"))},removeAccess:function(e){return t.post("/libraries/".concat(e,"/remove-access"))},hideFromPublic:function(e){return t.post("/admin/libraries/".concat(e,"/hide-from-public"))},unhideFromPublic:function(e){return t.post("/admin/libraries/".concat(e,"/unhide-from-public"))},delete:(n=dn(gn.mark((function e(r){return gn.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!Array.isArray(r)){e.next=4;break}return e.next=3,Promise.all(r.map((function(e){return t.delete("/libraries/".concat(e))})));case 3:return e.abrupt("return",e.sent);case 4:return e.abrupt("return",t.delete("/libraries/".concat(r)));case 5:case"end":return e.stop()}}),e)}))),function(t){return n.apply(this,arguments)}),duplicate:function(e){return t.post("/libraries/".concat(e,"/duplicate"))},search:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(t){return t})((new tn).for("/libraries")).get().replace("//","/");return t.get(e)},getUserLibraries:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"ASC",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"name",n=(new tn).for("/libraries/user");n.sort(("ASC"===e?"":"-")+r);var o=n.get().replace("//","/");return t.get(o)},getCommunityLibraries:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"ASC",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"name",n=(new tn).for("/libraries/community");n.sort(("ASC"===e?"":"-")+r);var o=n.get().replace("//","/");return t.get(o)},getTeamLibraries:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"ASC",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"name",o=(new tn).for("/libraries/team/".concat(e));o.sort(("ASC"===r?"":"-")+n);var i=o.get().replace("//","/");return t.get(i)},subscribe:function(t,e,r){},unsubscribe:function(t){},contactAuthor:function(e,r){return t.post("/libraries/".concat(e,"/contact-author"),r)},getCollections:function(e){return t.get("/libraries/".concat(e,"/library-collections"))},getCollection:function(e){return t.get("/library-collections/".concat(e))},createCollection:function(e,r){return t.post("/libraries/".concat(e,"/library-collections"),r)},updateCollection:function(e,r){return t.put("/library-collections/".concat(e),r)},deleteCollection:function(e){return t.delete("/library-collections/".concat(e))},getItems:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.get("/libraries/".concat(e,"/library-items"),{params:r})},getItem:function(e){return t.get("/library-items/".concat(e))},createItem:function(e,r){return t.post("/libraries/".concat(e,"/library-items"),r)},updateItem:function(e,r){return r.append?r.append("_method","PUT"):r._method="PUT",t.post("/library-items/".concat(e),r)},deleteItem:function(e){return t.delete("/library-items/".concat(e))},deleteItems:(r=dn(gn.mark((function e(){var r,n=arguments;return gn.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.length>0&&void 0!==n[0]?n[0]:[],e.next=3,Promise.all(r.map((function(e){t.delete("/library-items/".concat(e))})));case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)}))),function(){return r.apply(this,arguments)}),searchItems:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(t){return t},n=arguments.length>2?arguments[2]:void 0,o="/libraries/".concat(e,"/library-items"),i=r((new tn).for(o)).get().replace("//","/");return t.get(i,n)},moveItem:function(e,r){return t.put("/library-items/".concat(r,"/move"),{library_id:e})},favoriteItem:function(e){return t.post("/library-items/".concat(e,"/favorite"))},unfavoriteItem:function(e){return t.post("/library-items/".concat(e,"/unfavorite"))},favorite:function(e){return t.post("/libraries/".concat(e,"/favorite"))},unfavorite:function(e){return t.post("/libraries/".concat(e,"/unfavorite"))},favoriteLibraryItem:function(e){return t.post("/libraries/".concat(e,"/favorite"))},unfavoriteLibraryItem:function(e){return t.post("/libraries/".concat(e,"/unfavorite"))},getInvites:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"share";return t.get("/libraries/".concat(e,"/invite?type=").concat(r))},invite:function(e,r,n){return t.post("/libraries/".concat(e,"/invite"),{email:r,role:n})},requestTransfer:function(e,r){return t.put("/libraries/".concat(e,"/invite/transfer"),{username:r})},acceptInvite:function(e){return t.post("/libraries/invite/".concat(e,"/accept"))},resendInvite:function(e){return t.post("/libraries/invite/".concat(e,"/resend"))},cancelInvite:function(e){return t.post("/libraries/invite/".concat(e,"/cancel"))},join:function(e){return t.put("/libraries/".concat(e,"/members/join"))},getMembers:function(e){return t.get("/libraries/".concat(e,"/members"))},switchRole:function(e,r,n){return t.put("/libraries/".concat(e,"/members/").concat(r,"/role"),{role:n})},transferToMember:function(e,r){return t.put("/libraries/".concat(e,"/members/").concat(r,"/transfer"))},removeMember:function(e,r){return t.delete("/libraries/".concat(e,"/members/").concat(r))},leaveLibrary:function(e){return t.delete("/libraries/".concat(e,"/members/leave"))},requestDownload:function(e){return t.post("/libraries/".concat(e,"/download"),null,{responseType:"blob"})},getDownloadStatus:function(e){return t.get("/libraries/download/status/".concat(e)).then((function(t){return t.data}))},getDownloadBlob:function(e){return t.get("/libraries/download/".concat(e),{responseType:"blob"})}},a={useAll:function(t,e){return an({model:"library",getter:(0,o.useCallback)((function(){return i.getAll(t,e)}),[t,e])})},useOne:function(t){return on(t,{model:"library",getter:i.get})},useCollections:function(t){return an({getter:(0,o.useCallback)((function(){return i.getCollections(t)}),[t])})},useCollection:function(t){return on(t,{getter:i.getCollection})},useItems:function(t){return an({getter:(0,o.useCallback)((function(){return i.getItems(t)}),[t])})},useItem:function(t){return on(t,{getter:i.getItem})}};return bn(bn({},i),a)},billing:function(t){var e={getSubscriptionData:function(){return t.get("/billing/subscription/subscription-data")},getTeamSubscriptionData:function(e){return t.get("/billing/subscription/team-subscription-data/".concat(e))},getSubscriptionPricing:function(e){return t.get("/billing/subscription/subscription-pricing",{params:e})},subscribe:function(e){return t.post("/billing/subscription/subscribe",e)},subscribeTeam:function(e,r){return t.post("/billing/subscription/subscribe-team/".concat(e),r)},cancelSubscription:function(){return t.post("/billing/subscription/cancel-subscription")},cancelTeamSubscription:function(e){return t.post("/billing/subscription/cancel-team-subscription/".concat(e))},manageSubscription:function(){return t.post("/billing/subscription/manage-subscription")},manageTeamSubscription:function(e){return t.post("/billing/subscription/manage-team-subscription/".concat(e))},currentUserHasPlan:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=FL.Assistant.data.getSystemState(),n=r.user,o=r.cloudUser;return n?e.userHasPlan(n,t):!!o&&e.userHasPlan(o,t)},userHasPlan:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=t.owns_paid_team,n=t.subscription_plan;return!!r||void 0!==n&&void 0!==n.slug&&"free"!==n.slug&&(!e||e===n.slug)},teamHasPlan:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=t.subscription_plan;return void 0!==r&&void 0!==r.slug&&"free"!==r.slug&&(!e||e===r.slug)}};return e},marketplace:function(t){return{purchaseForTeam:function(e){return t.post("/marketplace/purchase-for-team",e)},submitPurchaseData:function(e){return t.post("/marketplace/purchase-data",e)},receipt:function(e){return t.get("/marketplace/purchase-history/".concat(e,"/receipt"))}}},updateNotifications:function(t){var e={getLatest:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10;return t.get("/update-notifications",{params:{limit:e}})}};return Sn(Sn({},e),{})}},On={users:function(t){return en("/admin/users",t)},teams:function(t){return en("/admin/teams",t)}},An=function(t){var e=t.apiUrl,r=function(t){var e=t.apiUrl,r=void 0===e?"":e,o=n().create({baseURL:"".concat(r,"/api"),crossDomain:!0,headers:{common:{Accept:"application/json","Content-Type":"application/json","X-Requested-With":"XMLHttpRequest","Access-Control-Allow-Origin":"*"}}});"undefined"!=typeof window&&window.FL_ASSISTANT_CONFIG&&window.FL_ASSISTANT_CONFIG.name&&(o.defaults.headers.common["X-Application-Name"]=window.FL_ASSISTANT_CONFIG.name,o.defaults.headers.common["X-Application-Version"]=window.FL_ASSISTANT_CONFIG.version),o.interceptors.request.use((function(t){return Pt()&&(t.headers.Authorization="Bearer "+xt()),"undefined"!=typeof FormData&&t.data instanceof FormData&&(t.headers.common["Content-Type"]="multipart/form-data"),t}),Y.reject);var i=[],a=!1;return o.interceptors.response.use((function(t){return t}),(function(t){var e=xt(),r=t.config,n=t.response;return e&&n&&[401].includes(n.status)&&!r.url.includes("/iam/")?(a||(a=!0,Vt(o).refresh().then((function(){i.map((function(t){t.config.headers.Authorization="Bearer "+xt(),t.resolve(o(t.config))}))})).finally((function(){i=[],a=!1}))),new Y((function(t,e){i.push({config:r,resolve:t,reject:e})}))):Y.reject(t)})),o}({apiUrl:void 0===e?"":e}),o={http:r,session:Wt,admin:{}};for(var i in jn)o[i]=jn[i](r);for(var a in On)o.admin[a]=On[a](r);return o};window.FL=window.FL||{},FL.vendors=FL.vendors||{},FL.vendors.BBCloud=t})()})();