@learncard/react 2.8.61 → 2.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/base.css +1 -1
- package/dist/base.js +1 -1
- package/dist/cjs/AchievementCard-c43817f2.js +87 -0
- package/dist/cjs/{AchievementCard-dd332f3f.js.map → AchievementCard-c43817f2.js.map} +1 -1
- package/dist/cjs/BoostGenericCard-a239e89c.js +180 -0
- package/dist/cjs/BoostGenericCard-a239e89c.js.map +1 -0
- package/dist/cjs/BoostSmallCard-3e303698.js +165 -0
- package/dist/cjs/{BoostSmallCard-dd1cbd51.js.map → BoostSmallCard-3e303698.js.map} +1 -1
- package/dist/cjs/{Button-a7af702b.js → Button-9ebe120c.js} +10 -6
- package/dist/cjs/{Button-a7af702b.js.map → Button-9ebe120c.js.map} +1 -1
- package/dist/cjs/CertificateDisplayCard-b299f7fd.js +891 -0
- package/dist/cjs/CertificateDisplayCard-b299f7fd.js.map +1 -0
- package/dist/cjs/Checkmark-74444a78.js +79 -0
- package/dist/cjs/{Checkmark-f611aa4d.js.map → Checkmark-74444a78.js.map} +1 -1
- package/dist/cjs/{CircleCheckButton-82d47ee2.js → CircleCheckButton-f76e5b5d.js} +11 -9
- package/dist/cjs/{CircleCheckButton-82d47ee2.js.map → CircleCheckButton-f76e5b5d.js.map} +1 -1
- package/dist/cjs/{CircleIcon-617c38fa.js → CircleIcon-f0fa68c7.js} +14 -30
- package/dist/cjs/{CircleIcon-617c38fa.js.map → CircleIcon-f0fa68c7.js.map} +1 -1
- package/dist/cjs/{CircleSpinner-093cce04.js → CircleSpinner-f518569a.js} +2 -13
- package/dist/cjs/{CircleSpinner-093cce04.js.map → CircleSpinner-f518569a.js.map} +1 -1
- package/dist/cjs/Coins-1f33b7ad.js +20 -0
- package/dist/cjs/{Coins-acd63f46.js.map → Coins-1f33b7ad.js.map} +1 -1
- package/dist/cjs/CourseCard-bc699307.js +88 -0
- package/dist/cjs/{CourseCard-338a32ee.js.map → CourseCard-bc699307.js.map} +1 -1
- package/dist/cjs/CourseVerticalCard-554ff1b7.js +116 -0
- package/dist/cjs/{CourseVerticalCard-841960b1.js.map → CourseVerticalCard-554ff1b7.js.map} +1 -1
- package/dist/cjs/{FlippyCard-209549c5.js → FlippyCard-bf0fd493.js} +3 -16
- package/dist/cjs/{FlippyCard-209549c5.js.map → FlippyCard-bf0fd493.js.map} +1 -1
- package/dist/cjs/GenericArrow-5c392276.js +34 -0
- package/dist/cjs/{GenericArrow-8dfb261d.js.map → GenericArrow-5c392276.js.map} +1 -1
- package/dist/cjs/GenericCard-2b20ab4b.js +66 -0
- package/dist/cjs/{GenericCard-ad18c4c3.js.map → GenericCard-2b20ab4b.js.map} +1 -1
- package/dist/cjs/IDDisplayIcon-4b6ce62f.js +234 -0
- package/dist/cjs/{IDDisplayIcon-62993df0.js.map → IDDisplayIcon-4b6ce62f.js.map} +1 -1
- package/dist/cjs/JobHistoryCard-e9ac7a1a.js +35 -0
- package/dist/cjs/{JobHistoryCard-05a3f98b.js.map → JobHistoryCard-e9ac7a1a.js.map} +1 -1
- package/dist/cjs/JobListCard-c53660e8.js +124 -0
- package/dist/cjs/{JobListCard-f74f0302.js.map → JobListCard-c53660e8.js.map} +1 -1
- package/dist/cjs/LearnCardCreditCardBackFace-62330eea.js +83 -0
- package/dist/cjs/{LearnCardCreditCardBackFace-87cc8b9f.js.map → LearnCardCreditCardBackFace-62330eea.js.map} +1 -1
- package/dist/cjs/LearnCardCreditCardFrontFace-aca1b7bc.js +89 -0
- package/dist/cjs/{LearnCardCreditCardFrontFace-39eeb89a.js.map → LearnCardCreditCardFrontFace-aca1b7bc.js.map} +1 -1
- package/dist/cjs/{LearnPill-d80ba2e6.js → LearnPill-da2d2a8e.js} +10 -10
- package/dist/cjs/{LearnPill-d80ba2e6.js.map → LearnPill-da2d2a8e.js.map} +1 -1
- package/dist/cjs/{Lightbox-9aeb2f7b.js → Lightbox-d72e19ba.js} +70 -58
- package/dist/cjs/{Lightbox-9aeb2f7b.js.map → Lightbox-d72e19ba.js.map} +1 -1
- package/dist/cjs/Lightbulb-82cec354.js +42 -0
- package/dist/cjs/{Lightbulb-19c89d3c.js.map → Lightbulb-82cec354.js.map} +1 -1
- package/dist/cjs/MeritBadgeDisplayCard-531dbb15.js +947 -0
- package/dist/cjs/MeritBadgeDisplayCard-531dbb15.js.map +1 -0
- package/dist/cjs/MeritBadgeSkillsCount-4ffd9166.js +36 -0
- package/dist/cjs/{MeritBadgeSkillsCount-54879719.js.map → MeritBadgeSkillsCount-4ffd9166.js.map} +1 -1
- package/dist/cjs/MiniVCThumbnail-9c510f51.js +85 -0
- package/dist/cjs/{MiniVCThumbnail-a78e44f2.js.map → MiniVCThumbnail-9c510f51.js.map} +1 -1
- package/dist/cjs/Notification-24d4de25.js +123 -0
- package/dist/cjs/{Notification-d212fa7b.js.map → Notification-24d4de25.js.map} +1 -1
- package/dist/cjs/NotificationBoostCard-abb23722.js +142 -0
- package/dist/cjs/{NotificationBoostCard-cf2140c0.js.map → NotificationBoostCard-abb23722.js.map} +1 -1
- package/dist/cjs/NotificationUserAcceptedBoostCard-31d8a89e.js +98 -0
- package/dist/cjs/{NotificationUserAcceptedBoostCard-423b9320.js.map → NotificationUserAcceptedBoostCard-31d8a89e.js.map} +1 -1
- package/dist/cjs/NotificationUserCard-59431df3.js +121 -0
- package/dist/cjs/{NotificationUserCard-d4dab06c.js.map → NotificationUserCard-59431df3.js.map} +1 -1
- package/dist/cjs/PuzzlePiece-e64f4596.js +97 -0
- package/dist/cjs/PuzzlePiece-e64f4596.js.map +1 -0
- package/dist/cjs/QRCodeCard-f0079bd9.js +49 -0
- package/dist/cjs/{QRCodeCard-b56c11cc.js.map → QRCodeCard-f0079bd9.js.map} +1 -1
- package/dist/cjs/QRCodeIcon-3021a53b.js +137 -0
- package/dist/cjs/{QRCodeIcon-81c6e96b.js.map → QRCodeIcon-3021a53b.js.map} +1 -1
- package/dist/cjs/RoundedPill-b54f3ac1.js +134 -0
- package/dist/cjs/{RoundedPill-bda7c067.js.map → RoundedPill-b54f3ac1.js.map} +1 -1
- package/dist/cjs/{SchoolIDCard-39a099d2.js → SchoolIDCard-e22d0d80.js} +661 -380
- package/dist/cjs/SchoolIDCard-e22d0d80.js.map +1 -0
- package/dist/cjs/SkillTabCard-efade17a.js +44 -0
- package/dist/cjs/{SkillTabCard-66677f3c.js.map → SkillTabCard-efade17a.js.map} +1 -1
- package/dist/cjs/SkillVerticalCard-62e308b4.js +37 -0
- package/dist/cjs/{SkillVerticalCard-3eb3a8e9.js.map → SkillVerticalCard-62e308b4.js.map} +1 -1
- package/dist/cjs/SkillsCard-dae73a71.js +57 -0
- package/dist/cjs/{SkillsCard-4b6dbb4f.js.map → SkillsCard-dae73a71.js.map} +1 -1
- package/dist/cjs/SkillsStatsCard-aeef796c.js +57 -0
- package/dist/cjs/{SkillsStatsCard-97a35a88.js.map → SkillsStatsCard-aeef796c.js.map} +1 -1
- package/dist/cjs/SmallAchievementCard-d22a4d25.js +53 -0
- package/dist/cjs/{SmallAchievementCard-a1fa862b.js.map → SmallAchievementCard-d22a4d25.js.map} +1 -1
- package/dist/cjs/ThreeDotVertical-dda0e747.js +57 -0
- package/dist/cjs/{ThreeDotVertical-1d221fc8.js.map → ThreeDotVertical-dda0e747.js.map} +1 -1
- package/dist/cjs/Trophy-9758f0cf.js +35 -0
- package/dist/cjs/{Trophy-3d323be3.js.map → Trophy-9758f0cf.js.map} +1 -1
- package/dist/cjs/User-54049eba.js +130 -0
- package/dist/cjs/{User-301088ac.js.map → User-54049eba.js.map} +1 -1
- package/dist/cjs/{UserProfilePicture-16b97343.js → UserProfilePicture-d69fe4f0.js} +18 -12
- package/dist/cjs/{UserProfilePicture-16b97343.js.map → UserProfilePicture-d69fe4f0.js.map} +1 -1
- package/dist/cjs/{VCCard-32aeadb3.js → VCCard-2683c65c.js} +29 -22
- package/dist/cjs/{VCCard-32aeadb3.js.map → VCCard-2683c65c.js.map} +1 -1
- package/dist/cjs/VCDisplayBackFace-a7428833.js +70 -0
- package/dist/cjs/{VCDisplayBackFace-4543749f.js.map → VCDisplayBackFace-a7428833.js.map} +1 -1
- package/dist/cjs/VCDisplayCard-b8882c8e.js +191 -0
- package/dist/cjs/{VCDisplayCard-353cc9ed.js.map → VCDisplayCard-b8882c8e.js.map} +1 -1
- package/dist/cjs/{VCDisplayCard2-50acd7c8.js → VCDisplayCard2-28f7df8e.js} +725 -694
- package/dist/cjs/VCDisplayCard2-28f7df8e.js.map +1 -0
- package/dist/cjs/VCThumbnail-f84d0d01.js +148 -0
- package/dist/cjs/{VCThumbnail-6bf86bb2.js.map → VCThumbnail-f84d0d01.js.map} +1 -1
- package/dist/cjs/VCVerificationCheck-92198135.js +78 -0
- package/dist/cjs/{VCVerificationCheck-46fa75d3.js.map → VCVerificationCheck-92198135.js.map} +1 -1
- package/dist/cjs/{VCVerificationPill-88723dfa.js → VCVerificationPill-729ac239.js} +11 -26
- package/dist/cjs/{VCVerificationPill-88723dfa.js.map → VCVerificationPill-729ac239.js.map} +1 -1
- package/dist/cjs/{VerifierStateBadgeAndText-08aea854.js → VerifierStateBadgeAndText-e46d8393.js} +420 -338
- package/dist/cjs/{VerifierStateBadgeAndText-08aea854.js.map → VerifierStateBadgeAndText-e46d8393.js.map} +1 -1
- package/dist/cjs/{constants-cd049889.js → constants-2430d4bc.js} +22 -30
- package/dist/cjs/{constants-cd049889.js.map → constants-2430d4bc.js.map} +1 -1
- package/dist/cjs/{credential.helpers-90b66932.js → credential.helpers-4f806327.js} +197 -156
- package/dist/cjs/{credential.helpers-90b66932.js.map → credential.helpers-4f806327.js.map} +1 -1
- package/dist/cjs/{icons-0404f605.js → icons-857d4be1.js} +2 -1
- package/dist/cjs/{icons-0404f605.js.map → icons-857d4be1.js.map} +1 -1
- package/dist/cjs/{index-a9e3ddf5.js → index-0cac2c5b.js} +1 -1
- package/dist/cjs/{index-a9e3ddf5.js.map → index-0cac2c5b.js.map} +1 -1
- package/dist/cjs/{index-08002ab6.js → index-ba659c28.js} +9 -1
- package/dist/cjs/{index-08002ab6.js.map → index-ba659c28.js.map} +1 -1
- package/dist/cjs/index.js +119 -62
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/index10.js +4 -4
- package/dist/cjs/index11.js +1 -1
- package/dist/cjs/index12.js +5 -5
- package/dist/cjs/index13.js +60 -61
- package/dist/cjs/index13.js.map +1 -1
- package/dist/cjs/index14.js +2 -2
- package/dist/cjs/index15.js +2 -2
- package/dist/cjs/index16.js +1 -1
- package/dist/cjs/index17.js +1 -1
- package/dist/cjs/index18.js +2 -2
- package/dist/cjs/index19.js +1 -1
- package/dist/cjs/index2.js +6 -6
- package/dist/cjs/index20.js +1 -1
- package/dist/cjs/index21.js +11 -11
- package/dist/cjs/index22.js +1 -1
- package/dist/cjs/index23.js +7 -7
- package/dist/cjs/index24.js +8 -8
- package/dist/cjs/index25.js +1 -1
- package/dist/cjs/index26.js +2 -2
- package/dist/cjs/index27.js +1 -1
- package/dist/cjs/index28.js +2 -2
- package/dist/cjs/index29.js +5 -5
- package/dist/cjs/index3.js +13 -14
- package/dist/cjs/index3.js.map +1 -1
- package/dist/cjs/index30.js +1 -1
- package/dist/cjs/index31.js +1 -1
- package/dist/cjs/index32.js +1 -1
- package/dist/cjs/index33.js +4 -4
- package/dist/cjs/index34.js +1 -1
- package/dist/cjs/index35.js +2 -2
- package/dist/cjs/index36.js +9 -9
- package/dist/cjs/index37.js +1 -1
- package/dist/cjs/index38.js +20 -21
- package/dist/cjs/index38.js.map +1 -1
- package/dist/cjs/index39.js +10 -10
- package/dist/cjs/index4.js +7 -7
- package/dist/cjs/index40.js +13 -13
- package/dist/cjs/index41.js +15 -16
- package/dist/cjs/index41.js.map +1 -1
- package/dist/cjs/index42.js +2 -2
- package/dist/cjs/index43.js +1 -1
- package/dist/cjs/index44.js +2 -2
- package/dist/cjs/index45.js +2 -2
- package/dist/cjs/index5.js +1 -1
- package/dist/cjs/index6.js +11 -12
- package/dist/cjs/index6.js.map +1 -1
- package/dist/cjs/index7.js +3 -3
- package/dist/cjs/index8.js +3 -3
- package/dist/cjs/index9.js +1 -1
- package/dist/cjs/{types-8eab1382.js → types-91d0677b.js} +24 -23
- package/dist/cjs/{types-8eab1382.js.map → types-91d0677b.js.map} +1 -1
- package/dist/cjs/types-e4d9a257.js.map +1 -1
- package/dist/cjs/types.esm-beffa54c.js +5386 -0
- package/dist/cjs/types.esm-beffa54c.js.map +1 -0
- package/dist/esm/AchievementCard-e80836dd.js +81 -0
- package/dist/esm/{AchievementCard-d179d041.js.map → AchievementCard-e80836dd.js.map} +1 -1
- package/dist/esm/BoostGenericCard-b5e522ea.js +174 -0
- package/dist/esm/BoostGenericCard-b5e522ea.js.map +1 -0
- package/dist/esm/BoostSmallCard-ddefe808.js +157 -0
- package/dist/esm/{BoostSmallCard-42980ebc.js.map → BoostSmallCard-ddefe808.js.map} +1 -1
- package/dist/esm/Button-70eedbf6.js +16 -0
- package/dist/esm/{Button-5f805204.js.map → Button-70eedbf6.js.map} +1 -1
- package/dist/esm/CertificateDisplayCard-0ceeb71a.js +879 -0
- package/dist/esm/CertificateDisplayCard-0ceeb71a.js.map +1 -0
- package/dist/esm/Checkmark-724d5d17.js +73 -0
- package/dist/esm/{Checkmark-d8b8f43d.js.map → Checkmark-724d5d17.js.map} +1 -1
- package/dist/esm/CircleCheckButton-23a9c7d4.js +26 -0
- package/dist/esm/{CircleCheckButton-5a97f071.js.map → CircleCheckButton-23a9c7d4.js.map} +1 -1
- package/dist/esm/{CircleIcon-4200733b.js → CircleIcon-abd5ff06.js} +14 -30
- package/dist/esm/{CircleIcon-4200733b.js.map → CircleIcon-abd5ff06.js.map} +1 -1
- package/dist/esm/{CircleSpinner-9b8b1a6b.js → CircleSpinner-03a329fc.js} +2 -13
- package/dist/esm/{CircleSpinner-9b8b1a6b.js.map → CircleSpinner-03a329fc.js.map} +1 -1
- package/dist/esm/Coins-e9f35519.js +14 -0
- package/dist/esm/{Coins-ed119ec6.js.map → Coins-e9f35519.js.map} +1 -1
- package/dist/esm/CourseCard-990fdc99.js +78 -0
- package/dist/esm/{CourseCard-663ff174.js.map → CourseCard-990fdc99.js.map} +1 -1
- package/dist/esm/CourseVerticalCard-aae0c030.js +106 -0
- package/dist/esm/{CourseVerticalCard-130b0d91.js.map → CourseVerticalCard-aae0c030.js.map} +1 -1
- package/dist/esm/FlippyCard-458dc9b1.js +15 -0
- package/dist/esm/{FlippyCard-a2de5cf1.js.map → FlippyCard-458dc9b1.js.map} +1 -1
- package/dist/esm/GenericArrow-b2822cf6.js +28 -0
- package/dist/esm/{GenericArrow-0dba1707.js.map → GenericArrow-b2822cf6.js.map} +1 -1
- package/dist/esm/GenericCard-24648e62.js +60 -0
- package/dist/esm/{GenericCard-4bb4220a.js.map → GenericCard-24648e62.js.map} +1 -1
- package/dist/esm/IDDisplayIcon-d87174fd.js +224 -0
- package/dist/esm/{IDDisplayIcon-82a851e7.js.map → IDDisplayIcon-d87174fd.js.map} +1 -1
- package/dist/esm/JobHistoryCard-e71ab2c7.js +29 -0
- package/dist/esm/{JobHistoryCard-80d4ef27.js.map → JobHistoryCard-e71ab2c7.js.map} +1 -1
- package/dist/esm/JobListCard-e8b4ab33.js +117 -0
- package/dist/esm/{JobListCard-0d1c4184.js.map → JobListCard-e8b4ab33.js.map} +1 -1
- package/dist/esm/LearnCardCreditCardBackFace-56642837.js +76 -0
- package/dist/esm/{LearnCardCreditCardBackFace-9baa9e6b.js.map → LearnCardCreditCardBackFace-56642837.js.map} +1 -1
- package/dist/esm/LearnCardCreditCardFrontFace-b7c917f5.js +81 -0
- package/dist/esm/{LearnCardCreditCardFrontFace-d50efb25.js.map → LearnCardCreditCardFrontFace-b7c917f5.js.map} +1 -1
- package/dist/esm/{LearnPill-74bcb08c.js → LearnPill-e0720485.js} +10 -10
- package/dist/esm/{LearnPill-74bcb08c.js.map → LearnPill-e0720485.js.map} +1 -1
- package/dist/esm/{Lightbox-2ae83d79.js → Lightbox-f0338a0c.js} +70 -58
- package/dist/esm/{Lightbox-2ae83d79.js.map → Lightbox-f0338a0c.js.map} +1 -1
- package/dist/esm/Lightbulb-7e24711e.js +35 -0
- package/dist/esm/{Lightbulb-b6eca510.js.map → Lightbulb-7e24711e.js.map} +1 -1
- package/dist/esm/MeritBadgeDisplayCard-4b8fe8e4.js +937 -0
- package/dist/esm/MeritBadgeDisplayCard-4b8fe8e4.js.map +1 -0
- package/dist/esm/MeritBadgeSkillsCount-cd2f3f6d.js +30 -0
- package/dist/esm/{MeritBadgeSkillsCount-d2408dfe.js.map → MeritBadgeSkillsCount-cd2f3f6d.js.map} +1 -1
- package/dist/esm/MiniVCThumbnail-cc05e1f8.js +78 -0
- package/dist/esm/{MiniVCThumbnail-6a07e810.js.map → MiniVCThumbnail-cc05e1f8.js.map} +1 -1
- package/dist/esm/Notification-279ba207.js +117 -0
- package/dist/esm/{Notification-95d159d2.js.map → Notification-279ba207.js.map} +1 -1
- package/dist/esm/NotificationBoostCard-cf11d747.js +134 -0
- package/dist/esm/{NotificationBoostCard-42596c2c.js.map → NotificationBoostCard-cf11d747.js.map} +1 -1
- package/dist/esm/NotificationUserAcceptedBoostCard-a1269382.js +90 -0
- package/dist/esm/{NotificationUserAcceptedBoostCard-8c13bd3f.js.map → NotificationUserAcceptedBoostCard-a1269382.js.map} +1 -1
- package/dist/esm/NotificationUserCard-c109c442.js +113 -0
- package/dist/esm/{NotificationUserCard-dbcc80f9.js.map → NotificationUserCard-c109c442.js.map} +1 -1
- package/dist/esm/PuzzlePiece-a3d9cc62.js +91 -0
- package/dist/esm/PuzzlePiece-a3d9cc62.js.map +1 -0
- package/dist/esm/QRCodeCard-8f29c3c7.js +43 -0
- package/dist/esm/{QRCodeCard-aa2b9967.js.map → QRCodeCard-8f29c3c7.js.map} +1 -1
- package/dist/esm/QRCodeIcon-8eef4f7c.js +129 -0
- package/dist/esm/{QRCodeIcon-e9569804.js.map → QRCodeIcon-8eef4f7c.js.map} +1 -1
- package/dist/esm/RoundedPill-50279e5d.js +127 -0
- package/dist/esm/{RoundedPill-6a6e8aaf.js.map → RoundedPill-50279e5d.js.map} +1 -1
- package/dist/esm/{SchoolIDCard-752092fb.js → SchoolIDCard-8b151cd3.js} +661 -380
- package/dist/esm/SchoolIDCard-8b151cd3.js.map +1 -0
- package/dist/esm/SkillTabCard-f2edb3fc.js +38 -0
- package/dist/esm/{SkillTabCard-cfe117a2.js.map → SkillTabCard-f2edb3fc.js.map} +1 -1
- package/dist/esm/SkillVerticalCard-045169f9.js +30 -0
- package/dist/esm/{SkillVerticalCard-108f49bb.js.map → SkillVerticalCard-045169f9.js.map} +1 -1
- package/dist/esm/SkillsCard-5279aac9.js +50 -0
- package/dist/esm/{SkillsCard-92a51db2.js.map → SkillsCard-5279aac9.js.map} +1 -1
- package/dist/esm/SkillsStatsCard-e0cd6137.js +50 -0
- package/dist/esm/{SkillsStatsCard-1628fe9c.js.map → SkillsStatsCard-e0cd6137.js.map} +1 -1
- package/dist/esm/SmallAchievementCard-24dfa453.js +47 -0
- package/dist/esm/{SmallAchievementCard-d0220751.js.map → SmallAchievementCard-24dfa453.js.map} +1 -1
- package/dist/esm/ThreeDotVertical-ccbbc8ef.js +51 -0
- package/dist/esm/{ThreeDotVertical-08294477.js.map → ThreeDotVertical-ccbbc8ef.js.map} +1 -1
- package/dist/esm/Trophy-fc7fdec4.js +29 -0
- package/dist/esm/{Trophy-ad67f46a.js.map → Trophy-fc7fdec4.js.map} +1 -1
- package/dist/esm/User-f5ea0f01.js +122 -0
- package/dist/esm/{User-161c7f37.js.map → User-f5ea0f01.js.map} +1 -1
- package/dist/esm/{UserProfilePicture-ecc82a6c.js → UserProfilePicture-7b950437.js} +18 -12
- package/dist/esm/{UserProfilePicture-ecc82a6c.js.map → UserProfilePicture-7b950437.js.map} +1 -1
- package/dist/esm/{VCCard-afbea3f5.js → VCCard-04ecb3db.js} +29 -22
- package/dist/esm/{VCCard-afbea3f5.js.map → VCCard-04ecb3db.js.map} +1 -1
- package/dist/esm/VCDisplayBackFace-1760601a.js +63 -0
- package/dist/esm/{VCDisplayBackFace-f08563e9.js.map → VCDisplayBackFace-1760601a.js.map} +1 -1
- package/dist/esm/VCDisplayCard-3d67e2bc.js +184 -0
- package/dist/esm/{VCDisplayCard-7fc1dd02.js.map → VCDisplayCard-3d67e2bc.js.map} +1 -1
- package/dist/esm/{VCDisplayCard2-415128f5.js → VCDisplayCard2-fb8abe89.js} +725 -694
- package/dist/esm/VCDisplayCard2-fb8abe89.js.map +1 -0
- package/dist/esm/VCThumbnail-835921dd.js +140 -0
- package/dist/esm/{VCThumbnail-3c254bda.js.map → VCThumbnail-835921dd.js.map} +1 -1
- package/dist/esm/VCVerificationCheck-8b8b7a76.js +69 -0
- package/dist/esm/{VCVerificationCheck-80249524.js.map → VCVerificationCheck-8b8b7a76.js.map} +1 -1
- package/dist/esm/VCVerificationPill-77596013.js +50 -0
- package/dist/esm/{VCVerificationPill-2ef031c2.js.map → VCVerificationPill-77596013.js.map} +1 -1
- package/dist/esm/{VerifierStateBadgeAndText-151db666.js → VerifierStateBadgeAndText-490c08dc.js} +420 -338
- package/dist/esm/{VerifierStateBadgeAndText-151db666.js.map → VerifierStateBadgeAndText-490c08dc.js.map} +1 -1
- package/dist/esm/{constants-20055f35.js → constants-f1ed610c.js} +22 -30
- package/dist/esm/{constants-20055f35.js.map → constants-f1ed610c.js.map} +1 -1
- package/dist/esm/{credential.helpers-5731a09d.js → credential.helpers-1b1ff55e.js} +197 -156
- package/dist/esm/{credential.helpers-5731a09d.js.map → credential.helpers-1b1ff55e.js.map} +1 -1
- package/dist/esm/{icons-03afd795.js → icons-fdd35170.js} +2 -1
- package/dist/esm/{icons-03afd795.js.map → icons-fdd35170.js.map} +1 -1
- package/dist/esm/{index-b102febc.js → index-cbe3a76a.js} +9 -1
- package/dist/esm/{index-b102febc.js.map → index-cbe3a76a.js.map} +1 -1
- package/dist/esm/{index-1fa04a2d.js → index-eae3ca64.js} +1 -1
- package/dist/esm/{index-1fa04a2d.js.map → index-eae3ca64.js.map} +1 -1
- package/dist/esm/index.js +116 -61
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/index10.js +4 -4
- package/dist/esm/index11.js +1 -1
- package/dist/esm/index12.js +5 -5
- package/dist/esm/index13.js +59 -60
- package/dist/esm/index13.js.map +1 -1
- package/dist/esm/index14.js +2 -2
- package/dist/esm/index15.js +2 -2
- package/dist/esm/index16.js +1 -1
- package/dist/esm/index17.js +1 -1
- package/dist/esm/index18.js +2 -2
- package/dist/esm/index19.js +1 -1
- package/dist/esm/index2.js +6 -6
- package/dist/esm/index20.js +1 -1
- package/dist/esm/index21.js +11 -11
- package/dist/esm/index22.js +1 -1
- package/dist/esm/index23.js +7 -7
- package/dist/esm/index24.js +8 -8
- package/dist/esm/index25.js +1 -1
- package/dist/esm/index26.js +2 -2
- package/dist/esm/index27.js +1 -1
- package/dist/esm/index28.js +2 -2
- package/dist/esm/index29.js +5 -5
- package/dist/esm/index3.js +13 -14
- package/dist/esm/index3.js.map +1 -1
- package/dist/esm/index30.js +1 -1
- package/dist/esm/index31.js +1 -1
- package/dist/esm/index32.js +1 -1
- package/dist/esm/index33.js +4 -4
- package/dist/esm/index34.js +1 -1
- package/dist/esm/index35.js +2 -2
- package/dist/esm/index36.js +9 -9
- package/dist/esm/index37.js +1 -1
- package/dist/esm/index38.js +20 -21
- package/dist/esm/index38.js.map +1 -1
- package/dist/esm/index39.js +10 -10
- package/dist/esm/index4.js +7 -7
- package/dist/esm/index40.js +13 -13
- package/dist/esm/index41.js +15 -16
- package/dist/esm/index41.js.map +1 -1
- package/dist/esm/index42.js +2 -2
- package/dist/esm/index43.js +1 -1
- package/dist/esm/index44.js +2 -2
- package/dist/esm/index45.js +2 -2
- package/dist/esm/index5.js +1 -1
- package/dist/esm/index6.js +10 -11
- package/dist/esm/index6.js.map +1 -1
- package/dist/esm/index7.js +3 -3
- package/dist/esm/index8.js +3 -3
- package/dist/esm/index9.js +1 -1
- package/dist/esm/types-b32d28d5.js.map +1 -1
- package/dist/esm/{types-cfde3c2b.js → types-c765e2a4.js} +24 -23
- package/dist/esm/{types-cfde3c2b.js.map → types-c765e2a4.js.map} +1 -1
- package/dist/esm/types.esm-8798df50.js +5384 -0
- package/dist/esm/types.esm-8798df50.js.map +1 -0
- package/dist/index.d.ts +16 -2
- package/dist/main.css +1 -1
- package/dist/main.js +1 -1
- package/package.json +12 -5
- package/dist/cjs/AchievementCard-dd332f3f.js +0 -67
- package/dist/cjs/BoostGenericCard-dd01e934.js +0 -126
- package/dist/cjs/BoostGenericCard-dd01e934.js.map +0 -1
- package/dist/cjs/BoostSmallCard-dd1cbd51.js +0 -164
- package/dist/cjs/CertDisplayCardSkillsCount-8cc13d5b.js +0 -45
- package/dist/cjs/CertDisplayCardSkillsCount-8cc13d5b.js.map +0 -1
- package/dist/cjs/CertificateDisplayCard-e228ff3d.js +0 -830
- package/dist/cjs/CertificateDisplayCard-e228ff3d.js.map +0 -1
- package/dist/cjs/Checkmark-f611aa4d.js +0 -58
- package/dist/cjs/Coins-acd63f46.js +0 -22
- package/dist/cjs/CourseCard-338a32ee.js +0 -92
- package/dist/cjs/CourseVerticalCard-841960b1.js +0 -98
- package/dist/cjs/GenericArrow-8dfb261d.js +0 -27
- package/dist/cjs/GenericCard-ad18c4c3.js +0 -60
- package/dist/cjs/IDDisplayIcon-62993df0.js +0 -226
- package/dist/cjs/JobHistoryCard-05a3f98b.js +0 -43
- package/dist/cjs/JobListCard-f74f0302.js +0 -127
- package/dist/cjs/LearnCardCreditCardBackFace-87cc8b9f.js +0 -72
- package/dist/cjs/LearnCardCreditCardFrontFace-39eeb89a.js +0 -78
- package/dist/cjs/Lightbulb-19c89d3c.js +0 -37
- package/dist/cjs/MeritBadgeDisplayCard-5cbc63e8.js +0 -910
- package/dist/cjs/MeritBadgeDisplayCard-5cbc63e8.js.map +0 -1
- package/dist/cjs/MeritBadgeSkillsCount-54879719.js +0 -40
- package/dist/cjs/MiniVCThumbnail-a78e44f2.js +0 -69
- package/dist/cjs/Notification-d212fa7b.js +0 -94
- package/dist/cjs/NotificationBoostCard-cf2140c0.js +0 -120
- package/dist/cjs/NotificationUserAcceptedBoostCard-423b9320.js +0 -74
- package/dist/cjs/NotificationUserCard-d4dab06c.js +0 -94
- package/dist/cjs/PuzzlePiece-937c216a.js +0 -31
- package/dist/cjs/PuzzlePiece-937c216a.js.map +0 -1
- package/dist/cjs/QRCodeCard-b56c11cc.js +0 -42
- package/dist/cjs/QRCodeIcon-81c6e96b.js +0 -96
- package/dist/cjs/RoundedPill-bda7c067.js +0 -106
- package/dist/cjs/SchoolIDCard-39a099d2.js.map +0 -1
- package/dist/cjs/SkillTabCard-66677f3c.js +0 -42
- package/dist/cjs/SkillVerticalCard-3eb3a8e9.js +0 -35
- package/dist/cjs/SkillsCard-4b6dbb4f.js +0 -66
- package/dist/cjs/SkillsStatsCard-97a35a88.js +0 -77
- package/dist/cjs/SmallAchievementCard-a1fa862b.js +0 -43
- package/dist/cjs/ThreeDotVertical-1d221fc8.js +0 -42
- package/dist/cjs/Trophy-3d323be3.js +0 -28
- package/dist/cjs/User-301088ac.js +0 -93
- package/dist/cjs/VCDisplayBackFace-4543749f.js +0 -87
- package/dist/cjs/VCDisplayCard-353cc9ed.js +0 -180
- package/dist/cjs/VCDisplayCard2-50acd7c8.js.map +0 -1
- package/dist/cjs/VCThumbnail-6bf86bb2.js +0 -143
- package/dist/cjs/VCVerificationCheck-46fa75d3.js +0 -81
- package/dist/cjs/types.esm-6ce4cc67.js +0 -5675
- package/dist/cjs/types.esm-6ce4cc67.js.map +0 -1
- package/dist/esm/AchievementCard-d179d041.js +0 -61
- package/dist/esm/BoostGenericCard-5b70fa63.js +0 -120
- package/dist/esm/BoostGenericCard-5b70fa63.js.map +0 -1
- package/dist/esm/BoostSmallCard-42980ebc.js +0 -156
- package/dist/esm/Button-5f805204.js +0 -12
- package/dist/esm/CertDisplayCardSkillsCount-c5a21373.js +0 -39
- package/dist/esm/CertDisplayCardSkillsCount-c5a21373.js.map +0 -1
- package/dist/esm/CertificateDisplayCard-d2a0d0e3.js +0 -819
- package/dist/esm/CertificateDisplayCard-d2a0d0e3.js.map +0 -1
- package/dist/esm/Checkmark-d8b8f43d.js +0 -52
- package/dist/esm/CircleCheckButton-5a97f071.js +0 -24
- package/dist/esm/Coins-ed119ec6.js +0 -16
- package/dist/esm/CourseCard-663ff174.js +0 -82
- package/dist/esm/CourseVerticalCard-130b0d91.js +0 -88
- package/dist/esm/FlippyCard-a2de5cf1.js +0 -28
- package/dist/esm/GenericArrow-0dba1707.js +0 -21
- package/dist/esm/GenericCard-4bb4220a.js +0 -54
- package/dist/esm/IDDisplayIcon-82a851e7.js +0 -216
- package/dist/esm/JobHistoryCard-80d4ef27.js +0 -37
- package/dist/esm/JobListCard-0d1c4184.js +0 -120
- package/dist/esm/LearnCardCreditCardBackFace-9baa9e6b.js +0 -65
- package/dist/esm/LearnCardCreditCardFrontFace-d50efb25.js +0 -70
- package/dist/esm/Lightbulb-b6eca510.js +0 -30
- package/dist/esm/MeritBadgeDisplayCard-bc462990.js +0 -900
- package/dist/esm/MeritBadgeDisplayCard-bc462990.js.map +0 -1
- package/dist/esm/MeritBadgeSkillsCount-d2408dfe.js +0 -34
- package/dist/esm/MiniVCThumbnail-6a07e810.js +0 -62
- package/dist/esm/Notification-95d159d2.js +0 -88
- package/dist/esm/NotificationBoostCard-42596c2c.js +0 -112
- package/dist/esm/NotificationUserAcceptedBoostCard-8c13bd3f.js +0 -66
- package/dist/esm/NotificationUserCard-dbcc80f9.js +0 -86
- package/dist/esm/PuzzlePiece-1fb12c2e.js +0 -25
- package/dist/esm/PuzzlePiece-1fb12c2e.js.map +0 -1
- package/dist/esm/QRCodeCard-aa2b9967.js +0 -36
- package/dist/esm/QRCodeIcon-e9569804.js +0 -88
- package/dist/esm/RoundedPill-6a6e8aaf.js +0 -99
- package/dist/esm/SchoolIDCard-752092fb.js.map +0 -1
- package/dist/esm/SkillTabCard-cfe117a2.js +0 -36
- package/dist/esm/SkillVerticalCard-108f49bb.js +0 -28
- package/dist/esm/SkillsCard-92a51db2.js +0 -59
- package/dist/esm/SkillsStatsCard-1628fe9c.js +0 -70
- package/dist/esm/SmallAchievementCard-d0220751.js +0 -37
- package/dist/esm/ThreeDotVertical-08294477.js +0 -36
- package/dist/esm/Trophy-ad67f46a.js +0 -22
- package/dist/esm/User-161c7f37.js +0 -85
- package/dist/esm/VCDisplayBackFace-f08563e9.js +0 -80
- package/dist/esm/VCDisplayCard-7fc1dd02.js +0 -173
- package/dist/esm/VCDisplayCard2-415128f5.js.map +0 -1
- package/dist/esm/VCThumbnail-3c254bda.js +0 -135
- package/dist/esm/VCVerificationCheck-80249524.js +0 -72
- package/dist/esm/VCVerificationPill-2ef031c2.js +0 -65
- package/dist/esm/types.esm-00eeb9f6.js +0 -5673
- package/dist/esm/types.esm-00eeb9f6.js.map +0 -1
|
@@ -10,10 +10,10 @@ Object.defineProperty(Barcode$2, "__esModule", {
|
|
|
10
10
|
value: true
|
|
11
11
|
});
|
|
12
12
|
|
|
13
|
-
function _classCallCheck$
|
|
13
|
+
function _classCallCheck$v(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
14
14
|
|
|
15
15
|
var Barcode$1 = function Barcode(data, options) {
|
|
16
|
-
_classCallCheck$
|
|
16
|
+
_classCallCheck$v(this, Barcode);
|
|
17
17
|
|
|
18
18
|
this.data = data;
|
|
19
19
|
this.text = options.text || data;
|
|
@@ -27,26 +27,26 @@ Object.defineProperty(CODE39$1, "__esModule", {
|
|
|
27
27
|
});
|
|
28
28
|
CODE39$1.CODE39 = undefined;
|
|
29
29
|
|
|
30
|
-
var _createClass$
|
|
30
|
+
var _createClass$o = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
31
31
|
|
|
32
|
-
var _Barcode2$
|
|
32
|
+
var _Barcode2$c = Barcode$2;
|
|
33
33
|
|
|
34
|
-
var _Barcode3$
|
|
34
|
+
var _Barcode3$c = _interopRequireDefault$B(_Barcode2$c);
|
|
35
35
|
|
|
36
|
-
function _interopRequireDefault$
|
|
36
|
+
function _interopRequireDefault$B(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
37
37
|
|
|
38
|
-
function _classCallCheck$
|
|
38
|
+
function _classCallCheck$u(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
39
39
|
|
|
40
|
-
function _possibleConstructorReturn$
|
|
40
|
+
function _possibleConstructorReturn$q(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
|
41
41
|
|
|
42
|
-
function _inherits$
|
|
42
|
+
function _inherits$q(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Encoding documentation:
|
|
43
43
|
// https://en.wikipedia.org/wiki/Code_39#Encoding
|
|
44
44
|
|
|
45
45
|
var CODE39 = function (_Barcode) {
|
|
46
|
-
_inherits$
|
|
46
|
+
_inherits$q(CODE39, _Barcode);
|
|
47
47
|
|
|
48
48
|
function CODE39(data, options) {
|
|
49
|
-
_classCallCheck$
|
|
49
|
+
_classCallCheck$u(this, CODE39);
|
|
50
50
|
|
|
51
51
|
data = data.toUpperCase();
|
|
52
52
|
|
|
@@ -55,10 +55,10 @@ var CODE39 = function (_Barcode) {
|
|
|
55
55
|
data += getCharacter(mod43checksum(data));
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
return _possibleConstructorReturn$
|
|
58
|
+
return _possibleConstructorReturn$q(this, (CODE39.__proto__ || Object.getPrototypeOf(CODE39)).call(this, data, options));
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
_createClass$
|
|
61
|
+
_createClass$o(CODE39, [{
|
|
62
62
|
key: "encode",
|
|
63
63
|
value: function encode() {
|
|
64
64
|
// First character is always a *
|
|
@@ -85,7 +85,7 @@ var CODE39 = function (_Barcode) {
|
|
|
85
85
|
}]);
|
|
86
86
|
|
|
87
87
|
return CODE39;
|
|
88
|
-
}(_Barcode3$
|
|
88
|
+
}(_Barcode3$c.default);
|
|
89
89
|
|
|
90
90
|
// All characters. The position in the array is the (checksum) value
|
|
91
91
|
|
|
@@ -132,9 +132,9 @@ var CODE128_AUTO = {};
|
|
|
132
132
|
|
|
133
133
|
var CODE128$1 = {};
|
|
134
134
|
|
|
135
|
-
var constants$
|
|
135
|
+
var constants$3 = {};
|
|
136
136
|
|
|
137
|
-
Object.defineProperty(constants$
|
|
137
|
+
Object.defineProperty(constants$3, "__esModule", {
|
|
138
138
|
value: true
|
|
139
139
|
});
|
|
140
140
|
|
|
@@ -143,80 +143,80 @@ var _SET_BY_CODE;
|
|
|
143
143
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
144
144
|
|
|
145
145
|
// constants for internal usage
|
|
146
|
-
var SET_A = constants$
|
|
147
|
-
var SET_B = constants$
|
|
148
|
-
var SET_C = constants$
|
|
146
|
+
var SET_A = constants$3.SET_A = 0;
|
|
147
|
+
var SET_B = constants$3.SET_B = 1;
|
|
148
|
+
var SET_C = constants$3.SET_C = 2;
|
|
149
149
|
|
|
150
150
|
// Special characters
|
|
151
|
-
constants$
|
|
152
|
-
var START_A = constants$
|
|
153
|
-
var START_B = constants$
|
|
154
|
-
var START_C = constants$
|
|
155
|
-
constants$
|
|
156
|
-
constants$
|
|
157
|
-
constants$
|
|
151
|
+
constants$3.SHIFT = 98;
|
|
152
|
+
var START_A = constants$3.START_A = 103;
|
|
153
|
+
var START_B = constants$3.START_B = 104;
|
|
154
|
+
var START_C = constants$3.START_C = 105;
|
|
155
|
+
constants$3.MODULO = 103;
|
|
156
|
+
constants$3.STOP = 106;
|
|
157
|
+
constants$3.FNC1 = 207;
|
|
158
158
|
|
|
159
159
|
// Get set by start code
|
|
160
|
-
constants$
|
|
160
|
+
constants$3.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);
|
|
161
161
|
|
|
162
162
|
// Get next set by code
|
|
163
|
-
constants$
|
|
163
|
+
constants$3.SWAP = {
|
|
164
164
|
101: SET_A,
|
|
165
165
|
100: SET_B,
|
|
166
166
|
99: SET_C
|
|
167
167
|
};
|
|
168
168
|
|
|
169
|
-
constants$
|
|
170
|
-
constants$
|
|
171
|
-
constants$
|
|
169
|
+
constants$3.A_START_CHAR = String.fromCharCode(208); // START_A + 105
|
|
170
|
+
constants$3.B_START_CHAR = String.fromCharCode(209); // START_B + 105
|
|
171
|
+
constants$3.C_START_CHAR = String.fromCharCode(210); // START_C + 105
|
|
172
172
|
|
|
173
173
|
// 128A (Code Set A)
|
|
174
174
|
// ASCII characters 00 to 95 (0–9, A–Z and control codes), special characters, and FNC 1–4
|
|
175
|
-
constants$
|
|
175
|
+
constants$3.A_CHARS = "[\x00-\x5F\xC8-\xCF]";
|
|
176
176
|
|
|
177
177
|
// 128B (Code Set B)
|
|
178
178
|
// ASCII characters 32 to 127 (0–9, A–Z, a–z), special characters, and FNC 1–4
|
|
179
|
-
constants$
|
|
179
|
+
constants$3.B_CHARS = "[\x20-\x7F\xC8-\xCF]";
|
|
180
180
|
|
|
181
181
|
// 128C (Code Set C)
|
|
182
182
|
// 00–99 (encodes two digits with a single code point) and FNC1
|
|
183
|
-
constants$
|
|
183
|
+
constants$3.C_CHARS = "(\xCF*[0-9]{2}\xCF*)";
|
|
184
184
|
|
|
185
185
|
// CODE128 includes 107 symbols:
|
|
186
186
|
// 103 data symbols, 3 start symbols (A, B and C), and 1 stop symbol (the last one)
|
|
187
187
|
// Each symbol consist of three black bars (1) and three white spaces (0).
|
|
188
|
-
constants$
|
|
188
|
+
constants$3.BARS = [11011001100, 11001101100, 11001100110, 10010011000, 10010001100, 10001001100, 10011001000, 10011000100, 10001100100, 11001001000, 11001000100, 11000100100, 10110011100, 10011011100, 10011001110, 10111001100, 10011101100, 10011100110, 11001110010, 11001011100, 11001001110, 11011100100, 11001110100, 11101101110, 11101001100, 11100101100, 11100100110, 11101100100, 11100110100, 11100110010, 11011011000, 11011000110, 11000110110, 10100011000, 10001011000, 10001000110, 10110001000, 10001101000, 10001100010, 11010001000, 11000101000, 11000100010, 10110111000, 10110001110, 10001101110, 10111011000, 10111000110, 10001110110, 11101110110, 11010001110, 11000101110, 11011101000, 11011100010, 11011101110, 11101011000, 11101000110, 11100010110, 11101101000, 11101100010, 11100011010, 11101111010, 11001000010, 11110001010, 10100110000, 10100001100, 10010110000, 10010000110, 10000101100, 10000100110, 10110010000, 10110000100, 10011010000, 10011000010, 10000110100, 10000110010, 11000010010, 11001010000, 11110111010, 11000010100, 10001111010, 10100111100, 10010111100, 10010011110, 10111100100, 10011110100, 10011110010, 11110100100, 11110010100, 11110010010, 11011011110, 11011110110, 11110110110, 10101111000, 10100011110, 10001011110, 10111101000, 10111100010, 11110101000, 11110100010, 10111011110, 10111101110, 11101011110, 11110101110, 11010000100, 11010010000, 11010011100, 1100011101011];
|
|
189
189
|
|
|
190
190
|
Object.defineProperty(CODE128$1, "__esModule", {
|
|
191
191
|
value: true
|
|
192
192
|
});
|
|
193
193
|
|
|
194
|
-
var _createClass$
|
|
194
|
+
var _createClass$n = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
195
195
|
|
|
196
|
-
var _Barcode2$
|
|
196
|
+
var _Barcode2$b = Barcode$2;
|
|
197
197
|
|
|
198
|
-
var _Barcode3$
|
|
198
|
+
var _Barcode3$b = _interopRequireDefault$A(_Barcode2$b);
|
|
199
199
|
|
|
200
|
-
var _constants$
|
|
200
|
+
var _constants$b = constants$3;
|
|
201
201
|
|
|
202
|
-
function _interopRequireDefault$
|
|
202
|
+
function _interopRequireDefault$A(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
203
203
|
|
|
204
|
-
function _classCallCheck$
|
|
204
|
+
function _classCallCheck$t(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
205
205
|
|
|
206
|
-
function _possibleConstructorReturn$
|
|
206
|
+
function _possibleConstructorReturn$p(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
|
207
207
|
|
|
208
|
-
function _inherits$
|
|
208
|
+
function _inherits$p(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
|
209
209
|
|
|
210
210
|
// This is the master class,
|
|
211
211
|
// it does require the start code to be included in the string
|
|
212
212
|
var CODE128 = function (_Barcode) {
|
|
213
|
-
_inherits$
|
|
213
|
+
_inherits$p(CODE128, _Barcode);
|
|
214
214
|
|
|
215
215
|
function CODE128(data, options) {
|
|
216
|
-
_classCallCheck$
|
|
216
|
+
_classCallCheck$t(this, CODE128);
|
|
217
217
|
|
|
218
218
|
// Get array of ascii codes from data
|
|
219
|
-
var _this = _possibleConstructorReturn$
|
|
219
|
+
var _this = _possibleConstructorReturn$p(this, (CODE128.__proto__ || Object.getPrototypeOf(CODE128)).call(this, data.substring(1), options));
|
|
220
220
|
|
|
221
221
|
_this.bytes = data.split('').map(function (char) {
|
|
222
222
|
return char.charCodeAt(0);
|
|
@@ -224,7 +224,7 @@ var CODE128 = function (_Barcode) {
|
|
|
224
224
|
return _this;
|
|
225
225
|
}
|
|
226
226
|
|
|
227
|
-
_createClass$
|
|
227
|
+
_createClass$n(CODE128, [{
|
|
228
228
|
key: 'valid',
|
|
229
229
|
value: function valid() {
|
|
230
230
|
// ASCII value ranges 0-127, 200-211
|
|
@@ -241,14 +241,14 @@ var CODE128 = function (_Barcode) {
|
|
|
241
241
|
// Remove the start code from the bytes and set its index
|
|
242
242
|
var startIndex = bytes.shift() - 105;
|
|
243
243
|
// Get start set by index
|
|
244
|
-
var startSet = _constants$
|
|
244
|
+
var startSet = _constants$b.SET_BY_CODE[startIndex];
|
|
245
245
|
|
|
246
246
|
if (startSet === undefined) {
|
|
247
247
|
throw new RangeError('The encoding does not start with a start character.');
|
|
248
248
|
}
|
|
249
249
|
|
|
250
250
|
if (this.shouldEncodeAsEan128() === true) {
|
|
251
|
-
bytes.unshift(_constants$
|
|
251
|
+
bytes.unshift(_constants$b.FNC1);
|
|
252
252
|
}
|
|
253
253
|
|
|
254
254
|
// Start encode with the right type
|
|
@@ -262,9 +262,9 @@ var CODE128 = function (_Barcode) {
|
|
|
262
262
|
// Add the encoded bits
|
|
263
263
|
encodingResult.result +
|
|
264
264
|
// Add the checksum
|
|
265
|
-
CODE128.getBar((encodingResult.checksum + startIndex) % _constants$
|
|
265
|
+
CODE128.getBar((encodingResult.checksum + startIndex) % _constants$b.MODULO) +
|
|
266
266
|
// Add the end bits
|
|
267
|
-
CODE128.getBar(_constants$
|
|
267
|
+
CODE128.getBar(_constants$b.STOP)
|
|
268
268
|
};
|
|
269
269
|
}
|
|
270
270
|
|
|
@@ -285,7 +285,7 @@ var CODE128 = function (_Barcode) {
|
|
|
285
285
|
}], [{
|
|
286
286
|
key: 'getBar',
|
|
287
287
|
value: function getBar(index) {
|
|
288
|
-
return _constants$
|
|
288
|
+
return _constants$b.BARS[index] ? _constants$b.BARS[index].toString() : '';
|
|
289
289
|
}
|
|
290
290
|
|
|
291
291
|
// Correct an index by a set and shift it from the bytes array
|
|
@@ -293,10 +293,10 @@ var CODE128 = function (_Barcode) {
|
|
|
293
293
|
}, {
|
|
294
294
|
key: 'correctIndex',
|
|
295
295
|
value: function correctIndex(bytes, set) {
|
|
296
|
-
if (set === _constants$
|
|
296
|
+
if (set === _constants$b.SET_A) {
|
|
297
297
|
var charCode = bytes.shift();
|
|
298
298
|
return charCode < 32 ? charCode + 64 : charCode - 32;
|
|
299
|
-
} else if (set === _constants$
|
|
299
|
+
} else if (set === _constants$b.SET_B) {
|
|
300
300
|
return bytes.shift() - 32;
|
|
301
301
|
} else {
|
|
302
302
|
return (bytes.shift() - 48) * 10 + bytes.shift() - 48;
|
|
@@ -315,7 +315,7 @@ var CODE128 = function (_Barcode) {
|
|
|
315
315
|
// Special characters
|
|
316
316
|
if (bytes[0] >= 200) {
|
|
317
317
|
index = bytes.shift() - 105;
|
|
318
|
-
var nextSet = _constants$
|
|
318
|
+
var nextSet = _constants$b.SWAP[index];
|
|
319
319
|
|
|
320
320
|
// Swap to other set
|
|
321
321
|
if (nextSet !== undefined) {
|
|
@@ -324,9 +324,9 @@ var CODE128 = function (_Barcode) {
|
|
|
324
324
|
// Continue on current set but encode a special character
|
|
325
325
|
else {
|
|
326
326
|
// Shift
|
|
327
|
-
if ((set === _constants$
|
|
327
|
+
if ((set === _constants$b.SET_A || set === _constants$b.SET_B) && index === _constants$b.SHIFT) {
|
|
328
328
|
// Convert the next character so that is encoded correctly
|
|
329
|
-
bytes[0] = set === _constants$
|
|
329
|
+
bytes[0] = set === _constants$b.SET_A ? bytes[0] > 95 ? bytes[0] - 96 : bytes[0] : bytes[0] < 32 ? bytes[0] + 96 : bytes[0];
|
|
330
330
|
}
|
|
331
331
|
nextCode = CODE128.next(bytes, pos + 1, set);
|
|
332
332
|
}
|
|
@@ -349,7 +349,7 @@ var CODE128 = function (_Barcode) {
|
|
|
349
349
|
}]);
|
|
350
350
|
|
|
351
351
|
return CODE128;
|
|
352
|
-
}(_Barcode3$
|
|
352
|
+
}(_Barcode3$b.default);
|
|
353
353
|
|
|
354
354
|
CODE128$1.default = CODE128;
|
|
355
355
|
|
|
@@ -359,22 +359,22 @@ Object.defineProperty(auto, "__esModule", {
|
|
|
359
359
|
value: true
|
|
360
360
|
});
|
|
361
361
|
|
|
362
|
-
var _constants$
|
|
362
|
+
var _constants$a = constants$3;
|
|
363
363
|
|
|
364
364
|
// Match Set functions
|
|
365
365
|
var matchSetALength = function matchSetALength(string) {
|
|
366
|
-
return string.match(new RegExp('^' + _constants$
|
|
366
|
+
return string.match(new RegExp('^' + _constants$a.A_CHARS + '*'))[0].length;
|
|
367
367
|
};
|
|
368
368
|
var matchSetBLength = function matchSetBLength(string) {
|
|
369
|
-
return string.match(new RegExp('^' + _constants$
|
|
369
|
+
return string.match(new RegExp('^' + _constants$a.B_CHARS + '*'))[0].length;
|
|
370
370
|
};
|
|
371
371
|
var matchSetC = function matchSetC(string) {
|
|
372
|
-
return string.match(new RegExp('^' + _constants$
|
|
372
|
+
return string.match(new RegExp('^' + _constants$a.C_CHARS + '*'))[0];
|
|
373
373
|
};
|
|
374
374
|
|
|
375
375
|
// CODE128A or CODE128B
|
|
376
376
|
function autoSelectFromAB(string, isA) {
|
|
377
|
-
var ranges = isA ? _constants$
|
|
377
|
+
var ranges = isA ? _constants$a.A_CHARS : _constants$a.B_CHARS;
|
|
378
378
|
var untilC = string.match(new RegExp('^(' + ranges + '+?)(([0-9]{2}){2,})([^0-9]|$)'));
|
|
379
379
|
|
|
380
380
|
if (untilC) {
|
|
@@ -414,11 +414,11 @@ auto.default = function (string) {
|
|
|
414
414
|
|
|
415
415
|
// Select 128C if the string start with enough digits
|
|
416
416
|
if (cLength >= 2) {
|
|
417
|
-
newString = _constants$
|
|
417
|
+
newString = _constants$a.C_START_CHAR + autoSelectFromC(string);
|
|
418
418
|
} else {
|
|
419
419
|
// Select A/B depending on the longest match
|
|
420
420
|
var isA = matchSetALength(string) > matchSetBLength(string);
|
|
421
|
-
newString = (isA ? _constants$
|
|
421
|
+
newString = (isA ? _constants$a.A_START_CHAR : _constants$a.B_START_CHAR) + autoSelectFromAB(string, isA);
|
|
422
422
|
}
|
|
423
423
|
|
|
424
424
|
return newString.replace(/[\xCD\xCE]([^])[\xCD\xCE]/, // Any sequence between 205 and 206 characters
|
|
@@ -431,39 +431,39 @@ Object.defineProperty(CODE128_AUTO, "__esModule", {
|
|
|
431
431
|
value: true
|
|
432
432
|
});
|
|
433
433
|
|
|
434
|
-
var _CODE2$
|
|
434
|
+
var _CODE2$6 = CODE128$1;
|
|
435
435
|
|
|
436
|
-
var _CODE3$
|
|
436
|
+
var _CODE3$5 = _interopRequireDefault$z(_CODE2$6);
|
|
437
437
|
|
|
438
438
|
var _auto = auto;
|
|
439
439
|
|
|
440
|
-
var _auto2 = _interopRequireDefault$
|
|
440
|
+
var _auto2 = _interopRequireDefault$z(_auto);
|
|
441
441
|
|
|
442
|
-
function _interopRequireDefault$
|
|
442
|
+
function _interopRequireDefault$z(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
443
443
|
|
|
444
|
-
function _classCallCheck$
|
|
444
|
+
function _classCallCheck$s(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
445
445
|
|
|
446
|
-
function _possibleConstructorReturn$
|
|
446
|
+
function _possibleConstructorReturn$o(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
|
447
447
|
|
|
448
|
-
function _inherits$
|
|
448
|
+
function _inherits$o(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
|
449
449
|
|
|
450
450
|
var CODE128AUTO = function (_CODE) {
|
|
451
|
-
_inherits$
|
|
451
|
+
_inherits$o(CODE128AUTO, _CODE);
|
|
452
452
|
|
|
453
453
|
function CODE128AUTO(data, options) {
|
|
454
|
-
_classCallCheck$
|
|
454
|
+
_classCallCheck$s(this, CODE128AUTO);
|
|
455
455
|
|
|
456
456
|
// ASCII value ranges 0-127, 200-211
|
|
457
457
|
if (/^[\x00-\x7F\xC8-\xD3]+$/.test(data)) {
|
|
458
|
-
var _this = _possibleConstructorReturn$
|
|
458
|
+
var _this = _possibleConstructorReturn$o(this, (CODE128AUTO.__proto__ || Object.getPrototypeOf(CODE128AUTO)).call(this, (0, _auto2.default)(data), options));
|
|
459
459
|
} else {
|
|
460
|
-
var _this = _possibleConstructorReturn$
|
|
460
|
+
var _this = _possibleConstructorReturn$o(this, (CODE128AUTO.__proto__ || Object.getPrototypeOf(CODE128AUTO)).call(this, data, options));
|
|
461
461
|
}
|
|
462
|
-
return _possibleConstructorReturn$
|
|
462
|
+
return _possibleConstructorReturn$o(_this);
|
|
463
463
|
}
|
|
464
464
|
|
|
465
465
|
return CODE128AUTO;
|
|
466
|
-
}(_CODE3$
|
|
466
|
+
}(_CODE3$5.default);
|
|
467
467
|
|
|
468
468
|
CODE128_AUTO.default = CODE128AUTO;
|
|
469
469
|
|
|
@@ -473,40 +473,40 @@ Object.defineProperty(CODE128A$1, "__esModule", {
|
|
|
473
473
|
value: true
|
|
474
474
|
});
|
|
475
475
|
|
|
476
|
-
var _createClass$
|
|
476
|
+
var _createClass$m = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
477
477
|
|
|
478
|
-
var _CODE2$
|
|
478
|
+
var _CODE2$5 = CODE128$1;
|
|
479
479
|
|
|
480
|
-
var _CODE3$
|
|
480
|
+
var _CODE3$4 = _interopRequireDefault$y(_CODE2$5);
|
|
481
481
|
|
|
482
|
-
var _constants$
|
|
482
|
+
var _constants$9 = constants$3;
|
|
483
483
|
|
|
484
|
-
function _interopRequireDefault$
|
|
484
|
+
function _interopRequireDefault$y(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
485
485
|
|
|
486
|
-
function _classCallCheck$
|
|
486
|
+
function _classCallCheck$r(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
487
487
|
|
|
488
|
-
function _possibleConstructorReturn$
|
|
488
|
+
function _possibleConstructorReturn$n(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
|
489
489
|
|
|
490
|
-
function _inherits$
|
|
490
|
+
function _inherits$n(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
|
491
491
|
|
|
492
492
|
var CODE128A = function (_CODE) {
|
|
493
|
-
_inherits$
|
|
493
|
+
_inherits$n(CODE128A, _CODE);
|
|
494
494
|
|
|
495
495
|
function CODE128A(string, options) {
|
|
496
|
-
_classCallCheck$
|
|
496
|
+
_classCallCheck$r(this, CODE128A);
|
|
497
497
|
|
|
498
|
-
return _possibleConstructorReturn$
|
|
498
|
+
return _possibleConstructorReturn$n(this, (CODE128A.__proto__ || Object.getPrototypeOf(CODE128A)).call(this, _constants$9.A_START_CHAR + string, options));
|
|
499
499
|
}
|
|
500
500
|
|
|
501
|
-
_createClass$
|
|
501
|
+
_createClass$m(CODE128A, [{
|
|
502
502
|
key: 'valid',
|
|
503
503
|
value: function valid() {
|
|
504
|
-
return new RegExp('^' + _constants$
|
|
504
|
+
return new RegExp('^' + _constants$9.A_CHARS + '+$').test(this.data);
|
|
505
505
|
}
|
|
506
506
|
}]);
|
|
507
507
|
|
|
508
508
|
return CODE128A;
|
|
509
|
-
}(_CODE3$
|
|
509
|
+
}(_CODE3$4.default);
|
|
510
510
|
|
|
511
511
|
CODE128A$1.default = CODE128A;
|
|
512
512
|
|
|
@@ -516,40 +516,40 @@ Object.defineProperty(CODE128B$1, "__esModule", {
|
|
|
516
516
|
value: true
|
|
517
517
|
});
|
|
518
518
|
|
|
519
|
-
var _createClass$
|
|
519
|
+
var _createClass$l = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
520
520
|
|
|
521
|
-
var _CODE2$
|
|
521
|
+
var _CODE2$4 = CODE128$1;
|
|
522
522
|
|
|
523
|
-
var _CODE3$
|
|
523
|
+
var _CODE3$3 = _interopRequireDefault$x(_CODE2$4);
|
|
524
524
|
|
|
525
|
-
var _constants$
|
|
525
|
+
var _constants$8 = constants$3;
|
|
526
526
|
|
|
527
|
-
function _interopRequireDefault$
|
|
527
|
+
function _interopRequireDefault$x(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
528
528
|
|
|
529
|
-
function _classCallCheck$
|
|
529
|
+
function _classCallCheck$q(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
530
530
|
|
|
531
|
-
function _possibleConstructorReturn$
|
|
531
|
+
function _possibleConstructorReturn$m(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
|
532
532
|
|
|
533
|
-
function _inherits$
|
|
533
|
+
function _inherits$m(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
|
534
534
|
|
|
535
535
|
var CODE128B = function (_CODE) {
|
|
536
|
-
_inherits$
|
|
536
|
+
_inherits$m(CODE128B, _CODE);
|
|
537
537
|
|
|
538
538
|
function CODE128B(string, options) {
|
|
539
|
-
_classCallCheck$
|
|
539
|
+
_classCallCheck$q(this, CODE128B);
|
|
540
540
|
|
|
541
|
-
return _possibleConstructorReturn$
|
|
541
|
+
return _possibleConstructorReturn$m(this, (CODE128B.__proto__ || Object.getPrototypeOf(CODE128B)).call(this, _constants$8.B_START_CHAR + string, options));
|
|
542
542
|
}
|
|
543
543
|
|
|
544
|
-
_createClass$
|
|
544
|
+
_createClass$l(CODE128B, [{
|
|
545
545
|
key: 'valid',
|
|
546
546
|
value: function valid() {
|
|
547
|
-
return new RegExp('^' + _constants$
|
|
547
|
+
return new RegExp('^' + _constants$8.B_CHARS + '+$').test(this.data);
|
|
548
548
|
}
|
|
549
549
|
}]);
|
|
550
550
|
|
|
551
551
|
return CODE128B;
|
|
552
|
-
}(_CODE3$
|
|
552
|
+
}(_CODE3$3.default);
|
|
553
553
|
|
|
554
554
|
CODE128B$1.default = CODE128B;
|
|
555
555
|
|
|
@@ -559,40 +559,40 @@ Object.defineProperty(CODE128C$1, "__esModule", {
|
|
|
559
559
|
value: true
|
|
560
560
|
});
|
|
561
561
|
|
|
562
|
-
var _createClass$
|
|
562
|
+
var _createClass$k = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
563
563
|
|
|
564
|
-
var _CODE2$
|
|
564
|
+
var _CODE2$3 = CODE128$1;
|
|
565
565
|
|
|
566
|
-
var _CODE3 = _interopRequireDefault$
|
|
566
|
+
var _CODE3$2 = _interopRequireDefault$w(_CODE2$3);
|
|
567
567
|
|
|
568
|
-
var _constants$
|
|
568
|
+
var _constants$7 = constants$3;
|
|
569
569
|
|
|
570
|
-
function _interopRequireDefault$
|
|
570
|
+
function _interopRequireDefault$w(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
571
571
|
|
|
572
|
-
function _classCallCheck$
|
|
572
|
+
function _classCallCheck$p(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
573
573
|
|
|
574
|
-
function _possibleConstructorReturn$
|
|
574
|
+
function _possibleConstructorReturn$l(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
|
575
575
|
|
|
576
|
-
function _inherits$
|
|
576
|
+
function _inherits$l(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
|
577
577
|
|
|
578
578
|
var CODE128C = function (_CODE) {
|
|
579
|
-
_inherits$
|
|
579
|
+
_inherits$l(CODE128C, _CODE);
|
|
580
580
|
|
|
581
581
|
function CODE128C(string, options) {
|
|
582
|
-
_classCallCheck$
|
|
582
|
+
_classCallCheck$p(this, CODE128C);
|
|
583
583
|
|
|
584
|
-
return _possibleConstructorReturn$
|
|
584
|
+
return _possibleConstructorReturn$l(this, (CODE128C.__proto__ || Object.getPrototypeOf(CODE128C)).call(this, _constants$7.C_START_CHAR + string, options));
|
|
585
585
|
}
|
|
586
586
|
|
|
587
|
-
_createClass$
|
|
587
|
+
_createClass$k(CODE128C, [{
|
|
588
588
|
key: 'valid',
|
|
589
589
|
value: function valid() {
|
|
590
|
-
return new RegExp('^' + _constants$
|
|
590
|
+
return new RegExp('^' + _constants$7.C_CHARS + '+$').test(this.data);
|
|
591
591
|
}
|
|
592
592
|
}]);
|
|
593
593
|
|
|
594
594
|
return CODE128C;
|
|
595
|
-
}(_CODE3.default);
|
|
595
|
+
}(_CODE3$2.default);
|
|
596
596
|
|
|
597
597
|
CODE128C$1.default = CODE128C;
|
|
598
598
|
|
|
@@ -603,21 +603,21 @@ CODE128$2.CODE128C = CODE128$2.CODE128B = CODE128$2.CODE128A = CODE128$2.CODE128
|
|
|
603
603
|
|
|
604
604
|
var _CODE128_AUTO = CODE128_AUTO;
|
|
605
605
|
|
|
606
|
-
var _CODE128_AUTO2 = _interopRequireDefault$
|
|
606
|
+
var _CODE128_AUTO2 = _interopRequireDefault$v(_CODE128_AUTO);
|
|
607
607
|
|
|
608
608
|
var _CODE128A = CODE128A$1;
|
|
609
609
|
|
|
610
|
-
var _CODE128A2 = _interopRequireDefault$
|
|
610
|
+
var _CODE128A2 = _interopRequireDefault$v(_CODE128A);
|
|
611
611
|
|
|
612
612
|
var _CODE128B = CODE128B$1;
|
|
613
613
|
|
|
614
|
-
var _CODE128B2 = _interopRequireDefault$
|
|
614
|
+
var _CODE128B2 = _interopRequireDefault$v(_CODE128B);
|
|
615
615
|
|
|
616
616
|
var _CODE128C = CODE128C$1;
|
|
617
617
|
|
|
618
|
-
var _CODE128C2 = _interopRequireDefault$
|
|
618
|
+
var _CODE128C2 = _interopRequireDefault$v(_CODE128C);
|
|
619
619
|
|
|
620
|
-
function _interopRequireDefault$
|
|
620
|
+
function _interopRequireDefault$v(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
621
621
|
|
|
622
622
|
CODE128$2.CODE128 = _CODE128_AUTO2.default;
|
|
623
623
|
CODE128$2.CODE128A = _CODE128A2.default;
|
|
@@ -628,16 +628,16 @@ var EAN_UPC = {};
|
|
|
628
628
|
|
|
629
629
|
var EAN13$1 = {};
|
|
630
630
|
|
|
631
|
-
var constants$
|
|
631
|
+
var constants$2 = {};
|
|
632
632
|
|
|
633
|
-
Object.defineProperty(constants$
|
|
633
|
+
Object.defineProperty(constants$2, "__esModule", {
|
|
634
634
|
value: true
|
|
635
635
|
});
|
|
636
636
|
// Standard start end and middle bits
|
|
637
|
-
constants$
|
|
638
|
-
constants$
|
|
637
|
+
constants$2.SIDE_BIN = '101';
|
|
638
|
+
constants$2.MIDDLE_BIN = '01010';
|
|
639
639
|
|
|
640
|
-
constants$
|
|
640
|
+
constants$2.BINARIES = {
|
|
641
641
|
'L': [// The L (left) type of encoding
|
|
642
642
|
'0001101', '0011001', '0010011', '0111101', '0100011', '0110001', '0101111', '0111011', '0110111', '0001011'],
|
|
643
643
|
'G': [// The G type of encoding
|
|
@@ -651,13 +651,13 @@ constants$1.BINARIES = {
|
|
|
651
651
|
};
|
|
652
652
|
|
|
653
653
|
// Define the EAN-2 structure
|
|
654
|
-
constants$
|
|
654
|
+
constants$2.EAN2_STRUCTURE = ['LL', 'LG', 'GL', 'GG'];
|
|
655
655
|
|
|
656
656
|
// Define the EAN-5 structure
|
|
657
|
-
constants$
|
|
657
|
+
constants$2.EAN5_STRUCTURE = ['GGLLL', 'GLGLL', 'GLLGL', 'GLLLG', 'LGGLL', 'LLGGL', 'LLLGG', 'LGLGL', 'LGLLG', 'LLGLG'];
|
|
658
658
|
|
|
659
659
|
// Define the EAN-13 structure
|
|
660
|
-
constants$
|
|
660
|
+
constants$2.EAN13_STRUCTURE = ['LLLLLL', 'LLGLGG', 'LLGGLG', 'LLGGGL', 'LGLLGG', 'LGGLLG', 'LGGGLL', 'LGLGLG', 'LGLGGL', 'LGGLGL'];
|
|
661
661
|
|
|
662
662
|
var EAN$1 = {};
|
|
663
663
|
|
|
@@ -667,12 +667,12 @@ Object.defineProperty(encoder, "__esModule", {
|
|
|
667
667
|
value: true
|
|
668
668
|
});
|
|
669
669
|
|
|
670
|
-
var _constants$
|
|
670
|
+
var _constants$6 = constants$2;
|
|
671
671
|
|
|
672
672
|
// Encode data string
|
|
673
673
|
var encode$1 = function encode(data, structure, separator) {
|
|
674
674
|
var encoded = data.split('').map(function (val, idx) {
|
|
675
|
-
return _constants$
|
|
675
|
+
return _constants$6.BINARIES[structure[idx]];
|
|
676
676
|
}).map(function (val, idx) {
|
|
677
677
|
return val ? val[data[idx]] : '';
|
|
678
678
|
});
|
|
@@ -693,35 +693,35 @@ Object.defineProperty(EAN$1, "__esModule", {
|
|
|
693
693
|
value: true
|
|
694
694
|
});
|
|
695
695
|
|
|
696
|
-
var _createClass$
|
|
696
|
+
var _createClass$j = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
697
697
|
|
|
698
|
-
var _constants$
|
|
698
|
+
var _constants$5 = constants$2;
|
|
699
699
|
|
|
700
700
|
var _encoder$4 = encoder;
|
|
701
701
|
|
|
702
|
-
var _encoder2$4 = _interopRequireDefault$
|
|
702
|
+
var _encoder2$4 = _interopRequireDefault$u(_encoder$4);
|
|
703
703
|
|
|
704
|
-
var _Barcode2$
|
|
704
|
+
var _Barcode2$a = Barcode$2;
|
|
705
705
|
|
|
706
|
-
var _Barcode3$
|
|
706
|
+
var _Barcode3$a = _interopRequireDefault$u(_Barcode2$a);
|
|
707
707
|
|
|
708
|
-
function _interopRequireDefault$
|
|
708
|
+
function _interopRequireDefault$u(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
709
709
|
|
|
710
|
-
function _classCallCheck$
|
|
710
|
+
function _classCallCheck$o(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
711
711
|
|
|
712
|
-
function _possibleConstructorReturn$
|
|
712
|
+
function _possibleConstructorReturn$k(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
|
713
713
|
|
|
714
|
-
function _inherits$
|
|
714
|
+
function _inherits$k(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
|
715
715
|
|
|
716
716
|
// Base class for EAN8 & EAN13
|
|
717
717
|
var EAN = function (_Barcode) {
|
|
718
|
-
_inherits$
|
|
718
|
+
_inherits$k(EAN, _Barcode);
|
|
719
719
|
|
|
720
720
|
function EAN(data, options) {
|
|
721
|
-
_classCallCheck$
|
|
721
|
+
_classCallCheck$o(this, EAN);
|
|
722
722
|
|
|
723
723
|
// Make sure the font is not bigger than the space between the guard bars
|
|
724
|
-
var _this = _possibleConstructorReturn$
|
|
724
|
+
var _this = _possibleConstructorReturn$k(this, (EAN.__proto__ || Object.getPrototypeOf(EAN)).call(this, data, options));
|
|
725
725
|
|
|
726
726
|
_this.fontSize = !options.flat && options.fontSize > options.width * 10 ? options.width * 10 : options.fontSize;
|
|
727
727
|
|
|
@@ -730,7 +730,7 @@ var EAN = function (_Barcode) {
|
|
|
730
730
|
return _this;
|
|
731
731
|
}
|
|
732
732
|
|
|
733
|
-
_createClass$
|
|
733
|
+
_createClass$j(EAN, [{
|
|
734
734
|
key: 'encode',
|
|
735
735
|
value: function encode() {
|
|
736
736
|
return this.options.flat ? this.encodeFlat() : this.encodeGuarded();
|
|
@@ -761,12 +761,12 @@ var EAN = function (_Barcode) {
|
|
|
761
761
|
var textOptions = { fontSize: this.fontSize };
|
|
762
762
|
var guardOptions = { height: this.guardHeight };
|
|
763
763
|
|
|
764
|
-
return [{ data: _constants$
|
|
764
|
+
return [{ data: _constants$5.SIDE_BIN, options: guardOptions }, { data: this.leftEncode(), text: this.leftText(), options: textOptions }, { data: _constants$5.MIDDLE_BIN, options: guardOptions }, { data: this.rightEncode(), text: this.rightText(), options: textOptions }, { data: _constants$5.SIDE_BIN, options: guardOptions }];
|
|
765
765
|
}
|
|
766
766
|
}, {
|
|
767
767
|
key: 'encodeFlat',
|
|
768
768
|
value: function encodeFlat() {
|
|
769
|
-
var data = [_constants$
|
|
769
|
+
var data = [_constants$5.SIDE_BIN, this.leftEncode(), _constants$5.MIDDLE_BIN, this.rightEncode(), _constants$5.SIDE_BIN];
|
|
770
770
|
|
|
771
771
|
return {
|
|
772
772
|
data: data.join(''),
|
|
@@ -776,7 +776,7 @@ var EAN = function (_Barcode) {
|
|
|
776
776
|
}]);
|
|
777
777
|
|
|
778
778
|
return EAN;
|
|
779
|
-
}(_Barcode3$
|
|
779
|
+
}(_Barcode3$a.default);
|
|
780
780
|
|
|
781
781
|
EAN$1.default = EAN;
|
|
782
782
|
|
|
@@ -784,23 +784,23 @@ Object.defineProperty(EAN13$1, "__esModule", {
|
|
|
784
784
|
value: true
|
|
785
785
|
});
|
|
786
786
|
|
|
787
|
-
var _createClass$
|
|
787
|
+
var _createClass$i = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
788
788
|
|
|
789
789
|
var _get$1 = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
|
|
790
790
|
|
|
791
|
-
var _constants$
|
|
791
|
+
var _constants$4 = constants$2;
|
|
792
792
|
|
|
793
793
|
var _EAN2$2 = EAN$1;
|
|
794
794
|
|
|
795
|
-
var _EAN3$2 = _interopRequireDefault$
|
|
795
|
+
var _EAN3$2 = _interopRequireDefault$t(_EAN2$2);
|
|
796
796
|
|
|
797
|
-
function _interopRequireDefault$
|
|
797
|
+
function _interopRequireDefault$t(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
798
798
|
|
|
799
|
-
function _classCallCheck$
|
|
799
|
+
function _classCallCheck$n(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
800
800
|
|
|
801
|
-
function _possibleConstructorReturn$
|
|
801
|
+
function _possibleConstructorReturn$j(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
|
802
802
|
|
|
803
|
-
function _inherits$
|
|
803
|
+
function _inherits$j(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Encoding documentation:
|
|
804
804
|
// https://en.wikipedia.org/wiki/International_Article_Number_(EAN)#Binary_encoding_of_data_digits_into_EAN-13_barcode
|
|
805
805
|
|
|
806
806
|
// Calculate the checksum digit
|
|
@@ -816,10 +816,10 @@ var checksum$4 = function checksum(number) {
|
|
|
816
816
|
};
|
|
817
817
|
|
|
818
818
|
var EAN13 = function (_EAN) {
|
|
819
|
-
_inherits$
|
|
819
|
+
_inherits$j(EAN13, _EAN);
|
|
820
820
|
|
|
821
821
|
function EAN13(data, options) {
|
|
822
|
-
_classCallCheck$
|
|
822
|
+
_classCallCheck$n(this, EAN13);
|
|
823
823
|
|
|
824
824
|
// Add checksum if it does not exist
|
|
825
825
|
if (data.search(/^[0-9]{12}$/) !== -1) {
|
|
@@ -827,13 +827,13 @@ var EAN13 = function (_EAN) {
|
|
|
827
827
|
}
|
|
828
828
|
|
|
829
829
|
// Adds a last character to the end of the barcode
|
|
830
|
-
var _this = _possibleConstructorReturn$
|
|
830
|
+
var _this = _possibleConstructorReturn$j(this, (EAN13.__proto__ || Object.getPrototypeOf(EAN13)).call(this, data, options));
|
|
831
831
|
|
|
832
832
|
_this.lastChar = options.lastChar;
|
|
833
833
|
return _this;
|
|
834
834
|
}
|
|
835
835
|
|
|
836
|
-
_createClass$
|
|
836
|
+
_createClass$i(EAN13, [{
|
|
837
837
|
key: 'valid',
|
|
838
838
|
value: function valid() {
|
|
839
839
|
return this.data.search(/^[0-9]{13}$/) !== -1 && +this.data[12] === checksum$4(this.data);
|
|
@@ -847,7 +847,7 @@ var EAN13 = function (_EAN) {
|
|
|
847
847
|
key: 'leftEncode',
|
|
848
848
|
value: function leftEncode() {
|
|
849
849
|
var data = this.data.substr(1, 6);
|
|
850
|
-
var structure = _constants$
|
|
850
|
+
var structure = _constants$4.EAN13_STRUCTURE[this.data[0]];
|
|
851
851
|
return _get$1(EAN13.prototype.__proto__ || Object.getPrototypeOf(EAN13.prototype), 'leftEncode', this).call(this, data, structure);
|
|
852
852
|
}
|
|
853
853
|
}, {
|
|
@@ -904,21 +904,21 @@ Object.defineProperty(EAN8$1, "__esModule", {
|
|
|
904
904
|
value: true
|
|
905
905
|
});
|
|
906
906
|
|
|
907
|
-
var _createClass$
|
|
907
|
+
var _createClass$h = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
908
908
|
|
|
909
909
|
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
|
|
910
910
|
|
|
911
911
|
var _EAN2$1 = EAN$1;
|
|
912
912
|
|
|
913
|
-
var _EAN3$1 = _interopRequireDefault$
|
|
913
|
+
var _EAN3$1 = _interopRequireDefault$s(_EAN2$1);
|
|
914
914
|
|
|
915
|
-
function _interopRequireDefault$
|
|
915
|
+
function _interopRequireDefault$s(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
916
916
|
|
|
917
|
-
function _classCallCheck$
|
|
917
|
+
function _classCallCheck$m(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
918
918
|
|
|
919
|
-
function _possibleConstructorReturn$
|
|
919
|
+
function _possibleConstructorReturn$i(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
|
920
920
|
|
|
921
|
-
function _inherits$
|
|
921
|
+
function _inherits$i(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Encoding documentation:
|
|
922
922
|
// http://www.barcodeisland.com/ean8.phtml
|
|
923
923
|
|
|
924
924
|
// Calculate the checksum digit
|
|
@@ -933,20 +933,20 @@ var checksum$3 = function checksum(number) {
|
|
|
933
933
|
};
|
|
934
934
|
|
|
935
935
|
var EAN8 = function (_EAN) {
|
|
936
|
-
_inherits$
|
|
936
|
+
_inherits$i(EAN8, _EAN);
|
|
937
937
|
|
|
938
938
|
function EAN8(data, options) {
|
|
939
|
-
_classCallCheck$
|
|
939
|
+
_classCallCheck$m(this, EAN8);
|
|
940
940
|
|
|
941
941
|
// Add checksum if it does not exist
|
|
942
942
|
if (data.search(/^[0-9]{7}$/) !== -1) {
|
|
943
943
|
data += checksum$3(data);
|
|
944
944
|
}
|
|
945
945
|
|
|
946
|
-
return _possibleConstructorReturn$
|
|
946
|
+
return _possibleConstructorReturn$i(this, (EAN8.__proto__ || Object.getPrototypeOf(EAN8)).call(this, data, options));
|
|
947
947
|
}
|
|
948
948
|
|
|
949
|
-
_createClass$
|
|
949
|
+
_createClass$h(EAN8, [{
|
|
950
950
|
key: 'valid',
|
|
951
951
|
value: function valid() {
|
|
952
952
|
return this.data.search(/^[0-9]{8}$/) !== -1 && +this.data[7] === checksum$3(this.data);
|
|
@@ -986,25 +986,25 @@ Object.defineProperty(EAN5$1, "__esModule", {
|
|
|
986
986
|
value: true
|
|
987
987
|
});
|
|
988
988
|
|
|
989
|
-
var _createClass$
|
|
989
|
+
var _createClass$g = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
990
990
|
|
|
991
|
-
var _constants$
|
|
991
|
+
var _constants$3 = constants$2;
|
|
992
992
|
|
|
993
993
|
var _encoder$3 = encoder;
|
|
994
994
|
|
|
995
|
-
var _encoder2$3 = _interopRequireDefault$
|
|
995
|
+
var _encoder2$3 = _interopRequireDefault$r(_encoder$3);
|
|
996
996
|
|
|
997
|
-
var _Barcode2$
|
|
997
|
+
var _Barcode2$9 = Barcode$2;
|
|
998
998
|
|
|
999
|
-
var _Barcode3$
|
|
999
|
+
var _Barcode3$9 = _interopRequireDefault$r(_Barcode2$9);
|
|
1000
1000
|
|
|
1001
|
-
function _interopRequireDefault$
|
|
1001
|
+
function _interopRequireDefault$r(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
1002
1002
|
|
|
1003
|
-
function _classCallCheck$
|
|
1003
|
+
function _classCallCheck$l(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
1004
1004
|
|
|
1005
|
-
function _possibleConstructorReturn$
|
|
1005
|
+
function _possibleConstructorReturn$h(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
|
1006
1006
|
|
|
1007
|
-
function _inherits$
|
|
1007
|
+
function _inherits$h(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Encoding documentation:
|
|
1008
1008
|
// https://en.wikipedia.org/wiki/EAN_5#Encoding
|
|
1009
1009
|
|
|
1010
1010
|
var checksum$2 = function checksum(data) {
|
|
@@ -1017,15 +1017,15 @@ var checksum$2 = function checksum(data) {
|
|
|
1017
1017
|
};
|
|
1018
1018
|
|
|
1019
1019
|
var EAN5 = function (_Barcode) {
|
|
1020
|
-
_inherits$
|
|
1020
|
+
_inherits$h(EAN5, _Barcode);
|
|
1021
1021
|
|
|
1022
1022
|
function EAN5(data, options) {
|
|
1023
|
-
_classCallCheck$
|
|
1023
|
+
_classCallCheck$l(this, EAN5);
|
|
1024
1024
|
|
|
1025
|
-
return _possibleConstructorReturn$
|
|
1025
|
+
return _possibleConstructorReturn$h(this, (EAN5.__proto__ || Object.getPrototypeOf(EAN5)).call(this, data, options));
|
|
1026
1026
|
}
|
|
1027
1027
|
|
|
1028
|
-
_createClass$
|
|
1028
|
+
_createClass$g(EAN5, [{
|
|
1029
1029
|
key: 'valid',
|
|
1030
1030
|
value: function valid() {
|
|
1031
1031
|
return this.data.search(/^[0-9]{5}$/) !== -1;
|
|
@@ -1033,7 +1033,7 @@ var EAN5 = function (_Barcode) {
|
|
|
1033
1033
|
}, {
|
|
1034
1034
|
key: 'encode',
|
|
1035
1035
|
value: function encode() {
|
|
1036
|
-
var structure = _constants$
|
|
1036
|
+
var structure = _constants$3.EAN5_STRUCTURE[checksum$2(this.data)];
|
|
1037
1037
|
return {
|
|
1038
1038
|
data: '1011' + (0, _encoder2$3.default)(this.data, structure, '01'),
|
|
1039
1039
|
text: this.text
|
|
@@ -1042,7 +1042,7 @@ var EAN5 = function (_Barcode) {
|
|
|
1042
1042
|
}]);
|
|
1043
1043
|
|
|
1044
1044
|
return EAN5;
|
|
1045
|
-
}(_Barcode3$
|
|
1045
|
+
}(_Barcode3$9.default);
|
|
1046
1046
|
|
|
1047
1047
|
EAN5$1.default = EAN5;
|
|
1048
1048
|
|
|
@@ -1052,37 +1052,37 @@ Object.defineProperty(EAN2$1, "__esModule", {
|
|
|
1052
1052
|
value: true
|
|
1053
1053
|
});
|
|
1054
1054
|
|
|
1055
|
-
var _createClass$
|
|
1055
|
+
var _createClass$f = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
1056
1056
|
|
|
1057
|
-
var _constants$
|
|
1057
|
+
var _constants$2 = constants$2;
|
|
1058
1058
|
|
|
1059
1059
|
var _encoder$2 = encoder;
|
|
1060
1060
|
|
|
1061
|
-
var _encoder2$2 = _interopRequireDefault$
|
|
1061
|
+
var _encoder2$2 = _interopRequireDefault$q(_encoder$2);
|
|
1062
1062
|
|
|
1063
|
-
var _Barcode2$
|
|
1063
|
+
var _Barcode2$8 = Barcode$2;
|
|
1064
1064
|
|
|
1065
|
-
var _Barcode3$
|
|
1065
|
+
var _Barcode3$8 = _interopRequireDefault$q(_Barcode2$8);
|
|
1066
1066
|
|
|
1067
|
-
function _interopRequireDefault$
|
|
1067
|
+
function _interopRequireDefault$q(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
1068
1068
|
|
|
1069
|
-
function _classCallCheck$
|
|
1069
|
+
function _classCallCheck$k(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
1070
1070
|
|
|
1071
|
-
function _possibleConstructorReturn$
|
|
1071
|
+
function _possibleConstructorReturn$g(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
|
1072
1072
|
|
|
1073
|
-
function _inherits$
|
|
1073
|
+
function _inherits$g(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Encoding documentation:
|
|
1074
1074
|
// https://en.wikipedia.org/wiki/EAN_2#Encoding
|
|
1075
1075
|
|
|
1076
1076
|
var EAN2 = function (_Barcode) {
|
|
1077
|
-
_inherits$
|
|
1077
|
+
_inherits$g(EAN2, _Barcode);
|
|
1078
1078
|
|
|
1079
1079
|
function EAN2(data, options) {
|
|
1080
|
-
_classCallCheck$
|
|
1080
|
+
_classCallCheck$k(this, EAN2);
|
|
1081
1081
|
|
|
1082
|
-
return _possibleConstructorReturn$
|
|
1082
|
+
return _possibleConstructorReturn$g(this, (EAN2.__proto__ || Object.getPrototypeOf(EAN2)).call(this, data, options));
|
|
1083
1083
|
}
|
|
1084
1084
|
|
|
1085
|
-
_createClass$
|
|
1085
|
+
_createClass$f(EAN2, [{
|
|
1086
1086
|
key: 'valid',
|
|
1087
1087
|
value: function valid() {
|
|
1088
1088
|
return this.data.search(/^[0-9]{2}$/) !== -1;
|
|
@@ -1091,7 +1091,7 @@ var EAN2 = function (_Barcode) {
|
|
|
1091
1091
|
key: 'encode',
|
|
1092
1092
|
value: function encode() {
|
|
1093
1093
|
// Choose the structure based on the number mod 4
|
|
1094
|
-
var structure = _constants$
|
|
1094
|
+
var structure = _constants$2.EAN2_STRUCTURE[parseInt(this.data) % 4];
|
|
1095
1095
|
return {
|
|
1096
1096
|
// Start bits + Encode the two digits with 01 in between
|
|
1097
1097
|
data: '1011' + (0, _encoder2$2.default)(this.data, structure, '01'),
|
|
@@ -1101,7 +1101,7 @@ var EAN2 = function (_Barcode) {
|
|
|
1101
1101
|
}]);
|
|
1102
1102
|
|
|
1103
1103
|
return EAN2;
|
|
1104
|
-
}(_Barcode3$
|
|
1104
|
+
}(_Barcode3$8.default);
|
|
1105
1105
|
|
|
1106
1106
|
EAN2$1.default = EAN2;
|
|
1107
1107
|
|
|
@@ -1111,39 +1111,39 @@ Object.defineProperty(UPC$1, "__esModule", {
|
|
|
1111
1111
|
value: true
|
|
1112
1112
|
});
|
|
1113
1113
|
|
|
1114
|
-
var _createClass$
|
|
1114
|
+
var _createClass$e = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
1115
1115
|
|
|
1116
1116
|
UPC$1.checksum = checksum$1;
|
|
1117
1117
|
|
|
1118
1118
|
var _encoder$1 = encoder;
|
|
1119
1119
|
|
|
1120
|
-
var _encoder2$1 = _interopRequireDefault$
|
|
1120
|
+
var _encoder2$1 = _interopRequireDefault$p(_encoder$1);
|
|
1121
1121
|
|
|
1122
|
-
var _Barcode2$
|
|
1122
|
+
var _Barcode2$7 = Barcode$2;
|
|
1123
1123
|
|
|
1124
|
-
var _Barcode3$
|
|
1124
|
+
var _Barcode3$7 = _interopRequireDefault$p(_Barcode2$7);
|
|
1125
1125
|
|
|
1126
|
-
function _interopRequireDefault$
|
|
1126
|
+
function _interopRequireDefault$p(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
1127
1127
|
|
|
1128
|
-
function _classCallCheck$
|
|
1128
|
+
function _classCallCheck$j(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
1129
1129
|
|
|
1130
|
-
function _possibleConstructorReturn$
|
|
1130
|
+
function _possibleConstructorReturn$f(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
|
1131
1131
|
|
|
1132
|
-
function _inherits$
|
|
1132
|
+
function _inherits$f(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Encoding documentation:
|
|
1133
1133
|
// https://en.wikipedia.org/wiki/Universal_Product_Code#Encoding
|
|
1134
1134
|
|
|
1135
1135
|
var UPC = function (_Barcode) {
|
|
1136
|
-
_inherits$
|
|
1136
|
+
_inherits$f(UPC, _Barcode);
|
|
1137
1137
|
|
|
1138
1138
|
function UPC(data, options) {
|
|
1139
|
-
_classCallCheck$
|
|
1139
|
+
_classCallCheck$j(this, UPC);
|
|
1140
1140
|
|
|
1141
1141
|
// Add checksum if it does not exist
|
|
1142
1142
|
if (data.search(/^[0-9]{11}$/) !== -1) {
|
|
1143
1143
|
data += checksum$1(data);
|
|
1144
1144
|
}
|
|
1145
1145
|
|
|
1146
|
-
var _this = _possibleConstructorReturn$
|
|
1146
|
+
var _this = _possibleConstructorReturn$f(this, (UPC.__proto__ || Object.getPrototypeOf(UPC)).call(this, data, options));
|
|
1147
1147
|
|
|
1148
1148
|
_this.displayValue = options.displayValue;
|
|
1149
1149
|
|
|
@@ -1159,7 +1159,7 @@ var UPC = function (_Barcode) {
|
|
|
1159
1159
|
return _this;
|
|
1160
1160
|
}
|
|
1161
1161
|
|
|
1162
|
-
_createClass$
|
|
1162
|
+
_createClass$e(UPC, [{
|
|
1163
1163
|
key: "valid",
|
|
1164
1164
|
value: function valid() {
|
|
1165
1165
|
return this.data.search(/^[0-9]{12}$/) !== -1 && this.data[11] == checksum$1(this.data);
|
|
@@ -1249,7 +1249,7 @@ var UPC = function (_Barcode) {
|
|
|
1249
1249
|
}]);
|
|
1250
1250
|
|
|
1251
1251
|
return UPC;
|
|
1252
|
-
}(_Barcode3$
|
|
1252
|
+
}(_Barcode3$7.default);
|
|
1253
1253
|
|
|
1254
1254
|
// Calulate the checksum digit
|
|
1255
1255
|
// https://en.wikipedia.org/wiki/International_Article_Number_(EAN)#Calculation_of_checksum_digit
|
|
@@ -1277,25 +1277,25 @@ Object.defineProperty(UPCE$1, "__esModule", {
|
|
|
1277
1277
|
value: true
|
|
1278
1278
|
});
|
|
1279
1279
|
|
|
1280
|
-
var _createClass$
|
|
1280
|
+
var _createClass$d = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
1281
1281
|
|
|
1282
1282
|
var _encoder = encoder;
|
|
1283
1283
|
|
|
1284
|
-
var _encoder2 = _interopRequireDefault$
|
|
1284
|
+
var _encoder2 = _interopRequireDefault$o(_encoder);
|
|
1285
1285
|
|
|
1286
|
-
var _Barcode2$
|
|
1286
|
+
var _Barcode2$6 = Barcode$2;
|
|
1287
1287
|
|
|
1288
|
-
var _Barcode3$
|
|
1288
|
+
var _Barcode3$6 = _interopRequireDefault$o(_Barcode2$6);
|
|
1289
1289
|
|
|
1290
1290
|
var _UPC$1 = UPC$1;
|
|
1291
1291
|
|
|
1292
|
-
function _interopRequireDefault$
|
|
1292
|
+
function _interopRequireDefault$o(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
1293
1293
|
|
|
1294
|
-
function _classCallCheck$
|
|
1294
|
+
function _classCallCheck$i(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
1295
1295
|
|
|
1296
|
-
function _possibleConstructorReturn$
|
|
1296
|
+
function _possibleConstructorReturn$e(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
|
1297
1297
|
|
|
1298
|
-
function _inherits$
|
|
1298
|
+
function _inherits$e(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Encoding documentation:
|
|
1299
1299
|
// https://en.wikipedia.org/wiki/Universal_Product_Code#Encoding
|
|
1300
1300
|
//
|
|
1301
1301
|
// UPC-E documentation:
|
|
@@ -1306,12 +1306,12 @@ var EXPANSIONS = ["XX00000XXX", "XX10000XXX", "XX20000XXX", "XXX00000XX", "XXXX0
|
|
|
1306
1306
|
var PARITIES = [["EEEOOO", "OOOEEE"], ["EEOEOO", "OOEOEE"], ["EEOOEO", "OOEEOE"], ["EEOOOE", "OOEEEO"], ["EOEEOO", "OEOOEE"], ["EOOEEO", "OEEOOE"], ["EOOOEE", "OEEEOO"], ["EOEOEO", "OEOEOE"], ["EOEOOE", "OEOEEO"], ["EOOEOE", "OEEOEO"]];
|
|
1307
1307
|
|
|
1308
1308
|
var UPCE = function (_Barcode) {
|
|
1309
|
-
_inherits$
|
|
1309
|
+
_inherits$e(UPCE, _Barcode);
|
|
1310
1310
|
|
|
1311
1311
|
function UPCE(data, options) {
|
|
1312
|
-
_classCallCheck$
|
|
1312
|
+
_classCallCheck$i(this, UPCE);
|
|
1313
1313
|
|
|
1314
|
-
var _this = _possibleConstructorReturn$
|
|
1314
|
+
var _this = _possibleConstructorReturn$e(this, (UPCE.__proto__ || Object.getPrototypeOf(UPCE)).call(this, data, options));
|
|
1315
1315
|
// Code may be 6 or 8 digits;
|
|
1316
1316
|
// A 7 digit code is ambiguous as to whether the extra digit
|
|
1317
1317
|
// is a UPC-A check or number system digit.
|
|
@@ -1331,10 +1331,10 @@ var UPCE = function (_Barcode) {
|
|
|
1331
1331
|
_this.isValid = true;
|
|
1332
1332
|
} else {
|
|
1333
1333
|
// checksum mismatch
|
|
1334
|
-
return _possibleConstructorReturn$
|
|
1334
|
+
return _possibleConstructorReturn$e(_this);
|
|
1335
1335
|
}
|
|
1336
1336
|
} else {
|
|
1337
|
-
return _possibleConstructorReturn$
|
|
1337
|
+
return _possibleConstructorReturn$e(_this);
|
|
1338
1338
|
}
|
|
1339
1339
|
|
|
1340
1340
|
_this.displayValue = options.displayValue;
|
|
@@ -1351,7 +1351,7 @@ var UPCE = function (_Barcode) {
|
|
|
1351
1351
|
return _this;
|
|
1352
1352
|
}
|
|
1353
1353
|
|
|
1354
|
-
_createClass$
|
|
1354
|
+
_createClass$d(UPCE, [{
|
|
1355
1355
|
key: 'valid',
|
|
1356
1356
|
value: function valid() {
|
|
1357
1357
|
return this.isValid;
|
|
@@ -1434,7 +1434,7 @@ var UPCE = function (_Barcode) {
|
|
|
1434
1434
|
}]);
|
|
1435
1435
|
|
|
1436
1436
|
return UPCE;
|
|
1437
|
-
}(_Barcode3$
|
|
1437
|
+
}(_Barcode3$6.default);
|
|
1438
1438
|
|
|
1439
1439
|
function expandToUPCA(middleDigits, numberSystem) {
|
|
1440
1440
|
var lastUpcE = parseInt(middleDigits[middleDigits.length - 1]);
|
|
@@ -1464,29 +1464,29 @@ EAN_UPC.UPCE = EAN_UPC.UPC = EAN_UPC.EAN2 = EAN_UPC.EAN5 = EAN_UPC.EAN8 = EAN_UP
|
|
|
1464
1464
|
|
|
1465
1465
|
var _EAN = EAN13$1;
|
|
1466
1466
|
|
|
1467
|
-
var _EAN2 = _interopRequireDefault$
|
|
1467
|
+
var _EAN2 = _interopRequireDefault$n(_EAN);
|
|
1468
1468
|
|
|
1469
1469
|
var _EAN3 = EAN8$1;
|
|
1470
1470
|
|
|
1471
|
-
var _EAN4 = _interopRequireDefault$
|
|
1471
|
+
var _EAN4 = _interopRequireDefault$n(_EAN3);
|
|
1472
1472
|
|
|
1473
1473
|
var _EAN5 = EAN5$1;
|
|
1474
1474
|
|
|
1475
|
-
var _EAN6 = _interopRequireDefault$
|
|
1475
|
+
var _EAN6 = _interopRequireDefault$n(_EAN5);
|
|
1476
1476
|
|
|
1477
1477
|
var _EAN7 = EAN2$1;
|
|
1478
1478
|
|
|
1479
|
-
var _EAN8 = _interopRequireDefault$
|
|
1479
|
+
var _EAN8 = _interopRequireDefault$n(_EAN7);
|
|
1480
1480
|
|
|
1481
1481
|
var _UPC = UPC$1;
|
|
1482
1482
|
|
|
1483
|
-
var _UPC2 = _interopRequireDefault$
|
|
1483
|
+
var _UPC2 = _interopRequireDefault$n(_UPC);
|
|
1484
1484
|
|
|
1485
1485
|
var _UPCE = UPCE$1;
|
|
1486
1486
|
|
|
1487
|
-
var _UPCE2 = _interopRequireDefault$
|
|
1487
|
+
var _UPCE2 = _interopRequireDefault$n(_UPCE);
|
|
1488
1488
|
|
|
1489
|
-
function _interopRequireDefault$
|
|
1489
|
+
function _interopRequireDefault$n(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
1490
1490
|
|
|
1491
1491
|
EAN_UPC.EAN13 = _EAN2.default;
|
|
1492
1492
|
EAN_UPC.EAN8 = _EAN4.default;
|
|
@@ -1499,46 +1499,46 @@ var ITF$2 = {};
|
|
|
1499
1499
|
|
|
1500
1500
|
var ITF$1 = {};
|
|
1501
1501
|
|
|
1502
|
-
var constants = {};
|
|
1502
|
+
var constants$1 = {};
|
|
1503
1503
|
|
|
1504
|
-
Object.defineProperty(constants, "__esModule", {
|
|
1504
|
+
Object.defineProperty(constants$1, "__esModule", {
|
|
1505
1505
|
value: true
|
|
1506
1506
|
});
|
|
1507
|
-
constants.START_BIN = '1010';
|
|
1508
|
-
constants.END_BIN = '11101';
|
|
1507
|
+
constants$1.START_BIN = '1010';
|
|
1508
|
+
constants$1.END_BIN = '11101';
|
|
1509
1509
|
|
|
1510
|
-
constants.BINARIES = ['00110', '10001', '01001', '11000', '00101', '10100', '01100', '00011', '10010', '01010'];
|
|
1510
|
+
constants$1.BINARIES = ['00110', '10001', '01001', '11000', '00101', '10100', '01100', '00011', '10010', '01010'];
|
|
1511
1511
|
|
|
1512
1512
|
Object.defineProperty(ITF$1, "__esModule", {
|
|
1513
1513
|
value: true
|
|
1514
1514
|
});
|
|
1515
1515
|
|
|
1516
|
-
var _createClass$
|
|
1516
|
+
var _createClass$c = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
1517
1517
|
|
|
1518
|
-
var _constants = constants;
|
|
1518
|
+
var _constants$1 = constants$1;
|
|
1519
1519
|
|
|
1520
|
-
var _Barcode2$
|
|
1520
|
+
var _Barcode2$5 = Barcode$2;
|
|
1521
1521
|
|
|
1522
|
-
var _Barcode3$
|
|
1522
|
+
var _Barcode3$5 = _interopRequireDefault$m(_Barcode2$5);
|
|
1523
1523
|
|
|
1524
|
-
function _interopRequireDefault$
|
|
1524
|
+
function _interopRequireDefault$m(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
1525
1525
|
|
|
1526
|
-
function _classCallCheck$
|
|
1526
|
+
function _classCallCheck$h(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
1527
1527
|
|
|
1528
|
-
function _possibleConstructorReturn$
|
|
1528
|
+
function _possibleConstructorReturn$d(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
|
1529
1529
|
|
|
1530
|
-
function _inherits$
|
|
1530
|
+
function _inherits$d(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
|
1531
1531
|
|
|
1532
1532
|
var ITF = function (_Barcode) {
|
|
1533
|
-
_inherits$
|
|
1533
|
+
_inherits$d(ITF, _Barcode);
|
|
1534
1534
|
|
|
1535
1535
|
function ITF() {
|
|
1536
|
-
_classCallCheck$
|
|
1536
|
+
_classCallCheck$h(this, ITF);
|
|
1537
1537
|
|
|
1538
|
-
return _possibleConstructorReturn$
|
|
1538
|
+
return _possibleConstructorReturn$d(this, (ITF.__proto__ || Object.getPrototypeOf(ITF)).apply(this, arguments));
|
|
1539
1539
|
}
|
|
1540
1540
|
|
|
1541
|
-
_createClass$
|
|
1541
|
+
_createClass$c(ITF, [{
|
|
1542
1542
|
key: 'valid',
|
|
1543
1543
|
value: function valid() {
|
|
1544
1544
|
return this.data.search(/^([0-9]{2})+$/) !== -1;
|
|
@@ -1554,7 +1554,7 @@ var ITF = function (_Barcode) {
|
|
|
1554
1554
|
}).join('');
|
|
1555
1555
|
|
|
1556
1556
|
return {
|
|
1557
|
-
data: _constants.START_BIN + encoded + _constants.END_BIN,
|
|
1557
|
+
data: _constants$1.START_BIN + encoded + _constants$1.END_BIN,
|
|
1558
1558
|
text: this.text
|
|
1559
1559
|
};
|
|
1560
1560
|
}
|
|
@@ -1564,16 +1564,16 @@ var ITF = function (_Barcode) {
|
|
|
1564
1564
|
}, {
|
|
1565
1565
|
key: 'encodePair',
|
|
1566
1566
|
value: function encodePair(pair) {
|
|
1567
|
-
var second = _constants.BINARIES[pair[1]];
|
|
1567
|
+
var second = _constants$1.BINARIES[pair[1]];
|
|
1568
1568
|
|
|
1569
|
-
return _constants.BINARIES[pair[0]].split('').map(function (first, idx) {
|
|
1569
|
+
return _constants$1.BINARIES[pair[0]].split('').map(function (first, idx) {
|
|
1570
1570
|
return (first === '1' ? '111' : '1') + (second[idx] === '1' ? '000' : '0');
|
|
1571
1571
|
}).join('');
|
|
1572
1572
|
}
|
|
1573
1573
|
}]);
|
|
1574
1574
|
|
|
1575
1575
|
return ITF;
|
|
1576
|
-
}(_Barcode3$
|
|
1576
|
+
}(_Barcode3$5.default);
|
|
1577
1577
|
|
|
1578
1578
|
ITF$1.default = ITF;
|
|
1579
1579
|
|
|
@@ -1583,19 +1583,19 @@ Object.defineProperty(ITF14$1, "__esModule", {
|
|
|
1583
1583
|
value: true
|
|
1584
1584
|
});
|
|
1585
1585
|
|
|
1586
|
-
var _createClass$
|
|
1586
|
+
var _createClass$b = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
1587
1587
|
|
|
1588
1588
|
var _ITF2$1 = ITF$1;
|
|
1589
1589
|
|
|
1590
|
-
var _ITF3$1 = _interopRequireDefault$
|
|
1590
|
+
var _ITF3$1 = _interopRequireDefault$l(_ITF2$1);
|
|
1591
1591
|
|
|
1592
|
-
function _interopRequireDefault$
|
|
1592
|
+
function _interopRequireDefault$l(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
1593
1593
|
|
|
1594
|
-
function _classCallCheck$
|
|
1594
|
+
function _classCallCheck$g(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
1595
1595
|
|
|
1596
|
-
function _possibleConstructorReturn$
|
|
1596
|
+
function _possibleConstructorReturn$c(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
|
1597
1597
|
|
|
1598
|
-
function _inherits$
|
|
1598
|
+
function _inherits$c(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
|
1599
1599
|
|
|
1600
1600
|
// Calculate the checksum digit
|
|
1601
1601
|
var checksum = function checksum(data) {
|
|
@@ -1609,19 +1609,19 @@ var checksum = function checksum(data) {
|
|
|
1609
1609
|
};
|
|
1610
1610
|
|
|
1611
1611
|
var ITF14 = function (_ITF) {
|
|
1612
|
-
_inherits$
|
|
1612
|
+
_inherits$c(ITF14, _ITF);
|
|
1613
1613
|
|
|
1614
1614
|
function ITF14(data, options) {
|
|
1615
|
-
_classCallCheck$
|
|
1615
|
+
_classCallCheck$g(this, ITF14);
|
|
1616
1616
|
|
|
1617
1617
|
// Add checksum if it does not exist
|
|
1618
1618
|
if (data.search(/^[0-9]{13}$/) !== -1) {
|
|
1619
1619
|
data += checksum(data);
|
|
1620
1620
|
}
|
|
1621
|
-
return _possibleConstructorReturn$
|
|
1621
|
+
return _possibleConstructorReturn$c(this, (ITF14.__proto__ || Object.getPrototypeOf(ITF14)).call(this, data, options));
|
|
1622
1622
|
}
|
|
1623
1623
|
|
|
1624
|
-
_createClass$
|
|
1624
|
+
_createClass$b(ITF14, [{
|
|
1625
1625
|
key: 'valid',
|
|
1626
1626
|
value: function valid() {
|
|
1627
1627
|
return this.data.search(/^[0-9]{14}$/) !== -1 && +this.data[13] === checksum(this.data);
|
|
@@ -1640,13 +1640,13 @@ ITF$2.ITF14 = ITF$2.ITF = undefined;
|
|
|
1640
1640
|
|
|
1641
1641
|
var _ITF$1 = ITF$1;
|
|
1642
1642
|
|
|
1643
|
-
var _ITF2 = _interopRequireDefault$
|
|
1643
|
+
var _ITF2 = _interopRequireDefault$k(_ITF$1);
|
|
1644
1644
|
|
|
1645
1645
|
var _ITF3 = ITF14$1;
|
|
1646
1646
|
|
|
1647
|
-
var _ITF4 = _interopRequireDefault$
|
|
1647
|
+
var _ITF4 = _interopRequireDefault$k(_ITF3);
|
|
1648
1648
|
|
|
1649
|
-
function _interopRequireDefault$
|
|
1649
|
+
function _interopRequireDefault$k(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
1650
1650
|
|
|
1651
1651
|
ITF$2.ITF = _ITF2.default;
|
|
1652
1652
|
ITF$2.ITF14 = _ITF4.default;
|
|
@@ -1659,31 +1659,31 @@ Object.defineProperty(MSI$1, "__esModule", {
|
|
|
1659
1659
|
value: true
|
|
1660
1660
|
});
|
|
1661
1661
|
|
|
1662
|
-
var _createClass$
|
|
1662
|
+
var _createClass$a = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
1663
1663
|
|
|
1664
|
-
var _Barcode2$
|
|
1664
|
+
var _Barcode2$4 = Barcode$2;
|
|
1665
1665
|
|
|
1666
|
-
var _Barcode3$
|
|
1666
|
+
var _Barcode3$4 = _interopRequireDefault$j(_Barcode2$4);
|
|
1667
1667
|
|
|
1668
|
-
function _interopRequireDefault$
|
|
1668
|
+
function _interopRequireDefault$j(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
1669
1669
|
|
|
1670
|
-
function _classCallCheck$
|
|
1670
|
+
function _classCallCheck$f(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
1671
1671
|
|
|
1672
|
-
function _possibleConstructorReturn$
|
|
1672
|
+
function _possibleConstructorReturn$b(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
|
1673
1673
|
|
|
1674
|
-
function _inherits$
|
|
1674
|
+
function _inherits$b(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Encoding documentation
|
|
1675
1675
|
// https://en.wikipedia.org/wiki/MSI_Barcode#Character_set_and_binary_lookup
|
|
1676
1676
|
|
|
1677
1677
|
var MSI = function (_Barcode) {
|
|
1678
|
-
_inherits$
|
|
1678
|
+
_inherits$b(MSI, _Barcode);
|
|
1679
1679
|
|
|
1680
1680
|
function MSI(data, options) {
|
|
1681
|
-
_classCallCheck$
|
|
1681
|
+
_classCallCheck$f(this, MSI);
|
|
1682
1682
|
|
|
1683
|
-
return _possibleConstructorReturn$
|
|
1683
|
+
return _possibleConstructorReturn$b(this, (MSI.__proto__ || Object.getPrototypeOf(MSI)).call(this, data, options));
|
|
1684
1684
|
}
|
|
1685
1685
|
|
|
1686
|
-
_createClass$
|
|
1686
|
+
_createClass$a(MSI, [{
|
|
1687
1687
|
key: "encode",
|
|
1688
1688
|
value: function encode() {
|
|
1689
1689
|
// Start bits
|
|
@@ -1717,7 +1717,7 @@ var MSI = function (_Barcode) {
|
|
|
1717
1717
|
}]);
|
|
1718
1718
|
|
|
1719
1719
|
return MSI;
|
|
1720
|
-
}(_Barcode3$
|
|
1720
|
+
}(_Barcode3$4.default);
|
|
1721
1721
|
|
|
1722
1722
|
function addZeroes(number, n) {
|
|
1723
1723
|
for (var i = 0; i < n; i++) {
|
|
@@ -1766,25 +1766,25 @@ Object.defineProperty(MSI10$1, "__esModule", {
|
|
|
1766
1766
|
|
|
1767
1767
|
var _MSI2$4 = MSI$1;
|
|
1768
1768
|
|
|
1769
|
-
var _MSI3$4 = _interopRequireDefault$
|
|
1769
|
+
var _MSI3$4 = _interopRequireDefault$i(_MSI2$4);
|
|
1770
1770
|
|
|
1771
1771
|
var _checksums$3 = checksums;
|
|
1772
1772
|
|
|
1773
|
-
function _interopRequireDefault$
|
|
1773
|
+
function _interopRequireDefault$i(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
1774
1774
|
|
|
1775
|
-
function _classCallCheck$
|
|
1775
|
+
function _classCallCheck$e(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
1776
1776
|
|
|
1777
|
-
function _possibleConstructorReturn$
|
|
1777
|
+
function _possibleConstructorReturn$a(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
|
1778
1778
|
|
|
1779
|
-
function _inherits$
|
|
1779
|
+
function _inherits$a(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
|
1780
1780
|
|
|
1781
1781
|
var MSI10 = function (_MSI) {
|
|
1782
|
-
_inherits$
|
|
1782
|
+
_inherits$a(MSI10, _MSI);
|
|
1783
1783
|
|
|
1784
1784
|
function MSI10(data, options) {
|
|
1785
|
-
_classCallCheck$
|
|
1785
|
+
_classCallCheck$e(this, MSI10);
|
|
1786
1786
|
|
|
1787
|
-
return _possibleConstructorReturn$
|
|
1787
|
+
return _possibleConstructorReturn$a(this, (MSI10.__proto__ || Object.getPrototypeOf(MSI10)).call(this, data + (0, _checksums$3.mod10)(data), options));
|
|
1788
1788
|
}
|
|
1789
1789
|
|
|
1790
1790
|
return MSI10;
|
|
@@ -1800,25 +1800,25 @@ Object.defineProperty(MSI11$1, "__esModule", {
|
|
|
1800
1800
|
|
|
1801
1801
|
var _MSI2$3 = MSI$1;
|
|
1802
1802
|
|
|
1803
|
-
var _MSI3$3 = _interopRequireDefault$
|
|
1803
|
+
var _MSI3$3 = _interopRequireDefault$h(_MSI2$3);
|
|
1804
1804
|
|
|
1805
1805
|
var _checksums$2 = checksums;
|
|
1806
1806
|
|
|
1807
|
-
function _interopRequireDefault$
|
|
1807
|
+
function _interopRequireDefault$h(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
1808
1808
|
|
|
1809
|
-
function _classCallCheck$
|
|
1809
|
+
function _classCallCheck$d(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
1810
1810
|
|
|
1811
|
-
function _possibleConstructorReturn$
|
|
1811
|
+
function _possibleConstructorReturn$9(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
|
1812
1812
|
|
|
1813
|
-
function _inherits$
|
|
1813
|
+
function _inherits$9(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
|
1814
1814
|
|
|
1815
1815
|
var MSI11 = function (_MSI) {
|
|
1816
|
-
_inherits$
|
|
1816
|
+
_inherits$9(MSI11, _MSI);
|
|
1817
1817
|
|
|
1818
1818
|
function MSI11(data, options) {
|
|
1819
|
-
_classCallCheck$
|
|
1819
|
+
_classCallCheck$d(this, MSI11);
|
|
1820
1820
|
|
|
1821
|
-
return _possibleConstructorReturn$
|
|
1821
|
+
return _possibleConstructorReturn$9(this, (MSI11.__proto__ || Object.getPrototypeOf(MSI11)).call(this, data + (0, _checksums$2.mod11)(data), options));
|
|
1822
1822
|
}
|
|
1823
1823
|
|
|
1824
1824
|
return MSI11;
|
|
@@ -1834,27 +1834,27 @@ Object.defineProperty(MSI1010$1, "__esModule", {
|
|
|
1834
1834
|
|
|
1835
1835
|
var _MSI2$2 = MSI$1;
|
|
1836
1836
|
|
|
1837
|
-
var _MSI3$2 = _interopRequireDefault$
|
|
1837
|
+
var _MSI3$2 = _interopRequireDefault$g(_MSI2$2);
|
|
1838
1838
|
|
|
1839
1839
|
var _checksums$1 = checksums;
|
|
1840
1840
|
|
|
1841
|
-
function _interopRequireDefault$
|
|
1841
|
+
function _interopRequireDefault$g(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
1842
1842
|
|
|
1843
|
-
function _classCallCheck$
|
|
1843
|
+
function _classCallCheck$c(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
1844
1844
|
|
|
1845
|
-
function _possibleConstructorReturn$
|
|
1845
|
+
function _possibleConstructorReturn$8(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
|
1846
1846
|
|
|
1847
|
-
function _inherits$
|
|
1847
|
+
function _inherits$8(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
|
1848
1848
|
|
|
1849
1849
|
var MSI1010 = function (_MSI) {
|
|
1850
|
-
_inherits$
|
|
1850
|
+
_inherits$8(MSI1010, _MSI);
|
|
1851
1851
|
|
|
1852
1852
|
function MSI1010(data, options) {
|
|
1853
|
-
_classCallCheck$
|
|
1853
|
+
_classCallCheck$c(this, MSI1010);
|
|
1854
1854
|
|
|
1855
1855
|
data += (0, _checksums$1.mod10)(data);
|
|
1856
1856
|
data += (0, _checksums$1.mod10)(data);
|
|
1857
|
-
return _possibleConstructorReturn$
|
|
1857
|
+
return _possibleConstructorReturn$8(this, (MSI1010.__proto__ || Object.getPrototypeOf(MSI1010)).call(this, data, options));
|
|
1858
1858
|
}
|
|
1859
1859
|
|
|
1860
1860
|
return MSI1010;
|
|
@@ -1870,27 +1870,27 @@ Object.defineProperty(MSI1110$1, "__esModule", {
|
|
|
1870
1870
|
|
|
1871
1871
|
var _MSI2$1 = MSI$1;
|
|
1872
1872
|
|
|
1873
|
-
var _MSI3$1 = _interopRequireDefault$
|
|
1873
|
+
var _MSI3$1 = _interopRequireDefault$f(_MSI2$1);
|
|
1874
1874
|
|
|
1875
1875
|
var _checksums = checksums;
|
|
1876
1876
|
|
|
1877
|
-
function _interopRequireDefault$
|
|
1877
|
+
function _interopRequireDefault$f(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
1878
1878
|
|
|
1879
|
-
function _classCallCheck$
|
|
1879
|
+
function _classCallCheck$b(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
1880
1880
|
|
|
1881
|
-
function _possibleConstructorReturn$
|
|
1881
|
+
function _possibleConstructorReturn$7(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
|
1882
1882
|
|
|
1883
|
-
function _inherits$
|
|
1883
|
+
function _inherits$7(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
|
1884
1884
|
|
|
1885
1885
|
var MSI1110 = function (_MSI) {
|
|
1886
|
-
_inherits$
|
|
1886
|
+
_inherits$7(MSI1110, _MSI);
|
|
1887
1887
|
|
|
1888
1888
|
function MSI1110(data, options) {
|
|
1889
|
-
_classCallCheck$
|
|
1889
|
+
_classCallCheck$b(this, MSI1110);
|
|
1890
1890
|
|
|
1891
1891
|
data += (0, _checksums.mod11)(data);
|
|
1892
1892
|
data += (0, _checksums.mod10)(data);
|
|
1893
|
-
return _possibleConstructorReturn$
|
|
1893
|
+
return _possibleConstructorReturn$7(this, (MSI1110.__proto__ || Object.getPrototypeOf(MSI1110)).call(this, data, options));
|
|
1894
1894
|
}
|
|
1895
1895
|
|
|
1896
1896
|
return MSI1110;
|
|
@@ -1905,25 +1905,25 @@ MSI$2.MSI1110 = MSI$2.MSI1010 = MSI$2.MSI11 = MSI$2.MSI10 = MSI$2.MSI = undefine
|
|
|
1905
1905
|
|
|
1906
1906
|
var _MSI$1 = MSI$1;
|
|
1907
1907
|
|
|
1908
|
-
var _MSI2 = _interopRequireDefault$
|
|
1908
|
+
var _MSI2 = _interopRequireDefault$e(_MSI$1);
|
|
1909
1909
|
|
|
1910
1910
|
var _MSI3 = MSI10$1;
|
|
1911
1911
|
|
|
1912
|
-
var _MSI4 = _interopRequireDefault$
|
|
1912
|
+
var _MSI4 = _interopRequireDefault$e(_MSI3);
|
|
1913
1913
|
|
|
1914
1914
|
var _MSI5 = MSI11$1;
|
|
1915
1915
|
|
|
1916
|
-
var _MSI6 = _interopRequireDefault$
|
|
1916
|
+
var _MSI6 = _interopRequireDefault$e(_MSI5);
|
|
1917
1917
|
|
|
1918
1918
|
var _MSI7 = MSI1010$1;
|
|
1919
1919
|
|
|
1920
|
-
var _MSI8 = _interopRequireDefault$
|
|
1920
|
+
var _MSI8 = _interopRequireDefault$e(_MSI7);
|
|
1921
1921
|
|
|
1922
1922
|
var _MSI9 = MSI1110$1;
|
|
1923
1923
|
|
|
1924
|
-
var _MSI10 = _interopRequireDefault$
|
|
1924
|
+
var _MSI10 = _interopRequireDefault$e(_MSI9);
|
|
1925
1925
|
|
|
1926
|
-
function _interopRequireDefault$
|
|
1926
|
+
function _interopRequireDefault$e(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
1927
1927
|
|
|
1928
1928
|
MSI$2.MSI = _MSI2.default;
|
|
1929
1929
|
MSI$2.MSI10 = _MSI4.default;
|
|
@@ -1938,34 +1938,34 @@ Object.defineProperty(pharmacode$1, "__esModule", {
|
|
|
1938
1938
|
});
|
|
1939
1939
|
pharmacode$1.pharmacode = undefined;
|
|
1940
1940
|
|
|
1941
|
-
var _createClass$
|
|
1941
|
+
var _createClass$9 = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
1942
1942
|
|
|
1943
|
-
var _Barcode2$
|
|
1943
|
+
var _Barcode2$3 = Barcode$2;
|
|
1944
1944
|
|
|
1945
|
-
var _Barcode3$
|
|
1945
|
+
var _Barcode3$3 = _interopRequireDefault$d(_Barcode2$3);
|
|
1946
1946
|
|
|
1947
|
-
function _interopRequireDefault$
|
|
1947
|
+
function _interopRequireDefault$d(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
1948
1948
|
|
|
1949
|
-
function _classCallCheck$
|
|
1949
|
+
function _classCallCheck$a(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
1950
1950
|
|
|
1951
|
-
function _possibleConstructorReturn$
|
|
1951
|
+
function _possibleConstructorReturn$6(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
|
1952
1952
|
|
|
1953
|
-
function _inherits$
|
|
1953
|
+
function _inherits$6(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Encoding documentation
|
|
1954
1954
|
// http://www.gomaro.ch/ftproot/Laetus_PHARMA-CODE.pdf
|
|
1955
1955
|
|
|
1956
1956
|
var pharmacode = function (_Barcode) {
|
|
1957
|
-
_inherits$
|
|
1957
|
+
_inherits$6(pharmacode, _Barcode);
|
|
1958
1958
|
|
|
1959
1959
|
function pharmacode(data, options) {
|
|
1960
|
-
_classCallCheck$
|
|
1960
|
+
_classCallCheck$a(this, pharmacode);
|
|
1961
1961
|
|
|
1962
|
-
var _this = _possibleConstructorReturn$
|
|
1962
|
+
var _this = _possibleConstructorReturn$6(this, (pharmacode.__proto__ || Object.getPrototypeOf(pharmacode)).call(this, data, options));
|
|
1963
1963
|
|
|
1964
1964
|
_this.number = parseInt(data, 10);
|
|
1965
1965
|
return _this;
|
|
1966
1966
|
}
|
|
1967
1967
|
|
|
1968
|
-
_createClass$
|
|
1968
|
+
_createClass$9(pharmacode, [{
|
|
1969
1969
|
key: "encode",
|
|
1970
1970
|
value: function encode() {
|
|
1971
1971
|
var z = this.number;
|
|
@@ -2001,7 +2001,7 @@ var pharmacode = function (_Barcode) {
|
|
|
2001
2001
|
}]);
|
|
2002
2002
|
|
|
2003
2003
|
return pharmacode;
|
|
2004
|
-
}(_Barcode3$
|
|
2004
|
+
}(_Barcode3$3.default);
|
|
2005
2005
|
|
|
2006
2006
|
pharmacode$1.pharmacode = pharmacode;
|
|
2007
2007
|
|
|
@@ -2012,38 +2012,38 @@ Object.defineProperty(codabar$1, "__esModule", {
|
|
|
2012
2012
|
});
|
|
2013
2013
|
codabar$1.codabar = undefined;
|
|
2014
2014
|
|
|
2015
|
-
var _createClass$
|
|
2015
|
+
var _createClass$8 = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
2016
2016
|
|
|
2017
|
-
var _Barcode2$
|
|
2017
|
+
var _Barcode2$2 = Barcode$2;
|
|
2018
2018
|
|
|
2019
|
-
var _Barcode3$
|
|
2019
|
+
var _Barcode3$2 = _interopRequireDefault$c(_Barcode2$2);
|
|
2020
2020
|
|
|
2021
|
-
function _interopRequireDefault$
|
|
2021
|
+
function _interopRequireDefault$c(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
2022
2022
|
|
|
2023
|
-
function _classCallCheck$
|
|
2023
|
+
function _classCallCheck$9(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
2024
2024
|
|
|
2025
|
-
function _possibleConstructorReturn$
|
|
2025
|
+
function _possibleConstructorReturn$5(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
|
2026
2026
|
|
|
2027
|
-
function _inherits$
|
|
2027
|
+
function _inherits$5(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Encoding specification:
|
|
2028
2028
|
// http://www.barcodeisland.com/codabar.phtml
|
|
2029
2029
|
|
|
2030
2030
|
var codabar = function (_Barcode) {
|
|
2031
|
-
_inherits$
|
|
2031
|
+
_inherits$5(codabar, _Barcode);
|
|
2032
2032
|
|
|
2033
2033
|
function codabar(data, options) {
|
|
2034
|
-
_classCallCheck$
|
|
2034
|
+
_classCallCheck$9(this, codabar);
|
|
2035
2035
|
|
|
2036
2036
|
if (data.search(/^[0-9\-\$\:\.\+\/]+$/) === 0) {
|
|
2037
2037
|
data = "A" + data + "A";
|
|
2038
2038
|
}
|
|
2039
2039
|
|
|
2040
|
-
var _this = _possibleConstructorReturn$
|
|
2040
|
+
var _this = _possibleConstructorReturn$5(this, (codabar.__proto__ || Object.getPrototypeOf(codabar)).call(this, data.toUpperCase(), options));
|
|
2041
2041
|
|
|
2042
2042
|
_this.text = _this.options.text || _this.text.replace(/[A-D]/g, '');
|
|
2043
2043
|
return _this;
|
|
2044
2044
|
}
|
|
2045
2045
|
|
|
2046
|
-
_createClass$
|
|
2046
|
+
_createClass$8(codabar, [{
|
|
2047
2047
|
key: "valid",
|
|
2048
2048
|
value: function valid() {
|
|
2049
2049
|
return this.data.search(/^[A-D][0-9\-\$\:\.\+\/]+[A-D]$/) !== -1;
|
|
@@ -2094,10 +2094,288 @@ var codabar = function (_Barcode) {
|
|
|
2094
2094
|
}]);
|
|
2095
2095
|
|
|
2096
2096
|
return codabar;
|
|
2097
|
-
}(_Barcode3$
|
|
2097
|
+
}(_Barcode3$2.default);
|
|
2098
2098
|
|
|
2099
2099
|
codabar$1.codabar = codabar;
|
|
2100
2100
|
|
|
2101
|
+
var CODE93$2 = {};
|
|
2102
|
+
|
|
2103
|
+
var CODE93$1 = {};
|
|
2104
|
+
|
|
2105
|
+
var constants = {};
|
|
2106
|
+
|
|
2107
|
+
Object.defineProperty(constants, "__esModule", {
|
|
2108
|
+
value: true
|
|
2109
|
+
});
|
|
2110
|
+
// The position in the array is the (checksum) value
|
|
2111
|
+
constants.SYMBOLS = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '-', '.', ' ', '$', '/', '+', '%',
|
|
2112
|
+
// Only used for csum and multi-symbols character encodings
|
|
2113
|
+
'($)', '(%)', '(/)', '(+)',
|
|
2114
|
+
// Start/Stop
|
|
2115
|
+
'\xff'];
|
|
2116
|
+
|
|
2117
|
+
// Order matches SYMBOLS array
|
|
2118
|
+
constants.BINARIES = ['100010100', '101001000', '101000100', '101000010', '100101000', '100100100', '100100010', '101010000', '100010010', '100001010', '110101000', '110100100', '110100010', '110010100', '110010010', '110001010', '101101000', '101100100', '101100010', '100110100', '100011010', '101011000', '101001100', '101000110', '100101100', '100010110', '110110100', '110110010', '110101100', '110100110', '110010110', '110011010', '101101100', '101100110', '100110110', '100111010', '100101110', '111010100', '111010010', '111001010', '101101110', '101110110', '110101110', '100100110', '111011010', '111010110', '100110010', '101011110'];
|
|
2119
|
+
|
|
2120
|
+
// Multi-symbol characters (Full ASCII Code 93)
|
|
2121
|
+
constants.MULTI_SYMBOLS = {
|
|
2122
|
+
'\x00': ['(%)', 'U'],
|
|
2123
|
+
'\x01': ['($)', 'A'],
|
|
2124
|
+
'\x02': ['($)', 'B'],
|
|
2125
|
+
'\x03': ['($)', 'C'],
|
|
2126
|
+
'\x04': ['($)', 'D'],
|
|
2127
|
+
'\x05': ['($)', 'E'],
|
|
2128
|
+
'\x06': ['($)', 'F'],
|
|
2129
|
+
'\x07': ['($)', 'G'],
|
|
2130
|
+
'\x08': ['($)', 'H'],
|
|
2131
|
+
'\x09': ['($)', 'I'],
|
|
2132
|
+
'\x0a': ['($)', 'J'],
|
|
2133
|
+
'\x0b': ['($)', 'K'],
|
|
2134
|
+
'\x0c': ['($)', 'L'],
|
|
2135
|
+
'\x0d': ['($)', 'M'],
|
|
2136
|
+
'\x0e': ['($)', 'N'],
|
|
2137
|
+
'\x0f': ['($)', 'O'],
|
|
2138
|
+
'\x10': ['($)', 'P'],
|
|
2139
|
+
'\x11': ['($)', 'Q'],
|
|
2140
|
+
'\x12': ['($)', 'R'],
|
|
2141
|
+
'\x13': ['($)', 'S'],
|
|
2142
|
+
'\x14': ['($)', 'T'],
|
|
2143
|
+
'\x15': ['($)', 'U'],
|
|
2144
|
+
'\x16': ['($)', 'V'],
|
|
2145
|
+
'\x17': ['($)', 'W'],
|
|
2146
|
+
'\x18': ['($)', 'X'],
|
|
2147
|
+
'\x19': ['($)', 'Y'],
|
|
2148
|
+
'\x1a': ['($)', 'Z'],
|
|
2149
|
+
'\x1b': ['(%)', 'A'],
|
|
2150
|
+
'\x1c': ['(%)', 'B'],
|
|
2151
|
+
'\x1d': ['(%)', 'C'],
|
|
2152
|
+
'\x1e': ['(%)', 'D'],
|
|
2153
|
+
'\x1f': ['(%)', 'E'],
|
|
2154
|
+
'!': ['(/)', 'A'],
|
|
2155
|
+
'"': ['(/)', 'B'],
|
|
2156
|
+
'#': ['(/)', 'C'],
|
|
2157
|
+
'&': ['(/)', 'F'],
|
|
2158
|
+
'\'': ['(/)', 'G'],
|
|
2159
|
+
'(': ['(/)', 'H'],
|
|
2160
|
+
')': ['(/)', 'I'],
|
|
2161
|
+
'*': ['(/)', 'J'],
|
|
2162
|
+
',': ['(/)', 'L'],
|
|
2163
|
+
':': ['(/)', 'Z'],
|
|
2164
|
+
';': ['(%)', 'F'],
|
|
2165
|
+
'<': ['(%)', 'G'],
|
|
2166
|
+
'=': ['(%)', 'H'],
|
|
2167
|
+
'>': ['(%)', 'I'],
|
|
2168
|
+
'?': ['(%)', 'J'],
|
|
2169
|
+
'@': ['(%)', 'V'],
|
|
2170
|
+
'[': ['(%)', 'K'],
|
|
2171
|
+
'\\': ['(%)', 'L'],
|
|
2172
|
+
']': ['(%)', 'M'],
|
|
2173
|
+
'^': ['(%)', 'N'],
|
|
2174
|
+
'_': ['(%)', 'O'],
|
|
2175
|
+
'`': ['(%)', 'W'],
|
|
2176
|
+
'a': ['(+)', 'A'],
|
|
2177
|
+
'b': ['(+)', 'B'],
|
|
2178
|
+
'c': ['(+)', 'C'],
|
|
2179
|
+
'd': ['(+)', 'D'],
|
|
2180
|
+
'e': ['(+)', 'E'],
|
|
2181
|
+
'f': ['(+)', 'F'],
|
|
2182
|
+
'g': ['(+)', 'G'],
|
|
2183
|
+
'h': ['(+)', 'H'],
|
|
2184
|
+
'i': ['(+)', 'I'],
|
|
2185
|
+
'j': ['(+)', 'J'],
|
|
2186
|
+
'k': ['(+)', 'K'],
|
|
2187
|
+
'l': ['(+)', 'L'],
|
|
2188
|
+
'm': ['(+)', 'M'],
|
|
2189
|
+
'n': ['(+)', 'N'],
|
|
2190
|
+
'o': ['(+)', 'O'],
|
|
2191
|
+
'p': ['(+)', 'P'],
|
|
2192
|
+
'q': ['(+)', 'Q'],
|
|
2193
|
+
'r': ['(+)', 'R'],
|
|
2194
|
+
's': ['(+)', 'S'],
|
|
2195
|
+
't': ['(+)', 'T'],
|
|
2196
|
+
'u': ['(+)', 'U'],
|
|
2197
|
+
'v': ['(+)', 'V'],
|
|
2198
|
+
'w': ['(+)', 'W'],
|
|
2199
|
+
'x': ['(+)', 'X'],
|
|
2200
|
+
'y': ['(+)', 'Y'],
|
|
2201
|
+
'z': ['(+)', 'Z'],
|
|
2202
|
+
'{': ['(%)', 'P'],
|
|
2203
|
+
'|': ['(%)', 'Q'],
|
|
2204
|
+
'}': ['(%)', 'R'],
|
|
2205
|
+
'~': ['(%)', 'S'],
|
|
2206
|
+
'\x7f': ['(%)', 'T']
|
|
2207
|
+
};
|
|
2208
|
+
|
|
2209
|
+
Object.defineProperty(CODE93$1, "__esModule", {
|
|
2210
|
+
value: true
|
|
2211
|
+
});
|
|
2212
|
+
|
|
2213
|
+
var _createClass$7 = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
2214
|
+
|
|
2215
|
+
var _constants = constants;
|
|
2216
|
+
|
|
2217
|
+
var _Barcode2$1 = Barcode$2;
|
|
2218
|
+
|
|
2219
|
+
var _Barcode3$1 = _interopRequireDefault$b(_Barcode2$1);
|
|
2220
|
+
|
|
2221
|
+
function _interopRequireDefault$b(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
2222
|
+
|
|
2223
|
+
function _classCallCheck$8(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
2224
|
+
|
|
2225
|
+
function _possibleConstructorReturn$4(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
|
2226
|
+
|
|
2227
|
+
function _inherits$4(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Encoding documentation:
|
|
2228
|
+
// https://en.wikipedia.org/wiki/Code_93#Detailed_outline
|
|
2229
|
+
|
|
2230
|
+
var CODE93 = function (_Barcode) {
|
|
2231
|
+
_inherits$4(CODE93, _Barcode);
|
|
2232
|
+
|
|
2233
|
+
function CODE93(data, options) {
|
|
2234
|
+
_classCallCheck$8(this, CODE93);
|
|
2235
|
+
|
|
2236
|
+
return _possibleConstructorReturn$4(this, (CODE93.__proto__ || Object.getPrototypeOf(CODE93)).call(this, data, options));
|
|
2237
|
+
}
|
|
2238
|
+
|
|
2239
|
+
_createClass$7(CODE93, [{
|
|
2240
|
+
key: 'valid',
|
|
2241
|
+
value: function valid() {
|
|
2242
|
+
return (/^[0-9A-Z\-. $/+%]+$/.test(this.data)
|
|
2243
|
+
);
|
|
2244
|
+
}
|
|
2245
|
+
}, {
|
|
2246
|
+
key: 'encode',
|
|
2247
|
+
value: function encode() {
|
|
2248
|
+
var symbols = this.data.split('').flatMap(function (c) {
|
|
2249
|
+
return _constants.MULTI_SYMBOLS[c] || c;
|
|
2250
|
+
});
|
|
2251
|
+
var encoded = symbols.map(function (s) {
|
|
2252
|
+
return CODE93.getEncoding(s);
|
|
2253
|
+
}).join('');
|
|
2254
|
+
|
|
2255
|
+
// Compute checksum symbols
|
|
2256
|
+
var csumC = CODE93.checksum(symbols, 20);
|
|
2257
|
+
var csumK = CODE93.checksum(symbols.concat(csumC), 15);
|
|
2258
|
+
|
|
2259
|
+
return {
|
|
2260
|
+
text: this.text,
|
|
2261
|
+
data:
|
|
2262
|
+
// Add the start bits
|
|
2263
|
+
CODE93.getEncoding('\xff') +
|
|
2264
|
+
// Add the encoded bits
|
|
2265
|
+
encoded +
|
|
2266
|
+
// Add the checksum
|
|
2267
|
+
CODE93.getEncoding(csumC) + CODE93.getEncoding(csumK) +
|
|
2268
|
+
// Add the stop bits
|
|
2269
|
+
CODE93.getEncoding('\xff') +
|
|
2270
|
+
// Add the termination bit
|
|
2271
|
+
'1'
|
|
2272
|
+
};
|
|
2273
|
+
}
|
|
2274
|
+
|
|
2275
|
+
// Get the binary encoding of a symbol
|
|
2276
|
+
|
|
2277
|
+
}], [{
|
|
2278
|
+
key: 'getEncoding',
|
|
2279
|
+
value: function getEncoding(symbol) {
|
|
2280
|
+
return _constants.BINARIES[CODE93.symbolValue(symbol)];
|
|
2281
|
+
}
|
|
2282
|
+
|
|
2283
|
+
// Get the symbol for a symbol value
|
|
2284
|
+
|
|
2285
|
+
}, {
|
|
2286
|
+
key: 'getSymbol',
|
|
2287
|
+
value: function getSymbol(symbolValue) {
|
|
2288
|
+
return _constants.SYMBOLS[symbolValue];
|
|
2289
|
+
}
|
|
2290
|
+
|
|
2291
|
+
// Get the symbol value of a symbol
|
|
2292
|
+
|
|
2293
|
+
}, {
|
|
2294
|
+
key: 'symbolValue',
|
|
2295
|
+
value: function symbolValue(symbol) {
|
|
2296
|
+
return _constants.SYMBOLS.indexOf(symbol);
|
|
2297
|
+
}
|
|
2298
|
+
|
|
2299
|
+
// Calculate a checksum symbol
|
|
2300
|
+
|
|
2301
|
+
}, {
|
|
2302
|
+
key: 'checksum',
|
|
2303
|
+
value: function checksum(symbols, maxWeight) {
|
|
2304
|
+
var csum = symbols.slice().reverse().reduce(function (sum, symbol, idx) {
|
|
2305
|
+
var weight = idx % maxWeight + 1;
|
|
2306
|
+
return sum + CODE93.symbolValue(symbol) * weight;
|
|
2307
|
+
}, 0);
|
|
2308
|
+
|
|
2309
|
+
return CODE93.getSymbol(csum % 47);
|
|
2310
|
+
}
|
|
2311
|
+
}]);
|
|
2312
|
+
|
|
2313
|
+
return CODE93;
|
|
2314
|
+
}(_Barcode3$1.default);
|
|
2315
|
+
|
|
2316
|
+
CODE93$1.default = CODE93;
|
|
2317
|
+
|
|
2318
|
+
var CODE93FullASCII$1 = {};
|
|
2319
|
+
|
|
2320
|
+
Object.defineProperty(CODE93FullASCII$1, "__esModule", {
|
|
2321
|
+
value: true
|
|
2322
|
+
});
|
|
2323
|
+
|
|
2324
|
+
var _createClass$6 = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
2325
|
+
|
|
2326
|
+
var _CODE2$2 = CODE93$1;
|
|
2327
|
+
|
|
2328
|
+
var _CODE3$1 = _interopRequireDefault$a(_CODE2$2);
|
|
2329
|
+
|
|
2330
|
+
function _interopRequireDefault$a(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
2331
|
+
|
|
2332
|
+
function _classCallCheck$7(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
2333
|
+
|
|
2334
|
+
function _possibleConstructorReturn$3(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
|
2335
|
+
|
|
2336
|
+
function _inherits$3(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Encoding documentation
|
|
2337
|
+
// https://en.wikipedia.org/wiki/Code_93#Full_ASCII_Code_93
|
|
2338
|
+
|
|
2339
|
+
var CODE93FullASCII = function (_CODE) {
|
|
2340
|
+
_inherits$3(CODE93FullASCII, _CODE);
|
|
2341
|
+
|
|
2342
|
+
function CODE93FullASCII(data, options) {
|
|
2343
|
+
_classCallCheck$7(this, CODE93FullASCII);
|
|
2344
|
+
|
|
2345
|
+
return _possibleConstructorReturn$3(this, (CODE93FullASCII.__proto__ || Object.getPrototypeOf(CODE93FullASCII)).call(this, data, options));
|
|
2346
|
+
}
|
|
2347
|
+
|
|
2348
|
+
_createClass$6(CODE93FullASCII, [{
|
|
2349
|
+
key: 'valid',
|
|
2350
|
+
value: function valid() {
|
|
2351
|
+
return (/^[\x00-\x7f]+$/.test(this.data)
|
|
2352
|
+
);
|
|
2353
|
+
}
|
|
2354
|
+
}]);
|
|
2355
|
+
|
|
2356
|
+
return CODE93FullASCII;
|
|
2357
|
+
}(_CODE3$1.default);
|
|
2358
|
+
|
|
2359
|
+
CODE93FullASCII$1.default = CODE93FullASCII;
|
|
2360
|
+
|
|
2361
|
+
Object.defineProperty(CODE93$2, "__esModule", {
|
|
2362
|
+
value: true
|
|
2363
|
+
});
|
|
2364
|
+
CODE93$2.CODE93FullASCII = CODE93$2.CODE93 = undefined;
|
|
2365
|
+
|
|
2366
|
+
var _CODE$1 = CODE93$1;
|
|
2367
|
+
|
|
2368
|
+
var _CODE2$1 = _interopRequireDefault$9(_CODE$1);
|
|
2369
|
+
|
|
2370
|
+
var _CODE93FullASCII = CODE93FullASCII$1;
|
|
2371
|
+
|
|
2372
|
+
var _CODE93FullASCII2 = _interopRequireDefault$9(_CODE93FullASCII);
|
|
2373
|
+
|
|
2374
|
+
function _interopRequireDefault$9(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
2375
|
+
|
|
2376
|
+
CODE93$2.CODE93 = _CODE2$1.default;
|
|
2377
|
+
CODE93$2.CODE93FullASCII = _CODE93FullASCII2.default;
|
|
2378
|
+
|
|
2101
2379
|
var GenericBarcode$1 = {};
|
|
2102
2380
|
|
|
2103
2381
|
Object.defineProperty(GenericBarcode$1, "__esModule", {
|
|
@@ -2172,6 +2450,8 @@ var _pharmacode = pharmacode$1;
|
|
|
2172
2450
|
|
|
2173
2451
|
var _codabar = codabar$1;
|
|
2174
2452
|
|
|
2453
|
+
var _CODE3 = CODE93$2;
|
|
2454
|
+
|
|
2175
2455
|
var _GenericBarcode = GenericBarcode$1;
|
|
2176
2456
|
|
|
2177
2457
|
barcodes.default = {
|
|
@@ -2183,6 +2463,7 @@ barcodes.default = {
|
|
|
2183
2463
|
MSI: _MSI.MSI, MSI10: _MSI.MSI10, MSI11: _MSI.MSI11, MSI1010: _MSI.MSI1010, MSI1110: _MSI.MSI1110,
|
|
2184
2464
|
pharmacode: _pharmacode.pharmacode,
|
|
2185
2465
|
codabar: _codabar.codabar,
|
|
2466
|
+
CODE93: _CODE3.CODE93, CODE93FullASCII: _CODE3.CODE93FullASCII,
|
|
2186
2467
|
GenericBarcode: _GenericBarcode.GenericBarcode
|
|
2187
2468
|
};
|
|
2188
2469
|
|
|
@@ -4693,48 +4974,48 @@ const SchoolIDCard = ({
|
|
|
4693
4974
|
}) => {
|
|
4694
4975
|
let textEl = null;
|
|
4695
4976
|
if (typeof text === "string") {
|
|
4696
|
-
textEl = /* @__PURE__ */ React.createElement("h3", {
|
|
4697
|
-
className: "text-xs font-bold uppercase text-black"
|
|
4698
|
-
}, text);
|
|
4977
|
+
textEl = /* @__PURE__ */ React.createElement("h3", { className: "text-xs font-bold uppercase text-black" }, text);
|
|
4699
4978
|
} else {
|
|
4700
4979
|
textEl = text;
|
|
4701
4980
|
}
|
|
4702
4981
|
let issueeImageEl = null;
|
|
4703
4982
|
const initialsClass = `subject-initials h-[70px] w-[70px] rounded-full mr-[10px] flex flex-row items-center justify-center h-full w-full overflow-hidden bg-emerald-700 text-white font-medium text-3xl ${subjectInitialsClass}`;
|
|
4704
4983
|
if (userImage && (userImage == null ? void 0 : userImage.trim()) !== "") {
|
|
4705
|
-
issueeImageEl = /* @__PURE__ */ React.createElement(
|
|
4706
|
-
|
|
4707
|
-
|
|
4708
|
-
|
|
4984
|
+
issueeImageEl = /* @__PURE__ */ React.createElement(
|
|
4985
|
+
"div",
|
|
4986
|
+
{
|
|
4987
|
+
className: "h-[80px] w-[80px] rounded-full overflow-hidden bg-no-repeat bg-cover bg-center border-solid border-[2px] border-white mr-2",
|
|
4988
|
+
style: { backgroundImage: `url(${userImage})` }
|
|
4989
|
+
}
|
|
4990
|
+
);
|
|
4709
4991
|
} else if (subjectInitials && (!userImage || (userImage == null ? void 0 : userImage.trim()) === "")) {
|
|
4710
|
-
issueeImageEl = /* @__PURE__ */ React.createElement("div", {
|
|
4711
|
-
className: initialsClass
|
|
4712
|
-
}, subjectInitials);
|
|
4992
|
+
issueeImageEl = /* @__PURE__ */ React.createElement("div", { className: initialsClass }, subjectInitials);
|
|
4713
4993
|
}
|
|
4714
|
-
return /* @__PURE__ */ React.createElement(
|
|
4715
|
-
|
|
4716
|
-
|
|
4717
|
-
|
|
4718
|
-
|
|
4719
|
-
|
|
4720
|
-
|
|
4721
|
-
|
|
4722
|
-
|
|
4723
|
-
|
|
4724
|
-
|
|
4725
|
-
|
|
4726
|
-
|
|
4727
|
-
|
|
4728
|
-
|
|
4729
|
-
|
|
4730
|
-
|
|
4731
|
-
|
|
4732
|
-
|
|
4733
|
-
|
|
4734
|
-
|
|
4735
|
-
|
|
4736
|
-
|
|
4994
|
+
return /* @__PURE__ */ React.createElement(
|
|
4995
|
+
"div",
|
|
4996
|
+
{
|
|
4997
|
+
style: { backgroundImage: `url(${backgroundImage})` },
|
|
4998
|
+
className: `h-[200px] w-[320px] rounded-[20px] overflow-hidden ${className}`
|
|
4999
|
+
},
|
|
5000
|
+
/* @__PURE__ */ React.createElement(
|
|
5001
|
+
"div",
|
|
5002
|
+
{
|
|
5003
|
+
className: `h-full w-full flex items-center justify-start relative ${containerClassName}`
|
|
5004
|
+
},
|
|
5005
|
+
/* @__PURE__ */ React.createElement("div", { className: "w-full flex justify-start items-center pl-3 mt-10" }, issueeImageEl, /* @__PURE__ */ React.createElement("div", { className: "h-full flex items-start justify-center flex-col mt-7" }, userName && /* @__PURE__ */ React.createElement("p", { className: "text-sm text-black font-light" }, userName), textEl && textEl)),
|
|
5006
|
+
showBarcode && /* @__PURE__ */ React.createElement("div", { className: "barcode-container" }, /* @__PURE__ */ React.createElement("div", { className: "barcode-wrap" }, /* @__PURE__ */ React.createElement(
|
|
5007
|
+
reactBarcode,
|
|
5008
|
+
{
|
|
5009
|
+
value: "barcode-example",
|
|
5010
|
+
height: "22px",
|
|
5011
|
+
width: "1px",
|
|
5012
|
+
fontSize: 0
|
|
5013
|
+
}
|
|
5014
|
+
))),
|
|
5015
|
+
extraText && /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("p", { className: "absolute bottom-3 left-0 w-full flex items-center justify-center text-white text-xs font-semibold" }, extraText))
|
|
5016
|
+
)
|
|
5017
|
+
);
|
|
4737
5018
|
};
|
|
4738
5019
|
|
|
4739
5020
|
export { SchoolIDCard as S };
|
|
4740
|
-
//# sourceMappingURL=SchoolIDCard-
|
|
5021
|
+
//# sourceMappingURL=SchoolIDCard-8b151cd3.js.map
|