@tsocial/tvweb-sdk 0.0.0-beta.20260106-111700 → 0.0.0-beta.20260116-155038

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.
@@ -17718,6 +17718,66 @@
17718
17718
  ]
17719
17719
  }
17720
17720
  ],
17721
+ "vn.passport": [
17722
+ {
17723
+ lapType: "small",
17724
+ bboxes: [
17725
+ [
17726
+ 546,
17727
+ 311,
17728
+ 675,
17729
+ 343
17730
+ ],
17731
+ [
17732
+ 300,
17733
+ 311,
17734
+ 427,
17735
+ 342
17736
+ ],
17737
+ [
17738
+ 300,
17739
+ 267,
17740
+ 393,
17741
+ 295
17742
+ ],
17743
+ [
17744
+ 546,
17745
+ 260,
17746
+ 675,
17747
+ 292
17748
+ ],
17749
+ [
17750
+ 300,
17751
+ 212,
17752
+ 423,
17753
+ 244
17754
+ ],
17755
+ [
17756
+ 546,
17757
+ 209,
17758
+ 675,
17759
+ 241
17760
+ ],
17761
+ [
17762
+ 300,
17763
+ 134,
17764
+ 497,
17765
+ 165
17766
+ ]
17767
+ ]
17768
+ },
17769
+ {
17770
+ lapType: "large",
17771
+ bboxes: [
17772
+ [
17773
+ 40,
17774
+ 418,
17775
+ 808,
17776
+ 498
17777
+ ]
17778
+ ]
17779
+ }
17780
+ ],
17721
17781
  "vn.tcc.front": [
17722
17782
  {
17723
17783
  lapType: "small",
@@ -33783,7 +33843,7 @@
33783
33843
  }, nS$1;
33784
33844
  }();
33785
33845
  function nB$1() {
33786
- return "0.0.0-beta.20260106-111700";
33846
+ return "0.0.0-beta.20260116-155038";
33787
33847
  }
33788
33848
  function nI$1() {
33789
33849
  return {
@@ -41259,53 +41319,55 @@
41259
41319
  }, uz;
41260
41320
  }(), uG);
41261
41321
  }();
