@htmlbricks/hb-checkout-shopping-cart 0.16.21 → 0.16.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +4 -4
- package/release/manifest.json +1 -1
- package/release/release.js +1 -1
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@htmlbricks/hb-checkout-shopping-cart",
|
|
3
3
|
"displayName": "Svelte Shopping Cart WebComponent",
|
|
4
4
|
"description": "Svelte Shopping Cart WebComponent",
|
|
5
|
-
"version": "0.16.
|
|
5
|
+
"version": "0.16.25",
|
|
6
6
|
"main": "release/release.js",
|
|
7
7
|
"publishConfig": {
|
|
8
8
|
"access": "public"
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"prepublish": "npm run build:release"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@htmlbricks/hb-jsutils": "^0.16.
|
|
33
|
+
"@htmlbricks/hb-jsutils": "^0.16.25",
|
|
34
34
|
"@htmlbricks/manifester": "^0.0.22",
|
|
35
35
|
"@rollup/plugin-alias": "^3.1.2",
|
|
36
36
|
"@rollup/plugin-commonjs": "^18.0.0",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"typescript-transform-paths": "^2.2.3"
|
|
71
71
|
},
|
|
72
72
|
"dependencies": {
|
|
73
|
-
"@htmlbricks/hb-table": "^0.16.
|
|
73
|
+
"@htmlbricks/hb-table": "^0.16.25",
|
|
74
74
|
"dayjs": "^1.10.7",
|
|
75
75
|
"debounce": "^1.2.1"
|
|
76
76
|
},
|
|
@@ -81,5 +81,5 @@
|
|
|
81
81
|
"html5-webcomponents"
|
|
82
82
|
],
|
|
83
83
|
"contributors": [],
|
|
84
|
-
"gitHead": "
|
|
84
|
+
"gitHead": "3d8ccee10256cff1a553f2082eaf53f4bba035c9"
|
|
85
85
|
}
|
package/release/manifest.json
CHANGED
package/release/release.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var release=function(){"use strict";function t(){}function e(t){return t()}function n(){return Object.create(null)}function r(t){t.forEach(e)}function i(t){return"function"==typeof t}function o(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function a(t,e){t.appendChild(e)}function s(t,e,n){t.insertBefore(e,n||null)}function u(t){t.parentNode.removeChild(t)}function l(t){return document.createElement(t)}function c(t){return document.createTextNode(t)}function d(){return c(" ")}function f(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function h(t,e,n){e in t?t[e]="boolean"==typeof t[e]&&""===n||n:f(t,e,n)}function m(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function p(t,e,n,r){null===n?t.style.removeProperty(e):t.style.setProperty(e,n,r?"important":"")}function g(t){const e={};for(const n of t)e[n.name]=n.value;return e}let b;function y(t){b=t}const v=[],$=[],w=[],x=[],_=Promise.resolve();let S=!1;function M(t){w.push(t)}const k=new Set;let D=0;function T(){const t=b;do{for(;D<v.length;){const t=v[D];D++,y(t),C(t.$$)}for(y(null),v.length=0,D=0;$.length;)$.pop()();for(let t=0;t<w.length;t+=1){const e=w[t];k.has(e)||(k.add(e),e())}w.length=0}while(v.length);for(;x.length;)x.pop()();S=!1,k.clear(),y(t)}function C(t){if(null!==t.fragment){t.update(),r(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(M)}}const L=new Set;function O(t,e){-1===t.$$.dirty[0]&&(v.push(t),S||(S=!0,_.then(T)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function Y(o,a,s,l,c,d,f,h=[-1]){const m=b;y(o);const p=o.$$={fragment:null,ctx:null,props:d,update:t,not_equal:c,bound:n(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(a.context||(m?m.$$.context:[])),callbacks:n(),dirty:h,skip_bound:!1,root:a.target||m.$$.root};f&&f(p.root);let g=!1;if(p.ctx=s?s(o,a.props||{},((t,e,...n)=>{const r=n.length?n[0]:e;return p.ctx&&c(p.ctx[t],p.ctx[t]=r)&&(!p.skip_bound&&p.bound[t]&&p.bound[t](r),g&&O(o,t)),e})):[],p.update(),g=!0,r(p.before_update),p.fragment=!!l&&l(p.ctx),a.target){if(a.hydrate){const t=function(t){return Array.from(t.childNodes)}(a.target);p.fragment&&p.fragment.l(t),t.forEach(u)}else p.fragment&&p.fragment.c();a.intro&&((v=o.$$.fragment)&&v.i&&(L.delete(v),v.i($))),function(t,n,o,a){const{fragment:s,on_mount:u,on_destroy:l,after_update:c}=t.$$;s&&s.m(n,o),a||M((()=>{const n=u.map(e).filter(i);l?l.push(...n):r(n),t.$$.on_mount=[]})),c.forEach(M)}(o,a.target,a.anchor,a.customElement),T()}var v,$;y(m)}let E;"function"==typeof HTMLElement&&(E=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:t}=this.$$;this.$$.on_disconnect=t.map(e).filter(i);for(const t in this.$$.slotted)this.appendChild(this.$$.slotted[t])}attributeChangedCallback(t,e,n){this[t]=n}disconnectedCallback(){r(this.$$.on_disconnect)}$destroy(){!function(t,e){const n=t.$$;null!==n.fragment&&(r(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}(this,1),this.$destroy=t}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}});var H="0.16.21";"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function N(t){var e={exports:{}};return t(e,e.exports),e.exports}var A=N((function(t,e){t.exports=function(){var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",o="minute",a="hour",s="day",u="week",l="month",c="quarter",d="year",f="date",h="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,p=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},b=function(t,e,n){var r=String(t);return!r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},y={s:b,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return(e<=0?"+":"-")+b(r,2,"0")+":"+b(i,2,"0")},m:function t(e,n){if(e.date()<n.date())return-t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,l),o=n-i<0,a=e.clone().add(r+(o?-1:1),l);return+(-(r+(n-i)/(o?i-a:a-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:l,y:d,w:u,d:s,D:f,h:a,m:o,s:i,ms:r,Q:c}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},v="en",$={};$[v]=g;var w=function(t){return t instanceof M},x=function t(e,n,r){var i;if(!e)return v;if("string"==typeof e){var o=e.toLowerCase();$[o]&&(i=o),n&&($[o]=n,i=o);var a=e.split("-");if(!i&&a.length>1)return t(a[0])}else{var s=e.name;$[s]=e,i=s}return!r&&i&&(v=i),i||!r&&v},_=function(t,e){if(w(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new M(n)},S=y;S.l=x,S.i=w,S.w=function(t,e){return _(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var M=function(){function g(t){this.$L=x(t.locale,null,!0),this.parse(t)}var b=g.prototype;return b.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(S.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match(m);if(r){var i=r[2]-1||0,o=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)}}return new Date(e)}(t),this.$x=t.x||{},this.init()},b.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},b.$utils=function(){return S},b.isValid=function(){return!(this.$d.toString()===h)},b.isSame=function(t,e){var n=_(t);return this.startOf(e)<=n&&n<=this.endOf(e)},b.isAfter=function(t,e){return _(t)<this.startOf(e)},b.isBefore=function(t,e){return this.endOf(e)<_(t)},b.$g=function(t,e,n){return S.u(t)?this[e]:this.set(n,t)},b.unix=function(){return Math.floor(this.valueOf()/1e3)},b.valueOf=function(){return this.$d.getTime()},b.startOf=function(t,e){var n=this,r=!!S.u(e)||e,c=S.p(t),h=function(t,e){var i=S.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(s)},m=function(t,e){return S.w(n.toDate()[t].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},p=this.$W,g=this.$M,b=this.$D,y="set"+(this.$u?"UTC":"");switch(c){case d:return r?h(1,0):h(31,11);case l:return r?h(1,g):h(0,g+1);case u:var v=this.$locale().weekStart||0,$=(p<v?p+7:p)-v;return h(r?b-$:b+(6-$),g);case s:case f:return m(y+"Hours",0);case a:return m(y+"Minutes",1);case o:return m(y+"Seconds",2);case i:return m(y+"Milliseconds",3);default:return this.clone()}},b.endOf=function(t){return this.startOf(t,!1)},b.$set=function(t,e){var n,u=S.p(t),c="set"+(this.$u?"UTC":""),h=(n={},n[s]=c+"Date",n[f]=c+"Date",n[l]=c+"Month",n[d]=c+"FullYear",n[a]=c+"Hours",n[o]=c+"Minutes",n[i]=c+"Seconds",n[r]=c+"Milliseconds",n)[u],m=u===s?this.$D+(e-this.$W):e;if(u===l||u===d){var p=this.clone().set(f,1);p.$d[h](m),p.init(),this.$d=p.set(f,Math.min(this.$D,p.daysInMonth())).$d}else h&&this.$d[h](m);return this.init(),this},b.set=function(t,e){return this.clone().$set(t,e)},b.get=function(t){return this[S.p(t)]()},b.add=function(r,c){var f,h=this;r=Number(r);var m=S.p(c),p=function(t){var e=_(h);return S.w(e.date(e.date()+Math.round(t*r)),h)};if(m===l)return this.set(l,this.$M+r);if(m===d)return this.set(d,this.$y+r);if(m===s)return p(1);if(m===u)return p(7);var g=(f={},f[o]=e,f[a]=n,f[i]=t,f)[m]||1,b=this.$d.getTime()+r*g;return S.w(b,this)},b.subtract=function(t,e){return this.add(-1*t,e)},b.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||h;var r=t||"YYYY-MM-DDTHH:mm:ssZ",i=S.z(this),o=this.$H,a=this.$m,s=this.$M,u=n.weekdays,l=n.months,c=function(t,n,i,o){return t&&(t[n]||t(e,r))||i[n].slice(0,o)},d=function(t){return S.s(o%12||12,t,"0")},f=n.meridiem||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r},m={YY:String(this.$y).slice(-2),YYYY:this.$y,M:s+1,MM:S.s(s+1,2,"0"),MMM:c(n.monthsShort,s,l,3),MMMM:c(l,s),D:this.$D,DD:S.s(this.$D,2,"0"),d:String(this.$W),dd:c(n.weekdaysMin,this.$W,u,2),ddd:c(n.weekdaysShort,this.$W,u,3),dddd:u[this.$W],H:String(o),HH:S.s(o,2,"0"),h:d(1),hh:d(2),a:f(o,a,!0),A:f(o,a,!1),m:String(a),mm:S.s(a,2,"0"),s:String(this.$s),ss:S.s(this.$s,2,"0"),SSS:S.s(this.$ms,3,"0"),Z:i};return r.replace(p,(function(t,e){return e||m[t]||i.replace(":","")}))},b.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},b.diff=function(r,f,h){var m,p=S.p(f),g=_(r),b=(g.utcOffset()-this.utcOffset())*e,y=this-g,v=S.m(this,g);return v=(m={},m[d]=v/12,m[l]=v,m[c]=v/3,m[u]=(y-b)/6048e5,m[s]=(y-b)/864e5,m[a]=y/n,m[o]=y/e,m[i]=y/t,m)[p]||y,h?v:S.a(v)},b.daysInMonth=function(){return this.endOf(l).$D},b.$locale=function(){return $[this.$L]},b.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=x(t,e,!0);return r&&(n.$L=r),n},b.clone=function(){return S.w(this.$d,this)},b.toDate=function(){return new Date(this.valueOf())},b.toJSON=function(){return this.isValid()?this.toISOString():null},b.toISOString=function(){return this.$d.toISOString()},b.toString=function(){return this.$d.toUTCString()},g}(),k=M.prototype;return _.prototype=k,[["$ms",r],["$s",i],["$m",o],["$H",a],["$W",s],["$M",l],["$y",d],["$D",f]].forEach((function(t){k[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),_.extend=function(t,e){return t.$i||(t(e,M,_),t.$i=!0),_},_.locale=x,_.isDayjs=w,_.unix=function(t){return _(1e3*t)},_.en=$[v],_.Ls=$,_.p={},_}()}));function P(t,e,n){var r,i,o,a,s;function u(){var l=Date.now()-a;l<e&&l>=0?r=setTimeout(u,e-l):(r=null,n||(s=t.apply(o,i),o=i=null))}null==e&&(e=100);var l=function(){o=this,i=arguments,a=Date.now();var l=n&&!r;return r||(r=setTimeout(u,e)),l&&(s=t.apply(o,i),o=i=null),s};return l.clear=function(){r&&(clearTimeout(r),r=null)},l.flush=function(){r&&(s=t.apply(o,i),o=i=null,clearTimeout(r),r=null)},l}P.debounce=P,N((function(t,e){t.exports=function(t){function e(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var n=e(t),r={name:"it",weekdays:"domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),weekStart:1,monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},relativeTime:{future:"tra %s",past:"%s fa",s:"qualche secondo",m:"un minuto",mm:"%d minuti",h:"un' ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},ordinal:function(t){return t+"º"}};return n.default.locale(r,null,!0),r}(A)}));var j=N((function(t,e){e.__esModule=!0,e.LanguageTranslator=e.addComponent=e.getChildStyleToPass=void 0,e.getChildStyleToPass=function(t,e){var n,r,i="";if(t&&(null==e?void 0:e.length)&&(null===(n=Object.keys(t))||void 0===n?void 0:n.length)&&(null===(r=null==e?void 0:e.filter((function(e){return Object.keys(t).includes(e.name)})))||void 0===r?void 0:r.length))for(var o=function(n){(null==e?void 0:e.filter((function(e){return e.name===n&&e.defaultValue!==t[n]})))&&(i+="".concat(n,":").concat(t[n],";"))},a=0,s=Object.keys(t);a<s.length;a++){o(s[a])}return i},e.addComponent=function(t){var e,n=(null===(e=null==t?void 0:t.repoName.split("/"))||void 0===e?void 0:e[1])||(null==t?void 0:t.repoName);if(!n)throw new Error("wrong componentPath "+(null==t?void 0:t.repoName));if(!(null==t?void 0:t.version))throw new Error("wrong version "+(null==t?void 0:t.version));var r=(null==t?void 0:t.iifePath)||"release/release.js";if(!document.getElementById(n+"-script"))try{var i=document.createElement("script");i.id=n+"-script",i.src="https://cdn.jsdelivr.net/npm/".concat(t.repoName,"@").concat(t.version,"/").concat(r),(null==t?void 0:t.local)&&location.href.includes("localhost")&&(i.src="".concat(t.local)),document.head.appendChild(i)}catch(t){console.warn(t)}};var n=function(){function t(t){if(!(null==t?void 0:t.dictionary))throw new Error("no dictionary provided");this.dictionary=t.dictionary,this.setLang(null==t?void 0:t.lang)}return t.prototype.setLang=function(e){e||(e=t.getDefaultLang()),this.lang=e},t.prototype.translateWord=function(e,n){return t.getDictionaryWord(e,this.dictionary,n||this.lang)},t.prototype.translateDate=function(e,n,r){return t.formatDate(e,n,r||this.lang)},t.getDefaultLang=function(){var t,e,n,r,i,o="en";return(null===navigator||void 0===navigator?void 0:navigator.languages)&&(null===(n=null===(e=null===(t=navigator.languages[0])||void 0===t?void 0:t.split("-")[0])||void 0===e?void 0:e.toLowerCase())||void 0===n?void 0:n.length)&&(o=null===(i=null===(r=navigator.languages[0])||void 0===r?void 0:r.split("-")[0])||void 0===i?void 0:i.toLowerCase()),o},t.getDictionaryWord=function(e,n,r){var i;if(!e)throw new Error("no wordKey provided");if(!n)throw new Error("no dictionary provided");if(r&&(null===(i=n[r])||void 0===i?void 0:i[e]))return n[r][e];var o="",a=t.getDefaultLang();if(!r||a!==r){var s=null==n?void 0:n[a];(null==s?void 0:s[e])&&(o=s[e])}return o},t.formatDate=function(e,n,r){if(!e)throw new Error("no date provided");if("function"!=typeof e.getMonth)throw new Error("wrong date format");return new Intl.DateTimeFormat(r||t.getDefaultLang(),n).format(e)},t}();e.LanguageTranslator=n})),I=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,F=/\n/g,q=/^\s*/,z=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,W=/^:\s*/,U=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,V=/^[;\s]*/,J=/^\s+|\s+$/g,R="";function Z(t){return t?t.replace(J,R):R}var B=function(t,e){var n,r=null;if(!t||"string"!=typeof t)return r;for(var i,o,a=function(t,e){if("string"!=typeof t)throw new TypeError("First argument must be a string");if(!t)return[];e=e||{};var n=1,r=1;function i(t){var e=t.match(F);e&&(n+=e.length);var i=t.lastIndexOf("\n");r=~i?t.length-i:r+t.length}function o(){var t={line:n,column:r};return function(e){return e.position=new a(t),l(),e}}function a(t){this.start=t,this.end={line:n,column:r},this.source=e.source}function s(i){var o=new Error(e.source+":"+n+":"+r+": "+i);if(o.reason=i,o.filename=e.source,o.line=n,o.column=r,o.source=t,!e.silent)throw o}function u(e){var n=e.exec(t);if(n){var r=n[0];return i(r),t=t.slice(r.length),n}}function l(){u(q)}function c(t){var e;for(t=t||[];e=d();)!1!==e&&t.push(e);return t}function d(){var e=o();if("/"==t.charAt(0)&&"*"==t.charAt(1)){for(var n=2;R!=t.charAt(n)&&("*"!=t.charAt(n)||"/"!=t.charAt(n+1));)++n;if(n+=2,R===t.charAt(n-1))return s("End of comment missing");var a=t.slice(2,n-2);return r+=2,i(a),t=t.slice(n),r+=2,e({type:"comment",comment:a})}}function f(){var t=o(),e=u(z);if(e){if(d(),!u(W))return s("property missing ':'");var n=u(U),r=t({type:"declaration",property:Z(e[0].replace(I,R)),value:n?Z(n[0].replace(I,R)):R});return u(V),r}}return a.prototype.content=t,l(),function(){var t,e=[];for(c(e);t=f();)!1!==t&&(e.push(t),c(e));return e}()}(t),s="function"==typeof e,u=0,l=a.length;u<l;u++)i=(n=a[u]).property,o=n.value,s?e(i,o,n):o&&(r||(r={}),r[i]=o);return r},K={vars:[{name:"--bs-primary",valueType:"color",theme:"bootstrap",defaultValue:"#07689f"},{name:"--bs-secondary",valueType:"color",theme:"bootstrap",defaultValue:"#c9d6df"},{name:"--bs-success",valueType:"color",theme:"bootstrap",defaultValue:"#11d3bc"},{name:"--bs-info",valueType:"color",theme:"bootstrap",defaultValue:"#a2d5f2"},{name:"--bs-warning",valueType:"color",theme:"bootstrap",defaultValue:"#ffc107"},{name:"--bs-danger",valueType:"color",theme:"bootstrap",defaultValue:"#f67280"}],parts:[]};function Q(e){let n,r,i,o,g,b,y,v,$,w,x,_,S,M,k,D,T,C,L,O,Y,E,H,N,A,P,j,I,F,q,z,W,U,V,J,R,Z,B,K=e[0].currencySymbol+"",Q=e[0].currencySymbol+"",G=(e[0].shipmentFee?e[0].shipmentFee+e[0].currencySymbol:"-")+"",X=e[0].currencySymbol+"";return{c(){n=l("link"),r=d(),i=l("div"),o=l("h3"),o.innerHTML='<i style="font-size:0.9em;margin-right:0.2em" class="bi bi-cart-fill"></i>Shopping Cart',g=d(),b=l("div"),y=l("div"),v=l("div"),$=l("span"),$.textContent="SubTotale",w=d(),x=l("span"),_=c(e[1]),S=c(K),M=d(),k=l("div"),D=l("span"),D.textContent="Tasse",T=d(),C=l("span"),L=c(e[2]),O=c(Q),Y=d(),E=l("div"),H=l("span"),H.textContent="Spedizione",N=d(),A=l("span"),P=c(G),j=d(),I=l("div"),F=l("span"),F.textContent="Totale",q=d(),z=l("span"),W=c(e[5]),U=c(X),V=d(),J=l("div"),R=l("div"),Z=l("hb-table"),this.c=t,f(n,"rel","stylesheet"),f(n,"href","https://cdn.jsdelivr.net/npm/bootstrap-icons@latest/font/bootstrap-icons.css"),p($,"display","inline-block"),p(x,"float","right"),p(v,"line-height","25px"),p(D,"display","inline-block"),p(C,"float","right"),p(k,"line-height","25px"),p(H,"display","inline-block"),p(A,"float","right"),p(E,"line-height","25px"),p(F,"display","inline-block"),p(z,"float","right"),p(I,"line-height","25px"),p(I,"font-weight","bold"),f(y,"class","col"),f(b,"class","row"),p(b,"margin","40px auto 20px auto"),h(Z,"style",e[3]),h(Z,"disablepagination","yes"),h(Z,"rows",B=JSON.stringify(e[4])),h(Z,"headers",JSON.stringify(e[6])),f(R,"class","col"),f(J,"class","row cart_divider"),f(i,"id","page"),f(i,"class","container")},m(t,e){a(document.head,n),s(t,r,e),s(t,i,e),a(i,o),a(i,g),a(i,b),a(b,y),a(y,v),a(v,$),a(v,w),a(v,x),a(x,_),a(x,S),a(y,M),a(y,k),a(k,D),a(k,T),a(k,C),a(C,L),a(C,O),a(y,Y),a(y,E),a(E,H),a(E,N),a(E,A),a(A,P),a(y,j),a(y,I),a(I,F),a(I,q),a(I,z),a(z,W),a(z,U),a(i,V),a(i,J),a(J,R),a(R,Z)},p(t,[e]){2&e&&m(_,t[1]),1&e&&K!==(K=t[0].currencySymbol+"")&&m(S,K),4&e&&m(L,t[2]),1&e&&Q!==(Q=t[0].currencySymbol+"")&&m(O,Q),1&e&&G!==(G=(t[0].shipmentFee?t[0].shipmentFee+t[0].currencySymbol:"-")+"")&&m(P,G),32&e&&m(W,t[5]),1&e&&X!==(X=t[0].currencySymbol+"")&&m(U,X),8&e&&h(Z,"style",t[3]),16&e&&B!==(B=JSON.stringify(t[4]))&&h(Z,"rows",B)},i:t,o:t,d(t){u(n),t&&u(r),t&&u(i)}}}function G(t,e,n){var r,i;let o,{style:a}=e,s="",{id:u}=e,{payment:l}=e,{completed:c}=e;let d,f,h,m=[];return j.addComponent({repoName:"@htmlbricks/hb-table",version:H}),t.$$set=t=>{"style"in t&&n(9,a=t.style),"id"in t&&n(7,u=t.id),"payment"in t&&n(0,l=t.payment),"completed"in t&&n(8,c=t.completed)},t.$$.update=()=>{if(8071&t.$$.dirty){if(a&&(n(12,o=B(a)),n(3,s=j.getChildStyleToPass(o,null==K?void 0:K.vars))),u||n(7,u=null),c||n(8,c="no"),l){if("string"==typeof l&&(n(0,l=JSON.parse(l)||{}),l.countryCode||n(0,l.countryCode="IT",l),!l.currencySymbol))switch(l.countryCode){case"IT":case"EU":n(0,l.currencySymbol="€",l);break;case"US":n(0,l.currencySymbol="$",l)}}else n(0,l={countryCode:"IT",currencySymbol:"€",items:[]});(null===n(10,r=null==l?void 0:l.items)||void 0===r?void 0:r.length)&&n(4,m=l.items.map(((t,e)=>{var n,r;return{_id:e.toString(),price:t.unitaryPrice.toString()+l.currencySymbol+" / "+(t.unit?t.unit:"unità"),name:t.name,quantity:(null===(r=null===(n=t.quantity)||void 0===n?void 0:n.toString)||void 0===r?void 0:r.call(n))||"1",subtotal:(t.unitaryPrice*(t.quantity||1)).toString()+l.currencySymbol,vat:`${(Math.round(.01*t.taxPercentage*t.unitaryPrice*(t.quantity||1)*100)/100).toString()} (${t.taxPercentage}%)`,total:(t.unitaryPrice*(t.quantity||1)+Math.round(.01*t.taxPercentage*t.unitaryPrice*(t.quantity||1)*100)/100).toString()+l.currencySymbol}}))),n(1,d=null===n(11,i=null==l?void 0:l.items)||void 0===i?void 0:i.map((t=>t.unitaryPrice*(t.quantity||1))).reduce(((t,e)=>t+e),0)),n(2,f=(null==l?void 0:l.items)?Math.round(100*(null==l?void 0:l.items.map((t=>t.unitaryPrice*(t.quantity||1)*t.taxPercentage*.01)).reduce(((t,e)=>t+e),0)))/100:0),n(5,h=d+f+(l.shipmentFee||0))}},[l,d,f,s,m,h,[{key:"name",label:"nome",nosort:!0},{key:"quantity",label:"n.",nosort:!0},{key:"total",label:"totale",nosort:!0}],u,c,a,r,i,o]}class X extends E{constructor(t){super(),this.shadowRoot.innerHTML='<style>@charset "UTF-8";@import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap");@import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@latest/font/bootstrap-icons.css");:host{--bs-blue:var(--bs-primary,#07689f);--bs-indigo:#6610f2;--bs-purple:#6f42c1;--bs-pink:#d63384;--bs-red:var(--bs-danger,#f67280);--bs-orange:#fd7e14;--bs-yellow:#ffc107;--bs-green:var(--bs-warning,#ffc107);--bs-teal:#20c997;--bs-cyan:var(--bs-info,#a2d5f2);--bs-white:#fff;--bs-gray:var(--bs-secondary,#c9d6df);--bs-gray-dark:#343a40;--bs-gray-100:#f8f9fa;--bs-gray-200:#e9ecef;--bs-gray-300:#dee2e6;--bs-gray-400:#ced4da;--bs-gray-500:#adb5bd;--bs-gray-600:var(--bs-secondary,#c9d6df);--bs-gray-700:#495057;--bs-gray-800:#343a40;--bs-gray-900:#212529;--bs-primary:var(--bs-primary,#07689f);--bs-secondary:var(--bs-secondary,#c9d6df);--bs-success:var(--bs-warning,#ffc107);--bs-info:var(--bs-info,#a2d5f2);--bs-warning:#ffc107;--bs-danger:var(--bs-danger,#f67280);--bs-light:#f8f9fa;--bs-dark:#212529;--bs-primary-rgb:13, 110, 253;--bs-secondary-rgb:108, 117, 125;--bs-success-rgb:25, 135, 84;--bs-info-rgb:13, 202, 240;--bs-warning-rgb:255, 193, 7;--bs-danger-rgb:220, 53, 69;--bs-light-rgb:248, 249, 250;--bs-dark-rgb:33, 37, 41;--bs-white-rgb:255, 255, 255;--bs-black-rgb:0, 0, 0;--bs-body-color-rgb:33, 37, 41;--bs-body-bg-rgb:255, 255, 255;--bs-font-sans-serif:system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--bs-font-monospace:SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--bs-gradient:linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));--bs-body-font-family:var(--bs-font-sans-serif);--bs-body-font-size:1rem;--bs-body-font-weight:400;--bs-body-line-height:1.5;--bs-body-color:#212529;--bs-body-bg:#fff}*,*::before,*::after{box-sizing:border-box}@media(prefers-reduced-motion: no-preference){:host{scroll-behavior:smooth}}h3{margin-top:0;margin-bottom:0.5rem;font-weight:500;line-height:1.2}@media(min-width: 1200px){}@media(min-width: 1200px){}h3{font-size:calc(1.3rem + 0.6vw)}@media(min-width: 1200px){h3{font-size:1.75rem}}@media(min-width: 1200px){}::-moz-focus-inner{padding:0;border-style:none}@media(min-width: 1200px){}::-webkit-datetime-edit-fields-wrapper,::-webkit-datetime-edit-text,::-webkit-datetime-edit-minute,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-year-field{padding:0}::-webkit-inner-spin-button{height:auto}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-color-swatch-wrapper{padding:0}::file-selector-button{font:inherit}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}@media(min-width: 1200px){}@media(min-width: 1200px){}@media(min-width: 1200px){}@media(min-width: 1200px){}@media(min-width: 1200px){}@media(min-width: 1200px){}.container{width:100%;padding-right:var(--bs-gutter-x, 0.75rem);padding-left:var(--bs-gutter-x, 0.75rem);margin-right:auto;margin-left:auto}@media(min-width: 576px){.container{max-width:540px}}@media(min-width: 768px){.container{max-width:720px}}@media(min-width: 992px){.container{max-width:960px}}@media(min-width: 1200px){.container{max-width:1140px}}@media(min-width: 1400px){.container{max-width:1320px}}.row{--bs-gutter-x:1.5rem;--bs-gutter-y:0;display:flex;flex-wrap:wrap;margin-top:calc(-1 * var(--bs-gutter-y));margin-right:calc(-0.5 * var(--bs-gutter-x));margin-left:calc(-0.5 * var(--bs-gutter-x))}.row>*{flex-shrink:0;width:100%;max-width:100%;padding-right:calc(var(--bs-gutter-x) * 0.5);padding-left:calc(var(--bs-gutter-x) * 0.5);margin-top:var(--bs-gutter-y)}.col{flex:1 0 0%}@media(min-width: 576px){}@media(min-width: 768px){}@media(min-width: 992px){}@media(min-width: 1200px){}@media(min-width: 1400px){}@media(prefers-reduced-motion: reduce){}@media(min-width: 576px){}@media(min-width: 768px){}@media(min-width: 992px){}@media(min-width: 1200px){}@media(min-width: 1400px){}@media(min-width: 1200px){}@media print{}:host{font-family:"Roboto", sans-serif;display:block;margin:40px 0px 40px 0px;--hb-checkout-border:0.5px solid rgba(197, 197, 197, 0.808)}#page{padding-top:20px}.cart_divider{padding-top:40px;border-top:var(--hb-checkout-border)}</style>',Y(this,{target:this.shadowRoot,props:g(this.attributes),customElement:!0},G,Q,o,{style:9,id:7,payment:0,completed:8},null),t&&(t.target&&s(t.target,this,t.anchor),t.props&&(this.$set(t.props),T()))}static get observedAttributes(){return["style","id","payment","completed"]}get style(){return this.$$.ctx[9]}set style(t){this.$$set({style:t}),T()}get id(){return this.$$.ctx[7]}set id(t){this.$$set({id:t}),T()}get payment(){return this.$$.ctx[0]}set payment(t){this.$$set({payment:t}),T()}get completed(){return this.$$.ctx[8]}set completed(t){this.$$set({completed:t}),T()}}return customElements.define("hb-checkout-shopping-cart",X),X}();
|
|
1
|
+
var release=function(){"use strict";function t(){}function e(t){return t()}function n(){return Object.create(null)}function r(t){t.forEach(e)}function i(t){return"function"==typeof t}function o(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function a(t,e){t.appendChild(e)}function s(t,e,n){t.insertBefore(e,n||null)}function u(t){t.parentNode.removeChild(t)}function l(t){return document.createElement(t)}function c(t){return document.createTextNode(t)}function d(){return c(" ")}function f(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function h(t,e,n){e in t?t[e]="boolean"==typeof t[e]&&""===n||n:f(t,e,n)}function m(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function p(t,e,n,r){null===n?t.style.removeProperty(e):t.style.setProperty(e,n,r?"important":"")}function g(t){const e={};for(const n of t)e[n.name]=n.value;return e}let b;function y(t){b=t}const v=[],$=[],w=[],x=[],_=Promise.resolve();let S=!1;function M(t){w.push(t)}const k=new Set;let D=0;function T(){const t=b;do{for(;D<v.length;){const t=v[D];D++,y(t),C(t.$$)}for(y(null),v.length=0,D=0;$.length;)$.pop()();for(let t=0;t<w.length;t+=1){const e=w[t];k.has(e)||(k.add(e),e())}w.length=0}while(v.length);for(;x.length;)x.pop()();S=!1,k.clear(),y(t)}function C(t){if(null!==t.fragment){t.update(),r(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(M)}}const L=new Set;function O(t,e){-1===t.$$.dirty[0]&&(v.push(t),S||(S=!0,_.then(T)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function Y(o,a,s,l,c,d,f,h=[-1]){const m=b;y(o);const p=o.$$={fragment:null,ctx:null,props:d,update:t,not_equal:c,bound:n(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(a.context||(m?m.$$.context:[])),callbacks:n(),dirty:h,skip_bound:!1,root:a.target||m.$$.root};f&&f(p.root);let g=!1;if(p.ctx=s?s(o,a.props||{},((t,e,...n)=>{const r=n.length?n[0]:e;return p.ctx&&c(p.ctx[t],p.ctx[t]=r)&&(!p.skip_bound&&p.bound[t]&&p.bound[t](r),g&&O(o,t)),e})):[],p.update(),g=!0,r(p.before_update),p.fragment=!!l&&l(p.ctx),a.target){if(a.hydrate){const t=function(t){return Array.from(t.childNodes)}(a.target);p.fragment&&p.fragment.l(t),t.forEach(u)}else p.fragment&&p.fragment.c();a.intro&&((v=o.$$.fragment)&&v.i&&(L.delete(v),v.i($))),function(t,n,o,a){const{fragment:s,on_mount:u,on_destroy:l,after_update:c}=t.$$;s&&s.m(n,o),a||M((()=>{const n=u.map(e).filter(i);l?l.push(...n):r(n),t.$$.on_mount=[]})),c.forEach(M)}(o,a.target,a.anchor,a.customElement),T()}var v,$;y(m)}let E;"function"==typeof HTMLElement&&(E=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:t}=this.$$;this.$$.on_disconnect=t.map(e).filter(i);for(const t in this.$$.slotted)this.appendChild(this.$$.slotted[t])}attributeChangedCallback(t,e,n){this[t]=n}disconnectedCallback(){r(this.$$.on_disconnect)}$destroy(){!function(t,e){const n=t.$$;null!==n.fragment&&(r(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}(this,1),this.$destroy=t}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}});var H="0.16.25";"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function N(t){var e={exports:{}};return t(e,e.exports),e.exports}var A=N((function(t,e){t.exports=function(){var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",o="minute",a="hour",s="day",u="week",l="month",c="quarter",d="year",f="date",h="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,p=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},b=function(t,e,n){var r=String(t);return!r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},y={s:b,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return(e<=0?"+":"-")+b(r,2,"0")+":"+b(i,2,"0")},m:function t(e,n){if(e.date()<n.date())return-t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,l),o=n-i<0,a=e.clone().add(r+(o?-1:1),l);return+(-(r+(n-i)/(o?i-a:a-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:l,y:d,w:u,d:s,D:f,h:a,m:o,s:i,ms:r,Q:c}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},v="en",$={};$[v]=g;var w=function(t){return t instanceof M},x=function t(e,n,r){var i;if(!e)return v;if("string"==typeof e){var o=e.toLowerCase();$[o]&&(i=o),n&&($[o]=n,i=o);var a=e.split("-");if(!i&&a.length>1)return t(a[0])}else{var s=e.name;$[s]=e,i=s}return!r&&i&&(v=i),i||!r&&v},_=function(t,e){if(w(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new M(n)},S=y;S.l=x,S.i=w,S.w=function(t,e){return _(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var M=function(){function g(t){this.$L=x(t.locale,null,!0),this.parse(t)}var b=g.prototype;return b.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(S.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match(m);if(r){var i=r[2]-1||0,o=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)}}return new Date(e)}(t),this.$x=t.x||{},this.init()},b.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},b.$utils=function(){return S},b.isValid=function(){return!(this.$d.toString()===h)},b.isSame=function(t,e){var n=_(t);return this.startOf(e)<=n&&n<=this.endOf(e)},b.isAfter=function(t,e){return _(t)<this.startOf(e)},b.isBefore=function(t,e){return this.endOf(e)<_(t)},b.$g=function(t,e,n){return S.u(t)?this[e]:this.set(n,t)},b.unix=function(){return Math.floor(this.valueOf()/1e3)},b.valueOf=function(){return this.$d.getTime()},b.startOf=function(t,e){var n=this,r=!!S.u(e)||e,c=S.p(t),h=function(t,e){var i=S.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(s)},m=function(t,e){return S.w(n.toDate()[t].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},p=this.$W,g=this.$M,b=this.$D,y="set"+(this.$u?"UTC":"");switch(c){case d:return r?h(1,0):h(31,11);case l:return r?h(1,g):h(0,g+1);case u:var v=this.$locale().weekStart||0,$=(p<v?p+7:p)-v;return h(r?b-$:b+(6-$),g);case s:case f:return m(y+"Hours",0);case a:return m(y+"Minutes",1);case o:return m(y+"Seconds",2);case i:return m(y+"Milliseconds",3);default:return this.clone()}},b.endOf=function(t){return this.startOf(t,!1)},b.$set=function(t,e){var n,u=S.p(t),c="set"+(this.$u?"UTC":""),h=(n={},n[s]=c+"Date",n[f]=c+"Date",n[l]=c+"Month",n[d]=c+"FullYear",n[a]=c+"Hours",n[o]=c+"Minutes",n[i]=c+"Seconds",n[r]=c+"Milliseconds",n)[u],m=u===s?this.$D+(e-this.$W):e;if(u===l||u===d){var p=this.clone().set(f,1);p.$d[h](m),p.init(),this.$d=p.set(f,Math.min(this.$D,p.daysInMonth())).$d}else h&&this.$d[h](m);return this.init(),this},b.set=function(t,e){return this.clone().$set(t,e)},b.get=function(t){return this[S.p(t)]()},b.add=function(r,c){var f,h=this;r=Number(r);var m=S.p(c),p=function(t){var e=_(h);return S.w(e.date(e.date()+Math.round(t*r)),h)};if(m===l)return this.set(l,this.$M+r);if(m===d)return this.set(d,this.$y+r);if(m===s)return p(1);if(m===u)return p(7);var g=(f={},f[o]=e,f[a]=n,f[i]=t,f)[m]||1,b=this.$d.getTime()+r*g;return S.w(b,this)},b.subtract=function(t,e){return this.add(-1*t,e)},b.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||h;var r=t||"YYYY-MM-DDTHH:mm:ssZ",i=S.z(this),o=this.$H,a=this.$m,s=this.$M,u=n.weekdays,l=n.months,c=function(t,n,i,o){return t&&(t[n]||t(e,r))||i[n].slice(0,o)},d=function(t){return S.s(o%12||12,t,"0")},f=n.meridiem||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r},m={YY:String(this.$y).slice(-2),YYYY:this.$y,M:s+1,MM:S.s(s+1,2,"0"),MMM:c(n.monthsShort,s,l,3),MMMM:c(l,s),D:this.$D,DD:S.s(this.$D,2,"0"),d:String(this.$W),dd:c(n.weekdaysMin,this.$W,u,2),ddd:c(n.weekdaysShort,this.$W,u,3),dddd:u[this.$W],H:String(o),HH:S.s(o,2,"0"),h:d(1),hh:d(2),a:f(o,a,!0),A:f(o,a,!1),m:String(a),mm:S.s(a,2,"0"),s:String(this.$s),ss:S.s(this.$s,2,"0"),SSS:S.s(this.$ms,3,"0"),Z:i};return r.replace(p,(function(t,e){return e||m[t]||i.replace(":","")}))},b.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},b.diff=function(r,f,h){var m,p=S.p(f),g=_(r),b=(g.utcOffset()-this.utcOffset())*e,y=this-g,v=S.m(this,g);return v=(m={},m[d]=v/12,m[l]=v,m[c]=v/3,m[u]=(y-b)/6048e5,m[s]=(y-b)/864e5,m[a]=y/n,m[o]=y/e,m[i]=y/t,m)[p]||y,h?v:S.a(v)},b.daysInMonth=function(){return this.endOf(l).$D},b.$locale=function(){return $[this.$L]},b.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=x(t,e,!0);return r&&(n.$L=r),n},b.clone=function(){return S.w(this.$d,this)},b.toDate=function(){return new Date(this.valueOf())},b.toJSON=function(){return this.isValid()?this.toISOString():null},b.toISOString=function(){return this.$d.toISOString()},b.toString=function(){return this.$d.toUTCString()},g}(),k=M.prototype;return _.prototype=k,[["$ms",r],["$s",i],["$m",o],["$H",a],["$W",s],["$M",l],["$y",d],["$D",f]].forEach((function(t){k[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),_.extend=function(t,e){return t.$i||(t(e,M,_),t.$i=!0),_},_.locale=x,_.isDayjs=w,_.unix=function(t){return _(1e3*t)},_.en=$[v],_.Ls=$,_.p={},_}()}));function P(t,e,n){var r,i,o,a,s;function u(){var l=Date.now()-a;l<e&&l>=0?r=setTimeout(u,e-l):(r=null,n||(s=t.apply(o,i),o=i=null))}null==e&&(e=100);var l=function(){o=this,i=arguments,a=Date.now();var l=n&&!r;return r||(r=setTimeout(u,e)),l&&(s=t.apply(o,i),o=i=null),s};return l.clear=function(){r&&(clearTimeout(r),r=null)},l.flush=function(){r&&(s=t.apply(o,i),o=i=null,clearTimeout(r),r=null)},l}P.debounce=P,N((function(t,e){t.exports=function(t){function e(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var n=e(t),r={name:"it",weekdays:"domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),weekStart:1,monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},relativeTime:{future:"tra %s",past:"%s fa",s:"qualche secondo",m:"un minuto",mm:"%d minuti",h:"un' ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},ordinal:function(t){return t+"º"}};return n.default.locale(r,null,!0),r}(A)}));var j=N((function(t,e){e.__esModule=!0,e.LanguageTranslator=e.addComponent=e.getChildStyleToPass=void 0,e.getChildStyleToPass=function(t,e){var n,r,i="";if(t&&(null==e?void 0:e.length)&&(null===(n=Object.keys(t))||void 0===n?void 0:n.length)&&(null===(r=null==e?void 0:e.filter((function(e){return Object.keys(t).includes(e.name)})))||void 0===r?void 0:r.length))for(var o=function(n){(null==e?void 0:e.filter((function(e){return e.name===n&&e.defaultValue!==t[n]})))&&(i+="".concat(n,":").concat(t[n],";"))},a=0,s=Object.keys(t);a<s.length;a++){o(s[a])}return i},e.addComponent=function(t){var e,n=(null===(e=null==t?void 0:t.repoName.split("/"))||void 0===e?void 0:e[1])||(null==t?void 0:t.repoName);if(!n)throw new Error("wrong componentPath "+(null==t?void 0:t.repoName));if(!(null==t?void 0:t.version))throw new Error("wrong version "+(null==t?void 0:t.version));var r=(null==t?void 0:t.iifePath)||"release/release.js";if(!document.getElementById(n+"-script"))try{var i=document.createElement("script");i.id=n+"-script",i.src="https://cdn.jsdelivr.net/npm/".concat(t.repoName,"@").concat(t.version,"/").concat(r),(null==t?void 0:t.local)&&location.href.includes("localhost")&&(i.src="".concat(t.local)),document.head.appendChild(i)}catch(t){console.warn(t)}};var n=function(){function t(t){if(!(null==t?void 0:t.dictionary))throw new Error("no dictionary provided");this.dictionary=t.dictionary,this.setLang(null==t?void 0:t.lang)}return t.prototype.setLang=function(e){e||(e=t.getDefaultLang()),this.lang=e},t.prototype.translateWord=function(e,n){return t.getDictionaryWord(e,this.dictionary,n||this.lang)},t.prototype.translateDate=function(e,n,r){return t.formatDate(e,n,r||this.lang)},t.getDefaultLang=function(){var t,e,n,r,i,o="en";return(null===navigator||void 0===navigator?void 0:navigator.languages)&&(null===(n=null===(e=null===(t=navigator.languages[0])||void 0===t?void 0:t.split("-")[0])||void 0===e?void 0:e.toLowerCase())||void 0===n?void 0:n.length)&&(o=null===(i=null===(r=navigator.languages[0])||void 0===r?void 0:r.split("-")[0])||void 0===i?void 0:i.toLowerCase()),o},t.getDictionaryWord=function(e,n,r){var i;if(!e)throw new Error("no wordKey provided");if(!n)throw new Error("no dictionary provided");if(r&&(null===(i=n[r])||void 0===i?void 0:i[e]))return n[r][e];var o="",a=t.getDefaultLang();if(!r||a!==r){var s=null==n?void 0:n[a];(null==s?void 0:s[e])&&(o=s[e])}return o},t.formatDate=function(e,n,r){if(!e)throw new Error("no date provided");if("function"!=typeof e.getMonth)throw new Error("wrong date format");return new Intl.DateTimeFormat(r||t.getDefaultLang(),n).format(e)},t}();e.LanguageTranslator=n})),I=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,F=/\n/g,q=/^\s*/,z=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,W=/^:\s*/,U=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,V=/^[;\s]*/,J=/^\s+|\s+$/g,R="";function Z(t){return t?t.replace(J,R):R}var B=function(t,e){var n,r=null;if(!t||"string"!=typeof t)return r;for(var i,o,a=function(t,e){if("string"!=typeof t)throw new TypeError("First argument must be a string");if(!t)return[];e=e||{};var n=1,r=1;function i(t){var e=t.match(F);e&&(n+=e.length);var i=t.lastIndexOf("\n");r=~i?t.length-i:r+t.length}function o(){var t={line:n,column:r};return function(e){return e.position=new a(t),l(),e}}function a(t){this.start=t,this.end={line:n,column:r},this.source=e.source}function s(i){var o=new Error(e.source+":"+n+":"+r+": "+i);if(o.reason=i,o.filename=e.source,o.line=n,o.column=r,o.source=t,!e.silent)throw o}function u(e){var n=e.exec(t);if(n){var r=n[0];return i(r),t=t.slice(r.length),n}}function l(){u(q)}function c(t){var e;for(t=t||[];e=d();)!1!==e&&t.push(e);return t}function d(){var e=o();if("/"==t.charAt(0)&&"*"==t.charAt(1)){for(var n=2;R!=t.charAt(n)&&("*"!=t.charAt(n)||"/"!=t.charAt(n+1));)++n;if(n+=2,R===t.charAt(n-1))return s("End of comment missing");var a=t.slice(2,n-2);return r+=2,i(a),t=t.slice(n),r+=2,e({type:"comment",comment:a})}}function f(){var t=o(),e=u(z);if(e){if(d(),!u(W))return s("property missing ':'");var n=u(U),r=t({type:"declaration",property:Z(e[0].replace(I,R)),value:n?Z(n[0].replace(I,R)):R});return u(V),r}}return a.prototype.content=t,l(),function(){var t,e=[];for(c(e);t=f();)!1!==t&&(e.push(t),c(e));return e}()}(t),s="function"==typeof e,u=0,l=a.length;u<l;u++)i=(n=a[u]).property,o=n.value,s?e(i,o,n):o&&(r||(r={}),r[i]=o);return r},K={vars:[{name:"--bs-primary",valueType:"color",theme:"bootstrap",defaultValue:"#07689f"},{name:"--bs-secondary",valueType:"color",theme:"bootstrap",defaultValue:"#c9d6df"},{name:"--bs-success",valueType:"color",theme:"bootstrap",defaultValue:"#11d3bc"},{name:"--bs-info",valueType:"color",theme:"bootstrap",defaultValue:"#a2d5f2"},{name:"--bs-warning",valueType:"color",theme:"bootstrap",defaultValue:"#ffc107"},{name:"--bs-danger",valueType:"color",theme:"bootstrap",defaultValue:"#f67280"}],parts:[]};function Q(e){let n,r,i,o,g,b,y,v,$,w,x,_,S,M,k,D,T,C,L,O,Y,E,H,N,A,P,j,I,F,q,z,W,U,V,J,R,Z,B,K=e[0].currencySymbol+"",Q=e[0].currencySymbol+"",G=(e[0].shipmentFee?e[0].shipmentFee+e[0].currencySymbol:"-")+"",X=e[0].currencySymbol+"";return{c(){n=l("link"),r=d(),i=l("div"),o=l("h3"),o.innerHTML='<i style="font-size:0.9em;margin-right:0.2em" class="bi bi-cart-fill"></i>Shopping Cart',g=d(),b=l("div"),y=l("div"),v=l("div"),$=l("span"),$.textContent="SubTotale",w=d(),x=l("span"),_=c(e[1]),S=c(K),M=d(),k=l("div"),D=l("span"),D.textContent="Tasse",T=d(),C=l("span"),L=c(e[2]),O=c(Q),Y=d(),E=l("div"),H=l("span"),H.textContent="Spedizione",N=d(),A=l("span"),P=c(G),j=d(),I=l("div"),F=l("span"),F.textContent="Totale",q=d(),z=l("span"),W=c(e[5]),U=c(X),V=d(),J=l("div"),R=l("div"),Z=l("hb-table"),this.c=t,f(n,"rel","stylesheet"),f(n,"href","https://cdn.jsdelivr.net/npm/bootstrap-icons@latest/font/bootstrap-icons.css"),p($,"display","inline-block"),p(x,"float","right"),p(v,"line-height","25px"),p(D,"display","inline-block"),p(C,"float","right"),p(k,"line-height","25px"),p(H,"display","inline-block"),p(A,"float","right"),p(E,"line-height","25px"),p(F,"display","inline-block"),p(z,"float","right"),p(I,"line-height","25px"),p(I,"font-weight","bold"),f(y,"class","col"),f(b,"class","row"),p(b,"margin","40px auto 20px auto"),h(Z,"style",e[3]),h(Z,"disablepagination","yes"),h(Z,"rows",B=JSON.stringify(e[4])),h(Z,"headers",JSON.stringify(e[6])),f(R,"class","col"),f(J,"class","row cart_divider"),f(i,"id","page"),f(i,"class","container")},m(t,e){a(document.head,n),s(t,r,e),s(t,i,e),a(i,o),a(i,g),a(i,b),a(b,y),a(y,v),a(v,$),a(v,w),a(v,x),a(x,_),a(x,S),a(y,M),a(y,k),a(k,D),a(k,T),a(k,C),a(C,L),a(C,O),a(y,Y),a(y,E),a(E,H),a(E,N),a(E,A),a(A,P),a(y,j),a(y,I),a(I,F),a(I,q),a(I,z),a(z,W),a(z,U),a(i,V),a(i,J),a(J,R),a(R,Z)},p(t,[e]){2&e&&m(_,t[1]),1&e&&K!==(K=t[0].currencySymbol+"")&&m(S,K),4&e&&m(L,t[2]),1&e&&Q!==(Q=t[0].currencySymbol+"")&&m(O,Q),1&e&&G!==(G=(t[0].shipmentFee?t[0].shipmentFee+t[0].currencySymbol:"-")+"")&&m(P,G),32&e&&m(W,t[5]),1&e&&X!==(X=t[0].currencySymbol+"")&&m(U,X),8&e&&h(Z,"style",t[3]),16&e&&B!==(B=JSON.stringify(t[4]))&&h(Z,"rows",B)},i:t,o:t,d(t){u(n),t&&u(r),t&&u(i)}}}function G(t,e,n){var r,i;let o,{style:a}=e,s="",{id:u}=e,{payment:l}=e,{completed:c}=e;let d,f,h,m=[];return j.addComponent({repoName:"@htmlbricks/hb-table",version:H}),t.$$set=t=>{"style"in t&&n(9,a=t.style),"id"in t&&n(7,u=t.id),"payment"in t&&n(0,l=t.payment),"completed"in t&&n(8,c=t.completed)},t.$$.update=()=>{if(8071&t.$$.dirty){if(a&&(n(12,o=B(a)),n(3,s=j.getChildStyleToPass(o,null==K?void 0:K.vars))),u||n(7,u=null),c||n(8,c="no"),l){if("string"==typeof l&&(n(0,l=JSON.parse(l)||{}),l.countryCode||n(0,l.countryCode="IT",l),!l.currencySymbol))switch(l.countryCode){case"IT":case"EU":n(0,l.currencySymbol="€",l);break;case"US":n(0,l.currencySymbol="$",l)}}else n(0,l={countryCode:"IT",currencySymbol:"€",items:[]});(null===n(10,r=null==l?void 0:l.items)||void 0===r?void 0:r.length)&&n(4,m=l.items.map(((t,e)=>{var n,r;return{_id:e.toString(),price:t.unitaryPrice.toString()+l.currencySymbol+" / "+(t.unit?t.unit:"unità"),name:t.name,quantity:(null===(r=null===(n=t.quantity)||void 0===n?void 0:n.toString)||void 0===r?void 0:r.call(n))||"1",subtotal:(t.unitaryPrice*(t.quantity||1)).toString()+l.currencySymbol,vat:`${(Math.round(.01*t.taxPercentage*t.unitaryPrice*(t.quantity||1)*100)/100).toString()} (${t.taxPercentage}%)`,total:(t.unitaryPrice*(t.quantity||1)+Math.round(.01*t.taxPercentage*t.unitaryPrice*(t.quantity||1)*100)/100).toString()+l.currencySymbol}}))),n(1,d=null===n(11,i=null==l?void 0:l.items)||void 0===i?void 0:i.map((t=>t.unitaryPrice*(t.quantity||1))).reduce(((t,e)=>t+e),0)),n(2,f=(null==l?void 0:l.items)?Math.round(100*(null==l?void 0:l.items.map((t=>t.unitaryPrice*(t.quantity||1)*t.taxPercentage*.01)).reduce(((t,e)=>t+e),0)))/100:0),n(5,h=d+f+(l.shipmentFee||0))}},[l,d,f,s,m,h,[{key:"name",label:"nome",nosort:!0},{key:"quantity",label:"n.",nosort:!0},{key:"total",label:"totale",nosort:!0}],u,c,a,r,i,o]}class X extends E{constructor(t){super(),this.shadowRoot.innerHTML='<style>@charset "UTF-8";@import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap");@import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@latest/font/bootstrap-icons.css");:host{--bs-blue:var(--bs-primary,#07689f);--bs-indigo:#6610f2;--bs-purple:#6f42c1;--bs-pink:#d63384;--bs-red:var(--bs-danger,#f67280);--bs-orange:#fd7e14;--bs-yellow:#ffc107;--bs-green:var(--bs-warning,#ffc107);--bs-teal:#20c997;--bs-cyan:var(--bs-info,#a2d5f2);--bs-white:#fff;--bs-gray:var(--bs-secondary,#c9d6df);--bs-gray-dark:#343a40;--bs-gray-100:#f8f9fa;--bs-gray-200:#e9ecef;--bs-gray-300:#dee2e6;--bs-gray-400:#ced4da;--bs-gray-500:#adb5bd;--bs-gray-600:var(--bs-secondary,#c9d6df);--bs-gray-700:#495057;--bs-gray-800:#343a40;--bs-gray-900:#212529;--bs-primary:var(--bs-primary,#07689f);--bs-secondary:var(--bs-secondary,#c9d6df);--bs-success:var(--bs-warning,#ffc107);--bs-info:var(--bs-info,#a2d5f2);--bs-warning:#ffc107;--bs-danger:var(--bs-danger,#f67280);--bs-light:#f8f9fa;--bs-dark:#212529;--bs-primary-rgb:13, 110, 253;--bs-secondary-rgb:108, 117, 125;--bs-success-rgb:25, 135, 84;--bs-info-rgb:13, 202, 240;--bs-warning-rgb:255, 193, 7;--bs-danger-rgb:220, 53, 69;--bs-light-rgb:248, 249, 250;--bs-dark-rgb:33, 37, 41;--bs-white-rgb:255, 255, 255;--bs-black-rgb:0, 0, 0;--bs-body-color-rgb:33, 37, 41;--bs-body-bg-rgb:255, 255, 255;--bs-font-sans-serif:system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--bs-font-monospace:SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--bs-gradient:linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));--bs-body-font-family:var(--bs-font-sans-serif);--bs-body-font-size:1rem;--bs-body-font-weight:400;--bs-body-line-height:1.5;--bs-body-color:#212529;--bs-body-bg:#fff}*,*::before,*::after{box-sizing:border-box}@media(prefers-reduced-motion: no-preference){:host{scroll-behavior:smooth}}h3{margin-top:0;margin-bottom:0.5rem;font-weight:500;line-height:1.2}@media(min-width: 1200px){}@media(min-width: 1200px){}h3{font-size:calc(1.3rem + 0.6vw)}@media(min-width: 1200px){h3{font-size:1.75rem}}@media(min-width: 1200px){}::-moz-focus-inner{padding:0;border-style:none}@media(min-width: 1200px){}::-webkit-datetime-edit-fields-wrapper,::-webkit-datetime-edit-text,::-webkit-datetime-edit-minute,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-year-field{padding:0}::-webkit-inner-spin-button{height:auto}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-color-swatch-wrapper{padding:0}::file-selector-button{font:inherit}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}@media(min-width: 1200px){}@media(min-width: 1200px){}@media(min-width: 1200px){}@media(min-width: 1200px){}@media(min-width: 1200px){}@media(min-width: 1200px){}.container{width:100%;padding-right:var(--bs-gutter-x, 0.75rem);padding-left:var(--bs-gutter-x, 0.75rem);margin-right:auto;margin-left:auto}@media(min-width: 576px){.container{max-width:540px}}@media(min-width: 768px){.container{max-width:720px}}@media(min-width: 992px){.container{max-width:960px}}@media(min-width: 1200px){.container{max-width:1140px}}@media(min-width: 1400px){.container{max-width:1320px}}.row{--bs-gutter-x:1.5rem;--bs-gutter-y:0;display:flex;flex-wrap:wrap;margin-top:calc(-1 * var(--bs-gutter-y));margin-right:calc(-0.5 * var(--bs-gutter-x));margin-left:calc(-0.5 * var(--bs-gutter-x))}.row>*{flex-shrink:0;width:100%;max-width:100%;padding-right:calc(var(--bs-gutter-x) * 0.5);padding-left:calc(var(--bs-gutter-x) * 0.5);margin-top:var(--bs-gutter-y)}.col{flex:1 0 0%}@media(min-width: 576px){}@media(min-width: 768px){}@media(min-width: 992px){}@media(min-width: 1200px){}@media(min-width: 1400px){}@media(prefers-reduced-motion: reduce){}@media(min-width: 576px){}@media(min-width: 768px){}@media(min-width: 992px){}@media(min-width: 1200px){}@media(min-width: 1400px){}@media(min-width: 1200px){}@media print{}:host{font-family:"Roboto", sans-serif;display:block;margin:40px 0px 40px 0px;--hb-checkout-border:0.5px solid rgba(197, 197, 197, 0.808)}#page{padding-top:20px}.cart_divider{padding-top:40px;border-top:var(--hb-checkout-border)}</style>',Y(this,{target:this.shadowRoot,props:g(this.attributes),customElement:!0},G,Q,o,{style:9,id:7,payment:0,completed:8},null),t&&(t.target&&s(t.target,this,t.anchor),t.props&&(this.$set(t.props),T()))}static get observedAttributes(){return["style","id","payment","completed"]}get style(){return this.$$.ctx[9]}set style(t){this.$$set({style:t}),T()}get id(){return this.$$.ctx[7]}set id(t){this.$$set({id:t}),T()}get payment(){return this.$$.ctx[0]}set payment(t){this.$$set({payment:t}),T()}get completed(){return this.$$.ctx[8]}set completed(t){this.$$set({completed:t}),T()}}return customElements.define("hb-checkout-shopping-cart",X),X}();
|
|
2
2
|
//# sourceMappingURL=release.js.map
|