@idscan/idvc2 2.5.3 → 2.5.4

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/index.html CHANGED
@@ -42,14 +42,14 @@
42
42
  // { type: 'barcode', name: 'barcode detection' },
43
43
  // ],
44
44
  // },
45
- // {
46
- // type: 'Passport',
47
- // steps:[
48
- // { type: 'front', name: 'Document Front' },
49
- // { type: 'mrz', name: 'Passport Front', mode: { uploader: true, video: true } },
50
- // { type: 'face', name: 'Face', mode: { uploader: false, video: true } }
51
- // ],
52
- // },
45
+ {
46
+ type: 'Passport',
47
+ steps:[
48
+ { type: 'front', name: 'Document Front' },
49
+ { type: 'mrz', name: 'Passport Front', mode: { uploader: true, video: true } },
50
+ { type: 'face', name: 'Face', mode: { uploader: false, video: true } }
51
+ ],
52
+ },
53
53
  ],
54
54
  clickGuidlines () {
55
55
  console.log('clickGuidlines')
@@ -2,6 +2,7 @@ import realFaceModes, { RealFaceMode } from './environment/realFaceModes';
2
2
  import { DocumentTypeName } from './environment/documentTypes';
3
3
  import { StepType } from './environment/stepsDescription';
4
4
  import { supportedLanguages } from './environment/langs';
5
+ import { ModalPositionKeys, modalPositions } from './environment/modalPosition';
5
6
 
6
7
  export type ValidationFn = 'validateElement' | 'validateString' | 'validateDocumentTypes' | 'validateDistinctStringInArray' | 'validateNumber' | 'validateFunction' | 'validateBool';
7
8
  type DefaultValueFunction = () => boolean;
@@ -34,6 +35,7 @@ export type DefaultConfigName = 'el'
34
35
  | 'language'
35
36
  | 'documentTypes'
36
37
  | 'realFaceMode'
38
+ | 'modalPosition'
37
39
  | 'resizeUploadedImage'
38
40
  | 'showSubmitBtn'
39
41
  | 'h_stepMode'
@@ -71,8 +73,8 @@ export interface IDefaultConfig {
71
73
  defaultValue: IStepMode | string | boolean | DefaultValueFunction | number | IDocumentType[],
72
74
  validationFn: ValidationFn,
73
75
  hidden?: boolean,
74
- values?: RealFaceMode[] | typeof supportedLanguages[number][],
75
- arrayValues?: any[],
76
+ values?: ModalPositionKeys[] | RealFaceMode[] | typeof supportedLanguages[number][],
77
+ arrayValues?: unknown[],
76
78
  multiple?: boolean,
77
79
  }
78
80
 
@@ -150,6 +152,15 @@ const defaultConfig: IDefaultConfig[] = [
150
152
  arrayValues: Object.keys(realFaceModes),
151
153
  multiple: false,
152
154
  },
155
+ {
156
+ name: 'modalPosition',
157
+ type: 'Array',
158
+ description: 'Place the document type selection modal inside the component.',
159
+ defaultValue: 'center',
160
+ validationFn: 'validateDistinctStringInArray',
161
+ arrayValues: Object.keys(modalPositions),
162
+ multiple: false,
163
+ },
153
164
  {
154
165
  name: 'resizeUploadedImage',
155
166
  type: 'Number',
@@ -1,228 +1 @@
1
- /******/ // The require scope
2
- /******/ var __webpack_require__ = {};
3
- /******/
4
- /************************************************************************/
5
- /******/ /* webpack/runtime/define property getters */
6
- /******/ (() => {
7
- /******/ // define getter functions for harmony exports
8
- /******/ __webpack_require__.d = (exports, definition) => {
9
- /******/ for(var key in definition) {
10
- /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
11
- /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
12
- /******/ }
13
- /******/ }
14
- /******/ };
15
- /******/ })();
16
- /******/
17
- /******/ /* webpack/runtime/hasOwnProperty shorthand */
18
- /******/ (() => {
19
- /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
20
- /******/ })();
21
- /******/
22
- /************************************************************************/
23
- var __webpack_exports__ = {};
24
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
25
- /* harmony export */ "J3": () => (/* binding */ supportedLanguages),
26
- /* harmony export */ "_2": () => (/* binding */ setTranslation),
27
- /* harmony export */ "i0": () => (/* binding */ getTranslation)
28
- /* harmony export */ });
29
- var supportedLanguages = [
30
- 'en',
31
- 'es'
32
- ];
33
- var labels = {
34
- es: {
35
- errorCodes: {
36
- mrz: 'MRZ no fue reconocido',
37
- barcode: 'Advertencia: <br/>No se pudieron leer los datos del código de barras.<br/>Intenta tomar una imagen de mayor calidad.',
38
- heic: 'El archivo HEIC está dañado',
39
- fileTypeHeic: 'Error de tipo de archivo. Solo se admiten los tipos de archivo JPEG, PNG y HEIC.',
40
- fileType: 'Error de tipo de archivo. Solo se admiten los tipos de archivo JPEG y PNG.',
41
- disableStepFileUpload: 'Se debe utilizar un dispositivo con una cámara para capturar esta imagen',
42
- notAllowedDocument: 'Este tipo de documento no está permitido',
43
- frontSide: 'Advertencia: <br/>No se pudo leer la parte frontal del documento. <br/>Intenta tomar una imagen de mayor calidad',
44
- default: 'Lo sentimos, pero algo salió mal. Inténtalo de nuevo',
45
- CameraNotFound: 'No se encontró ninguna cámara en su dispositivo',
46
- CameraNotAllowed: 'Se le ha denegado el permiso para acceder a la cámara',
47
- CameraNotAvailable: 'La cámara no está disponible en este momento',
48
- CameraInUse: 'La cámara ya está en uso',
49
- MediaDevicesNotSupported: 'Tu navegador no es compatible',
50
- lowImageResolution: 'La resolución de la imagen cargada es demasiado baja'
51
- },
52
- hintTexts: {
53
- front: 'Coloque el anverso del documento',
54
- frontMRZ: 'Haga zoom para capturar el código en la parte inferior',
55
- mrz: 'Haga zoom para capturar el código en la parte posterior',
56
- capturing: 'Coloque el anverso del documento',
57
- pdf: 'Coloque el código de barras dentro del marco',
58
- back: 'Da la vuelta a tu documento',
59
- barcode: 'Coloque el código de barras dentro del marco',
60
- hold: 'Sostener el **placeholder** lado del documento <br> dentro de la caja',
61
- dontSee: 'No te veo',
62
- dontMove: 'No te muevas',
63
- turnFaceLeft: 'Gira la cara a la izquierda',
64
- turnFaceRight: 'Gira la cara a la derecha',
65
- turnFaceUp: 'Levanta tu cara',
66
- turnFaceDown: 'Bajar la cara',
67
- faceCam: 'Enfréntate a la cámara',
68
- camAway: 'Mover la cámara más lejos',
69
- moveCenter: 'Mover al centro',
70
- comeCloser: 'Acércate',
71
- holdCamera: 'Manténgase firme, analizando el documento <br>'
72
- },
73
- keyErrors: [
74
- 'La clave de licencia ha caducado',
75
- 'Clave de licencia no válida'
76
- ],
77
- camera: {
78
- loading: 'Carga',
79
- awaiting: 'A la espera de la respuesta de la cámara'
80
- },
81
- general: {
82
- documentType: 'Su Tipo de Documento es',
83
- selectDocumentTypeText: 'Seleccionar Tipo de Documento',
84
- changeBtn: 'Cambiar',
85
- correctBtn: 'Corregir',
86
- cancelBtn: 'Cancelar',
87
- doneBtn: 'Hecho',
88
- closeBtn: 'Cerrar',
89
- retakeBtn: 'VOLVER',
90
- continueBtn: 'CONTINUAR',
91
- submitBtn: 'ENVIAR',
92
- resetAllStepsBtn: 'Restablecer todos los pasos',
93
- btnUploader: 'Cambiar a cargador manual',
94
- btnCamera: 'Cambiar al modo de cámara',
95
- pressToUpdateText: 'Pulse para actualizar',
96
- pressToUpdateTextSuccess: 'Pulse para actualizar'
97
- },
98
- uploaderDescription: {
99
- textFront: 'Haga clic aquí para cargar el frente de su identificación',
100
- textBack: 'Haga clic aquí para cargar el reverso de una identificación',
101
- textFace: 'Haga clic aquí para cargar una foto de su rostro',
102
- textPdf: 'Haga clic aquí para cargar el reverso de una identificación',
103
- textMrz: 'Haga clic aquí para cargar una foto de su documento\'',
104
- textFrontBack: 'Asegúrese de que su identificación llene toda la pantalla de la cámara con poco o ningún fondo.',
105
- textPass: 'Asegúrese de que su identificación llene toda la pantalla de la cámara <br> con poco o ningún fondo, y que se incluya el código MRZ completo',
106
- textFacePosition: 'Coloque su rostro para ocupar toda la pantalla de la cámara con poco o ningún fondo.'
107
- },
108
- documentsTypes: {
109
- ID: 'Licencia de Conducir',
110
- Passport: 'Pasaporte',
111
- PassportCard: 'Tarjeta de Pasaporte',
112
- GreenCard: 'Tarjeta Verde o Autorización de Empleo',
113
- InternationalId: 'Identificación Internacional'
114
- },
115
- spinnerText: {
116
- warmup: {
117
- top: 'La red neuronal se está calentando',
118
- bottom: 'La captura de documentos estará lista para su uso en breve'
119
- }
120
- }
121
- },
122
- en: {
123
- errorCodes: {
124
- mrz: 'MRZ not recognized',
125
- barcode: 'Warning: <br/>Barcode data could not be read.<br/>Try taking a higher quality image.',
126
- heic: 'HEIC file incorrupted',
127
- fileType: 'Error file type. Only jpeg and png supported.',
128
- fileTypeHeic: 'Error file type. Only jpeg, png and heic supported.',
129
- disableStepFileUpload: 'A device with a camera must be used to capture this image',
130
- notAllowedDocument: 'This document type is not allowed',
131
- frontSide: 'Warning: <br/>Front of the document could not be read. <br/>Try taking a higher quality image',
132
- default: 'We\'re sorry, but something went wrong. Please try again',
133
- CameraNotFound: 'No camera was found on your device',
134
- CameraNotAllowed: 'You have denied camera access permission',
135
- CameraNotAvailable: 'Camera is not available at this moment',
136
- CameraInUse: 'Camera is already in use',
137
- MediaDevicesNotSupported: 'Your browser is not supported',
138
- lowImageResolution: 'The resolution of the uploaded image is too low'
139
- },
140
- hintTexts: {
141
- front: 'Position the front of the document',
142
- frontMRZ: 'Zoom in to capture code at bottom',
143
- mrz: 'Zoom in to capture code on back side',
144
- capturing: 'Position the front of the document',
145
- pdf: 'Position the barcode inside the frame',
146
- back: 'Turn around your document',
147
- barcode: 'Position the barcode inside the frame',
148
- hold: 'Hold the **placeholder** side of the document <br> inside the box',
149
- dontSee: 'I don\'t see you',
150
- dontMove: 'Don\'t move',
151
- turnFaceLeft: 'Turn your face left',
152
- turnFaceRight: 'Turn your face right',
153
- turnFaceUp: 'Turn your face up',
154
- turnFaceDown: 'Turn your face down',
155
- faceCam: 'Face the camera',
156
- camAway: 'Move camera further away',
157
- moveCenter: 'Move to the center',
158
- comeCloser: 'Come closer',
159
- holdCamera: 'Hold steady, analyzing document <br>'
160
- },
161
- keyErrors: [
162
- 'License Key has expired',
163
- 'Invalid License Key'
164
- ],
165
- camera: {
166
- loading: 'Loading',
167
- awaiting: 'Awaiting camera response'
168
- },
169
- general: {
170
- documentType: 'Your document type is',
171
- selectDocumentTypeText: 'Select Document Type',
172
- changeBtn: 'Change',
173
- correctBtn: 'Correct',
174
- cancelBtn: 'Cancel',
175
- doneBtn: 'Done',
176
- closeBtn: 'CLOSE',
177
- retakeBtn: 'Retake',
178
- continueBtn: 'CONTINUE',
179
- submitBtn: 'SUBMIT',
180
- resetAllStepsBtn: 'Reset all steps',
181
- btnUploader: 'Switch to manual uploader',
182
- btnCamera: 'Switch to camera mode',
183
- pressToUpdateText: 'Press to update',
184
- pressToUpdateTextSuccess: 'Press to update'
185
- },
186
- documentsTypes: {
187
- ID: "Driver\'s License",
188
- Passport: 'Passport',
189
- PassportCard: 'Passport Card',
190
- GreenCard: 'Green Card or Employment Authorization',
191
- InternationalId: 'International ID'
192
- },
193
- uploaderDescription: {
194
- textFront: 'Click here to upload the front of your ID',
195
- textBack: 'Click here to upload the back of your ID',
196
- textFace: 'Click here to upload a photo of your face',
197
- textPdf: 'Click here to upload the back of a ID',
198
- textMrz: 'Click here to upload a photo of your document',
199
- textFrontBack: 'Please make sure your ID fills up the entire <br> camera screen with little to no background.',
200
- textPass: 'Please make sure your ID fills up the entire camera screen <br> with little to no background, and the full MRZ code is included.',
201
- textFacePosition: 'Please position your face to take up <br> the full camera screen with little to no background.'
202
- },
203
- spinnerText: {
204
- warmup: {
205
- top: 'Neural network is warming up',
206
- bottom: 'Document capture will be ready to use shortly'
207
- }
208
- }
209
- }
210
- };
211
- var translation = labels.en;
212
- var setTranslation = function(translationLang) {
213
- if (translationLang) {
214
- var lang = translationLang.toLowerCase();
215
- var trnaslation = Object.keys(labels).includes(lang) ? lang : 'en';
216
- translation = labels[trnaslation];
217
- } else {
218
- translation = labels.en;
219
- }
220
- };
221
- var getTranslation = function(groupName) {
222
- return groupName ? translation[groupName] : translation;
223
- };
224
-
225
- var __webpack_exports__getTranslation = __webpack_exports__.i0;
226
- var __webpack_exports__setTranslation = __webpack_exports__._2;
227
- var __webpack_exports__supportedLanguages = __webpack_exports__.J3;
228
- export { __webpack_exports__getTranslation as getTranslation, __webpack_exports__setTranslation as setTranslation, __webpack_exports__supportedLanguages as supportedLanguages };
1
+ var __webpack_require__={};__webpack_require__.d=(e,a)=>{for(var o in a)__webpack_require__.o(a,o)&&!__webpack_require__.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:a[o]})},__webpack_require__.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a);var __webpack_exports__={};__webpack_require__.d(__webpack_exports__,{J3:()=>supportedLanguages,_2:()=>setTranslation,i0:()=>getTranslation});var supportedLanguages=["en","es"],labels={es:{errorCodes:{mrz:"Advertencia: <br/>MRZ no pudo ser le\xeddo (o reconocido)",barcode:"Advertencia: <br/>No se pudieron leer los datos del c\xf3digo de barras.<br/>Intenta tomar una imagen de mayor calidad.",heic:"El archivo HEIC est\xe1 da\xf1ado",fileTypeHeic:"Error de tipo de archivo. Solo se admiten los tipos de archivo JPEG, PNG y HEIC.",fileType:"Error de tipo de archivo. Solo se admiten los tipos de archivo JPEG y PNG.",disableStepFileUpload:"Se debe utilizar un dispositivo con una c\xe1mara para capturar esta imagen",notAllowedDocument:"Este tipo de documento no est\xe1 permitido",frontSide:"Advertencia: <br/>No se pudo leer la parte frontal del documento. <br/>Intenta tomar una imagen de mayor calidad",default:"Lo sentimos, pero algo sali\xf3 mal. Int\xe9ntalo de nuevo",CameraNotFound:"No se encontr\xf3 ninguna c\xe1mara en su dispositivo",CameraNotAllowed:"Se le ha denegado el permiso para acceder a la c\xe1mara",CameraNotAvailable:"La c\xe1mara no est\xe1 disponible en este momento",CameraInUse:"La c\xe1mara ya est\xe1 en uso",MediaDevicesNotSupported:"Tu navegador no es compatible",lowImageResolution:"La resoluci\xf3n de la imagen cargada es demasiado baja"},hintTexts:{front:"Coloque el anverso del documento",frontMRZ:"Haga zoom para capturar el c\xf3digo en la parte inferior",mrz:"Haga zoom para capturar el c\xf3digo en la parte posterior",capturing:"Coloque el anverso del documento",pdf:"Coloque el c\xf3digo de barras dentro del marco",back:"Da la vuelta a tu documento",barcode:"Coloque el c\xf3digo de barras dentro del marco",hold:"Sostener el **placeholder** lado del documento <br> dentro de la caja",dontSee:"No te veo",dontMove:"No te muevas",turnFaceLeft:"Gira la cara a la izquierda",turnFaceRight:"Gira la cara a la derecha",turnFaceUp:"Levanta tu cara",turnFaceDown:"Bajar la cara",faceCam:"Enfr\xe9ntate a la c\xe1mara",camAway:"Mover la c\xe1mara m\xe1s lejos",moveCenter:"Mover al centro",comeCloser:"Ac\xe9rcate",documentCloser:"Acerque el documento",holdCamera:"Mant\xe9ngase firme, analizando el documento <br>"},keyErrors:["La clave de licencia ha caducado","Clave de licencia no v\xe1lida"],camera:{loading:"Carga",awaiting:"A la espera de la respuesta de la c\xe1mara"},general:{documentType:"Su Tipo de Documento es",selectDocumentTypeText:"Seleccionar Tipo de Documento",changeBtn:"Cambiar",correctBtn:"Corregir",cancelBtn:"Cancelar",doneBtn:"Hecho",closeBtn:"Cerrar",retakeBtn:"VOLVER",continueBtn:"CONTINUAR",submitBtn:"ENVIAR",resetAllStepsBtn:"Restablecer todos los pasos",btnUploader:"Cambiar a cargador manual",btnCamera:"Cambiar al modo de c\xe1mara",pressToUpdateText:"Pulse para actualizar",pressToUpdateTextSuccess:"Pulse para actualizar"},uploaderDescription:{textFront:"Haga clic aqu\xed para cargar el frente de su identificaci\xf3n",textBack:"Haga clic aqu\xed para cargar el reverso de una identificaci\xf3n",textFace:"Haga clic aqu\xed para cargar una foto de su rostro",textPdf:"Haga clic aqu\xed para cargar el reverso de una identificaci\xf3n",textMrz:"Haga clic aqu\xed para cargar una foto de su documento'",textFrontBack:"Aseg\xfarese de que su identificaci\xf3n llene toda la pantalla de la c\xe1mara con poco o ning\xfan fondo.",textPass:"Aseg\xfarese de que su identificaci\xf3n llene toda la pantalla de la c\xe1mara <br> con poco o ning\xfan fondo, y que se incluya el c\xf3digo MRZ completo",textFacePosition:"Coloque su rostro para ocupar toda la pantalla de la c\xe1mara con poco o ning\xfan fondo."},documentsTypes:{ID:"Licencia de Conducir",Passport:"Pasaporte",PassportCard:"Tarjeta de Pasaporte",GreenCard:"Tarjeta Verde o Autorizaci\xf3n de Empleo",InternationalId:"Identificaci\xf3n Internacional"},spinnerText:{warmup:{top:"La red neuronal se est\xe1 calentando",bottom:"La captura de documentos estar\xe1 lista para su uso en breve"}}},en:{errorCodes:{mrz:"Warning: <br/>MRZ could not be read (or recognized)",barcode:"Warning: <br/>Barcode data could not be read.<br/>Try taking a higher quality image.",heic:"HEIC file incorrupted",fileType:"Error file type. Only jpeg and png supported.",fileTypeHeic:"Error file type. Only jpeg, png and heic supported.",disableStepFileUpload:"A device with a camera must be used to capture this image",notAllowedDocument:"This document type is not allowed",frontSide:"Warning: <br/>Front of the document could not be read. <br/>Try taking a higher quality image",default:"We're sorry, but something went wrong. Please try again",CameraNotFound:"No camera was found on your device",CameraNotAllowed:"You have denied camera access permission",CameraNotAvailable:"Camera is not available at this moment",CameraInUse:"Camera is already in use",MediaDevicesNotSupported:"Your browser is not supported",lowImageResolution:"The resolution of the uploaded image is too low"},hintTexts:{front:"Position the front of the document",frontMRZ:"Zoom in to capture code at bottom",mrz:"Zoom in to capture code on back side",capturing:"Position the front of the document",pdf:"Position the barcode inside the frame",back:"Turn around your document",barcode:"Position the barcode inside the frame",hold:"Hold the **placeholder** side of the document <br> inside the box",dontSee:"I don't see you",dontMove:"Don't move",turnFaceLeft:"Turn your face left",turnFaceRight:"Turn your face right",turnFaceUp:"Turn your face up",turnFaceDown:"Turn your face down",faceCam:"Face the camera",camAway:"Move camera further away",moveCenter:"Move to the center",comeCloser:"Come closer",documentCloser:"Bring the document closer",holdCamera:"Hold steady, analyzing document <br>"},keyErrors:["License Key has expired","Invalid License Key"],camera:{loading:"Loading",awaiting:"Awaiting camera response"},general:{documentType:"Your document type is",selectDocumentTypeText:"Select Document Type",changeBtn:"Change",correctBtn:"Correct",cancelBtn:"Cancel",doneBtn:"Done",closeBtn:"CLOSE",retakeBtn:"Retake",continueBtn:"CONTINUE",submitBtn:"SUBMIT",resetAllStepsBtn:"Reset all steps",btnUploader:"Switch to manual uploader",btnCamera:"Switch to camera mode",pressToUpdateText:"Press to update",pressToUpdateTextSuccess:"Press to update"},documentsTypes:{ID:"Driver's License",Passport:"Passport",PassportCard:"Passport Card",GreenCard:"Green Card or Employment Authorization",InternationalId:"International ID"},uploaderDescription:{textFront:"Click here to upload the front of your ID",textBack:"Click here to upload the back of your ID",textFace:"Click here to upload a photo of your face",textPdf:"Click here to upload the back of a ID",textMrz:"Click here to upload a photo of your document",textFrontBack:"Please make sure your ID fills up the entire <br> camera screen with little to no background.",textPass:"Please make sure your ID fills up the entire camera screen <br> with little to no background, and the full MRZ code is included.",textFacePosition:"Please position your face to take up <br> the full camera screen with little to no background."},spinnerText:{warmup:{top:"Neural network is warming up",bottom:"Document capture will be ready to use shortly"}}}},translation=labels.en,setTranslation=function(e){if(e){var a=e.toLowerCase(),o=Object.keys(labels).includes(a)?a:"en";translation=labels[o]}else translation=labels.en},getTranslation=function(e){return e?translation[e]:translation},__webpack_exports__getTranslation=__webpack_exports__.i0,__webpack_exports__setTranslation=__webpack_exports__._2,__webpack_exports__supportedLanguages=__webpack_exports__.J3;export{__webpack_exports__getTranslation as getTranslation,__webpack_exports__setTranslation as setTranslation,__webpack_exports__supportedLanguages as supportedLanguages};
@@ -0,0 +1,27 @@
1
+ export type ModalPositionKeys = keyof typeof modalPositions;
2
+
3
+ export const modalPositions = {
4
+ center: {
5
+ description: "Place the document type selection modal in the component's middle.",
6
+ },
7
+ bottom: {
8
+ description: "Place the document type selection modal in the component's bottom.",
9
+ },
10
+ top: {
11
+ description: "Place the document type selection modal in the component's top.",
12
+ },
13
+ 'sticky-top': {
14
+ description: "Sticks the document type selection modal in the component's top.",
15
+ },
16
+ 'sticky-bottom': {
17
+ description: "Sticks the document type selection modal in the component's bottom.",
18
+ },
19
+ };
20
+
21
+ export const modalPositionClasses: Record<ModalPositionKeys, string> = {
22
+ center: 'vc-dialog-bottom--center',
23
+ bottom: 'vc-dialog-bottom--bottom',
24
+ top: 'vc-dialog-bottom--top',
25
+ 'sticky-top': 'vc-dialog-bottom--sticky-top',
26
+ 'sticky-bottom': 'vc-dialog-bottom--sticky-bottom',
27
+ };
@@ -0,0 +1 @@
1
+ var __webpack_exports__={},generateFaceColorFromAngle=function(t){var n=Math.abs(Math.trunc(255-t));return n>200&&(n=200),n<50&&(n=50),"rgba(255,215,".concat(n.toString(),",0.3)")},binarize=function(t){var n,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:120,o=t.width*t.height,i=new Uint8ClampedArray(o),r=0,u=0;for(n=0;n<o;n+=1){var h=n<<2;77*(r=t.data[h+0])+151*t.data[h+1]+28*t.data[h+2]>>8<e&&(i[n]=1)}return i},topPoint=function(t,n){return t-n},bottomPoint=function(t,n){return t+n},leftPoint=function(t,n){return t%n>1?t-1:-1},rightPoint=function(t,n){return(t+1)%n>=0?t+1:-1},topLeftPoint=function(t,n){return leftPoint(topPoint(t,n),n)},topRightPoint=function(t,n){return rightPoint(topPoint(t,n),n)},bottomLeftPoint=function(t,n){return leftPoint(bottomPoint(t,n),n)},bottomRightPoint=function(t,n){return rightPoint(bottomPoint(t,n),n)},getNeigbors=function(t,n){return[topLeftPoint,topPoint,topRightPoint,rightPoint,bottomRightPoint,bottomPoint,bottomLeftPoint,leftPoint].map(function(e){return e(t,n)})},segmentize2=function(t,n){var e,o=[],i=[],r=t.length,u=0;for(e=0;e<r;e+=1)0!==t[e]&&(i[u]=new Set,o.push(e),function(){for(;o.length;){var e=o.pop();if(!e)break;t[e]=0,i[u].add(e),getNeigbors(e,n).forEach(function(n){n>0&&0!==t[n]&&n<r&&o.push(n)})}}(),u+=1);return i},getResizedSizes=function(t,n){var e=n.baseWidth,o=n.baseHeight,i=t,r=t;return e>o&&(r=(i=t)*o/e),o>e&&(i=(r=t)*e/o),{width:Math.trunc(i),height:Math.trunc(r)}},getCrop=function(t,n){var e=t.width/t.height,o=n.width/n.height,i={x:0,y:0,width:n.width,height:n.height};return e>o?(i.height=~~(n.width/e),i.y=(n.height-i.height)/2):(i.width=~~(i.height*e),i.x=(n.width-i.width)/2),i},POINT_FILL_STYLE="rgba(255, 255, 255, 0.5)",POINT_STROKE_STYLE="rgba(255, 255, 255, 0)",SCALE_FACTOR=.3,getColumn=function(t,n){return t%n},getRow=function(t,n){return Math.floor(t/n)},createCoordFromPointIdx=function(t,n){return[getColumn(t,n),getRow(t,n)]},notNull=function(t){return null!=t},coordinateSegment=function(t){var n=t.segments,e=t.width,o=t.scaleWidth,i=t.scaleHeight;return n.map(function(t){var n=Number.MAX_VALUE,r=Number.MAX_VALUE,u=Number.MIN_VALUE,h=Number.MIN_VALUE;t.forEach(function(t){var o=createCoordFromPointIdx(t,e);o[0]<n&&(n=o[0]),o[1]<r&&(r=o[1]),o[0]>u&&(u=o[0]),o[1]>h&&(h=o[1])});var a=(u-n)*(h-r);return a>5&&a<500?{perimeter:a,x1:Math.trunc(n/SCALE_FACTOR/o),y1:Math.trunc(r/SCALE_FACTOR/i),x2:Math.trunc(u/SCALE_FACTOR/o),y2:Math.trunc(h/SCALE_FACTOR/i)}:null}).filter(notNull)},pointsProcess=function(t,n,e){return coordinateSegment({segments:segmentize2(binarize(t),t.width),width:t.width,scaleWidth:n,scaleHeight:e})};onmessage=function(t){var n=t.data,e=pointsProcess(n.iData,n.resizedToBorderScaleWidth,n.resizedToBorderScaleHeight);postMessage({segments:e})};