@progress/kendo-charts 2.7.2-dev.202502101310 → 2.7.2-develop.1
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/cdn/js/kendo-charts.js +1 -1
- package/dist/cdn/main.js +1 -1
- package/dist/es/barcode/barcode-validator.js +10 -12
- package/dist/es/barcode/barcode.js +84 -96
- package/dist/es/barcode/encodings/code11.js +41 -57
- package/dist/es/barcode/encodings/code128.js +222 -354
- package/dist/es/barcode/encodings/code39-extended.js +20 -34
- package/dist/es/barcode/encodings/code39.js +49 -75
- package/dist/es/barcode/encodings/code93-extended.js +12 -24
- package/dist/es/barcode/encodings/code93.js +52 -70
- package/dist/es/barcode/encodings/ean13.js +28 -42
- package/dist/es/barcode/encodings/ean8.js +8 -18
- package/dist/es/barcode/encodings/encoding.js +18 -24
- package/dist/es/barcode/encodings/main.js +13 -10
- package/dist/es/barcode/encodings/msi.js +56 -112
- package/dist/es/barcode/encodings/postnet.js +31 -45
- package/dist/es/barcode/surface-size.js +2 -2
- package/dist/es/chart/aggregates/aggregates.js +23 -23
- package/dist/es/chart/aggregates/default-aggregates.js +10 -18
- package/dist/es/chart/aggregates/series-aggregator.js +42 -54
- package/dist/es/chart/animations/bar-chart-animation.js +15 -26
- package/dist/es/chart/animations/bubble-animation.js +7 -17
- package/dist/es/chart/animations/clip-animation.js +13 -23
- package/dist/es/chart/animations/fade-in-animation.js +6 -16
- package/dist/es/chart/animations/pie-animation.js +6 -16
- package/dist/es/chart/api-elements/chart-axis.js +14 -22
- package/dist/es/chart/api-elements/chart-pane.js +10 -8
- package/dist/es/chart/api-elements/chart-plotarea.js +4 -10
- package/dist/es/chart/api-elements/find-axis-by-name.js +1 -1
- package/dist/es/chart/area-chart/area-chart.js +46 -60
- package/dist/es/chart/area-chart/area-segment.js +46 -52
- package/dist/es/chart/area-chart/spline-area-segment.js +12 -21
- package/dist/es/chart/area-chart/step-area-segment.js +6 -15
- package/dist/es/chart/axis-group-range-tracker.js +14 -20
- package/dist/es/chart/bar-chart/bar-chart.js +65 -80
- package/dist/es/chart/bar-chart/bar-label.js +25 -32
- package/dist/es/chart/bar-chart/bar.js +76 -91
- package/dist/es/chart/box-plot-chart/box-plot-chart.js +33 -48
- package/dist/es/chart/box-plot-chart/box-plot.js +55 -68
- package/dist/es/chart/box-plot-chart/vertical-box-plot.js +13 -23
- package/dist/es/chart/bubble-chart/bubble-chart.js +51 -64
- package/dist/es/chart/bubble-chart/bubble.js +21 -27
- package/dist/es/chart/bullet-chart/bullet-chart.js +45 -57
- package/dist/es/chart/bullet-chart/bullet.js +48 -57
- package/dist/es/chart/bullet-chart/target.js +1 -11
- package/dist/es/chart/candlestick-chart/candlestick-chart.js +41 -55
- package/dist/es/chart/candlestick-chart/candlestick.js +60 -69
- package/dist/es/chart/categorical-chart.js +178 -206
- package/dist/es/chart/chart-container.js +30 -39
- package/dist/es/chart/chart.js +641 -701
- package/dist/es/chart/constants.js +103 -103
- package/dist/es/chart/crosshair/crosshair-tooltip.js +22 -34
- package/dist/es/chart/crosshair/crosshair.js +39 -47
- package/dist/es/chart/donut-chart/donut-chart.js +36 -48
- package/dist/es/chart/donut-chart/donut-segment.js +12 -24
- package/dist/es/chart/error-bars/categorical-error-bar.js +5 -15
- package/dist/es/chart/error-bars/error-bar-base.js +37 -49
- package/dist/es/chart/error-bars/error-range-calculator.js +46 -56
- package/dist/es/chart/error-bars/scatter-error-bar.js +6 -16
- package/dist/es/chart/funnel-chart/funnel-chart.js +86 -103
- package/dist/es/chart/funnel-chart/funnel-segment.js +46 -54
- package/dist/es/chart/funnel-chart/pyramid-chart.js +5 -11
- package/dist/es/chart/heatmap-chart/color-scale.js +7 -9
- package/dist/es/chart/heatmap-chart/heatmap-chart.js +87 -110
- package/dist/es/chart/heatmap-chart/heatmap-point.js +72 -78
- package/dist/es/chart/highlight.js +26 -36
- package/dist/es/chart/layout/cluster-layout.js +16 -25
- package/dist/es/chart/layout/radar-cluster-layout.js +15 -24
- package/dist/es/chart/layout/radar-stack-layout.js +10 -22
- package/dist/es/chart/layout/stack-wrap.js +12 -24
- package/dist/es/chart/layout/utils.js +2 -2
- package/dist/es/chart/legend/legend-item-line-area.js +8 -19
- package/dist/es/chart/legend/legend-item-line.js +21 -31
- package/dist/es/chart/legend/legend-item-marker.js +18 -28
- package/dist/es/chart/legend/legend-item-square.js +8 -18
- package/dist/es/chart/legend/legend-item.js +91 -105
- package/dist/es/chart/legend/legend-layout.js +18 -25
- package/dist/es/chart/legend/legend.js +68 -92
- package/dist/es/chart/line-chart/line-chart.js +35 -48
- package/dist/es/chart/line-chart/line-point.js +90 -103
- package/dist/es/chart/line-chart/line-segment.js +23 -34
- package/dist/es/chart/line-chart/spline-segment.js +10 -20
- package/dist/es/chart/line-chart/step-line-mixin.js +14 -17
- package/dist/es/chart/line-chart/step-line-segment.js +4 -14
- package/dist/es/chart/mixins/accessibility-attributes-mixin.js +7 -7
- package/dist/es/chart/mixins/clip-animation-mixin.js +7 -7
- package/dist/es/chart/mixins/line-chart-mixin.js +27 -31
- package/dist/es/chart/mixins/note-mixin.js +3 -3
- package/dist/es/chart/mixins/pie-chart-mixin.js +9 -9
- package/dist/es/chart/mixins/plotarea-events-mixin.js +1 -1
- package/dist/es/chart/mixins/point-events-mixin.js +1 -1
- package/dist/es/chart/ohlc-chart/ohlc-chart.js +4 -14
- package/dist/es/chart/ohlc-chart/ohlc-point.js +15 -28
- package/dist/es/chart/pan-and-zoom/accept-key.js +3 -3
- package/dist/es/chart/pan-and-zoom/mousewheel-zoom.js +25 -33
- package/dist/es/chart/pan-and-zoom/pannable.js +29 -37
- package/dist/es/chart/pan-and-zoom/to-chart-axis-ranges.js +3 -3
- package/dist/es/chart/pan-and-zoom/zoom-selection.js +61 -70
- package/dist/es/chart/pane.js +71 -79
- package/dist/es/chart/pie-chart/pie-chart.js +153 -183
- package/dist/es/chart/pie-chart/pie-segment.js +82 -98
- package/dist/es/chart/plotarea/categorical-plotarea.js +285 -318
- package/dist/es/chart/plotarea/donut-plotarea.js +12 -22
- package/dist/es/chart/plotarea/funnel-plotarea.js +17 -27
- package/dist/es/chart/plotarea/heatmap-plotarea.js +139 -167
- package/dist/es/chart/plotarea/pie-plotarea.js +15 -25
- package/dist/es/chart/plotarea/plotarea-base.js +423 -462
- package/dist/es/chart/plotarea/plotarea-factory.js +15 -20
- package/dist/es/chart/plotarea/polar-plotarea-base.js +37 -51
- package/dist/es/chart/plotarea/polar-plotarea.js +39 -49
- package/dist/es/chart/plotarea/radar-plotarea.js +55 -65
- package/dist/es/chart/plotarea/xy-plotarea.js +111 -128
- package/dist/es/chart/polar-area-chart/polar-area-chart.js +22 -36
- package/dist/es/chart/polar-area-chart/polar-area-segment.js +7 -17
- package/dist/es/chart/polar-area-chart/spline-polar-area-segment.js +15 -25
- package/dist/es/chart/polar-line-chart/polar-line-chart.js +2 -11
- package/dist/es/chart/polar-scatter-chart/polar-scatter-chart.js +6 -16
- package/dist/es/chart/radar-area-chart/radar-area-chart.js +11 -21
- package/dist/es/chart/radar-area-chart/radar-area-segment.js +3 -13
- package/dist/es/chart/radar-area-chart/spline-radar-area-segment.js +3 -13
- package/dist/es/chart/radar-bar-chart/radar-bar-chart.js +19 -29
- package/dist/es/chart/radar-bar-chart/radar-segment.js +6 -12
- package/dist/es/chart/radar-line-chart/radar-line-chart.js +26 -35
- package/dist/es/chart/range-area-chart/range-area-chart.js +46 -58
- package/dist/es/chart/range-area-chart/range-area-point.js +55 -66
- package/dist/es/chart/range-area-chart/range-area-segment.js +19 -28
- package/dist/es/chart/range-area-chart/range-line-point.js +4 -14
- package/dist/es/chart/range-area-chart/spline-range-area-segment.js +11 -18
- package/dist/es/chart/range-area-chart/step-range-area-segment.js +7 -16
- package/dist/es/chart/range-bar-chart/range-bar-chart.js +18 -29
- package/dist/es/chart/range-bar-chart/range-bar.js +10 -23
- package/dist/es/chart/register-charts.js +20 -16
- package/dist/es/chart/scatter-charts/scatter-chart.js +100 -122
- package/dist/es/chart/scatter-charts/scatter-line-chart.js +15 -25
- package/dist/es/chart/selection.js +176 -201
- package/dist/es/chart/series-binder.js +55 -66
- package/dist/es/chart/theme/base-theme.js +75 -79
- package/dist/es/chart/theme/load-theme.js +52 -52
- package/dist/es/chart/tooltip/base-tooltip.js +17 -24
- package/dist/es/chart/tooltip/shared-tooltip.js +25 -31
- package/dist/es/chart/tooltip/tooltip.js +10 -20
- package/dist/es/chart/trendlines/calculate-moving-average.js +11 -13
- package/dist/es/chart/trendlines/calculate-polynomial.js +24 -26
- package/dist/es/chart/trendlines/calculate-slope.js +12 -14
- package/dist/es/chart/trendlines/check-all-positive.js +2 -5
- package/dist/es/chart/trendlines/exponential-trendline.js +15 -24
- package/dist/es/chart/trendlines/get-scatter-trendline-data.js +6 -7
- package/dist/es/chart/trendlines/get-trendline-data.js +6 -6
- package/dist/es/chart/trendlines/linear-trendline.js +12 -21
- package/dist/es/chart/trendlines/logarithmic-trendline.js +14 -23
- package/dist/es/chart/trendlines/moving-average.js +15 -26
- package/dist/es/chart/trendlines/polynomial-trendline.js +13 -21
- package/dist/es/chart/trendlines/power-trendline.js +15 -24
- package/dist/es/chart/trendlines/scatter-exponential-trendline.js +15 -24
- package/dist/es/chart/trendlines/scatter-linear-trendline.js +10 -16
- package/dist/es/chart/trendlines/scatter-logarithmic-trendline.js +17 -27
- package/dist/es/chart/trendlines/scatter-moving-average.js +7 -10
- package/dist/es/chart/trendlines/scatter-polynomial-trendline.js +11 -16
- package/dist/es/chart/trendlines/scatter-power-trendline.js +15 -22
- package/dist/es/chart/trendlines/scatter-trendline-registry.js +1 -1
- package/dist/es/chart/trendlines/scatter-value-getter.js +2 -5
- package/dist/es/chart/trendlines/trendline-factory.js +1 -1
- package/dist/es/chart/trendlines/trendline-registry.js +1 -1
- package/dist/es/chart/trendlines/x-value-limits.js +6 -8
- package/dist/es/chart/utils/any-has-z-index.js +1 -1
- package/dist/es/chart/utils/bind-segments.js +8 -8
- package/dist/es/chart/utils/categories-count.js +3 -3
- package/dist/es/chart/utils/count-numbers.js +4 -4
- package/dist/es/chart/utils/create-out-of-range-points.js +13 -22
- package/dist/es/chart/utils/eval-options.js +7 -10
- package/dist/es/chart/utils/filter-series-by-type.js +4 -4
- package/dist/es/chart/utils/get-field.js +1 -1
- package/dist/es/chart/utils/has-gradient-overlay.js +1 -1
- package/dist/es/chart/utils/is-date-axis.js +2 -2
- package/dist/es/chart/utils/parse-date-category.js +2 -2
- package/dist/es/chart/utils/segment-visible.js +2 -2
- package/dist/es/chart/waterfall-chart/waterfall-chart.js +41 -55
- package/dist/es/chart/waterfall-chart/waterfall-segment.js +16 -24
- package/dist/es/chart-wizard/get-wizard-data-from-data-rows.js +5 -6
- package/dist/es/chart-wizard/messages.js +1 -1
- package/dist/es/chart-wizard/state.js +145 -137
- package/dist/es/chart-wizard.js +12 -12
- package/dist/es/common/add-class.js +3 -3
- package/dist/es/common/align-path-to-pixel.js +2 -2
- package/dist/es/common/auto-text-color.js +1 -1
- package/dist/es/common/constants.js +53 -53
- package/dist/es/common/create-hash-set.js +59 -65
- package/dist/es/common/cycleDown.js +1 -1
- package/dist/es/common/deep-extend.js +10 -12
- package/dist/es/common/element-scale.js +9 -9
- package/dist/es/common/element-styles.js +8 -8
- package/dist/es/common/event-map.js +4 -4
- package/dist/es/common/event-utils.js +13 -13
- package/dist/es/common/find.js +2 -2
- package/dist/es/common/font-loader.js +42 -44
- package/dist/es/common/get-aria-template.js +2 -4
- package/dist/es/common/get-spacing.js +2 -4
- package/dist/es/common/get-supported-features.js +7 -7
- package/dist/es/common/get-template.js +2 -4
- package/dist/es/common/getter.js +5 -5
- package/dist/es/common/grep.js +3 -3
- package/dist/es/common/has-classes.js +2 -2
- package/dist/es/common/hash-map.js +11 -11
- package/dist/es/common/instance-observer.js +28 -33
- package/dist/es/common/keys.js +1 -1
- package/dist/es/common/map.js +4 -4
- package/dist/es/common/matrix.js +142 -150
- package/dist/es/common/mousewheel-delta.js +2 -2
- package/dist/es/common/observable.js +40 -52
- package/dist/es/common/remove-class.js +1 -1
- package/dist/es/common/render-icon.js +50 -60
- package/dist/es/common/set-default-options.js +1 -1
- package/dist/es/common/sparse-array-limits.js +4 -4
- package/dist/es/common/user-events.js +124 -150
- package/dist/es/core/axis-label.js +38 -43
- package/dist/es/core/axis.js +293 -345
- package/dist/es/core/box-element.js +36 -46
- package/dist/es/core/box.js +75 -83
- package/dist/es/core/category-axis.js +265 -314
- package/dist/es/core/chart-element.js +98 -109
- package/dist/es/core/constants.js +3 -3
- package/dist/es/core/curve-processor.js +86 -93
- package/dist/es/core/date-category-axis.js +381 -413
- package/dist/es/core/date-value-axis.js +108 -118
- package/dist/es/core/float-element.js +54 -78
- package/dist/es/core/gradients.js +3 -3
- package/dist/es/core/logarithmic-axis.js +134 -186
- package/dist/es/core/mixins/grid-lines-mixin.js +18 -20
- package/dist/es/core/mixins/radar-numeric-axis-mixin.js +46 -51
- package/dist/es/core/note.js +58 -73
- package/dist/es/core/numeric-axis.js +111 -133
- package/dist/es/core/pattern.js +4 -8
- package/dist/es/core/point.js +25 -34
- package/dist/es/core/polar-axis.js +73 -91
- package/dist/es/core/radar-category-axis.js +90 -114
- package/dist/es/core/radar-logarithmic-axis.js +10 -20
- package/dist/es/core/radar-numeric-axis.js +10 -20
- package/dist/es/core/ring.js +61 -68
- package/dist/es/core/root-element.js +40 -48
- package/dist/es/core/sector.js +11 -17
- package/dist/es/core/shape-builder.js +13 -23
- package/dist/es/core/shape-element.js +27 -37
- package/dist/es/core/text-box.js +50 -59
- package/dist/es/core/text.js +13 -24
- package/dist/es/core/title.js +19 -25
- package/dist/es/core/utils/auto-axis-max.js +3 -3
- package/dist/es/core/utils/auto-axis-min.js +3 -3
- package/dist/es/core/utils/auto-major-unit.js +4 -4
- package/dist/es/core/utils/box-diff.js +9 -9
- package/dist/es/core/utils/create-axis-grid-line.js +2 -4
- package/dist/es/core/utils/create-axis-tick.js +2 -4
- package/dist/es/core/utils/guid.js +3 -3
- package/dist/es/core/utils/rect-to-box.js +2 -2
- package/dist/es/date-utils/absolute-date-diff.js +2 -2
- package/dist/es/date-utils/add-duration.js +5 -5
- package/dist/es/date-utils/ceil-date.js +1 -1
- package/dist/es/date-utils/constants.js +17 -17
- package/dist/es/date-utils/date-index.js +3 -3
- package/dist/es/date-utils/duration.js +1 -1
- package/dist/es/date-utils/lte-date-index.js +4 -4
- package/dist/es/date-utils/parse-date.js +1 -1
- package/dist/es/date-utils/parse-dates.js +2 -2
- package/dist/es/date-utils/start-of-week.js +3 -5
- package/dist/es/date-utils/to-date.js +1 -1
- package/dist/es/date-utils/to-time.js +2 -2
- package/dist/es/drawing-utils.js +18 -17
- package/dist/es/gauges/arc/arc-gauge.js +29 -38
- package/dist/es/gauges/arc/arc-scale.js +16 -29
- package/dist/es/gauges/arc/range-pointer-animation.js +16 -25
- package/dist/es/gauges/arc/range-pointer.js +25 -46
- package/dist/es/gauges/circular/circular-gauge.js +7 -17
- package/dist/es/gauges/constants.js +14 -14
- package/dist/es/gauges/gauge.js +84 -96
- package/dist/es/gauges/linear/arrow-linear-pointer-animation.js +13 -25
- package/dist/es/gauges/linear/arrow-linear-pointer.js +23 -35
- package/dist/es/gauges/linear/bar-linear-pointer-animation.js +15 -24
- package/dist/es/gauges/linear/bar-linear-pointer.js +38 -51
- package/dist/es/gauges/linear/linear-gauge.js +61 -83
- package/dist/es/gauges/linear/linear-pointer.js +25 -39
- package/dist/es/gauges/linear/linear-scale.js +57 -74
- package/dist/es/gauges/pointer.js +11 -21
- package/dist/es/gauges/radial/radial-gauge.js +58 -81
- package/dist/es/gauges/radial/radial-pointer-animation.js +9 -15
- package/dist/es/gauges/radial/radial-pointer.js +33 -48
- package/dist/es/gauges/radial/radial-scale.js +154 -186
- package/dist/es/gauges/utils/build-label-element.js +10 -12
- package/dist/es/gauges/utils/get-range.js +2 -2
- package/dist/es/gauges/utils/pad.js +3 -3
- package/dist/es/gauges/utils/unpad.js +1 -1
- package/dist/es/map/attribution.js +42 -52
- package/dist/es/map/constants.js +5 -5
- package/dist/es/map/crs.js +68 -112
- package/dist/es/map/datums.js +3 -3
- package/dist/es/map/extent.js +40 -54
- package/dist/es/map/layers/bubble.js +52 -70
- package/dist/es/map/layers/layer.js +50 -56
- package/dist/es/map/layers/marker.js +109 -129
- package/dist/es/map/layers/shape.js +111 -133
- package/dist/es/map/layers/tile.js +144 -170
- package/dist/es/map/location.js +70 -78
- package/dist/es/map/map.js +261 -291
- package/dist/es/map/navigator.js +33 -39
- package/dist/es/map/scroller/draggable.js +98 -134
- package/dist/es/map/scroller/fx.js +39 -46
- package/dist/es/map/scroller/scroller.js +144 -174
- package/dist/es/map/tooltip/tooltip.js +15 -25
- package/dist/es/map/utils.js +25 -26
- package/dist/es/map/zoom.js +30 -36
- package/dist/es/qrcode/encodings/data-modes/alpha-numeric-data-mode.js +14 -26
- package/dist/es/qrcode/encodings/data-modes/byte-data-mode.js +15 -25
- package/dist/es/qrcode/encodings/data-modes/data-mode-instances.js +8 -7
- package/dist/es/qrcode/encodings/data-modes/numeric-data-mode.js +14 -24
- package/dist/es/qrcode/encodings/data-modes/qr-data-mode.js +15 -21
- package/dist/es/qrcode/encodings/encoders/iso-encoder.js +6 -16
- package/dist/es/qrcode/encodings/encoders/utf8-encoder.js +28 -36
- package/dist/es/qrcode/encodings/encoding-result.js +4 -10
- package/dist/es/qrcode/encodings/encoding.js +68 -192
- package/dist/es/qrcode/encodings/free-cell-visitor.js +16 -24
- package/dist/es/qrcode/encodings/utils/choose-mode.js +44 -0
- package/dist/es/qrcode/encodings/utils/get-data-codewords-count.js +13 -0
- package/dist/es/qrcode/encodings/utils/get-data-string.js +13 -0
- package/dist/es/qrcode/encodings/utils/get-modes.js +35 -0
- package/dist/es/qrcode/encodings/utils/get-version.js +23 -0
- package/dist/es/qrcode/encodings/utils/index.js +5 -0
- package/dist/es/qrcode/encodings/version-codewords.js +1 -1
- package/dist/es/qrcode/qrcode-validator.js +3 -5
- package/dist/es/qrcode/qrcode.js +104 -114
- package/dist/es/qrcode/utils.js +4 -4
- package/dist/es/sankey/calculation.js +286 -307
- package/dist/es/sankey/element.js +15 -23
- package/dist/es/sankey/label.js +29 -44
- package/dist/es/sankey/legend.js +15 -29
- package/dist/es/sankey/link.js +80 -98
- package/dist/es/sankey/node.js +26 -37
- package/dist/es/sankey/sankey.js +318 -385
- package/dist/es/sankey/title.js +9 -20
- package/dist/es/sankey/utils.js +18 -23
- package/dist/es/services/chart-service.js +24 -28
- package/dist/es/services/dom-events-builder.js +15 -15
- package/dist/es/services/format-service.js +30 -35
- package/dist/es/services/intl-service.js +14 -18
- package/dist/es/services/map-service.js +11 -11
- package/dist/es/services/template-service.js +9 -9
- package/dist/es/sparkline/shared-tooltip.js +11 -21
- package/dist/es/sparkline/sparkline.js +50 -60
- package/dist/es/stock/constants.js +3 -3
- package/dist/es/stock/fade-out-animation.js +12 -21
- package/dist/es/stock/navigator-hint.js +37 -49
- package/dist/es/stock/navigator.js +130 -161
- package/dist/es/stock/stock-chart.js +58 -67
- package/dist/es2015/chart/legend/legend-item.js +1 -1
- package/dist/es2015/qrcode/encodings/encoders/iso-encoder.js +1 -1
- package/dist/es2015/qrcode/encodings/encoders/utf8-encoder.js +1 -1
- package/dist/es2015/qrcode/encodings/encoding.js +3 -127
- package/dist/es2015/qrcode/encodings/utils/choose-mode.js +44 -0
- package/dist/es2015/qrcode/encodings/utils/get-data-codewords-count.js +13 -0
- package/dist/es2015/qrcode/encodings/utils/get-data-string.js +13 -0
- package/dist/es2015/qrcode/encodings/utils/get-modes.js +35 -0
- package/dist/es2015/qrcode/encodings/utils/get-version.js +23 -0
- package/dist/es2015/qrcode/encodings/utils/index.js +5 -0
- package/dist/npm/main.js +3222 -3589
- package/dist/systemjs/kendo-charts.js +1 -1
- package/package.json +19 -57
|
@@ -3,85 +3,73 @@ import { Encoding } from './encoding';
|
|
|
3
3
|
import deepExtend from '../../common/deep-extend';
|
|
4
4
|
import inArray from '../../common/in-array';
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
const numberRegex = /^\d+$/;
|
|
7
|
+
const alphanumericRegex = /^[a-z0-9]+$/i;
|
|
8
|
+
const extend = Object.assign;
|
|
9
9
|
|
|
10
|
-
export
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
export class State128 extends Class {
|
|
11
|
+
constructor(encoding) {
|
|
12
|
+
super();
|
|
13
13
|
this.encoding = encoding;
|
|
14
14
|
this.initProperties();
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
State128.prototype = Object.create( Class && Class.prototype );
|
|
19
|
-
State128.prototype.constructor = State128;
|
|
17
|
+
initProperties() { }
|
|
20
18
|
|
|
21
|
-
|
|
19
|
+
addStart() { }
|
|
22
20
|
|
|
23
|
-
|
|
21
|
+
is() { }
|
|
24
22
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
State128.prototype.isCode = function isCode () {
|
|
23
|
+
isCode() {
|
|
28
24
|
return false;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
State128.prototype.move = function move () { };
|
|
25
|
+
}
|
|
32
26
|
|
|
33
|
-
|
|
27
|
+
move() { }
|
|
34
28
|
|
|
35
|
-
|
|
36
|
-
}
|
|
29
|
+
pushState() { }
|
|
30
|
+
}
|
|
37
31
|
|
|
38
|
-
export
|
|
39
|
-
|
|
40
|
-
|
|
32
|
+
export class State128AB extends State128 {
|
|
33
|
+
constructor(encoding, states) {
|
|
34
|
+
super(encoding);
|
|
41
35
|
this.states = states;
|
|
42
36
|
this._initMoves(states);
|
|
43
37
|
}
|
|
44
38
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
State128AB.prototype.constructor = State128AB;
|
|
48
|
-
|
|
49
|
-
State128AB.prototype.initProperties = function initProperties () {
|
|
50
|
-
State128.prototype.initProperties.call(this);
|
|
39
|
+
initProperties() {
|
|
40
|
+
super.initProperties();
|
|
51
41
|
|
|
52
42
|
deepExtend(this, {
|
|
53
43
|
FNC4: "FNC4",
|
|
54
44
|
SHIFT: 98
|
|
55
45
|
});
|
|
56
|
-
}
|
|
46
|
+
}
|
|
57
47
|
|
|
58
|
-
|
|
48
|
+
addStart() {
|
|
59
49
|
this.encoding.addPattern(this.START);
|
|
60
|
-
}
|
|
50
|
+
}
|
|
61
51
|
|
|
62
|
-
|
|
63
|
-
|
|
52
|
+
is(value, index) {
|
|
53
|
+
let code = value.charCodeAt(index);
|
|
64
54
|
return this.isCode(code);
|
|
65
|
-
}
|
|
55
|
+
}
|
|
66
56
|
|
|
67
|
-
|
|
68
|
-
|
|
57
|
+
move(encodingState) {
|
|
58
|
+
let idx = 0;
|
|
69
59
|
|
|
70
60
|
while (!this._moves[idx].call(this, encodingState) && idx < this._moves.length) {
|
|
71
61
|
idx++;
|
|
72
62
|
}
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
State128AB.prototype.pushState = function pushState (encodingState) {
|
|
76
|
-
var this$1 = this;
|
|
63
|
+
}
|
|
77
64
|
|
|
78
|
-
|
|
65
|
+
pushState(encodingState) {
|
|
66
|
+
let states = this.states,
|
|
79
67
|
value = encodingState.value,
|
|
80
68
|
maxLength = value.length,
|
|
81
69
|
code;
|
|
82
70
|
|
|
83
71
|
if (inArray("C", states)) {
|
|
84
|
-
|
|
72
|
+
let numberMatch = value.substr(encodingState.index).match(/\d{4,}/g);
|
|
85
73
|
|
|
86
74
|
if (numberMatch) {
|
|
87
75
|
maxLength = value.indexOf(numberMatch[0], encodingState.index);
|
|
@@ -91,12 +79,12 @@ export var State128AB = (function (State128) {
|
|
|
91
79
|
while ((code = encodingState.value.charCodeAt(encodingState.index)) >= 0 &&
|
|
92
80
|
this.isCode(code) &&
|
|
93
81
|
encodingState.index < maxLength) {
|
|
94
|
-
this
|
|
82
|
+
this.encoding.addPattern(this.getValue(code));
|
|
95
83
|
encodingState.index++;
|
|
96
84
|
}
|
|
97
|
-
}
|
|
85
|
+
}
|
|
98
86
|
|
|
99
|
-
|
|
87
|
+
_initMoves(states) {
|
|
100
88
|
this._moves = [];
|
|
101
89
|
|
|
102
90
|
if (inArray(this.FNC4, states)) {
|
|
@@ -108,16 +96,16 @@ export var State128AB = (function (State128) {
|
|
|
108
96
|
}
|
|
109
97
|
|
|
110
98
|
this._moves.push(this._moveState);
|
|
111
|
-
}
|
|
99
|
+
}
|
|
112
100
|
|
|
113
|
-
|
|
101
|
+
_moveFNC(encodingState) {
|
|
114
102
|
if (encodingState.fnc) {
|
|
115
103
|
encodingState.fnc = false;
|
|
116
104
|
return encodingState.previousState === this.key;
|
|
117
105
|
}
|
|
118
|
-
}
|
|
106
|
+
}
|
|
119
107
|
|
|
120
|
-
|
|
108
|
+
_shiftState(encodingState) {
|
|
121
109
|
if (encodingState.previousState === this.shiftKey &&
|
|
122
110
|
(encodingState.index + 1 >= encodingState.value.length ||
|
|
123
111
|
this.encoding[this.shiftKey].is(encodingState.value, encodingState.index + 1))) {
|
|
@@ -125,29 +113,19 @@ export var State128AB = (function (State128) {
|
|
|
125
113
|
encodingState.shifted = true;
|
|
126
114
|
return true;
|
|
127
115
|
}
|
|
128
|
-
}
|
|
116
|
+
}
|
|
129
117
|
|
|
130
|
-
|
|
118
|
+
_moveState() {
|
|
131
119
|
this.encoding.addPattern(this.MOVE);
|
|
132
120
|
return true;
|
|
133
|
-
};
|
|
134
|
-
|
|
135
|
-
return State128AB;
|
|
136
|
-
}(State128));
|
|
137
|
-
|
|
138
|
-
var states128 = {};
|
|
139
|
-
|
|
140
|
-
states128.A = (function (State128AB) {
|
|
141
|
-
function State128A () {
|
|
142
|
-
State128AB.apply(this, arguments);
|
|
143
121
|
}
|
|
122
|
+
}
|
|
144
123
|
|
|
145
|
-
|
|
146
|
-
State128A.prototype = Object.create( State128AB && State128AB.prototype );
|
|
147
|
-
State128A.prototype.constructor = State128A;
|
|
124
|
+
const states128 = {};
|
|
148
125
|
|
|
149
|
-
|
|
150
|
-
|
|
126
|
+
states128.A = class State128A extends State128AB {
|
|
127
|
+
initProperties() {
|
|
128
|
+
super.initProperties();
|
|
151
129
|
|
|
152
130
|
extend(this, {
|
|
153
131
|
key: "A",
|
|
@@ -155,34 +133,24 @@ states128.A = (function (State128AB) {
|
|
|
155
133
|
MOVE: 101,
|
|
156
134
|
START: 103
|
|
157
135
|
});
|
|
158
|
-
}
|
|
136
|
+
}
|
|
159
137
|
|
|
160
|
-
|
|
138
|
+
isCode(code) {
|
|
161
139
|
return 0 <= code && code < 96;
|
|
162
|
-
}
|
|
140
|
+
}
|
|
163
141
|
|
|
164
|
-
|
|
142
|
+
getValue(code) {
|
|
165
143
|
if (code < 32) {
|
|
166
144
|
return code + 64;
|
|
167
145
|
}
|
|
168
146
|
|
|
169
147
|
return code - 32;
|
|
170
|
-
};
|
|
171
|
-
|
|
172
|
-
return State128A;
|
|
173
|
-
}(State128AB));
|
|
174
|
-
|
|
175
|
-
states128.B = (function (State128AB) {
|
|
176
|
-
function State128B () {
|
|
177
|
-
State128AB.apply(this, arguments);
|
|
178
148
|
}
|
|
149
|
+
};
|
|
179
150
|
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
State128B.prototype.initProperties = function initProperties () {
|
|
185
|
-
State128AB.prototype.initProperties.call(this);
|
|
151
|
+
states128.B = class State128B extends State128AB {
|
|
152
|
+
initProperties() {
|
|
153
|
+
super.initProperties();
|
|
186
154
|
|
|
187
155
|
extend(this, {
|
|
188
156
|
key: "B",
|
|
@@ -190,119 +158,99 @@ states128.B = (function (State128AB) {
|
|
|
190
158
|
MOVE: 100,
|
|
191
159
|
START: 104
|
|
192
160
|
});
|
|
193
|
-
}
|
|
161
|
+
}
|
|
194
162
|
|
|
195
|
-
|
|
163
|
+
isCode(code) {
|
|
196
164
|
return 32 <= code && code < 128;
|
|
197
|
-
}
|
|
165
|
+
}
|
|
198
166
|
|
|
199
|
-
|
|
167
|
+
getValue(code) {
|
|
200
168
|
return code - 32;
|
|
201
|
-
};
|
|
202
|
-
|
|
203
|
-
return State128B;
|
|
204
|
-
}(State128AB));
|
|
205
|
-
|
|
206
|
-
states128.C = (function (State128) {
|
|
207
|
-
function State128C () {
|
|
208
|
-
State128.apply(this, arguments);
|
|
209
169
|
}
|
|
170
|
+
};
|
|
210
171
|
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
State128C.prototype.initProperties = function initProperties () {
|
|
216
|
-
State128.prototype.initProperties.call(this);
|
|
172
|
+
states128.C = class State128C extends State128 {
|
|
173
|
+
initProperties() {
|
|
174
|
+
super.initProperties();
|
|
217
175
|
|
|
218
176
|
extend(this, {
|
|
219
177
|
key: "C",
|
|
220
178
|
MOVE: 99,
|
|
221
179
|
START: 105
|
|
222
180
|
});
|
|
223
|
-
}
|
|
181
|
+
}
|
|
224
182
|
|
|
225
|
-
|
|
183
|
+
addStart() {
|
|
226
184
|
this.encoding.addPattern(this.START);
|
|
227
|
-
}
|
|
185
|
+
}
|
|
228
186
|
|
|
229
|
-
|
|
230
|
-
|
|
187
|
+
is(value, index) {
|
|
188
|
+
let next4 = getSubstring(value, index, 4);
|
|
231
189
|
return (index + 4 <= value.length || value.length === 2) && numberRegex.test(next4);
|
|
232
|
-
}
|
|
190
|
+
}
|
|
233
191
|
|
|
234
|
-
|
|
192
|
+
move() {
|
|
235
193
|
this.encoding.addPattern(this.MOVE);
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
State128C.prototype.pushState = function pushState (encodingState) {
|
|
239
|
-
var this$1 = this;
|
|
194
|
+
}
|
|
240
195
|
|
|
241
|
-
|
|
196
|
+
pushState(encodingState) {
|
|
197
|
+
let code;
|
|
242
198
|
|
|
243
199
|
while ((code = getSubstring(encodingState.value, encodingState.index, 2)) &&
|
|
244
200
|
numberRegex.test(code) && code.length === 2) {
|
|
245
|
-
this
|
|
201
|
+
this.encoding.addPattern(parseInt(code, 10));
|
|
246
202
|
encodingState.index += 2;
|
|
247
203
|
}
|
|
248
|
-
}
|
|
204
|
+
}
|
|
249
205
|
|
|
250
|
-
|
|
206
|
+
getValue(code) {
|
|
251
207
|
return code;
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
return State128C;
|
|
255
|
-
}(State128));
|
|
208
|
+
}
|
|
209
|
+
};
|
|
256
210
|
|
|
257
|
-
states128.FNC4 =
|
|
258
|
-
|
|
259
|
-
|
|
211
|
+
states128.FNC4 = class State128FNC4 extends State128 {
|
|
212
|
+
constructor(encoding, states) {
|
|
213
|
+
super(encoding);
|
|
260
214
|
this._initSubStates(states);
|
|
261
215
|
}
|
|
262
216
|
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
State128FNC4.prototype.constructor = State128FNC4;
|
|
266
|
-
|
|
267
|
-
State128FNC4.prototype.initProperties = function initProperties () {
|
|
268
|
-
State128.prototype.initProperties.call(this);
|
|
217
|
+
initProperties() {
|
|
218
|
+
super.initProperties();
|
|
269
219
|
|
|
270
220
|
extend(this, {
|
|
271
221
|
key: "FNC4",
|
|
272
222
|
dependentStates: ["A", "B"]
|
|
273
223
|
});
|
|
274
|
-
}
|
|
224
|
+
}
|
|
275
225
|
|
|
276
|
-
|
|
277
|
-
|
|
226
|
+
addStart(encodingState) {
|
|
227
|
+
let code = encodingState.value.charCodeAt(0) - 128,
|
|
278
228
|
subState = this._getSubState(code);
|
|
279
229
|
|
|
280
230
|
this.encoding[subState].addStart();
|
|
281
|
-
}
|
|
231
|
+
}
|
|
282
232
|
|
|
283
|
-
|
|
284
|
-
|
|
233
|
+
is(value, index) {
|
|
234
|
+
let code = value.charCodeAt(index);
|
|
285
235
|
return this.isCode(code);
|
|
286
|
-
}
|
|
236
|
+
}
|
|
287
237
|
|
|
288
|
-
|
|
238
|
+
isCode(code) {
|
|
289
239
|
return 128 <= code && code < 256;
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
State128FNC4.prototype.pushState = function pushState (encodingState) {
|
|
293
|
-
var this$1 = this;
|
|
240
|
+
}
|
|
294
241
|
|
|
295
|
-
|
|
242
|
+
pushState(encodingState) {
|
|
243
|
+
let subState = this._initSubState(encodingState),
|
|
296
244
|
encoding = this.encoding,
|
|
297
245
|
length = subState.value.length;
|
|
298
|
-
|
|
246
|
+
let code;
|
|
299
247
|
|
|
300
248
|
encodingState.index += length;
|
|
301
249
|
|
|
302
250
|
if (length < 3) {
|
|
303
251
|
for (; subState.index < length; subState.index++) {
|
|
304
252
|
code = subState.value.charCodeAt(subState.index);
|
|
305
|
-
subState.state = this
|
|
253
|
+
subState.state = this._getSubState(code);
|
|
306
254
|
|
|
307
255
|
if (subState.previousState !== subState.state) {
|
|
308
256
|
subState.previousState = subState.state;
|
|
@@ -327,15 +275,15 @@ states128.FNC4 = (function (State128) {
|
|
|
327
275
|
|
|
328
276
|
encodingState.fnc = true;
|
|
329
277
|
encodingState.state = subState.state;
|
|
330
|
-
}
|
|
278
|
+
}
|
|
331
279
|
|
|
332
|
-
|
|
280
|
+
_pushStart(subState) {
|
|
333
281
|
this.encoding.addPattern(this.encoding[subState.state].MOVE);
|
|
334
282
|
this.encoding.addPattern(this.encoding[subState.state].MOVE);
|
|
335
|
-
}
|
|
283
|
+
}
|
|
336
284
|
|
|
337
|
-
|
|
338
|
-
|
|
285
|
+
_initSubState(encodingState) {
|
|
286
|
+
const subState = {
|
|
339
287
|
value: this._getAll(encodingState.value, encodingState.index),
|
|
340
288
|
index: 0
|
|
341
289
|
};
|
|
@@ -346,57 +294,47 @@ states128.FNC4 = (function (State128) {
|
|
|
346
294
|
encodingState.previousState;
|
|
347
295
|
|
|
348
296
|
return subState;
|
|
349
|
-
}
|
|
350
|
-
|
|
351
|
-
State128FNC4.prototype._initSubStates = function _initSubStates (states) {
|
|
352
|
-
var this$1 = this;
|
|
297
|
+
}
|
|
353
298
|
|
|
299
|
+
_initSubStates(states) {
|
|
354
300
|
this.subStates = [];
|
|
355
301
|
|
|
356
|
-
for (
|
|
357
|
-
if (inArray(states[i], this
|
|
358
|
-
this
|
|
302
|
+
for (let i = 0; i < states.length; i++) {
|
|
303
|
+
if (inArray(states[i], this.dependentStates)) {
|
|
304
|
+
this.subStates.push(states[i]);
|
|
359
305
|
}
|
|
360
306
|
}
|
|
361
|
-
}
|
|
362
|
-
|
|
363
|
-
State128FNC4.prototype._getSubState = function _getSubState (code) {
|
|
364
|
-
var this$1 = this;
|
|
307
|
+
}
|
|
365
308
|
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
309
|
+
_getSubState(code) {
|
|
310
|
+
for (let i = 0; i < this.subStates.length; i++) {
|
|
311
|
+
if (this.encoding[this.subStates[i]].isCode(code)) {
|
|
312
|
+
return this.subStates[i];
|
|
369
313
|
}
|
|
370
314
|
}
|
|
371
|
-
}
|
|
315
|
+
}
|
|
372
316
|
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
317
|
+
_getAll(value, index) {
|
|
318
|
+
let code;
|
|
319
|
+
let result = "";
|
|
320
|
+
let i = index;
|
|
377
321
|
|
|
378
322
|
while ((code = value.charCodeAt(i++)) && this.isCode(code)) {
|
|
379
323
|
result += String.fromCharCode(code - 128);
|
|
380
324
|
}
|
|
381
325
|
|
|
382
326
|
return result;
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
return State128FNC4;
|
|
386
|
-
}(State128));
|
|
327
|
+
}
|
|
328
|
+
};
|
|
387
329
|
|
|
388
|
-
states128.FNC1 =
|
|
389
|
-
|
|
390
|
-
|
|
330
|
+
states128.FNC1 = class States128FNC1 extends State128 {
|
|
331
|
+
constructor(encoding, states) {
|
|
332
|
+
super(encoding);
|
|
391
333
|
this.states = states;
|
|
392
334
|
}
|
|
393
335
|
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
States128FNC1.prototype.constructor = States128FNC1;
|
|
397
|
-
|
|
398
|
-
States128FNC1.prototype.initProperties = function initProperties () {
|
|
399
|
-
State128.prototype.initProperties.call(this);
|
|
336
|
+
initProperties() {
|
|
337
|
+
super.initProperties();
|
|
400
338
|
|
|
401
339
|
extend(this, {
|
|
402
340
|
key: "FNC1",
|
|
@@ -468,21 +406,19 @@ states128.FNC1 = (function (State128) {
|
|
|
468
406
|
},
|
|
469
407
|
START: 102
|
|
470
408
|
});
|
|
471
|
-
}
|
|
409
|
+
}
|
|
472
410
|
|
|
473
411
|
|
|
474
|
-
|
|
412
|
+
addStart() {
|
|
475
413
|
this.encoding[this.startState].addStart();
|
|
476
|
-
}
|
|
414
|
+
}
|
|
477
415
|
|
|
478
|
-
|
|
416
|
+
is() {
|
|
479
417
|
return inArray(this.key, this.states);
|
|
480
|
-
}
|
|
481
|
-
|
|
482
|
-
States128FNC1.prototype.pushState = function pushState (encodingState) {
|
|
483
|
-
var this$1 = this;
|
|
418
|
+
}
|
|
484
419
|
|
|
485
|
-
|
|
420
|
+
pushState(encodingState) {
|
|
421
|
+
let encoding = this.encoding,
|
|
486
422
|
value = encodingState.value.replace(/\s/g, ""),
|
|
487
423
|
regexSeparators = new RegExp("[" + this.startAI + this.endAI + "]", "g"),
|
|
488
424
|
index = encodingState.index,
|
|
@@ -495,18 +431,18 @@ states128.FNC1 = (function (State128) {
|
|
|
495
431
|
|
|
496
432
|
encoding.addPattern(this.START);
|
|
497
433
|
|
|
498
|
-
|
|
434
|
+
const trueCondition = true;
|
|
499
435
|
|
|
500
436
|
while (trueCondition) {
|
|
501
437
|
subState.index = 0;
|
|
502
438
|
|
|
503
|
-
separatorLength = value.charAt(index) === this
|
|
504
|
-
current = separatorLength > 0 ? this
|
|
439
|
+
separatorLength = value.charAt(index) === this.startAI ? 2 : 0;
|
|
440
|
+
current = separatorLength > 0 ? this.getBySeparator(value, index) : this.getByLength(value, index);
|
|
505
441
|
|
|
506
442
|
if (current.ai.length) {
|
|
507
443
|
nextStart = index + separatorLength + current.id.length + current.ai.length;
|
|
508
444
|
} else {
|
|
509
|
-
nextStart = value.indexOf(this
|
|
445
|
+
nextStart = value.indexOf(this.startAI, index + 1);
|
|
510
446
|
|
|
511
447
|
if (nextStart < 0) {
|
|
512
448
|
if (index + current.ai.max + current.id.length + separatorLength < value.length) {
|
|
@@ -518,8 +454,8 @@ states128.FNC1 = (function (State128) {
|
|
|
518
454
|
}
|
|
519
455
|
|
|
520
456
|
subState.value = value.substring(index, nextStart).replace(regexSeparators, "");
|
|
521
|
-
this
|
|
522
|
-
encoding.pushData(subState, this
|
|
457
|
+
this.validate(current, subState.value);
|
|
458
|
+
encoding.pushData(subState, this.dependentStates);
|
|
523
459
|
|
|
524
460
|
if (nextStart >= value.length) {
|
|
525
461
|
break;
|
|
@@ -527,21 +463,21 @@ states128.FNC1 = (function (State128) {
|
|
|
527
463
|
|
|
528
464
|
index = nextStart;
|
|
529
465
|
|
|
530
|
-
if (subState.state !== this
|
|
531
|
-
encoding[this
|
|
532
|
-
subState.state = this
|
|
466
|
+
if (subState.state !== this.startState) {
|
|
467
|
+
encoding[this.startState].move(subState);
|
|
468
|
+
subState.state = this.startState;
|
|
533
469
|
}
|
|
534
470
|
|
|
535
471
|
if (!current.ai.length) {
|
|
536
|
-
encoding.addPattern(this
|
|
472
|
+
encoding.addPattern(this.START);
|
|
537
473
|
}
|
|
538
474
|
}
|
|
539
475
|
|
|
540
476
|
encodingState.index = encodingState.value.length;
|
|
541
|
-
}
|
|
477
|
+
}
|
|
542
478
|
|
|
543
|
-
|
|
544
|
-
|
|
479
|
+
validate(current, value) {
|
|
480
|
+
let code = value.substr(current.id.length),
|
|
545
481
|
ai = current.ai;
|
|
546
482
|
|
|
547
483
|
if (!ai.type && !numberRegex.test(code)) {
|
|
@@ -563,17 +499,15 @@ states128.FNC1 = (function (State128) {
|
|
|
563
499
|
if (ai.max && ai.max < code.length) {
|
|
564
500
|
throw new Error("Application identifier " + current.id + " must be at most " + ai.max + " characters long.");
|
|
565
501
|
}
|
|
566
|
-
}
|
|
567
|
-
|
|
568
|
-
States128FNC1.prototype.getByLength = function getByLength (value, index) {
|
|
569
|
-
var this$1 = this;
|
|
502
|
+
}
|
|
570
503
|
|
|
571
|
-
|
|
572
|
-
|
|
504
|
+
getByLength(value, index) {
|
|
505
|
+
let id;
|
|
506
|
+
let applicationIdentifier;
|
|
573
507
|
|
|
574
|
-
for (
|
|
508
|
+
for (let i = 2; i <= 4; i++) {
|
|
575
509
|
id = getSubstring(value, index, i);
|
|
576
|
-
applicationIdentifier = this
|
|
510
|
+
applicationIdentifier = this.getApplicationIdentifier(id) || this.getApplicationIdentifier(id.substring(0, id.length - 1));
|
|
577
511
|
if (applicationIdentifier) {
|
|
578
512
|
return {
|
|
579
513
|
id: id,
|
|
@@ -582,14 +516,14 @@ states128.FNC1 = (function (State128) {
|
|
|
582
516
|
}
|
|
583
517
|
}
|
|
584
518
|
this.unsupportedAIError(id);
|
|
585
|
-
}
|
|
519
|
+
}
|
|
586
520
|
|
|
587
|
-
|
|
521
|
+
unsupportedAIError(id) {
|
|
588
522
|
throw new Error("'" + id + "' is not a supported Application Identifier");
|
|
589
|
-
}
|
|
523
|
+
}
|
|
590
524
|
|
|
591
|
-
|
|
592
|
-
|
|
525
|
+
getBySeparator(value, index) {
|
|
526
|
+
let start = value.indexOf(this.startAI, index),
|
|
593
527
|
end = value.indexOf(this.endAI, start),
|
|
594
528
|
id = value.substring(start + 1, end),
|
|
595
529
|
ai = this.getApplicationIdentifier(id) || this.getApplicationIdentifier(id.substr(id.length - 1));
|
|
@@ -602,46 +536,40 @@ states128.FNC1 = (function (State128) {
|
|
|
602
536
|
ai: ai,
|
|
603
537
|
id: id
|
|
604
538
|
};
|
|
605
|
-
}
|
|
539
|
+
}
|
|
606
540
|
|
|
607
|
-
|
|
608
|
-
|
|
541
|
+
getApplicationIdentifier(id) {
|
|
542
|
+
let applicationIdentifier = this.applicationIdentifiers,
|
|
609
543
|
multiKey = applicationIdentifier.multiKey;
|
|
610
544
|
|
|
611
545
|
if (applicationIdentifier[id]) {
|
|
612
546
|
return applicationIdentifier[id];
|
|
613
547
|
}
|
|
614
548
|
|
|
615
|
-
for (
|
|
549
|
+
for (let i = 0; i < multiKey.length; i++) {
|
|
616
550
|
if (multiKey[i].ids && inArray(id, multiKey[i].ids)) {
|
|
617
551
|
return multiKey[i].type;
|
|
618
552
|
} else if (multiKey[i].ranges) {
|
|
619
|
-
|
|
553
|
+
let ranges = multiKey[i].ranges;
|
|
620
554
|
|
|
621
|
-
for (
|
|
555
|
+
for (let j = 0; j < ranges.length; j++) {
|
|
622
556
|
if (ranges[j][0] <= id && id <= ranges[j][1]) {
|
|
623
557
|
return multiKey[i].type;
|
|
624
558
|
}
|
|
625
559
|
}
|
|
626
560
|
}
|
|
627
561
|
}
|
|
628
|
-
}
|
|
629
|
-
|
|
630
|
-
return States128FNC1;
|
|
631
|
-
}(State128));
|
|
562
|
+
}
|
|
563
|
+
};
|
|
632
564
|
|
|
633
|
-
export
|
|
634
|
-
|
|
635
|
-
|
|
565
|
+
export class Code128Base extends Encoding {
|
|
566
|
+
constructor(options) {
|
|
567
|
+
super(options);
|
|
636
568
|
this._initStates();
|
|
637
569
|
}
|
|
638
570
|
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
Code128Base.prototype.constructor = Code128Base;
|
|
642
|
-
|
|
643
|
-
Code128Base.prototype.initProperties = function initProperties () {
|
|
644
|
-
Encoding.prototype.initProperties.call(this);
|
|
571
|
+
initProperties() {
|
|
572
|
+
super.initProperties();
|
|
645
573
|
|
|
646
574
|
extend(this, {
|
|
647
575
|
characterMap: [
|
|
@@ -659,17 +587,15 @@ export var Code128Base = (function (Encoding) {
|
|
|
659
587
|
],
|
|
660
588
|
STOP: 106
|
|
661
589
|
});
|
|
662
|
-
}
|
|
663
|
-
|
|
664
|
-
Code128Base.prototype._initStates = function _initStates () {
|
|
665
|
-
var this$1 = this;
|
|
590
|
+
}
|
|
666
591
|
|
|
667
|
-
|
|
668
|
-
|
|
592
|
+
_initStates() {
|
|
593
|
+
for (let i = 0; i < this.states.length; i++) {
|
|
594
|
+
this[this.states[i]] = new states128[this.states[i]](this, this.states);
|
|
669
595
|
}
|
|
670
|
-
}
|
|
596
|
+
}
|
|
671
597
|
|
|
672
|
-
|
|
598
|
+
initValue(value, width, height) {
|
|
673
599
|
this.pattern = [];
|
|
674
600
|
this.value = value;
|
|
675
601
|
this.width = width;
|
|
@@ -678,10 +604,10 @@ export var Code128Base = (function (Encoding) {
|
|
|
678
604
|
this.totalUnits = 0;
|
|
679
605
|
this.index = 0;
|
|
680
606
|
this.position = 1;
|
|
681
|
-
}
|
|
607
|
+
}
|
|
682
608
|
|
|
683
|
-
|
|
684
|
-
|
|
609
|
+
addData() {
|
|
610
|
+
let encodingState = {
|
|
685
611
|
value: this.value,
|
|
686
612
|
index: 0,
|
|
687
613
|
state: ""
|
|
@@ -701,15 +627,13 @@ export var Code128Base = (function (Encoding) {
|
|
|
701
627
|
this.addCheckSum();
|
|
702
628
|
this.addStop();
|
|
703
629
|
this.setBaseUnit();
|
|
704
|
-
}
|
|
705
|
-
|
|
706
|
-
Code128Base.prototype.pushData = function pushData (encodingState, states) {
|
|
707
|
-
var this$1 = this;
|
|
630
|
+
}
|
|
708
631
|
|
|
709
|
-
|
|
632
|
+
pushData(encodingState, states) {
|
|
633
|
+
const trueCondition = true;
|
|
710
634
|
|
|
711
635
|
while (trueCondition) {
|
|
712
|
-
this
|
|
636
|
+
this[encodingState.state].pushState(encodingState);
|
|
713
637
|
|
|
714
638
|
if (encodingState.index >= encodingState.value.length) {
|
|
715
639
|
break;
|
|
@@ -717,168 +641,112 @@ export var Code128Base = (function (Encoding) {
|
|
|
717
641
|
|
|
718
642
|
if (!encodingState.shifted) {
|
|
719
643
|
encodingState.previousState = encodingState.state;
|
|
720
|
-
encodingState.state = this
|
|
721
|
-
this
|
|
644
|
+
encodingState.state = this.getNextState(encodingState, states);
|
|
645
|
+
this[encodingState.state].move(encodingState);
|
|
722
646
|
} else {
|
|
723
|
-
|
|
647
|
+
let temp = encodingState.state;
|
|
724
648
|
encodingState.state = encodingState.previousState;
|
|
725
649
|
encodingState.previousState = temp;
|
|
726
650
|
encodingState.shifted = false;
|
|
727
651
|
}
|
|
728
652
|
}
|
|
729
|
-
}
|
|
653
|
+
}
|
|
730
654
|
|
|
731
|
-
|
|
655
|
+
addStart(encodingState) {
|
|
732
656
|
this[encodingState.state].addStart(encodingState);
|
|
733
657
|
this.position = 1;
|
|
734
|
-
}
|
|
658
|
+
}
|
|
735
659
|
|
|
736
|
-
|
|
660
|
+
addCheckSum() {
|
|
737
661
|
this.checksum = this.checkSum % 103;
|
|
738
662
|
this.addPattern(this.checksum);
|
|
739
|
-
}
|
|
663
|
+
}
|
|
740
664
|
|
|
741
|
-
|
|
665
|
+
addStop() {
|
|
742
666
|
this.addPattern(this.STOP);
|
|
743
|
-
}
|
|
667
|
+
}
|
|
744
668
|
|
|
745
|
-
|
|
669
|
+
setBaseUnit() {
|
|
746
670
|
this.baseUnit = this.width / (this.totalUnits + this.quietZoneLength);
|
|
747
|
-
}
|
|
748
|
-
|
|
749
|
-
Code128Base.prototype.addPattern = function addPattern (code) {
|
|
750
|
-
var this$1 = this;
|
|
671
|
+
}
|
|
751
672
|
|
|
752
|
-
|
|
753
|
-
|
|
673
|
+
addPattern(code) {
|
|
674
|
+
const pattern = this.characterMap[code].toString();
|
|
675
|
+
let value;
|
|
754
676
|
|
|
755
|
-
for (
|
|
677
|
+
for (let i = 0; i < pattern.length; i++) {
|
|
756
678
|
value = parseInt(pattern.charAt(i), 10);
|
|
757
|
-
this
|
|
758
|
-
this
|
|
679
|
+
this.pattern.push(value);
|
|
680
|
+
this.totalUnits += value;
|
|
759
681
|
}
|
|
760
682
|
this.checkSum += code * this.position++;
|
|
761
|
-
}
|
|
762
|
-
|
|
763
|
-
Code128Base.prototype.getNextState = function getNextState (encodingState, states) {
|
|
764
|
-
var this$1 = this;
|
|
683
|
+
}
|
|
765
684
|
|
|
766
|
-
|
|
767
|
-
|
|
685
|
+
getNextState(encodingState, states) {
|
|
686
|
+
for (let i = 0; i < states.length; i++) {
|
|
687
|
+
if (this[states[i]].is(encodingState.value, encodingState.index)) {
|
|
768
688
|
return states[i];
|
|
769
689
|
}
|
|
770
690
|
}
|
|
771
691
|
|
|
772
692
|
this.invalidCharacterError(encodingState.value.charAt(encodingState.index));
|
|
773
|
-
};
|
|
774
|
-
|
|
775
|
-
return Code128Base;
|
|
776
|
-
}(Encoding));
|
|
777
|
-
|
|
778
|
-
export var Code128a = (function (Code128Base) {
|
|
779
|
-
function Code128a () {
|
|
780
|
-
Code128Base.apply(this, arguments);
|
|
781
693
|
}
|
|
694
|
+
}
|
|
782
695
|
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
Code128a.prototype.initProperties = function initProperties () {
|
|
788
|
-
Code128Base.prototype.initProperties.call(this);
|
|
696
|
+
export class Code128a extends Code128Base {
|
|
697
|
+
initProperties() {
|
|
698
|
+
super.initProperties();
|
|
789
699
|
|
|
790
700
|
extend(this, {
|
|
791
701
|
name: "Code 128 A",
|
|
792
702
|
states: ["A"]
|
|
793
703
|
});
|
|
794
|
-
};
|
|
795
|
-
|
|
796
|
-
return Code128a;
|
|
797
|
-
}(Code128Base));
|
|
798
|
-
|
|
799
|
-
export var Code128b = (function (Code128Base) {
|
|
800
|
-
function Code128b () {
|
|
801
|
-
Code128Base.apply(this, arguments);
|
|
802
704
|
}
|
|
705
|
+
}
|
|
803
706
|
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
Code128b.prototype.initProperties = function initProperties () {
|
|
809
|
-
Code128Base.prototype.initProperties.call(this);
|
|
707
|
+
export class Code128b extends Code128Base {
|
|
708
|
+
initProperties() {
|
|
709
|
+
super.initProperties();
|
|
810
710
|
|
|
811
711
|
extend(this, {
|
|
812
712
|
name: "Code 128 B",
|
|
813
713
|
states: ["B"]
|
|
814
714
|
});
|
|
815
|
-
};
|
|
816
|
-
|
|
817
|
-
return Code128b;
|
|
818
|
-
}(Code128Base));
|
|
819
|
-
|
|
820
|
-
export var Code128c = (function (Code128Base) {
|
|
821
|
-
function Code128c () {
|
|
822
|
-
Code128Base.apply(this, arguments);
|
|
823
715
|
}
|
|
716
|
+
}
|
|
824
717
|
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
Code128c.prototype.initProperties = function initProperties () {
|
|
830
|
-
Code128Base.prototype.initProperties.call(this);
|
|
718
|
+
export class Code128c extends Code128Base {
|
|
719
|
+
initProperties() {
|
|
720
|
+
super.initProperties();
|
|
831
721
|
|
|
832
722
|
extend(this, {
|
|
833
723
|
name: "Code 128 C",
|
|
834
724
|
states: ["C"]
|
|
835
725
|
});
|
|
836
|
-
};
|
|
837
|
-
|
|
838
|
-
return Code128c;
|
|
839
|
-
}(Code128Base));
|
|
840
|
-
|
|
841
|
-
export var Code128 = (function (Code128Base) {
|
|
842
|
-
function Code128 () {
|
|
843
|
-
Code128Base.apply(this, arguments);
|
|
844
726
|
}
|
|
727
|
+
}
|
|
845
728
|
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
Code128.prototype.initProperties = function initProperties () {
|
|
851
|
-
Code128Base.prototype.initProperties.call(this);
|
|
729
|
+
export class Code128 extends Code128Base {
|
|
730
|
+
initProperties() {
|
|
731
|
+
super.initProperties();
|
|
852
732
|
|
|
853
733
|
extend(this, {
|
|
854
734
|
name: "Code 128",
|
|
855
735
|
states: ["C", "B", "A", "FNC4"]
|
|
856
736
|
});
|
|
857
|
-
};
|
|
858
|
-
|
|
859
|
-
return Code128;
|
|
860
|
-
}(Code128Base));
|
|
861
|
-
|
|
862
|
-
export var CodeGS1128 = (function (Code128Base) {
|
|
863
|
-
function CodeGS1128 () {
|
|
864
|
-
Code128Base.apply(this, arguments);
|
|
865
737
|
}
|
|
738
|
+
}
|
|
866
739
|
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
CodeGS1128.prototype.initProperties = function initProperties () {
|
|
872
|
-
Code128Base.prototype.initProperties.call(this);
|
|
740
|
+
export class CodeGS1128 extends Code128Base {
|
|
741
|
+
initProperties() {
|
|
742
|
+
super.initProperties();
|
|
873
743
|
|
|
874
744
|
extend(this, {
|
|
875
745
|
name: "Code GS1-128",
|
|
876
746
|
states: ["FNC1", "C", "B"]
|
|
877
747
|
});
|
|
878
|
-
}
|
|
879
|
-
|
|
880
|
-
return CodeGS1128;
|
|
881
|
-
}(Code128Base));
|
|
748
|
+
}
|
|
749
|
+
}
|
|
882
750
|
|
|
883
751
|
function getSubstring(value, index, count) {
|
|
884
752
|
return value.substring(index, index + count);
|