41262
- function dm(e, t) {
41263
- let r = dg();
41264
- return (dm = function(e, t) {
41265
- return r[e -= 354];
41322
+ let dm = dg;
41323
+ function dg(e, t) {
41324
+ let r = dy();
41325
+ return (dg = function(e, t) {
41326
+ return r[e -= 491];
41266
41327
  })(e, t);
41267
41328
  }
41268
- function dg() {
41329
+ function dy() {
41269
41330
  let e = [
41270
- "ytJdcsPxrD",
41271
- "3325580IJRjfa",
41272
- "1962rbKEwo",
41273
- "359892gaKbdX",
41274
- "DepBO8t60S",
41275
- "2a8648ce3d",
41276
- "0301070342",
41331
+ "44P0rKKsZK",
41277
41332
  "Mjci1ul8mm",
41278
41333
  "KA==",
41279
- "KoZIzj0DAQ",
41280
- "458668Wltqkx",
41281
- "+faHkP3QC3",
41282
- "ssRdXLZEX8",
41283
- "81cVsDSQ",
41284
- "940nLufso",
41285
- "2474NuulkO",
41286
- "000",
41287
- "9xZGYZu",
41288
41334
  "MFkwEwYHKo",
41289
- "35640hpKjQn",
41290
- "D9EKOWS+U4",
41291
- "1362880fRAHgM",
41292
- "44P0rKKsZK",
41293
- "3d02010608",
41335
+ "3059301306",
41336
+ "6HOTkTg",
41337
+ "231464sonjzm",
41338
+ "1450eqqUiE",
41339
+ "12419PilviJ",
41340
+ "8GWaBhU",
41341
+ "ytJdcsPxrD",
41342
+ "25CJsSww",
41343
+ "ssRdXLZEX8",
41344
+ "273469hmAsxQ",
41345
+ "DepBO8t60S",
41294
41346
  "ZIzj0CAQYI",
41295
- "072a8648ce"
41347
+ "1118808mVwqYu",
41348
+ "422197OVVLkz",
41349
+ "MfPrcYTM70",
41350
+ "072a8648ce",
41351
+ "1596018mEDtMO",
41352
+ "KoZIzj0DAQ",
41353
+ "000",
41354
+ "0301070342",
41355
+ "11240FbKdQJ",
41356
+ "cDQgAE9h6Z",
41357
+ "+faHkP3QC3"
41296
41358
  ];
41297
- return (dg = function() {
41359
+ return (dy = function() {
41298
41360
  return e;
41299
41361
  })();
41300
41362
  }
41301
- let dy = dm, db = dm, dv = dg();
41363
+ let db = dg, dv = dy();
41302
41364
  for(;;)try {
41303
- if (parseInt(db(376)) / 1 + parseInt(db(372)) / 2 * (parseInt(db(370)) / 3) + parseInt(db(360)) / 4 + parseInt(db(371)) / 5 * (parseInt(db(359)) / 6) + parseInt(db(367)) / 7 + parseInt(db(378)) / 8 + -parseInt(db(374)) / 9 * (parseInt(db(358)) / 10) === 123814) break;
41365
+ if (parseInt(db(499)) / 1 + -parseInt(db(515)) / 2 * (parseInt(db(514)) / 3) + parseInt(db(506)) / 4 * (parseInt(db(493)) / 5) + parseInt(db(502)) / 6 + parseInt(db(495)) / 7 * (parseInt(db(491)) / 8) + -parseInt(db(498)) / 9 + parseInt(db(516)) / 10 * (-parseInt(db(517)) / 11) === 221836) break;
41304
41366
  dv.push(dv.shift());
41305
41367
  } catch (e) {
41306
41368
  dv.push(dv.shift());
41307
41369
  }
41308
- let d_ = "3059301306" + dy(356) + dy(354) + dy(362) + dy(363) + dy(373), dx = dy(375) + dy(355) + dy(366) + "cDQgAE9h6Z" + dy(361) + dy(357) + dy(368) + dy(379) + dy(364) + dy(377) + "MfPrcYTM70" + dy(369) + dy(365);
41370
+ let d_ = dm(513) + dm(501) + "3d020106082a8648ce3d" + dm(505) + dm(504), dx = dm(512) + dm(497) + dm(503) + dm(507) + dm(496) + dm(492) + dm(508) + dm(509) + dm(510) + "D9EKOWS+U4" + dm(500) + dm(494) + dm(511);
41309
41371
  async function dC(e) {
41310
41372
  let t = new TextEncoder().encode(e);
41311
41373
  return Array.from(new Uint8Array(await crypto.subtle.digest("SHA-256", t))).map((e)=>e.toString(16).padStart(2, "0")).join("");
@@ -45324,7 +45386,7 @@
45324
45386
  return this.getKey().getPublicKey();
45325
45387
  }, e.prototype.getPublicKeyB64 = function() {
45326
45388
  return this.getKey().getPublicBaseKeyB64();
45327
- }, e.version = "5.34.1", e;
45389
+ }, e.version = "5.34.7", e;
45328
45390
  }();
45329
45391
  let hO = [
45330
45392
  "-",
@@ -88700,204 +88762,6 @@
88700
88762
  return videoCanvas;
88701
88763
  };
88702
88764
 
88703
- const MODE = {
88704
- LANDSCAPE: 'landscape',
88705
- PORTRAIT: 'portrait',
88706
- DESKTOP: 'desktop'
88707
- };
88708
- const useDetectOrientation = (onOrientationChange)=>{
88709
- const portraitQuery = reactExports.useRef(window.matchMedia('(orientation: portrait)'));
88710
- const initOrientation = reactExports.useRef(portraitQuery.current.matches ? MODE.PORTRAIT : MODE.LANDSCAPE);
88711
- const [curOrientation, setCurOrientation] = reactExports.useState(initOrientation.current);
88712
- reactExports.useEffect(()=>{
88713
- function handleResizeForScreen() {
88714
- const orientationType = get(screen, 'orientation.type')?.split('-')?.[0];
88715
- setCurOrientation(orientationType);
88716
- if (typeof onOrientationChange === 'function') {
88717
- onOrientationChange(orientationType);
88718
- }
88719
- }
88720
- function handleResizeForQuery(e) {
88721
- let orientation;
88722
- if (e.matches) {
88723
- orientation = MODE.PORTRAIT;
88724
- } else {
88725
- orientation = MODE.LANDSCAPE;
88726
- }
88727
- setCurOrientation(orientation);
88728
- if (typeof onOrientationChange === 'function') {
88729
- onOrientationChange(orientation);
88730
- }
88731
- }
88732
- if (screen.orientation) {
88733
- screen.orientation.addEventListener('change', handleResizeForScreen);
88734
- } else {
88735
- // screen.orientation only available on ios > 16.4
88736
- // fallback to window.matchMedia
88737
- portraitQuery.current.addEventListener('change', handleResizeForQuery);
88738
- }
88739
- return ()=>{
88740
- if (screen.orientation) {
88741
- screen.orientation.removeEventListener('change', handleResizeForScreen);
88742
- } else {
88743
- // eslint-disable-next-line react-hooks/exhaustive-deps
88744
- portraitQuery.current.removeEventListener('change', handleResizeForQuery);
88745
- }
88746
- };
88747
- }, [
88748
- onOrientationChange
88749
- ]);
88750
- return libExports.isMobile ? {
88751
- curOrientation,
88752
- initOrientation: initOrientation.current
88753
- } : {
88754
- curOrientation: MODE.DESKTOP
88755
- };
88756
- };
88757
-
88758
- /**
88759
- * Custom hook to delay rendering when transitioning from hidden to visible state.
88760
- * Useful for waiting for browser dimension updates after orientation changes.
88761
- *
88762
- * @param params - Hook parameters
88763
- * @param params.isVisible - Whether the component is currently visible
88764
- * @param params.enableDelay - Whether to apply delay logic for show transitions
88765
- * @param params.delayMs - Delay in milliseconds before showing (default: 500)
88766
- * @returns Delayed visibility state
88767
- */ function useDelayedRender({ isVisible, enableDelay, delayMs = 500 }) {
88768
- const [isVisibleDelayed, setIsVisibleDelayed] = reactExports.useState(isVisible);
88769
- const prevIsVisibleRef = reactExports.useRef(isVisible);
88770
- const timeoutRef = reactExports.useRef(null);
88771
- reactExports.useEffect(()=>{
88772
- const prevIsVisible = prevIsVisibleRef.current;
88773
- // When delay is disabled, always sync immediately
88774
- if (!enableDelay) {
88775
- setIsVisibleDelayed(isVisible);
88776
- prevIsVisibleRef.current = isVisible;
88777
- return undefined;
88778
- }
88779
- // Handle transitions when delay is enabled
88780
- const isTransitionToShow = !prevIsVisible && isVisible;
88781
- const isTransitionToHide = prevIsVisible && !isVisible;
88782
- if (isTransitionToShow) {
88783
- // Delay showing when transitioning from hidden to visible
88784
- timeoutRef.current = setTimeout(()=>{
88785
- setIsVisibleDelayed(true);
88786
- }, delayMs);
88787
- } else if (isTransitionToHide) {
88788
- // Immediately hide and cancel pending show
88789
- if (timeoutRef.current) {
88790
- clearTimeout(timeoutRef.current);
88791
- timeoutRef.current = null;
88792
- }
88793
- setIsVisibleDelayed(false);
88794
- }
88795
- prevIsVisibleRef.current = isVisible;
88796
- return ()=>{
88797
- if (timeoutRef.current) {
88798
- clearTimeout(timeoutRef.current);
88799
- }
88800
- };
88801
- }, [
88802
- isVisible,
88803
- enableDelay,
88804
- delayMs
88805
- ]);
88806
- return isVisibleDelayed;
88807
- }
88808
-
88809
- const PopupContent$1 = dt$1.div`
88810
- text-align: center;
88811
- font-size: 20px;
88812
- font-weight: 600;
88813
- `;
88814
- const ChildrenWrapper$1 = dt$1.div`
88815
- width: 100%;
88816
- height: 100%;
88817
- opacity: ${({ $showChildren })=>$showChildren ? 1 : 0};
88818
- `;
88819
- const defaultPreferredOrientations = [
88820
- MODE.PORTRAIT,
88821
- MODE.DESKTOP
88822
- ];
88823
- function OrientationDetectionV2({ onOrientationChange = noop$1, unmountOnHidden = false, remountDelayMs = 500, preferredOrientations = defaultPreferredOrientations, children }) {
88824
- const t = gB();
88825
- const { curOrientation } = useDetectOrientation(onOrientationChange);
88826
- const hasCorrectOrientation = preferredOrientations.includes(curOrientation);
88827
- const isVisible = useDelayedRender({
88828
- isVisible: hasCorrectOrientation,
88829
- enableDelay: unmountOnHidden,
88830
- delayMs: remountDelayMs
88831
- });
88832
- const shouldMountChildrenOnDom = unmountOnHidden ? isVisible : true;
88833
- return /*#__PURE__*/ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, {
88834
- children: [
88835
- !preferredOrientations.includes(curOrientation) && /*#__PURE__*/ jsxRuntimeExports.jsx(PopupComponent, {
88836
- open: true,
88837
- children: /*#__PURE__*/ jsxRuntimeExports.jsx(PopupContent$1, {
88838
- children: t('wrong_orientation')
88839
- })
88840
- }),
88841
- shouldMountChildrenOnDom && /*#__PURE__*/ jsxRuntimeExports.jsx(ChildrenWrapper$1, {
88842
- $showChildren: hasCorrectOrientation,
88843
- children: children
88844
- })
88845
- ]
88846
- });
88847
- }
88848
-
88849
- const PopupContent = dt$1.div`
88850
- text-align: center;
88851
- font-size: 20px;
88852
- font-weight: 600;
88853
- `;
88854
- const ChildrenWrapper = dt$1.div`
88855
- width: 100%;
88856
- height: 100%;
88857
- opacity: ${({ showChildren })=>showChildren ? 1 : 0};
88858
- `;
88859
- // eslint-disable-next-line react/require-default-props
88860
- function OrientationDetectionV1({ onOrientationChange, unmountOnHidden, children }) {
88861
- const t = gB();
88862
- const { curOrientation } = useDetectOrientation(onOrientationChange);
88863
- const shouldShowChildren = curOrientation === MODE.PORTRAIT || curOrientation === MODE.DESKTOP;
88864
- return /*#__PURE__*/ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, {
88865
- children: [
88866
- curOrientation === MODE.LANDSCAPE && /*#__PURE__*/ jsxRuntimeExports.jsx(PopupComponent, {
88867
- open: true,
88868
- children: /*#__PURE__*/ jsxRuntimeExports.jsx(PopupContent, {
88869
- children: t('wrong_orientation')
88870
- })
88871
- }),
88872
- (unmountOnHidden ? shouldShowChildren : true) && /*#__PURE__*/ jsxRuntimeExports.jsx(ChildrenWrapper, {
88873
- showChildren: shouldShowChildren,
88874
- children: children
88875
- })
88876
- ]
88877
- });
88878
- }
88879
- OrientationDetectionV1.defaultProps = {
88880
- onOrientationChange: ()=>{},
88881
- unmountOnHidden: false
88882
- };
88883
- OrientationDetectionV1.propTypes = {
88884
- onOrientationChange: PropTypes.func,
88885
- unmountOnHidden: PropTypes.bool
88886
- };
88887
-
88888
- function OrientationDetection({ version = 'v1', children, ...rest }) {
88889
- if (version === 'v2') {
88890
- return /*#__PURE__*/ jsxRuntimeExports.jsx(OrientationDetectionV2, {
88891
- ...rest,
88892
- children: children
88893
- });
88894
- }
88895
- return /*#__PURE__*/ jsxRuntimeExports.jsx(OrientationDetectionV1, {
88896
- ...rest,
88897
- children: children
88898
- });
88899
- }
88900
-
88901
88765
  const useEkycSession = ()=>{
88902
88766
  const [sessionId, setSessionId] = reactExports.useState(Date.now());
88903
88767
  const updateSessionId = reactExports.useCallback(()=>{
@@ -89117,7 +88981,7 @@
89117
88981
  width: 6px;
89118
88982
  height: 6px;
89119
88983
  border-radius: 50%;
89120
- background-color: ${getTheme('FlashLiveness.progressBar.mainColor')};
88984
+ background-color: ${getTheme('FlashLiveness.progressBar.textColor')};
89121
88985
  margin-right: 5px;
89122
88986
  margin-bottom: 2px;
89123
88987
  }
@@ -91389,15 +91253,6 @@
91389
91253
  useRunEffectWhen(()=>logEvent('selfie_flash', 'user_activity.start_flash'), step === STEP.START_FLASHING);
91390
91254
  const progressPercentage = colorIndex === STOP_COLOR ? 0 : Math.min(Math.round((colorIndex + 1) / (colors.length * framesPerColor) * 100), 100);
91391
91255
  const { Loading } = styledComponent;
91392
- const onOrientationChange = reactExports.useCallback((curOrientation)=>{
91393
- if (curOrientation === MODE.LANDSCAPE) {
91394
- videoRef.current?.pause();
91395
- } else {
91396
- videoRef.current?.play();
91397
- }
91398
- }, [
91399
- videoRef
91400
- ]);
91401
91256
  // ============================= Timer =============================
91402
91257
  const onTimeout = reactExports.useCallback(()=>{
91403
91258
  setIsAutoCapturing(false);
@@ -91434,8 +91289,7 @@
91434
91289
  const errorMessage = getErrorMessage(faceError);
91435
91290
  // error message should be centered in the oval
91436
91291
  const errorY = cropArea.y + cropArea.height / 2 + ovalVerticalOffset;
91437
- return /*#__PURE__*/ jsxRuntimeExports.jsxs(OrientationDetection, {
91438
- onOrientationChange: onOrientationChange,
91292
+ return /*#__PURE__*/ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, {
91439
91293
  children: [
91440
91294
  /*#__PURE__*/ jsxRuntimeExports.jsx(NormalCamera, {
91441
91295
  frontCamera: frontCamera,
@@ -91921,17 +91775,219 @@
91921
91775
  });
91922
91776
  };
91923
91777
 
91778
+ const MODE = {
91779
+ LANDSCAPE: 'landscape',
91780
+ PORTRAIT: 'portrait',
91781
+ DESKTOP: 'desktop'
91782
+ };
91783
+ const useDetectOrientation = (onOrientationChange)=>{
91784
+ const portraitQuery = reactExports.useRef(window.matchMedia('(orientation: portrait)'));
91785
+ const initOrientation = reactExports.useRef(portraitQuery.current.matches ? MODE.PORTRAIT : MODE.LANDSCAPE);
91786
+ const [curOrientation, setCurOrientation] = reactExports.useState(initOrientation.current);
91787
+ reactExports.useEffect(()=>{
91788
+ function handleResizeForScreen() {
91789
+ const orientationType = get(screen, 'orientation.type')?.split('-')?.[0];
91790
+ setCurOrientation(orientationType);
91791
+ if (typeof onOrientationChange === 'function') {
91792
+ onOrientationChange(orientationType);
91793
+ }
91794
+ }
91795
+ function handleResizeForQuery(e) {
91796
+ let orientation;
91797
+ if (e.matches) {
91798
+ orientation = MODE.PORTRAIT;
91799
+ } else {
91800
+ orientation = MODE.LANDSCAPE;
91801
+ }
91802
+ setCurOrientation(orientation);
91803
+ if (typeof onOrientationChange === 'function') {
91804
+ onOrientationChange(orientation);
91805
+ }
91806
+ }
91807
+ if (screen.orientation) {
91808
+ screen.orientation.addEventListener('change', handleResizeForScreen);
91809
+ } else {
91810
+ // screen.orientation only available on ios > 16.4
91811
+ // fallback to window.matchMedia
91812
+ portraitQuery.current.addEventListener('change', handleResizeForQuery);
91813
+ }
91814
+ return ()=>{
91815
+ if (screen.orientation) {
91816
+ screen.orientation.removeEventListener('change', handleResizeForScreen);
91817
+ } else {
91818
+ // eslint-disable-next-line react-hooks/exhaustive-deps
91819
+ portraitQuery.current.removeEventListener('change', handleResizeForQuery);
91820
+ }
91821
+ };
91822
+ }, [
91823
+ onOrientationChange
91824
+ ]);
91825
+ return libExports.isMobile ? {
91826
+ curOrientation,
91827
+ initOrientation: initOrientation.current
91828
+ } : {
91829
+ curOrientation: MODE.DESKTOP
91830
+ };
91831
+ };
91832
+
91833
+ /**
91834
+ * Custom hook to delay rendering when transitioning from hidden to visible state.
91835
+ * Useful for waiting for browser dimension updates after orientation changes.
91836
+ *
91837
+ * @param params - Hook parameters
91838
+ * @param params.isVisible - Whether the component is currently visible
91839
+ * @param params.enableDelay - Whether to apply delay logic for show transitions
91840
+ * @param params.delayMs - Delay in milliseconds before showing (default: 500)
91841
+ * @returns Delayed visibility state
91842
+ */ function useDelayedRender({ isVisible, enableDelay, delayMs = 500 }) {
91843
+ const [isVisibleDelayed, setIsVisibleDelayed] = reactExports.useState(isVisible);
91844
+ const prevIsVisibleRef = reactExports.useRef(isVisible);
91845
+ const timeoutRef = reactExports.useRef(null);
91846
+ reactExports.useEffect(()=>{
91847
+ const prevIsVisible = prevIsVisibleRef.current;
91848
+ // When delay is disabled, always sync immediately
91849
+ if (!enableDelay) {
91850
+ setIsVisibleDelayed(isVisible);
91851
+ prevIsVisibleRef.current = isVisible;
91852
+ return undefined;
91853
+ }
91854
+ // Handle transitions when delay is enabled
91855
+ const isTransitionToShow = !prevIsVisible && isVisible;
91856
+ const isTransitionToHide = prevIsVisible && !isVisible;
91857
+ if (isTransitionToShow) {
91858
+ // Delay showing when transitioning from hidden to visible
91859
+ timeoutRef.current = setTimeout(()=>{
91860
+ setIsVisibleDelayed(true);
91861
+ }, delayMs);
91862
+ } else if (isTransitionToHide) {
91863
+ // Immediately hide and cancel pending show
91864
+ if (timeoutRef.current) {
91865
+ clearTimeout(timeoutRef.current);
91866
+ timeoutRef.current = null;
91867
+ }
91868
+ setIsVisibleDelayed(false);
91869
+ }
91870
+ prevIsVisibleRef.current = isVisible;
91871
+ return ()=>{
91872
+ if (timeoutRef.current) {
91873
+ clearTimeout(timeoutRef.current);
91874
+ }
91875
+ };
91876
+ }, [
91877
+ isVisible,
91878
+ enableDelay,
91879
+ delayMs
91880
+ ]);
91881
+ return isVisibleDelayed;
91882
+ }
91883
+
91884
+ const PopupContent$1 = dt$1.div`
91885
+ text-align: center;
91886
+ font-size: 20px;
91887
+ font-weight: 600;
91888
+ `;
91889
+ const ChildrenWrapper$1 = dt$1.div`
91890
+ width: 100%;
91891
+ height: 100%;
91892
+ opacity: ${({ $showChildren })=>$showChildren ? 1 : 0};
91893
+ `;
91894
+ const defaultPreferredOrientations = [
91895
+ MODE.PORTRAIT,
91896
+ MODE.DESKTOP
91897
+ ];
91898
+ function OrientationDetectionV2({ onOrientationChange = noop$1, unmountOnHidden = false, remountDelayMs = 500, preferredOrientations = defaultPreferredOrientations, children }) {
91899
+ const t = gB();
91900
+ const { curOrientation } = useDetectOrientation(onOrientationChange);
91901
+ const hasCorrectOrientation = preferredOrientations.includes(curOrientation);
91902
+ const isVisible = useDelayedRender({
91903
+ isVisible: hasCorrectOrientation,
91904
+ enableDelay: unmountOnHidden,
91905
+ delayMs: remountDelayMs
91906
+ });
91907
+ const shouldMountChildrenOnDom = unmountOnHidden ? isVisible : true;
91908
+ return /*#__PURE__*/ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, {
91909
+ children: [
91910
+ !preferredOrientations.includes(curOrientation) && /*#__PURE__*/ jsxRuntimeExports.jsx(PopupComponent, {
91911
+ open: true,
91912
+ children: /*#__PURE__*/ jsxRuntimeExports.jsx(PopupContent$1, {
91913
+ children: t('wrong_orientation')
91914
+ })
91915
+ }),
91916
+ shouldMountChildrenOnDom && /*#__PURE__*/ jsxRuntimeExports.jsx(ChildrenWrapper$1, {
91917
+ $showChildren: hasCorrectOrientation,
91918
+ children: children
91919
+ })
91920
+ ]
91921
+ });
91922
+ }
91923
+
91924
+ const PopupContent = dt$1.div`
91925
+ text-align: center;
91926
+ font-size: 20px;
91927
+ font-weight: 600;
91928
+ `;
91929
+ const ChildrenWrapper = dt$1.div`
91930
+ width: 100%;
91931
+ height: 100%;
91932
+ opacity: ${({ showChildren })=>showChildren ? 1 : 0};
91933
+ `;
91934
+ // eslint-disable-next-line react/require-default-props
91935
+ function OrientationDetectionV1({ onOrientationChange, unmountOnHidden, children }) {
91936
+ const t = gB();
91937
+ const { curOrientation } = useDetectOrientation(onOrientationChange);
91938
+ const shouldShowChildren = curOrientation === MODE.PORTRAIT || curOrientation === MODE.DESKTOP;
91939
+ return /*#__PURE__*/ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, {
91940
+ children: [
91941
+ curOrientation === MODE.LANDSCAPE && /*#__PURE__*/ jsxRuntimeExports.jsx(PopupComponent, {
91942
+ open: true,
91943
+ children: /*#__PURE__*/ jsxRuntimeExports.jsx(PopupContent, {
91944
+ children: t('wrong_orientation')
91945
+ })
91946
+ }),
91947
+ (unmountOnHidden ? shouldShowChildren : true) && /*#__PURE__*/ jsxRuntimeExports.jsx(ChildrenWrapper, {
91948
+ showChildren: shouldShowChildren,
91949
+ children: children
91950
+ })
91951
+ ]
91952
+ });
91953
+ }
91954
+ OrientationDetectionV1.defaultProps = {
91955
+ onOrientationChange: ()=>{},
91956
+ unmountOnHidden: false
91957
+ };
91958
+ OrientationDetectionV1.propTypes = {
91959
+ onOrientationChange: PropTypes.func,
91960
+ unmountOnHidden: PropTypes.bool
91961
+ };
91962
+
91963
+ function OrientationDetection({ version = 'v1', children, ...rest }) {
91964
+ if (version === 'v2') {
91965
+ return /*#__PURE__*/ jsxRuntimeExports.jsx(OrientationDetectionV2, {
91966
+ ...rest,
91967
+ children: children
91968
+ });
91969
+ }
91970
+ return /*#__PURE__*/ jsxRuntimeExports.jsx(OrientationDetectionV1, {
91971
+ ...rest,
91972
+ children: children
91973
+ });
91974
+ }
91975
+
91924
91976
  // eslint-disable-next-line react/require-default-props
91925
91977
  const FlashLiveness = (props)=>{
91926
91978
  const { apiCredentials, outputEncryptionSettings, mode } = props;
91927
- return /*#__PURE__*/ jsxRuntimeExports.jsx(ApiClientProvider, {
91928
- apiCredentials: apiCredentials,
91929
- children: /*#__PURE__*/ jsxRuntimeExports.jsx(FlashModeProvider, {
91930
- flashMode: mode,
91931
- children: /*#__PURE__*/ jsxRuntimeExports.jsx(OutputEncryptionProvider, {
91932
- settings: outputEncryptionSettings,
91933
- children: /*#__PURE__*/ jsxRuntimeExports.jsx(FlashLivenessContainer, {
91934
- ...props
91979
+ return /*#__PURE__*/ jsxRuntimeExports.jsx(OrientationDetection, {
91980
+ version: "v2",
91981
+ unmountOnHidden: true,
91982
+ children: /*#__PURE__*/ jsxRuntimeExports.jsx(ApiClientProvider, {
91983
+ apiCredentials: apiCredentials,
91984
+ children: /*#__PURE__*/ jsxRuntimeExports.jsx(FlashModeProvider, {
91985
+ flashMode: mode,
91986
+ children: /*#__PURE__*/ jsxRuntimeExports.jsx(OutputEncryptionProvider, {
91987
+ settings: outputEncryptionSettings,
91988
+ children: /*#__PURE__*/ jsxRuntimeExports.jsx(FlashLivenessContainer, {
91989
+ ...props
91990
+ })
91935
91991
  })
91936
91992
  })
91937
91993
  })
@@ -110650,13 +110706,11 @@
110650
110706
  }
110651
110707
  return apiClient.detectIDTampering(payload);
110652
110708
  }
110653
- async function readIdCard({ cardType, apiClient, frontCardId, backCardId, isCapturingFrontSide, qrImageId }) {
110709
+ async function readIdCard({ cardType, apiClient, cardImageId, qrImageId }) {
110654
110710
  const payload = {
110655
110711
  card_type: cardType,
110656
- image1: isCapturingFrontSide ? {
110657
- id: frontCardId
110658
- } : {
110659
- id: backCardId
110712
+ image1: {
110713
+ id: cardImageId
110660
110714
  }
110661
110715
  };
110662
110716
  if (qrImageId) {
@@ -110669,10 +110723,6 @@
110669
110723
  return apiClient.readIDCard(payload);
110670
110724
  }
110671
110725
  async function handleApiCheck({ image, frontCardId: existingFrontCardId, qrImageId: existingQRImageId, onError, recordedVideos, apiClient, cardType, cardSide, qrScannedResult, outputEncryptionSettings, enabledServices, fullVideo, capturingVideo, previousCapturingVideoId, previousFullVideoId }) {
110672
- if (cardSide === IDCardSide$2.BACK && !existingFrontCardId) {
110673
- onError(Errors$3.missing_front_id_card);
110674
- return;
110675
- }
110676
110726
  const uploadPromises = [
110677
110727
  uploadIdCard({
110678
110728
  image,
@@ -110712,15 +110762,6 @@
110712
110762
  }
110713
110763
  const imageId = uploadIdCardResult.data.image_id;
110714
110764
  const qrImageId = uploadQrResult?.data?.image_id || existingQRImageId;
110715
- let frontCardId;
110716
- let backCardId;
110717
- const isCapturingFrontSide = cardSide === IDCardSide$2.FRONT;
110718
- if (isCapturingFrontSide) {
110719
- frontCardId = imageId;
110720
- } else {
110721
- frontCardId = existingFrontCardId;
110722
- backCardId = imageId;
110723
- }
110724
110765
  const sanityResult = {
110725
110766
  data: null
110726
110767
  };
@@ -110746,9 +110787,7 @@
110746
110787
  const result = await readIdCard({
110747
110788
  cardType,
110748
110789
  apiClient,
110749
- frontCardId,
110750
- backCardId,
110751
- isCapturingFrontSide,
110790
+ cardImageId: imageId,
110752
110791
  qrImageId
110753
110792
  });
110754
110793
  if (result.errors) {
@@ -110766,6 +110805,20 @@
110766
110805
  data: null
110767
110806
  };
110768
110807
  if (enabledServices?.enableDetectIDCardTampering) {
110808
+ // Detect ID Tampering requires front ID card image
110809
+ if (cardSide === IDCardSide$2.BACK && !existingFrontCardId) {
110810
+ onError(Errors$3.missing_front_id_card);
110811
+ return;
110812
+ }
110813
+ let frontCardId;
110814
+ let backCardId;
110815
+ const isCapturingFrontSide = cardSide === IDCardSide$2.FRONT;
110816
+ if (isCapturingFrontSide) {
110817
+ frontCardId = imageId;
110818
+ } else {
110819
+ frontCardId = existingFrontCardId;
110820
+ backCardId = imageId;
110821
+ }
110769
110822
  const result = await detectIDTampering({
110770
110823
  apiClient,
110771
110824
  cardType,
@@ -110805,8 +110858,8 @@
110805
110858
  const { Errors: Errors$2 } = ra$1;
110806
110859
  // eslint-disable-next-line react/require-default-props
110807
110860
  const ReadIDCardWithApiCall = ({ readIDCardUIOnlyComponent: ReadIDCardUIOnly, ...props })=>{
110808
- const { onError: onErrorFromProp, onStepDone: onStepDoneFromProp, apiCredentials, logCredentials, outputEncryptionSettings, serviceSettings, flowId, ...rest } = props;
110809
- const [clientSettings, setClientSettings] = reactExports.useState(null);
110861
+ const { onError: onErrorFromProp, onStepDone: onStepDoneFromProp, apiCredentials, logCredentials, outputEncryptionSettings, serviceSettings, flowId, clientSettings: propClientSettings, ...rest } = props;
110862
+ const [clientSettings, setClientSettings] = reactExports.useState(propClientSettings);
110810
110863
  const [isClientSettingsFetched, setIsClientSettingsFetched] = reactExports.useState(false);
110811
110864
  const { apiClient } = fU.useApiClient({
110812
110865
  apiCredentials,
@@ -110970,7 +111023,7 @@
110970
111023
  onStepDoneWithBilling,
110971
111024
  outputEncryptionSettings
110972
111025
  ]);
110973
- if (!isClientSettingsFetched) {
111026
+ if (enabledServices.enableGetClientSettings && !isClientSettingsFetched) {
110974
111027
  return null;
110975
111028
  }
110976
111029
  return /*#__PURE__*/ jsxRuntimeExports.jsx(dV.LicenseProvider, {
@@ -111001,7 +111054,8 @@
111001
111054
  outputEncryptionSettings: PropTypes.shape({}),
111002
111055
  readIDCardUIOnlyComponent: PropTypes.func,
111003
111056
  serviceSettings: PropTypes.shape({}),
111004
- flowId: PropTypes.string
111057
+ flowId: PropTypes.string,
111058
+ clientSettings: PropTypes.shape({})
111005
111059
  };
111006
111060
  ReadIDCardWithApiCall.defaultProps = {
111007
111061
  onError: ()=>{},
@@ -111027,7 +111081,8 @@
111027
111081
  enableDetectIDCardTampering: true,
111028
111082
  enableReadIDCardInfo: true
111029
111083
  },
111030
- flowId: ''
111084
+ flowId: '',
111085
+ clientSettings: null
111031
111086
  };
111032
111087
 
111033
111088
  /**
@@ -113619,7 +113674,7 @@
113619
113674
  };
113620
113675
  };
113621
113676
 
113622
- const defaultAssetRoot = "https://vision-cdn.trustingsocial.com/tvweb-sdk/0.0.0-beta.20260106-111700/assets";
113677
+ const defaultAssetRoot = "https://vision-cdn.trustingsocial.com/tvweb-sdk/0.0.0-beta.20260116-155038/assets";
113623
113678
  class TVWebSDK extends gU {
113624
113679
  constructor(props){
113625
113680
  super({