gap-nodejs-sdk 1.0.12 → 1.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/gap-sdk.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.GapSdk=e():t.GapSdk=e()}(self,(()=>(()=>{var t={669:(t,e,i)=>{t.exports=i(609)},448:(t,e,i)=>{"use strict";var r=i(867),n=i(26),o=i(372),s=i(327),a=i(97),u=i(109),c=i(985),d=i(874),h=i(648),l=i(644),p=i(205);t.exports=function(t){return new Promise((function(e,i){var f,v=t.data,y=t.headers,m=t.responseType;function g(){t.cancelToken&&t.cancelToken.unsubscribe(f),t.signal&&t.signal.removeEventListener("abort",f)}r.isFormData(v)&&r.isStandardBrowserEnv()&&delete y["Content-Type"];var b=new XMLHttpRequest;if(t.auth){var O=t.auth.username||"",E=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";y.Authorization="Basic "+btoa(O+":"+E)}var x=a(t.baseURL,t.url);function w(){if(b){var r="getAllResponseHeaders"in b?u(b.getAllResponseHeaders()):null,o={data:m&&"text"!==m&&"json"!==m?b.response:b.responseText,status:b.status,statusText:b.statusText,headers:r,config:t,request:b};n((function(t){e(t),g()}),(function(t){i(t),g()}),o),b=null}}if(b.open(t.method.toUpperCase(),s(x,t.params,t.paramsSerializer),!0),b.timeout=t.timeout,"onloadend"in b?b.onloadend=w:b.onreadystatechange=function(){b&&4===b.readyState&&(0!==b.status||b.responseURL&&0===b.responseURL.indexOf("file:"))&&setTimeout(w)},b.onabort=function(){b&&(i(new h("Request aborted",h.ECONNABORTED,t,b)),b=null)},b.onerror=function(){i(new h("Network Error",h.ERR_NETWORK,t,b,b)),b=null},b.ontimeout=function(){var e=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded",r=t.transitional||d;t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),i(new h(e,r.clarifyTimeoutError?h.ETIMEDOUT:h.ECONNABORTED,t,b)),b=null},r.isStandardBrowserEnv()){var S=(t.withCredentials||c(x))&&t.xsrfCookieName?o.read(t.xsrfCookieName):void 0;S&&(y[t.xsrfHeaderName]=S)}"setRequestHeader"in b&&r.forEach(y,(function(t,e){void 0===v&&"content-type"===e.toLowerCase()?delete y[e]:b.setRequestHeader(e,t)})),r.isUndefined(t.withCredentials)||(b.withCredentials=!!t.withCredentials),m&&"json"!==m&&(b.responseType=t.responseType),"function"==typeof t.onDownloadProgress&&b.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&b.upload&&b.upload.addEventListener("progress",t.onUploadProgress),(t.cancelToken||t.signal)&&(f=function(t){b&&(i(!t||t&&t.type?new l:t),b.abort(),b=null)},t.cancelToken&&t.cancelToken.subscribe(f),t.signal&&(t.signal.aborted?f():t.signal.addEventListener("abort",f))),v||(v=null);var R=p(x);R&&-1===["http","https","file"].indexOf(R)?i(new h("Unsupported protocol "+R+":",h.ERR_BAD_REQUEST,t)):b.send(v)}))}},609:(t,e,i)=>{"use strict";var r=i(867),n=i(849),o=i(321),s=i(185),a=function t(e){var i=new o(e),a=n(o.prototype.request,i);return r.extend(a,o.prototype,i),r.extend(a,i),a.create=function(i){return t(s(e,i))},a}(i(546));a.Axios=o,a.CanceledError=i(644),a.CancelToken=i(972),a.isCancel=i(502),a.VERSION=i(288).version,a.toFormData=i(675),a.AxiosError=i(648),a.Cancel=a.CanceledError,a.all=function(t){return Promise.all(t)},a.spread=i(713),a.isAxiosError=i(268),t.exports=a,t.exports.default=a},972:(t,e,i)=>{"use strict";var r=i(644);function n(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise((function(t){e=t}));var i=this;this.promise.then((function(t){if(i._listeners){var e,r=i._listeners.length;for(e=0;e<r;e++)i._listeners[e](t);i._listeners=null}})),this.promise.then=function(t){var e,r=new Promise((function(t){i.subscribe(t),e=t})).then(t);return r.cancel=function(){i.unsubscribe(e)},r},t((function(t){i.reason||(i.reason=new r(t),e(i.reason))}))}n.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},n.prototype.subscribe=function(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]},n.prototype.unsubscribe=function(t){if(this._listeners){var e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}},n.source=function(){var t;return{token:new n((function(e){t=e})),cancel:t}},t.exports=n},644:(t,e,i)=>{"use strict";var r=i(648);function n(t){r.call(this,null==t?"canceled":t,r.ERR_CANCELED),this.name="CanceledError"}i(867).inherits(n,r,{__CANCEL__:!0}),t.exports=n},502:t=>{"use strict";t.exports=function(t){return!(!t||!t.__CANCEL__)}},321:(t,e,i)=>{"use strict";var r=i(867),n=i(327),o=i(782),s=i(572),a=i(185),u=i(97),c=i(875),d=c.validators;function h(t){this.defaults=t,this.interceptors={request:new o,response:new o}}h.prototype.request=function(t,e){"string"==typeof t?(e=e||{}).url=t:e=t||{},(e=a(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var i=e.transitional;void 0!==i&&c.assertOptions(i,{silentJSONParsing:d.transitional(d.boolean),forcedJSONParsing:d.transitional(d.boolean),clarifyTimeoutError:d.transitional(d.boolean)},!1);var r=[],n=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(n=n&&t.synchronous,r.unshift(t.fulfilled,t.rejected))}));var o,u=[];if(this.interceptors.response.forEach((function(t){u.push(t.fulfilled,t.rejected)})),!n){var h=[s,void 0];for(Array.prototype.unshift.apply(h,r),h=h.concat(u),o=Promise.resolve(e);h.length;)o=o.then(h.shift(),h.shift());return o}for(var l=e;r.length;){var p=r.shift(),f=r.shift();try{l=p(l)}catch(t){f(t);break}}try{o=s(l)}catch(t){return Promise.reject(t)}for(;u.length;)o=o.then(u.shift(),u.shift());return o},h.prototype.getUri=function(t){t=a(this.defaults,t);var e=u(t.baseURL,t.url);return n(e,t.params,t.paramsSerializer)},r.forEach(["delete","get","head","options"],(function(t){h.prototype[t]=function(e,i){return this.request(a(i||{},{method:t,url:e,data:(i||{}).data}))}})),r.forEach(["post","put","patch"],(function(t){function e(e){return function(i,r,n){return this.request(a(n||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:i,data:r}))}}h.prototype[t]=e(),h.prototype[t+"Form"]=e(!0)})),t.exports=h},648:(t,e,i)=>{"use strict";var r=i(867);function n(t,e,i,r,n){Error.call(this),this.message=t,this.name="AxiosError",e&&(this.code=e),i&&(this.config=i),r&&(this.request=r),n&&(this.response=n)}r.inherits(n,Error,{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}}});var o=n.prototype,s={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED"].forEach((function(t){s[t]={value:t}})),Object.defineProperties(n,s),Object.defineProperty(o,"isAxiosError",{value:!0}),n.from=function(t,e,i,s,a,u){var c=Object.create(o);return r.toFlatObject(t,c,(function(t){return t!==Error.prototype})),n.call(c,t.message,e,i,s,a),c.name=t.name,u&&Object.assign(c,u),c},t.exports=n},782:(t,e,i)=>{"use strict";var r=i(867);function n(){this.handlers=[]}n.prototype.use=function(t,e,i){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!i&&i.synchronous,runWhen:i?i.runWhen:null}),this.handlers.length-1},n.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},n.prototype.forEach=function(t){r.forEach(this.handlers,(function(e){null!==e&&t(e)}))},t.exports=n},97:(t,e,i)=>{"use strict";var r=i(793),n=i(303);t.exports=function(t,e){return t&&!r(e)?n(t,e):e}},572:(t,e,i)=>{"use strict";var r=i(867),n=i(527),o=i(502),s=i(546),a=i(644);function u(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new a}t.exports=function(t){return u(t),t.headers=t.headers||{},t.data=n.call(t,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 u(t),e.data=n.call(t,e.data,e.headers,t.transformResponse),e}),(function(e){return o(e)||(u(t),e&&e.response&&(e.response.data=n.call(t,e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)}))}},185:(t,e,i)=>{"use strict";var r=i(867);t.exports=function(t,e){e=e||{};var i={};function n(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 o(i){return r.isUndefined(e[i])?r.isUndefined(t[i])?void 0:n(void 0,t[i]):n(t[i],e[i])}function s(t){if(!r.isUndefined(e[t]))return n(void 0,e[t])}function a(i){return r.isUndefined(e[i])?r.isUndefined(t[i])?void 0:n(void 0,t[i]):n(void 0,e[i])}function u(i){return i in e?n(t[i],e[i]):i in t?n(void 0,t[i]):void 0}var c={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:u};return r.forEach(Object.keys(t).concat(Object.keys(e)),(function(t){var e=c[t]||o,n=e(t);r.isUndefined(n)&&e!==u||(i[t]=n)})),i}},26:(t,e,i)=>{"use strict";var r=i(648);t.exports=function(t,e,i){var n=i.config.validateStatus;i.status&&n&&!n(i.status)?e(new r("Request failed with status code "+i.status,[r.ERR_BAD_REQUEST,r.ERR_BAD_RESPONSE][Math.floor(i.status/100)-4],i.config,i.request,i)):t(i)}},527:(t,e,i)=>{"use strict";var r=i(867),n=i(546);t.exports=function(t,e,i){var o=this||n;return r.forEach(i,(function(i){t=i.call(o,t,e)})),t}},546:(t,e,i)=>{"use strict";var r=i(867),n=i(16),o=i(648),s=i(874),a=i(675),u={"Content-Type":"application/x-www-form-urlencoded"};function c(t,e){!r.isUndefined(t)&&r.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var d,h={transitional:s,adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(d=i(448)),d),transformRequest:[function(t,e){if(n(e,"Accept"),n(e,"Content-Type"),r.isFormData(t)||r.isArrayBuffer(t)||r.isBuffer(t)||r.isStream(t)||r.isFile(t)||r.isBlob(t))return t;if(r.isArrayBufferView(t))return t.buffer;if(r.isURLSearchParams(t))return c(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString();var i,o=r.isObject(t),s=e&&e["Content-Type"];if((i=r.isFileList(t))||o&&"multipart/form-data"===s){var u=this.env&&this.env.FormData;return a(i?{"files[]":t}:t,u&&new u)}return o||"application/json"===s?(c(e,"application/json"),function(t,e,i){if(r.isString(t))try{return(0,JSON.parse)(t),r.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(0,JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){var e=this.transitional||h.transitional,i=e&&e.silentJSONParsing,n=e&&e.forcedJSONParsing,s=!i&&"json"===this.responseType;if(s||n&&r.isString(t)&&t.length)try{return JSON.parse(t)}catch(t){if(s){if("SyntaxError"===t.name)throw o.from(t,o.ERR_BAD_RESPONSE,this,null,this.response);throw t}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:i(623)},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],(function(t){h.headers[t]={}})),r.forEach(["post","put","patch"],(function(t){h.headers[t]=r.merge(u)})),t.exports=h},874:t=>{"use strict";t.exports={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}},288:t=>{t.exports={version:"0.27.2"}},849:t=>{"use strict";t.exports=function(t,e){return function(){for(var i=new Array(arguments.length),r=0;r<i.length;r++)i[r]=arguments[r];return t.apply(e,i)}}},327:(t,e,i)=>{"use strict";var r=i(867);function n(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,i){if(!e)return t;var o;if(i)o=i(e);else if(r.isURLSearchParams(e))o=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(n(e)+"="+n(t))})))})),o=s.join("&")}if(o){var a=t.indexOf("#");-1!==a&&(t=t.slice(0,a)),t+=(-1===t.indexOf("?")?"?":"&")+o}return t}},303:t=>{"use strict";t.exports=function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}},372:(t,e,i)=>{"use strict";var r=i(867);t.exports=r.isStandardBrowserEnv()?{write:function(t,e,i,n,o,s){var a=[];a.push(t+"="+encodeURIComponent(e)),r.isNumber(i)&&a.push("expires="+new Date(i).toGMTString()),r.isString(n)&&a.push("path="+n),r.isString(o)&&a.push("domain="+o),!0===s&&a.push("secure"),document.cookie=a.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(){}}},793:t=>{"use strict";t.exports=function(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}},268:(t,e,i)=>{"use strict";var r=i(867);t.exports=function(t){return r.isObject(t)&&!0===t.isAxiosError}},985:(t,e,i)=>{"use strict";var r=i(867);t.exports=r.isStandardBrowserEnv()?function(){var t,e=/(msie|trident)/i.test(navigator.userAgent),i=document.createElement("a");function n(t){var r=t;return e&&(i.setAttribute("href",r),r=i.href),i.setAttribute("href",r),{href:i.href,protocol:i.protocol?i.protocol.replace(/:$/,""):"",host:i.host,search:i.search?i.search.replace(/^\?/,""):"",hash:i.hash?i.hash.replace(/^#/,""):"",hostname:i.hostname,port:i.port,pathname:"/"===i.pathname.charAt(0)?i.pathname:"/"+i.pathname}}return t=n(window.location.href),function(e){var i=r.isString(e)?n(e):e;return i.protocol===t.protocol&&i.host===t.host}}():function(){return!0}},16:(t,e,i)=>{"use strict";var r=i(867);t.exports=function(t,e){r.forEach(t,(function(i,r){r!==e&&r.toUpperCase()===e.toUpperCase()&&(t[e]=i,delete t[r])}))}},623:t=>{t.exports=null},109:(t,e,i)=>{"use strict";var r=i(867),n=["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,i,o,s={};return t?(r.forEach(t.split("\n"),(function(t){if(o=t.indexOf(":"),e=r.trim(t.substr(0,o)).toLowerCase(),i=r.trim(t.substr(o+1)),e){if(s[e]&&n.indexOf(e)>=0)return;s[e]="set-cookie"===e?(s[e]?s[e]:[]).concat([i]):s[e]?s[e]+", "+i:i}})),s):s}},205:t=>{"use strict";t.exports=function(t){var e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}},713:t=>{"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}},675:(t,e,i)=>{"use strict";var r=i(867);t.exports=function(t,e){e=e||new FormData;var i=[];function n(t){return null===t?"":r.isDate(t)?t.toISOString():r.isArrayBuffer(t)||r.isTypedArray(t)?"function"==typeof Blob?new Blob([t]):Buffer.from(t):t}return function t(o,s){if(r.isPlainObject(o)||r.isArray(o)){if(-1!==i.indexOf(o))throw Error("Circular reference detected in "+s);i.push(o),r.forEach(o,(function(i,o){if(!r.isUndefined(i)){var a,u=s?s+"."+o:o;if(i&&!s&&"object"==typeof i)if(r.endsWith(o,"{}"))i=JSON.stringify(i);else if(r.endsWith(o,"[]")&&(a=r.toArray(i)))return void a.forEach((function(t){!r.isUndefined(t)&&e.append(u,n(t))}));t(i,u)}})),i.pop()}else e.append(s,n(o))}(t),e}},875:(t,e,i)=>{"use strict";var r=i(288).version,n=i(648),o={};["object","boolean","number","function","string","symbol"].forEach((function(t,e){o[t]=function(i){return typeof i===t||"a"+(e<1?"n ":" ")+t}}));var s={};o.transitional=function(t,e,i){function o(t,e){return"[Axios v"+r+"] Transitional option '"+t+"'"+e+(i?". "+i:"")}return function(i,r,a){if(!1===t)throw new n(o(r," has been removed"+(e?" in "+e:"")),n.ERR_DEPRECATED);return e&&!s[r]&&(s[r]=!0,console.warn(o(r," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(i,r,a)}},t.exports={assertOptions:function(t,e,i){if("object"!=typeof t)throw new n("options must be an object",n.ERR_BAD_OPTION_VALUE);for(var r=Object.keys(t),o=r.length;o-- >0;){var s=r[o],a=e[s];if(a){var u=t[s],c=void 0===u||a(u,s,t);if(!0!==c)throw new n("option "+s+" must be "+c,n.ERR_BAD_OPTION_VALUE)}else if(!0!==i)throw new n("Unknown option "+s,n.ERR_BAD_OPTION)}},validators:o}},867:(t,e,i)=>{"use strict";var r,n=i(849),o=Object.prototype.toString,s=(r=Object.create(null),function(t){var e=o.call(t);return r[e]||(r[e]=e.slice(8,-1).toLowerCase())});function a(t){return t=t.toLowerCase(),function(e){return s(e)===t}}function u(t){return Array.isArray(t)}function c(t){return void 0===t}var d=a("ArrayBuffer");function h(t){return null!==t&&"object"==typeof t}function l(t){if("object"!==s(t))return!1;var e=Object.getPrototypeOf(t);return null===e||e===Object.prototype}var p=a("Date"),f=a("File"),v=a("Blob"),y=a("FileList");function m(t){return"[object Function]"===o.call(t)}var g=a("URLSearchParams");function b(t,e){if(null!=t)if("object"!=typeof t&&(t=[t]),u(t))for(var i=0,r=t.length;i<r;i++)e.call(null,t[i],i,t);else for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.call(null,t[n],n,t)}var O,E=(O="undefined"!=typeof Uint8Array&&Object.getPrototypeOf(Uint8Array),function(t){return O&&t instanceof O});t.exports={isArray:u,isArrayBuffer:d,isBuffer:function(t){return null!==t&&!c(t)&&null!==t.constructor&&!c(t.constructor)&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)},isFormData:function(t){var e="[object FormData]";return t&&("function"==typeof FormData&&t instanceof FormData||o.call(t)===e||m(t.toString)&&t.toString()===e)},isArrayBufferView:function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&d(t.buffer)},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isObject:h,isPlainObject:l,isUndefined:c,isDate:p,isFile:f,isBlob:v,isFunction:m,isStream:function(t){return h(t)&&m(t.pipe)},isURLSearchParams:g,isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:b,merge:function t(){var e={};function i(i,r){l(e[r])&&l(i)?e[r]=t(e[r],i):l(i)?e[r]=t({},i):u(i)?e[r]=i.slice():e[r]=i}for(var r=0,n=arguments.length;r<n;r++)b(arguments[r],i);return e},extend:function(t,e,i){return b(e,(function(e,r){t[r]=i&&"function"==typeof e?n(e,i):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},inherits:function(t,e,i,r){t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,i&&Object.assign(t.prototype,i)},toFlatObject:function(t,e,i){var r,n,o,s={};e=e||{};do{for(n=(r=Object.getOwnPropertyNames(t)).length;n-- >0;)s[o=r[n]]||(e[o]=t[o],s[o]=!0);t=Object.getPrototypeOf(t)}while(t&&(!i||i(t,e))&&t!==Object.prototype);return e},kindOf:s,kindOfTest:a,endsWith:function(t,e,i){t=String(t),(void 0===i||i>t.length)&&(i=t.length),i-=e.length;var r=t.indexOf(e,i);return-1!==r&&r===i},toArray:function(t){if(!t)return null;var e=t.length;if(c(e))return null;for(var i=new Array(e);e-- >0;)i[e]=t[e];return i},isTypedArray:E,isFileList:y}},484:function(t){t.exports=function(){"use strict";var t=6e4,e=36e5,i="millisecond",r="second",n="minute",o="hour",s="day",a="week",u="month",c="quarter",d="year",h="date",l="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,f=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,v={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},y=function(t,e,i){var r=String(t);return!r||r.length>=e?t:""+Array(e+1-r.length).join(i)+t},m={s:y,z:function(t){var e=-t.utcOffset(),i=Math.abs(e),r=Math.floor(i/60),n=i%60;return(e<=0?"+":"-")+y(r,2,"0")+":"+y(n,2,"0")},m:function t(e,i){if(e.date()<i.date())return-t(i,e);var r=12*(i.year()-e.year())+(i.month()-e.month()),n=e.clone().add(r,u),o=i-n<0,s=e.clone().add(r+(o?-1:1),u);return+(-(r+(i-n)/(o?n-s:s-n))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:u,y:d,w:a,d:s,D:h,h:o,m:n,s:r,ms:i,Q:c}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},g="en",b={};b[g]=v;var O=function(t){return t instanceof S},E=function t(e,i,r){var n;if(!e)return g;if("string"==typeof e){var o=e.toLowerCase();b[o]&&(n=o),i&&(b[o]=i,n=o);var s=e.split("-");if(!n&&s.length>1)return t(s[0])}else{var a=e.name;b[a]=e,n=a}return!r&&n&&(g=n),n||!r&&g},x=function(t,e){if(O(t))return t.clone();var i="object"==typeof e?e:{};return i.date=t,i.args=arguments,new S(i)},w=m;w.l=E,w.i=O,w.w=function(t,e){return x(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var S=function(){function v(t){this.$L=E(t.locale,null,!0),this.parse(t)}var y=v.prototype;return y.parse=function(t){this.$d=function(t){var e=t.date,i=t.utc;if(null===e)return new Date(NaN);if(w.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match(p);if(r){var n=r[2]-1||0,o=(r[7]||"0").substring(0,3);return i?new Date(Date.UTC(r[1],n,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)):new Date(r[1],n,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)}}return new Date(e)}(t),this.$x=t.x||{},this.init()},y.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},y.$utils=function(){return w},y.isValid=function(){return!(this.$d.toString()===l)},y.isSame=function(t,e){var i=x(t);return this.startOf(e)<=i&&i<=this.endOf(e)},y.isAfter=function(t,e){return x(t)<this.startOf(e)},y.isBefore=function(t,e){return this.endOf(e)<x(t)},y.$g=function(t,e,i){return w.u(t)?this[e]:this.set(i,t)},y.unix=function(){return Math.floor(this.valueOf()/1e3)},y.valueOf=function(){return this.$d.getTime()},y.startOf=function(t,e){var i=this,c=!!w.u(e)||e,l=w.p(t),p=function(t,e){var r=w.w(i.$u?Date.UTC(i.$y,e,t):new Date(i.$y,e,t),i);return c?r:r.endOf(s)},f=function(t,e){return w.w(i.toDate()[t].apply(i.toDate("s"),(c?[0,0,0,0]:[23,59,59,999]).slice(e)),i)},v=this.$W,y=this.$M,m=this.$D,g="set"+(this.$u?"UTC":"");switch(l){case d:return c?p(1,0):p(31,11);case u:return c?p(1,y):p(0,y+1);case a:var b=this.$locale().weekStart||0,O=(v<b?v+7:v)-b;return p(c?m-O:m+(6-O),y);case s:case h:return f(g+"Hours",0);case o:return f(g+"Minutes",1);case n:return f(g+"Seconds",2);case r:return f(g+"Milliseconds",3);default:return this.clone()}},y.endOf=function(t){return this.startOf(t,!1)},y.$set=function(t,e){var a,c=w.p(t),l="set"+(this.$u?"UTC":""),p=(a={},a[s]=l+"Date",a[h]=l+"Date",a[u]=l+"Month",a[d]=l+"FullYear",a[o]=l+"Hours",a[n]=l+"Minutes",a[r]=l+"Seconds",a[i]=l+"Milliseconds",a)[c],f=c===s?this.$D+(e-this.$W):e;if(c===u||c===d){var v=this.clone().set(h,1);v.$d[p](f),v.init(),this.$d=v.set(h,Math.min(this.$D,v.daysInMonth())).$d}else p&&this.$d[p](f);return this.init(),this},y.set=function(t,e){return this.clone().$set(t,e)},y.get=function(t){return this[w.p(t)]()},y.add=function(i,c){var h,l=this;i=Number(i);var p=w.p(c),f=function(t){var e=x(l);return w.w(e.date(e.date()+Math.round(t*i)),l)};if(p===u)return this.set(u,this.$M+i);if(p===d)return this.set(d,this.$y+i);if(p===s)return f(1);if(p===a)return f(7);var v=(h={},h[n]=t,h[o]=e,h[r]=1e3,h)[p]||1,y=this.$d.getTime()+i*v;return w.w(y,this)},y.subtract=function(t,e){return this.add(-1*t,e)},y.format=function(t){var e=this,i=this.$locale();if(!this.isValid())return i.invalidDate||l;var r=t||"YYYY-MM-DDTHH:mm:ssZ",n=w.z(this),o=this.$H,s=this.$m,a=this.$M,u=i.weekdays,c=i.months,d=function(t,i,n,o){return t&&(t[i]||t(e,r))||n[i].slice(0,o)},h=function(t){return w.s(o%12||12,t,"0")},p=i.meridiem||function(t,e,i){var r=t<12?"AM":"PM";return i?r.toLowerCase():r},v={YY:String(this.$y).slice(-2),YYYY:this.$y,M:a+1,MM:w.s(a+1,2,"0"),MMM:d(i.monthsShort,a,c,3),MMMM:d(c,a),D:this.$D,DD:w.s(this.$D,2,"0"),d:String(this.$W),dd:d(i.weekdaysMin,this.$W,u,2),ddd:d(i.weekdaysShort,this.$W,u,3),dddd:u[this.$W],H:String(o),HH:w.s(o,2,"0"),h:h(1),hh:h(2),a:p(o,s,!0),A:p(o,s,!1),m:String(s),mm:w.s(s,2,"0"),s:String(this.$s),ss:w.s(this.$s,2,"0"),SSS:w.s(this.$ms,3,"0"),Z:n};return r.replace(f,(function(t,e){return e||v[t]||n.replace(":","")}))},y.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},y.diff=function(i,h,l){var p,f=w.p(h),v=x(i),y=(v.utcOffset()-this.utcOffset())*t,m=this-v,g=w.m(this,v);return g=(p={},p[d]=g/12,p[u]=g,p[c]=g/3,p[a]=(m-y)/6048e5,p[s]=(m-y)/864e5,p[o]=m/e,p[n]=m/t,p[r]=m/1e3,p)[f]||m,l?g:w.a(g)},y.daysInMonth=function(){return this.endOf(u).$D},y.$locale=function(){return b[this.$L]},y.locale=function(t,e){if(!t)return this.$L;var i=this.clone(),r=E(t,e,!0);return r&&(i.$L=r),i},y.clone=function(){return w.w(this.$d,this)},y.toDate=function(){return new Date(this.valueOf())},y.toJSON=function(){return this.isValid()?this.toISOString():null},y.toISOString=function(){return this.$d.toISOString()},y.toString=function(){return this.$d.toUTCString()},v}(),R=S.prototype;return x.prototype=R,[["$ms",i],["$s",r],["$m",n],["$H",o],["$W",s],["$M",u],["$y",d],["$D",h]].forEach((function(t){R[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),x.extend=function(t,e){return t.$i||(t(e,S,x),t.$i=!0),x},x.locale=E,x.isDayjs=O,x.unix=function(t){return x(1e3*t)},x.en=b[g],x.Ls=b,x.p={},x}()},823:t=>{t.exports=function(t,e,i,r){var n=new Blob(void 0!==r?[r,t]:[t],{type:i||"application/octet-stream"});if(void 0!==window.navigator.msSaveBlob)window.navigator.msSaveBlob(n,e);else{var o=window.URL&&window.URL.createObjectURL?window.URL.createObjectURL(n):window.webkitURL.createObjectURL(n),s=document.createElement("a");s.style.display="none",s.href=o,s.setAttribute("download",e),void 0===s.download&&s.setAttribute("target","_blank"),document.body.appendChild(s),s.click(),setTimeout((function(){document.body.removeChild(s),window.URL.revokeObjectURL(o)}),200)}}},587:t=>{"use strict";function e(t,e){return Object.prototype.hasOwnProperty.call(t,e)}t.exports=function(t,i,r,n){i=i||"&",r=r||"=";var o={};if("string"!=typeof t||0===t.length)return o;var s=/\+/g;t=t.split(i);var a=1e3;n&&"number"==typeof n.maxKeys&&(a=n.maxKeys);var u=t.length;a>0&&u>a&&(u=a);for(var c=0;c<u;++c){var d,h,l,p,f=t[c].replace(s,"%20"),v=f.indexOf(r);v>=0?(d=f.substr(0,v),h=f.substr(v+1)):(d=f,h=""),l=decodeURIComponent(d),p=decodeURIComponent(h),e(o,l)?Array.isArray(o[l])?o[l].push(p):o[l]=[o[l],p]:o[l]=p}return o}},361:t=>{"use strict";var e=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}};t.exports=function(t,i,r,n){return i=i||"&",r=r||"=",null===t&&(t=void 0),"object"==typeof t?Object.keys(t).map((function(n){var o=encodeURIComponent(e(n))+r;return Array.isArray(t[n])?t[n].map((function(t){return o+encodeURIComponent(e(t))})).join(i):o+encodeURIComponent(e(t[n]))})).join(i):n?encodeURIComponent(e(n))+r+encodeURIComponent(e(t)):""}},673:(t,e,i)=>{"use strict";e.decode=e.parse=i(587),e.encode=e.stringify=i(361)}},e={};function i(r){var n=e[r];if(void 0!==n)return n.exports;var o=e[r]={exports:{}};return t[r].call(o.exports,o,o.exports,i),o.exports}i.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return i.d(e,{a:e}),e},i.d=(t,e)=>{for(var r in e)i.o(e,r)&&!i.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),i.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";i.r(r),i.d(r,{Gap:()=>tt,GapApiVersion:()=>t,GapHeader:()=>e,Platform:()=>o,UserAgent:()=>n,default:()=>et});var t,e,n,o,s={};function a(t,e,i,r){return new(i||(i=Promise))((function(n,o){function s(t){try{u(r.next(t))}catch(t){o(t)}}function a(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?n(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(s,a)}u((r=r.apply(t,e||[])).next())}))}i.r(s),i.d(s,{GapError:()=>u,HttpInternalError:()=>v,HttpMaxRetriesError:()=>l,HttpRequestError:()=>h,HttpResponseError:()=>p,HttpRetryableError:()=>f,HttpThrottlingError:()=>y,MissingDataContextError:()=>c,UninitializedContextError:()=>d}),function(t){t.V1="1.0.0"}(t||(t={})),function(t){t.GClientId="G-ClientID"}(e||(e={})),function(t){t.IOS="IOS",t.ANDROID="ANDROID",t.CHROME="CHROME",t.SAFARI="SAFARI"}(n||(n={})),function(t){t.ANDROID="Android",t.IOS="iOS",t.WEB="Web",t.WINDOW="Window"}(o||(o={})),Object.create,Object.create;class u extends Error{constructor(...t){super(...t),Object.setPrototypeOf(this,new.target.prototype)}}class c extends u{}class d extends u{}class h extends u{}class l extends u{}class p extends u{constructor({message:t,code:e,statusText:i,body:r,headers:n}){super(t),this.response={code:e,statusText:i,body:r,headers:n}}}class f extends p{}class v extends f{}class y extends f{constructor(t){var{retryAfter:e}=t;super(function(t,e){var i={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(i[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(r=Object.getOwnPropertySymbols(t);n<r.length;n++)e.indexOf(r[n])<0&&Object.prototype.propertyIsEnumerable.call(t,r[n])&&(i[r[n]]=t[r[n]])}return i}(t,["retryAfter"])),this.response.retryAfter=e}}const m={API_KEY:"",API_SECRET_KEY:"",G_CLIENTID:"",USER_AGENT:"",API_VERSION:t.V1,initialize:function(t){const e=[];if(t.API_KEY.length||e.push("API_KEY"),t.API_SECRET_KEY.length||e.push("API_SECRET_KEY"),t.API_SECRET_KEY.length||e.push("G_CLIENTID"),e.length)throw new c(`Cannot initialize GAP Library. Missing values for: ${e.join(", ")}`);this.API_KEY=t.API_KEY,this.API_SECRET_KEY=t.API_SECRET_KEY,this.G_CLIENTID=t.G_CLIENTID,this.API_VERSION=t.API_VERSION},throwIfUninitialized:function(){if(!this.API_KEY||0===this.API_KEY.length)throw new d("Context has not been properly initialized. Please call the .initialize() method to setup your app context object.")}},g="/v1/pos/printer/site/list";var b,O,E=i(669),x=i.n(E),w=i(673);class S{constructor(){this.processedQuery={}}static stringify(t){return t&&0!==Object.keys(t).length?(new S).putAll(t).stringify():""}putAll(t){return Object.entries(t).forEach((([t,e])=>this.put(t,e))),this}put(t,e){Array.isArray(e)?this.putArray(t,e):e.constructor===Object?this.putObject(t,e):this.putSimple(t,e)}putArray(t,e){this.processedQuery[`${t}[]`]=e}putObject(t,e){Object.entries(e).forEach((([e,i])=>{this.processedQuery[`${t}[${e}]`]=i}))}putSimple(t,e){this.processedQuery[t]=e}stringify(){return`?${w.stringify(this.processedQuery)}`}}!function(t){t.Get="GET",t.Post="POST",t.Put="PUT",t.Patch="PATCH",t.Delete="DELETE",t.Head="HEAD",t.Options="OPTIONS",t.Connect="CONNECT"}(b||(b={})),function(t){t[t.Continue=100]="Continue",t[t.SwitchingProtocols=101]="SwitchingProtocols",t[t.Ok=200]="Ok",t[t.Created=201]="Created",t[t.Accepted=202]="Accepted",t[t.NonAuthoritativeInformation=203]="NonAuthoritativeInformation",t[t.NoContent=204]="NoContent",t[t.ResetContent=205]="ResetContent",t[t.PartialContent=206]="PartialContent",t[t.MultipleChoices=300]="MultipleChoices",t[t.MovedPermanently=301]="MovedPermanently",t[t.Found=302]="Found",t[t.SeeOther=303]="SeeOther",t[t.NotModified=304]="NotModified",t[t.UseProxy=305]="UseProxy",t[t.TemporaryRedirect=307]="TemporaryRedirect",t[t.BadRequest=400]="BadRequest",t[t.Unauthorized=401]="Unauthorized",t[t.PaymentRequired=402]="PaymentRequired",t[t.Forbidden=403]="Forbidden",t[t.NotFound=404]="NotFound",t[t.MethodNotAllowed=405]="MethodNotAllowed",t[t.NotAcceptable=406]="NotAcceptable",t[t.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",t[t.RequestTimeout=408]="RequestTimeout",t[t.Conflict=409]="Conflict",t[t.Gone=410]="Gone",t[t.LengthRequired=411]="LengthRequired",t[t.PreconditionFailed=412]="PreconditionFailed",t[t.RequestEntityTooLarge=413]="RequestEntityTooLarge",t[t.RequestUriTooLong=414]="RequestUriTooLong",t[t.UnsupportedMediaType=415]="UnsupportedMediaType",t[t.RequestedRangeNotSatisfiable=416]="RequestedRangeNotSatisfiable",t[t.ExpectationFailed=417]="ExpectationFailed",t[t.ImATeapot=418]="ImATeapot",t[t.UnprocessableEntity=422]="UnprocessableEntity",t[t.TooManyRequests=429]="TooManyRequests",t[t.InternalServerError=500]="InternalServerError",t[t.NotImplemented=501]="NotImplemented",t[t.BadGateway=502]="BadGateway",t[t.ServiceUnavailable=503]="ServiceUnavailable",t[t.GatewayTimeout=504]="GatewayTimeout",t[t.HttpVersionNotSupported=505]="HttpVersionNotSupported"}(O||(O={}));class R{constructor(t,e,i){this.RETRY_WAIT_TIME=1e3,this.domain=t,this.axios=x().create({headers:{"G-ClientID":e,Authorization:`Bearer ${i}`}})}get(t){return a(this,void 0,void 0,(function*(){return this.request(Object.assign({method:b.Get},t))}))}post(t){return a(this,void 0,void 0,(function*(){return this.request(Object.assign({method:b.Post},t))}))}put(t){return a(this,void 0,void 0,(function*(){return this.request(Object.assign({method:b.Put},t))}))}delete(t){return a(this,void 0,void 0,(function*(){return this.request(Object.assign({method:b.Delete},t))}))}request(t){return a(this,void 0,void 0,(function*(){const e=t.tries?t.tries:1;if(e<=0)throw new h(`Number of tries must be >= 0, got ${e}`);const i={url:`${this.domain}${this.getRequestPath(t.path)}${S.stringify(t.query)}`,method:t.method.toString(),data:t.data};function r(t){return a(this,void 0,void 0,(function*(){return new Promise((e=>setTimeout(e,t)))}))}let n=0;for(;n<e;)try{return yield this.doRequest(i)}catch(t){if(n++,t instanceof f){if(n<e){let e=this.RETRY_WAIT_TIME;t instanceof y&&t.response.retryAfter&&(e=1e3*t.response.retryAfter),yield r(e);continue}if(e>1)throw new l(`Exceeded maximum retry count of ${e}. Last message: ${t.message}`)}throw t}throw new u("Unexpected flow, reached maximum HTTP tries but did not throw an error")}))}getRequestPath(t){return`/${t.replace(/^\//,"")}`}doRequest(t){return a(this,void 0,void 0,(function*(){try{const e=yield this.axios(t);if(e.status)return e.data;{const t=[];e.data.errors&&t.push(JSON.stringify(e.data.errors,null,2));const i=t.length?`:\n${t.join("\n")}`:"",r=e.headers,n=e.status,o=e.statusText;switch(!0){case e.status===O.TooManyRequests:{const t=e.headers["Retry-After"];throw new y({message:`GAP is throttling requests${i}`,code:n,statusText:o,body:e.data,headers:r,retryAfter:t?parseFloat(t):void 0})}case e.status>=O.InternalServerError:throw new v({message:`GAP internal error${i}`,code:n,statusText:o,body:e.data,headers:r});default:throw new p({message:`Received an error response (${e.status} ${e.statusText}) from GAP ${i}`,code:n,statusText:o,body:e.data,headers:r})}}}catch(t){throw t instanceof u?t:new h(`Failed to make GAP HTTP request: ${t}`)}}))}}class C{static setClient(t,e,i){if(!t||!e||!i)return console.error(new Error("Missing params init http_client"));this.client=new R(t,e,i)}}class A extends C{static postCreateAppointment(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/appointment/appointment/form/create",data:t})}))}static getCategoryListAppointment(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/gocheckin/service/site/list-by-category",query:t})}))}static getStaffListAppointment(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/gocheckin/staff/site/list",query:t})}))}}class T extends C{static getBatchHistory(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/history/site/batch-history",query:t})}))}static getBatchDetail(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/history/site/batch-detail",query:t})}))}}class k extends C{static getBusinessInfo(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/business/site/get-info",query:t})}))}static postBusinessUpdateInfo(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/business/form/update",data:t})}))}}class P extends C{static sendSms(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/call/form/send-sms",data:t})}))}}class D extends C{static getCategoryListItem(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/category/site/list-item",query:t})}))}}class _ extends C{static postCheckInFormSubmit(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/checkin/form/submit",data:t})}))}static getCheckInList(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/checkin/site/list",query:t})}))}static getCheckInReport(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/checkin/site/report",query:t})}))}static getLastCheckIn(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/checkin/site/check-update",query:t})}))}static getCheckInInfo(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/checkin/site/info",query:t})}))}}class I extends C{static getItemList(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/item/site/list",query:t})}))}static getCheckOutHistoryList(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/checkout/history/list",query:t})}))}static getCheckOutInfo(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/checkout/site/info",query:t})}))}static getCheckOutHistoryInfo(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/checkout/history/info",query:t})}))}static getCheckOutBatchCloseSummary(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/checkout/site/get-batch-close-summary",query:t})}))}static postCheckOutAddItem(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/checkout/item/add",data:t})}))}static postCheckOutRemoveItem(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/checkout/item/remove",data:t})}))}static postCheckOutSubmitOrder(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/checkout/payment/submit",data:t})}))}static postCheckOutUpdateStatus(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/checkout/form/update-status",data:t})}))}static postCheckOutUpdateOrderWithCreditCardPayment(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/checkout/form/update-order-with-credit-card-payment",data:t})}))}static postCheckOutDoAuth(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/checkout/form/do-auth",data:t})}))}static postCheckOutVoidPayment(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/checkout/form/void-payment",data:t})}))}static postCheckOutRefundPayment(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/checkout/form/refund-payment",data:t})}))}static postCheckOutAdjustTipPayment(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/checkout/form/adjust-tip",data:t})}))}static postCheckOutCloseOut(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/checkout/form/closeout",data:t})}))}static postCheckOutUpdateIsWaiting(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/checkout/form/update-is-wait",data:t})}))}static postCheckOutDiscountPromotion(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/checkout/discount/promotion",data:t})}))}static postCheckOutDiscountRedeem(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/checkout/discount/redeem",data:t})}))}static postCheckOutUpdateTipData(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/checkout/tip/update",data:t})}))}static postCheckOutItemAdjustPrice(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/checkout/item/adjust-price",data:t})}))}static postCheckOutUpdatePaymentData(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/checkout/form/update-payment-data",data:t})}))}static postCheckOutItemAddCombo(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/checkout/item/add-combo",data:t})}))}static getCheckoutResendRating(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/checkout/form/send-mercure",query:t})}))}static postCustomerAchAvailable(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/ach/form/check-customer",data:t})}))}static postAchResend(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/ach/form/resend-transaction",data:t})}))}static postAchVoid(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/ach/form/cancel-transaction",data:t})}))}static postUpdateOrderSuccessToSettled(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/checkout/form/update-success-to-settled",data:t})}))}static postCalculateTax(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/checkout/form/calculate-tax",data:t})}))}static postCalculatePayment(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/checkout/form/calculate-payment",data:t})}))}}class $ extends C{static getComboSiteInfo(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/combo/site/info",query:t})}))}}class q extends C{static getCustomerList(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/customer/site/list",query:t})}))}static getCustomerDetail(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/customer/site/detail",query:t})}))}}class j extends C{static getCheckGiftCard(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/giftcard/site/check-gift-card",query:t})}))}static postResetGiftCard(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/checkout/item/reset-gift-card",data:t})}))}}class N extends C{static getIncomeHistory(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/history/site/income-history",query:t})}))}static getStaffDailyIncome(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/staff/site/list-income-v1",query:t})}))}}class U extends C{static getKeyStorage(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/user/site/get-key-storage",query:t})}))}}var L=i(823),M=i.n(L);const B=()=>({AU:"DD-MM-YYYY",US:"MM-DD-YYYY",DEFAULT:"DD-MM-YYYY"}[localStorage.getItem("country_code")||"DEFAULT"]);var F=i(484),H=i.n(F);class Y extends C{static getCheckingList(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/checkin/site/dash-board-list",query:t})}))}static getOrderDetail(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/checkout/site/info",query:t})}))}static getOrderHistoryList(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/checkout/history/info",query:t})}))}static getReportChecking(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/checkin/site/dash-board-report",query:t})}))}static updateOrderStaff(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/checkout/form/update-staff",data:t})}))}static removeOrder(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/checkout/order/remove-order",data:t})}))}static exportOrder(t){return a(this,void 0,void 0,(function*(){const e=yield this.client.get({path:"/v1/pos/checkin/site/export",query:t});let i=B();M()(e,`export-orders-${H()().format(i)}.xls`)}))}}class G extends C{static getPayrollList(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"v1/pos/payroll/site/list-payroll",query:t})}))}static getPayrollSetting(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/setting/site/payroll-setting",query:t})}))}static approvePayroll(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/payroll/form/approve-payroll",data:t})}))}static updatePayrollSetting(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/setting/form/update-payroll",data:t})}))}static getDiscountSetting(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/setting/site/discount-setting",query:t})}))}static updateDiscountSetting(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/setting/form/update-discount",data:t})}))}static getCashDiscountSetting(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/cashdiscount/setting/get",query:t})}))}static updateCashDiscountSetting(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/cashdiscount/setting/change",data:t})}))}static getIncomeDetail(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/payroll/staff/income-detail",query:t})}))}static getApprovePayroll(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/payroll/site/approve-period",query:t})}))}static exportPayroll(t){return a(this,void 0,void 0,(function*(){const e=yield this.client.get({path:"v1/pos/payroll/site/export-payroll",query:t}),i=B();M()(e.data,`${H()().format(i)}.xlsx`,"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")}))}static exportApprovePayroll(t){return a(this,void 0,void 0,(function*(){const e=yield this.client.get({path:"/v1/pos/payroll/site/export-approve-payroll",query:t}),i=B();M()(e.data,`${H()().format(i)}.xlsx`,"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")}))}static exportIncomeDetail(t){return a(this,void 0,void 0,(function*(){const e=yield this.client.get({path:"/v1/pos/payroll/staff/export-income-detail",query:t}),i=B();M()(e.data,`${H()().format(i)}.xlsx`,"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")}))}static getSalaryChart(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/payroll/site/salary-chart",query:t})}))}static getAppListPayroll(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/payroll/site/app-list-payroll",query:t})}))}static getPayrollDetail(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/payroll/site/get-payroll-detail",query:t})}))}}class K extends C{static getPrinterList(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:g,query:t})}))}static getPrinterDetail(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:g,query:t})}))}static createPrinterInfo(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:g,data:t})}))}static updatePrinterInfo(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:g,query:t})}))}}class W extends C{static getServiceList(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/service/site/list",query:t})}))}}class V extends C{static getTurnValue(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/setting/site/get-turn-value",query:t})}))}static postTurnUpdateValue(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/setting/form/update-turn-value",data:t})}))}}class z extends C{static getStaffList(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/staff/site/list",query:t})}))}static getStaffListByCheckout(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/staff/site/list-by-checkout",query:t})}))}}class J extends C{static getTicketList(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/ticket/site/info",query:t})}))}static createTicketTemplate(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/ticket/form/create",data:t})}))}static deleteTicketTemplate(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/ticket/form/delete",query:t})}))}static updateTicketTemplate(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/ticket/form/update",query:t,data:t})}))}static moveSubject(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/ticket/form/subject-move",data:t})}))}static setDefaultTicketTemplate(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/ticket/site/set-default-ticket-template",data:t})}))}static getTicketTemplate(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/ticket/site/template",query:t})}))}}class Q extends C{static getTimeKeepingList(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/timekeeping/site/list",query:t})}))}static addTimeKeeping(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/timekeeping/form/create",data:t})}))}static updateTimeKeeping(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/timekeeping/form/edit-time",data:t})}))}static removeTimeKeeping(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/timekeeping/form/delete-time",data:t})}))}static getTimeKeepingListStaff(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/timekeeping/site/list-staff",query:t})}))}static postTimeKeepingCheckIn(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/timekeeping/form/add-checkin-time",data:t})}))}static postTimeKeepingCheckOut(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/timekeeping/form/add-checkout-time",data:t})}))}}class X extends C{}class Z extends C{static postLogin(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/user/form/login",data:t})}))}}const tt={Context:m,PosClientApi:class{constructor(t,e,i){this.appointment=A,this.batch_history=T,this.business=k,this.call=P,this.category=D,this.check_in=_,this.check_out=I,this.combo=$,this.customer=q,this.gift_card=j,this.income=N,this.key_storage=U,this.order=Y,this.payroll=G,this.printer=K,this.service=W,this.setting_turn=V,this.staff=z,this.ticket=J,this.time_keeping=Q,this.unsubscribe_contact=X,this.user=Z,C.setClient(t,e,i)}},Errors:s};window.Gap=tt;const et=tt})(),r})()));
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.GapSdk=e():t.GapSdk=e()}(self,(()=>(()=>{var t={669:(t,e,i)=>{t.exports=i(609)},448:(t,e,i)=>{"use strict";var r=i(867),n=i(26),o=i(372),s=i(327),a=i(97),u=i(109),c=i(985),d=i(874),h=i(648),l=i(644),p=i(205);t.exports=function(t){return new Promise((function(e,i){var f,v=t.data,y=t.headers,m=t.responseType;function g(){t.cancelToken&&t.cancelToken.unsubscribe(f),t.signal&&t.signal.removeEventListener("abort",f)}r.isFormData(v)&&r.isStandardBrowserEnv()&&delete y["Content-Type"];var b=new XMLHttpRequest;if(t.auth){var O=t.auth.username||"",E=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";y.Authorization="Basic "+btoa(O+":"+E)}var w=a(t.baseURL,t.url);function x(){if(b){var r="getAllResponseHeaders"in b?u(b.getAllResponseHeaders()):null,o={data:m&&"text"!==m&&"json"!==m?b.response:b.responseText,status:b.status,statusText:b.statusText,headers:r,config:t,request:b};n((function(t){e(t),g()}),(function(t){i(t),g()}),o),b=null}}if(b.open(t.method.toUpperCase(),s(w,t.params,t.paramsSerializer),!0),b.timeout=t.timeout,"onloadend"in b?b.onloadend=x:b.onreadystatechange=function(){b&&4===b.readyState&&(0!==b.status||b.responseURL&&0===b.responseURL.indexOf("file:"))&&setTimeout(x)},b.onabort=function(){b&&(i(new h("Request aborted",h.ECONNABORTED,t,b)),b=null)},b.onerror=function(){i(new h("Network Error",h.ERR_NETWORK,t,b,b)),b=null},b.ontimeout=function(){var e=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded",r=t.transitional||d;t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),i(new h(e,r.clarifyTimeoutError?h.ETIMEDOUT:h.ECONNABORTED,t,b)),b=null},r.isStandardBrowserEnv()){var S=(t.withCredentials||c(w))&&t.xsrfCookieName?o.read(t.xsrfCookieName):void 0;S&&(y[t.xsrfHeaderName]=S)}"setRequestHeader"in b&&r.forEach(y,(function(t,e){void 0===v&&"content-type"===e.toLowerCase()?delete y[e]:b.setRequestHeader(e,t)})),r.isUndefined(t.withCredentials)||(b.withCredentials=!!t.withCredentials),m&&"json"!==m&&(b.responseType=t.responseType),"function"==typeof t.onDownloadProgress&&b.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&b.upload&&b.upload.addEventListener("progress",t.onUploadProgress),(t.cancelToken||t.signal)&&(f=function(t){b&&(i(!t||t&&t.type?new l:t),b.abort(),b=null)},t.cancelToken&&t.cancelToken.subscribe(f),t.signal&&(t.signal.aborted?f():t.signal.addEventListener("abort",f))),v||(v=null);var R=p(w);R&&-1===["http","https","file"].indexOf(R)?i(new h("Unsupported protocol "+R+":",h.ERR_BAD_REQUEST,t)):b.send(v)}))}},609:(t,e,i)=>{"use strict";var r=i(867),n=i(849),o=i(321),s=i(185),a=function t(e){var i=new o(e),a=n(o.prototype.request,i);return r.extend(a,o.prototype,i),r.extend(a,i),a.create=function(i){return t(s(e,i))},a}(i(546));a.Axios=o,a.CanceledError=i(644),a.CancelToken=i(972),a.isCancel=i(502),a.VERSION=i(288).version,a.toFormData=i(675),a.AxiosError=i(648),a.Cancel=a.CanceledError,a.all=function(t){return Promise.all(t)},a.spread=i(713),a.isAxiosError=i(268),t.exports=a,t.exports.default=a},972:(t,e,i)=>{"use strict";var r=i(644);function n(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise((function(t){e=t}));var i=this;this.promise.then((function(t){if(i._listeners){var e,r=i._listeners.length;for(e=0;e<r;e++)i._listeners[e](t);i._listeners=null}})),this.promise.then=function(t){var e,r=new Promise((function(t){i.subscribe(t),e=t})).then(t);return r.cancel=function(){i.unsubscribe(e)},r},t((function(t){i.reason||(i.reason=new r(t),e(i.reason))}))}n.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},n.prototype.subscribe=function(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]},n.prototype.unsubscribe=function(t){if(this._listeners){var e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}},n.source=function(){var t;return{token:new n((function(e){t=e})),cancel:t}},t.exports=n},644:(t,e,i)=>{"use strict";var r=i(648);function n(t){r.call(this,null==t?"canceled":t,r.ERR_CANCELED),this.name="CanceledError"}i(867).inherits(n,r,{__CANCEL__:!0}),t.exports=n},502:t=>{"use strict";t.exports=function(t){return!(!t||!t.__CANCEL__)}},321:(t,e,i)=>{"use strict";var r=i(867),n=i(327),o=i(782),s=i(572),a=i(185),u=i(97),c=i(875),d=c.validators;function h(t){this.defaults=t,this.interceptors={request:new o,response:new o}}h.prototype.request=function(t,e){"string"==typeof t?(e=e||{}).url=t:e=t||{},(e=a(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var i=e.transitional;void 0!==i&&c.assertOptions(i,{silentJSONParsing:d.transitional(d.boolean),forcedJSONParsing:d.transitional(d.boolean),clarifyTimeoutError:d.transitional(d.boolean)},!1);var r=[],n=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(n=n&&t.synchronous,r.unshift(t.fulfilled,t.rejected))}));var o,u=[];if(this.interceptors.response.forEach((function(t){u.push(t.fulfilled,t.rejected)})),!n){var h=[s,void 0];for(Array.prototype.unshift.apply(h,r),h=h.concat(u),o=Promise.resolve(e);h.length;)o=o.then(h.shift(),h.shift());return o}for(var l=e;r.length;){var p=r.shift(),f=r.shift();try{l=p(l)}catch(t){f(t);break}}try{o=s(l)}catch(t){return Promise.reject(t)}for(;u.length;)o=o.then(u.shift(),u.shift());return o},h.prototype.getUri=function(t){t=a(this.defaults,t);var e=u(t.baseURL,t.url);return n(e,t.params,t.paramsSerializer)},r.forEach(["delete","get","head","options"],(function(t){h.prototype[t]=function(e,i){return this.request(a(i||{},{method:t,url:e,data:(i||{}).data}))}})),r.forEach(["post","put","patch"],(function(t){function e(e){return function(i,r,n){return this.request(a(n||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:i,data:r}))}}h.prototype[t]=e(),h.prototype[t+"Form"]=e(!0)})),t.exports=h},648:(t,e,i)=>{"use strict";var r=i(867);function n(t,e,i,r,n){Error.call(this),this.message=t,this.name="AxiosError",e&&(this.code=e),i&&(this.config=i),r&&(this.request=r),n&&(this.response=n)}r.inherits(n,Error,{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}}});var o=n.prototype,s={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED"].forEach((function(t){s[t]={value:t}})),Object.defineProperties(n,s),Object.defineProperty(o,"isAxiosError",{value:!0}),n.from=function(t,e,i,s,a,u){var c=Object.create(o);return r.toFlatObject(t,c,(function(t){return t!==Error.prototype})),n.call(c,t.message,e,i,s,a),c.name=t.name,u&&Object.assign(c,u),c},t.exports=n},782:(t,e,i)=>{"use strict";var r=i(867);function n(){this.handlers=[]}n.prototype.use=function(t,e,i){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!i&&i.synchronous,runWhen:i?i.runWhen:null}),this.handlers.length-1},n.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},n.prototype.forEach=function(t){r.forEach(this.handlers,(function(e){null!==e&&t(e)}))},t.exports=n},97:(t,e,i)=>{"use strict";var r=i(793),n=i(303);t.exports=function(t,e){return t&&!r(e)?n(t,e):e}},572:(t,e,i)=>{"use strict";var r=i(867),n=i(527),o=i(502),s=i(546),a=i(644);function u(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new a}t.exports=function(t){return u(t),t.headers=t.headers||{},t.data=n.call(t,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 u(t),e.data=n.call(t,e.data,e.headers,t.transformResponse),e}),(function(e){return o(e)||(u(t),e&&e.response&&(e.response.data=n.call(t,e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)}))}},185:(t,e,i)=>{"use strict";var r=i(867);t.exports=function(t,e){e=e||{};var i={};function n(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 o(i){return r.isUndefined(e[i])?r.isUndefined(t[i])?void 0:n(void 0,t[i]):n(t[i],e[i])}function s(t){if(!r.isUndefined(e[t]))return n(void 0,e[t])}function a(i){return r.isUndefined(e[i])?r.isUndefined(t[i])?void 0:n(void 0,t[i]):n(void 0,e[i])}function u(i){return i in e?n(t[i],e[i]):i in t?n(void 0,t[i]):void 0}var c={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:u};return r.forEach(Object.keys(t).concat(Object.keys(e)),(function(t){var e=c[t]||o,n=e(t);r.isUndefined(n)&&e!==u||(i[t]=n)})),i}},26:(t,e,i)=>{"use strict";var r=i(648);t.exports=function(t,e,i){var n=i.config.validateStatus;i.status&&n&&!n(i.status)?e(new r("Request failed with status code "+i.status,[r.ERR_BAD_REQUEST,r.ERR_BAD_RESPONSE][Math.floor(i.status/100)-4],i.config,i.request,i)):t(i)}},527:(t,e,i)=>{"use strict";var r=i(867),n=i(546);t.exports=function(t,e,i){var o=this||n;return r.forEach(i,(function(i){t=i.call(o,t,e)})),t}},546:(t,e,i)=>{"use strict";var r=i(867),n=i(16),o=i(648),s=i(874),a=i(675),u={"Content-Type":"application/x-www-form-urlencoded"};function c(t,e){!r.isUndefined(t)&&r.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var d,h={transitional:s,adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(d=i(448)),d),transformRequest:[function(t,e){if(n(e,"Accept"),n(e,"Content-Type"),r.isFormData(t)||r.isArrayBuffer(t)||r.isBuffer(t)||r.isStream(t)||r.isFile(t)||r.isBlob(t))return t;if(r.isArrayBufferView(t))return t.buffer;if(r.isURLSearchParams(t))return c(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString();var i,o=r.isObject(t),s=e&&e["Content-Type"];if((i=r.isFileList(t))||o&&"multipart/form-data"===s){var u=this.env&&this.env.FormData;return a(i?{"files[]":t}:t,u&&new u)}return o||"application/json"===s?(c(e,"application/json"),function(t,e,i){if(r.isString(t))try{return(0,JSON.parse)(t),r.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(0,JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){var e=this.transitional||h.transitional,i=e&&e.silentJSONParsing,n=e&&e.forcedJSONParsing,s=!i&&"json"===this.responseType;if(s||n&&r.isString(t)&&t.length)try{return JSON.parse(t)}catch(t){if(s){if("SyntaxError"===t.name)throw o.from(t,o.ERR_BAD_RESPONSE,this,null,this.response);throw t}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:i(623)},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],(function(t){h.headers[t]={}})),r.forEach(["post","put","patch"],(function(t){h.headers[t]=r.merge(u)})),t.exports=h},874:t=>{"use strict";t.exports={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}},288:t=>{t.exports={version:"0.27.2"}},849:t=>{"use strict";t.exports=function(t,e){return function(){for(var i=new Array(arguments.length),r=0;r<i.length;r++)i[r]=arguments[r];return t.apply(e,i)}}},327:(t,e,i)=>{"use strict";var r=i(867);function n(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,i){if(!e)return t;var o;if(i)o=i(e);else if(r.isURLSearchParams(e))o=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(n(e)+"="+n(t))})))})),o=s.join("&")}if(o){var a=t.indexOf("#");-1!==a&&(t=t.slice(0,a)),t+=(-1===t.indexOf("?")?"?":"&")+o}return t}},303:t=>{"use strict";t.exports=function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}},372:(t,e,i)=>{"use strict";var r=i(867);t.exports=r.isStandardBrowserEnv()?{write:function(t,e,i,n,o,s){var a=[];a.push(t+"="+encodeURIComponent(e)),r.isNumber(i)&&a.push("expires="+new Date(i).toGMTString()),r.isString(n)&&a.push("path="+n),r.isString(o)&&a.push("domain="+o),!0===s&&a.push("secure"),document.cookie=a.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(){}}},793:t=>{"use strict";t.exports=function(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}},268:(t,e,i)=>{"use strict";var r=i(867);t.exports=function(t){return r.isObject(t)&&!0===t.isAxiosError}},985:(t,e,i)=>{"use strict";var r=i(867);t.exports=r.isStandardBrowserEnv()?function(){var t,e=/(msie|trident)/i.test(navigator.userAgent),i=document.createElement("a");function n(t){var r=t;return e&&(i.setAttribute("href",r),r=i.href),i.setAttribute("href",r),{href:i.href,protocol:i.protocol?i.protocol.replace(/:$/,""):"",host:i.host,search:i.search?i.search.replace(/^\?/,""):"",hash:i.hash?i.hash.replace(/^#/,""):"",hostname:i.hostname,port:i.port,pathname:"/"===i.pathname.charAt(0)?i.pathname:"/"+i.pathname}}return t=n(window.location.href),function(e){var i=r.isString(e)?n(e):e;return i.protocol===t.protocol&&i.host===t.host}}():function(){return!0}},16:(t,e,i)=>{"use strict";var r=i(867);t.exports=function(t,e){r.forEach(t,(function(i,r){r!==e&&r.toUpperCase()===e.toUpperCase()&&(t[e]=i,delete t[r])}))}},623:t=>{t.exports=null},109:(t,e,i)=>{"use strict";var r=i(867),n=["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,i,o,s={};return t?(r.forEach(t.split("\n"),(function(t){if(o=t.indexOf(":"),e=r.trim(t.substr(0,o)).toLowerCase(),i=r.trim(t.substr(o+1)),e){if(s[e]&&n.indexOf(e)>=0)return;s[e]="set-cookie"===e?(s[e]?s[e]:[]).concat([i]):s[e]?s[e]+", "+i:i}})),s):s}},205:t=>{"use strict";t.exports=function(t){var e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}},713:t=>{"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}},675:(t,e,i)=>{"use strict";var r=i(867);t.exports=function(t,e){e=e||new FormData;var i=[];function n(t){return null===t?"":r.isDate(t)?t.toISOString():r.isArrayBuffer(t)||r.isTypedArray(t)?"function"==typeof Blob?new Blob([t]):Buffer.from(t):t}return function t(o,s){if(r.isPlainObject(o)||r.isArray(o)){if(-1!==i.indexOf(o))throw Error("Circular reference detected in "+s);i.push(o),r.forEach(o,(function(i,o){if(!r.isUndefined(i)){var a,u=s?s+"."+o:o;if(i&&!s&&"object"==typeof i)if(r.endsWith(o,"{}"))i=JSON.stringify(i);else if(r.endsWith(o,"[]")&&(a=r.toArray(i)))return void a.forEach((function(t){!r.isUndefined(t)&&e.append(u,n(t))}));t(i,u)}})),i.pop()}else e.append(s,n(o))}(t),e}},875:(t,e,i)=>{"use strict";var r=i(288).version,n=i(648),o={};["object","boolean","number","function","string","symbol"].forEach((function(t,e){o[t]=function(i){return typeof i===t||"a"+(e<1?"n ":" ")+t}}));var s={};o.transitional=function(t,e,i){function o(t,e){return"[Axios v"+r+"] Transitional option '"+t+"'"+e+(i?". "+i:"")}return function(i,r,a){if(!1===t)throw new n(o(r," has been removed"+(e?" in "+e:"")),n.ERR_DEPRECATED);return e&&!s[r]&&(s[r]=!0,console.warn(o(r," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(i,r,a)}},t.exports={assertOptions:function(t,e,i){if("object"!=typeof t)throw new n("options must be an object",n.ERR_BAD_OPTION_VALUE);for(var r=Object.keys(t),o=r.length;o-- >0;){var s=r[o],a=e[s];if(a){var u=t[s],c=void 0===u||a(u,s,t);if(!0!==c)throw new n("option "+s+" must be "+c,n.ERR_BAD_OPTION_VALUE)}else if(!0!==i)throw new n("Unknown option "+s,n.ERR_BAD_OPTION)}},validators:o}},867:(t,e,i)=>{"use strict";var r,n=i(849),o=Object.prototype.toString,s=(r=Object.create(null),function(t){var e=o.call(t);return r[e]||(r[e]=e.slice(8,-1).toLowerCase())});function a(t){return t=t.toLowerCase(),function(e){return s(e)===t}}function u(t){return Array.isArray(t)}function c(t){return void 0===t}var d=a("ArrayBuffer");function h(t){return null!==t&&"object"==typeof t}function l(t){if("object"!==s(t))return!1;var e=Object.getPrototypeOf(t);return null===e||e===Object.prototype}var p=a("Date"),f=a("File"),v=a("Blob"),y=a("FileList");function m(t){return"[object Function]"===o.call(t)}var g=a("URLSearchParams");function b(t,e){if(null!=t)if("object"!=typeof t&&(t=[t]),u(t))for(var i=0,r=t.length;i<r;i++)e.call(null,t[i],i,t);else for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.call(null,t[n],n,t)}var O,E=(O="undefined"!=typeof Uint8Array&&Object.getPrototypeOf(Uint8Array),function(t){return O&&t instanceof O});t.exports={isArray:u,isArrayBuffer:d,isBuffer:function(t){return null!==t&&!c(t)&&null!==t.constructor&&!c(t.constructor)&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)},isFormData:function(t){var e="[object FormData]";return t&&("function"==typeof FormData&&t instanceof FormData||o.call(t)===e||m(t.toString)&&t.toString()===e)},isArrayBufferView:function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&d(t.buffer)},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isObject:h,isPlainObject:l,isUndefined:c,isDate:p,isFile:f,isBlob:v,isFunction:m,isStream:function(t){return h(t)&&m(t.pipe)},isURLSearchParams:g,isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:b,merge:function t(){var e={};function i(i,r){l(e[r])&&l(i)?e[r]=t(e[r],i):l(i)?e[r]=t({},i):u(i)?e[r]=i.slice():e[r]=i}for(var r=0,n=arguments.length;r<n;r++)b(arguments[r],i);return e},extend:function(t,e,i){return b(e,(function(e,r){t[r]=i&&"function"==typeof e?n(e,i):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},inherits:function(t,e,i,r){t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,i&&Object.assign(t.prototype,i)},toFlatObject:function(t,e,i){var r,n,o,s={};e=e||{};do{for(n=(r=Object.getOwnPropertyNames(t)).length;n-- >0;)s[o=r[n]]||(e[o]=t[o],s[o]=!0);t=Object.getPrototypeOf(t)}while(t&&(!i||i(t,e))&&t!==Object.prototype);return e},kindOf:s,kindOfTest:a,endsWith:function(t,e,i){t=String(t),(void 0===i||i>t.length)&&(i=t.length),i-=e.length;var r=t.indexOf(e,i);return-1!==r&&r===i},toArray:function(t){if(!t)return null;var e=t.length;if(c(e))return null;for(var i=new Array(e);e-- >0;)i[e]=t[e];return i},isTypedArray:E,isFileList:y}},484:function(t){t.exports=function(){"use strict";var t=6e4,e=36e5,i="millisecond",r="second",n="minute",o="hour",s="day",a="week",u="month",c="quarter",d="year",h="date",l="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,f=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,v={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},y=function(t,e,i){var r=String(t);return!r||r.length>=e?t:""+Array(e+1-r.length).join(i)+t},m={s:y,z:function(t){var e=-t.utcOffset(),i=Math.abs(e),r=Math.floor(i/60),n=i%60;return(e<=0?"+":"-")+y(r,2,"0")+":"+y(n,2,"0")},m:function t(e,i){if(e.date()<i.date())return-t(i,e);var r=12*(i.year()-e.year())+(i.month()-e.month()),n=e.clone().add(r,u),o=i-n<0,s=e.clone().add(r+(o?-1:1),u);return+(-(r+(i-n)/(o?n-s:s-n))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:u,y:d,w:a,d:s,D:h,h:o,m:n,s:r,ms:i,Q:c}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},g="en",b={};b[g]=v;var O=function(t){return t instanceof S},E=function t(e,i,r){var n;if(!e)return g;if("string"==typeof e){var o=e.toLowerCase();b[o]&&(n=o),i&&(b[o]=i,n=o);var s=e.split("-");if(!n&&s.length>1)return t(s[0])}else{var a=e.name;b[a]=e,n=a}return!r&&n&&(g=n),n||!r&&g},w=function(t,e){if(O(t))return t.clone();var i="object"==typeof e?e:{};return i.date=t,i.args=arguments,new S(i)},x=m;x.l=E,x.i=O,x.w=function(t,e){return w(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var S=function(){function v(t){this.$L=E(t.locale,null,!0),this.parse(t)}var y=v.prototype;return y.parse=function(t){this.$d=function(t){var e=t.date,i=t.utc;if(null===e)return new Date(NaN);if(x.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match(p);if(r){var n=r[2]-1||0,o=(r[7]||"0").substring(0,3);return i?new Date(Date.UTC(r[1],n,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)):new Date(r[1],n,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)}}return new Date(e)}(t),this.$x=t.x||{},this.init()},y.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},y.$utils=function(){return x},y.isValid=function(){return!(this.$d.toString()===l)},y.isSame=function(t,e){var i=w(t);return this.startOf(e)<=i&&i<=this.endOf(e)},y.isAfter=function(t,e){return w(t)<this.startOf(e)},y.isBefore=function(t,e){return this.endOf(e)<w(t)},y.$g=function(t,e,i){return x.u(t)?this[e]:this.set(i,t)},y.unix=function(){return Math.floor(this.valueOf()/1e3)},y.valueOf=function(){return this.$d.getTime()},y.startOf=function(t,e){var i=this,c=!!x.u(e)||e,l=x.p(t),p=function(t,e){var r=x.w(i.$u?Date.UTC(i.$y,e,t):new Date(i.$y,e,t),i);return c?r:r.endOf(s)},f=function(t,e){return x.w(i.toDate()[t].apply(i.toDate("s"),(c?[0,0,0,0]:[23,59,59,999]).slice(e)),i)},v=this.$W,y=this.$M,m=this.$D,g="set"+(this.$u?"UTC":"");switch(l){case d:return c?p(1,0):p(31,11);case u:return c?p(1,y):p(0,y+1);case a:var b=this.$locale().weekStart||0,O=(v<b?v+7:v)-b;return p(c?m-O:m+(6-O),y);case s:case h:return f(g+"Hours",0);case o:return f(g+"Minutes",1);case n:return f(g+"Seconds",2);case r:return f(g+"Milliseconds",3);default:return this.clone()}},y.endOf=function(t){return this.startOf(t,!1)},y.$set=function(t,e){var a,c=x.p(t),l="set"+(this.$u?"UTC":""),p=(a={},a[s]=l+"Date",a[h]=l+"Date",a[u]=l+"Month",a[d]=l+"FullYear",a[o]=l+"Hours",a[n]=l+"Minutes",a[r]=l+"Seconds",a[i]=l+"Milliseconds",a)[c],f=c===s?this.$D+(e-this.$W):e;if(c===u||c===d){var v=this.clone().set(h,1);v.$d[p](f),v.init(),this.$d=v.set(h,Math.min(this.$D,v.daysInMonth())).$d}else p&&this.$d[p](f);return this.init(),this},y.set=function(t,e){return this.clone().$set(t,e)},y.get=function(t){return this[x.p(t)]()},y.add=function(i,c){var h,l=this;i=Number(i);var p=x.p(c),f=function(t){var e=w(l);return x.w(e.date(e.date()+Math.round(t*i)),l)};if(p===u)return this.set(u,this.$M+i);if(p===d)return this.set(d,this.$y+i);if(p===s)return f(1);if(p===a)return f(7);var v=(h={},h[n]=t,h[o]=e,h[r]=1e3,h)[p]||1,y=this.$d.getTime()+i*v;return x.w(y,this)},y.subtract=function(t,e){return this.add(-1*t,e)},y.format=function(t){var e=this,i=this.$locale();if(!this.isValid())return i.invalidDate||l;var r=t||"YYYY-MM-DDTHH:mm:ssZ",n=x.z(this),o=this.$H,s=this.$m,a=this.$M,u=i.weekdays,c=i.months,d=function(t,i,n,o){return t&&(t[i]||t(e,r))||n[i].slice(0,o)},h=function(t){return x.s(o%12||12,t,"0")},p=i.meridiem||function(t,e,i){var r=t<12?"AM":"PM";return i?r.toLowerCase():r},v={YY:String(this.$y).slice(-2),YYYY:this.$y,M:a+1,MM:x.s(a+1,2,"0"),MMM:d(i.monthsShort,a,c,3),MMMM:d(c,a),D:this.$D,DD:x.s(this.$D,2,"0"),d:String(this.$W),dd:d(i.weekdaysMin,this.$W,u,2),ddd:d(i.weekdaysShort,this.$W,u,3),dddd:u[this.$W],H:String(o),HH:x.s(o,2,"0"),h:h(1),hh:h(2),a:p(o,s,!0),A:p(o,s,!1),m:String(s),mm:x.s(s,2,"0"),s:String(this.$s),ss:x.s(this.$s,2,"0"),SSS:x.s(this.$ms,3,"0"),Z:n};return r.replace(f,(function(t,e){return e||v[t]||n.replace(":","")}))},y.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},y.diff=function(i,h,l){var p,f=x.p(h),v=w(i),y=(v.utcOffset()-this.utcOffset())*t,m=this-v,g=x.m(this,v);return g=(p={},p[d]=g/12,p[u]=g,p[c]=g/3,p[a]=(m-y)/6048e5,p[s]=(m-y)/864e5,p[o]=m/e,p[n]=m/t,p[r]=m/1e3,p)[f]||m,l?g:x.a(g)},y.daysInMonth=function(){return this.endOf(u).$D},y.$locale=function(){return b[this.$L]},y.locale=function(t,e){if(!t)return this.$L;var i=this.clone(),r=E(t,e,!0);return r&&(i.$L=r),i},y.clone=function(){return x.w(this.$d,this)},y.toDate=function(){return new Date(this.valueOf())},y.toJSON=function(){return this.isValid()?this.toISOString():null},y.toISOString=function(){return this.$d.toISOString()},y.toString=function(){return this.$d.toUTCString()},v}(),R=S.prototype;return w.prototype=R,[["$ms",i],["$s",r],["$m",n],["$H",o],["$W",s],["$M",u],["$y",d],["$D",h]].forEach((function(t){R[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),w.extend=function(t,e){return t.$i||(t(e,S,w),t.$i=!0),w},w.locale=E,w.isDayjs=O,w.unix=function(t){return w(1e3*t)},w.en=b[g],w.Ls=b,w.p={},w}()},823:t=>{t.exports=function(t,e,i,r){var n=new Blob(void 0!==r?[r,t]:[t],{type:i||"application/octet-stream"});if(void 0!==window.navigator.msSaveBlob)window.navigator.msSaveBlob(n,e);else{var o=window.URL&&window.URL.createObjectURL?window.URL.createObjectURL(n):window.webkitURL.createObjectURL(n),s=document.createElement("a");s.style.display="none",s.href=o,s.setAttribute("download",e),void 0===s.download&&s.setAttribute("target","_blank"),document.body.appendChild(s),s.click(),setTimeout((function(){document.body.removeChild(s),window.URL.revokeObjectURL(o)}),200)}}}},e={};function i(r){var n=e[r];if(void 0!==n)return n.exports;var o=e[r]={exports:{}};return t[r].call(o.exports,o,o.exports,i),o.exports}i.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return i.d(e,{a:e}),e},i.d=(t,e)=>{for(var r in e)i.o(e,r)&&!i.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),i.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";i.r(r),i.d(r,{Gap:()=>Q,GapApiVersion:()=>t,GapHeader:()=>e,Platform:()=>o,UserAgent:()=>n,default:()=>Z});var t,e,n,o,s={};function a(t,e,i,r){return new(i||(i=Promise))((function(n,o){function s(t){try{u(r.next(t))}catch(t){o(t)}}function a(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?n(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(s,a)}u((r=r.apply(t,e||[])).next())}))}i.r(s),i.d(s,{GapError:()=>u,HttpInternalError:()=>v,HttpMaxRetriesError:()=>l,HttpRequestError:()=>h,HttpResponseError:()=>p,HttpRetryableError:()=>f,HttpThrottlingError:()=>y,MissingDataContextError:()=>c,UninitializedContextError:()=>d}),function(t){t.V1="1.0.0"}(t||(t={})),function(t){t.GClientId="G-ClientID"}(e||(e={})),function(t){t.IOS="IOS",t.ANDROID="ANDROID",t.CHROME="CHROME",t.SAFARI="SAFARI"}(n||(n={})),function(t){t.ANDROID="Android",t.IOS="iOS",t.WEB="Web",t.WINDOW="Window"}(o||(o={})),Object.create,Object.create;class u extends Error{constructor(...t){super(...t),Object.setPrototypeOf(this,new.target.prototype)}}class c extends u{}class d extends u{}class h extends u{}class l extends u{}class p extends u{constructor({message:t,code:e,statusText:i,body:r,headers:n}){super(t),this.response={code:e,statusText:i,body:r,headers:n}}}class f extends p{}class v extends f{}class y extends f{constructor(t){var{retryAfter:e}=t;super(function(t,e){var i={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(i[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(r=Object.getOwnPropertySymbols(t);n<r.length;n++)e.indexOf(r[n])<0&&Object.prototype.propertyIsEnumerable.call(t,r[n])&&(i[r[n]]=t[r[n]])}return i}(t,["retryAfter"])),this.response.retryAfter=e}}const m={API_KEY:"",API_SECRET_KEY:"",G_CLIENTID:"",USER_AGENT:"",API_VERSION:t.V1,initialize:function(t){const e=[];if(t.API_KEY.length||e.push("API_KEY"),t.API_SECRET_KEY.length||e.push("API_SECRET_KEY"),t.API_SECRET_KEY.length||e.push("G_CLIENTID"),e.length)throw new c(`Cannot initialize GAP Library. Missing values for: ${e.join(", ")}`);this.API_KEY=t.API_KEY,this.API_SECRET_KEY=t.API_SECRET_KEY,this.G_CLIENTID=t.G_CLIENTID,this.API_VERSION=t.API_VERSION},throwIfUninitialized:function(){if(!this.API_KEY||0===this.API_KEY.length)throw new d("Context has not been properly initialized. Please call the .initialize() method to setup your app context object.")}},g="/v1/pos/printer/site/list";var b,O,E=i(669),w=i.n(E);!function(t){t.Get="GET",t.Post="POST",t.Put="PUT",t.Patch="PATCH",t.Delete="DELETE",t.Head="HEAD",t.Options="OPTIONS",t.Connect="CONNECT"}(b||(b={})),function(t){t[t.Continue=100]="Continue",t[t.SwitchingProtocols=101]="SwitchingProtocols",t[t.Ok=200]="Ok",t[t.Created=201]="Created",t[t.Accepted=202]="Accepted",t[t.NonAuthoritativeInformation=203]="NonAuthoritativeInformation",t[t.NoContent=204]="NoContent",t[t.ResetContent=205]="ResetContent",t[t.PartialContent=206]="PartialContent",t[t.MultipleChoices=300]="MultipleChoices",t[t.MovedPermanently=301]="MovedPermanently",t[t.Found=302]="Found",t[t.SeeOther=303]="SeeOther",t[t.NotModified=304]="NotModified",t[t.UseProxy=305]="UseProxy",t[t.TemporaryRedirect=307]="TemporaryRedirect",t[t.BadRequest=400]="BadRequest",t[t.Unauthorized=401]="Unauthorized",t[t.PaymentRequired=402]="PaymentRequired",t[t.Forbidden=403]="Forbidden",t[t.NotFound=404]="NotFound",t[t.MethodNotAllowed=405]="MethodNotAllowed",t[t.NotAcceptable=406]="NotAcceptable",t[t.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",t[t.RequestTimeout=408]="RequestTimeout",t[t.Conflict=409]="Conflict",t[t.Gone=410]="Gone",t[t.LengthRequired=411]="LengthRequired",t[t.PreconditionFailed=412]="PreconditionFailed",t[t.RequestEntityTooLarge=413]="RequestEntityTooLarge",t[t.RequestUriTooLong=414]="RequestUriTooLong",t[t.UnsupportedMediaType=415]="UnsupportedMediaType",t[t.RequestedRangeNotSatisfiable=416]="RequestedRangeNotSatisfiable",t[t.ExpectationFailed=417]="ExpectationFailed",t[t.ImATeapot=418]="ImATeapot",t[t.UnprocessableEntity=422]="UnprocessableEntity",t[t.TooManyRequests=429]="TooManyRequests",t[t.InternalServerError=500]="InternalServerError",t[t.NotImplemented=501]="NotImplemented",t[t.BadGateway=502]="BadGateway",t[t.ServiceUnavailable=503]="ServiceUnavailable",t[t.GatewayTimeout=504]="GatewayTimeout",t[t.HttpVersionNotSupported=505]="HttpVersionNotSupported"}(O||(O={}));class x{constructor(t,e,i){this.RETRY_WAIT_TIME=1e3,this.domain=t,this.axios=w().create({headers:{"G-ClientID":e,Authorization:`Bearer ${i}`}})}get(t){return a(this,void 0,void 0,(function*(){return this.request(Object.assign({method:b.Get},t))}))}post(t){return a(this,void 0,void 0,(function*(){return this.request(Object.assign({method:b.Post},t))}))}put(t){return a(this,void 0,void 0,(function*(){return this.request(Object.assign({method:b.Put},t))}))}delete(t){return a(this,void 0,void 0,(function*(){return this.request(Object.assign({method:b.Delete},t))}))}request(t){return a(this,void 0,void 0,(function*(){const e=t.tries?t.tries:1;if(e<=0)throw new h(`Number of tries must be >= 0, got ${e}`);const i={url:`${this.domain}${this.getRequestPath(t.path)}`,params:t.query,method:t.method.toString(),data:t.data};function r(t){return a(this,void 0,void 0,(function*(){return new Promise((e=>setTimeout(e,t)))}))}let n=0;for(;n<e;)try{return yield this.doRequest(i)}catch(t){if(n++,t instanceof f){if(n<e){let e=this.RETRY_WAIT_TIME;t instanceof y&&t.response.retryAfter&&(e=1e3*t.response.retryAfter),yield r(e);continue}if(e>1)throw new l(`Exceeded maximum retry count of ${e}. Last message: ${t.message}`)}throw t}throw new u("Unexpected flow, reached maximum HTTP tries but did not throw an error")}))}getRequestPath(t){return`/${t.replace(/^\//,"")}`}doRequest(t){return a(this,void 0,void 0,(function*(){try{const e=yield this.axios(t);if(e.status)return e.data;{const t=[];e.data.errors&&t.push(JSON.stringify(e.data.errors,null,2));const i=t.length?`:\n${t.join("\n")}`:"",r=e.headers,n=e.status,o=e.statusText;switch(!0){case e.status===O.TooManyRequests:{const t=e.headers["Retry-After"];throw new y({message:`GAP is throttling requests${i}`,code:n,statusText:o,body:e.data,headers:r,retryAfter:t?parseFloat(t):void 0})}case e.status>=O.InternalServerError:throw new v({message:`GAP internal error${i}`,code:n,statusText:o,body:e.data,headers:r});default:throw new p({message:`Received an error response (${e.status} ${e.statusText}) from GAP ${i}`,code:n,statusText:o,body:e.data,headers:r})}}}catch(t){throw t instanceof u?t:new h(`Failed to make GAP HTTP request: ${t}`)}}))}}class S{static setClient(t,e,i){if(!t||!e||!i)return console.error(new Error("Missing params init http_client"));this.client=new x(t,e,i)}}class R extends S{static postCreateAppointment(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/appointment/appointment/form/create",data:t})}))}static getCategoryListAppointment(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/gocheckin/service/site/list-by-category",query:t})}))}static getStaffListAppointment(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/gocheckin/staff/site/list",query:t})}))}}class C extends S{static getBatchHistory(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/history/site/batch-history",query:t})}))}static getBatchDetail(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/history/site/batch-detail",query:t})}))}}class A extends S{static getBusinessInfo(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/business/site/get-info",query:t})}))}static postBusinessUpdateInfo(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/business/form/update",data:t})}))}}class T extends S{static sendSms(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/call/form/send-sms",data:t})}))}}class k extends S{static getCategoryListItem(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/category/site/list-item",query:t})}))}}class P extends S{static postCheckInFormSubmit(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/checkin/form/submit",data:t})}))}static getCheckInList(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/checkin/site/list",query:t})}))}static getCheckInReport(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/checkin/site/report",query:t})}))}static getLastCheckIn(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/checkin/site/check-update",query:t})}))}static getCheckInInfo(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/checkin/site/info",query:t})}))}}class D extends S{static getItemList(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/item/site/list",query:t})}))}static getCheckOutHistoryList(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/checkout/history/list",query:t})}))}static getCheckOutInfo(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/checkout/site/info",query:t})}))}static getCheckOutHistoryInfo(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/checkout/history/info",query:t})}))}static getCheckOutBatchCloseSummary(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/checkout/site/get-batch-close-summary",query:t})}))}static postCheckOutAddItem(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/checkout/item/add",data:t})}))}static postCheckOutRemoveItem(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/checkout/item/remove",data:t})}))}static postCheckOutSubmitOrder(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/checkout/payment/submit",data:t})}))}static postCheckOutUpdateStatus(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/checkout/form/update-status",data:t})}))}static postCheckOutUpdateOrderWithCreditCardPayment(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/checkout/form/update-order-with-credit-card-payment",data:t})}))}static postCheckOutDoAuth(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/checkout/form/do-auth",data:t})}))}static postCheckOutVoidPayment(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/checkout/form/void-payment",data:t})}))}static postCheckOutRefundPayment(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/checkout/form/refund-payment",data:t})}))}static postCheckOutAdjustTipPayment(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/checkout/form/adjust-tip",data:t})}))}static postCheckOutCloseOut(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/checkout/form/closeout",data:t})}))}static postCheckOutUpdateIsWaiting(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/checkout/form/update-is-wait",data:t})}))}static postCheckOutDiscountPromotion(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/checkout/discount/promotion",data:t})}))}static postCheckOutDiscountRedeem(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/checkout/discount/redeem",data:t})}))}static postCheckOutUpdateTipData(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/checkout/tip/update",data:t})}))}static postCheckOutItemAdjustPrice(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/checkout/item/adjust-price",data:t})}))}static postCheckOutUpdatePaymentData(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/checkout/form/update-payment-data",data:t})}))}static postCheckOutItemAddCombo(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/checkout/item/add-combo",data:t})}))}static getCheckoutResendRating(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/checkout/form/send-mercure",query:t})}))}static postCustomerAchAvailable(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/ach/form/check-customer",data:t})}))}static postAchResend(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/ach/form/resend-transaction",data:t})}))}static postAchVoid(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/ach/form/cancel-transaction",data:t})}))}static postUpdateOrderSuccessToSettled(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/checkout/form/update-success-to-settled",data:t})}))}static postCalculateTax(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/checkout/form/calculate-tax",data:t})}))}static postCalculatePayment(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/checkout/form/calculate-payment",data:t})}))}}class _ extends S{static getComboSiteInfo(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/combo/site/info",query:t})}))}}class q extends S{static getCustomerList(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/customer/site/list",query:t})}))}static getCustomerDetail(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/customer/site/detail",query:t})}))}}class I extends S{static getCheckGiftCard(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/giftcard/site/check-gift-card",query:t})}))}static postResetGiftCard(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/checkout/item/reset-gift-card",data:t})}))}}class $ extends S{static getIncomeHistory(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/history/site/income-history",query:t})}))}static getStaffDailyIncome(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/staff/site/list-income-v1",query:t})}))}}class N extends S{static getKeyStorage(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/user/site/get-key-storage",query:t})}))}}var j=i(823),L=i.n(j);const U=()=>({AU:"DD-MM-YYYY",US:"MM-DD-YYYY",DEFAULT:"DD-MM-YYYY"}[localStorage.getItem("country_code")||"DEFAULT"]);var M=i(484),B=i.n(M);class F extends S{static getCheckingList(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/checkin/site/dash-board-list",query:t})}))}static getOrderDetail(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/checkout/site/info",query:t})}))}static getOrderHistoryList(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/checkout/history/info",query:t})}))}static getReportChecking(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/checkin/site/dash-board-report",query:t})}))}static updateOrderStaff(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/checkout/form/update-staff",data:t})}))}static removeOrder(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/checkout/order/remove-order",data:t})}))}static exportOrder(t){return a(this,void 0,void 0,(function*(){const e=yield this.client.get({path:"/v1/pos/checkin/site/export",query:t});let i=U();L()(e,`export-orders-${B()().format(i)}.xls`)}))}}class H extends S{static getPayrollList(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"v1/pos/payroll/site/list-payroll",query:t})}))}static getPayrollSetting(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/setting/site/payroll-setting",query:t})}))}static approvePayroll(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/payroll/form/approve-payroll",data:t})}))}static updatePayrollSetting(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/setting/form/update-payroll",data:t})}))}static getDiscountSetting(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/setting/site/discount-setting",query:t})}))}static updateDiscountSetting(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/setting/form/update-discount",data:t})}))}static getCashDiscountSetting(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/cashdiscount/setting/get",query:t})}))}static updateCashDiscountSetting(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/cashdiscount/setting/change",data:t})}))}static getIncomeDetail(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/payroll/staff/income-detail",query:t})}))}static getApprovePayroll(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/payroll/site/approve-period",query:t})}))}static exportPayroll(t){return a(this,void 0,void 0,(function*(){const e=yield this.client.get({path:"v1/pos/payroll/site/export-payroll",query:t}),i=U();L()(e.data,`${B()().format(i)}.xlsx`,"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")}))}static exportApprovePayroll(t){return a(this,void 0,void 0,(function*(){const e=yield this.client.get({path:"/v1/pos/payroll/site/export-approve-payroll",query:t}),i=U();L()(e.data,`${B()().format(i)}.xlsx`,"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")}))}static exportIncomeDetail(t){return a(this,void 0,void 0,(function*(){const e=yield this.client.get({path:"/v1/pos/payroll/staff/export-income-detail",query:t}),i=U();L()(e.data,`${B()().format(i)}.xlsx`,"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")}))}static getSalaryChart(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/payroll/site/salary-chart",query:t})}))}static getAppListPayroll(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/payroll/site/app-list-payroll",query:t})}))}static getPayrollDetail(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/payroll/site/get-payroll-detail",query:t})}))}}class Y extends S{static getPrinterList(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:g,query:t})}))}static getPrinterDetail(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:g,query:t})}))}static createPrinterInfo(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:g,data:t})}))}static updatePrinterInfo(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:g,query:t})}))}}class G extends S{static getServiceList(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/service/site/list",query:t})}))}}class W extends S{static getTurnValue(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/setting/site/get-turn-value",query:t})}))}static postTurnUpdateValue(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/setting/form/update-turn-value",data:t})}))}}class K extends S{static getStaffList(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/staff/site/list",query:t})}))}static getStaffListByCheckout(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/staff/site/list-by-checkout",query:t})}))}}class V extends S{static getTicketList(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/ticket/site/info",query:t})}))}static createTicketTemplate(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/ticket/form/create",data:t})}))}static deleteTicketTemplate(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/ticket/form/delete",query:t})}))}static updateTicketTemplate(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/ticket/form/update",query:t,data:t})}))}static moveSubject(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/ticket/form/subject-move",data:t})}))}static setDefaultTicketTemplate(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/ticket/site/set-default-ticket-template",data:t})}))}static getTicketTemplate(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/ticket/site/template",query:t})}))}}class z extends S{static getTimeKeepingList(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/timekeeping/site/list",query:t})}))}static addTimeKeeping(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/timekeeping/form/create",data:t})}))}static updateTimeKeeping(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/timekeeping/form/edit-time",data:t})}))}static removeTimeKeeping(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/timekeeping/form/delete-time",data:t})}))}static getTimeKeepingListStaff(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/timekeeping/site/list-staff",query:t})}))}static postTimeKeepingCheckIn(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/timekeeping/form/add-checkin-time",data:t})}))}static postTimeKeepingCheckOut(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/timekeeping/form/add-checkout-time",data:t})}))}}class J extends S{}class X extends S{static postLogin(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/user/form/login",data:t})}))}}const Q={Context:m,PosClientApi:class{constructor(t,e,i){this.appointment=R,this.batch_history=C,this.business=A,this.call=T,this.category=k,this.check_in=P,this.check_out=D,this.combo=_,this.customer=q,this.gift_card=I,this.income=$,this.key_storage=N,this.order=F,this.payroll=H,this.printer=Y,this.service=G,this.setting_turn=W,this.staff=K,this.ticket=V,this.time_keeping=z,this.unsubscribe_contact=J,this.user=X,S.setClient(t,e,i)}},Errors:s};window.Gap=Q;const Z=Q})(),r})()));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http_client.d.ts","sourceRoot":"","sources":["../../src/http_client/http_client.ts"],"names":[],"mappings":"AACA,OAAc,EAAC,kBAAkB,EAA+B,MAAM,OAAO,CAAC;AAC9E,OAAO,EAAC,eAAe,EAAC,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"http_client.d.ts","sourceRoot":"","sources":["../../src/http_client/http_client.ts"],"names":[],"mappings":"AACA,OAAc,EAAC,kBAAkB,EAA+B,MAAM,OAAO,CAAC;AAC9E,OAAO,EAAC,eAAe,EAAC,MAAM,eAAe,CAAC;AAE9C,OAAO,EACH,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,EAChB,aAAa,EAGhB,MAAM,SAAS,CAAC;AAEjB,qBAAa,UAAU;IACnB,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAgB;IACtC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;IAChC,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAQ;gBAErB,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;IAUtD,GAAG,CAAC,MAAM,EAAE,gBAAgB,GAAG,OAAO,CAAC,eAAe,CAAC;IAIvD,IAAI,CAAC,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAAC,eAAe,CAAC;IAIzD,GAAG,CAAC,MAAM,EAAE,gBAAgB,GAAG,OAAO,CAAC,eAAe,CAAC;IAIvD,MAAM,CAAC,MAAM,EAAE,mBAAmB,GAAG,OAAO,CAAC,eAAe,CAAC;IAI7D,OAAO,CAAC,MAAM,EAAE,aAAa,GAAG,OAAO,CAAC,eAAe,CAAC;IAkD9D,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAI9B,SAAS,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,eAAe,CAAC;CAuDhF"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { __awaiter } from "tslib";
|
|
2
2
|
import * as GapErrors from "../error";
|
|
3
3
|
import axios from "axios";
|
|
4
|
-
import ProcessedQuery from '../utils/processed-query';
|
|
5
4
|
import { Method, StatusCode } from './types';
|
|
6
5
|
export class HttpClient {
|
|
7
6
|
constructor(domain, gClientId, token) {
|
|
@@ -40,20 +39,10 @@ export class HttpClient {
|
|
|
40
39
|
if (maxTries <= 0) {
|
|
41
40
|
throw new GapErrors.HttpRequestError(`Number of tries must be >= 0, got ${maxTries}`);
|
|
42
41
|
}
|
|
43
|
-
|
|
44
|
-
// ...params.extraHeaders,
|
|
45
|
-
// };
|
|
46
|
-
// if (params.method === Method.Post || params.method === Method.Put) {
|
|
47
|
-
// const {data} = params as PostRequestParams;
|
|
48
|
-
// if (data) {
|
|
49
|
-
// headers = {
|
|
50
|
-
// 'Content-Length': Buffer.byteLength(data as string),
|
|
51
|
-
// };
|
|
52
|
-
// }
|
|
53
|
-
// }
|
|
54
|
-
const url = `${this.domain}${this.getRequestPath(params.path)}${ProcessedQuery.stringify(params.query)}`;
|
|
42
|
+
let url = `${this.domain}${this.getRequestPath(params.path)}`;
|
|
55
43
|
const options = {
|
|
56
44
|
url,
|
|
45
|
+
params: params.query,
|
|
57
46
|
method: params.method.toString(),
|
|
58
47
|
data: params.data,
|
|
59
48
|
};
|
|
@@ -70,7 +59,6 @@ export class HttpClient {
|
|
|
70
59
|
catch (error) {
|
|
71
60
|
tries++;
|
|
72
61
|
if (error instanceof GapErrors.HttpRetryableError) {
|
|
73
|
-
// We're not out of tries yet, use them
|
|
74
62
|
if (tries < maxTries) {
|
|
75
63
|
let waitTime = this.RETRY_WAIT_TIME;
|
|
76
64
|
if (error instanceof GapErrors.HttpThrottlingError &&
|
|
@@ -80,17 +68,13 @@ export class HttpClient {
|
|
|
80
68
|
yield sleep(waitTime);
|
|
81
69
|
continue;
|
|
82
70
|
}
|
|
83
|
-
// We're set to multiple tries but ran out
|
|
84
71
|
if (maxTries > 1) {
|
|
85
72
|
throw new GapErrors.HttpMaxRetriesError(`Exceeded maximum retry count of ${maxTries}. Last message: ${error.message}`);
|
|
86
73
|
}
|
|
87
74
|
}
|
|
88
|
-
// We're not retrying or the error is not retryable, rethrow
|
|
89
75
|
throw error;
|
|
90
76
|
}
|
|
91
77
|
}
|
|
92
|
-
// We're never supposed to come this far, this is here only for the benefit of Typescript
|
|
93
|
-
/* istanbul ignore next */
|
|
94
78
|
throw new GapErrors.GapError(`Unexpected flow, reached maximum HTTP tries but did not throw an error`);
|
|
95
79
|
});
|
|
96
80
|
}
|
|
@@ -100,9 +84,6 @@ export class HttpClient {
|
|
|
100
84
|
doRequest(options) {
|
|
101
85
|
return __awaiter(this, void 0, void 0, function* () {
|
|
102
86
|
try {
|
|
103
|
-
// if (typeof options.data === 'string') {
|
|
104
|
-
// options.data = JSON.parse(options.data)
|
|
105
|
-
// }
|
|
106
87
|
const response = yield this.axios(options);
|
|
107
88
|
if (response.status) {
|
|
108
89
|
return response.data;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gap-nodejs-sdk",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.13",
|
|
4
4
|
"description": "GCI App Platform Library",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -23,12 +23,12 @@
|
|
|
23
23
|
"license": "ISC",
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@types/node": "^18.0.1",
|
|
26
|
+
"browserify": "^17.0.0",
|
|
26
27
|
"esmify": "^2.1.1",
|
|
27
28
|
"rimraf": "^3.0.2",
|
|
28
29
|
"typescript": "^4.7.2",
|
|
29
30
|
"webpack": "^5.73.0",
|
|
30
|
-
"webpack-cli": "^4.10.0"
|
|
31
|
-
"browserify": "^17.0.0"
|
|
31
|
+
"webpack-cli": "^4.10.0"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"axios": "^0.27.2",
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
export default class ProcessedQuery {
|
|
2
|
-
static stringify(keyValuePairs?: {
|
|
3
|
-
[key: string]: any;
|
|
4
|
-
}): string;
|
|
5
|
-
processedQuery: {
|
|
6
|
-
[key: string]: string | number | (string | number)[];
|
|
7
|
-
};
|
|
8
|
-
constructor();
|
|
9
|
-
putAll(keyValuePairs: {
|
|
10
|
-
[key: string]: any;
|
|
11
|
-
}): ProcessedQuery;
|
|
12
|
-
put(key: string, value: any): void;
|
|
13
|
-
putArray(key: string, value: (string | number)[]): void;
|
|
14
|
-
putObject(key: string, value: object): void;
|
|
15
|
-
putSimple(key: string, value: string | number): void;
|
|
16
|
-
stringify(): string;
|
|
17
|
-
}
|
|
18
|
-
//# sourceMappingURL=processed-query.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"processed-query.d.ts","sourceRoot":"","sources":["../../src/utils/processed-query.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,OAAO,OAAO,cAAc;IACjC,MAAM,CAAC,SAAS,CAAC,aAAa,CAAC,EAAE;QAAC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAC,GAAG,MAAM;IAM9D,cAAc,EAAE;QACd,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;KACtD,CAAC;;IAMF,MAAM,CAAC,aAAa,EAAE;QAAC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAC,GAAG,cAAc;IAO3D,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,IAAI;IAUlC,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,GAAG,IAAI;IAIvD,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;IAQ3C,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;IAIpD,SAAS,IAAI,MAAM;CAKpB"}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import querystring from 'querystring';
|
|
2
|
-
export default class ProcessedQuery {
|
|
3
|
-
constructor() {
|
|
4
|
-
this.processedQuery = {};
|
|
5
|
-
}
|
|
6
|
-
static stringify(keyValuePairs) {
|
|
7
|
-
if (!keyValuePairs || Object.keys(keyValuePairs).length === 0)
|
|
8
|
-
return '';
|
|
9
|
-
return new ProcessedQuery().putAll(keyValuePairs).stringify();
|
|
10
|
-
}
|
|
11
|
-
putAll(keyValuePairs) {
|
|
12
|
-
Object.entries(keyValuePairs).forEach(([key, value]) => this.put(key, value));
|
|
13
|
-
return this;
|
|
14
|
-
}
|
|
15
|
-
put(key, value) {
|
|
16
|
-
if (Array.isArray(value)) {
|
|
17
|
-
this.putArray(key, value);
|
|
18
|
-
}
|
|
19
|
-
else if (value.constructor === Object) {
|
|
20
|
-
this.putObject(key, value);
|
|
21
|
-
}
|
|
22
|
-
else {
|
|
23
|
-
this.putSimple(key, value);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
putArray(key, value) {
|
|
27
|
-
this.processedQuery[`${key}[]`] = value;
|
|
28
|
-
}
|
|
29
|
-
putObject(key, value) {
|
|
30
|
-
Object.entries(value).forEach(([entry, entryValue]) => {
|
|
31
|
-
this.processedQuery[`${key}[${entry}]`] = entryValue;
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
putSimple(key, value) {
|
|
35
|
-
this.processedQuery[key] = value;
|
|
36
|
-
}
|
|
37
|
-
stringify() {
|
|
38
|
-
return `?${querystring.stringify(this.processedQuery)}`;
|
|
39
|
-
}
|
|
40
|
-
}
|