crmbonus-component-wake 2.1.18-homolog → 2.1.20-homolog

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (168) hide show
  1. package/dist/cjs/app-modal.cjs.entry.js +1 -1
  2. package/dist/cjs/{cart.helper-d216033e.js → cart.helper-0a401d80.js} +2 -2
  3. package/dist/cjs/{cart.helper-d216033e.js.map → cart.helper-0a401d80.js.map} +1 -1
  4. package/dist/cjs/countdown-timer-v2.cjs.entry.js +77 -0
  5. package/dist/cjs/countdown-timer-v2.cjs.entry.js.map +1 -0
  6. package/dist/cjs/countdown-timer.cjs.entry.js +31 -50
  7. package/dist/cjs/countdown-timer.cjs.entry.js.map +1 -1
  8. package/dist/cjs/crm-bonus-form.cjs.entry.js +1 -1
  9. package/dist/cjs/crm-bonus-note.cjs.entry.js +15 -6
  10. package/dist/cjs/crm-bonus-note.cjs.entry.js.map +1 -1
  11. package/dist/cjs/crm-bonus.cjs.entry.js +3 -3
  12. package/dist/cjs/crm-giftback-form_2.cjs.entry.js +10 -8
  13. package/dist/cjs/crm-giftback-form_2.cjs.entry.js.map +1 -1
  14. package/dist/cjs/crm-tooltip_4.cjs.entry.js +29 -14
  15. package/dist/cjs/crm-tooltip_4.cjs.entry.js.map +1 -1
  16. package/dist/cjs/crmbonus-component-wake.cjs.js +1 -1
  17. package/dist/cjs/{crmbonus.service-5537cef5.js → crmbonus.service-7a4f6786.js} +2 -2
  18. package/dist/cjs/{crmbonus.service-5537cef5.js.map → crmbonus.service-7a4f6786.js.map} +1 -1
  19. package/dist/cjs/loader.cjs.js +1 -1
  20. package/dist/cjs/loading-spinner.cjs.entry.js +1 -1
  21. package/dist/cjs/pedido-finalizado.cjs.entry.js +3 -3
  22. package/dist/cjs/phone-input-mask.cjs.entry.js +1 -1
  23. package/dist/collection/collection-manifest.json +1 -0
  24. package/dist/collection/components/countdown-timer/countdown-timer.js +60 -67
  25. package/dist/collection/components/countdown-timer/countdown-timer.js.map +1 -1
  26. package/dist/collection/components/countdown-timer/countdown-timer.v2.js +134 -0
  27. package/dist/collection/components/countdown-timer/countdown-timer.v2.js.map +1 -0
  28. package/dist/collection/components/crm-bonus/crm-bonus.js +1 -1
  29. package/dist/collection/components/giftback-form/giftback-form.js +7 -5
  30. package/dist/collection/components/giftback-form/giftback-form.js.map +1 -1
  31. package/dist/collection/components/giftback-form/subcomponents/giftback-info/giftback-info.js +28 -9
  32. package/dist/collection/components/giftback-form/subcomponents/giftback-info/giftback-info.js.map +1 -1
  33. package/dist/collection/components/giftback-form/subcomponents/phone-form/phone-form.js +1 -1
  34. package/dist/collection/components/giftback-form/subcomponents/pin-form/pin-form.js +14 -1
  35. package/dist/collection/components/giftback-form/subcomponents/pin-form/pin-form.js.map +1 -1
  36. package/dist/collection/components/loading-container/loading-container.js +1 -1
  37. package/dist/collection/components/loading-spinner/loading-spinner.js +1 -1
  38. package/dist/collection/components/modal/app-modal.js +1 -1
  39. package/dist/collection/components/note/crm-bonus-note.js +15 -5
  40. package/dist/collection/components/note/crm-bonus-note.js.map +1 -1
  41. package/dist/collection/components/pedido/pedido.js +1 -1
  42. package/dist/collection/components/phone/phone-input-mask.js +1 -1
  43. package/dist/collection/components/tooltip/tooltip.js +1 -1
  44. package/dist/components/app-modal.js +1 -1
  45. package/dist/components/countdown-timer-v2.d.ts +11 -0
  46. package/dist/components/{p-30d12b1b.js → countdown-timer-v2.js} +15 -11
  47. package/dist/components/countdown-timer-v2.js.map +1 -0
  48. package/dist/components/countdown-timer.js +1 -1
  49. package/dist/components/crm-bonus-form.js +5 -5
  50. package/dist/components/crm-bonus-note.js +18 -8
  51. package/dist/components/crm-bonus-note.js.map +1 -1
  52. package/dist/components/crm-bonus.js +13 -13
  53. package/dist/components/crm-button.js +1 -1
  54. package/dist/components/crm-giftback-form.js +1 -1
  55. package/dist/components/crm-tooltip.js +1 -1
  56. package/dist/components/giftback-info.js +1 -1
  57. package/dist/components/giftback-pin.js +1 -1
  58. package/dist/components/giftback-progress.js +1 -1
  59. package/dist/components/loading-container.js +1 -1
  60. package/dist/components/loading-spinner.js +1 -1
  61. package/dist/components/name-input.js +1 -1
  62. package/dist/components/{p-8f1485e7.js → p-39cc3ce4.js} +2 -2
  63. package/dist/components/{p-8f1485e7.js.map → p-39cc3ce4.js.map} +1 -1
  64. package/dist/components/{p-ef285153.js → p-4ac2b98e.js} +18 -5
  65. package/dist/components/p-4ac2b98e.js.map +1 -0
  66. package/dist/components/{p-c6153eb6.js → p-5a7b0549.js} +2 -2
  67. package/dist/components/{p-c6153eb6.js.map → p-5a7b0549.js.map} +1 -1
  68. package/dist/components/{p-a7809d51.js → p-63ca9208.js} +5 -5
  69. package/dist/components/{p-a7809d51.js.map → p-63ca9208.js.map} +1 -1
  70. package/dist/components/p-86b95c83.js +74 -0
  71. package/dist/components/p-86b95c83.js.map +1 -0
  72. package/dist/components/{p-b57fbd6d.js → p-9ca28ea7.js} +2 -2
  73. package/dist/components/{p-b57fbd6d.js.map → p-9ca28ea7.js.map} +1 -1
  74. package/dist/components/{p-3eba0eba.js → p-a428d5df.js} +2 -2
  75. package/dist/components/{p-3eba0eba.js.map → p-a428d5df.js.map} +1 -1
  76. package/dist/components/{p-b42db369.js → p-a70a82a3.js} +2 -2
  77. package/dist/components/{p-b42db369.js.map → p-a70a82a3.js.map} +1 -1
  78. package/dist/components/{p-220754a5.js → p-c4788672.js} +2 -2
  79. package/dist/components/{p-220754a5.js.map → p-c4788672.js.map} +1 -1
  80. package/dist/components/{p-fc6f781f.js → p-cd108989.js} +2 -2
  81. package/dist/components/{p-fc6f781f.js.map → p-cd108989.js.map} +1 -1
  82. package/dist/components/{p-1a20b231.js → p-d8bd654a.js} +17 -14
  83. package/dist/components/p-d8bd654a.js.map +1 -0
  84. package/dist/components/{p-34803421.js → p-dc1871cf.js} +2 -2
  85. package/dist/components/{p-34803421.js.map → p-dc1871cf.js.map} +1 -1
  86. package/dist/components/{p-82ea12ff.js → p-e25a1b64.js} +2 -2
  87. package/dist/components/{p-82ea12ff.js.map → p-e25a1b64.js.map} +1 -1
  88. package/dist/components/{p-83249636.js → p-e81cd527.js} +2 -2
  89. package/dist/components/{p-83249636.js.map → p-e81cd527.js.map} +1 -1
  90. package/dist/components/{p-8b7e3ba9.js → p-f9372dc4.js} +18 -16
  91. package/dist/components/{p-8b7e3ba9.js.map → p-f9372dc4.js.map} +1 -1
  92. package/dist/components/pedido-finalizado.js +3 -3
  93. package/dist/components/phone-cancel-input.js +2 -2
  94. package/dist/components/phone-form.js +1 -1
  95. package/dist/components/phone-input-mask.js +1 -1
  96. package/dist/components/phone-input.js +2 -2
  97. package/dist/components/pin-form.js +1 -1
  98. package/dist/crmbonus-component-wake/crmbonus-component-wake.esm.js +1 -1
  99. package/dist/crmbonus-component-wake/crmbonus-component-wake.esm.js.map +1 -1
  100. package/dist/crmbonus-component-wake/{p-68b058e9.entry.js → p-0055876c.entry.js} +2 -2
  101. package/dist/crmbonus-component-wake/p-0a40bcba.entry.js +2 -0
  102. package/dist/crmbonus-component-wake/p-0a40bcba.entry.js.map +1 -0
  103. package/dist/crmbonus-component-wake/{p-402ead13.entry.js → p-154b5318.entry.js} +2 -2
  104. package/dist/crmbonus-component-wake/{p-09e26da2.entry.js → p-35b95848.entry.js} +2 -2
  105. package/dist/crmbonus-component-wake/p-4cdd8038.entry.js +2 -0
  106. package/dist/crmbonus-component-wake/{p-b307cbed.entry.js.map → p-4cdd8038.entry.js.map} +1 -1
  107. package/dist/crmbonus-component-wake/p-5aa35e0f.entry.js +2 -0
  108. package/dist/crmbonus-component-wake/p-5aa35e0f.entry.js.map +1 -0
  109. package/dist/crmbonus-component-wake/{p-a6a4a314.entry.js → p-77d8e96c.entry.js} +2 -2
  110. package/dist/crmbonus-component-wake/p-81ec64ff.entry.js +2 -0
  111. package/dist/crmbonus-component-wake/p-81ec64ff.entry.js.map +1 -0
  112. package/dist/crmbonus-component-wake/p-8e2d6659.entry.js +2 -0
  113. package/dist/crmbonus-component-wake/p-8e2d6659.entry.js.map +1 -0
  114. package/dist/crmbonus-component-wake/{p-b57fbd6d.js → p-9ca28ea7.js} +2 -2
  115. package/dist/crmbonus-component-wake/{p-3eba0eba.js → p-a428d5df.js} +2 -2
  116. package/dist/crmbonus-component-wake/{p-3eba0eba.js.map → p-a428d5df.js.map} +1 -1
  117. package/dist/crmbonus-component-wake/p-b2941d60.entry.js +2 -0
  118. package/dist/crmbonus-component-wake/{p-d3ed9573.entry.js → p-e4aae2ed.entry.js} +2 -2
  119. package/dist/env.js +1 -1
  120. package/dist/env.js.map +1 -1
  121. package/dist/esm/app-modal.entry.js +1 -1
  122. package/dist/esm/{cart.helper-8be1bc35.js → cart.helper-c6fd0b36.js} +2 -2
  123. package/dist/esm/{cart.helper-8be1bc35.js.map → cart.helper-c6fd0b36.js.map} +1 -1
  124. package/dist/esm/countdown-timer-v2.entry.js +73 -0
  125. package/dist/esm/countdown-timer-v2.entry.js.map +1 -0
  126. package/dist/esm/countdown-timer.entry.js +31 -50
  127. package/dist/esm/countdown-timer.entry.js.map +1 -1
  128. package/dist/esm/crm-bonus-form.entry.js +1 -1
  129. package/dist/esm/crm-bonus-note.entry.js +15 -6
  130. package/dist/esm/crm-bonus-note.entry.js.map +1 -1
  131. package/dist/esm/crm-bonus.entry.js +3 -3
  132. package/dist/esm/crm-giftback-form_2.entry.js +10 -8
  133. package/dist/esm/crm-giftback-form_2.entry.js.map +1 -1
  134. package/dist/esm/crm-tooltip_4.entry.js +29 -14
  135. package/dist/esm/crm-tooltip_4.entry.js.map +1 -1
  136. package/dist/esm/crmbonus-component-wake.js +1 -1
  137. package/dist/esm/{crmbonus.service-5bc16be9.js → crmbonus.service-0bd0a5ac.js} +2 -2
  138. package/dist/esm/{crmbonus.service-5bc16be9.js.map → crmbonus.service-0bd0a5ac.js.map} +1 -1
  139. package/dist/esm/loader.js +1 -1
  140. package/dist/esm/loading-spinner.entry.js +1 -1
  141. package/dist/esm/pedido-finalizado.entry.js +3 -3
  142. package/dist/esm/phone-input-mask.entry.js +1 -1
  143. package/dist/types/components/countdown-timer/countdown-timer.d.ts +6 -10
  144. package/dist/types/components/countdown-timer/countdown-timer.v2.d.ts +17 -0
  145. package/dist/types/components/giftback-form/subcomponents/giftback-info/giftback-info.d.ts +1 -0
  146. package/dist/types/components/giftback-form/subcomponents/pin-form/pin-form.d.ts +1 -0
  147. package/dist/types/components/note/crm-bonus-note.d.ts +3 -1
  148. package/dist/types/components.d.ts +25 -2
  149. package/dist/types/home/darlison/Projects/Bycoders/crmbonus/crmbonus-component/.stencil/env.d.ts +1 -1
  150. package/package.json +1 -1
  151. package/dist/components/p-1a20b231.js.map +0 -1
  152. package/dist/components/p-30d12b1b.js.map +0 -1
  153. package/dist/components/p-ef285153.js.map +0 -1
  154. package/dist/crmbonus-component-wake/p-08af385f.entry.js +0 -2
  155. package/dist/crmbonus-component-wake/p-5cfc2702.entry.js +0 -2
  156. package/dist/crmbonus-component-wake/p-5cfc2702.entry.js.map +0 -1
  157. package/dist/crmbonus-component-wake/p-898ab1b3.entry.js +0 -2
  158. package/dist/crmbonus-component-wake/p-898ab1b3.entry.js.map +0 -1
  159. package/dist/crmbonus-component-wake/p-b307cbed.entry.js +0 -2
  160. package/dist/crmbonus-component-wake/p-ee132b98.entry.js +0 -2
  161. package/dist/crmbonus-component-wake/p-ee132b98.entry.js.map +0 -1
  162. /package/dist/crmbonus-component-wake/{p-68b058e9.entry.js.map → p-0055876c.entry.js.map} +0 -0
  163. /package/dist/crmbonus-component-wake/{p-402ead13.entry.js.map → p-154b5318.entry.js.map} +0 -0
  164. /package/dist/crmbonus-component-wake/{p-09e26da2.entry.js.map → p-35b95848.entry.js.map} +0 -0
  165. /package/dist/crmbonus-component-wake/{p-a6a4a314.entry.js.map → p-77d8e96c.entry.js.map} +0 -0
  166. /package/dist/crmbonus-component-wake/{p-b57fbd6d.js.map → p-9ca28ea7.js.map} +0 -0
  167. /package/dist/crmbonus-component-wake/{p-08af385f.entry.js.map → p-b2941d60.entry.js.map} +0 -0
  168. /package/dist/crmbonus-component-wake/{p-d3ed9573.entry.js.map → p-e4aae2ed.entry.js.map} +0 -0
