dealposbarcode 1.2.3 → 1.2.7

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.
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkbarcode_app=self.webpackChunkbarcode_app||[]).push([[269],{9489:(Z,c,p)=>{var y=O(p(3413)),v=O(p(7720)),A=O(p(2308)),T=O(p(7095)),t=O(p(4441)),i=O(p(201)),u=O(p(400)),d=p(4779),S=O(p(1452));function O(w){return w&&w.__esModule?w:{default:w}}var C=function(){},M=function(x,k,R){var I=new C;if(void 0===x)throw Error("No element to render on was provided.");return I._renderProperties=(0,t.default)(x),I._encodings=[],I._options=S.default,I._errorHandler=new u.default(I),void 0!==k&&((R=R||{}).format||(R.format=z()),I.options(R)[R.format](k,R).render()),I};for(var L in M.getModule=function(w){return y.default[w]},y.default)y.default.hasOwnProperty(L)&&N(y.default,L);function N(w,x){C.prototype[x]=C.prototype[x.toUpperCase()]=C.prototype[x.toLowerCase()]=function(k,R){var I=this;return I._errorHandler.wrapBarcodeCall(function(){R.text=void 0===R.text?void 0:""+R.text;var D=(0,v.default)(I._options,R);D=(0,i.default)(D);var Y=G(k,w[x],D);return I._encodings.push(Y),I})}}function G(w,x,k){var R=new x(w=""+w,k);if(!R.valid())throw new d.InvalidInputException(R.constructor.name,w);var I=R.encode();I=(0,A.default)(I);for(var D=0;D<I.length;D++)I[D].options=(0,v.default)(k,I[D].options);return I}function z(){return y.default.CODE128?"CODE128":Object.keys(y.default)[0]}function J(w,x,k){x=(0,A.default)(x);for(var R=0;R<x.length;R++)x[R].options=(0,v.default)(k,x[R].options),(0,T.default)(x[R].options);(0,T.default)(k),new(0,w.renderer)(w.element,x,k).render(),w.afterRender&&w.afterRender()}C.prototype.options=function(w){return this._options=(0,v.default)(this._options,w),this},C.prototype.blank=function(w){var x=new Array(w+1).join("0");return this._encodings.push({data:x}),this},C.prototype.init=function(){var w;if(this._renderProperties)for(var x in Array.isArray(this._renderProperties)||(this._renderProperties=[this._renderProperties]),this._renderProperties){var k=(0,v.default)(this._options,(w=this._renderProperties[x]).options);"auto"==k.format&&(k.format=z()),this._errorHandler.wrapBarcodeCall(function(){var D=G(k.value,y.default[k.format.toUpperCase()],k);J(w,D,k)})}},C.prototype.render=function(){if(!this._renderProperties)throw new d.NoElementException;if(Array.isArray(this._renderProperties))for(var w=0;w<this._renderProperties.length;w++)J(this._renderProperties[w],this._encodings,this._options);else J(this._renderProperties,this._encodings,this._options);return this},C.prototype._defaults=S.default,"undefined"!=typeof window&&(window.JsBarcode=M),"undefined"!=typeof jQuery&&(jQuery.fn.JsBarcode=function(w,x){var k=[];return jQuery(this).each(function(){k.push(this)}),M(k,w,x)}),Z.exports=M},6615:(Z,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.default=function y(e,v){(function(y,e){if(!(y instanceof e))throw new TypeError("Cannot call a class as a function")})(this,y),this.data=e,this.text=v.text||e,this.options=v}},8901:(Z,c,p)=>{Object.defineProperty(c,"__esModule",{value:!0});var t,_=function(){function t(n,i){for(var r=0;r<i.length;r++){var u=i[r];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(n,u.key,u)}}return function(n,i,r){return i&&t(n.prototype,i),r&&t(n,r),n}}(),e=(t=p(6615))&&t.__esModule?t:{default:t},v=p(5286),l=function(t){function n(i,r){!function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,n);var u=function(t,n){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?t:n}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,i.substring(1),r));return u.bytes=i.split("").map(function(d){return d.charCodeAt(0)}),u}return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(t,n):t.__proto__=n)}(n,t),_(n,[{key:"valid",value:function(){return/^[\x00-\x7F\xC8-\xD3]+$/.test(this.data)}},{key:"encode",value:function(){var r=this.bytes,u=r.shift()-105,d=v.SET_BY_CODE[u];if(void 0===d)throw new RangeError("The encoding does not start with a start character.");!0===this.shouldEncodeAsEan128()&&r.unshift(v.FNC1);var s=n.next(r,1,d);return{text:this.text===this.data?this.text.replace(/[^\x20-\x7E]/g,""):this.text,data:n.getBar(u)+s.result+n.getBar((s.checksum+u)%v.MODULO)+n.getBar(v.STOP)}}},{key:"shouldEncodeAsEan128",value:function(){var r=this.options.ean128||!1;return"string"==typeof r&&(r="true"===r.toLowerCase()),r}}],[{key:"getBar",value:function(r){return v.BARS[r]?v.BARS[r].toString():""}},{key:"correctIndex",value:function(r,u){if(u===v.SET_A){var d=r.shift();return d<32?d+64:d-32}return u===v.SET_B?r.shift()-32:10*(r.shift()-48)+r.shift()-48}},{key:"next",value:function(r,u,d){if(!r.length)return{result:"",checksum:0};var s=void 0,S=void 0;if(r[0]>=200){S=r.shift()-105;var O=v.SWAP[S];void 0!==O?s=n.next(r,u+1,O):((d===v.SET_A||d===v.SET_B)&&S===v.SHIFT&&(r[0]=d===v.SET_A?r[0]>95?r[0]-96:r[0]:r[0]<32?r[0]+96:r[0]),s=n.next(r,u+1,d))}else S=n.correctIndex(r,d),s=n.next(r,u+1,d);return{result:n.getBar(S)+s.result,checksum:S*u+s.checksum}}}]),n}(e.default);c.default=l},972:(Z,c,p)=>{Object.defineProperty(c,"__esModule",{value:!0});var t,_=function(){function t(n,i){for(var r=0;r<i.length;r++){var u=i[r];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(n,u.key,u)}}return function(n,i,r){return i&&t(n.prototype,i),r&&t(n,r),n}}(),e=(t=p(8901))&&t.__esModule?t:{default:t},v=p(5286),l=function(t){function n(i,r){return function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,n),function(t,n){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?t:n}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,v.A_START_CHAR+i,r))}return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(t,n):t.__proto__=n)}(n,t),_(n,[{key:"valid",value:function(){return new RegExp("^"+v.A_CHARS+"+$").test(this.data)}}]),n}(e.default);c.default=l},399:(Z,c,p)=>{Object.defineProperty(c,"__esModule",{value:!0});var t,_=function(){function t(n,i){for(var r=0;r<i.length;r++){var u=i[r];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(n,u.key,u)}}return function(n,i,r){return i&&t(n.prototype,i),r&&t(n,r),n}}(),e=(t=p(8901))&&t.__esModule?t:{default:t},v=p(5286),l=function(t){function n(i,r){return function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,n),function(t,n){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?t:n}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,v.B_START_CHAR+i,r))}return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(t,n):t.__proto__=n)}(n,t),_(n,[{key:"valid",value:function(){return new RegExp("^"+v.B_CHARS+"+$").test(this.data)}}]),n}(e.default);c.default=l},8108:(Z,c,p)=>{Object.defineProperty(c,"__esModule",{value:!0});var t,_=function(){function t(n,i){for(var r=0;r<i.length;r++){var u=i[r];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(n,u.key,u)}}return function(n,i,r){return i&&t(n.prototype,i),r&&t(n,r),n}}(),e=(t=p(8901))&&t.__esModule?t:{default:t},v=p(5286),l=function(t){function n(i,r){return function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,n),function(t,n){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?t:n}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,v.C_START_CHAR+i,r))}return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(t,n):t.__proto__=n)}(n,t),_(n,[{key:"valid",value:function(){return new RegExp("^"+v.C_CHARS+"+$").test(this.data)}}]),n}(e.default);c.default=l},4156:(Z,c,p)=>{Object.defineProperty(c,"__esModule",{value:!0});var y=P(p(8901)),v=P(p(993));function P(t){return t&&t.__esModule?t:{default:t}}function g(t,n){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?t:n}var l=function(t){function n(i,r){if(function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,n),/^[\x00-\x7F\xC8-\xD3]+$/.test(i))var u=g(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,(0,v.default)(i),r));else u=g(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,i,r));return g(u)}return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(t,n):t.__proto__=n)}(n,t),n}(y.default);c.default=l},993:(Z,c,p)=>{Object.defineProperty(c,"__esModule",{value:!0});var _=p(5286),y=function(T){return T.match(new RegExp("^"+_.A_CHARS+"*"))[0].length},e=function(T){return T.match(new RegExp("^"+_.B_CHARS+"*"))[0].length},v=function(T){return T.match(new RegExp("^"+_.C_CHARS+"*"))[0]};function P(g,T){var l=T?_.A_CHARS:_.B_CHARS,t=g.match(new RegExp("^("+l+"+?)(([0-9]{2}){2,})([^0-9]|$)"));if(t)return t[1]+String.fromCharCode(204)+A(g.substring(t[1].length));var n=g.match(new RegExp("^"+l+"+"))[0];return n.length===g.length?g:n+String.fromCharCode(T?205:206)+P(g.substring(n.length),!T)}function A(g){var T=v(g),l=T.length;if(l===g.length)return g;g=g.substring(l);var t=y(g)>=e(g);return T+String.fromCharCode(t?206:205)+P(g,t)}c.default=function(g){var T=void 0;if(v(g).length>=2)T=_.C_START_CHAR+A(g);else{var t=y(g)>e(g);T=(t?_.A_START_CHAR:_.B_START_CHAR)+P(g,t)}return T.replace(/[\xCD\xCE]([^])[\xCD\xCE]/,function(n,i){return String.fromCharCode(203)+i})}},5286:(Z,c)=>{var p;function _(L,N,G){return N in L?Object.defineProperty(L,N,{value:G,enumerable:!0,configurable:!0,writable:!0}):L[N]=G,L}Object.defineProperty(c,"__esModule",{value:!0});var y=c.SET_A=0,e=c.SET_B=1,v=c.SET_C=2,A=(c.SHIFT=98,c.START_A=103),g=c.START_B=104,T=c.START_C=105;c.MODULO=103,c.STOP=106,c.FNC1=207,c.SET_BY_CODE=(_(p={},A,y),_(p,g,e),_(p,T,v),p),c.SWAP={101:y,100:e,99:v},c.A_START_CHAR=String.fromCharCode(208),c.B_START_CHAR=String.fromCharCode(209),c.C_START_CHAR=String.fromCharCode(210),c.A_CHARS="[\0-_\xc8-\xcf]",c.B_CHARS="[ -\x7f\xc8-\xcf]",c.C_CHARS="(\xcf*[0-9]{2}\xcf*)",c.BARS=[11011001100,11001101100,11001100110,10010011e3,10010001100,10001001100,10011001e3,10011000100,10001100100,11001001e3,11001000100,11000100100,10110011100,10011011100,10011001110,10111001100,10011101100,10011100110,11001110010,11001011100,11001001110,11011100100,11001110100,11101101110,11101001100,11100101100,11100100110,11101100100,11100110100,11100110010,11011011e3,11011000110,11000110110,10100011e3,10001011e3,10001000110,10110001e3,10001101e3,10001100010,11010001e3,11000101e3,11000100010,10110111e3,10110001110,10001101110,10111011e3,10111000110,10001110110,11101110110,11010001110,11000101110,11011101e3,11011100010,11011101110,11101011e3,11101000110,11100010110,11101101e3,11101100010,11100011010,11101111010,11001000010,11110001010,1010011e4,10100001100,1001011e4,10010000110,10000101100,10000100110,1011001e4,10110000100,1001101e4,10011000010,10000110100,10000110010,11000010010,1100101e4,11110111010,11000010100,10001111010,10100111100,10010111100,10010011110,10111100100,10011110100,10011110010,11110100100,11110010100,11110010010,11011011110,11011110110,11110110110,10101111e3,10100011110,10001011110,10111101e3,10111100010,11110101e3,11110100010,10111011110,10111101110,11101011110,11110101110,11010000100,1101001e4,11010011100,1100011101011]},6625:(Z,c,p)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.CODE128C=c.CODE128B=c.CODE128A=c.CODE128=void 0;var y=l(p(4156)),v=l(p(972)),A=l(p(399)),T=l(p(8108));function l(t){return t&&t.__esModule?t:{default:t}}c.CODE128=y.default,c.CODE128A=v.default,c.CODE128B=A.default,c.CODE128C=T.default},8104:(Z,c,p)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.CODE39=void 0;var s,_=function(){function s(S,O){for(var C=0;C<O.length;C++){var M=O[C];M.enumerable=M.enumerable||!1,M.configurable=!0,"value"in M&&(M.writable=!0),Object.defineProperty(S,M.key,M)}}return function(S,O,C){return O&&s(S.prototype,O),C&&s(S,C),S}}(),T=function(s){function S(O,C){return function(s,S){if(!(s instanceof S))throw new TypeError("Cannot call a class as a function")}(this,S),O=O.toUpperCase(),C.mod43&&(O+=function(s){return l[s]}(function(s){for(var S=0,O=0;O<s.length;O++)S+=u(s[O]);return S%43}(O))),function(s,S){if(!s)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!S||"object"!=typeof S&&"function"!=typeof S?s:S}(this,(S.__proto__||Object.getPrototypeOf(S)).call(this,O,C))}return function(s,S){if("function"!=typeof S&&null!==S)throw new TypeError("Super expression must either be null or a function, not "+typeof S);s.prototype=Object.create(S&&S.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}),S&&(Object.setPrototypeOf?Object.setPrototypeOf(s,S):s.__proto__=S)}(S,s),_(S,[{key:"encode",value:function(){for(var C=n("*"),M=0;M<this.data.length;M++)C+=n(this.data[M])+"0";return{data:C+=n("*"),text:this.text}}},{key:"valid",value:function(){return-1!==this.data.search(/^[0-9A-Z\-\.\ \$\/\+\%]+$/)}}]),S}(((s=p(6615))&&s.__esModule?s:{default:s}).default),l=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","-","."," ","$","/","+","%","*"],t=[20957,29783,23639,30485,20951,29813,23669,20855,29789,23645,29975,23831,30533,22295,30149,24005,21623,29981,23837,22301,30023,23879,30545,22343,30161,24017,21959,30065,23921,22385,29015,18263,29141,17879,29045,18293,17783,29021,18269,17477,17489,17681,20753,35770];function n(s){return function(s){return t[s].toString(2)}(u(s))}function u(s){return l.indexOf(s)}c.CODE39=T},2679:(Z,c,p)=>{Object.defineProperty(c,"__esModule",{value:!0});var _=function(){function i(r,u){for(var d=0;d<u.length;d++){var s=u[d];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(r,s.key,s)}}return function(r,u,d){return u&&i(r.prototype,u),d&&i(r,d),r}}(),y=p(2998),v=g(p(188));function g(i){return i&&i.__esModule?i:{default:i}}var n=function(i){function r(u,d){!function(i,r){if(!(i instanceof r))throw new TypeError("Cannot call a class as a function")}(this,r);var s=function(i,r){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!r||"object"!=typeof r&&"function"!=typeof r?i:r}(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,u,d));return s.fontSize=!d.flat&&d.fontSize>10*d.width?10*d.width:d.fontSize,s.guardHeight=d.height+s.fontSize/2+d.textMargin,s}return function(i,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function, not "+typeof r);i.prototype=Object.create(r&&r.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),r&&(Object.setPrototypeOf?Object.setPrototypeOf(i,r):i.__proto__=r)}(r,i),_(r,[{key:"encode",value:function(){return this.options.flat?this.encodeFlat():this.encodeGuarded()}},{key:"leftText",value:function(d,s){return this.text.substr(d,s)}},{key:"leftEncode",value:function(d,s){return(0,v.default)(d,s)}},{key:"rightText",value:function(d,s){return this.text.substr(d,s)}},{key:"rightEncode",value:function(d,s){return(0,v.default)(d,s)}},{key:"encodeGuarded",value:function(){var d={fontSize:this.fontSize},s={height:this.guardHeight};return[{data:y.SIDE_BIN,options:s},{data:this.leftEncode(),text:this.leftText(),options:d},{data:y.MIDDLE_BIN,options:s},{data:this.rightEncode(),text:this.rightText(),options:d},{data:y.SIDE_BIN,options:s}]}},{key:"encodeFlat",value:function(){return{data:[y.SIDE_BIN,this.leftEncode(),y.MIDDLE_BIN,this.rightEncode(),y.SIDE_BIN].join(""),text:this.text}}}]),r}(g(p(6615)).default);c.default=n},7674:(Z,c,p)=>{Object.defineProperty(c,"__esModule",{value:!0});var i,_=function(){function i(r,u){for(var d=0;d<u.length;d++){var s=u[d];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(r,s.key,s)}}return function(r,u,d){return u&&i(r.prototype,u),d&&i(r,d),r}}(),y=function i(r,u,d){null===r&&(r=Function.prototype);var s=Object.getOwnPropertyDescriptor(r,u);if(void 0===s){var S=Object.getPrototypeOf(r);return null===S?void 0:i(S,u,d)}if("value"in s)return s.value;var O=s.get;return void 0===O?void 0:O.call(d)},e=p(2998),P=(i=p(2679))&&i.__esModule?i:{default:i},t=function(r){return(10-r.substr(0,12).split("").map(function(d){return+d}).reduce(function(d,s,S){return S%2?d+3*s:d+s},0)%10)%10},n=function(i){function r(u,d){(function(i,r){if(!(i instanceof r))throw new TypeError("Cannot call a class as a function")})(this,r),-1!==u.search(/^[0-9]{12}$/)&&(u+=t(u));var s=function(i,r){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!r||"object"!=typeof r&&"function"!=typeof r?i:r}(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,u,d));return s.lastChar=d.lastChar,s}return function(i,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function, not "+typeof r);i.prototype=Object.create(r&&r.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),r&&(Object.setPrototypeOf?Object.setPrototypeOf(i,r):i.__proto__=r)}(r,i),_(r,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{13}$/)&&+this.data[12]===t(this.data)}},{key:"leftText",value:function(){return y(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"leftText",this).call(this,1,6)}},{key:"leftEncode",value:function(){var d=this.data.substr(1,6),s=e.EAN13_STRUCTURE[this.data[0]];return y(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"leftEncode",this).call(this,d,s)}},{key:"rightText",value:function(){return y(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"rightText",this).call(this,7,6)}},{key:"rightEncode",value:function(){var d=this.data.substr(7,6);return y(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"rightEncode",this).call(this,d,"RRRRRR")}},{key:"encodeGuarded",value:function(){var d=y(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"encodeGuarded",this).call(this);return this.options.displayValue&&(d.unshift({data:"000000000000",text:this.text.substr(0,1),options:{textAlign:"left",fontSize:this.fontSize}}),this.options.lastChar&&(d.push({data:"00"}),d.push({data:"00000",text:this.options.lastChar,options:{fontSize:this.fontSize}}))),d}}]),r}(P.default);c.default=n},2649:(Z,c,p)=>{Object.defineProperty(c,"__esModule",{value:!0});var _=function(){function i(r,u){for(var d=0;d<u.length;d++){var s=u[d];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(r,s.key,s)}}return function(r,u,d){return u&&i(r.prototype,u),d&&i(r,d),r}}(),y=p(2998),v=g(p(188));function g(i){return i&&i.__esModule?i:{default:i}}var n=function(i){function r(u,d){return function(i,r){if(!(i instanceof r))throw new TypeError("Cannot call a class as a function")}(this,r),function(i,r){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!r||"object"!=typeof r&&"function"!=typeof r?i:r}(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,u,d))}return function(i,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function, not "+typeof r);i.prototype=Object.create(r&&r.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),r&&(Object.setPrototypeOf?Object.setPrototypeOf(i,r):i.__proto__=r)}(r,i),_(r,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{2}$/)}},{key:"encode",value:function(){var d=y.EAN2_STRUCTURE[parseInt(this.data)%4];return{data:"1011"+(0,v.default)(this.data,d,"01"),text:this.text}}}]),r}(g(p(6615)).default);c.default=n},639:(Z,c,p)=>{Object.defineProperty(c,"__esModule",{value:!0});var _=function(){function r(u,d){for(var s=0;s<d.length;s++){var S=d[s];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(u,S.key,S)}}return function(u,d,s){return d&&r(u.prototype,d),s&&r(u,s),u}}(),y=p(2998),v=g(p(188));function g(r){return r&&r.__esModule?r:{default:r}}var i=function(r){function u(d,s){return function(r,u){if(!(r instanceof u))throw new TypeError("Cannot call a class as a function")}(this,u),function(r,u){if(!r)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!u||"object"!=typeof u&&"function"!=typeof u?r:u}(this,(u.__proto__||Object.getPrototypeOf(u)).call(this,d,s))}return function(r,u){if("function"!=typeof u&&null!==u)throw new TypeError("Super expression must either be null or a function, not "+typeof u);r.prototype=Object.create(u&&u.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),u&&(Object.setPrototypeOf?Object.setPrototypeOf(r,u):r.__proto__=u)}(u,r),_(u,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{5}$/)}},{key:"encode",value:function(){var s=y.EAN5_STRUCTURE[function(u){return u.split("").map(function(s){return+s}).reduce(function(s,S,O){return O%2?s+9*S:s+3*S},0)%10}(this.data)];return{data:"1011"+(0,v.default)(this.data,s,"01"),text:this.text}}}]),u}(g(p(6615)).default);c.default=i},8036:(Z,c,p)=>{Object.defineProperty(c,"__esModule",{value:!0});var n,_=function(){function n(i,r){for(var u=0;u<r.length;u++){var d=r[u];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(i,d.key,d)}}return function(i,r,u){return r&&n(i.prototype,r),u&&n(i,u),i}}(),y=function n(i,r,u){null===i&&(i=Function.prototype);var d=Object.getOwnPropertyDescriptor(i,r);if(void 0===d){var s=Object.getPrototypeOf(i);return null===s?void 0:n(s,r,u)}if("value"in d)return d.value;var S=d.get;return void 0===S?void 0:S.call(u)},v=(n=p(2679))&&n.__esModule?n:{default:n},l=function(i){return(10-i.substr(0,7).split("").map(function(u){return+u}).reduce(function(u,d,s){return s%2?u+d:u+3*d},0)%10)%10},t=function(n){function i(r,u){return function(n,i){if(!(n instanceof i))throw new TypeError("Cannot call a class as a function")}(this,i),-1!==r.search(/^[0-9]{7}$/)&&(r+=l(r)),function(n,i){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!i||"object"!=typeof i&&"function"!=typeof i?n:i}(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,r,u))}return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Super expression must either be null or a function, not "+typeof i);n.prototype=Object.create(i&&i.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),i&&(Object.setPrototypeOf?Object.setPrototypeOf(n,i):n.__proto__=i)}(i,n),_(i,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{8}$/)&&+this.data[7]===l(this.data)}},{key:"leftText",value:function(){return y(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"leftText",this).call(this,0,4)}},{key:"leftEncode",value:function(){var u=this.data.substr(0,4);return y(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"leftEncode",this).call(this,u,"LLLL")}},{key:"rightText",value:function(){return y(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"rightText",this).call(this,4,4)}},{key:"rightEncode",value:function(){var u=this.data.substr(4,4);return y(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"rightEncode",this).call(this,u,"RRRR")}}]),i}(v.default);c.default=t},2589:(Z,c,p)=>{Object.defineProperty(c,"__esModule",{value:!0});var _=function(){function i(r,u){for(var d=0;d<u.length;d++){var s=u[d];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(r,s.key,s)}}return function(r,u,d){return u&&i(r.prototype,u),d&&i(r,d),r}}();c.checksum=n;var e=A(p(188));function A(i){return i&&i.__esModule?i:{default:i}}var t=function(i){function r(u,d){(function(i,r){if(!(i instanceof r))throw new TypeError("Cannot call a class as a function")})(this,r),-1!==u.search(/^[0-9]{11}$/)&&(u+=n(u));var s=function(i,r){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!r||"object"!=typeof r&&"function"!=typeof r?i:r}(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,u,d));return s.displayValue=d.displayValue,s.fontSize=d.fontSize>10*d.width?10*d.width:d.fontSize,s.guardHeight=d.height+s.fontSize/2+d.textMargin,s}return function(i,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function, not "+typeof r);i.prototype=Object.create(r&&r.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),r&&(Object.setPrototypeOf?Object.setPrototypeOf(i,r):i.__proto__=r)}(r,i),_(r,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{12}$/)&&this.data[11]==n(this.data)}},{key:"encode",value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:"flatEncoding",value:function(){var d="";return d+="101",d+=(0,e.default)(this.data.substr(0,6),"LLLLLL"),d+="01010",d+=(0,e.default)(this.data.substr(6,6),"RRRRRR"),{data:d+="101",text:this.text}}},{key:"guardedEncoding",value:function(){var d=[];return this.displayValue&&d.push({data:"00000000",text:this.text.substr(0,1),options:{textAlign:"left",fontSize:this.fontSize}}),d.push({data:"101"+(0,e.default)(this.data[0],"L"),options:{height:this.guardHeight}}),d.push({data:(0,e.default)(this.data.substr(1,5),"LLLLL"),text:this.text.substr(1,5),options:{fontSize:this.fontSize}}),d.push({data:"01010",options:{height:this.guardHeight}}),d.push({data:(0,e.default)(this.data.substr(6,5),"RRRRR"),text:this.text.substr(6,5),options:{fontSize:this.fontSize}}),d.push({data:(0,e.default)(this.data[11],"R")+"101",options:{height:this.guardHeight}}),this.displayValue&&d.push({data:"00000000",text:this.text.substr(11,1),options:{textAlign:"right",fontSize:this.fontSize}}),d}}]),r}(A(p(6615)).default);function n(i){var u,r=0;for(u=1;u<11;u+=2)r+=parseInt(i[u]);for(u=0;u<11;u+=2)r+=3*parseInt(i[u]);return(10-r%10)%10}c.default=t},2054:(Z,c,p)=>{Object.defineProperty(c,"__esModule",{value:!0});var _=function(){function d(s,S){for(var O=0;O<S.length;O++){var C=S[O];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(s,C.key,C)}}return function(s,S,O){return S&&d(s.prototype,S),O&&d(s,O),s}}(),e=g(p(188)),P=g(p(6615)),A=p(2589);function g(d){return d&&d.__esModule?d:{default:d}}function l(d,s){if(!d)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!s||"object"!=typeof s&&"function"!=typeof s?d:s}var n=["XX00000XXX","XX10000XXX","XX20000XXX","XXX00000XX","XXXX00000X","XXXXX00005","XXXXX00006","XXXXX00007","XXXXX00008","XXXXX00009"],i=[["EEEOOO","OOOEEE"],["EEOEOO","OOEOEE"],["EEOOEO","OOEEOE"],["EEOOOE","OOEEEO"],["EOEEOO","OEOOEE"],["EOOEEO","OEEOOE"],["EOOOEE","OEEEOO"],["EOEOEO","OEOEOE"],["EOEOOE","OEOEEO"],["EOOEOE","OEEOEO"]],r=function(d){function s(S,O){!function(d,s){if(!(d instanceof s))throw new TypeError("Cannot call a class as a function")}(this,s);var C=l(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,S,O));if(C.isValid=!1,-1!==S.search(/^[0-9]{6}$/))C.middleDigits=S,C.upcA=u(S,"0"),C.text=O.text||""+C.upcA[0]+S+C.upcA[C.upcA.length-1],C.isValid=!0;else{if(-1===S.search(/^[01][0-9]{7}$/))return l(C);if(C.middleDigits=S.substring(1,S.length-1),C.upcA=u(C.middleDigits,S[0]),C.upcA[C.upcA.length-1]!==S[S.length-1])return l(C);C.isValid=!0}return C.displayValue=O.displayValue,C.fontSize=O.fontSize>10*O.width?10*O.width:O.fontSize,C.guardHeight=O.height+C.fontSize/2+O.textMargin,C}return function(d,s){if("function"!=typeof s&&null!==s)throw new TypeError("Super expression must either be null or a function, not "+typeof s);d.prototype=Object.create(s&&s.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}}),s&&(Object.setPrototypeOf?Object.setPrototypeOf(d,s):d.__proto__=s)}(s,d),_(s,[{key:"valid",value:function(){return this.isValid}},{key:"encode",value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:"flatEncoding",value:function(){var O="";return O+="101",O+=this.encodeMiddleDigits(),{data:O+="010101",text:this.text}}},{key:"guardedEncoding",value:function(){var O=[];return this.displayValue&&O.push({data:"00000000",text:this.text[0],options:{textAlign:"left",fontSize:this.fontSize}}),O.push({data:"101",options:{height:this.guardHeight}}),O.push({data:this.encodeMiddleDigits(),text:this.text.substring(1,7),options:{fontSize:this.fontSize}}),O.push({data:"010101",options:{height:this.guardHeight}}),this.displayValue&&O.push({data:"00000000",text:this.text[7],options:{textAlign:"right",fontSize:this.fontSize}}),O}},{key:"encodeMiddleDigits",value:function(){var O=this.upcA[0],M=i[parseInt(this.upcA[this.upcA.length-1])][parseInt(O)];return(0,e.default)(this.middleDigits,M)}}]),s}(P.default);function u(d,s){for(var S=parseInt(d[d.length-1]),O=n[S],C="",M=0,L=0;L<O.length;L++){var N=O[L];C+="X"===N?d[M++]:N}return(C=""+s+C)+(0,A.checksum)(C)}c.default=r},2998:(Z,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.SIDE_BIN="101",c.MIDDLE_BIN="01010",c.BINARIES={L:["0001101","0011001","0010011","0111101","0100011","0110001","0101111","0111011","0110111","0001011"],G:["0100111","0110011","0011011","0100001","0011101","0111001","0000101","0010001","0001001","0010111"],R:["1110010","1100110","1101100","1000010","1011100","1001110","1010000","1000100","1001000","1110100"],O:["0001101","0011001","0010011","0111101","0100011","0110001","0101111","0111011","0110111","0001011"],E:["0100111","0110011","0011011","0100001","0011101","0111001","0000101","0010001","0001001","0010111"]},c.EAN2_STRUCTURE=["LL","LG","GL","GG"],c.EAN5_STRUCTURE=["GGLLL","GLGLL","GLLGL","GLLLG","LGGLL","LLGGL","LLLGG","LGLGL","LGLLG","LLGLG"],c.EAN13_STRUCTURE=["LLLLLL","LLGLGG","LLGGLG","LLGGGL","LGLLGG","LGGLLG","LGGGLL","LGLGLG","LGLGGL","LGGLGL"]},188:(Z,c,p)=>{Object.defineProperty(c,"__esModule",{value:!0});var _=p(2998);c.default=function(v,P,A){var g=v.split("").map(function(l,t){return _.BINARIES[P[t]]}).map(function(l,t){return l?l[v[t]]:""});if(A){var T=v.length-1;g=g.map(function(l,t){return t<T?l+A:l})}return g.join("")}},9214:(Z,c,p)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.UPCE=c.UPC=c.EAN2=c.EAN5=c.EAN8=c.EAN13=void 0;var y=r(p(7674)),v=r(p(8036)),A=r(p(639)),T=r(p(2649)),t=r(p(2589)),i=r(p(2054));function r(u){return u&&u.__esModule?u:{default:u}}c.EAN13=y.default,c.EAN8=v.default,c.EAN5=A.default,c.EAN2=T.default,c.UPC=t.default,c.UPCE=i.default},6651:(Z,c,p)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.GenericBarcode=void 0;var l,_=function(){function l(t,n){for(var i=0;i<n.length;i++){var r=n[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(t,n,i){return n&&l(t.prototype,n),i&&l(t,i),t}}(),T=function(l){function t(n,i){return function(l,t){if(!(l instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(l,t){if(!l)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?l:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,n,i))}return function(l,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);l.prototype=Object.create(t&&t.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(l,t):l.__proto__=t)}(t,l),_(t,[{key:"encode",value:function(){return{data:"10101010101010101010101010101010101010101",text:this.text}}},{key:"valid",value:function(){return!0}}]),t}(((l=p(6615))&&l.__esModule?l:{default:l}).default);c.GenericBarcode=T},9237:(Z,c,p)=>{Object.defineProperty(c,"__esModule",{value:!0});var t,_=function(){function t(n,i){for(var r=0;r<i.length;r++){var u=i[r];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(n,u.key,u)}}return function(n,i,r){return i&&t(n.prototype,i),r&&t(n,r),n}}(),y=p(7851);function A(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function g(t,n){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?t:n}var l=function(t){function n(){return A(this,n),g(this,(n.__proto__||Object.getPrototypeOf(n)).apply(this,arguments))}return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(t,n):t.__proto__=n)}(n,t),_(n,[{key:"valid",value:function(){return-1!==this.data.search(/^([0-9]{2})+$/)}},{key:"encode",value:function(){var r=this,u=this.data.match(/.{2}/g).map(function(d){return r.encodePair(d)}).join("");return{data:y.START_BIN+u+y.END_BIN,text:this.text}}},{key:"encodePair",value:function(r){var u=y.BINARIES[r[1]];return y.BINARIES[r[0]].split("").map(function(d,s){return("1"===d?"111":"1")+("1"===u[s]?"000":"0")}).join("")}}]),n}(((t=p(6615))&&t.__esModule?t:{default:t}).default);c.default=l},6701:(Z,c,p)=>{Object.defineProperty(c,"__esModule",{value:!0});var t,_=function(){function t(n,i){for(var r=0;r<i.length;r++){var u=i[r];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(n,u.key,u)}}return function(n,i,r){return i&&t(n.prototype,i),r&&t(n,r),n}}(),e=(t=p(9237))&&t.__esModule?t:{default:t},T=function(n){var i=n.substr(0,13).split("").map(function(r){return parseInt(r,10)}).reduce(function(r,u,d){return r+u*(3-d%2*2)},0);return 10*Math.ceil(i/10)-i},l=function(t){function n(i,r){return function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,n),-1!==i.search(/^[0-9]{13}$/)&&(i+=T(i)),function(t,n){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?t:n}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,i,r))}return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(t,n):t.__proto__=n)}(n,t),_(n,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{14}$/)&&+this.data[13]===T(this.data)}}]),n}(e.default);c.default=l},7851:(Z,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.START_BIN="1010",c.END_BIN="11101",c.BINARIES=["00110","10001","01001","11000","00101","10100","01100","00011","10010","01010"]},4059:(Z,c,p)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.ITF14=c.ITF=void 0;var y=P(p(9237)),v=P(p(6701));function P(A){return A&&A.__esModule?A:{default:A}}c.ITF=y.default,c.ITF14=v.default},44:(Z,c,p)=>{Object.defineProperty(c,"__esModule",{value:!0});var t,_=function(){function t(n,i){for(var r=0;r<i.length;r++){var u=i[r];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(n,u.key,u)}}return function(n,i,r){return i&&t(n.prototype,i),r&&t(n,r),n}}(),T=function(t){function n(i,r){return function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,n),function(t,n){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?t:n}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,i,r))}return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(t,n):t.__proto__=n)}(n,t),_(n,[{key:"encode",value:function(){for(var r="110",u=0;u<this.data.length;u++){var s=parseInt(this.data[u]).toString(2);s=l(s,4-s.length);for(var S=0;S<s.length;S++)r+="0"==s[S]?"100":"110"}return{data:r+="1001",text:this.text}}},{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]+$/)}}]),n}(((t=p(6615))&&t.__esModule?t:{default:t}).default);function l(t,n){for(var i=0;i<n;i++)t="0"+t;return t}c.default=T},6926:(Z,c,p)=>{Object.defineProperty(c,"__esModule",{value:!0});var l,y=(l=p(44))&&l.__esModule?l:{default:l},e=p(9122),T=function(l){function t(n,i){return function(l,t){if(!(l instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(l,t){if(!l)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?l:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,n+(0,e.mod10)(n),i))}return function(l,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);l.prototype=Object.create(t&&t.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(l,t):l.__proto__=t)}(t,l),t}(y.default);c.default=T},6375:(Z,c,p)=>{Object.defineProperty(c,"__esModule",{value:!0});var l,y=(l=p(44))&&l.__esModule?l:{default:l},e=p(9122),T=function(l){function t(n,i){return function(l,t){if(!(l instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n+=(0,e.mod10)(n),n+=(0,e.mod10)(n),function(l,t){if(!l)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?l:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,n,i))}return function(l,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);l.prototype=Object.create(t&&t.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(l,t):l.__proto__=t)}(t,l),t}(y.default);c.default=T},2558:(Z,c,p)=>{Object.defineProperty(c,"__esModule",{value:!0});var l,y=(l=p(44))&&l.__esModule?l:{default:l},e=p(9122),T=function(l){function t(n,i){return function(l,t){if(!(l instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(l,t){if(!l)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?l:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,n+(0,e.mod11)(n),i))}return function(l,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);l.prototype=Object.create(t&&t.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(l,t):l.__proto__=t)}(t,l),t}(y.default);c.default=T},3332:(Z,c,p)=>{Object.defineProperty(c,"__esModule",{value:!0});var l,y=(l=p(44))&&l.__esModule?l:{default:l},e=p(9122),T=function(l){function t(n,i){return function(l,t){if(!(l instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n+=(0,e.mod11)(n),n+=(0,e.mod10)(n),function(l,t){if(!l)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?l:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,n,i))}return function(l,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);l.prototype=Object.create(t&&t.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(l,t):l.__proto__=t)}(t,l),t}(y.default);c.default=T},9122:(Z,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.mod10=function(y){for(var e=0,v=0;v<y.length;v++){var P=parseInt(y[v]);e+=(v+y.length)%2==0?P:2*P%10+Math.floor(2*P/10)}return(10-e%10)%10},c.mod11=function(y){for(var e=0,v=[2,3,4,5,6,7],P=0;P<y.length;P++){var A=parseInt(y[y.length-1-P]);e+=v[P%v.length]*A}return(11-e%11)%11}},495:(Z,c,p)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.MSI1110=c.MSI1010=c.MSI11=c.MSI10=c.MSI=void 0;var y=n(p(44)),v=n(p(6926)),A=n(p(2558)),T=n(p(6375)),t=n(p(3332));function n(i){return i&&i.__esModule?i:{default:i}}c.MSI=y.default,c.MSI10=v.default,c.MSI11=A.default,c.MSI1010=T.default,c.MSI1110=t.default},4162:(Z,c,p)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.codabar=void 0;var l,_=function(){function l(t,n){for(var i=0;i<n.length;i++){var r=n[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(t,n,i){return n&&l(t.prototype,n),i&&l(t,i),t}}(),T=function(l){function t(n,i){(function(l,t){if(!(l instanceof t))throw new TypeError("Cannot call a class as a function")})(this,t),0===n.search(/^[0-9\-\$\:\.\+\/]+$/)&&(n="A"+n+"A");var r=function(l,t){if(!l)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?l:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,n.toUpperCase(),i));return r.text=r.options.text||r.text.replace(/[A-D]/g,""),r}return function(l,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);l.prototype=Object.create(t&&t.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(l,t):l.__proto__=t)}(t,l),_(t,[{key:"valid",value:function(){return-1!==this.data.search(/^[A-D][0-9\-\$\:\.\+\/]+[A-D]$/)}},{key:"encode",value:function(){for(var i=[],r=this.getEncodings(),u=0;u<this.data.length;u++)i.push(r[this.data.charAt(u)]),u!==this.data.length-1&&i.push("0");return{text:this.text,data:i.join("")}}},{key:"getEncodings",value:function(){return{0:"101010011",1:"101011001",2:"101001011",3:"110010101",4:"101101001",5:"110101001",6:"100101011",7:"100101101",8:"100110101",9:"110100101","-":"101001101",$:"101100101",":":"1101011011","/":"1101101011",".":"1101101101","+":"1011011011",A:"1011001001",B:"1001001011",C:"1010010011",D:"1010011001"}}}]),t}(((l=p(6615))&&l.__esModule?l:{default:l}).default);c.codabar=T},3413:(Z,c,p)=>{Object.defineProperty(c,"__esModule",{value:!0});var _=p(8104),y=p(6625),e=p(9214),v=p(4059),P=p(495),A=p(3133),g=p(4162),T=p(6651);c.default={CODE39:_.CODE39,CODE128:y.CODE128,CODE128A:y.CODE128A,CODE128B:y.CODE128B,CODE128C:y.CODE128C,EAN13:e.EAN13,EAN8:e.EAN8,EAN5:e.EAN5,EAN2:e.EAN2,UPC:e.UPC,UPCE:e.UPCE,ITF14:v.ITF14,ITF:v.ITF,MSI:P.MSI,MSI10:P.MSI10,MSI11:P.MSI11,MSI1010:P.MSI1010,MSI1110:P.MSI1110,pharmacode:A.pharmacode,codabar:g.codabar,GenericBarcode:T.GenericBarcode}},3133:(Z,c,p)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.pharmacode=void 0;var l,_=function(){function l(t,n){for(var i=0;i<n.length;i++){var r=n[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(t,n,i){return n&&l(t.prototype,n),i&&l(t,i),t}}(),T=function(l){function t(n,i){!function(l,t){if(!(l instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(l,t){if(!l)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?l:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,n,i));return r.number=parseInt(n,10),r}return function(l,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);l.prototype=Object.create(t&&t.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(l,t):l.__proto__=t)}(t,l),_(t,[{key:"encode",value:function(){for(var i=this.number,r="";!isNaN(i)&&0!=i;)i%2==0?(r="11100"+r,i=(i-2)/2):(r="100"+r,i=(i-1)/2);return{data:r=r.slice(0,-2),text:this.text}}},{key:"valid",value:function(){return this.number>=3&&this.number<=131070}}]),t}(((l=p(6615))&&l.__esModule?l:{default:l}).default);c.pharmacode=T},400:(Z,c)=>{Object.defineProperty(c,"__esModule",{value:!0});var p=function(){function e(v,P){for(var A=0;A<P.length;A++){var g=P[A];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(v,g.key,g)}}return function(v,P,A){return P&&e(v.prototype,P),A&&e(v,A),v}}(),y=function(){function e(v){(function(e,v){if(!(e instanceof v))throw new TypeError("Cannot call a class as a function")})(this,e),this.api=v}return p(e,[{key:"handleCatch",value:function(P){if("InvalidInputException"!==P.name)throw P;if(this.api._options.valid===this.api._defaults.valid)throw P.message;this.api._options.valid(!1),this.api.render=function(){}}},{key:"wrapBarcodeCall",value:function(P){try{var A=P.apply(void 0,arguments);return this.api._options.valid(!0),A}catch(g){return this.handleCatch(g),this.api}}}]),e}();c.default=y},4779:(Z,c)=>{function p(A,g){if(!(A instanceof g))throw new TypeError("Cannot call a class as a function")}function _(A,g){if(!A)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!g||"object"!=typeof g&&"function"!=typeof g?A:g}function y(A,g){if("function"!=typeof g&&null!==g)throw new TypeError("Super expression must either be null or a function, not "+typeof g);A.prototype=Object.create(g&&g.prototype,{constructor:{value:A,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(A,g):A.__proto__=g)}Object.defineProperty(c,"__esModule",{value:!0});var e=function(A){function g(T,l){p(this,g);var t=_(this,(g.__proto__||Object.getPrototypeOf(g)).call(this));return t.name="InvalidInputException",t.symbology=T,t.input=l,t.message='"'+t.input+'" is not a valid input for '+t.symbology,t}return y(g,Error),g}(),v=function(A){function g(){p(this,g);var T=_(this,(g.__proto__||Object.getPrototypeOf(g)).call(this));return T.name="InvalidElementException",T.message="Not supported type to render on",T}return y(g,Error),g}(),P=function(A){function g(){p(this,g);var T=_(this,(g.__proto__||Object.getPrototypeOf(g)).call(this));return T.name="NoElementException",T.message="No element to render on.",T}return y(g,Error),g}();c.InvalidInputException=e,c.InvalidElementException=v,c.NoElementException=P},7095:(Z,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.default=function(_){return _.marginTop=_.marginTop||_.margin,_.marginBottom=_.marginBottom||_.margin,_.marginRight=_.marginRight||_.margin,_.marginLeft=_.marginLeft||_.margin,_}},7866:(Z,c,p)=>{Object.defineProperty(c,"__esModule",{value:!0});var y=P(p(201)),v=P(p(1452));function P(g){return g&&g.__esModule?g:{default:g}}c.default=function(g){var T={};for(var l in v.default)v.default.hasOwnProperty(l)&&(g.hasAttribute("jsbarcode-"+l.toLowerCase())&&(T[l]=g.getAttribute("jsbarcode-"+l.toLowerCase())),g.hasAttribute("data-"+l.toLowerCase())&&(T[l]=g.getAttribute("data-"+l.toLowerCase())));return T.value=g.getAttribute("jsbarcode-value")||g.getAttribute("data-value"),(0,y.default)(T)}},4441:(Z,c,p)=>{Object.defineProperty(c,"__esModule",{value:!0});var _="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},e=g(p(7866)),P=g(p(1462)),A=p(4779);function g(n){return n&&n.__esModule?n:{default:n}}c.default=function T(n){if("string"==typeof n)return function(n){var i=document.querySelectorAll(n);if(0!==i.length){for(var r=[],u=0;u<i.length;u++)r.push(T(i[u]));return r}}(n);if(Array.isArray(n)){for(var i=[],r=0;r<n.length;r++)i.push(T(n[r]));return i}if("undefined"!=typeof HTMLCanvasElement&&n instanceof HTMLImageElement)return function(n){var i=document.createElement("canvas");return{element:i,options:(0,e.default)(n),renderer:P.default.CanvasRenderer,afterRender:function(){n.setAttribute("src",i.toDataURL())}}}(n);if(n&&n.nodeName&&"svg"===n.nodeName.toLowerCase()||"undefined"!=typeof SVGElement&&n instanceof SVGElement)return{element:n,options:(0,e.default)(n),renderer:P.default.SVGRenderer};if("undefined"!=typeof HTMLCanvasElement&&n instanceof HTMLCanvasElement)return{element:n,options:(0,e.default)(n),renderer:P.default.CanvasRenderer};if(n&&n.getContext)return{element:n,renderer:P.default.CanvasRenderer};if(n&&"object"===(void 0===n?"undefined":_(n))&&!n.nodeName)return{element:n,renderer:P.default.ObjectRenderer};throw new A.InvalidElementException}},2308:(Z,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.default=function(_){var y=[];return function e(v){if(Array.isArray(v))for(var P=0;P<v.length;P++)e(v[P]);else v.text=v.text||"",v.data=v.data||"",y.push(v)}(_),y}},7720:(Z,c)=>{Object.defineProperty(c,"__esModule",{value:!0});var p=Object.assign||function(_){for(var y=1;y<arguments.length;y++){var e=arguments[y];for(var v in e)Object.prototype.hasOwnProperty.call(e,v)&&(_[v]=e[v])}return _};c.default=function(_,y){return p({},_,y)}},201:(Z,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.default=function(_){var y=["width","height","textMargin","fontSize","margin","marginTop","marginBottom","marginLeft","marginRight"];for(var e in y)y.hasOwnProperty(e)&&"string"==typeof _[e=y[e]]&&(_[e]=parseInt(_[e],10));return"string"==typeof _.displayValue&&(_.displayValue="false"!=_.displayValue),_}},1452:(Z,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.default={width:2,height:100,format:"auto",displayValue:!0,fontOptions:"",font:"monospace",text:void 0,textAlign:"center",textPosition:"bottom",textMargin:2,fontSize:20,background:"#ffffff",lineColor:"#000000",margin:10,marginTop:void 0,marginBottom:void 0,marginLeft:void 0,marginRight:void 0,valid:function(){}}},3010:(Z,c,p)=>{Object.defineProperty(c,"__esModule",{value:!0});var T,_=function(){function T(l,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(l,i.key,i)}}return function(l,t,n){return t&&T(l.prototype,t),n&&T(l,n),l}}(),e=(T=p(7720))&&T.__esModule?T:{default:T},v=p(9390),g=function(){function T(l,t,n){(function(T,l){if(!(T instanceof l))throw new TypeError("Cannot call a class as a function")})(this,T),this.canvas=l,this.encodings=t,this.options=n}return _(T,[{key:"render",value:function(){if(!this.canvas.getContext)throw new Error("The browser does not support canvas.");this.prepareCanvas();for(var t=0;t<this.encodings.length;t++){var n=(0,e.default)(this.options,this.encodings[t].options);this.drawCanvasBarcode(n,this.encodings[t]),this.drawCanvasText(n,this.encodings[t]),this.moveCanvasDrawing(this.encodings[t])}this.restoreCanvas()}},{key:"prepareCanvas",value:function(){var t=this.canvas.getContext("2d");t.save(),(0,v.calculateEncodingAttributes)(this.encodings,this.options,t);var n=(0,v.getTotalWidthOfEncodings)(this.encodings),i=(0,v.getMaximumHeightOfEncodings)(this.encodings);this.canvas.width=n+this.options.marginLeft+this.options.marginRight,this.canvas.height=i,t.clearRect(0,0,this.canvas.width,this.canvas.height),this.options.background&&(t.fillStyle=this.options.background,t.fillRect(0,0,this.canvas.width,this.canvas.height)),t.translate(this.options.marginLeft,0)}},{key:"drawCanvasBarcode",value:function(t,n){var u,i=this.canvas.getContext("2d"),r=n.data;u="top"==t.textPosition?t.marginTop+t.fontSize+t.textMargin:t.marginTop,i.fillStyle=t.lineColor;for(var d=0;d<r.length;d++){var s=d*t.width+n.barcodePadding;"1"===r[d]?i.fillRect(s,u,t.width,t.height):r[d]&&i.fillRect(s,u,t.width,t.height*r[d])}}},{key:"drawCanvasText",value:function(t,n){var u,d,i=this.canvas.getContext("2d");t.displayValue&&(d="top"==t.textPosition?t.marginTop+t.fontSize-t.textMargin:t.height+t.textMargin+t.marginTop+t.fontSize,i.font=t.fontOptions+" "+t.fontSize+"px "+t.font,"left"==t.textAlign||n.barcodePadding>0?(u=0,i.textAlign="left"):"right"==t.textAlign?(u=n.width-1,i.textAlign="right"):(u=n.width/2,i.textAlign="center"),i.fillText(n.text,u,d))}},{key:"moveCanvasDrawing",value:function(t){this.canvas.getContext("2d").translate(t.width,0)}},{key:"restoreCanvas",value:function(){this.canvas.getContext("2d").restore()}}]),T}();c.default=g},1462:(Z,c,p)=>{Object.defineProperty(c,"__esModule",{value:!0});var y=g(p(3010)),v=g(p(5995)),A=g(p(3911));function g(T){return T&&T.__esModule?T:{default:T}}c.default={CanvasRenderer:y.default,SVGRenderer:v.default,ObjectRenderer:A.default}},3911:(Z,c)=>{Object.defineProperty(c,"__esModule",{value:!0});var p=function(){function e(v,P){for(var A=0;A<P.length;A++){var g=P[A];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(v,g.key,g)}}return function(v,P,A){return P&&e(v.prototype,P),A&&e(v,A),v}}(),y=function(){function e(v,P,A){(function(e,v){if(!(e instanceof v))throw new TypeError("Cannot call a class as a function")})(this,e),this.object=v,this.encodings=P,this.options=A}return p(e,[{key:"render",value:function(){this.object.encodings=this.encodings}}]),e}();c.default=y},9390:(Z,c,p)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.getTotalWidthOfEncodings=c.calculateEncodingAttributes=c.getBarcodePadding=c.getEncodingHeight=c.getMaximumHeightOfEncodings=void 0;var t,y=(t=p(7720))&&t.__esModule?t:{default:t};function v(t,n){return n.height+(n.displayValue&&t.text.length>0?n.fontSize+n.textMargin:0)+n.marginTop+n.marginBottom}function P(t,n,i){if(i.displayValue&&n<t){if("center"==i.textAlign)return Math.floor((t-n)/2);if("left"==i.textAlign)return 0;if("right"==i.textAlign)return Math.floor(t-n)}return 0}function l(t,n,i){var r;if(i)r=i;else{if("undefined"==typeof document)return 0;r=document.createElement("canvas").getContext("2d")}r.font=n.fontOptions+" "+n.fontSize+"px "+n.font;var u=r.measureText(t);return u?u.width:0}c.getMaximumHeightOfEncodings=function(t){for(var n=0,i=0;i<t.length;i++)t[i].height>n&&(n=t[i].height);return n},c.getEncodingHeight=v,c.getBarcodePadding=P,c.calculateEncodingAttributes=function(t,n,i){for(var r=0;r<t.length;r++){var s,u=t[r],d=(0,y.default)(n,u.options);s=d.displayValue?l(u.text,d,i):0;var S=u.data.length*d.width;u.width=Math.ceil(Math.max(s,S)),u.height=v(u,d),u.barcodePadding=P(s,S,d)}},c.getTotalWidthOfEncodings=function(t){for(var n=0,i=0;i<t.length;i++)n+=t[i].width;return n}},5995:(Z,c,p)=>{Object.defineProperty(c,"__esModule",{value:!0});var l,_=function(){function l(t,n){for(var i=0;i<n.length;i++){var r=n[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(t,n,i){return n&&l(t.prototype,n),i&&l(t,i),t}}(),e=(l=p(7720))&&l.__esModule?l:{default:l},v=p(9390),g="http://www.w3.org/2000/svg",T=function(){function l(t,n,i){(function(l,t){if(!(l instanceof t))throw new TypeError("Cannot call a class as a function")})(this,l),this.svg=t,this.encodings=n,this.options=i,this.document=i.xmlDocument||document}return _(l,[{key:"render",value:function(){var n=this.options.marginLeft;this.prepareSVG();for(var i=0;i<this.encodings.length;i++){var r=this.encodings[i],u=(0,e.default)(this.options,r.options),d=this.createGroup(n,u.marginTop,this.svg);this.setGroupOptions(d,u),this.drawSvgBarcode(d,u,r),this.drawSVGText(d,u,r),n+=r.width}}},{key:"prepareSVG",value:function(){for(;this.svg.firstChild;)this.svg.removeChild(this.svg.firstChild);(0,v.calculateEncodingAttributes)(this.encodings,this.options);var n=(0,v.getTotalWidthOfEncodings)(this.encodings),i=(0,v.getMaximumHeightOfEncodings)(this.encodings),r=n+this.options.marginLeft+this.options.marginRight;this.setSvgAttributes(r,i),this.options.background&&this.drawRect(0,0,r,i,this.svg).setAttribute("style","fill:"+this.options.background+";")}},{key:"drawSvgBarcode",value:function(n,i,r){var d,u=r.data;d="top"==i.textPosition?i.fontSize+i.textMargin:0;for(var s=0,S=0,O=0;O<u.length;O++)S=O*i.width+r.barcodePadding,"1"===u[O]?s++:s>0&&(this.drawRect(S-i.width*s,d,i.width*s,i.height,n),s=0);s>0&&this.drawRect(S-i.width*(s-1),d,i.width*s,i.height,n)}},{key:"drawSVGText",value:function(n,i,r){var d,s,u=this.document.createElementNS(g,"text");i.displayValue&&(u.setAttribute("style","font:"+i.fontOptions+" "+i.fontSize+"px "+i.font),s="top"==i.textPosition?i.fontSize-i.textMargin:i.height+i.textMargin+i.fontSize,"left"==i.textAlign||r.barcodePadding>0?(d=0,u.setAttribute("text-anchor","start")):"right"==i.textAlign?(d=r.width-1,u.setAttribute("text-anchor","end")):(d=r.width/2,u.setAttribute("text-anchor","middle")),u.setAttribute("x",d),u.setAttribute("y",s),u.appendChild(this.document.createTextNode(r.text)),n.appendChild(u))}},{key:"setSvgAttributes",value:function(n,i){var r=this.svg;r.setAttribute("width",n+"px"),r.setAttribute("height",i+"px"),r.setAttribute("x","0px"),r.setAttribute("y","0px"),r.setAttribute("viewBox","0 0 "+n+" "+i),r.setAttribute("xmlns",g),r.setAttribute("version","1.1"),r.setAttribute("style","transform: translate(0,0)")}},{key:"createGroup",value:function(n,i,r){var u=this.document.createElementNS(g,"g");return u.setAttribute("transform","translate("+n+", "+i+")"),r.appendChild(u),u}},{key:"setGroupOptions",value:function(n,i){n.setAttribute("style","fill:"+i.lineColor+";")}},{key:"drawRect",value:function(n,i,r,u,d){var s=this.document.createElementNS(g,"rect");return s.setAttribute("x",n),s.setAttribute("y",i),s.setAttribute("width",r),s.setAttribute("height",u),d.appendChild(s),s}}]),l}();c.default=T},4269:(Z,c,p)=>{p.r(c),p.d(c,{PagesModule:()=>Re});var _=p(6019),y=p(1086),e=p(3668),v=p(4099),P=p(8735);let A=(()=>{class f{constructor(){this.store=new v.X([])}getState(){return this.store.asObservable().pipe((0,P.h)(o=>void 0!==o))}setState(o){this.store.next(o)}}return f.\u0275fac=function(o){return new(o||f)},f.\u0275prov=e.Yz7({token:f,factory:f.\u0275fac,providedIn:"root"}),f})();var g=p(1286),T=p(1273),l=p(3405),t=p(8805),n=(()=>{return(f=n||(n={}))[f.SUPPLIER_BILL=0]="SUPPLIER_BILL",f[f.OUTLET_DELIVERY=1]="OUTLET_DELIVERY",n;var f})(),i=p(5304),r=p(2193),u=p(9090),d=p(5496),s=p(9010);let S=(()=>{class f{constructor(o,a){this.data=o,this.dialogRef=a,this.outlets=o.outlets}ngOnInit(){this.initModalConfig(),this.initTransactionType()}initModalConfig(){this.modalConfig=new r.O,this.modalConfig.title="Choose your transaction",this.modalConfig.hideMoreButton=!0}initTransactionType(){this.transactionTypes=[{title:"Supplier Bill",type:n.SUPPLIER_BILL},{title:"Outlet Delivery",type:n.OUTLET_DELIVERY}]}onOk(){this.selectedOutlet&&this.poNumber&&this.dialogRef.close({Outlet:this.selectedOutlet.getName,Number:this.poNumber,Type:this.selectedTransactionType})}onCancel(){this.dialogRef.close()}}return f.\u0275fac=function(o){return new(o||f)(e.Y36(i.WI),e.Y36(i.so))},f.\u0275cmp=e.Xpm({type:f,selectors:[["app-form-add-bill"]],decls:16,vars:10,consts:[[3,"config","onOk","onCancel"],[1,"row"],["align","center",1,"col-sm-12","mt-3"],[2,"position","relative","width","100%"],[1,"w-100"],["bindLabel","title","bindValue","type","placeholder","Choose Type",1,"sticky-top","tall",3,"items","ngModel","clearable","appendTo","ngModelChange"],[1,"pt-6"],["bindLabel","Name","placeholder","Choose Outlet",1,"sticky-top","tall",3,"items","ngModel","clearable","appendTo","ngModelChange"],[1,"form-label-group"],["min","1","id","qty","type","text","placeholder","Number","aria-label","width",1,"form-control",3,"ngModel","ngModelChange"]],template:function(o,a){1&o&&(e.TgZ(0,"modal-material",0),e.NdJ("onOk",function(){return a.onOk()})("onCancel",function(){return a.onCancel()}),e.TgZ(1,"content"),e.TgZ(2,"div",1),e.TgZ(3,"div",2),e.TgZ(4,"table",3),e.TgZ(5,"tbody"),e.TgZ(6,"tr",4),e.TgZ(7,"td"),e.TgZ(8,"ng-select",5),e.NdJ("ngModelChange",function(b){return a.selectedTransactionType=b}),e.qZA(),e.qZA(),e.qZA(),e.TgZ(9,"tr",4),e.TgZ(10,"td",6),e.TgZ(11,"ng-select",7),e.NdJ("ngModelChange",function(b){return a.selectedOutlet=b}),e.qZA(),e.qZA(),e.qZA(),e.TgZ(12,"tr",4),e.TgZ(13,"td",6),e.TgZ(14,"div",8),e.TgZ(15,"input",9),e.NdJ("ngModelChange",function(b){return a.poNumber=b}),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA()),2&o&&(e.Q6J("config",a.modalConfig),e.xp6(8),e.Q6J("items",a.transactionTypes)("ngModel",a.selectedTransactionType)("clearable",!1)("appendTo","body"),e.xp6(3),e.Q6J("items",a.outlets)("ngModel",a.selectedOutlet)("clearable",!1)("appendTo","body"),e.xp6(4),e.Q6J("ngModel",a.poNumber))},directives:[u.M,d.w9,s.JJ,s.On,s.Fj],styles:[""]}),f})();var O=p(8053),C=p(8930);let M=(()=>{class f{constructor(o){this.httpService=o,this.barcodeConfigState=new v.X(null)}updatePaperFormatConfig(o){let a=localStorage.getItem("Domain");return this.httpService.post("/api/Config/SaveConfig",{SubDomain:a,Version:this.paperFormatVersion,PaperFormats:o})}getPaperFormatConfig(){let o=localStorage.getItem("Domain"),a=[];return this.httpService.post("/api/Config/PaperConfig",{SubDomain:o}).pipe((0,O.U)(E=>(this.paperFormatVersion=E.version,a=E.PaperFormats,a)))}setBarcodeConfigState(o){this.barcodeConfigState.next(o)}getBarcodeConfigState(){return this.barcodeConfigState.asObservable().pipe((0,P.h)(o=>null!=o))}}return f.\u0275fac=function(o){return new(o||f)(e.LFG(C.O))},f.\u0275prov=e.Yz7({token:f,factory:f.\u0275fac,providedIn:"root"}),f})();var L=p(8076),N=p(5686),G=p(6731);const z=["input"];function J(f,m){if(1&f&&e._UZ(0,"img",10),2&f){const o=e.oxw().$implicit;e.Q6J("src",o.ImgUrl,e.LSH)}}function w(f,m){if(1&f){const o=e.EpF();e.TgZ(0,"mat-option",8),e.NdJ("click",function(h){const E=e.CHM(o).$implicit;return e.oxw().changeDisplayName(E),h.stopPropagation()}),e.YNc(1,J,1,1,"img",9),e._uU(2),e.qZA()}if(2&f){const o=m.$implicit,a=e.oxw();e.Q6J("value",o),e.xp6(1),e.Q6J("ngIf",a.renderThumbnail&&o.ImgUrl),e.xp6(1),e.hij(" ",o.Value," ")}}let x=(()=>{class f{constructor(o,a){this.httpService=o,this.ngZone=a,this.offlineStorage=[],this.inputLock=!1,this.renderThumbnail=!1,this.onOffline=new e.vpe,this.onEnter=new e.vpe,this.onSelect=new e.vpe,this.onOptionSelect=new e.vpe,this.reset=new e.vpe,this.termControl=new s.NI(""),this.options=[],this.complete=!1,this.foundProduct=!1,this.propagateChange=h=>{},this.termControl.valueChanges.pipe((0,N.b)(500)).subscribe(h=>{this.options=[],"object"==typeof h?(this.value=h.Key,this.clearOnSelect?this.clear():(this.termControl.setValue(h.Value),this.complete=!0),this.onSelect&&this.onSelect.emit(h.Key),this.options=[],"object"==typeof h&&(this.value=h.Key,this.clearOnSelect?this.clear():(this.termControl.setValue(h.Value),this.complete=!0),this.onOptionSelect)&&this.onOptionSelect.emit(JSON.stringify({Key:h.Key,Value:h.Value}))):"string"==typeof h&&h.length>0?h.length>2&&!this.inputLock&&this.search(h):this.clear()})}set display(o){this.input.nativeElement.value=o}get value(){return this._value}set value(o){this._value=o,this.propagateChange(this._value)}ngOnChanges(o){null!=o.ngModel&&null==o.ngModel.currentValue&&this.clear(),null!=o.display&&o.display.currentValue!=o.display.previousValue&&this.termControl.setValue(o.display.currentValue)}ngAfterViewInit(){}search(o){if(this.termControl.value.length>0){let a={};if(this.data&&(a=this.data),a.prefix=o,a.count=100,this.complete)this.complete=!1;else{let h=this.url,b=localStorage.getItem("Domain");b&&(h=`https://${b}${this.url}`),this.httpService.post(h,a).subscribe(E=>{this.options=E,this.foundProduct=this.options.length>0})}}else this.options=null}onblur(){setTimeout(()=>{},600)}changeDisplayName(o){this.input.nativeElement.value=o.Value}onKeydown(o){const a=o.key;"Enter"===a?(this.clearOnSelect&&this.clear(),!this.foundProduct&&this.termControl.value.length>0&&(this.onEnter.emit(this.termControl.value),o.stopPropagation()),null!=this.termControl.value&&(this.input.nativeElement.value=this.termControl.value.Value),this.foundProduct=!1):(this.inputLock&&("Backspace"===a?this.clear():this.validateInputLock()),this.complete=!1,this.reset.emit())}validateInputLock(){""==this.input.nativeElement.value||0==this.input.nativeElement.value.length?this.startInput=new Date:(new Date).getTime()-this.startInput.getTime()>500&&this.clear()}clear(){this.value=null,this.input.nativeElement.value=""}displayFn(o){return o&&o.Value}writeValue(o){}registerOnChange(o){this.propagateChange=o}registerOnTouched(){}}return f.\u0275fac=function(o){return new(o||f)(e.Y36(C.O),e.Y36(e.R0b))},f.\u0275cmp=e.Xpm({type:f,selectors:[["autocomplete"]],viewQuery:function(o,a){if(1&o&&e.Gf(z,7),2&o){let h;e.iGM(h=e.CRH())&&(a.input=h.first)}},inputs:{placeholder:"placeholder",url:"url",clearOnSelect:"clearOnSelect",offlineStorage:"offlineStorage",inputLock:"inputLock",data:"data",renderThumbnail:"renderThumbnail",ngModel:"ngModel",displayText:"displayText",localStorage:"localStorage",_value:"_value",display:"display"},outputs:{onOffline:"onOffline",onEnter:"onEnter",onSelect:"onSelect",onOptionSelect:"onOptionSelect",reset:"reset"},features:[e._Bn([{provide:s.JU,useExisting:(0,e.Gpc)(()=>f),multi:!0}]),e.TTD],decls:9,vars:5,consts:[[1,"w-100"],[1,"form-label-group"],["id","input","type","text","matInput","",1,"form-control","text-black",3,"matAutocomplete","placeholder","formControl","paste","keydown","blur"],["input",""],["for","input"],["autoActiveFirstOption","true"],["autocomplete","matAutocomplete"],["class","option-autocomplete",3,"value","click",4,"ngFor","ngForOf"],[1,"option-autocomplete",3,"value","click"],["width","30","height","30",3,"src",4,"ngIf"],["width","30","height","30",3,"src"]],template:function(o,a){if(1&o&&(e.TgZ(0,"mat-form-field",0),e.TgZ(1,"div",1),e.TgZ(2,"input",2,3),e.NdJ("paste",function(b){return a.inputLock?b.preventDefault():""})("keydown",function(b){return a.onKeydown(b)})("blur",function(){return a.onblur()}),e.qZA(),e.TgZ(4,"label",4),e._uU(5),e.qZA(),e.qZA(),e.qZA(),e.TgZ(6,"mat-autocomplete",5,6),e.YNc(8,w,3,3,"mat-option",7),e.qZA()),2&o){const h=e.MAs(7);e.xp6(2),e.s9C("placeholder",a.placeholder||""),e.Q6J("matAutocomplete",h)("formControl",a.termControl),e.xp6(3),e.Oqu(a.placeholder||""),e.xp6(3),e.Q6J("ngForOf",a.options)}},directives:[L.ZL,s.Fj,s.JJ,s.oH,L.XC,_.sg,G.ey,_.O5],styles:["mat-option[_ngcontent-%COMP%]{font-size:12px}"]}),f})(),k=(()=>{class f{}return f.\u0275fac=function(o){return new(o||f)},f.\u0275mod=e.oAB({type:f}),f.\u0275inj=e.cJS({imports:[[L.Bb,_.ez,s.UX]]}),f})();function R(f,m){if(1&f){const o=e.EpF();e.TgZ(0,"tr",4),e.TgZ(1,"td"),e.TgZ(2,"div",6),e.TgZ(3,"input",10),e.NdJ("ngModelChange",function(h){return e.CHM(o),e.oxw().onCustomPriceChange(h)}),e.qZA(),e.TgZ(4,"label",11),e._uU(5,"Custom Price"),e.qZA(),e.qZA(),e.qZA(),e.qZA()}if(2&f){const o=e.oxw();e.xp6(3),e.Q6J("ngModel",o.customPrice)}}let I=(()=>{class f{constructor(o,a,h,b){this.dialogRef=o,this.barcodeService=a,this.decimalPipe=h,this.data=b,this.modalConfig=new r.O,this.event=new e.vpe,this.variantId="",this.variantName="",this.destroy$=new l.xQ,this.variantId=b.variantId,this.qty=b.qty,this.variantName=b.variantName,this.customPrice=b.customPrice?this.decimalPipe.transform(b.customPrice):null}ngOnInit(){this.getBarcodeConfig(),this.initModalConfig()}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}getBarcodeConfig(){this.barcodeService.getBarcodeConfigState().pipe((0,t.R)(this.destroy$)).subscribe(o=>{o&&(this.paperFormat=o)})}initModalConfig(){this.modalConfig.title="Add New Product Barcode?",this.modalConfig.hideMoreButton=!0}addItem(o){this.variantId=o}onCustomPriceChange(o){let a=parseFloat(o.split(",").join(""));this.customPrice=this.decimalPipe.transform(a,"1.0-3")}onOk(){let o=null;this.customPrice&&(o=parseFloat(this.customPrice.split(",").join(""))),this.qty&&this.qty>0&&this.variantId&&this.dialogRef.close({variantId:this.variantId,qty:this.qty,customPrice:o})}onCancel(){this.dialogRef.close()}}return f.\u0275fac=function(o){return new(o||f)(e.Y36(i.so),e.Y36(M),e.Y36(_.JJ),e.Y36(i.WI))},f.\u0275cmp=e.Xpm({type:f,selectors:[["app-form-add-variant"]],outputs:{event:"event"},features:[e._Bn([_.JJ])],decls:16,vars:4,consts:[[3,"config","onOk","onCancel"],[1,"row"],["align","center",1,"col-sm-12","mt-3"],[2,"position","relative","width","100%"],[1,"w-100"],["placeholder","Name","url","/API/AC/GetVariantSuggestionByCodeNName",3,"display","onSelect"],[1,"form-label-group"],["min","1","id","qty","type","number","placeholder","Quantity","aria-label","width",1,"form-control",3,"ngModel","ngModelChange"],["for","qty"],["class","w-100",4,"ngIf"],["min","0","id","price","step","0.01","min","0","lang","en","value","1.99","placeholder","Custom Price","aria-label","width",1,"form-control",3,"ngModel","ngModelChange"],["for","price"]],template:function(o,a){1&o&&(e.TgZ(0,"modal-material",0),e.NdJ("onOk",function(){return a.onOk()})("onCancel",function(){return a.onCancel()}),e.TgZ(1,"content"),e.TgZ(2,"div",1),e.TgZ(3,"div",2),e.TgZ(4,"table",3),e.TgZ(5,"tbody"),e.TgZ(6,"tr",4),e.TgZ(7,"td"),e.TgZ(8,"autocomplete",5),e.NdJ("onSelect",function(b){return a.addItem(b)}),e.qZA(),e.qZA(),e.qZA(),e.TgZ(9,"tr",4),e.TgZ(10,"td"),e.TgZ(11,"div",6),e.TgZ(12,"input",7),e.NdJ("ngModelChange",function(b){return a.qty=b}),e.qZA(),e.TgZ(13,"label",8),e._uU(14,"Quantity"),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.YNc(15,R,6,1,"tr",9),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA()),2&o&&(e.Q6J("config",a.modalConfig),e.xp6(8),e.Q6J("display",a.variantName),e.xp6(4),e.Q6J("ngModel",a.qty),e.xp6(3),e.Q6J("ngIf",null==a.paperFormat?null:a.paperFormat.CustomPriceEnabled))},directives:[u.M,x,s.qQ,s.wV,s.Fj,s.JJ,s.On,_.O5],styles:[""]}),f})(),D=(()=>{class f{constructor(o,a){this.dialogRef=o,this.data=a,this.event=new e.vpe,this.modalConfig=new r.O}ngOnInit(){this.initModalConfig()}initModalConfig(){this.modalConfig.title="Upload New Product Barcode?",this.modalConfig.hideMoreButton=!0}onOk(){this.dialogRef.close(this.files)}onCancel(){this.dialogRef.close()}onUploadFile(o){o&&(this.files=o.target.files)}}return f.\u0275fac=function(o){return new(o||f)(e.Y36(i.so),e.Y36(i.WI))},f.\u0275cmp=e.Xpm({type:f,selectors:[["app-form-upload-variant"]],outputs:{event:"event"},decls:15,vars:1,consts:[[3,"config","onOk","onCancel"],[1,"row"],[1,"col-sm-12"],["href","//res.cloudinary.com/pos/raw/upload/POS/CSV/Barcode_DealPOS.csv"],[1,"value-title"],["type","file","aria-label","upload",3,"change"]],template:function(o,a){1&o&&(e.TgZ(0,"modal-material",0),e.NdJ("onOk",function(){return a.onOk()})("onCancel",function(){return a.onCancel()}),e.TgZ(1,"content"),e.TgZ(2,"div",1),e.TgZ(3,"div",2),e.TgZ(4,"a",3),e._uU(5,"Download Sample CSV"),e.qZA(),e.TgZ(6,"table"),e.TgZ(7,"tbody"),e.TgZ(8,"tr"),e.TgZ(9,"th",4),e._uU(10,"CSV File"),e.qZA(),e.TgZ(11,"td"),e._uU(12,":"),e.qZA(),e.TgZ(13,"td"),e.TgZ(14,"input",5),e.NdJ("change",function(b){return a.onUploadFile(b)}),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA()),2&o&&e.Q6J("config",a.modalConfig)},directives:[u.M],styles:[""]}),f})();var H=p(4522);let Y=(()=>{class f{static StringFormat(o,...a){for(let h=0;h<a.length;h++)o=o.replace(`{${h}}`,a[h]);return o}static IsNotEmpty(o){return""!=o&&o!=f.GuidEmpty&&null!=o&&null!=o}static IsEmpty(o){return""==o||null==o||null==o||o==f.GuidEmpty}static FilterByID(o,a){try{const h=o.filter(b=>b.ID==a);if(h.length>0)return h[0]}catch(h){console.log("error filter")}return null}static DateOnly(o){return o?new Date(new Date(o).toDateString()):new Date((new Date).toDateString())}}return f.GuidEmpty="00000000-0000-0000-0000-000000000000",f.DecimalMinValue="-7.922816251426434e+28",f.InputLockTimeSpan=500,f.MinDate="0001-01-01T00:00:00",f.MinTime="00:00:00",f})();class re{constructor(m){m&&(this.AccountID=m.AccountID,this.CalculationTypeID=m.CalculationTypeID,this.ID=m.ID,this.Index=m.Index,this.Label=m.Label,this.MultipleTaxTypeID=m.MultipleTaxTypeID,this.Note=m.Note,this.PrintVisible=m.PrintVisible,this.Rate=m.Rate,this.TypeID=m.TypeID,this.Name=m.Name,this.Type=m.Type)}get getID(){return this.ID}get getType(){return this.Type}get getName(){return this.Name}get getAccountID(){return this.AccountID}set setAccountId(m){this.AccountID=m}get getCalculationTypeID(){return this.CalculationTypeID}set setCalculationID(m){this.CalculationTypeID=m}get getRate(){return this.Rate}set setRate(m){this.Rate=m}get getLabel(){return this.Label}}class K{get getDescription(){return this.description}set setDescription(m){this.description=m}set setBarcodeTitle(m){this.barcodeTitle=m}get getBarcodeTitle(){return this.barcodeTitle}set setCustomPrice(m){this.customPrice=m}get getCustomPrice(){return this.customPrice}get getUnitPrice(){return this.UnitPrice}set setUnitPrice(m){this.UnitPrice=m}get getCode(){return this.Code}set setCode(m){this.barcodeTitle=m,this.Code=m}get getModel(){return this.Model}set setModel(m){this.Model=m}get getName(){return this.Name}set setName(m){this.Name=m}get getCurrency(){return this.CurrencySymbol}set setCurrency(m){this.CurrencySymbol=m}}class ie{get getCode(){return this.Code}get getName(){return this.Name}get getSuspended(){return this.Suspended}set setCode(m){this.Code=m}set setName(m){this.Name=m}set setSuspended(m){this.Suspended=m}}class oe{get getOutlet(){return this.Outlet}get getNumber(){return this.Number}get getDate(){return this.Date}get getDueDate(){return this.DueDate}get getSupplier(){return this.Supplier}get getCreatorID(){return this.CreatorID}get getCreated(){return this.Created}get getDiscount1(){return this.Discount1}get getDiscountAmount(){return this.DiscountAmount}get getGross(){return this.Gross}get getDiscountTotal(){return this.DiscountTotal}get getTaxType(){return this.TaxType}get getTax(){return this.Tax}get getPurchase(){return this.Purchase}get getPurchaseNTax(){return this.PurchaseNTax}get getDelivery(){return this.Delivery}get getVariants(){return this.Variants}get getPayments(){return this.Payments}set setOutlet(m){this.Outlet=m}set setNumber(m){this.Number=m}set setDate(m){this.Date=m}set setDueDate(m){this.DueDate=m}set setSupplier(m){this.Supplier=m}set setCreatorID(m){this.CreatorID=m}set setCreated(m){this.Created=m}set setDiscount1(m){this.Discount1=m}set setDiscountAmount(m){this.DiscountAmount=m}set setGross(m){this.Gross=m}set setDiscountTotal(m){this.DiscountTotal=m}set setTaxType(m){this.TaxType=m}set setTax(m){this.Tax=m}set setPurchase(m){this.Purchase=m}set setPurchaseNTax(m){this.PurchaseNTax=m}set setDelivery(m){this.Delivery=m}set setVariants(m){this.Variants=m}set setPayments(m){this.Payments=m}}class ae extends K{constructor(){super()}get getVariantID(){return this.VariantID}get getQuantity(){return this.Quantity}get getPrice(){return this.Price}get getDiscount(){return this.Discount}get getNettPrice(){return this.NettPrice}set setVariantID(m){this.VariantID=m}set setQuantity(m){this.Quantity=m}set setPrice(m){this.Price=m}set setDiscount(m){this.Discount=m}set setNettPrice(m){this.NettPrice=m}}let $=(()=>{class f{constructor(){}getProductModel(o){let a=new K;return a.setCode=o.Code,a.setCurrency=o.CurrencySymbol,a.setModel=o.Model,a.setName=o.Name,a.setUnitPrice=o.UnitPrice,a.setDescription=o.Description,a}getTaxModel(o){return new re(o)}getOutletModel(o){let a=new ie;return a.setCode=o.Code,a.setName=o.Name,a.setSuspended=o.Suspended,a}getVariantModel(o){let a=new ae;return a.setCode=o.Code,a.setDiscount=o.Discount,a.setNettPrice=o.NettPrice,a.setPrice=o.Price,a.setUnitPrice=o.UnitPrice,a.setQuantity=o.Quantity,a.setVariantID=o.VariantID,a.setName=o.Name,a}getBillModel(o){let a=new oe;return a.setNumber=o.Number,a.setOutlet=o.Outlet,a.setVariants=o.Variants?o.Variants.map(h=>this.getVariantModel(h)):[],a}}return f.\u0275fac=function(o){return new(o||f)},f.\u0275prov=e.Yz7({token:f,factory:f.\u0275fac,providedIn:"root"}),f})(),ee=(()=>{class f{constructor(o,a,h){this.httpService=o,this.http=a,this.factoryService=h}getProductById(o){let a=localStorage.getItem("Domain");return this.httpService.post(`https://${a}/API/Product/GetVariantByID`,{id:o,entityID:Y.GuidEmpty}).pipe((0,O.U)(h=>this.factoryService.getProductModel(h)))}uploadProducts(o){let a=localStorage.getItem("Domain"),h=new FormData;return h.append("file",o,o.name),this.httpService.postFormData(`https://${a}/API/Product/UploadCSVforBarcode`,h).pipe((0,O.U)(b=>b.map(E=>(E.Print=E.Print.map(F=>this.factoryService.getProductModel(F)),E))))}getTax(){let o=localStorage.getItem("Domain"),a=localStorage.getItem("Token"),h=`https://${o}/API/V3/Tax`,b=new H.WM({authorization:"Bearer "+a,"content-type":"application/json","X-ClientId":"dealpos-app"});return this.http.get(h,{headers:b}).pipe((0,O.U)(E=>{if(E)return E.map(F=>this.factoryService.getTaxModel(F))}))}}return f.\u0275fac=function(o){return new(o||f)(e.LFG(C.O),e.LFG(H.eN),e.LFG($))},f.\u0275prov=e.Yz7({token:f,factory:f.\u0275fac,providedIn:"root"}),f})();var te=p(8452);let ue=(()=>{class f{constructor(o,a){this.httpService=o,this.factoryService=a}get(){let a=localStorage.getItem("Domain");return this.httpService.post(`https://${a}/api/v3/Outlet/p`,{Suspended:!1}).pipe((0,O.U)(h=>{let b=[];return h&&(b=h.map(E=>this.factoryService.getOutletModel(E))),b}))}}return f.\u0275fac=function(o){return new(o||f)(e.LFG(C.O),e.LFG($))},f.\u0275prov=e.Yz7({token:f,factory:f.\u0275fac,providedIn:"root"}),f})(),le=(()=>{class f{constructor(o,a){this.httpService=o,this.factoryService=a}get(o){let a=localStorage.getItem("Domain"),h=this.getEndPointByType(o.Type);return this.httpService.post(`https://${a}${h}`,{Outlet:o.Outlet,Number:o.Number}).pipe((0,O.U)(E=>E.map(F=>this.factoryService.getVariantModel(F))))}getEndPointByType(o){let a;return a=o===n.SUPPLIER_BILL?"/API/V3/Barcode/byBillNumber":"/API/V3/Barcode/byOutletDeliveryNumber",a}}return f.\u0275fac=function(o){return new(o||f)(e.LFG(C.O),e.LFG($))},f.\u0275prov=e.Yz7({token:f,factory:f.\u0275fac,providedIn:"root"}),f})();function ce(f,m){if(1&f){const o=e.EpF();e.TgZ(0,"tr",18),e.NdJ("click",function(){const h=e.CHM(o),b=h.$implicit,E=h.index;return e.oxw().onUpdateProduct(b,E)}),e.TgZ(1,"td"),e.TgZ(2,"i",19),e.NdJ("click",function(){const b=e.CHM(o).index;return e.oxw().onDeleteProduct(b)}),e.qZA(),e.qZA(),e.TgZ(3,"td"),e._uU(4),e.qZA(),e.TgZ(5,"td",20),e._uU(6),e.qZA(),e.qZA()}if(2&f){const o=m.$implicit;e.xp6(4),e.AsE(" ",null==o||null==o.Variants[0]?null:o.Variants[0].getName,"- ",null==o||null==o.Variants[0]?null:o.Variants[0].getCode," - "),e.xp6(2),e.Oqu(null==o?null:o.Quantity)}}let se=(()=>{class f{constructor(o,a,h,b,E,F,j){this.dialog=o,this.productStateService=a,this.productService=h,this.toastService=b,this.queryParamService=E,this.outletService=F,this.billService=j,this.destroy$=new l.xQ,this.stickerTotal=0,this.productGroups=[],this.productSource=[],this.getRouteParam(),this.initOutlets()}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}getRouteParam(){this.queryParamService.getState().pipe((0,t.R)(this.destroy$)).subscribe(o=>{o.ID&&this.getProductById(o.ID,5),o.billNumber&&this.getBill({Number:o.billNumber,Outlet:o.outletName,Type:n.SUPPLIER_BILL})})}initOutlets(){this.outletService.get().pipe((0,t.R)(this.destroy$)).subscribe(o=>{this.outlets=o})}onAddBill(){this.dialog.open(S,{width:"350px",data:{outlets:this.outlets}}).afterClosed().pipe((0,t.R)(this.destroy$)).subscribe(o=>{o&&this.getBill(o)})}getBill(o){this.billService.get(o).pipe((0,t.R)(this.destroy$)).subscribe(a=>{a&&a.forEach(h=>{this.checkAvailableProductCode(h);let b=this.generateProductByQty(h,h.getQuantity);this.productGroups=[...this.productGroups,{VariantID:h.getVariantID,Quantity:h.getQuantity,Variants:b}],this.updateProductsSource()})})}onAddProduct(){let o,a;this.dialog.open(I,{width:"350px",data:{variantName:"",variantId:null,qty:null}}).afterClosed().pipe((0,t.R)(this.destroy$)).subscribe(h=>{h&&(o=h.variantId,a=h.qty,this.customPrice=h.customPrice,this.getProductById(o,a))})}getProductById(o,a){this.productService.getProductById(o).pipe((0,t.R)(this.destroy$)).subscribe(h=>{if(h){this.checkAvailableProductCode(h);let b=this.generateProductByQty(h,a);b=this.updateCustomPriceProducts(b),this.productGroups=[...this.productGroups,{VariantID:o,Quantity:a,Variants:b}],this.updateProductsSource()}})}checkAvailableProductCode(o){o.getCode||this.toastService.error("Product has no code","Code Not Found")}onUpdateProduct(o,a){this.dialog.open(I,{width:"350px",data:{variantName:o.Variants[0].getName+" - "+o.Variants[0].getCode,variantId:o.VariantID,qty:o.Quantity,customPrice:o.Variants[0].getCustomPrice}}).afterClosed().pipe((0,t.R)(this.destroy$)).subscribe(U=>{U&&(this.customPrice=U.customPrice,this.productService.getProductById(U.variantId).pipe((0,t.R)(this.destroy$)).subscribe(Q=>{if(Q){this.checkAvailableProductCode(Q);let B=this.generateProductByQty(Q,U.qty);B=this.updateCustomPriceProducts(B),this.productGroups[a].Variants=B,this.productGroups[a].Quantity=U.qty,this.productGroups[a].VariantID=U.variantId,this.updateProductsSource()}}))})}onDeleteProduct(o){this.productGroups=this.productGroups.filter((a,h)=>h!==o),this.updateProductsSource()}updateProductsSource(){this.productSource=[],this.productGroups.forEach(o=>{this.productSource=[...this.productSource,...o.Variants]}),this.stickerTotal=this.productSource.length,this.productStateService.setState(this.productSource)}onUploadProduct(){this.dialog.open(D,{width:"350px"}).afterClosed().pipe((0,t.R)(this.destroy$)).subscribe(o=>{if(o){let a;this.productService.uploadProducts(o[0]).pipe((0,t.R)(this.destroy$)).subscribe(h=>{h&&(this.productGroups=[...this.productGroups,...h.map(b=>(a={Quantity:b.Quantity,VariantID:b.VariantID,Variants:b.Print},a))],this.updateProductsSource())})}})}updateCustomPriceProducts(o){let a=o;return this.customPrice&&(a=o.map(h=>(h.setCustomPrice=this.customPrice,h))),a}generateProductByQty(o,a){let h=[];for(let b=1;b<=a;b++)h.push(o);return h}onClear(){this.productGroups=[],this.updateProductsSource()}onPrint(){window.print()}}return f.\u0275fac=function(o){return new(o||f)(e.Y36(i.uw),e.Y36(A),e.Y36(ee),e.Y36(te._W),e.Y36(T.U),e.Y36(ue),e.Y36(le))},f.\u0275cmp=e.Xpm({type:f,selectors:[["app-list-products"]],decls:29,vars:2,consts:[[1,"card","mt-3","sticky-top"],[1,"card-header","d-flex","justify-content-between","align-items-center","bg-white","pb-5",2,"border","none"],[1,"font-weight-light","m-1"],[1,"ml-1","font-italic","text-info","d-block","mt-1"],[1,"btn-group"],["type","button",1,"btn-md","btn","btn-outline-secondary",3,"click"],["aria-hidden","true",1,"fa","fa-cart-plus"],["aria-hidden","true",1,"fa","fa-plus"],["aria-hidden","true",1,"fa","fa-upload"],[1,"card-body","py-0"],[1,"table","table-fixed"],[1,"thead-light","lh-1"],["scope","col"],["scope","col",1,"text-right"],[3,"click",4,"ngFor","ngForOf"],[1,"card-footer","d-flex","justify-content-end","bg-white"],[1,"btn","btn-lg","btn-outline-secondary","ml-5",3,"click"],[1,"btn","btn-lg","btn-success","ml-5",3,"click"],[3,"click"],["aria-hidden","true",1,"fa","fa-times",2,"color","#fb404b !important","cursor","pointer",3,"click"],[1,"text-right"]],template:function(o,a){1&o&&(e.TgZ(0,"div",0),e.TgZ(1,"div",1),e.TgZ(2,"h1",2),e._uU(3," Products "),e.TgZ(4,"small",3),e._uU(5),e.qZA(),e.qZA(),e.TgZ(6,"div",4),e.TgZ(7,"button",5),e.NdJ("click",function(){return a.onAddBill()}),e._UZ(8,"i",6),e.qZA(),e.TgZ(9,"button",5),e.NdJ("click",function(){return a.onAddProduct()}),e._UZ(10,"i",7),e.qZA(),e.TgZ(11,"button",5),e.NdJ("click",function(){return a.onUploadProduct()}),e._UZ(12,"i",8),e.qZA(),e.qZA(),e.qZA(),e.TgZ(13,"div",9),e.TgZ(14,"table",10),e.TgZ(15,"thead",11),e.TgZ(16,"tr"),e._UZ(17,"th",12),e.TgZ(18,"th",12),e._uU(19,"NAME"),e.qZA(),e.TgZ(20,"th",13),e._uU(21,"QTY"),e.qZA(),e.qZA(),e.qZA(),e.TgZ(22,"tbody"),e.YNc(23,ce,7,3,"tr",14),e.qZA(),e.qZA(),e.qZA(),e.TgZ(24,"div",15),e.TgZ(25,"a",16),e.NdJ("click",function(){return a.onClear()}),e._uU(26,"Clear"),e.qZA(),e.TgZ(27,"a",17),e.NdJ("click",function(){return a.onPrint()}),e._uU(28,"Print"),e.qZA(),e.qZA(),e.qZA()),2&o&&(e.xp6(5),e.hij("( ",0===a.stickerTotal?"":a.stickerTotal," stickers )"),e.xp6(18),e.Q6J("ngForOf",a.productGroups))},directives:[_.sg],styles:["td[_ngcontent-%COMP%]{font-size:12px}th[_ngcontent-%COMP%]{font-size:12px}"]}),f})();function de(f,m){if(1&f){const o=e.EpF();e.TgZ(0,"tr"),e.TgZ(1,"td"),e._uU(2,"Selected Tax"),e.qZA(),e.TgZ(3,"td"),e.TgZ(4,"ng-select",45),e.NdJ("ngModelChange",function(h){return e.CHM(o),e.oxw().taxOptionSelected=h})("change",function(){return e.CHM(o),e.oxw().onSelectTaxType()}),e.qZA(),e.qZA(),e.TgZ(5,"td"),e._uU(6,"Applied Tax ex: 100 + 10% = 110"),e.qZA(),e.qZA()}if(2&f){const o=e.oxw();e.xp6(4),e.Q6J("items",o.taxOptions)("ngModel",o.taxOptionSelected)("clearable",!1)}}const q=function(f){return{active:f}};let fe=(()=>{class f{constructor(o,a){this.dialogRef=o,this.data=a,this.event=new e.vpe,this.modalConfig=new r.O,this.taxOptions=[],this.paperWidth=0,this.marginTop=0,this.marginLeft=0,this.stickerWidth=0,this.stickerHeight=0,this.barcodeHeight=0,this.spacingColumn=0,this.spacingRow=0,this.barcode=!0,this.code=!0,this.price=!0,this.name=!0,this.removeDefault=!0,this.desc=!0,this.priceTax=!0,this.customPrice=!0,this.fontSize=0,this.namePrefix="",this.maxChar=0,this.publiclineHeight=0,this.paperFormat=JSON.parse(JSON.stringify(a.paperFormat)),this.taxs=a.taxs,this.authTax=a.authTax,this.initTaxOptions(),this.activeTab="paper"}ngOnInit(){this.initModalConfig(),this.initFormValue(),this.authTax&&this.initTaxOptionSelected()}initTaxOptions(){this.taxOptions=[],this.taxs.forEach((o,a)=>{this.taxOptions=[...this.taxOptions,{id:a+1,name:o.getName,ID:o.getID}]})}initTaxOptionSelected(){this.taxSelected&&(this.taxOptionSelected=this.taxOptions.find(o=>o.ID===this.taxSelected.ID))}onSelectTaxType(){this.taxSelected=this.taxs.find(o=>o.getID===this.taxOptionSelected.ID)}initModalConfig(){this.modalConfig.title="Sticker Configuration",this.modalConfig.hideMoreButton=!0}onOk(){this.setPaperFormat(),this.dialogRef.close(this.paperFormat)}onCancel(){this.dialogRef.close()}initFormValue(){this.paperFormat&&(this.barcodeHeight=this.paperFormat.BarcodeHeight,this.paperWidth=this.paperFormat.PaperWidth,this.marginTop=this.paperFormat.MarginTop,this.marginLeft=this.paperFormat.MarginLeft,this.stickerWidth=this.paperFormat.StickerWidth,this.stickerHeight=this.paperFormat.StickerHeight,this.barcodeHeight=this.paperFormat.BarcodeHeight,this.spacingColumn=this.paperFormat.ColumnSpacing,this.spacingRow=this.paperFormat.RowSpacing,this.barcode=this.paperFormat.BarcodeVisible,this.code=this.paperFormat.CodeVisible,this.price=this.paperFormat.PriceVisible,this.name=this.paperFormat.NameVisible,this.desc=this.paperFormat.DescriptionAsCode,this.fontSize=this.paperFormat.ProductNameFontSize,this.namePrefix=this.paperFormat.ProductNamePrefix,this.maxChar=this.paperFormat.ProductNameMaxLength,this.lineHeight=this.paperFormat.LineHeight,this.priceTax=this.paperFormat.PriceWithTax,this.taxSelected=this.paperFormat.TaxType,this.customPrice=this.paperFormat.CustomPriceEnabled,this.storeName=this.paperFormat.StoreName,this.currencySymbol=this.paperFormat.CurrencySymbol)}setPaperFormat(){this.paperFormat&&(this.checkPriceWithTax(),this.paperFormat.BarcodeHeight=this.barcodeHeight,this.paperFormat.PaperWidth=this.paperWidth,this.paperFormat.MarginTop=this.marginTop,this.paperFormat.MarginLeft=this.marginLeft,this.paperFormat.StickerWidth=this.stickerWidth,this.paperFormat.StickerHeight=this.stickerHeight,this.paperFormat.BarcodeHeight=this.barcodeHeight,this.paperFormat.ColumnSpacing=this.spacingColumn,this.paperFormat.RowSpacing=this.spacingRow,this.paperFormat.BarcodeVisible=this.barcode,this.paperFormat.CodeVisible=this.code,this.paperFormat.PriceVisible=this.price,this.paperFormat.NameVisible=this.name,this.paperFormat.DescriptionAsCode=this.desc,this.paperFormat.ProductNameFontSize=this.fontSize,this.paperFormat.ProductNamePrefix=this.namePrefix,this.paperFormat.ProductNameMaxLength=this.maxChar,this.paperFormat.LineHeight=this.lineHeight,this.paperFormat.PriceWithTax=this.priceTax,this.paperFormat.TaxType=this.taxSelected,this.paperFormat.CustomPriceEnabled=this.customPrice,this.paperFormat.StoreName=this.storeName,this.paperFormat.CurrencySymbol=this.currencySymbol)}checkPriceWithTax(){this.priceTax||(this.taxSelected=this.taxs.find(o=>"No Tax"==o.getLabel))}dataTarget(o){this.activeTab=o}}return f.\u0275fac=function(o){return new(o||f)(e.Y36(i.so),e.Y36(i.WI))},f.\u0275cmp=e.Xpm({type:f,selectors:[["app-form-settings"]],outputs:{event:"event"},decls:276,vars:62,consts:[[3,"config","onOk","onCancel"],["container",""],[1,"container-fluid","px-0","bg-light-white","nav-tabs-custom-border"],["id","myTab","role","tablist",1,"nav","nav-tabs"],["tabs",""],[1,"nav-item"],["data-toggle","tab",1,"nav-link",3,"ngClass","click"],["id","spacing-tab","data-toggle","tab","data-target","'#spacing'","role","tab","aria-selected","true",1,"nav-link",3,"ngClass","click"],["id","dua-tab","data-toggle","tab","data-target","'#sticker-content'","role","tab","aria-selected","true",1,"nav-link",3,"ngClass","click"],["id","price-tab","data-toggle","tab","data-target","'#price'","role","tab","aria-selected","true",1,"nav-link",3,"ngClass","click"],["id","advanced-tab","data-toggle","tab","data-target","'#advanced'","role","tab","aria-selected","true",1,"nav-link",3,"ngClass","click"],[1,"tab-content"],["id","paper",1,"tab-pane","mt-0",3,"ngClass"],[1,"table","w-100"],[1,"input-group"],["type","number","aria-label","width",1,"form-control",3,"ngModel","ngModelChange"],[1,"input-group-append"],[1,"input-group-text"],["id","spacing",1,"tab-pane","mt-0",3,"ngClass"],["id","sticker-content",1,"tab-pane","mt-0",3,"ngClass"],[1,"form-check","form-check-inline"],["type","radio","name","barcode","id","barcode","value","option3",1,"form-check-input",3,"checked","change"],["for","barcode",1,"form-check-label"],["type","radio","name","barcode","id","barcode","value","option4",1,"form-check-input",3,"checked","change"],["type","radio","name","code","id","code","value","option1",1,"form-check-input",3,"checked","change"],["for","code",1,"form-check-label"],["type","radio","name","code","id","code","value","option2",1,"form-check-input",3,"checked","change"],["type","radio","name","price","id","inlineRadio1","value","option1",1,"form-check-input",3,"checked","change"],["for","inlineRadio1",1,"form-check-label"],["type","radio","name","price","id","inlineRadio2","value","option2",1,"form-check-input",3,"checked","change"],["for","inlineRadio2",1,"form-check-label"],["type","radio","name","name","id","inlineRadio1","value","option1",1,"form-check-input",3,"checked","change"],["type","radio","name","name","id","inlineRadio2","value","option2",1,"form-check-input",3,"checked","change"],["id","price",1,"tab-pane","mt-0",3,"ngClass"],["type","radio","name","priceTax","id","inlineRadio1","value","option1",1,"form-check-input",3,"checked","change"],["type","radio","name","priceTax","id","inlineRadio2","value","option2",1,"form-check-input",3,"checked","change"],[4,"ngIf"],["type","radio","name","customPrice","id","inlineRadio1","value","option1",1,"form-check-input",3,"checked","change"],["type","radio","name","customPrice","id","inlineRadio2","value","option2",1,"form-check-input",3,"checked","change"],["type","text","aria-label","width",1,"form-control",3,"ngModel","ngModelChange"],["id","advanced",1,"tab-pane","mt-0",3,"ngClass"],["type","radio","name","desc","id","inlineRadio1","value","option1",1,"form-check-input",3,"checked","change"],["type","radio","name","desc","id","inlineRadio2","value","option2",1,"form-check-input",3,"checked","change"],["type","radio","name","default","id","inlineRadio1","value","option1",1,"form-check-input",3,"checked","change"],["type","radio","name","default","id","inlineRadio2","value","option2",1,"form-check-input",3,"checked","change"],["bindLabel","name","placeholder","Select Column",1,"sticky-top",3,"items","ngModel","clearable","ngModelChange","change"]],template:function(o,a){1&o&&(e.TgZ(0,"modal-material",0),e.NdJ("onOk",function(){return a.onOk()})("onCancel",function(){return a.onCancel()}),e.TgZ(1,"content"),e.TgZ(2,"div",1),e.TgZ(3,"div",2),e.TgZ(4,"ul",3,4),e.TgZ(6,"li",5),e.TgZ(7,"a",6),e.NdJ("click",function(){return a.dataTarget("paper")}),e._uU(8,"Paper"),e.qZA(),e.qZA(),e.TgZ(9,"li",5),e.TgZ(10,"a",7),e.NdJ("click",function(){return a.dataTarget("spacing")}),e._uU(11,"Spacing"),e.qZA(),e.qZA(),e.TgZ(12,"li",5),e.TgZ(13,"a",8),e.NdJ("click",function(){return a.dataTarget("sticker-content")}),e._uU(14,"Sticker Content"),e.qZA(),e.qZA(),e.TgZ(15,"li",5),e.TgZ(16,"a",9),e.NdJ("click",function(){return a.dataTarget("price")}),e._uU(17,"Price"),e.qZA(),e.qZA(),e.TgZ(18,"li",5),e.TgZ(19,"a",10),e.NdJ("click",function(){return a.dataTarget("advanced")}),e._uU(20,"Advanced"),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.TgZ(21,"div",11),e.TgZ(22,"div",12),e.TgZ(23,"table",13),e.TgZ(24,"tr"),e.TgZ(25,"td"),e._uU(26,"Paper Width"),e.qZA(),e.TgZ(27,"td"),e.TgZ(28,"div",14),e.TgZ(29,"input",15),e.NdJ("ngModelChange",function(b){return a.paperWidth=b}),e.qZA(),e.TgZ(30,"div",16),e.TgZ(31,"span",17),e._uU(32,"px"),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.TgZ(33,"td"),e._uU(34,"The width of the paper"),e.qZA(),e.qZA(),e.TgZ(35,"tr"),e.TgZ(36,"td"),e._uU(37,"Sticker Width"),e.qZA(),e.TgZ(38,"td"),e.TgZ(39,"div",14),e.TgZ(40,"input",15),e.NdJ("ngModelChange",function(b){return a.stickerWidth=b}),e.qZA(),e.TgZ(41,"div",16),e.TgZ(42,"span",17),e._uU(43,"px"),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.TgZ(44,"td"),e._uU(45,"The width of the sticker"),e.qZA(),e.qZA(),e.TgZ(46,"tr"),e.TgZ(47,"td"),e._uU(48,"Sticker Height"),e.qZA(),e.TgZ(49,"td"),e.TgZ(50,"div",14),e.TgZ(51,"input",15),e.NdJ("ngModelChange",function(b){return a.stickerHeight=b}),e.qZA(),e.TgZ(52,"div",16),e.TgZ(53,"span",17),e._uU(54,"px"),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.TgZ(55,"td"),e._uU(56,"The height of the sticker"),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.TgZ(57,"div",18),e.TgZ(58,"table",13),e.TgZ(59,"tr"),e.TgZ(60,"td"),e._uU(61,"Left Indent"),e.qZA(),e.TgZ(62,"td"),e.TgZ(63,"div",14),e.TgZ(64,"input",15),e.NdJ("ngModelChange",function(b){return a.marginLeft=b}),e.qZA(),e.TgZ(65,"div",16),e.TgZ(66,"span",17),e._uU(67,"px"),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.TgZ(68,"td"),e._uU(69,"the number of pixels appended before the first COLUMN"),e.qZA(),e.qZA(),e.TgZ(70,"tr"),e.TgZ(71,"td"),e._uU(72,"Top Indent"),e.qZA(),e.TgZ(73,"td"),e.TgZ(74,"div",14),e.TgZ(75,"input",15),e.NdJ("ngModelChange",function(b){return a.marginTop=b}),e.qZA(),e.TgZ(76,"div",16),e.TgZ(77,"span",17),e._uU(78,"px"),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.TgZ(79,"td"),e._uU(80,"the number of pixels appended before the first ROW"),e.qZA(),e.qZA(),e.TgZ(81,"tr"),e.TgZ(82,"td"),e._uU(83,"Row Spacing"),e.qZA(),e.TgZ(84,"td"),e.TgZ(85,"div",14),e.TgZ(86,"input",15),e.NdJ("ngModelChange",function(b){return a.spacingRow=b}),e.qZA(),e.TgZ(87,"div",16),e.TgZ(88,"span",17),e._uU(89,"px"),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.TgZ(90,"td"),e._uU(91,"The number of pixels between each ROW"),e.qZA(),e.qZA(),e.TgZ(92,"tr"),e.TgZ(93,"td"),e._uU(94,"Column Spacing"),e.qZA(),e.TgZ(95,"td"),e.TgZ(96,"div",14),e.TgZ(97,"input",15),e.NdJ("ngModelChange",function(b){return a.spacingColumn=b}),e.qZA(),e.TgZ(98,"div",16),e.TgZ(99,"span",17),e._uU(100,"px"),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.TgZ(101,"td"),e._uU(102,"The number of pixels between each COLUMN"),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.TgZ(103,"div",19),e.TgZ(104,"table",13),e.TgZ(105,"tr"),e.TgZ(106,"td"),e._uU(107,"Barcode Height"),e.qZA(),e.TgZ(108,"td"),e.TgZ(109,"div",14),e.TgZ(110,"input",15),e.NdJ("ngModelChange",function(b){return a.barcodeHeight=b}),e.qZA(),e.TgZ(111,"div",16),e.TgZ(112,"span",17),e._uU(113,"px"),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.TgZ(114,"td"),e._uU(115,"the height of the generated barcode in pixels"),e.qZA(),e.qZA(),e.TgZ(116,"tr"),e.TgZ(117,"td"),e._uU(118,"Product Name Font Size"),e.qZA(),e.TgZ(119,"td"),e.TgZ(120,"div",14),e.TgZ(121,"input",15),e.NdJ("ngModelChange",function(b){return a.fontSize=b}),e.qZA(),e.TgZ(122,"div",16),e.TgZ(123,"span",17),e._uU(124,"px"),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.TgZ(125,"td"),e._uU(126,"Product Name Font Size"),e.qZA(),e.qZA(),e.TgZ(127,"tr"),e.TgZ(128,"td"),e._uU(129,"Barcode"),e.qZA(),e.TgZ(130,"td"),e.TgZ(131,"div",20),e.TgZ(132,"input",21),e.NdJ("change",function(){return a.barcode=!1}),e.qZA(),e.TgZ(133,"label",22),e._uU(134,"No"),e.qZA(),e.qZA(),e.TgZ(135,"div",20),e.TgZ(136,"input",23),e.NdJ("change",function(){return a.barcode=!0}),e.qZA(),e.TgZ(137,"label",22),e._uU(138,"Yes"),e.qZA(),e.qZA(),e.qZA(),e.TgZ(139,"td"),e._uU(140,"Whether barcode is visible"),e.qZA(),e.qZA(),e.TgZ(141,"tr"),e.TgZ(142,"td"),e._uU(143,"Code"),e.qZA(),e.TgZ(144,"td"),e.TgZ(145,"div",20),e.TgZ(146,"input",24),e.NdJ("change",function(){return a.code=!1}),e.qZA(),e.TgZ(147,"label",25),e._uU(148,"No"),e.qZA(),e.qZA(),e.TgZ(149,"div",20),e.TgZ(150,"input",26),e.NdJ("change",function(){return a.code=!0}),e.qZA(),e.TgZ(151,"label",25),e._uU(152,"Yes"),e.qZA(),e.qZA(),e.qZA(),e.TgZ(153,"td"),e._uU(154,"Whether variant code is visible"),e.qZA(),e.qZA(),e.TgZ(155,"tr"),e.TgZ(156,"td"),e._uU(157,"Price"),e.qZA(),e.TgZ(158,"td"),e.TgZ(159,"div",20),e.TgZ(160,"input",27),e.NdJ("change",function(){return a.price=!1}),e.qZA(),e.TgZ(161,"label",28),e._uU(162,"No"),e.qZA(),e.qZA(),e.TgZ(163,"div",20),e.TgZ(164,"input",29),e.NdJ("change",function(){return a.price=!0}),e.qZA(),e.TgZ(165,"label",30),e._uU(166,"Yes"),e.qZA(),e.qZA(),e.qZA(),e.TgZ(167,"td"),e._uU(168,"Whether variant price is visible"),e.qZA(),e.qZA(),e.TgZ(169,"tr"),e.TgZ(170,"td"),e._uU(171,"Name"),e.qZA(),e.TgZ(172,"td"),e.TgZ(173,"div",20),e.TgZ(174,"input",31),e.NdJ("change",function(){return a.name=!1}),e.qZA(),e.TgZ(175,"label",28),e._uU(176,"No"),e.qZA(),e.qZA(),e.TgZ(177,"div",20),e.TgZ(178,"input",32),e.NdJ("change",function(){return a.name=!0}),e.qZA(),e.TgZ(179,"label",30),e._uU(180,"Yes"),e.qZA(),e.qZA(),e.qZA(),e.TgZ(181,"td"),e._uU(182,"Whether variant name is visible"),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.TgZ(183,"div",33),e.TgZ(184,"table",13),e.TgZ(185,"tr"),e.TgZ(186,"td"),e._uU(187,"Price with Tax"),e.qZA(),e.TgZ(188,"td"),e.TgZ(189,"div",20),e.TgZ(190,"input",34),e.NdJ("change",function(){return a.priceTax=!1}),e.qZA(),e.TgZ(191,"label",28),e._uU(192,"No"),e.qZA(),e.qZA(),e.TgZ(193,"div",20),e.TgZ(194,"input",35),e.NdJ("change",function(){return a.priceTax=!0}),e.qZA(),e.TgZ(195,"label",30),e._uU(196,"Yes"),e.qZA(),e.qZA(),e.qZA(),e.TgZ(197,"td"),e._uU(198),e.qZA(),e.qZA(),e.YNc(199,de,7,3,"tr",36),e.TgZ(200,"tr"),e.TgZ(201,"td"),e._uU(202,"Custom Price"),e.qZA(),e.TgZ(203,"td"),e.TgZ(204,"div",20),e.TgZ(205,"input",37),e.NdJ("change",function(){return a.customPrice=!1}),e.qZA(),e.TgZ(206,"label",28),e._uU(207,"No"),e.qZA(),e.qZA(),e.TgZ(208,"div",20),e.TgZ(209,"input",38),e.NdJ("change",function(){return a.customPrice=!0}),e.qZA(),e.TgZ(210,"label",30),e._uU(211,"Yes"),e.qZA(),e.qZA(),e.qZA(),e.TgZ(212,"td"),e._uU(213,"Allow custom price"),e.qZA(),e.qZA(),e.TgZ(214,"tr"),e.TgZ(215,"td"),e._uU(216,"Currency"),e.qZA(),e.TgZ(217,"td"),e.TgZ(218,"div",14),e.TgZ(219,"input",39),e.NdJ("ngModelChange",function(b){return a.currencySymbol=b}),e.qZA(),e.qZA(),e.qZA(),e.TgZ(220,"td"),e._uU(221,"the default currency"),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.TgZ(222,"div",40),e.TgZ(223,"table",13),e.TgZ(224,"tr"),e.TgZ(225,"td"),e._uU(226,"Max Character"),e.qZA(),e.TgZ(227,"td"),e.TgZ(228,"div",14),e.TgZ(229,"input",15),e.NdJ("ngModelChange",function(b){return a.maxChar=b}),e.qZA(),e.qZA(),e.qZA(),e.TgZ(230,"td"),e._uU(231,"the max character of the product name"),e.qZA(),e.qZA(),e.TgZ(232,"tr"),e.TgZ(233,"td"),e._uU(234,"Name Prefix"),e.qZA(),e.TgZ(235,"td"),e.TgZ(236,"div",14),e.TgZ(237,"input",39),e.NdJ("ngModelChange",function(b){return a.namePrefix=b}),e.qZA(),e.qZA(),e.qZA(),e.TgZ(238,"td"),e._uU(239,"a word, letter, or number placed before product name"),e.qZA(),e.qZA(),e.TgZ(240,"tr"),e.TgZ(241,"td"),e._uU(242,"Store Name"),e.qZA(),e.TgZ(243,"td"),e.TgZ(244,"div",14),e.TgZ(245,"input",39),e.NdJ("ngModelChange",function(b){return a.storeName=b}),e.qZA(),e.qZA(),e.qZA(),e.TgZ(246,"td"),e._uU(247,"the name of the store"),e.qZA(),e.qZA(),e.TgZ(248,"tr"),e.TgZ(249,"td"),e._uU(250,"Use description as code"),e.qZA(),e.TgZ(251,"td"),e.TgZ(252,"div",20),e.TgZ(253,"input",41),e.NdJ("change",function(){return a.desc=!1}),e.qZA(),e.TgZ(254,"label",28),e._uU(255,"No"),e.qZA(),e.qZA(),e.TgZ(256,"div",20),e.TgZ(257,"input",42),e.NdJ("change",function(){return a.desc=!0}),e.qZA(),e.TgZ(258,"label",30),e._uU(259,"Yes"),e.qZA(),e.qZA(),e.qZA(),e.TgZ(260,"td"),e._uU(261,"Copy product description into Product Code"),e.qZA(),e.qZA(),e.TgZ(262,"tr"),e.TgZ(263,"td"),e._uU(264,'Remove "Default"'),e.qZA(),e.TgZ(265,"td"),e.TgZ(266,"div",20),e.TgZ(267,"input",43),e.NdJ("change",function(){return a.removeDefault=!1}),e.qZA(),e.TgZ(268,"label",28),e._uU(269,"No"),e.qZA(),e.qZA(),e.TgZ(270,"div",20),e.TgZ(271,"input",44),e.NdJ("change",function(){return a.removeDefault=!0}),e.qZA(),e.TgZ(272,"label",30),e._uU(273,"Yes"),e.qZA(),e.qZA(),e.qZA(),e.TgZ(274,"td"),e._uU(275,'Remove "Default" Label from product name'),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA()),2&o&&(e.Q6J("config",a.modalConfig),e.xp6(7),e.Q6J("ngClass",e.VKq(42,q,"paper"===a.activeTab)),e.xp6(3),e.Q6J("ngClass",e.VKq(44,q,"spacing"===a.activeTab)),e.xp6(3),e.Q6J("ngClass",e.VKq(46,q,"sticker-content"===a.activeTab)),e.xp6(3),e.Q6J("ngClass",e.VKq(48,q,"price"===a.activeTab)),e.xp6(3),e.Q6J("ngClass",e.VKq(50,q,"advanced"===a.activeTab)),e.xp6(3),e.Q6J("ngClass",e.VKq(52,q,"paper"===a.activeTab)),e.xp6(7),e.Q6J("ngModel",a.paperWidth),e.xp6(11),e.Q6J("ngModel",a.stickerWidth),e.xp6(11),e.Q6J("ngModel",a.stickerHeight),e.xp6(6),e.Q6J("ngClass",e.VKq(54,q,"spacing"===a.activeTab)),e.xp6(7),e.Q6J("ngModel",a.marginLeft),e.xp6(11),e.Q6J("ngModel",a.marginTop),e.xp6(11),e.Q6J("ngModel",a.spacingRow),e.xp6(11),e.Q6J("ngModel",a.spacingColumn),e.xp6(6),e.Q6J("ngClass",e.VKq(56,q,"sticker-content"===a.activeTab)),e.xp6(7),e.Q6J("ngModel",a.barcodeHeight),e.xp6(11),e.Q6J("ngModel",a.fontSize),e.xp6(11),e.Q6J("checked",!a.barcode),e.xp6(4),e.Q6J("checked",a.barcode),e.xp6(10),e.Q6J("checked",!a.code),e.xp6(4),e.Q6J("checked",a.code),e.xp6(10),e.Q6J("checked",!a.price),e.xp6(4),e.Q6J("checked",a.price),e.xp6(10),e.Q6J("checked",!a.name),e.xp6(4),e.Q6J("checked",a.name),e.xp6(5),e.Q6J("ngClass",e.VKq(58,q,"price"===a.activeTab)),e.xp6(7),e.Q6J("checked",!a.priceTax),e.xp6(4),e.Q6J("checked",a.priceTax),e.xp6(4),e.hij("Tax is added to the product base price ",a.authTax,""),e.xp6(1),e.Q6J("ngIf",1==a.priceTax&&1==a.authTax),e.xp6(6),e.Q6J("checked",!a.customPrice),e.xp6(4),e.Q6J("checked",a.customPrice),e.xp6(10),e.Q6J("ngModel",a.currencySymbol),e.xp6(3),e.Q6J("ngClass",e.VKq(60,q,"advanced"===a.activeTab)),e.xp6(7),e.Q6J("ngModel",a.maxChar),e.xp6(8),e.Q6J("ngModel",a.namePrefix),e.xp6(8),e.Q6J("ngModel",a.storeName),e.xp6(8),e.Q6J("checked",!a.desc),e.xp6(4),e.Q6J("checked",a.desc),e.xp6(10),e.Q6J("checked",!a.removeDefault),e.xp6(4),e.Q6J("checked",a.removeDefault))},directives:[u.M,_.mk,s.wV,s.Fj,s.JJ,s.On,_.O5,d.w9],styles:[".input-group-append[_ngcontent-%COMP%]{height:30px}.form-control[_ngcontent-%COMP%]{height:30px;font-size:12px}.input-group-text[_ngcontent-%COMP%]{font-size:12px}.value-title[_ngcontent-%COMP%]{font-size:12px;font-weight:550;width:90px}.advance-value-title[_ngcontent-%COMP%]{font-size:12px;font-weight:550;width:135px}h3[_ngcontent-%COMP%]{margin-bottom:0;font-weight:550}label[_ngcontent-%COMP%]{font-size:12px}bs-dropdown-container[_ngcontent-%COMP%]{z-index:1060}.nav-tabs-custom-border[_ngcontent-%COMP%] .nav-tabs[_ngcontent-%COMP%]{border-bottom:0}.tab-content[_ngcontent-%COMP%] > .active[_ngcontent-%COMP%] .table[_ngcontent-%COMP%]{border:1px solid #dee2e6;margin-bottom:15px}.tab-content[_ngcontent-%COMP%] > .active[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:nth-child(1){font-weight:bold;width:172px;padding:12px 1rem}.tab-content[_ngcontent-%COMP%] > .active[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:nth-child(2){width:120px}.tab-content[_ngcontent-%COMP%] > .active[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:nth-child(2), .tab-content[_ngcontent-%COMP%] > .active[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:nth-child(2){border-right:1px solid #dee2e6;border-left:1px solid #dee2e6}.tab-content[_ngcontent-%COMP%] > .active[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:nth-child(2) input[_ngcontent-%COMP%]{border:0;border-bottom:1px solid #dee2e6}.tab-content[_ngcontent-%COMP%] > .active[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:nth-child(2) .input-group-text[_ngcontent-%COMP%]{border:0;border-bottom:1px solid #dee2e6}.tab-content[_ngcontent-%COMP%] > .active[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:nth-child(3){font-style:italic;color:#28a745}"]}),f})();const he=["bcElement"],pe=p(9489);let ge=(()=>{class f{constructor(o){this.renderer=o,this.elementType="svg",this.cssClass="barcode",this.format="CODE128",this.lineColor="#000000",this.width=2,this.height=100,this.displayValue=!1,this.fontOptions="",this.font="monospace",this.textAlign="center",this.textPosition="bottom",this.textMargin=2,this.fontSize=20,this.background="#ffffff",this.margin=10,this.marginTop=10,this.marginBottom=10,this.marginLeft=10,this.marginRight=10,this.value="",this.valid=()=>!0}get options(){return{format:this.format,lineColor:this.lineColor,width:this.width,height:this.height,displayValue:this.displayValue,fontOptions:this.fontOptions,font:this.font,textAlign:this.textAlign,textPosition:this.textPosition,textMargin:this.textMargin,fontSize:this.fontSize,background:this.background,margin:this.margin,marginTop:this.marginTop,marginBottom:this.marginBottom,marginLeft:this.marginLeft,marginRight:this.marginRight,valid:this.valid}}ngOnChanges(){this.createBarcode()}createBarcode(){if(!this.value)return;let o;switch(this.elementType){case"img":o=this.renderer.createElement("img");break;case"canvas":o=this.renderer.createElement("canvas");break;default:o=this.renderer.createElement("svg","svg")}pe(o,this.value,this.options);for(const a of this.bcElement.nativeElement.childNodes)this.renderer.removeChild(this.bcElement.nativeElement,a);this.renderer.appendChild(this.bcElement.nativeElement,o)}}return f.\u0275fac=function(o){return new(o||f)(e.Y36(e.Qsj))},f.\u0275cmp=e.Xpm({type:f,selectors:[["ngx-barcode6"]],viewQuery:function(o,a){if(1&o&&e.Gf(he,7),2&o){let h;e.iGM(h=e.CRH())&&(a.bcElement=h.first)}},inputs:{elementType:["bc-element-type","elementType"],cssClass:["bc-class","cssClass"],format:["bc-format","format"],lineColor:["bc-line-color","lineColor"],width:["bc-width","width"],height:["bc-height","height"],displayValue:["bc-display-value","displayValue"],fontOptions:["bc-font-options","fontOptions"],font:["bc-font","font"],textAlign:["bc-text-align","textAlign"],textPosition:["bc-text-position","textPosition"],textMargin:["bc-text-margin","textMargin"],fontSize:["bc-font-size","fontSize"],background:["bc-background","background"],margin:["bc-margin","margin"],marginTop:["bc-margin-top","marginTop"],marginBottom:["bc-margin-bottom","marginBottom"],marginLeft:["bc-margin-left","marginLeft"],marginRight:["bc-margin-right","marginRight"],value:["bc-value","value"],valid:["bc-valid","valid"]},features:[e.TTD],decls:2,vars:2,consts:[["bcElement",""]],template:function(o,a){1&o&&e._UZ(0,"div",null,0),2&o&&e.Tol(a.cssClass)},encapsulation:2}),f})(),me=(()=>{class f{}return f.\u0275fac=function(o){return new(o||f)},f.\u0275mod=e.oAB({type:f}),f.\u0275inj=e.cJS({imports:[[]]}),f})(),ve=(()=>{class f{transform(o,a){let h=o,b=0;return a&&0!==a&&(b=o*(a/100),h=o+b),h}}return f.\u0275fac=function(o){return new(o||f)},f.\u0275pipe=e.Yjl({name:"taxPipe",type:f,pure:!0}),f})();function _e(f,m){if(1&f&&e._UZ(0,"ngx-barcode6",18),2&f){const o=e.oxw().$implicit,a=e.oxw();e.Q6J("bc-value",null==o?null:o.getCode)("bc-element-type","img")("bc-width",1)("bc-height",null==a.selectedPaperFormat?null:a.selectedPaperFormat.BarcodeHeight)}}function ye(f,m){if(1&f&&(e.TgZ(0,"span",19),e._uU(1),e.qZA()),2&f){const o=e.oxw().$implicit,a=e.oxw();e.Udp("font-size",(null==a.selectedPaperFormat?null:a.selectedPaperFormat.ProductNameFontSize)+"px"),e.xp6(1),e.Oqu(o.getBarcodeTitle)}}function Pe(f,m){if(1&f&&(e.ynx(0),e._uU(1),e.ALo(2,"number"),e.ALo(3,"taxPipe"),e.BQk()),2&f){const o=e.oxw(2).$implicit,a=e.oxw();e.xp6(1),e.AsE(" ",null==a.selectedPaperFormat?null:a.selectedPaperFormat.CurrencySymbol," ",e.lcZ(2,2,e.xi3(3,4,null==o?null:o.getCustomPrice,a.tax))," ")}}function Te(f,m){if(1&f&&(e.ynx(0),e._uU(1),e.ALo(2,"number"),e.ALo(3,"taxPipe"),e.BQk()),2&f){const o=e.oxw(3).$implicit,a=e.oxw();e.xp6(1),e.AsE(" ",null==a.selectedPaperFormat?null:a.selectedPaperFormat.CurrencySymbol," ",e.lcZ(2,2,e.xi3(3,4,null==o?null:o.getUnitPrice,a.tax))," ")}}function Ae(f,m){if(1&f&&e.YNc(0,Te,4,7,"ng-container",20),2&f){e.oxw();const o=e.MAs(6),a=e.oxw(2);e.Q6J("ngIf",(null==a.selectedPaperFormat?null:a.selectedPaperFormat.PriceWithTax)&&a.tax&&0!=a.tax)("ngIfElse",o)}}function be(f,m){if(1&f&&(e._uU(0),e.ALo(1,"number")),2&f){const o=e.oxw(2).$implicit,a=e.oxw();e.AsE(" ",null==a.selectedPaperFormat?null:a.selectedPaperFormat.CurrencySymbol," ",e.lcZ(1,2,null==o?null:o.getUnitPrice)," ")}}function Se(f,m){if(1&f&&(e.TgZ(0,"span",19),e.TgZ(1,"strong"),e.YNc(2,Pe,4,7,"ng-container",20),e.YNc(3,Ae,1,2,"ng-template",null,21,e.W1O),e.YNc(5,be,2,4,"ng-template",null,22,e.W1O),e.qZA(),e.qZA()),2&f){const o=e.MAs(4),a=e.oxw().$implicit,h=e.oxw();e.Udp("font-size",(null==h.selectedPaperFormat?null:h.selectedPaperFormat.ProductNameFontSize)+"px"),e.xp6(2),e.Q6J("ngIf",(null==h.selectedPaperFormat?null:h.selectedPaperFormat.CustomPriceEnabled)&&0!==(null==a?null:a.getCustomPrice)&&void 0!==(null==a?null:a.getCustomPrice))("ngIfElse",o)}}function Oe(f,m){if(1&f&&(e.TgZ(0,"span",19),e._uU(1),e.ALo(2,"slice"),e.qZA()),2&f){const o=e.oxw().$implicit,a=e.oxw();e.Udp("font-size",(null==a.selectedPaperFormat?null:a.selectedPaperFormat.ProductNameFontSize)+"px"),e.xp6(1),e.hij(" ",e.Dn7(2,3,null!=a.selectedPaperFormat&&a.selectedPaperFormat.ProductNamePrefix?(null==a.selectedPaperFormat?null:a.selectedPaperFormat.ProductNamePrefix)+" "+o.getName:o.getName,0,null==a.selectedPaperFormat?null:a.selectedPaperFormat.ProductNameMaxLength)," ")}}function Ce(f,m){if(1&f&&(e.TgZ(0,"li"),e.TgZ(1,"div",13),e.YNc(2,_e,1,4,"ngx-barcode6",14),e.TgZ(3,"div",15),e.YNc(4,ye,2,3,"span",16),e.YNc(5,Se,7,4,"span",16),e.YNc(6,Oe,3,7,"span",16),e.qZA(),e.TgZ(7,"div",17),e._uU(8),e.qZA(),e.qZA(),e.qZA()),2&f){const o=m.index,a=e.oxw();e.Udp("width",(null==a.selectedPaperFormat?null:a.selectedPaperFormat.StickerWidth)+"px")("height",(null==a.selectedPaperFormat?null:a.selectedPaperFormat.StickerHeight)+"px")("margin-right",(o+1)%a.totalStickerPerRow==0?0:(null==a.selectedPaperFormat?null:a.selectedPaperFormat.ColumnSpacing)+"px")("margin-bottom",o>=a.productPreview.length-a.lastIndex?0:(null==a.selectedPaperFormat?null:a.selectedPaperFormat.RowSpacing)+"px"),e.xp6(2),e.Q6J("ngIf",null==a.selectedPaperFormat?null:a.selectedPaperFormat.BarcodeVisible),e.xp6(2),e.Q6J("ngIf",null==a.selectedPaperFormat?null:a.selectedPaperFormat.CodeVisible),e.xp6(1),e.Q6J("ngIf",null==a.selectedPaperFormat?null:a.selectedPaperFormat.PriceVisible),e.xp6(1),e.Q6J("ngIf",null==a.selectedPaperFormat?null:a.selectedPaperFormat.NameVisible),e.xp6(1),e.Udp("font-size",(null==a.selectedPaperFormat?null:a.selectedPaperFormat.ProductNameFontSize)+"px"),e.xp6(1),e.hij(" ",null==a.selectedPaperFormat?null:a.selectedPaperFormat.StoreName," ")}}let Ze=(()=>{class f{constructor(o,a,h,b,E,F){this.dialog=o,this.productStateService=a,this.productService=h,this.barcodeService=b,this.toastService=E,this.authService=F,this.paperFormatOptions=[],this.optionSelected={id:1,name:"Continuous - 3 Column"},this.paperFormats=[],this.totalStickerPerRow=0,this.lastIndex=0,this.destroy$=new l.xQ,this.productPreview=[],this.taxs=[]}ngOnInit(){this.getPaperFormats(),this.checkAuthTax(),this.getVariantSource()}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}checkAuthTax(){this.authService.getRoles().find(h=>"StpE"===h)?(this.getProductTax(),this.authTax=!0):this.authTax=!1}getProductTax(){this.productService.getTax().pipe((0,t.R)(this.destroy$)).subscribe(o=>{o&&(this.taxs=o)})}getPaperFormats(){this.barcodeService.getPaperFormatConfig().pipe((0,t.R)(this.destroy$)).subscribe(o=>{o&&(this.paperFormats=o,this.setSelectedPaperFormat(o[0]),this.initOptionFormat(),this.initOptionSelected(this.selectedPaperFormat))},o=>{console.error(o)})}initOptionFormat(){this.paperFormatOptions=[],this.paperFormats.forEach((o,a)=>{this.paperFormatOptions=[...this.paperFormatOptions,{id:a+1,name:o.Name}]})}initOptionSelected(o){this.optionSelected=this.paperFormatOptions.find(a=>a.name===o.Name)}getVariantSource(){this.productStateService.getState().pipe((0,t.R)(this.destroy$)).subscribe(o=>{this.productPreview=o,this.relayout()})}openSettingModal(){this.dialog.open(fe,{width:"850px",data:{paperFormat:this.selectedPaperFormat,taxs:this.taxs,authTax:this.authTax}}).afterClosed().pipe((0,t.R)(this.destroy$)).subscribe(o=>{o&&this.selectedPaperFormat&&(this.updatePaperFormatSource(o),this.updatePaperFormat(),this.setSelectedPaperFormat(o))})}onSelectPaperFormat(){this.getPaperFormatBarcode()}getPaperFormatBarcode(){let a=this.findPaperFormatByName(this.optionSelected.name);this.setSelectedPaperFormat(a)}updatePaperFormat(){this.barcodeService.updatePaperFormatConfig(this.paperFormats).pipe((0,t.R)(this.destroy$)).subscribe(()=>{this.toastService.success("Success Update Paper Format","Success")},o=>{console.error(o)})}setSelectedPaperFormat(o){this.selectedPaperFormat=o,this.barcodeService.setBarcodeConfigState(o),this.relayout(),this.getPPnVal(o)}findPaperFormatByName(o){return this.paperFormats.find(h=>h.Name==o)}updatePaperFormatSource(o){this.paperFormats=this.paperFormats.map(a=>(o.Name===a.Name&&(a=o),a))}getPPnVal(o){this.tax=o.TaxType?o.TaxType.Rate:null}relayout(){var o,a,h,b,E,F;let j=(null===(o=this.selectedPaperFormat)||void 0===o?void 0:o.PaperWidth)?null===(a=this.selectedPaperFormat)||void 0===a?void 0:a.PaperWidth:0,X=(null===(h=this.selectedPaperFormat)||void 0===h?void 0:h.StickerWidth)?null===(b=this.selectedPaperFormat)||void 0===b?void 0:b.StickerWidth:0,U=(null===(E=this.selectedPaperFormat)||void 0===E?void 0:E.ColumnSpacing)?null===(F=this.selectedPaperFormat)||void 0===F?void 0:F.ColumnSpacing:0,B=Math.floor((j+U)/(X+U));this.totalStickerPerRow=B;let xe=Math.floor(this.productPreview.length/B),ne=this.productPreview.length-xe*B;this.lastIndex=0===ne?B:ne,this.productPreview=this.productPreview.map(V=>{var W;return V.setBarcodeTitle=(null===(W=this.selectedPaperFormat)||void 0===W?void 0:W.DescriptionAsCode)&&V.getDescription?V.getDescription:V.getCode,V})}}return f.\u0275fac=function(o){return new(o||f)(e.Y36(i.uw),e.Y36(A),e.Y36(ee),e.Y36(M),e.Y36(te._W),e.Y36(g.$))},f.\u0275cmp=e.Xpm({type:f,selectors:[["app-print-preview"]],decls:15,vars:10,consts:[[1,"mt-3","d-print-none"],[1,"card","mt-0","mb-0","paper-barcode"],[1,"card-header","d-flex","justify-content-between","align-items-center","border-bottom","pb-5","d-print-none"],[1,"font-weight-light"],["align","right",2,"width","400px"],[1,"d-inline-block","font-weight-light","text-info","font-italic"],["align","left","bindLabel","name","placeholder","Select Column",1,"d-inline-block","ml-4",3,"items","ngModel","clearable","ngModelChange","change"],[1,"btn","btn","btn-outline-secondary","ml-4",3,"click"],["aria-hidden","true",1,"fa","fa-cog"],[1,"card-body","p-0"],[1,"canvas","clearfix"],[1,"barcodes"],[3,"width","height","margin-right","margin-bottom",4,"ngFor","ngForOf"],[1,"position-relative"],[3,"bc-value","bc-element-type","bc-width","bc-height",4,"ngIf"],[2,"margin-top","-4px","line-height","1"],["class","d-block",3,"font-size",4,"ngIf"],[1,"vertical-text"],[3,"bc-value","bc-element-type","bc-width","bc-height"],[1,"d-block"],[4,"ngIf","ngIfElse"],["WITH_TAX",""],["WITHOUT_TAX",""]],template:function(o,a){1&o&&(e._UZ(0,"div",0),e.TgZ(1,"div",1),e.TgZ(2,"div",2),e.TgZ(3,"h1",3),e._uU(4," Print Preview "),e.qZA(),e.TgZ(5,"div",4),e.TgZ(6,"h5",5),e._uU(7,"Paper Source"),e.qZA(),e.TgZ(8,"ng-select",6),e.NdJ("ngModelChange",function(b){return a.optionSelected=b})("change",function(){return a.onSelectPaperFormat()}),e.qZA(),e.TgZ(9,"button",7),e.NdJ("click",function(){return a.openSettingModal()}),e._UZ(10,"i",8),e.qZA(),e.qZA(),e.qZA(),e.TgZ(11,"div",9),e.TgZ(12,"div",10),e.TgZ(13,"ul",11),e.YNc(14,Ce,9,15,"li",12),e.qZA(),e.qZA(),e.qZA(),e.qZA()),2&o&&(e.xp6(8),e.Q6J("items",a.paperFormatOptions)("ngModel",a.optionSelected)("clearable",!1),e.xp6(4),e.Udp("width",(null==a.selectedPaperFormat?null:a.selectedPaperFormat.PaperWidth)+"px")("margin-top",(null==a.selectedPaperFormat?null:a.selectedPaperFormat.MarginTop)+"px")("margin-left",(null==a.selectedPaperFormat?null:a.selectedPaperFormat.MarginLeft)+"px"),e.xp6(2),e.Q6J("ngForOf",a.productPreview))},directives:[d.w9,s.JJ,s.On,_.sg,_.O5,ge],pipes:[_.JJ,ve,_.OU],styles:["ng-select[_ngcontent-%COMP%]{width:50%}.card-header[_ngcontent-%COMP%]{height:65px} div.barcode>img{text-align:center;max-width:100%;border:none;outline:none}@media (max-width: 480px){ div.barcode>img{border:none!important}} div.canvas ul.barcodes li img{display:block;margin:0 auto}.vertical-text[_ngcontent-%COMP%]{transform:rotate(180deg);writing-mode:vertical-rl;position:absolute;right:0px;height:100%;top:8%;text-align:center}"]}),f})(),we=(()=>{class f{constructor(o,a,h){this.variantServiceState=o,this.authService=a,this.queryParamService=h,this.domainName=localStorage.getItem("Domain")}onLogout(){this.variantServiceState.setState([]),this.queryParamService.setState(null),this.authService.logout()}}return f.\u0275fac=function(o){return new(o||f)(e.Y36(A),e.Y36(g.$),e.Y36(T.U))},f.\u0275cmp=e.Xpm({type:f,selectors:[["app-pages"]],decls:20,vars:2,consts:[[1,"container"],[1,"row"],[1,"col-4","d-print-none"],[1,"col-8","p-0"],[1,"d-md-block","d-print-none"],[1,"row","justify-content-between","align-items-center"],[1,"col-auto","d-inline-flex"],[1,"pt-1rem","mr-3"],["target","_blank","href","https://www.dealpos.com"],["src","https://res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png","alt","dealpos-logo",1,"img-fluid"],[1,"col-auto"],[1,"logout","d-print-none"],[3,"href"],[3,"click"],[1,"fa","fa-sign-out-alt"]],template:function(o,a){1&o&&(e.TgZ(0,"div",0),e.TgZ(1,"div",1),e.TgZ(2,"div",2),e._UZ(3,"app-list-products"),e.qZA(),e.TgZ(4,"div",3),e._UZ(5,"app-print-preview"),e.qZA(),e.qZA(),e.qZA(),e.TgZ(6,"footer",4),e.TgZ(7,"div",5),e.TgZ(8,"div",6),e.TgZ(9,"p",7),e._uU(10,"Powered by : "),e.qZA(),e.TgZ(11,"a",8),e._UZ(12,"img",9),e.qZA(),e.qZA(),e.TgZ(13,"div",10),e.TgZ(14,"div",11),e.TgZ(15,"a",12),e._uU(16),e.qZA(),e.TgZ(17,"h5",13),e.NdJ("click",function(){return a.onLogout()}),e._UZ(18,"span",14),e._uU(19,"\xa0Logout"),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA()),2&o&&(e.xp6(15),e.MGl("href","https://",a.domainName,"",e.LSH),e.xp6(1),e.Oqu(a.domainName))},directives:[se,Ze],styles:[".logout[_ngcontent-%COMP%]{position:relative;left:2.5vw;top:-5px;font-size:14px;cursor:pointer}footer[_ngcontent-%COMP%]{position:relative;bottom:0;width:90%;left:3rem;top:-1%}@media (min-height: 720px){footer[_ngcontent-%COMP%]{position:relative;bottom:0;width:90%;left:3rem;top:12%}}@media (min-height: 768px){footer[_ngcontent-%COMP%]{position:relative;bottom:0;width:90%;left:3rem;top:16%}}"]}),f})();var Ee=p(8972);const Me=[{path:"",component:we}];let Re=(()=>{class f{}return f.\u0275fac=function(o){return new(o||f)},f.\u0275mod=e.oAB({type:f}),f.\u0275inj=e.cJS({imports:[[_.ez,Ee.m,k,me,y.Bz.forChild(Me)]]}),f})()}}]);
@@ -14,10 +14,10 @@
14
14
  <link href="https://use.fontawesome.com/releases/v5.0.8/css/all.css" rel="stylesheet">
15
15
  <link rel="manifest" href="manifest.webmanifest">
16
16
  <meta name="theme-color" content="#1976d2">
17
- <style>@charset "UTF-8";body{background-color:#cbcbd226}@media print{body{background-color:#fff}}:root{--blue:#337ab7;--indigo:#6610f2;--purple:#6f42c1;--pink:#e83e8c;--red:#c9302c;--orange:#f6a828;--yellow:#ffc107;--green:#89b03e;--teal:#20c997;--cyan:#17a2b8;--white:#ffffff;--gray:#6c757d;--gray-dark:#343a40;--primary:#337ab7;--secondary:#cccccc;--success:#89b03e;--info:#17a2b8;--warning:#f6a828;--danger:#c9302c;--light:#dddddd;--dark:#4d4d4d;--light-gray:rgba(203, 203, 210, .15);--light-blue:#dfeffc;--breakpoint-xs:0;--breakpoint-sm:576px;--breakpoint-md:768px;--breakpoint-lg:992px;--breakpoint-xl:1200px;--font-family-sans-serif:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-family-monospace:SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace}*,*:before,*:after{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{margin:0;font-family:"Roboto",sans-serif;font-size:.75rem;font-weight:400;line-height:1.5;color:#333;text-align:left;background-color:#fff}@media (max-width: 991px){body{position:relative}}@media print{html,body{height:auto}body{color:#000!important}}@media print{html,body{background-color:#fff}}html,body{height:100%}body{margin:0;font-family:Arial,Helvetica,sans-serif;background-color:#a8a8af26!important}@page{size:auto}</style><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/dealposbarcode@1.2.3/barcode/styles.43c2c34807124c9d.css" media="print" onload="this.media='all'"><noscript><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/dealposbarcode@1.2.3/barcode/styles.43c2c34807124c9d.css"></noscript></head>
17
+ <style>@charset "UTF-8";body{background-color:#cbcbd226}@media print{body{background-color:#fff}}:root{--blue:#337ab7;--indigo:#6610f2;--purple:#6f42c1;--pink:#e83e8c;--red:#c9302c;--orange:#f6a828;--yellow:#ffc107;--green:#89b03e;--teal:#20c997;--cyan:#17a2b8;--white:#ffffff;--gray:#6c757d;--gray-dark:#343a40;--primary:#337ab7;--secondary:#cccccc;--success:#89b03e;--info:#17a2b8;--warning:#f6a828;--danger:#c9302c;--light:#dddddd;--dark:#4d4d4d;--light-gray:rgba(203, 203, 210, .15);--light-blue:#dfeffc;--breakpoint-xs:0;--breakpoint-sm:576px;--breakpoint-md:768px;--breakpoint-lg:992px;--breakpoint-xl:1200px;--font-family-sans-serif:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-family-monospace:SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace}*,*:before,*:after{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{margin:0;font-family:"Roboto",sans-serif;font-size:.75rem;font-weight:400;line-height:1.5;color:#333;text-align:left;background-color:#fff}@media (max-width: 991px){body{position:relative}}@media print{html,body{height:auto}body{color:#000!important}}@media print{html,body{background-color:#fff}}html,body{height:100%}body{margin:0;font-family:Arial,Helvetica,sans-serif;background-color:#a8a8af26!important}@page{size:auto}</style><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/dealposbarcode@1.2.7/barcode/styles.43c2c34807124c9d.css" media="print" onload="this.media='all'"><noscript><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/dealposbarcode@1.2.7/barcode/styles.43c2c34807124c9d.css"></noscript></head>
18
18
  <body>
19
19
  <app-root></app-root>
20
20
  <noscript>Please enable JavaScript to continue using this application.</noscript>
21
- <script src="https://cdn.jsdelivr.net/npm/dealposbarcode@1.2.3/barcode/runtime.2cb1a1a9db75ca3a.js" type="module"></script><script src="https://cdn.jsdelivr.net/npm/dealposbarcode@1.2.3/barcode/polyfills.3eeaafac055ac6b7.js" type="module"></script><script src="https://cdn.jsdelivr.net/npm/dealposbarcode@1.2.3/barcode/main.d12037a4cf139d00.js" type="module"></script>
21
+ <script src="https://cdn.jsdelivr.net/npm/dealposbarcode@1.2.7/barcode/runtime.5b7dd75274ee3309.js" type="module"></script><script src="https://cdn.jsdelivr.net/npm/dealposbarcode@1.2.7/barcode/polyfills.3eeaafac055ac6b7.js" type="module"></script><script src="https://cdn.jsdelivr.net/npm/dealposbarcode@1.2.7/barcode/main.45d5958d1beb31cc.js" type="module"></script>
22
22
 
23
23
  </body></html>