chunk-X7P65S4T.js 138 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578
  1. import {
  2. __commonJS
  3. } from "./chunk-2LSFTFF7.js";
  4. // node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/barcodes/Barcode.js
  5. var require_Barcode = __commonJS({
  6. "node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/barcodes/Barcode.js"(exports) {
  7. "use strict";
  8. Object.defineProperty(exports, "__esModule", {
  9. value: true
  10. });
  11. function _classCallCheck(instance, Constructor) {
  12. if (!(instance instanceof Constructor)) {
  13. throw new TypeError("Cannot call a class as a function");
  14. }
  15. }
  16. var Barcode = function Barcode2(data, options) {
  17. _classCallCheck(this, Barcode2);
  18. this.data = data;
  19. this.text = options.text || data;
  20. this.options = options;
  21. };
  22. exports.default = Barcode;
  23. }
  24. });
  25. // node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/barcodes/CODE39/index.js
  26. var require_CODE39 = __commonJS({
  27. "node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/barcodes/CODE39/index.js"(exports) {
  28. "use strict";
  29. Object.defineProperty(exports, "__esModule", {
  30. value: true
  31. });
  32. exports.CODE39 = void 0;
  33. var _createClass = function() {
  34. function defineProperties(target, props) {
  35. for (var i = 0; i < props.length; i++) {
  36. var descriptor = props[i];
  37. descriptor.enumerable = descriptor.enumerable || false;
  38. descriptor.configurable = true;
  39. if ("value" in descriptor)
  40. descriptor.writable = true;
  41. Object.defineProperty(target, descriptor.key, descriptor);
  42. }
  43. }
  44. return function(Constructor, protoProps, staticProps) {
  45. if (protoProps)
  46. defineProperties(Constructor.prototype, protoProps);
  47. if (staticProps)
  48. defineProperties(Constructor, staticProps);
  49. return Constructor;
  50. };
  51. }();
  52. var _Barcode2 = require_Barcode();
  53. var _Barcode3 = _interopRequireDefault(_Barcode2);
  54. function _interopRequireDefault(obj) {
  55. return obj && obj.__esModule ? obj : { default: obj };
  56. }
  57. function _classCallCheck(instance, Constructor) {
  58. if (!(instance instanceof Constructor)) {
  59. throw new TypeError("Cannot call a class as a function");
  60. }
  61. }
  62. function _possibleConstructorReturn(self, call) {
  63. if (!self) {
  64. throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  65. }
  66. return call && (typeof call === "object" || typeof call === "function") ? call : self;
  67. }
  68. function _inherits(subClass, superClass) {
  69. if (typeof superClass !== "function" && superClass !== null) {
  70. throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
  71. }
  72. subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });
  73. if (superClass)
  74. Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
  75. }
  76. var CODE39 = function(_Barcode) {
  77. _inherits(CODE392, _Barcode);
  78. function CODE392(data, options) {
  79. _classCallCheck(this, CODE392);
  80. data = data.toUpperCase();
  81. if (options.mod43) {
  82. data += getCharacter(mod43checksum(data));
  83. }
  84. return _possibleConstructorReturn(this, (CODE392.__proto__ || Object.getPrototypeOf(CODE392)).call(this, data, options));
  85. }
  86. _createClass(CODE392, [{
  87. key: "encode",
  88. value: function encode() {
  89. var result = getEncoding("*");
  90. for (var i = 0; i < this.data.length; i++) {
  91. result += getEncoding(this.data[i]) + "0";
  92. }
  93. result += getEncoding("*");
  94. return {
  95. data: result,
  96. text: this.text
  97. };
  98. }
  99. }, {
  100. key: "valid",
  101. value: function valid() {
  102. return this.data.search(/^[0-9A-Z\-\.\ \$\/\+\%]+$/) !== -1;
  103. }
  104. }]);
  105. return CODE392;
  106. }(_Barcode3.default);
  107. var characters = ["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", "-", ".", " ", "$", "/", "+", "%", "*"];
  108. var encodings = [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];
  109. function getEncoding(character) {
  110. return getBinary(characterValue(character));
  111. }
  112. function getBinary(characterValue2) {
  113. return encodings[characterValue2].toString(2);
  114. }
  115. function getCharacter(characterValue2) {
  116. return characters[characterValue2];
  117. }
  118. function characterValue(character) {
  119. return characters.indexOf(character);
  120. }
  121. function mod43checksum(data) {
  122. var checksum = 0;
  123. for (var i = 0; i < data.length; i++) {
  124. checksum += characterValue(data[i]);
  125. }
  126. checksum = checksum % 43;
  127. return checksum;
  128. }
  129. exports.CODE39 = CODE39;
  130. }
  131. });
  132. // node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/barcodes/CODE128/constants.js
  133. var require_constants = __commonJS({
  134. "node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/barcodes/CODE128/constants.js"(exports) {
  135. "use strict";
  136. Object.defineProperty(exports, "__esModule", {
  137. value: true
  138. });
  139. var _SET_BY_CODE;
  140. function _defineProperty(obj, key, value) {
  141. if (key in obj) {
  142. Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
  143. } else {
  144. obj[key] = value;
  145. }
  146. return obj;
  147. }
  148. var SET_A = exports.SET_A = 0;
  149. var SET_B = exports.SET_B = 1;
  150. var SET_C = exports.SET_C = 2;
  151. var SHIFT = exports.SHIFT = 98;
  152. var START_A = exports.START_A = 103;
  153. var START_B = exports.START_B = 104;
  154. var START_C = exports.START_C = 105;
  155. var MODULO = exports.MODULO = 103;
  156. var STOP = exports.STOP = 106;
  157. var FNC1 = exports.FNC1 = 207;
  158. var SET_BY_CODE = exports.SET_BY_CODE = (_SET_BY_CODE = {}, _defineProperty(_SET_BY_CODE, START_A, SET_A), _defineProperty(_SET_BY_CODE, START_B, SET_B), _defineProperty(_SET_BY_CODE, START_C, SET_C), _SET_BY_CODE);
  159. var SWAP = exports.SWAP = {
  160. 101: SET_A,
  161. 100: SET_B,
  162. 99: SET_C
  163. };
  164. var A_START_CHAR = exports.A_START_CHAR = String.fromCharCode(208);
  165. var B_START_CHAR = exports.B_START_CHAR = String.fromCharCode(209);
  166. var C_START_CHAR = exports.C_START_CHAR = String.fromCharCode(210);
  167. var A_CHARS = exports.A_CHARS = "[\0-_È-Ï]";
  168. var B_CHARS = exports.B_CHARS = "[ -È-Ï]";
  169. var C_CHARS = exports.C_CHARS = "(Ï*[0-9]{2}Ï*)";
  170. var BARS = exports.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];
  171. }
  172. });
  173. // node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/barcodes/CODE128/CODE128.js
  174. var require_CODE128 = __commonJS({
  175. "node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/barcodes/CODE128/CODE128.js"(exports) {
  176. "use strict";
  177. Object.defineProperty(exports, "__esModule", {
  178. value: true
  179. });
  180. var _createClass = function() {
  181. function defineProperties(target, props) {
  182. for (var i = 0; i < props.length; i++) {
  183. var descriptor = props[i];
  184. descriptor.enumerable = descriptor.enumerable || false;
  185. descriptor.configurable = true;
  186. if ("value" in descriptor)
  187. descriptor.writable = true;
  188. Object.defineProperty(target, descriptor.key, descriptor);
  189. }
  190. }
  191. return function(Constructor, protoProps, staticProps) {
  192. if (protoProps)
  193. defineProperties(Constructor.prototype, protoProps);
  194. if (staticProps)
  195. defineProperties(Constructor, staticProps);
  196. return Constructor;
  197. };
  198. }();
  199. var _Barcode2 = require_Barcode();
  200. var _Barcode3 = _interopRequireDefault(_Barcode2);
  201. var _constants = require_constants();
  202. function _interopRequireDefault(obj) {
  203. return obj && obj.__esModule ? obj : { default: obj };
  204. }
  205. function _classCallCheck(instance, Constructor) {
  206. if (!(instance instanceof Constructor)) {
  207. throw new TypeError("Cannot call a class as a function");
  208. }
  209. }
  210. function _possibleConstructorReturn(self, call) {
  211. if (!self) {
  212. throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  213. }
  214. return call && (typeof call === "object" || typeof call === "function") ? call : self;
  215. }
  216. function _inherits(subClass, superClass) {
  217. if (typeof superClass !== "function" && superClass !== null) {
  218. throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
  219. }
  220. subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });
  221. if (superClass)
  222. Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
  223. }
  224. var CODE128 = function(_Barcode) {
  225. _inherits(CODE1282, _Barcode);
  226. function CODE1282(data, options) {
  227. _classCallCheck(this, CODE1282);
  228. var _this = _possibleConstructorReturn(this, (CODE1282.__proto__ || Object.getPrototypeOf(CODE1282)).call(this, data.substring(1), options));
  229. _this.bytes = data.split("").map(function(char) {
  230. return char.charCodeAt(0);
  231. });
  232. return _this;
  233. }
  234. _createClass(CODE1282, [{
  235. key: "valid",
  236. value: function valid() {
  237. return /^[\x00-\x7F\xC8-\xD3]+$/.test(this.data);
  238. }
  239. // The public encoding function
  240. }, {
  241. key: "encode",
  242. value: function encode() {
  243. var bytes = this.bytes;
  244. var startIndex = bytes.shift() - 105;
  245. var startSet = _constants.SET_BY_CODE[startIndex];
  246. if (startSet === void 0) {
  247. throw new RangeError("The encoding does not start with a start character.");
  248. }
  249. if (this.shouldEncodeAsEan128() === true) {
  250. bytes.unshift(_constants.FNC1);
  251. }
  252. var encodingResult = CODE1282.next(bytes, 1, startSet);
  253. return {
  254. text: this.text === this.data ? this.text.replace(/[^\x20-\x7E]/g, "") : this.text,
  255. data: (
  256. // Add the start bits
  257. CODE1282.getBar(startIndex) + // Add the encoded bits
  258. encodingResult.result + // Add the checksum
  259. CODE1282.getBar((encodingResult.checksum + startIndex) % _constants.MODULO) + // Add the end bits
  260. CODE1282.getBar(_constants.STOP)
  261. )
  262. };
  263. }
  264. // GS1-128/EAN-128
  265. }, {
  266. key: "shouldEncodeAsEan128",
  267. value: function shouldEncodeAsEan128() {
  268. var isEAN128 = this.options.ean128 || false;
  269. if (typeof isEAN128 === "string") {
  270. isEAN128 = isEAN128.toLowerCase() === "true";
  271. }
  272. return isEAN128;
  273. }
  274. // Get a bar symbol by index
  275. }], [{
  276. key: "getBar",
  277. value: function getBar(index) {
  278. return _constants.BARS[index] ? _constants.BARS[index].toString() : "";
  279. }
  280. // Correct an index by a set and shift it from the bytes array
  281. }, {
  282. key: "correctIndex",
  283. value: function correctIndex(bytes, set) {
  284. if (set === _constants.SET_A) {
  285. var charCode = bytes.shift();
  286. return charCode < 32 ? charCode + 64 : charCode - 32;
  287. } else if (set === _constants.SET_B) {
  288. return bytes.shift() - 32;
  289. } else {
  290. return (bytes.shift() - 48) * 10 + bytes.shift() - 48;
  291. }
  292. }
  293. }, {
  294. key: "next",
  295. value: function next(bytes, pos, set) {
  296. if (!bytes.length) {
  297. return { result: "", checksum: 0 };
  298. }
  299. var nextCode = void 0, index = void 0;
  300. if (bytes[0] >= 200) {
  301. index = bytes.shift() - 105;
  302. var nextSet = _constants.SWAP[index];
  303. if (nextSet !== void 0) {
  304. nextCode = CODE1282.next(bytes, pos + 1, nextSet);
  305. } else {
  306. if ((set === _constants.SET_A || set === _constants.SET_B) && index === _constants.SHIFT) {
  307. bytes[0] = set === _constants.SET_A ? bytes[0] > 95 ? bytes[0] - 96 : bytes[0] : bytes[0] < 32 ? bytes[0] + 96 : bytes[0];
  308. }
  309. nextCode = CODE1282.next(bytes, pos + 1, set);
  310. }
  311. } else {
  312. index = CODE1282.correctIndex(bytes, set);
  313. nextCode = CODE1282.next(bytes, pos + 1, set);
  314. }
  315. var enc = CODE1282.getBar(index);
  316. var weight = index * pos;
  317. return {
  318. result: enc + nextCode.result,
  319. checksum: weight + nextCode.checksum
  320. };
  321. }
  322. }]);
  323. return CODE1282;
  324. }(_Barcode3.default);
  325. exports.default = CODE128;
  326. }
  327. });
  328. // node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/barcodes/CODE128/auto.js
  329. var require_auto = __commonJS({
  330. "node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/barcodes/CODE128/auto.js"(exports) {
  331. "use strict";
  332. Object.defineProperty(exports, "__esModule", {
  333. value: true
  334. });
  335. var _constants = require_constants();
  336. var matchSetALength = function matchSetALength2(string) {
  337. return string.match(new RegExp("^" + _constants.A_CHARS + "*"))[0].length;
  338. };
  339. var matchSetBLength = function matchSetBLength2(string) {
  340. return string.match(new RegExp("^" + _constants.B_CHARS + "*"))[0].length;
  341. };
  342. var matchSetC = function matchSetC2(string) {
  343. return string.match(new RegExp("^" + _constants.C_CHARS + "*"))[0];
  344. };
  345. function autoSelectFromAB(string, isA) {
  346. var ranges = isA ? _constants.A_CHARS : _constants.B_CHARS;
  347. var untilC = string.match(new RegExp("^(" + ranges + "+?)(([0-9]{2}){2,})([^0-9]|$)"));
  348. if (untilC) {
  349. return untilC[1] + String.fromCharCode(204) + autoSelectFromC(string.substring(untilC[1].length));
  350. }
  351. var chars = string.match(new RegExp("^" + ranges + "+"))[0];
  352. if (chars.length === string.length) {
  353. return string;
  354. }
  355. return chars + String.fromCharCode(isA ? 205 : 206) + autoSelectFromAB(string.substring(chars.length), !isA);
  356. }
  357. function autoSelectFromC(string) {
  358. var cMatch = matchSetC(string);
  359. var length = cMatch.length;
  360. if (length === string.length) {
  361. return string;
  362. }
  363. string = string.substring(length);
  364. var isA = matchSetALength(string) >= matchSetBLength(string);
  365. return cMatch + String.fromCharCode(isA ? 206 : 205) + autoSelectFromAB(string, isA);
  366. }
  367. exports.default = function(string) {
  368. var newString = void 0;
  369. var cLength = matchSetC(string).length;
  370. if (cLength >= 2) {
  371. newString = _constants.C_START_CHAR + autoSelectFromC(string);
  372. } else {
  373. var isA = matchSetALength(string) > matchSetBLength(string);
  374. newString = (isA ? _constants.A_START_CHAR : _constants.B_START_CHAR) + autoSelectFromAB(string, isA);
  375. }
  376. return newString.replace(
  377. /[\xCD\xCE]([^])[\xCD\xCE]/,
  378. // Any sequence between 205 and 206 characters
  379. function(match, char) {
  380. return String.fromCharCode(203) + char;
  381. }
  382. );
  383. };
  384. }
  385. });
  386. // node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/barcodes/CODE128/CODE128_AUTO.js
  387. var require_CODE128_AUTO = __commonJS({
  388. "node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/barcodes/CODE128/CODE128_AUTO.js"(exports) {
  389. "use strict";
  390. Object.defineProperty(exports, "__esModule", {
  391. value: true
  392. });
  393. var _CODE2 = require_CODE128();
  394. var _CODE3 = _interopRequireDefault(_CODE2);
  395. var _auto = require_auto();
  396. var _auto2 = _interopRequireDefault(_auto);
  397. function _interopRequireDefault(obj) {
  398. return obj && obj.__esModule ? obj : { default: obj };
  399. }
  400. function _classCallCheck(instance, Constructor) {
  401. if (!(instance instanceof Constructor)) {
  402. throw new TypeError("Cannot call a class as a function");
  403. }
  404. }
  405. function _possibleConstructorReturn(self, call) {
  406. if (!self) {
  407. throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  408. }
  409. return call && (typeof call === "object" || typeof call === "function") ? call : self;
  410. }
  411. function _inherits(subClass, superClass) {
  412. if (typeof superClass !== "function" && superClass !== null) {
  413. throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
  414. }
  415. subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });
  416. if (superClass)
  417. Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
  418. }
  419. var CODE128AUTO = function(_CODE) {
  420. _inherits(CODE128AUTO2, _CODE);
  421. function CODE128AUTO2(data, options) {
  422. _classCallCheck(this, CODE128AUTO2);
  423. if (/^[\x00-\x7F\xC8-\xD3]+$/.test(data)) {
  424. var _this = _possibleConstructorReturn(this, (CODE128AUTO2.__proto__ || Object.getPrototypeOf(CODE128AUTO2)).call(this, (0, _auto2.default)(data), options));
  425. } else {
  426. var _this = _possibleConstructorReturn(this, (CODE128AUTO2.__proto__ || Object.getPrototypeOf(CODE128AUTO2)).call(this, data, options));
  427. }
  428. return _possibleConstructorReturn(_this);
  429. }
  430. return CODE128AUTO2;
  431. }(_CODE3.default);
  432. exports.default = CODE128AUTO;
  433. }
  434. });
  435. // node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/barcodes/CODE128/CODE128A.js
  436. var require_CODE128A = __commonJS({
  437. "node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/barcodes/CODE128/CODE128A.js"(exports) {
  438. "use strict";
  439. Object.defineProperty(exports, "__esModule", {
  440. value: true
  441. });
  442. var _createClass = function() {
  443. function defineProperties(target, props) {
  444. for (var i = 0; i < props.length; i++) {
  445. var descriptor = props[i];
  446. descriptor.enumerable = descriptor.enumerable || false;
  447. descriptor.configurable = true;
  448. if ("value" in descriptor)
  449. descriptor.writable = true;
  450. Object.defineProperty(target, descriptor.key, descriptor);
  451. }
  452. }
  453. return function(Constructor, protoProps, staticProps) {
  454. if (protoProps)
  455. defineProperties(Constructor.prototype, protoProps);
  456. if (staticProps)
  457. defineProperties(Constructor, staticProps);
  458. return Constructor;
  459. };
  460. }();
  461. var _CODE2 = require_CODE128();
  462. var _CODE3 = _interopRequireDefault(_CODE2);
  463. var _constants = require_constants();
  464. function _interopRequireDefault(obj) {
  465. return obj && obj.__esModule ? obj : { default: obj };
  466. }
  467. function _classCallCheck(instance, Constructor) {
  468. if (!(instance instanceof Constructor)) {
  469. throw new TypeError("Cannot call a class as a function");
  470. }
  471. }
  472. function _possibleConstructorReturn(self, call) {
  473. if (!self) {
  474. throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  475. }
  476. return call && (typeof call === "object" || typeof call === "function") ? call : self;
  477. }
  478. function _inherits(subClass, superClass) {
  479. if (typeof superClass !== "function" && superClass !== null) {
  480. throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
  481. }
  482. subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });
  483. if (superClass)
  484. Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
  485. }
  486. var CODE128A = function(_CODE) {
  487. _inherits(CODE128A2, _CODE);
  488. function CODE128A2(string, options) {
  489. _classCallCheck(this, CODE128A2);
  490. return _possibleConstructorReturn(this, (CODE128A2.__proto__ || Object.getPrototypeOf(CODE128A2)).call(this, _constants.A_START_CHAR + string, options));
  491. }
  492. _createClass(CODE128A2, [{
  493. key: "valid",
  494. value: function valid() {
  495. return new RegExp("^" + _constants.A_CHARS + "+$").test(this.data);
  496. }
  497. }]);
  498. return CODE128A2;
  499. }(_CODE3.default);
  500. exports.default = CODE128A;
  501. }
  502. });
  503. // node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/barcodes/CODE128/CODE128B.js
  504. var require_CODE128B = __commonJS({
  505. "node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/barcodes/CODE128/CODE128B.js"(exports) {
  506. "use strict";
  507. Object.defineProperty(exports, "__esModule", {
  508. value: true
  509. });
  510. var _createClass = function() {
  511. function defineProperties(target, props) {
  512. for (var i = 0; i < props.length; i++) {
  513. var descriptor = props[i];
  514. descriptor.enumerable = descriptor.enumerable || false;
  515. descriptor.configurable = true;
  516. if ("value" in descriptor)
  517. descriptor.writable = true;
  518. Object.defineProperty(target, descriptor.key, descriptor);
  519. }
  520. }
  521. return function(Constructor, protoProps, staticProps) {
  522. if (protoProps)
  523. defineProperties(Constructor.prototype, protoProps);
  524. if (staticProps)
  525. defineProperties(Constructor, staticProps);
  526. return Constructor;
  527. };
  528. }();
  529. var _CODE2 = require_CODE128();
  530. var _CODE3 = _interopRequireDefault(_CODE2);
  531. var _constants = require_constants();
  532. function _interopRequireDefault(obj) {
  533. return obj && obj.__esModule ? obj : { default: obj };
  534. }
  535. function _classCallCheck(instance, Constructor) {
  536. if (!(instance instanceof Constructor)) {
  537. throw new TypeError("Cannot call a class as a function");
  538. }
  539. }
  540. function _possibleConstructorReturn(self, call) {
  541. if (!self) {
  542. throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  543. }
  544. return call && (typeof call === "object" || typeof call === "function") ? call : self;
  545. }
  546. function _inherits(subClass, superClass) {
  547. if (typeof superClass !== "function" && superClass !== null) {
  548. throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
  549. }
  550. subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });
  551. if (superClass)
  552. Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
  553. }
  554. var CODE128B = function(_CODE) {
  555. _inherits(CODE128B2, _CODE);
  556. function CODE128B2(string, options) {
  557. _classCallCheck(this, CODE128B2);
  558. return _possibleConstructorReturn(this, (CODE128B2.__proto__ || Object.getPrototypeOf(CODE128B2)).call(this, _constants.B_START_CHAR + string, options));
  559. }
  560. _createClass(CODE128B2, [{
  561. key: "valid",
  562. value: function valid() {
  563. return new RegExp("^" + _constants.B_CHARS + "+$").test(this.data);
  564. }
  565. }]);
  566. return CODE128B2;
  567. }(_CODE3.default);
  568. exports.default = CODE128B;
  569. }
  570. });
  571. // node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/barcodes/CODE128/CODE128C.js
  572. var require_CODE128C = __commonJS({
  573. "node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/barcodes/CODE128/CODE128C.js"(exports) {
  574. "use strict";
  575. Object.defineProperty(exports, "__esModule", {
  576. value: true
  577. });
  578. var _createClass = function() {
  579. function defineProperties(target, props) {
  580. for (var i = 0; i < props.length; i++) {
  581. var descriptor = props[i];
  582. descriptor.enumerable = descriptor.enumerable || false;
  583. descriptor.configurable = true;
  584. if ("value" in descriptor)
  585. descriptor.writable = true;
  586. Object.defineProperty(target, descriptor.key, descriptor);
  587. }
  588. }
  589. return function(Constructor, protoProps, staticProps) {
  590. if (protoProps)
  591. defineProperties(Constructor.prototype, protoProps);
  592. if (staticProps)
  593. defineProperties(Constructor, staticProps);
  594. return Constructor;
  595. };
  596. }();
  597. var _CODE2 = require_CODE128();
  598. var _CODE3 = _interopRequireDefault(_CODE2);
  599. var _constants = require_constants();
  600. function _interopRequireDefault(obj) {
  601. return obj && obj.__esModule ? obj : { default: obj };
  602. }
  603. function _classCallCheck(instance, Constructor) {
  604. if (!(instance instanceof Constructor)) {
  605. throw new TypeError("Cannot call a class as a function");
  606. }
  607. }
  608. function _possibleConstructorReturn(self, call) {
  609. if (!self) {
  610. throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  611. }
  612. return call && (typeof call === "object" || typeof call === "function") ? call : self;
  613. }
  614. function _inherits(subClass, superClass) {
  615. if (typeof superClass !== "function" && superClass !== null) {
  616. throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
  617. }
  618. subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });
  619. if (superClass)
  620. Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
  621. }
  622. var CODE128C = function(_CODE) {
  623. _inherits(CODE128C2, _CODE);
  624. function CODE128C2(string, options) {
  625. _classCallCheck(this, CODE128C2);
  626. return _possibleConstructorReturn(this, (CODE128C2.__proto__ || Object.getPrototypeOf(CODE128C2)).call(this, _constants.C_START_CHAR + string, options));
  627. }
  628. _createClass(CODE128C2, [{
  629. key: "valid",
  630. value: function valid() {
  631. return new RegExp("^" + _constants.C_CHARS + "+$").test(this.data);
  632. }
  633. }]);
  634. return CODE128C2;
  635. }(_CODE3.default);
  636. exports.default = CODE128C;
  637. }
  638. });
  639. // node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/barcodes/CODE128/index.js
  640. var require_CODE1282 = __commonJS({
  641. "node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/barcodes/CODE128/index.js"(exports) {
  642. "use strict";
  643. Object.defineProperty(exports, "__esModule", {
  644. value: true
  645. });
  646. exports.CODE128C = exports.CODE128B = exports.CODE128A = exports.CODE128 = void 0;
  647. var _CODE128_AUTO = require_CODE128_AUTO();
  648. var _CODE128_AUTO2 = _interopRequireDefault(_CODE128_AUTO);
  649. var _CODE128A = require_CODE128A();
  650. var _CODE128A2 = _interopRequireDefault(_CODE128A);
  651. var _CODE128B = require_CODE128B();
  652. var _CODE128B2 = _interopRequireDefault(_CODE128B);
  653. var _CODE128C = require_CODE128C();
  654. var _CODE128C2 = _interopRequireDefault(_CODE128C);
  655. function _interopRequireDefault(obj) {
  656. return obj && obj.__esModule ? obj : { default: obj };
  657. }
  658. exports.CODE128 = _CODE128_AUTO2.default;
  659. exports.CODE128A = _CODE128A2.default;
  660. exports.CODE128B = _CODE128B2.default;
  661. exports.CODE128C = _CODE128C2.default;
  662. }
  663. });
  664. // node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/barcodes/EAN_UPC/constants.js
  665. var require_constants2 = __commonJS({
  666. "node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/barcodes/EAN_UPC/constants.js"(exports) {
  667. "use strict";
  668. Object.defineProperty(exports, "__esModule", {
  669. value: true
  670. });
  671. var SIDE_BIN = exports.SIDE_BIN = "101";
  672. var MIDDLE_BIN = exports.MIDDLE_BIN = "01010";
  673. var BINARIES = exports.BINARIES = {
  674. "L": [
  675. // The L (left) type of encoding
  676. "0001101",
  677. "0011001",
  678. "0010011",
  679. "0111101",
  680. "0100011",
  681. "0110001",
  682. "0101111",
  683. "0111011",
  684. "0110111",
  685. "0001011"
  686. ],
  687. "G": [
  688. // The G type of encoding
  689. "0100111",
  690. "0110011",
  691. "0011011",
  692. "0100001",
  693. "0011101",
  694. "0111001",
  695. "0000101",
  696. "0010001",
  697. "0001001",
  698. "0010111"
  699. ],
  700. "R": [
  701. // The R (right) type of encoding
  702. "1110010",
  703. "1100110",
  704. "1101100",
  705. "1000010",
  706. "1011100",
  707. "1001110",
  708. "1010000",
  709. "1000100",
  710. "1001000",
  711. "1110100"
  712. ],
  713. "O": [
  714. // The O (odd) encoding for UPC-E
  715. "0001101",
  716. "0011001",
  717. "0010011",
  718. "0111101",
  719. "0100011",
  720. "0110001",
  721. "0101111",
  722. "0111011",
  723. "0110111",
  724. "0001011"
  725. ],
  726. "E": [
  727. // The E (even) encoding for UPC-E
  728. "0100111",
  729. "0110011",
  730. "0011011",
  731. "0100001",
  732. "0011101",
  733. "0111001",
  734. "0000101",
  735. "0010001",
  736. "0001001",
  737. "0010111"
  738. ]
  739. };
  740. var EAN2_STRUCTURE = exports.EAN2_STRUCTURE = ["LL", "LG", "GL", "GG"];
  741. var EAN5_STRUCTURE = exports.EAN5_STRUCTURE = ["GGLLL", "GLGLL", "GLLGL", "GLLLG", "LGGLL", "LLGGL", "LLLGG", "LGLGL", "LGLLG", "LLGLG"];
  742. var EAN13_STRUCTURE = exports.EAN13_STRUCTURE = ["LLLLLL", "LLGLGG", "LLGGLG", "LLGGGL", "LGLLGG", "LGGLLG", "LGGGLL", "LGLGLG", "LGLGGL", "LGGLGL"];
  743. }
  744. });
  745. // node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/barcodes/EAN_UPC/encoder.js
  746. var require_encoder = __commonJS({
  747. "node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/barcodes/EAN_UPC/encoder.js"(exports) {
  748. "use strict";
  749. Object.defineProperty(exports, "__esModule", {
  750. value: true
  751. });
  752. var _constants = require_constants2();
  753. var encode = function encode2(data, structure, separator) {
  754. var encoded = data.split("").map(function(val, idx) {
  755. return _constants.BINARIES[structure[idx]];
  756. }).map(function(val, idx) {
  757. return val ? val[data[idx]] : "";
  758. });
  759. if (separator) {
  760. var last = data.length - 1;
  761. encoded = encoded.map(function(val, idx) {
  762. return idx < last ? val + separator : val;
  763. });
  764. }
  765. return encoded.join("");
  766. };
  767. exports.default = encode;
  768. }
  769. });
  770. // node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/barcodes/EAN_UPC/EAN.js
  771. var require_EAN = __commonJS({
  772. "node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/barcodes/EAN_UPC/EAN.js"(exports) {
  773. "use strict";
  774. Object.defineProperty(exports, "__esModule", {
  775. value: true
  776. });
  777. var _createClass = function() {
  778. function defineProperties(target, props) {
  779. for (var i = 0; i < props.length; i++) {
  780. var descriptor = props[i];
  781. descriptor.enumerable = descriptor.enumerable || false;
  782. descriptor.configurable = true;
  783. if ("value" in descriptor)
  784. descriptor.writable = true;
  785. Object.defineProperty(target, descriptor.key, descriptor);
  786. }
  787. }
  788. return function(Constructor, protoProps, staticProps) {
  789. if (protoProps)
  790. defineProperties(Constructor.prototype, protoProps);
  791. if (staticProps)
  792. defineProperties(Constructor, staticProps);
  793. return Constructor;
  794. };
  795. }();
  796. var _constants = require_constants2();
  797. var _encoder = require_encoder();
  798. var _encoder2 = _interopRequireDefault(_encoder);
  799. var _Barcode2 = require_Barcode();
  800. var _Barcode3 = _interopRequireDefault(_Barcode2);
  801. function _interopRequireDefault(obj) {
  802. return obj && obj.__esModule ? obj : { default: obj };
  803. }
  804. function _classCallCheck(instance, Constructor) {
  805. if (!(instance instanceof Constructor)) {
  806. throw new TypeError("Cannot call a class as a function");
  807. }
  808. }
  809. function _possibleConstructorReturn(self, call) {
  810. if (!self) {
  811. throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  812. }
  813. return call && (typeof call === "object" || typeof call === "function") ? call : self;
  814. }
  815. function _inherits(subClass, superClass) {
  816. if (typeof superClass !== "function" && superClass !== null) {
  817. throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
  818. }
  819. subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });
  820. if (superClass)
  821. Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
  822. }
  823. var EAN = function(_Barcode) {
  824. _inherits(EAN2, _Barcode);
  825. function EAN2(data, options) {
  826. _classCallCheck(this, EAN2);
  827. var _this = _possibleConstructorReturn(this, (EAN2.__proto__ || Object.getPrototypeOf(EAN2)).call(this, data, options));
  828. _this.fontSize = !options.flat && options.fontSize > options.width * 10 ? options.width * 10 : options.fontSize;
  829. _this.guardHeight = options.height + _this.fontSize / 2 + options.textMargin;
  830. return _this;
  831. }
  832. _createClass(EAN2, [{
  833. key: "encode",
  834. value: function encode() {
  835. return this.options.flat ? this.encodeFlat() : this.encodeGuarded();
  836. }
  837. }, {
  838. key: "leftText",
  839. value: function leftText(from, to) {
  840. return this.text.substr(from, to);
  841. }
  842. }, {
  843. key: "leftEncode",
  844. value: function leftEncode(data, structure) {
  845. return (0, _encoder2.default)(data, structure);
  846. }
  847. }, {
  848. key: "rightText",
  849. value: function rightText(from, to) {
  850. return this.text.substr(from, to);
  851. }
  852. }, {
  853. key: "rightEncode",
  854. value: function rightEncode(data, structure) {
  855. return (0, _encoder2.default)(data, structure);
  856. }
  857. }, {
  858. key: "encodeGuarded",
  859. value: function encodeGuarded() {
  860. var textOptions = { fontSize: this.fontSize };
  861. var guardOptions = { height: this.guardHeight };
  862. return [{ data: _constants.SIDE_BIN, options: guardOptions }, { data: this.leftEncode(), text: this.leftText(), options: textOptions }, { data: _constants.MIDDLE_BIN, options: guardOptions }, { data: this.rightEncode(), text: this.rightText(), options: textOptions }, { data: _constants.SIDE_BIN, options: guardOptions }];
  863. }
  864. }, {
  865. key: "encodeFlat",
  866. value: function encodeFlat() {
  867. var data = [_constants.SIDE_BIN, this.leftEncode(), _constants.MIDDLE_BIN, this.rightEncode(), _constants.SIDE_BIN];
  868. return {
  869. data: data.join(""),
  870. text: this.text
  871. };
  872. }
  873. }]);
  874. return EAN2;
  875. }(_Barcode3.default);
  876. exports.default = EAN;
  877. }
  878. });
  879. // node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/barcodes/EAN_UPC/EAN13.js
  880. var require_EAN13 = __commonJS({
  881. "node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/barcodes/EAN_UPC/EAN13.js"(exports) {
  882. "use strict";
  883. Object.defineProperty(exports, "__esModule", {
  884. value: true
  885. });
  886. var _createClass = function() {
  887. function defineProperties(target, props) {
  888. for (var i = 0; i < props.length; i++) {
  889. var descriptor = props[i];
  890. descriptor.enumerable = descriptor.enumerable || false;
  891. descriptor.configurable = true;
  892. if ("value" in descriptor)
  893. descriptor.writable = true;
  894. Object.defineProperty(target, descriptor.key, descriptor);
  895. }
  896. }
  897. return function(Constructor, protoProps, staticProps) {
  898. if (protoProps)
  899. defineProperties(Constructor.prototype, protoProps);
  900. if (staticProps)
  901. defineProperties(Constructor, staticProps);
  902. return Constructor;
  903. };
  904. }();
  905. var _get = function get(object, property, receiver) {
  906. if (object === null)
  907. object = Function.prototype;
  908. var desc = Object.getOwnPropertyDescriptor(object, property);
  909. if (desc === void 0) {
  910. var parent = Object.getPrototypeOf(object);
  911. if (parent === null) {
  912. return void 0;
  913. } else {
  914. return get(parent, property, receiver);
  915. }
  916. } else if ("value" in desc) {
  917. return desc.value;
  918. } else {
  919. var getter = desc.get;
  920. if (getter === void 0) {
  921. return void 0;
  922. }
  923. return getter.call(receiver);
  924. }
  925. };
  926. var _constants = require_constants2();
  927. var _EAN2 = require_EAN();
  928. var _EAN3 = _interopRequireDefault(_EAN2);
  929. function _interopRequireDefault(obj) {
  930. return obj && obj.__esModule ? obj : { default: obj };
  931. }
  932. function _classCallCheck(instance, Constructor) {
  933. if (!(instance instanceof Constructor)) {
  934. throw new TypeError("Cannot call a class as a function");
  935. }
  936. }
  937. function _possibleConstructorReturn(self, call) {
  938. if (!self) {
  939. throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  940. }
  941. return call && (typeof call === "object" || typeof call === "function") ? call : self;
  942. }
  943. function _inherits(subClass, superClass) {
  944. if (typeof superClass !== "function" && superClass !== null) {
  945. throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
  946. }
  947. subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });
  948. if (superClass)
  949. Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
  950. }
  951. var checksum = function checksum2(number) {
  952. var res = number.substr(0, 12).split("").map(function(n) {
  953. return +n;
  954. }).reduce(function(sum, a, idx) {
  955. return idx % 2 ? sum + a * 3 : sum + a;
  956. }, 0);
  957. return (10 - res % 10) % 10;
  958. };
  959. var EAN13 = function(_EAN) {
  960. _inherits(EAN132, _EAN);
  961. function EAN132(data, options) {
  962. _classCallCheck(this, EAN132);
  963. if (data.search(/^[0-9]{12}$/) !== -1) {
  964. data += checksum(data);
  965. }
  966. var _this = _possibleConstructorReturn(this, (EAN132.__proto__ || Object.getPrototypeOf(EAN132)).call(this, data, options));
  967. _this.lastChar = options.lastChar;
  968. return _this;
  969. }
  970. _createClass(EAN132, [{
  971. key: "valid",
  972. value: function valid() {
  973. return this.data.search(/^[0-9]{13}$/) !== -1 && +this.data[12] === checksum(this.data);
  974. }
  975. }, {
  976. key: "leftText",
  977. value: function leftText() {
  978. return _get(EAN132.prototype.__proto__ || Object.getPrototypeOf(EAN132.prototype), "leftText", this).call(this, 1, 6);
  979. }
  980. }, {
  981. key: "leftEncode",
  982. value: function leftEncode() {
  983. var data = this.data.substr(1, 6);
  984. var structure = _constants.EAN13_STRUCTURE[this.data[0]];
  985. return _get(EAN132.prototype.__proto__ || Object.getPrototypeOf(EAN132.prototype), "leftEncode", this).call(this, data, structure);
  986. }
  987. }, {
  988. key: "rightText",
  989. value: function rightText() {
  990. return _get(EAN132.prototype.__proto__ || Object.getPrototypeOf(EAN132.prototype), "rightText", this).call(this, 7, 6);
  991. }
  992. }, {
  993. key: "rightEncode",
  994. value: function rightEncode() {
  995. var data = this.data.substr(7, 6);
  996. return _get(EAN132.prototype.__proto__ || Object.getPrototypeOf(EAN132.prototype), "rightEncode", this).call(this, data, "RRRRRR");
  997. }
  998. // The "standard" way of printing EAN13 barcodes with guard bars
  999. }, {
  1000. key: "encodeGuarded",
  1001. value: function encodeGuarded() {
  1002. var data = _get(EAN132.prototype.__proto__ || Object.getPrototypeOf(EAN132.prototype), "encodeGuarded", this).call(this);
  1003. if (this.options.displayValue) {
  1004. data.unshift({
  1005. data: "000000000000",
  1006. text: this.text.substr(0, 1),
  1007. options: { textAlign: "left", fontSize: this.fontSize }
  1008. });
  1009. if (this.options.lastChar) {
  1010. data.push({
  1011. data: "00"
  1012. });
  1013. data.push({
  1014. data: "00000",
  1015. text: this.options.lastChar,
  1016. options: { fontSize: this.fontSize }
  1017. });
  1018. }
  1019. }
  1020. return data;
  1021. }
  1022. }]);
  1023. return EAN132;
  1024. }(_EAN3.default);
  1025. exports.default = EAN13;
  1026. }
  1027. });
  1028. // node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/barcodes/EAN_UPC/EAN8.js
  1029. var require_EAN8 = __commonJS({
  1030. "node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/barcodes/EAN_UPC/EAN8.js"(exports) {
  1031. "use strict";
  1032. Object.defineProperty(exports, "__esModule", {
  1033. value: true
  1034. });
  1035. var _createClass = function() {
  1036. function defineProperties(target, props) {
  1037. for (var i = 0; i < props.length; i++) {
  1038. var descriptor = props[i];
  1039. descriptor.enumerable = descriptor.enumerable || false;
  1040. descriptor.configurable = true;
  1041. if ("value" in descriptor)
  1042. descriptor.writable = true;
  1043. Object.defineProperty(target, descriptor.key, descriptor);
  1044. }
  1045. }
  1046. return function(Constructor, protoProps, staticProps) {
  1047. if (protoProps)
  1048. defineProperties(Constructor.prototype, protoProps);
  1049. if (staticProps)
  1050. defineProperties(Constructor, staticProps);
  1051. return Constructor;
  1052. };
  1053. }();
  1054. var _get = function get(object, property, receiver) {
  1055. if (object === null)
  1056. object = Function.prototype;
  1057. var desc = Object.getOwnPropertyDescriptor(object, property);
  1058. if (desc === void 0) {
  1059. var parent = Object.getPrototypeOf(object);
  1060. if (parent === null) {
  1061. return void 0;
  1062. } else {
  1063. return get(parent, property, receiver);
  1064. }
  1065. } else if ("value" in desc) {
  1066. return desc.value;
  1067. } else {
  1068. var getter = desc.get;
  1069. if (getter === void 0) {
  1070. return void 0;
  1071. }
  1072. return getter.call(receiver);
  1073. }
  1074. };
  1075. var _EAN2 = require_EAN();
  1076. var _EAN3 = _interopRequireDefault(_EAN2);
  1077. function _interopRequireDefault(obj) {
  1078. return obj && obj.__esModule ? obj : { default: obj };
  1079. }
  1080. function _classCallCheck(instance, Constructor) {
  1081. if (!(instance instanceof Constructor)) {
  1082. throw new TypeError("Cannot call a class as a function");
  1083. }
  1084. }
  1085. function _possibleConstructorReturn(self, call) {
  1086. if (!self) {
  1087. throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  1088. }
  1089. return call && (typeof call === "object" || typeof call === "function") ? call : self;
  1090. }
  1091. function _inherits(subClass, superClass) {
  1092. if (typeof superClass !== "function" && superClass !== null) {
  1093. throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
  1094. }
  1095. subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });
  1096. if (superClass)
  1097. Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
  1098. }
  1099. var checksum = function checksum2(number) {
  1100. var res = number.substr(0, 7).split("").map(function(n) {
  1101. return +n;
  1102. }).reduce(function(sum, a, idx) {
  1103. return idx % 2 ? sum + a : sum + a * 3;
  1104. }, 0);
  1105. return (10 - res % 10) % 10;
  1106. };
  1107. var EAN8 = function(_EAN) {
  1108. _inherits(EAN82, _EAN);
  1109. function EAN82(data, options) {
  1110. _classCallCheck(this, EAN82);
  1111. if (data.search(/^[0-9]{7}$/) !== -1) {
  1112. data += checksum(data);
  1113. }
  1114. return _possibleConstructorReturn(this, (EAN82.__proto__ || Object.getPrototypeOf(EAN82)).call(this, data, options));
  1115. }
  1116. _createClass(EAN82, [{
  1117. key: "valid",
  1118. value: function valid() {
  1119. return this.data.search(/^[0-9]{8}$/) !== -1 && +this.data[7] === checksum(this.data);
  1120. }
  1121. }, {
  1122. key: "leftText",
  1123. value: function leftText() {
  1124. return _get(EAN82.prototype.__proto__ || Object.getPrototypeOf(EAN82.prototype), "leftText", this).call(this, 0, 4);
  1125. }
  1126. }, {
  1127. key: "leftEncode",
  1128. value: function leftEncode() {
  1129. var data = this.data.substr(0, 4);
  1130. return _get(EAN82.prototype.__proto__ || Object.getPrototypeOf(EAN82.prototype), "leftEncode", this).call(this, data, "LLLL");
  1131. }
  1132. }, {
  1133. key: "rightText",
  1134. value: function rightText() {
  1135. return _get(EAN82.prototype.__proto__ || Object.getPrototypeOf(EAN82.prototype), "rightText", this).call(this, 4, 4);
  1136. }
  1137. }, {
  1138. key: "rightEncode",
  1139. value: function rightEncode() {
  1140. var data = this.data.substr(4, 4);
  1141. return _get(EAN82.prototype.__proto__ || Object.getPrototypeOf(EAN82.prototype), "rightEncode", this).call(this, data, "RRRR");
  1142. }
  1143. }]);
  1144. return EAN82;
  1145. }(_EAN3.default);
  1146. exports.default = EAN8;
  1147. }
  1148. });
  1149. // node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/barcodes/EAN_UPC/EAN5.js
  1150. var require_EAN5 = __commonJS({
  1151. "node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/barcodes/EAN_UPC/EAN5.js"(exports) {
  1152. "use strict";
  1153. Object.defineProperty(exports, "__esModule", {
  1154. value: true
  1155. });
  1156. var _createClass = function() {
  1157. function defineProperties(target, props) {
  1158. for (var i = 0; i < props.length; i++) {
  1159. var descriptor = props[i];
  1160. descriptor.enumerable = descriptor.enumerable || false;
  1161. descriptor.configurable = true;
  1162. if ("value" in descriptor)
  1163. descriptor.writable = true;
  1164. Object.defineProperty(target, descriptor.key, descriptor);
  1165. }
  1166. }
  1167. return function(Constructor, protoProps, staticProps) {
  1168. if (protoProps)
  1169. defineProperties(Constructor.prototype, protoProps);
  1170. if (staticProps)
  1171. defineProperties(Constructor, staticProps);
  1172. return Constructor;
  1173. };
  1174. }();
  1175. var _constants = require_constants2();
  1176. var _encoder = require_encoder();
  1177. var _encoder2 = _interopRequireDefault(_encoder);
  1178. var _Barcode2 = require_Barcode();
  1179. var _Barcode3 = _interopRequireDefault(_Barcode2);
  1180. function _interopRequireDefault(obj) {
  1181. return obj && obj.__esModule ? obj : { default: obj };
  1182. }
  1183. function _classCallCheck(instance, Constructor) {
  1184. if (!(instance instanceof Constructor)) {
  1185. throw new TypeError("Cannot call a class as a function");
  1186. }
  1187. }
  1188. function _possibleConstructorReturn(self, call) {
  1189. if (!self) {
  1190. throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  1191. }
  1192. return call && (typeof call === "object" || typeof call === "function") ? call : self;
  1193. }
  1194. function _inherits(subClass, superClass) {
  1195. if (typeof superClass !== "function" && superClass !== null) {
  1196. throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
  1197. }
  1198. subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });
  1199. if (superClass)
  1200. Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
  1201. }
  1202. var checksum = function checksum2(data) {
  1203. var result = data.split("").map(function(n) {
  1204. return +n;
  1205. }).reduce(function(sum, a, idx) {
  1206. return idx % 2 ? sum + a * 9 : sum + a * 3;
  1207. }, 0);
  1208. return result % 10;
  1209. };
  1210. var EAN5 = function(_Barcode) {
  1211. _inherits(EAN52, _Barcode);
  1212. function EAN52(data, options) {
  1213. _classCallCheck(this, EAN52);
  1214. return _possibleConstructorReturn(this, (EAN52.__proto__ || Object.getPrototypeOf(EAN52)).call(this, data, options));
  1215. }
  1216. _createClass(EAN52, [{
  1217. key: "valid",
  1218. value: function valid() {
  1219. return this.data.search(/^[0-9]{5}$/) !== -1;
  1220. }
  1221. }, {
  1222. key: "encode",
  1223. value: function encode() {
  1224. var structure = _constants.EAN5_STRUCTURE[checksum(this.data)];
  1225. return {
  1226. data: "1011" + (0, _encoder2.default)(this.data, structure, "01"),
  1227. text: this.text
  1228. };
  1229. }
  1230. }]);
  1231. return EAN52;
  1232. }(_Barcode3.default);
  1233. exports.default = EAN5;
  1234. }
  1235. });
  1236. // node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/barcodes/EAN_UPC/EAN2.js
  1237. var require_EAN2 = __commonJS({
  1238. "node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/barcodes/EAN_UPC/EAN2.js"(exports) {
  1239. "use strict";
  1240. Object.defineProperty(exports, "__esModule", {
  1241. value: true
  1242. });
  1243. var _createClass = function() {
  1244. function defineProperties(target, props) {
  1245. for (var i = 0; i < props.length; i++) {
  1246. var descriptor = props[i];
  1247. descriptor.enumerable = descriptor.enumerable || false;
  1248. descriptor.configurable = true;
  1249. if ("value" in descriptor)
  1250. descriptor.writable = true;
  1251. Object.defineProperty(target, descriptor.key, descriptor);
  1252. }
  1253. }
  1254. return function(Constructor, protoProps, staticProps) {
  1255. if (protoProps)
  1256. defineProperties(Constructor.prototype, protoProps);
  1257. if (staticProps)
  1258. defineProperties(Constructor, staticProps);
  1259. return Constructor;
  1260. };
  1261. }();
  1262. var _constants = require_constants2();
  1263. var _encoder = require_encoder();
  1264. var _encoder2 = _interopRequireDefault(_encoder);
  1265. var _Barcode2 = require_Barcode();
  1266. var _Barcode3 = _interopRequireDefault(_Barcode2);
  1267. function _interopRequireDefault(obj) {
  1268. return obj && obj.__esModule ? obj : { default: obj };
  1269. }
  1270. function _classCallCheck(instance, Constructor) {
  1271. if (!(instance instanceof Constructor)) {
  1272. throw new TypeError("Cannot call a class as a function");
  1273. }
  1274. }
  1275. function _possibleConstructorReturn(self, call) {
  1276. if (!self) {
  1277. throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  1278. }
  1279. return call && (typeof call === "object" || typeof call === "function") ? call : self;
  1280. }
  1281. function _inherits(subClass, superClass) {
  1282. if (typeof superClass !== "function" && superClass !== null) {
  1283. throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
  1284. }
  1285. subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });
  1286. if (superClass)
  1287. Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
  1288. }
  1289. var EAN2 = function(_Barcode) {
  1290. _inherits(EAN22, _Barcode);
  1291. function EAN22(data, options) {
  1292. _classCallCheck(this, EAN22);
  1293. return _possibleConstructorReturn(this, (EAN22.__proto__ || Object.getPrototypeOf(EAN22)).call(this, data, options));
  1294. }
  1295. _createClass(EAN22, [{
  1296. key: "valid",
  1297. value: function valid() {
  1298. return this.data.search(/^[0-9]{2}$/) !== -1;
  1299. }
  1300. }, {
  1301. key: "encode",
  1302. value: function encode() {
  1303. var structure = _constants.EAN2_STRUCTURE[parseInt(this.data) % 4];
  1304. return {
  1305. // Start bits + Encode the two digits with 01 in between
  1306. data: "1011" + (0, _encoder2.default)(this.data, structure, "01"),
  1307. text: this.text
  1308. };
  1309. }
  1310. }]);
  1311. return EAN22;
  1312. }(_Barcode3.default);
  1313. exports.default = EAN2;
  1314. }
  1315. });
  1316. // node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/barcodes/EAN_UPC/UPC.js
  1317. var require_UPC = __commonJS({
  1318. "node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/barcodes/EAN_UPC/UPC.js"(exports) {
  1319. "use strict";
  1320. Object.defineProperty(exports, "__esModule", {
  1321. value: true
  1322. });
  1323. var _createClass = function() {
  1324. function defineProperties(target, props) {
  1325. for (var i = 0; i < props.length; i++) {
  1326. var descriptor = props[i];
  1327. descriptor.enumerable = descriptor.enumerable || false;
  1328. descriptor.configurable = true;
  1329. if ("value" in descriptor)
  1330. descriptor.writable = true;
  1331. Object.defineProperty(target, descriptor.key, descriptor);
  1332. }
  1333. }
  1334. return function(Constructor, protoProps, staticProps) {
  1335. if (protoProps)
  1336. defineProperties(Constructor.prototype, protoProps);
  1337. if (staticProps)
  1338. defineProperties(Constructor, staticProps);
  1339. return Constructor;
  1340. };
  1341. }();
  1342. exports.checksum = checksum;
  1343. var _encoder = require_encoder();
  1344. var _encoder2 = _interopRequireDefault(_encoder);
  1345. var _Barcode2 = require_Barcode();
  1346. var _Barcode3 = _interopRequireDefault(_Barcode2);
  1347. function _interopRequireDefault(obj) {
  1348. return obj && obj.__esModule ? obj : { default: obj };
  1349. }
  1350. function _classCallCheck(instance, Constructor) {
  1351. if (!(instance instanceof Constructor)) {
  1352. throw new TypeError("Cannot call a class as a function");
  1353. }
  1354. }
  1355. function _possibleConstructorReturn(self, call) {
  1356. if (!self) {
  1357. throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  1358. }
  1359. return call && (typeof call === "object" || typeof call === "function") ? call : self;
  1360. }
  1361. function _inherits(subClass, superClass) {
  1362. if (typeof superClass !== "function" && superClass !== null) {
  1363. throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
  1364. }
  1365. subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });
  1366. if (superClass)
  1367. Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
  1368. }
  1369. var UPC = function(_Barcode) {
  1370. _inherits(UPC2, _Barcode);
  1371. function UPC2(data, options) {
  1372. _classCallCheck(this, UPC2);
  1373. if (data.search(/^[0-9]{11}$/) !== -1) {
  1374. data += checksum(data);
  1375. }
  1376. var _this = _possibleConstructorReturn(this, (UPC2.__proto__ || Object.getPrototypeOf(UPC2)).call(this, data, options));
  1377. _this.displayValue = options.displayValue;
  1378. if (options.fontSize > options.width * 10) {
  1379. _this.fontSize = options.width * 10;
  1380. } else {
  1381. _this.fontSize = options.fontSize;
  1382. }
  1383. _this.guardHeight = options.height + _this.fontSize / 2 + options.textMargin;
  1384. return _this;
  1385. }
  1386. _createClass(UPC2, [{
  1387. key: "valid",
  1388. value: function valid() {
  1389. return this.data.search(/^[0-9]{12}$/) !== -1 && this.data[11] == checksum(this.data);
  1390. }
  1391. }, {
  1392. key: "encode",
  1393. value: function encode() {
  1394. if (this.options.flat) {
  1395. return this.flatEncoding();
  1396. } else {
  1397. return this.guardedEncoding();
  1398. }
  1399. }
  1400. }, {
  1401. key: "flatEncoding",
  1402. value: function flatEncoding() {
  1403. var result = "";
  1404. result += "101";
  1405. result += (0, _encoder2.default)(this.data.substr(0, 6), "LLLLLL");
  1406. result += "01010";
  1407. result += (0, _encoder2.default)(this.data.substr(6, 6), "RRRRRR");
  1408. result += "101";
  1409. return {
  1410. data: result,
  1411. text: this.text
  1412. };
  1413. }
  1414. }, {
  1415. key: "guardedEncoding",
  1416. value: function guardedEncoding() {
  1417. var result = [];
  1418. if (this.displayValue) {
  1419. result.push({
  1420. data: "00000000",
  1421. text: this.text.substr(0, 1),
  1422. options: { textAlign: "left", fontSize: this.fontSize }
  1423. });
  1424. }
  1425. result.push({
  1426. data: "101" + (0, _encoder2.default)(this.data[0], "L"),
  1427. options: { height: this.guardHeight }
  1428. });
  1429. result.push({
  1430. data: (0, _encoder2.default)(this.data.substr(1, 5), "LLLLL"),
  1431. text: this.text.substr(1, 5),
  1432. options: { fontSize: this.fontSize }
  1433. });
  1434. result.push({
  1435. data: "01010",
  1436. options: { height: this.guardHeight }
  1437. });
  1438. result.push({
  1439. data: (0, _encoder2.default)(this.data.substr(6, 5), "RRRRR"),
  1440. text: this.text.substr(6, 5),
  1441. options: { fontSize: this.fontSize }
  1442. });
  1443. result.push({
  1444. data: (0, _encoder2.default)(this.data[11], "R") + "101",
  1445. options: { height: this.guardHeight }
  1446. });
  1447. if (this.displayValue) {
  1448. result.push({
  1449. data: "00000000",
  1450. text: this.text.substr(11, 1),
  1451. options: { textAlign: "right", fontSize: this.fontSize }
  1452. });
  1453. }
  1454. return result;
  1455. }
  1456. }]);
  1457. return UPC2;
  1458. }(_Barcode3.default);
  1459. function checksum(number) {
  1460. var result = 0;
  1461. var i;
  1462. for (i = 1; i < 11; i += 2) {
  1463. result += parseInt(number[i]);
  1464. }
  1465. for (i = 0; i < 11; i += 2) {
  1466. result += parseInt(number[i]) * 3;
  1467. }
  1468. return (10 - result % 10) % 10;
  1469. }
  1470. exports.default = UPC;
  1471. }
  1472. });
  1473. // node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/barcodes/EAN_UPC/UPCE.js
  1474. var require_UPCE = __commonJS({
  1475. "node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/barcodes/EAN_UPC/UPCE.js"(exports) {
  1476. "use strict";
  1477. Object.defineProperty(exports, "__esModule", {
  1478. value: true
  1479. });
  1480. var _createClass = function() {
  1481. function defineProperties(target, props) {
  1482. for (var i = 0; i < props.length; i++) {
  1483. var descriptor = props[i];
  1484. descriptor.enumerable = descriptor.enumerable || false;
  1485. descriptor.configurable = true;
  1486. if ("value" in descriptor)
  1487. descriptor.writable = true;
  1488. Object.defineProperty(target, descriptor.key, descriptor);
  1489. }
  1490. }
  1491. return function(Constructor, protoProps, staticProps) {
  1492. if (protoProps)
  1493. defineProperties(Constructor.prototype, protoProps);
  1494. if (staticProps)
  1495. defineProperties(Constructor, staticProps);
  1496. return Constructor;
  1497. };
  1498. }();
  1499. var _encoder = require_encoder();
  1500. var _encoder2 = _interopRequireDefault(_encoder);
  1501. var _Barcode2 = require_Barcode();
  1502. var _Barcode3 = _interopRequireDefault(_Barcode2);
  1503. var _UPC = require_UPC();
  1504. function _interopRequireDefault(obj) {
  1505. return obj && obj.__esModule ? obj : { default: obj };
  1506. }
  1507. function _classCallCheck(instance, Constructor) {
  1508. if (!(instance instanceof Constructor)) {
  1509. throw new TypeError("Cannot call a class as a function");
  1510. }
  1511. }
  1512. function _possibleConstructorReturn(self, call) {
  1513. if (!self) {
  1514. throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  1515. }
  1516. return call && (typeof call === "object" || typeof call === "function") ? call : self;
  1517. }
  1518. function _inherits(subClass, superClass) {
  1519. if (typeof superClass !== "function" && superClass !== null) {
  1520. throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
  1521. }
  1522. subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });
  1523. if (superClass)
  1524. Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
  1525. }
  1526. var EXPANSIONS = ["XX00000XXX", "XX10000XXX", "XX20000XXX", "XXX00000XX", "XXXX00000X", "XXXXX00005", "XXXXX00006", "XXXXX00007", "XXXXX00008", "XXXXX00009"];
  1527. var PARITIES = [["EEEOOO", "OOOEEE"], ["EEOEOO", "OOEOEE"], ["EEOOEO", "OOEEOE"], ["EEOOOE", "OOEEEO"], ["EOEEOO", "OEOOEE"], ["EOOEEO", "OEEOOE"], ["EOOOEE", "OEEEOO"], ["EOEOEO", "OEOEOE"], ["EOEOOE", "OEOEEO"], ["EOOEOE", "OEEOEO"]];
  1528. var UPCE = function(_Barcode) {
  1529. _inherits(UPCE2, _Barcode);
  1530. function UPCE2(data, options) {
  1531. _classCallCheck(this, UPCE2);
  1532. var _this = _possibleConstructorReturn(this, (UPCE2.__proto__ || Object.getPrototypeOf(UPCE2)).call(this, data, options));
  1533. _this.isValid = false;
  1534. if (data.search(/^[0-9]{6}$/) !== -1) {
  1535. _this.middleDigits = data;
  1536. _this.upcA = expandToUPCA(data, "0");
  1537. _this.text = options.text || "" + _this.upcA[0] + data + _this.upcA[_this.upcA.length - 1];
  1538. _this.isValid = true;
  1539. } else if (data.search(/^[01][0-9]{7}$/) !== -1) {
  1540. _this.middleDigits = data.substring(1, data.length - 1);
  1541. _this.upcA = expandToUPCA(_this.middleDigits, data[0]);
  1542. if (_this.upcA[_this.upcA.length - 1] === data[data.length - 1]) {
  1543. _this.isValid = true;
  1544. } else {
  1545. return _possibleConstructorReturn(_this);
  1546. }
  1547. } else {
  1548. return _possibleConstructorReturn(_this);
  1549. }
  1550. _this.displayValue = options.displayValue;
  1551. if (options.fontSize > options.width * 10) {
  1552. _this.fontSize = options.width * 10;
  1553. } else {
  1554. _this.fontSize = options.fontSize;
  1555. }
  1556. _this.guardHeight = options.height + _this.fontSize / 2 + options.textMargin;
  1557. return _this;
  1558. }
  1559. _createClass(UPCE2, [{
  1560. key: "valid",
  1561. value: function valid() {
  1562. return this.isValid;
  1563. }
  1564. }, {
  1565. key: "encode",
  1566. value: function encode() {
  1567. if (this.options.flat) {
  1568. return this.flatEncoding();
  1569. } else {
  1570. return this.guardedEncoding();
  1571. }
  1572. }
  1573. }, {
  1574. key: "flatEncoding",
  1575. value: function flatEncoding() {
  1576. var result = "";
  1577. result += "101";
  1578. result += this.encodeMiddleDigits();
  1579. result += "010101";
  1580. return {
  1581. data: result,
  1582. text: this.text
  1583. };
  1584. }
  1585. }, {
  1586. key: "guardedEncoding",
  1587. value: function guardedEncoding() {
  1588. var result = [];
  1589. if (this.displayValue) {
  1590. result.push({
  1591. data: "00000000",
  1592. text: this.text[0],
  1593. options: { textAlign: "left", fontSize: this.fontSize }
  1594. });
  1595. }
  1596. result.push({
  1597. data: "101",
  1598. options: { height: this.guardHeight }
  1599. });
  1600. result.push({
  1601. data: this.encodeMiddleDigits(),
  1602. text: this.text.substring(1, 7),
  1603. options: { fontSize: this.fontSize }
  1604. });
  1605. result.push({
  1606. data: "010101",
  1607. options: { height: this.guardHeight }
  1608. });
  1609. if (this.displayValue) {
  1610. result.push({
  1611. data: "00000000",
  1612. text: this.text[7],
  1613. options: { textAlign: "right", fontSize: this.fontSize }
  1614. });
  1615. }
  1616. return result;
  1617. }
  1618. }, {
  1619. key: "encodeMiddleDigits",
  1620. value: function encodeMiddleDigits() {
  1621. var numberSystem = this.upcA[0];
  1622. var checkDigit = this.upcA[this.upcA.length - 1];
  1623. var parity = PARITIES[parseInt(checkDigit)][parseInt(numberSystem)];
  1624. return (0, _encoder2.default)(this.middleDigits, parity);
  1625. }
  1626. }]);
  1627. return UPCE2;
  1628. }(_Barcode3.default);
  1629. function expandToUPCA(middleDigits, numberSystem) {
  1630. var lastUpcE = parseInt(middleDigits[middleDigits.length - 1]);
  1631. var expansion = EXPANSIONS[lastUpcE];
  1632. var result = "";
  1633. var digitIndex = 0;
  1634. for (var i = 0; i < expansion.length; i++) {
  1635. var c = expansion[i];
  1636. if (c === "X") {
  1637. result += middleDigits[digitIndex++];
  1638. } else {
  1639. result += c;
  1640. }
  1641. }
  1642. result = "" + numberSystem + result;
  1643. return "" + result + (0, _UPC.checksum)(result);
  1644. }
  1645. exports.default = UPCE;
  1646. }
  1647. });
  1648. // node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/barcodes/EAN_UPC/index.js
  1649. var require_EAN_UPC = __commonJS({
  1650. "node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/barcodes/EAN_UPC/index.js"(exports) {
  1651. "use strict";
  1652. Object.defineProperty(exports, "__esModule", {
  1653. value: true
  1654. });
  1655. exports.UPCE = exports.UPC = exports.EAN2 = exports.EAN5 = exports.EAN8 = exports.EAN13 = void 0;
  1656. var _EAN = require_EAN13();
  1657. var _EAN2 = _interopRequireDefault(_EAN);
  1658. var _EAN3 = require_EAN8();
  1659. var _EAN4 = _interopRequireDefault(_EAN3);
  1660. var _EAN5 = require_EAN5();
  1661. var _EAN6 = _interopRequireDefault(_EAN5);
  1662. var _EAN7 = require_EAN2();
  1663. var _EAN8 = _interopRequireDefault(_EAN7);
  1664. var _UPC = require_UPC();
  1665. var _UPC2 = _interopRequireDefault(_UPC);
  1666. var _UPCE = require_UPCE();
  1667. var _UPCE2 = _interopRequireDefault(_UPCE);
  1668. function _interopRequireDefault(obj) {
  1669. return obj && obj.__esModule ? obj : { default: obj };
  1670. }
  1671. exports.EAN13 = _EAN2.default;
  1672. exports.EAN8 = _EAN4.default;
  1673. exports.EAN5 = _EAN6.default;
  1674. exports.EAN2 = _EAN8.default;
  1675. exports.UPC = _UPC2.default;
  1676. exports.UPCE = _UPCE2.default;
  1677. }
  1678. });
  1679. // node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/barcodes/ITF/constants.js
  1680. var require_constants3 = __commonJS({
  1681. "node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/barcodes/ITF/constants.js"(exports) {
  1682. "use strict";
  1683. Object.defineProperty(exports, "__esModule", {
  1684. value: true
  1685. });
  1686. var START_BIN = exports.START_BIN = "1010";
  1687. var END_BIN = exports.END_BIN = "11101";
  1688. var BINARIES = exports.BINARIES = ["00110", "10001", "01001", "11000", "00101", "10100", "01100", "00011", "10010", "01010"];
  1689. }
  1690. });
  1691. // node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/barcodes/ITF/ITF.js
  1692. var require_ITF = __commonJS({
  1693. "node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/barcodes/ITF/ITF.js"(exports) {
  1694. "use strict";
  1695. Object.defineProperty(exports, "__esModule", {
  1696. value: true
  1697. });
  1698. var _createClass = function() {
  1699. function defineProperties(target, props) {
  1700. for (var i = 0; i < props.length; i++) {
  1701. var descriptor = props[i];
  1702. descriptor.enumerable = descriptor.enumerable || false;
  1703. descriptor.configurable = true;
  1704. if ("value" in descriptor)
  1705. descriptor.writable = true;
  1706. Object.defineProperty(target, descriptor.key, descriptor);
  1707. }
  1708. }
  1709. return function(Constructor, protoProps, staticProps) {
  1710. if (protoProps)
  1711. defineProperties(Constructor.prototype, protoProps);
  1712. if (staticProps)
  1713. defineProperties(Constructor, staticProps);
  1714. return Constructor;
  1715. };
  1716. }();
  1717. var _constants = require_constants3();
  1718. var _Barcode2 = require_Barcode();
  1719. var _Barcode3 = _interopRequireDefault(_Barcode2);
  1720. function _interopRequireDefault(obj) {
  1721. return obj && obj.__esModule ? obj : { default: obj };
  1722. }
  1723. function _classCallCheck(instance, Constructor) {
  1724. if (!(instance instanceof Constructor)) {
  1725. throw new TypeError("Cannot call a class as a function");
  1726. }
  1727. }
  1728. function _possibleConstructorReturn(self, call) {
  1729. if (!self) {
  1730. throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  1731. }
  1732. return call && (typeof call === "object" || typeof call === "function") ? call : self;
  1733. }
  1734. function _inherits(subClass, superClass) {
  1735. if (typeof superClass !== "function" && superClass !== null) {
  1736. throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
  1737. }
  1738. subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });
  1739. if (superClass)
  1740. Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
  1741. }
  1742. var ITF = function(_Barcode) {
  1743. _inherits(ITF2, _Barcode);
  1744. function ITF2() {
  1745. _classCallCheck(this, ITF2);
  1746. return _possibleConstructorReturn(this, (ITF2.__proto__ || Object.getPrototypeOf(ITF2)).apply(this, arguments));
  1747. }
  1748. _createClass(ITF2, [{
  1749. key: "valid",
  1750. value: function valid() {
  1751. return this.data.search(/^([0-9]{2})+$/) !== -1;
  1752. }
  1753. }, {
  1754. key: "encode",
  1755. value: function encode() {
  1756. var _this2 = this;
  1757. var encoded = this.data.match(/.{2}/g).map(function(pair) {
  1758. return _this2.encodePair(pair);
  1759. }).join("");
  1760. return {
  1761. data: _constants.START_BIN + encoded + _constants.END_BIN,
  1762. text: this.text
  1763. };
  1764. }
  1765. // Calculate the data of a number pair
  1766. }, {
  1767. key: "encodePair",
  1768. value: function encodePair(pair) {
  1769. var second = _constants.BINARIES[pair[1]];
  1770. return _constants.BINARIES[pair[0]].split("").map(function(first, idx) {
  1771. return (first === "1" ? "111" : "1") + (second[idx] === "1" ? "000" : "0");
  1772. }).join("");
  1773. }
  1774. }]);
  1775. return ITF2;
  1776. }(_Barcode3.default);
  1777. exports.default = ITF;
  1778. }
  1779. });
  1780. // node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/barcodes/ITF/ITF14.js
  1781. var require_ITF14 = __commonJS({
  1782. "node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/barcodes/ITF/ITF14.js"(exports) {
  1783. "use strict";
  1784. Object.defineProperty(exports, "__esModule", {
  1785. value: true
  1786. });
  1787. var _createClass = function() {
  1788. function defineProperties(target, props) {
  1789. for (var i = 0; i < props.length; i++) {
  1790. var descriptor = props[i];
  1791. descriptor.enumerable = descriptor.enumerable || false;
  1792. descriptor.configurable = true;
  1793. if ("value" in descriptor)
  1794. descriptor.writable = true;
  1795. Object.defineProperty(target, descriptor.key, descriptor);
  1796. }
  1797. }
  1798. return function(Constructor, protoProps, staticProps) {
  1799. if (protoProps)
  1800. defineProperties(Constructor.prototype, protoProps);
  1801. if (staticProps)
  1802. defineProperties(Constructor, staticProps);
  1803. return Constructor;
  1804. };
  1805. }();
  1806. var _ITF2 = require_ITF();
  1807. var _ITF3 = _interopRequireDefault(_ITF2);
  1808. function _interopRequireDefault(obj) {
  1809. return obj && obj.__esModule ? obj : { default: obj };
  1810. }
  1811. function _classCallCheck(instance, Constructor) {
  1812. if (!(instance instanceof Constructor)) {
  1813. throw new TypeError("Cannot call a class as a function");
  1814. }
  1815. }
  1816. function _possibleConstructorReturn(self, call) {
  1817. if (!self) {
  1818. throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  1819. }
  1820. return call && (typeof call === "object" || typeof call === "function") ? call : self;
  1821. }
  1822. function _inherits(subClass, superClass) {
  1823. if (typeof superClass !== "function" && superClass !== null) {
  1824. throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
  1825. }
  1826. subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });
  1827. if (superClass)
  1828. Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
  1829. }
  1830. var checksum = function checksum2(data) {
  1831. var res = data.substr(0, 13).split("").map(function(num) {
  1832. return parseInt(num, 10);
  1833. }).reduce(function(sum, n, idx) {
  1834. return sum + n * (3 - idx % 2 * 2);
  1835. }, 0);
  1836. return Math.ceil(res / 10) * 10 - res;
  1837. };
  1838. var ITF14 = function(_ITF) {
  1839. _inherits(ITF142, _ITF);
  1840. function ITF142(data, options) {
  1841. _classCallCheck(this, ITF142);
  1842. if (data.search(/^[0-9]{13}$/) !== -1) {
  1843. data += checksum(data);
  1844. }
  1845. return _possibleConstructorReturn(this, (ITF142.__proto__ || Object.getPrototypeOf(ITF142)).call(this, data, options));
  1846. }
  1847. _createClass(ITF142, [{
  1848. key: "valid",
  1849. value: function valid() {
  1850. return this.data.search(/^[0-9]{14}$/) !== -1 && +this.data[13] === checksum(this.data);
  1851. }
  1852. }]);
  1853. return ITF142;
  1854. }(_ITF3.default);
  1855. exports.default = ITF14;
  1856. }
  1857. });
  1858. // node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/barcodes/ITF/index.js
  1859. var require_ITF2 = __commonJS({
  1860. "node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/barcodes/ITF/index.js"(exports) {
  1861. "use strict";
  1862. Object.defineProperty(exports, "__esModule", {
  1863. value: true
  1864. });
  1865. exports.ITF14 = exports.ITF = void 0;
  1866. var _ITF = require_ITF();
  1867. var _ITF2 = _interopRequireDefault(_ITF);
  1868. var _ITF3 = require_ITF14();
  1869. var _ITF4 = _interopRequireDefault(_ITF3);
  1870. function _interopRequireDefault(obj) {
  1871. return obj && obj.__esModule ? obj : { default: obj };
  1872. }
  1873. exports.ITF = _ITF2.default;
  1874. exports.ITF14 = _ITF4.default;
  1875. }
  1876. });
  1877. // node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/barcodes/MSI/MSI.js
  1878. var require_MSI = __commonJS({
  1879. "node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/barcodes/MSI/MSI.js"(exports) {
  1880. "use strict";
  1881. Object.defineProperty(exports, "__esModule", {
  1882. value: true
  1883. });
  1884. var _createClass = function() {
  1885. function defineProperties(target, props) {
  1886. for (var i = 0; i < props.length; i++) {
  1887. var descriptor = props[i];
  1888. descriptor.enumerable = descriptor.enumerable || false;
  1889. descriptor.configurable = true;
  1890. if ("value" in descriptor)
  1891. descriptor.writable = true;
  1892. Object.defineProperty(target, descriptor.key, descriptor);
  1893. }
  1894. }
  1895. return function(Constructor, protoProps, staticProps) {
  1896. if (protoProps)
  1897. defineProperties(Constructor.prototype, protoProps);
  1898. if (staticProps)
  1899. defineProperties(Constructor, staticProps);
  1900. return Constructor;
  1901. };
  1902. }();
  1903. var _Barcode2 = require_Barcode();
  1904. var _Barcode3 = _interopRequireDefault(_Barcode2);
  1905. function _interopRequireDefault(obj) {
  1906. return obj && obj.__esModule ? obj : { default: obj };
  1907. }
  1908. function _classCallCheck(instance, Constructor) {
  1909. if (!(instance instanceof Constructor)) {
  1910. throw new TypeError("Cannot call a class as a function");
  1911. }
  1912. }
  1913. function _possibleConstructorReturn(self, call) {
  1914. if (!self) {
  1915. throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  1916. }
  1917. return call && (typeof call === "object" || typeof call === "function") ? call : self;
  1918. }
  1919. function _inherits(subClass, superClass) {
  1920. if (typeof superClass !== "function" && superClass !== null) {
  1921. throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
  1922. }
  1923. subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });
  1924. if (superClass)
  1925. Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
  1926. }
  1927. var MSI = function(_Barcode) {
  1928. _inherits(MSI2, _Barcode);
  1929. function MSI2(data, options) {
  1930. _classCallCheck(this, MSI2);
  1931. return _possibleConstructorReturn(this, (MSI2.__proto__ || Object.getPrototypeOf(MSI2)).call(this, data, options));
  1932. }
  1933. _createClass(MSI2, [{
  1934. key: "encode",
  1935. value: function encode() {
  1936. var ret = "110";
  1937. for (var i = 0; i < this.data.length; i++) {
  1938. var digit = parseInt(this.data[i]);
  1939. var bin = digit.toString(2);
  1940. bin = addZeroes(bin, 4 - bin.length);
  1941. for (var b = 0; b < bin.length; b++) {
  1942. ret += bin[b] == "0" ? "100" : "110";
  1943. }
  1944. }
  1945. ret += "1001";
  1946. return {
  1947. data: ret,
  1948. text: this.text
  1949. };
  1950. }
  1951. }, {
  1952. key: "valid",
  1953. value: function valid() {
  1954. return this.data.search(/^[0-9]+$/) !== -1;
  1955. }
  1956. }]);
  1957. return MSI2;
  1958. }(_Barcode3.default);
  1959. function addZeroes(number, n) {
  1960. for (var i = 0; i < n; i++) {
  1961. number = "0" + number;
  1962. }
  1963. return number;
  1964. }
  1965. exports.default = MSI;
  1966. }
  1967. });
  1968. // node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/barcodes/MSI/checksums.js
  1969. var require_checksums = __commonJS({
  1970. "node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/barcodes/MSI/checksums.js"(exports) {
  1971. "use strict";
  1972. Object.defineProperty(exports, "__esModule", {
  1973. value: true
  1974. });
  1975. exports.mod10 = mod10;
  1976. exports.mod11 = mod11;
  1977. function mod10(number) {
  1978. var sum = 0;
  1979. for (var i = 0; i < number.length; i++) {
  1980. var n = parseInt(number[i]);
  1981. if ((i + number.length) % 2 === 0) {
  1982. sum += n;
  1983. } else {
  1984. sum += n * 2 % 10 + Math.floor(n * 2 / 10);
  1985. }
  1986. }
  1987. return (10 - sum % 10) % 10;
  1988. }
  1989. function mod11(number) {
  1990. var sum = 0;
  1991. var weights = [2, 3, 4, 5, 6, 7];
  1992. for (var i = 0; i < number.length; i++) {
  1993. var n = parseInt(number[number.length - 1 - i]);
  1994. sum += weights[i % weights.length] * n;
  1995. }
  1996. return (11 - sum % 11) % 11;
  1997. }
  1998. }
  1999. });
  2000. // node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/barcodes/MSI/MSI10.js
  2001. var require_MSI10 = __commonJS({
  2002. "node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/barcodes/MSI/MSI10.js"(exports) {
  2003. "use strict";
  2004. Object.defineProperty(exports, "__esModule", {
  2005. value: true
  2006. });
  2007. var _MSI2 = require_MSI();
  2008. var _MSI3 = _interopRequireDefault(_MSI2);
  2009. var _checksums = require_checksums();
  2010. function _interopRequireDefault(obj) {
  2011. return obj && obj.__esModule ? obj : { default: obj };
  2012. }
  2013. function _classCallCheck(instance, Constructor) {
  2014. if (!(instance instanceof Constructor)) {
  2015. throw new TypeError("Cannot call a class as a function");
  2016. }
  2017. }
  2018. function _possibleConstructorReturn(self, call) {
  2019. if (!self) {
  2020. throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  2021. }
  2022. return call && (typeof call === "object" || typeof call === "function") ? call : self;
  2023. }
  2024. function _inherits(subClass, superClass) {
  2025. if (typeof superClass !== "function" && superClass !== null) {
  2026. throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
  2027. }
  2028. subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });
  2029. if (superClass)
  2030. Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
  2031. }
  2032. var MSI10 = function(_MSI) {
  2033. _inherits(MSI102, _MSI);
  2034. function MSI102(data, options) {
  2035. _classCallCheck(this, MSI102);
  2036. return _possibleConstructorReturn(this, (MSI102.__proto__ || Object.getPrototypeOf(MSI102)).call(this, data + (0, _checksums.mod10)(data), options));
  2037. }
  2038. return MSI102;
  2039. }(_MSI3.default);
  2040. exports.default = MSI10;
  2041. }
  2042. });
  2043. // node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/barcodes/MSI/MSI11.js
  2044. var require_MSI11 = __commonJS({
  2045. "node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/barcodes/MSI/MSI11.js"(exports) {
  2046. "use strict";
  2047. Object.defineProperty(exports, "__esModule", {
  2048. value: true
  2049. });
  2050. var _MSI2 = require_MSI();
  2051. var _MSI3 = _interopRequireDefault(_MSI2);
  2052. var _checksums = require_checksums();
  2053. function _interopRequireDefault(obj) {
  2054. return obj && obj.__esModule ? obj : { default: obj };
  2055. }
  2056. function _classCallCheck(instance, Constructor) {
  2057. if (!(instance instanceof Constructor)) {
  2058. throw new TypeError("Cannot call a class as a function");
  2059. }
  2060. }
  2061. function _possibleConstructorReturn(self, call) {
  2062. if (!self) {
  2063. throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  2064. }
  2065. return call && (typeof call === "object" || typeof call === "function") ? call : self;
  2066. }
  2067. function _inherits(subClass, superClass) {
  2068. if (typeof superClass !== "function" && superClass !== null) {
  2069. throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
  2070. }
  2071. subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });
  2072. if (superClass)
  2073. Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
  2074. }
  2075. var MSI11 = function(_MSI) {
  2076. _inherits(MSI112, _MSI);
  2077. function MSI112(data, options) {
  2078. _classCallCheck(this, MSI112);
  2079. return _possibleConstructorReturn(this, (MSI112.__proto__ || Object.getPrototypeOf(MSI112)).call(this, data + (0, _checksums.mod11)(data), options));
  2080. }
  2081. return MSI112;
  2082. }(_MSI3.default);
  2083. exports.default = MSI11;
  2084. }
  2085. });
  2086. // node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/barcodes/MSI/MSI1010.js
  2087. var require_MSI1010 = __commonJS({
  2088. "node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/barcodes/MSI/MSI1010.js"(exports) {
  2089. "use strict";
  2090. Object.defineProperty(exports, "__esModule", {
  2091. value: true
  2092. });
  2093. var _MSI2 = require_MSI();
  2094. var _MSI3 = _interopRequireDefault(_MSI2);
  2095. var _checksums = require_checksums();
  2096. function _interopRequireDefault(obj) {
  2097. return obj && obj.__esModule ? obj : { default: obj };
  2098. }
  2099. function _classCallCheck(instance, Constructor) {
  2100. if (!(instance instanceof Constructor)) {
  2101. throw new TypeError("Cannot call a class as a function");
  2102. }
  2103. }
  2104. function _possibleConstructorReturn(self, call) {
  2105. if (!self) {
  2106. throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  2107. }
  2108. return call && (typeof call === "object" || typeof call === "function") ? call : self;
  2109. }
  2110. function _inherits(subClass, superClass) {
  2111. if (typeof superClass !== "function" && superClass !== null) {
  2112. throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
  2113. }
  2114. subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });
  2115. if (superClass)
  2116. Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
  2117. }
  2118. var MSI1010 = function(_MSI) {
  2119. _inherits(MSI10102, _MSI);
  2120. function MSI10102(data, options) {
  2121. _classCallCheck(this, MSI10102);
  2122. data += (0, _checksums.mod10)(data);
  2123. data += (0, _checksums.mod10)(data);
  2124. return _possibleConstructorReturn(this, (MSI10102.__proto__ || Object.getPrototypeOf(MSI10102)).call(this, data, options));
  2125. }
  2126. return MSI10102;
  2127. }(_MSI3.default);
  2128. exports.default = MSI1010;
  2129. }
  2130. });
  2131. // node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/barcodes/MSI/MSI1110.js
  2132. var require_MSI1110 = __commonJS({
  2133. "node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/barcodes/MSI/MSI1110.js"(exports) {
  2134. "use strict";
  2135. Object.defineProperty(exports, "__esModule", {
  2136. value: true
  2137. });
  2138. var _MSI2 = require_MSI();
  2139. var _MSI3 = _interopRequireDefault(_MSI2);
  2140. var _checksums = require_checksums();
  2141. function _interopRequireDefault(obj) {
  2142. return obj && obj.__esModule ? obj : { default: obj };
  2143. }
  2144. function _classCallCheck(instance, Constructor) {
  2145. if (!(instance instanceof Constructor)) {
  2146. throw new TypeError("Cannot call a class as a function");
  2147. }
  2148. }
  2149. function _possibleConstructorReturn(self, call) {
  2150. if (!self) {
  2151. throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  2152. }
  2153. return call && (typeof call === "object" || typeof call === "function") ? call : self;
  2154. }
  2155. function _inherits(subClass, superClass) {
  2156. if (typeof superClass !== "function" && superClass !== null) {
  2157. throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
  2158. }
  2159. subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });
  2160. if (superClass)
  2161. Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
  2162. }
  2163. var MSI1110 = function(_MSI) {
  2164. _inherits(MSI11102, _MSI);
  2165. function MSI11102(data, options) {
  2166. _classCallCheck(this, MSI11102);
  2167. data += (0, _checksums.mod11)(data);
  2168. data += (0, _checksums.mod10)(data);
  2169. return _possibleConstructorReturn(this, (MSI11102.__proto__ || Object.getPrototypeOf(MSI11102)).call(this, data, options));
  2170. }
  2171. return MSI11102;
  2172. }(_MSI3.default);
  2173. exports.default = MSI1110;
  2174. }
  2175. });
  2176. // node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/barcodes/MSI/index.js
  2177. var require_MSI2 = __commonJS({
  2178. "node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/barcodes/MSI/index.js"(exports) {
  2179. "use strict";
  2180. Object.defineProperty(exports, "__esModule", {
  2181. value: true
  2182. });
  2183. exports.MSI1110 = exports.MSI1010 = exports.MSI11 = exports.MSI10 = exports.MSI = void 0;
  2184. var _MSI = require_MSI();
  2185. var _MSI2 = _interopRequireDefault(_MSI);
  2186. var _MSI3 = require_MSI10();
  2187. var _MSI4 = _interopRequireDefault(_MSI3);
  2188. var _MSI5 = require_MSI11();
  2189. var _MSI6 = _interopRequireDefault(_MSI5);
  2190. var _MSI7 = require_MSI1010();
  2191. var _MSI8 = _interopRequireDefault(_MSI7);
  2192. var _MSI9 = require_MSI1110();
  2193. var _MSI10 = _interopRequireDefault(_MSI9);
  2194. function _interopRequireDefault(obj) {
  2195. return obj && obj.__esModule ? obj : { default: obj };
  2196. }
  2197. exports.MSI = _MSI2.default;
  2198. exports.MSI10 = _MSI4.default;
  2199. exports.MSI11 = _MSI6.default;
  2200. exports.MSI1010 = _MSI8.default;
  2201. exports.MSI1110 = _MSI10.default;
  2202. }
  2203. });
  2204. // node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/barcodes/pharmacode/index.js
  2205. var require_pharmacode = __commonJS({
  2206. "node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/barcodes/pharmacode/index.js"(exports) {
  2207. "use strict";
  2208. Object.defineProperty(exports, "__esModule", {
  2209. value: true
  2210. });
  2211. exports.pharmacode = void 0;
  2212. var _createClass = function() {
  2213. function defineProperties(target, props) {
  2214. for (var i = 0; i < props.length; i++) {
  2215. var descriptor = props[i];
  2216. descriptor.enumerable = descriptor.enumerable || false;
  2217. descriptor.configurable = true;
  2218. if ("value" in descriptor)
  2219. descriptor.writable = true;
  2220. Object.defineProperty(target, descriptor.key, descriptor);
  2221. }
  2222. }
  2223. return function(Constructor, protoProps, staticProps) {
  2224. if (protoProps)
  2225. defineProperties(Constructor.prototype, protoProps);
  2226. if (staticProps)
  2227. defineProperties(Constructor, staticProps);
  2228. return Constructor;
  2229. };
  2230. }();
  2231. var _Barcode2 = require_Barcode();
  2232. var _Barcode3 = _interopRequireDefault(_Barcode2);
  2233. function _interopRequireDefault(obj) {
  2234. return obj && obj.__esModule ? obj : { default: obj };
  2235. }
  2236. function _classCallCheck(instance, Constructor) {
  2237. if (!(instance instanceof Constructor)) {
  2238. throw new TypeError("Cannot call a class as a function");
  2239. }
  2240. }
  2241. function _possibleConstructorReturn(self, call) {
  2242. if (!self) {
  2243. throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  2244. }
  2245. return call && (typeof call === "object" || typeof call === "function") ? call : self;
  2246. }
  2247. function _inherits(subClass, superClass) {
  2248. if (typeof superClass !== "function" && superClass !== null) {
  2249. throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
  2250. }
  2251. subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });
  2252. if (superClass)
  2253. Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
  2254. }
  2255. var pharmacode = function(_Barcode) {
  2256. _inherits(pharmacode2, _Barcode);
  2257. function pharmacode2(data, options) {
  2258. _classCallCheck(this, pharmacode2);
  2259. var _this = _possibleConstructorReturn(this, (pharmacode2.__proto__ || Object.getPrototypeOf(pharmacode2)).call(this, data, options));
  2260. _this.number = parseInt(data, 10);
  2261. return _this;
  2262. }
  2263. _createClass(pharmacode2, [{
  2264. key: "encode",
  2265. value: function encode() {
  2266. var z = this.number;
  2267. var result = "";
  2268. while (!isNaN(z) && z != 0) {
  2269. if (z % 2 === 0) {
  2270. result = "11100" + result;
  2271. z = (z - 2) / 2;
  2272. } else {
  2273. result = "100" + result;
  2274. z = (z - 1) / 2;
  2275. }
  2276. }
  2277. result = result.slice(0, -2);
  2278. return {
  2279. data: result,
  2280. text: this.text
  2281. };
  2282. }
  2283. }, {
  2284. key: "valid",
  2285. value: function valid() {
  2286. return this.number >= 3 && this.number <= 131070;
  2287. }
  2288. }]);
  2289. return pharmacode2;
  2290. }(_Barcode3.default);
  2291. exports.pharmacode = pharmacode;
  2292. }
  2293. });
  2294. // node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/barcodes/codabar/index.js
  2295. var require_codabar = __commonJS({
  2296. "node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/barcodes/codabar/index.js"(exports) {
  2297. "use strict";
  2298. Object.defineProperty(exports, "__esModule", {
  2299. value: true
  2300. });
  2301. exports.codabar = void 0;
  2302. var _createClass = function() {
  2303. function defineProperties(target, props) {
  2304. for (var i = 0; i < props.length; i++) {
  2305. var descriptor = props[i];
  2306. descriptor.enumerable = descriptor.enumerable || false;
  2307. descriptor.configurable = true;
  2308. if ("value" in descriptor)
  2309. descriptor.writable = true;
  2310. Object.defineProperty(target, descriptor.key, descriptor);
  2311. }
  2312. }
  2313. return function(Constructor, protoProps, staticProps) {
  2314. if (protoProps)
  2315. defineProperties(Constructor.prototype, protoProps);
  2316. if (staticProps)
  2317. defineProperties(Constructor, staticProps);
  2318. return Constructor;
  2319. };
  2320. }();
  2321. var _Barcode2 = require_Barcode();
  2322. var _Barcode3 = _interopRequireDefault(_Barcode2);
  2323. function _interopRequireDefault(obj) {
  2324. return obj && obj.__esModule ? obj : { default: obj };
  2325. }
  2326. function _classCallCheck(instance, Constructor) {
  2327. if (!(instance instanceof Constructor)) {
  2328. throw new TypeError("Cannot call a class as a function");
  2329. }
  2330. }
  2331. function _possibleConstructorReturn(self, call) {
  2332. if (!self) {
  2333. throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  2334. }
  2335. return call && (typeof call === "object" || typeof call === "function") ? call : self;
  2336. }
  2337. function _inherits(subClass, superClass) {
  2338. if (typeof superClass !== "function" && superClass !== null) {
  2339. throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
  2340. }
  2341. subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });
  2342. if (superClass)
  2343. Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
  2344. }
  2345. var codabar = function(_Barcode) {
  2346. _inherits(codabar2, _Barcode);
  2347. function codabar2(data, options) {
  2348. _classCallCheck(this, codabar2);
  2349. if (data.search(/^[0-9\-\$\:\.\+\/]+$/) === 0) {
  2350. data = "A" + data + "A";
  2351. }
  2352. var _this = _possibleConstructorReturn(this, (codabar2.__proto__ || Object.getPrototypeOf(codabar2)).call(this, data.toUpperCase(), options));
  2353. _this.text = _this.options.text || _this.text.replace(/[A-D]/g, "");
  2354. return _this;
  2355. }
  2356. _createClass(codabar2, [{
  2357. key: "valid",
  2358. value: function valid() {
  2359. return this.data.search(/^[A-D][0-9\-\$\:\.\+\/]+[A-D]$/) !== -1;
  2360. }
  2361. }, {
  2362. key: "encode",
  2363. value: function encode() {
  2364. var result = [];
  2365. var encodings = this.getEncodings();
  2366. for (var i = 0; i < this.data.length; i++) {
  2367. result.push(encodings[this.data.charAt(i)]);
  2368. if (i !== this.data.length - 1) {
  2369. result.push("0");
  2370. }
  2371. }
  2372. return {
  2373. text: this.text,
  2374. data: result.join("")
  2375. };
  2376. }
  2377. }, {
  2378. key: "getEncodings",
  2379. value: function getEncodings() {
  2380. return {
  2381. "0": "101010011",
  2382. "1": "101011001",
  2383. "2": "101001011",
  2384. "3": "110010101",
  2385. "4": "101101001",
  2386. "5": "110101001",
  2387. "6": "100101011",
  2388. "7": "100101101",
  2389. "8": "100110101",
  2390. "9": "110100101",
  2391. "-": "101001101",
  2392. "$": "101100101",
  2393. ":": "1101011011",
  2394. "/": "1101101011",
  2395. ".": "1101101101",
  2396. "+": "1011011011",
  2397. "A": "1011001001",
  2398. "B": "1001001011",
  2399. "C": "1010010011",
  2400. "D": "1010011001"
  2401. };
  2402. }
  2403. }]);
  2404. return codabar2;
  2405. }(_Barcode3.default);
  2406. exports.codabar = codabar;
  2407. }
  2408. });
  2409. // node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/barcodes/GenericBarcode/index.js
  2410. var require_GenericBarcode = __commonJS({
  2411. "node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/barcodes/GenericBarcode/index.js"(exports) {
  2412. "use strict";
  2413. Object.defineProperty(exports, "__esModule", {
  2414. value: true
  2415. });
  2416. exports.GenericBarcode = void 0;
  2417. var _createClass = function() {
  2418. function defineProperties(target, props) {
  2419. for (var i = 0; i < props.length; i++) {
  2420. var descriptor = props[i];
  2421. descriptor.enumerable = descriptor.enumerable || false;
  2422. descriptor.configurable = true;
  2423. if ("value" in descriptor)
  2424. descriptor.writable = true;
  2425. Object.defineProperty(target, descriptor.key, descriptor);
  2426. }
  2427. }
  2428. return function(Constructor, protoProps, staticProps) {
  2429. if (protoProps)
  2430. defineProperties(Constructor.prototype, protoProps);
  2431. if (staticProps)
  2432. defineProperties(Constructor, staticProps);
  2433. return Constructor;
  2434. };
  2435. }();
  2436. var _Barcode2 = require_Barcode();
  2437. var _Barcode3 = _interopRequireDefault(_Barcode2);
  2438. function _interopRequireDefault(obj) {
  2439. return obj && obj.__esModule ? obj : { default: obj };
  2440. }
  2441. function _classCallCheck(instance, Constructor) {
  2442. if (!(instance instanceof Constructor)) {
  2443. throw new TypeError("Cannot call a class as a function");
  2444. }
  2445. }
  2446. function _possibleConstructorReturn(self, call) {
  2447. if (!self) {
  2448. throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  2449. }
  2450. return call && (typeof call === "object" || typeof call === "function") ? call : self;
  2451. }
  2452. function _inherits(subClass, superClass) {
  2453. if (typeof superClass !== "function" && superClass !== null) {
  2454. throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
  2455. }
  2456. subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });
  2457. if (superClass)
  2458. Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
  2459. }
  2460. var GenericBarcode = function(_Barcode) {
  2461. _inherits(GenericBarcode2, _Barcode);
  2462. function GenericBarcode2(data, options) {
  2463. _classCallCheck(this, GenericBarcode2);
  2464. return _possibleConstructorReturn(this, (GenericBarcode2.__proto__ || Object.getPrototypeOf(GenericBarcode2)).call(this, data, options));
  2465. }
  2466. _createClass(GenericBarcode2, [{
  2467. key: "encode",
  2468. value: function encode() {
  2469. return {
  2470. data: "10101010101010101010101010101010101010101",
  2471. text: this.text
  2472. };
  2473. }
  2474. // Resturn true/false if the string provided is valid for this encoder
  2475. }, {
  2476. key: "valid",
  2477. value: function valid() {
  2478. return true;
  2479. }
  2480. }]);
  2481. return GenericBarcode2;
  2482. }(_Barcode3.default);
  2483. exports.GenericBarcode = GenericBarcode;
  2484. }
  2485. });
  2486. // node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/barcodes/index.js
  2487. var require_barcodes = __commonJS({
  2488. "node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/barcodes/index.js"(exports) {
  2489. "use strict";
  2490. Object.defineProperty(exports, "__esModule", {
  2491. value: true
  2492. });
  2493. var _CODE = require_CODE39();
  2494. var _CODE2 = require_CODE1282();
  2495. var _EAN_UPC = require_EAN_UPC();
  2496. var _ITF = require_ITF2();
  2497. var _MSI = require_MSI2();
  2498. var _pharmacode = require_pharmacode();
  2499. var _codabar = require_codabar();
  2500. var _GenericBarcode = require_GenericBarcode();
  2501. exports.default = {
  2502. CODE39: _CODE.CODE39,
  2503. CODE128: _CODE2.CODE128,
  2504. CODE128A: _CODE2.CODE128A,
  2505. CODE128B: _CODE2.CODE128B,
  2506. CODE128C: _CODE2.CODE128C,
  2507. EAN13: _EAN_UPC.EAN13,
  2508. EAN8: _EAN_UPC.EAN8,
  2509. EAN5: _EAN_UPC.EAN5,
  2510. EAN2: _EAN_UPC.EAN2,
  2511. UPC: _EAN_UPC.UPC,
  2512. UPCE: _EAN_UPC.UPCE,
  2513. ITF14: _ITF.ITF14,
  2514. ITF: _ITF.ITF,
  2515. MSI: _MSI.MSI,
  2516. MSI10: _MSI.MSI10,
  2517. MSI11: _MSI.MSI11,
  2518. MSI1010: _MSI.MSI1010,
  2519. MSI1110: _MSI.MSI1110,
  2520. pharmacode: _pharmacode.pharmacode,
  2521. codabar: _codabar.codabar,
  2522. GenericBarcode: _GenericBarcode.GenericBarcode
  2523. };
  2524. }
  2525. });
  2526. // node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/help/merge.js
  2527. var require_merge = __commonJS({
  2528. "node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/help/merge.js"(exports) {
  2529. "use strict";
  2530. Object.defineProperty(exports, "__esModule", {
  2531. value: true
  2532. });
  2533. var _extends = Object.assign || function(target) {
  2534. for (var i = 1; i < arguments.length; i++) {
  2535. var source = arguments[i];
  2536. for (var key in source) {
  2537. if (Object.prototype.hasOwnProperty.call(source, key)) {
  2538. target[key] = source[key];
  2539. }
  2540. }
  2541. }
  2542. return target;
  2543. };
  2544. exports.default = function(old, replaceObj) {
  2545. return _extends({}, old, replaceObj);
  2546. };
  2547. }
  2548. });
  2549. // node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/help/linearizeEncodings.js
  2550. var require_linearizeEncodings = __commonJS({
  2551. "node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/help/linearizeEncodings.js"(exports) {
  2552. "use strict";
  2553. Object.defineProperty(exports, "__esModule", {
  2554. value: true
  2555. });
  2556. exports.default = linearizeEncodings;
  2557. function linearizeEncodings(encodings) {
  2558. var linearEncodings = [];
  2559. function nextLevel(encoded) {
  2560. if (Array.isArray(encoded)) {
  2561. for (var i = 0; i < encoded.length; i++) {
  2562. nextLevel(encoded[i]);
  2563. }
  2564. } else {
  2565. encoded.text = encoded.text || "";
  2566. encoded.data = encoded.data || "";
  2567. linearEncodings.push(encoded);
  2568. }
  2569. }
  2570. nextLevel(encodings);
  2571. return linearEncodings;
  2572. }
  2573. }
  2574. });
  2575. // node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/help/fixOptions.js
  2576. var require_fixOptions = __commonJS({
  2577. "node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/help/fixOptions.js"(exports) {
  2578. "use strict";
  2579. Object.defineProperty(exports, "__esModule", {
  2580. value: true
  2581. });
  2582. exports.default = fixOptions;
  2583. function fixOptions(options) {
  2584. options.marginTop = options.marginTop || options.margin;
  2585. options.marginBottom = options.marginBottom || options.margin;
  2586. options.marginRight = options.marginRight || options.margin;
  2587. options.marginLeft = options.marginLeft || options.margin;
  2588. return options;
  2589. }
  2590. }
  2591. });
  2592. // node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/help/optionsFromStrings.js
  2593. var require_optionsFromStrings = __commonJS({
  2594. "node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/help/optionsFromStrings.js"(exports) {
  2595. "use strict";
  2596. Object.defineProperty(exports, "__esModule", {
  2597. value: true
  2598. });
  2599. exports.default = optionsFromStrings;
  2600. function optionsFromStrings(options) {
  2601. var intOptions = ["width", "height", "textMargin", "fontSize", "margin", "marginTop", "marginBottom", "marginLeft", "marginRight"];
  2602. for (var intOption in intOptions) {
  2603. if (intOptions.hasOwnProperty(intOption)) {
  2604. intOption = intOptions[intOption];
  2605. if (typeof options[intOption] === "string") {
  2606. options[intOption] = parseInt(options[intOption], 10);
  2607. }
  2608. }
  2609. }
  2610. if (typeof options["displayValue"] === "string") {
  2611. options["displayValue"] = options["displayValue"] != "false";
  2612. }
  2613. return options;
  2614. }
  2615. }
  2616. });
  2617. // node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/options/defaults.js
  2618. var require_defaults = __commonJS({
  2619. "node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/options/defaults.js"(exports) {
  2620. "use strict";
  2621. Object.defineProperty(exports, "__esModule", {
  2622. value: true
  2623. });
  2624. var defaults = {
  2625. width: 2,
  2626. height: 100,
  2627. format: "auto",
  2628. displayValue: true,
  2629. fontOptions: "",
  2630. font: "monospace",
  2631. text: void 0,
  2632. textAlign: "center",
  2633. textPosition: "bottom",
  2634. textMargin: 2,
  2635. fontSize: 20,
  2636. background: "#ffffff",
  2637. lineColor: "#000000",
  2638. margin: 10,
  2639. marginTop: void 0,
  2640. marginBottom: void 0,
  2641. marginLeft: void 0,
  2642. marginRight: void 0,
  2643. valid: function valid() {
  2644. }
  2645. };
  2646. exports.default = defaults;
  2647. }
  2648. });
  2649. // node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/help/getOptionsFromElement.js
  2650. var require_getOptionsFromElement = __commonJS({
  2651. "node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/help/getOptionsFromElement.js"(exports) {
  2652. "use strict";
  2653. Object.defineProperty(exports, "__esModule", {
  2654. value: true
  2655. });
  2656. var _optionsFromStrings = require_optionsFromStrings();
  2657. var _optionsFromStrings2 = _interopRequireDefault(_optionsFromStrings);
  2658. var _defaults = require_defaults();
  2659. var _defaults2 = _interopRequireDefault(_defaults);
  2660. function _interopRequireDefault(obj) {
  2661. return obj && obj.__esModule ? obj : { default: obj };
  2662. }
  2663. function getOptionsFromElement(element) {
  2664. var options = {};
  2665. for (var property in _defaults2.default) {
  2666. if (_defaults2.default.hasOwnProperty(property)) {
  2667. if (element.hasAttribute("jsbarcode-" + property.toLowerCase())) {
  2668. options[property] = element.getAttribute("jsbarcode-" + property.toLowerCase());
  2669. }
  2670. if (element.hasAttribute("data-" + property.toLowerCase())) {
  2671. options[property] = element.getAttribute("data-" + property.toLowerCase());
  2672. }
  2673. }
  2674. }
  2675. options["value"] = element.getAttribute("jsbarcode-value") || element.getAttribute("data-value");
  2676. options = (0, _optionsFromStrings2.default)(options);
  2677. return options;
  2678. }
  2679. exports.default = getOptionsFromElement;
  2680. }
  2681. });
  2682. // node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/renderers/shared.js
  2683. var require_shared = __commonJS({
  2684. "node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/renderers/shared.js"(exports) {
  2685. "use strict";
  2686. Object.defineProperty(exports, "__esModule", {
  2687. value: true
  2688. });
  2689. exports.getTotalWidthOfEncodings = exports.calculateEncodingAttributes = exports.getBarcodePadding = exports.getEncodingHeight = exports.getMaximumHeightOfEncodings = void 0;
  2690. var _merge = require_merge();
  2691. var _merge2 = _interopRequireDefault(_merge);
  2692. function _interopRequireDefault(obj) {
  2693. return obj && obj.__esModule ? obj : { default: obj };
  2694. }
  2695. function getEncodingHeight(encoding, options) {
  2696. return options.height + (options.displayValue && encoding.text.length > 0 ? options.fontSize + options.textMargin : 0) + options.marginTop + options.marginBottom;
  2697. }
  2698. function getBarcodePadding(textWidth, barcodeWidth, options) {
  2699. if (options.displayValue && barcodeWidth < textWidth) {
  2700. if (options.textAlign == "center") {
  2701. return Math.floor((textWidth - barcodeWidth) / 2);
  2702. } else if (options.textAlign == "left") {
  2703. return 0;
  2704. } else if (options.textAlign == "right") {
  2705. return Math.floor(textWidth - barcodeWidth);
  2706. }
  2707. }
  2708. return 0;
  2709. }
  2710. function calculateEncodingAttributes(encodings, barcodeOptions, context) {
  2711. for (var i = 0; i < encodings.length; i++) {
  2712. var encoding = encodings[i];
  2713. var options = (0, _merge2.default)(barcodeOptions, encoding.options);
  2714. var textWidth;
  2715. if (options.displayValue) {
  2716. textWidth = messureText(encoding.text, options, context);
  2717. } else {
  2718. textWidth = 0;
  2719. }
  2720. var barcodeWidth = encoding.data.length * options.width;
  2721. encoding.width = Math.ceil(Math.max(textWidth, barcodeWidth));
  2722. encoding.height = getEncodingHeight(encoding, options);
  2723. encoding.barcodePadding = getBarcodePadding(textWidth, barcodeWidth, options);
  2724. }
  2725. }
  2726. function getTotalWidthOfEncodings(encodings) {
  2727. var totalWidth = 0;
  2728. for (var i = 0; i < encodings.length; i++) {
  2729. totalWidth += encodings[i].width;
  2730. }
  2731. return totalWidth;
  2732. }
  2733. function getMaximumHeightOfEncodings(encodings) {
  2734. var maxHeight = 0;
  2735. for (var i = 0; i < encodings.length; i++) {
  2736. if (encodings[i].height > maxHeight) {
  2737. maxHeight = encodings[i].height;
  2738. }
  2739. }
  2740. return maxHeight;
  2741. }
  2742. function messureText(string, options, context) {
  2743. var ctx;
  2744. if (context) {
  2745. ctx = context;
  2746. } else if (typeof document !== "undefined") {
  2747. ctx = document.createElement("canvas").getContext("2d");
  2748. } else {
  2749. return 0;
  2750. }
  2751. ctx.font = options.fontOptions + " " + options.fontSize + "px " + options.font;
  2752. var measureTextResult = ctx.measureText(string);
  2753. if (!measureTextResult) {
  2754. return 0;
  2755. }
  2756. var size = measureTextResult.width;
  2757. return size;
  2758. }
  2759. exports.getMaximumHeightOfEncodings = getMaximumHeightOfEncodings;
  2760. exports.getEncodingHeight = getEncodingHeight;
  2761. exports.getBarcodePadding = getBarcodePadding;
  2762. exports.calculateEncodingAttributes = calculateEncodingAttributes;
  2763. exports.getTotalWidthOfEncodings = getTotalWidthOfEncodings;
  2764. }
  2765. });
  2766. // node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/renderers/canvas.js
  2767. var require_canvas = __commonJS({
  2768. "node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/renderers/canvas.js"(exports) {
  2769. "use strict";
  2770. Object.defineProperty(exports, "__esModule", {
  2771. value: true
  2772. });
  2773. var _createClass = function() {
  2774. function defineProperties(target, props) {
  2775. for (var i = 0; i < props.length; i++) {
  2776. var descriptor = props[i];
  2777. descriptor.enumerable = descriptor.enumerable || false;
  2778. descriptor.configurable = true;
  2779. if ("value" in descriptor)
  2780. descriptor.writable = true;
  2781. Object.defineProperty(target, descriptor.key, descriptor);
  2782. }
  2783. }
  2784. return function(Constructor, protoProps, staticProps) {
  2785. if (protoProps)
  2786. defineProperties(Constructor.prototype, protoProps);
  2787. if (staticProps)
  2788. defineProperties(Constructor, staticProps);
  2789. return Constructor;
  2790. };
  2791. }();
  2792. var _merge = require_merge();
  2793. var _merge2 = _interopRequireDefault(_merge);
  2794. var _shared = require_shared();
  2795. function _interopRequireDefault(obj) {
  2796. return obj && obj.__esModule ? obj : { default: obj };
  2797. }
  2798. function _classCallCheck(instance, Constructor) {
  2799. if (!(instance instanceof Constructor)) {
  2800. throw new TypeError("Cannot call a class as a function");
  2801. }
  2802. }
  2803. var CanvasRenderer = function() {
  2804. function CanvasRenderer2(canvas, encodings, options) {
  2805. _classCallCheck(this, CanvasRenderer2);
  2806. this.canvas = canvas;
  2807. this.encodings = encodings;
  2808. this.options = options;
  2809. }
  2810. _createClass(CanvasRenderer2, [{
  2811. key: "render",
  2812. value: function render() {
  2813. if (!this.canvas.getContext) {
  2814. throw new Error("The browser does not support canvas.");
  2815. }
  2816. this.prepareCanvas();
  2817. for (var i = 0; i < this.encodings.length; i++) {
  2818. var encodingOptions = (0, _merge2.default)(this.options, this.encodings[i].options);
  2819. this.drawCanvasBarcode(encodingOptions, this.encodings[i]);
  2820. this.drawCanvasText(encodingOptions, this.encodings[i]);
  2821. this.moveCanvasDrawing(this.encodings[i]);
  2822. }
  2823. this.restoreCanvas();
  2824. }
  2825. }, {
  2826. key: "prepareCanvas",
  2827. value: function prepareCanvas() {
  2828. var ctx = this.canvas.getContext("2d");
  2829. ctx.save();
  2830. (0, _shared.calculateEncodingAttributes)(this.encodings, this.options, ctx);
  2831. var totalWidth = (0, _shared.getTotalWidthOfEncodings)(this.encodings);
  2832. var maxHeight = (0, _shared.getMaximumHeightOfEncodings)(this.encodings);
  2833. this.canvas.width = totalWidth + this.options.marginLeft + this.options.marginRight;
  2834. this.canvas.height = maxHeight;
  2835. ctx.clearRect(0, 0, this.canvas.width, this.canvas.height);
  2836. if (this.options.background) {
  2837. ctx.fillStyle = this.options.background;
  2838. ctx.fillRect(0, 0, this.canvas.width, this.canvas.height);
  2839. }
  2840. ctx.translate(this.options.marginLeft, 0);
  2841. }
  2842. }, {
  2843. key: "drawCanvasBarcode",
  2844. value: function drawCanvasBarcode(options, encoding) {
  2845. var ctx = this.canvas.getContext("2d");
  2846. var binary = encoding.data;
  2847. var yFrom;
  2848. if (options.textPosition == "top") {
  2849. yFrom = options.marginTop + options.fontSize + options.textMargin;
  2850. } else {
  2851. yFrom = options.marginTop;
  2852. }
  2853. ctx.fillStyle = options.lineColor;
  2854. for (var b = 0; b < binary.length; b++) {
  2855. var x = b * options.width + encoding.barcodePadding;
  2856. if (binary[b] === "1") {
  2857. ctx.fillRect(x, yFrom, options.width, options.height);
  2858. } else if (binary[b]) {
  2859. ctx.fillRect(x, yFrom, options.width, options.height * binary[b]);
  2860. }
  2861. }
  2862. }
  2863. }, {
  2864. key: "drawCanvasText",
  2865. value: function drawCanvasText(options, encoding) {
  2866. var ctx = this.canvas.getContext("2d");
  2867. var font = options.fontOptions + " " + options.fontSize + "px " + options.font;
  2868. if (options.displayValue) {
  2869. var x, y;
  2870. if (options.textPosition == "top") {
  2871. y = options.marginTop + options.fontSize - options.textMargin;
  2872. } else {
  2873. y = options.height + options.textMargin + options.marginTop + options.fontSize;
  2874. }
  2875. ctx.font = font;
  2876. if (options.textAlign == "left" || encoding.barcodePadding > 0) {
  2877. x = 0;
  2878. ctx.textAlign = "left";
  2879. } else if (options.textAlign == "right") {
  2880. x = encoding.width - 1;
  2881. ctx.textAlign = "right";
  2882. } else {
  2883. x = encoding.width / 2;
  2884. ctx.textAlign = "center";
  2885. }
  2886. ctx.fillText(encoding.text, x, y);
  2887. }
  2888. }
  2889. }, {
  2890. key: "moveCanvasDrawing",
  2891. value: function moveCanvasDrawing(encoding) {
  2892. var ctx = this.canvas.getContext("2d");
  2893. ctx.translate(encoding.width, 0);
  2894. }
  2895. }, {
  2896. key: "restoreCanvas",
  2897. value: function restoreCanvas() {
  2898. var ctx = this.canvas.getContext("2d");
  2899. ctx.restore();
  2900. }
  2901. }]);
  2902. return CanvasRenderer2;
  2903. }();
  2904. exports.default = CanvasRenderer;
  2905. }
  2906. });
  2907. // node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/renderers/svg.js
  2908. var require_svg = __commonJS({
  2909. "node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/renderers/svg.js"(exports) {
  2910. "use strict";
  2911. Object.defineProperty(exports, "__esModule", {
  2912. value: true
  2913. });
  2914. var _createClass = function() {
  2915. function defineProperties(target, props) {
  2916. for (var i = 0; i < props.length; i++) {
  2917. var descriptor = props[i];
  2918. descriptor.enumerable = descriptor.enumerable || false;
  2919. descriptor.configurable = true;
  2920. if ("value" in descriptor)
  2921. descriptor.writable = true;
  2922. Object.defineProperty(target, descriptor.key, descriptor);
  2923. }
  2924. }
  2925. return function(Constructor, protoProps, staticProps) {
  2926. if (protoProps)
  2927. defineProperties(Constructor.prototype, protoProps);
  2928. if (staticProps)
  2929. defineProperties(Constructor, staticProps);
  2930. return Constructor;
  2931. };
  2932. }();
  2933. var _merge = require_merge();
  2934. var _merge2 = _interopRequireDefault(_merge);
  2935. var _shared = require_shared();
  2936. function _interopRequireDefault(obj) {
  2937. return obj && obj.__esModule ? obj : { default: obj };
  2938. }
  2939. function _classCallCheck(instance, Constructor) {
  2940. if (!(instance instanceof Constructor)) {
  2941. throw new TypeError("Cannot call a class as a function");
  2942. }
  2943. }
  2944. var svgns = "http://www.w3.org/2000/svg";
  2945. var SVGRenderer = function() {
  2946. function SVGRenderer2(svg, encodings, options) {
  2947. _classCallCheck(this, SVGRenderer2);
  2948. this.svg = svg;
  2949. this.encodings = encodings;
  2950. this.options = options;
  2951. this.document = options.xmlDocument || document;
  2952. }
  2953. _createClass(SVGRenderer2, [{
  2954. key: "render",
  2955. value: function render() {
  2956. var currentX = this.options.marginLeft;
  2957. this.prepareSVG();
  2958. for (var i = 0; i < this.encodings.length; i++) {
  2959. var encoding = this.encodings[i];
  2960. var encodingOptions = (0, _merge2.default)(this.options, encoding.options);
  2961. var group = this.createGroup(currentX, encodingOptions.marginTop, this.svg);
  2962. this.setGroupOptions(group, encodingOptions);
  2963. this.drawSvgBarcode(group, encodingOptions, encoding);
  2964. this.drawSVGText(group, encodingOptions, encoding);
  2965. currentX += encoding.width;
  2966. }
  2967. }
  2968. }, {
  2969. key: "prepareSVG",
  2970. value: function prepareSVG() {
  2971. while (this.svg.firstChild) {
  2972. this.svg.removeChild(this.svg.firstChild);
  2973. }
  2974. (0, _shared.calculateEncodingAttributes)(this.encodings, this.options);
  2975. var totalWidth = (0, _shared.getTotalWidthOfEncodings)(this.encodings);
  2976. var maxHeight = (0, _shared.getMaximumHeightOfEncodings)(this.encodings);
  2977. var width = totalWidth + this.options.marginLeft + this.options.marginRight;
  2978. this.setSvgAttributes(width, maxHeight);
  2979. if (this.options.background) {
  2980. this.drawRect(0, 0, width, maxHeight, this.svg).setAttribute("style", "fill:" + this.options.background + ";");
  2981. }
  2982. }
  2983. }, {
  2984. key: "drawSvgBarcode",
  2985. value: function drawSvgBarcode(parent, options, encoding) {
  2986. var binary = encoding.data;
  2987. var yFrom;
  2988. if (options.textPosition == "top") {
  2989. yFrom = options.fontSize + options.textMargin;
  2990. } else {
  2991. yFrom = 0;
  2992. }
  2993. var barWidth = 0;
  2994. var x = 0;
  2995. for (var b = 0; b < binary.length; b++) {
  2996. x = b * options.width + encoding.barcodePadding;
  2997. if (binary[b] === "1") {
  2998. barWidth++;
  2999. } else if (barWidth > 0) {
  3000. this.drawRect(x - options.width * barWidth, yFrom, options.width * barWidth, options.height, parent);
  3001. barWidth = 0;
  3002. }
  3003. }
  3004. if (barWidth > 0) {
  3005. this.drawRect(x - options.width * (barWidth - 1), yFrom, options.width * barWidth, options.height, parent);
  3006. }
  3007. }
  3008. }, {
  3009. key: "drawSVGText",
  3010. value: function drawSVGText(parent, options, encoding) {
  3011. var textElem = this.document.createElementNS(svgns, "text");
  3012. if (options.displayValue) {
  3013. var x, y;
  3014. textElem.setAttribute("style", "font:" + options.fontOptions + " " + options.fontSize + "px " + options.font);
  3015. if (options.textPosition == "top") {
  3016. y = options.fontSize - options.textMargin;
  3017. } else {
  3018. y = options.height + options.textMargin + options.fontSize;
  3019. }
  3020. if (options.textAlign == "left" || encoding.barcodePadding > 0) {
  3021. x = 0;
  3022. textElem.setAttribute("text-anchor", "start");
  3023. } else if (options.textAlign == "right") {
  3024. x = encoding.width - 1;
  3025. textElem.setAttribute("text-anchor", "end");
  3026. } else {
  3027. x = encoding.width / 2;
  3028. textElem.setAttribute("text-anchor", "middle");
  3029. }
  3030. textElem.setAttribute("x", x);
  3031. textElem.setAttribute("y", y);
  3032. textElem.appendChild(this.document.createTextNode(encoding.text));
  3033. parent.appendChild(textElem);
  3034. }
  3035. }
  3036. }, {
  3037. key: "setSvgAttributes",
  3038. value: function setSvgAttributes(width, height) {
  3039. var svg = this.svg;
  3040. svg.setAttribute("width", width + "px");
  3041. svg.setAttribute("height", height + "px");
  3042. svg.setAttribute("x", "0px");
  3043. svg.setAttribute("y", "0px");
  3044. svg.setAttribute("viewBox", "0 0 " + width + " " + height);
  3045. svg.setAttribute("xmlns", svgns);
  3046. svg.setAttribute("version", "1.1");
  3047. svg.setAttribute("style", "transform: translate(0,0)");
  3048. }
  3049. }, {
  3050. key: "createGroup",
  3051. value: function createGroup(x, y, parent) {
  3052. var group = this.document.createElementNS(svgns, "g");
  3053. group.setAttribute("transform", "translate(" + x + ", " + y + ")");
  3054. parent.appendChild(group);
  3055. return group;
  3056. }
  3057. }, {
  3058. key: "setGroupOptions",
  3059. value: function setGroupOptions(group, options) {
  3060. group.setAttribute("style", "fill:" + options.lineColor + ";");
  3061. }
  3062. }, {
  3063. key: "drawRect",
  3064. value: function drawRect(x, y, width, height, parent) {
  3065. var rect = this.document.createElementNS(svgns, "rect");
  3066. rect.setAttribute("x", x);
  3067. rect.setAttribute("y", y);
  3068. rect.setAttribute("width", width);
  3069. rect.setAttribute("height", height);
  3070. parent.appendChild(rect);
  3071. return rect;
  3072. }
  3073. }]);
  3074. return SVGRenderer2;
  3075. }();
  3076. exports.default = SVGRenderer;
  3077. }
  3078. });
  3079. // node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/renderers/object.js
  3080. var require_object = __commonJS({
  3081. "node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/renderers/object.js"(exports) {
  3082. "use strict";
  3083. Object.defineProperty(exports, "__esModule", {
  3084. value: true
  3085. });
  3086. var _createClass = function() {
  3087. function defineProperties(target, props) {
  3088. for (var i = 0; i < props.length; i++) {
  3089. var descriptor = props[i];
  3090. descriptor.enumerable = descriptor.enumerable || false;
  3091. descriptor.configurable = true;
  3092. if ("value" in descriptor)
  3093. descriptor.writable = true;
  3094. Object.defineProperty(target, descriptor.key, descriptor);
  3095. }
  3096. }
  3097. return function(Constructor, protoProps, staticProps) {
  3098. if (protoProps)
  3099. defineProperties(Constructor.prototype, protoProps);
  3100. if (staticProps)
  3101. defineProperties(Constructor, staticProps);
  3102. return Constructor;
  3103. };
  3104. }();
  3105. function _classCallCheck(instance, Constructor) {
  3106. if (!(instance instanceof Constructor)) {
  3107. throw new TypeError("Cannot call a class as a function");
  3108. }
  3109. }
  3110. var ObjectRenderer = function() {
  3111. function ObjectRenderer2(object, encodings, options) {
  3112. _classCallCheck(this, ObjectRenderer2);
  3113. this.object = object;
  3114. this.encodings = encodings;
  3115. this.options = options;
  3116. }
  3117. _createClass(ObjectRenderer2, [{
  3118. key: "render",
  3119. value: function render() {
  3120. this.object.encodings = this.encodings;
  3121. }
  3122. }]);
  3123. return ObjectRenderer2;
  3124. }();
  3125. exports.default = ObjectRenderer;
  3126. }
  3127. });
  3128. // node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/renderers/index.js
  3129. var require_renderers = __commonJS({
  3130. "node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/renderers/index.js"(exports) {
  3131. "use strict";
  3132. Object.defineProperty(exports, "__esModule", {
  3133. value: true
  3134. });
  3135. var _canvas = require_canvas();
  3136. var _canvas2 = _interopRequireDefault(_canvas);
  3137. var _svg = require_svg();
  3138. var _svg2 = _interopRequireDefault(_svg);
  3139. var _object = require_object();
  3140. var _object2 = _interopRequireDefault(_object);
  3141. function _interopRequireDefault(obj) {
  3142. return obj && obj.__esModule ? obj : { default: obj };
  3143. }
  3144. exports.default = { CanvasRenderer: _canvas2.default, SVGRenderer: _svg2.default, ObjectRenderer: _object2.default };
  3145. }
  3146. });
  3147. // node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/exceptions/exceptions.js
  3148. var require_exceptions = __commonJS({
  3149. "node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/exceptions/exceptions.js"(exports) {
  3150. "use strict";
  3151. Object.defineProperty(exports, "__esModule", {
  3152. value: true
  3153. });
  3154. function _classCallCheck(instance, Constructor) {
  3155. if (!(instance instanceof Constructor)) {
  3156. throw new TypeError("Cannot call a class as a function");
  3157. }
  3158. }
  3159. function _possibleConstructorReturn(self, call) {
  3160. if (!self) {
  3161. throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  3162. }
  3163. return call && (typeof call === "object" || typeof call === "function") ? call : self;
  3164. }
  3165. function _inherits(subClass, superClass) {
  3166. if (typeof superClass !== "function" && superClass !== null) {
  3167. throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
  3168. }
  3169. subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });
  3170. if (superClass)
  3171. Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
  3172. }
  3173. var InvalidInputException = function(_Error) {
  3174. _inherits(InvalidInputException2, _Error);
  3175. function InvalidInputException2(symbology, input) {
  3176. _classCallCheck(this, InvalidInputException2);
  3177. var _this = _possibleConstructorReturn(this, (InvalidInputException2.__proto__ || Object.getPrototypeOf(InvalidInputException2)).call(this));
  3178. _this.name = "InvalidInputException";
  3179. _this.symbology = symbology;
  3180. _this.input = input;
  3181. _this.message = '"' + _this.input + '" is not a valid input for ' + _this.symbology;
  3182. return _this;
  3183. }
  3184. return InvalidInputException2;
  3185. }(Error);
  3186. var InvalidElementException = function(_Error2) {
  3187. _inherits(InvalidElementException2, _Error2);
  3188. function InvalidElementException2() {
  3189. _classCallCheck(this, InvalidElementException2);
  3190. var _this2 = _possibleConstructorReturn(this, (InvalidElementException2.__proto__ || Object.getPrototypeOf(InvalidElementException2)).call(this));
  3191. _this2.name = "InvalidElementException";
  3192. _this2.message = "Not supported type to render on";
  3193. return _this2;
  3194. }
  3195. return InvalidElementException2;
  3196. }(Error);
  3197. var NoElementException = function(_Error3) {
  3198. _inherits(NoElementException2, _Error3);
  3199. function NoElementException2() {
  3200. _classCallCheck(this, NoElementException2);
  3201. var _this3 = _possibleConstructorReturn(this, (NoElementException2.__proto__ || Object.getPrototypeOf(NoElementException2)).call(this));
  3202. _this3.name = "NoElementException";
  3203. _this3.message = "No element to render on.";
  3204. return _this3;
  3205. }
  3206. return NoElementException2;
  3207. }(Error);
  3208. exports.InvalidInputException = InvalidInputException;
  3209. exports.InvalidElementException = InvalidElementException;
  3210. exports.NoElementException = NoElementException;
  3211. }
  3212. });
  3213. // node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/help/getRenderProperties.js
  3214. var require_getRenderProperties = __commonJS({
  3215. "node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/help/getRenderProperties.js"(exports) {
  3216. "use strict";
  3217. Object.defineProperty(exports, "__esModule", {
  3218. value: true
  3219. });
  3220. var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function(obj) {
  3221. return typeof obj;
  3222. } : function(obj) {
  3223. return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
  3224. };
  3225. var _getOptionsFromElement = require_getOptionsFromElement();
  3226. var _getOptionsFromElement2 = _interopRequireDefault(_getOptionsFromElement);
  3227. var _renderers = require_renderers();
  3228. var _renderers2 = _interopRequireDefault(_renderers);
  3229. var _exceptions = require_exceptions();
  3230. function _interopRequireDefault(obj) {
  3231. return obj && obj.__esModule ? obj : { default: obj };
  3232. }
  3233. function getRenderProperties(element) {
  3234. if (typeof element === "string") {
  3235. return querySelectedRenderProperties(element);
  3236. } else if (Array.isArray(element)) {
  3237. var returnArray = [];
  3238. for (var i = 0; i < element.length; i++) {
  3239. returnArray.push(getRenderProperties(element[i]));
  3240. }
  3241. return returnArray;
  3242. } else if (typeof HTMLCanvasElement !== "undefined" && element instanceof HTMLImageElement) {
  3243. return newCanvasRenderProperties(element);
  3244. } else if (element && element.nodeName && element.nodeName.toLowerCase() === "svg" || typeof SVGElement !== "undefined" && element instanceof SVGElement) {
  3245. return {
  3246. element,
  3247. options: (0, _getOptionsFromElement2.default)(element),
  3248. renderer: _renderers2.default.SVGRenderer
  3249. };
  3250. } else if (typeof HTMLCanvasElement !== "undefined" && element instanceof HTMLCanvasElement) {
  3251. return {
  3252. element,
  3253. options: (0, _getOptionsFromElement2.default)(element),
  3254. renderer: _renderers2.default.CanvasRenderer
  3255. };
  3256. } else if (element && element.getContext) {
  3257. return {
  3258. element,
  3259. renderer: _renderers2.default.CanvasRenderer
  3260. };
  3261. } else if (element && (typeof element === "undefined" ? "undefined" : _typeof(element)) === "object" && !element.nodeName) {
  3262. return {
  3263. element,
  3264. renderer: _renderers2.default.ObjectRenderer
  3265. };
  3266. } else {
  3267. throw new _exceptions.InvalidElementException();
  3268. }
  3269. }
  3270. function querySelectedRenderProperties(string) {
  3271. var selector = document.querySelectorAll(string);
  3272. if (selector.length === 0) {
  3273. return void 0;
  3274. } else {
  3275. var returnArray = [];
  3276. for (var i = 0; i < selector.length; i++) {
  3277. returnArray.push(getRenderProperties(selector[i]));
  3278. }
  3279. return returnArray;
  3280. }
  3281. }
  3282. function newCanvasRenderProperties(imgElement) {
  3283. var canvas = document.createElement("canvas");
  3284. return {
  3285. element: canvas,
  3286. options: (0, _getOptionsFromElement2.default)(imgElement),
  3287. renderer: _renderers2.default.CanvasRenderer,
  3288. afterRender: function afterRender() {
  3289. imgElement.setAttribute("src", canvas.toDataURL());
  3290. }
  3291. };
  3292. }
  3293. exports.default = getRenderProperties;
  3294. }
  3295. });
  3296. // node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/exceptions/ErrorHandler.js
  3297. var require_ErrorHandler = __commonJS({
  3298. "node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/exceptions/ErrorHandler.js"(exports) {
  3299. "use strict";
  3300. Object.defineProperty(exports, "__esModule", {
  3301. value: true
  3302. });
  3303. var _createClass = function() {
  3304. function defineProperties(target, props) {
  3305. for (var i = 0; i < props.length; i++) {
  3306. var descriptor = props[i];
  3307. descriptor.enumerable = descriptor.enumerable || false;
  3308. descriptor.configurable = true;
  3309. if ("value" in descriptor)
  3310. descriptor.writable = true;
  3311. Object.defineProperty(target, descriptor.key, descriptor);
  3312. }
  3313. }
  3314. return function(Constructor, protoProps, staticProps) {
  3315. if (protoProps)
  3316. defineProperties(Constructor.prototype, protoProps);
  3317. if (staticProps)
  3318. defineProperties(Constructor, staticProps);
  3319. return Constructor;
  3320. };
  3321. }();
  3322. function _classCallCheck(instance, Constructor) {
  3323. if (!(instance instanceof Constructor)) {
  3324. throw new TypeError("Cannot call a class as a function");
  3325. }
  3326. }
  3327. var ErrorHandler = function() {
  3328. function ErrorHandler2(api) {
  3329. _classCallCheck(this, ErrorHandler2);
  3330. this.api = api;
  3331. }
  3332. _createClass(ErrorHandler2, [{
  3333. key: "handleCatch",
  3334. value: function handleCatch(e) {
  3335. if (e.name === "InvalidInputException") {
  3336. if (this.api._options.valid !== this.api._defaults.valid) {
  3337. this.api._options.valid(false);
  3338. } else {
  3339. throw e.message;
  3340. }
  3341. } else {
  3342. throw e;
  3343. }
  3344. this.api.render = function() {
  3345. };
  3346. }
  3347. }, {
  3348. key: "wrapBarcodeCall",
  3349. value: function wrapBarcodeCall(func) {
  3350. try {
  3351. var result = func.apply(void 0, arguments);
  3352. this.api._options.valid(true);
  3353. return result;
  3354. } catch (e) {
  3355. this.handleCatch(e);
  3356. return this.api;
  3357. }
  3358. }
  3359. }]);
  3360. return ErrorHandler2;
  3361. }();
  3362. exports.default = ErrorHandler;
  3363. }
  3364. });
  3365. // node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/JsBarcode.js
  3366. var require_JsBarcode = __commonJS({
  3367. "node_modules/.pnpm/jsbarcode@3.11.5/node_modules/jsbarcode/bin/JsBarcode.js"(exports, module) {
  3368. var _barcodes = require_barcodes();
  3369. var _barcodes2 = _interopRequireDefault(_barcodes);
  3370. var _merge = require_merge();
  3371. var _merge2 = _interopRequireDefault(_merge);
  3372. var _linearizeEncodings = require_linearizeEncodings();
  3373. var _linearizeEncodings2 = _interopRequireDefault(_linearizeEncodings);
  3374. var _fixOptions = require_fixOptions();
  3375. var _fixOptions2 = _interopRequireDefault(_fixOptions);
  3376. var _getRenderProperties = require_getRenderProperties();
  3377. var _getRenderProperties2 = _interopRequireDefault(_getRenderProperties);
  3378. var _optionsFromStrings = require_optionsFromStrings();
  3379. var _optionsFromStrings2 = _interopRequireDefault(_optionsFromStrings);
  3380. var _ErrorHandler = require_ErrorHandler();
  3381. var _ErrorHandler2 = _interopRequireDefault(_ErrorHandler);
  3382. var _exceptions = require_exceptions();
  3383. var _defaults = require_defaults();
  3384. var _defaults2 = _interopRequireDefault(_defaults);
  3385. function _interopRequireDefault(obj) {
  3386. return obj && obj.__esModule ? obj : { default: obj };
  3387. }
  3388. var API = function API2() {
  3389. };
  3390. var JsBarcode = function JsBarcode2(element, text, options) {
  3391. var api = new API();
  3392. if (typeof element === "undefined") {
  3393. throw Error("No element to render on was provided.");
  3394. }
  3395. api._renderProperties = (0, _getRenderProperties2.default)(element);
  3396. api._encodings = [];
  3397. api._options = _defaults2.default;
  3398. api._errorHandler = new _ErrorHandler2.default(api);
  3399. if (typeof text !== "undefined") {
  3400. options = options || {};
  3401. if (!options.format) {
  3402. options.format = autoSelectBarcode();
  3403. }
  3404. api.options(options)[options.format](text, options).render();
  3405. }
  3406. return api;
  3407. };
  3408. JsBarcode.getModule = function(name2) {
  3409. return _barcodes2.default[name2];
  3410. };
  3411. for (name in _barcodes2.default) {
  3412. if (_barcodes2.default.hasOwnProperty(name)) {
  3413. registerBarcode(_barcodes2.default, name);
  3414. }
  3415. }
  3416. var name;
  3417. function registerBarcode(barcodes, name2) {
  3418. API.prototype[name2] = API.prototype[name2.toUpperCase()] = API.prototype[name2.toLowerCase()] = function(text, options) {
  3419. var api = this;
  3420. return api._errorHandler.wrapBarcodeCall(function() {
  3421. options.text = typeof options.text === "undefined" ? void 0 : "" + options.text;
  3422. var newOptions = (0, _merge2.default)(api._options, options);
  3423. newOptions = (0, _optionsFromStrings2.default)(newOptions);
  3424. var Encoder = barcodes[name2];
  3425. var encoded = encode(text, Encoder, newOptions);
  3426. api._encodings.push(encoded);
  3427. return api;
  3428. });
  3429. };
  3430. }
  3431. function encode(text, Encoder, options) {
  3432. text = "" + text;
  3433. var encoder = new Encoder(text, options);
  3434. if (!encoder.valid()) {
  3435. throw new _exceptions.InvalidInputException(encoder.constructor.name, text);
  3436. }
  3437. var encoded = encoder.encode();
  3438. encoded = (0, _linearizeEncodings2.default)(encoded);
  3439. for (var i = 0; i < encoded.length; i++) {
  3440. encoded[i].options = (0, _merge2.default)(options, encoded[i].options);
  3441. }
  3442. return encoded;
  3443. }
  3444. function autoSelectBarcode() {
  3445. if (_barcodes2.default["CODE128"]) {
  3446. return "CODE128";
  3447. }
  3448. return Object.keys(_barcodes2.default)[0];
  3449. }
  3450. API.prototype.options = function(options) {
  3451. this._options = (0, _merge2.default)(this._options, options);
  3452. return this;
  3453. };
  3454. API.prototype.blank = function(size) {
  3455. var zeroes = new Array(size + 1).join("0");
  3456. this._encodings.push({ data: zeroes });
  3457. return this;
  3458. };
  3459. API.prototype.init = function() {
  3460. if (!this._renderProperties) {
  3461. return;
  3462. }
  3463. if (!Array.isArray(this._renderProperties)) {
  3464. this._renderProperties = [this._renderProperties];
  3465. }
  3466. var renderProperty;
  3467. for (var i in this._renderProperties) {
  3468. renderProperty = this._renderProperties[i];
  3469. var options = (0, _merge2.default)(this._options, renderProperty.options);
  3470. if (options.format == "auto") {
  3471. options.format = autoSelectBarcode();
  3472. }
  3473. this._errorHandler.wrapBarcodeCall(function() {
  3474. var text = options.value;
  3475. var Encoder = _barcodes2.default[options.format.toUpperCase()];
  3476. var encoded = encode(text, Encoder, options);
  3477. render(renderProperty, encoded, options);
  3478. });
  3479. }
  3480. };
  3481. API.prototype.render = function() {
  3482. if (!this._renderProperties) {
  3483. throw new _exceptions.NoElementException();
  3484. }
  3485. if (Array.isArray(this._renderProperties)) {
  3486. for (var i = 0; i < this._renderProperties.length; i++) {
  3487. render(this._renderProperties[i], this._encodings, this._options);
  3488. }
  3489. } else {
  3490. render(this._renderProperties, this._encodings, this._options);
  3491. }
  3492. return this;
  3493. };
  3494. API.prototype._defaults = _defaults2.default;
  3495. function render(renderProperties, encodings, options) {
  3496. encodings = (0, _linearizeEncodings2.default)(encodings);
  3497. for (var i = 0; i < encodings.length; i++) {
  3498. encodings[i].options = (0, _merge2.default)(options, encodings[i].options);
  3499. (0, _fixOptions2.default)(encodings[i].options);
  3500. }
  3501. (0, _fixOptions2.default)(options);
  3502. var Renderer = renderProperties.renderer;
  3503. var renderer = new Renderer(renderProperties.element, encodings, options);
  3504. renderer.render();
  3505. if (renderProperties.afterRender) {
  3506. renderProperties.afterRender();
  3507. }
  3508. }
  3509. if (typeof window !== "undefined") {
  3510. window.JsBarcode = JsBarcode;
  3511. }
  3512. if (typeof jQuery !== "undefined") {
  3513. jQuery.fn.JsBarcode = function(content, options) {
  3514. var elementArray = [];
  3515. jQuery(this).each(function() {
  3516. elementArray.push(this);
  3517. });
  3518. return JsBarcode(elementArray, content, options);
  3519. };
  3520. }
  3521. module.exports = JsBarcode;
  3522. }
  3523. });
  3524. export {
  3525. require_JsBarcode
  3526. };
  3527. //# sourceMappingURL=chunk-X7P65S4T.js.map