@ecomplus/widget-martan 1.1.22 → 1.2.0

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 (97) hide show
  1. package/.version +0 -0
  2. package/CHANGELOG.md +14 -0
  3. package/cms.config.js +78 -83
  4. package/dist/public/widget-martan.0.min.js +62 -0
  5. package/dist/public/widget-martan.0.min.js.map +1 -0
  6. package/dist/public/widget-martan.1.min.js.map +1 -1
  7. package/dist/public/widget-martan.2.min.js +1 -1
  8. package/dist/public/widget-martan.2.min.js.map +1 -1
  9. package/dist/public/widget-martan.3.min.js +1 -1
  10. package/dist/public/widget-martan.3.min.js.map +1 -1
  11. package/dist/public/widget-martan.4.min.js +1 -1
  12. package/dist/public/widget-martan.4.min.js.map +1 -1
  13. package/dist/public/widget-martan.5.min.js +1 -1
  14. package/dist/public/widget-martan.5.min.js.map +1 -1
  15. package/dist/public/widget-martan.6.min.js +2 -0
  16. package/dist/public/widget-martan.6.min.js.map +1 -0
  17. package/dist/public/widget-martan.7.min.js +2 -0
  18. package/dist/public/widget-martan.7.min.js.map +1 -0
  19. package/dist/public/widget-martan.8.min.js +2 -0
  20. package/dist/public/widget-martan.8.min.js.map +1 -0
  21. package/dist/public/widget-martan.9.min.js +2 -0
  22. package/dist/public/widget-martan.9.min.js.map +1 -0
  23. package/dist/public/widget-martan.var.min.js +3 -3
  24. package/dist/public/widget-martan.var.min.js.map +1 -1
  25. package/dist/widget-martan.0.min.js +62 -0
  26. package/dist/widget-martan.0.min.js.map +1 -0
  27. package/dist/widget-martan.1.min.js.map +1 -1
  28. package/dist/widget-martan.2.min.js +1 -1
  29. package/dist/widget-martan.2.min.js.map +1 -1
  30. package/dist/widget-martan.3.min.js +1 -1
  31. package/dist/widget-martan.3.min.js.map +1 -1
  32. package/dist/widget-martan.4.min.js +1 -1
  33. package/dist/widget-martan.4.min.js.map +1 -1
  34. package/dist/widget-martan.5.min.js +1 -1
  35. package/dist/widget-martan.5.min.js.map +1 -1
  36. package/dist/widget-martan.6.min.js +2 -0
  37. package/dist/widget-martan.6.min.js.map +1 -0
  38. package/dist/widget-martan.7.min.js +2 -0
  39. package/dist/widget-martan.7.min.js.map +1 -0
  40. package/dist/widget-martan.8.min.js +2 -0
  41. package/dist/widget-martan.8.min.js.map +1 -0
  42. package/dist/widget-martan.9.min.js +2 -0
  43. package/dist/widget-martan.9.min.js.map +1 -0
  44. package/dist/widget-martan.min.js +3 -3
  45. package/dist/widget-martan.min.js.map +1 -1
  46. package/package.json +2 -2
  47. package/src/append/product-block.ejs +5 -1
  48. package/src/append/product-card-slots.ejs +1 -1
  49. package/src/append/product-slots.ejs +1 -9
  50. package/src/index.js +17 -12
  51. package/src/utils/configProps.js +29 -0
  52. package/src/utils/lighten-color.js +20 -0
  53. package/src/utils/widget-initializer.js +60 -0
  54. package/src/widgets/questions/Questions.vue +436 -0
  55. package/src/widgets/questions/index.js +10 -0
  56. package/src/widgets/ratings/Rating.vue +223 -0
  57. package/src/widgets/ratings/index.js +232 -0
  58. package/src/widgets/reviews/Reviews.vue +317 -288
  59. package/src/widgets/reviews/components/Quickview.vue +390 -0
  60. package/src/widgets/reviews/components/Rating.vue +106 -0
  61. package/src/widgets/reviews/components/RatingBreakdown.vue +171 -0
  62. package/src/widgets/reviews/components/RatingHistogram.vue +306 -0
  63. package/src/widgets/reviews/components/RatingSummary.vue +226 -0
  64. package/src/widgets/reviews/components/RatingSummaryG.vue +104 -0
  65. package/src/widgets/reviews/components/ReviewCard.vue +223 -0
  66. package/src/widgets/reviews/{ReviewReply.vue → components/ReviewReply.vue} +42 -1
  67. package/src/widgets/reviews/{Score.vue → components/Score.vue} +3 -4
  68. package/src/widgets/reviews/{Sort.vue → components/Sort.vue} +1 -1
  69. package/src/widgets/reviews/components/SortDropdown.vue +184 -0
  70. package/src/widgets/reviews/components/VerifiedPurchase.vue +121 -0
  71. package/src/widgets/reviews/headers/Center.vue +248 -0
  72. package/src/widgets/reviews/headers/Compact.vue +225 -0
  73. package/src/widgets/reviews/headers/Histogram.vue +224 -0
  74. package/src/widgets/reviews/headers/Padrao.vue +113 -0
  75. package/src/widgets/reviews/headers/Summary.vue +217 -0
  76. package/src/widgets/reviews/index.js +2 -48
  77. package/src/append/body.ejs +0 -79
  78. package/src/append/head.ejs +0 -5
  79. package/src/append/stamps.ejs +0 -3
  80. package/src/widgets/reviews/AuthorAndRating.vue +0 -30
  81. package/src/widgets/reviews/AverageScore.vue +0 -160
  82. package/src/widgets/reviews/AverageTotal.vue +0 -35
  83. package/src/widgets/reviews/CardReview.vue +0 -87
  84. package/src/widgets/reviews/GridView.vue +0 -113
  85. package/src/widgets/reviews/HeaderExpanded.vue +0 -84
  86. package/src/widgets/reviews/HeaderMinimal.vue +0 -110
  87. package/src/widgets/reviews/ListView.vue +0 -47
  88. package/src/widgets/reviews/Quickview.vue +0 -397
  89. package/src/widgets/reviews/ReviewBody.vue +0 -39
  90. package/src/widgets/reviews/ThumbsPictures.vue +0 -135
  91. package/src/widgets/reviews/Total.vue +0 -79
  92. package/src/widgets/reviews/VerifiedPurchase.vue +0 -110
  93. package/src/widgets/reviews/isRecommended.vue +0 -44
  94. package/src/widgets/snippets/Rating.vue +0 -71
  95. package/src/widgets/snippets/Snippets.vue +0 -311
  96. package/src/widgets/snippets/index.js +0 -45
  97. /package/src/widgets/reviews/{VideoPlayer.vue → components/VideoPlayer.vue} +0 -0
