@htmlbricks/hb-page-invoice 0.19.19 → 0.19.21

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 CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@htmlbricks/hb-page-invoice",
3
3
  "displayName": "Svelte Invoice WebComponent",
4
4
  "description": "Svelte Invoice WebComponent",
5
- "version": "0.19.19",
5
+ "version": "0.19.21",
6
6
  "main": "release/release.js",
7
7
  "publishConfig": {
8
8
  "access": "public"
@@ -70,7 +70,7 @@
70
70
  "wc-js-utils": "^0.0.1"
71
71
  },
72
72
  "dependencies": {
73
- "@htmlbricks/hb-table": "^0.19.19",
73
+ "@htmlbricks/hb-table": "^0.19.21",
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": "872466f9c717f774588f3f39f9d57337a10b673d"
84
+ "gitHead": "ee381e4718f7a14dae7f8a731e68a985adb17216"
85
85
  }
@@ -323,5 +323,5 @@
323
323
  "size": {},
324
324
  "iifePath": "release/release.js",
325
325
  "repoName": "@htmlbricks/hb-page-invoice",
326
- "version": "0.19.19"
326
+ "version": "0.19.21"
327
327
  }
@@ -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}let s,a;function l(t,e){return s||(s=document.createElement("a")),s.href=e,t===s.href}function u(t,e){t.appendChild(e)}function d(t,e,n){t.insertBefore(e,n||null)}function c(t){t.parentNode&&t.parentNode.removeChild(t)}function p(t){return document.createElement(t)}function f(t){return document.createTextNode(t)}function h(){return f(" ")}function m(t,e,n,r){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n,r)}function g(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function b(t,e,n){e in t?t[e]="boolean"==typeof t[e]&&""===n||n:g(t,e,n)}function v(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function y(t,e,n,r){null===n?t.style.removeProperty(e):t.style.setProperty(e,n,r?"important":"")}function w(t){const e={};for(const n of t)e[n.name]=n.value;return e}function $(t){a=t}const x=[],_=[],M=[],k=[],S=Promise.resolve();let D=!1;function T(t){M.push(t)}const C=new Set;let L=0;function O(){if(0!==L)return;const t=a;do{try{for(;L<x.length;){const t=x[L];L++,$(t),Y(t.$$)}}catch(t){throw x.length=0,L=0,t}for($(null),x.length=0,L=0;_.length;)_.pop()();for(let t=0;t<M.length;t+=1){const e=M[t];C.has(e)||(C.add(e),e())}M.length=0}while(x.length);for(;k.length;)k.pop()();D=!1,C.clear(),$(t)}function Y(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(T)}}const N=new Set;function j(t,e){-1===t.$$.dirty[0]&&(x.push(t),D||(D=!0,S.then(O)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function E(o,s,l,u,d,p,f,h=[-1]){const m=a;$(o);const g=o.$$={fragment:null,ctx:[],props:p,update:t,not_equal:d,bound:n(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(s.context||(m?m.$$.context:[])),callbacks:n(),dirty:h,skip_bound:!1,root:s.target||m.$$.root};f&&f(g.root);let b=!1;if(g.ctx=l?l(o,s.props||{},((t,e,...n)=>{const r=n.length?n[0]:e;return g.ctx&&d(g.ctx[t],g.ctx[t]=r)&&(!g.skip_bound&&g.bound[t]&&g.bound[t](r),b&&j(o,t)),e})):[],g.update(),b=!0,r(g.before_update),g.fragment=!!u&&u(g.ctx),s.target){if(s.hydrate){const t=function(t){return Array.from(t.childNodes)}(s.target);g.fragment&&g.fragment.l(t),t.forEach(c)}else g.fragment&&g.fragment.c();s.intro&&((v=o.$$.fragment)&&v.i&&(N.delete(v),v.i(y))),function(t,n,o,s){const{fragment:a,after_update:l}=t.$$;a&&a.m(n,o),s||T((()=>{const n=t.$$.on_mount.map(e).filter(i);t.$$.on_destroy?t.$$.on_destroy.push(...n):r(n),t.$$.on_mount=[]})),l.forEach(T)}(o,s.target,s.anchor,s.customElement),O()}var v,y;$(m)}let H;"function"==typeof HTMLElement&&(H=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(e,n){if(!i(n))return t;const r=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return r.push(n),()=>{const t=r.indexOf(n);-1!==t&&r.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 P={name:"@htmlbricks/hb-page-invoice",displayName:"Svelte Invoice WebComponent",description:"Svelte Invoice WebComponent",version:"0.19.19",main:"release/release.js",publishConfig:{access:"public"},author:"Dario Caruso <dev@dariocaruso.info> (https://dariocaruso.info)",authorUrl:"https://dariocaruso.info",license:"MIT","license-docs":"CC BY 4.0","license-translations":"CC BY 4.0","license-images":"CC BY-NC 4.0",engines:{node:">=16.0.0"},scripts:{start:"sirv dist",dev:"rm -rf ./dist && rollup -c -w",build:"rm -rf ./dist && rollup -c","generate-manifest":"npm run generate-schemes && monorepo-wc-packages-manifester --dir $PWD","generate-component-schema":"ts-json-schema-generator --type 'Component' --path 'app/types/webcomponent.type.d.ts' > dist/webcomponent.type.d.json","generate-events-schema":"ts-json-schema-generator --type 'Events' --path 'app/types/webcomponent.type.d.ts' > dist/webcomponent_events.type.d.json","generate-schemes":"npm run generate-events-schema && npm run generate-component-schema",copydest:"rm -rf release && mkdir -p release && mkdir -p release && cp dist/* ./release/","build-extra":"tsc --moduleResolution node --module es2020 --esModuleInterop true --outDir dist --sourceMap --skipLibCheck extra/*","build:release":"PRODUCTION=true npm run build && npm run build-extra && npm run generate-manifest && npm run copydest",prepublish:"npm run build:release"},devDependencies:{"@rollup/plugin-alias":"^3.1.2","@rollup/plugin-commonjs":"^18.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.2.1","@rollup/plugin-replace":"^4.0.0","@rollup/plugin-typescript":"^8.2.1","@tsconfig/svelte":"^1.0.10","@types/node":"^16.7.1","@typescript-eslint/eslint-plugin":"^4.22.0","@typescript-eslint/parser":"^4.22.0",eslint:"^7.25.0","eslint-plugin-jsdoc":"^33.0.0","eslint-plugin-svelte3":"^3.2.0","monorepo-wc-packages-manifester":"^0.0.3","node-sass":"^6.0.1",postcss:"^8.2.13","postcss-load-config":"^3.0.1",prettier:"^2.8.4",rollup:"^2.46.0","rollup-plugin-copy":"^3.4.0","rollup-plugin-css-only":"^3.1.0","rollup-plugin-livereload":"^2.0.0","rollup-plugin-svelte":"^7.1.0","rollup-plugin-terser":"^7.0.2","rollup-plugin-ts-paths":"^1.0.5","rollup-plugin-typescript2":"^0.31.1",sass:"^1.32.12","sirv-cli":"^1.0.11",svelte:"^3.46.2","svelte-check":"^1.5.2","svelte-preprocess":"^4.7.2","ts-json-schema-generator":"^0.98.0","ts-node":"^9.1.1",tslib:"^2.2.0",ttypescript:"^1.5.12",typescript:"^4.2.4","typescript-transform-paths":"^2.2.3","wc-js-utils":"^0.0.1"},dependencies:{"@htmlbricks/hb-table":"^0.19.19",dayjs:"^1.10.7",debounce:"^1.2.1"},keywords:["svelte","svelte-webcomponents","webcomponents","html5-webcomponents"],contributors:[],gitHead:"872466f9c717f774588f3f39f9d57337a10b673d"};"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function A(t){var e={exports:{}};return t(e,e.exports),e.exports}var I=A((function(t,e){t.exports=function(){var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",o="minute",s="hour",a="day",l="week",u="month",d="quarter",c="year",p="date",f="Invalid Date",h=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|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("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return"["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},b=function(t,e,n){var r=String(t);return!r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},v={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,u),o=n-i<0,s=e.clone().add(r+(o?-1:1),u);return+(-(r+(n-i)/(o?i-s:s-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:u,y:c,w:l,d:a,D:p,h:s,m:o,s:i,ms:r,Q:d}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},y="en",w={};w[y]=g;var $=function(t){return t instanceof k},x=function t(e,n,r){var i;if(!e)return y;if("string"==typeof e){var o=e.toLowerCase();w[o]&&(i=o),n&&(w[o]=n,i=o);var s=e.split("-");if(!i&&s.length>1)return t(s[0])}else{var a=e.name;w[a]=e,i=a}return!r&&i&&(y=i),i||!r&&y},_=function(t,e){if($(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new k(n)},M=v;M.l=x,M.i=$,M.w=function(t,e){return _(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var k=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(M.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(h);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 M},b.isValid=function(){return!(this.$d.toString()===f)},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 M.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=!!M.u(e)||e,d=M.p(t),f=function(t,e){var i=M.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},h=function(t,e){return M.w(n.toDate()[t].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},m=this.$W,g=this.$M,b=this.$D,v="set"+(this.$u?"UTC":"");switch(d){case c:return r?f(1,0):f(31,11);case u:return r?f(1,g):f(0,g+1);case l:var y=this.$locale().weekStart||0,w=(m<y?m+7:m)-y;return f(r?b-w:b+(6-w),g);case a:case p:return h(v+"Hours",0);case s:return h(v+"Minutes",1);case o:return h(v+"Seconds",2);case i:return h(v+"Milliseconds",3);default:return this.clone()}},b.endOf=function(t){return this.startOf(t,!1)},b.$set=function(t,e){var n,l=M.p(t),d="set"+(this.$u?"UTC":""),f=(n={},n[a]=d+"Date",n[p]=d+"Date",n[u]=d+"Month",n[c]=d+"FullYear",n[s]=d+"Hours",n[o]=d+"Minutes",n[i]=d+"Seconds",n[r]=d+"Milliseconds",n)[l],h=l===a?this.$D+(e-this.$W):e;if(l===u||l===c){var m=this.clone().set(p,1);m.$d[f](h),m.init(),this.$d=m.set(p,Math.min(this.$D,m.daysInMonth())).$d}else f&&this.$d[f](h);return this.init(),this},b.set=function(t,e){return this.clone().$set(t,e)},b.get=function(t){return this[M.p(t)]()},b.add=function(r,d){var p,f=this;r=Number(r);var h=M.p(d),m=function(t){var e=_(f);return M.w(e.date(e.date()+Math.round(t*r)),f)};if(h===u)return this.set(u,this.$M+r);if(h===c)return this.set(c,this.$y+r);if(h===a)return m(1);if(h===l)return m(7);var g=(p={},p[o]=e,p[s]=n,p[i]=t,p)[h]||1,b=this.$d.getTime()+r*g;return M.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||f;var r=t||"YYYY-MM-DDTHH:mm:ssZ",i=M.z(this),o=this.$H,s=this.$m,a=this.$M,l=n.weekdays,u=n.months,d=function(t,n,i,o){return t&&(t[n]||t(e,r))||i[n].slice(0,o)},c=function(t){return M.s(o%12||12,t,"0")},p=n.meridiem||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r},h={YY:String(this.$y).slice(-2),YYYY:this.$y,M:a+1,MM:M.s(a+1,2,"0"),MMM:d(n.monthsShort,a,u,3),MMMM:d(u,a),D:this.$D,DD:M.s(this.$D,2,"0"),d:String(this.$W),dd:d(n.weekdaysMin,this.$W,l,2),ddd:d(n.weekdaysShort,this.$W,l,3),dddd:l[this.$W],H:String(o),HH:M.s(o,2,"0"),h:c(1),hh:c(2),a:p(o,s,!0),A:p(o,s,!1),m:String(s),mm:M.s(s,2,"0"),s:String(this.$s),ss:M.s(this.$s,2,"0"),SSS:M.s(this.$ms,3,"0"),Z:i};return r.replace(m,(function(t,e){return e||h[t]||i.replace(":","")}))},b.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},b.diff=function(r,p,f){var h,m=M.p(p),g=_(r),b=(g.utcOffset()-this.utcOffset())*e,v=this-g,y=M.m(this,g);return y=(h={},h[c]=y/12,h[u]=y,h[d]=y/3,h[l]=(v-b)/6048e5,h[a]=(v-b)/864e5,h[s]=v/n,h[o]=v/e,h[i]=v/t,h)[m]||v,f?y:M.a(y)},b.daysInMonth=function(){return this.endOf(u).$D},b.$locale=function(){return w[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 M.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}(),S=k.prototype;return _.prototype=S,[["$ms",r],["$s",i],["$m",o],["$H",s],["$W",a],["$M",u],["$y",c],["$D",p]].forEach((function(t){S[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),_.extend=function(t,e){return t.$i||(t(e,k,_),t.$i=!0),_},_.locale=x,_.isDayjs=$,_.unix=function(t){return _(1e3*t)},_.en=w[y],_.Ls=w,_.p={},_}()}));function z(t,e,n){var r,i,o,s,a;function l(){var u=Date.now()-s;u<e&&u>=0?r=setTimeout(l,e-u):(r=null,n||(a=t.apply(o,i),o=i=null))}null==e&&(e=100);var u=function(){o=this,i=arguments,s=Date.now();var u=n&&!r;return r||(r=setTimeout(l,e)),u&&(a=t.apply(o,i),o=i=null),a};return u.clear=function(){r&&(clearTimeout(r),r=null)},u.flush=function(){r&&(a=t.apply(o,i),o=i=null,clearTimeout(r),r=null)},u}z.debounce=z;var W=z;A((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}(I)}));var q=A((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],";"))},s=0,a=Object.keys(t);s<a.length;s++){o(a[s])}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="",s=t.getDefaultLang();if(!r||s!==r){var a=null==n?void 0:n[s];(null==a?void 0:a[e])&&(o=a[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})),J=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,U=/\n/g,R=/^\s*/,V=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,F=/^:\s*/,B=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Z=/^[;\s]*/,K=/^\s+|\s+$/g,Q="\n",G="/",X="*",tt="",et="comment",nt="declaration",rt=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(U);e&&(n+=e.length);var i=t.lastIndexOf(Q);r=~i?t.length-i:r+t.length}function o(){var t={line:n,column:r};return function(e){return e.position=new s(t),u(),e}}function s(t){this.start=t,this.end={line:n,column:r},this.source=e.source}function a(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 l(e){var n=e.exec(t);if(n){var r=n[0];return i(r),t=t.slice(r.length),n}}function u(){l(R)}function d(t){var e;for(t=t||[];e=c();)!1!==e&&t.push(e);return t}function c(){var e=o();if(G==t.charAt(0)&&X==t.charAt(1)){for(var n=2;tt!=t.charAt(n)&&(X!=t.charAt(n)||G!=t.charAt(n+1));)++n;if(n+=2,tt===t.charAt(n-1))return a("End of comment missing");var s=t.slice(2,n-2);return r+=2,i(s),t=t.slice(n),r+=2,e({type:et,comment:s})}}function p(){var t=o(),e=l(V);if(e){if(c(),!l(F))return a("property missing ':'");var n=l(B),r=t({type:nt,property:it(e[0].replace(J,tt)),value:n?it(n[0].replace(J,tt)):tt});return l(Z),r}}return s.prototype.content=t,u(),function(){var t,e=[];for(d(e);t=p();)!1!==t&&(e.push(t),d(e));return e}()};function it(t){return t?t.replace(K,tt):tt}var ot=function(t,e){var n,r=null;if(!t||"string"!=typeof t)return r;for(var i,o,s=rt(t),a="function"==typeof e,l=0,u=s.length;l<u;l++)i=(n=s[l]).property,o=n.value,a?e(i,o,n):o&&(r||(r={}),r[i]=o);return r},st={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 at(e){let n;return{c(){n=f("error")},m(t,e){d(t,n,e)},p:t,d(t){t&&c(n)}}}function lt(t){let e,n,r,i,o,s,a,m,w,$,x,_,M,k,S,D,T,C,L,O,Y,N,j,E,H,P,A,z,W,q,J,U,R,V,F,B,Z,K,Q,G,X,tt,et,nt,rt,it,ot,st,at,lt,dt,ct,pt,ft,ht,mt,gt,bt,vt,yt,wt,$t,xt,_t,Mt,kt,St,Dt,Tt,Ct,Lt,Ot,Yt,Nt,jt,Et,Ht=t[2].from.shortName+"",Pt=I(t[2].date).format("DD/MM/YY")+"",At=t[2].serial+"",It=t[2].from.name+"",zt=t[2].from.address+"",Wt=t[2].from.piva+"",qt=t[2].from.email+"",Jt=t[2].from.phone+"",Ut=t[2].to.name+"",Rt=t[2].to.address+"",Vt=t[2].to.piva+"",Ft="yes"!==t[0]&&ut(t);return{c(){e=p("div"),n=p("div"),r=p("div"),i=p("img"),s=h(),a=p("span"),m=f(Ht),w=h(),$=p("div"),Ft&&Ft.c(),x=h(),_=p("div"),M=p("div"),k=f("Data: "),S=f(Pt),D=h(),T=p("div"),C=h(),L=p("div"),O=f("Fattura numero: "),Y=f(At),N=h(),j=p("div"),E=p("div"),H=p("div"),P=f(It),A=h(),z=p("div"),W=f(zt),q=h(),J=p("div"),U=f(Wt),R=h(),V=p("div"),F=p("div"),B=f(qt),Z=h(),K=p("div"),Q=f(Jt),G=h(),X=p("div"),tt=p("div"),et=f(Ut),nt=h(),rt=p("div"),it=f(Rt),ot=h(),st=p("div"),at=f(Vt),lt=h(),dt=p("div"),ct=p("div"),pt=p("hb-table"),ht=h(),mt=p("div"),gt=p("div"),bt=p("div"),vt=p("div"),yt=p("div"),wt=p("span"),wt.textContent="SubTotale:",$t=h(),xt=f(t[4]),_t=f(t[3]),Mt=h(),kt=p("div"),St=p("span"),St.textContent="Tasse:",Dt=h(),Tt=f(t[5]),Ct=f(t[3]),Lt=h(),Ot=p("div"),Yt=p("span"),Yt.textContent="Totale:",Nt=h(),jt=f(t[8]),Et=f(t[3]),y(i,"height","80px"),y(i,"margin","0px 0px 0px 60px"),g(i,"alt",""),l(i.src,o=t[2].from.logo)||g(i,"src",o),y(a,"margin","0px 40px 0px 40px"),g(r,"class","col"),g($,"class","col"),g(n,"class","row"),y(n,"margin-top","20px"),g(M,"class","col"),g(T,"class","col"),g(L,"class","col"),g(_,"class","row"),y(_,"margin-top","60px"),g(E,"class","col"),g(V,"class","col"),g(X,"class","col"),g(j,"class","row"),y(j,"margin-top","40px"),b(pt,"style",t[6]),b(pt,"disablepagination","yes"),b(pt,"rows",ft=JSON.stringify(t[7])),b(pt,"headers",JSON.stringify(t[9])),g(ct,"class","col"),g(dt,"class","row"),y(dt,"margin-top","40px"),y(wt,"display","inline-block"),y(wt,"min-width","200px"),y(yt,"line-height","25px"),y(St,"display","inline-block"),y(St,"min-width","200px"),y(kt,"line-height","25px"),y(Yt,"display","inline-block"),y(Yt,"min-width","200px"),y(Ot,"line-height","25px"),y(Ot,"font-weight","bold"),y(vt,"text-align","left"),y(bt,"width","300px"),y(bt,"float","right"),g(gt,"class","col"),g(mt,"class","row"),y(mt,"margin-top","40px"),g(e,"id","page"),g(e,"class","container")},m(t,o){d(t,e,o),u(e,n),u(n,r),u(r,i),u(r,s),u(r,a),u(a,m),u(n,w),u(n,$),Ft&&Ft.m($,null),u(e,x),u(e,_),u(_,M),u(M,k),u(M,S),u(_,D),u(_,T),u(_,C),u(_,L),u(L,O),u(L,Y),u(e,N),u(e,j),u(j,E),u(E,H),u(H,P),u(E,A),u(E,z),u(z,W),u(E,q),u(E,J),u(J,U),u(j,R),u(j,V),u(V,F),u(F,B),u(V,Z),u(V,K),u(K,Q),u(j,G),u(j,X),u(X,tt),u(tt,et),u(X,nt),u(X,rt),u(rt,it),u(X,ot),u(X,st),u(st,at),u(e,lt),u(e,dt),u(dt,ct),u(ct,pt),u(e,ht),u(e,mt),u(mt,gt),u(gt,bt),u(bt,vt),u(vt,yt),u(yt,wt),u(yt,$t),u(yt,xt),u(yt,_t),u(vt,Mt),u(vt,kt),u(kt,St),u(kt,Dt),u(kt,Tt),u(kt,Ct),u(vt,Lt),u(vt,Ot),u(Ot,Yt),u(Ot,Nt),u(Ot,jt),u(Ot,Et)},p(t,e){4&e&&!l(i.src,o=t[2].from.logo)&&g(i,"src",o),4&e&&Ht!==(Ht=t[2].from.shortName+"")&&v(m,Ht),"yes"!==t[0]?Ft?Ft.p(t,e):(Ft=ut(t),Ft.c(),Ft.m($,null)):Ft&&(Ft.d(1),Ft=null),4&e&&Pt!==(Pt=I(t[2].date).format("DD/MM/YY")+"")&&v(S,Pt),4&e&&At!==(At=t[2].serial+"")&&v(Y,At),4&e&&It!==(It=t[2].from.name+"")&&v(P,It),4&e&&zt!==(zt=t[2].from.address+"")&&v(W,zt),4&e&&Wt!==(Wt=t[2].from.piva+"")&&v(U,Wt),4&e&&qt!==(qt=t[2].from.email+"")&&v(B,qt),4&e&&Jt!==(Jt=t[2].from.phone+"")&&v(Q,Jt),4&e&&Ut!==(Ut=t[2].to.name+"")&&v(et,Ut),4&e&&Rt!==(Rt=t[2].to.address+"")&&v(it,Rt),4&e&&Vt!==(Vt=t[2].to.piva+"")&&v(at,Vt),64&e&&b(pt,"style",t[6]),128&e&&ft!==(ft=JSON.stringify(t[7]))&&b(pt,"rows",ft),16&e&&v(xt,t[4]),8&e&&v(_t,t[3]),32&e&&v(Tt,t[5]),8&e&&v(Ct,t[3]),256&e&&v(jt,t[8]),8&e&&v(Et,t[3])},d(t){t&&c(e),Ft&&Ft.d()}}}function ut(t){let e,n,o,s,a,l;return{c(){e=p("div"),n=p("button"),n.innerHTML='<i class="bi-printer-fill"></i>',o=h(),s=p("button"),s.innerHTML='<i class="bi-arrows-fullscreen"></i>',g(n,"class","btn btn-default"),g(s,"class","btn btn-default"),y(e,"text-align","right"),y(e,"padding-right","60px")},m(r,c){d(r,e,c),u(e,n),u(e,o),u(e,s),a||(l=[m(n,"click",(function(){i(W(t[13],200))&&W(t[13],200).apply(this,arguments)})),m(s,"click",(function(){i(W(t[14],200))&&W(t[14],200).apply(this,arguments)}))],a=!0)},p(e,n){t=e},d(t){t&&c(e),a=!1,r(l)}}}function dt(e){let n;function r(t,e){return t[2]?.from&&t[2].to?lt:at}let i=r(e),o=i(e);return{c(){o.c(),n=f(""),this.c=t},m(t,e){o.m(t,e),d(t,n,e)},p(t,[e]){i===(i=r(t))&&o?o.p(t,e):(o.d(1),o=i(t),o&&(o.c(),o.m(n.parentNode,n)))},i:t,o:t,d(t){o.d(t),t&&c(n)}}}function ct(t,e,n){let r,i,{style:o}=e,s="",{id:a}=e,{printer:l}=e,{items:u}=e,{headers:d}=e;let c,p,f,h=[];q.addComponent({repoName:"@htmlbricks/hb-table",version:P.version});return t.$$set=t=>{"style"in t&&n(11,o=t.style),"id"in t&&n(10,a=t.id),"printer"in t&&n(0,l=t.printer),"items"in t&&n(1,u=t.items),"headers"in t&&n(2,d=t.headers)},t.$$.update=()=>{if(7231&t.$$.dirty){if(a||n(10,a=null),o&&(n(12,r=ot(o)),n(6,s=q.getChildStyleToPass(r,null==st?void 0:st.vars))),l||n(0,l="no"),u?"string"==typeof u&&n(1,u=JSON.parse(u)):n(1,u=[]),d){if("string"==typeof d)switch(n(2,d=JSON.parse(d)),d.date||n(2,d.date=new Date,d),d.category||n(2,d.category="items",d),d.country||n(2,d.country="it",d),d.country){case"it":case"eu":n(3,i="€");break;case"us":n(3,i="$")}}else n(2,d=null);(null==u?void 0:u.length)&&n(7,h=u.map(((t,e)=>{var n,r;return{_id:e.toString(),price:t.unitaryPrice.toString()+i+" / "+(t.unit?t.unit:"unità"),desc:t.desc,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()+i,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()+i}}))),n(4,c=null==u?void 0:u.map((t=>t.unitaryPrice*(t.quantity||1))).reduce(((t,e)=>t+e),0)),n(5,p=Math.round(100*u.map((t=>t.unitaryPrice*(t.quantity||1)*t.taxPercentage*.01)).reduce(((t,e)=>t+e),0))/100),n(8,f=c+p)}},[l,u,d,i,c,p,s,h,f,[{key:"desc",label:"descrizione",nosort:!0},{key:"price",label:"prezzo",nosort:!0},{key:"quantity",label:"quantità",nosort:!0},{key:"subtotal",label:"subtotal",nosort:!0},{key:"vat",label:"iva",nosort:!0},{key:"total",label:"totale",nosort:!0}],a,o,r,()=>function(t){const e=window.open("","PRINT","height=400,width=600");e.document.write("<html><head><title>"+document.title+"</title>"),e.document.write("</head><body >"),e.document.write(`<style>@page { size: auto; margin: 0mm; }</style><hb-page-invoice printer="yes" items='${JSON.stringify(t.items)}' headers='${JSON.stringify(t.headers)}'></hb-page-invoice>`),e.document.write("</body></html>");const n=document.createElement("script");n.id="hb-page-invoice-script",n.src=`https://cdn.jsdelivr.net/npm/@htmlbricks/hb-page-invoice@${t.version}/release/release.js`,location.href.includes("localhost")&&(n.src="http://localhost:6006/page-invoice/dist/release.js"),e.document.head.appendChild(n),setTimeout((()=>{e.print(),e.close()}),2e3)}({headers:d,items:u,version:P.version}),()=>function(t){const e=window.open("","PRINT","height=400,width=600");e.document.write("<html><head><title>"+document.title+"</title>"),e.document.write("</head><body >"),e.document.write(`<style>@page { size: auto; margin: 0mm; }</style><hb-page-invoice items='${JSON.stringify(t.items)}' headers='${JSON.stringify(t.headers)}'></hb-page-invoice>`),e.document.write("</body></html>");const n=document.createElement("script");n.id="hb-page-invoice-script",n.src=`https://cdn.jsdelivr.net/npm/@htmlbricks/hb-page-invoice@${t.version}/release/release.js`,location.href.includes("localhost")&&(n.src="http://localhost:6006/page-invoice/dist/release.js"),e.document.head.appendChild(n)}({headers:d,items:u,version:P.version})]}class pt extends H{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}}@media(min-width: 1200px){}@media(min-width: 1200px){}@media(min-width: 1200px){}@media(min-width: 1200px){}img{vertical-align:middle}button{border-radius:0}button:focus:not(:focus-visible){outline:0}button{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button{text-transform:none}button{-webkit-appearance:button}button:not(:disabled){cursor:pointer}::-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){}.btn{display:inline-block;font-weight:400;line-height:1.5;color:#212529;text-align:center;text-decoration:none;vertical-align:middle;cursor:pointer;user-select:none;background-color:transparent;border:1px solid transparent;padding:0.375rem 0.75rem;font-size:1rem;border-radius:0.25rem;transition:color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out}@media(prefers-reduced-motion: reduce){.btn{transition:none}}.btn:hover{color:#212529}.btn:focus{outline:0;box-shadow:0 0 0 0.25rem rgba(13, 110, 253, 0.25)}.btn:disabled{pointer-events:none;opacity:0.65}@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}</style>',E(this,{target:this.shadowRoot,props:w(this.attributes),customElement:!0},ct,dt,o,{style:11,id:10,printer:0,items:1,headers:2},null),t&&(t.target&&d(t.target,this,t.anchor),t.props&&(this.$set(t.props),O()))}static get observedAttributes(){return["style","id","printer","items","headers"]}get style(){return this.$$.ctx[11]}set style(t){this.$$set({style:t}),O()}get id(){return this.$$.ctx[10]}set id(t){this.$$set({id:t}),O()}get printer(){return this.$$.ctx[0]}set printer(t){this.$$set({printer:t}),O()}get items(){return this.$$.ctx[1]}set items(t){this.$$set({items:t}),O()}get headers(){return this.$$.ctx[2]}set headers(t){this.$$set({headers:t}),O()}}return customElements.define("hb-page-invoice",pt),pt}();
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}let s,a;function l(t,e){return s||(s=document.createElement("a")),s.href=e,t===s.href}function u(t,e){t.appendChild(e)}function d(t,e,n){t.insertBefore(e,n||null)}function c(t){t.parentNode&&t.parentNode.removeChild(t)}function p(t){return document.createElement(t)}function f(t){return document.createTextNode(t)}function h(){return f(" ")}function m(t,e,n,r){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n,r)}function g(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function b(t,e,n){e in t?t[e]="boolean"==typeof t[e]&&""===n||n:g(t,e,n)}function v(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function y(t,e,n,r){null===n?t.style.removeProperty(e):t.style.setProperty(e,n,r?"important":"")}function w(t){const e={};for(const n of t)e[n.name]=n.value;return e}function $(t){a=t}const x=[],_=[],M=[],k=[],S=Promise.resolve();let D=!1;function T(t){M.push(t)}const C=new Set;let L=0;function O(){if(0!==L)return;const t=a;do{try{for(;L<x.length;){const t=x[L];L++,$(t),Y(t.$$)}}catch(t){throw x.length=0,L=0,t}for($(null),x.length=0,L=0;_.length;)_.pop()();for(let t=0;t<M.length;t+=1){const e=M[t];C.has(e)||(C.add(e),e())}M.length=0}while(x.length);for(;k.length;)k.pop()();D=!1,C.clear(),$(t)}function Y(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(T)}}const N=new Set;function j(t,e){-1===t.$$.dirty[0]&&(x.push(t),D||(D=!0,S.then(O)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function E(o,s,l,u,d,p,f,h=[-1]){const m=a;$(o);const g=o.$$={fragment:null,ctx:[],props:p,update:t,not_equal:d,bound:n(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(s.context||(m?m.$$.context:[])),callbacks:n(),dirty:h,skip_bound:!1,root:s.target||m.$$.root};f&&f(g.root);let b=!1;if(g.ctx=l?l(o,s.props||{},((t,e,...n)=>{const r=n.length?n[0]:e;return g.ctx&&d(g.ctx[t],g.ctx[t]=r)&&(!g.skip_bound&&g.bound[t]&&g.bound[t](r),b&&j(o,t)),e})):[],g.update(),b=!0,r(g.before_update),g.fragment=!!u&&u(g.ctx),s.target){if(s.hydrate){const t=function(t){return Array.from(t.childNodes)}(s.target);g.fragment&&g.fragment.l(t),t.forEach(c)}else g.fragment&&g.fragment.c();s.intro&&((v=o.$$.fragment)&&v.i&&(N.delete(v),v.i(y))),function(t,n,o,s){const{fragment:a,after_update:l}=t.$$;a&&a.m(n,o),s||T((()=>{const n=t.$$.on_mount.map(e).filter(i);t.$$.on_destroy?t.$$.on_destroy.push(...n):r(n),t.$$.on_mount=[]})),l.forEach(T)}(o,s.target,s.anchor,s.customElement),O()}var v,y;$(m)}let H;"function"==typeof HTMLElement&&(H=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(e,n){if(!i(n))return t;const r=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return r.push(n),()=>{const t=r.indexOf(n);-1!==t&&r.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 P={name:"@htmlbricks/hb-page-invoice",displayName:"Svelte Invoice WebComponent",description:"Svelte Invoice WebComponent",version:"0.19.21",main:"release/release.js",publishConfig:{access:"public"},author:"Dario Caruso <dev@dariocaruso.info> (https://dariocaruso.info)",authorUrl:"https://dariocaruso.info",license:"MIT","license-docs":"CC BY 4.0","license-translations":"CC BY 4.0","license-images":"CC BY-NC 4.0",engines:{node:">=16.0.0"},scripts:{start:"sirv dist",dev:"rm -rf ./dist && rollup -c -w",build:"rm -rf ./dist && rollup -c","generate-manifest":"npm run generate-schemes && monorepo-wc-packages-manifester --dir $PWD","generate-component-schema":"ts-json-schema-generator --type 'Component' --path 'app/types/webcomponent.type.d.ts' > dist/webcomponent.type.d.json","generate-events-schema":"ts-json-schema-generator --type 'Events' --path 'app/types/webcomponent.type.d.ts' > dist/webcomponent_events.type.d.json","generate-schemes":"npm run generate-events-schema && npm run generate-component-schema",copydest:"rm -rf release && mkdir -p release && mkdir -p release && cp dist/* ./release/","build-extra":"tsc --moduleResolution node --module es2020 --esModuleInterop true --outDir dist --sourceMap --skipLibCheck extra/*","build:release":"PRODUCTION=true npm run build && npm run build-extra && npm run generate-manifest && npm run copydest",prepublish:"npm run build:release"},devDependencies:{"@rollup/plugin-alias":"^3.1.2","@rollup/plugin-commonjs":"^18.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.2.1","@rollup/plugin-replace":"^4.0.0","@rollup/plugin-typescript":"^8.2.1","@tsconfig/svelte":"^1.0.10","@types/node":"^16.7.1","@typescript-eslint/eslint-plugin":"^4.22.0","@typescript-eslint/parser":"^4.22.0",eslint:"^7.25.0","eslint-plugin-jsdoc":"^33.0.0","eslint-plugin-svelte3":"^3.2.0","monorepo-wc-packages-manifester":"^0.0.3","node-sass":"^6.0.1",postcss:"^8.2.13","postcss-load-config":"^3.0.1",prettier:"^2.8.4",rollup:"^2.46.0","rollup-plugin-copy":"^3.4.0","rollup-plugin-css-only":"^3.1.0","rollup-plugin-livereload":"^2.0.0","rollup-plugin-svelte":"^7.1.0","rollup-plugin-terser":"^7.0.2","rollup-plugin-ts-paths":"^1.0.5","rollup-plugin-typescript2":"^0.31.1",sass:"^1.32.12","sirv-cli":"^1.0.11",svelte:"^3.46.2","svelte-check":"^1.5.2","svelte-preprocess":"^4.7.2","ts-json-schema-generator":"^0.98.0","ts-node":"^9.1.1",tslib:"^2.2.0",ttypescript:"^1.5.12",typescript:"^4.2.4","typescript-transform-paths":"^2.2.3","wc-js-utils":"^0.0.1"},dependencies:{"@htmlbricks/hb-table":"^0.19.21",dayjs:"^1.10.7",debounce:"^1.2.1"},keywords:["svelte","svelte-webcomponents","webcomponents","html5-webcomponents"],contributors:[],gitHead:"ee381e4718f7a14dae7f8a731e68a985adb17216"};"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function A(t){var e={exports:{}};return t(e,e.exports),e.exports}var I=A((function(t,e){t.exports=function(){var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",o="minute",s="hour",a="day",l="week",u="month",d="quarter",c="year",p="date",f="Invalid Date",h=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|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("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return"["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},b=function(t,e,n){var r=String(t);return!r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},v={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,u),o=n-i<0,s=e.clone().add(r+(o?-1:1),u);return+(-(r+(n-i)/(o?i-s:s-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:u,y:c,w:l,d:a,D:p,h:s,m:o,s:i,ms:r,Q:d}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},y="en",w={};w[y]=g;var $=function(t){return t instanceof k},x=function t(e,n,r){var i;if(!e)return y;if("string"==typeof e){var o=e.toLowerCase();w[o]&&(i=o),n&&(w[o]=n,i=o);var s=e.split("-");if(!i&&s.length>1)return t(s[0])}else{var a=e.name;w[a]=e,i=a}return!r&&i&&(y=i),i||!r&&y},_=function(t,e){if($(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new k(n)},M=v;M.l=x,M.i=$,M.w=function(t,e){return _(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var k=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(M.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(h);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 M},b.isValid=function(){return!(this.$d.toString()===f)},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 M.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=!!M.u(e)||e,d=M.p(t),f=function(t,e){var i=M.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},h=function(t,e){return M.w(n.toDate()[t].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},m=this.$W,g=this.$M,b=this.$D,v="set"+(this.$u?"UTC":"");switch(d){case c:return r?f(1,0):f(31,11);case u:return r?f(1,g):f(0,g+1);case l:var y=this.$locale().weekStart||0,w=(m<y?m+7:m)-y;return f(r?b-w:b+(6-w),g);case a:case p:return h(v+"Hours",0);case s:return h(v+"Minutes",1);case o:return h(v+"Seconds",2);case i:return h(v+"Milliseconds",3);default:return this.clone()}},b.endOf=function(t){return this.startOf(t,!1)},b.$set=function(t,e){var n,l=M.p(t),d="set"+(this.$u?"UTC":""),f=(n={},n[a]=d+"Date",n[p]=d+"Date",n[u]=d+"Month",n[c]=d+"FullYear",n[s]=d+"Hours",n[o]=d+"Minutes",n[i]=d+"Seconds",n[r]=d+"Milliseconds",n)[l],h=l===a?this.$D+(e-this.$W):e;if(l===u||l===c){var m=this.clone().set(p,1);m.$d[f](h),m.init(),this.$d=m.set(p,Math.min(this.$D,m.daysInMonth())).$d}else f&&this.$d[f](h);return this.init(),this},b.set=function(t,e){return this.clone().$set(t,e)},b.get=function(t){return this[M.p(t)]()},b.add=function(r,d){var p,f=this;r=Number(r);var h=M.p(d),m=function(t){var e=_(f);return M.w(e.date(e.date()+Math.round(t*r)),f)};if(h===u)return this.set(u,this.$M+r);if(h===c)return this.set(c,this.$y+r);if(h===a)return m(1);if(h===l)return m(7);var g=(p={},p[o]=e,p[s]=n,p[i]=t,p)[h]||1,b=this.$d.getTime()+r*g;return M.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||f;var r=t||"YYYY-MM-DDTHH:mm:ssZ",i=M.z(this),o=this.$H,s=this.$m,a=this.$M,l=n.weekdays,u=n.months,d=function(t,n,i,o){return t&&(t[n]||t(e,r))||i[n].slice(0,o)},c=function(t){return M.s(o%12||12,t,"0")},p=n.meridiem||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r},h={YY:String(this.$y).slice(-2),YYYY:this.$y,M:a+1,MM:M.s(a+1,2,"0"),MMM:d(n.monthsShort,a,u,3),MMMM:d(u,a),D:this.$D,DD:M.s(this.$D,2,"0"),d:String(this.$W),dd:d(n.weekdaysMin,this.$W,l,2),ddd:d(n.weekdaysShort,this.$W,l,3),dddd:l[this.$W],H:String(o),HH:M.s(o,2,"0"),h:c(1),hh:c(2),a:p(o,s,!0),A:p(o,s,!1),m:String(s),mm:M.s(s,2,"0"),s:String(this.$s),ss:M.s(this.$s,2,"0"),SSS:M.s(this.$ms,3,"0"),Z:i};return r.replace(m,(function(t,e){return e||h[t]||i.replace(":","")}))},b.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},b.diff=function(r,p,f){var h,m=M.p(p),g=_(r),b=(g.utcOffset()-this.utcOffset())*e,v=this-g,y=M.m(this,g);return y=(h={},h[c]=y/12,h[u]=y,h[d]=y/3,h[l]=(v-b)/6048e5,h[a]=(v-b)/864e5,h[s]=v/n,h[o]=v/e,h[i]=v/t,h)[m]||v,f?y:M.a(y)},b.daysInMonth=function(){return this.endOf(u).$D},b.$locale=function(){return w[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 M.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}(),S=k.prototype;return _.prototype=S,[["$ms",r],["$s",i],["$m",o],["$H",s],["$W",a],["$M",u],["$y",c],["$D",p]].forEach((function(t){S[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),_.extend=function(t,e){return t.$i||(t(e,k,_),t.$i=!0),_},_.locale=x,_.isDayjs=$,_.unix=function(t){return _(1e3*t)},_.en=w[y],_.Ls=w,_.p={},_}()}));function z(t,e,n){var r,i,o,s,a;function l(){var u=Date.now()-s;u<e&&u>=0?r=setTimeout(l,e-u):(r=null,n||(a=t.apply(o,i),o=i=null))}null==e&&(e=100);var u=function(){o=this,i=arguments,s=Date.now();var u=n&&!r;return r||(r=setTimeout(l,e)),u&&(a=t.apply(o,i),o=i=null),a};return u.clear=function(){r&&(clearTimeout(r),r=null)},u.flush=function(){r&&(a=t.apply(o,i),o=i=null,clearTimeout(r),r=null)},u}z.debounce=z;var W=z;A((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}(I)}));var q=A((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],";"))},s=0,a=Object.keys(t);s<a.length;s++){o(a[s])}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="",s=t.getDefaultLang();if(!r||s!==r){var a=null==n?void 0:n[s];(null==a?void 0:a[e])&&(o=a[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})),J=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,U=/\n/g,R=/^\s*/,V=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,F=/^:\s*/,B=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Z=/^[;\s]*/,K=/^\s+|\s+$/g,Q="\n",G="/",X="*",tt="",et="comment",nt="declaration",rt=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(U);e&&(n+=e.length);var i=t.lastIndexOf(Q);r=~i?t.length-i:r+t.length}function o(){var t={line:n,column:r};return function(e){return e.position=new s(t),u(),e}}function s(t){this.start=t,this.end={line:n,column:r},this.source=e.source}function a(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 l(e){var n=e.exec(t);if(n){var r=n[0];return i(r),t=t.slice(r.length),n}}function u(){l(R)}function d(t){var e;for(t=t||[];e=c();)!1!==e&&t.push(e);return t}function c(){var e=o();if(G==t.charAt(0)&&X==t.charAt(1)){for(var n=2;tt!=t.charAt(n)&&(X!=t.charAt(n)||G!=t.charAt(n+1));)++n;if(n+=2,tt===t.charAt(n-1))return a("End of comment missing");var s=t.slice(2,n-2);return r+=2,i(s),t=t.slice(n),r+=2,e({type:et,comment:s})}}function p(){var t=o(),e=l(V);if(e){if(c(),!l(F))return a("property missing ':'");var n=l(B),r=t({type:nt,property:it(e[0].replace(J,tt)),value:n?it(n[0].replace(J,tt)):tt});return l(Z),r}}return s.prototype.content=t,u(),function(){var t,e=[];for(d(e);t=p();)!1!==t&&(e.push(t),d(e));return e}()};function it(t){return t?t.replace(K,tt):tt}var ot=function(t,e){var n,r=null;if(!t||"string"!=typeof t)return r;for(var i,o,s=rt(t),a="function"==typeof e,l=0,u=s.length;l<u;l++)i=(n=s[l]).property,o=n.value,a?e(i,o,n):o&&(r||(r={}),r[i]=o);return r},st={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 at(e){let n;return{c(){n=f("error")},m(t,e){d(t,n,e)},p:t,d(t){t&&c(n)}}}function lt(t){let e,n,r,i,o,s,a,m,w,$,x,_,M,k,S,D,T,C,L,O,Y,N,j,E,H,P,A,z,W,q,J,U,R,V,F,B,Z,K,Q,G,X,tt,et,nt,rt,it,ot,st,at,lt,dt,ct,pt,ft,ht,mt,gt,bt,vt,yt,wt,$t,xt,_t,Mt,kt,St,Dt,Tt,Ct,Lt,Ot,Yt,Nt,jt,Et,Ht=t[2].from.shortName+"",Pt=I(t[2].date).format("DD/MM/YY")+"",At=t[2].serial+"",It=t[2].from.name+"",zt=t[2].from.address+"",Wt=t[2].from.piva+"",qt=t[2].from.email+"",Jt=t[2].from.phone+"",Ut=t[2].to.name+"",Rt=t[2].to.address+"",Vt=t[2].to.piva+"",Ft="yes"!==t[0]&&ut(t);return{c(){e=p("div"),n=p("div"),r=p("div"),i=p("img"),s=h(),a=p("span"),m=f(Ht),w=h(),$=p("div"),Ft&&Ft.c(),x=h(),_=p("div"),M=p("div"),k=f("Data: "),S=f(Pt),D=h(),T=p("div"),C=h(),L=p("div"),O=f("Fattura numero: "),Y=f(At),N=h(),j=p("div"),E=p("div"),H=p("div"),P=f(It),A=h(),z=p("div"),W=f(zt),q=h(),J=p("div"),U=f(Wt),R=h(),V=p("div"),F=p("div"),B=f(qt),Z=h(),K=p("div"),Q=f(Jt),G=h(),X=p("div"),tt=p("div"),et=f(Ut),nt=h(),rt=p("div"),it=f(Rt),ot=h(),st=p("div"),at=f(Vt),lt=h(),dt=p("div"),ct=p("div"),pt=p("hb-table"),ht=h(),mt=p("div"),gt=p("div"),bt=p("div"),vt=p("div"),yt=p("div"),wt=p("span"),wt.textContent="SubTotale:",$t=h(),xt=f(t[4]),_t=f(t[3]),Mt=h(),kt=p("div"),St=p("span"),St.textContent="Tasse:",Dt=h(),Tt=f(t[5]),Ct=f(t[3]),Lt=h(),Ot=p("div"),Yt=p("span"),Yt.textContent="Totale:",Nt=h(),jt=f(t[8]),Et=f(t[3]),y(i,"height","80px"),y(i,"margin","0px 0px 0px 60px"),g(i,"alt",""),l(i.src,o=t[2].from.logo)||g(i,"src",o),y(a,"margin","0px 40px 0px 40px"),g(r,"class","col"),g($,"class","col"),g(n,"class","row"),y(n,"margin-top","20px"),g(M,"class","col"),g(T,"class","col"),g(L,"class","col"),g(_,"class","row"),y(_,"margin-top","60px"),g(E,"class","col"),g(V,"class","col"),g(X,"class","col"),g(j,"class","row"),y(j,"margin-top","40px"),b(pt,"style",t[6]),b(pt,"disablepagination","yes"),b(pt,"rows",ft=JSON.stringify(t[7])),b(pt,"headers",JSON.stringify(t[9])),g(ct,"class","col"),g(dt,"class","row"),y(dt,"margin-top","40px"),y(wt,"display","inline-block"),y(wt,"min-width","200px"),y(yt,"line-height","25px"),y(St,"display","inline-block"),y(St,"min-width","200px"),y(kt,"line-height","25px"),y(Yt,"display","inline-block"),y(Yt,"min-width","200px"),y(Ot,"line-height","25px"),y(Ot,"font-weight","bold"),y(vt,"text-align","left"),y(bt,"width","300px"),y(bt,"float","right"),g(gt,"class","col"),g(mt,"class","row"),y(mt,"margin-top","40px"),g(e,"id","page"),g(e,"class","container")},m(t,o){d(t,e,o),u(e,n),u(n,r),u(r,i),u(r,s),u(r,a),u(a,m),u(n,w),u(n,$),Ft&&Ft.m($,null),u(e,x),u(e,_),u(_,M),u(M,k),u(M,S),u(_,D),u(_,T),u(_,C),u(_,L),u(L,O),u(L,Y),u(e,N),u(e,j),u(j,E),u(E,H),u(H,P),u(E,A),u(E,z),u(z,W),u(E,q),u(E,J),u(J,U),u(j,R),u(j,V),u(V,F),u(F,B),u(V,Z),u(V,K),u(K,Q),u(j,G),u(j,X),u(X,tt),u(tt,et),u(X,nt),u(X,rt),u(rt,it),u(X,ot),u(X,st),u(st,at),u(e,lt),u(e,dt),u(dt,ct),u(ct,pt),u(e,ht),u(e,mt),u(mt,gt),u(gt,bt),u(bt,vt),u(vt,yt),u(yt,wt),u(yt,$t),u(yt,xt),u(yt,_t),u(vt,Mt),u(vt,kt),u(kt,St),u(kt,Dt),u(kt,Tt),u(kt,Ct),u(vt,Lt),u(vt,Ot),u(Ot,Yt),u(Ot,Nt),u(Ot,jt),u(Ot,Et)},p(t,e){4&e&&!l(i.src,o=t[2].from.logo)&&g(i,"src",o),4&e&&Ht!==(Ht=t[2].from.shortName+"")&&v(m,Ht),"yes"!==t[0]?Ft?Ft.p(t,e):(Ft=ut(t),Ft.c(),Ft.m($,null)):Ft&&(Ft.d(1),Ft=null),4&e&&Pt!==(Pt=I(t[2].date).format("DD/MM/YY")+"")&&v(S,Pt),4&e&&At!==(At=t[2].serial+"")&&v(Y,At),4&e&&It!==(It=t[2].from.name+"")&&v(P,It),4&e&&zt!==(zt=t[2].from.address+"")&&v(W,zt),4&e&&Wt!==(Wt=t[2].from.piva+"")&&v(U,Wt),4&e&&qt!==(qt=t[2].from.email+"")&&v(B,qt),4&e&&Jt!==(Jt=t[2].from.phone+"")&&v(Q,Jt),4&e&&Ut!==(Ut=t[2].to.name+"")&&v(et,Ut),4&e&&Rt!==(Rt=t[2].to.address+"")&&v(it,Rt),4&e&&Vt!==(Vt=t[2].to.piva+"")&&v(at,Vt),64&e&&b(pt,"style",t[6]),128&e&&ft!==(ft=JSON.stringify(t[7]))&&b(pt,"rows",ft),16&e&&v(xt,t[4]),8&e&&v(_t,t[3]),32&e&&v(Tt,t[5]),8&e&&v(Ct,t[3]),256&e&&v(jt,t[8]),8&e&&v(Et,t[3])},d(t){t&&c(e),Ft&&Ft.d()}}}function ut(t){let e,n,o,s,a,l;return{c(){e=p("div"),n=p("button"),n.innerHTML='<i class="bi-printer-fill"></i>',o=h(),s=p("button"),s.innerHTML='<i class="bi-arrows-fullscreen"></i>',g(n,"class","btn btn-default"),g(s,"class","btn btn-default"),y(e,"text-align","right"),y(e,"padding-right","60px")},m(r,c){d(r,e,c),u(e,n),u(e,o),u(e,s),a||(l=[m(n,"click",(function(){i(W(t[13],200))&&W(t[13],200).apply(this,arguments)})),m(s,"click",(function(){i(W(t[14],200))&&W(t[14],200).apply(this,arguments)}))],a=!0)},p(e,n){t=e},d(t){t&&c(e),a=!1,r(l)}}}function dt(e){let n;function r(t,e){return t[2]?.from&&t[2].to?lt:at}let i=r(e),o=i(e);return{c(){o.c(),n=f(""),this.c=t},m(t,e){o.m(t,e),d(t,n,e)},p(t,[e]){i===(i=r(t))&&o?o.p(t,e):(o.d(1),o=i(t),o&&(o.c(),o.m(n.parentNode,n)))},i:t,o:t,d(t){o.d(t),t&&c(n)}}}function ct(t,e,n){let r,i,{style:o}=e,s="",{id:a}=e,{printer:l}=e,{items:u}=e,{headers:d}=e;let c,p,f,h=[];q.addComponent({repoName:"@htmlbricks/hb-table",version:P.version});return t.$$set=t=>{"style"in t&&n(11,o=t.style),"id"in t&&n(10,a=t.id),"printer"in t&&n(0,l=t.printer),"items"in t&&n(1,u=t.items),"headers"in t&&n(2,d=t.headers)},t.$$.update=()=>{if(7231&t.$$.dirty){if(a||n(10,a=null),o&&(n(12,r=ot(o)),n(6,s=q.getChildStyleToPass(r,null==st?void 0:st.vars))),l||n(0,l="no"),u?"string"==typeof u&&n(1,u=JSON.parse(u)):n(1,u=[]),d){if("string"==typeof d)switch(n(2,d=JSON.parse(d)),d.date||n(2,d.date=new Date,d),d.category||n(2,d.category="items",d),d.country||n(2,d.country="it",d),d.country){case"it":case"eu":n(3,i="€");break;case"us":n(3,i="$")}}else n(2,d=null);(null==u?void 0:u.length)&&n(7,h=u.map(((t,e)=>{var n,r;return{_id:e.toString(),price:t.unitaryPrice.toString()+i+" / "+(t.unit?t.unit:"unità"),desc:t.desc,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()+i,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()+i}}))),n(4,c=null==u?void 0:u.map((t=>t.unitaryPrice*(t.quantity||1))).reduce(((t,e)=>t+e),0)),n(5,p=Math.round(100*u.map((t=>t.unitaryPrice*(t.quantity||1)*t.taxPercentage*.01)).reduce(((t,e)=>t+e),0))/100),n(8,f=c+p)}},[l,u,d,i,c,p,s,h,f,[{key:"desc",label:"descrizione",nosort:!0},{key:"price",label:"prezzo",nosort:!0},{key:"quantity",label:"quantità",nosort:!0},{key:"subtotal",label:"subtotal",nosort:!0},{key:"vat",label:"iva",nosort:!0},{key:"total",label:"totale",nosort:!0}],a,o,r,()=>function(t){const e=window.open("","PRINT","height=400,width=600");e.document.write("<html><head><title>"+document.title+"</title>"),e.document.write("</head><body >"),e.document.write(`<style>@page { size: auto; margin: 0mm; }</style><hb-page-invoice printer="yes" items='${JSON.stringify(t.items)}' headers='${JSON.stringify(t.headers)}'></hb-page-invoice>`),e.document.write("</body></html>");const n=document.createElement("script");n.id="hb-page-invoice-script",n.src=`https://cdn.jsdelivr.net/npm/@htmlbricks/hb-page-invoice@${t.version}/release/release.js`,location.href.includes("localhost")&&(n.src="http://localhost:6006/page-invoice/dist/release.js"),e.document.head.appendChild(n),setTimeout((()=>{e.print(),e.close()}),2e3)}({headers:d,items:u,version:P.version}),()=>function(t){const e=window.open("","PRINT","height=400,width=600");e.document.write("<html><head><title>"+document.title+"</title>"),e.document.write("</head><body >"),e.document.write(`<style>@page { size: auto; margin: 0mm; }</style><hb-page-invoice items='${JSON.stringify(t.items)}' headers='${JSON.stringify(t.headers)}'></hb-page-invoice>`),e.document.write("</body></html>");const n=document.createElement("script");n.id="hb-page-invoice-script",n.src=`https://cdn.jsdelivr.net/npm/@htmlbricks/hb-page-invoice@${t.version}/release/release.js`,location.href.includes("localhost")&&(n.src="http://localhost:6006/page-invoice/dist/release.js"),e.document.head.appendChild(n)}({headers:d,items:u,version:P.version})]}class pt extends H{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}}@media(min-width: 1200px){}@media(min-width: 1200px){}@media(min-width: 1200px){}@media(min-width: 1200px){}img{vertical-align:middle}button{border-radius:0}button:focus:not(:focus-visible){outline:0}button{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button{text-transform:none}button{-webkit-appearance:button}button:not(:disabled){cursor:pointer}::-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){}.btn{display:inline-block;font-weight:400;line-height:1.5;color:#212529;text-align:center;text-decoration:none;vertical-align:middle;cursor:pointer;user-select:none;background-color:transparent;border:1px solid transparent;padding:0.375rem 0.75rem;font-size:1rem;border-radius:0.25rem;transition:color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out}@media(prefers-reduced-motion: reduce){.btn{transition:none}}.btn:hover{color:#212529}.btn:focus{outline:0;box-shadow:0 0 0 0.25rem rgba(13, 110, 253, 0.25)}.btn:disabled{pointer-events:none;opacity:0.65}@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}</style>',E(this,{target:this.shadowRoot,props:w(this.attributes),customElement:!0},ct,dt,o,{style:11,id:10,printer:0,items:1,headers:2},null),t&&(t.target&&d(t.target,this,t.anchor),t.props&&(this.$set(t.props),O()))}static get observedAttributes(){return["style","id","printer","items","headers"]}get style(){return this.$$.ctx[11]}set style(t){this.$$set({style:t}),O()}get id(){return this.$$.ctx[10]}set id(t){this.$$set({id:t}),O()}get printer(){return this.$$.ctx[0]}set printer(t){this.$$set({printer:t}),O()}get items(){return this.$$.ctx[1]}set items(t){this.$$set({items:t}),O()}get headers(){return this.$$.ctx[2]}set headers(t){this.$$set({headers:t}),O()}}return customElements.define("hb-page-invoice",pt),pt}();
2
2
  //# sourceMappingURL=release.js.map