@operato/ocr 0.2.15 → 0.2.19

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.
Files changed (44) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/demo/index.html +35 -25
  3. package/dist/src/camera-capturer.js +2 -2
  4. package/dist/src/camera-capturer.js.map +1 -1
  5. package/dist/src/index.d.ts +1 -1
  6. package/dist/src/index.js +1 -1
  7. package/dist/src/index.js.map +1 -1
  8. package/dist/src/ox-camera-capturer.d.ts +14 -0
  9. package/dist/src/ox-camera-capturer.js +178 -0
  10. package/dist/src/ox-camera-capturer.js.map +1 -0
  11. package/dist/src/{ocr-helper.d.ts → ox-ocr-helper.d.ts} +4 -2
  12. package/dist/src/{ocr-helper.js → ox-ocr-helper.js} +26 -25
  13. package/dist/src/ox-ocr-helper.js.map +1 -0
  14. package/dist/src/ox-ocr-result-image.d.ts +47 -0
  15. package/dist/src/ox-ocr-result-image.js +921 -0
  16. package/dist/src/ox-ocr-result-image.js.map +1 -0
  17. package/dist/src/utils/file-drop-helper.d.ts +16 -0
  18. package/dist/src/utils/file-drop-helper.js +47 -0
  19. package/dist/src/utils/file-drop-helper.js.map +1 -0
  20. package/dist/src/utils/touch-mouse-event.d.ts +0 -0
  21. package/dist/src/utils/touch-mouse-event.js +2 -0
  22. package/dist/src/utils/touch-mouse-event.js.map +1 -0
  23. package/dist/src/utils/touch-to-mouse-event.d.ts +1 -0
  24. package/dist/src/utils/touch-to-mouse-event.js +34 -0
  25. package/dist/src/utils/touch-to-mouse-event.js.map +1 -0
  26. package/dist/stories/index.stories.d.ts +1 -1
  27. package/dist/stories/index.stories.js +10 -14
  28. package/dist/stories/index.stories.js.map +1 -1
  29. package/dist/test/ox-ocr-helper.test.d.ts +1 -0
  30. package/dist/test/{ocr-helper.test.js → ox-ocr-helper.test.js} +7 -7
  31. package/dist/test/ox-ocr-helper.test.js.map +1 -0
  32. package/dist/tsconfig.tsbuildinfo +1 -1
  33. package/package.json +3 -2
  34. package/src/index.ts +1 -1
  35. package/src/{camera-capturer.ts → ox-camera-capturer.ts} +18 -10
  36. package/src/{ocr-helper.ts → ox-ocr-helper.ts} +27 -26
  37. package/src/ox-ocr-result-image.ts +954 -0
  38. package/src/{file-drop-helper.ts → utils/file-drop-helper.ts} +0 -0
  39. package/src/utils/touch-to-mouse-event.ts +39 -0
  40. package/stories/index.stories.ts +29 -37
  41. package/test/{ocr-helper.test.ts → ox-ocr-helper.test.ts} +8 -7
  42. package/dist/src/ocr-helper.js.map +0 -1
  43. package/dist/test/ocr-helper.test.d.ts +0 -1
  44. package/dist/test/ocr-helper.test.js.map +0 -1
