@andy-defer/react-pdf-builder 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/JsBarcode-ImX-0ZxL.js +2648 -0
- package/dist/components/Badge.d.ts +11 -0
- package/dist/components/Barcode.d.ts +24 -0
- package/dist/components/Box.d.ts +13 -0
- package/dist/components/Divider.d.ts +10 -0
- package/dist/components/Flex.d.ts +13 -0
- package/dist/components/Grid.d.ts +10 -0
- package/dist/components/Heading.d.ts +13 -0
- package/dist/components/Image.d.ts +14 -0
- package/dist/components/PDFGenerator.d.ts +19 -0
- package/dist/components/Page.d.ts +8 -0
- package/dist/components/QRCode.d.ts +19 -0
- package/dist/components/Table.d.ts +18 -0
- package/dist/components/TableCell.d.ts +9 -0
- package/dist/components/TableRow.d.ts +8 -0
- package/dist/components/Text.d.ts +13 -0
- package/dist/components/TotalBox.d.ts +13 -0
- package/dist/components/index.d.ts +32 -0
- package/dist/context/PDFContext.d.ts +22 -0
- package/dist/context/index.d.ts +2 -0
- package/dist/hooks/usePDF.d.ts +12 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.es.js +1629 -0
- package/dist/index.umd.js +9 -0
- package/dist/style.css +1 -0
- package/dist/templates/stripe.d.ts +3 -0
- package/dist/types/index.d.ts +46 -0
- package/dist/types/pdf.d.ts +18 -0
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/pdfGenerator.d.ts +15 -0
- package/dist/utils/renderer.d.ts +4 -0
- package/package.json +68 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
(function($,p){typeof exports=="object"&&typeof module<"u"?p(exports,require("react/jsx-runtime"),require("react"),require("html2canvas"),require("jspdf")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","html2canvas","jspdf"],p):($=typeof globalThis<"u"?globalThis:$||self,p($.ReactPDFBuilder={},$["react/jsx-runtime"],$.React,$.html2canvas,$.jspdf))})(this,function($,p,O,Be,At){"use strict";function jr(t,e){for(var n=0;n<e.length;n++){const r=e[n];if(typeof r!="string"&&!Array.isArray(r)){for(const a in r)if(a!=="default"&&!(a in t)){const o=Object.getOwnPropertyDescriptor(r,a);o&&Object.defineProperty(t,a,o.get?o:{enumerable:!0,get:()=>r[a]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}const Mt={format:"a4",orientation:"portrait",scale:2,margin:40},Ct=O.createContext(void 0);function Fr({children:t,initialConfig:e=Mt}){const[n,r]=O.useState({...Mt,...e}),[a,o]=O.useState(!1),[c,s]=O.useState(null),i=f=>{r(u=>({...u,...f}))};return p.jsx(Ct.Provider,{value:{config:n,setConfig:i,loading:a,setLoading:o,error:c,setError:s},children:t})}function Le(){const t=O.useContext(Ct);if(!t)throw new Error("usePDFContext must be used within a PDFProvider");return t}let Ee=class{async generatePage(e,n={}){const{scale:r=2,backgroundColor:a="#ffffff",margin:o=10,format:c="a4",orientation:s="portrait"}=n,i=document.createElement("div");i.style.position="absolute",i.style.left="-9999px",i.style.top="0",i.style.width="794px",i.style.background="#ffffff",i.style.padding="40px",i.appendChild(e.cloneNode(!0)),document.body.appendChild(i);try{await new Promise(b=>setTimeout(b,200));const f=await Be(i,{scale:r,backgroundColor:a,logging:!1,useCORS:!0,allowTaint:!0,width:794,height:i.scrollHeight,windowWidth:794,windowHeight:i.scrollHeight});document.body.removeChild(i);const u=new At({orientation:s,unit:"mm",format:c}),l=u.internal.pageSize.getWidth(),d=u.internal.pageSize.getHeight(),v=l-o*2,h=d-o*2,_=f.toDataURL("image/png"),g=v,S=f.height*g/f.width;if(S>h){const b=h/S,y=g*b,E=o+(v-y)/2;u.addImage(_,"PNG",E,o,y,h)}else{const b=o+(h-S)/2;u.addImage(_,"PNG",o,b,g,S)}return u}catch(f){throw document.body.removeChild(i),new Error(`PDF generation failed: ${f}`)}}async generateMultiplePages(e,n={}){const{filename:r="document.pdf",format:a="a4",orientation:o="portrait",scale:c=2,margin:s=10,backgroundColor:i="#ffffff"}=n,f=new At({orientation:o,unit:"mm",format:a}),u=f.internal.pageSize.getWidth(),l=f.internal.pageSize.getHeight(),d=u-s*2,v=l-s*2;for(let h=0;h<e.length;h++){const _=document.createElement("div");_.style.position="absolute",_.style.left="-9999px",_.style.top="0",_.style.width="794px",_.style.background="#ffffff",_.style.padding="40px",_.appendChild(e[h].cloneNode(!0)),document.body.appendChild(_);try{await new Promise(E=>setTimeout(E,200));const g=await Be(_,{scale:c,backgroundColor:i,logging:!1,useCORS:!0,allowTaint:!0,width:794,height:_.scrollHeight,windowWidth:794,windowHeight:_.scrollHeight});document.body.removeChild(_),h>0&&f.addPage();const S=g.toDataURL("image/png"),b=d,y=g.height*b/g.width;if(y>v){const E=v/y,w=b*E,R=s+(d-w)/2;f.addImage(S,"PNG",R,s,w,v)}else{const E=s+(v-y)/2;f.addImage(S,"PNG",s,E,b,y)}}catch(g){throw document.body.removeChild(_),g}}return f.save(r),f}async toBase64(e,n={}){const{scale:r=2,backgroundColor:a="#ffffff"}=n,o=document.createElement("div");o.innerHTML=e,o.style.position="absolute",o.style.left="-9999px",o.style.top="0",o.style.width="794px",o.style.background="#ffffff",o.style.padding="40px",document.body.appendChild(o);try{await new Promise(s=>setTimeout(s,300));const c=await Be(o,{scale:r,backgroundColor:a,logging:!1,useCORS:!0,allowTaint:!0,width:794,height:o.scrollHeight,windowWidth:794,windowHeight:o.scrollHeight});return document.body.removeChild(o),c.toDataURL("image/png")}catch(c){throw document.body.removeChild(o),new Error(`Base64 conversion failed: ${c}`)}}};const Tt=O.forwardRef(({children:t,format:e="a4",orientation:n="portrait",scale:r=2,margin:a=40,border:o=!0,borderColor:c="#e5e7eb",borderWidth:s=2,borderRadius:i=12,className:f="",style:u={},onGenerate:l,onDownload:d},v)=>{const h=O.useRef(null),{setLoading:_,setError:g}=Le(),S=async(E="document.pdf")=>{try{_(!0),g(null);const w=h.current;if(!w)throw new Error("Container not found");const R=new Ee,z=w.querySelectorAll('[style*="page-break-after: always"]');let L=null;if(z.length>0){const ue=[];z.forEach(ye=>{ue.push(ye)}),L=await R.generateMultiplePages(ue,{filename:E,format:e,orientation:n,scale:r,margin:10})}else L=await R.generatePage(w,{filename:E,format:e,orientation:n,scale:r,margin:10});return d&&d(L),_(!1),L}catch(w){throw g(w instanceof Error?w.message:"Unknown error"),_(!1),w}},b=async()=>{try{_(!0),g(null);const E=h.current;if(!E)throw new Error("Container not found");const w=new Ee,R=E.outerHTML,z=await w.toBase64(R,{scale:r});return l&&l(z),_(!1),z}catch(E){throw g(E instanceof Error?E.message:"Unknown error"),_(!1),E}};O.useImperativeHandle(v,()=>({generatePDF:S,generateBase64:b}));const y=o?{border:`${s}px solid ${c}`,borderRadius:`${i}px`}:{};return p.jsx("div",{ref:h,className:`pdf-container ${f}`,style:{backgroundColor:"#ffffff",width:"794px",padding:`${a}px`,margin:"0 auto",...y,...u},children:t})});Tt.displayName="PDFGenerator";function U({children:t,direction:e="row",gap:n=4,align:r="stretch",justify:a="start",wrap:o=!1,className:c="",style:s={}}){const i=`gap-${n}`,f={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"}[r],u={start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"}[a],l=e==="row"?"flex-row":"flex-col",d=o?"flex-wrap":"";return p.jsx("div",{className:`flex ${l} ${i} ${f} ${u} ${d} ${c}`,style:s,children:t})}function Gr({children:t,columns:e=2,gap:n=4,className:r="",style:a={}}){const o=`grid-cols-${e}`,c=`gap-${n}`;return p.jsx("div",{className:`grid ${o} ${c} ${r}`,style:a,children:t})}function Rt({children:t,padding:e=4,margin:n=0,border:r=!1,rounded:a=!1,shadow:o="none",className:c="",style:s={}}){const i=`p-${e}`,f=n>0?`m-${n}`:"",u=r?"border border-gray-200":"",l=a?"rounded-lg":"",d=o!=="none"?`shadow-${o}`:"";return p.jsx("div",{className:`${i} ${f} ${u} ${l} ${d} ${c}`,style:s,children:t})}function k({children:t,variant:e="body",color:n="primary",align:r="left",bold:a=!1,truncate:o=!1,className:c="",style:s={}}){const i={h1:"text-4xl font-bold",h2:"text-3xl font-bold",h3:"text-2xl font-bold",h4:"text-xl font-bold",h5:"text-lg font-bold",body:"text-base",small:"text-sm"}[e],f={primary:"text-gray-900",secondary:"text-gray-700",muted:"text-gray-500",danger:"text-red-600",success:"text-green-600",warning:"text-yellow-600"}[n],u={left:"text-left",center:"text-center",right:"text-right",justify:"text-justify"}[r],l=a?"font-bold":"",d=o?"truncate":"";return p.jsx("div",{className:`${i} ${f} ${u} ${l} ${d} ${c}`,style:s,children:t})}function Hr({children:t,level:e=1,color:n="primary",className:r="",style:a={}}){const o={1:"text-4xl font-bold",2:"text-3xl font-bold",3:"text-2xl font-bold",4:"text-xl font-bold",5:"text-lg font-bold",6:"text-base font-bold"}[e],c={primary:"text-gray-900",secondary:"text-gray-700",muted:"text-gray-500"}[n],s=`h${e}`;return O.createElement(s,{className:`${o} ${c} ${r}`,style:a},t)}function zr({src:t,alt:e="",width:n,height:r,fit:a="contain",rounded:o=!1,fallback:c,className:s="",style:i={}}){const f={contain:"object-contain",cover:"object-cover",fill:"object-fill",none:"object-none"}[a],u=o==="full"?"rounded-full":o?"rounded-lg":"",[l,d]=O.useState(!1),v=()=>{c&&!l&&d(!0)},h=l&&c?c:t;return p.jsx("img",{src:h,alt:e,width:n,height:r,className:`${f} ${u} ${s}`,style:i,onError:v})}function Ur({columns:t,data:e,bordered:n=!1,striped:r=!1,hoverable:a=!1,className:o="",style:c={}}){const s=n?"border border-gray-200":"",i=r?"even:bg-gray-50":"",f=a?"hover:bg-gray-50":"";return p.jsxs("table",{className:`w-full ${s} ${o}`,style:c,children:[p.jsx("thead",{children:p.jsx("tr",{className:"bg-gray-100",children:t.map(u=>p.jsx("th",{style:{width:u.width},className:`px-4 py-2 text-left text-sm font-semibold text-gray-700 ${u.align==="right"?"text-right":u.align==="center"?"text-center":""}`,children:u.label},u.key))})}),p.jsx("tbody",{children:e.map((u,l)=>p.jsx("tr",{className:`${i} ${f}`,children:t.map(d=>p.jsx("td",{className:`px-4 py-2 text-sm ${d.align==="right"?"text-right":d.align==="center"?"text-center":""}`,children:u[d.key]},d.key))},l))})]})}function Xr({children:t,className:e="",style:n={}}){return p.jsx("tr",{className:e,style:n,children:t})}function Vr({children:t,align:e="left",className:n="",style:r={}}){const a={left:"text-left",center:"text-center",right:"text-right"}[e];return p.jsx("td",{className:`px-4 py-2 ${a} ${n}`,style:r,children:t})}function qr({children:t,variant:e="default",size:n="md",rounded:r=!0,className:a="",style:o={}}){const c={success:"bg-green-100 text-green-800",warning:"bg-yellow-100 text-yellow-800",danger:"bg-red-100 text-red-800",info:"bg-blue-100 text-blue-800",default:"bg-gray-100 text-gray-800"}[e],s={sm:"px-2 py-0.5 text-xs",md:"px-3 py-1 text-sm",lg:"px-4 py-1.5 text-base"}[n],i=r?"rounded-full":"rounded";return p.jsx("span",{className:`inline-block ${c} ${s} ${i} ${a}`,style:o,children:t})}function Qr({variant:t="solid",size:e=2,color:n="gray-300",className:r="",style:a={}}){const o={solid:"border-solid",dashed:"border-dashed",dotted:"border-dotted"}[t],c=`border-${n}`;return p.jsx("hr",{className:`border-${e} ${o} ${c} ${r}`,style:a})}function Wr({subtotal:t,discount:e=0,tax:n=0,shipping:r=0,total:a,currency:o="€",className:c="",style:s={}}){const i=(t-e)*(n/100);return p.jsx(Rt,{className:`bg-gray-50 p-4 rounded-lg ${c}`,style:s,children:p.jsxs(U,{direction:"column",gap:2,children:[p.jsxs(U,{direction:"row",justify:"between",children:[p.jsx(k,{variant:"body",color:"muted",children:"Subtotal"}),p.jsxs(k,{variant:"body",children:[t.toFixed(2)," ",o]})]}),e>0&&p.jsxs(U,{direction:"row",justify:"between",children:[p.jsx(k,{variant:"body",color:"muted",children:"Discount"}),p.jsxs(k,{variant:"body",color:"danger",children:["-",e.toFixed(2)," ",o]})]}),n>0&&p.jsxs(U,{direction:"row",justify:"between",children:[p.jsxs(k,{variant:"body",color:"muted",children:["Tax (",n,"%)"]}),p.jsxs(k,{variant:"body",children:[i.toFixed(2)," ",o]})]}),r>0&&p.jsxs(U,{direction:"row",justify:"between",children:[p.jsx(k,{variant:"body",color:"muted",children:"Shipping"}),p.jsxs(k,{variant:"body",children:[r.toFixed(2)," ",o]})]}),p.jsx("div",{className:"border-t-2 border-gray-300 pt-2 mt-2",children:p.jsxs(U,{direction:"row",justify:"between",children:[p.jsx(k,{variant:"h5",bold:!0,children:"Total"}),p.jsxs(k,{variant:"h5",bold:!0,children:[a.toFixed(2)," ",o]})]})})]})})}var Yr=Object.defineProperty,me=Object.getOwnPropertySymbols,It=Object.prototype.hasOwnProperty,Dt=Object.prototype.propertyIsEnumerable,kt=(t,e,n)=>e in t?Yr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,je=(t,e)=>{for(var n in e||(e={}))It.call(e,n)&&kt(t,n,e[n]);if(me)for(var n of me(e))Dt.call(e,n)&&kt(t,n,e[n]);return t},Fe=(t,e)=>{var n={};for(var r in t)It.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&me)for(var r of me(t))e.indexOf(r)<0&&Dt.call(t,r)&&(n[r]=t[r]);return n};/**
|
|
2
|
+
* @license QR Code generator library (TypeScript)
|
|
3
|
+
* Copyright (c) Project Nayuki.
|
|
4
|
+
* SPDX-License-Identifier: MIT
|
|
5
|
+
*/var X;(t=>{const e=class m{constructor(i,f,u,l){if(this.version=i,this.errorCorrectionLevel=f,this.modules=[],this.isFunction=[],i<m.MIN_VERSION||i>m.MAX_VERSION)throw new RangeError("Version value out of range");if(l<-1||l>7)throw new RangeError("Mask value out of range");this.size=i*4+17;let d=[];for(let h=0;h<this.size;h++)d.push(!1);for(let h=0;h<this.size;h++)this.modules.push(d.slice()),this.isFunction.push(d.slice());this.drawFunctionPatterns();const v=this.addEccAndInterleave(u);if(this.drawCodewords(v),l==-1){let h=1e9;for(let _=0;_<8;_++){this.applyMask(_),this.drawFormatBits(_);const g=this.getPenaltyScore();g<h&&(l=_,h=g),this.applyMask(_)}}a(0<=l&&l<=7),this.mask=l,this.applyMask(l),this.drawFormatBits(l),this.isFunction=[]}static encodeText(i,f){const u=t.QrSegment.makeSegments(i);return m.encodeSegments(u,f)}static encodeBinary(i,f){const u=t.QrSegment.makeBytes(i);return m.encodeSegments([u],f)}static encodeSegments(i,f,u=1,l=40,d=-1,v=!0){if(!(m.MIN_VERSION<=u&&u<=l&&l<=m.MAX_VERSION)||d<-1||d>7)throw new RangeError("Invalid value");let h,_;for(h=u;;h++){const y=m.getNumDataCodewords(h,f)*8,E=c.getTotalBits(i,h);if(E<=y){_=E;break}if(h>=l)throw new RangeError("Data too long")}for(const y of[m.Ecc.MEDIUM,m.Ecc.QUARTILE,m.Ecc.HIGH])v&&_<=m.getNumDataCodewords(h,y)*8&&(f=y);let g=[];for(const y of i){n(y.mode.modeBits,4,g),n(y.numChars,y.mode.numCharCountBits(h),g);for(const E of y.getData())g.push(E)}a(g.length==_);const S=m.getNumDataCodewords(h,f)*8;a(g.length<=S),n(0,Math.min(4,S-g.length),g),n(0,(8-g.length%8)%8,g),a(g.length%8==0);for(let y=236;g.length<S;y^=253)n(y,8,g);let b=[];for(;b.length*8<g.length;)b.push(0);return g.forEach((y,E)=>b[E>>>3]|=y<<7-(E&7)),new m(h,f,b,d)}getModule(i,f){return 0<=i&&i<this.size&&0<=f&&f<this.size&&this.modules[f][i]}getModules(){return this.modules}drawFunctionPatterns(){for(let u=0;u<this.size;u++)this.setFunctionModule(6,u,u%2==0),this.setFunctionModule(u,6,u%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const i=this.getAlignmentPatternPositions(),f=i.length;for(let u=0;u<f;u++)for(let l=0;l<f;l++)u==0&&l==0||u==0&&l==f-1||u==f-1&&l==0||this.drawAlignmentPattern(i[u],i[l]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(i){const f=this.errorCorrectionLevel.formatBits<<3|i;let u=f;for(let d=0;d<10;d++)u=u<<1^(u>>>9)*1335;const l=(f<<10|u)^21522;a(l>>>15==0);for(let d=0;d<=5;d++)this.setFunctionModule(8,d,r(l,d));this.setFunctionModule(8,7,r(l,6)),this.setFunctionModule(8,8,r(l,7)),this.setFunctionModule(7,8,r(l,8));for(let d=9;d<15;d++)this.setFunctionModule(14-d,8,r(l,d));for(let d=0;d<8;d++)this.setFunctionModule(this.size-1-d,8,r(l,d));for(let d=8;d<15;d++)this.setFunctionModule(8,this.size-15+d,r(l,d));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let i=this.version;for(let u=0;u<12;u++)i=i<<1^(i>>>11)*7973;const f=this.version<<12|i;a(f>>>18==0);for(let u=0;u<18;u++){const l=r(f,u),d=this.size-11+u%3,v=Math.floor(u/3);this.setFunctionModule(d,v,l),this.setFunctionModule(v,d,l)}}drawFinderPattern(i,f){for(let u=-4;u<=4;u++)for(let l=-4;l<=4;l++){const d=Math.max(Math.abs(l),Math.abs(u)),v=i+l,h=f+u;0<=v&&v<this.size&&0<=h&&h<this.size&&this.setFunctionModule(v,h,d!=2&&d!=4)}}drawAlignmentPattern(i,f){for(let u=-2;u<=2;u++)for(let l=-2;l<=2;l++)this.setFunctionModule(i+l,f+u,Math.max(Math.abs(l),Math.abs(u))!=1)}setFunctionModule(i,f,u){this.modules[f][i]=u,this.isFunction[f][i]=!0}addEccAndInterleave(i){const f=this.version,u=this.errorCorrectionLevel;if(i.length!=m.getNumDataCodewords(f,u))throw new RangeError("Invalid argument");const l=m.NUM_ERROR_CORRECTION_BLOCKS[u.ordinal][f],d=m.ECC_CODEWORDS_PER_BLOCK[u.ordinal][f],v=Math.floor(m.getNumRawDataModules(f)/8),h=l-v%l,_=Math.floor(v/l);let g=[];const S=m.reedSolomonComputeDivisor(d);for(let y=0,E=0;y<l;y++){let w=i.slice(E,E+_-d+(y<h?0:1));E+=w.length;const R=m.reedSolomonComputeRemainder(w,S);y<h&&w.push(0),g.push(w.concat(R))}let b=[];for(let y=0;y<g[0].length;y++)g.forEach((E,w)=>{(y!=_-d||w>=h)&&b.push(E[y])});return a(b.length==v),b}drawCodewords(i){if(i.length!=Math.floor(m.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let f=0;for(let u=this.size-1;u>=1;u-=2){u==6&&(u=5);for(let l=0;l<this.size;l++)for(let d=0;d<2;d++){const v=u-d,_=(u+1&2)==0?this.size-1-l:l;!this.isFunction[_][v]&&f<i.length*8&&(this.modules[_][v]=r(i[f>>>3],7-(f&7)),f++)}}a(f==i.length*8)}applyMask(i){if(i<0||i>7)throw new RangeError("Mask value out of range");for(let f=0;f<this.size;f++)for(let u=0;u<this.size;u++){let l;switch(i){case 0:l=(u+f)%2==0;break;case 1:l=f%2==0;break;case 2:l=u%3==0;break;case 3:l=(u+f)%3==0;break;case 4:l=(Math.floor(u/3)+Math.floor(f/2))%2==0;break;case 5:l=u*f%2+u*f%3==0;break;case 6:l=(u*f%2+u*f%3)%2==0;break;case 7:l=((u+f)%2+u*f%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[f][u]&&l&&(this.modules[f][u]=!this.modules[f][u])}}getPenaltyScore(){let i=0;for(let d=0;d<this.size;d++){let v=!1,h=0,_=[0,0,0,0,0,0,0];for(let g=0;g<this.size;g++)this.modules[d][g]==v?(h++,h==5?i+=m.PENALTY_N1:h>5&&i++):(this.finderPenaltyAddHistory(h,_),v||(i+=this.finderPenaltyCountPatterns(_)*m.PENALTY_N3),v=this.modules[d][g],h=1);i+=this.finderPenaltyTerminateAndCount(v,h,_)*m.PENALTY_N3}for(let d=0;d<this.size;d++){let v=!1,h=0,_=[0,0,0,0,0,0,0];for(let g=0;g<this.size;g++)this.modules[g][d]==v?(h++,h==5?i+=m.PENALTY_N1:h>5&&i++):(this.finderPenaltyAddHistory(h,_),v||(i+=this.finderPenaltyCountPatterns(_)*m.PENALTY_N3),v=this.modules[g][d],h=1);i+=this.finderPenaltyTerminateAndCount(v,h,_)*m.PENALTY_N3}for(let d=0;d<this.size-1;d++)for(let v=0;v<this.size-1;v++){const h=this.modules[d][v];h==this.modules[d][v+1]&&h==this.modules[d+1][v]&&h==this.modules[d+1][v+1]&&(i+=m.PENALTY_N2)}let f=0;for(const d of this.modules)f=d.reduce((v,h)=>v+(h?1:0),f);const u=this.size*this.size,l=Math.ceil(Math.abs(f*20-u*10)/u)-1;return a(0<=l&&l<=9),i+=l*m.PENALTY_N4,a(0<=i&&i<=2568888),i}getAlignmentPatternPositions(){if(this.version==1)return[];{const i=Math.floor(this.version/7)+2,f=this.version==32?26:Math.ceil((this.version*4+4)/(i*2-2))*2;let u=[6];for(let l=this.size-7;u.length<i;l-=f)u.splice(1,0,l);return u}}static getNumRawDataModules(i){if(i<m.MIN_VERSION||i>m.MAX_VERSION)throw new RangeError("Version number out of range");let f=(16*i+128)*i+64;if(i>=2){const u=Math.floor(i/7)+2;f-=(25*u-10)*u-55,i>=7&&(f-=36)}return a(208<=f&&f<=29648),f}static getNumDataCodewords(i,f){return Math.floor(m.getNumRawDataModules(i)/8)-m.ECC_CODEWORDS_PER_BLOCK[f.ordinal][i]*m.NUM_ERROR_CORRECTION_BLOCKS[f.ordinal][i]}static reedSolomonComputeDivisor(i){if(i<1||i>255)throw new RangeError("Degree out of range");let f=[];for(let l=0;l<i-1;l++)f.push(0);f.push(1);let u=1;for(let l=0;l<i;l++){for(let d=0;d<f.length;d++)f[d]=m.reedSolomonMultiply(f[d],u),d+1<f.length&&(f[d]^=f[d+1]);u=m.reedSolomonMultiply(u,2)}return f}static reedSolomonComputeRemainder(i,f){let u=f.map(l=>0);for(const l of i){const d=l^u.shift();u.push(0),f.forEach((v,h)=>u[h]^=m.reedSolomonMultiply(v,d))}return u}static reedSolomonMultiply(i,f){if(i>>>8||f>>>8)throw new RangeError("Byte out of range");let u=0;for(let l=7;l>=0;l--)u=u<<1^(u>>>7)*285,u^=(f>>>l&1)*i;return a(u>>>8==0),u}finderPenaltyCountPatterns(i){const f=i[1];a(f<=this.size*3);const u=f>0&&i[2]==f&&i[3]==f*3&&i[4]==f&&i[5]==f;return(u&&i[0]>=f*4&&i[6]>=f?1:0)+(u&&i[6]>=f*4&&i[0]>=f?1:0)}finderPenaltyTerminateAndCount(i,f,u){return i&&(this.finderPenaltyAddHistory(f,u),f=0),f+=this.size,this.finderPenaltyAddHistory(f,u),this.finderPenaltyCountPatterns(u)}finderPenaltyAddHistory(i,f){f[0]==0&&(i+=this.size),f.pop(),f.unshift(i)}};e.MIN_VERSION=1,e.MAX_VERSION=40,e.PENALTY_N1=3,e.PENALTY_N2=3,e.PENALTY_N3=40,e.PENALTY_N4=10,e.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],e.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],t.QrCode=e;function n(s,i,f){if(i<0||i>31||s>>>i)throw new RangeError("Value out of range");for(let u=i-1;u>=0;u--)f.push(s>>>u&1)}function r(s,i){return(s>>>i&1)!=0}function a(s){if(!s)throw new Error("Assertion error")}const o=class P{constructor(i,f,u){if(this.mode=i,this.numChars=f,this.bitData=u,f<0)throw new RangeError("Invalid argument");this.bitData=u.slice()}static makeBytes(i){let f=[];for(const u of i)n(u,8,f);return new P(P.Mode.BYTE,i.length,f)}static makeNumeric(i){if(!P.isNumeric(i))throw new RangeError("String contains non-numeric characters");let f=[];for(let u=0;u<i.length;){const l=Math.min(i.length-u,3);n(parseInt(i.substring(u,u+l),10),l*3+1,f),u+=l}return new P(P.Mode.NUMERIC,i.length,f)}static makeAlphanumeric(i){if(!P.isAlphanumeric(i))throw new RangeError("String contains unencodable characters in alphanumeric mode");let f=[],u;for(u=0;u+2<=i.length;u+=2){let l=P.ALPHANUMERIC_CHARSET.indexOf(i.charAt(u))*45;l+=P.ALPHANUMERIC_CHARSET.indexOf(i.charAt(u+1)),n(l,11,f)}return u<i.length&&n(P.ALPHANUMERIC_CHARSET.indexOf(i.charAt(u)),6,f),new P(P.Mode.ALPHANUMERIC,i.length,f)}static makeSegments(i){return i==""?[]:P.isNumeric(i)?[P.makeNumeric(i)]:P.isAlphanumeric(i)?[P.makeAlphanumeric(i)]:[P.makeBytes(P.toUtf8ByteArray(i))]}static makeEci(i){let f=[];if(i<0)throw new RangeError("ECI assignment value out of range");if(i<128)n(i,8,f);else if(i<16384)n(2,2,f),n(i,14,f);else if(i<1e6)n(6,3,f),n(i,21,f);else throw new RangeError("ECI assignment value out of range");return new P(P.Mode.ECI,0,f)}static isNumeric(i){return P.NUMERIC_REGEX.test(i)}static isAlphanumeric(i){return P.ALPHANUMERIC_REGEX.test(i)}getData(){return this.bitData.slice()}static getTotalBits(i,f){let u=0;for(const l of i){const d=l.mode.numCharCountBits(f);if(l.numChars>=1<<d)return 1/0;u+=4+d+l.bitData.length}return u}static toUtf8ByteArray(i){i=encodeURI(i);let f=[];for(let u=0;u<i.length;u++)i.charAt(u)!="%"?f.push(i.charCodeAt(u)):(f.push(parseInt(i.substring(u+1,u+3),16)),u+=2);return f}};o.NUMERIC_REGEX=/^[0-9]*$/,o.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,o.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:";let c=o;t.QrSegment=o})(X||(X={})),(t=>{(e=>{const n=class{constructor(a,o){this.ordinal=a,this.formatBits=o}};n.LOW=new n(0,1),n.MEDIUM=new n(1,0),n.QUARTILE=new n(2,3),n.HIGH=new n(3,2),e.Ecc=n})(t.QrCode||(t.QrCode={}))})(X||(X={})),(t=>{(e=>{const n=class{constructor(a,o){this.modeBits=a,this.numBitsCharCount=o}numCharCountBits(a){return this.numBitsCharCount[Math.floor((a+7)/17)]}};n.NUMERIC=new n(1,[10,12,14]),n.ALPHANUMERIC=new n(2,[9,11,13]),n.BYTE=new n(4,[8,16,16]),n.KANJI=new n(8,[8,10,12]),n.ECI=new n(7,[0,0,0]),e.Mode=n})(t.QrSegment||(t.QrSegment={}))})(X||(X={}));var J=X;/**
|
|
6
|
+
* @license qrcode.react
|
|
7
|
+
* Copyright (c) Paul O'Shannessy
|
|
8
|
+
* SPDX-License-Identifier: ISC
|
|
9
|
+
*/var Jr={L:J.QrCode.Ecc.LOW,M:J.QrCode.Ecc.MEDIUM,Q:J.QrCode.Ecc.QUARTILE,H:J.QrCode.Ecc.HIGH},Nt=128,Bt="L",Lt="#FFFFFF",jt="#000000",Ft=!1,Gt=1,Kr=4,Zr=0,en=.1;function Ht(t,e=0){const n=[];return t.forEach(function(r,a){let o=null;r.forEach(function(c,s){if(!c&&o!==null){n.push(`M${o+e} ${a+e}h${s-o}v1H${o+e}z`),o=null;return}if(s===r.length-1){if(!c)return;o===null?n.push(`M${s+e},${a+e} h1v1H${s+e}z`):n.push(`M${o+e},${a+e} h${s+1-o}v1H${o+e}z`);return}c&&o===null&&(o=s)})}),n.join("")}function zt(t,e){return t.slice().map((n,r)=>r<e.y||r>=e.y+e.h?n:n.map((a,o)=>o<e.x||o>=e.x+e.w?a:!1))}function tn(t,e,n,r){if(r==null)return null;const a=t.length+n*2,o=Math.floor(e*en),c=a/e,s=(r.width||o)*c,i=(r.height||o)*c,f=r.x==null?t.length/2-s/2:r.x*c,u=r.y==null?t.length/2-i/2:r.y*c,l=r.opacity==null?1:r.opacity;let d=null;if(r.excavate){let h=Math.floor(f),_=Math.floor(u),g=Math.ceil(s+f-h),S=Math.ceil(i+u-_);d={x:h,y:_,w:g,h:S}}const v=r.crossOrigin;return{x:f,y:u,h:i,w:s,excavation:d,opacity:l,crossOrigin:v}}function rn(t,e){return e!=null?Math.max(Math.floor(e),0):t?Kr:Zr}function Ut({value:t,level:e,minVersion:n,includeMargin:r,marginSize:a,imageSettings:o,size:c,boostLevel:s}){let i=O.useMemo(()=>{const h=(Array.isArray(t)?t:[t]).reduce((_,g)=>(_.push(...J.QrSegment.makeSegments(g)),_),[]);return J.QrCode.encodeSegments(h,Jr[e],n,void 0,void 0,s)},[t,e,n,s]);const{cells:f,margin:u,numCells:l,calculatedImageSettings:d}=O.useMemo(()=>{let v=i.getModules();const h=rn(r,a),_=v.length+h*2,g=tn(v,c,h,o);return{cells:v,margin:h,numCells:_,calculatedImageSettings:g}},[i,c,o,r,a]);return{qrcode:i,margin:u,cells:f,numCells:l,calculatedImageSettings:d}}var nn=function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0}(),an=O.forwardRef(function(e,n){const r=e,{value:a,size:o=Nt,level:c=Bt,bgColor:s=Lt,fgColor:i=jt,includeMargin:f=Ft,minVersion:u=Gt,boostLevel:l,marginSize:d,imageSettings:v}=r,_=Fe(r,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","marginSize","imageSettings"]),{style:g}=_,S=Fe(_,["style"]),b=v==null?void 0:v.src,y=O.useRef(null),E=O.useRef(null),w=O.useCallback(Y=>{y.current=Y,typeof n=="function"?n(Y):n&&(n.current=Y)},[n]),[R,z]=O.useState(!1),{margin:L,cells:ue,numCells:ye,calculatedImageSettings:N}=Ut({value:a,level:c,minVersion:u,boostLevel:l,includeMargin:f,marginSize:d,imageSettings:v,size:o});O.useEffect(()=>{if(y.current!=null){const Y=y.current,F=Y.getContext("2d");if(!F)return;let kr=ue;const pe=E.current,Nr=N!=null&&pe!==null&&pe.complete&&pe.naturalHeight!==0&&pe.naturalWidth!==0;Nr&&N.excavation!=null&&(kr=zt(ue,N.excavation));const Br=window.devicePixelRatio||1;Y.height=Y.width=o*Br;const Lr=o/ye*Br;F.scale(Lr,Lr),F.fillStyle=s,F.fillRect(0,0,ye,ye),F.fillStyle=i,nn?F.fill(new Path2D(Ht(kr,L))):ue.forEach(function(vl,_l){vl.forEach(function(gl,yl){gl&&F.fillRect(yl+L,_l+L,1,1)})}),N&&(F.globalAlpha=N.opacity),Nr&&F.drawImage(pe,N.x+L,N.y+L,N.w,N.h)}}),O.useEffect(()=>{z(!1)},[b]);const hl=je({height:o,width:o},g);let Dr=null;return b!=null&&(Dr=O.createElement("img",{src:b,key:b,style:{display:"none"},onLoad:()=>{z(!0)},ref:E,crossOrigin:N==null?void 0:N.crossOrigin})),O.createElement(O.Fragment,null,O.createElement("canvas",je({style:hl,height:o,width:o,ref:w,role:"img"},S)),Dr)});an.displayName="QRCodeCanvas";var Xt=O.forwardRef(function(e,n){const r=e,{value:a,size:o=Nt,level:c=Bt,bgColor:s=Lt,fgColor:i=jt,includeMargin:f=Ft,minVersion:u=Gt,boostLevel:l,title:d,marginSize:v,imageSettings:h}=r,_=Fe(r,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","title","marginSize","imageSettings"]),{margin:g,cells:S,numCells:b,calculatedImageSettings:y}=Ut({value:a,level:c,minVersion:u,boostLevel:l,includeMargin:f,marginSize:v,imageSettings:h,size:o});let E=S,w=null;h!=null&&y!=null&&(y.excavation!=null&&(E=zt(S,y.excavation)),w=O.createElement("image",{href:h.src,height:y.h,width:y.w,x:y.x+g,y:y.y+g,preserveAspectRatio:"none",opacity:y.opacity,crossOrigin:y.crossOrigin}));const R=Ht(E,g);return O.createElement("svg",je({height:o,width:o,viewBox:`0 0 ${b} ${b}`,ref:n,role:"img"},_),!!d&&O.createElement("title",null,d),O.createElement("path",{fill:s,d:`M0,0 h${b}v${b}H0z`,shapeRendering:"crispEdges"}),O.createElement("path",{fill:i,d:R,shapeRendering:"crispEdges"}),w)});Xt.displayName="QRCodeSVG";function on({value:t,size:e=128,bgColor:n="#ffffff",fgColor:r="#000000",level:a="M",includeMargin:o=!1,imageSettings:c,className:s="",style:i={}}){return p.jsx("div",{className:s,style:{display:"inline-block",...i},children:p.jsx(Xt,{value:t,size:e,bgColor:n,fgColor:r,level:a,includeMargin:o,imageSettings:c})})}function un({value:t,format:e="CODE128",width:n=2,height:r=100,displayValue:a=!0,fontSize:o=16,font:c="monospace",textAlign:s="center",textPosition:i="bottom",textMargin:f=2,margin:u=10,marginTop:l,marginBottom:d,marginLeft:v,marginRight:h,background:_="#ffffff",lineColor:g="#000000",className:S="",style:b={}}){const y=O.useRef(null);return O.useEffect(()=>{(async()=>{if(y.current)try{y.current.innerHTML="";const w=document.createElementNS("http://www.w3.org/2000/svg","svg");y.current.appendChild(w);const R=(await Promise.resolve().then(()=>sl)).default;R(w,t,{format:e,width:n,height:r,displayValue:a,fontSize:o,font:c,textAlign:s,textPosition:i,textMargin:f,margin:u,marginTop:l,marginBottom:d,marginLeft:v,marginRight:h,background:_,lineColor:g})}catch(w){console.error("Barcode generation failed:",w)}})()},[t,e,n,r,a,o,c,s,i,f,u,l,d,v,h,_,g]),p.jsx("div",{ref:y,className:S,style:{display:"inline-block",...b}})}function fn({children:t,className:e="",style:n={}}){return p.jsx("div",{className:e,style:{width:"100%",padding:"40px",backgroundColor:"#ffffff",pageBreakAfter:"always",breakAfter:"page",...n},children:t})}function ln(){const{config:t,setConfig:e,loading:n,setLoading:r,error:a,setError:o}=Le();return{generate:async(u,l)=>{try{r(!0),o(null);const d=new Ee,v=u.outerHTML,h=await d.toBase64(v,{scale:(l==null?void 0:l.scale)||t.scale,backgroundColor:(l==null?void 0:l.backgroundColor)||"#ffffff"});return r(!1),h}catch(d){const v=d instanceof Error?d.message:"Unknown error";throw o(v),r(!1),d}},download:async(u,l)=>{try{r(!0),o(null);const d=new Ee,v=Array.isArray(u)?u:[u];v.length===1?await d.generatePage(v[0],{filename:(l==null?void 0:l.filename)||"document.pdf",format:(l==null?void 0:l.format)||t.format,orientation:(l==null?void 0:l.orientation)||t.orientation,scale:(l==null?void 0:l.scale)||t.scale,margin:(l==null?void 0:l.margin)||t.margin,backgroundColor:(l==null?void 0:l.backgroundColor)||"#ffffff"}):await d.generateMultiplePages(v,{filename:(l==null?void 0:l.filename)||"document.pdf",format:(l==null?void 0:l.format)||t.format,orientation:(l==null?void 0:l.orientation)||t.orientation,scale:(l==null?void 0:l.scale)||t.scale,margin:(l==null?void 0:l.margin)||t.margin,backgroundColor:(l==null?void 0:l.backgroundColor)||"#ffffff"}),r(!1)}catch(d){const v=d instanceof Error?d.message:"Unknown error";throw o(v),r(!1),d}},preview:(u,l)=>{const d=document.getElementById(l);if(!d)throw new Error(`Container #${l} not found`);d.innerHTML=u.outerHTML},config:t,updateConfig:u=>{e(u)},loading:n,error:a,setError:o}}function cn(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Ge={},be={},A={};Object.defineProperty(A,"__esModule",{value:!0});function dn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var sn=function t(e,n){dn(this,t),this.data=e,this.text=n.text||e,this.options=n};A.default=sn,Object.defineProperty(be,"__esModule",{value:!0}),be.CODE39=void 0;var hn=function(){function t(e,n){for(var r=0;r<n.length;r++){var a=n[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),vn=A,_n=gn(vn);function gn(t){return t&&t.__esModule?t:{default:t}}function yn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function pn(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function En(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var mn=function(t){En(e,t);function e(n,r){return yn(this,e),n=n.toUpperCase(),r.mod43&&(n+=wn($n(n))),pn(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,n,r))}return hn(e,[{key:"encode",value:function(){for(var r=He("*"),a=0;a<this.data.length;a++)r+=He(this.data[a])+"0";return r+=He("*"),{data:r,text:this.text}}},{key:"valid",value:function(){return this.data.search(/^[0-9A-Z\-\.\ \$\/\+\%]+$/)!==-1}}]),e}(_n.default),Vt=["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","-","."," ","$","/","+","%","*"],bn=[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 He(t){return On(qt(t))}function On(t){return bn[t].toString(2)}function wn(t){return Vt[t]}function qt(t){return Vt.indexOf(t)}function $n(t){for(var e=0,n=0;n<t.length;n++)e+=qt(t[n]);return e=e%43,e}be.CODE39=mn;var B={},ze={},K={},x={};Object.defineProperty(x,"__esModule",{value:!0});var fe;function Ue(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Qt=x.SET_A=0,Wt=x.SET_B=1,Yt=x.SET_C=2;x.SHIFT=98;var xn=x.START_A=103,Sn=x.START_B=104,Pn=x.START_C=105;x.MODULO=103,x.STOP=106,x.FNC1=207,x.SET_BY_CODE=(fe={},Ue(fe,xn,Qt),Ue(fe,Sn,Wt),Ue(fe,Pn,Yt),fe),x.SWAP={101:Qt,100:Wt,99:Yt},x.A_START_CHAR="Ð",x.B_START_CHAR="Ñ",x.C_START_CHAR="Ò",x.A_CHARS="[\0-_È-Ï]",x.B_CHARS="[ -È-Ï]",x.C_CHARS="(Ï*[0-9]{2}Ï*)",x.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],Object.defineProperty(K,"__esModule",{value:!0});var An=function(){function t(e,n){for(var r=0;r<n.length;r++){var a=n[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),Mn=A,Cn=Tn(Mn),C=x;function Tn(t){return t&&t.__esModule?t:{default:t}}function Rn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function In(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Dn(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var kn=function(t){Dn(e,t);function e(n,r){Rn(this,e);var a=In(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,n.substring(1),r));return a.bytes=n.split("").map(function(o){return o.charCodeAt(0)}),a}return An(e,[{key:"valid",value:function(){return/^[\x00-\x7F\xC8-\xD3]+$/.test(this.data)}},{key:"encode",value:function(){var r=this.bytes,a=r.shift()-105,o=C.SET_BY_CODE[a];if(o===void 0)throw new RangeError("The encoding does not start with a start character.");this.shouldEncodeAsEan128()===!0&&r.unshift(C.FNC1);var c=e.next(r,1,o);return{text:this.text===this.data?this.text.replace(/[^\x20-\x7E]/g,""):this.text,data:e.getBar(a)+c.result+e.getBar((c.checksum+a)%C.MODULO)+e.getBar(C.STOP)}}},{key:"shouldEncodeAsEan128",value:function(){var r=this.options.ean128||!1;return typeof r=="string"&&(r=r.toLowerCase()==="true"),r}}],[{key:"getBar",value:function(r){return C.BARS[r]?C.BARS[r].toString():""}},{key:"correctIndex",value:function(r,a){if(a===C.SET_A){var o=r.shift();return o<32?o+64:o-32}else return a===C.SET_B?r.shift()-32:(r.shift()-48)*10+r.shift()-48}},{key:"next",value:function(r,a,o){if(!r.length)return{result:"",checksum:0};var c=void 0,s=void 0;if(r[0]>=200){s=r.shift()-105;var i=C.SWAP[s];i!==void 0?c=e.next(r,a+1,i):((o===C.SET_A||o===C.SET_B)&&s===C.SHIFT&&(r[0]=o===C.SET_A?r[0]>95?r[0]-96:r[0]:r[0]<32?r[0]+96:r[0]),c=e.next(r,a+1,o))}else s=e.correctIndex(r,o),c=e.next(r,a+1,o);var f=e.getBar(s),u=s*a;return{result:f+c.result,checksum:u+c.checksum}}}]),e}(Cn.default);K.default=kn;var Xe={};Object.defineProperty(Xe,"__esModule",{value:!0});var G=x,Jt=function(e){return e.match(new RegExp("^"+G.A_CHARS+"*"))[0].length},Kt=function(e){return e.match(new RegExp("^"+G.B_CHARS+"*"))[0].length},Zt=function(e){return e.match(new RegExp("^"+G.C_CHARS+"*"))[0]};function Ve(t,e){var n=e?G.A_CHARS:G.B_CHARS,r=t.match(new RegExp("^("+n+"+?)(([0-9]{2}){2,})([^0-9]|$)"));if(r)return r[1]+"Ì"+er(t.substring(r[1].length));var a=t.match(new RegExp("^"+n+"+"))[0];return a.length===t.length?t:a+String.fromCharCode(e?205:206)+Ve(t.substring(a.length),!e)}function er(t){var e=Zt(t),n=e.length;if(n===t.length)return t;t=t.substring(n);var r=Jt(t)>=Kt(t);return e+String.fromCharCode(r?206:205)+Ve(t,r)}Xe.default=function(t){var e=void 0,n=Zt(t).length;if(n>=2)e=G.C_START_CHAR+er(t);else{var r=Jt(t)>Kt(t);e=(r?G.A_START_CHAR:G.B_START_CHAR)+Ve(t,r)}return e.replace(/[\xCD\xCE]([^])[\xCD\xCE]/,function(a,o){return"Ë"+o})},Object.defineProperty(ze,"__esModule",{value:!0});var Nn=K,Bn=tr(Nn),Ln=Xe,jn=tr(Ln);function tr(t){return t&&t.__esModule?t:{default:t}}function Fn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function qe(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Gn(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var Hn=function(t){Gn(e,t);function e(n,r){if(Fn(this,e),/^[\x00-\x7F\xC8-\xD3]+$/.test(n))var a=qe(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,(0,jn.default)(n),r));else var a=qe(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,n,r));return qe(a)}return e}(Bn.default);ze.default=Hn;var Qe={};Object.defineProperty(Qe,"__esModule",{value:!0});var zn=function(){function t(e,n){for(var r=0;r<n.length;r++){var a=n[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),Un=K,Xn=Vn(Un),rr=x;function Vn(t){return t&&t.__esModule?t:{default:t}}function qn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Qn(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Wn(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var Yn=function(t){Wn(e,t);function e(n,r){return qn(this,e),Qn(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,rr.A_START_CHAR+n,r))}return zn(e,[{key:"valid",value:function(){return new RegExp("^"+rr.A_CHARS+"+$").test(this.data)}}]),e}(Xn.default);Qe.default=Yn;var We={};Object.defineProperty(We,"__esModule",{value:!0});var Jn=function(){function t(e,n){for(var r=0;r<n.length;r++){var a=n[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),Kn=K,Zn=ea(Kn),nr=x;function ea(t){return t&&t.__esModule?t:{default:t}}function ta(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ra(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function na(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var aa=function(t){na(e,t);function e(n,r){return ta(this,e),ra(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,nr.B_START_CHAR+n,r))}return Jn(e,[{key:"valid",value:function(){return new RegExp("^"+nr.B_CHARS+"+$").test(this.data)}}]),e}(Zn.default);We.default=aa;var Ye={};Object.defineProperty(Ye,"__esModule",{value:!0});var oa=function(){function t(e,n){for(var r=0;r<n.length;r++){var a=n[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),ia=K,ua=fa(ia),ar=x;function fa(t){return t&&t.__esModule?t:{default:t}}function la(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ca(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function da(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var sa=function(t){da(e,t);function e(n,r){return la(this,e),ca(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,ar.C_START_CHAR+n,r))}return oa(e,[{key:"valid",value:function(){return new RegExp("^"+ar.C_CHARS+"+$").test(this.data)}}]),e}(ua.default);Ye.default=sa,Object.defineProperty(B,"__esModule",{value:!0}),B.CODE128C=B.CODE128B=B.CODE128A=B.CODE128=void 0;var ha=ze,va=Oe(ha),_a=Qe,ga=Oe(_a),ya=We,pa=Oe(ya),Ea=Ye,ma=Oe(Ea);function Oe(t){return t&&t.__esModule?t:{default:t}}B.CODE128=va.default,B.CODE128A=ga.default,B.CODE128B=pa.default,B.CODE128C=ma.default;var M={},Je={},I={};Object.defineProperty(I,"__esModule",{value:!0}),I.SIDE_BIN="101",I.MIDDLE_BIN="01010",I.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"]},I.EAN2_STRUCTURE=["LL","LG","GL","GG"],I.EAN5_STRUCTURE=["GGLLL","GLGLL","GLLGL","GLLLG","LGGLL","LLGGL","LLLGG","LGLGL","LGLLG","LLGLG"],I.EAN13_STRUCTURE=["LLLLLL","LLGLGG","LLGGLG","LLGGGL","LGLLGG","LGGLLG","LGGGLL","LGLGLG","LGLGGL","LGGLGL"];var we={},V={};Object.defineProperty(V,"__esModule",{value:!0});var ba=I,Oa=function(e,n,r){var a=e.split("").map(function(c,s){return ba.BINARIES[n[s]]}).map(function(c,s){return c?c[e[s]]:""});if(r){var o=e.length-1;a=a.map(function(c,s){return s<o?c+r:c})}return a.join("")};V.default=Oa,Object.defineProperty(we,"__esModule",{value:!0});var wa=function(){function t(e,n){for(var r=0;r<n.length;r++){var a=n[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),Z=I,$a=V,or=ir($a),xa=A,Sa=ir(xa);function ir(t){return t&&t.__esModule?t:{default:t}}function Pa(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Aa(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Ma(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var Ca=function(t){Ma(e,t);function e(n,r){Pa(this,e);var a=Aa(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,n,r));return a.fontSize=!r.flat&&r.fontSize>r.width*10?r.width*10:r.fontSize,a.guardHeight=r.height+a.fontSize/2+r.textMargin,a}return wa(e,[{key:"encode",value:function(){return this.options.flat?this.encodeFlat():this.encodeGuarded()}},{key:"leftText",value:function(r,a){return this.text.substr(r,a)}},{key:"leftEncode",value:function(r,a){return(0,or.default)(r,a)}},{key:"rightText",value:function(r,a){return this.text.substr(r,a)}},{key:"rightEncode",value:function(r,a){return(0,or.default)(r,a)}},{key:"encodeGuarded",value:function(){var r={fontSize:this.fontSize},a={height:this.guardHeight};return[{data:Z.SIDE_BIN,options:a},{data:this.leftEncode(),text:this.leftText(),options:r},{data:Z.MIDDLE_BIN,options:a},{data:this.rightEncode(),text:this.rightText(),options:r},{data:Z.SIDE_BIN,options:a}]}},{key:"encodeFlat",value:function(){var r=[Z.SIDE_BIN,this.leftEncode(),Z.MIDDLE_BIN,this.rightEncode(),Z.SIDE_BIN];return{data:r.join(""),text:this.text}}}]),e}(Sa.default);we.default=Ca,Object.defineProperty(Je,"__esModule",{value:!0});var Ta=function(){function t(e,n){for(var r=0;r<n.length;r++){var a=n[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),le=function t(e,n,r){e===null&&(e=Function.prototype);var a=Object.getOwnPropertyDescriptor(e,n);if(a===void 0){var o=Object.getPrototypeOf(e);return o===null?void 0:t(o,n,r)}else{if("value"in a)return a.value;var c=a.get;return c===void 0?void 0:c.call(r)}},Ra=I,Ia=we,Da=ka(Ia);function ka(t){return t&&t.__esModule?t:{default:t}}function Na(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ba(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function La(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var ur=function(e){var n=e.substr(0,12).split("").map(function(r){return+r}).reduce(function(r,a,o){return o%2?r+a*3:r+a},0);return(10-n%10)%10},ja=function(t){La(e,t);function e(n,r){Na(this,e),n.search(/^[0-9]{12}$/)!==-1&&(n+=ur(n));var a=Ba(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,n,r));return a.lastChar=r.lastChar,a}return Ta(e,[{key:"valid",value:function(){return this.data.search(/^[0-9]{13}$/)!==-1&&+this.data[12]===ur(this.data)}},{key:"leftText",value:function(){return le(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"leftText",this).call(this,1,6)}},{key:"leftEncode",value:function(){var r=this.data.substr(1,6),a=Ra.EAN13_STRUCTURE[this.data[0]];return le(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"leftEncode",this).call(this,r,a)}},{key:"rightText",value:function(){return le(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"rightText",this).call(this,7,6)}},{key:"rightEncode",value:function(){var r=this.data.substr(7,6);return le(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"rightEncode",this).call(this,r,"RRRRRR")}},{key:"encodeGuarded",value:function(){var r=le(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"encodeGuarded",this).call(this);return this.options.displayValue&&(r.unshift({data:"000000000000",text:this.text.substr(0,1),options:{textAlign:"left",fontSize:this.fontSize}}),this.options.lastChar&&(r.push({data:"00"}),r.push({data:"00000",text:this.options.lastChar,options:{fontSize:this.fontSize}}))),r}}]),e}(Da.default);Je.default=ja;var Ke={};Object.defineProperty(Ke,"__esModule",{value:!0});var Fa=function(){function t(e,n){for(var r=0;r<n.length;r++){var a=n[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),$e=function t(e,n,r){e===null&&(e=Function.prototype);var a=Object.getOwnPropertyDescriptor(e,n);if(a===void 0){var o=Object.getPrototypeOf(e);return o===null?void 0:t(o,n,r)}else{if("value"in a)return a.value;var c=a.get;return c===void 0?void 0:c.call(r)}},Ga=we,Ha=za(Ga);function za(t){return t&&t.__esModule?t:{default:t}}function Ua(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Xa(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Va(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var fr=function(e){var n=e.substr(0,7).split("").map(function(r){return+r}).reduce(function(r,a,o){return o%2?r+a:r+a*3},0);return(10-n%10)%10},qa=function(t){Va(e,t);function e(n,r){return Ua(this,e),n.search(/^[0-9]{7}$/)!==-1&&(n+=fr(n)),Xa(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,n,r))}return Fa(e,[{key:"valid",value:function(){return this.data.search(/^[0-9]{8}$/)!==-1&&+this.data[7]===fr(this.data)}},{key:"leftText",value:function(){return $e(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"leftText",this).call(this,0,4)}},{key:"leftEncode",value:function(){var r=this.data.substr(0,4);return $e(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"leftEncode",this).call(this,r,"LLLL")}},{key:"rightText",value:function(){return $e(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"rightText",this).call(this,4,4)}},{key:"rightEncode",value:function(){var r=this.data.substr(4,4);return $e(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"rightEncode",this).call(this,r,"RRRR")}}]),e}(Ha.default);Ke.default=qa;var Ze={};Object.defineProperty(Ze,"__esModule",{value:!0});var Qa=function(){function t(e,n){for(var r=0;r<n.length;r++){var a=n[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),Wa=I,Ya=V,Ja=lr(Ya),Ka=A,Za=lr(Ka);function lr(t){return t&&t.__esModule?t:{default:t}}function eo(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function to(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function ro(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var no=function(e){var n=e.split("").map(function(r){return+r}).reduce(function(r,a,o){return o%2?r+a*9:r+a*3},0);return n%10},ao=function(t){ro(e,t);function e(n,r){return eo(this,e),to(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,n,r))}return Qa(e,[{key:"valid",value:function(){return this.data.search(/^[0-9]{5}$/)!==-1}},{key:"encode",value:function(){var r=Wa.EAN5_STRUCTURE[no(this.data)];return{data:"1011"+(0,Ja.default)(this.data,r,"01"),text:this.text}}}]),e}(Za.default);Ze.default=ao;var et={};Object.defineProperty(et,"__esModule",{value:!0});var oo=function(){function t(e,n){for(var r=0;r<n.length;r++){var a=n[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),io=I,uo=V,fo=cr(uo),lo=A,co=cr(lo);function cr(t){return t&&t.__esModule?t:{default:t}}function so(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ho(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function vo(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var _o=function(t){vo(e,t);function e(n,r){return so(this,e),ho(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,n,r))}return oo(e,[{key:"valid",value:function(){return this.data.search(/^[0-9]{2}$/)!==-1}},{key:"encode",value:function(){var r=io.EAN2_STRUCTURE[parseInt(this.data)%4];return{data:"1011"+(0,fo.default)(this.data,r,"01"),text:this.text}}}]),e}(co.default);et.default=_o;var ce={};Object.defineProperty(ce,"__esModule",{value:!0});var go=function(){function t(e,n){for(var r=0;r<n.length;r++){var a=n[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();ce.checksum=tt;var yo=V,ee=dr(yo),po=A,Eo=dr(po);function dr(t){return t&&t.__esModule?t:{default:t}}function mo(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function bo(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Oo(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var wo=function(t){Oo(e,t);function e(n,r){mo(this,e),n.search(/^[0-9]{11}$/)!==-1&&(n+=tt(n));var a=bo(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,n,r));return a.displayValue=r.displayValue,r.fontSize>r.width*10?a.fontSize=r.width*10:a.fontSize=r.fontSize,a.guardHeight=r.height+a.fontSize/2+r.textMargin,a}return go(e,[{key:"valid",value:function(){return this.data.search(/^[0-9]{12}$/)!==-1&&this.data[11]==tt(this.data)}},{key:"encode",value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:"flatEncoding",value:function(){var r="";return r+="101",r+=(0,ee.default)(this.data.substr(0,6),"LLLLLL"),r+="01010",r+=(0,ee.default)(this.data.substr(6,6),"RRRRRR"),r+="101",{data:r,text:this.text}}},{key:"guardedEncoding",value:function(){var r=[];return this.displayValue&&r.push({data:"00000000",text:this.text.substr(0,1),options:{textAlign:"left",fontSize:this.fontSize}}),r.push({data:"101"+(0,ee.default)(this.data[0],"L"),options:{height:this.guardHeight}}),r.push({data:(0,ee.default)(this.data.substr(1,5),"LLLLL"),text:this.text.substr(1,5),options:{fontSize:this.fontSize}}),r.push({data:"01010",options:{height:this.guardHeight}}),r.push({data:(0,ee.default)(this.data.substr(6,5),"RRRRR"),text:this.text.substr(6,5),options:{fontSize:this.fontSize}}),r.push({data:(0,ee.default)(this.data[11],"R")+"101",options:{height:this.guardHeight}}),this.displayValue&&r.push({data:"00000000",text:this.text.substr(11,1),options:{textAlign:"right",fontSize:this.fontSize}}),r}}]),e}(Eo.default);function tt(t){var e=0,n;for(n=1;n<11;n+=2)e+=parseInt(t[n]);for(n=0;n<11;n+=2)e+=parseInt(t[n])*3;return(10-e%10)%10}ce.default=wo;var rt={};Object.defineProperty(rt,"__esModule",{value:!0});var $o=function(){function t(e,n){for(var r=0;r<n.length;r++){var a=n[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),xo=V,So=sr(xo),Po=A,Ao=sr(Po),Mo=ce;function sr(t){return t&&t.__esModule?t:{default:t}}function Co(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function nt(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function To(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var Ro=["XX00000XXX","XX10000XXX","XX20000XXX","XXX00000XX","XXXX00000X","XXXXX00005","XXXXX00006","XXXXX00007","XXXXX00008","XXXXX00009"],Io=[["EEEOOO","OOOEEE"],["EEOEOO","OOEOEE"],["EEOOEO","OOEEOE"],["EEOOOE","OOEEEO"],["EOEEOO","OEOOEE"],["EOOEEO","OEEOOE"],["EOOOEE","OEEEOO"],["EOEOEO","OEOEOE"],["EOEOOE","OEOEEO"],["EOOEOE","OEEOEO"]],Do=function(t){To(e,t);function e(n,r){Co(this,e);var a=nt(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,n,r));if(a.isValid=!1,n.search(/^[0-9]{6}$/)!==-1)a.middleDigits=n,a.upcA=hr(n,"0"),a.text=r.text||""+a.upcA[0]+n+a.upcA[a.upcA.length-1],a.isValid=!0;else if(n.search(/^[01][0-9]{7}$/)!==-1)if(a.middleDigits=n.substring(1,n.length-1),a.upcA=hr(a.middleDigits,n[0]),a.upcA[a.upcA.length-1]===n[n.length-1])a.isValid=!0;else return nt(a);else return nt(a);return a.displayValue=r.displayValue,r.fontSize>r.width*10?a.fontSize=r.width*10:a.fontSize=r.fontSize,a.guardHeight=r.height+a.fontSize/2+r.textMargin,a}return $o(e,[{key:"valid",value:function(){return this.isValid}},{key:"encode",value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:"flatEncoding",value:function(){var r="";return r+="101",r+=this.encodeMiddleDigits(),r+="010101",{data:r,text:this.text}}},{key:"guardedEncoding",value:function(){var r=[];return this.displayValue&&r.push({data:"00000000",text:this.text[0],options:{textAlign:"left",fontSize:this.fontSize}}),r.push({data:"101",options:{height:this.guardHeight}}),r.push({data:this.encodeMiddleDigits(),text:this.text.substring(1,7),options:{fontSize:this.fontSize}}),r.push({data:"010101",options:{height:this.guardHeight}}),this.displayValue&&r.push({data:"00000000",text:this.text[7],options:{textAlign:"right",fontSize:this.fontSize}}),r}},{key:"encodeMiddleDigits",value:function(){var r=this.upcA[0],a=this.upcA[this.upcA.length-1],o=Io[parseInt(a)][parseInt(r)];return(0,So.default)(this.middleDigits,o)}}]),e}(Ao.default);function hr(t,e){for(var n=parseInt(t[t.length-1]),r=Ro[n],a="",o=0,c=0;c<r.length;c++){var s=r[c];s==="X"?a+=t[o++]:a+=s}return a=""+e+a,""+a+(0,Mo.checksum)(a)}rt.default=Do,Object.defineProperty(M,"__esModule",{value:!0}),M.UPCE=M.UPC=M.EAN2=M.EAN5=M.EAN8=M.EAN13=void 0;var ko=Je,No=te(ko),Bo=Ke,Lo=te(Bo),jo=Ze,Fo=te(jo),Go=et,Ho=te(Go),zo=ce,Uo=te(zo),Xo=rt,Vo=te(Xo);function te(t){return t&&t.__esModule?t:{default:t}}M.EAN13=No.default,M.EAN8=Lo.default,M.EAN5=Fo.default,M.EAN2=Ho.default,M.UPC=Uo.default,M.UPCE=Vo.default;var re={},xe={},de={};Object.defineProperty(de,"__esModule",{value:!0}),de.START_BIN="1010",de.END_BIN="11101",de.BINARIES=["00110","10001","01001","11000","00101","10100","01100","00011","10010","01010"],Object.defineProperty(xe,"__esModule",{value:!0});var qo=function(){function t(e,n){for(var r=0;r<n.length;r++){var a=n[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),Se=de,Qo=A,Wo=Yo(Qo);function Yo(t){return t&&t.__esModule?t:{default:t}}function Jo(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ko(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Zo(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var ei=function(t){Zo(e,t);function e(){return Jo(this,e),Ko(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return qo(e,[{key:"valid",value:function(){return this.data.search(/^([0-9]{2})+$/)!==-1}},{key:"encode",value:function(){var r=this,a=this.data.match(/.{2}/g).map(function(o){return r.encodePair(o)}).join("");return{data:Se.START_BIN+a+Se.END_BIN,text:this.text}}},{key:"encodePair",value:function(r){var a=Se.BINARIES[r[1]];return Se.BINARIES[r[0]].split("").map(function(o,c){return(o==="1"?"111":"1")+(a[c]==="1"?"000":"0")}).join("")}}]),e}(Wo.default);xe.default=ei;var at={};Object.defineProperty(at,"__esModule",{value:!0});var ti=function(){function t(e,n){for(var r=0;r<n.length;r++){var a=n[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),ri=xe,ni=ai(ri);function ai(t){return t&&t.__esModule?t:{default:t}}function oi(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ii(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function ui(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var vr=function(e){var n=e.substr(0,13).split("").map(function(r){return parseInt(r,10)}).reduce(function(r,a,o){return r+a*(3-o%2*2)},0);return Math.ceil(n/10)*10-n},fi=function(t){ui(e,t);function e(n,r){return oi(this,e),n.search(/^[0-9]{13}$/)!==-1&&(n+=vr(n)),ii(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,n,r))}return ti(e,[{key:"valid",value:function(){return this.data.search(/^[0-9]{14}$/)!==-1&&+this.data[13]===vr(this.data)}}]),e}(ni.default);at.default=fi,Object.defineProperty(re,"__esModule",{value:!0}),re.ITF14=re.ITF=void 0;var li=xe,ci=_r(li),di=at,si=_r(di);function _r(t){return t&&t.__esModule?t:{default:t}}re.ITF=ci.default,re.ITF14=si.default;var D={},q={};Object.defineProperty(q,"__esModule",{value:!0});var hi=function(){function t(e,n){for(var r=0;r<n.length;r++){var a=n[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),vi=A,_i=gi(vi);function gi(t){return t&&t.__esModule?t:{default:t}}function yi(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function pi(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Ei(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var mi=function(t){Ei(e,t);function e(n,r){return yi(this,e),pi(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,n,r))}return hi(e,[{key:"encode",value:function(){for(var r="110",a=0;a<this.data.length;a++){var o=parseInt(this.data[a]),c=o.toString(2);c=bi(c,4-c.length);for(var s=0;s<c.length;s++)r+=c[s]=="0"?"100":"110"}return r+="1001",{data:r,text:this.text}}},{key:"valid",value:function(){return this.data.search(/^[0-9]+$/)!==-1}}]),e}(_i.default);function bi(t,e){for(var n=0;n<e;n++)t="0"+t;return t}q.default=mi;var ot={},Q={};Object.defineProperty(Q,"__esModule",{value:!0}),Q.mod10=Oi,Q.mod11=wi;function Oi(t){for(var e=0,n=0;n<t.length;n++){var r=parseInt(t[n]);(n+t.length)%2===0?e+=r:e+=r*2%10+Math.floor(r*2/10)}return(10-e%10)%10}function wi(t){for(var e=0,n=[2,3,4,5,6,7],r=0;r<t.length;r++){var a=parseInt(t[t.length-1-r]);e+=n[r%n.length]*a}return(11-e%11)%11}Object.defineProperty(ot,"__esModule",{value:!0});var $i=q,xi=Pi($i),Si=Q;function Pi(t){return t&&t.__esModule?t:{default:t}}function Ai(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Mi(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Ci(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var Ti=function(t){Ci(e,t);function e(n,r){return Ai(this,e),Mi(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,n+(0,Si.mod10)(n),r))}return e}(xi.default);ot.default=Ti;var it={};Object.defineProperty(it,"__esModule",{value:!0});var Ri=q,Ii=ki(Ri),Di=Q;function ki(t){return t&&t.__esModule?t:{default:t}}function Ni(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Bi(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Li(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var ji=function(t){Li(e,t);function e(n,r){return Ni(this,e),Bi(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,n+(0,Di.mod11)(n),r))}return e}(Ii.default);it.default=ji;var ut={};Object.defineProperty(ut,"__esModule",{value:!0});var Fi=q,Gi=Hi(Fi),gr=Q;function Hi(t){return t&&t.__esModule?t:{default:t}}function zi(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ui(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Xi(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var Vi=function(t){Xi(e,t);function e(n,r){return zi(this,e),n+=(0,gr.mod10)(n),n+=(0,gr.mod10)(n),Ui(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,n,r))}return e}(Gi.default);ut.default=Vi;var ft={};Object.defineProperty(ft,"__esModule",{value:!0});var qi=q,Qi=Wi(qi),yr=Q;function Wi(t){return t&&t.__esModule?t:{default:t}}function Yi(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ji(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Ki(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var Zi=function(t){Ki(e,t);function e(n,r){return Yi(this,e),n+=(0,yr.mod11)(n),n+=(0,yr.mod10)(n),Ji(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,n,r))}return e}(Qi.default);ft.default=Zi,Object.defineProperty(D,"__esModule",{value:!0}),D.MSI1110=D.MSI1010=D.MSI11=D.MSI10=D.MSI=void 0;var eu=q,tu=se(eu),ru=ot,nu=se(ru),au=it,ou=se(au),iu=ut,uu=se(iu),fu=ft,lu=se(fu);function se(t){return t&&t.__esModule?t:{default:t}}D.MSI=tu.default,D.MSI10=nu.default,D.MSI11=ou.default,D.MSI1010=uu.default,D.MSI1110=lu.default;var Pe={};Object.defineProperty(Pe,"__esModule",{value:!0}),Pe.pharmacode=void 0;var cu=function(){function t(e,n){for(var r=0;r<n.length;r++){var a=n[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),du=A,su=hu(du);function hu(t){return t&&t.__esModule?t:{default:t}}function vu(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _u(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function gu(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var yu=function(t){gu(e,t);function e(n,r){vu(this,e);var a=_u(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,n,r));return a.number=parseInt(n,10),a}return cu(e,[{key:"encode",value:function(){for(var r=this.number,a="";!isNaN(r)&&r!=0;)r%2===0?(a="11100"+a,r=(r-2)/2):(a="100"+a,r=(r-1)/2);return a=a.slice(0,-2),{data:a,text:this.text}}},{key:"valid",value:function(){return this.number>=3&&this.number<=131070}}]),e}(su.default);Pe.pharmacode=yu;var Ae={};Object.defineProperty(Ae,"__esModule",{value:!0}),Ae.codabar=void 0;var pu=function(){function t(e,n){for(var r=0;r<n.length;r++){var a=n[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),Eu=A,mu=bu(Eu);function bu(t){return t&&t.__esModule?t:{default:t}}function Ou(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function wu(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function $u(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var xu=function(t){$u(e,t);function e(n,r){Ou(this,e),n.search(/^[0-9\-\$\:\.\+\/]+$/)===0&&(n="A"+n+"A");var a=wu(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,n.toUpperCase(),r));return a.text=a.options.text||a.text.replace(/[A-D]/g,""),a}return pu(e,[{key:"valid",value:function(){return this.data.search(/^[A-D][0-9\-\$\:\.\+\/]+[A-D]$/)!==-1}},{key:"encode",value:function(){for(var r=[],a=this.getEncodings(),o=0;o<this.data.length;o++)r.push(a[this.data.charAt(o)]),o!==this.data.length-1&&r.push("0");return{text:this.text,data:r.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"}}}]),e}(mu.default);Ae.codabar=xu;var ne={},Me={},he={};Object.defineProperty(he,"__esModule",{value:!0}),he.SYMBOLS=["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","-","."," ","$","/","+","%","($)","(%)","(/)","(+)","ÿ"],he.BINARIES=["100010100","101001000","101000100","101000010","100101000","100100100","100100010","101010000","100010010","100001010","110101000","110100100","110100010","110010100","110010010","110001010","101101000","101100100","101100010","100110100","100011010","101011000","101001100","101000110","100101100","100010110","110110100","110110010","110101100","110100110","110010110","110011010","101101100","101100110","100110110","100111010","100101110","111010100","111010010","111001010","101101110","101110110","110101110","100100110","111011010","111010110","100110010","101011110"],he.MULTI_SYMBOLS={"\0":["(%)","U"],"":["($)","A"],"":["($)","B"],"":["($)","C"],"":["($)","D"],"":["($)","E"],"":["($)","F"],"\x07":["($)","G"],"\b":["($)","H"]," ":["($)","I"],"\n":["($)","J"],"\v":["($)","K"],"\f":["($)","L"],"\r":["($)","M"],"":["($)","N"],"":["($)","O"],"":["($)","P"],"":["($)","Q"],"":["($)","R"],"":["($)","S"],"":["($)","T"],"":["($)","U"],"":["($)","V"],"":["($)","W"],"":["($)","X"],"":["($)","Y"],"":["($)","Z"],"\x1B":["(%)","A"],"":["(%)","B"],"":["(%)","C"],"":["(%)","D"],"":["(%)","E"],"!":["(/)","A"],'"':["(/)","B"],"#":["(/)","C"],"&":["(/)","F"],"'":["(/)","G"],"(":["(/)","H"],")":["(/)","I"],"*":["(/)","J"],",":["(/)","L"],":":["(/)","Z"],";":["(%)","F"],"<":["(%)","G"],"=":["(%)","H"],">":["(%)","I"],"?":["(%)","J"],"@":["(%)","V"],"[":["(%)","K"],"\\":["(%)","L"],"]":["(%)","M"],"^":["(%)","N"],_:["(%)","O"],"`":["(%)","W"],a:["(+)","A"],b:["(+)","B"],c:["(+)","C"],d:["(+)","D"],e:["(+)","E"],f:["(+)","F"],g:["(+)","G"],h:["(+)","H"],i:["(+)","I"],j:["(+)","J"],k:["(+)","K"],l:["(+)","L"],m:["(+)","M"],n:["(+)","N"],o:["(+)","O"],p:["(+)","P"],q:["(+)","Q"],r:["(+)","R"],s:["(+)","S"],t:["(+)","T"],u:["(+)","U"],v:["(+)","V"],w:["(+)","W"],x:["(+)","X"],y:["(+)","Y"],z:["(+)","Z"],"{":["(%)","P"],"|":["(%)","Q"],"}":["(%)","R"],"~":["(%)","S"],"":["(%)","T"]},Object.defineProperty(Me,"__esModule",{value:!0});var Su=function(){function t(e,n){for(var r=0;r<n.length;r++){var a=n[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),Ce=he,Pu=A,Au=Mu(Pu);function Mu(t){return t&&t.__esModule?t:{default:t}}function Cu(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Tu(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Ru(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var Iu=function(t){Ru(e,t);function e(n,r){return Cu(this,e),Tu(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,n,r))}return Su(e,[{key:"valid",value:function(){return/^[0-9A-Z\-. $/+%]+$/.test(this.data)}},{key:"encode",value:function(){var r=this.data.split("").flatMap(function(s){return Ce.MULTI_SYMBOLS[s]||s}),a=r.map(function(s){return e.getEncoding(s)}).join(""),o=e.checksum(r,20),c=e.checksum(r.concat(o),15);return{text:this.text,data:e.getEncoding("ÿ")+a+e.getEncoding(o)+e.getEncoding(c)+e.getEncoding("ÿ")+"1"}}}],[{key:"getEncoding",value:function(r){return Ce.BINARIES[e.symbolValue(r)]}},{key:"getSymbol",value:function(r){return Ce.SYMBOLS[r]}},{key:"symbolValue",value:function(r){return Ce.SYMBOLS.indexOf(r)}},{key:"checksum",value:function(r,a){var o=r.slice().reverse().reduce(function(c,s,i){var f=i%a+1;return c+e.symbolValue(s)*f},0);return e.getSymbol(o%47)}}]),e}(Au.default);Me.default=Iu;var lt={};Object.defineProperty(lt,"__esModule",{value:!0});var Du=function(){function t(e,n){for(var r=0;r<n.length;r++){var a=n[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),ku=Me,Nu=Bu(ku);function Bu(t){return t&&t.__esModule?t:{default:t}}function Lu(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ju(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Fu(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var Gu=function(t){Fu(e,t);function e(n,r){return Lu(this,e),ju(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,n,r))}return Du(e,[{key:"valid",value:function(){return/^[\x00-\x7f]+$/.test(this.data)}}]),e}(Nu.default);lt.default=Gu,Object.defineProperty(ne,"__esModule",{value:!0}),ne.CODE93FullASCII=ne.CODE93=void 0;var Hu=Me,zu=pr(Hu),Uu=lt,Xu=pr(Uu);function pr(t){return t&&t.__esModule?t:{default:t}}ne.CODE93=zu.default,ne.CODE93FullASCII=Xu.default;var Te={};Object.defineProperty(Te,"__esModule",{value:!0}),Te.GenericBarcode=void 0;var Vu=function(){function t(e,n){for(var r=0;r<n.length;r++){var a=n[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),qu=A,Qu=Wu(qu);function Wu(t){return t&&t.__esModule?t:{default:t}}function Yu(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ju(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Ku(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var Zu=function(t){Ku(e,t);function e(n,r){return Yu(this,e),Ju(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,n,r))}return Vu(e,[{key:"encode",value:function(){return{data:"10101010101010101010101010101010101010101",text:this.text}}},{key:"valid",value:function(){return!0}}]),e}(Qu.default);Te.GenericBarcode=Zu,Object.defineProperty(Ge,"__esModule",{value:!0});var ef=be,Re=B,ae=M,Er=re,ve=D,tf=Pe,rf=Ae,mr=ne,nf=Te;Ge.default={CODE39:ef.CODE39,CODE128:Re.CODE128,CODE128A:Re.CODE128A,CODE128B:Re.CODE128B,CODE128C:Re.CODE128C,EAN13:ae.EAN13,EAN8:ae.EAN8,EAN5:ae.EAN5,EAN2:ae.EAN2,UPC:ae.UPC,UPCE:ae.UPCE,ITF14:Er.ITF14,ITF:Er.ITF,MSI:ve.MSI,MSI10:ve.MSI10,MSI11:ve.MSI11,MSI1010:ve.MSI1010,MSI1110:ve.MSI1110,pharmacode:tf.pharmacode,codabar:rf.codabar,CODE93:mr.CODE93,CODE93FullASCII:mr.CODE93FullASCII,GenericBarcode:nf.GenericBarcode};var oe={};Object.defineProperty(oe,"__esModule",{value:!0});var af=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t};oe.default=function(t,e){return af({},t,e)};var ct={};Object.defineProperty(ct,"__esModule",{value:!0}),ct.default=of;function of(t){var e=[];function n(r){if(Array.isArray(r))for(var a=0;a<r.length;a++)n(r[a]);else r.text=r.text||"",r.data=r.data||"",e.push(r)}return n(t),e}var dt={};Object.defineProperty(dt,"__esModule",{value:!0}),dt.default=uf;function uf(t){return t.marginTop=t.marginTop||t.margin,t.marginBottom=t.marginBottom||t.margin,t.marginRight=t.marginRight||t.margin,t.marginLeft=t.marginLeft||t.margin,t}var st={},ht={},Ie={};Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.default=ff;function ff(t){var e=["width","height","textMargin","fontSize","margin","marginTop","marginBottom","marginLeft","marginRight"];for(var n in e)e.hasOwnProperty(n)&&(n=e[n],typeof t[n]=="string"&&(t[n]=parseInt(t[n],10)));return typeof t.displayValue=="string"&&(t.displayValue=t.displayValue!="false"),t}var De={};Object.defineProperty(De,"__esModule",{value:!0});var lf={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(){}};De.default=lf,Object.defineProperty(ht,"__esModule",{value:!0});var cf=Ie,df=Or(cf),sf=De,br=Or(sf);function Or(t){return t&&t.__esModule?t:{default:t}}function hf(t){var e={};for(var n in br.default)br.default.hasOwnProperty(n)&&(t.hasAttribute("jsbarcode-"+n.toLowerCase())&&(e[n]=t.getAttribute("jsbarcode-"+n.toLowerCase())),t.hasAttribute("data-"+n.toLowerCase())&&(e[n]=t.getAttribute("data-"+n.toLowerCase())));return e.value=t.getAttribute("jsbarcode-value")||t.getAttribute("data-value"),e=(0,df.default)(e),e}ht.default=hf;var vt={},_t={},T={};Object.defineProperty(T,"__esModule",{value:!0}),T.getTotalWidthOfEncodings=T.calculateEncodingAttributes=T.getBarcodePadding=T.getEncodingHeight=T.getMaximumHeightOfEncodings=void 0;var vf=oe,_f=gf(vf);function gf(t){return t&&t.__esModule?t:{default:t}}function wr(t,e){return e.height+(e.displayValue&&t.text.length>0?e.fontSize+e.textMargin:0)+e.marginTop+e.marginBottom}function $r(t,e,n){if(n.displayValue&&e<t){if(n.textAlign=="center")return Math.floor((t-e)/2);if(n.textAlign=="left")return 0;if(n.textAlign=="right")return Math.floor(t-e)}return 0}function yf(t,e,n){for(var r=0;r<t.length;r++){var a=t[r],o=(0,_f.default)(e,a.options),c;o.displayValue?c=mf(a.text,o,n):c=0;var s=a.data.length*o.width;a.width=Math.ceil(Math.max(c,s)),a.height=wr(a,o),a.barcodePadding=$r(c,s,o)}}function pf(t){for(var e=0,n=0;n<t.length;n++)e+=t[n].width;return e}function Ef(t){for(var e=0,n=0;n<t.length;n++)t[n].height>e&&(e=t[n].height);return e}function mf(t,e,n){var r;if(n)r=n;else if(typeof document<"u")r=document.createElement("canvas").getContext("2d");else return 0;r.font=e.fontOptions+" "+e.fontSize+"px "+e.font;var a=r.measureText(t);if(!a)return 0;var o=a.width;return o}T.getMaximumHeightOfEncodings=Ef,T.getEncodingHeight=wr,T.getBarcodePadding=$r,T.calculateEncodingAttributes=yf,T.getTotalWidthOfEncodings=pf,Object.defineProperty(_t,"__esModule",{value:!0});var bf=function(){function t(e,n){for(var r=0;r<n.length;r++){var a=n[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),Of=oe,wf=$f(Of),gt=T;function $f(t){return t&&t.__esModule?t:{default:t}}function xf(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var Sf=function(){function t(e,n,r){xf(this,t),this.canvas=e,this.encodings=n,this.options=r}return bf(t,[{key:"render",value:function(){if(!this.canvas.getContext)throw new Error("The browser does not support canvas.");this.prepareCanvas();for(var n=0;n<this.encodings.length;n++){var r=(0,wf.default)(this.options,this.encodings[n].options);this.drawCanvasBarcode(r,this.encodings[n]),this.drawCanvasText(r,this.encodings[n]),this.moveCanvasDrawing(this.encodings[n])}this.restoreCanvas()}},{key:"prepareCanvas",value:function(){var n=this.canvas.getContext("2d");n.save(),(0,gt.calculateEncodingAttributes)(this.encodings,this.options,n);var r=(0,gt.getTotalWidthOfEncodings)(this.encodings),a=(0,gt.getMaximumHeightOfEncodings)(this.encodings);this.canvas.width=r+this.options.marginLeft+this.options.marginRight,this.canvas.height=a,n.clearRect(0,0,this.canvas.width,this.canvas.height),this.options.background&&(n.fillStyle=this.options.background,n.fillRect(0,0,this.canvas.width,this.canvas.height)),n.translate(this.options.marginLeft,0)}},{key:"drawCanvasBarcode",value:function(n,r){var a=this.canvas.getContext("2d"),o=r.data,c;n.textPosition=="top"?c=n.marginTop+n.fontSize+n.textMargin:c=n.marginTop,a.fillStyle=n.lineColor;for(var s=0;s<o.length;s++){var i=s*n.width+r.barcodePadding;o[s]==="1"?a.fillRect(i,c,n.width,n.height):o[s]&&a.fillRect(i,c,n.width,n.height*o[s])}}},{key:"drawCanvasText",value:function(n,r){var a=this.canvas.getContext("2d"),o=n.fontOptions+" "+n.fontSize+"px "+n.font;if(n.displayValue){var c,s;n.textPosition=="top"?s=n.marginTop+n.fontSize-n.textMargin:s=n.height+n.textMargin+n.marginTop+n.fontSize,a.font=o,n.textAlign=="left"||r.barcodePadding>0?(c=0,a.textAlign="left"):n.textAlign=="right"?(c=r.width-1,a.textAlign="right"):(c=r.width/2,a.textAlign="center"),a.fillText(r.text,c,s)}}},{key:"moveCanvasDrawing",value:function(n){var r=this.canvas.getContext("2d");r.translate(n.width,0)}},{key:"restoreCanvas",value:function(){var n=this.canvas.getContext("2d");n.restore()}}]),t}();_t.default=Sf;var yt={};Object.defineProperty(yt,"__esModule",{value:!0});var Pf=function(){function t(e,n){for(var r=0;r<n.length;r++){var a=n[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),Af=oe,Mf=Cf(Af),pt=T;function Cf(t){return t&&t.__esModule?t:{default:t}}function Tf(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var ke="http://www.w3.org/2000/svg",Rf=function(){function t(e,n,r){Tf(this,t),this.svg=e,this.encodings=n,this.options=r,this.document=r.xmlDocument||document}return Pf(t,[{key:"render",value:function(){var n=this.options.marginLeft;this.prepareSVG();for(var r=0;r<this.encodings.length;r++){var a=this.encodings[r],o=(0,Mf.default)(this.options,a.options),c=this.createGroup(n,o.marginTop,this.svg);this.setGroupOptions(c,o),this.drawSvgBarcode(c,o,a),this.drawSVGText(c,o,a),n+=a.width}}},{key:"prepareSVG",value:function(){for(;this.svg.firstChild;)this.svg.removeChild(this.svg.firstChild);(0,pt.calculateEncodingAttributes)(this.encodings,this.options);var n=(0,pt.getTotalWidthOfEncodings)(this.encodings),r=(0,pt.getMaximumHeightOfEncodings)(this.encodings),a=n+this.options.marginLeft+this.options.marginRight;this.setSvgAttributes(a,r),this.options.background&&this.drawRect(0,0,a,r,this.svg).setAttribute("fill",this.options.background)}},{key:"drawSvgBarcode",value:function(n,r,a){var o=a.data,c;r.textPosition=="top"?c=r.fontSize+r.textMargin:c=0;for(var s=0,i=0,f=0;f<o.length;f++)i=f*r.width+a.barcodePadding,o[f]==="1"?s++:s>0&&(this.drawRect(i-r.width*s,c,r.width*s,r.height,n),s=0);s>0&&this.drawRect(i-r.width*(s-1),c,r.width*s,r.height,n)}},{key:"drawSVGText",value:function(n,r,a){var o=this.document.createElementNS(ke,"text");if(r.displayValue){var c,s;o.setAttribute("font-family",r.font),o.setAttribute("font-size",r.fontSize),r.fontOptions.includes("bold")&&o.setAttribute("font-weight","bold"),r.fontOptions.includes("italic")&&o.setAttribute("font-style","italic"),r.textPosition=="top"?s=r.fontSize-r.textMargin:s=r.height+r.textMargin+r.fontSize,r.textAlign=="left"||a.barcodePadding>0?(c=0,o.setAttribute("text-anchor","start")):r.textAlign=="right"?(c=a.width-1,o.setAttribute("text-anchor","end")):(c=a.width/2,o.setAttribute("text-anchor","middle")),o.setAttribute("x",c),o.setAttribute("y",s),o.appendChild(this.document.createTextNode(a.text)),n.appendChild(o)}}},{key:"setSvgAttributes",value:function(n,r){var a=this.svg;a.setAttribute("width",n+"px"),a.setAttribute("height",r+"px"),a.setAttribute("x","0px"),a.setAttribute("y","0px"),a.setAttribute("viewBox","0 0 "+n+" "+r),a.setAttribute("xmlns",ke),a.setAttribute("version","1.1")}},{key:"createGroup",value:function(n,r,a){var o=this.document.createElementNS(ke,"g");return o.setAttribute("transform","translate("+n+", "+r+")"),a.appendChild(o),o}},{key:"setGroupOptions",value:function(n,r){n.setAttribute("fill",r.lineColor)}},{key:"drawRect",value:function(n,r,a,o,c){var s=this.document.createElementNS(ke,"rect");return s.setAttribute("x",n),s.setAttribute("y",r),s.setAttribute("width",a),s.setAttribute("height",o),c.appendChild(s),s}}]),t}();yt.default=Rf;var Et={};Object.defineProperty(Et,"__esModule",{value:!0});var If=function(){function t(e,n){for(var r=0;r<n.length;r++){var a=n[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();function Df(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var kf=function(){function t(e,n,r){Df(this,t),this.object=e,this.encodings=n,this.options=r}return If(t,[{key:"render",value:function(){this.object.encodings=this.encodings}}]),t}();Et.default=kf,Object.defineProperty(vt,"__esModule",{value:!0});var Nf=_t,Bf=mt(Nf),Lf=yt,jf=mt(Lf),Ff=Et,Gf=mt(Ff);function mt(t){return t&&t.__esModule?t:{default:t}}vt.default={CanvasRenderer:Bf.default,SVGRenderer:jf.default,ObjectRenderer:Gf.default};var ie={};Object.defineProperty(ie,"__esModule",{value:!0});function bt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ot(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function wt(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var Hf=function(t){wt(e,t);function e(n,r){bt(this,e);var a=Ot(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return a.name="InvalidInputException",a.symbology=n,a.input=r,a.message='"'+a.input+'" is not a valid input for '+a.symbology,a}return e}(Error),zf=function(t){wt(e,t);function e(){bt(this,e);var n=Ot(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return n.name="InvalidElementException",n.message="Not supported type to render on",n}return e}(Error),Uf=function(t){wt(e,t);function e(){bt(this,e);var n=Ot(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return n.name="NoElementException",n.message="No element to render on.",n}return e}(Error);ie.InvalidInputException=Hf,ie.InvalidElementException=zf,ie.NoElementException=Uf,Object.defineProperty(st,"__esModule",{value:!0});var Xf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vf=ht,$t=xr(Vf),qf=vt,_e=xr(qf),Qf=ie;function xr(t){return t&&t.__esModule?t:{default:t}}function xt(t){if(typeof t=="string")return Wf(t);if(Array.isArray(t)){for(var e=[],n=0;n<t.length;n++)e.push(xt(t[n]));return e}else{if(typeof HTMLCanvasElement<"u"&&t instanceof HTMLImageElement)return Yf(t);if(t&&t.nodeName&&t.nodeName.toLowerCase()==="svg"||typeof SVGElement<"u"&&t instanceof SVGElement)return{element:t,options:(0,$t.default)(t),renderer:_e.default.SVGRenderer};if(typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement)return{element:t,options:(0,$t.default)(t),renderer:_e.default.CanvasRenderer};if(t&&t.getContext)return{element:t,renderer:_e.default.CanvasRenderer};if(t&&(typeof t>"u"?"undefined":Xf(t))==="object"&&!t.nodeName)return{element:t,renderer:_e.default.ObjectRenderer};throw new Qf.InvalidElementException}}function Wf(t){var e=document.querySelectorAll(t);if(e.length!==0){for(var n=[],r=0;r<e.length;r++)n.push(xt(e[r]));return n}}function Yf(t){var e=document.createElement("canvas");return{element:e,options:(0,$t.default)(t),renderer:_e.default.CanvasRenderer,afterRender:function(){t.setAttribute("src",e.toDataURL())}}}st.default=xt;var St={};Object.defineProperty(St,"__esModule",{value:!0});var Jf=function(){function t(e,n){for(var r=0;r<n.length;r++){var a=n[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();function Kf(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var Zf=function(){function t(e){Kf(this,t),this.api=e}return Jf(t,[{key:"handleCatch",value:function(n){if(n.name==="InvalidInputException")if(this.api._options.valid!==this.api._defaults.valid)this.api._options.valid(!1);else throw n.message;else throw n;this.api.render=function(){}}},{key:"wrapBarcodeCall",value:function(n){try{var r=n.apply(void 0,arguments);return this.api._options.valid(!0),r}catch(a){return this.handleCatch(a),this.api}}}]),t}();St.default=Zf;var el=Ge,W=H(el),tl=oe,ge=H(tl),rl=ct,Sr=H(rl),nl=dt,Pr=H(nl),al=st,ol=H(al),il=Ie,ul=H(il),fl=St,ll=H(fl),Ar=ie,cl=De,Mr=H(cl);function H(t){return t&&t.__esModule?t:{default:t}}var j=function(){},Ne=function(e,n,r){var a=new j;if(typeof e>"u")throw Error("No element to render on was provided.");return a._renderProperties=(0,ol.default)(e),a._encodings=[],a._options=Mr.default,a._errorHandler=new ll.default(a),typeof n<"u"&&(r=r||{},r.format||(r.format=Rr()),a.options(r)[r.format](n,r).render()),a};Ne.getModule=function(t){return W.default[t]};for(var Cr in W.default)W.default.hasOwnProperty(Cr)&&dl(W.default,Cr);function dl(t,e){j.prototype[e]=j.prototype[e.toUpperCase()]=j.prototype[e.toLowerCase()]=function(n,r){var a=this;return a._errorHandler.wrapBarcodeCall(function(){r.text=typeof r.text>"u"?void 0:""+r.text;var o=(0,ge.default)(a._options,r);o=(0,ul.default)(o);var c=t[e],s=Tr(n,c,o);return a._encodings.push(s),a})}}function Tr(t,e,n){t=""+t;var r=new e(t,n);if(!r.valid())throw new Ar.InvalidInputException(r.constructor.name,t);var a=r.encode();a=(0,Sr.default)(a);for(var o=0;o<a.length;o++)a[o].options=(0,ge.default)(n,a[o].options);return a}function Rr(){return W.default.CODE128?"CODE128":Object.keys(W.default)[0]}j.prototype.options=function(t){return this._options=(0,ge.default)(this._options,t),this},j.prototype.blank=function(t){var e=new Array(t+1).join("0");return this._encodings.push({data:e}),this},j.prototype.init=function(){if(this._renderProperties){Array.isArray(this._renderProperties)||(this._renderProperties=[this._renderProperties]);var t;for(var e in this._renderProperties){t=this._renderProperties[e];var n=(0,ge.default)(this._options,t.options);n.format=="auto"&&(n.format=Rr()),this._errorHandler.wrapBarcodeCall(function(){var r=n.value,a=W.default[n.format.toUpperCase()],o=Tr(r,a,n);Pt(t,o,n)})}}},j.prototype.render=function(){if(!this._renderProperties)throw new Ar.NoElementException;if(Array.isArray(this._renderProperties))for(var t=0;t<this._renderProperties.length;t++)Pt(this._renderProperties[t],this._encodings,this._options);else Pt(this._renderProperties,this._encodings,this._options);return this},j.prototype._defaults=Mr.default;function Pt(t,e,n){e=(0,Sr.default)(e);for(var r=0;r<e.length;r++)e[r].options=(0,ge.default)(n,e[r].options),(0,Pr.default)(e[r].options);(0,Pr.default)(n);var a=t.renderer,o=new a(t.element,e,n);o.render(),t.afterRender&&t.afterRender()}typeof window<"u"&&(window.JsBarcode=Ne),typeof jQuery<"u"&&(jQuery.fn.JsBarcode=function(t,e){var n=[];return jQuery(this).each(function(){n.push(this)}),Ne(n,t,e)});var Ir=Ne;const sl=jr({__proto__:null,default:cn(Ir)},[Ir]);$.Badge=qr,$.Barcode=un,$.Box=Rt,$.Divider=Qr,$.Flex=U,$.Grid=Gr,$.Heading=Hr,$.Image=zr,$.PDFGenerator=Tt,$.PDFProvider=Fr,$.Page=fn,$.QRCode=on,$.Table=Ur,$.TableCell=Vr,$.TableRow=Xr,$.Text=k,$.TotalBox=Wr,$.usePDF=ln,$.usePDFContext=Le,Object.defineProperty($,Symbol.toStringTag,{value:"Module"})});
|
package/dist/style.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}*{margin:0;padding:0;box-sizing:border-box}body{font-family:Helvetica,Arial,sans-serif;background:#f8f9fa;color:#1a1a2e}.\!container{width:100%!important}.container{width:100%}@media (min-width: 640px){.\!container{max-width:640px!important}.container{max-width:640px}}@media (min-width: 768px){.\!container{max-width:768px!important}.container{max-width:768px}}@media (min-width: 1024px){.\!container{max-width:1024px!important}.container{max-width:1024px}}@media (min-width: 1280px){.\!container{max-width:1280px!important}.container{max-width:1280px}}@media (min-width: 1536px){.\!container{max-width:1536px!important}.container{max-width:1536px}}.pdf-container{margin-left:auto;margin-right:auto;max-width:56rem;border-radius:.75rem;--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1));padding:2rem;--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.collapse{visibility:collapse}.absolute{position:absolute}.my-6{margin-top:1.5rem;margin-bottom:1.5rem}.my-8{margin-top:2rem;margin-bottom:2rem}.mb-4{margin-bottom:1rem}.mb-8{margin-bottom:2rem}.mt-2{margin-top:.5rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.inline-block{display:inline-block}.flex{display:flex}.table{display:table}.grid{display:grid}.w-64{width:16rem}.w-full{width:100%}.border-collapse{border-collapse:collapse}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-stretch{align-items:stretch}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-around{justify-content:space-around}.justify-evenly{justify-content:space-evenly}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.border{border-width:1px}.border-t-2{border-top-width:2px}.border-solid{border-style:solid}.border-dashed{border-style:dashed}.border-dotted{border-style:dotted}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1))}.bg-blue-100{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1))}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity, 1))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.bg-green-100{--tw-bg-opacity: 1;background-color:rgb(220 252 231 / var(--tw-bg-opacity, 1))}.bg-red-100{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity, 1))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-yellow-100{--tw-bg-opacity: 1;background-color:rgb(254 249 195 / var(--tw-bg-opacity, 1))}.object-contain{-o-object-fit:contain;object-fit:contain}.object-cover{-o-object-fit:cover;object-fit:cover}.object-fill{-o-object-fit:fill;object-fit:fill}.object-none{-o-object-fit:none;object-fit:none}.p-4{padding:1rem}.p-8{padding:2rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.pt-2{padding-top:.5rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.text-justify{text-align:justify}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.text-blue-800{--tw-text-opacity: 1;color:rgb(30 64 175 / var(--tw-text-opacity, 1))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.text-gray-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity, 1))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity, 1))}.text-green-800{--tw-text-opacity: 1;color:rgb(22 101 52 / var(--tw-text-opacity, 1))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.text-red-800{--tw-text-opacity: 1;color:rgb(153 27 27 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-yellow-600{--tw-text-opacity: 1;color:rgb(202 138 4 / var(--tw-text-opacity, 1))}.text-yellow-800{--tw-text-opacity: 1;color:rgb(133 77 14 / var(--tw-text-opacity, 1))}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.even\:bg-gray-50:nth-child(2n){--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.hover\:bg-blue-700:hover{--tw-bg-opacity: 1;background-color:rgb(29 78 216 / var(--tw-bg-opacity, 1))}.hover\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export interface Company {
|
|
2
|
+
name: string;
|
|
3
|
+
address: string;
|
|
4
|
+
city: string;
|
|
5
|
+
siret: string;
|
|
6
|
+
email: string;
|
|
7
|
+
phone: string;
|
|
8
|
+
logo?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface Client {
|
|
11
|
+
name: string;
|
|
12
|
+
company: string;
|
|
13
|
+
address: string;
|
|
14
|
+
city: string;
|
|
15
|
+
email: string;
|
|
16
|
+
}
|
|
17
|
+
export interface LineItem {
|
|
18
|
+
description: string;
|
|
19
|
+
quantity: number;
|
|
20
|
+
unitPrice: number;
|
|
21
|
+
}
|
|
22
|
+
export interface InvoiceData {
|
|
23
|
+
number: string;
|
|
24
|
+
date: string;
|
|
25
|
+
dueDate: string;
|
|
26
|
+
status: 'paid' | 'pending' | 'overdue';
|
|
27
|
+
company: Company;
|
|
28
|
+
client: Client;
|
|
29
|
+
items: LineItem[];
|
|
30
|
+
discount: number;
|
|
31
|
+
tax: number;
|
|
32
|
+
}
|
|
33
|
+
export interface PDFOptions {
|
|
34
|
+
filename?: string;
|
|
35
|
+
scale?: number;
|
|
36
|
+
backgroundColor?: string;
|
|
37
|
+
margin?: number;
|
|
38
|
+
format?: 'a4' | 'a3' | 'letter' | 'legal' | number[];
|
|
39
|
+
orientation?: 'portrait' | 'landscape';
|
|
40
|
+
}
|
|
41
|
+
export interface TemplateOptions {
|
|
42
|
+
showLogo?: boolean;
|
|
43
|
+
showPaymentInfo?: boolean;
|
|
44
|
+
primaryColor?: string;
|
|
45
|
+
secondaryColor?: string;
|
|
46
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface PDFConfig {
|
|
2
|
+
format: 'a4' | 'a3' | 'letter' | 'legal';
|
|
3
|
+
orientation: 'portrait' | 'landscape';
|
|
4
|
+
scale: number;
|
|
5
|
+
margin: number;
|
|
6
|
+
}
|
|
7
|
+
export interface PDFOptions {
|
|
8
|
+
filename?: string;
|
|
9
|
+
scale?: number;
|
|
10
|
+
backgroundColor?: string;
|
|
11
|
+
margin?: number;
|
|
12
|
+
format?: 'a4' | 'a3' | 'letter' | 'legal' | number[];
|
|
13
|
+
orientation?: 'portrait' | 'landscape';
|
|
14
|
+
}
|
|
15
|
+
export interface PDFGeneratorRef {
|
|
16
|
+
generatePDF: (filename?: string) => Promise<any>;
|
|
17
|
+
generateBase64: () => Promise<string>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { default as jsPDF } from 'jspdf';
|
|
2
|
+
|
|
3
|
+
export interface PDFOptions {
|
|
4
|
+
filename?: string;
|
|
5
|
+
scale?: number;
|
|
6
|
+
backgroundColor?: string;
|
|
7
|
+
margin?: number;
|
|
8
|
+
format?: 'a4' | 'a3' | 'letter' | 'legal' | number[];
|
|
9
|
+
orientation?: 'portrait' | 'landscape';
|
|
10
|
+
}
|
|
11
|
+
export declare class PDFGenerator {
|
|
12
|
+
generatePage(element: HTMLElement, options?: PDFOptions): Promise<jsPDF>;
|
|
13
|
+
generateMultiplePages(elements: HTMLElement[], options?: PDFOptions): Promise<jsPDF>;
|
|
14
|
+
toBase64(htmlContent: string, options?: PDFOptions): Promise<string>;
|
|
15
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@andy-defer/react-pdf-builder",
|
|
3
|
+
"version": "1.1.0",
|
|
4
|
+
"description": "Build PDF documents with React and Tailwind CSS",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.umd.js",
|
|
7
|
+
"module": "./dist/index.es.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"import": "./dist/index.es.js",
|
|
12
|
+
"require": "./dist/index.umd.js",
|
|
13
|
+
"types": "./dist/index.d.ts"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"files": [
|
|
17
|
+
"dist"
|
|
18
|
+
],
|
|
19
|
+
"scripts": {
|
|
20
|
+
"dev": "vite",
|
|
21
|
+
"build": "tsc && vite build",
|
|
22
|
+
"preview": "vite preview",
|
|
23
|
+
"type-check": "tsc --noEmit"
|
|
24
|
+
},
|
|
25
|
+
"peerDependencies": {
|
|
26
|
+
"react": "^18.2.0",
|
|
27
|
+
"react-dom": "^18.2.0",
|
|
28
|
+
"tailwindcss": "^3.0.0"
|
|
29
|
+
},
|
|
30
|
+
"dependencies": {
|
|
31
|
+
"class-variance-authority": "^0.7.0",
|
|
32
|
+
"html2canvas": "^1.4.1",
|
|
33
|
+
"jsbarcode": "^3.12.3",
|
|
34
|
+
"jspdf": "^2.5.1",
|
|
35
|
+
"pdf-lib": "^1.17.1",
|
|
36
|
+
"qrcode.react": "^4.2.0"
|
|
37
|
+
},
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"@types/jsbarcode": "^3.11.4",
|
|
40
|
+
"@types/node": "^20.19.43",
|
|
41
|
+
"@types/qrcode.react": "^1.0.5",
|
|
42
|
+
"@types/react": "^18.2.0",
|
|
43
|
+
"@types/react-dom": "^18.2.0",
|
|
44
|
+
"autoprefixer": "^10.4.16",
|
|
45
|
+
"postcss": "^8.4.32",
|
|
46
|
+
"react": "^18.2.0",
|
|
47
|
+
"react-dom": "^18.2.0",
|
|
48
|
+
"tailwindcss": "^3.4.0",
|
|
49
|
+
"typescript": "^5.3.0",
|
|
50
|
+
"vite": "^5.0.0",
|
|
51
|
+
"vite-plugin-dts": "^3.6.0"
|
|
52
|
+
},
|
|
53
|
+
"keywords": [
|
|
54
|
+
"pdf",
|
|
55
|
+
"react",
|
|
56
|
+
"tailwind",
|
|
57
|
+
"invoice",
|
|
58
|
+
"generator",
|
|
59
|
+
"html2canvas",
|
|
60
|
+
"jspdf"
|
|
61
|
+
],
|
|
62
|
+
"author": "Andy Defer",
|
|
63
|
+
"license": "MIT",
|
|
64
|
+
"repository": {
|
|
65
|
+
"type": "git",
|
|
66
|
+
"url": "https://github.com/andy-defer/react-pdf-builder.git"
|
|
67
|
+
}
|
|
68
|
+
}
|