@@ -1,2 +1,2 @@
1
- function t(t,e){return function n(){return t.apply(e,arguments)}}const{toString:e}=Object.prototype;const{getPrototypeOf:n}=Object;const o=(t=>n=>{const o=e.call(n);return t[o]||(t[o]=o.slice(8,-1).toLowerCase())})(Object.create(null));const r=t=>{t=t.toLowerCase();return e=>o(e)===t};const s=t=>e=>typeof e===t;const{isArray:i}=Array;const c=s("undefined");function a(t){return t!==null&&!c(t)&&t.constructor!==null&&!c(t.constructor)&&d(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const u=r("ArrayBuffer");function l(t){let e;if(typeof ArrayBuffer!=="undefined"&&ArrayBuffer.isView){e=ArrayBuffer.isView(t)}else{e=t&&t.buffer&&u(t.buffer)}return e}const f=s("string");const d=s("function");const h=s("number");const p=t=>t!==null&&typeof t==="object";const m=t=>t===true||t===false;const w=t=>{if(o(t)!=="object"){return false}const e=n(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)};const y=r("Date");const b=r("File");const g=r("Blob");const R=r("FileList");const O=t=>p(t)&&d(t.pipe);const S=t=>{let e;return t&&(typeof FormData==="function"&&t instanceof FormData||d(t.append)&&((e=o(t))==="formdata"||e==="object"&&d(t.toString)&&t.toString()==="[object FormData]"))};const E=r("URLSearchParams");const[T,A,j,C]=["ReadableStream","Request","Response","Headers"].map(r);const N=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function v(t,e,{allOwnKeys:n=false}={}){if(t===null||typeof t==="undefined"){return}let o;let r;if(typeof t!=="object"){t=[t]}if(i(t)){for(o=0,r=t.length;o<r;o++){e.call(null,t[o],o,t)}}else{const r=n?Object.getOwnPropertyNames(t):Object.keys(t);const s=r.length;let i;for(o=0;o<s;o++){i=r[o];e.call(null,t[i],i,t)}}}function x(t,e){e=e.toLowerCase();const n=Object.keys(t);let o=n.length;let r;while(o-- >0){r=n[o];if(e===r.toLowerCase()){return r}}return null}const B=(()=>{if(typeof globalThis!=="undefined")return globalThis;return typeof self!=="undefined"?self:typeof window!=="undefined"?window:global})();const P=t=>!c(t)&&t!==B;function D(){const{caseless:t}=P(this)&&this||{};const e={};const n=(n,o)=>{const r=t&&x(e,o)||o;if(w(e[r])&&w(n)){e[r]=D(e[r],n)}else if(w(n)){e[r]=D({},n)}else if(i(n)){e[r]=n.slice()}else{e[r]=n}};for(let t=0,e=arguments.length;t<e;t++){arguments[t]&&v(arguments[t],n)}return e}const F=(e,n,o,{allOwnKeys:r}={})=>{v(n,((n,r)=>{if(o&&d(n)){e[r]=t(n,o)}else{e[r]=n}}),{allOwnKeys:r});return e};const U=t=>{if(t.charCodeAt(0)===65279){t=t.slice(1)}return t};const _=(t,e,n,o)=>{t.prototype=Object.create(e.prototype,o);t.prototype.constructor=t;Object.defineProperty(t,"super",{value:e.prototype});n&&Object.assign(t.prototype,n)};const k=(t,e,o,r)=>{let s;let i;let c;const a={};e=e||{};if(t==null)return e;do{s=Object.getOwnPropertyNames(t);i=s.length;while(i-- >0){c=s[i];if((!r||r(c,t,e))&&!a[c]){e[c]=t[c];a[c]=true}}t=o!==false&&n(t)}while(t&&(!o||o(t,e))&&t!==Object.prototype);return e};const q=(t,e,n)=>{t=String(t);if(n===undefined||n>t.length){n=t.length}n-=e.length;const o=t.indexOf(e,n);return o!==-1&&o===n};const I=t=>{if(!t)return null;if(i(t))return t;let e=t.length;if(!h(e))return null;const n=new Array(e);while(e-- >0){n[e]=t[e]}return n};const L=(t=>e=>t&&e instanceof t)(typeof Uint8Array!=="undefined"&&n(Uint8Array));const $=(t,e)=>{const n=t&&t[Symbol.iterator];const o=n.call(t);let r;while((r=o.next())&&!r.done){const n=r.value;e.call(t,n[0],n[1])}};const z=(t,e)=>{let n;const o=[];while((n=t.exec(e))!==null){o.push(n)}return o};const M=r("HTMLFormElement");const H=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function t(e,n,o){return n.toUpperCase()+o}));const J=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype);const K=r("RegExp");const V=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t);const o={};v(n,((n,r)=>{let s;if((s=e(n,r,t))!==false){o[r]=s||n}}));Object.defineProperties(t,o)};const W=t=>{V(t,((e,n)=>{if(d(t)&&["arguments","caller","callee"].indexOf(n)!==-1){return false}const o=t[n];if(!d(o))return;e.enumerable=false;if("writable"in e){e.writable=false;return}if(!e.set){e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}}}))};const G=(t,e)=>{const n={};const o=t=>{t.forEach((t=>{n[t]=true}))};i(t)?o(t):o(String(t).split(e));return n};const X=()=>{};const Y=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;const Z="abcdefghijklmnopqrstuvwxyz";const Q="0123456789";const tt={DIGIT:Q,ALPHA:Z,ALPHA_DIGIT:Z+Z.toUpperCase()+Q};const et=(t=16,e=tt.ALPHA_DIGIT)=>{let n="";const{length:o}=e;while(t--){n+=e[Math.random()*o|0]}return n};function nt(t){return!!(t&&d(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const ot=t=>{const e=new Array(10);const n=(t,o)=>{if(p(t)){if(e.indexOf(t)>=0){return}if(!("toJSON"in t)){e[o]=t;const r=i(t)?[]:{};v(t,((t,e)=>{const s=n(t,o+1);!c(s)&&(r[e]=s)}));e[o]=undefined;return r}}return t};return n(t,0)};const rt=r("AsyncFunction");const st=t=>t&&(p(t)||d(t))&&d(t.then)&&d(t.catch);const it=((t,e)=>{if(t){return setImmediate}return e?((t,e)=>{B.addEventListener("message",(({source:n,data:o})=>{if(n===B&&o===t){e.length&&e.shift()()}}),false);return n=>{e.push(n);B.postMessage(t,"*")}})(`axios@${Math.random()}`,[]):t=>setTimeout(t)})(typeof setImmediate==="function",d(B.postMessage));const ct=typeof queueMicrotask!=="undefined"?queueMicrotask.bind(B):typeof process!=="undefined"&&process.nextTick||it;const at={isArray:i,isArrayBuffer:u,isBuffer:a,isFormData:S,isArrayBufferView:l,isString:f,isNumber:h,isBoolean:m,isObject:p,isPlainObject:w,isReadableStream:T,isRequest:A,isResponse:j,isHeaders:C,isUndefined:c,isDate:y,isFile:b,isBlob:g,isRegExp:K,isFunction:d,isStream:O,isURLSearchParams:E,isTypedArray:L,isFileList:R,forEach:v,merge:D,extend:F,trim:N,stripBOM:U,inherits:_,toFlatObject:k,kindOf:o,kindOfTest:r,endsWith:q,toArray:I,forEachEntry:$,matchAll:z,isHTMLForm:M,hasOwnProperty:J,hasOwnProp:J,reduceDescriptors:V,freezeMethods:W,toObjectSet:G,toCamelCase:H,noop:X,toFiniteNumber:Y,findKey:x,global:B,isContextDefined:P,ALPHABET:tt,generateString:et,isSpecCompliantForm:nt,toJSONObject:ot,isAsyncFn:rt,isThenable:st,setImmediate:it,asap:ct};function ut(t,e,n,o,r){Error.call(this);if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}else{this.stack=(new Error).stack}this.message=t;this.name="AxiosError";e&&(this.code=e);n&&(this.config=n);o&&(this.request=o);if(r){this.response=r;this.status=r.status?r.status:null}}at.inherits(ut,Error,{toJSON:function t(){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:at.toJSONObject(this.config),code:this.code,status:this.status}}});const lt=ut.prototype;const ft={};["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","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((t=>{ft[t]={value:t}}));Object.defineProperties(ut,ft);Object.defineProperty(lt,"isAxiosError",{value:true});ut.from=(t,e,n,o,r,s)=>{const i=Object.create(lt);at.toFlatObject(t,i,(function t(e){return e!==Error.prototype}),(t=>t!=="isAxiosError"));ut.call(i,t.message,e,n,o,r);i.cause=t;i.name=t.name;s&&Object.assign(i,s);return i};const dt=null;function ht(t){return at.isPlainObject(t)||at.isArray(t)}function pt(t){return at.endsWith(t,"[]")?t.slice(0,-2):t}function mt(t,e,n){if(!t)return e;return t.concat(e).map((function t(e,o){e=pt(e);return!n&&o?"["+e+"]":e})).join(n?".":"")}function wt(t){return at.isArray(t)&&!t.some(ht)}const yt=at.toFlatObject(at,{},null,(function t(e){return/^is[A-Z]/.test(e)}));function bt(t,e,n){if(!at.isObject(t)){throw new TypeError("target must be an object")}e=e||new FormData;n=at.toFlatObject(n,{metaTokens:true,dots:false,indexes:false},false,(function t(e,n){return!at.isUndefined(n[e])}));const o=n.metaTokens;const r=n.visitor||l;const s=n.dots;const i=n.indexes;const c=n.Blob||typeof Blob!=="undefined"&&Blob;const a=c&&at.isSpecCompliantForm(e);if(!at.isFunction(r)){throw new TypeError("visitor must be a function")}function u(t){if(t===null)return"";if(at.isDate(t)){return t.toISOString()}if(!a&&at.isBlob(t)){throw new ut("Blob is not supported. Use a Buffer instead.")}if(at.isArrayBuffer(t)||at.isTypedArray(t)){return a&&typeof Blob==="function"?new Blob([t]):Buffer.from(t)}return t}function l(t,n,r){let c=t;if(t&&!r&&typeof t==="object"){if(at.endsWith(n,"{}")){n=o?n:n.slice(0,-2);t=JSON.stringify(t)}else if(at.isArray(t)&&wt(t)||(at.isFileList(t)||at.endsWith(n,"[]"))&&(c=at.toArray(t))){n=pt(n);c.forEach((function t(o,r){!(at.isUndefined(o)||o===null)&&e.append(i===true?mt([n],r,s):i===null?n:n+"[]",u(o))}));return false}}if(ht(t)){return true}e.append(mt(r,n,s),u(t));return false}const f=[];const d=Object.assign(yt,{defaultVisitor:l,convertValue:u,isVisitable:ht});function h(t,n){if(at.isUndefined(t))return;if(f.indexOf(t)!==-1){throw Error("Circular reference detected in "+n.join("."))}f.push(t);at.forEach(t,(function t(o,s){const i=!(at.isUndefined(o)||o===null)&&r.call(e,o,at.isString(s)?s.trim():s,n,d);if(i===true){h(o,n?n.concat(s):[s])}}));f.pop()}if(!at.isObject(t)){throw new TypeError("data must be an object")}h(t);return e}function gt(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,(function t(n){return e[n]}))}function Rt(t,e){this._pairs=[];t&&bt(t,this,e)}const Ot=Rt.prototype;Ot.append=function t(e,n){this._pairs.push([e,n])};Ot.toString=function t(e){const n=e?function(t){return e.call(this,t,gt)}:gt;return this._pairs.map((function t(e){return n(e[0])+"="+n(e[1])}),"").join("&")};function St(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Et(t,e,n){if(!e){return t}const o=n&&n.encode||St;const r=n&&n.serialize;let s;if(r){s=r(e,n)}else{s=at.isURLSearchParams(e)?e.toString():new Rt(e,n).toString(o)}if(s){const e=t.indexOf("#");if(e!==-1){t=t.slice(0,e)}t+=(t.indexOf("?")===-1?"?":"&")+s}return t}class Tt{constructor(){this.handlers=[]}use(t,e,n){this.handlers.push({fulfilled:t,rejected:e,synchronous:n?n.synchronous:false,runWhen:n?n.runWhen:null});return this.handlers.length-1}eject(t){if(this.handlers[t]){this.handlers[t]=null}}clear(){if(this.handlers){this.handlers=[]}}forEach(t){at.forEach(this.handlers,(function e(n){if(n!==null){t(n)}}))}}const At=Tt;const jt={silentJSONParsing:true,forcedJSONParsing:true,clarifyTimeoutError:false};const Ct=typeof URLSearchParams!=="undefined"?URLSearchParams:Rt;const Nt=typeof FormData!=="undefined"?FormData:null;const vt=typeof Blob!=="undefined"?Blob:null;const xt={isBrowser:true,classes:{URLSearchParams:Ct,FormData:Nt,Blob:vt},protocols:["http","https","file","blob","url","data"]};const Bt=typeof window!=="undefined"&&typeof document!=="undefined";const Pt=typeof navigator==="object"&&navigator||undefined;const Dt=Bt&&(!Pt||["ReactNative","NativeScript","NS"].indexOf(Pt.product)<0);const Ft=(()=>typeof WorkerGlobalScope!=="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts==="function")();const Ut=Bt&&window.location.href||"http://localhost";const _t=Object.freeze({__proto__:null,hasBrowserEnv:Bt,hasStandardBrowserWebWorkerEnv:Ft,hasStandardBrowserEnv:Dt,navigator:Pt,origin:Ut});const kt={..._t,...xt};function qt(t,e){return bt(t,new kt.classes.URLSearchParams,Object.assign({visitor:function(t,e,n,o){if(kt.isNode&&at.isBuffer(t)){this.append(e,t.toString("base64"));return false}return o.defaultVisitor.apply(this,arguments)}},e))}function It(t){return at.matchAll(/\w+|\[(\w*)]/g,t).map((t=>t[0]==="[]"?"":t[1]||t[0]))}function Lt(t){const e={};const n=Object.keys(t);let o;const r=n.length;let s;for(o=0;o<r;o++){s=n[o];e[s]=t[s]}return e}function $t(t){function e(t,n,o,r){let s=t[r++];if(s==="__proto__")return true;const i=Number.isFinite(+s);const c=r>=t.length;s=!s&&at.isArray(o)?o.length:s;if(c){if(at.hasOwnProp(o,s)){o[s]=[o[s],n]}else{o[s]=n}return!i}if(!o[s]||!at.isObject(o[s])){o[s]=[]}const a=e(t,n,o[s],r);if(a&&at.isArray(o[s])){o[s]=Lt(o[s])}return!i}if(at.isFormData(t)&&at.isFunction(t.entries)){const n={};at.forEachEntry(t,((t,o)=>{e(It(t),o,n,0)}));return n}return null}function zt(t,e,n){if(at.isString(t)){try{(e||JSON.parse)(t);return at.trim(t)}catch(t){if(t.name!=="SyntaxError"){throw t}}}return(n||JSON.stringify)(t)}const Mt={transitional:jt,adapter:["xhr","http","fetch"],transformRequest:[function t(e,n){const o=n.getContentType()||"";const r=o.indexOf("application/json")>-1;const s=at.isObject(e);if(s&&at.isHTMLForm(e)){e=new FormData(e)}const i=at.isFormData(e);if(i){return r?JSON.stringify($t(e)):e}if(at.isArrayBuffer(e)||at.isBuffer(e)||at.isStream(e)||at.isFile(e)||at.isBlob(e)||at.isReadableStream(e)){return e}if(at.isArrayBufferView(e)){return e.buffer}if(at.isURLSearchParams(e)){n.setContentType("application/x-www-form-urlencoded;charset=utf-8",false);return e.toString()}let c;if(s){if(o.indexOf("application/x-www-form-urlencoded")>-1){return qt(e,this.formSerializer).toString()}if((c=at.isFileList(e))||o.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return bt(c?{"files[]":e}:e,t&&new t,this.formSerializer)}}if(s||r){n.setContentType("application/json",false);return zt(e)}return e}],transformResponse:[function t(e){const n=this.transitional||Mt.transitional;const o=n&&n.forcedJSONParsing;const r=this.responseType==="json";if(at.isResponse(e)||at.isReadableStream(e)){return e}if(e&&at.isString(e)&&(o&&!this.responseType||r)){const t=n&&n.silentJSONParsing;const o=!t&&r;try{return JSON.parse(e)}catch(t){if(o){if(t.name==="SyntaxError"){throw ut.from(t,ut.ERR_BAD_RESPONSE,this,null,this.response)}throw t}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:kt.classes.FormData,Blob:kt.classes.Blob},validateStatus:function t(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":undefined}}};at.forEach(["delete","get","head","post","put","patch"],(t=>{Mt.headers[t]={}}));const Ht=Mt;const Jt=at.toObjectSet(["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"]);const Kt=t=>{const e={};let n;let o;let r;t&&t.split("\n").forEach((function t(s){r=s.indexOf(":");n=s.substring(0,r).trim().toLowerCase();o=s.substring(r+1).trim();if(!n||e[n]&&Jt[n]){return}if(n==="set-cookie"){if(e[n]){e[n].push(o)}else{e[n]=[o]}}else{e[n]=e[n]?e[n]+", "+o:o}}));return e};const Vt=Symbol("internals");function Wt(t){return t&&String(t).trim().toLowerCase()}function Gt(t){if(t===false||t==null){return t}return at.isArray(t)?t.map(Gt):String(t)}function Xt(t){const e=Object.create(null);const n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let o;while(o=n.exec(t)){e[o[1]]=o[2]}return e}const Yt=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Zt(t,e,n,o,r){if(at.isFunction(o)){return o.call(this,e,n)}if(r){e=n}if(!at.isString(e))return;if(at.isString(o)){return e.indexOf(o)!==-1}if(at.isRegExp(o)){return o.test(e)}}function Qt(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((t,e,n)=>e.toUpperCase()+n))}function te(t,e){const n=at.toCamelCase(" "+e);["get","set","has"].forEach((o=>{Object.defineProperty(t,o+n,{value:function(t,n,r){return this[o].call(this,e,t,n,r)},configurable:true})}))}class ee{constructor(t){t&&this.set(t)}set(t,e,n){const o=this;function r(t,e,n){const r=Wt(e);if(!r){throw new Error("header name must be a non-empty string")}const s=at.findKey(o,r);if(!s||o[s]===undefined||n===true||n===undefined&&o[s]!==false){o[s||e]=Gt(t)}}const s=(t,e)=>at.forEach(t,((t,n)=>r(t,n,e)));if(at.isPlainObject(t)||t instanceof this.constructor){s(t,e)}else if(at.isString(t)&&(t=t.trim())&&!Yt(t)){s(Kt(t),e)}else if(at.isHeaders(t)){for(const[e,o]of t.entries()){r(o,e,n)}}else{t!=null&&r(e,t,n)}return this}get(t,e){t=Wt(t);if(t){const n=at.findKey(this,t);if(n){const t=this[n];if(!e){return t}if(e===true){return Xt(t)}if(at.isFunction(e)){return e.call(this,t,n)}if(at.isRegExp(e)){return e.exec(t)}throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){t=Wt(t);if(t){const n=at.findKey(this,t);return!!(n&&this[n]!==undefined&&(!e||Zt(this,this[n],n,e)))}return false}delete(t,e){const n=this;let o=false;function r(t){t=Wt(t);if(t){const r=at.findKey(n,t);if(r&&(!e||Zt(n,n[r],r,e))){delete n[r];o=true}}}if(at.isArray(t)){t.forEach(r)}else{r(t)}return o}clear(t){const e=Object.keys(this);let n=e.length;let o=false;while(n--){const r=e[n];if(!t||Zt(this,this[r],r,t,true)){delete this[r];o=true}}return o}normalize(t){const e=this;const n={};at.forEach(this,((o,r)=>{const s=at.findKey(n,r);if(s){e[s]=Gt(o);delete e[r];return}const i=t?Qt(r):String(r).trim();if(i!==r){delete e[r]}e[i]=Gt(o);n[i]=true}));return this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);at.forEach(this,((n,o)=>{n!=null&&n!==false&&(e[o]=t&&at.isArray(n)?n.join(", "):n)}));return e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([t,e])=>t+": "+e)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const n=new this(t);e.forEach((t=>n.set(t)));return n}static accessor(t){const e=this[Vt]=this[Vt]={accessors:{}};const n=e.accessors;const o=this.prototype;function r(t){const e=Wt(t);if(!n[e]){te(o,t);n[e]=true}}at.isArray(t)?t.forEach(r):r(t);return this}}ee.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);at.reduceDescriptors(ee.prototype,(({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(t){this[n]=t}}}));at.freezeMethods(ee);const ne=ee;function oe(t,e){const n=this||Ht;const o=e||n;const r=ne.from(o.headers);let s=o.data;at.forEach(t,(function t(o){s=o.call(n,s,r.normalize(),e?e.status:undefined)}));r.normalize();return s}function re(t){return!!(t&&t.__CANCEL__)}function se(t,e,n){ut.call(this,t==null?"canceled":t,ut.ERR_CANCELED,e,n);this.name="CanceledError"}at.inherits(se,ut,{__CANCEL__:true});function ie(t,e,n){const o=n.config.validateStatus;if(!n.status||!o||o(n.status)){t(n)}else{e(new ut("Request failed with status code "+n.status,[ut.ERR_BAD_REQUEST,ut.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}}function ce(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function ae(t,e){t=t||10;const n=new Array(t);const o=new Array(t);let r=0;let s=0;let i;e=e!==undefined?e:1e3;return function c(a){const u=Date.now();const l=o[s];if(!i){i=u}n[r]=a;o[r]=u;let f=s;let d=0;while(f!==r){d+=n[f++];f=f%t}r=(r+1)%t;if(r===s){s=(s+1)%t}if(u-i<e){return}const h=l&&u-l;return h?Math.round(d*1e3/h):undefined}}function ue(t,e){let n=0;let o=1e3/e;let r;let s;const i=(e,o=Date.now())=>{n=o;r=null;if(s){clearTimeout(s);s=null}t.apply(null,e)};const c=(...t)=>{const e=Date.now();const c=e-n;if(c>=o){i(t,e)}else{r=t;if(!s){s=setTimeout((()=>{s=null;i(r)}),o-c)}}};const a=()=>r&&i(r);return[c,a]}const le=(t,e,n=3)=>{let o=0;const r=ae(50,250);return ue((n=>{const s=n.loaded;const i=n.lengthComputable?n.total:undefined;const c=s-o;const a=r(c);const u=s<=i;o=s;const l={loaded:s,total:i,progress:i?s/i:undefined,bytes:c,rate:a?a:undefined,estimated:a&&i&&u?(i-s)/a:undefined,event:n,lengthComputable:i!=null,[e?"download":"upload"]:true};t(l)}),n)};const fe=(t,e)=>{const n=t!=null;return[o=>e[0]({lengthComputable:n,total:t,loaded:o}),e[1]]};const de=t=>(...e)=>at.asap((()=>t(...e)));const he=kt.hasStandardBrowserEnv?function t(){const e=kt.navigator&&/(msie|trident)/i.test(kt.navigator.userAgent);const n=document.createElement("a");let o;function r(t){let o=t;if(e){n.setAttribute("href",o);o=n.href}n.setAttribute("href",o);return{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}o=r(window.location.href);return function t(e){const n=at.isString(e)?r(e):e;return n.protocol===o.protocol&&n.host===o.host}}():function t(){return function t(){return true}}();const pe=kt.hasStandardBrowserEnv?{write(t,e,n,o,r,s){const i=[t+"="+encodeURIComponent(e)];at.isNumber(n)&&i.push("expires="+new Date(n).toGMTString());at.isString(o)&&i.push("path="+o);at.isString(r)&&i.push("domain="+r);s===true&&i.push("secure");document.cookie=i.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function me(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function we(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function ye(t,e){if(t&&!me(e)){return we(t,e)}return e}const be=t=>t instanceof ne?{...t}:t;function ge(t,e){e=e||{};const n={};function o(t,e,n){if(at.isPlainObject(t)&&at.isPlainObject(e)){return at.merge.call({caseless:n},t,e)}else if(at.isPlainObject(e)){return at.merge({},e)}else if(at.isArray(e)){return e.slice()}return e}function r(t,e,n){if(!at.isUndefined(e)){return o(t,e,n)}else if(!at.isUndefined(t)){return o(undefined,t,n)}}function s(t,e){if(!at.isUndefined(e)){return o(undefined,e)}}function i(t,e){if(!at.isUndefined(e)){return o(undefined,e)}else if(!at.isUndefined(t)){return o(undefined,t)}}function c(n,r,s){if(s in e){return o(n,r)}else if(s in t){return o(undefined,n)}}const a={url:s,method:s,data:s,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:c,headers:(t,e)=>r(be(t),be(e),true)};at.forEach(Object.keys(Object.assign({},t,e)),(function o(s){const i=a[s]||r;const u=i(t[s],e[s],s);at.isUndefined(u)&&i!==c||(n[s]=u)}));return n}const Re=t=>{const e=ge({},t);let{data:n,withXSRFToken:o,xsrfHeaderName:r,xsrfCookieName:s,headers:i,auth:c}=e;e.headers=i=ne.from(i);e.url=Et(ye(e.baseURL,e.url),t.params,t.paramsSerializer);if(c){i.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):"")))}let a;if(at.isFormData(n)){if(kt.hasStandardBrowserEnv||kt.hasStandardBrowserWebWorkerEnv){i.setContentType(undefined)}else if((a=i.getContentType())!==false){const[t,...e]=a?a.split(";").map((t=>t.trim())).filter(Boolean):[];i.setContentType([t||"multipart/form-data",...e].join("; "))}}if(kt.hasStandardBrowserEnv){o&&at.isFunction(o)&&(o=o(e));if(o||o!==false&&he(e.url)){const t=r&&s&&pe.read(s);if(t){i.set(r,t)}}}return e};const Oe=typeof XMLHttpRequest!=="undefined";const Se=Oe&&function(t){return new Promise((function e(n,o){const r=Re(t);let s=r.data;const i=ne.from(r.headers).normalize();let{responseType:c,onUploadProgress:a,onDownloadProgress:u}=r;let l;let f,d;let h,p;function m(){h&&h();p&&p();r.cancelToken&&r.cancelToken.unsubscribe(l);r.signal&&r.signal.removeEventListener("abort",l)}let w=new XMLHttpRequest;w.open(r.method.toUpperCase(),r.url,true);w.timeout=r.timeout;function y(){if(!w){return}const e=ne.from("getAllResponseHeaders"in w&&w.getAllResponseHeaders());const r=!c||c==="text"||c==="json"?w.responseText:w.response;const s={data:r,status:w.status,statusText:w.statusText,headers:e,config:t,request:w};ie((function t(e){n(e);m()}),(function t(e){o(e);m()}),s);w=null}if("onloadend"in w){w.onloadend=y}else{w.onreadystatechange=function t(){if(!w||w.readyState!==4){return}if(w.status===0&&!(w.responseURL&&w.responseURL.indexOf("file:")===0)){return}setTimeout(y)}}w.onabort=function e(){if(!w){return}o(new ut("Request aborted",ut.ECONNABORTED,t,w));w=null};w.onerror=function e(){o(new ut("Network Error",ut.ERR_NETWORK,t,w));w=null};w.ontimeout=function e(){let n=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const s=r.transitional||jt;if(r.timeoutErrorMessage){n=r.timeoutErrorMessage}o(new ut(n,s.clarifyTimeoutError?ut.ETIMEDOUT:ut.ECONNABORTED,t,w));w=null};s===undefined&&i.setContentType(null);if("setRequestHeader"in w){at.forEach(i.toJSON(),(function t(e,n){w.setRequestHeader(n,e)}))}if(!at.isUndefined(r.withCredentials)){w.withCredentials=!!r.withCredentials}if(c&&c!=="json"){w.responseType=r.responseType}if(u){[d,p]=le(u,true);w.addEventListener("progress",d)}if(a&&w.upload){[f,h]=le(a);w.upload.addEventListener("progress",f);w.upload.addEventListener("loadend",h)}if(r.cancelToken||r.signal){l=e=>{if(!w){return}o(!e||e.type?new se(null,t,w):e);w.abort();w=null};r.cancelToken&&r.cancelToken.subscribe(l);if(r.signal){r.signal.aborted?l():r.signal.addEventListener("abort",l)}}const b=ce(r.url);if(b&&kt.protocols.indexOf(b)===-1){o(new ut("Unsupported protocol "+b+":",ut.ERR_BAD_REQUEST,t));return}w.send(s||null)}))};const Ee=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let n=new AbortController;let o;const r=function(t){if(!o){o=true;i();const e=t instanceof Error?t:this.reason;n.abort(e instanceof ut?e:new se(e instanceof Error?e.message:e))}};let s=e&&setTimeout((()=>{s=null;r(new ut(`timeout ${e} of ms exceeded`,ut.ETIMEDOUT))}),e);const i=()=>{if(t){s&&clearTimeout(s);s=null;t.forEach((t=>{t.unsubscribe?t.unsubscribe(r):t.removeEventListener("abort",r)}));t=null}};t.forEach((t=>t.addEventListener("abort",r)));const{signal:c}=n;c.unsubscribe=()=>at.asap(i);return c}};const Te=Ee;const Ae=function*(t,e){let n=t.byteLength;if(!e||n<e){yield t;return}let o=0;let r;while(o<n){r=o+e;yield t.slice(o,r);o=r}};const je=async function*(t,e){for await(const n of Ce(t)){yield*Ae(n,e)}};const Ce=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:t,value:n}=await e.read();if(t){break}yield n}}finally{await e.cancel()}};const Ne=(t,e,n,o)=>{const r=je(t,e);let s=0;let i;let c=t=>{if(!i){i=true;o&&o(t)}};return new ReadableStream({async pull(t){try{const{done:e,value:o}=await r.next();if(e){c();t.close();return}let i=o.byteLength;if(n){let t=s+=i;n(t)}t.enqueue(new Uint8Array(o))}catch(t){c(t);throw t}},cancel(t){c(t);return r.return()}},{highWaterMark:2})};const ve=typeof fetch==="function"&&typeof Request==="function"&&typeof Response==="function";const xe=ve&&typeof ReadableStream==="function";const Be=ve&&(typeof TextEncoder==="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer()));const Pe=(t,...e)=>{try{return!!t(...e)}catch(t){return false}};const De=xe&&Pe((()=>{let t=false;const e=new Request(kt.origin,{body:new ReadableStream,method:"POST",get duplex(){t=true;return"half"}}).headers.has("Content-Type");return t&&!e}));const Fe=64*1024;const Ue=xe&&Pe((()=>at.isReadableStream(new Response("").body)));const _e={stream:Ue&&(t=>t.body)};ve&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!_e[e]&&(_e[e]=at.isFunction(t[e])?t=>t[e]():(t,n)=>{throw new ut(`Response type '${e}' is not supported`,ut.ERR_NOT_SUPPORT,n)})}))})(new Response);const ke=async t=>{if(t==null){return 0}if(at.isBlob(t)){return t.size}if(at.isSpecCompliantForm(t)){const e=new Request(kt.origin,{method:"POST",body:t});return(await e.arrayBuffer()).byteLength}if(at.isArrayBufferView(t)||at.isArrayBuffer(t)){return t.byteLength}if(at.isURLSearchParams(t)){t=t+""}if(at.isString(t)){return(await Be(t)).byteLength}};const qe=async(t,e)=>{const n=at.toFiniteNumber(t.getContentLength());return n==null?ke(e):n};const Ie=ve&&(async t=>{let{url:e,method:n,data:o,signal:r,cancelToken:s,timeout:i,onDownloadProgress:c,onUploadProgress:a,responseType:u,headers:l,withCredentials:f="same-origin",fetchOptions:d}=Re(t);u=u?(u+"").toLowerCase():"text";let h=Te([r,s&&s.toAbortSignal()],i);let p;const m=h&&h.unsubscribe&&(()=>{h.unsubscribe()});let w;try{if(a&&De&&n!=="get"&&n!=="head"&&(w=await qe(l,o))!==0){let t=new Request(e,{method:"POST",body:o,duplex:"half"});let n;if(at.isFormData(o)&&(n=t.headers.get("content-type"))){l.setContentType(n)}if(t.body){const[e,n]=fe(w,le(de(a)));o=Ne(t.body,Fe,e,n)}}if(!at.isString(f)){f=f?"include":"omit"}const r="credentials"in Request.prototype;p=new Request(e,{...d,signal:h,method:n.toUpperCase(),headers:l.normalize().toJSON(),body:o,duplex:"half",credentials:r?f:undefined});let s=await fetch(p);const i=Ue&&(u==="stream"||u==="response");if(Ue&&(c||i&&m)){const t={};["status","statusText","headers"].forEach((e=>{t[e]=s[e]}));const e=at.toFiniteNumber(s.headers.get("content-length"));const[n,o]=c&&fe(e,le(de(c),true))||[];s=new Response(Ne(s.body,Fe,n,(()=>{o&&o();m&&m()})),t)}u=u||"text";let y=await _e[at.findKey(_e,u)||"text"](s,t);!i&&m&&m();return await new Promise(((e,n)=>{ie(e,n,{data:y,headers:ne.from(s.headers),status:s.status,statusText:s.statusText,config:t,request:p})}))}catch(e){m&&m();if(e&&e.name==="TypeError"&&/fetch/i.test(e.message)){throw Object.assign(new ut("Network Error",ut.ERR_NETWORK,t,p),{cause:e.cause||e})}throw ut.from(e,e&&e.code,t,p)}});const Le={http:dt,xhr:Se,fetch:Ie};at.forEach(Le,((t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(t){}Object.defineProperty(t,"adapterName",{value:e})}}));const $e=t=>`- ${t}`;const ze=t=>at.isFunction(t)||t===null||t===false;const Me={getAdapter:t=>{t=at.isArray(t)?t:[t];const{length:e}=t;let n;let o;const r={};for(let s=0;s<e;s++){n=t[s];let e;o=n;if(!ze(n)){o=Le[(e=String(n)).toLowerCase()];if(o===undefined){throw new ut(`Unknown adapter '${e}'`)}}if(o){break}r[e||"#"+s]=o}if(!o){const t=Object.entries(r).map((([t,e])=>`adapter ${t} `+(e===false?"is not supported by the environment":"is not available in the build")));let n=e?t.length>1?"since :\n"+t.map($e).join("\n"):" "+$e(t[0]):"as no adapter specified";throw new ut(`There is no suitable adapter to dispatch the request `+n,"ERR_NOT_SUPPORT")}return o},adapters:Le};function He(t){if(t.cancelToken){t.cancelToken.throwIfRequested()}if(t.signal&&t.signal.aborted){throw new se(null,t)}}function Je(t){He(t);t.headers=ne.from(t.headers);t.data=oe.call(t,t.transformRequest);if(["post","put","patch"].indexOf(t.method)!==-1){t.headers.setContentType("application/x-www-form-urlencoded",false)}const e=Me.getAdapter(t.adapter||Ht.adapter);return e(t).then((function e(n){He(t);n.data=oe.call(t,t.transformResponse,n);n.headers=ne.from(n.headers);return n}),(function e(n){if(!re(n)){He(t);if(n&&n.response){n.response.data=oe.call(t,t.transformResponse,n.response);n.response.headers=ne.from(n.response.headers)}}return Promise.reject(n)}))}const Ke="1.7.7";const Ve={};["object","boolean","number","function","string","symbol"].forEach(((t,e)=>{Ve[t]=function n(o){return typeof o===t||"a"+(e<1?"n ":" ")+t}}));const We={};Ve.transitional=function t(e,n,o){function r(t,e){return"[Axios v"+Ke+"] Transitional option '"+t+"'"+e+(o?". "+o:"")}return(t,o,s)=>{if(e===false){throw new ut(r(o," has been removed"+(n?" in "+n:"")),ut.ERR_DEPRECATED)}if(n&&!We[o]){We[o]=true;console.warn(r(o," has been deprecated since v"+n+" and will be removed in the near future"))}return e?e(t,o,s):true}};function Ge(t,e,n){if(typeof t!=="object"){throw new ut("options must be an object",ut.ERR_BAD_OPTION_VALUE)}const o=Object.keys(t);let r=o.length;while(r-- >0){const s=o[r];const i=e[s];if(i){const e=t[s];const n=e===undefined||i(e,s,t);if(n!==true){throw new ut("option "+s+" must be "+n,ut.ERR_BAD_OPTION_VALUE)}continue}if(n!==true){throw new ut("Unknown option "+s,ut.ERR_BAD_OPTION)}}}const Xe={assertOptions:Ge,validators:Ve};const Ye=Xe.validators;class Ze{constructor(t){this.defaults=t;this.interceptors={request:new At,response:new At}}async request(t,e){try{return await this._request(t,e)}catch(t){if(t instanceof Error){let e;Error.captureStackTrace?Error.captureStackTrace(e={}):e=new Error;const n=e.stack?e.stack.replace(/^.+\n/,""):"";try{if(!t.stack){t.stack=n}else if(n&&!String(t.stack).endsWith(n.replace(/^.+\n.+\n/,""))){t.stack+="\n"+n}}catch(t){}}throw t}}_request(t,e){if(typeof t==="string"){e=e||{};e.url=t}else{e=t||{}}e=ge(this.defaults,e);const{transitional:n,paramsSerializer:o,headers:r}=e;if(n!==undefined){Xe.assertOptions(n,{silentJSONParsing:Ye.transitional(Ye.boolean),forcedJSONParsing:Ye.transitional(Ye.boolean),clarifyTimeoutError:Ye.transitional(Ye.boolean)},false)}if(o!=null){if(at.isFunction(o)){e.paramsSerializer={serialize:o}}else{Xe.assertOptions(o,{encode:Ye.function,serialize:Ye.function},true)}}e.method=(e.method||this.defaults.method||"get").toLowerCase();let s=r&&at.merge(r.common,r[e.method]);r&&at.forEach(["delete","get","head","post","put","patch","common"],(t=>{delete r[t]}));e.headers=ne.concat(s,r);const i=[];let c=true;this.interceptors.request.forEach((function t(n){if(typeof n.runWhen==="function"&&n.runWhen(e)===false){return}c=c&&n.synchronous;i.unshift(n.fulfilled,n.rejected)}));const a=[];this.interceptors.response.forEach((function t(e){a.push(e.fulfilled,e.rejected)}));let u;let l=0;let f;if(!c){const t=[Je.bind(this),undefined];t.unshift.apply(t,i);t.push.apply(t,a);f=t.length;u=Promise.resolve(e);while(l<f){u=u.then(t[l++],t[l++])}return u}f=i.length;let d=e;l=0;while(l<f){const t=i[l++];const e=i[l++];try{d=t(d)}catch(t){e.call(this,t);break}}try{u=Je.call(this,d)}catch(t){return Promise.reject(t)}l=0;f=a.length;while(l<f){u=u.then(a[l++],a[l++])}return u}getUri(t){t=ge(this.defaults,t);const e=ye(t.baseURL,t.url);return Et(e,t.params,t.paramsSerializer)}}at.forEach(["delete","get","head","options"],(function t(e){Ze.prototype[e]=function(t,n){return this.request(ge(n||{},{method:e,url:t,data:(n||{}).data}))}}));at.forEach(["post","put","patch"],(function t(e){function n(t){return function n(o,r,s){return this.request(ge(s||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:o,data:r}))}}Ze.prototype[e]=n();Ze.prototype[e+"Form"]=n(true)}));const Qe=Ze;class tn{constructor(t){if(typeof t!=="function"){throw new TypeError("executor must be a function.")}let e;this.promise=new Promise((function t(n){e=n}));const n=this;this.promise.then((t=>{if(!n._listeners)return;let e=n._listeners.length;while(e-- >0){n._listeners[e](t)}n._listeners=null}));this.promise.then=t=>{let e;const o=new Promise((t=>{n.subscribe(t);e=t})).then(t);o.cancel=function t(){n.unsubscribe(e)};return o};t((function t(o,r,s){if(n.reason){return}n.reason=new se(o,r,s);e(n.reason)}))}throwIfRequested(){if(this.reason){throw this.reason}}subscribe(t){if(this.reason){t(this.reason);return}if(this._listeners){this._listeners.push(t)}else{this._listeners=[t]}}unsubscribe(t){if(!this._listeners){return}const e=this._listeners.indexOf(t);if(e!==-1){this._listeners.splice(e,1)}}toAbortSignal(){const t=new AbortController;const e=e=>{t.abort(e)};this.subscribe(e);t.signal.unsubscribe=()=>this.unsubscribe(e);return t.signal}static source(){let t;const e=new tn((function e(n){t=n}));return{token:e,cancel:t}}}const en=tn;function nn(t){return function e(n){return t.apply(null,n)}}function on(t){return at.isObject(t)&&t.isAxiosError===true}const rn={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(rn).forEach((([t,e])=>{rn[e]=t}));const sn=rn;function cn(e){const n=new Qe(e);const o=t(Qe.prototype.request,n);at.extend(o,Qe.prototype,n,{allOwnKeys:true});at.extend(o,n,null,{allOwnKeys:true});o.create=function t(n){return cn(ge(e,n))};return o}const an=cn(Ht);an.Axios=Qe;an.CanceledError=se;an.CancelToken=en;an.isCancel=re;an.VERSION=Ke;an.toFormData=bt;an.AxiosError=ut;an.Cancel=an.CanceledError;an.all=function t(e){return Promise.all(e)};an.spread=nn;an.isAxiosError=on;an.mergeConfig=ge;an.AxiosHeaders=ne;an.formToJSON=t=>$t(at.isHTMLForm(t)?new FormData(t):t);an.getAdapter=Me.getAdapter;an.HttpStatusCode=sn;an.default=an;const un=an;const ln="https://wake-middleware.crmbonus.com/api";const fn="http://localhost:3001";const dn=t=>`bc:reserve${t}`;const hn="@BYCODERS_KEY";const pn="bc:used";const mn=t=>`bc:${t}`;class wn{constructor(){this.axiosInstance=un.create({baseURL:ln,headers:{"Content-Type":"application/json",accept:"application/json"}})}static getInstance(){if(this._instance){return this._instance}this._instance=new wn;return this._instance}async getCustomer(t,e){var n,o;const r={"Content-Type":"application/json",Authorization:`Bearer ${this.token}`};const s=await this.axiosInstance.get(`/store/${e}/customer/${t}`,{headers:r});this.token=(n=s===null||s===void 0?void 0:s.data)===null||n===void 0?void 0:n.token;return(o=s===null||s===void 0?void 0:s.data)===null||o===void 0?void 0:o.customer}async updateOrder(t){const e=localStorage.getItem("@BYCODERS_KEY");const n={"Content-Type":"application/json",Authorization:`Bearer ${e}`};await this.axiosInstance.patch(`/checkouts/${t.cartId}/updateOrder`,{orderId:t.orderId,externalId:t.cartIdCrm},{headers:n});localStorage.removeItem("@BYCODERS_KEY");localStorage.removeItem(pn);localStorage.removeItem(dn(t.cartId))}async sendPin(t,e,n){const o={"Content-Type":"application/json",Authorization:`Bearer ${this.token}`};const r=await this.axiosInstance.post("/crmbonus/send-pin",{cellphone:t,name:e,storeName:n},{headers:o});return{storeId:r.data.storeId,userId:r.data.userId}}async validatePinBonus(t){const e={"Content-Type":"application/json",Authorization:`Bearer ${this.token}`};const n=await this.axiosInstance.post("/crmbonus/process-pin-bonus",t,{headers:e});return n.data}async reserve(t){const e={"Content-Type":"application/json",Authorization:`Bearer ${this.token}`};const n=await this.axiosInstance.post("/crmbonus/redeem-bonus",t,{headers:e});return n.data}async cancel(t){const e={"Content-Type":"application/json",Authorization:`Bearer ${this.token}`};const n=await this.axiosInstance.post("/crmbonus/cancel-apply-bonus",{ticket:t},{headers:e});return n.data}async getToken(t){var e,n;const o=await this.axiosInstance.post("/wake/requestToken",{storeName:t});this.token=(e=o===null||o===void 0?void 0:o.data)===null||e===void 0?void 0:e.token;localStorage.setItem(hn,this.token);return(n=o===null||o===void 0?void 0:o.data)===null||n===void 0?void 0:n.token}async getCustomization(t){const e={"Content-Type":"application/json",Authorization:`Bearer ${this.token}`};const n=await this.axiosInstance.get(`/stores/${t}/customizations`,{headers:e});localStorage.setItem(mn(t),JSON.stringify(n.data));console.log("getCustomization",n);return n.data}async cancelBonus(t,e){const n=localStorage.getItem(hn);const o={"Content-Type":"application/json",Authorization:`Bearer ${n}`};await this.axiosInstance.post(`/crmbonus/cancel-bonus`,{cartId:t,usedBonus:true,storeName:e},{headers:o});localStorage.setItem(t,"0");localStorage.removeItem(pn)}async getInfoBonus(t,e){await this.getToken(e);const n={"Content-Type":"application/json",Authorization:`Bearer ${this.token}`};const o=await this.axiosInstance.get(`/crmbonus/order-info/${e}/${t}`,{headers:n});return o.data}async patchInfoBonus(t){await this.getToken(t.storeName);const e={"Content-Type":"application/json",Authorization:`Bearer ${this.token}`};await this.axiosInstance.patch(`/checkouts/${t.cartId}`,{metadata:t.metadata},{headers:e})}async getInfoCart(t){const e=await fetch(`${t}/api/carrinho`,{credentials:"include"}).then((t=>t.json()));return e}}wn._instance=null;export{wn as C,pn as U,fn as a,dn as g};
2
- //# sourceMappingURL=p-3eba0eba.js.map
1
+ function t(t,e){return function n(){return t.apply(e,arguments)}}const{toString:e}=Object.prototype;const{getPrototypeOf:n}=Object;const o=(t=>n=>{const o=e.call(n);return t[o]||(t[o]=o.slice(8,-1).toLowerCase())})(Object.create(null));const r=t=>{t=t.toLowerCase();return e=>o(e)===t};const s=t=>e=>typeof e===t;const{isArray:i}=Array;const c=s("undefined");function a(t){return t!==null&&!c(t)&&t.constructor!==null&&!c(t.constructor)&&d(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const u=r("ArrayBuffer");function l(t){let e;if(typeof ArrayBuffer!=="undefined"&&ArrayBuffer.isView){e=ArrayBuffer.isView(t)}else{e=t&&t.buffer&&u(t.buffer)}return e}const f=s("string");const d=s("function");const h=s("number");const p=t=>t!==null&&typeof t==="object";const m=t=>t===true||t===false;const w=t=>{if(o(t)!=="object"){return false}const e=n(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)};const y=r("Date");const b=r("File");const g=r("Blob");const R=r("FileList");const O=t=>p(t)&&d(t.pipe);const S=t=>{let e;return t&&(typeof FormData==="function"&&t instanceof FormData||d(t.append)&&((e=o(t))==="formdata"||e==="object"&&d(t.toString)&&t.toString()==="[object FormData]"))};const E=r("URLSearchParams");const[T,A,j,C]=["ReadableStream","Request","Response","Headers"].map(r);const N=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function v(t,e,{allOwnKeys:n=false}={}){if(t===null||typeof t==="undefined"){return}let o;let r;if(typeof t!=="object"){t=[t]}if(i(t)){for(o=0,r=t.length;o<r;o++){e.call(null,t[o],o,t)}}else{const r=n?Object.getOwnPropertyNames(t):Object.keys(t);const s=r.length;let i;for(o=0;o<s;o++){i=r[o];e.call(null,t[i],i,t)}}}function x(t,e){e=e.toLowerCase();const n=Object.keys(t);let o=n.length;let r;while(o-- >0){r=n[o];if(e===r.toLowerCase()){return r}}return null}const B=(()=>{if(typeof globalThis!=="undefined")return globalThis;return typeof self!=="undefined"?self:typeof window!=="undefined"?window:global})();const P=t=>!c(t)&&t!==B;function D(){const{caseless:t}=P(this)&&this||{};const e={};const n=(n,o)=>{const r=t&&x(e,o)||o;if(w(e[r])&&w(n)){e[r]=D(e[r],n)}else if(w(n)){e[r]=D({},n)}else if(i(n)){e[r]=n.slice()}else{e[r]=n}};for(let t=0,e=arguments.length;t<e;t++){arguments[t]&&v(arguments[t],n)}return e}const F=(e,n,o,{allOwnKeys:r}={})=>{v(n,((n,r)=>{if(o&&d(n)){e[r]=t(n,o)}else{e[r]=n}}),{allOwnKeys:r});return e};const U=t=>{if(t.charCodeAt(0)===65279){t=t.slice(1)}return t};const _=(t,e,n,o)=>{t.prototype=Object.create(e.prototype,o);t.prototype.constructor=t;Object.defineProperty(t,"super",{value:e.prototype});n&&Object.assign(t.prototype,n)};const k=(t,e,o,r)=>{let s;let i;let c;const a={};e=e||{};if(t==null)return e;do{s=Object.getOwnPropertyNames(t);i=s.length;while(i-- >0){c=s[i];if((!r||r(c,t,e))&&!a[c]){e[c]=t[c];a[c]=true}}t=o!==false&&n(t)}while(t&&(!o||o(t,e))&&t!==Object.prototype);return e};const q=(t,e,n)=>{t=String(t);if(n===undefined||n>t.length){n=t.length}n-=e.length;const o=t.indexOf(e,n);return o!==-1&&o===n};const I=t=>{if(!t)return null;if(i(t))return t;let e=t.length;if(!h(e))return null;const n=new Array(e);while(e-- >0){n[e]=t[e]}return n};const L=(t=>e=>t&&e instanceof t)(typeof Uint8Array!=="undefined"&&n(Uint8Array));const $=(t,e)=>{const n=t&&t[Symbol.iterator];const o=n.call(t);let r;while((r=o.next())&&!r.done){const n=r.value;e.call(t,n[0],n[1])}};const z=(t,e)=>{let n;const o=[];while((n=t.exec(e))!==null){o.push(n)}return o};const M=r("HTMLFormElement");const H=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function t(e,n,o){return n.toUpperCase()+o}));const J=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype);const K=r("RegExp");const V=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t);const o={};v(n,((n,r)=>{let s;if((s=e(n,r,t))!==false){o[r]=s||n}}));Object.defineProperties(t,o)};const W=t=>{V(t,((e,n)=>{if(d(t)&&["arguments","caller","callee"].indexOf(n)!==-1){return false}const o=t[n];if(!d(o))return;e.enumerable=false;if("writable"in e){e.writable=false;return}if(!e.set){e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}}}))};const G=(t,e)=>{const n={};const o=t=>{t.forEach((t=>{n[t]=true}))};i(t)?o(t):o(String(t).split(e));return n};const X=()=>{};const Y=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;const Z="abcdefghijklmnopqrstuvwxyz";const Q="0123456789";const tt={DIGIT:Q,ALPHA:Z,ALPHA_DIGIT:Z+Z.toUpperCase()+Q};const et=(t=16,e=tt.ALPHA_DIGIT)=>{let n="";const{length:o}=e;while(t--){n+=e[Math.random()*o|0]}return n};function nt(t){return!!(t&&d(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const ot=t=>{const e=new Array(10);const n=(t,o)=>{if(p(t)){if(e.indexOf(t)>=0){return}if(!("toJSON"in t)){e[o]=t;const r=i(t)?[]:{};v(t,((t,e)=>{const s=n(t,o+1);!c(s)&&(r[e]=s)}));e[o]=undefined;return r}}return t};return n(t,0)};const rt=r("AsyncFunction");const st=t=>t&&(p(t)||d(t))&&d(t.then)&&d(t.catch);const it=((t,e)=>{if(t){return setImmediate}return e?((t,e)=>{B.addEventListener("message",(({source:n,data:o})=>{if(n===B&&o===t){e.length&&e.shift()()}}),false);return n=>{e.push(n);B.postMessage(t,"*")}})(`axios@${Math.random()}`,[]):t=>setTimeout(t)})(typeof setImmediate==="function",d(B.postMessage));const ct=typeof queueMicrotask!=="undefined"?queueMicrotask.bind(B):typeof process!=="undefined"&&process.nextTick||it;const at={isArray:i,isArrayBuffer:u,isBuffer:a,isFormData:S,isArrayBufferView:l,isString:f,isNumber:h,isBoolean:m,isObject:p,isPlainObject:w,isReadableStream:T,isRequest:A,isResponse:j,isHeaders:C,isUndefined:c,isDate:y,isFile:b,isBlob:g,isRegExp:K,isFunction:d,isStream:O,isURLSearchParams:E,isTypedArray:L,isFileList:R,forEach:v,merge:D,extend:F,trim:N,stripBOM:U,inherits:_,toFlatObject:k,kindOf:o,kindOfTest:r,endsWith:q,toArray:I,forEachEntry:$,matchAll:z,isHTMLForm:M,hasOwnProperty:J,hasOwnProp:J,reduceDescriptors:V,freezeMethods:W,toObjectSet:G,toCamelCase:H,noop:X,toFiniteNumber:Y,findKey:x,global:B,isContextDefined:P,ALPHABET:tt,generateString:et,isSpecCompliantForm:nt,toJSONObject:ot,isAsyncFn:rt,isThenable:st,setImmediate:it,asap:ct};function ut(t,e,n,o,r){Error.call(this);if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}else{this.stack=(new Error).stack}this.message=t;this.name="AxiosError";e&&(this.code=e);n&&(this.config=n);o&&(this.request=o);if(r){this.response=r;this.status=r.status?r.status:null}}at.inherits(ut,Error,{toJSON:function t(){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:at.toJSONObject(this.config),code:this.code,status:this.status}}});const lt=ut.prototype;const ft={};["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","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((t=>{ft[t]={value:t}}));Object.defineProperties(ut,ft);Object.defineProperty(lt,"isAxiosError",{value:true});ut.from=(t,e,n,o,r,s)=>{const i=Object.create(lt);at.toFlatObject(t,i,(function t(e){return e!==Error.prototype}),(t=>t!=="isAxiosError"));ut.call(i,t.message,e,n,o,r);i.cause=t;i.name=t.name;s&&Object.assign(i,s);return i};const dt=null;function ht(t){return at.isPlainObject(t)||at.isArray(t)}function pt(t){return at.endsWith(t,"[]")?t.slice(0,-2):t}function mt(t,e,n){if(!t)return e;return t.concat(e).map((function t(e,o){e=pt(e);return!n&&o?"["+e+"]":e})).join(n?".":"")}function wt(t){return at.isArray(t)&&!t.some(ht)}const yt=at.toFlatObject(at,{},null,(function t(e){return/^is[A-Z]/.test(e)}));function bt(t,e,n){if(!at.isObject(t)){throw new TypeError("target must be an object")}e=e||new FormData;n=at.toFlatObject(n,{metaTokens:true,dots:false,indexes:false},false,(function t(e,n){return!at.isUndefined(n[e])}));const o=n.metaTokens;const r=n.visitor||l;const s=n.dots;const i=n.indexes;const c=n.Blob||typeof Blob!=="undefined"&&Blob;const a=c&&at.isSpecCompliantForm(e);if(!at.isFunction(r)){throw new TypeError("visitor must be a function")}function u(t){if(t===null)return"";if(at.isDate(t)){return t.toISOString()}if(!a&&at.isBlob(t)){throw new ut("Blob is not supported. Use a Buffer instead.")}if(at.isArrayBuffer(t)||at.isTypedArray(t)){return a&&typeof Blob==="function"?new Blob([t]):Buffer.from(t)}return t}function l(t,n,r){let c=t;if(t&&!r&&typeof t==="object"){if(at.endsWith(n,"{}")){n=o?n:n.slice(0,-2);t=JSON.stringify(t)}else if(at.isArray(t)&&wt(t)||(at.isFileList(t)||at.endsWith(n,"[]"))&&(c=at.toArray(t))){n=pt(n);c.forEach((function t(o,r){!(at.isUndefined(o)||o===null)&&e.append(i===true?mt([n],r,s):i===null?n:n+"[]",u(o))}));return false}}if(ht(t)){return true}e.append(mt(r,n,s),u(t));return false}const f=[];const d=Object.assign(yt,{defaultVisitor:l,convertValue:u,isVisitable:ht});function h(t,n){if(at.isUndefined(t))return;if(f.indexOf(t)!==-1){throw Error("Circular reference detected in "+n.join("."))}f.push(t);at.forEach(t,(function t(o,s){const i=!(at.isUndefined(o)||o===null)&&r.call(e,o,at.isString(s)?s.trim():s,n,d);if(i===true){h(o,n?n.concat(s):[s])}}));f.pop()}if(!at.isObject(t)){throw new TypeError("data must be an object")}h(t);return e}function gt(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,(function t(n){return e[n]}))}function Rt(t,e){this._pairs=[];t&&bt(t,this,e)}const Ot=Rt.prototype;Ot.append=function t(e,n){this._pairs.push([e,n])};Ot.toString=function t(e){const n=e?function(t){return e.call(this,t,gt)}:gt;return this._pairs.map((function t(e){return n(e[0])+"="+n(e[1])}),"").join("&")};function St(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Et(t,e,n){if(!e){return t}const o=n&&n.encode||St;const r=n&&n.serialize;let s;if(r){s=r(e,n)}else{s=at.isURLSearchParams(e)?e.toString():new Rt(e,n).toString(o)}if(s){const e=t.indexOf("#");if(e!==-1){t=t.slice(0,e)}t+=(t.indexOf("?")===-1?"?":"&")+s}return t}class Tt{constructor(){this.handlers=[]}use(t,e,n){this.handlers.push({fulfilled:t,rejected:e,synchronous:n?n.synchronous:false,runWhen:n?n.runWhen:null});return this.handlers.length-1}eject(t){if(this.handlers[t]){this.handlers[t]=null}}clear(){if(this.handlers){this.handlers=[]}}forEach(t){at.forEach(this.handlers,(function e(n){if(n!==null){t(n)}}))}}const At=Tt;const jt={silentJSONParsing:true,forcedJSONParsing:true,clarifyTimeoutError:false};const Ct=typeof URLSearchParams!=="undefined"?URLSearchParams:Rt;const Nt=typeof FormData!=="undefined"?FormData:null;const vt=typeof Blob!=="undefined"?Blob:null;const xt={isBrowser:true,classes:{URLSearchParams:Ct,FormData:Nt,Blob:vt},protocols:["http","https","file","blob","url","data"]};const Bt=typeof window!=="undefined"&&typeof document!=="undefined";const Pt=typeof navigator==="object"&&navigator||undefined;const Dt=Bt&&(!Pt||["ReactNative","NativeScript","NS"].indexOf(Pt.product)<0);const Ft=(()=>typeof WorkerGlobalScope!=="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts==="function")();const Ut=Bt&&window.location.href||"http://localhost";const _t=Object.freeze({__proto__:null,hasBrowserEnv:Bt,hasStandardBrowserWebWorkerEnv:Ft,hasStandardBrowserEnv:Dt,navigator:Pt,origin:Ut});const kt={..._t,...xt};function qt(t,e){return bt(t,new kt.classes.URLSearchParams,Object.assign({visitor:function(t,e,n,o){if(kt.isNode&&at.isBuffer(t)){this.append(e,t.toString("base64"));return false}return o.defaultVisitor.apply(this,arguments)}},e))}function It(t){return at.matchAll(/\w+|\[(\w*)]/g,t).map((t=>t[0]==="[]"?"":t[1]||t[0]))}function Lt(t){const e={};const n=Object.keys(t);let o;const r=n.length;let s;for(o=0;o<r;o++){s=n[o];e[s]=t[s]}return e}function $t(t){function e(t,n,o,r){let s=t[r++];if(s==="__proto__")return true;const i=Number.isFinite(+s);const c=r>=t.length;s=!s&&at.isArray(o)?o.length:s;if(c){if(at.hasOwnProp(o,s)){o[s]=[o[s],n]}else{o[s]=n}return!i}if(!o[s]||!at.isObject(o[s])){o[s]=[]}const a=e(t,n,o[s],r);if(a&&at.isArray(o[s])){o[s]=Lt(o[s])}return!i}if(at.isFormData(t)&&at.isFunction(t.entries)){const n={};at.forEachEntry(t,((t,o)=>{e(It(t),o,n,0)}));return n}return null}function zt(t,e,n){if(at.isString(t)){try{(e||JSON.parse)(t);return at.trim(t)}catch(t){if(t.name!=="SyntaxError"){throw t}}}return(n||JSON.stringify)(t)}const Mt={transitional:jt,adapter:["xhr","http","fetch"],transformRequest:[function t(e,n){const o=n.getContentType()||"";const r=o.indexOf("application/json")>-1;const s=at.isObject(e);if(s&&at.isHTMLForm(e)){e=new FormData(e)}const i=at.isFormData(e);if(i){return r?JSON.stringify($t(e)):e}if(at.isArrayBuffer(e)||at.isBuffer(e)||at.isStream(e)||at.isFile(e)||at.isBlob(e)||at.isReadableStream(e)){return e}if(at.isArrayBufferView(e)){return e.buffer}if(at.isURLSearchParams(e)){n.setContentType("application/x-www-form-urlencoded;charset=utf-8",false);return e.toString()}let c;if(s){if(o.indexOf("application/x-www-form-urlencoded")>-1){return qt(e,this.formSerializer).toString()}if((c=at.isFileList(e))||o.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return bt(c?{"files[]":e}:e,t&&new t,this.formSerializer)}}if(s||r){n.setContentType("application/json",false);return zt(e)}return e}],transformResponse:[function t(e){const n=this.transitional||Mt.transitional;const o=n&&n.forcedJSONParsing;const r=this.responseType==="json";if(at.isResponse(e)||at.isReadableStream(e)){return e}if(e&&at.isString(e)&&(o&&!this.responseType||r)){const t=n&&n.silentJSONParsing;const o=!t&&r;try{return JSON.parse(e)}catch(t){if(o){if(t.name==="SyntaxError"){throw ut.from(t,ut.ERR_BAD_RESPONSE,this,null,this.response)}throw t}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:kt.classes.FormData,Blob:kt.classes.Blob},validateStatus:function t(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":undefined}}};at.forEach(["delete","get","head","post","put","patch"],(t=>{Mt.headers[t]={}}));const Ht=Mt;const Jt=at.toObjectSet(["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"]);const Kt=t=>{const e={};let n;let o;let r;t&&t.split("\n").forEach((function t(s){r=s.indexOf(":");n=s.substring(0,r).trim().toLowerCase();o=s.substring(r+1).trim();if(!n||e[n]&&Jt[n]){return}if(n==="set-cookie"){if(e[n]){e[n].push(o)}else{e[n]=[o]}}else{e[n]=e[n]?e[n]+", "+o:o}}));return e};const Vt=Symbol("internals");function Wt(t){return t&&String(t).trim().toLowerCase()}function Gt(t){if(t===false||t==null){return t}return at.isArray(t)?t.map(Gt):String(t)}function Xt(t){const e=Object.create(null);const n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let o;while(o=n.exec(t)){e[o[1]]=o[2]}return e}const Yt=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Zt(t,e,n,o,r){if(at.isFunction(o)){return o.call(this,e,n)}if(r){e=n}if(!at.isString(e))return;if(at.isString(o)){return e.indexOf(o)!==-1}if(at.isRegExp(o)){return o.test(e)}}function Qt(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((t,e,n)=>e.toUpperCase()+n))}function te(t,e){const n=at.toCamelCase(" "+e);["get","set","has"].forEach((o=>{Object.defineProperty(t,o+n,{value:function(t,n,r){return this[o].call(this,e,t,n,r)},configurable:true})}))}class ee{constructor(t){t&&this.set(t)}set(t,e,n){const o=this;function r(t,e,n){const r=Wt(e);if(!r){throw new Error("header name must be a non-empty string")}const s=at.findKey(o,r);if(!s||o[s]===undefined||n===true||n===undefined&&o[s]!==false){o[s||e]=Gt(t)}}const s=(t,e)=>at.forEach(t,((t,n)=>r(t,n,e)));if(at.isPlainObject(t)||t instanceof this.constructor){s(t,e)}else if(at.isString(t)&&(t=t.trim())&&!Yt(t)){s(Kt(t),e)}else if(at.isHeaders(t)){for(const[e,o]of t.entries()){r(o,e,n)}}else{t!=null&&r(e,t,n)}return this}get(t,e){t=Wt(t);if(t){const n=at.findKey(this,t);if(n){const t=this[n];if(!e){return t}if(e===true){return Xt(t)}if(at.isFunction(e)){return e.call(this,t,n)}if(at.isRegExp(e)){return e.exec(t)}throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){t=Wt(t);if(t){const n=at.findKey(this,t);return!!(n&&this[n]!==undefined&&(!e||Zt(this,this[n],n,e)))}return false}delete(t,e){const n=this;let o=false;function r(t){t=Wt(t);if(t){const r=at.findKey(n,t);if(r&&(!e||Zt(n,n[r],r,e))){delete n[r];o=true}}}if(at.isArray(t)){t.forEach(r)}else{r(t)}return o}clear(t){const e=Object.keys(this);let n=e.length;let o=false;while(n--){const r=e[n];if(!t||Zt(this,this[r],r,t,true)){delete this[r];o=true}}return o}normalize(t){const e=this;const n={};at.forEach(this,((o,r)=>{const s=at.findKey(n,r);if(s){e[s]=Gt(o);delete e[r];return}const i=t?Qt(r):String(r).trim();if(i!==r){delete e[r]}e[i]=Gt(o);n[i]=true}));return this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);at.forEach(this,((n,o)=>{n!=null&&n!==false&&(e[o]=t&&at.isArray(n)?n.join(", "):n)}));return e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([t,e])=>t+": "+e)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const n=new this(t);e.forEach((t=>n.set(t)));return n}static accessor(t){const e=this[Vt]=this[Vt]={accessors:{}};const n=e.accessors;const o=this.prototype;function r(t){const e=Wt(t);if(!n[e]){te(o,t);n[e]=true}}at.isArray(t)?t.forEach(r):r(t);return this}}ee.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);at.reduceDescriptors(ee.prototype,(({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(t){this[n]=t}}}));at.freezeMethods(ee);const ne=ee;function oe(t,e){const n=this||Ht;const o=e||n;const r=ne.from(o.headers);let s=o.data;at.forEach(t,(function t(o){s=o.call(n,s,r.normalize(),e?e.status:undefined)}));r.normalize();return s}function re(t){return!!(t&&t.__CANCEL__)}function se(t,e,n){ut.call(this,t==null?"canceled":t,ut.ERR_CANCELED,e,n);this.name="CanceledError"}at.inherits(se,ut,{__CANCEL__:true});function ie(t,e,n){const o=n.config.validateStatus;if(!n.status||!o||o(n.status)){t(n)}else{e(new ut("Request failed with status code "+n.status,[ut.ERR_BAD_REQUEST,ut.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}}function ce(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function ae(t,e){t=t||10;const n=new Array(t);const o=new Array(t);let r=0;let s=0;let i;e=e!==undefined?e:1e3;return function c(a){const u=Date.now();const l=o[s];if(!i){i=u}n[r]=a;o[r]=u;let f=s;let d=0;while(f!==r){d+=n[f++];f=f%t}r=(r+1)%t;if(r===s){s=(s+1)%t}if(u-i<e){return}const h=l&&u-l;return h?Math.round(d*1e3/h):undefined}}function ue(t,e){let n=0;let o=1e3/e;let r;let s;const i=(e,o=Date.now())=>{n=o;r=null;if(s){clearTimeout(s);s=null}t.apply(null,e)};const c=(...t)=>{const e=Date.now();const c=e-n;if(c>=o){i(t,e)}else{r=t;if(!s){s=setTimeout((()=>{s=null;i(r)}),o-c)}}};const a=()=>r&&i(r);return[c,a]}const le=(t,e,n=3)=>{let o=0;const r=ae(50,250);return ue((n=>{const s=n.loaded;const i=n.lengthComputable?n.total:undefined;const c=s-o;const a=r(c);const u=s<=i;o=s;const l={loaded:s,total:i,progress:i?s/i:undefined,bytes:c,rate:a?a:undefined,estimated:a&&i&&u?(i-s)/a:undefined,event:n,lengthComputable:i!=null,[e?"download":"upload"]:true};t(l)}),n)};const fe=(t,e)=>{const n=t!=null;return[o=>e[0]({lengthComputable:n,total:t,loaded:o}),e[1]]};const de=t=>(...e)=>at.asap((()=>t(...e)));const he=kt.hasStandardBrowserEnv?function t(){const e=kt.navigator&&/(msie|trident)/i.test(kt.navigator.userAgent);const n=document.createElement("a");let o;function r(t){let o=t;if(e){n.setAttribute("href",o);o=n.href}n.setAttribute("href",o);return{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}o=r(window.location.href);return function t(e){const n=at.isString(e)?r(e):e;return n.protocol===o.protocol&&n.host===o.host}}():function t(){return function t(){return true}}();const pe=kt.hasStandardBrowserEnv?{write(t,e,n,o,r,s){const i=[t+"="+encodeURIComponent(e)];at.isNumber(n)&&i.push("expires="+new Date(n).toGMTString());at.isString(o)&&i.push("path="+o);at.isString(r)&&i.push("domain="+r);s===true&&i.push("secure");document.cookie=i.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function me(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function we(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function ye(t,e){if(t&&!me(e)){return we(t,e)}return e}const be=t=>t instanceof ne?{...t}:t;function ge(t,e){e=e||{};const n={};function o(t,e,n){if(at.isPlainObject(t)&&at.isPlainObject(e)){return at.merge.call({caseless:n},t,e)}else if(at.isPlainObject(e)){return at.merge({},e)}else if(at.isArray(e)){return e.slice()}return e}function r(t,e,n){if(!at.isUndefined(e)){return o(t,e,n)}else if(!at.isUndefined(t)){return o(undefined,t,n)}}function s(t,e){if(!at.isUndefined(e)){return o(undefined,e)}}function i(t,e){if(!at.isUndefined(e)){return o(undefined,e)}else if(!at.isUndefined(t)){return o(undefined,t)}}function c(n,r,s){if(s in e){return o(n,r)}else if(s in t){return o(undefined,n)}}const a={url:s,method:s,data:s,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:c,headers:(t,e)=>r(be(t),be(e),true)};at.forEach(Object.keys(Object.assign({},t,e)),(function o(s){const i=a[s]||r;const u=i(t[s],e[s],s);at.isUndefined(u)&&i!==c||(n[s]=u)}));return n}const Re=t=>{const e=ge({},t);let{data:n,withXSRFToken:o,xsrfHeaderName:r,xsrfCookieName:s,headers:i,auth:c}=e;e.headers=i=ne.from(i);e.url=Et(ye(e.baseURL,e.url),t.params,t.paramsSerializer);if(c){i.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):"")))}let a;if(at.isFormData(n)){if(kt.hasStandardBrowserEnv||kt.hasStandardBrowserWebWorkerEnv){i.setContentType(undefined)}else if((a=i.getContentType())!==false){const[t,...e]=a?a.split(";").map((t=>t.trim())).filter(Boolean):[];i.setContentType([t||"multipart/form-data",...e].join("; "))}}if(kt.hasStandardBrowserEnv){o&&at.isFunction(o)&&(o=o(e));if(o||o!==false&&he(e.url)){const t=r&&s&&pe.read(s);if(t){i.set(r,t)}}}return e};const Oe=typeof XMLHttpRequest!=="undefined";const Se=Oe&&function(t){return new Promise((function e(n,o){const r=Re(t);let s=r.data;const i=ne.from(r.headers).normalize();let{responseType:c,onUploadProgress:a,onDownloadProgress:u}=r;let l;let f,d;let h,p;function m(){h&&h();p&&p();r.cancelToken&&r.cancelToken.unsubscribe(l);r.signal&&r.signal.removeEventListener("abort",l)}let w=new XMLHttpRequest;w.open(r.method.toUpperCase(),r.url,true);w.timeout=r.timeout;function y(){if(!w){return}const e=ne.from("getAllResponseHeaders"in w&&w.getAllResponseHeaders());const r=!c||c==="text"||c==="json"?w.responseText:w.response;const s={data:r,status:w.status,statusText:w.statusText,headers:e,config:t,request:w};ie((function t(e){n(e);m()}),(function t(e){o(e);m()}),s);w=null}if("onloadend"in w){w.onloadend=y}else{w.onreadystatechange=function t(){if(!w||w.readyState!==4){return}if(w.status===0&&!(w.responseURL&&w.responseURL.indexOf("file:")===0)){return}setTimeout(y)}}w.onabort=function e(){if(!w){return}o(new ut("Request aborted",ut.ECONNABORTED,t,w));w=null};w.onerror=function e(){o(new ut("Network Error",ut.ERR_NETWORK,t,w));w=null};w.ontimeout=function e(){let n=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const s=r.transitional||jt;if(r.timeoutErrorMessage){n=r.timeoutErrorMessage}o(new ut(n,s.clarifyTimeoutError?ut.ETIMEDOUT:ut.ECONNABORTED,t,w));w=null};s===undefined&&i.setContentType(null);if("setRequestHeader"in w){at.forEach(i.toJSON(),(function t(e,n){w.setRequestHeader(n,e)}))}if(!at.isUndefined(r.withCredentials)){w.withCredentials=!!r.withCredentials}if(c&&c!=="json"){w.responseType=r.responseType}if(u){[d,p]=le(u,true);w.addEventListener("progress",d)}if(a&&w.upload){[f,h]=le(a);w.upload.addEventListener("progress",f);w.upload.addEventListener("loadend",h)}if(r.cancelToken||r.signal){l=e=>{if(!w){return}o(!e||e.type?new se(null,t,w):e);w.abort();w=null};r.cancelToken&&r.cancelToken.subscribe(l);if(r.signal){r.signal.aborted?l():r.signal.addEventListener("abort",l)}}const b=ce(r.url);if(b&&kt.protocols.indexOf(b)===-1){o(new ut("Unsupported protocol "+b+":",ut.ERR_BAD_REQUEST,t));return}w.send(s||null)}))};const Ee=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let n=new AbortController;let o;const r=function(t){if(!o){o=true;i();const e=t instanceof Error?t:this.reason;n.abort(e instanceof ut?e:new se(e instanceof Error?e.message:e))}};let s=e&&setTimeout((()=>{s=null;r(new ut(`timeout ${e} of ms exceeded`,ut.ETIMEDOUT))}),e);const i=()=>{if(t){s&&clearTimeout(s);s=null;t.forEach((t=>{t.unsubscribe?t.unsubscribe(r):t.removeEventListener("abort",r)}));t=null}};t.forEach((t=>t.addEventListener("abort",r)));const{signal:c}=n;c.unsubscribe=()=>at.asap(i);return c}};const Te=Ee;const Ae=function*(t,e){let n=t.byteLength;if(!e||n<e){yield t;return}let o=0;let r;while(o<n){r=o+e;yield t.slice(o,r);o=r}};const je=async function*(t,e){for await(const n of Ce(t)){yield*Ae(n,e)}};const Ce=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:t,value:n}=await e.read();if(t){break}yield n}}finally{await e.cancel()}};const Ne=(t,e,n,o)=>{const r=je(t,e);let s=0;let i;let c=t=>{if(!i){i=true;o&&o(t)}};return new ReadableStream({async pull(t){try{const{done:e,value:o}=await r.next();if(e){c();t.close();return}let i=o.byteLength;if(n){let t=s+=i;n(t)}t.enqueue(new Uint8Array(o))}catch(t){c(t);throw t}},cancel(t){c(t);return r.return()}},{highWaterMark:2})};const ve=typeof fetch==="function"&&typeof Request==="function"&&typeof Response==="function";const xe=ve&&typeof ReadableStream==="function";const Be=ve&&(typeof TextEncoder==="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer()));const Pe=(t,...e)=>{try{return!!t(...e)}catch(t){return false}};const De=xe&&Pe((()=>{let t=false;const e=new Request(kt.origin,{body:new ReadableStream,method:"POST",get duplex(){t=true;return"half"}}).headers.has("Content-Type");return t&&!e}));const Fe=64*1024;const Ue=xe&&Pe((()=>at.isReadableStream(new Response("").body)));const _e={stream:Ue&&(t=>t.body)};ve&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!_e[e]&&(_e[e]=at.isFunction(t[e])?t=>t[e]():(t,n)=>{throw new ut(`Response type '${e}' is not supported`,ut.ERR_NOT_SUPPORT,n)})}))})(new Response);const ke=async t=>{if(t==null){return 0}if(at.isBlob(t)){return t.size}if(at.isSpecCompliantForm(t)){const e=new Request(kt.origin,{method:"POST",body:t});return(await e.arrayBuffer()).byteLength}if(at.isArrayBufferView(t)||at.isArrayBuffer(t)){return t.byteLength}if(at.isURLSearchParams(t)){t=t+""}if(at.isString(t)){return(await Be(t)).byteLength}};const qe=async(t,e)=>{const n=at.toFiniteNumber(t.getContentLength());return n==null?ke(e):n};const Ie=ve&&(async t=>{let{url:e,method:n,data:o,signal:r,cancelToken:s,timeout:i,onDownloadProgress:c,onUploadProgress:a,responseType:u,headers:l,withCredentials:f="same-origin",fetchOptions:d}=Re(t);u=u?(u+"").toLowerCase():"text";let h=Te([r,s&&s.toAbortSignal()],i);let p;const m=h&&h.unsubscribe&&(()=>{h.unsubscribe()});let w;try{if(a&&De&&n!=="get"&&n!=="head"&&(w=await qe(l,o))!==0){let t=new Request(e,{method:"POST",body:o,duplex:"half"});let n;if(at.isFormData(o)&&(n=t.headers.get("content-type"))){l.setContentType(n)}if(t.body){const[e,n]=fe(w,le(de(a)));o=Ne(t.body,Fe,e,n)}}if(!at.isString(f)){f=f?"include":"omit"}const r="credentials"in Request.prototype;p=new Request(e,{...d,signal:h,method:n.toUpperCase(),headers:l.normalize().toJSON(),body:o,duplex:"half",credentials:r?f:undefined});let s=await fetch(p);const i=Ue&&(u==="stream"||u==="response");if(Ue&&(c||i&&m)){const t={};["status","statusText","headers"].forEach((e=>{t[e]=s[e]}));const e=at.toFiniteNumber(s.headers.get("content-length"));const[n,o]=c&&fe(e,le(de(c),true))||[];s=new Response(Ne(s.body,Fe,n,(()=>{o&&o();m&&m()})),t)}u=u||"text";let y=await _e[at.findKey(_e,u)||"text"](s,t);!i&&m&&m();return await new Promise(((e,n)=>{ie(e,n,{data:y,headers:ne.from(s.headers),status:s.status,statusText:s.statusText,config:t,request:p})}))}catch(e){m&&m();if(e&&e.name==="TypeError"&&/fetch/i.test(e.message)){throw Object.assign(new ut("Network Error",ut.ERR_NETWORK,t,p),{cause:e.cause||e})}throw ut.from(e,e&&e.code,t,p)}});const Le={http:dt,xhr:Se,fetch:Ie};at.forEach(Le,((t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(t){}Object.defineProperty(t,"adapterName",{value:e})}}));const $e=t=>`- ${t}`;const ze=t=>at.isFunction(t)||t===null||t===false;const Me={getAdapter:t=>{t=at.isArray(t)?t:[t];const{length:e}=t;let n;let o;const r={};for(let s=0;s<e;s++){n=t[s];let e;o=n;if(!ze(n)){o=Le[(e=String(n)).toLowerCase()];if(o===undefined){throw new ut(`Unknown adapter '${e}'`)}}if(o){break}r[e||"#"+s]=o}if(!o){const t=Object.entries(r).map((([t,e])=>`adapter ${t} `+(e===false?"is not supported by the environment":"is not available in the build")));let n=e?t.length>1?"since :\n"+t.map($e).join("\n"):" "+$e(t[0]):"as no adapter specified";throw new ut(`There is no suitable adapter to dispatch the request `+n,"ERR_NOT_SUPPORT")}return o},adapters:Le};function He(t){if(t.cancelToken){t.cancelToken.throwIfRequested()}if(t.signal&&t.signal.aborted){throw new se(null,t)}}function Je(t){He(t);t.headers=ne.from(t.headers);t.data=oe.call(t,t.transformRequest);if(["post","put","patch"].indexOf(t.method)!==-1){t.headers.setContentType("application/x-www-form-urlencoded",false)}const e=Me.getAdapter(t.adapter||Ht.adapter);return e(t).then((function e(n){He(t);n.data=oe.call(t,t.transformResponse,n);n.headers=ne.from(n.headers);return n}),(function e(n){if(!re(n)){He(t);if(n&&n.response){n.response.data=oe.call(t,t.transformResponse,n.response);n.response.headers=ne.from(n.response.headers)}}return Promise.reject(n)}))}const Ke="1.7.7";const Ve={};["object","boolean","number","function","string","symbol"].forEach(((t,e)=>{Ve[t]=function n(o){return typeof o===t||"a"+(e<1?"n ":" ")+t}}));const We={};Ve.transitional=function t(e,n,o){function r(t,e){return"[Axios v"+Ke+"] Transitional option '"+t+"'"+e+(o?". "+o:"")}return(t,o,s)=>{if(e===false){throw new ut(r(o," has been removed"+(n?" in "+n:"")),ut.ERR_DEPRECATED)}if(n&&!We[o]){We[o]=true;console.warn(r(o," has been deprecated since v"+n+" and will be removed in the near future"))}return e?e(t,o,s):true}};function Ge(t,e,n){if(typeof t!=="object"){throw new ut("options must be an object",ut.ERR_BAD_OPTION_VALUE)}const o=Object.keys(t);let r=o.length;while(r-- >0){const s=o[r];const i=e[s];if(i){const e=t[s];const n=e===undefined||i(e,s,t);if(n!==true){throw new ut("option "+s+" must be "+n,ut.ERR_BAD_OPTION_VALUE)}continue}if(n!==true){throw new ut("Unknown option "+s,ut.ERR_BAD_OPTION)}}}const Xe={assertOptions:Ge,validators:Ve};const Ye=Xe.validators;class Ze{constructor(t){this.defaults=t;this.interceptors={request:new At,response:new At}}async request(t,e){try{return await this._request(t,e)}catch(t){if(t instanceof Error){let e;Error.captureStackTrace?Error.captureStackTrace(e={}):e=new Error;const n=e.stack?e.stack.replace(/^.+\n/,""):"";try{if(!t.stack){t.stack=n}else if(n&&!String(t.stack).endsWith(n.replace(/^.+\n.+\n/,""))){t.stack+="\n"+n}}catch(t){}}throw t}}_request(t,e){if(typeof t==="string"){e=e||{};e.url=t}else{e=t||{}}e=ge(this.defaults,e);const{transitional:n,paramsSerializer:o,headers:r}=e;if(n!==undefined){Xe.assertOptions(n,{silentJSONParsing:Ye.transitional(Ye.boolean),forcedJSONParsing:Ye.transitional(Ye.boolean),clarifyTimeoutError:Ye.transitional(Ye.boolean)},false)}if(o!=null){if(at.isFunction(o)){e.paramsSerializer={serialize:o}}else{Xe.assertOptions(o,{encode:Ye.function,serialize:Ye.function},true)}}e.method=(e.method||this.defaults.method||"get").toLowerCase();let s=r&&at.merge(r.common,r[e.method]);r&&at.forEach(["delete","get","head","post","put","patch","common"],(t=>{delete r[t]}));e.headers=ne.concat(s,r);const i=[];let c=true;this.interceptors.request.forEach((function t(n){if(typeof n.runWhen==="function"&&n.runWhen(e)===false){return}c=c&&n.synchronous;i.unshift(n.fulfilled,n.rejected)}));const a=[];this.interceptors.response.forEach((function t(e){a.push(e.fulfilled,e.rejected)}));let u;let l=0;let f;if(!c){const t=[Je.bind(this),undefined];t.unshift.apply(t,i);t.push.apply(t,a);f=t.length;u=Promise.resolve(e);while(l<f){u=u.then(t[l++],t[l++])}return u}f=i.length;let d=e;l=0;while(l<f){const t=i[l++];const e=i[l++];try{d=t(d)}catch(t){e.call(this,t);break}}try{u=Je.call(this,d)}catch(t){return Promise.reject(t)}l=0;f=a.length;while(l<f){u=u.then(a[l++],a[l++])}return u}getUri(t){t=ge(this.defaults,t);const e=ye(t.baseURL,t.url);return Et(e,t.params,t.paramsSerializer)}}at.forEach(["delete","get","head","options"],(function t(e){Ze.prototype[e]=function(t,n){return this.request(ge(n||{},{method:e,url:t,data:(n||{}).data}))}}));at.forEach(["post","put","patch"],(function t(e){function n(t){return function n(o,r,s){return this.request(ge(s||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:o,data:r}))}}Ze.prototype[e]=n();Ze.prototype[e+"Form"]=n(true)}));const Qe=Ze;class tn{constructor(t){if(typeof t!=="function"){throw new TypeError("executor must be a function.")}let e;this.promise=new Promise((function t(n){e=n}));const n=this;this.promise.then((t=>{if(!n._listeners)return;let e=n._listeners.length;while(e-- >0){n._listeners[e](t)}n._listeners=null}));this.promise.then=t=>{let e;const o=new Promise((t=>{n.subscribe(t);e=t})).then(t);o.cancel=function t(){n.unsubscribe(e)};return o};t((function t(o,r,s){if(n.reason){return}n.reason=new se(o,r,s);e(n.reason)}))}throwIfRequested(){if(this.reason){throw this.reason}}subscribe(t){if(this.reason){t(this.reason);return}if(this._listeners){this._listeners.push(t)}else{this._listeners=[t]}}unsubscribe(t){if(!this._listeners){return}const e=this._listeners.indexOf(t);if(e!==-1){this._listeners.splice(e,1)}}toAbortSignal(){const t=new AbortController;const e=e=>{t.abort(e)};this.subscribe(e);t.signal.unsubscribe=()=>this.unsubscribe(e);return t.signal}static source(){let t;const e=new tn((function e(n){t=n}));return{token:e,cancel:t}}}const en=tn;function nn(t){return function e(n){return t.apply(null,n)}}function on(t){return at.isObject(t)&&t.isAxiosError===true}const rn={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(rn).forEach((([t,e])=>{rn[e]=t}));const sn=rn;function cn(e){const n=new Qe(e);const o=t(Qe.prototype.request,n);at.extend(o,Qe.prototype,n,{allOwnKeys:true});at.extend(o,n,null,{allOwnKeys:true});o.create=function t(n){return cn(ge(e,n))};return o}const an=cn(Ht);an.Axios=Qe;an.CanceledError=se;an.CancelToken=en;an.isCancel=re;an.VERSION=Ke;an.toFormData=bt;an.AxiosError=ut;an.Cancel=an.CanceledError;an.all=function t(e){return Promise.all(e)};an.spread=nn;an.isAxiosError=on;an.mergeConfig=ge;an.AxiosHeaders=ne;an.formToJSON=t=>$t(at.isHTMLForm(t)?new FormData(t):t);an.getAdapter=Me.getAdapter;an.HttpStatusCode=sn;an.default=an;const un=an;const ln="https://wake.crmbonus.com/api";const fn="http://localhost:3001";const dn=t=>`bc:reserve${t}`;const hn="@BYCODERS_KEY";const pn="bc:used";const mn=t=>`bc:${t}`;class wn{constructor(){this.axiosInstance=un.create({baseURL:ln,headers:{"Content-Type":"application/json",accept:"application/json"}})}static getInstance(){if(this._instance){return this._instance}this._instance=new wn;return this._instance}async getCustomer(t,e){var n,o;const r={"Content-Type":"application/json",Authorization:`Bearer ${this.token}`};const s=await this.axiosInstance.get(`/store/${e}/customer/${t}`,{headers:r});this.token=(n=s===null||s===void 0?void 0:s.data)===null||n===void 0?void 0:n.token;return(o=s===null||s===void 0?void 0:s.data)===null||o===void 0?void 0:o.customer}async updateOrder(t){const e=localStorage.getItem("@BYCODERS_KEY");const n={"Content-Type":"application/json",Authorization:`Bearer ${e}`};await this.axiosInstance.patch(`/checkouts/${t.cartId}/updateOrder`,{orderId:t.orderId,externalId:t.cartIdCrm},{headers:n});localStorage.removeItem("@BYCODERS_KEY");localStorage.removeItem(pn);localStorage.removeItem(dn(t.cartId))}async sendPin(t,e,n){const o={"Content-Type":"application/json",Authorization:`Bearer ${this.token}`};const r=await this.axiosInstance.post("/crmbonus/send-pin",{cellphone:t,name:e,storeName:n},{headers:o});return{storeId:r.data.storeId,userId:r.data.userId}}async validatePinBonus(t){const e={"Content-Type":"application/json",Authorization:`Bearer ${this.token}`};const n=await this.axiosInstance.post("/crmbonus/process-pin-bonus",t,{headers:e});return n.data}async reserve(t){const e={"Content-Type":"application/json",Authorization:`Bearer ${this.token}`};const n=await this.axiosInstance.post("/crmbonus/redeem-bonus",t,{headers:e});return n.data}async cancel(t){const e={"Content-Type":"application/json",Authorization:`Bearer ${this.token}`};const n=await this.axiosInstance.post("/crmbonus/cancel-apply-bonus",{ticket:t},{headers:e});return n.data}async getToken(t){var e,n;const o=await this.axiosInstance.post("/wake/requestToken",{storeName:t});this.token=(e=o===null||o===void 0?void 0:o.data)===null||e===void 0?void 0:e.token;localStorage.setItem(hn,this.token);return(n=o===null||o===void 0?void 0:o.data)===null||n===void 0?void 0:n.token}async getCustomization(t){const e={"Content-Type":"application/json",Authorization:`Bearer ${this.token}`};const n=await this.axiosInstance.get(`/stores/${t}/customizations`,{headers:e});localStorage.setItem(mn(t),JSON.stringify(n.data));console.log("getCustomization",n);return n.data}async cancelBonus(t,e){const n=localStorage.getItem(hn);const o={"Content-Type":"application/json",Authorization:`Bearer ${n}`};await this.axiosInstance.post(`/crmbonus/cancel-bonus`,{cartId:t,usedBonus:true,storeName:e},{headers:o});localStorage.setItem(t,"0");localStorage.removeItem(pn)}async getInfoBonus(t,e){await this.getToken(e);const n={"Content-Type":"application/json",Authorization:`Bearer ${this.token}`};const o=await this.axiosInstance.get(`/crmbonus/order-info/${e}/${t}`,{headers:n});return o.data}async patchInfoBonus(t){await this.getToken(t.storeName);const e={"Content-Type":"application/json",Authorization:`Bearer ${this.token}`};await this.axiosInstance.patch(`/checkouts/${t.cartId}`,{metadata:t.metadata},{headers:e})}async getInfoCart(t){const e=await fetch(`${t}/api/carrinho`,{credentials:"include"}).then((t=>t.json()));return e}}wn._instance=null;export{wn as C,pn as U,fn as a,dn as g};
2
+ //# sourceMappingURL=p-a428d5df.js.map