@jaak.ai/stamps 2.5.7-dev.2 → 2.5.7-dev.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.
@@ -18699,7 +18699,7 @@ const JaakStamps$1 = /*@__PURE__*/ proxyCustomElement(class JaakStamps extends H
18699
18699
  propagateTraceHeaderCorsUrls; // Comma-separated URLs or regex patterns
18700
18700
  metricsExportIntervalMillis = 60000; // Export metrics every 60 seconds
18701
18701
  license; // License key for validation
18702
- licenseEnvironment = 'prod'; // Environment for license validation
18702
+ licenseEnvironment = 'prod';
18703
18703
  traceId; // Optional trace ID for tracking
18704
18704
  appId = 'jaak-stamps-web'; // Application ID for license validation
18705
18705
  captureCompleted;
@@ -18818,8 +18818,10 @@ const JaakStamps$1 = /*@__PURE__*/ proxyCustomElement(class JaakStamps extends H
18818
18818
  canvasPool = [];
18819
18819
  MAX_CANVAS_POOL_SIZE = 3;
18820
18820
  async componentWillLoad() {
18821
- // Yield one microtask so attributes set synchronously after innerHTML are reflected as props
18822
- await Promise.resolve();
18821
+ // Use setTimeout(0) instead of Promise.resolve() so Angular's synchronous change-detection
18822
+ // cycle (which sets property bindings like licenseEnvironment) finishes before we read props.
18823
+ // A microtask yield is not enough when the consuming framework defers its first CD cycle.
18824
+ await new Promise(resolve => setTimeout(resolve, 0));
18823
18825
  if (this.debug) {
18824
18826
  console.log('[JAAK-DEBUG] componentWillLoad() - Props after microtask yield:');
18825
18827
  console.log('[JAAK-DEBUG] useDocumentDetector:', this.useDocumentDetector, '(type:', typeof this.useDocumentDetector, ')');
@@ -18862,6 +18864,17 @@ const JaakStamps$1 = /*@__PURE__*/ proxyCustomElement(class JaakStamps extends H
18862
18864
  this.updateStatus('Validando licencia...', 'Verificando autorización de uso', 'initializing');
18863
18865
  await this.validateAndInitialize();
18864
18866
  }
18867
+ async onLicenseEnvironmentChanged() {
18868
+ // Always recreate the service so the correct environment URL is used from now on.
18869
+ this.licenseValidationService = new LicenseValidationService(this.licenseEnvironment);
18870
+ // If a license is present but the component never finished initializing
18871
+ // (e.g. first validate ran against the wrong env and failed, or license arrived
18872
+ // before licenseEnvironment was set), retry the full init flow now.
18873
+ if (this.license && !this._initialized && !this._initializing) {
18874
+ this.updateStatus('Validando licencia...', 'Verificando autorización de uso', 'initializing');
18875
+ await this.validateAndInitialize();
18876
+ }
18877
+ }
18865
18878
  async validateAndInitialize() {
18866
18879
  if (this._initialized || this._initializing) {
18867
18880
  return;
@@ -20270,7 +20283,7 @@ const JaakStamps$1 = /*@__PURE__*/ proxyCustomElement(class JaakStamps extends H
20270
20283
  isCapturing: false
20271
20284
  };
20272
20285
  const cameraInfo = this.cameraInfoWithAutofocus;
20273
- return (h("div", { key: 'b533e0e46bb543aaadc66743be6909810c7568c7', class: "detector-container" }, !this.licenseValid && this.licenseError && (h("div", { key: '3f2f7f2ada6522158bed6ecc1784e2406bbb46fc', class: "license-error-container" }, h("div", { key: 'a1bff0acfe2b0e4dff2ff9409667915ab07ebdbc', class: "license-error-card" }, h("svg", { key: '4439f6f5d3c229e345fb7fb8f2ea91fcf7e06352', 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: '8009833d6aff12806fa19159346f177ad71258eb', 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: '689396c400df0edd56b22e703973a02e151d556b', d: "M12 8V12", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round" }), h("circle", { key: '6a7ebf2223c786d8622000deca0d10067dd6d498', cx: "12", cy: "16", r: "0.5", fill: "currentColor", stroke: "currentColor", "stroke-width": "1" })), h("h2", { key: '471f9c10b12c6534dc759115c11c128918abfd03', class: "license-error-title" }, "Licencia Requerida"), h("p", { key: '0654bf2673aef315d518521918149a7459d4588c', class: "license-error-message" }, this.licenseError), h("p", { key: '8aaf0f0d9cf272d734f8f7d0ecd43fecb9fd2c88', class: "license-error-help" }, "Contacte a soporte: ", h("a", { key: '53bd8e527e3ce0965ed70a15093e10a212664d8a', href: "mailto:support@jaak.ai" }, "support@jaak.ai")), h("div", { key: '108bbbdd5ef383654388d988ace7ca5e76d6eca7', class: "license-error-footer" }, "JAAK Stamps")))), this.licenseValid && (h("div", { key: '57f82c48630bba2ee7ef07faf0cd74fed43f6d2a', class: "video-container" }, h("video", { key: '97a2b0639188408c358ea96453ba77be415b63bf', ref: el => this.videoRef = el, autoplay: true, muted: true, playsinline: true, class: this.shouldMirrorVideo ? 'mirror' : '', style: {
20286
+ return (h("div", { key: 'ebb920fee5499ae979cb60332342b2f0758fb497', class: "detector-container" }, !this.licenseValid && this.licenseError && (h("div", { key: 'c5f912119d581b52c66e72b67241a72b976ec44e', class: "license-error-container" }, h("div", { key: '19ab81fde436b79252b45b44e772ab303e19405e', class: "license-error-card" }, h("svg", { key: '68ab28d6649949dcfd4c13d2dc8e77486b242da5', 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: '19e0e5aa75368a125a65932d116467f65a4ffffc', 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: 'b5aee63abfc96b7851d59d5ccb19f872de0fed66', d: "M12 8V12", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round" }), h("circle", { key: '5d25fedbe498d583a96ec0c5c3b91872b3cdf111', cx: "12", cy: "16", r: "0.5", fill: "currentColor", stroke: "currentColor", "stroke-width": "1" })), h("h2", { key: '679c39266afc7c3c987a3da02510a739d4f34679', class: "license-error-title" }, "Licencia Requerida"), h("p", { key: '38069563654e3aa16784e77c2539620fcf2b60f6', class: "license-error-message" }, this.licenseError), h("p", { key: '3fcd6403a7c39e3ed6e63699d051607f348b5ea2', class: "license-error-help" }, "Contacte a soporte: ", h("a", { key: '328e62a4d4a70ec06eb73aa6bb90a2b7912dfdc4', href: "mailto:support@jaak.ai" }, "support@jaak.ai")), h("div", { key: 'c16315263a11d06d1cd9a6aff673f1a8cd609d05', class: "license-error-footer" }, "JAAK Stamps")))), this.licenseValid && (h("div", { key: 'c7baf6eca897342a564c8dfe3c3e81091bb881ef', class: "video-container" }, h("video", { key: '3ea8f97b026f2e53dbee64c0cd2976d9a84c47db', ref: el => this.videoRef = el, autoplay: true, muted: true, playsinline: true, class: this.shouldMirrorVideo ? 'mirror' : '', style: {
20274
20287
  // Keep the element rendered (display: block) so the browser
20275
20288
  // loads stream metadata and fires 'loadedmetadata'. Hiding it
20276
20289
  // with display:none prevents metadata loading in Chrome and
@@ -20279,7 +20292,7 @@ const JaakStamps$1 = /*@__PURE__*/ proxyCustomElement(class JaakStamps extends H
20279
20292
  // render context alive.
20280
20293
  opacity: captureState.isVideoActive ? '1' : '0',
20281
20294
  visibility: captureState.isVideoActive ? 'visible' : 'hidden',
20282
- } }), h("div", { key: '1bec42994ce3769df263cfc870ecee025a52ed9d', 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: {
20295
+ } }), h("div", { key: '03150c4c1d5b5978b7a1742760b56135873c754d', 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: {
20283
20296
  position: 'absolute',
20284
20297
  left: `${box.x}px`,
20285
20298
  top: `${box.y}px`,
@@ -20288,9 +20301,9 @@ const JaakStamps$1 = /*@__PURE__*/ proxyCustomElement(class JaakStamps extends H
20288
20301
  border: '2px solid #32406C',
20289
20302
  pointerEvents: 'none',
20290
20303
  boxSizing: 'border-box'
20291
- } })))), this.isMaskReady && (h("div", { key: 'f88f149cbaf5bbf330ef0075423d1e6c67b5c7f0', class: "overlay-mask" }, h("div", { key: '70228ae3af11ecf5d321b1071fd9f8ec9a88e27c', class: "card-outline" }, h("div", { key: '465c8ec7952453668736dd730baffc4a8a731123', class: "side side-top" }), h("div", { key: '421277c9d9f6441ecaecee3c159bd6cdd677d5ee', class: "side side-right" }), h("div", { key: '24793d3e86b2cd4c12d3ca6b94e5703bded895ff', class: "side side-bottom" }), h("div", { key: '0a474a4afff857518281b021b23dcdde10f715f3', class: "side side-left" })), !captureState.showFlipAnimation && !captureState.showSuccessAnimation && (h("div", { key: '396969da92aab145f8d06d73246341e950176f7e', class: `guide-text ${this.showPerformanceMessage ? 'performance-warning-text' : ''}` }, this.getGuideText(captureState.step))), captureState.step === 'back' && !captureState.showFlipAnimation && !captureState.showSuccessAnimation && (h("div", { key: '1cdadfffa4b51edbed1e2a8e1163cc677aa25be6', class: "back-capture-section" }, h("div", { key: '7ee551c033a9018abc282f6ca50b8d9a0fd58561', class: "back-capture-buttons" }, (!this.useDocumentDetector || this.performanceDegradedMode || this.showManualCaptureButton) && (h("button", { key: 'c477248ff527cde290a4b733573e70809c317219', class: "capture-button primary-button", onClick: () => this.takeManualScreenshot(), type: "button", disabled: this.processingButton !== null }, this.processingButton === 'capture-back' && (h("span", { key: '846d379dd42c927271494e26fbab413034a7d3e4', class: "button-spinner" })), "Capturar Reverso")), h("button", { key: '056a549211f964b8b112d7c87fb2a4a44bed9891', class: "skip-button", onClick: () => this.skipBackCapture(), type: "button", disabled: this.processingButton !== null }, this.processingButton === 'skip-back' && (h("span", { key: '1415973f65372077bc2c073fa3bcac12926d9aa1', class: "button-spinner" })), this.enableBackDocumentTimer && this.backDocumentTimerRemaining > 0
20304
+ } })))), this.isMaskReady && (h("div", { key: '96d73c2ff335d9dc7acf443c7b6e62613d2d3ed7', class: "overlay-mask" }, h("div", { key: 'cac27d59a12131f3d93ea763fcf7c00987861926', class: "card-outline" }, h("div", { key: '29b40014f26a20f7ec1aaa7dd1a154f834b40d2b', class: "side side-top" }), h("div", { key: 'cb31796ea1d74cfb68b4e74f7a0abbef873f67c3', class: "side side-right" }), h("div", { key: 'ec596a1ff9f6e51243359145a2f8a9ea5ceca61d', class: "side side-bottom" }), h("div", { key: '20e19a59cc88e6fab27452c828187b8916126211', class: "side side-left" })), !captureState.showFlipAnimation && !captureState.showSuccessAnimation && (h("div", { key: 'd03cd5a33364b1b6cb368c998e3cb05373c284c9', class: `guide-text ${this.showPerformanceMessage ? 'performance-warning-text' : ''}` }, this.getGuideText(captureState.step))), captureState.step === 'back' && !captureState.showFlipAnimation && !captureState.showSuccessAnimation && (h("div", { key: 'd4b4760cbda1af33f4e4e037c6d0222e9f5966f0', class: "back-capture-section" }, h("div", { key: '318ffc4138982564b23e84b399533034b42b9ec7', class: "back-capture-buttons" }, (!this.useDocumentDetector || this.performanceDegradedMode || this.showManualCaptureButton) && (h("button", { key: '33e12aae5d1981a56f5706ad840c46ea46686a8c', class: "capture-button primary-button", onClick: () => this.takeManualScreenshot(), type: "button", disabled: this.processingButton !== null }, this.processingButton === 'capture-back' && (h("span", { key: '5e2d871d21c972c2ae929b06a971ecea5291ae09', class: "button-spinner" })), "Capturar Reverso")), h("button", { key: 'cd5e64d18b99893f973b8279a18ebe6058705be2', class: "skip-button", onClick: () => this.skipBackCapture(), type: "button", disabled: this.processingButton !== null }, this.processingButton === 'skip-back' && (h("span", { key: 'aa41d6aae7440fa35941734398e26b7ec5c87dd6', class: "button-spinner" })), this.enableBackDocumentTimer && this.backDocumentTimerRemaining > 0
20292
20305
  ? `Saltar reverso (${this.backDocumentTimerRemaining}s)`
20293
- : 'Saltar reverso')))), captureState.isVideoActive && (h("div", { key: '80af397e68e479a8f72cbf419f2a27062e75bb9f', class: "camera-controls" }, h("button", { key: 'e0c243dbf19530c0e73ad6ad698c0c1632c8bbcc', 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: '2c2bd71e6c8d3946cc4b27a6f5ca2baf6fe76dfd', class: "camera-selector-dropdown" }, h("div", { key: 'a3fe75222fc85a30090d2a8a14c97b40608a2b58', class: "camera-selector-header" }, h("span", { key: 'a70f84e97d28937b9f5b3f6d18a3760bbb675ae5' }, "Seleccionar C\u00E1mara"), h("button", { key: '07ace1d353628f287b6bccbdf5762a4a2be069b7', class: "close-selector", onClick: () => this.toggleCameraSelector(), type: "button" }, "\u00D7")), h("div", { key: '35e812b079eccce3fef8310d5396c86de80d4ebc', 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: 'cd8e3052b8ae483c4ac3adbaf0fb741ff43196e3', class: "device-info" }, h("small", { key: '99c8ffd14e815b87e9fde60bde16417b91f416e8' }, "Dispositivo: ", cameraInfo.deviceType)))), this.showManualCaptureButton && captureState.step === 'front' && !captureState.showFlipAnimation && !captureState.showSuccessAnimation && (h("div", { key: 'b06fa4e858cb212b937c0d2a7c0a8e57c44286ad', class: "manual-capture-section" }, h("button", { key: '02f78013891b25aad3a8c1dfe279372694b67437', class: "manual-capture-button", onClick: () => this.takeManualScreenshot(), type: "button", disabled: this.processingButton !== null }, this.processingButton === 'capture-front' && (h("span", { key: '0f8304c2674f9ebe9689dc6af366f682fadc8b8c', class: "button-spinner" })), "Capturar Frente"))))), captureState.isCapturing && (h("div", { key: '4f8d1a54209a1089fbe869470aa34a895f4236da', class: "capture-animation" })), captureState.showFlipAnimation && (h("div", { key: 'aafebea328c9237aae90a23ac5912c88c3745c9c', class: "flip-animation" }, h("div", { key: '1c94cedfe43582d7b671525dbf9cc3d5ad8d2bda', class: "id-card-icon" }), h("div", { key: '15a55492738f4a7503c4f6eedeaa735160eb4329', class: "flip-text" }, "\u00A1Voltea tu identificaci\u00F3n!"))), captureState.showSuccessAnimation && (h("div", { key: '57c27170db47116e222f224e9bce47a5e9815fdf', class: "success-animation" }, h("div", { key: '57ef50e90891bce64bf34c5a313098e4ad161ff5', class: "check-icon" }), h("div", { key: '0f2f4552bfb7b43baa3ff63abc7e5589b6e3a310', class: "success-text" }, "\u00A1Proceso completado!"))), h("div", { key: '6c46b21e2c06d470f0cb9d1d6b915db652383559', class: `component-status status-${this.currentStatus.type}` }, (this.currentStatus.type === 'loading' || this.currentStatus.type === 'initializing') && (h("div", { key: '55dc63e42673d1b58c4de6c991cf453dcf8499e1', class: "status-spinner" })), h("div", { key: 'dc2cd6149b83cd1ca89759078d1ebf7834729d2e', class: "status-content" }, h("div", { key: '08bbadc5ef735f04037e4abdc9c9f3df491c9ab9', class: "status-message" }, this.currentStatus.message), this.currentStatus.description && (h("div", { key: '2fd5f2e2f602b6714b8bbafe0f3e4393ead73b8d', class: "status-description" }, this.currentStatus.description)))), this.debug && (h("div", { key: '1e91ab156abc3126eac19b83c3bf8401d935ea95', class: "performance-monitor" }, h("div", { key: '82f1cf187d145833d7ffeba36ee13ff9cc3f93bd', class: "performance-expanded" }, h("div", { key: '0723044bf1bd77e849b2fc1ee05570a7fc842b18', class: "metrics-row" }, h("div", { key: 'a3173079186fcdce89ea72c26965af224593a89a', class: "metric-compact" }, h("span", { key: '4cd1beeae9b636d38f39d283e6a4936f57245b22', class: "metric-label" }, "FPS"), h("span", { key: '5b297af74ec878268ab6c1e5dcadeaf7ce3e4385', class: `metric-value ${this.performanceData.fps < 15 ? 'warning' : this.performanceData.fps < 10 ? 'danger' : 'good'}` }, this.performanceData.fps)), h("div", { key: '34ba1f18c1828e459929440b33be96f3ce5de329', class: "metric-compact" }, h("span", { key: '4f0c69a95fdcb2755cfb3f1f82112e367b72a9a3', class: "metric-label" }, "MEM"), h("span", { key: 'b1a71103ca929ac970fbdb73ae5f09e164bd7254', class: `metric-value ${this.performanceData.memoryUsage > 100 ? 'warning' : this.performanceData.memoryUsage > 200 ? 'danger' : 'good'}` }, this.performanceData.memoryUsage, "MB"))), h("div", { key: '70f34641bb27bdaf5326273e05ddd02bd7398bf2', class: "metrics-row" }, h("div", { key: 'bdb611ebe6b8442012d40a02dd4e75e0c3cc82ee', class: "metric-compact" }, h("span", { key: 'afa3059162ba3cbfb213b6e5ed50021bd5528610', class: "metric-label" }, "INF"), h("span", { key: '818242fa154d5afeba5536bb6b58fd775ddb6488', class: `metric-value ${this.performanceData.inferenceTime > 100 ? 'warning' : this.performanceData.inferenceTime > 200 ? 'danger' : 'good'}` }, this.performanceData.inferenceTime, "ms")), h("div", { key: '0bcb397887b0d5399a9c9c01fac9868d380806d0', class: "metric-compact" }, h("span", { key: '1266c1f8b5fcf44b97dccece815069977ce1c2b8', class: "metric-label" }, "FRAME"), h("span", { key: 'a4f2c048caf03798e18bed52951154d5ad861737', class: `metric-value ${this.performanceData.frameProcessingTime > 50 ? 'warning' : this.performanceData.frameProcessingTime > 100 ? 'danger' : 'good'}` }, this.performanceData.frameProcessingTime, "ms"))), h("div", { key: '07eae24f65b3c81d764eb62c67c0592ec5a4ab94', class: "metrics-row" }, h("div", { key: '511109a92d36fe4b7bfc604ee9ff690bf73cc0cd', class: "metric-compact" }, h("span", { key: 'd2d4fec760bacf03e80ba7e7b604c4020f60f36a', class: "metric-label" }, "DET"), h("span", { key: '5f357fdaf4d09da9142758533c24c0064426c97a', class: "metric-value good" }, this.performanceData.successfulDetections, "/", this.performanceData.totalDetections)), h("div", { key: '4afbaf1be6d66074a5fac89e8a66203f31c2f747', class: "metric-compact" }, h("span", { key: '506715eafc515643f1ca2c85ec7f1e06a3cad471', class: "metric-label" }, "RATE"), h("span", { key: 'c59b467e6196facda16d7849b63079982e1a4974', class: `metric-value ${this.performanceData.detectionRate < 30 ? 'danger' : this.performanceData.detectionRate < 60 ? 'warning' : 'good'}` }, this.performanceData.detectionRate, "%")))))), h("div", { key: '22683574db6bdd9f33b21b5d3ab706590c667011', class: "watermark" }, h("img", { key: '7ff0eb2df6c655f281bd3f71c06adbcea2be0db8', src: "https://static.jaak.ai/commons/powered-by-jaak.png", alt: "Powered by Jaak", onError: (e) => {
20306
+ : 'Saltar reverso')))), captureState.isVideoActive && (h("div", { key: '67dd6532dbba68518b1e63f3b7a4274c7c4752ee', class: "camera-controls" }, h("button", { key: '263a995b82253189b0dd38166b4922fd05116359', 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: '26b730e85d5e8b6343bc5f7b9fb7d8e17caa7020', class: "camera-selector-dropdown" }, h("div", { key: 'c738e36131f87fb1aac2d872b9e53d2e3c315056', class: "camera-selector-header" }, h("span", { key: 'b5fd2cfa2700bca4b27cec3a8ebfe1ece6fe111a' }, "Seleccionar C\u00E1mara"), h("button", { key: '5d11e0227a6727733fee1c204635146c5c748ae9', class: "close-selector", onClick: () => this.toggleCameraSelector(), type: "button" }, "\u00D7")), h("div", { key: '190a36537e7650d37c8ed8d891a1c97fd4303869', 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: '51405091e987752df5b85891ee9805b26d9e5fb8', class: "device-info" }, h("small", { key: '95c3e242217b722b584966946f4809aa61fb2b54' }, "Dispositivo: ", cameraInfo.deviceType)))), this.showManualCaptureButton && captureState.step === 'front' && !captureState.showFlipAnimation && !captureState.showSuccessAnimation && (h("div", { key: '577cc09e5ffdaeef0de4c06dbb82d299e48716d6', class: "manual-capture-section" }, h("button", { key: 'bf1fd11171e13c4c52b83d076d6cb3c79a225a84', class: "manual-capture-button", onClick: () => this.takeManualScreenshot(), type: "button", disabled: this.processingButton !== null }, this.processingButton === 'capture-front' && (h("span", { key: 'cbf77eb7cb791bb298de3cbbafd9955535e32c15', class: "button-spinner" })), "Capturar Frente"))))), captureState.isCapturing && (h("div", { key: 'bdd3793d2ce5ba351308fb64aa5a31bfa8dd85a1', class: "capture-animation" })), captureState.showFlipAnimation && (h("div", { key: '0f9df69e3a1002967c407505b965c14061c47365', class: "flip-animation" }, h("div", { key: '1384d5b75bd5e1f3584b93711a39825ae5a9b9a0', class: "id-card-icon" }), h("div", { key: 'aa4912fe5a4ec46ca69793a454a8c51632381fcd', class: "flip-text" }, "\u00A1Voltea tu identificaci\u00F3n!"))), captureState.showSuccessAnimation && (h("div", { key: '5e95f8b372b49719dd601367e9c7ba6dfbd13e30', class: "success-animation" }, h("div", { key: '72085304ac5fe6e2777f009a2091a39381fbc219', class: "check-icon" }), h("div", { key: '1476720f83274b7002365eb8c911f6dce0b84772', class: "success-text" }, "\u00A1Proceso completado!"))), h("div", { key: '68c3f77eb5fa1f442e9c77bcc8207189fd8126e4', class: `component-status status-${this.currentStatus.type}` }, (this.currentStatus.type === 'loading' || this.currentStatus.type === 'initializing') && (h("div", { key: '22bd3df4eca189c0100795befb31408ee4399461', class: "status-spinner" })), h("div", { key: '84c5b65b1b9f3f92704589d791e817a75e2e677d', class: "status-content" }, h("div", { key: 'a474e0cc716fff4f76cfb98dd0e7783eb4521db9', class: "status-message" }, this.currentStatus.message), this.currentStatus.description && (h("div", { key: '5255fe7ddb68f84b7a33ecede21af80c4ef9c476', class: "status-description" }, this.currentStatus.description)))), this.debug && (h("div", { key: 'a4e3a44c7896d3861980cca96329cf88a1cb6693', class: "performance-monitor" }, h("div", { key: '145ec7a322e316bf9989ea72e7ca877eb9630016', class: "performance-expanded" }, h("div", { key: '5bafabe9b0c82ac4682c474dafe7ecbe9be33896', class: "metrics-row" }, h("div", { key: '2c30946e8340f20887ba3a2c769fd731388a1fc8', class: "metric-compact" }, h("span", { key: '82b3b0679c93b88f0f0d88b1cd43479f01dbbd75', class: "metric-label" }, "FPS"), h("span", { key: '9af03b3dda821a0b8fbaec5be7127dd41d897b5d', class: `metric-value ${this.performanceData.fps < 15 ? 'warning' : this.performanceData.fps < 10 ? 'danger' : 'good'}` }, this.performanceData.fps)), h("div", { key: '2d0cc36e696b72f9d616b16e8e75c9bc977dd984', class: "metric-compact" }, h("span", { key: '624beadfa8641dbd690059fc7606cadc413ac247', class: "metric-label" }, "MEM"), h("span", { key: '30bd599357c1cbe7b945d2b72c1723ba7f361982', class: `metric-value ${this.performanceData.memoryUsage > 100 ? 'warning' : this.performanceData.memoryUsage > 200 ? 'danger' : 'good'}` }, this.performanceData.memoryUsage, "MB"))), h("div", { key: '661a150fca2411a1565cda581b105dd15a17a3d5', class: "metrics-row" }, h("div", { key: '82a8101abcbdebe1a32314d866a10d7be42b3e2f', class: "metric-compact" }, h("span", { key: '5abfae37ed5ec1f1bb14785f55a61bc1364aab40', class: "metric-label" }, "INF"), h("span", { key: '481df1d1fa0e1603bea786de8f20351f2cd9f949', class: `metric-value ${this.performanceData.inferenceTime > 100 ? 'warning' : this.performanceData.inferenceTime > 200 ? 'danger' : 'good'}` }, this.performanceData.inferenceTime, "ms")), h("div", { key: 'bfd657acb2cf6686e47c2ae4a348bf6ddfd11a66', class: "metric-compact" }, h("span", { key: '8dd9dfd72ae9183dce9985cca81c6ce6f80bc072', class: "metric-label" }, "FRAME"), h("span", { key: '09bff194b73d48d5e7c400d6132eab3741cd30f7', class: `metric-value ${this.performanceData.frameProcessingTime > 50 ? 'warning' : this.performanceData.frameProcessingTime > 100 ? 'danger' : 'good'}` }, this.performanceData.frameProcessingTime, "ms"))), h("div", { key: 'ad18e77ee79c7cec2257f30ed70cf1fd4289548e', class: "metrics-row" }, h("div", { key: 'ca2614b32424d8ccaa5e0823a740dfefc17a1ed5', class: "metric-compact" }, h("span", { key: 'd4b78f37d0b23bdcc35133417960d5a744f4a7df', class: "metric-label" }, "DET"), h("span", { key: 'c8b52e13d51f737e7e6cd1985abf570db27ccb0e', class: "metric-value good" }, this.performanceData.successfulDetections, "/", this.performanceData.totalDetections)), h("div", { key: '018d1bb321178b969fa868f1cf5eecba4bfdaa1f', class: "metric-compact" }, h("span", { key: '19b475406a767cf7fe417fd7c7dad980f54536b9', class: "metric-label" }, "RATE"), h("span", { key: '5994ed1ad88e07a597d82e1246cbe90c66d58214', class: `metric-value ${this.performanceData.detectionRate < 30 ? 'danger' : this.performanceData.detectionRate < 60 ? 'warning' : 'good'}` }, this.performanceData.detectionRate, "%")))))), h("div", { key: 'f07bd04ef68386e02f0b8d468bff1547986196e5', class: "watermark" }, h("img", { key: '009735bf081ace290d1a8e1805dd5d27201898c4', src: "https://static.jaak.ai/commons/powered-by-jaak.png", alt: "Powered by Jaak", onError: (e) => {
20294
20307
  const img = e.target;
20295
20308
  img.onerror = null;
20296
20309
  img.src = POWERED_BY_JAAK_FALLBACK;
@@ -21112,7 +21125,8 @@ const JaakStamps$1 = /*@__PURE__*/ proxyCustomElement(class JaakStamps extends H
21112
21125
  }
21113
21126
  static get assetsDirs() { return ["../../assets"]; }
21114
21127
  static get watchers() { return {
21115
- "license": ["onLicenseChanged"]
21128
+ "license": ["onLicenseChanged"],
21129
+ "licenseEnvironment": ["onLicenseEnvironmentChanged"]
21116
21130
  }; }
21117
21131
  static get style() { return jaakStampsCss; }
21118
21132
  }, [257, "jaak-stamps", {
@@ -21171,7 +21185,8 @@ const JaakStamps$1 = /*@__PURE__*/ proxyCustomElement(class JaakStamps extends H
21171
21185
  "setCaptureDelay": [64],
21172
21186
  "getCaptureDelay": [64]
21173
21187
  }, undefined, {
21174
- "license": ["onLicenseChanged"]
21188
+ "license": ["onLicenseChanged"],
21189
+ "licenseEnvironment": ["onLicenseEnvironmentChanged"]
21175
21190
  }]);
21176
21191
  function defineCustomElement$1() {
21177
21192
  if (typeof customElements === "undefined") {