@@ -1,11 +1,11 @@
1
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("@ecomplus/utils"),require("@ecomplus/storefront-twbs"),require("vue"),require("@glidejs/glide")):"function"==typeof define&&define.amd?define([,,,],e):"object"==typeof exports?exports.widgetMartan=e(require("@ecomplus/utils"),require("@ecomplus/storefront-twbs"),require("vue"),require("@glidejs/glide")):t.widgetMartan=e(t.ecomUtils,t.__storefrontTwbs,t.Vue,t.Glide)}(window,(function(t,e,r,i){return function(t){function e(e){for(var r,n,o=e[0],s=e[1],a=0,c=[];a<o.length;a++)n=o[a],Object.prototype.hasOwnProperty.call(i,n)&&i[n]&&c.push(i[n][0]),i[n]=0;for(r in s)Object.prototype.hasOwnProperty.call(s,r)&&(t[r]=s[r]);for(l&&l(e);c.length;)c.shift()()}var r={},i={0:0};function n(e){if(r[e])return r[e].exports;var i=r[e]={i:e,l:!1,exports:{}};return t[e].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.e=function(t){var e=[],r=i[t];if(0!==r)if(r)e.push(r[2]);else{var o=new Promise((function(e,n){r=i[t]=[e,n]}));e.push(r[2]=o);var s,a=document.createElement("script");a.charset="utf-8",a.timeout=120,n.nc&&a.setAttribute("nonce",n.nc),a.src=function(t){return n.p+"widget-martan."+({}[t]||t)+".min.js"}(t);var l=new Error;s=function(e){a.onerror=a.onload=null,clearTimeout(c);var r=i[t];if(0!==r){if(r){var n=e&&("load"===e.type?"missing":e.type),o=e&&e.target&&e.target.src;l.message="Loading chunk "+t+" failed.\n("+n+": "+o+")",l.name="ChunkLoadError",l.type=n,l.request=o,r[1](l)}i[t]=void 0}};var c=setTimeout((function(){s({type:"timeout",target:a})}),12e4);a.onerror=a.onload=s,document.head.appendChild(a)}return Promise.all(e)},n.m=t,n.c=r,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/assets/vendor/",n.oe=function(t){throw console.error(t),t};var o=window.webpackJsonpwidgetMartan=window.webpackJsonpwidgetMartan||[],s=o.push.bind(o);o.push=e,o=o.slice();for(var a=0;a<o.length;a++)e(o[a]);var l=s;return n(n.s=64)}([function(t,e,r){"use strict";(function(t){var i=r(14);const{toString:n}=Object.prototype,{getPrototypeOf:o}=Object,s=(a=Object.create(null),t=>{const e=n.call(t);return a[e]||(a[e]=e.slice(8,-1).toLowerCase())});var a;const l=t=>(t=t.toLowerCase(),e=>s(e)===t),c=t=>e=>typeof e===t,{isArray:u}=Array,d=c("undefined");const f=l("ArrayBuffer");const h=c("string"),p=c("function"),m=c("number"),g=t=>null!==t&&"object"==typeof t,v=t=>{if("object"!==s(t))return!1;const e=o(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e)||Symbol.toStringTag in t||Symbol.iterator in t)},w=l("Date"),y=l("File"),b=l("Blob"),_=l("FileList"),x=l("URLSearchParams");function R(t,e,{allOwnKeys:r=!1}={}){if(null==t)return;let i,n;if("object"!=typeof t&&(t=[t]),u(t))for(i=0,n=t.length;i<n;i++)e.call(null,t[i],i,t);else{const n=r?Object.getOwnPropertyNames(t):Object.keys(t),o=n.length;let s;for(i=0;i<o;i++)s=n[i],e.call(null,t[s],s,t)}}function E(t,e){e=e.toLowerCase();const r=Object.keys(t);let i,n=r.length;for(;n-- >0;)if(i=r[n],e===i.toLowerCase())return i;return null}const C="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:t,A=t=>!d(t)&&t!==C;const S=(O="undefined"!=typeof Uint8Array&&o(Uint8Array),t=>O&&t instanceof O);var O;const k=l("HTMLFormElement"),P=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),T=l("RegExp"),j=(t,e)=>{const r=Object.getOwnPropertyDescriptors(t),i={};R(r,(r,n)=>{let o;!1!==(o=e(r,n,t))&&(i[n]=o||r)}),Object.defineProperties(t,i)},B="abcdefghijklmnopqrstuvwxyz",U={DIGIT:"0123456789",ALPHA:B,ALPHA_DIGIT:B+B.toUpperCase()+"0123456789"};const M=l("AsyncFunction");e.a={isArray:u,isArrayBuffer:f,isBuffer:function(t){return null!==t&&!d(t)&&null!==t.constructor&&!d(t.constructor)&&p(t.constructor.isBuffer)&&t.constructor.isBuffer(t)},isFormData:t=>{let e;return t&&("function"==typeof FormData&&t instanceof FormData||p(t.append)&&("formdata"===(e=s(t))||"object"===e&&p(t.toString)&&"[object FormData]"===t.toString()))},isArrayBufferView:function(t){let e;return e="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&f(t.buffer),e},isString:h,isNumber:m,isBoolean:t=>!0===t||!1===t,isObject:g,isPlainObject:v,isUndefined:d,isDate:w,isFile:y,isBlob:b,isRegExp:T,isFunction:p,isStream:t=>g(t)&&p(t.pipe),isURLSearchParams:x,isTypedArray:S,isFileList:_,forEach:R,merge:function t(){const{caseless:e}=A(this)&&this||{},r={},i=(i,n)=>{const o=e&&E(r,n)||n;v(r[o])&&v(i)?r[o]=t(r[o],i):v(i)?r[o]=t({},i):u(i)?r[o]=i.slice():r[o]=i};for(let t=0,e=arguments.length;t<e;t++)arguments[t]&&R(arguments[t],i);return r},extend:(t,e,r,{allOwnKeys:n}={})=>(R(e,(e,n)=>{r&&p(e)?t[n]=Object(i.a)(e,r):t[n]=e},{allOwnKeys:n}),t),trim:t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:t=>(65279===t.charCodeAt(0)&&(t=t.slice(1)),t),inherits:(t,e,r,i)=>{t.prototype=Object.create(e.prototype,i),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),r&&Object.assign(t.prototype,r)},toFlatObject:(t,e,r,i)=>{let n,s,a;const l={};if(e=e||{},null==t)return e;do{for(n=Object.getOwnPropertyNames(t),s=n.length;s-- >0;)a=n[s],i&&!i(a,t,e)||l[a]||(e[a]=t[a],l[a]=!0);t=!1!==r&&o(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},kindOf:s,kindOfTest:l,endsWith:(t,e,r)=>{t=String(t),(void 0===r||r>t.length)&&(r=t.length),r-=e.length;const i=t.indexOf(e,r);return-1!==i&&i===r},toArray:t=>{if(!t)return null;if(u(t))return t;let e=t.length;if(!m(e))return null;const r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},forEachEntry:(t,e)=>{const r=(t&&t[Symbol.iterator]).call(t);let i;for(;(i=r.next())&&!i.done;){const r=i.value;e.call(t,r[0],r[1])}},matchAll:(t,e)=>{let r;const i=[];for(;null!==(r=t.exec(e));)i.push(r);return i},isHTMLForm:k,hasOwnProperty:P,hasOwnProp:P,reduceDescriptors:j,freezeMethods:t=>{j(t,(e,r)=>{if(p(t)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const i=t[r];p(i)&&(e.enumerable=!1,"writable"in e?e.writable=!1:e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}))})},toObjectSet:(t,e)=>{const r={},i=t=>{t.forEach(t=>{r[t]=!0})};return u(t)?i(t):i(String(t).split(e)),r},toCamelCase:t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(t,e,r){return e.toUpperCase()+r})),noop:()=>{},toFiniteNumber:(t,e)=>(t=+t,Number.isFinite(t)?t:e),findKey:E,global:C,isContextDefined:A,ALPHABET:U,generateString:(t=16,e=U.ALPHA_DIGIT)=>{let r="";const{length:i}=e;for(;t--;)r+=e[Math.random()*i|0];return r},isSpecCompliantForm:function(t){return!!(t&&p(t.append)&&"FormData"===t[Symbol.toStringTag]&&t[Symbol.iterator])},toJSONObject:t=>{const e=new Array(10),r=(t,i)=>{if(g(t)){if(e.indexOf(t)>=0)return;if(!("toJSON"in t)){e[i]=t;const n=u(t)?[]:{};return R(t,(t,e)=>{const o=r(t,i+1);!d(o)&&(n[e]=o)}),e[i]=void 0,n}}return t};return r(t,0)},isAsyncFn:M,isThenable:t=>t&&(g(t)||p(t))&&p(t.then)&&p(t.catch)}}).call(this,r(33))},function(t,e,r){"use strict";var i=r(0);function n(t,e,r,i,n){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=t,this.name="AxiosError",e&&(this.code=e),r&&(this.config=r),i&&(this.request=i),n&&(this.response=n)}i.a.inherits(n,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:i.a.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const o=n.prototype,s={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{s[t]={value:t}}),Object.defineProperties(n,s),Object.defineProperty(o,"isAxiosError",{value:!0}),n.from=(t,e,r,s,a,l)=>{const c=Object.create(o);return i.a.toFlatObject(t,c,(function(t){return t!==Error.prototype}),t=>"isAxiosError"!==t),n.call(c,t.message,e,r,s,a),c.cause=t,c.name=t.name,l&&Object.assign(c,l),c},e.a=n},function(t,e,r){"use strict";function i(t,e,r,i,n,o,s,a){var l,c="function"==typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=r,c._compiled=!0),i&&(c.functional=!0),o&&(c._scopeId="data-v-"+o),s?(l=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),n&&n.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},c._ssrRegister=l):n&&(l=a?function(){n.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:n),l)if(c.functional){c._injectStyles=l;var u=c.render;c.render=function(t,e){return l.call(e),u(t,e)}}else{var d=c.beforeCreate;c.beforeCreate=d?[].concat(d,l):[l]}return{exports:t,options:c}}r.d(e,"a",(function(){return i}))},function(e,r){e.exports=t},function(t,e,r){"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var r=function(t,e){var r=t[1]||"",i=t[3];if(!i)return r;if(e&&"function"==typeof btoa){var n=(s=i,a=btoa(unescape(encodeURIComponent(JSON.stringify(s)))),l="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(a),"/*# ".concat(l," */")),o=i.sources.map((function(t){return"/*# sourceURL=".concat(i.sourceRoot||"").concat(t," */")}));return[r].concat(o).concat([n]).join("\n")}var s,a,l;return[r].join("\n")}(e,t);return e[2]?"@media ".concat(e[2]," {").concat(r,"}"):r})).join("")},e.i=function(t,r,i){"string"==typeof t&&(t=[[null,t,""]]);var n={};if(i)for(var o=0;o<this.length;o++){var s=this[o][0];null!=s&&(n[s]=!0)}for(var a=0;a<t.length;a++){var l=[].concat(t[a]);i&&n[l[0]]||(r&&(l[2]?l[2]="".concat(r," and ").concat(l[2]):l[2]=r),e.push(l))}},e}},function(t,e,r){"use strict";function i(t,e){for(var r=[],i={},n=0;n<e.length;n++){var o=e[n],s=o[0],a={id:t+":"+n,css:o[1],media:o[2],sourceMap:o[3]};i[s]?i[s].parts.push(a):r.push(i[s]={id:s,parts:[a]})}return r}r.r(e),r.d(e,"default",(function(){return h}));var n="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!n)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var o={},s=n&&(document.head||document.getElementsByTagName("head")[0]),a=null,l=0,c=!1,u=function(){},d=null,f="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());function h(t,e,r,n){c=r,d=n||{};var s=i(t,e);return p(s),function(e){for(var r=[],n=0;n<s.length;n++){var a=s[n];(l=o[a.id]).refs--,r.push(l)}e?p(s=i(t,e)):s=[];for(n=0;n<r.length;n++){var l;if(0===(l=r[n]).refs){for(var c=0;c<l.parts.length;c++)l.parts[c]();delete o[l.id]}}}}function p(t){for(var e=0;e<t.length;e++){var r=t[e],i=o[r.id];if(i){i.refs++;for(var n=0;n<i.parts.length;n++)i.parts[n](r.parts[n]);for(;n<r.parts.length;n++)i.parts.push(g(r.parts[n]));i.parts.length>r.parts.length&&(i.parts.length=r.parts.length)}else{var s=[];for(n=0;n<r.parts.length;n++)s.push(g(r.parts[n]));o[r.id]={id:r.id,refs:1,parts:s}}}}function m(){var t=document.createElement("style");return t.type="text/css",s.appendChild(t),t}function g(t){var e,r,i=document.querySelector('style[data-vue-ssr-id~="'+t.id+'"]');if(i){if(c)return u;i.parentNode.removeChild(i)}if(f){var n=l++;i=a||(a=m()),e=y.bind(null,i,n,!1),r=y.bind(null,i,n,!0)}else i=m(),e=b.bind(null,i),r=function(){i.parentNode.removeChild(i)};return e(t),function(i){if(i){if(i.css===t.css&&i.media===t.media&&i.sourceMap===t.sourceMap)return;e(t=i)}else r()}}var v,w=(v=[],function(t,e){return v[t]=e,v.filter(Boolean).join("\n")});function y(t,e,r,i){var n=r?"":i.css;if(t.styleSheet)t.styleSheet.cssText=w(e,n);else{var o=document.createTextNode(n),s=t.childNodes;s[e]&&t.removeChild(s[e]),s.length?t.insertBefore(o,s[e]):t.appendChild(o)}}function b(t,e){var r=e.css,i=e.media,n=e.sourceMap;if(i&&t.setAttribute("media",i),d.ssrId&&t.setAttribute("data-vue-ssr-id",e.id),n&&(r+="\n/*# sourceURL="+n.sources[0]+" */",r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */"),t.styleSheet)t.styleSheet.cssText=r;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(r))}}},function(t,e,r){"use strict";var i={name:"Rating",props:{rating:{type:Number,default:5},color:{type:String,default:"#000000"}},data:()=>({stars:Array(5).fill(!1)}),mounted(){this.updateStars()},methods:{updateStars(){const t=Math.floor(this.rating);this.stars=this.stars.map((e,r)=>r<t)}},watch:{rating:"updateStars"}},n=(r(38),r(2)),o=Object(n.a)(i,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("span",{staticClass:"martan-rating"},t._l(t.stars,(function(e,i){return r("svg",{key:i,staticClass:"icon icon-tabler",class:t.stars[i]+" ? 'icon-tabler-star-filled' : icon-tabler-star",style:{color:t.color},attrs:{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"}},[r("path",{attrs:{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}}),r("path",{attrs:{d:t.stars[i]?"M8.243 7.34l-6.38 .925l-.113 .023a1 1 0 0 0 -.44 1.684l4.622 4.499l-1.09 6.355l-.013 .11a1 1 0 0 0 1.464 .944l5.706 -3l5.693 3l.1 .046a1 1 0 0 0 1.352 -1.1l-1.091 -6.355l4.624 -4.5l.078 -.085a1 1 0 0 0 -.633 -1.62l-6.38 -.926l-2.852 -5.78a1 1 0 0 0 -1.794 0l-2.853 5.78z":"M12 17.75l-6.172 3.245l1.179 -6.873l-5 -4.867l6.9 -1l3.086 -6.253l3.086 6.253l6.9 1l-5 4.867l1.179 6.873z",fill:t.stars[i]?"currentColor":"none"}})])})),0)}),[],!1,null,null,null);e.a=o.exports},function(t,e,r){"use strict";(function(t){var i=r(0),n=r(1),o=r(15);function s(t){return i.a.isPlainObject(t)||i.a.isArray(t)}function a(t){return i.a.endsWith(t,"[]")?t.slice(0,-2):t}function l(t,e,r){return t?t.concat(e).map((function(t,e){return t=a(t),!r&&e?"["+t+"]":t})).join(r?".":""):e}const c=i.a.toFlatObject(i.a,{},null,(function(t){return/^is[A-Z]/.test(t)}));e.a=function(e,r,u){if(!i.a.isObject(e))throw new TypeError("target must be an object");r=r||new(o.a||FormData);const d=(u=i.a.toFlatObject(u,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(t,e){return!i.a.isUndefined(e[t])}))).metaTokens,f=u.visitor||v,h=u.dots,p=u.indexes,m=(u.Blob||"undefined"!=typeof Blob&&Blob)&&i.a.isSpecCompliantForm(r);if(!i.a.isFunction(f))throw new TypeError("visitor must be a function");function g(e){if(null===e)return"";if(i.a.isDate(e))return e.toISOString();if(!m&&i.a.isBlob(e))throw new n.a("Blob is not supported. Use a Buffer instead.");return i.a.isArrayBuffer(e)||i.a.isTypedArray(e)?m&&"function"==typeof Blob?new Blob([e]):t.from(e):e}function v(t,e,n){let o=t;if(t&&!n&&"object"==typeof t)if(i.a.endsWith(e,"{}"))e=d?e:e.slice(0,-2),t=JSON.stringify(t);else if(i.a.isArray(t)&&function(t){return i.a.isArray(t)&&!t.some(s)}(t)||(i.a.isFileList(t)||i.a.endsWith(e,"[]"))&&(o=i.a.toArray(t)))return e=a(e),o.forEach((function(t,n){!i.a.isUndefined(t)&&null!==t&&r.append(!0===p?l([e],n,h):null===p?e:e+"[]",g(t))})),!1;return!!s(t)||(r.append(l(n,e,h),g(t)),!1)}const w=[],y=Object.assign(c,{defaultVisitor:v,convertValue:g,isVisitable:s});if(!i.a.isObject(e))throw new TypeError("data must be an object");return function t(e,n){if(!i.a.isUndefined(e)){if(-1!==w.indexOf(e))throw Error("Circular reference detected in "+n.join("."));w.push(e),i.a.forEach(e,(function(e,o){!0===(!(i.a.isUndefined(e)||null===e)&&f.call(r,e,i.a.isString(o)?o.trim():o,n,y))&&t(e,n?n.concat(o):[o])})),w.pop()}}(e),r}}).call(this,r(58).Buffer)},function(t,e,r){"use strict";function i(t){const e=Math.floor((new Date-new Date(t))/1e3),r={ano:31536e3,"mês":2592e3,semana:604800,dia:86400,hora:3600,minuto:60,segundo:1};let i;if(0===e)return"Agora";for(const t in r)if(i=Math.floor(e/r[t]),i>0)return 1===i?`${i} ${t} atrás`:"mês"===t?i+" meses atrás":`${i} ${t}s atrás`}r.d(e,"a",(function(){return i}))},function(t,e,r){"use strict";var i=r(13),n=r.n(i),o=r(66),s=r(3),a=r(11),l=r(8),c=r(17),u=r(10),d=r(18),f=r(19),h=r(20),p=r(21),m={name:"VideoPlayer",props:{video:{type:String,required:!0}},data:()=>({isPlaying:!0}),methods:{play(){this.$refs.videoPlayer.paused||this.$refs.videoPlayer.ended?this.$refs.videoPlayer.play():this.$refs.videoPlayer.pause()},updateBtn(){this.isPlaying=this.$refs.videoPlayer.paused}},mounted:function(){this.$refs.playButton.addEventListener("click",this.play),this.$refs.videoPlayer.addEventListener("click",this.play),this.$refs.videoPlayer.addEventListener("play",this.updateBtn),this.$refs.videoPlayer.addEventListener("pause",this.updateBtn)}},g=(r(46),r(2)),v=Object(g.a)(m,(function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"mt-player"},[e("video",{ref:"videoPlayer",attrs:{preload:"metadata"}},[e("source",{attrs:{src:this.video,type:"video/mp4"}})]),e("div",{staticClass:"mt-player__controls"},[e("button",{ref:"playButton",staticClass:"playPauseBtn",attrs:{title:"tocar vídeo"}},[this.isPlaying?e("svg",{staticClass:"icon icon-tabler icon-tabler-player-play",attrs:{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"}},[e("path",{attrs:{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}}),e("path",{attrs:{d:"M7 4v16l13 -8z"}})]):e("svg",{staticClass:"icon icon-tabler icon-tabler-player-pause",attrs:{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"}},[e("path",{attrs:{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}}),e("path",{attrs:{d:"M6 5m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v12a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z"}}),e("path",{attrs:{d:"M14 5m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v12a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z"}})])])])])}),[],!1,null,null,null).exports,w=r(6),y={name:"Quickview",components:{ThumbsPictures:c.a,Rating:w.a,VerifiedPurchase:u.a,AuthorAndRating:d.a,IsRecommended:f.a,ReviewBody:h.a,ReviewReply:p.a,VideoPlayer:v},props:{review:Object,isOpen:{type:Boolean,default:!1},starColor:String},data:()=>({glide:null}),computed:{i19quickview:()=>"Quickview",i19next:()=>Object(s.i18n)(o.a),i19previous:()=>Object(s.i18n)(o.c),reviewId:function(){return this.review&&this.review.id?this.review.id:null},pictures:function(){return this.review&&this.review.pictures?this.review.pictures:[]},video:function(){return this.review&&this.review.video_url?this.review.video_url:null},title:function(){return this.review&&this.review.title?this.review.title:null},author:function(){return this.review&&this.review.display_name?this.review.display_name:null},rating:function(){return this.review&&this.review.rating?this.review.rating:null},recommended:function(){return this.review&&this.review.is_recommended?this.review.is_recommended:null},isVerified:function(){return this.review&&this.review.verified_purchase?this.review.verified_purchase:null},reply:function(){return this.review&&this.review.reply?this.review.reply:null},created:function(){return this.review&&this.review.created_at?this.review.created_at:null},body:function(){return this.review&&this.review.body?this.review.body:null}},watch:{isOpen:function(t){t&&Object(a.$)("#martan-quickview").modal("show")}},mounted(){Object(a.$)("#martan-quickview").on("hidden.bs.modal",this.close),Object(a.$)("#martan-quickview").on("shown.bs.modal",this.mount),this.glide=new n.a(".mt-quickview__galery",{keyboard:!1,rewind:!0,type:"carousel",dragThreshold:!1,startAt:0,perView:1,perViewLg:1,perViewSm:1})},beforeDestroy(){this.glide&&this.glide.destroy()},methods:{mount:function(){(this.review&&this.review.pictures||this.review&&this.review.video_url)&&setTimeout(()=>{try{this.glide.mount(),this.glide.update({perView:1})}catch(t){}},5)},close:function(){this.$emit("onClose",!0);try{this.glide.destroy()}catch(t){}},next:function(){try{this.glide.go(">"),this.glide.update({perView:1})}catch(t){}},back:function(){try{this.glide.go("<"),this.glide.update({perView:1})}catch(t){}},goToSlide:function({slide:t}){try{this.glide&&this.glide.go("="+t).update({perView:1})}catch(t){}},formatDate:s.formatDate,timeAgo:l.a}},b=(r(48),Object(g.a)(y,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"modal fade",attrs:{id:"martan-quickview",tabindex:"-1",role:"dialog","aria-labelledby":"quickviewModal","aria-hidden":"true"}},[r("div",{staticClass:"modal-dialog modal-dialog-centered modal-xl",attrs:{role:"document"}},[r("div",{staticClass:"modal-content"},[r("div",{directives:[{name:"show",rawName:"v-show",value:!1,expression:"false"}],staticClass:"modal-header"},[r("h5",{staticClass:"modal-title",attrs:{id:"quickviewModal"}},[t._v(t._s(t.i19quickview))]),t._m(0)]),r("div",{staticClass:"modal-body mt-quickview"},[t._m(1),t.pictures.length||t.video?r("div",{ref:"galery",staticClass:"glide mt-quickview__galery"},[r("div",{staticClass:"mt-quickview__controls",style:"--button--hover-color:"+(t.starColor||"#eeeeee"),attrs:{"data-glide-el":"controls"}},[t.glide&&t.glide.index>0?r("button",{staticClass:"left",attrs:{title:t.i19previous,"aria-label":t.i19previous,"data-glide-dir":"<"},on:{click:t.back}},[r("i",{staticClass:"i-chevron-left"})]):t._e()]),r("div",{staticClass:"glide__track",attrs:{"data-glide-el":"track"}},[r("ul",{staticClass:"glide__slides"},[t._l(t.pictures,(function(e){return r("li",{key:e.id,staticClass:"glide__slide"},[r("img",{attrs:{alt:"Foto da avaliação do produto feita por "+t.author,src:e.big}})])})),t.video?r("li",{key:t.video,staticClass:"lazy-image video-wrapper"},[r("VideoPlayer",{attrs:{video:t.video}})],1):t._e()],2)]),r("div",{staticClass:"mt-quickview__controls",style:"--button--hover-color:"+(t.starColor||"#eeeeee"),attrs:{"data-glide-el":"controls"}},[r("button",{attrs:{title:t.i19next,"aria-label":t.i19next,"data-glide-dir":">"},on:{click:t.next}},[r("i",{staticClass:"i-chevron-right"})])])]):t._e(),r("div",{staticClass:"mt-review"},[r("div",{staticClass:"mt-rating__group"},[t.review?r("AuthorAndRating",{attrs:{author:t.author,isAnonymous:t.review.is_anonymous,rating:t.rating,starColor:t.starColor}}):t._e(),t.review?r("isRecommended",{attrs:{recommended:t.recommended}}):t._e(),t.isVerified?r("VerifiedPurchase",{attrs:{showVerified:!0}}):t._e()],1),t.review?r("ThumbsPictures",{attrs:{review:t.review},on:{onClick:t.goToSlide}}):t._e(),t.review?r("ReviewBody",{attrs:{body:t.body,createdAt:t.review.created_at}}):t._e(),r("ReviewReply",{attrs:{reply:t.reply}})],1)])])])])}),[function(){var t=this.$createElement,e=this._self._c||t;return e("button",{staticClass:"close",attrs:{type:"button","data-dismiss":"modal","aria-label":"Close"}},[e("span",{attrs:{"aria-hidden":"true"}},[this._v("×")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("button",{staticClass:"close",attrs:{type:"button","data-dismiss":"modal","aria-label":"Close"}},[e("span",{attrs:{"aria-hidden":"true"}},[this._v("×")])])}],!1,null,null,null));e.a=b.exports},function(t,e,r){"use strict";var i=r(3),n=r(11),o={name:"VerifiedPurchase",props:{showVerified:{type:Boolean,default:!1}},data:()=>({collapseId:null}),computed:{i19verifiedBuyer:()=>"Comprador verificado",i19howProcessVerifiedMsg:()=>Object(i.i18n)({en_us:"How we verify and process reviews",pt_br:"Como verificamos e processamos avaliações"}),i19useMartanPrivacyMsg:()=>Object(i.i18n)({en_us:"We use Martan, a web-based application that provides an online reviews and marketing solution, to collect, source, process and display reviews on our website.",pt_br:"Utilizamos o Martan, uma aplicação baseada na web que oferece uma solução de avaliações online e marketing, para coletar, originar, processar e exibir avaliações em nosso site."}),i19howWeCollectMsg:()=>Object(i.i18n)({en_us:'We automatically send review requests through Martan to customers for whom we have a record of purchasing products directly from our website. This allows us to verify the reliability of the review through technical means such as the customers email address. Reviews submitted directly through these requests are marked as "Verified Purchase", and the following statement will be displayed in the interface where the review is published: "This review was collected from a verified customer who purchased this item."',pt_br:'Enviamos automaticamente solicitações de avaliações por meio do Martan aos clientes para os quais temos registro de que compraram produtos diretamente em nosso site. Isso nos permite verificar a confiabilidade da avaliação por meio de meios técnicos, como o endereço de e-mail do cliente. As avaliações enviadas diretamente por essas solicitações são marcadas como "Compra verificada", e a seguinte declaração será exibida na interface em que a avaliação for publicada: "Esta avaliação foi coletada de um cliente verificado que comprou este item".'}),i19howClientsReviewMsg:()=>Object(i.i18n)({en_us:"Customers can choose how to rate reviewed products with a score between 1 and 5. The average review score is calculated using a simple mathematical average, which is then rounded to a half or full star rating using standard rounding rules. The average review score includes reviews for which customers received discounts on future purchases for adding a photo or video to their review.",pt_br:"Os clientes podem escolher como avaliar os produtos avaliados com uma pontuação entre 1 e 5. A pontuação média das avaliações é calculada usando uma média matemática simples, que é então arredondada para uma meia ou uma avaliação de estrela completa usando regras padrão de arredondamento. A pontuação média das avaliações inclui avaliações para as quais os clientes receberam descontos em compras futuras por adicionar uma foto ou um vídeo à sua avaliação."})},methods:{open:function(){Object(n.$)("#"+this.collapseId).collapse("toggle")}},mounted:function(){this.collapseId="mt-verified-"+Date.now()}},s=(r(42),r(2)),a=Object(s.a)(o,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",[r("div",{staticClass:"mt-rating__verified"},[r("svg",{staticClass:"icon icon-tabler icon-tabler-discount-check-filled",attrs:{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"}},[r("path",{attrs:{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}}),r("path",{attrs:{d:"M12.01 2.011a3.2 3.2 0 0 1 2.113 .797l.154 .145l.698 .698a1.2 1.2 0 0 0 .71 .341l.135 .008h1a3.2 3.2 0 0 1 3.195 3.018l.005 .182v1c0 .27 .092 .533 .258 .743l.09 .1l.697 .698a3.2 3.2 0 0 1 .147 4.382l-.145 .154l-.698 .698a1.2 1.2 0 0 0 -.341 .71l-.008 .135v1a3.2 3.2 0 0 1 -3.018 3.195l-.182 .005h-1a1.2 1.2 0 0 0 -.743 .258l-.1 .09l-.698 .697a3.2 3.2 0 0 1 -4.382 .147l-.154 -.145l-.698 -.698a1.2 1.2 0 0 0 -.71 -.341l-.135 -.008h-1a3.2 3.2 0 0 1 -3.195 -3.018l-.005 -.182v-1a1.2 1.2 0 0 0 -.258 -.743l-.09 -.1l-.697 -.698a3.2 3.2 0 0 1 -.147 -4.382l.145 -.154l.698 -.698a1.2 1.2 0 0 0 .341 -.71l.008 -.135v-1l.005 -.182a3.2 3.2 0 0 1 3.013 -3.013l.182 -.005h1a1.2 1.2 0 0 0 .743 -.258l.1 -.09l.698 -.697a3.2 3.2 0 0 1 2.269 -.944zm3.697 7.282a1 1 0 0 0 -1.414 0l-3.293 3.292l-1.293 -1.292l-.094 -.083a1 1 0 0 0 -1.32 1.497l2 2l.094 .083a1 1 0 0 0 1.32 -.083l4 -4l.083 -.094a1 1 0 0 0 -.083 -1.32z","stroke-width":"0",fill:"currentColor"}})]),r("span",[t._v(" "+t._s(t.i19verifiedBuyer)+" ")])]),r("div",{staticClass:"collapse multi-collapse",attrs:{id:t.collapseId}},[r("div",{staticClass:"card card-body"},[r("h5",[t._v(" "+t._s(t.i19howProcessVerifiedMsg)+" ")]),r("p",[t._v(" "+t._s(t.i19useMartanPrivacyMsg)+" ")]),r("p",[t._v(" "+t._s(t.i19howWeCollectMsg)+" ")]),r("p",[t._v(" "+t._s(t.i19howClientsReviewMsg)+" ")])])])])}),[],!1,null,null,null);e.a=a.exports},function(t,r){t.exports=e},function(t,e){t.exports=r},function(t,e){t.exports=i},function(t,e,r){"use strict";function i(t,e){return function(){return t.apply(e,arguments)}}r.d(e,"a",(function(){return i}))},function(t,e,r){"use strict";e.a=null},function(t,e,r){"use strict";var i=r(6),n=r(17),o=r(10),s=r(18),a=r(19),l=r(20),c=r(21),u={name:"CardReview",props:{review:{type:Object,default:()=>({})},starColor:{type:String,default:"#212529"}},components:{ThumbsPictures:n.a,Rating:i.a,VerifiedPurchase:o.a,AuthorAndRating:s.a,IsRecommended:a.a,ReviewBody:l.a,ReviewReply:c.a},computed:{isVerified:function(){return this.review&&this.review.verified_purchase}}},d=(r(44),r(2)),f=Object(d.a)(u,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"mt-review"},[r("div",{staticClass:"mt-rating__group"},[t.review?r("author-and-rating",{attrs:{author:t.review.display_name,isAnonymous:t.review.is_anonymous,rating:t.review.rating,starColor:t.starColor}}):t._e(),t.review?r("is-recommended",{attrs:{recommended:t.review.is_recommended}}):t._e(),t.isVerified?r("verified-purchase"):t._e()],1),r("thumbs-pictures",{attrs:{review:t.review},on:{onClick:function(e){return t.$emit("openQuickview",e)}}}),t.review?r("review-body",{attrs:{body:t.review.body,createdAt:t.review.created_at}}):t._e(),r("review-reply",{attrs:{reply:t.review.reply}})],1)}),[],!1,null,null,null);e.a=f.exports},function(t,e,r){"use strict";var i={name:"ThumbsPictures",props:{review:{type:Object,required:!0}},computed:{pictures:function(){return this.review.pictures||[]},video:function(){return this.review.video_url||null},title:function(){return this.review.title||null}},mounted(){const t=Array.from(document.querySelectorAll(".mt-lazy-image img")),e=new IntersectionObserver((t,r)=>{t.forEach(t=>{if(t.isIntersecting&&"false"===t.target.dataset.loaded){const r=t.target;r.dataset.loaded=!0,r.src=r.dataset.src,e.unobserve(r)}})});t.forEach(t=>e.observe(t))},methods:{onClick(t){const{review:e}=this;this.$emit("onClick",{review:e,slide:t})}}},n=(r(40),r(2)),o=Object(n.a)(i,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"media"},[t.pictures.length||t.video?r("ul",{staticClass:"media__list"},[t._l(t.pictures,(function(e,i){return t.pictures.length?r("li",{key:e.thumb,staticClass:"mt-lazy-image",on:{click:function(e){return t.onClick(i)}}},[r("img",{staticClass:"media__preview",attrs:{alt:t.title,"data-src":e.thumb,"data-loaded":"false"}})]):t._e()})),t.video?r("li",{key:t.video,staticClass:"lazy-image",attrs:{title:"Abrir vídeo"},on:{click:function(e){return t.onClick(t.pictures.length)}}},[r("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",width:"30",height:"30",viewBox:"0 0 24 24","stroke-width":"2",stroke:"#ffffff",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"}},[r("path",{attrs:{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}}),r("path",{attrs:{d:"M7 4v16l13 -8z"}})])]):t._e()],2):t._e()])}),[],!1,null,null,null);e.a=o.exports},function(t,e,r){"use strict";var i=r(6),n={name:"AuthorAndRating",props:{isAnonymous:Boolean,author:String,rating:Number,starColor:String},components:{Rating:i.a}},o=r(2),s=Object(o.a)(n,(function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticStyle:{display:"flex","align-items":"baseline","justify-content":"space-between"}},[e("div",{staticStyle:{display:"flex",height:"20px","align-items":"center",gap:"5px"}},[e("div",{staticClass:"mt-review__author",staticStyle:{"padding-right":"2px"}},[e("span",[this._v(this._s(this.isAnonymous?"Anônimo":this.author))])]),e("rating",{attrs:{rating:this.rating,color:this.starColor}})],1)])}),[],!1,null,null,null);e.a=s.exports},function(t,e,r){"use strict";var i=r(66),n=r(3),o={name:"isRecommended",props:{recommended:{type:Boolean,default:!0}},computed:{i19customerRecommendProduct:()=>"Cliente recomendaria o produto",i19customerNoRecommendProduct:()=>"Cliente não recomendaria o produto",i19no:()=>Object(n.i18n)(i.b),i19recommendProductQn:()=>"Recomendaria o produto ?",i19yes:()=>Object(n.i18n)(i.d)}},s=r(2),a=Object(s.a)(o,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"mt-is__recomended",attrs:{title:t.recommended?t.i19customerRecommendProduct:t.i19customerNoRecommendProduct}},[r("span",[t._v(" "+t._s(t.i19recommendProductQn)+" ")]),r("span",[t._v(t._s(t.recommended?t.i19yes:t.i19no))])])}),[],!1,null,null,null);e.a=a.exports},function(t,e,r){"use strict";var i=r(3),n=r(8),o={name:"ReviewBody",props:{body:{type:String,required:!0},createdAt:{type:String,required:!0}},computed:{i19published:()=>"Publicado"},methods:{formatDate:i.formatDate,timeAgo:n.a}},s=r(2),a=Object(s.a)(o,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"body-wrapper"},[r("div",{staticClass:"mt-review__body"},[t._v(t._s(t.body))]),r("span",{staticClass:"mt-review__date",attrs:{title:t.formatDate(t.createdAt)}},[t._v(" "+t._s(t.i19published)+" "+t._s(t.timeAgo(t.createdAt))+" ")])])}),[],!1,null,null,null);e.a=a.exports},function(t,e,r){"use strict";var i=r(3),n=r(8),o={name:"ReviewReply",props:{reply:{type:Object}},computed:{i19storeResponse:()=>"Resposta da loja"},methods:{formatDate:i.formatDate,timeAgo:n.a}},s=r(2),a=Object(s.a)(o,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return t.reply?r("div",{staticClass:"mt-reply__wrapper"},[r("div",{staticStyle:{"margin-right":"10px"}},[r("svg",{staticStyle:{transform:"rotate(180deg)"},attrs:{width:"24px",height:"24px",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"}},[r("path",{attrs:{d:"M10.53 5.03a.75.75 0 10-1.06-1.06l-6.25 6.25a.75.75 0 000 1.06l6.25 6.25a.75.75 0 101.06-1.06L5.56 11.5H17a3.248 3.248 0 013.25 3.248v4.502a.75.75 0 001.5 0v-4.502A4.748 4.748 0 0017 10H5.56l4.97-4.97z"}})])]),r("div",{staticClass:"mt-reply"},[r("span",{staticClass:"mt-reply__body"},[t._v(t._s(t.i19storeResponse)+" · "),r("span",{staticClass:"mt-reply__date",attrs:{title:"Respondido em "+t.formatDate(t.reply.created_at)}},[t._v(t._s(t.timeAgo(t.reply.created_at)))])]),r("span",[t._v(t._s(t.reply.body))])])]):t._e()}),[],!1,null,null,null);e.a=a.exports},,function(t,e,r){var i=r(39);i.__esModule&&(i=i.default),"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);(0,r(5).default)("2d2842e6",i,!0,{})},function(t,e,r){var i=r(41);i.__esModule&&(i=i.default),"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);(0,r(5).default)("1743d057",i,!0,{})},function(t,e,r){var i=r(43);i.__esModule&&(i=i.default),"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);(0,r(5).default)("2134e6ae",i,!0,{})},function(t,e,r){var i=r(45);i.__esModule&&(i=i.default),"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);(0,r(5).default)("c257d91a",i,!0,{})},function(t,e,r){var i=r(47);i.__esModule&&(i=i.default),"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);(0,r(5).default)("3d19f862",i,!0,{})},function(t,e,r){var i=r(49);i.__esModule&&(i=i.default),"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);(0,r(5).default)("0359b7b7",i,!0,{})},function(t,e,r){var i=r(51);i.__esModule&&(i=i.default),"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);(0,r(5).default)("76312b51",i,!0,{})},function(t,e,r){var i=r(53);i.__esModule&&(i=i.default),"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);(0,r(5).default)("2efc1134",i,!0,{})},function(t,e,r){var i=r(55);i.__esModule&&(i=i.default),"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);(0,r(5).default)("25380f9a",i,!0,{})},function(t,e,r){var i=r(57);i.__esModule&&(i=i.default),"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);(0,r(5).default)("10f54964",i,!0,{})},function(t,e){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e,r){var i=r(63);i.__esModule&&(i=i.default),"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);(0,r(5).default)("0358c92c",i,!0,{})},function(t,e,r){"use strict";const i=[{key:"most_recent",name:"Recentes"},{key:"most_voted",name:"Mais úteis"},{key:"most_positive",name:"Positivas"},{key:"most_negative",name:"Negativas"}];var n={name:"Sort",data:()=>({orderOptions:i})},o=(r(52),r(2)),s=Object(o.a)(n,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"mt-rating__order_by"},[r("svg",{attrs:{width:"24px",height:"24px",viewBox:"0 0 200 200",xmlns:"http://www.w3.org/2000/svg"}},[r("title"),r("path",{attrs:{d:"M110.22,117.75h-80a10,10,0,0,0,0,20h80a10,10,0,0,0,0-20Z"}}),r("path",{attrs:{d:"M177.22,125.75a9.67,9.67,0,0,0-14,0l-8,7.5V42.75a10,10,0,0,0-20,0v113.5a8.29,8.29,0,0,0,3,8,9.67,9.67,0,0,0,14,0l24.5-24.5a10.13,10.13,0,0,0,.5-14Z"}}),r("path",{attrs:{d:"M110.22,37.75h-80a10,10,0,0,0,0,20h80a10,10,0,0,0,0-20Z"}}),r("path",{attrs:{d:"M30.22,97.75h70a10,10,0,0,0,0-20h-70a10,10,0,0,0,0,20Z"}})]),r("select",{staticClass:"mt-select",on:{change:function(e){return t.$emit("onSort",{order:e.target.value})}}},[r("option",{attrs:{selected:"",disabled:""}},[t._v("Ordenar")]),t._l(t.orderOptions,(function(e){return r("option",{key:e.key,domProps:{value:e.key}},[t._v(" "+t._s(e.name)+" ")])}))],2)])}),[],!1,null,null,null);e.a=s.exports},function(t,e,r){"use strict";r.r(e);var i=r(16),n=r(9),o={name:"ListView",components:{CardReview:i.a,Quickview:n.a},props:{starColor:{type:String,default:"#212529"},reviews:{type:Object,default:{list:[],orderRating:null,total:0}}},methods:{openQuickview:function({review:t,slide:e}){this.$emit("openQuickview",{review:t,slide:e})}}},s=r(2),a=Object(s.a)(o,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"mt-reviews__list"},t._l(t.reviews.list,(function(e){return r("card-review",{key:e.id,attrs:{review:e,starColor:t.starColor},on:{openQuickview:t.openQuickview}})})),1)}),[],!1,null,null,null);e.default=a.exports},function(t,e,r){"use strict";r.r(e);var i=r(6),n=r(16),o=r(10),s={name:"GridView",components:{CardReview:n.a,Rating:i.a,VerifiedPurchase:o.a},props:{starColor:{type:String,default:"#212529"},reviews:{type:Object,default:{list:[],orderRating:null,total:0}}},methods:{openQuickview:function(t){this.$emit("openQuickview",{review:t})},getPictureURL:t=>!!(t&&t.pictures&&t.pictures.length&&t.pictures[0].normal)&&t.pictures[0].normal}},a=(r(50),r(2)),l=Object(a.a)(s,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"mt-gridview"},t._l(t.reviews.list,(function(e){return r("div",{key:e.id,staticClass:"mt-gridview__card",on:{click:function(r){return t.openQuickview(e)}}},[t.getPictureURL(e)?r("div",{staticClass:"mt-gridview__thumb"},[r("img",{attrs:{src:t.getPictureURL(e),alt:e.title},on:{click:function(){return t.openQuickview(e)}}})]):t._e(),r("div",{staticClass:"mt-gridview__detail"},[r("span",{staticClass:"mt-gridview__author"},[t._v(t._s(e.display_name.substr(0,16)))]),r("rating",{attrs:{rating:e.rating,color:t.starColor}}),e.verified_purchase?r("verified-purchase"):t._e(),r("span",{staticClass:"mt-gridview__body"},[t._v(t._s(e.body.substr(0,250)))])],1)])})),0)}),[],!1,null,null,null);e.default=l.exports},function(t,e,r){"use strict";r(23)},function(t,e,r){(e=r(4)(!1)).push([t.i,".martan-rating{display:flex;gap:4px}",""]),t.exports=e},function(t,e,r){"use strict";r(24)},function(t,e,r){(e=r(4)(!1)).push([t.i,".media--open{width:500px}.media__preview{display:block;height:100%;-o-object-fit:cover;object-fit:cover;width:100%}.media__list{display:flex;list-style:none;padding:.75rem 0 0}.media__list li{-webkit-tap-highlight-color:rgba(0,0,0,0);align-items:center;background-color:#383a3e;border:.125rem solid #383a3e;border-radius:5px;box-sizing:border-box;cursor:pointer;display:flex;height:2.375rem;justify-content:center;margin-right:.25rem;min-width:2.375rem;overflow:hidden;padding:0;position:relative;text-decoration:none;transition:all .3s ease;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:2.375rem}",""]),t.exports=e},function(t,e,r){"use strict";r(25)},function(t,e,r){(e=r(4)(!1)).push([t.i,".mt-rating__verified{color:#6b6d76;font-size:12px;font-weight:400}.mt-rating__verified svg{color:var(--success);width:15px}",""]),t.exports=e},function(t,e,r){"use strict";r(26)},function(t,e,r){(e=r(4)(!1)).push([t.i,".mt-reply__wrapper{align-items:center;display:flex}@media(max-width:580px){.body-wrapper{padding:0}}",""]),t.exports=e},function(t,e,r){"use strict";r(27)},function(t,e,r){(e=r(4)(!1)).push([t.i,".mt-player video{display:block;width:100%}.mt-player .playPauseBtn{background:none;border:0;color:#212529;cursor:pointer;line-height:1;max-width:50px;outline:0;padding:0;text-align:center}.mt-player__controls{padding:5px;transform:translateY(0);width:100%}.mt-player__controls>*{flex:1}.mt-player__progress{background:hsla(0,0%,100%,.5);cursor:pointer;display:flex;flex:10;flex-basis:100%;height:5px;max-width:430px;position:relative;width:100%}.mt-player__progress--filled{background:#a50;flex:0;flex-basis:0%;width:50%}",""]),t.exports=e},function(t,e,r){"use strict";r(28)},function(t,e,r){(e=r(4)(!1)).push([t.i,".mt-quickview{padding:0}@media(min-width:992px){.mt-quickview{display:flex}}@media(min-width:1200px){.mt-quickview{display:flex}}.mt-quickview .close{padding:8px 1rem;position:absolute;z-index:1}.mt-quickview__galery{align-items:center;display:flex;max-width:500px;min-height:500px;width:100%}.mt-quickview__galery img{height:100%;max-height:500px;max-width:500px;-o-object-fit:contain;object-fit:contain;width:100%}.mt-quickview__galery .glide__slides{align-items:center}.mt-quickview__info{align-items:center;display:flex;gap:10px;padding-bottom:10px}.mt-quickview__review{padding:1rem}@media(min-width:992px){.mt-quickview__review{max-height:500px;overflow:auto}}@media(min-width:1200px){.mt-quickview__review{max-height:500px;overflow:auto}}.mt-quickview__controls{padding:5px}.mt-quickview__controls button{align-items:center;border:none;border-radius:50%;display:flex;height:30px;justify-content:center;transition:all .5s ease-in-out;width:30px}.mt-quickview__controls button:hover{background-color:var(--button--hover-color)}.mt-quickview .mt-review{padding:10px 20px}.mt-quickview .video-wrapper{align-items:center;display:flex}",""]),t.exports=e},function(t,e,r){"use strict";r(29)},function(t,e,r){(e=r(4)(!1)).push([t.i,".mt-gridview{-moz-column-count:2;column-count:2;-moz-column-gap:10px;column-gap:10px;margin-left:auto;margin-right:auto;transition:all .7s ease}@media only screen and (min-width:600px){.mt-gridview{-moz-column-count:3;column-count:3}}@media only screen and (min-width:768px){.mt-gridview{-moz-column-count:4;column-count:4}}@media only screen and (min-width:992px){.mt-gridview{-moz-column-count:5;column-count:5}}.mt-gridview__card{-moz-column-break-inside:avoid;border:1px solid #d5d9d9;border-radius:6px;break-inside:avoid;cursor:pointer;display:grid;grid-template-rows:1fr auto;margin:0 0 10px;width:100%}.mt-gridview__detail{display:flex;flex-direction:column;gap:8px;padding:10px}.mt-gridview__thumb img{border-top-left-radius:5px;border-top-right-radius:5px;max-width:250px;-o-object-fit:contain;object-fit:contain;width:100%}",""]),t.exports=e},function(t,e,r){"use strict";r(30)},function(t,e,r){(e=r(4)(!1)).push([t.i,".mt-rating__order_by{align-items:center;display:flex;height:40px;justify-content:flex-end;max-width:130px;width:100%}.mt-rating__order_by svg{fill:#6b6d76}.mt-select{background:#fff;border:none;color:#6b6d76;font-size:14px;font-weight:400;height:30px;letter-spacing:normal;line-height:1.14}",""]),t.exports=e},function(t,e,r){"use strict";r(31)},function(t,e,r){(e=r(4)(!1)).push([t.i,".mt-rating__average__sort{align-items:center;display:flex;justify-content:space-between;padding:15px 0}.mt-rating__count{color:#6b6d76}",""]),t.exports=e},function(t,e,r){"use strict";r(32)},function(t,e,r){(e=r(4)(!1)).push([t.i,".mt-review{padding:25px 0 22px}.mt-review:first-child{padding-top:0}.mt-review__title{color:#6b6d76;font-size:16px}.mt-review__date{color:#475569;color:#777;font-size:10px}.mt-review__body{font-size:16px;line-height:1.6;margin-top:10px;opacity:.9;text-align:justify}.mt-rating__group{display:flex;flex-direction:column;gap:5px;width:100%}.mt-review__author{align-items:center;color:#333;display:flex;font-size:14px;font-weight:bolder;gap:5px;justify-content:center}.mt-review__reactions svg{cursor:pointer;width:18px}.mt-review__reactions{align-items:center;border:1px solid #777;border-radius:50px;color:#777;display:flex;font-size:11px;height:30px;justify-content:space-evenly;margin-top:.75rem;max-width:100px}.mt-reviews__list{padding:5px 0}.mt-reviews__votesdown,.mt-reviews__votesup{align-items:center;display:flex}.mt-reviews__votesup{margin-right:10px}.mt-reply{background:#f1f1f1;border-left:3px solid #e6e6e6;border-radius:12px;border-right:1px solid hsla(0,0%,9%,.102);display:flex;flex-direction:column;font-size:15px;gap:10px;line-height:1.6;margin:10px 0 0;padding:20px}@media(max-width:580px){.mt-reply{margin:10px 0}}.mt-reply__date{color:#475569;color:#777;font-weight:400}.mt-reply__body,.mt-reply__date{font-size:14px;text-decoration:none}.mt-reply__body{font-weight:600}.mt-is__recomended{color:#6b6d76;font-size:12px;font-weight:600}.mt-questions__actions{display:flex;justify-content:center;padding:20px}.mt-rating__option{background-color:#fff;border:1px solid #777;border-radius:20px;color:#777;cursor:pointer;height:35px;transition:all .5s ease;width:140px}.mt-rating__option:hover{background-color:#777;color:#fff}.mt-reviews.mt-theme--vertical .mt-header--vertical{width:30%}.mt-reviews.mt-theme--vertical .mt-reviews__list{width:70%}@media(max-width:580px){.mt-reviews.mt-theme--vertical .mt-reviews__list{width:100%}.mt-reviews.mt-theme--vertical .mt-header--vertical{border-right:none;width:100%}.mt-reviews.mt-theme--vertical .mt-reviews__rating{flex-direction:column}.mt-reviews.mt-theme--vertical .mt-header--vertical .mt-rating__options{max-width:inherit}}.mt-rating__user{align-items:center;background:#858585;border-radius:50%;color:#fff;display:inline-flex;font-size:25px;font-weight:500;height:-moz-fit-content;height:fit-content;justify-content:center;margin-right:8px;max-width:40px;position:relative;width:100%}.mt-reviews.mt-theme--vertical .mt-rating__average__sort{border-bottom:1px solid #eee;padding-bottom:1rem}",""]),t.exports=e},function(t,e,r){"use strict";(function(t){
1
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("vue"),require("jquery/dist/jquery.slim"),require("@ecomplus/utils"),require("popper.js")):"function"==typeof define&&define.amd?define([,,,],e):"object"==typeof exports?exports.widgetMartan=e(require("vue"),require("jquery/dist/jquery.slim"),require("@ecomplus/utils"),require("popper.js")):t.widgetMartan=e(t.Vue,t.$,t.ecomUtils,t.Popper)}(window,(function(t,e,r,n){return function(t){function e(e){for(var r,i,o=e[0],s=e[1],a=0,u=[];a<o.length;a++)i=o[a],Object.prototype.hasOwnProperty.call(n,i)&&n[i]&&u.push(n[i][0]),n[i]=0;for(r in s)Object.prototype.hasOwnProperty.call(s,r)&&(t[r]=s[r]);for(c&&c(e);u.length;)u.shift()()}var r={},n={1:0};function i(e){if(r[e])return r[e].exports;var n=r[e]={i:e,l:!1,exports:{}};return t[e].call(n.exports,n,n.exports,i),n.l=!0,n.exports}i.e=function(t){var e=[],r=n[t];if(0!==r)if(r)e.push(r[2]);else{var o=new Promise((function(e,i){r=n[t]=[e,i]}));e.push(r[2]=o);var s,a=document.createElement("script");a.charset="utf-8",a.timeout=120,i.nc&&a.setAttribute("nonce",i.nc),a.src=function(t){return i.p+"widget-martan."+({}[t]||t)+".min.js"}(t);var c=new Error;s=function(e){a.onerror=a.onload=null,clearTimeout(u);var r=n[t];if(0!==r){if(r){var i=e&&("load"===e.type?"missing":e.type),o=e&&e.target&&e.target.src;c.message="Loading chunk "+t+" failed.\n("+i+": "+o+")",c.name="ChunkLoadError",c.type=i,c.request=o,r[1](c)}n[t]=void 0}};var u=setTimeout((function(){s({type:"timeout",target:a})}),12e4);a.onerror=a.onload=s,document.head.appendChild(a)}return Promise.all(e)},i.m=t,i.c=r,i.d=function(t,e,r){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(i.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)i.d(r,n,function(e){return t[e]}.bind(null,n));return r},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="/assets/vendor/",i.oe=function(t){throw console.error(t),t};var o=window.webpackJsonpwidgetMartan=window.webpackJsonpwidgetMartan||[],s=o.push.bind(o);o.push=e,o=o.slice();for(var a=0;a<o.length;a++)e(o[a]);var c=s;return i(i.s=25)}([function(t,e,r){"use strict";(function(t){var n=r(6);const{toString:i}=Object.prototype,{getPrototypeOf:o}=Object,s=(a=Object.create(null),t=>{const e=i.call(t);return a[e]||(a[e]=e.slice(8,-1).toLowerCase())});var a;const c=t=>(t=t.toLowerCase(),e=>s(e)===t),u=t=>e=>typeof e===t,{isArray:l}=Array,f=u("undefined");const h=c("ArrayBuffer");const d=u("string"),p=u("function"),g=u("number"),m=t=>null!==t&&"object"==typeof t,w=t=>{if("object"!==s(t))return!1;const e=o(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e)||Symbol.toStringTag in t||Symbol.iterator in t)},v=c("Date"),y=c("File"),b=c("Blob"),_=c("FileList"),E=c("URLSearchParams");function R(t,e,{allOwnKeys:r=!1}={}){if(null==t)return;let n,i;if("object"!=typeof t&&(t=[t]),l(t))for(n=0,i=t.length;n<i;n++)e.call(null,t[n],n,t);else{const i=r?Object.getOwnPropertyNames(t):Object.keys(t),o=i.length;let s;for(n=0;n<o;n++)s=i[n],e.call(null,t[s],s,t)}}function x(t,e){e=e.toLowerCase();const r=Object.keys(t);let n,i=r.length;for(;i-- >0;)if(n=r[i],e===n.toLowerCase())return n;return null}const S="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:t,A=t=>!f(t)&&t!==S;const O=(C="undefined"!=typeof Uint8Array&&o(Uint8Array),t=>C&&t instanceof C);var C;const T=c("HTMLFormElement"),P=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),k=c("RegExp"),q=(t,e)=>{const r=Object.getOwnPropertyDescriptors(t),n={};R(r,(r,i)=>{let o;!1!==(o=e(r,i,t))&&(n[i]=o||r)}),Object.defineProperties(t,n)},j="abcdefghijklmnopqrstuvwxyz",B={DIGIT:"0123456789",ALPHA:j,ALPHA_DIGIT:j+j.toUpperCase()+"0123456789"};const U=c("AsyncFunction");e.a={isArray:l,isArrayBuffer:h,isBuffer:function(t){return null!==t&&!f(t)&&null!==t.constructor&&!f(t.constructor)&&p(t.constructor.isBuffer)&&t.constructor.isBuffer(t)},isFormData:t=>{let e;return t&&("function"==typeof FormData&&t instanceof FormData||p(t.append)&&("formdata"===(e=s(t))||"object"===e&&p(t.toString)&&"[object FormData]"===t.toString()))},isArrayBufferView:function(t){let e;return e="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&h(t.buffer),e},isString:d,isNumber:g,isBoolean:t=>!0===t||!1===t,isObject:m,isPlainObject:w,isUndefined:f,isDate:v,isFile:y,isBlob:b,isRegExp:k,isFunction:p,isStream:t=>m(t)&&p(t.pipe),isURLSearchParams:E,isTypedArray:O,isFileList:_,forEach:R,merge:function t(){const{caseless:e}=A(this)&&this||{},r={},n=(n,i)=>{const o=e&&x(r,i)||i;w(r[o])&&w(n)?r[o]=t(r[o],n):w(n)?r[o]=t({},n):l(n)?r[o]=n.slice():r[o]=n};for(let t=0,e=arguments.length;t<e;t++)arguments[t]&&R(arguments[t],n);return r},extend:(t,e,r,{allOwnKeys:i}={})=>(R(e,(e,i)=>{r&&p(e)?t[i]=Object(n.a)(e,r):t[i]=e},{allOwnKeys:i}),t),trim:t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:t=>(65279===t.charCodeAt(0)&&(t=t.slice(1)),t),inherits:(t,e,r,n)=>{t.prototype=Object.create(e.prototype,n),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),r&&Object.assign(t.prototype,r)},toFlatObject:(t,e,r,n)=>{let i,s,a;const c={};if(e=e||{},null==t)return e;do{for(i=Object.getOwnPropertyNames(t),s=i.length;s-- >0;)a=i[s],n&&!n(a,t,e)||c[a]||(e[a]=t[a],c[a]=!0);t=!1!==r&&o(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},kindOf:s,kindOfTest:c,endsWith:(t,e,r)=>{t=String(t),(void 0===r||r>t.length)&&(r=t.length),r-=e.length;const n=t.indexOf(e,r);return-1!==n&&n===r},toArray:t=>{if(!t)return null;if(l(t))return t;let e=t.length;if(!g(e))return null;const r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},forEachEntry:(t,e)=>{const r=(t&&t[Symbol.iterator]).call(t);let n;for(;(n=r.next())&&!n.done;){const r=n.value;e.call(t,r[0],r[1])}},matchAll:(t,e)=>{let r;const n=[];for(;null!==(r=t.exec(e));)n.push(r);return n},isHTMLForm:T,hasOwnProperty:P,hasOwnProp:P,reduceDescriptors:q,freezeMethods:t=>{q(t,(e,r)=>{if(p(t)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=t[r];p(n)&&(e.enumerable=!1,"writable"in e?e.writable=!1:e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}))})},toObjectSet:(t,e)=>{const r={},n=t=>{t.forEach(t=>{r[t]=!0})};return l(t)?n(t):n(String(t).split(e)),r},toCamelCase:t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(t,e,r){return e.toUpperCase()+r})),noop:()=>{},toFiniteNumber:(t,e)=>(t=+t,Number.isFinite(t)?t:e),findKey:x,global:S,isContextDefined:A,ALPHABET:B,generateString:(t=16,e=B.ALPHA_DIGIT)=>{let r="";const{length:n}=e;for(;t--;)r+=e[Math.random()*n|0];return r},isSpecCompliantForm:function(t){return!!(t&&p(t.append)&&"FormData"===t[Symbol.toStringTag]&&t[Symbol.iterator])},toJSONObject:t=>{const e=new Array(10),r=(t,n)=>{if(m(t)){if(e.indexOf(t)>=0)return;if(!("toJSON"in t)){e[n]=t;const i=l(t)?[]:{};return R(t,(t,e)=>{const o=r(t,n+1);!f(o)&&(i[e]=o)}),e[n]=void 0,i}}return t};return r(t,0)},isAsyncFn:U,isThenable:t=>t&&(m(t)||p(t))&&p(t.then)&&p(t.catch)}}).call(this,r(12))},function(t,e,r){"use strict";var n=r(0);function i(t,e,r,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=t,this.name="AxiosError",e&&(this.code=e),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i)}n.a.inherits(i,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:n.a.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const o=i.prototype,s={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{s[t]={value:t}}),Object.defineProperties(i,s),Object.defineProperty(o,"isAxiosError",{value:!0}),i.from=(t,e,r,s,a,c)=>{const u=Object.create(o);return n.a.toFlatObject(t,u,(function(t){return t!==Error.prototype}),t=>"isAxiosError"!==t),i.call(u,t.message,e,r,s,a),u.cause=t,u.name=t.name,c&&Object.assign(u,c),u},e.a=i},function(t,e,r){"use strict";(function(t){var n=r(0),i=r(1),o=r(7);function s(t){return n.a.isPlainObject(t)||n.a.isArray(t)}function a(t){return n.a.endsWith(t,"[]")?t.slice(0,-2):t}function c(t,e,r){return t?t.concat(e).map((function(t,e){return t=a(t),!r&&e?"["+t+"]":t})).join(r?".":""):e}const u=n.a.toFlatObject(n.a,{},null,(function(t){return/^is[A-Z]/.test(t)}));e.a=function(e,r,l){if(!n.a.isObject(e))throw new TypeError("target must be an object");r=r||new(o.a||FormData);const f=(l=n.a.toFlatObject(l,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(t,e){return!n.a.isUndefined(e[t])}))).metaTokens,h=l.visitor||w,d=l.dots,p=l.indexes,g=(l.Blob||"undefined"!=typeof Blob&&Blob)&&n.a.isSpecCompliantForm(r);if(!n.a.isFunction(h))throw new TypeError("visitor must be a function");function m(e){if(null===e)return"";if(n.a.isDate(e))return e.toISOString();if(!g&&n.a.isBlob(e))throw new i.a("Blob is not supported. Use a Buffer instead.");return n.a.isArrayBuffer(e)||n.a.isTypedArray(e)?g&&"function"==typeof Blob?new Blob([e]):t.from(e):e}function w(t,e,i){let o=t;if(t&&!i&&"object"==typeof t)if(n.a.endsWith(e,"{}"))e=f?e:e.slice(0,-2),t=JSON.stringify(t);else if(n.a.isArray(t)&&function(t){return n.a.isArray(t)&&!t.some(s)}(t)||(n.a.isFileList(t)||n.a.endsWith(e,"[]"))&&(o=n.a.toArray(t)))return e=a(e),o.forEach((function(t,i){!n.a.isUndefined(t)&&null!==t&&r.append(!0===p?c([e],i,d):null===p?e:e+"[]",m(t))})),!1;return!!s(t)||(r.append(c(i,e,d),m(t)),!1)}const v=[],y=Object.assign(u,{defaultVisitor:w,convertValue:m,isVisitable:s});if(!n.a.isObject(e))throw new TypeError("data must be an object");return function t(e,i){if(!n.a.isUndefined(e)){if(-1!==v.indexOf(e))throw Error("Circular reference detected in "+i.join("."));v.push(e),n.a.forEach(e,(function(e,o){!0===(!(n.a.isUndefined(e)||null===e)&&h.call(r,e,n.a.isString(o)?o.trim():o,i,y))&&t(e,i?i.concat(o):[o])})),v.pop()}}(e),r}}).call(this,r(17).Buffer)},function(t,e,r){"use strict";function n(t,e,r,n,i,o,s,a){var c,u="function"==typeof t?t.options:t;if(e&&(u.render=e,u.staticRenderFns=r,u._compiled=!0),n&&(u.functional=!0),o&&(u._scopeId="data-v-"+o),s?(c=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},u._ssrRegister=c):i&&(c=a?function(){i.call(this,(u.functional?this.parent:this).$root.$options.shadowRoot)}:i),c)if(u.functional){u._injectStyles=c;var l=u.render;u.render=function(t,e){return c.call(e),l(t,e)}}else{var f=u.beforeCreate;u.beforeCreate=f?[].concat(f,c):[c]}return{exports:t,options:u}}r.d(e,"a",(function(){return n}))},function(t,e,r){"use strict";r.d(e,"a",(function(){return n}));const n={config:{type:Object,default:()=>({store_id:null,web_id:null,widget_rating:{is_enabled:!1,font_size:15,star_color:null,display:null,search_page:!0,theme:null},widget_review:{is_enabled:!1,title:null,star_color:null,header_layout:null,reviews_layout:null},widget_questions:{is_enabled:!1,title:null,enable_new_questions:!1}})}}},function(e,r){e.exports=t},function(t,e,r){"use strict";function n(t,e){return function(){return t.apply(e,arguments)}}r.d(e,"a",(function(){return n}))},function(t,e,r){"use strict";e.a=null},function(t,e,r){"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var r=function(t,e){var r=t[1]||"",n=t[3];if(!n)return r;if(e&&"function"==typeof btoa){var i=(s=n,a=btoa(unescape(encodeURIComponent(JSON.stringify(s)))),c="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(a),"/*# ".concat(c," */")),o=n.sources.map((function(t){return"/*# sourceURL=".concat(n.sourceRoot||"").concat(t," */")}));return[r].concat(o).concat([i]).join("\n")}var s,a,c;return[r].join("\n")}(e,t);return e[2]?"@media ".concat(e[2]," {").concat(r,"}"):r})).join("")},e.i=function(t,r,n){"string"==typeof t&&(t=[[null,t,""]]);var i={};if(n)for(var o=0;o<this.length;o++){var s=this[o][0];null!=s&&(i[s]=!0)}for(var a=0;a<t.length;a++){var c=[].concat(t[a]);n&&i[c[0]]||(r&&(c[2]?c[2]="".concat(r," and ").concat(c[2]):c[2]=r),e.push(c))}},e}},function(t,e,r){"use strict";function n(t,e){for(var r=[],n={},i=0;i<e.length;i++){var o=e[i],s=o[0],a={id:t+":"+i,css:o[1],media:o[2],sourceMap:o[3]};n[s]?n[s].parts.push(a):r.push(n[s]={id:s,parts:[a]})}return r}r.r(e),r.d(e,"default",(function(){return d}));var i="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!i)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var o={},s=i&&(document.head||document.getElementsByTagName("head")[0]),a=null,c=0,u=!1,l=function(){},f=null,h="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());function d(t,e,r,i){u=r,f=i||{};var s=n(t,e);return p(s),function(e){for(var r=[],i=0;i<s.length;i++){var a=s[i];(c=o[a.id]).refs--,r.push(c)}e?p(s=n(t,e)):s=[];for(i=0;i<r.length;i++){var c;if(0===(c=r[i]).refs){for(var u=0;u<c.parts.length;u++)c.parts[u]();delete o[c.id]}}}}function p(t){for(var e=0;e<t.length;e++){var r=t[e],n=o[r.id];if(n){n.refs++;for(var i=0;i<n.parts.length;i++)n.parts[i](r.parts[i]);for(;i<r.parts.length;i++)n.parts.push(m(r.parts[i]));n.parts.length>r.parts.length&&(n.parts.length=r.parts.length)}else{var s=[];for(i=0;i<r.parts.length;i++)s.push(m(r.parts[i]));o[r.id]={id:r.id,refs:1,parts:s}}}}function g(){var t=document.createElement("style");return t.type="text/css",s.appendChild(t),t}function m(t){var e,r,n=document.querySelector('style[data-vue-ssr-id~="'+t.id+'"]');if(n){if(u)return l;n.parentNode.removeChild(n)}if(h){var i=c++;n=a||(a=g()),e=y.bind(null,n,i,!1),r=y.bind(null,n,i,!0)}else n=g(),e=b.bind(null,n),r=function(){n.parentNode.removeChild(n)};return e(t),function(n){if(n){if(n.css===t.css&&n.media===t.media&&n.sourceMap===t.sourceMap)return;e(t=n)}else r()}}var w,v=(w=[],function(t,e){return w[t]=e,w.filter(Boolean).join("\n")});function y(t,e,r,n){var i=r?"":n.css;if(t.styleSheet)t.styleSheet.cssText=v(e,i);else{var o=document.createTextNode(i),s=t.childNodes;s[e]&&t.removeChild(s[e]),s.length?t.insertBefore(o,s[e]):t.appendChild(o)}}function b(t,e){var r=e.css,n=e.media,i=e.sourceMap;if(n&&t.setAttribute("media",n),f.ssrId&&t.setAttribute("data-vue-ssr-id",e.id),i&&(r+="\n/*# sourceURL="+i.sources[0]+" */",r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */"),t.styleSheet)t.styleSheet.cssText=r;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(r))}}},function(t,e,r){"use strict";function n(t,e=.2){3===(t=t.replace(/^#/,"")).length&&(t=t.split("").map(t=>t+t).join(""));let r=parseInt(t.substring(0,2),16),n=parseInt(t.substring(2,4),16),i=parseInt(t.substring(4,6),16);r=Math.min(255,Math.round(r+(255-r)*e)),n=Math.min(255,Math.round(n+(255-n)*e)),i=Math.min(255,Math.round(i+(255-i)*e));const o=t=>t.toString(16).padStart(2,"0");return`#${o(r)}${o(n)}${o(i)}`}r.d(e,"a",(function(){return n}))},function(t,e,r){var n=r(16);n.__esModule&&(n=n.default),"string"==typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);(0,r(9).default)("5ee28310",n,!0,{})},function(t,e){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e,r){var n=r(22);n.__esModule&&(n=n.default),"string"==typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);(0,r(9).default)("4042fd78",n,!0,{})},function(t,e,r){var n=r(24);n.__esModule&&(n=n.default),"string"==typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);(0,r(9).default)("271f866a",n,!0,{})},function(t,e,r){"use strict";r(11)},function(t,e,r){(e=r(8)(!1)).push([t.i,".martan-rating{align-items:center;display:flex;gap:4px}.martan-rating-text{color:#6c757d;font-size:12px;font-weight:600}.martan-rating--compact{align-items:center;display:flex;gap:6px}.martan-rating-compact{align-items:center;display:flex;gap:4px}.martan-rating-compact__star{flex-shrink:0}.martan-rating-compact__text{color:var(--gray-dark);font-size:12px;font-weight:600;white-space:nowrap}",""]),t.exports=e},function(t,e,r){"use strict";(function(t){
2
2
  /*!
3
3
  * The buffer module from node.js, for the browser.
4
4
  *
5
5
  * @author Feross Aboukhadijeh <http://feross.org>
6
6
  * @license MIT
7
7
  */
8
- var i=r(59),n=r(60),o=r(61);function s(){return l.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(t,e){if(s()<e)throw new RangeError("Invalid typed array length");return l.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=l.prototype:(null===t&&(t=new l(e)),t.length=e),t}function l(t,e,r){if(!(l.TYPED_ARRAY_SUPPORT||this instanceof l))return new l(t,e,r);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return d(this,t)}return c(this,t,e,r)}function c(t,e,r,i){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,r,i){if(e.byteLength,r<0||e.byteLength<r)throw new RangeError("'offset' is out of bounds");if(e.byteLength<r+(i||0))throw new RangeError("'length' is out of bounds");e=void 0===r&&void 0===i?new Uint8Array(e):void 0===i?new Uint8Array(e,r):new Uint8Array(e,r,i);l.TYPED_ARRAY_SUPPORT?(t=e).__proto__=l.prototype:t=f(t,e);return t}(t,e,r,i):"string"==typeof e?function(t,e,r){"string"==typeof r&&""!==r||(r="utf8");if(!l.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var i=0|p(e,r),n=(t=a(t,i)).write(e,r);n!==i&&(t=t.slice(0,n));return t}(t,e,r):function(t,e){if(l.isBuffer(e)){var r=0|h(e.length);return 0===(t=a(t,r)).length||e.copy(t,0,0,r),t}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(i=e.length)!=i?a(t,0):f(t,e);if("Buffer"===e.type&&o(e.data))return f(t,e.data)}var i;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function u(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function d(t,e){if(u(e),t=a(t,e<0?0:0|h(e)),!l.TYPED_ARRAY_SUPPORT)for(var r=0;r<e;++r)t[r]=0;return t}function f(t,e){var r=e.length<0?0:0|h(e.length);t=a(t,r);for(var i=0;i<r;i+=1)t[i]=255&e[i];return t}function h(t){if(t>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|t}function p(t,e){if(l.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var i=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return D(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return F(t).length;default:if(i)return D(t).length;e=(""+e).toLowerCase(),i=!0}}function m(t,e,r){var i=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return k(this,e,r);case"utf8":case"utf-8":return A(this,e,r);case"ascii":return S(this,e,r);case"latin1":case"binary":return O(this,e,r);case"base64":return C(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,e,r);default:if(i)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),i=!0}}function g(t,e,r){var i=t[e];t[e]=t[r],t[r]=i}function v(t,e,r,i,n){if(0===t.length)return-1;if("string"==typeof r?(i=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=n?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(n)return-1;r=t.length-1}else if(r<0){if(!n)return-1;r=0}if("string"==typeof e&&(e=l.from(e,i)),l.isBuffer(e))return 0===e.length?-1:w(t,e,r,i,n);if("number"==typeof e)return e&=255,l.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?n?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):w(t,[e],r,i,n);throw new TypeError("val must be string, number or Buffer")}function w(t,e,r,i,n){var o,s=1,a=t.length,l=e.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(t.length<2||e.length<2)return-1;s=2,a/=2,l/=2,r/=2}function c(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(n){var u=-1;for(o=r;o<a;o++)if(c(t,o)===c(e,-1===u?0:o-u)){if(-1===u&&(u=o),o-u+1===l)return u*s}else-1!==u&&(o-=o-u),u=-1}else for(r+l>a&&(r=a-l),o=r;o>=0;o--){for(var d=!0,f=0;f<l;f++)if(c(t,o+f)!==c(e,f)){d=!1;break}if(d)return o}return-1}function y(t,e,r,i){r=Number(r)||0;var n=t.length-r;i?(i=Number(i))>n&&(i=n):i=n;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");i>o/2&&(i=o/2);for(var s=0;s<i;++s){var a=parseInt(e.substr(2*s,2),16);if(isNaN(a))return s;t[r+s]=a}return s}function b(t,e,r,i){return z(D(e,t.length-r),t,r,i)}function _(t,e,r,i){return z(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,i)}function x(t,e,r,i){return _(t,e,r,i)}function R(t,e,r,i){return z(F(e),t,r,i)}function E(t,e,r,i){return z(function(t,e){for(var r,i,n,o=[],s=0;s<t.length&&!((e-=2)<0);++s)r=t.charCodeAt(s),i=r>>8,n=r%256,o.push(n),o.push(i);return o}(e,t.length-r),t,r,i)}function C(t,e,r){return 0===e&&r===t.length?i.fromByteArray(t):i.fromByteArray(t.slice(e,r))}function A(t,e,r){r=Math.min(t.length,r);for(var i=[],n=e;n<r;){var o,s,a,l,c=t[n],u=null,d=c>239?4:c>223?3:c>191?2:1;if(n+d<=r)switch(d){case 1:c<128&&(u=c);break;case 2:128==(192&(o=t[n+1]))&&(l=(31&c)<<6|63&o)>127&&(u=l);break;case 3:o=t[n+1],s=t[n+2],128==(192&o)&&128==(192&s)&&(l=(15&c)<<12|(63&o)<<6|63&s)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:o=t[n+1],s=t[n+2],a=t[n+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(l=(15&c)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&l<1114112&&(u=l)}null===u?(u=65533,d=1):u>65535&&(u-=65536,i.push(u>>>10&1023|55296),u=56320|1023&u),i.push(u),n+=d}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);var r="",i=0;for(;i<e;)r+=String.fromCharCode.apply(String,t.slice(i,i+=4096));return r}(i)}e.Buffer=l,e.SlowBuffer=function(t){+t!=t&&(t=0);return l.alloc(+t)},e.INSPECT_MAX_BYTES=50,l.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),e.kMaxLength=s(),l.poolSize=8192,l._augment=function(t){return t.__proto__=l.prototype,t},l.from=function(t,e,r){return c(null,t,e,r)},l.TYPED_ARRAY_SUPPORT&&(l.prototype.__proto__=Uint8Array.prototype,l.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&l[Symbol.species]===l&&Object.defineProperty(l,Symbol.species,{value:null,configurable:!0})),l.alloc=function(t,e,r){return function(t,e,r,i){return u(e),e<=0?a(t,e):void 0!==r?"string"==typeof i?a(t,e).fill(r,i):a(t,e).fill(r):a(t,e)}(null,t,e,r)},l.allocUnsafe=function(t){return d(null,t)},l.allocUnsafeSlow=function(t){return d(null,t)},l.isBuffer=function(t){return!(null==t||!t._isBuffer)},l.compare=function(t,e){if(!l.isBuffer(t)||!l.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,i=e.length,n=0,o=Math.min(r,i);n<o;++n)if(t[n]!==e[n]){r=t[n],i=e[n];break}return r<i?-1:i<r?1:0},l.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},l.concat=function(t,e){if(!o(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return l.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var i=l.allocUnsafe(e),n=0;for(r=0;r<t.length;++r){var s=t[r];if(!l.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(i,n),n+=s.length}return i},l.byteLength=p,l.prototype._isBuffer=!0,l.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)g(this,e,e+1);return this},l.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)g(this,e,e+3),g(this,e+1,e+2);return this},l.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)g(this,e,e+7),g(this,e+1,e+6),g(this,e+2,e+5),g(this,e+3,e+4);return this},l.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?A(this,0,t):m.apply(this,arguments)},l.prototype.equals=function(t){if(!l.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===l.compare(this,t)},l.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),"<Buffer "+t+">"},l.prototype.compare=function(t,e,r,i,n){if(!l.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===i&&(i=0),void 0===n&&(n=this.length),e<0||r>t.length||i<0||n>this.length)throw new RangeError("out of range index");if(i>=n&&e>=r)return 0;if(i>=n)return-1;if(e>=r)return 1;if(this===t)return 0;for(var o=(n>>>=0)-(i>>>=0),s=(r>>>=0)-(e>>>=0),a=Math.min(o,s),c=this.slice(i,n),u=t.slice(e,r),d=0;d<a;++d)if(c[d]!==u[d]){o=c[d],s=u[d];break}return o<s?-1:s<o?1:0},l.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},l.prototype.indexOf=function(t,e,r){return v(this,t,e,r,!0)},l.prototype.lastIndexOf=function(t,e,r){return v(this,t,e,r,!1)},l.prototype.write=function(t,e,r,i){if(void 0===e)i="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)i=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(r)?(r|=0,void 0===i&&(i="utf8")):(i=r,r=void 0)}var n=this.length-e;if((void 0===r||r>n)&&(r=n),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var o=!1;;)switch(i){case"hex":return y(this,t,e,r);case"utf8":case"utf-8":return b(this,t,e,r);case"ascii":return _(this,t,e,r);case"latin1":case"binary":return x(this,t,e,r);case"base64":return R(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),o=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function S(t,e,r){var i="";r=Math.min(t.length,r);for(var n=e;n<r;++n)i+=String.fromCharCode(127&t[n]);return i}function O(t,e,r){var i="";r=Math.min(t.length,r);for(var n=e;n<r;++n)i+=String.fromCharCode(t[n]);return i}function k(t,e,r){var i=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>i)&&(r=i);for(var n="",o=e;o<r;++o)n+=q(t[o]);return n}function P(t,e,r){for(var i=t.slice(e,r),n="",o=0;o<i.length;o+=2)n+=String.fromCharCode(i[o]+256*i[o+1]);return n}function T(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function j(t,e,r,i,n,o){if(!l.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>n||e<o)throw new RangeError('"value" argument is out of bounds');if(r+i>t.length)throw new RangeError("Index out of range")}function B(t,e,r,i){e<0&&(e=65535+e+1);for(var n=0,o=Math.min(t.length-r,2);n<o;++n)t[r+n]=(e&255<<8*(i?n:1-n))>>>8*(i?n:1-n)}function U(t,e,r,i){e<0&&(e=4294967295+e+1);for(var n=0,o=Math.min(t.length-r,4);n<o;++n)t[r+n]=e>>>8*(i?n:3-n)&255}function M(t,e,r,i,n,o){if(r+i>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function L(t,e,r,i,o){return o||M(t,0,r,4),n.write(t,e,r,i,23,4),r+4}function N(t,e,r,i,o){return o||M(t,0,r,8),n.write(t,e,r,i,52,8),r+8}l.prototype.slice=function(t,e){var r,i=this.length;if((t=~~t)<0?(t+=i)<0&&(t=0):t>i&&(t=i),(e=void 0===e?i:~~e)<0?(e+=i)<0&&(e=0):e>i&&(e=i),e<t&&(e=t),l.TYPED_ARRAY_SUPPORT)(r=this.subarray(t,e)).__proto__=l.prototype;else{var n=e-t;r=new l(n,void 0);for(var o=0;o<n;++o)r[o]=this[o+t]}return r},l.prototype.readUIntLE=function(t,e,r){t|=0,e|=0,r||T(t,e,this.length);for(var i=this[t],n=1,o=0;++o<e&&(n*=256);)i+=this[t+o]*n;return i},l.prototype.readUIntBE=function(t,e,r){t|=0,e|=0,r||T(t,e,this.length);for(var i=this[t+--e],n=1;e>0&&(n*=256);)i+=this[t+--e]*n;return i},l.prototype.readUInt8=function(t,e){return e||T(t,1,this.length),this[t]},l.prototype.readUInt16LE=function(t,e){return e||T(t,2,this.length),this[t]|this[t+1]<<8},l.prototype.readUInt16BE=function(t,e){return e||T(t,2,this.length),this[t]<<8|this[t+1]},l.prototype.readUInt32LE=function(t,e){return e||T(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},l.prototype.readUInt32BE=function(t,e){return e||T(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},l.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||T(t,e,this.length);for(var i=this[t],n=1,o=0;++o<e&&(n*=256);)i+=this[t+o]*n;return i>=(n*=128)&&(i-=Math.pow(2,8*e)),i},l.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||T(t,e,this.length);for(var i=e,n=1,o=this[t+--i];i>0&&(n*=256);)o+=this[t+--i]*n;return o>=(n*=128)&&(o-=Math.pow(2,8*e)),o},l.prototype.readInt8=function(t,e){return e||T(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},l.prototype.readInt16LE=function(t,e){e||T(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt16BE=function(t,e){e||T(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt32LE=function(t,e){return e||T(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},l.prototype.readInt32BE=function(t,e){return e||T(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},l.prototype.readFloatLE=function(t,e){return e||T(t,4,this.length),n.read(this,t,!0,23,4)},l.prototype.readFloatBE=function(t,e){return e||T(t,4,this.length),n.read(this,t,!1,23,4)},l.prototype.readDoubleLE=function(t,e){return e||T(t,8,this.length),n.read(this,t,!0,52,8)},l.prototype.readDoubleBE=function(t,e){return e||T(t,8,this.length),n.read(this,t,!1,52,8)},l.prototype.writeUIntLE=function(t,e,r,i){(t=+t,e|=0,r|=0,i)||j(this,t,e,r,Math.pow(2,8*r)-1,0);var n=1,o=0;for(this[e]=255&t;++o<r&&(n*=256);)this[e+o]=t/n&255;return e+r},l.prototype.writeUIntBE=function(t,e,r,i){(t=+t,e|=0,r|=0,i)||j(this,t,e,r,Math.pow(2,8*r)-1,0);var n=r-1,o=1;for(this[e+n]=255&t;--n>=0&&(o*=256);)this[e+n]=t/o&255;return e+r},l.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||j(this,t,e,1,255,0),l.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},l.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||j(this,t,e,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):B(this,t,e,!0),e+2},l.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||j(this,t,e,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):B(this,t,e,!1),e+2},l.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||j(this,t,e,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):U(this,t,e,!0),e+4},l.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||j(this,t,e,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):U(this,t,e,!1),e+4},l.prototype.writeIntLE=function(t,e,r,i){if(t=+t,e|=0,!i){var n=Math.pow(2,8*r-1);j(this,t,e,r,n-1,-n)}var o=0,s=1,a=0;for(this[e]=255&t;++o<r&&(s*=256);)t<0&&0===a&&0!==this[e+o-1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+r},l.prototype.writeIntBE=function(t,e,r,i){if(t=+t,e|=0,!i){var n=Math.pow(2,8*r-1);j(this,t,e,r,n-1,-n)}var o=r-1,s=1,a=0;for(this[e+o]=255&t;--o>=0&&(s*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+r},l.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||j(this,t,e,1,127,-128),l.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},l.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||j(this,t,e,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):B(this,t,e,!0),e+2},l.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||j(this,t,e,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):B(this,t,e,!1),e+2},l.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||j(this,t,e,4,2147483647,-2147483648),l.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):U(this,t,e,!0),e+4},l.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||j(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),l.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):U(this,t,e,!1),e+4},l.prototype.writeFloatLE=function(t,e,r){return L(this,t,e,!0,r)},l.prototype.writeFloatBE=function(t,e,r){return L(this,t,e,!1,r)},l.prototype.writeDoubleLE=function(t,e,r){return N(this,t,e,!0,r)},l.prototype.writeDoubleBE=function(t,e,r){return N(this,t,e,!1,r)},l.prototype.copy=function(t,e,r,i){if(r||(r=0),i||0===i||(i=this.length),e>=t.length&&(e=t.length),e||(e=0),i>0&&i<r&&(i=r),i===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-e<i-r&&(i=t.length-e+r);var n,o=i-r;if(this===t&&r<e&&e<i)for(n=o-1;n>=0;--n)t[n+e]=this[n+r];else if(o<1e3||!l.TYPED_ARRAY_SUPPORT)for(n=0;n<o;++n)t[n+e]=this[n+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+o),e);return o},l.prototype.fill=function(t,e,r,i){if("string"==typeof t){if("string"==typeof e?(i=e,e=0,r=this.length):"string"==typeof r&&(i=r,r=this.length),1===t.length){var n=t.charCodeAt(0);n<256&&(t=n)}if(void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!l.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;var o;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(o=e;o<r;++o)this[o]=t;else{var s=l.isBuffer(t)?t:D(new l(t,i).toString()),a=s.length;for(o=0;o<r-e;++o)this[o+e]=s[o%a]}return this};var I=/[^+\/0-9A-Za-z-_]/g;function q(t){return t<16?"0"+t.toString(16):t.toString(16)}function D(t,e){var r;e=e||1/0;for(var i=t.length,n=null,o=[],s=0;s<i;++s){if((r=t.charCodeAt(s))>55295&&r<57344){if(!n){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===i){(e-=3)>-1&&o.push(239,191,189);continue}n=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),n=r;continue}r=65536+(n-55296<<10|r-56320)}else n&&(e-=3)>-1&&o.push(239,191,189);if(n=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function F(t){return i.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(I,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function z(t,e,r,i){for(var n=0;n<i&&!(n+r>=e.length||n>=t.length);++n)e[n+r]=t[n];return n}}).call(this,r(33))},function(t,e,r){"use strict";e.byteLength=function(t){var e=c(t),r=e[0],i=e[1];return 3*(r+i)/4-i},e.toByteArray=function(t){var e,r,i=c(t),s=i[0],a=i[1],l=new o(function(t,e,r){return 3*(e+r)/4-r}(0,s,a)),u=0,d=a>0?s-4:s;for(r=0;r<d;r+=4)e=n[t.charCodeAt(r)]<<18|n[t.charCodeAt(r+1)]<<12|n[t.charCodeAt(r+2)]<<6|n[t.charCodeAt(r+3)],l[u++]=e>>16&255,l[u++]=e>>8&255,l[u++]=255&e;2===a&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,l[u++]=255&e);1===a&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,l[u++]=e>>8&255,l[u++]=255&e);return l},e.fromByteArray=function(t){for(var e,r=t.length,n=r%3,o=[],s=0,a=r-n;s<a;s+=16383)o.push(u(t,s,s+16383>a?a:s+16383));1===n?(e=t[r-1],o.push(i[e>>2]+i[e<<4&63]+"==")):2===n&&(e=(t[r-2]<<8)+t[r-1],o.push(i[e>>10]+i[e>>4&63]+i[e<<2&63]+"="));return o.join("")};for(var i=[],n=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,l=s.length;a<l;++a)i[a]=s[a],n[s.charCodeAt(a)]=a;function c(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function u(t,e,r){for(var n,o,s=[],a=e;a<r;a+=3)n=(t[a]<<16&16711680)+(t[a+1]<<8&65280)+(255&t[a+2]),s.push(i[(o=n)>>18&63]+i[o>>12&63]+i[o>>6&63]+i[63&o]);return s.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},function(t,e){
8
+ var n=r(18),i=r(19),o=r(20);function s(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(t,e){if(s()<e)throw new RangeError("Invalid typed array length");return c.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=c.prototype:(null===t&&(t=new c(e)),t.length=e),t}function c(t,e,r){if(!(c.TYPED_ARRAY_SUPPORT||this instanceof c))return new c(t,e,r);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return f(this,t)}return u(this,t,e,r)}function u(t,e,r,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,r,n){if(e.byteLength,r<0||e.byteLength<r)throw new RangeError("'offset' is out of bounds");if(e.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");e=void 0===r&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,r):new Uint8Array(e,r,n);c.TYPED_ARRAY_SUPPORT?(t=e).__proto__=c.prototype:t=h(t,e);return t}(t,e,r,n):"string"==typeof e?function(t,e,r){"string"==typeof r&&""!==r||(r="utf8");if(!c.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|p(e,r),i=(t=a(t,n)).write(e,r);i!==n&&(t=t.slice(0,i));return t}(t,e,r):function(t,e){if(c.isBuffer(e)){var r=0|d(e.length);return 0===(t=a(t,r)).length||e.copy(t,0,0,r),t}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(n=e.length)!=n?a(t,0):h(t,e);if("Buffer"===e.type&&o(e.data))return h(t,e.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function l(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function f(t,e){if(l(e),t=a(t,e<0?0:0|d(e)),!c.TYPED_ARRAY_SUPPORT)for(var r=0;r<e;++r)t[r]=0;return t}function h(t,e){var r=e.length<0?0:0|d(e.length);t=a(t,r);for(var n=0;n<r;n+=1)t[n]=255&e[n];return t}function d(t){if(t>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|t}function p(t,e){if(c.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return F(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return D(t).length;default:if(n)return F(t).length;e=(""+e).toLowerCase(),n=!0}}function g(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return T(this,e,r);case"utf8":case"utf-8":return A(this,e,r);case"ascii":return O(this,e,r);case"latin1":case"binary":return C(this,e,r);case"base64":return S(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function m(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function w(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=c.from(e,n)),c.isBuffer(e))return 0===e.length?-1:v(t,e,r,n,i);if("number"==typeof e)return e&=255,c.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):v(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function v(t,e,r,n,i){var o,s=1,a=t.length,c=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;s=2,a/=2,c/=2,r/=2}function u(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){var l=-1;for(o=r;o<a;o++)if(u(t,o)===u(e,-1===l?0:o-l)){if(-1===l&&(l=o),o-l+1===c)return l*s}else-1!==l&&(o-=o-l),l=-1}else for(r+c>a&&(r=a-c),o=r;o>=0;o--){for(var f=!0,h=0;h<c;h++)if(u(t,o+h)!==u(e,h)){f=!1;break}if(f)return o}return-1}function y(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var s=0;s<n;++s){var a=parseInt(e.substr(2*s,2),16);if(isNaN(a))return s;t[r+s]=a}return s}function b(t,e,r,n){return z(F(e,t.length-r),t,r,n)}function _(t,e,r,n){return z(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function E(t,e,r,n){return _(t,e,r,n)}function R(t,e,r,n){return z(D(e),t,r,n)}function x(t,e,r,n){return z(function(t,e){for(var r,n,i,o=[],s=0;s<t.length&&!((e-=2)<0);++s)r=t.charCodeAt(s),n=r>>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function S(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function A(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var o,s,a,c,u=t[i],l=null,f=u>239?4:u>223?3:u>191?2:1;if(i+f<=r)switch(f){case 1:u<128&&(l=u);break;case 2:128==(192&(o=t[i+1]))&&(c=(31&u)<<6|63&o)>127&&(l=c);break;case 3:o=t[i+1],s=t[i+2],128==(192&o)&&128==(192&s)&&(c=(15&u)<<12|(63&o)<<6|63&s)>2047&&(c<55296||c>57343)&&(l=c);break;case 4:o=t[i+1],s=t[i+2],a=t[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(c=(15&u)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&c<1114112&&(l=c)}null===l?(l=65533,f=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),i+=f}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);var r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=4096));return r}(n)}e.Buffer=c,e.SlowBuffer=function(t){+t!=t&&(t=0);return c.alloc(+t)},e.INSPECT_MAX_BYTES=50,c.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),e.kMaxLength=s(),c.poolSize=8192,c._augment=function(t){return t.__proto__=c.prototype,t},c.from=function(t,e,r){return u(null,t,e,r)},c.TYPED_ARRAY_SUPPORT&&(c.prototype.__proto__=Uint8Array.prototype,c.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&c[Symbol.species]===c&&Object.defineProperty(c,Symbol.species,{value:null,configurable:!0})),c.alloc=function(t,e,r){return function(t,e,r,n){return l(e),e<=0?a(t,e):void 0!==r?"string"==typeof n?a(t,e).fill(r,n):a(t,e).fill(r):a(t,e)}(null,t,e,r)},c.allocUnsafe=function(t){return f(null,t)},c.allocUnsafeSlow=function(t){return f(null,t)},c.isBuffer=function(t){return!(null==t||!t._isBuffer)},c.compare=function(t,e){if(!c.isBuffer(t)||!c.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,n=e.length,i=0,o=Math.min(r,n);i<o;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0},c.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(t,e){if(!o(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return c.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=c.allocUnsafe(e),i=0;for(r=0;r<t.length;++r){var s=t[r];if(!c.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(n,i),i+=s.length}return n},c.byteLength=p,c.prototype._isBuffer=!0,c.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)m(this,e,e+1);return this},c.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)m(this,e,e+3),m(this,e+1,e+2);return this},c.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)m(this,e,e+7),m(this,e+1,e+6),m(this,e+2,e+5),m(this,e+3,e+4);return this},c.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?A(this,0,t):g.apply(this,arguments)},c.prototype.equals=function(t){if(!c.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===c.compare(this,t)},c.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),"<Buffer "+t+">"},c.prototype.compare=function(t,e,r,n,i){if(!c.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(e>>>=0),a=Math.min(o,s),u=this.slice(n,i),l=t.slice(e,r),f=0;f<a;++f)if(u[f]!==l[f]){o=u[f],s=l[f];break}return o<s?-1:s<o?1:0},c.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},c.prototype.indexOf=function(t,e,r){return w(this,t,e,r,!0)},c.prototype.lastIndexOf=function(t,e,r){return w(this,t,e,r,!1)},c.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return y(this,t,e,r);case"utf8":case"utf-8":return b(this,t,e,r);case"ascii":return _(this,t,e,r);case"latin1":case"binary":return E(this,t,e,r);case"base64":return R(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function O(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}function C(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function T(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=e;o<r;++o)i+=I(t[o]);return i}function P(t,e,r){for(var n=t.slice(e,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function k(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function q(t,e,r,n,i,o){if(!c.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function j(t,e,r,n){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-r,2);i<o;++i)t[r+i]=(e&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function B(t,e,r,n){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-r,4);i<o;++i)t[r+i]=e>>>8*(n?i:3-i)&255}function U(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function N(t,e,r,n,o){return o||U(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function L(t,e,r,n,o){return o||U(t,0,r,8),i.write(t,e,r,n,52,8),r+8}c.prototype.slice=function(t,e){var r,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t),c.TYPED_ARRAY_SUPPORT)(r=this.subarray(t,e)).__proto__=c.prototype;else{var i=e-t;r=new c(i,void 0);for(var o=0;o<i;++o)r[o]=this[o+t]}return r},c.prototype.readUIntLE=function(t,e,r){t|=0,e|=0,r||k(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n},c.prototype.readUIntBE=function(t,e,r){t|=0,e|=0,r||k(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},c.prototype.readUInt8=function(t,e){return e||k(t,1,this.length),this[t]},c.prototype.readUInt16LE=function(t,e){return e||k(t,2,this.length),this[t]|this[t+1]<<8},c.prototype.readUInt16BE=function(t,e){return e||k(t,2,this.length),this[t]<<8|this[t+1]},c.prototype.readUInt32LE=function(t,e){return e||k(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},c.prototype.readUInt32BE=function(t,e){return e||k(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},c.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||k(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*e)),n},c.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||k(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},c.prototype.readInt8=function(t,e){return e||k(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},c.prototype.readInt16LE=function(t,e){e||k(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt16BE=function(t,e){e||k(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt32LE=function(t,e){return e||k(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},c.prototype.readInt32BE=function(t,e){return e||k(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},c.prototype.readFloatLE=function(t,e){return e||k(t,4,this.length),i.read(this,t,!0,23,4)},c.prototype.readFloatBE=function(t,e){return e||k(t,4,this.length),i.read(this,t,!1,23,4)},c.prototype.readDoubleLE=function(t,e){return e||k(t,8,this.length),i.read(this,t,!0,52,8)},c.prototype.readDoubleBE=function(t,e){return e||k(t,8,this.length),i.read(this,t,!1,52,8)},c.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||q(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[e]=255&t;++o<r&&(i*=256);)this[e+o]=t/i&255;return e+r},c.prototype.writeUIntBE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||q(this,t,e,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},c.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||q(this,t,e,1,255,0),c.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},c.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||q(this,t,e,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):j(this,t,e,!0),e+2},c.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||q(this,t,e,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):j(this,t,e,!1),e+2},c.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||q(this,t,e,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):B(this,t,e,!0),e+4},c.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||q(this,t,e,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):B(this,t,e,!1),e+4},c.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);q(this,t,e,r,i-1,-i)}var o=0,s=1,a=0;for(this[e]=255&t;++o<r&&(s*=256);)t<0&&0===a&&0!==this[e+o-1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+r},c.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);q(this,t,e,r,i-1,-i)}var o=r-1,s=1,a=0;for(this[e+o]=255&t;--o>=0&&(s*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+r},c.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||q(this,t,e,1,127,-128),c.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},c.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||q(this,t,e,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):j(this,t,e,!0),e+2},c.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||q(this,t,e,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):j(this,t,e,!1),e+2},c.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||q(this,t,e,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):B(this,t,e,!0),e+4},c.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||q(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):B(this,t,e,!1),e+4},c.prototype.writeFloatLE=function(t,e,r){return N(this,t,e,!0,r)},c.prototype.writeFloatBE=function(t,e,r){return N(this,t,e,!1,r)},c.prototype.writeDoubleLE=function(t,e,r){return L(this,t,e,!0,r)},c.prototype.writeDoubleBE=function(t,e,r){return L(this,t,e,!1,r)},c.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var i,o=n-r;if(this===t&&r<e&&e<n)for(i=o-1;i>=0;--i)t[i+e]=this[i+r];else if(o<1e3||!c.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)t[i+e]=this[i+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+o),e);return o},c.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!c.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;var o;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(o=e;o<r;++o)this[o]=t;else{var s=c.isBuffer(t)?t:F(new c(t,n).toString()),a=s.length;for(o=0;o<r-e;++o)this[o+e]=s[o%a]}return this};var M=/[^+\/0-9A-Za-z-_]/g;function I(t){return t<16?"0"+t.toString(16):t.toString(16)}function F(t,e){var r;e=e||1/0;for(var n=t.length,i=null,o=[],s=0;s<n;++s){if((r=t.charCodeAt(s))>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function D(t){return n.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(M,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function z(t,e,r,n){for(var i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}}).call(this,r(12))},function(t,e,r){"use strict";e.byteLength=function(t){var e=u(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){var e,r,n=u(t),s=n[0],a=n[1],c=new o(function(t,e,r){return 3*(e+r)/4-r}(0,s,a)),l=0,f=a>0?s-4:s;for(r=0;r<f;r+=4)e=i[t.charCodeAt(r)]<<18|i[t.charCodeAt(r+1)]<<12|i[t.charCodeAt(r+2)]<<6|i[t.charCodeAt(r+3)],c[l++]=e>>16&255,c[l++]=e>>8&255,c[l++]=255&e;2===a&&(e=i[t.charCodeAt(r)]<<2|i[t.charCodeAt(r+1)]>>4,c[l++]=255&e);1===a&&(e=i[t.charCodeAt(r)]<<10|i[t.charCodeAt(r+1)]<<4|i[t.charCodeAt(r+2)]>>2,c[l++]=e>>8&255,c[l++]=255&e);return c},e.fromByteArray=function(t){for(var e,r=t.length,i=r%3,o=[],s=0,a=r-i;s<a;s+=16383)o.push(l(t,s,s+16383>a?a:s+16383));1===i?(e=t[r-1],o.push(n[e>>2]+n[e<<4&63]+"==")):2===i&&(e=(t[r-2]<<8)+t[r-1],o.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"="));return o.join("")};for(var n=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,c=s.length;a<c;++a)n[a]=s[a],i[s.charCodeAt(a)]=a;function u(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function l(t,e,r){for(var i,o,s=[],a=e;a<r;a+=3)i=(t[a]<<16&16711680)+(t[a+1]<<8&65280)+(255&t[a+2]),s.push(n[(o=i)>>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return s.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(t,e){
9
9
  /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
10
- e.read=function(t,e,r,i,n){var o,s,a=8*n-i-1,l=(1<<a)-1,c=l>>1,u=-7,d=r?n-1:0,f=r?-1:1,h=t[e+d];for(d+=f,o=h&(1<<-u)-1,h>>=-u,u+=a;u>0;o=256*o+t[e+d],d+=f,u-=8);for(s=o&(1<<-u)-1,o>>=-u,u+=i;u>0;s=256*s+t[e+d],d+=f,u-=8);if(0===o)o=1-c;else{if(o===l)return s?NaN:1/0*(h?-1:1);s+=Math.pow(2,i),o-=c}return(h?-1:1)*s*Math.pow(2,o-i)},e.write=function(t,e,r,i,n,o){var s,a,l,c=8*o-n-1,u=(1<<c)-1,d=u>>1,f=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,h=i?0:o-1,p=i?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=u):(s=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-s))<1&&(s--,l*=2),(e+=s+d>=1?f/l:f*Math.pow(2,1-d))*l>=2&&(s++,l/=2),s+d>=u?(a=0,s=u):s+d>=1?(a=(e*l-1)*Math.pow(2,n),s+=d):(a=e*Math.pow(2,d-1)*Math.pow(2,n),s=0));n>=8;t[r+h]=255&a,h+=p,a/=256,n-=8);for(s=s<<n|a,c+=n;c>0;t[r+h]=255&s,h+=p,s/=256,c-=8);t[r+h-p]|=128*m}},function(t,e){var r={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)}},function(t,e,r){"use strict";r(34)},function(t,e,r){(e=r(4)(!1)).push([t.i,".martan-snippets[data-v-7f2dcccb]{background-color:#e3e3e3;border-radius:8px;box-shadow:none;display:flex;max-width:525px;overflow:hidden}.martan-snippets__galery img[data-v-7f2dcccb]{aspect-ratio:1/1;border-radius:6px;-o-object-fit:cover;object-fit:cover;width:60px}.martan-snippets__reviews[data-v-7f2dcccb]{display:flex;flex:1 1 0%;flex-direction:column;height:60px;max-width:-moz-fit-content;max-width:fit-content}.martan-snippets__reviews-info[data-v-7f2dcccb]{align-items:center;display:flex;font-weight:500;gap:10px}.martan-snippets__controls button[data-v-7f2dcccb]{background:#fff;border:none;border-radius:50%;box-shadow:0 -2px 12px rgba(0,0,0,.08);color:var(--secondary);cursor:pointer;display:block;font-size:10px;height:20px;line-height:1;opacity:.9;position:absolute;top:50%;transform:translateY(-50%);transition:opacity .2s;transition:all .3s ease-in-out;width:20px;z-index:2}.martan-snippets__controls button[data-v-7f2dcccb]:hover{opacity:.7}.martan-snippets__controls button.left[data-v-7f2dcccb]{left:-5px}.martan-snippets__controls button.right[data-v-7f2dcccb]{right:-5px}.martan-snippets .glide__slide[data-v-7f2dcccb]{align-items:center;display:flex;font-size:14px;font-weight:400;gap:12px;justify-content:stretch;line-height:1.5;margin-left:5px;margin-right:5px;padding:12px;scroll-snap-align:start}",""]),t.exports=e},function(t,e,r){"use strict";r.r(e),r.d(e,"MARTAN_API",(function(){return At}));var i={};r.r(i),r.d(i,"hasBrowserEnv",(function(){return O})),r.d(i,"hasStandardBrowserWebWorkerEnv",(function(){return T})),r.d(i,"hasStandardBrowserEnv",(function(){return k}));var n=r(12),o=r.n(n),s=r(36),a=r(37),l=r(35),c={name:"Total",props:{reviews:{type:Object,default:{list:[],orderRating:null,total:0}}},computed:{i19stars:()=>"Estrelas",i19star:()=>"Estrela",i19reviews:()=>"Avaliações",i19review:()=>"Avaliação",orderRating:()=>reviews.orderRating},components:{Sort:l.a},methods:{onSort(t){this.$emit("onSort",t)}}},u=(r(54),r(2)),d=Object(u.a)(c,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"mt-rating__average__sort"},[t.reviews.orderRating?r("span",{staticClass:"mt-rating__count"},[t._v(t._s(Array.isArray(t.reviews.list)?t.reviews.list.length:0)+" "+t._s(Array.isArray(t.reviews.list)&&t.reviews.list.length>1||0===t.reviews.list.length?t.i19reviews:t.i19review)+" "),r("span",[t._v(t._s(t.reviews.orderRating)+" "+t._s(Array.isArray(t.reviews.list)&&t.reviews.list.length>1||0===t.reviews.list.length?t.i19stars:t.i19star))])]):r("span",{staticClass:"mt-rating__count"},[t._v(" "+t._s(t.reviews.total)+" "+t._s(t.reviews.total>1||0===t.reviews.total?t.i19reviews:t.i19review)+" ")]),r("sort",{on:{onSort:t.onSort}})],1)}),[],!1,null,null,null).exports,f=r(9),h={name:"Reviews",props:{storeId:{type:Number,required:!0},webId:{type:String,required:!0},product:{type:String,required:!0},backgroundColor:{type:String,default:"#fff"},starColor:{type:String,default:"#212529"},primaryColor:{type:String,default:"#212529"},headerLayout:{type:String,default:"header-minimal"},reviewsLayout:{type:String,default:"list-grid"},title:{type:String},showTitle:{type:Boolean,default:!0}},data:()=>({list:[],total:0,limit:5,offset:0,loading:!1,orderRating:null,orderReviews:null,averageTotal:0,$isSorting:!1,$count:null,average:{one:0,two:0,three:0,four:0,five:0},isOpenQuickView:!1,selectedReview:null}),watch:{orderRating:function(t,e){t!==e&&(this.list=[],this.fetchReviews())},orderReviews:function(t,e){t!==e&&(this.list=[],this.fetchReviews())},limit:function(){this.fetchReviews()},offset:function(){this.fetchReviews()}},methods:{fetchReviews(){const t={limit:this.limit,offset:this.offset,sku:this.product};this.orderReviews&&(t.orderBy=this.orderReviews,t.limit=this.limit,t.offset=0),this.orderRating&&(t.rating=this.orderRating),this.$count=null,this.loading=!0,axios({url:At+"/reviews.json",headers:{"X-Store-Id":this.storeId,"X-Web-Id":this.webId},params:t}).then(({data:t})=>{const{result:e,count:r}=t;let i=[];if(Array.isArray(this.list)&&!this.orderReviews||this.orderReviews&&this.$isSorting){for(const t of e){this.list.some(e=>e.id===t.id)||this.list.push(t)}i=[...this.list,...i]}else(Array.isArray(this.list)&&this.orderReviews||this.orderRating)&&(i=e,this.$isSorting=!1);return{count:r,list:i}}).then(({count:t,list:e})=>(this.orderRating?this.$count=t:this.total=t,this.list=e,e)).catch(t=>{console.error("Failed to load resource from Martan",t)}).finally(()=>{this.loading=!1})},fetchAverage(){axios({url:At+"/average.json",headers:{"X-Store-Id":this.storeId,"X-Web-Id":this.webId},params:{sku:this.product}}).then(({data:t})=>{if(t.length){const{average:e,rating:r}=t[0];Object.assign(this.average,r),this.averageTotal=e}}).finally(()=>{this.loading=!1})},loadMore(){this.orderReviews?this.limit=this.limit+this.limit:this.offset++},showLoadMore(){return!this.orderRating&&this.total>0&&this.list.length<this.total||(!!(this.orderRating&&this.$count>0&&this.list.length<this.$count)||void 0)},updateOrderBy({rating:t}){t===this.orderRating?this.orderRating=null:(this.offset=0,this.orderRating=t)},onSort({order:t}){this.orderReviews=t},openQuickview:function({review:t}){this.selectedReview=t,this.isOpenQuickView=!0},onCloseQuickview:function(){this.isOpenQuickView=!1,this.selectedReview=null}},mounted(){Promise.all([this.fetchAverage(),this.fetchReviews()])},components:{"list-grid":()=>Promise.resolve().then(r.bind(null,37)),"list-expanded":()=>Promise.resolve().then(r.bind(null,36)),"header-expanded":()=>r.e(2).then(r.bind(null,80)),"header-minimal":()=>r.e(3).then(r.bind(null,81)),Total:d,ListView:s.default,GridView:a.default,Quickview:f.a}},p=(r(56),Object(u.a)(h,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{attrs:{"data-header":t.headerLayout,"data-layout":t.reviewsLayout}},[r("div",{staticClass:"mt-reviews container",class:"mt-theme--"+t.headerLayout},[r("p",{staticClass:"lead"},[r("a",{attrs:{href:"#reviews",name:t.title||"reviews"}},[t._v("#")]),t._v(" "+t._s(t.title)+" ")]),"header-expanded"!==t.headerLayout&&"header-minimal"!==t.headerLayout?r("total",{attrs:{reviews:{list:t.list,orderRating:t.orderRating,total:t.total}},on:{onSort:t.onSort}}):t._e(),r(t.headerLayout,{tag:"component",attrs:{reviews:{averageTotal:t.averageTotal,average:t.average,total:t.total,orderRating:t.orderRating},starColor:t.starColor},on:{updateOrderByAverage:t.updateOrderBy,onSort:t.onSort}}),"header-expanded"===t.headerLayout?r("total",{attrs:{reviews:{list:t.list,orderRating:t.orderRating,total:t.total}},on:{onSort:t.onSort}}):t._e(),r(t.reviewsLayout,{tag:"component",attrs:{reviews:{list:t.list,orderRating:t.orderRating,total:t.total},starColor:t.starColor},on:{openQuickview:t.openQuickview}}),t.showLoadMore()?r("div",{staticClass:"mt-questions__actions"},[r("div",{staticClass:"mt-questions__pagination",attrs:{id:"mt-more-questions"}},[r("button",{staticClass:"btn btn-primary",attrs:{disabled:t.loading},on:{click:t.loadMore}},[t._v(" "+t._s(t.loading?"Carregando..":"Carregar mais")+" ")])])]):t._e()],1),r("quickview",{attrs:{isOpen:t.isOpenQuickView,review:t.selectedReview,starColor:t.starColor},on:{onClose:t.onCloseQuickview}})],1)}),[],!1,null,null,null).exports),m=r(0),g=r(14),v=r(7);function w(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,(function(t){return e[t]}))}function y(t,e){this._pairs=[],t&&Object(v.a)(t,this,e)}const b=y.prototype;b.append=function(t,e){this._pairs.push([t,e])},b.toString=function(t){const e=t?function(e){return t.call(this,e,w)}:w;return this._pairs.map((function(t){return e(t[0])+"="+e(t[1])}),"").join("&")};var _=y;function x(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function R(t,e,r){if(!e)return t;const i=r&&r.encode||x,n=r&&r.serialize;let o;if(o=n?n(e,r):m.a.isURLSearchParams(e)?e.toString():new _(e,r).toString(i),o){const e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+o}return t}var E=class{constructor(){this.handlers=[]}use(t,e,r){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){m.a.forEach(this.handlers,(function(e){null!==e&&t(e)}))}},C=r(1),A={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},S={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:_,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const O="undefined"!=typeof window&&"undefined"!=typeof document,k=(P="undefined"!=typeof navigator&&navigator.product,O&&["ReactNative","NativeScript","NS"].indexOf(P)<0);var P;const T="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts;var j={...i,...S};var B=function(t){function e(t,r,i,n){let o=t[n++];if("__proto__"===o)return!0;const s=Number.isFinite(+o),a=n>=t.length;if(o=!o&&m.a.isArray(i)?i.length:o,a)return m.a.hasOwnProp(i,o)?i[o]=[i[o],r]:i[o]=r,!s;i[o]&&m.a.isObject(i[o])||(i[o]=[]);return e(t,r,i[o],n)&&m.a.isArray(i[o])&&(i[o]=function(t){const e={},r=Object.keys(t);let i;const n=r.length;let o;for(i=0;i<n;i++)o=r[i],e[o]=t[o];return e}(i[o])),!s}if(m.a.isFormData(t)&&m.a.isFunction(t.entries)){const r={};return m.a.forEachEntry(t,(t,i)=>{e(function(t){return m.a.matchAll(/\w+|\[(\w*)]/g,t).map(t=>"[]"===t[0]?"":t[1]||t[0])}(t),i,r,0)}),r}return null};const U={transitional:A,adapter:["xhr","http"],transformRequest:[function(t,e){const r=e.getContentType()||"",i=r.indexOf("application/json")>-1,n=m.a.isObject(t);n&&m.a.isHTMLForm(t)&&(t=new FormData(t));if(m.a.isFormData(t))return i?JSON.stringify(B(t)):t;if(m.a.isArrayBuffer(t)||m.a.isBuffer(t)||m.a.isStream(t)||m.a.isFile(t)||m.a.isBlob(t))return t;if(m.a.isArrayBufferView(t))return t.buffer;if(m.a.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let o;if(n){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(t,e){return Object(v.a)(t,new j.classes.URLSearchParams,Object.assign({visitor:function(t,e,r,i){return j.isNode&&m.a.isBuffer(t)?(this.append(e,t.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},e))}(t,this.formSerializer).toString();if((o=m.a.isFileList(t))||r.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return Object(v.a)(o?{"files[]":t}:t,e&&new e,this.formSerializer)}}return n||i?(e.setContentType("application/json",!1),function(t,e,r){if(m.a.isString(t))try{return(e||JSON.parse)(t),m.a.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(r||JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){const e=this.transitional||U.transitional,r=e&&e.forcedJSONParsing,i="json"===this.responseType;if(t&&m.a.isString(t)&&(r&&!this.responseType||i)){const r=!(e&&e.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(t){if(r){if("SyntaxError"===t.name)throw C.a.from(t,C.a.ERR_BAD_RESPONSE,this,null,this.response);throw t}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:j.classes.FormData,Blob:j.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};m.a.forEach(["delete","get","head","post","put","patch"],t=>{U.headers[t]={}});var M=U;const L=m.a.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 N=Symbol("internals");function I(t){return t&&String(t).trim().toLowerCase()}function q(t){return!1===t||null==t?t:m.a.isArray(t)?t.map(q):String(t)}function D(t,e,r,i,n){return m.a.isFunction(i)?i.call(this,e,r):(n&&(e=r),m.a.isString(e)?m.a.isString(i)?-1!==e.indexOf(i):m.a.isRegExp(i)?i.test(e):void 0:void 0)}class F{constructor(t){t&&this.set(t)}set(t,e,r){const i=this;function n(t,e,r){const n=I(e);if(!n)throw new Error("header name must be a non-empty string");const o=m.a.findKey(i,n);(!o||void 0===i[o]||!0===r||void 0===r&&!1!==i[o])&&(i[o||e]=q(t))}const o=(t,e)=>m.a.forEach(t,(t,r)=>n(t,r,e));return m.a.isPlainObject(t)||t instanceof this.constructor?o(t,e):m.a.isString(t)&&(t=t.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim())?o((t=>{const e={};let r,i,n;return t&&t.split("\n").forEach((function(t){n=t.indexOf(":"),r=t.substring(0,n).trim().toLowerCase(),i=t.substring(n+1).trim(),!r||e[r]&&L[r]||("set-cookie"===r?e[r]?e[r].push(i):e[r]=[i]:e[r]=e[r]?e[r]+", "+i:i)})),e})(t),e):null!=t&&n(e,t,r),this}get(t,e){if(t=I(t)){const r=m.a.findKey(this,t);if(r){const t=this[r];if(!e)return t;if(!0===e)return function(t){const e=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=r.exec(t);)e[i[1]]=i[2];return e}(t);if(m.a.isFunction(e))return e.call(this,t,r);if(m.a.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=I(t)){const r=m.a.findKey(this,t);return!(!r||void 0===this[r]||e&&!D(0,this[r],r,e))}return!1}delete(t,e){const r=this;let i=!1;function n(t){if(t=I(t)){const n=m.a.findKey(r,t);!n||e&&!D(0,r[n],n,e)||(delete r[n],i=!0)}}return m.a.isArray(t)?t.forEach(n):n(t),i}clear(t){const e=Object.keys(this);let r=e.length,i=!1;for(;r--;){const n=e[r];t&&!D(0,this[n],n,t,!0)||(delete this[n],i=!0)}return i}normalize(t){const e=this,r={};return m.a.forEach(this,(i,n)=>{const o=m.a.findKey(r,n);if(o)return e[o]=q(i),void delete e[n];const s=t?function(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,e,r)=>e.toUpperCase()+r)}(n):String(n).trim();s!==n&&delete e[n],e[s]=q(i),r[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return m.a.forEach(this,(r,i)=>{null!=r&&!1!==r&&(e[i]=t&&m.a.isArray(r)?r.join(", "):r)}),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 r=new this(t);return e.forEach(t=>r.set(t)),r}static accessor(t){const e=(this[N]=this[N]={accessors:{}}).accessors,r=this.prototype;function i(t){const i=I(t);e[i]||(!function(t,e){const r=m.a.toCamelCase(" "+e);["get","set","has"].forEach(i=>{Object.defineProperty(t,i+r,{value:function(t,r,n){return this[i].call(this,e,t,r,n)},configurable:!0})})}(r,t),e[i]=!0)}return m.a.isArray(t)?t.forEach(i):i(t),this}}F.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),m.a.reduceDescriptors(F.prototype,({value:t},e)=>{let r=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(t){this[r]=t}}}),m.a.freezeMethods(F);var z=F;function $(t,e){const r=this||M,i=e||r,n=z.from(i.headers);let o=i.data;return m.a.forEach(t,(function(t){o=t.call(r,o,n.normalize(),e?e.status:void 0)})),n.normalize(),o}function V(t){return!(!t||!t.__CANCEL__)}function Y(t,e,r){C.a.call(this,null==t?"canceled":t,C.a.ERR_CANCELED,e,r),this.name="CanceledError"}m.a.inherits(Y,C.a,{__CANCEL__:!0});var Q=Y,H=r(15);var W=j.hasStandardBrowserEnv?{write(t,e,r,i,n,o){const s=[t+"="+encodeURIComponent(e)];m.a.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),m.a.isString(i)&&s.push("path="+i),m.a.isString(n)&&s.push("domain="+n),!0===o&&s.push("secure"),document.cookie=s.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:()=>null,remove(){}};function J(t,e){return t&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)?function(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}(t,e):e}var X=j.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),e=document.createElement("a");let r;function i(r){let i=r;return t&&(e.setAttribute("href",i),i=e.href),e.setAttribute("href",i),{href:e.href,protocol:e.protocol?e.protocol.replace(/:$/,""):"",host:e.host,search:e.search?e.search.replace(/^\?/,""):"",hash:e.hash?e.hash.replace(/^#/,""):"",hostname:e.hostname,port:e.port,pathname:"/"===e.pathname.charAt(0)?e.pathname:"/"+e.pathname}}return r=i(window.location.href),function(t){const e=m.a.isString(t)?i(t):t;return e.protocol===r.protocol&&e.host===r.host}}():function(){return!0};var K=function(t,e){t=t||10;const r=new Array(t),i=new Array(t);let n,o=0,s=0;return e=void 0!==e?e:1e3,function(a){const l=Date.now(),c=i[s];n||(n=l),r[o]=a,i[o]=l;let u=s,d=0;for(;u!==o;)d+=r[u++],u%=t;if(o=(o+1)%t,o===s&&(s=(s+1)%t),l-n<e)return;const f=c&&l-c;return f?Math.round(1e3*d/f):void 0}};function G(t,e){let r=0;const i=K(50,250);return n=>{const o=n.loaded,s=n.lengthComputable?n.total:void 0,a=o-r,l=i(a);r=o;const c={loaded:o,total:s,progress:s?o/s:void 0,bytes:a,rate:l||void 0,estimated:l&&s&&o<=s?(s-o)/l:void 0,event:n};c[e?"download":"upload"]=!0,t(c)}}var Z="undefined"!=typeof XMLHttpRequest&&function(t){return new Promise((function(e,r){let i=t.data;const n=z.from(t.headers).normalize();let o,s,{responseType:a,withXSRFToken:l}=t;function c(){t.cancelToken&&t.cancelToken.unsubscribe(o),t.signal&&t.signal.removeEventListener("abort",o)}if(m.a.isFormData(i))if(j.hasStandardBrowserEnv||j.hasStandardBrowserWebWorkerEnv)n.setContentType(!1);else if(!1!==(s=n.getContentType())){const[t,...e]=s?s.split(";").map(t=>t.trim()).filter(Boolean):[];n.setContentType([t||"multipart/form-data",...e].join("; "))}let u=new XMLHttpRequest;if(t.auth){const e=t.auth.username||"",r=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";n.set("Authorization","Basic "+btoa(e+":"+r))}const d=J(t.baseURL,t.url);function f(){if(!u)return;const i=z.from("getAllResponseHeaders"in u&&u.getAllResponseHeaders());!function(t,e,r){const i=r.config.validateStatus;r.status&&i&&!i(r.status)?e(new C.a("Request failed with status code "+r.status,[C.a.ERR_BAD_REQUEST,C.a.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):t(r)}((function(t){e(t),c()}),(function(t){r(t),c()}),{data:a&&"text"!==a&&"json"!==a?u.response:u.responseText,status:u.status,statusText:u.statusText,headers:i,config:t,request:u}),u=null}if(u.open(t.method.toUpperCase(),R(d,t.params,t.paramsSerializer),!0),u.timeout=t.timeout,"onloadend"in u?u.onloadend=f:u.onreadystatechange=function(){u&&4===u.readyState&&(0!==u.status||u.responseURL&&0===u.responseURL.indexOf("file:"))&&setTimeout(f)},u.onabort=function(){u&&(r(new C.a("Request aborted",C.a.ECONNABORTED,t,u)),u=null)},u.onerror=function(){r(new C.a("Network Error",C.a.ERR_NETWORK,t,u)),u=null},u.ontimeout=function(){let e=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const i=t.transitional||A;t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),r(new C.a(e,i.clarifyTimeoutError?C.a.ETIMEDOUT:C.a.ECONNABORTED,t,u)),u=null},j.hasStandardBrowserEnv&&(l&&m.a.isFunction(l)&&(l=l(t)),l||!1!==l&&X(d))){const e=t.xsrfHeaderName&&t.xsrfCookieName&&W.read(t.xsrfCookieName);e&&n.set(t.xsrfHeaderName,e)}void 0===i&&n.setContentType(null),"setRequestHeader"in u&&m.a.forEach(n.toJSON(),(function(t,e){u.setRequestHeader(e,t)})),m.a.isUndefined(t.withCredentials)||(u.withCredentials=!!t.withCredentials),a&&"json"!==a&&(u.responseType=t.responseType),"function"==typeof t.onDownloadProgress&&u.addEventListener("progress",G(t.onDownloadProgress,!0)),"function"==typeof t.onUploadProgress&&u.upload&&u.upload.addEventListener("progress",G(t.onUploadProgress)),(t.cancelToken||t.signal)&&(o=e=>{u&&(r(!e||e.type?new Q(null,t,u):e),u.abort(),u=null)},t.cancelToken&&t.cancelToken.subscribe(o),t.signal&&(t.signal.aborted?o():t.signal.addEventListener("abort",o)));const h=function(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}(d);h&&-1===j.protocols.indexOf(h)?r(new C.a("Unsupported protocol "+h+":",C.a.ERR_BAD_REQUEST,t)):u.send(i||null)}))};const tt={http:H.a,xhr:Z};m.a.forEach(tt,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(t){}Object.defineProperty(t,"adapterName",{value:e})}});const et=t=>"- "+t,rt=t=>m.a.isFunction(t)||null===t||!1===t;var it=t=>{t=m.a.isArray(t)?t:[t];const{length:e}=t;let r,i;const n={};for(let o=0;o<e;o++){let e;if(r=t[o],i=r,!rt(r)&&(i=tt[(e=String(r)).toLowerCase()],void 0===i))throw new C.a(`Unknown adapter '${e}'`);if(i)break;n[e||"#"+o]=i}if(!i){const t=Object.entries(n).map(([t,e])=>`adapter ${t} `+(!1===e?"is not supported by the environment":"is not available in the build"));let r=e?t.length>1?"since :\n"+t.map(et).join("\n"):" "+et(t[0]):"as no adapter specified";throw new C.a("There is no suitable adapter to dispatch the request "+r,"ERR_NOT_SUPPORT")}return i};function nt(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Q(null,t)}function ot(t){nt(t),t.headers=z.from(t.headers),t.data=$.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1);return it(t.adapter||M.adapter)(t).then((function(e){return nt(t),e.data=$.call(t,t.transformResponse,e),e.headers=z.from(e.headers),e}),(function(e){return V(e)||(nt(t),e&&e.response&&(e.response.data=$.call(t,t.transformResponse,e.response),e.response.headers=z.from(e.response.headers))),Promise.reject(e)}))}const st=t=>t instanceof z?{...t}:t;function at(t,e){e=e||{};const r={};function i(t,e,r){return m.a.isPlainObject(t)&&m.a.isPlainObject(e)?m.a.merge.call({caseless:r},t,e):m.a.isPlainObject(e)?m.a.merge({},e):m.a.isArray(e)?e.slice():e}function n(t,e,r){return m.a.isUndefined(e)?m.a.isUndefined(t)?void 0:i(void 0,t,r):i(t,e,r)}function o(t,e){if(!m.a.isUndefined(e))return i(void 0,e)}function s(t,e){return m.a.isUndefined(e)?m.a.isUndefined(t)?void 0:i(void 0,t):i(void 0,e)}function a(r,n,o){return o in e?i(r,n):o in t?i(void 0,r):void 0}const l={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(t,e)=>n(st(t),st(e),!0)};return m.a.forEach(Object.keys(Object.assign({},t,e)),(function(i){const o=l[i]||n,s=o(t[i],e[i],i);m.a.isUndefined(s)&&o!==a||(r[i]=s)})),r}const lt={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{lt[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const ct={};lt.transitional=function(t,e,r){function i(t,e){return"[Axios v1.6.8] Transitional option '"+t+"'"+e+(r?". "+r:"")}return(r,n,o)=>{if(!1===t)throw new C.a(i(n," has been removed"+(e?" in "+e:"")),C.a.ERR_DEPRECATED);return e&&!ct[n]&&(ct[n]=!0,console.warn(i(n," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(r,n,o)}};var ut={assertOptions:function(t,e,r){if("object"!=typeof t)throw new C.a("options must be an object",C.a.ERR_BAD_OPTION_VALUE);const i=Object.keys(t);let n=i.length;for(;n-- >0;){const o=i[n],s=e[o];if(s){const e=t[o],r=void 0===e||s(e,o,t);if(!0!==r)throw new C.a("option "+o+" must be "+r,C.a.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new C.a("Unknown option "+o,C.a.ERR_BAD_OPTION)}},validators:lt};const dt=ut.validators;class ft{constructor(t){this.defaults=t,this.interceptors={request:new E,response:new E}}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 r=e.stack?e.stack.replace(/^.+\n/,""):"";t.stack?r&&!String(t.stack).endsWith(r.replace(/^.+\n.+\n/,""))&&(t.stack+="\n"+r):t.stack=r}throw t}}_request(t,e){"string"==typeof t?(e=e||{}).url=t:e=t||{},e=at(this.defaults,e);const{transitional:r,paramsSerializer:i,headers:n}=e;void 0!==r&&ut.assertOptions(r,{silentJSONParsing:dt.transitional(dt.boolean),forcedJSONParsing:dt.transitional(dt.boolean),clarifyTimeoutError:dt.transitional(dt.boolean)},!1),null!=i&&(m.a.isFunction(i)?e.paramsSerializer={serialize:i}:ut.assertOptions(i,{encode:dt.function,serialize:dt.function},!0)),e.method=(e.method||this.defaults.method||"get").toLowerCase();let o=n&&m.a.merge(n.common,n[e.method]);n&&m.a.forEach(["delete","get","head","post","put","patch","common"],t=>{delete n[t]}),e.headers=z.concat(o,n);const s=[];let a=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(a=a&&t.synchronous,s.unshift(t.fulfilled,t.rejected))}));const l=[];let c;this.interceptors.response.forEach((function(t){l.push(t.fulfilled,t.rejected)}));let u,d=0;if(!a){const t=[ot.bind(this),void 0];for(t.unshift.apply(t,s),t.push.apply(t,l),u=t.length,c=Promise.resolve(e);d<u;)c=c.then(t[d++],t[d++]);return c}u=s.length;let f=e;for(d=0;d<u;){const t=s[d++],e=s[d++];try{f=t(f)}catch(t){e.call(this,t);break}}try{c=ot.call(this,f)}catch(t){return Promise.reject(t)}for(d=0,u=l.length;d<u;)c=c.then(l[d++],l[d++]);return c}getUri(t){return R(J((t=at(this.defaults,t)).baseURL,t.url),t.params,t.paramsSerializer)}}m.a.forEach(["delete","get","head","options"],(function(t){ft.prototype[t]=function(e,r){return this.request(at(r||{},{method:t,url:e,data:(r||{}).data}))}})),m.a.forEach(["post","put","patch"],(function(t){function e(e){return function(r,i,n){return this.request(at(n||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:r,data:i}))}}ft.prototype[t]=e(),ft.prototype[t+"Form"]=e(!0)}));var ht=ft;class pt{constructor(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");let e;this.promise=new Promise((function(t){e=t}));const r=this;this.promise.then(t=>{if(!r._listeners)return;let e=r._listeners.length;for(;e-- >0;)r._listeners[e](t);r._listeners=null}),this.promise.then=t=>{let e;const i=new Promise(t=>{r.subscribe(t),e=t}).then(t);return i.cancel=function(){r.unsubscribe(e)},i},t((function(t,i,n){r.reason||(r.reason=new Q(t,i,n),e(r.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}static source(){let t;return{token:new pt((function(e){t=e})),cancel:t}}}var mt=pt;const gt={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(gt).forEach(([t,e])=>{gt[e]=t});var vt=gt;const wt=function t(e){const r=new ht(e),i=Object(g.a)(ht.prototype.request,r);return m.a.extend(i,ht.prototype,r,{allOwnKeys:!0}),m.a.extend(i,r,null,{allOwnKeys:!0}),i.create=function(r){return t(at(e,r))},i}(M);wt.Axios=ht,wt.CanceledError=Q,wt.CancelToken=mt,wt.isCancel=V,wt.VERSION="1.6.8",wt.toFormData=v.a,wt.AxiosError=C.a,wt.Cancel=wt.CanceledError,wt.all=function(t){return Promise.all(t)},wt.spread=function(t){return function(e){return t.apply(null,e)}},wt.isAxiosError=function(t){return m.a.isObject(t)&&!0===t.isAxiosError},wt.mergeConfig=at,wt.AxiosHeaders=z,wt.formToJSON=t=>B(m.a.isHTMLForm(t)?new FormData(t):t),wt.getAdapter=it,wt.HttpStatusCode=vt,wt.default=wt;var yt=wt,bt=r(13),_t=r.n(bt),xt=r(66),Rt=r(3),Et={name:"SnippetWidget",components:{Rating:r(6).a,Quickview:f.a},data:function(){return{list:[],glide:null,isVisible:!1,isOpenQuickView:!1,selectedReview:null}},computed:{i19next:()=>Object(Rt.i18n)(xt.a),i19previous:()=>Object(Rt.i18n)(xt.c)},props:{storeId:{type:Number,required:!0},webId:{type:String,required:!0},product:{type:String,required:!0},starColor:{type:String,required:!0},backgroundColor:{type:String,default:"#f8f9fa"},textColor:{type:String,default:"#212529"},border:{type:Boolean,default:!1},borderColor:{type:String,default:"#212529"}},methods:{openQuickview:function({review:t,slide:e}){this.selectedReview=t,this.isOpenQuickView=!0},onCloseQuickview:function(){this.isOpenQuickView=!1,this.selectedReview=null},fetch(){yt({url:At+"/reviews.json",headers:{"X-Store-Id":this.storeId,"X-Web-Id":this.webId},params:{sku:this.product,limit:10,offset:0}}).then(({data:t})=>{if(t&&t.result){const e=t.result.filter(t=>t.body);return this.list=e||[],this.glide=new _t.a("#mt-snippet",{keyboard:!1,rewind:!1,type:"slider",startAt:0,perView:1,touchAngle:0,breakpoints:{1900:{perView:1},1024:{perView:1},600:{perView:1}}}),e}return[]}).then(t=>(t.length>=2&&(this.$refs.wrapper.classList.remove("d-none"),this.glide.mount(),this.isVisible=!0),this)).then(t=>{t.isVisible&&this.glide.update({perView:1})})},getImageUrl:t=>t&&t.pictures&&t.pictures.length&&t.pictures[0].thumb?t.pictures[0].thumb:null,loadWidgetOptions(){this.$refs.wrapper.style.color=this.textColor,this.$refs.wrapper.style.backgroundColor=this.backgroundColor,this.border&&(this.$refs.wrapper.style.border="1px solid "+this.borderColor)}},mounted:function(){this.storeId&&this.webId&&this.product&&(this.fetch(),this.loadWidgetOptions())}},Ct=(r(62),Object(u.a)(Et,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{ref:"wrapper",staticClass:"glide martan-snippets d-none",staticStyle:{"margin-bottom":"1rem",height:"85px"},attrs:{id:"mt-snippet"}},[r("div",{staticClass:"glide__track",attrs:{"data-glide-el":"track"}},[r("ul",{staticClass:"glide__slides"},t._l(t.list,(function(e){return r("li",{key:e.id,staticClass:"glide__slide"},[t.getImageUrl(e)?r("div",{staticClass:"martan-snippets__galery"},[r("img",{attrs:{alt:"Foto da avaliação do produto feita por "+e.display_name,src:t.getImageUrl(e)}})]):t._e(),r("div",{staticClass:"martan-snippets__reviews snippet-review"},[r("div",{staticClass:"martan-snippets__reviews-info snippet-review__info"},[r("span",[t._v(t._s(e.display_name))]),r("rating",{attrs:{rating:e.rating,color:t.starColor}})],1),e.body?r("div",{staticClass:"martan-snippets__reviews-body snippet-review__body"},[r("span",[t._v(t._s(e.body.substring(0,115))+"...")])]):t._e()])])})),0)]),r("div",{staticClass:"martan-snippets__controls",attrs:{"data-glide-el":"controls"}},[t.glide&&t.glide.index>0?r("button",{staticClass:"left",attrs:{title:t.i19previous,"aria-label":t.i19previous,"data-glide-dir":"<"},on:{click:function(e){return t.glide.go("<")}}},[r("i",{staticClass:"i-chevron-left"})]):t._e(),t.glide&&t.glide.index!==t.list.length-1?r("button",{staticClass:"right",attrs:{title:t.i19next,"aria-label":t.i19next,"data-glide-dir":">","data-glide":t.glide.index},on:{click:function(e){return t.glide.go(">")}}},[r("i",{staticClass:"i-chevron-right"})]):t._e()])])}),[],!1,null,"7f2dcccb",null).exports);const At="https://widgets.martan.app/v1";e.default=t=>{t&&t.store_id&&t.web_id?(t.widget_snippet&&t.widget_snippet.is_enabled&&((t={},e="snippet_widget")=>{const r=document.getElementById(e);if(!(t&&r&&r.dataset&&r.dataset.sku))return;const{sku:i}=r.dataset,n=t.store_id,s=t.web_id,a=t.widget_snippet||{},l=a.star_color||null,c=a.border||!1,u=a.background_color||null,d=a.text_color||null,f=a.border_color||null;new IntersectionObserver((t,e)=>{new o.a({render:t=>t(Ct,{props:{product:i,storeId:n,webId:s,starColor:l,border:c,borderColor:f,backgroundColor:u,textColor:d}})}).$mount(r),e.disconnect()}).observe(r)})(t),t.widget_review&&t.widget_review.is_enabled&&((t={},e="reviews_widget")=>{const r=document.getElementById(e);if(!(t&&r&&r.dataset&&r.dataset.product))return;const{product:i}=r.dataset,n=t.store_id,s=t.web_id,a=t.widget_review||{},l=a.star_color||null,c=a.title||null,u=a.header_layout||null,d=a.reviews_layout||null;new IntersectionObserver((t,e)=>{t.forEach((function(t){const{isIntersecting:a,intersectionRatio:f}=t;(!0===a||f>0)&&(new o.a({render:t=>t(p,{props:{product:i,storeId:n,webId:s,title:c,starColor:l,headerLayout:u,reviewsLayout:d}})}).$mount(r),e.disconnect())}))},{rootMargin:"250px"}).observe(r)})(t)):console.error(new Error("Can't setup Martan widget without `martanStoreId` and `martanWidgetKey`"))}},,function(t,e,r){"use strict";r.d(e,"a",(function(){return i})),r.d(e,"b",(function(){return n})),r.d(e,"c",(function(){return o})),r.d(e,"d",(function(){return s}));const i={en_us:"Next",pt_br:"Próximo"},n={en_us:"No",pt_br:"Não"},o={en_us:"Previous",pt_br:"Anterior"},s={en_us:"Yes",pt_br:"Sim"}}]).default}));
10
+ e.read=function(t,e,r,n,i){var o,s,a=8*i-n-1,c=(1<<a)-1,u=c>>1,l=-7,f=r?i-1:0,h=r?-1:1,d=t[e+f];for(f+=h,o=d&(1<<-l)-1,d>>=-l,l+=a;l>0;o=256*o+t[e+f],f+=h,l-=8);for(s=o&(1<<-l)-1,o>>=-l,l+=n;l>0;s=256*s+t[e+f],f+=h,l-=8);if(0===o)o=1-u;else{if(o===c)return s?NaN:1/0*(d?-1:1);s+=Math.pow(2,n),o-=u}return(d?-1:1)*s*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var s,a,c,u=8*o-i-1,l=(1<<u)-1,f=l>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-1,p=n?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=l):(s=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-s))<1&&(s--,c*=2),(e+=s+f>=1?h/c:h*Math.pow(2,1-f))*c>=2&&(s++,c/=2),s+f>=l?(a=0,s=l):s+f>=1?(a=(e*c-1)*Math.pow(2,i),s+=f):(a=e*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;t[r+d]=255&a,d+=p,a/=256,i-=8);for(s=s<<i|a,u+=i;u>0;t[r+d]=255&s,d+=p,s/=256,u-=8);t[r+d-p]|=128*g}},function(t,e){var r={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)}},function(t,e,r){"use strict";r(13)},function(t,e,r){(e=r(8)(!1)).push([t.i,".martan-reviews[data-v-1f781a3f]{color:#444}.martan-reviews .widget-header[data-v-1f781a3f]{align-items:center;display:flex;gap:1rem;justify-content:space-between}.martan-reviews .widget-header__score[data-v-1f781a3f]{max-width:500px;width:100%}.martan-reviews .widget-header__score-average[data-v-1f781a3f]{color:#444;font-size:1.25rem}.martan-reviews .list-expanded[data-v-1f781a3f]{display:flex;flex-direction:column;gap:1rem}.martan-reviews .list-grid[data-v-1f781a3f]{align-items:start;display:grid;gap:1rem;grid-template-columns:repeat(2,1fr);grid-template-rows:masonry;margin:0 auto;max-width:1200px}@media(max-width:768px){.martan-reviews .list-grid[data-v-1f781a3f]{gap:.75rem;grid-template-columns:1fr;grid-template-rows:masonry;max-width:100%}}@media(min-width:769px)and (max-width:1200px){.martan-reviews .list-grid[data-v-1f781a3f]{grid-template-columns:repeat(2,1fr);grid-template-rows:masonry;max-width:100%}}@media(min-width:1201px){.martan-reviews .list-grid[data-v-1f781a3f]{grid-template-columns:repeat(2,minmax(0,580px));grid-template-rows:masonry;justify-content:center}}@supports not (grid-template-rows:masonry){.martan-reviews .list-grid[data-v-1f781a3f]{align-content:flex-start;display:flex;flex-direction:column;flex-wrap:wrap;max-height:none}@media(min-width:769px){.martan-reviews .list-grid[data-v-1f781a3f]{align-content:flex-start;flex-direction:row}}}.martan-reviews .list-grid--masonry-fallback[data-v-1f781a3f]{-moz-column-count:1;column-count:1;-moz-column-gap:1rem;column-gap:1rem;display:block}@media(min-width:769px){.martan-reviews .list-grid--masonry-fallback[data-v-1f781a3f]{-moz-column-count:2;column-count:2}}@media(min-width:1201px){.martan-reviews .list-grid--masonry-fallback[data-v-1f781a3f]{-moz-column-count:2;column-count:2;margin:0 auto;max-width:1200px}}.martan-reviews .list-grid--masonry-fallback .masonry-item[data-v-1f781a3f]{-moz-column-break-inside:avoid;break-inside:avoid;display:inline-block;margin-bottom:1rem;width:100%}.martan-reviews .reviews-with-pictures[data-v-1f781a3f]{background-color:rgba(255,236,219,.102);border:1px solid rgba(255,236,219,.102);border-radius:.25rem;display:flex;flex-direction:column;font-size:80%;gap:.5rem;margin-top:1rem;padding:2rem;width:100%}.martan-reviews .reviews-with-pictures .list[data-v-1f781a3f]{-webkit-overflow-scrolling:touch;display:flex;flex-direction:row;gap:1rem;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none}.martan-reviews .reviews-with-pictures .list[data-v-1f781a3f]::-webkit-scrollbar{display:none}.martan-reviews .reviews-with-pictures .list img[data-v-1f781a3f]{border-radius:.25rem;cursor:pointer;height:80px;-o-object-fit:cover;object-fit:cover;width:80px}.martan-reviews .credit[data-v-1f781a3f]{color:#a1a1aa;font-size:.75rem;line-height:1rem;margin-top:1rem;text-align:right}.martan-reviews .credit a[data-v-1f781a3f]{color:#0f172a!important}.martan-reviews .actions[data-v-1f781a3f]{display:flex;justify-content:center;margin-bottom:1rem;margin-top:1rem}.martan-reviews .review-list-enter-active[data-v-1f781a3f],.martan-reviews .review-list-leave-active[data-v-1f781a3f]{transition:all .3s ease}.martan-reviews .review-list-enter-from[data-v-1f781a3f]{opacity:0;transform:translateY(20px)}.martan-reviews .review-list-leave-to[data-v-1f781a3f]{opacity:0;transform:translateY(-20px)}.martan-reviews .review-list-move[data-v-1f781a3f]{transition:transform .3s ease}",""]),t.exports=e},function(t,e,r){"use strict";r(14)},function(t,e,r){(e=r(8)(!1)).push([t.i,'.martan-questions[data-v-009bb4ce]{margin-bottom:3rem}.martan-questions .questions-search[data-v-009bb4ce]{margin-bottom:20px}.martan-questions .questions-search .search-input-group[data-v-009bb4ce]{max-width:500px}.martan-questions .questions-search .search-input-group .search-input[data-v-009bb4ce]{border:1px solid #e0e0e0;border-radius:8px 0 0 8px;border-right:none;flex:1;font-size:14px;outline:none;padding:12px 16px;transition:border-color .2s}.martan-questions .questions-search .search-input-group .search-input[data-v-009bb4ce]:focus{border-color:#69f}.martan-questions .questions-search .search-input-group .search-input[data-v-009bb4ce]::-moz-placeholder{color:#999}.martan-questions .questions-search .search-input-group .search-input[data-v-009bb4ce]::placeholder{color:#999}.martan-questions .questions-search .search-input-group .search-button[data-v-009bb4ce]{align-items:center;background-color:#69f;border:1px solid #69f;border-radius:0 8px 8px 0;color:#fff;cursor:pointer;display:flex;justify-content:center;padding:12px 16px;transition:background-color .2s}.martan-questions .questions-search .search-input-group .search-button[data-v-009bb4ce]:hover:not(:disabled){background-color:#58e}.martan-questions .questions-search .search-input-group .search-button[data-v-009bb4ce]:disabled{cursor:not-allowed;opacity:.6}.martan-questions .questions-list .question-item[data-v-009bb4ce]{border-bottom:1px solid #f0f0f0;margin-bottom:20px;padding-bottom:20px}.martan-questions .questions-list .question-item[data-v-009bb4ce]:last-child{border-bottom:none;margin-bottom:0;padding-bottom:0}.martan-questions .questions-list .question-item .question-text[data-v-009bb4ce]{color:#333;font-size:.9375rem;font-weight:500;line-height:1.4;margin-bottom:12px}.martan-questions .questions-list .question-item .answer-container[data-v-009bb4ce]{align-items:flex-start;display:flex;margin-top:8px;position:relative}.martan-questions .questions-list .question-item .answer-container .subtle-hook[data-v-009bb4ce]{flex-shrink:0;height:12px;margin-right:16px;margin-top:6px;position:relative;width:12px}.martan-questions .questions-list .question-item .answer-container .subtle-hook .hook-l-shape[data-v-009bb4ce]{height:12px;position:relative;width:12px}.martan-questions .questions-list .question-item .answer-container .subtle-hook .hook-l-shape[data-v-009bb4ce]:before{background-color:#d0d0d0;content:"";height:8px;left:0;position:absolute;top:0;width:1px}.martan-questions .questions-list .question-item .answer-container .subtle-hook .hook-l-shape[data-v-009bb4ce]:after{background-color:#d0d0d0;content:"";height:1px;left:0;position:absolute;top:7px;width:6px}.martan-questions .questions-list .question-item .answer-container .answer-text[data-v-009bb4ce]{color:#666;flex:1;font-weight:300;line-height:1.4}.martan-questions .no-questions[data-v-009bb4ce]{color:#999;font-style:italic;padding:40px 20px;text-align:center}.martan-questions .loading[data-v-009bb4ce]{color:#666;padding:20px;text-align:center}.martan-questions .questions-footer .view-more-link[data-v-009bb4ce]{background:none;border:none;color:#69f;cursor:pointer;font-family:inherit;font-size:14px;padding:0;text-decoration:none}.martan-questions .questions-footer .view-more-link[data-v-009bb4ce]:hover{text-decoration:underline}.martan-questions .questions-footer .view-more-link[data-v-009bb4ce]:focus{border-radius:2px;outline:2px solid #69f;outline-offset:2px}.martan-questions .iframe-container[data-v-009bb4ce]{border:1px solid #e0e0e0;border-radius:4px;margin-top:20px;max-width:580px;overflow:hidden}.martan-questions .iframe-container .question-iframe[data-v-009bb4ce]{border:none;display:block;width:100%}.martan-questions .ask-question-section[data-v-009bb4ce]{margin-top:30px}.martan-questions .ask-question-section .ask-question-button[data-v-009bb4ce]{align-items:center;background-color:#e6f2ff;border:1px solid #b3d9ff;border-radius:8px;color:#69f;cursor:pointer;display:inline-flex;font-size:14px;gap:8px;padding:12px 20px;transition:all .2s}.martan-questions .ask-question-section .ask-question-button[data-v-009bb4ce]:hover{background-color:#d1e7ff;border-color:#9cf}.martan-questions .ask-question-section .ask-question-button svg[data-v-009bb4ce]{flex-shrink:0}.martan-questions .actions[data-v-009bb4ce]{display:flex;justify-content:center;margin-bottom:1rem;margin-top:1rem}',""]),t.exports=e},function(t,e,r){"use strict";r.r(e),r.d(e,"MARTAN_API",(function(){return Et})),r.d(e,"MARTAN_QUESTIONS_WEBUI",(function(){return Rt}));var n={};r.r(n),r.d(n,"hasBrowserEnv",(function(){return b})),r.d(n,"hasStandardBrowserWebWorkerEnv",(function(){return R})),r.d(n,"hasStandardBrowserEnv",(function(){return _}));var i=r(5),o=r.n(i),s=(t={},e,r,n={})=>{const i=document.getElementById(e);if(!(t&&i&&i.dataset&&i.dataset.product))return;const{product:s}=i.dataset,a={store_id:null,web_id:null,widget_key:null,widget_rating:null,widget_review:null,widget_questions:null,...n,...t};if("function"==typeof window.IntersectionObserver){new window.IntersectionObserver((t,e)=>{t.forEach((function(t){const{isIntersecting:n,intersectionRatio:c}=t;(!0===n||c>0)&&(new o.a({render:t=>t(r,{props:{config:a,product:s}})}).$mount(i),e.disconnect())}))},{rootMargin:"250px"}).observe(i)}},a=r(0),c=r(6),u=r(2);function l(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,(function(t){return e[t]}))}function f(t,e){this._pairs=[],t&&Object(u.a)(t,this,e)}const h=f.prototype;h.append=function(t,e){this._pairs.push([t,e])},h.toString=function(t){const e=t?function(e){return t.call(this,e,l)}:l;return this._pairs.map((function(t){return e(t[0])+"="+e(t[1])}),"").join("&")};var d=f;function p(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function g(t,e,r){if(!e)return t;const n=r&&r.encode||p,i=r&&r.serialize;let o;if(o=i?i(e,r):a.a.isURLSearchParams(e)?e.toString():new d(e,r).toString(n),o){const e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+o}return t}var m=class{constructor(){this.handlers=[]}use(t,e,r){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){a.a.forEach(this.handlers,(function(e){null!==e&&t(e)}))}},w=r(1),v={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},y={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:d,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const b="undefined"!=typeof window&&"undefined"!=typeof document,_=(E="undefined"!=typeof navigator&&navigator.product,b&&["ReactNative","NativeScript","NS"].indexOf(E)<0);var E;const R="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts;var x={...n,...y};var S=function(t){function e(t,r,n,i){let o=t[i++];if("__proto__"===o)return!0;const s=Number.isFinite(+o),c=i>=t.length;if(o=!o&&a.a.isArray(n)?n.length:o,c)return a.a.hasOwnProp(n,o)?n[o]=[n[o],r]:n[o]=r,!s;n[o]&&a.a.isObject(n[o])||(n[o]=[]);return e(t,r,n[o],i)&&a.a.isArray(n[o])&&(n[o]=function(t){const e={},r=Object.keys(t);let n;const i=r.length;let o;for(n=0;n<i;n++)o=r[n],e[o]=t[o];return e}(n[o])),!s}if(a.a.isFormData(t)&&a.a.isFunction(t.entries)){const r={};return a.a.forEachEntry(t,(t,n)=>{e(function(t){return a.a.matchAll(/\w+|\[(\w*)]/g,t).map(t=>"[]"===t[0]?"":t[1]||t[0])}(t),n,r,0)}),r}return null};const A={transitional:v,adapter:["xhr","http"],transformRequest:[function(t,e){const r=e.getContentType()||"",n=r.indexOf("application/json")>-1,i=a.a.isObject(t);i&&a.a.isHTMLForm(t)&&(t=new FormData(t));if(a.a.isFormData(t))return n?JSON.stringify(S(t)):t;if(a.a.isArrayBuffer(t)||a.a.isBuffer(t)||a.a.isStream(t)||a.a.isFile(t)||a.a.isBlob(t))return t;if(a.a.isArrayBufferView(t))return t.buffer;if(a.a.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let o;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(t,e){return Object(u.a)(t,new x.classes.URLSearchParams,Object.assign({visitor:function(t,e,r,n){return x.isNode&&a.a.isBuffer(t)?(this.append(e,t.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},e))}(t,this.formSerializer).toString();if((o=a.a.isFileList(t))||r.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return Object(u.a)(o?{"files[]":t}:t,e&&new e,this.formSerializer)}}return i||n?(e.setContentType("application/json",!1),function(t,e,r){if(a.a.isString(t))try{return(e||JSON.parse)(t),a.a.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(r||JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){const e=this.transitional||A.transitional,r=e&&e.forcedJSONParsing,n="json"===this.responseType;if(t&&a.a.isString(t)&&(r&&!this.responseType||n)){const r=!(e&&e.silentJSONParsing)&&n;try{return JSON.parse(t)}catch(t){if(r){if("SyntaxError"===t.name)throw w.a.from(t,w.a.ERR_BAD_RESPONSE,this,null,this.response);throw t}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:x.classes.FormData,Blob:x.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};a.a.forEach(["delete","get","head","post","put","patch"],t=>{A.headers[t]={}});var O=A;const C=a.a.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 T=Symbol("internals");function P(t){return t&&String(t).trim().toLowerCase()}function k(t){return!1===t||null==t?t:a.a.isArray(t)?t.map(k):String(t)}function q(t,e,r,n,i){return a.a.isFunction(n)?n.call(this,e,r):(i&&(e=r),a.a.isString(e)?a.a.isString(n)?-1!==e.indexOf(n):a.a.isRegExp(n)?n.test(e):void 0:void 0)}class j{constructor(t){t&&this.set(t)}set(t,e,r){const n=this;function i(t,e,r){const i=P(e);if(!i)throw new Error("header name must be a non-empty string");const o=a.a.findKey(n,i);(!o||void 0===n[o]||!0===r||void 0===r&&!1!==n[o])&&(n[o||e]=k(t))}const o=(t,e)=>a.a.forEach(t,(t,r)=>i(t,r,e));return a.a.isPlainObject(t)||t instanceof this.constructor?o(t,e):a.a.isString(t)&&(t=t.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim())?o((t=>{const e={};let r,n,i;return t&&t.split("\n").forEach((function(t){i=t.indexOf(":"),r=t.substring(0,i).trim().toLowerCase(),n=t.substring(i+1).trim(),!r||e[r]&&C[r]||("set-cookie"===r?e[r]?e[r].push(n):e[r]=[n]:e[r]=e[r]?e[r]+", "+n:n)})),e})(t),e):null!=t&&i(e,t,r),this}get(t,e){if(t=P(t)){const r=a.a.findKey(this,t);if(r){const t=this[r];if(!e)return t;if(!0===e)return function(t){const e=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(t);)e[n[1]]=n[2];return e}(t);if(a.a.isFunction(e))return e.call(this,t,r);if(a.a.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=P(t)){const r=a.a.findKey(this,t);return!(!r||void 0===this[r]||e&&!q(0,this[r],r,e))}return!1}delete(t,e){const r=this;let n=!1;function i(t){if(t=P(t)){const i=a.a.findKey(r,t);!i||e&&!q(0,r[i],i,e)||(delete r[i],n=!0)}}return a.a.isArray(t)?t.forEach(i):i(t),n}clear(t){const e=Object.keys(this);let r=e.length,n=!1;for(;r--;){const i=e[r];t&&!q(0,this[i],i,t,!0)||(delete this[i],n=!0)}return n}normalize(t){const e=this,r={};return a.a.forEach(this,(n,i)=>{const o=a.a.findKey(r,i);if(o)return e[o]=k(n),void delete e[i];const s=t?function(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,e,r)=>e.toUpperCase()+r)}(i):String(i).trim();s!==i&&delete e[i],e[s]=k(n),r[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return a.a.forEach(this,(r,n)=>{null!=r&&!1!==r&&(e[n]=t&&a.a.isArray(r)?r.join(", "):r)}),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 r=new this(t);return e.forEach(t=>r.set(t)),r}static accessor(t){const e=(this[T]=this[T]={accessors:{}}).accessors,r=this.prototype;function n(t){const n=P(t);e[n]||(!function(t,e){const r=a.a.toCamelCase(" "+e);["get","set","has"].forEach(n=>{Object.defineProperty(t,n+r,{value:function(t,r,i){return this[n].call(this,e,t,r,i)},configurable:!0})})}(r,t),e[n]=!0)}return a.a.isArray(t)?t.forEach(n):n(t),this}}j.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),a.a.reduceDescriptors(j.prototype,({value:t},e)=>{let r=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(t){this[r]=t}}}),a.a.freezeMethods(j);var B=j;function U(t,e){const r=this||O,n=e||r,i=B.from(n.headers);let o=n.data;return a.a.forEach(t,(function(t){o=t.call(r,o,i.normalize(),e?e.status:void 0)})),i.normalize(),o}function N(t){return!(!t||!t.__CANCEL__)}function L(t,e,r){w.a.call(this,null==t?"canceled":t,w.a.ERR_CANCELED,e,r),this.name="CanceledError"}a.a.inherits(L,w.a,{__CANCEL__:!0});var M=L,I=r(7);var F=x.hasStandardBrowserEnv?{write(t,e,r,n,i,o){const s=[t+"="+encodeURIComponent(e)];a.a.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),a.a.isString(n)&&s.push("path="+n),a.a.isString(i)&&s.push("domain="+i),!0===o&&s.push("secure"),document.cookie=s.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:()=>null,remove(){}};function D(t,e){return t&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)?function(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}(t,e):e}var z=x.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),e=document.createElement("a");let r;function n(r){let n=r;return t&&(e.setAttribute("href",n),n=e.href),e.setAttribute("href",n),{href:e.href,protocol:e.protocol?e.protocol.replace(/:$/,""):"",host:e.host,search:e.search?e.search.replace(/^\?/,""):"",hash:e.hash?e.hash.replace(/^#/,""):"",hostname:e.hostname,port:e.port,pathname:"/"===e.pathname.charAt(0)?e.pathname:"/"+e.pathname}}return r=n(window.location.href),function(t){const e=a.a.isString(t)?n(t):t;return e.protocol===r.protocol&&e.host===r.host}}():function(){return!0};var $=function(t,e){t=t||10;const r=new Array(t),n=new Array(t);let i,o=0,s=0;return e=void 0!==e?e:1e3,function(a){const c=Date.now(),u=n[s];i||(i=c),r[o]=a,n[o]=c;let l=s,f=0;for(;l!==o;)f+=r[l++],l%=t;if(o=(o+1)%t,o===s&&(s=(s+1)%t),c-i<e)return;const h=u&&c-u;return h?Math.round(1e3*f/h):void 0}};function Y(t,e){let r=0;const n=$(50,250);return i=>{const o=i.loaded,s=i.lengthComputable?i.total:void 0,a=o-r,c=n(a);r=o;const u={loaded:o,total:s,progress:s?o/s:void 0,bytes:a,rate:c||void 0,estimated:c&&s&&o<=s?(s-o)/c:void 0,event:i};u[e?"download":"upload"]=!0,t(u)}}var Q="undefined"!=typeof XMLHttpRequest&&function(t){return new Promise((function(e,r){let n=t.data;const i=B.from(t.headers).normalize();let o,s,{responseType:c,withXSRFToken:u}=t;function l(){t.cancelToken&&t.cancelToken.unsubscribe(o),t.signal&&t.signal.removeEventListener("abort",o)}if(a.a.isFormData(n))if(x.hasStandardBrowserEnv||x.hasStandardBrowserWebWorkerEnv)i.setContentType(!1);else if(!1!==(s=i.getContentType())){const[t,...e]=s?s.split(";").map(t=>t.trim()).filter(Boolean):[];i.setContentType([t||"multipart/form-data",...e].join("; "))}let f=new XMLHttpRequest;if(t.auth){const e=t.auth.username||"",r=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";i.set("Authorization","Basic "+btoa(e+":"+r))}const h=D(t.baseURL,t.url);function d(){if(!f)return;const n=B.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders());!function(t,e,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?e(new w.a("Request failed with status code "+r.status,[w.a.ERR_BAD_REQUEST,w.a.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):t(r)}((function(t){e(t),l()}),(function(t){r(t),l()}),{data:c&&"text"!==c&&"json"!==c?f.response:f.responseText,status:f.status,statusText:f.statusText,headers:n,config:t,request:f}),f=null}if(f.open(t.method.toUpperCase(),g(h,t.params,t.paramsSerializer),!0),f.timeout=t.timeout,"onloadend"in f?f.onloadend=d:f.onreadystatechange=function(){f&&4===f.readyState&&(0!==f.status||f.responseURL&&0===f.responseURL.indexOf("file:"))&&setTimeout(d)},f.onabort=function(){f&&(r(new w.a("Request aborted",w.a.ECONNABORTED,t,f)),f=null)},f.onerror=function(){r(new w.a("Network Error",w.a.ERR_NETWORK,t,f)),f=null},f.ontimeout=function(){let e=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const n=t.transitional||v;t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),r(new w.a(e,n.clarifyTimeoutError?w.a.ETIMEDOUT:w.a.ECONNABORTED,t,f)),f=null},x.hasStandardBrowserEnv&&(u&&a.a.isFunction(u)&&(u=u(t)),u||!1!==u&&z(h))){const e=t.xsrfHeaderName&&t.xsrfCookieName&&F.read(t.xsrfCookieName);e&&i.set(t.xsrfHeaderName,e)}void 0===n&&i.setContentType(null),"setRequestHeader"in f&&a.a.forEach(i.toJSON(),(function(t,e){f.setRequestHeader(e,t)})),a.a.isUndefined(t.withCredentials)||(f.withCredentials=!!t.withCredentials),c&&"json"!==c&&(f.responseType=t.responseType),"function"==typeof t.onDownloadProgress&&f.addEventListener("progress",Y(t.onDownloadProgress,!0)),"function"==typeof t.onUploadProgress&&f.upload&&f.upload.addEventListener("progress",Y(t.onUploadProgress)),(t.cancelToken||t.signal)&&(o=e=>{f&&(r(!e||e.type?new M(null,t,f):e),f.abort(),f=null)},t.cancelToken&&t.cancelToken.subscribe(o),t.signal&&(t.signal.aborted?o():t.signal.addEventListener("abort",o)));const p=function(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}(h);p&&-1===x.protocols.indexOf(p)?r(new w.a("Unsupported protocol "+p+":",w.a.ERR_BAD_REQUEST,t)):f.send(n||null)}))};const H={http:I.a,xhr:Q};a.a.forEach(H,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(t){}Object.defineProperty(t,"adapterName",{value:e})}});const J=t=>"- "+t,V=t=>a.a.isFunction(t)||null===t||!1===t;var W=t=>{t=a.a.isArray(t)?t:[t];const{length:e}=t;let r,n;const i={};for(let o=0;o<e;o++){let e;if(r=t[o],n=r,!V(r)&&(n=H[(e=String(r)).toLowerCase()],void 0===n))throw new w.a(`Unknown adapter '${e}'`);if(n)break;i[e||"#"+o]=n}if(!n){const t=Object.entries(i).map(([t,e])=>`adapter ${t} `+(!1===e?"is not supported by the environment":"is not available in the build"));let r=e?t.length>1?"since :\n"+t.map(J).join("\n"):" "+J(t[0]):"as no adapter specified";throw new w.a("There is no suitable adapter to dispatch the request "+r,"ERR_NOT_SUPPORT")}return n};function K(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new M(null,t)}function X(t){K(t),t.headers=B.from(t.headers),t.data=U.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1);return W(t.adapter||O.adapter)(t).then((function(e){return K(t),e.data=U.call(t,t.transformResponse,e),e.headers=B.from(e.headers),e}),(function(e){return N(e)||(K(t),e&&e.response&&(e.response.data=U.call(t,t.transformResponse,e.response),e.response.headers=B.from(e.response.headers))),Promise.reject(e)}))}const G=t=>t instanceof B?{...t}:t;function Z(t,e){e=e||{};const r={};function n(t,e,r){return a.a.isPlainObject(t)&&a.a.isPlainObject(e)?a.a.merge.call({caseless:r},t,e):a.a.isPlainObject(e)?a.a.merge({},e):a.a.isArray(e)?e.slice():e}function i(t,e,r){return a.a.isUndefined(e)?a.a.isUndefined(t)?void 0:n(void 0,t,r):n(t,e,r)}function o(t,e){if(!a.a.isUndefined(e))return n(void 0,e)}function s(t,e){return a.a.isUndefined(e)?a.a.isUndefined(t)?void 0:n(void 0,t):n(void 0,e)}function c(r,i,o){return o in e?n(r,i):o in t?n(void 0,r):void 0}const u={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:c,headers:(t,e)=>i(G(t),G(e),!0)};return a.a.forEach(Object.keys(Object.assign({},t,e)),(function(n){const o=u[n]||i,s=o(t[n],e[n],n);a.a.isUndefined(s)&&o!==c||(r[n]=s)})),r}const tt={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{tt[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const et={};tt.transitional=function(t,e,r){function n(t,e){return"[Axios v1.6.8] Transitional option '"+t+"'"+e+(r?". "+r:"")}return(r,i,o)=>{if(!1===t)throw new w.a(n(i," has been removed"+(e?" in "+e:"")),w.a.ERR_DEPRECATED);return e&&!et[i]&&(et[i]=!0,console.warn(n(i," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(r,i,o)}};var rt={assertOptions:function(t,e,r){if("object"!=typeof t)throw new w.a("options must be an object",w.a.ERR_BAD_OPTION_VALUE);const n=Object.keys(t);let i=n.length;for(;i-- >0;){const o=n[i],s=e[o];if(s){const e=t[o],r=void 0===e||s(e,o,t);if(!0!==r)throw new w.a("option "+o+" must be "+r,w.a.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new w.a("Unknown option "+o,w.a.ERR_BAD_OPTION)}},validators:tt};const nt=rt.validators;class it{constructor(t){this.defaults=t,this.interceptors={request:new m,response:new m}}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 r=e.stack?e.stack.replace(/^.+\n/,""):"";t.stack?r&&!String(t.stack).endsWith(r.replace(/^.+\n.+\n/,""))&&(t.stack+="\n"+r):t.stack=r}throw t}}_request(t,e){"string"==typeof t?(e=e||{}).url=t:e=t||{},e=Z(this.defaults,e);const{transitional:r,paramsSerializer:n,headers:i}=e;void 0!==r&&rt.assertOptions(r,{silentJSONParsing:nt.transitional(nt.boolean),forcedJSONParsing:nt.transitional(nt.boolean),clarifyTimeoutError:nt.transitional(nt.boolean)},!1),null!=n&&(a.a.isFunction(n)?e.paramsSerializer={serialize:n}:rt.assertOptions(n,{encode:nt.function,serialize:nt.function},!0)),e.method=(e.method||this.defaults.method||"get").toLowerCase();let o=i&&a.a.merge(i.common,i[e.method]);i&&a.a.forEach(["delete","get","head","post","put","patch","common"],t=>{delete i[t]}),e.headers=B.concat(o,i);const s=[];let c=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(c=c&&t.synchronous,s.unshift(t.fulfilled,t.rejected))}));const u=[];let l;this.interceptors.response.forEach((function(t){u.push(t.fulfilled,t.rejected)}));let f,h=0;if(!c){const t=[X.bind(this),void 0];for(t.unshift.apply(t,s),t.push.apply(t,u),f=t.length,l=Promise.resolve(e);h<f;)l=l.then(t[h++],t[h++]);return l}f=s.length;let d=e;for(h=0;h<f;){const t=s[h++],e=s[h++];try{d=t(d)}catch(t){e.call(this,t);break}}try{l=X.call(this,d)}catch(t){return Promise.reject(t)}for(h=0,f=u.length;h<f;)l=l.then(u[h++],u[h++]);return l}getUri(t){return g(D((t=Z(this.defaults,t)).baseURL,t.url),t.params,t.paramsSerializer)}}a.a.forEach(["delete","get","head","options"],(function(t){it.prototype[t]=function(e,r){return this.request(Z(r||{},{method:t,url:e,data:(r||{}).data}))}})),a.a.forEach(["post","put","patch"],(function(t){function e(e){return function(r,n,i){return this.request(Z(i||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}it.prototype[t]=e(),it.prototype[t+"Form"]=e(!0)}));var ot=it;class st{constructor(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");let e;this.promise=new Promise((function(t){e=t}));const r=this;this.promise.then(t=>{if(!r._listeners)return;let e=r._listeners.length;for(;e-- >0;)r._listeners[e](t);r._listeners=null}),this.promise.then=t=>{let e;const n=new Promise(t=>{r.subscribe(t),e=t}).then(t);return n.cancel=function(){r.unsubscribe(e)},n},t((function(t,n,i){r.reason||(r.reason=new M(t,n,i),e(r.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}static source(){let t;return{token:new st((function(e){t=e})),cancel:t}}}var at=st;const ct={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(ct).forEach(([t,e])=>{ct[e]=t});var ut=ct;const lt=function t(e){const r=new ot(e),n=Object(c.a)(ot.prototype.request,r);return a.a.extend(n,ot.prototype,r,{allOwnKeys:!0}),a.a.extend(n,r,null,{allOwnKeys:!0}),n.create=function(r){return t(Z(e,r))},n}(O);lt.Axios=ot,lt.CanceledError=M,lt.CancelToken=at,lt.isCancel=N,lt.VERSION="1.6.8",lt.toFormData=u.a,lt.AxiosError=w.a,lt.Cancel=lt.CanceledError,lt.all=function(t){return Promise.all(t)},lt.spread=function(t){return function(e){return t.apply(null,e)}},lt.isAxiosError=function(t){return a.a.isObject(t)&&!0===t.isAxiosError},lt.mergeConfig=Z,lt.AxiosHeaders=B,lt.formToJSON=t=>S(a.a.isHTMLForm(t)?new FormData(t):t),lt.getAdapter=W,lt.HttpStatusCode=ut,lt.default=lt;var ft=lt,ht=r(10),dt=r(4),pt={name:"Rating",props:{...dt.a,rating:{type:Number,default:0},totalReviews:{type:Number,default:0}},data:()=>({stars:Array(5).fill(0)}),mounted(){this.updateStars()},computed:{isCompact(){return"compact"===this.config.widget_rating.theme},fontSize(){const t=this.config.widget_rating.font_size;return t?"number"==typeof t?t+"px":t:this.isCompact?"16px":"14px"},fontSizeNumber(){const t=this.config.widget_rating.font_size;if(!t)return this.isCompact?16:14;if("number"==typeof t)return t;const e=String(t).match(/^(\d+(?:\.\d+)?)/);return e?parseFloat(e[1]):this.isCompact?16:14},compactFillPercentage(){const t=Math.max(0,Math.min(5,this.rating));return t<=2?t/2*25:t<=3?25+(t-2)/1.5*20:t<=4.5?45+(t-3.5)/1*25:70+(t-4.5)/.5*30},starColor(){return this.config.widget_rating.star_color||"#ffc107"},ratingText(){return this.formatNumber(this.totalReviews)},colorClosest(){return Object(ht.a)(this.config.widget_rating.star_color,.3)},normalizeRating(){return Number.isInteger(this.rating)?this.rating:Number(this.rating.toFixed(1))}},methods:{lightenColor:ht.a,formatNumber:t=>t>=1e6?(t/1e6).toFixed(1).replace(/\.0$/,"")+"M":t>=1e3?(t/1e3).toFixed(1).replace(/\.0$/,"")+"k":t.toString(),updateStars(){const t=Math.max(0,Math.min(5,this.rating));this.stars=Array(5).fill(0).map((e,r)=>t>=r+1?1:t>r?.5:0)},getStarClass:t=>1===t?"icon-tabler-star-filled":.5===t?"icon-tabler-star-half":"icon-tabler-star",getStarFill(t,e){return 1===t?this.starColor:.5===t?`url(#gradient-${e})`:"none"}},watch:{rating:"updateStars"}},gt=(r(15),r(3)),mt=Object(gt.a)(pt,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("span",{staticClass:"martan-rating",class:{"martan-rating--compact":t.isCompact}},[t.isCompact?[r("div",{staticClass:"martan-rating-compact"},[r("svg",{staticClass:"icon icon-tabler martan-rating-compact__star",style:{color:t.config.widget_rating.star_color},attrs:{xmlns:"http://www.w3.org/2000/svg",width:t.fontSizeNumber,height:t.fontSizeNumber,viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"}},[r("defs",[r("linearGradient",{attrs:{id:"compact-gradient-"+t._uid,x1:"0%",y1:"0%",x2:"100%",y2:"0%"}},[r("stop",{style:"stop-color:"+t.config.widget_rating.star_color+";stop-opacity:1",attrs:{offset:"0%"}}),r("stop",{style:"stop-color:"+t.config.widget_rating.star_color+";stop-opacity:1",attrs:{offset:t.compactFillPercentage+"%"}}),r("stop",{style:"stop-color:"+t.config.widget_rating.star_color+";stop-opacity:0",attrs:{offset:t.compactFillPercentage+"%"}}),r("stop",{style:"stop-color:"+t.config.widget_rating.star_color+";stop-opacity:0",attrs:{offset:"100%"}})],1)],1),r("path",{attrs:{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}}),r("path",{attrs:{d:"M8.243 7.34l-6.38 .925l-.113 .023a1 1 0 0 0 -.44 1.684l4.622 4.499l-1.09 6.355l-.013 .11a1 1 0 0 0 1.464 .944l5.706 -3l5.693 3l.1 .046a1 1 0 0 0 1.352 -1.1l-1.091 -6.355l4.624 -4.5l.078 -.085a1 1 0 0 0 -.633 -1.62l-6.38 -.926l-2.852 -5.78a1 1 0 0 0 -1.794 0l-2.853 5.78z",fill:"url(#compact-gradient-"+t._uid+")"}})]),r("span",{staticClass:"martan-rating-compact__text",style:{fontSize:t.fontSize}},[t._v(t._s(t.normalizeRating)+" / 5")])])]:[t._l(t.stars,(function(e,n){return r("svg",{key:n,staticClass:"icon icon-tabler",class:t.getStarClass(e),style:{color:t.config.widget_rating.star_color},attrs:{xmlns:"http://www.w3.org/2000/svg",width:t.fontSizeNumber,height:t.fontSizeNumber,viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:t.getStarFill(e,n),"stroke-linecap":"round","stroke-linejoin":"round"}},[.5===e?r("defs",[r("linearGradient",{attrs:{id:"gradient-"+n,x1:"0%",y1:"0%",x2:"100%",y2:"0%"}},[r("stop",{style:"stop-color:"+t.config.widget_rating.star_color+";stop-opacity:1",attrs:{offset:"50%"}}),r("stop",{style:"stop-color:"+t.config.widget_rating.star_color+";stop-opacity:0",attrs:{offset:"50%"}})],1)],1):t._e(),r("path",{attrs:{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}}),r("path",{attrs:{d:"M8.243 7.34l-6.38 .925l-.113 .023a1 1 0 0 0 -.44 1.684l4.622 4.499l-1.09 6.355l-.013 .11a1 1 0 0 0 1.464 .944l5.706 -3l5.693 3l.1 .046a1 1 0 0 0 1.352 -1.1l-1.091 -6.355l4.624 -4.5l.078 -.085a1 1 0 0 0 -.633 -1.62l-6.38 -.926l-2.852 -5.78a1 1 0 0 0 -1.794 0l-2.853 5.78z",fill:t.getStarFill(e,n)}})])})),r("span",{staticClass:"martan-rating-text",style:{color:"var(--gray-dark)",fontSize:t.fontSize}},[t._v(t._s(t.normalizeRating)+" / 5")]),r("span",{staticClass:"martan-rating-text",style:{color:"var(--gray)",fontSize:t.fontSize}},[t._v("("+t._s(t.totalReviews)+")")])]],2)}),[],!1,null,null,null).exports;var wt=class{constructor(t){this.list=[],this.offset=0,this.loading=!1,this.options=t}async init(){try{await this.fetchRatings(),await this.mounted(),this.listenerForSearchPage()}catch(t){console.error("@Martan/Ratings init error",t)}}async fetchRatings(){if(this.loading)return Promise.resolve();if(this.loading=!0,this.loadFromLocalStorage())return this.loading=!1,Promise.resolve();return ft({url:Et+"/api/v1/ratings.json?expand=metrics",headers:{"X-Store-Id":this.options.store_id,"X-Api-Key":this.options.web_id}}).then(({data:t})=>(this.list=t.result||[],this.saveToLocalStorage({result:t.result,timestamp:Date.now()}))).catch(t=>{console.error("Ratings fetchRatings error",t)})}loadFromLocalStorage(){try{const t=window.localStorage.getItem("martan_ratings");if(t){const e=JSON.parse(t);return!!(e&&e.result&&e.timestamp&&Date.now()-e.timestamp<864e5)&&(this.list=e.result,!0)}}catch(t){return console.error("Ratings loadFromLocalStorage error",t),!1}}saveToLocalStorage(t){window.localStorage.setItem("martan_ratings",JSON.stringify(t))}getProductRatingFromList(t){return t&&this.list&&0!==this.list.length?this.list.find(e=>e.sku===t):null}getClasses(){const t=[".product-card__rating",".mt-review-average"];return this.options.widget_rating.custom_class&&t.push(this.options.widget_rating.custom_class),t}async mounted(){const t=this.getClasses(),e=document.querySelectorAll(t.join(",")),r=[];Array.from(e).forEach(t=>{r.push(this.renderRating(t))}),await Promise.all(r).then(()=>{this.listenerForNewRatings()})}async renderRating(t){return new Promise(e=>{if(!t.dataset)return e();const r=this.getProductFromElement(t);if(!r)return e();const n=this.getProductRatingFromList(r);if(n&&0===n.total&&"gt1"===this.options.widget_rating.display||!n&&"gt1"===this.options.widget_rating.display)return e();const i=document.createElement("div"),s=this.options;return new o.a({render:t=>t(mt,{props:{rating:n&&n.average?n.average:0,totalReviews:n&&n.total?n.total:0,config:s}})}).$mount(t),t.setAttribute("data-martan-rating-id",this.generateId()),t.appendChild(i),e()})}generateId(t){return Math.random().toString(36).replace("0.",t||"")}listenerForNewRatings(){new window.MutationObserver(this.callbackForNewRatings.bind(this)).observe(document.body,{childList:!0,attributes:!1,subtree:!1})}callbackForNewRatings(t,e){t.forEach(t=>{"childList"===t.type&&t.addedNodes.forEach(t=>{this.isMartanElement(t)&&this.getProductFromElement(t)&&this.renderRating(t)})})}isMartanElement(t){let e=!1;const r=this.getClasses();return t.classList.length&&t.classList.forEach(t=>{r.includes(t)&&(e=!0)}),e}getProductFromElement(t){return t.dataset&&(t.dataset.martanProductId||t.dataset.product||t.dataset.sku||t.dataset.martanProductSku)||null}listenerForSearchPage(){const t=document.getElementById("search-engine");if(!t||!this.options.widget_rating.search_page)return!1;const e=new window.MutationObserver(()=>{e.disconnect();const r=t.querySelectorAll(".search-engine__retail > .row")[0],n=new window.MutationObserver(()=>{setTimeout(()=>{this.mounted()},100),n.disconnect()});n.observe(r,{childList:!0,subtree:!0})});e.observe(t,{attributes:!0,childList:!0})}},vt={name:"Reviews",props:{...dt.a,product:{type:String,required:!0}},data:()=>({list:[],total:0,limit:4,offset:0,loading:!1,orderRating:null,orderReviews:null,$isSorting:!1,$count:null,hasMore:!1,averageTotal:0,totalRecommended:null,average:{one:0,two:0,three:0,four:0,five:0},isOpenQuickView:!1,selectedReview:null,isScrollable:!1,$listEl:null}),watch:{onlyWithPictures:function(t){!this.$listEl&&t.length>0&&(this.$listEl=document.querySelector(".reviews-with-pictures"))},orderRating:function(t,e){t!==e&&(this.list=[],this.fetchReviews())},orderReviews:function(t,e){t!==e&&(this.list=[],this.fetchReviews())},limit:function(){this.fetchReviews()},offset:function(){this.fetchReviews()}},computed:{i19basedOn$1Reviews:()=>"Baseado em $1 avaliações",i19basedOn$1Review:()=>"Baseado em $1 avaliação",i19noReview:()=>"Nenhuma avaliação",onlyWithPictures(){return this.list.filter(t=>t.pictures&&t.pictures.length>0)},getUrl:()=>"https://www.martan.app/?ref="+new URL(window.location.href).origin,title(){return this.config.widget_review.title?this.config.widget_review.title:null}},methods:{fetchReviews(){const t={limit:this.limit,offset:this.offset,sku:this.product};this.orderReviews&&(t.orderBy=this.orderReviews,t.limit=this.limit,t.offset=0),this.orderRating&&(t.rating=this.orderRating),this.$count=null,this.loading=!0,axios({url:Et+"/api/v1/reviews.json",headers:{"X-Store-Id":this.config.store_id,"X-Api-Key":this.config.web_id},params:t}).then(({data:t})=>{const{result:e,count:r}=t;let n=[];if(this.hasMore=e.length>=this.limit,Array.isArray(this.list)&&!this.orderReviews||this.orderReviews&&this.$isSorting){for(const t of e){this.list.some(e=>e.id===t.id)||this.list.push(t)}n=[...this.list]}else(Array.isArray(this.list)&&this.orderReviews||this.orderRating)&&(n=e,this.$isSorting=!1);return{count:r,list:n}}).then(({count:t,list:e})=>(this.orderRating?this.$count=t:this.total=t,this.list=e,e)).catch(t=>{console.error("Failed to load resource from Martan",t)}).finally(()=>{this.loading=!1})},async fetchAverage(){try{const t=new wt({store_id:this.config.store_id,web_id:this.config.web_id});await t.fetchRatings();const e=t.getProductRatingFromList(this.product);if(e){const{average:t,rate:r,recommended_percentage:n}=e;Object.assign(this.average,r),this.averageTotal=t,this.totalRecommended=n}}catch(t){console.error("Failed to load average from Martan",t)}},loadMore(){this.orderReviews?this.limit=this.limit+this.limit:this.offset++},showLoadMore(){return!this.loading&&(!!this.hasMore&&(this.orderRating?this.$count>0&&this.list.length<this.$count:this.total>0&&this.list.length<this.total))},updateOrderBy(t){t===this.orderRating?this.orderRating=null:(this.offset=0,this.orderRating=t),this.hasMore=!0},onSort({order:t}){this.orderReviews=t,this.hasMore=!0},openQuickview:function({review:t}){this.selectedReview=t,this.isOpenQuickView=!0},onCloseQuickview:function(){this.isOpenQuickView=!1,this.selectedReview=null},checkScrollability(){const t=this.$listEl;t&&(this.isScrollable=t.scrollWidth>t.clientWidth)},scrollLeft(){const t=this.$listEl;t&&t.scrollBy({left:-1500,behavior:"smooth"})},scrollRight(){const t=this.$listEl;t&&t.scrollBy({left:1500,behavior:"smooth"})},initMasonry(){if(CSS.supports("grid-template-rows","masonry")){const t=this.$el.querySelector(".list-grid");t&&t.classList.remove("list-grid--masonry-fallback")}else{const t=this.$el.querySelector(".list-grid");if(t){t.classList.add("list-grid--masonry-fallback");t.querySelectorAll("review-card").forEach(t=>{t.classList.add("masonry-item")})}}}},mounted(){Promise.all([this.fetchAverage(),this.fetchReviews()]).then(()=>{this.checkScrollability(),this.initMasonry(),window.addEventListener("resize",()=>{this.checkScrollability(),this.initMasonry()})})},beforeDestroy(){window.removeEventListener("resize",this.checkScrollability)},components:{ReviewCard:()=>Promise.all([r.e(0),r.e(5)]).then(r.bind(null,75)),Quickview:()=>Promise.all([r.e(0),r.e(9),r.e(2)]).then(r.bind(null,101)),Compact:()=>r.e(3).then(r.bind(null,102)),Center:()=>r.e(4).then(r.bind(null,105)),Summary:()=>r.e(6).then(r.bind(null,106)),Padrao:()=>r.e(8).then(r.bind(null,103)),Histogram:()=>r.e(7).then(r.bind(null,104))}},yt=(r(21),Object(gt.a)(vt,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{directives:[{name:"show",rawName:"v-show",value:t.total>0,expression:"total > 0"}],staticClass:"martan-reviews container"},[t.title?r("p",{staticClass:"lead"},[r("a",{attrs:{href:"#reviews",name:t.title||"reviews"}},[t._v("#")]),t._v(" "+t._s(t.title)+" ")]):t._e(),r(t.config.widget_review.header_layout,{tag:"component",attrs:{config:t.config,rating:t.average,recommended:t.totalRecommended,average:t.averageTotal,"total-rating":t.total,list:t.list,"order-rating":t.orderRating,offset:t.offset},on:{"rating-selected":t.updateOrderBy}}),r("div",{class:t.config.widget_review.reviews_layout},[r("transition-group",{class:t.config.widget_review.reviews_layout,attrs:{name:"review-list",tag:"div"}},t._l(t.list,(function(e){return r("review-card",{key:e.id,staticClass:"masonry-item",attrs:{review:e,"star-color":t.config.widget_review.star_color},on:{openQuickview:t.openQuickview}})})),1)],1),t.showLoadMore()?r("div",{staticClass:"actions"},[r("div",{staticClass:"pagination"},[r("button",{staticClass:"btn btn-primary",attrs:{disabled:t.loading},on:{click:t.loadMore}},[t._v(" "+t._s(t.loading?"Carregando..":"Mostrar mais avaliações")+" ")])])]):t._e(),r("Quickview",{attrs:{isOpen:t.isOpenQuickView,review:t.selectedReview,starColor:t.config.widget_review.star_color},on:{onClose:t.onCloseQuickview}}),r("div",{staticClass:"credit"},[t._v(" Avaliações reais, auditadas por "),r("a",{attrs:{href:t.getUrl,target:"_blank",rel:"noopener"}},[t._v("MARTAN.app")])])],1)}),[],!1,null,"1f781a3f",null).exports),bt={name:"Questions",props:{...dt.a,product:{type:String,required:!0}},data:()=>({list:[],total:0,limit:4,offset:0,searchQuery:"",loading:!1,searchTimeout:null,showIframe:!1,iframeError:null,iframeHeight:215}),computed:{title(){const t=this.config||{};return t.widget_questions&&t.widget_questions.title?t.widget_questions.title:null},iframeUrl(){let t=null,e=null;if(window.storefront&&window.storefront.settings&&(e=encodeURIComponent(`https://${window.storefront.settings.domain}/storefront.css`),t=window.storefront.settings.domain),!window.storefront||!window.storefront.context||!window.storefront.context.body)return"";const r=window.storefront.context.body._id,n=window.storefront.context.body.sku,i=this.config.web_id,o=this.config.store_id,s=window.location.origin||t;return`${Rt}/?product=${r}&sku=${n}&web_id=${i}&store_id=${o}&origin=${encodeURIComponent(s)}&stylesheet=${e}`}},watch:{searchQuery(t){if(this.searchTimeout&&clearTimeout(this.searchTimeout),!t.trim())return this.offset=0,void this.fetchQuestions();this.searchTimeout=setTimeout(()=>{this.offset=0,this.fetchQuestions()},500)}},mounted(){this.fetchQuestions(),this.setupIframeMessageListener()},beforeDestroy(){this.searchTimeout&&clearTimeout(this.searchTimeout),this.removeIframeMessageListener()},methods:{fetchQuestions(){const t={limit:this.limit,offset:this.offset,sku:this.product,expand:"reply"};this.searchQuery.trim()&&(t.terms=this.searchQuery.trim()),this.loading=!0,axios({url:Et+"/api/v1/questions.json",headers:{"X-Store-Id":this.config.store_id,"X-Api-Key":this.config.web_id},params:t}).then(({data:t})=>{const{result:e,meta:r}=t;0===this.offset?this.list=e:this.list=[...this.list,...e],this.total=r.count}).finally(()=>{this.loading=!1})},loadMoreQuestions(){this.offset+=this.limit,this.fetchQuestions()},askQuestion(){this.showIframe=!this.showIframe,this.showIframe&&(this.iframeError=null)},handleIframeError(){this.iframeError="Erro ao carregar o iframe. Verifique se o servidor está rodando e se não há restrições de X-Frame-Options."},clearSearch(){this.searchQuery="",this.offset=0,this.fetchQuestions()},setupIframeMessageListener(){this.messageHandler=t=>{"iframe_height_change"===t.data.type&&(this.iframeHeight=t.data.height)},window.addEventListener("message",this.messageHandler)},removeIframeMessageListener(){this.messageHandler&&window.removeEventListener("message",this.messageHandler)}}},_t=(r(23),Object(gt.a)(bt,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return t.config.widget_questions.is_enabled?r("div",{staticClass:"martan-questions container"},[t.title?r("p",{staticClass:"lead"},[r("a",{attrs:{href:"#questions",name:t.title||"Perguntas e respostas"}},[t._v("#")]),t._v(" "+t._s(t.title)+" ")]):t._e(),r("div",{staticClass:"questions-search"},[r("div",{staticClass:"search-input-group"},[r("input",{directives:[{name:"model",rawName:"v-model",value:t.searchQuery,expression:"searchQuery"}],staticClass:"form-control",attrs:{type:"text",placeholder:"Busque uma pergunta ou palavra-chave..."},domProps:{value:t.searchQuery},on:{input:function(e){e.target.composing||(t.searchQuery=e.target.value)}}}),t.config.widget_questions.enable_new_questions?r("div",{staticClass:"questions-footer"},[r("button",{staticClass:"view-more-link",attrs:{type:"button","aria-expanded":t.showIframe,"aria-controls":"question-iframe","aria-label":"Abrir formulário para fazer uma nova pergunta"},on:{click:t.askQuestion}},[t._v(" Não encontrou a resposta para sua pergunta? Faça uma pergunta. ")])]):t._e(),t.showIframe?r("div",{staticClass:"iframe-container"},[r("iframe",{staticClass:"question-iframe",attrs:{id:"question-iframe",src:t.iframeUrl,width:"580",height:t.iframeHeight,frameborder:"0",title:"Formulário para fazer nova pergunta"},on:{error:t.handleIframeError}})]):t._e()])]),t.list.length>0?r("div",{staticClass:"questions-list"},t._l(t.list,(function(e){return r("div",{key:e._id,staticClass:"question-item"},[r("div",{staticClass:"question-text"},[t._v(" "+t._s(e.body)+" ")]),e.reply?r("div",{staticClass:"answer-container"},[t._m(0,!0),r("div",{staticClass:"answer-text"},[t._v(" "+t._s(e.reply.body)+" ")])]):t._e()])})),0):t.loading||0!==t.list.length?t._e():r("div",{staticClass:"no-questions"},[t._v(" Nenhuma pergunta encontrada para este produto. ")]),t.loading?r("div",{staticClass:"loading"},[t._v(" Carregando perguntas... ")]):t._e(),t.list.length<t.total?r("div",{staticClass:"actions"},[r("div",{staticClass:"pagination"},[r("button",{staticClass:"btn btn-primary",attrs:{disabled:t.loading},on:{click:t.loadMoreQuestions}},[t._v(" "+t._s(t.loading?"Carregando..":"Mostrar mais perguntas")+" ")])])]):t._e()]):t._e()}),[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"subtle-hook"},[e("div",{staticClass:"hook-l-shape"})])}],!1,null,"009bb4ce",null).exports);const Et="https://widgets.appmartan.com.br",Rt="https://create-questions.martan.app";e.default=t=>{t&&t.store_id&&t.web_id?(t.widget_questions&&t.widget_questions.is_enabled&&((t={},e="questions_widget")=>{s(t,e,_t,{widget_questions:null})})(t),t.widget_review&&t.widget_review.is_enabled&&((t={},e="reviews_widget")=>{s(t,e,yt)})(t),t.widget_rating&&t.widget_rating.is_enabled&&new wt(t).init()):console.error(new Error("Can't setup Martan widget without `martanStoreId` and `martanWebId`"))}},function(t,r){t.exports=e},function(t,e){t.exports=r},function(t,e){t.exports=n}]).default}));
11
11
  //# sourceMappingURL=widget-martan.min.js.map