@@ -0,0 +1,921 @@
1
+ import { __decorate } from "tslib";
2
+ import { css, html, LitElement } from 'lit';
3
+ import { customElement, property, query, state } from 'lit/decorators.js';
4
+ import { touch2mouse } from './utils/touch-to-mouse-event';
5
+ let OcrResultImage = class OcrResultImage extends LitElement {
6
+ constructor() {
7
+ super(...arguments);
8
+ this.result = RESULT;
9
+ this._trails = [];
10
+ this._tracking = false;
11
+ this._selections = [];
12
+ this._text = '';
13
+ }
14
+ render() {
15
+ return html `
16
+ <img src=${this._image} />
17
+ <canvas overlay></canvas>
18
+
19
+ ${this._text ? html ` <div notice>${this._text} copied!</div> ` : html ``}
20
+ `;
21
+ }
22
+ renderOverlay() {
23
+ const { boundaries } = this.result;
24
+ const context = this._overlay.getContext('2d');
25
+ if (!context) {
26
+ return;
27
+ }
28
+ context.save();
29
+ context.clearRect(0, 0, this._overlay.width, this._overlay.height);
30
+ context.lineWidth = 5;
31
+ context.strokeStyle = 'red';
32
+ context.fillStyle = 'red';
33
+ context.lineJoin = 'round';
34
+ context.lineCap = 'round';
35
+ this._image &&
36
+ boundaries
37
+ .map((bounds) => {
38
+ return bounds.map(bound => {
39
+ return {
40
+ x: bound.x * this._ratio.x,
41
+ y: bound.y * this._ratio.y
42
+ };
43
+ });
44
+ })
45
+ .forEach((bounds, idx) => {
46
+ context.beginPath();
47
+ context.moveTo(bounds[0].x, bounds[0].y);
48
+ context.lineTo(bounds[1].x, bounds[1].y);
49
+ context.lineTo(bounds[2].x, bounds[2].y);
50
+ context.lineTo(bounds[3].x, bounds[3].y);
51
+ context.closePath();
52
+ if (this._selections.includes(idx)) {
53
+ context.fill();
54
+ }
55
+ context.stroke();
56
+ });
57
+ /* draw trails */
58
+ if (this._trails && this._trails.length > 0) {
59
+ context.lineWidth = 10;
60
+ context.strokeStyle = 'blue';
61
+ context.beginPath();
62
+ this._trails.forEach(trail => {
63
+ if (trail && trail.length > 0) {
64
+ const { x, y } = trail[0];
65
+ context.moveTo(x, y);
66
+ trail.slice(1).forEach(point => {
67
+ const { x, y } = point;
68
+ context.lineTo(x, y);
69
+ });
70
+ }
71
+ });
72
+ context.stroke();
73
+ }
74
+ context.restore();
75
+ }
76
+ async calculateRatio() {
77
+ const { naturalWidth, naturalHeight, offsetWidth, offsetHeight } = this._img;
78
+ this._overlay.setAttribute('width', String(offsetWidth));
79
+ this._overlay.setAttribute('height', String(offsetHeight));
80
+ this._ratio = {
81
+ x: offsetWidth / naturalWidth,
82
+ y: offsetHeight / naturalHeight
83
+ };
84
+ }
85
+ async connectedCallback() {
86
+ await super.connectedCallback();
87
+ this._resizeObserver = new ResizeObserver(entries => {
88
+ this.calculateRatio();
89
+ this.renderOverlay();
90
+ });
91
+ await this.updateComplete;
92
+ this._resizeObserver.observe(this._overlay);
93
+ this.calculateRatio();
94
+ this.addEventListener('mousedown', this.onTrailStart.bind(this));
95
+ this.addEventListener('mouseup', this.onTrailEnd.bind(this));
96
+ this.addEventListener('mousemove', this.onTrail.bind(this));
97
+ this.addEventListener('touchstart', touch2mouse);
98
+ this.addEventListener('touchend', touch2mouse);
99
+ this.addEventListener('touchmove', touch2mouse);
100
+ }
101
+ disconnectedCallback() {
102
+ super.disconnectedCallback();
103
+ this._resizeObserver.disconnect();
104
+ }
105
+ async updated(changes) {
106
+ if (changes.has('file')) {
107
+ this._image = this.file && URL.createObjectURL(this.file);
108
+ if (this._image) {
109
+ requestAnimationFrame(() => URL.revokeObjectURL(this._image));
110
+ }
111
+ }
112
+ await this.updateComplete;
113
+ this.renderOverlay();
114
+ }
115
+ findIndex(x, y) {
116
+ x /= this._ratio.x;
117
+ y /= this._ratio.y;
118
+ const { boundaries } = this.result;
119
+ return boundaries.findIndex(path => {
120
+ var result = false;
121
+ path.forEach((p, idx) => {
122
+ let j = (idx + path.length + 1) % path.length;
123
+ let x1 = p.x;
124
+ let y1 = p.y;
125
+ let x2 = path[j].x;
126
+ let y2 = path[j].y;
127
+ if (y1 > y != y2 > y && x < ((x2 - x1) * (y - y1)) / (y2 - y1) + x1) {
128
+ result = !result;
129
+ }
130
+ });
131
+ return result;
132
+ });
133
+ }
134
+ updateTrails(point, started, attached) {
135
+ if (started && !attached) {
136
+ this._selections = [];
137
+ this._trails = [];
138
+ }
139
+ if (started) {
140
+ this._trails.push([]);
141
+ }
142
+ var trail = this._trails[this._trails.length - 1];
143
+ trail.push(point);
144
+ this._trails.flat().forEach(({ x, y }) => {
145
+ const idx = this.findIndex(x, y);
146
+ if (idx === -1) {
147
+ return;
148
+ }
149
+ if (!this._selections.includes(idx)) {
150
+ this._selections.push(idx);
151
+ }
152
+ });
153
+ this.requestUpdate();
154
+ }
155
+ onTrailStart(e) {
156
+ const { offsetX: x, offsetY: y, button, shiftKey } = e;
157
+ if (button !== 0) {
158
+ return;
159
+ }
160
+ this._tracking = true;
161
+ this.updateTrails({ x, y }, true, shiftKey);
162
+ }
163
+ onTrailEnd(e) {
164
+ if (!this._tracking) {
165
+ return;
166
+ }
167
+ this._text = this._selections.map(idx => this.result.texts[idx]).join('');
168
+ this.dispatchEvent(new CustomEvent('selected', {
169
+ detail: this._text
170
+ }));
171
+ this._tracking = false;
172
+ }
173
+ onTrail(e) {
174
+ const { offsetX: x, offsetY: y } = e;
175
+ if (!this._tracking) {
176
+ return;
177
+ }
178
+ this.updateTrails({ x, y }, false);
179
+ }
180
+ };
181
+ OcrResultImage.styles = [
182
+ css `
183
+ :host {
184
+ display: block;
185
+ position: relative;
186
+ }
187
+
188
+ img {
189
+ display: block;
190
+ flex: 1;
191
+ border: 0;
192
+ padding: 0;
193
+ margin: 0;
194
+ max-width: 100%;
195
+ max-height: 100%;
196
+ }
197
+
198
+ [overlay] {
199
+ position: absolute;
200
+ top: 0;
201
+ left: 0;
202
+ width: 100%;
203
+ height: 100%;
204
+
205
+ border: 0;
206
+ padding: 0;
207
+ margin: 0;
208
+ opacity: 50%;
209
+ }
210
+
211
+ [notice] {
212
+ position: absolute;
213
+ bottom: 0;
214
+ background-color: var(--primary-color, #38a25b);
215
+ padding: var(--padding-default, 9px) var(--padding-wide, 15px);
216
+ opacity: 0.95;
217
+
218
+ overflow-wrap: anywhere;
219
+
220
+ color: #fff;
221
+ font-size: 1.5em;
222
+ }
223
+ `
224
+ ];
225
+ __decorate([
226
+ property({ type: Array })
227
+ ], OcrResultImage.prototype, "file", void 0);
228
+ __decorate([
229
+ property({ type: Array })
230
+ ], OcrResultImage.prototype, "result", void 0);
231
+ __decorate([
232
+ state()
233
+ ], OcrResultImage.prototype, "_ratio", void 0);
234
+ __decorate([
235
+ state()
236
+ ], OcrResultImage.prototype, "_image", void 0);
237
+ __decorate([
238
+ state()
239
+ ], OcrResultImage.prototype, "_resizeObserver", void 0);
240
+ __decorate([
241
+ state()
242
+ ], OcrResultImage.prototype, "_trails", void 0);
243
+ __decorate([
244
+ state()
245
+ ], OcrResultImage.prototype, "_tracking", void 0);
246
+ __decorate([
247
+ state()
248
+ ], OcrResultImage.prototype, "_selections", void 0);
249
+ __decorate([
250
+ state()
251
+ ], OcrResultImage.prototype, "_text", void 0);
252
+ __decorate([
253
+ query('img')
254
+ ], OcrResultImage.prototype, "_img", void 0);
255
+ __decorate([
256
+ query('[overlay]')
257
+ ], OcrResultImage.prototype, "_overlay", void 0);
258
+ OcrResultImage = __decorate([
259
+ customElement('ox-ocr-result-image')
260
+ ], OcrResultImage);
261
+ export { OcrResultImage };
262
+ const RESULT = {
263
+ status_code: 200,
264
+ key_values: {
265
+ '1P': ['LNK304PG'],
266
+ Q: ['259', '311', '430'],
267
+ '9D': ['2139', '2139', '2135'],
268
+ '1T': ['BA268F', 'BA268C', 'BC488D']
269
+ },
270
+ boundaries: [
271
+ [
272
+ {
273
+ x: 217.0,
274
+ y: 117.0
275
+ },
276
+ {
277
+ x: 291.0,
278
+ y: 120.0
279
+ },
280
+ {
281
+ x: 291.0,
282
+ y: 143.0
283
+ },
284
+ {
285
+ x: 216.0,
286
+ y: 140.0
287
+ }
288
+ ],
289
+ [
290
+ {
291
+ x: 294.0,
292
+ y: 120.0
293
+ },
294
+ {
295
+ x: 442.0,
296
+ y: 129.0
297
+ },
298
+ {
299
+ x: 441.0,
300
+ y: 151.0
301
+ },
302
+ {
303
+ x: 292.0,
304
+ y: 143.0
305
+ }
306
+ ],
307
+ [
308
+ {
309
+ x: 443.0,
310
+ y: 130.0
311
+ },
312
+ {
313
+ x: 484.0,
314
+ y: 130.0
315
+ },
316
+ {
317
+ x: 484.0,
318
+ y: 151.0
319
+ },
320
+ {
321
+ x: 443.0,
322
+ y: 151.0
323
+ }
324
+ ],
325
+ [
326
+ {
327
+ x: 549.0,
328
+ y: 134.0
329
+ },
330
+ {
331
+ x: 642.0,
332
+ y: 138.0
333
+ },
334
+ {
335
+ x: 642.0,
336
+ y: 157.0
337
+ },
338
+ {
339
+ x: 548.0,
340
+ y: 152.0
341
+ }
342
+ ],
343
+ [
344
+ {
345
+ x: 255.0,
346
+ y: 163.0
347
+ },
348
+ {
349
+ x: 390.0,
350
+ y: 167.0
351
+ },
352
+ {
353
+ x: 389.0,
354
+ y: 191.0
355
+ },
356
+ {
357
+ x: 254.0,
358
+ y: 187.0
359
+ }
360
+ ],
361
+ [
362
+ {
363
+ x: 212.0,
364
+ y: 208.0
365
+ },
366
+ {
367
+ x: 255.0,
368
+ y: 208.0
369
+ },
370
+ {
371
+ x: 255.0,
372
+ y: 235.0
373
+ },
374
+ {
375
+ x: 212.0,
376
+ y: 235.0
377
+ }
378
+ ],
379
+ [
380
+ {
381
+ x: 257.0,
382
+ y: 210.0
383
+ },
384
+ {
385
+ x: 320.0,
386
+ y: 210.0
387
+ },
388
+ {
389
+ x: 320.0,
390
+ y: 232.0
391
+ },
392
+ {
393
+ x: 257.0,
394
+ y: 232.0
395
+ }
396
+ ],
397
+ [
398
+ {
399
+ x: 383.0,
400
+ y: 214.0
401
+ },
402
+ {
403
+ x: 480.0,
404
+ y: 218.0
405
+ },
406
+ {
407
+ x: 480.0,
408
+ y: 240.0
409
+ },
410
+ {
411
+ x: 383.0,
412
+ y: 236.0
413
+ }
414
+ ],
415
+ [
416
+ {
417
+ x: 215.0,
418
+ y: 301.0
419
+ },
420
+ {
421
+ x: 382.0,
422
+ y: 301.0
423
+ },
424
+ {
425
+ x: 382.0,
426
+ y: 325.0
427
+ },
428
+ {
429
+ x: 215.0,
430
+ y: 325.0
431
+ }
432
+ ],
433
+ [
434
+ {
435
+ x: 436.0,
436
+ y: 305.0
437
+ },
438
+ {
439
+ x: 539.0,
440
+ y: 305.0
441
+ },
442
+ {
443
+ x: 539.0,
444
+ y: 327.0
445
+ },
446
+ {
447
+ x: 436.0,
448
+ y: 327.0
449
+ }
450
+ ],
451
+ [
452
+ {
453
+ x: 537.0,
454
+ y: 308.0
455
+ },
456
+ {
457
+ x: 582.0,
458
+ y: 308.0
459
+ },
460
+ {
461
+ x: 582.0,
462
+ y: 328.0
463
+ },
464
+ {
465
+ x: 537.0,
466
+ y: 328.0
467
+ }
468
+ ],
469
+ [
470
+ {
471
+ x: 594.0,
472
+ y: 309.0
473
+ },
474
+ {
475
+ x: 624.0,
476
+ y: 309.0
477
+ },
478
+ {
479
+ x: 624.0,
480
+ y: 334.0
481
+ },
482
+ {
483
+ x: 594.0,
484
+ y: 334.0
485
+ }
486
+ ],
487
+ [
488
+ {
489
+ x: 624.0,
490
+ y: 310.0
491
+ },
492
+ {
493
+ x: 659.0,
494
+ y: 310.0
495
+ },
496
+ {
497
+ x: 659.0,
498
+ y: 330.0
499
+ },
500
+ {
501
+ x: 624.0,
502
+ y: 330.0
503
+ }
504
+ ],
505
+ [
506
+ {
507
+ x: 675.0,
508
+ y: 311.0
509
+ },
510
+ {
511
+ x: 707.0,
512
+ y: 311.0
513
+ },
514
+ {
515
+ x: 707.0,
516
+ y: 330.0
517
+ },
518
+ {
519
+ x: 675.0,
520
+ y: 330.0
521
+ }
522
+ ],
523
+ [
524
+ {
525
+ x: 735.0,
526
+ y: 342.0
527
+ },
528
+ {
529
+ x: 775.0,
530
+ y: 342.0
531
+ },
532
+ {
533
+ x: 775.0,
534
+ y: 360.0
535
+ },
536
+ {
537
+ x: 735.0,
538
+ y: 360.0
539
+ }
540
+ ],
541
+ [
542
+ {
543
+ x: 806.0,
544
+ y: 341.0
545
+ },
546
+ {
547
+ x: 829.0,
548
+ y: 341.0
549
+ },
550
+ {
551
+ x: 829.0,
552
+ y: 359.0
553
+ },
554
+ {
555
+ x: 806.0,
556
+ y: 359.0
557
+ }
558
+ ],
559
+ [
560
+ {
561
+ x: 217.0,
562
+ y: 386.0
563
+ },
564
+ {
565
+ x: 381.0,
566
+ y: 383.0
567
+ },
568
+ {
569
+ x: 381.0,
570
+ y: 407.0
571
+ },
572
+ {
573
+ x: 217.0,
574
+ y: 410.0
575
+ }
576
+ ],
577
+ [
578
+ {
579
+ x: 436.0,
580
+ y: 387.0
581
+ },
582
+ {
583
+ x: 536.0,
584
+ y: 387.0
585
+ },
586
+ {
587
+ x: 536.0,
588
+ y: 410.0
589
+ },
590
+ {
591
+ x: 436.0,
592
+ y: 410.0
593
+ }
594
+ ],
595
+ [
596
+ {
597
+ x: 535.0,
598
+ y: 388.0
599
+ },
600
+ {
601
+ x: 577.0,
602
+ y: 388.0
603
+ },
604
+ {
605
+ x: 577.0,
606
+ y: 407.0
607
+ },
608
+ {
609
+ x: 535.0,
610
+ y: 407.0
611
+ }
612
+ ],
613
+ [
614
+ {
615
+ x: 590.0,
616
+ y: 387.0
617
+ },
618
+ {
619
+ x: 617.0,
620
+ y: 387.0
621
+ },
622
+ {
623
+ x: 617.0,
624
+ y: 411.0
625
+ },
626
+ {
627
+ x: 590.0,
628
+ y: 411.0
629
+ }
630
+ ],
631
+ [
632
+ {
633
+ x: 618.0,
634
+ y: 388.0
635
+ },
636
+ {
637
+ x: 653.0,
638
+ y: 388.0
639
+ },
640
+ {
641
+ x: 653.0,
642
+ y: 409.0
643
+ },
644
+ {
645
+ x: 618.0,
646
+ y: 409.0
647
+ }
648
+ ],
649
+ [
650
+ {
651
+ x: 669.0,
652
+ y: 389.0
653
+ },
654
+ {
655
+ x: 702.0,
656
+ y: 389.0
657
+ },
658
+ {
659
+ x: 702.0,
660
+ y: 408.0
661
+ },
662
+ {
663
+ x: 669.0,
664
+ y: 408.0
665
+ }
666
+ ],
667
+ [
668
+ {
669
+ x: 728.0,
670
+ y: 416.0
671
+ },
672
+ {
673
+ x: 769.0,
674
+ y: 416.0
675
+ },
676
+ {
677
+ x: 769.0,
678
+ y: 436.0
679
+ },
680
+ {
681
+ x: 728.0,
682
+ y: 436.0
683
+ }
684
+ ],
685
+ [
686
+ {
687
+ x: 798.0,
688
+ y: 416.0
689
+ },
690
+ {
691
+ x: 822.0,
692
+ y: 416.0
693
+ },
694
+ {
695
+ x: 822.0,
696
+ y: 433.0
697
+ },
698
+ {
699
+ x: 798.0,
700
+ y: 433.0
701
+ }
702
+ ],
703
+ [
704
+ {
705
+ x: 219.0,
706
+ y: 465.0
707
+ },
708
+ {
709
+ x: 381.0,
710
+ y: 460.0
711
+ },
712
+ {
713
+ x: 382.0,
714
+ y: 482.0
715
+ },
716
+ {
717
+ x: 220.0,
718
+ y: 487.0
719
+ }
720
+ ],
721
+ [
722
+ {
723
+ x: 434.0,
724
+ y: 463.0
725
+ },
726
+ {
727
+ x: 534.0,
728
+ y: 461.0
729
+ },
730
+ {
731
+ x: 534.0,
732
+ y: 481.0
733
+ },
734
+ {
735
+ x: 435.0,
736
+ y: 483.0
737
+ }
738
+ ],
739
+ [
740
+ {
741
+ x: 532.0,
742
+ y: 462.0
743
+ },
744
+ {
745
+ x: 574.0,
746
+ y: 462.0
747
+ },
748
+ {
749
+ x: 574.0,
750
+ y: 479.0
751
+ },
752
+ {
753
+ x: 532.0,
754
+ y: 479.0
755
+ }
756
+ ],
757
+ [
758
+ {
759
+ x: 587.0,
760
+ y: 461.0
761
+ },
762
+ {
763
+ x: 614.0,
764
+ y: 461.0
765
+ },
766
+ {
767
+ x: 614.0,
768
+ y: 482.0
769
+ },
770
+ {
771
+ x: 587.0,
772
+ y: 482.0
773
+ }
774
+ ],
775
+ [
776
+ {
777
+ x: 616.0,
778
+ y: 461.0
779
+ },
780
+ {
781
+ x: 650.0,
782
+ y: 463.0
783
+ },
784
+ {
785
+ x: 649.0,
786
+ y: 481.0
787
+ },
788
+ {
789
+ x: 615.0,
790
+ y: 479.0
791
+ }
792
+ ],
793
+ [
794
+ {
795
+ x: 664.0,
796
+ y: 461.0
797
+ },
798
+ {
799
+ x: 697.0,
800
+ y: 461.0
801
+ },
802
+ {
803
+ x: 697.0,
804
+ y: 479.0
805
+ },
806
+ {
807
+ x: 664.0,
808
+ y: 479.0
809
+ }
810
+ ],
811
+ [
812
+ {
813
+ x: 723.0,
814
+ y: 486.0
815
+ },
816
+ {
817
+ x: 761.0,
818
+ y: 486.0
819
+ },
820
+ {
821
+ x: 761.0,
822
+ y: 504.0
823
+ },
824
+ {
825
+ x: 723.0,
826
+ y: 504.0
827
+ }
828
+ ],
829
+ [
830
+ {
831
+ x: 792.0,
832
+ y: 485.0
833
+ },
834
+ {
835
+ x: 814.0,
836
+ y: 485.0
837
+ },
838
+ {
839
+ x: 814.0,
840
+ y: 500.0
841
+ },
842
+ {
843
+ x: 792.0,
844
+ y: 500.0
845
+ }
846
+ ],
847
+ [
848
+ {
849
+ x: 586.0,
850
+ y: 535.0
851
+ },
852
+ {
853
+ x: 626.0,
854
+ y: 535.0
855
+ },
856
+ {
857
+ x: 626.0,
858
+ y: 551.0
859
+ },
860
+ {
861
+ x: 586.0,
862
+ y: 551.0
863
+ }
864
+ ],
865
+ [
866
+ {
867
+ x: 664.0,
868
+ y: 533.0
869
+ },
870
+ {
871
+ x: 700.0,
872
+ y: 533.0
873
+ },
874
+ {
875
+ x: 700.0,
876
+ y: 548.0
877
+ },
878
+ {
879
+ x: 664.0,
880
+ y: 548.0
881
+ }
882
+ ]
883
+ ],
884
+ texts: [
885
+ 'POWER',
886
+ 'INTEGRATIONS',
887
+ 'INC.',
888
+ '15/10/2021',
889
+ 'LinkSwitchTM',
890
+ '(1P)',
891
+ 'PROD:',
892
+ 'LNK304PG',
893
+ '(1T)LotNo:BA268F',
894
+ '(9D)DtCode:',
895
+ '2139',
896
+ '(Q)',
897
+ 'Qty:',
898
+ '259',
899
+ 'COO:',
900
+ 'CN',
901
+ '(1T)LotNo:BA268C',
902
+ '(9D)DtCode:',
903
+ '2139',
904
+ '(Q)',
905
+ 'Qty:',
906
+ '311',
907
+ 'COO:',
908
+ 'CN',
909
+ '(1T)LotNo:BC488D',
910
+ '(9D)DtCode:',
911
+ '2135',
912
+ '(Q)',
913
+ 'Qty:',
914
+ '430',
915
+ 'COO:',
916
+ 'CN',
917
+ 'Total',
918
+ '1000'
919
+ ]
920
+ };
921
+ //# sourceMappingURL=ox-ocr-result-image.js.map