@jaak.ai/stamps 2.5.1 → 2.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/jaak-stamps.cjs.entry.js +4 -3
- package/dist/cjs/jaak-stamps.cjs.entry.js.map +1 -1
- package/dist/cjs/jaak-stamps.entry.cjs.js.map +1 -1
- package/dist/collection/components/my-component/my-component.js +4 -3
- package/dist/collection/components/my-component/my-component.js.map +1 -1
- package/dist/components/jaak-stamps.js +4 -3
- package/dist/components/jaak-stamps.js.map +1 -1
- package/dist/esm/jaak-stamps.entry.js +4 -3
- package/dist/esm/jaak-stamps.entry.js.map +1 -1
- package/dist/jaak-stamps-webcomponent/jaak-stamps-webcomponent.esm.js +1 -1
- package/dist/jaak-stamps-webcomponent/jaak-stamps.entry.esm.js.map +1 -1
- package/dist/jaak-stamps-webcomponent/{p-85901267.entry.js → p-49ed15ce.entry.js} +2 -2
- package/dist/jaak-stamps-webcomponent/{p-85901267.entry.js.map → p-49ed15ce.entry.js.map} +1 -1
- package/package.json +1 -1
|
@@ -19641,6 +19641,7 @@ const JaakStamps = class {
|
|
|
19641
19641
|
this.detectFrame();
|
|
19642
19642
|
}
|
|
19643
19643
|
catch (err) {
|
|
19644
|
+
console.error('[jaak-stamps] Error al preparar captura:', err);
|
|
19644
19645
|
this.updateStatus('Error al iniciar', 'No se pudo preparar la captura', 'error');
|
|
19645
19646
|
this.stateManager.updateCaptureState({ isLoading: false });
|
|
19646
19647
|
}
|
|
@@ -19889,7 +19890,7 @@ const JaakStamps = class {
|
|
|
19889
19890
|
isCapturing: false
|
|
19890
19891
|
};
|
|
19891
19892
|
const cameraInfo = this.cameraInfoWithAutofocus;
|
|
19892
|
-
return (h("div", { key: '
|
|
19893
|
+
return (h("div", { key: '688ceafa324ab0d67de00440e6381710f3785f5a', class: "detector-container" }, !this.licenseValid && this.licenseError && (h("div", { key: 'f4eb75c9da36ce781535c477be56b16d7270dcf6', class: "license-error-container" }, h("div", { key: '712e3b2e048f22d62890ad8ca6db458a8400f87b', class: "license-error-card" }, h("svg", { key: 'e1e86cc112c183729b537e8b94b9f9409c4f7969', class: "license-error-icon", width: "64", height: "64", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: '4f8376df61e8ad8105d84b767c663c24fcfb47af', d: "M12 22C12 22 20 18 20 12V5L12 2L4 5V12C4 18 12 22 12 22Z", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }), h("path", { key: '45ca99e068518901a5d332cfdcb25b774b8e4159', d: "M12 8V12", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round" }), h("circle", { key: '5f9561c5b3b1ca6bf8a9c0daeb92594f25e144ba', cx: "12", cy: "16", r: "0.5", fill: "currentColor", stroke: "currentColor", "stroke-width": "1" })), h("h2", { key: 'da86ee4ac849d76c4bbe19f135e5f8e0793a22f6', class: "license-error-title" }, "Licencia Requerida"), h("p", { key: 'ca3bc193e7145e2b68c82b56d92f6a07a4986469', class: "license-error-message" }, this.licenseError), h("p", { key: 'd802523e06804557a8df11c78de70317056db746', class: "license-error-help" }, "Contacte a soporte: ", h("a", { key: '9ace3ca5c198b95899a3128af4da3a46a7038421', href: "mailto:support@jaak.ai" }, "support@jaak.ai")), h("div", { key: '07f7de4b3c21a0c30f39126e8afd73da323c42e5', class: "license-error-footer" }, "JAAK Stamps")))), this.licenseValid && (h("div", { key: '2ef7e0747e644563b358667a328b0859e969ced2', class: "video-container" }, h("video", { key: 'fd4c30c9faa0029b145453a54dd1e4e72c99decc', ref: el => this.videoRef = el, autoplay: true, muted: true, playsinline: true, class: this.shouldMirrorVideo ? 'mirror' : '', style: { display: captureState.isVideoActive ? 'block' : 'none' } }), h("div", { key: '08ae5cc6d6a643a33251cd03bb16e2e298ff8ea2', ref: el => this.detectionContainer = el, class: `detection-overlay ${this.shouldMirrorVideo ? 'mirror' : ''}` }, this.debug && this.detectionBoxes.map((box, index) => (h("div", { key: index, class: "detection-box", style: {
|
|
19893
19894
|
position: 'absolute',
|
|
19894
19895
|
left: `${box.x}px`,
|
|
19895
19896
|
top: `${box.y}px`,
|
|
@@ -19898,9 +19899,9 @@ const JaakStamps = class {
|
|
|
19898
19899
|
border: '2px solid #32406C',
|
|
19899
19900
|
pointerEvents: 'none',
|
|
19900
19901
|
boxSizing: 'border-box'
|
|
19901
|
-
} })))), this.isMaskReady && (h("div", { key: '
|
|
19902
|
+
} })))), this.isMaskReady && (h("div", { key: '8aed3362a1cba7d4f013221d0f03b74dcf481c9f', class: "overlay-mask" }, h("div", { key: 'f0436ced815a8a5bf640d3b475c6b3214af042ec', class: "card-outline" }, h("div", { key: 'e72e65b5824d791fcc129af00d00f0c11a4ef547', class: "side side-top" }), h("div", { key: '0f6a64d0b63d528b71268d5f8a0d7b462441c3b9', class: "side side-right" }), h("div", { key: 'a855aaeb78ed7b493390f04583fca9fd3f70e26e', class: "side side-bottom" }), h("div", { key: '6b1e6ac88329a096cf22c4f28e61db8cd06e9bbc', class: "side side-left" })), !captureState.showFlipAnimation && !captureState.showSuccessAnimation && (h("div", { key: 'b3e66d548cb1ab9d602105f72d8e1bcfec54d33e', class: `guide-text ${this.showPerformanceMessage ? 'performance-warning-text' : ''}` }, this.getGuideText(captureState.step))), captureState.step === 'back' && !captureState.showFlipAnimation && !captureState.showSuccessAnimation && (h("div", { key: 'b27c8a1c3e4d3639d27a64e931f436ec8b67063b', class: "back-capture-section" }, h("div", { key: 'a16554331fc9eee781839b959a4c3b8835896b93', class: "back-capture-buttons" }, (!this.useDocumentDetector || this.performanceDegradedMode || this.showManualCaptureButton) && (h("button", { key: '32d16a0f2d01dc62566af7996d222f3427002af5', class: "capture-button primary-button", onClick: () => this.takeManualScreenshot(), type: "button", disabled: this.processingButton !== null }, this.processingButton === 'capture-back' && (h("span", { key: 'c58a90f250a0106774383fd7fdf64f3c2bddc31b', class: "button-spinner" })), "Capturar Reverso")), h("button", { key: '4e71900b8792f7ea4f46964b1effa59e8c7c4a1e', class: "skip-button", onClick: () => this.skipBackCapture(), type: "button", disabled: this.processingButton !== null }, this.processingButton === 'skip-back' && (h("span", { key: '3fc8bfaf8434457c004fa3176fc8d8d51f12ca2d', class: "button-spinner" })), this.enableBackDocumentTimer && this.backDocumentTimerRemaining > 0
|
|
19902
19903
|
? `Saltar reverso (${this.backDocumentTimerRemaining}s)`
|
|
19903
|
-
: 'Saltar reverso')))), captureState.isVideoActive && (h("div", { key: '
|
|
19904
|
+
: 'Saltar reverso')))), captureState.isVideoActive && (h("div", { key: '9d2bd5f8e2d20758d9ff87b230639a67d8fdae41', class: "camera-controls" }, h("button", { key: '487ff8e5151bde715dd00bd7688b31ba623b4c7f', class: `camera-selector-button ${this.isSwitchingCamera ? 'loading' : ''}`, onClick: () => this.toggleCameraSelector(), type: "button", title: "Seleccionar c\u00E1mara", disabled: this.isSwitchingCamera }, this.isSwitchingCamera ? (h("div", { class: "button-spinner" })) : ('Cámaras')))), this.showCameraSelector && cameraInfo.availableCameras.length > 0 && (h("div", { key: 'eeee411b06c3715613cbb6cf0e93d255fcac1ea6', class: "camera-selector-dropdown" }, h("div", { key: '5a4995c2b7951a19575735c8e768b283798f8280', class: "camera-selector-header" }, h("span", { key: '4b6d72d4b56671ce8c3936ccb15a6aaa27ce220c' }, "Seleccionar C\u00E1mara"), h("button", { key: 'a7caae51ff55e5494cc55bacf5d261a8282a550b', class: "close-selector", onClick: () => this.toggleCameraSelector(), type: "button" }, "\u00D7")), h("div", { key: 'c59e0105c938c60106c2764bb2793633115fdfe5', class: "camera-list" }, cameraInfo.availableCameras.map((camera) => (h("button", { key: camera.id, class: `camera-option ${cameraInfo.selectedCameraId === camera.id ? 'selected' : ''}`, onClick: () => this.handleCameraSwitch(camera.id), type: "button" }, h("span", { class: "camera-label" }, camera.label || `Cámara ${cameraInfo.availableCameras.indexOf(camera) + 1}`, camera.hasAutofocus && (h("span", { class: "autofocus-icon", title: "Autofoco disponible" }, "\u29BF"))), cameraInfo.selectedCameraId === camera.id && (h("span", { class: "selected-indicator" }, "\u2713")))))), h("div", { key: '1b421328878d79031cf5565f2189e72ef5969fb7', class: "device-info" }, h("small", { key: '8eff3bcd2295ee817b164a53f9142d301c0b04f6' }, "Dispositivo: ", cameraInfo.deviceType)))), this.showManualCaptureButton && captureState.step === 'front' && !captureState.showFlipAnimation && !captureState.showSuccessAnimation && (h("div", { key: 'b655bc09a9054682f7a7d7b1bd169a11efac3c45', class: "manual-capture-section" }, h("button", { key: '73650786a96abb2e3883eb411d95aef4fb00821d', class: "manual-capture-button", onClick: () => this.takeManualScreenshot(), type: "button", disabled: this.processingButton !== null }, this.processingButton === 'capture-front' && (h("span", { key: '9af39330393a1dc56dc7adf66d8d2000820ccc3d', class: "button-spinner" })), "Capturar Frente"))))), captureState.isCapturing && (h("div", { key: '619bdc1df901e2321842e9f51765e5f74939d043', class: "capture-animation" })), captureState.showFlipAnimation && (h("div", { key: 'f91616b49f53df94e19c440b04d9334111d059bb', class: "flip-animation" }, h("div", { key: 'da522b17c21022a12f8af69f82aac44d52bbaa71', class: "id-card-icon" }), h("div", { key: '29440e74bf938c11e2f743badf7f2144a986fd8a', class: "flip-text" }, "\u00A1Voltea tu identificaci\u00F3n!"))), captureState.showSuccessAnimation && (h("div", { key: '181817d898e4c2430338884b71f7ab96356972ae', class: "success-animation" }, h("div", { key: '6cb28526b5b9f5aac12d8328552c96233eeb4a0c', class: "check-icon" }), h("div", { key: '20c9a81338d6752448e4bca4c608faa3070fb64a', class: "success-text" }, "\u00A1Proceso completado!"))), h("div", { key: '549a6374d9491e212fd2d9fa4d240c6a348652ad', class: `component-status status-${this.currentStatus.type}` }, (this.currentStatus.type === 'loading' || this.currentStatus.type === 'initializing') && (h("div", { key: '7b077a21197447095a349fd625ca08eca2a9094c', class: "status-spinner" })), h("div", { key: 'fcff47edbac15b6cb5323efc946b7fa177b65658', class: "status-content" }, h("div", { key: 'a3dcdd467791c078cda33b8c75577c4cf7bb6468', class: "status-message" }, this.currentStatus.message), this.currentStatus.description && (h("div", { key: '4d7dd231afeeffb4dbab8a2833fdf79726326ff3', class: "status-description" }, this.currentStatus.description)))), this.debug && (h("div", { key: '854702ca658986c6600abf612a687ad83488f6a0', class: "performance-monitor" }, h("div", { key: '19bd29ac89585dafa0dde90699099b6111e6bb3b', class: "performance-expanded" }, h("div", { key: '08760ca40d44165994ca40b077bef0b1becec629', class: "metrics-row" }, h("div", { key: '5d7cc885bfd45e2d9e48f89e94faad5716870a93', class: "metric-compact" }, h("span", { key: '4a0040ebb932f3d9b4b167b7e91abac925644815', class: "metric-label" }, "FPS"), h("span", { key: '31335bb6758ffb49a267d6eea55f3dab74d3fb20', class: `metric-value ${this.performanceData.fps < 15 ? 'warning' : this.performanceData.fps < 10 ? 'danger' : 'good'}` }, this.performanceData.fps)), h("div", { key: 'c5ddca6673a720ccef6e1ffd431916840eb66f48', class: "metric-compact" }, h("span", { key: 'badf1f2858dfbf1faa4da3f575a7ba7aed19c190', class: "metric-label" }, "MEM"), h("span", { key: '206bf0afefeb7e4f8aec02667c8bb3b91eca2fd6', class: `metric-value ${this.performanceData.memoryUsage > 100 ? 'warning' : this.performanceData.memoryUsage > 200 ? 'danger' : 'good'}` }, this.performanceData.memoryUsage, "MB"))), h("div", { key: '0e12d3c961f7d4a24b860775702c735b046dfbb9', class: "metrics-row" }, h("div", { key: '23c16b7d5b55e2657aeef65d09968ab3279a7866', class: "metric-compact" }, h("span", { key: 'ad5f68534e549bf368e8da8857bb3eda707badcd', class: "metric-label" }, "INF"), h("span", { key: 'f53ed6bd2454f98b4a765f1af65e696ce82eea03', class: `metric-value ${this.performanceData.inferenceTime > 100 ? 'warning' : this.performanceData.inferenceTime > 200 ? 'danger' : 'good'}` }, this.performanceData.inferenceTime, "ms")), h("div", { key: 'bbc9ac7dbe4bb335547cc1a9ee5101c27ab80e71', class: "metric-compact" }, h("span", { key: '8392c0a514a4dc25b60a5843ce9563031a9245d0', class: "metric-label" }, "FRAME"), h("span", { key: 'd3aaca5da2db9e31f5f58d09ef9460eca5cc331c', class: `metric-value ${this.performanceData.frameProcessingTime > 50 ? 'warning' : this.performanceData.frameProcessingTime > 100 ? 'danger' : 'good'}` }, this.performanceData.frameProcessingTime, "ms"))), h("div", { key: 'f294351ea0a26d7309441f68eca0c6fcc048d30e', class: "metrics-row" }, h("div", { key: '97c2f2854b2b799e47ace3449130c7e3952bb673', class: "metric-compact" }, h("span", { key: '17a9e44716640663162a7eafb3bd6471adb62d37', class: "metric-label" }, "DET"), h("span", { key: 'd301a6decf7c25e43aaea9828be7864866fd6cae', class: "metric-value good" }, this.performanceData.successfulDetections, "/", this.performanceData.totalDetections)), h("div", { key: '51d3ca5308396f8e712204c366ea0c4622122dad', class: "metric-compact" }, h("span", { key: '064c7fe006d64de181d9fd707c74ebee11b78519', class: "metric-label" }, "RATE"), h("span", { key: '467e9a5b59051d172134ceab926b69c172338826', class: `metric-value ${this.performanceData.detectionRate < 30 ? 'danger' : this.performanceData.detectionRate < 60 ? 'warning' : 'good'}` }, this.performanceData.detectionRate, "%")))))), h("div", { key: 'ca4f45de99c4e305f872368b1a26983f4e22a368', class: "watermark" }, h("img", { key: 'b3854686a8b5eb959b5516100d4c792d2899db91', src: "https://static.jaak.ai/commons/powered-by-jaak.png", alt: "Powered by Jaak" }))))));
|
|
19904
19905
|
}
|
|
19905
19906
|
// Utility methods
|
|
19906
19907
|
updateDetectionBoxes(boxes) {
|