@unvired/turboforms-embed-sdk 2.0.82 → 2.0.83

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.
@@ -30017,8 +30017,8 @@ span.flatpickr-weekday {
30017
30017
  border-color: var(--tf-primary-color) !important;
30018
30018
  box-shadow: 0 0 0 1px rgba(9, 95, 23, 0.1) !important;
30019
30019
  }</style>
30020
- <style>.tf-embed-sdk .btn:not(.formio-button-remove-row):not(.choices__button):not(.footer-btn),
30021
- .tf-embed-sdk button:not(.formio-button-remove-row):not(.choices__button):not(.footer-btn) {
30020
+ <style>.tf-embed-sdk .btn:not(.formio-button-remove-row):not(.choices__button):not(.footer-btn):not(.tf-tabs-toggle):not(.tf-vertical-tabs-toggle):not(.tf-tabs-scroll-btn),
30021
+ .tf-embed-sdk button:not(.formio-button-remove-row):not(.choices__button):not(.footer-btn):not(.tf-tabs-toggle):not(.tf-vertical-tabs-toggle):not(.tf-tabs-scroll-btn) {
30022
30022
  font-family: var(--tf-app-font-family) !important;
30023
30023
  font-weight: 400 !important;
30024
30024
  background-color: var(--tf-primary-color) !important;
@@ -30027,8 +30027,8 @@ span.flatpickr-weekday {
30027
30027
  border-radius: 8px !important;
30028
30028
  font-size: var(--tf-app-font-size-base);
30029
30029
  }
30030
- .tf-embed-sdk .btn:hover:not(.formio-button-remove-row):not(.choices__button):not(.footer-btn),
30031
- .tf-embed-sdk button:hover:not(.formio-button-remove-row):not(.choices__button):not(.footer-btn) {
30030
+ .tf-embed-sdk .btn:hover:not(.formio-button-remove-row):not(.choices__button):not(.footer-btn):not(.tf-tabs-toggle):not(.tf-vertical-tabs-toggle):not(.tf-tabs-scroll-btn),
30031
+ .tf-embed-sdk button:hover:not(.formio-button-remove-row):not(.choices__button):not(.footer-btn):not(.tf-tabs-toggle):not(.tf-vertical-tabs-toggle):not(.tf-tabs-scroll-btn) {
30032
30032
  filter: brightness(1.1) !important;
30033
30033
  }
30034
30034
  .tf-embed-sdk .formio-button-remove-row {
@@ -30292,12 +30292,12 @@ span.flatpickr-weekday {
30292
30292
  }
30293
30293
  }
30294
30294
  .tf-embed-sdk .formio-component-columns label:not(.custom-control-label):not(.table label) {
30295
- display: inline-flex !important;
30296
- align-items: center !important;
30297
- max-width: 100% !important;
30298
- overflow: visible !important;
30295
+ display: inline-block !important;
30296
+ max-width: calc(100% - 16px) !important;
30297
+ overflow: hidden !important;
30299
30298
  text-overflow: ellipsis !important;
30300
30299
  white-space: nowrap !important;
30300
+ vertical-align: middle !important;
30301
30301
  }
30302
30302
  .tf-embed-sdk .formio-component-columns label [ref=tooltip] {
30303
30303
  flex-shrink: 0 !important;
@@ -30686,10 +30686,17 @@ span.flatpickr-weekday {
30686
30686
  background-color 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
30687
30687
  background: transparent !important;
30688
30688
  color: #64748b !important;
30689
- display: flex !important;
30690
- align-items: center !important;
30691
- line-height: normal !important;
30689
+ font-size: var(--tf-app-font-size-base) !important;
30690
+ display: inline-block !important;
30691
+ max-width: calc(100% - 24px) !important;
30692
+ overflow: hidden !important;
30693
+ text-overflow: ellipsis !important;
30692
30694
  white-space: nowrap !important;
30695
+ line-height: normal !important;
30696
+ }
30697
+ .tf-embed-sdk .formio-component-select > .col-form-label,
30698
+ .tf-embed-sdk .formio-component-barcodeselect > .col-form-label {
30699
+ max-width: calc(100% - 36px) !important;
30693
30700
  }
30694
30701
  .tf-embed-sdk .col-form-label [ref=tooltip],
30695
30702
  .tf-embed-sdk .col-form-label .bi-question-circle,
@@ -30763,7 +30770,6 @@ span.flatpickr-weekday {
30763
30770
  .tf-embed-sdk .formio-component-tags .form-control,
30764
30771
  .tf-embed-sdk .formio-component-barcodeselect .form-control {
30765
30772
  min-height: 2.6rem !important;
30766
- padding-bottom: 0px !important;
30767
30773
  }
30768
30774
  .tf-embed-sdk .formio-component-textarea .form-control,
30769
30775
  .tf-embed-sdk .formio-component-textArea .form-control {
@@ -30930,7 +30936,7 @@ span.flatpickr-weekday {
30930
30936
  top: -8px !important;
30931
30937
  left: 12px !important;
30932
30938
  transform: translateY(0) !important;
30933
- font-size: calc(var(--tf-app-font-size-base) * 0.85) !important;
30939
+ font-size: var(--tf-app-font-size-base) !important;
30934
30940
  font-weight: 600 !important;
30935
30941
  color: var(--tf-text-override, var(--tf-app-floating-label-color)) !important;
30936
30942
  background: #ffffff !important;
@@ -30984,15 +30990,19 @@ span.flatpickr-weekday {
30984
30990
  .tf-embed-sdk .formio-component-select label:has(~ div .choices__list--single .choices__item:not(.choices__placeholder):not(:empty)),
30985
30991
  .tf-embed-sdk .formio-component-select:not(:has(.choices)):has(select option:checked:not([value=""]):not([value=" "])) > .col-form-label,
30986
30992
  .tf-embed-sdk .formio-component-select:not(:has(.choices)):has(select option:checked:not([value=""]):not([value=" "])) label {
30987
- top: -10px !important;
30993
+ top: -8px !important;
30988
30994
  left: 12px !important;
30989
30995
  transform: translateY(0) !important;
30990
- font-size: calc(var(--tf-app-font-size-base) * 0.85) !important;
30996
+ font-size: var(--tf-app-font-size-base) !important;
30991
30997
  font-weight: 600 !important;
30992
30998
  color: var(--tf-text-override, var(--tf-app-label-color)) !important;
30993
30999
  background: #ffffff !important;
30994
31000
  padding: 0 6px !important;
30995
31001
  z-index: 20 !important;
31002
+ max-width: calc(100% - 24px) !important;
31003
+ overflow: hidden !important;
31004
+ text-overflow: ellipsis !important;
31005
+ white-space: nowrap !important;
30996
31006
  }
30997
31007
  .tf-embed-sdk .formio-component-textfield:focus-within > .col-form-label,
30998
31008
  .tf-embed-sdk .formio-component-smartId:focus-within > .col-form-label,
@@ -31142,6 +31152,40 @@ span.flatpickr-weekday {
31142
31152
  .tf-embed-sdk.formio-dialog.formio-dialog-closing .col-form-label {
31143
31153
  opacity: 0 !important;
31144
31154
  transition: none !important;
31155
+ }
31156
+ @media (max-width: 480px) {
31157
+ .tf-embed-sdk .col-form-label {
31158
+ max-width: calc(100% - 20px) !important;
31159
+ }
31160
+ }
31161
+ @media (max-width: 360px) {
31162
+ .tf-embed-sdk .col-form-label {
31163
+ left: 8px !important;
31164
+ max-width: calc(100% - 16px) !important;
31165
+ }
31166
+ .tf-embed-sdk .formio-component-textfield > .col-form-label,
31167
+ .tf-embed-sdk .formio-component-smartId > .col-form-label,
31168
+ .tf-embed-sdk .formio-component-email > .col-form-label,
31169
+ .tf-embed-sdk .formio-component-password > .col-form-label,
31170
+ .tf-embed-sdk .formio-component-number > .col-form-label,
31171
+ .tf-embed-sdk .formio-component-phoneNumber > .col-form-label,
31172
+ .tf-embed-sdk .formio-component-textarea > .col-form-label,
31173
+ .tf-embed-sdk .formio-component-datetime > .col-form-label,
31174
+ .tf-embed-sdk .formio-component-dateTime > .col-form-label,
31175
+ .tf-embed-sdk .formio-component-time > .col-form-label,
31176
+ .tf-embed-sdk .formio-component-day > .col-form-label,
31177
+ .tf-embed-sdk .formio-component-currency > .col-form-label,
31178
+ .tf-embed-sdk .formio-component-select > .col-form-label,
31179
+ .tf-embed-sdk .formio-component-tags > .col-form-label,
31180
+ .tf-embed-sdk .formio-component-barcodeselect > .col-form-label,
31181
+ .tf-embed-sdk .formio-component-address > .col-form-label,
31182
+ .tf-embed-sdk .formio-component-location > .col-form-label,
31183
+ .tf-embed-sdk .formio-component-barcode .col-form-label,
31184
+ .tf-embed-sdk .formio-component-barcodeselect .col-form-label,
31185
+ .tf-embed-sdk .formio-component-url .col-form-label,
31186
+ .tf-embed-sdk .formio-component-website .col-form-label {
31187
+ left: 8px !important;
31188
+ }
31145
31189
  }</style>
31146
31190
  <style>.tf-embed-sdk.formio-form,
31147
31191
  .tf-embed-sdk .formio-form,
@@ -31944,7 +31988,7 @@ span.flatpickr-weekday {
31944
31988
  padding: 0.8rem !important;
31945
31989
  width: 100% !important;
31946
31990
  }
31947
- .tf-embed-sdk .formio-component-datagrid td[data-label]::before {
31991
+ .tf-embed-sdk .formio-component-datagrid td[data-label]:not([data-label=""]):not(:has(.tf-datagrid-mobile-label))::before {
31948
31992
  content: attr(data-label);
31949
31993
  display: block;
31950
31994
  font-family: var(--tf-app-font-family) !important;
@@ -31954,6 +31998,34 @@ span.flatpickr-weekday {
31954
31998
  color: var(--tf-app-font-color, #333);
31955
31999
  text-align: left;
31956
32000
  }
32001
+ .tf-embed-sdk .formio-component-datagrid td[data-label=""]::before,
32002
+ .tf-embed-sdk .formio-component-datagrid td:has([ref=removeRow])::before,
32003
+ .tf-embed-sdk .formio-component-datagrid td:has(.formio-button-remove-row)::before,
32004
+ .tf-embed-sdk .formio-component-datagrid td:has(.tf-datagrid-mobile-label)::before {
32005
+ display: none !important;
32006
+ content: none !important;
32007
+ }
32008
+ .tf-embed-sdk .formio-component-datagrid .tf-datagrid-mobile-label,
32009
+ .tf-embed-sdk .formio-component-datagrid table.datagrid-table > tbody > tr > td .tf-datagrid-mobile-label,
32010
+ .tf-embed-sdk .formio-component-datagrid table.datagrid-table > tbody > tr > td > .formio-component > label:not(.form-check-label):not(.custom-control-label),
32011
+ .tf-embed-sdk .formio-component-datagrid table.datagrid-table > tbody > tr > td > .formio-component > .col-form-label:not(.form-check-label),
32012
+ .tf-embed-sdk .formio-component-datagrid table.datagrid-table > tbody > tr > td > .formio-component > [ref=label]:not(.form-check-label),
32013
+ .tf-embed-sdk .formio-component-datagrid table.datagrid-table > tbody > tr > td > .formio-form-group > label:not(.form-check-label):not(.custom-control-label),
32014
+ .tf-embed-sdk .formio-component-datagrid table.datagrid-table > tbody > tr > td > .formio-form-group > .col-form-label:not(.form-check-label),
32015
+ .tf-embed-sdk .formio-component-datagrid table.datagrid-table > tbody > tr > td > .formio-form-group > [ref=label]:not(.form-check-label) {
32016
+ display: block !important;
32017
+ visibility: visible !important;
32018
+ position: static !important;
32019
+ transform: none !important;
32020
+ font-family: var(--tf-app-font-family) !important;
32021
+ font-weight: 600 !important;
32022
+ font-size: var(--tf-app-font-size-base) !important;
32023
+ color: var(--tf-app-font-color, #333) !important;
32024
+ margin-bottom: 0.25rem !important;
32025
+ height: auto !important;
32026
+ min-height: auto !important;
32027
+ line-height: var(--tf-app-line-height, 1.4) !important;
32028
+ }
31957
32029
  }
31958
32030
  .tf-embed-sdk .formio-component-datagrid .row [class*=col-] {
31959
32031
  min-width: 60px !important;
@@ -31963,23 +32035,31 @@ span.flatpickr-weekday {
31963
32035
  .tf-embed-sdk .formio-component-datagrid .row [class*=col-]:has(.formio-component-select) {
31964
32036
  min-width: 50px !important;
31965
32037
  }
31966
- .tf-embed-sdk .formio-component-datagrid table.datagrid-table > tbody > tr > td > .formio-component > label:not(.form-check-label):not(.custom-control-label),
31967
- .tf-embed-sdk .formio-component-datagrid table.datagrid-table > tbody > tr > td > .formio-component > .col-form-label,
31968
- .tf-embed-sdk .formio-component-datagrid table.datagrid-table > tbody > tr > td > .formio-component > [ref=label],
31969
- .tf-embed-sdk .formio-component-datagrid table.datagrid-table > tbody > tr > td > .formio-component > .control-label--hidden,
31970
- .tf-embed-sdk .formio-component-datagrid table.datagrid-table > tbody > tr > td > .formio-form-group > label:not(.form-check-label):not(.custom-control-label),
31971
- .tf-embed-sdk .formio-component-datagrid table.datagrid-table > tbody > tr > td > .formio-form-group > .col-form-label,
31972
- .tf-embed-sdk .formio-component-datagrid table.datagrid-table > tbody > tr > td > .formio-form-group > [ref=label],
31973
- .tf-embed-sdk .formio-component-datagrid table.datagrid-table > tbody > tr > td > .formio-form-group > .control-label--hidden {
31974
- display: none !important;
31975
- margin: 0 !important;
31976
- padding: 0 !important;
31977
- height: 0 !important;
31978
- min-height: 0 !important;
31979
- line-height: 0 !important;
31980
- font-size: 0 !important;
31981
- border: none !important;
31982
- visibility: hidden !important;
32038
+ @media (min-width: 769px) {
32039
+ .tf-embed-sdk .formio-component-datagrid .tf-datagrid-mobile-label,
32040
+ .tf-embed-sdk .formio-component-datagrid table.datagrid-table > tbody > tr > td .tf-datagrid-mobile-label,
32041
+ .tf-embed-sdk .formio-component-datagrid table.datagrid-table > tbody > tr > td > .formio-component > label:not(.form-check-label):not(.custom-control-label),
32042
+ .tf-embed-sdk .formio-component-datagrid table.datagrid-table > tbody > tr > td > .formio-component > .col-form-label,
32043
+ .tf-embed-sdk .formio-component-datagrid table.datagrid-table > tbody > tr > td > .formio-component > [ref=label],
32044
+ .tf-embed-sdk .formio-component-datagrid table.datagrid-table > tbody > tr > td > .formio-component > .control-label--hidden,
32045
+ .tf-embed-sdk .formio-component-datagrid table.datagrid-table > tbody > tr > td > .formio-form-group > label:not(.form-check-label):not(.custom-control-label),
32046
+ .tf-embed-sdk .formio-component-datagrid table.datagrid-table > tbody > tr > td > .formio-form-group > .col-form-label,
32047
+ .tf-embed-sdk .formio-component-datagrid table.datagrid-table > tbody > tr > td > .formio-form-group > [ref=label],
32048
+ .tf-embed-sdk .formio-component-datagrid table.datagrid-table > tbody > tr > td > .formio-form-group > .control-label--hidden {
32049
+ display: none !important;
32050
+ margin: 0 !important;
32051
+ padding: 0 !important;
32052
+ height: 0 !important;
32053
+ min-height: 0 !important;
32054
+ line-height: 0 !important;
32055
+ font-size: 0 !important;
32056
+ border: none !important;
32057
+ visibility: hidden !important;
32058
+ }
32059
+ }
32060
+ .tf-embed-sdk .formio-component-datagrid td .choices__list--single .choices__item {
32061
+ display: block !important;
32062
+ color: var(--tf-app-font-color, #1e293b) !important;
31983
32063
  }
31984
32064
  .tf-embed-sdk .formio-component-label-hidden > label.control-label--hidden,
31985
32065
  .tf-embed-sdk .formio-component-label-hidden > .control-label--hidden {
@@ -32008,14 +32088,113 @@ span.flatpickr-weekday {
32008
32088
  border-radius: 8px !important;
32009
32089
  overflow: hidden !important;
32010
32090
  }
32011
- .tf-embed-sdk .formio-component-tabs > .card > .card-header {
32091
+ .tf-embed-sdk .tf-tabs-scroll-btn {
32092
+ display: flex !important;
32093
+ align-items: center !important;
32094
+ justify-content: center !important;
32095
+ width: 28px !important;
32096
+ height: 28px !important;
32097
+ min-width: 28px !important;
32098
+ max-width: 28px !important;
32099
+ border-radius: 50% !important;
32100
+ border: 1px solid var(--tf-border-color, #cbd5e1) !important;
32012
32101
  background: #ffffff !important;
32013
- border-bottom: 0 !important;
32014
- padding: 0.5rem 1rem 0 !important;
32102
+ background-color: #ffffff !important;
32103
+ color: var(--tf-app-font-color, #475569) !important;
32104
+ cursor: pointer !important;
32105
+ flex-shrink: 0 !important;
32106
+ padding: 0 !important;
32107
+ margin: 0 4px !important;
32108
+ transition: all 0.2s ease !important;
32109
+ z-index: 2 !important;
32110
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08) !important;
32111
+ }
32112
+ .tf-embed-sdk .tf-tabs-scroll-btn:hover {
32113
+ background: #f1f5f9 !important;
32114
+ background-color: #f1f5f9 !important;
32115
+ color: var(--tf-primary-color, #2563eb) !important;
32116
+ border-color: var(--tf-primary-color, #2563eb) !important;
32117
+ transform: scale(1.08) !important;
32118
+ }
32119
+ .tf-embed-sdk .tf-tabs-scroll-btn:disabled,
32120
+ .tf-embed-sdk .tf-tabs-scroll-btn.tf-scroll-disabled {
32121
+ opacity: 0.25 !important;
32122
+ cursor: not-allowed !important;
32123
+ transform: none !important;
32124
+ pointer-events: none !important;
32015
32125
  }
32016
- .tf-embed-sdk .formio-component-tabs > .card.card-vertical > .card-header {
32017
- padding: 1rem 0 !important;
32018
- border-right: 1px solid var(--tf-border-color) !important;
32126
+ .tf-embed-sdk .tf-tabs-scroll-btn.tf-scroll-hidden {
32127
+ display: none !important;
32128
+ }
32129
+ @media (min-width: 769px) {
32130
+ .tf-embed-sdk .formio-component-tabs > .card:not(.card-vertical) > .card-header {
32131
+ background: #ffffff !important;
32132
+ border-bottom: 0 !important;
32133
+ padding: 0.4rem 0.5rem 0 !important;
32134
+ display: flex !important;
32135
+ align-items: center !important;
32136
+ position: relative !important;
32137
+ overflow: hidden !important;
32138
+ }
32139
+ .tf-embed-sdk .formio-component-tabs > .card:not(.card-vertical) > .card-header > .tab-component-tabs.nav {
32140
+ display: flex !important;
32141
+ flex-wrap: nowrap !important;
32142
+ overflow-x: auto !important;
32143
+ overflow-y: hidden !important;
32144
+ scrollbar-width: none !important;
32145
+ -ms-overflow-style: none !important;
32146
+ flex: 1 1 auto !important;
32147
+ margin-bottom: 0 !important;
32148
+ gap: 0.5rem !important;
32149
+ border-bottom: none !important;
32150
+ scroll-behavior: smooth !important;
32151
+ }
32152
+ .tf-embed-sdk .formio-component-tabs > .card:not(.card-vertical) > .card-header > .tab-component-tabs.nav::-webkit-scrollbar {
32153
+ display: none !important;
32154
+ width: 0 !important;
32155
+ height: 0 !important;
32156
+ }
32157
+ .tf-embed-sdk .formio-component-tabs > .card:not(.card-vertical) .tab-component-tabs .nav-item {
32158
+ flex-shrink: 0 !important;
32159
+ white-space: nowrap !important;
32160
+ }
32161
+ .tf-embed-sdk .formio-component-tabs > .card:not(.card-vertical) .tab-component-tabs .nav-link {
32162
+ white-space: nowrap !important;
32163
+ padding: 0.5rem 0.5rem !important;
32164
+ }
32165
+ .tf-embed-sdk .formio-component-tabs > .card.card-vertical {
32166
+ display: flex !important;
32167
+ flex-direction: row !important;
32168
+ overflow: hidden !important;
32169
+ align-items: stretch !important;
32170
+ }
32171
+ .tf-embed-sdk .formio-component-tabs > .card.card-vertical > .card-header {
32172
+ padding: 0.5rem 0 !important;
32173
+ border-right: 1px solid var(--tf-border-color) !important;
32174
+ flex: 0 0 200px !important;
32175
+ width: 200px !important;
32176
+ min-width: 200px !important;
32177
+ max-width: 200px !important;
32178
+ box-sizing: border-box !important;
32179
+ overflow-x: hidden !important;
32180
+ overflow-y: auto !important;
32181
+ max-height: 75vh !important;
32182
+ scrollbar-width: thin !important;
32183
+ scrollbar-color: rgba(0, 0, 0, 0.2) transparent !important;
32184
+ }
32185
+ .tf-embed-sdk .formio-component-tabs > .card.card-vertical > .card-header::-webkit-scrollbar {
32186
+ width: 5px !important;
32187
+ }
32188
+ .tf-embed-sdk .formio-component-tabs > .card.card-vertical > .card-header::-webkit-scrollbar-track {
32189
+ background: transparent !important;
32190
+ }
32191
+ .tf-embed-sdk .formio-component-tabs > .card.card-vertical > .card-header::-webkit-scrollbar-thumb {
32192
+ background-color: rgba(0, 0, 0, 0.2) !important;
32193
+ border-radius: 4px !important;
32194
+ }
32195
+ .tf-embed-sdk .formio-component-tabs > .card.card-vertical > .card-header::-webkit-scrollbar-thumb:hover {
32196
+ background-color: rgba(0, 0, 0, 0.35) !important;
32197
+ }
32019
32198
  }
32020
32199
  .tf-embed-sdk .formio-component-tabs .card-header-tabs {
32021
32200
  margin-bottom: 0 !important;
@@ -32024,6 +32203,20 @@ span.flatpickr-weekday {
32024
32203
  border-bottom: none !important;
32025
32204
  gap: 0.5rem !important;
32026
32205
  }
32206
+ .tf-embed-sdk .formio-component-tabs .tab-component-tabs.nav-tabs-vertical,
32207
+ .tf-embed-sdk .nav-tabs-vertical {
32208
+ width: 100% !important;
32209
+ display: flex !important;
32210
+ flex-direction: column !important;
32211
+ border: none !important;
32212
+ border-right: 0 !important;
32213
+ border-bottom: 0 !important;
32214
+ }
32215
+ .tf-embed-sdk .formio-component-tabs .tab-component-tabs.nav-tabs-vertical .nav-item,
32216
+ .tf-embed-sdk .nav-tabs-vertical .nav-item {
32217
+ width: 100% !important;
32218
+ box-sizing: border-box !important;
32219
+ }
32027
32220
  .tf-embed-sdk .formio-component-tabs .tab-component-tabs .nav-link {
32028
32221
  color: var(--tf-app-font-color) !important;
32029
32222
  font-weight: var(--tf-app-font-weight) !important;
@@ -32036,9 +32229,16 @@ span.flatpickr-weekday {
32036
32229
  }
32037
32230
  .tf-embed-sdk .formio-component-tabs .tab-component-tabs.nav-tabs-vertical .nav-link {
32038
32231
  border-bottom: none !important;
32039
- border-left: 2px solid transparent !important;
32040
- padding: 0.5rem 1rem !important;
32041
- text-align: left;
32232
+ border-left: 3px solid transparent !important;
32233
+ padding: 0.6rem 0.75rem !important;
32234
+ text-align: left !important;
32235
+ white-space: normal !important;
32236
+ word-break: break-word !important;
32237
+ overflow-wrap: break-word !important;
32238
+ width: 100% !important;
32239
+ box-sizing: border-box !important;
32240
+ display: block !important;
32241
+ line-height: 1.35 !important;
32042
32242
  }
32043
32243
  .tf-embed-sdk .formio-component-tabs .tab-component-tabs .nav-link:hover {
32044
32244
  color: var(--tf-primary-color) !important;
@@ -32068,6 +32268,228 @@ span.flatpickr-weekday {
32068
32268
  }
32069
32269
  .tf-embed-sdk .formio-component-tabs > .card.card-vertical > .tab-pane.card-body {
32070
32270
  border-top: none !important;
32271
+ flex: 1 1 0% !important;
32272
+ min-width: 0 !important;
32273
+ overflow: visible !important;
32274
+ padding: 0.75rem !important;
32275
+ }
32276
+ .tf-embed-sdk .formio-component-tabs > .card.card-vertical .row {
32277
+ margin-left: 0 !important;
32278
+ margin-right: 0 !important;
32279
+ }
32280
+ .tf-embed-sdk .formio-component-tabs > .card.card-vertical .row > [class*=col-] {
32281
+ padding-left: 0.25rem !important;
32282
+ padding-right: 0.25rem !important;
32283
+ }
32284
+ .tf-embed-sdk .tf-tabs-mobile-bar,
32285
+ .tf-embed-sdk .tf-vertical-tabs-mobile-bar {
32286
+ display: none !important;
32287
+ }
32288
+ .tf-embed-sdk .tf-tabs-backdrop,
32289
+ .tf-embed-sdk .tf-vertical-tabs-backdrop {
32290
+ display: none !important;
32291
+ }
32292
+ @keyframes tf-tab-overlay-fade {
32293
+ from {
32294
+ opacity: 0;
32295
+ transform: translateY(-8px);
32296
+ }
32297
+ to {
32298
+ opacity: 1;
32299
+ transform: translateY(0);
32300
+ }
32301
+ }
32302
+ @media (max-width: 768px) {
32303
+ .tf-embed-sdk .formio-component-tabs > .card,
32304
+ .tf-embed-sdk .card:has(.tf-tabs-mobile-bar),
32305
+ .tf-embed-sdk .card:has(.tf-vertical-tabs-mobile-bar) {
32306
+ position: relative !important;
32307
+ overflow: visible !important;
32308
+ }
32309
+ .tf-embed-sdk .formio-component-tabs > .card.card-vertical,
32310
+ .tf-embed-sdk .card.card-vertical:has(.tf-tabs-mobile-bar) {
32311
+ flex-direction: column !important;
32312
+ }
32313
+ .tf-embed-sdk .tf-tabs-mobile-bar,
32314
+ .tf-embed-sdk .tf-vertical-tabs-mobile-bar {
32315
+ display: flex !important;
32316
+ align-items: center !important;
32317
+ width: 100% !important;
32318
+ background: #ffffff !important;
32319
+ border-bottom: 1px solid var(--tf-border-color, #e2e8f0) !important;
32320
+ padding: 0.5rem 0.75rem !important;
32321
+ box-sizing: border-box !important;
32322
+ z-index: 5 !important;
32323
+ }
32324
+ .tf-embed-sdk .tf-tabs-toggle,
32325
+ .tf-embed-sdk .tf-vertical-tabs-toggle {
32326
+ display: flex !important;
32327
+ align-items: center !important;
32328
+ justify-content: space-between !important;
32329
+ width: 100% !important;
32330
+ background: #f8fafc !important;
32331
+ border: 1px solid var(--tf-border-color, #cbd5e1) !important;
32332
+ border-radius: 6px !important;
32333
+ padding: 0.5rem 0.75rem !important;
32334
+ color: var(--tf-app-font-color, #1e293b) !important;
32335
+ font-size: 0.875rem !important;
32336
+ font-weight: 600 !important;
32337
+ cursor: pointer !important;
32338
+ box-sizing: border-box !important;
32339
+ transition: all 0.2s ease !important;
32340
+ }
32341
+ .tf-embed-sdk .tf-tabs-toggle:hover,
32342
+ .tf-embed-sdk .tf-tabs-toggle:focus,
32343
+ .tf-embed-sdk .tf-vertical-tabs-toggle:hover,
32344
+ .tf-embed-sdk .tf-vertical-tabs-toggle:focus {
32345
+ background: #f1f5f9 !important;
32346
+ border-color: var(--tf-primary-color, #2563eb) !important;
32347
+ outline: none !important;
32348
+ }
32349
+ .tf-embed-sdk .tf-tabs-current-title,
32350
+ .tf-embed-sdk .tf-vertical-tabs-current-title {
32351
+ flex: 1 1 auto !important;
32352
+ text-align: left !important;
32353
+ margin: 0 0.5rem !important;
32354
+ overflow: hidden !important;
32355
+ text-overflow: ellipsis !important;
32356
+ white-space: nowrap !important;
32357
+ }
32358
+ .tf-embed-sdk .tf-tabs-toggle-icon,
32359
+ .tf-embed-sdk .tf-vertical-tabs-toggle-icon {
32360
+ display: flex !important;
32361
+ align-items: center !important;
32362
+ color: var(--tf-primary-color, #2563eb) !important;
32363
+ flex-shrink: 0 !important;
32364
+ }
32365
+ .tf-embed-sdk .tf-tabs-toggle-arrow,
32366
+ .tf-embed-sdk .tf-vertical-tabs-toggle-arrow {
32367
+ display: flex !important;
32368
+ align-items: center !important;
32369
+ color: #64748b !important;
32370
+ flex-shrink: 0 !important;
32371
+ transition: transform 0.2s ease !important;
32372
+ }
32373
+ .tf-embed-sdk .tf-tabs-overlay-open .tf-tabs-toggle-arrow,
32374
+ .tf-embed-sdk .tf-tabs-overlay-open .tf-vertical-tabs-toggle-arrow {
32375
+ transform: rotate(180deg) !important;
32376
+ }
32377
+ .tf-embed-sdk .formio-component-tabs > .card > .card-header,
32378
+ .tf-embed-sdk .card:has(.tf-tabs-mobile-bar) > .card-header,
32379
+ .tf-embed-sdk .card:has(.tf-vertical-tabs-mobile-bar) > .card-header {
32380
+ position: absolute !important;
32381
+ top: 3.25rem !important;
32382
+ left: 0.5rem !important;
32383
+ right: 0.5rem !important;
32384
+ max-width: calc(100% - 1rem) !important;
32385
+ width: calc(100% - 1rem) !important;
32386
+ min-width: 0 !important;
32387
+ flex: none !important;
32388
+ max-height: 65vh !important;
32389
+ overflow-y: auto !important;
32390
+ overflow-x: hidden !important;
32391
+ background: #ffffff !important;
32392
+ border: 1px solid var(--tf-border-color, #cbd5e1) !important;
32393
+ border-radius: 8px !important;
32394
+ box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.18), 0 8px 10px -6px rgba(0, 0, 0, 0.1) !important;
32395
+ z-index: 1050 !important;
32396
+ padding: 0.4rem 0 !important;
32397
+ display: none !important;
32398
+ scrollbar-width: thin !important;
32399
+ scrollbar-color: rgba(0, 0, 0, 0.2) transparent !important;
32400
+ }
32401
+ .tf-embed-sdk .formio-component-tabs > .card.tf-tabs-overlay-open > .card-header,
32402
+ .tf-embed-sdk .card:has(.tf-tabs-mobile-bar).tf-tabs-overlay-open > .card-header,
32403
+ .tf-embed-sdk .card:has(.tf-vertical-tabs-mobile-bar).tf-tabs-overlay-open > .card-header {
32404
+ display: block !important;
32405
+ animation: tf-tab-overlay-fade 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
32406
+ }
32407
+ .tf-embed-sdk .formio-component-tabs .tf-tabs-backdrop,
32408
+ .tf-embed-sdk .formio-component-tabs .tf-vertical-tabs-backdrop {
32409
+ position: fixed !important;
32410
+ top: 0 !important;
32411
+ left: 0 !important;
32412
+ width: 100vw !important;
32413
+ height: 100vh !important;
32414
+ background: rgba(0, 0, 0, 0.35) !important;
32415
+ z-index: 1040 !important;
32416
+ display: none !important;
32417
+ }
32418
+ .tf-embed-sdk .formio-component-tabs > .card.tf-tabs-overlay-open .tf-tabs-backdrop,
32419
+ .tf-embed-sdk .formio-component-tabs > .card.tf-tabs-overlay-open .tf-vertical-tabs-backdrop {
32420
+ display: block !important;
32421
+ }
32422
+ .tf-embed-sdk .formio-component-tabs .tab-component-tabs.nav {
32423
+ display: flex !important;
32424
+ flex-direction: column !important;
32425
+ width: 100% !important;
32426
+ gap: 0 !important;
32427
+ border: none !important;
32428
+ margin: 0 !important;
32429
+ padding: 0 !important;
32430
+ }
32431
+ .tf-embed-sdk .formio-component-tabs .tab-component-tabs .nav-item {
32432
+ width: 100% !important;
32433
+ box-sizing: border-box !important;
32434
+ margin: 0 !important;
32435
+ padding: 0 !important;
32436
+ }
32437
+ .tf-embed-sdk .formio-component-tabs .tab-component-tabs .nav-link {
32438
+ padding: 0.65rem 1rem !important;
32439
+ font-size: 0.875rem !important;
32440
+ border: none !important;
32441
+ border-bottom: 1px solid #f1f5f9 !important;
32442
+ border-left: 3px solid transparent !important;
32443
+ border-radius: 0 !important;
32444
+ white-space: normal !important;
32445
+ word-break: break-word !important;
32446
+ text-align: left !important;
32447
+ width: 100% !important;
32448
+ box-sizing: border-box !important;
32449
+ display: block !important;
32450
+ line-height: 1.35 !important;
32451
+ color: var(--tf-app-font-color, #1e293b) !important;
32452
+ background: transparent !important;
32453
+ }
32454
+ .tf-embed-sdk .formio-component-tabs .tab-component-tabs .nav-link:hover {
32455
+ background-color: rgba(0, 0, 0, 0.05) !important;
32456
+ }
32457
+ .tf-embed-sdk .formio-component-tabs .tab-component-tabs .nav-link.active,
32458
+ .tf-embed-sdk .formio-component-tabs .tab-component-tabs .nav-item.active .nav-link {
32459
+ background-color: var(--tf-primary-color) !important;
32460
+ color: var(--tf-secondary-color, #ffffff) !important;
32461
+ border-left-color: var(--tf-primary-color) !important;
32462
+ border-bottom-color: transparent !important;
32463
+ }
32464
+ .tf-embed-sdk .formio-component-tabs > .card > .tab-pane.card-body {
32465
+ width: 100% !important;
32466
+ padding: 0.75rem !important;
32467
+ flex: 1 1 auto !important;
32468
+ box-sizing: border-box !important;
32469
+ border-top: none !important;
32470
+ }
32471
+ .tf-embed-sdk .formio-component-tabs > .card .row > [class*=col-] {
32472
+ flex: 0 0 100% !important;
32473
+ max-width: 100% !important;
32474
+ width: 100% !important;
32475
+ }
32476
+ .tf-embed-sdk .tf-tabs-scroll-btn {
32477
+ display: none !important;
32478
+ }
32479
+ }
32480
+ @media (max-width: 360px) {
32481
+ .tf-embed-sdk .formio-component-tabs .tf-tabs-mobile-bar,
32482
+ .tf-embed-sdk .formio-component-tabs .tf-vertical-tabs-mobile-bar {
32483
+ padding: 0.4rem 0.5rem !important;
32484
+ }
32485
+ .tf-embed-sdk .formio-component-tabs .tf-tabs-toggle,
32486
+ .tf-embed-sdk .formio-component-tabs .tf-vertical-tabs-toggle {
32487
+ font-size: 0.8rem !important;
32488
+ padding: 0.4rem 0.5rem !important;
32489
+ }
32490
+ .tf-embed-sdk .formio-component-tabs > .card > .tab-pane.card-body {
32491
+ padding: 0.4rem 0.25rem !important;
32492
+ }
32071
32493
  }</style>
32072
32494
  <style>.tf-embed-sdk [ref=tooltip] {
32073
32495
  cursor: help !important;
@@ -32603,39 +33025,83 @@ span.flatpickr-weekday {
32603
33025
  .tf-embed-sdk .formio-component-htmlelement li {
32604
33026
  display: list-item !important;
32605
33027
  }</style>
32606
- <style>.tf-embed-sdk ul.breadcrumb,
33028
+ <style>.tf-embed-sdk nav[aria-label="Wizard navigation"],
33029
+ .tf-embed-sdk nav[ref*=wizard],
33030
+ .tf-embed-sdk nav[ref$=-header] {
33031
+ width: 100% !important;
33032
+ max-width: 100% !important;
33033
+ overflow-x: auto !important;
33034
+ overflow-y: hidden !important;
33035
+ -webkit-overflow-scrolling: touch;
33036
+ scrollbar-width: thin;
33037
+ scrollbar-color: rgba(148, 163, 184, 0.3) transparent;
33038
+ }
33039
+ .tf-embed-sdk ul.breadcrumb,
32607
33040
  .tf-embed-sdk ul.pagination {
32608
33041
  display: flex !important;
33042
+ flex-wrap: nowrap !important;
32609
33043
  justify-content: center !important;
33044
+ align-items: flex-start !important;
32610
33045
  background-color: transparent !important;
32611
- padding: 20px 0 !important;
33046
+ padding: 20px 24px !important;
32612
33047
  margin-bottom: 2.5rem !important;
32613
33048
  list-style: none !important;
32614
33049
  position: relative !important;
32615
33050
  border: none !important;
32616
33051
  counter-reset: step-counter !important;
32617
33052
  gap: 2rem !important;
33053
+ width: max-content !important;
33054
+ min-width: 100% !important;
33055
+ box-sizing: border-box !important;
33056
+ overflow-x: auto !important;
33057
+ overflow-y: hidden !important;
33058
+ -webkit-overflow-scrolling: touch;
33059
+ scrollbar-width: thin;
33060
+ scrollbar-color: rgba(148, 163, 184, 0.3) transparent;
33061
+ }
33062
+ .tf-embed-sdk nav[aria-label="Wizard navigation"]::-webkit-scrollbar,
33063
+ .tf-embed-sdk nav[ref*=wizard]::-webkit-scrollbar,
33064
+ .tf-embed-sdk ul.breadcrumb::-webkit-scrollbar,
33065
+ .tf-embed-sdk ul.pagination::-webkit-scrollbar {
33066
+ height: 4px;
33067
+ }
33068
+ .tf-embed-sdk nav[aria-label="Wizard navigation"]::-webkit-scrollbar-track,
33069
+ .tf-embed-sdk nav[ref*=wizard]::-webkit-scrollbar-track,
33070
+ .tf-embed-sdk ul.breadcrumb::-webkit-scrollbar-track,
33071
+ .tf-embed-sdk ul.pagination::-webkit-scrollbar-track {
33072
+ background: transparent;
33073
+ }
33074
+ .tf-embed-sdk nav[aria-label="Wizard navigation"]::-webkit-scrollbar-thumb,
33075
+ .tf-embed-sdk nav[ref*=wizard]::-webkit-scrollbar-thumb,
33076
+ .tf-embed-sdk ul.breadcrumb::-webkit-scrollbar-thumb,
33077
+ .tf-embed-sdk ul.pagination::-webkit-scrollbar-thumb {
33078
+ background-color: rgba(148, 163, 184, 0.3);
33079
+ border-radius: 4px;
32618
33080
  }
32619
33081
  .tf-embed-sdk ul.breadcrumb::before,
32620
33082
  .tf-embed-sdk ul.pagination::before {
32621
33083
  content: "" !important;
32622
33084
  position: absolute !important;
32623
33085
  top: 36px !important;
32624
- left: 10% !important;
32625
- right: 10% !important;
33086
+ left: 40px !important;
33087
+ right: 40px !important;
32626
33088
  height: 3px !important;
32627
33089
  background: #e2e8f0 !important;
32628
33090
  z-index: 1 !important;
33091
+ pointer-events: none !important;
32629
33092
  }
32630
33093
  .tf-embed-sdk ul.breadcrumb li.breadcrumb-item,
32631
33094
  .tf-embed-sdk ul.pagination li.page-item {
32632
- flex: 0 1 auto !important;
33095
+ flex: 0 0 auto !important;
32633
33096
  text-align: center !important;
32634
33097
  position: relative !important;
32635
33098
  z-index: 2 !important;
32636
33099
  padding: 0 !important;
32637
33100
  background: transparent !important;
32638
- min-width: 100px !important;
33101
+ min-width: 90px !important;
33102
+ max-width: 160px !important;
33103
+ word-break: break-word !important;
33104
+ scroll-snap-align: center;
32639
33105
  }
32640
33106
  .tf-embed-sdk ul.breadcrumb li.breadcrumb-item::before,
32641
33107
  .tf-embed-sdk ul.pagination li.page-item button::before {
@@ -32784,6 +33250,78 @@ span.flatpickr-weekday {
32784
33250
  padding: 0 !important;
32785
33251
  margin: 0 !important;
32786
33252
  overflow: hidden !important;
33253
+ }
33254
+ @media (max-width: 768px) {
33255
+ .tf-embed-sdk nav[aria-label="Wizard navigation"],
33256
+ .tf-embed-sdk nav[ref*=wizard],
33257
+ .tf-embed-sdk nav[ref$=-header] {
33258
+ padding: 0 4px !important;
33259
+ margin-bottom: 1.5rem !important;
33260
+ scroll-snap-type: x proximity;
33261
+ }
33262
+ .tf-embed-sdk ul.breadcrumb,
33263
+ .tf-embed-sdk ul.pagination {
33264
+ padding: 14px 16px !important;
33265
+ margin-bottom: 1.5rem !important;
33266
+ gap: 1.25rem !important;
33267
+ justify-content: center !important;
33268
+ justify-content: safe center !important;
33269
+ margin-left: auto !important;
33270
+ margin-right: auto !important;
33271
+ }
33272
+ .tf-embed-sdk ul.breadcrumb::before,
33273
+ .tf-embed-sdk ul.pagination::before {
33274
+ top: 28px !important;
33275
+ left: 24px !important;
33276
+ right: 24px !important;
33277
+ }
33278
+ .tf-embed-sdk ul.breadcrumb li.breadcrumb-item,
33279
+ .tf-embed-sdk ul.pagination li.page-item {
33280
+ min-width: 75px !important;
33281
+ max-width: 120px !important;
33282
+ }
33283
+ .tf-embed-sdk ul.breadcrumb li.breadcrumb-item::before,
33284
+ .tf-embed-sdk ul.pagination li.page-item button::before {
33285
+ width: 28px !important;
33286
+ height: 28px !important;
33287
+ font-size: 0.8rem !important;
33288
+ margin: 0 auto 8px !important;
33289
+ }
33290
+ .tf-embed-sdk ul.pagination li.page-item button.page-link,
33291
+ .tf-embed-sdk ul.breadcrumb li.breadcrumb-item a,
33292
+ .tf-embed-sdk ul.breadcrumb li.breadcrumb-item span,
33293
+ .tf-embed-sdk ul.pagination li.page-item button span {
33294
+ font-size: 0.8rem !important;
33295
+ line-height: 1.2 !important;
33296
+ }
33297
+ }
33298
+ @media (max-width: 480px) {
33299
+ .tf-embed-sdk ul.breadcrumb,
33300
+ .tf-embed-sdk ul.pagination {
33301
+ gap: 0.85rem !important;
33302
+ padding: 10px 12px !important;
33303
+ justify-content: center !important;
33304
+ justify-content: safe center !important;
33305
+ margin-left: auto !important;
33306
+ margin-right: auto !important;
33307
+ }
33308
+ .tf-embed-sdk ul.breadcrumb li.breadcrumb-item,
33309
+ .tf-embed-sdk ul.pagination li.page-item {
33310
+ min-width: 65px !important;
33311
+ max-width: 100px !important;
33312
+ }
33313
+ .tf-embed-sdk ul.breadcrumb li.breadcrumb-item::before,
33314
+ .tf-embed-sdk ul.pagination li.page-item button::before {
33315
+ width: 26px !important;
33316
+ height: 26px !important;
33317
+ font-size: 0.75rem !important;
33318
+ }
33319
+ .tf-embed-sdk ul.breadcrumb::before,
33320
+ .tf-embed-sdk ul.pagination::before {
33321
+ top: 23px !important;
33322
+ left: 20px !important;
33323
+ right: 20px !important;
33324
+ }
32787
33325
  }</style>
32788
33326
  <style>.tf-embed-sdk .component-modal-wrapper img,
32789
33327
  .tf-embed-sdk [ref=modalContent] img,
@@ -38315,14 +38853,14 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
38315
38853
  Expecting `+b.join(", ")+", got '"+(this.terminals_[y]||y)+"'":x="Parse error on line "+(o+1)+": Unexpected "+(y==1?"end of input":"'"+(this.terminals_[y]||y)+"'"),this.parseError(x,{text:this.lexer.match,token:this.terminals_[y]||y,line:this.lexer.yylineno,loc:E,expected:b})}if(v==3){if(y==J)throw new Error(x||"Parsing halted.");T=this.lexer.yyleng,_=this.lexer.yytext,o=this.lexer.yylineno,E=this.lexer.yylloc,y=Y()}for(;!(N.toString()in r[g]);){if(g===0)throw new Error(x||"Parsing halted.");H(1),g=a[a.length-1]}O=y==2?null:y,y=N,g=a[a.length-1],m=r[g]&&r[g][N],v=3}if(m[0]instanceof Array&&m.length>1)throw new Error("Parse Error: multiple actions possible at state: "+g+", token: "+y);switch(m[0]){case 1:a.push(y),f.push(this.lexer.yytext),l.push(this.lexer.yylloc),a.push(m[1]),y=null,O?(y=O,O=null):(T=this.lexer.yyleng,_=this.lexer.yytext,o=this.lexer.yylineno,E=this.lexer.yylloc,v>0&&v--);break;case 2:if(u=this.productions_[m[1]][1],k.$=f[f.length-u],k._$={first_line:l[l.length-(u||1)].first_line,last_line:l[l.length-1].last_line,first_column:l[l.length-(u||1)].first_column,last_column:l[l.length-1].last_column},W&&(k._$.range=[l[l.length-(u||1)].range[0],l[l.length-1].range[1]]),z=this.performAction.call(k,_,T,o,this.yy,m[1],f,l),typeof z!="undefined")return z;u&&(a=a.slice(0,-1*u*2),f=f.slice(0,-1*u),l=l.slice(0,-1*u)),a.push(this.productions_[m[1]][0]),f.push(k.$),l.push(k._$),h=r[a[a.length-2]][a[a.length-1]],a.push(h);break;case 3:return!0}}return!0}},e=function(){var i={EOF:1,parseError:function(s,a){if(this.yy.parser)this.yy.parser.parseError(s,a);else throw new Error(s)},setInput:function(s){return this._input=s,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var a=s.match(/(?:\r\n?|\n).*/g);return a?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),s},unput:function(s){var a=s.length,f=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a-1),this.offset-=a;var l=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),f.length-1&&(this.yylineno-=f.length-1);var r=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:f?(f.length===l.length?this.yylloc.first_column:0)+l[l.length-f.length].length-f[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-a]),this},more:function(){return this._more=!0,this},less:function(s){this.unput(this.match.slice(s))},pastInput:function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var s=this.pastInput(),a=new Array(s.length+1).join("-");return s+this.upcomingInput()+`
38316
38854
  `+a+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var s,a,f,l,r;this._more||(this.yytext="",this.match="");for(var _=this._currentRules(),o=0;o<_.length&&(f=this._input.match(this.rules[_[o]]),!(f&&(!a||f[0].length>a[0].length)&&(a=f,l=o,!this.options.flex)));o++);return a?(r=a[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+a[0].length},this.yytext+=a[0],this.match+=a[0],this.matches=a,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(a[0].length),this.matched+=a[0],s=this.performAction.call(this,this.yy,this,_[l],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s||void 0):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
38317
38855
  `+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var s=this.next();return typeof s!="undefined"?s:this.lex()},begin:function(s){this.conditionStack.push(s)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(s){this.begin(s)}};return i.options={},i.performAction=function(s,a,f,l){switch(f){case 0:return"*";case 1:return"/";case 2:return"-";case 3:return"+";case 4:return"^";case 5:return"(";case 6:return")";case 7:return",";case 8:return"==";case 9:return"!=";case 10:return"~=";case 11:return">=";case 12:return"<=";case 13:return"<";case 14:return">";case 15:return"notIn";case 16:return"and";case 17:return"or";case 18:return"not";case 19:return"in";case 20:return"of";case 21:return"if";case 22:return"then";case 23:return"else";case 24:return"mod";case 25:break;case 26:return"Number";case 27:return a.yytext=JSON.stringify({name:a.yytext,type:"unescaped"}),"Symbol";case 28:return a.yytext=JSON.stringify({name:s.buildString("'",a.yytext),type:"single-quoted"}),"Symbol";case 29:return a.yytext=JSON.stringify(s.buildString('"',a.yytext)),"String";case 30:return"%";case 31:return"?";case 32:return":";case 33:return"EndOfExpression"}},i.rules=[/^(?:\*)/,/^(?:\/)/,/^(?:-)/,/^(?:\+)/,/^(?:\^)/,/^(?:\()/,/^(?:\))/,/^(?:\,)/,/^(?:==)/,/^(?:\!=)/,/^(?:\~=)/,/^(?:>=)/,/^(?:<=)/,/^(?:<)/,/^(?:>)/,/^(?:not\s+in[^\w])/,/^(?:and[^\w])/,/^(?:or[^\w])/,/^(?:not[^\w])/,/^(?:in[^\w])/,/^(?:of[^\w])/,/^(?:if[^\w])/,/^(?:then[^\w])/,/^(?:else[^\w])/,/^(?:mod[^\w])/,/^(?:\s+)/,/^(?:[0-9]+(?:\.[0-9]+)?(?![0-9\.]))/,/^(?:[a-zA-Z$_][\.a-zA-Z0-9$_]*)/,/^(?:'(?:\\'|\\\\|[^'\\])*')/,/^(?:"(?:\\"|\\\\|[^"\\])*")/,/^(?:\%)/,/^(?:\?)/,/^(?::)/,/^(?:$)/],i.conditions={INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33],inclusive:!0}},i}();t.lexer=e;function n(){this.yy={}}return n.prototype=t,t.Parser=n,new n}(),a1=s1;s1.Parser;var c1=function(t){function e(n){var i;return U(this,e),i=R(this,e,["Unknown function: ".concat(n,"()")]),C(i,"I18N_STRING","UNKNOWN_FUNCTION"),i.functionName=n,i}return B(e,t),M(e)}(S(ReferenceError)),V=function(t){function e(n){var i;return U(this,e),i=R(this,e,["Property \u201C".concat(n,"\u201D does not exist.")]),C(i,"I18N_STRING","UNKNOWN_PROPERTY"),i.propertyName=n,i}return B(e,t),M(e)}(S(ReferenceError)),w1=function(t){function e(n){var i;return U(this,e),i=R(this,e,["Unknown option: ".concat(n)]),C(i,"I18N_STRING","UNKNOWN_OPTION"),i.keyName=n,i}return B(e,t),M(e)}(S(TypeError)),D=function(t){function e(n,i){var c;return U(this,e),c=R(this,e,["Expected a ".concat(n,", but got a ").concat(i," instead.")]),C(c,"I18N_STRING","UNEXPECTED_TYPE"),c.expectedType=n,c.recievedType=i,c}return B(e,t),M(e)}(S(TypeError)),K=function(t){function e(n){var i;return U(this,e),i=R(this,e,[n]),C(i,"I18N_STRING","INTERNAL"),i}return B(e,t),M(e)}(S(Error));function I(t,e){return P(t)==="object"||typeof t=="function"?Object.prototype.hasOwnProperty.call(t,e):!1}function _1(t,e){return(t%e+e)%e}function v1(t){if(P(t)!=="object")return t;if(t instanceof Number||t instanceof String||t instanceof Boolean)return t.valueOf()}function G(t){return Array.isArray(t)&&t.length===1&&(t=t[0]),v1(t)}function L(t){return t=G(t),t===void 0?"undefined":t===null?"null":t===!0?"true":t===!1?"false":typeof t=="number"?"number":typeof t=="string"?"text":P(t)!=="object"&&typeof t!="function"?"unknown type":Array.isArray(t)?"list":"object"}function d(t){if(t=G(t),typeof t=="number")return t;throw new D("number",L(t))}function u1(t){if(t=G(t),typeof t=="string")return t;throw new D("text",L(t))}function $(t){if(t=G(t),typeof t=="string"||typeof t=="number")return t;throw new D("text or number",L(t))}function x1(t){if(t=G(t),typeof t=="boolean")return t;throw new D("logical value (\u201Ctrue\u201D or \u201Cfalse\u201D)",L(t))}function t1(t){if(t==null)throw new D("list",L(t));return Array.isArray(t)?t:[t]}function e1(t){for(var e=Q(t),n=[];e.length;){var i=e.pop();Array.isArray(i)?e.push.apply(e,Q(i)):n.push(i)}return n.reverse()}var l1={isfn:function(e,n){return I(e,n)&&typeof e[n]=="function"},unknown:function(e){throw new c1(e)},coerceArray:t1,coerceNumber:d,coerceNumberOrString:$,coerceBoolean:x1,isSubset:function(e,n){var i=t1(e),c=t1(n);return i.every(function(s){return c.includes(s)})},warnDeprecated:function(){var t=3,e={ternary:0,modulo:0};return function(n,i){switch(n){case"ternary":if(e.ternary++>=t)break;console.warn("The use of ? and : as conditional operators has been deprecated in Filtrex v3 in favor of the if..then..else ternary operator. See issue #34 for more information.");break;case"modulo":if(e.modulo++>=t)break;console.warn("The use of '%' as a modulo operator has been deprecated in Filtrex v3 in favor of the 'mod' operator. You can use it like this: '3 mod 2 == 1'. See issue #48 for more information.");break}return i}}(),buildString:function(e,n){e=String(e)[0],n=String(n);var i="";if(n[0]!==e||n[n.length-1]!==e)throw new K("Unexpected internal error: String literal doesn't begin/end with the right quotation mark.");for(var c=1;c<n.length-1;c++)if(n[c]==="\\"){if(c++,c>=n.length-1)throw new K("Unexpected internal error: Unescaped backslash at the end of string literal.");if(n[c]==="\\")i+="\\";else if(n[c]===e)i+=e;else throw new K("Unexpected internal error: Invalid escaped character in string literal: ".concat(n[c]))}else{if(n[c]===e)throw new K("Unexpected internal error: String literal contains unescaped quotation mark.");i+=n[c]}return i},reduceRelation:function(e){for(var n=[],i=[],c=e1([e[0]]).join(""),s=0,a=1;a<e.length-1;a+=2){var f=e1([e[a+1]]).join(""),l="tmp".concat(s++);i.push('ops["'.concat(e[a],'"](').concat(c,", ").concat(l," = ").concat(f,")")),c=l,n.push(l)}return"(function(){ var ".concat(n.join(", "),"; return ").concat(i.join(" && "),";})()")}};a1.yy=Object.create(l1);function k1(t,e,n,i){return n==null?n:e(t)}function S1(t,e,n,i){if(i==="single-quoted")return e(t);var c=t.split("."),s=r1(c),a;try{for(s.s();!(a=s.n()).done;){var f,l=a.value;if(I((f=n)!==null&&f!==void 0?f:{},l))n=n[l];else throw new V(l)}}catch(r){s.e(r)}finally{s.f()}return n}function E1(t,e,n,i){if(n==null)return n;if(i==="single-quoted")return e(t);var c=t.split("."),s=r1(c),a;try{for(s.s();!(a=s.n()).done;){var f=a.value;if(n==null)return n;n=n[f]}}catch(l){s.e(l)}finally{s.f()}return n}function O1(t,e){var n;if(arguments.length>2)throw new TypeError("Too many arguments.");e=P(e)==="object"?e:{};for(var i=["extraFunctions","constants","customProp","operators"],c=e,s=c.extraFunctions,a=c.constants,f=c.customProp,l=c.operators,r=0,_=Object.keys(e);r<_.length;r++){var o=_[r];if(!i.includes(o))throw new w1(o)}var T={abs:Math.abs,ceil:Math.ceil,floor:Math.floor,log:Math.log,log2:Math.log2,log10:Math.log10,max:Math.max,min:Math.min,round:Math.round,sqrt:Math.sqrt,exists:function(u){return u!=null},empty:function(u){return u==null||u===""||Array.isArray(u)&&u.length===0}};if(s)for(var v=0,N=Object.keys(s);v<N.length;v++){var J=N[v];T[J]=s[J]}var E={"+":function(u,h){return $(u)+$(h)},"-":function(u,h){return h===void 0?-d(u):d(u)-d(h)},"*":function(u,h){return d(u)*d(h)},"/":function(u,h){return d(u)/d(h)},"^":function(u,h){return Math.pow(d(u),d(h))},mod:function(u,h){return _1(d(u),d(h))},"==":function(u,h){return u===h},"!=":function(u,h){return u!==h},"<":function(u,h){return d(u)<d(h)},"<=":function(u,h){return d(u)<=d(h)},">=":function(u,h){return d(u)>=d(h)},">":function(u,h){return d(u)>d(h)},"~=":function(u,h){return RegExp(u1(h)).test(u1(u))}};if(l)for(var W=0,H=Object.keys(l);W<H.length;W++){var Y=H[W];E[Y]=l[Y]}l=E,a=(n=a)!==null&&n!==void 0?n:{};var y=e1(a1.parse(t));y.unshift("return "),y.push(";");function O(p,u,h){if(I(u!=null?u:{},p))return u[p];throw new V(p)}function g(p){return function(h){if(I(p!=null?p:{},h))return p[h];throw new V(h)}}typeof f=="function"&&(O=function(u,h,b){return f(u,g(h),h,b)});function m(p){return function(h){for(var b=h.name,x=arguments.length,w=new Array(x>1?x-1:0),Z=1;Z<x;Z++)w[Z-1]=arguments[Z];if(I(p,b)&&typeof p[b]=="function")return p[b].apply(p,w);throw new c1(b)}}function z(p,u){var h=p.name,b=p.type;return b==="unescaped"&&I(a,h)?a[h]:O(h,u,b)}var k=new Function("call","ops","std","prop","data",y.join(""));return function(p){try{return k(m(T),l,l1,z,p)}catch(u){return u}}}return A.compileExpression=O1,A.useDotAccessOperator=S1,A.useDotAccessOperatorAndOptionalChaining=E1,A.useOptionalChaining=k1,Object.defineProperty(A,"__esModule",{value:!0}),A}({})})();</script>
38318
- <script>(function(){const b=typeof Formio!="undefined"?Formio:typeof window!="undefined"?window.Formio:void 0,O=typeof FormioUtils!="undefined"?FormioUtils:b?b.Utils:typeof window!="undefined"?window.FormioUtils:void 0,C=b&&b.Components&&b.Components.components?b.Components.components.list:class{static schema(){return{}}},D=O&&O.getRandomComponentId?O.getRandomComponentId:()=>Math.random().toString(36).substring(7),F=O&&O.boolValue?O.boolValue:V=>!!V,L=V=>!!V&&typeof V.then=="function";var E=window.platform==="web";class I extends C{static schema(...e){return C.schema({type:"select",label:"Select",key:"select",idPath:"id",data:{values:[{label:"",value:""}],json:"",url:"",resource:"",custom:""},clearOnRefresh:!1,limit:100,dataSrc:"values",valueProperty:"",lazyLoad:!0,filter:"",searchEnabled:!0,searchDebounce:.3,searchField:"",minSearch:0,readOnlyValue:!1,authenticate:!1,ignoreCache:!1,template:"<span>{{ item.label }}</span>",selectFields:"",searchThreshold:.3,uniqueOptions:!1,tableView:!0,fuseOptions:{include:"score",threshold:.3},indexeddb:{filter:{}},customOptions:{},useExactSearch:!1},...e)}static get builderInfo(){return{title:"Select",group:"basic",icon:"th-list",weight:70,documentation:"/userguide/#select",schema:I.schema()}}static get serverConditionSettings(){return SelectComponent.conditionOperatorsSettings}static get conditionOperatorsSettings(){return{...super.conditionOperatorsSettings,valueComponent(e){const t={...e,type:"select"};return isSelectResourceWithObjectValue(e)&&(t.reference=!1,t.onSetItems=`
38856
+ <script>(function(){const b=typeof Formio!="undefined"?Formio:typeof window!="undefined"?window.Formio:void 0,v=typeof FormioUtils!="undefined"?FormioUtils:b?b.Utils:typeof window!="undefined"?window.FormioUtils:void 0,C=b&&b.Components&&b.Components.components?b.Components.components.list:class{static schema(){return{}}},D=v&&v.getRandomComponentId?v.getRandomComponentId:()=>Math.random().toString(36).substring(7),F=v&&v.boolValue?v.boolValue:V=>!!V,L=V=>!!V&&typeof V.then=="function";var E=window.platform==="web";class I extends C{static schema(...e){return C.schema({type:"select",label:"Select",key:"select",idPath:"id",data:{values:[{label:"",value:""}],json:"",url:"",resource:"",custom:""},clearOnRefresh:!1,limit:100,dataSrc:"values",valueProperty:"",lazyLoad:!0,filter:"",searchEnabled:!0,searchDebounce:.3,searchField:"",minSearch:0,readOnlyValue:!1,authenticate:!1,ignoreCache:!1,template:"<span>{{ item.label }}</span>",selectFields:"",searchThreshold:.3,uniqueOptions:!1,tableView:!0,fuseOptions:{include:"score",threshold:.3},indexeddb:{filter:{}},customOptions:{},useExactSearch:!1},...e)}static get builderInfo(){return{title:"Select",group:"basic",icon:"th-list",weight:70,documentation:"/userguide/#select",schema:I.schema()}}static get serverConditionSettings(){return SelectComponent.conditionOperatorsSettings}static get conditionOperatorsSettings(){return{...super.conditionOperatorsSettings,valueComponent(e){const t={...e,type:"select"};return isSelectResourceWithObjectValue(e)&&(t.reference=!1,t.onSetItems=`
38319
38857
  var templateKeys = FormioUtils.getItemTemplateKeys(component.template) || [];
38320
38858
  items = _.map(items || [], i => {
38321
38859
  var item = {};
38322
38860
  _.each(templateKeys, k => _.set(item, k, _.get(i, k)));
38323
38861
  return item;
38324
38862
  })
38325
- `),t}}}static savedValueTypes(e){const{boolean:t,string:o,number:i,object:r,array:s}=componentValueTypes,{dataType:l,reference:a}=e,h=getComponentSavedTypes(e);return h||(a?[r]:l==="object"?[r,s]:componentValueTypes[l]?[componentValueTypes[l]]:[t,o,i,r,s])}init(){super.init(),this.templateData={},this.validators=(this.validators||[]).concat(["select","onlyAvailableItems"]);let e=[];const t=_.debounce((...o)=>(e=[],this.updateItems.apply(this,o)),100);this.triggerUpdate=(...o)=>(typeof this.itemsLoadedResolve=="function"&&this.itemsLoadedResolve(),this.itemsLoaded=new Promise(i=>{this.itemsLoadedResolve=i}),o.length&&(e=o),t(...e)),this.selectOptions=[],this.itemsFromUrl&&(this.isFromSearch=!1,this.searchServerCount=null,this.defaultServerCount=null,this.isScrollLoading=!1,this.searchDownloadedResources=[],this.defaultDownloadedResources=[]),this.activated=!1,this.itemsLoaded=new Promise(o=>{this.itemsLoadedResolve=o}),this.shouldPositionDropdown=this.hasDataGridAncestor(),this.isHtmlRenderMode()&&this.activate(),this.getTemplateKeys()}getTemplateKeys(){const e=this.component.template;this.templateKeys=this.options.readOnly&&e?FormioUtils.getItemTemplateKeys(e):[]}get dataReady(){return this.root&&this.root.submissionSet&&!this.attached?Promise.resolve():this.itemsLoaded}get defaultSchema(){return I.schema()}get emptyValue(){if(this.component.multiple)return[];if(this.component.dataSrc==="json"&&this.component.data.json){const e=this.component.data.json[0];let t;return this.valueProperty?t=_.get(e,this.valueProperty):t=e,t&&typeof t=="string"?"":{}}return this.valueProperty?"":{}}get valueProperty(){return this.component.valueProperty?this.component.valueProperty:this.component.dataSrc==="values"?"value":""}get inputInfo(){const e=super.elementInfo();return e.type="select",e.changeEvent="change",e}get isSelectResource(){return this.component.dataSrc==="resource"}get isSelectMaterdata(){return this.component.dataSrc==="masterdata"}get isSelectURL(){return this.component.dataSrc==="url"}get itemsFromUrl(){return this.isSelectResource||this.isSelectURL||this.isSelectMaterdata}get isInfiniteScrollProvided(){return this.itemsFromUrl}get shouldDisabled(){return super.shouldDisabled||this.parentDisabled}get shouldInitialLoad(){return this.component.widget==="html5"&&this.isEntireObjectDisplay()&&this.component.searchField&&this.dataValue?!1:super.shouldLoad}isEntireObjectDisplay(){return this.component.dataSrc==="resource"&&this.valueProperty==="data"}findMasterdataItem(e){if(!this.component.masterdata||e==null)return null;const t=String(e),o=this.component.valueProperty||this.valueProperty;return this.component.masterdata.find(i=>{if(!i||typeof i!="object")return!1;if(o){let s=_.get(i,o);if(s!=null&&String(s)===t||o.startsWith("data.")&&(s=_.get(i,o.replace(/^data\./,"")),s!=null&&String(s)===t)||i[o]!==void 0&&i[o]!==null&&String(i[o])===t)return!0}const r=i.data||i;for(const s of Object.keys(r))if((/id$/i.test(s)||s==="value"||s==="_id"||s==="id")&&r[s]!==void 0&&r[s]!==null&&String(r[s])===t)return!0;return!1})}selectValueAndLabel(e){if((typeof e=="string"||typeof e=="number")&&this.component.dataSrc==="masterdata"&&this.component.masterdata){const o=this.findMasterdataItem(e);o&&(e=o)}const t=this.getOptionValue(this.isEntireObjectDisplay()&&!this.itemValue(e)?e:this.itemValue(e));return{value:t,label:this.itemTemplate(this.isEntireObjectDisplay()&&!_.isObject(e.data)?{data:e}:e,t)}}itemTemplate(e,t){if(!_.isNumber(e)&&_.isEmpty(e))return"";if((typeof e=="string"||typeof e=="number")&&this.component.dataSrc==="masterdata"&&this.component.masterdata){const r=this.findMasterdataItem(e);r&&(e=r)}if(this.options.readOnly&&this.component.readOnlyValue&&!this.component.template&&!this.component.labelProperty)return this.itemValue(e);if(e&&!this.component.template){const r=e.label||e,s=typeof r=="string"?this.t(r,{_userInput:!0}):r;return this.sanitize(s,this.shouldSanitizeValue)}if(this.component.multiple&&_.isArray(this.dataValue)?this.dataValue.find(r=>t===r):this.dataValue===t){const r=this.selectData;if(r){const s=this.component.reference&&t&&(t._id?t._id.toString():t);(!this.templateData||!this.templateData[s])&&this.getOptionTemplate(e,t),this.component.multiple?r[s]&&(e=r[s]):e=r}}if(typeof e=="string"||typeof e=="number")return this.sanitize(this.t(e,{_userInput:!0}),this.shouldSanitizeValue);if(Array.isArray(e))return e.map(r=>typeof r=="string"||typeof r=="number"?this.sanitize(this.t(r,{_userInput:!0}),this.shouldSanitizeValue):r);if(e.data){const r=/item\.data\.\w*/g.test(this.component.template);e.data=this.isEntireObjectDisplay()&&_.isObject(e.data)&&!r?JSON.stringify(e.data):e.data}let o=e;typeof e=="object"&&e!==null&&!e.data&&(o=Object.assign({data:e},e));const i=this.sanitize(this.component.template?this.interpolate(this.component.template,{item:o}):e.label);if(i){const r=i.replace(/<\/?[^>]+(>|$)/g,"");let s;return this.i18next&&this.i18next.translator&&(s=this.i18next.translator),!r||s&&!this.t(r,{_userInput:!0})?void 0:s?i.replace(r,this.t(r,{_userInput:!0})):r}else return JSON.stringify(e)}addOption(e,t,o={},i=D()){if(_.isNil(t))return;const r=this.component.idPath?this.component.idPath.split(".").reduceRight((a,h)=>({[h]:a}),i):{},s=Object.assign({value:this.getOptionValue(e),label:t},r);if(!(this.component.uniqueOptions&&this.selectOptions.find(a=>_.isEqual(a.value,s.value)))&&(e&&this.selectOptions.push(s),this.refs.selectContainer&&this.component.widget==="html5")){s.value&&_.isObject(s.value)&&_.isEmpty(s.value)&&(s.value="");const a=document.createElement("div");a.innerHTML=this.sanitize(this.renderTemplate("selectOption",{selected:_.isEqual(this.getOptionValue(this.dataValue),s.value),option:s,attrs:o,id:i,useId:(this.valueProperty===""||this.isEntireObjectDisplay())&&_.isObject(e)&&i}),this.shouldSanitizeValue).trim(),s.element=a.firstChild,this.refs.selectContainer.appendChild(s.element)}}addValueOptions(e){e=e||[];let t=!1,o=this.dataValue;if(this.options.pdf&&!e.length&&this.component.dataSrc==="url"&&this.valueProperty&&(o=Array.isArray(o)?o.map(i=>_.set({},this.valueProperty,i)):_.set({},this.valueProperty,o)),!this.selectOptions.length){const i=Array.isArray(o)&&this.component.multiple?o:[o];t=this.addCurrentChoices(i,e),!t&&!this.component.multiple&&this.addPlaceholder()}return t}disableInfiniteScroll(){this.downloadedResources&&(this.downloadedResources.serverCount=this.downloadedResources.length,this.serverCount=this.downloadedResources.length)}setItems(e,t){if(logger.info(`[TF_SDK:171] \u2705 setItems() called for '${this.key}'. Items length:`,e?e.length:0,"fromSearch:",t),this.selectItems=e,typeof e=="string")try{e=JSON.parse(e)}catch(h){logger.warn(h.message),e=[]}if(this.component.onSetItems){const h=typeof this.component.onSetItems=="function"?this.component.onSetItems(this,e):this.evaluate(this.component.onSetItems,{items:e},"items");h&&(e=h)}!this.choices&&this.refs.selectContainer&&this.empty(this.refs.selectContainer),this.component.selectValues&&(e=_.get(e,this.component.selectValues,e)||[]);let o;if(this.itemsFromUrl){o=this.isSelectURL?_.isEqual(e,this.downloadedResources):!1;const h=this.component.limit>e.length,n=o&&this.downloadedResources&&this.downloadedResources.length===e.length;h?this.disableInfiniteScroll():n?this.selectOptions=[]:this.serverCount=e.serverCount}if(this.isScrollLoading&&e)o||(this.downloadedResources=this.downloadedResources?this.downloadedResources.concat(e):e),this.downloadedResources.serverCount=e.serverCount||this.downloadedResources.serverCount;else if(this.downloadedResources=e||[],this.selectOptions=[],!_.isEmpty(this.dataValue)&&this.component.idPath){const h=_.get(this.dataValue,this.component.idPath,null),n=!_.isNil(h)&&e.find(c=>_.get(c,this.component.idPath)===h);n&&this.setValue(n)}if(t||this.addValueOptions(e),this.component.widget==="html5"&&!this.component.placeholder&&this.addOption(null,""),_.each(e,(h,n)=>{if(this.root&&this.root.options.editForm&&this.root.options.editForm._id&&this.root.options.editForm._id===h._id)return;const c=this.selectValueAndLabel(h);this.addOption(c.value,c.label,{},_.get(h,this.component.idPath,String(n)))}),logger.info(`[TF_SDK:172] \u2705 selectOptions generated for '${this.key}', length:`,this.selectOptions.length),this.choices)if(logger.info(`[TF_SDK:173] \u2705 this.choices is true for '${this.key}', dataSrc:`,this.component.dataSrc),this.component.dataSrc==="masterdata"&&this.component.masterdata)if(logger.info(`[TF_SDK:174] \u2705 Handling masterdata for '${this.key}'.`),this.selectOptions.sort(function(h,n){return h.value>n.value?1:h.value<n.value?-1:0}),this.isScrollLoading){let h=[];for(let n=0;n<e.length;n++)for(let c=0;c<this.selectOptions.length;c++)this.selectOptions[c].value===e[n][this.component.valueProperty]&&h.push(this.selectOptions[c]);logger.info(`[TF_SDK:175] \u2705 setChoices called (scrollLoading) for '${this.key}' with array length:`,h.length),this.choices.setChoices(h,"value","label",!1)}else logger.info(`[TF_SDK:176] \u2705 setChoices called (normal masterdata) for '${this.key}' with array length:`,this.selectOptions.length),this.choices.setChoices(this.selectOptions,"value","label",!0);else logger.info(`[TF_SDK:177] \u2705 setChoices called (non-masterdata) for '${this.key}' with array length:`,this.selectOptions.length),this.choices.setChoices(this.selectOptions,"value","label",!0);else this.loading;this.isScrollLoading=!1,this.loading=!1;let i=!1;if(this.choices&&this.choices.input&&this.choices.input.isFocussed&&(i=this.choices.input.isFocussed),!(t&&i))if(this.isEmpty()){if(this.shouldAddDefaultValue&&!this.options.readOnly){const h=this.defaultValue;this.isEmpty(h)||this.setValue(h)}}else if(localStorage.getItem("renderMode")==="html"){var s=this.component.template,l=s.substring(s.lastIndexOf(".")+1,s.length),a=l.substring(0,l.indexOf("}"),l.length);if(a=a.trim(),e.length>0&&this.component.multiple){let h=[];for(let n=0;n<e.length;n++)h.push(e[n][a]);this.setValue(h,{noUpdateEvent:!1})}}else this.setValue(this.dataValue,{noUpdateEvent:!0});this.itemsLoadedResolve()}getSingleItemValueForHTMLMode(e){const t=this.selectOptions&&this.selectOptions.find(({value:o})=>_.isEqual(o,e));return t&&t.label||e}itemValueForHTMLMode(e){return this.isHtmlRenderMode()?Array.isArray(e)?e.map(o=>Array.isArray(o)?this.itemValueForHTMLMode(o):this.getSingleItemValueForHTMLMode(o)).join(", "):this.getSingleItemValueForHTMLMode(e):super.itemValueForHTMLMode(e)}get defaultValue(){let e=super.defaultValue;return!e&&(this.component.defaultValue===!1||this.component.defaultValue===0)&&(e=this.component.defaultValue),e}get loadingError(){return!this.component.refreshOn&&!this.component.refreshOnBlur&&this.networkError}loadItems(e,t,o,i,r,s){if(i=i||{},!this.shouldLoad||!this.itemsFromUrl&&this.options.readOnly){this.isScrollLoading=!1,this.loading=!1,this.itemsLoadedResolve();return}const l=parseInt(this.component.minSearch,10);if(this.component.searchField&&l>0&&(!t||t.length<l))return this.setItems([]);r=r||"GET",r.toUpperCase()==="GET"&&(s=null);const a=this.component.limit||100,h=this.isScrollLoading?this.selectOptions.length:0,n=this.component.disableLimit?{}:{limit:a,skip:h};if(e=this.interpolate(e,{formioBase:Formio.getBaseUrl(),search:t,limit:a,skip:h,page:Math.abs(Math.floor(h/a))}),this.component.searchField&&t){const c=Array.isArray(t)?t.join(","):typeof t=="object"?JSON.stringify(t):t;n[this.component.searchField]=this.component.searchField.endsWith("__regex")?_.escapeRegExp(c):c}this.component.selectFields&&(n.select=this.component.selectFields),this.component.sort&&(n.sort=this.component.sort),_.isEmpty(n)||(e+=(e.includes("?")?"&":"?")+Formio.serialize(n,c=>this.interpolate(c))),this.component.filter&&(e+=(e.includes("?")?"&":"?")+this.interpolate(this.component.filter)),i.ignoreCache=this.component.ignoreCache,i.header=o,this.loading=!0,Formio.makeRequest(this.options.formio,"select",e,r,s,i).then(c=>{this.loading=!1,this.error=null,this.setItems(c,!!t)}).catch(c=>{this.itemsFromUrl&&(this.setItems([]),this.disableInfiniteScroll()),this.isScrollLoading=!1,this.handleLoadingError(c)})}handleLoadingError(e){this.loading=!1,e.networkError&&(this.networkError=!0),this.itemsLoadedResolve(),this.emit("componentError",{component:this.component,message:e.toString()}),logger.warn(`[TF_SDK:178] \u26A0\uFE0F Unable to load resources for ${this.key}`)}get requestHeaders(){const e=new Formio.Headers;if(this.component.data&&this.component.data.headers)try{_.each(this.component.data.headers,t=>{t.key&&e.set(t.key,this.interpolate(t.value))})}catch(t){logger.warn(t.message)}return e}getCustomItems(){const e=this.evaluate(this.component.data.custom,{values:[]},"values");return this.asyncValues=L(e),e}asyncCustomValues(){return _.isBoolean(this.asyncValues)||this.getCustomItems(),this.asyncValues}updateCustomItems(e){if(this.asyncCustomValues()){if(!e&&!this.active){this.itemsLoadedResolve();return}this.loading=!0,this.getCustomItems().then(t=>{this.loading=!1,this.setItems(t||[])}).catch(t=>{this.handleLoadingError(t)})}else this.setItems(this.getCustomItems()||[])}isEmpty(e=this.dataValue){return super.isEmpty(e)||e===void 0}refresh(e,t){if(this.component.clearOnRefresh){const o=t?t.instance:null;o&&!o.pristine&&this.setValue(this.emptyValue)}this.updateItems(null,!0)}get additionalResourcesAvailable(){return _.isNil(this.serverCount)||this.serverCount>this.downloadedResources.length}get serverCount(){return this.isFromSearch?this.searchServerCount:this.defaultServerCount}set serverCount(e){this.isFromSearch?this.searchServerCount=e:this.defaultServerCount=e}get downloadedResources(){return this.isFromSearch?this.searchDownloadedResources:this.defaultDownloadedResources}set downloadedResources(e){this.isFromSearch?this.searchDownloadedResources=e:this.defaultDownloadedResources=e}get filteredMasterdata(){if(!this.component.masterdata)return[];let e=[...this.component.masterdata];if(this.component.filter)try{const t=this.component.filter.replace(/(~=\s*)(\{\{.*?\}\})/g,'$1"$2"'),o=this.interpolate(t,{data:this.data}),i=filtrex.compileExpression(o,{customProp:filtrex.useDotAccessOperatorAndOptionalChaining,extraFunctions:{equalsIgnoreCase:(r,s)=>String(r).toLowerCase()===String(s).toLowerCase(),matchIgnoreCase:(r,s)=>new RegExp(s,"i").test(String(r))}});e=e.filter(r=>i({data:r}))}catch(t){return console.warn("[TF_SDK:153] \u26A0\uFE0F Filter error:",t),[]}return e}updateItems(e,t){if(logger.info(`[TF_SDK:179] \u2705 updateItems() called for '${this.key}'. searchInput:`,e,"forceUpdate:",t,"dataSrc:",this.component.dataSrc),this.itemsLoaded=new Promise(o=>{this.itemsLoadedResolve=o}),!this.component.data){logger.warn(`[TF_SDK:180] \u26A0\uFE0F Select component ${this.key} does not have data configuration.`),this.itemsLoadedResolve();return}if(!this.visible){this.itemsLoadedResolve();return}switch(this.component.dataSrc){case"values":this.setItems(this.component.data.values);break;case"json":this.setItems(this.component.data.json);break;case"custom":this.updateCustomItems();break;case"masterdata":logger.info(`[TF_SDK:181] \u2705 masterdata case for '${this.key}'. masterdata length:`,this.filteredMasterdata?this.filteredMasterdata.length:0);let o=this.filteredMasterdata||[];if(o.length>0&&(o=o.map(i=>i&&typeof i=="object"&&!i.data?Object.assign({data:i},i):i)),!this.isFromSearch&&!this.isScrollLoading&&!this.component.dropdownOpened)if(logger.info(`[TF_SDK:182] \u2705 masterdata: Initial/Unopened State for '${this.key}'`),this.defaultDownloadedResources&&this.defaultDownloadedResources.length>0&&this.defaultDownloadedResources.length<o.length)logger.info(`[TF_SDK:183] \u2705 masterdata: defaultDownloadedResources > 0 for '${this.key}'`),this.setItems(this.defaultDownloadedResources);else if(!this.component.dropdownOpened&&this.data[this.key]&&String(this.data[this.key]).trim().length>0){logger.info(`[TF_SDK:184] \u2705 masterdata: Has pre-existing value for '${this.key}'`,this.data[this.key]);let i=[];this.component.multiple&&o.length>0?this.data[this.key].forEach(s=>o.filter(l=>{const a=_.get(l,this.component.valueProperty);(typeof a!="string"?String(a):a).includes(s)&&i.push(l)})):o.length>0&&(i=o.filter(s=>{const l=_.get(s,this.component.valueProperty),a=typeof l!="string"?String(l):l;return a==null?void 0:a.includes(this.data[this.key])}));const r=i.filter((s,l)=>l===i.findIndex(a=>_.get(s,this.component.valueProperty)===_.get(a,this.component.valueProperty)));this.setItems(r)}else logger.info(`[TF_SDK:185] \u2705 masterdata: No pre-existing value, loading full list for '${this.key}' (length: ${o.length})`),this.setItems(o);else logger.info(`[TF_SDK:186/187] \u2705 masterdata: Search/Scroll/Opened State for '${this.key}', loading list (length: ${o.length})`),this.setItems(o);break;case"resource":{if(!this.component.data.resource||!t&&!this.active){this.itemsLoadedResolve();return}let i=this.options.formio?this.options.formio.formsUrl:`${Formio.getProjectUrl()}/form`;if(i+=`/${this.component.data.resource}/submission`,t||this.additionalResourcesAvailable||!this.serverCount)try{this.loadItems(i,e,this.requestHeaders)}catch(r){logger.warn(`[TF_SDK:188] \u26A0\uFE0F Unable to load resources for ${this.key}`)}else this.setItems(this.downloadedResources);break}case"url":{if(!t&&!this.active&&!this.calculatedValue){this.itemsLoadedResolve();return}let{url:i}=this.component.data,r,s;i.startsWith("/")&&(i=(i.startsWith("/project")?Formio.getBaseUrl():Formio.getProjectUrl()||Formio.getBaseUrl())+i),this.component.data.method?(r=this.component.data.method,r.toUpperCase()==="POST"?s=this.component.data.body:s=null):r="GET";const l=this.component.authenticate?{}:{noToken:!0};this.loadItems(i,e,this.requestHeaders,l,r,s);break}case"indexeddb":{if(typeof window=="undefined")return;if(window.indexedDB||window.alert("Your browser doesn't support current version of indexedDB"),this.component.indexeddb&&this.component.indexeddb.database&&this.component.indexeddb.table){const i=window.indexedDB.open(this.component.indexeddb.database);i.onupgradeneeded=r=>{if(this.component.customOptions){const s=r.target.result,l=s.createObjectStore(this.component.indexeddb.table,{keyPath:"myKey",autoIncrement:!0});l.transaction.oncomplete=()=>{const a=s.transaction(this.component.indexeddb.table,"readwrite");this.component.customOptions.forEach(h=>{a.objectStore(this.component.indexeddb.table).put(h)})}}},i.onerror=()=>{window.alert(i.errorCode)},i.onsuccess=r=>{const a=r.target.result.transaction(this.component.indexeddb.table,"readwrite").objectStore(this.component.indexeddb.table);new Promise(h=>{const n=[];a.getAll().onsuccess=c=>{c.target.result.forEach(d=>{n.push(d)}),h(n)}}).then(h=>{_.isEmpty(this.component.indexeddb.filter)||(h=_.filter(h,this.component.indexeddb.filter)),this.setItems(h)})}}}}}addPlaceholder(){!this.component.placeholder||!this.component.placeholder.trim()||this.addOption("",this.component.placeholder,{placeholder:!0})}activate(){(this.loading||!this.active)&&this.setLoadingItem(),!this.active&&(this.activated=!0,this.triggerUpdate())}setLoadingItem(e=!1){this.choices?e?this.choices.setChoices([{value:`${this.id}-loading`,label:"Loading...",disabled:!0}],"value","label"):this.choices.setChoices([{value:"",label:`<i class="${this.iconClass("refresh")}" style="font-size:1.3em;"></i>`,disabled:!0}],"value","label",!0):(this.component.dataSrc==="url"||this.component.dataSrc==="resource")&&this.addOption("",this.t("loading..."))}get active(){return this.component.dataSrc==="masterdata"&&this.component.masterdata?!this.component.lazyLoad||this.activated:!this.component.lazyLoad||this.activated}render(){const e=this.inputInfo;return e.attr=e.attr||{},e.multiple=this.component.multiple,super.render(this.wrapElement(this.renderTemplate("select",{input:e,selectOptions:"",index:null})))}wrapElement(e){return this.component.addResource&&!this.options.readOnly?this.renderTemplate("resourceAdd",{element:e}):e}choicesOptions(){const e=this.component.hasOwnProperty("searchEnabled")?this.component.searchEnabled:!0,t=this.t(this.component.placeholder,{_userInput:!0});let o=this.component.customOptions||{};if(typeof o=="string")try{o=JSON.parse(o)}catch(a){logger.warn(a.message),o={}}const i={maxPatternLength:1e3,distance:1e3};let r={tokenize:!0,matchAllTokens:!0},s={include:"score",threshold:_.get(this,"component.searchThreshold",.3)},l={removeItemButton:this.component.disabled?!1:_.get(this.component,"removeItemButton",!0),itemSelectText:"",classNames:{containerOuter:"choices form-group formio-choices",containerInner:this.transform("class","form-control ui fluid selection dropdown")},addItemText:!1,allowHTML:!0,placeholder:!!this.component.placeholder,placeholderValue:t,noResultsText:this.t("No results found"),noChoicesText:this.t("No choices to choose from"),searchPlaceholderValue:this.t("Type to search"),shouldSort:!1,position:this.component.dropdown?this.component.dropdown:window.platform&&window.platform.iosPlatform?"bottom":"auto",searchEnabled:e,searchChoices:!this.component.searchField,searchFields:_.get(this,"component.searchFields",["label"]),searchResultLimit:_.get(this,"component.searchResultLimit",this.component.limit||100),fuseOptions:this.component.useExactSearch?Object.assign(r,i):Object.assign({},_.get(this,"component.fuseOptions",{}),Object.assign(s,i)),valueComparer:_.isEqual,resetScrollPosition:!1};return Object.assign(l,o)}attach(e){this.component.dropdownOpened=!1;const t=super.attach(e);this.loadRefs(e,{selectContainer:"single",addResource:"single",autocompleteInput:"single"});const o=this.refs.autocompleteInput;o&&this.addEventListener(o,"change",a=>{this.setValue(a.target.value)});const i=this.refs.selectContainer;if(!i)return;if(this.addEventListener(i,this.inputInfo.changeEvent,()=>{if(this.isUpdatingChoices>0){logger.debug(`[TF_SDK] \u2139\uFE0F Ignored programmatic change event on '${this.key}'`);return}this.updateValue(null,{modified:!0})}),this.attachRefreshOnBlur(),this.component.widget==="html5"){this.addFocusBlurEvents(i),this.triggerUpdate(null,!0),this.visible&&this.setItems(this.selectOptions||[]),this.focusableElement=i,this.addEventListener(i,"focus",()=>this.update()),this.addEventListener(i,"keydown",a=>{const{key:h}=a;["Backspace","Delete"].includes(h)&&this.setValue(this.emptyValue)});return}const r=i.tabIndex;this.addPlaceholder(),i.setAttribute("dir",this.i18next.dir()),this.choices&&this.choices.containerOuter&&this.choices.containerOuter.element&&this.choices.containerOuter.element.parentNode&&this.choices.destroy();const s=this.choicesOptions();if(Choices&&(this.choices=new Choices(i,s),["setChoices","setValue","removeActiveItems","clearStore","removeItemsByValue","setChoiceByValue"].forEach(h=>{if(typeof this.choices[h]=="function"){const n=this.choices[h];this.choices[h]=(...c)=>{this.isUpdatingChoices=(this.isUpdatingChoices||0)+1;try{return n.apply(this.choices,c)}finally{this.isUpdatingChoices--}}}}),this.selectOptions&&this.selectOptions.length&&this.choices.setChoices(this.selectOptions,"value","label",!0),this.component.multiple?this.focusableElement=this.choices.input.element:(s.searchEnabled&&window.platform&&window.platform.iosPlatform?this.focusableElement=this.choices.input.element:this.focusableElement=this.choices.containerInner.element,this.choices.containerOuter.element.setAttribute("tabIndex","-1"),s.searchEnabled&&this.addEventListener(this.choices.containerOuter.element,"mousedown",()=>this.positionDropdown())),this.addFocusBlurEvents(this.focusableElement),this.itemsFromUrl&&!this.component.noRefreshOnScroll&&(this.scrollList=this.choices.choiceList.element,this.addEventListener(this.scrollList,"scroll",h=>{this.onScroll(h)})),s.removeItemButton&&this.addEventListener(i,"removeItem",()=>{if(this.isRemoveButtonPressed=!0,this.isUpdatingChoices>0){logger.debug(`[TF_SDK] \u2139\uFE0F Ignored programmatic removeItem event on '${this.key}' (standard list)`);return}this.isEmpty(this.dataValue)||this.updateValue(null,{modified:!0})})),window&&this.choices&&this.shouldPositionDropdown){const a=document.getElementById("formio-wrapper");a&&this.addEventListener(a,"scroll",()=>{this.positionDropdown(!0)},!1,!0),this.addEventListener(window.document,"scroll",()=>{this.positionDropdown(!0)},!1,!0)}if(this.focusableElement.setAttribute("tabIndex",r),this.component.searchField){if(this.choices&&this.choices.input&&this.choices.input.element){var l=(c,d)=>{let g;return function(){const u=this,p=arguments;clearTimeout(g),g=setTimeout(()=>c.apply(u,p),d)}};let n=this;this.addEventListener(this.choices.input.element,"input",l(function(c){if(logger.info(`[TF_SDK:INPUT] \u2328\uFE0F Choices input event triggered for '${n.key}'. Search input:`,c.target.value),n.isFromSearch=!!c.target.value,n.component.dataSrc==="masterdata"&&n.component.masterdata)if(c.target.value.length==0)logger.info(`[TF_SDK:INPUT] Search cleared for '${n.key}'`),n.triggerUpdate(),n.searchDownloadedResources=[],n.component.totalSearchResults=[],n.isFromSearch=!1,n.setItems(n.defaultDownloadedResources);else{let m=[];var d=n.component.template||"",g=d.lastIndexOf("."),u="label";if(g!==-1){var p=d.substring(g+1,d.length),y=p.indexOf("}");y!==-1&&(u=p.substring(0,y).trim())}if(logger.info(`[TF_SDK:INPUT] Parsed label key: '${u}', labelProperty: '${n.component.labelProperty}', limit: ${n.component.limit}, uniqueOptions: ${n.component.uniqueOptions}`),m=n.component.masterdata.filter(S=>{if(!S)return!1;let v;const f=[];n.component.labelProperty&&f.push(n.component.labelProperty),u&&!f.includes(u)&&f.push(u);const R=["Name","label","value","text","title"];for(const w of R)f.includes(w)||f.push(w);for(const w of f)if(S[w]!==void 0&&S[w]!==null){v=S[w];break}return v==null?Object.values(S).some(w=>w&&String(w).toLowerCase().includes(c.target.value.toLowerCase())):String(v).toLowerCase().includes(c.target.value.toLowerCase())}),logger.info(`[TF_SDK:INPUT] Found ${m.length} items matching '${c.target.value}' out of ${n.component.masterdata.length}`),m.length>n.component.limit){logger.info(`[TF_SDK:INPUT] Found items count ${m.length} exceeds limit ${n.component.limit}. Slicing.`),n.component.totalSearchResults=[],n.component.totalSearchResults=m;let S=n.component.totalSearchResults.slice(0,n.component.limit);n.setItems(S)}else logger.info(`[TF_SDK:INPUT] Setting items directly. Count: ${m.length}`),n.setItems(m)}else c.target.value?(n.serverCount=null,n.downloadedResources=[]):n.triggerUpdate()},1e3))}this.addEventListener(i,"choice",()=>{this.component.multiple&&this.component.dataSrc==="resource"&&this.isFromSearch&&this.triggerUpdate(),this.isFromSearch=!1});const a=this.component.searchField&&(this.isSelectResource||this.isSelectURL)?(this.component.searchDebounce===0?0:this.component.searchDebounce||this.defaultSchema.searchDebounce)*1e3:0,h=n=>{this.triggerUpdate(n.detail.value)};this.addEventListener(i,"search",_.debounce(n=>{h(n),this.positionDropdown()},a)),this.addEventListener(i,"stopSearch",()=>this.triggerUpdate()),this.addEventListener(i,"hideDropdown",()=>{if(this.component.dropdownOpened=!1,this.component.totalSearchResults=[],this.component.searchDownloadedResources=[],this.isFromSearch=!1,this.component.dataSrc==="masterdata"&&this.component.masterdata){let n,c={};c.limit=this.component.limit;const d=this.filteredMasterdata;this.data[this.key]&&String(this.data[this.key]).length>0&&(n=d.filter(u=>{const p=u[this.component.valueProperty],y=typeof p!="string"?String(p):p;return y==null?void 0:y.includes(this.data[this.key])})),this.defaultDownloadedResources.findIndex(u=>u[this.component.valueProperty]===String(this.data[this.key]))>-1||n&&n.length>0&&this.defaultDownloadedResources.push(n[0]),c=this.defaultDownloadedResources,c.serverCount=d.length,c.skip=this.defaultDownloadedResources.length+this.component.limit,this.setItems(this.defaultDownloadedResources)}}),this.addEventListener(i,"hideDropdown",()=>{const n=document.getElementById("form-container"),c=n?n.scrollTop:0;this.choices&&this.choices.input&&this.choices.input.element&&(this.choices.input.element.value=""),this.component.dataSrc==="masterdata"&&this.updateItems(null,!0),n&&c>0&&requestAnimationFrame(()=>{n.scrollTop===0&&!window._unv_selecting&&(n.scrollTop=c)})})}return this.addEventListener(i,"mousedown",()=>{window._unv_selecting=!0,window.platform&&window.platform.iosPlatform&&document.activeElement&&(document.activeElement.tagName==="INPUT"||document.activeElement.classList.contains("choices__input"))&&document.activeElement.blur(),setTimeout(()=>{window._unv_selecting=!1},500),this.positionDropdown()}),this.addEventListener(i,"showDropdown",()=>{this.activated||this.update(),this.positionDropdown(),this.component.dataSrc==="masterdata"&&this.component.masterdata&&(this.component.dropdownOpened=!0,(!this.defaultDownloadedResources||this.defaultDownloadedResources.length<this.filteredMasterdata.length)&&this.updateItems(null,!0))}),this.shouldPositionDropdown&&this.addEventListener(i,"highlightChoice",()=>{this.positionDropdown()}),this.addEventListener(i,"hideDropdown",()=>{this.component.dataSrc==="masterdata"&&this.component.masterdata&&(this.component.dropdownOpened=!1)}),this.addEventListener(i,"search",a=>{if(logger.info(`[TF_SDK:SEARCH] \u{1F50D} Choices search event triggered for '${this.key}'. Search input:`,a.detail.value),this.component.dataSrc==="masterdata"&&this.component.masterdata){var h=this.component.template||"",n=h.lastIndexOf("."),c="label";if(n!==-1){var d=h.substring(n+1,h.length),g=d.indexOf("}");g!==-1&&(c=d.substring(0,g).trim())}const u=this.component.searchField?this.component.searchField.replace(/__regex$/,""):"";logger.info(`[TF_SDK:SEARCH] Configured searchField: '${this.component.searchField}', clean: '${u}', parsedLabel: '${c}', limit: ${this.component.limit}, uniqueOptions: ${this.component.uniqueOptions}`),this.searchDownloadedResources=this.filteredMasterdata.filter(p=>{if(!p)return!1;let y;const m=[];this.component.searchField&&m.push(this.component.searchField),u&&!m.includes(u)&&m.push(u),this.component.labelProperty&&!m.includes(this.component.labelProperty)&&m.push(this.component.labelProperty),c&&!m.includes(c)&&m.push(c);const S=["Name","label","value","text","title"];for(const f of S)m.includes(f)||m.push(f);for(const f of m)if(p[f]!==void 0&&p[f]!==null){y=p[f];break}let v=!1;return y==null?v=Object.values(p).some(f=>f&&String(f).toLowerCase().includes(a.detail.value.toLowerCase())):v=String(y).toLowerCase().includes(a.detail.value.toLowerCase()),v}),logger.info(`[TF_SDK:SEARCH] Found ${this.searchDownloadedResources.length} matching resources out of ${this.filteredMasterdata.length}`),this.isFromSearch=!0}}),this.choices&&s.placeholderValue&&this.choices._isSelectOneElement&&(this.addPlaceholderItem(s.placeholderValue),this.addEventListener(i,"removeItem",()=>{if(this.addPlaceholderItem(s.placeholderValue),this.isUpdatingChoices>0){logger.debug(`[TF_SDK] \u2139\uFE0F Ignored programmatic removeItem event on '${this.key}' (placeholder list)`);return}this.isEmpty(this.dataValue)||this.updateValue(null,{modified:!0})})),this.addValueOptions(),this.setChoicesValue(this.dataValue),this.isSelectResource&&this.refs.addResource&&this.addEventListener(this.refs.addResource,"click",a=>{a.preventDefault();const h=this.ce("div"),n=this.createModal(h),d=`${_.get(this.root,"formio.projectUrl",Formio.getProjectUrl())}/form/${this.component.data.resource}`;new Form(h,d,{}).ready.then(g=>{g.on("submit",u=>{let p=this.valueProperty?_.get(u,this.valueProperty):u;this.component.multiple&&(p=[...this.dataValue,p]),this.setValue(p),this.triggerUpdate(),n.close()})})}),this.disabled=this.shouldDisabled,this.updateItems(),this.triggerUpdate(),this.component.lazyLoad||(this.activated=!0),t}setDropdownPosition(){let e,t;if(this.choices&&this.choices.dropdown&&this.choices.dropdown.element&&(e=this.choices.dropdown.element),this.choices&&this.choices.containerOuter&&this.choices.containerOuter.element&&(t=this.choices.containerOuter.element),!e||!t){console.warn("[TF_SELECT_LOG:ERR] \u26A0\uFE0F dropdown or container element not found in setDropdownPosition");return}const o=t.getBoundingClientRect(),i=window.visualViewport?window.visualViewport.height:window.innerHeight,r=i-(o.top+o.height),s=o.top;let l=t.classList.contains("is-flipped");!l&&r<180&&s>r?(l=!0,t.classList.add("is-flipped"),e.classList.add("is-flipped")):l&&r>=200&&(l=!1,t.classList.remove("is-flipped"),e.classList.remove("is-flipped"));const a=e.offsetHeight||220;let h,n;l?(n=Math.min(a,Math.max(120,s-20)),h=Math.max(10,o.top-n)):(h=o.top+o.height,n=Math.max(120,Math.min(a,i-h-15)));const c={left:`${o.left}px`,width:`${o.width}px`,position:"fixed",bottom:"unset",right:"unset",top:`${h}px`,maxHeight:`${n}px`};_.assign(e.style,c)}hasDataGridAncestor(e){return e=e||this,e.inDataGrid||e.type==="datagrid"?!0:e.parent?this.hasDataGridAncestor(e.parent):!1}positionDropdown(e){!this.shouldPositionDropdown||!this.choices||this.choices.dropdown&&!this.choices.dropdown.isActive&&e||(this.setDropdownPosition(),this.itemsLoaded.then(()=>{this.setDropdownPosition()}))}get isLoadingAvailable(){return!this.isScrollLoading&&this.additionalResourcesAvailable}onScroll(e){if(!this.isFromSearch)if(this.component.dataSrc==="masterdata"&&this.component.masterdata&&this.defaultDownloadedResources.length<this.filteredMasterdata.length){var t=e.target;E?t.scrollHeight-t.scrollTop===t.clientHeight&&(this.isScrollLoading=!0,this.triggerUpdate(this.choices.input.element.value),this.setMasterdata()):(this.isScrollLoading=!0,this.triggerUpdate(this.choices.input.element.value),this.setMasterdata())}else this.isLoadingAvailable&&(this.isScrollLoading=!0,this.setLoadingItem(!0),this.triggerUpdate(this.choices.input.element.value))}setMasterdata(){if(this.component.dataSrc==="masterdata"&&this.component.masterdata){let e={},t;e.limit=this.component.limit;let o;const i=this.filteredMasterdata;if(this.data[this.key]&&String(this.data[this.key]).trim().length>0&&(o=i.filter(r=>{const s=_.get(r,this.component.valueProperty),l=typeof s!="string"?String(s):s;return l==null?void 0:l.includes(this.data[this.key])})),this.isFromSearch&&this.searchDownloadedResources&&this.searchDownloadedResources.length>0){const r=this.component.totalSearchResults||this.searchDownloadedResources||[];t=r.slice(this.searchDownloadedResources.length,this.searchDownloadedResources.length+this.component.limit),e=t,e.serverCount=r.length,e.skip=this.searchDownloadedResources.length+this.component.limit}else{t=i.slice(this.defaultDownloadedResources.length,this.defaultDownloadedResources.length+this.component.limit);let r=this.defaultDownloadedResources.filter(a=>t.includes(a));if(r&&r.length>0){let a=t.findIndex(h=>_.get(h,this.component.valueProperty)===_.get(r[0],this.component.valueProperty));a>-1&&t.splice(a,1)}let s=t.findIndex(a=>_.get(a,this.component.valueProperty)===String(this.data[this.key]));s>-1&&t.splice(s,1),this.defaultDownloadedResources.findIndex(a=>_.get(a,this.component.valueProperty)===String(this.data[this.key]))>-1||o&&o.length>0&&t.push(o[0]),e=t,e.serverCount=i.length,e.skip=this.defaultDownloadedResources.length+this.component.limit}this.setItems(e)}}attachRefreshOnBlur(){this.component.refreshOnBlur&&this.on("blur",e=>{this.checkRefreshOn([{instance:e,value:e.dataValue}],{fromBlur:!0})})}addPlaceholderItem(e){this.choices._store.activeItems.length||this.choices._addItem({value:e,label:e,choiceId:0,groupId:-1,customProperties:null,placeholder:!0,keyCode:null})}update(){this.component.dataSrc==="custom"&&this.updateCustomItems(),this.activate()}set disabled(e){super.disabled=e,this.choices&&(e?(this.setDisabled(this.choices.containerInner.element,!0),this.focusableElement.removeAttribute("tabIndex"),this.choices.disable()):(this.setDisabled(this.choices.containerInner.element,!1),this.focusableElement.setAttribute("tabIndex",this.component.tabindex||0),this.choices.enable()))}get disabled(){return super.disabled}set visible(e){e&&!this._visible!=!e&&this.triggerUpdate(),super.visible=e}get visible(){return super.visible}addCurrentChoices(e,t,o){if(!e)return!1;const i=[],r=e.reduce((s,l)=>{if(!l||_.isEmpty(l))return s;let a=!1;const h=t===this.selectOptions;return t&&t.length&&_.each(t,n=>{if(n._id&&l._id&&n._id===l._id)return a=!0,!1;const c=o?n.value:this.itemValue(n,h);return a|=_.isEqual(c,l),!a}),a?a||s:(i.push(this.selectValueAndLabel(l)),!0)},!1);return this.component.dataSrc==="masterdata"&&this.component.masterdata?this.isFromSearch||i.length&&(this.choices&&this.choices.setChoices(i,"value","label"),i.map(s=>{this.addOption(s.value,s.label)})):i.length&&(this.choices&&this.choices.setChoices(i,"value","label"),i.map(s=>{this.addOption(s.value,s.label)})),r}getValueAsString(e,t){return this.component.multiple&&Array.isArray(e)?e.map(o=>this.asString(o,t)).join(", "):this.asString(e,t)}getValue(){if(this.viewOnly||this.loading||!this.component.lazyLoad&&!this.selectOptions.length||!this.element)return this.dataValue;let e=this.emptyValue;if(this.choices)e=this.choices.getValue(!0),!this.component.multiple&&this.component.placeholder&&e===this.t(this.component.placeholder,{_userInput:!0})&&(e=this.emptyValue);else if(this.refs.selectContainer){if(e=this.refs.selectContainer.value,this.valueProperty===""||this.isEntireObjectDisplay()){if(e==="")return{};const t=this.selectOptions[e]||this.selectOptions.find(o=>o.id===e);t&&_.isObject(t.value)&&(e=t.value)}}else e=this.dataValue;return e==null&&(e=""),e}redraw(){const e=super.redraw();return this.triggerUpdate(),e}normalizeSingleValue(e,t){if(_.isNil(e))return;const o=_.isObject(e);if(o&&Object.keys(e).length===0)return e;if(t){const s=this.component.reference&&e&&e._id?e._id.toString():e,l=!o||this.component.reference;if(s&&l&&this.templateData&&this.templateData[s]&&this.root&&this.root.submission){const a=this.root.submission;a.metadata||(a.metadata={}),a.metadata.selectData||(a.metadata.selectData={});let h=this.templateData[s];if(this.component.multiple){h={};const n=this.dataValue;n&&_.isArray(n)&&n.length&&n.forEach(c=>{const d=this.component.reference?c._id.toString():c;h[d]=this.templateData[d]}),h[e]=this.templateData[e]}_.set(a.metadata.selectData,this.path,h)}}const i=this.component.dataType||"auto",r={value:e,number(){const s=Number(this.value),l=e.toString()===s.toString();return!Number.isNaN(s)&&Number.isFinite(s)&&e!==""&&l&&(this.value=s),this},boolean(){return _.isString(this.value)&&(this.value.toLowerCase()==="true"||this.value.toLowerCase()==="false")&&(this.value=this.value.toLowerCase()==="true"),this},string(){return this.value=String(this.value),this},object(){return this},auto(){return _.isObject(this.value)?this.value=this.object().value:this.value=this.string().number().boolean().value,this}};try{return r[i]().value}catch(s){return logger.warn("[TF_SDK:189] \u26A0\uFE0F Failed to normalize value",s),e}}normalizeValue(e){return this.component.multiple&&Array.isArray(e)?e.map(t=>this.normalizeSingleValue(t,!0)):super.normalizeValue(this.normalizeSingleValue(e,!0))}updateValue(e,t){return this.isUpdatingChoices>0?(logger.debug(`[TF_SDK] \u2139\uFE0F Blocked updateValue call on '${this.key}' due to programmatic choices update.`),!1):super.updateValue(e,t)}setValue(e,t={}){if(e&&String(e).length>0&&$(".barcode-select-error").remove(),localStorage.getItem("renderMode")==="html"&&this.component.dataSrc==="values"&&this.component.data.values.filter(n=>{(e&&n.value===e||e&&n.value===String(e))&&(e=n.label)}),localStorage.getItem("renderMode")==="html"&&this.component.dataSrc==="masterdata"&&!this.component.multiple){var o=this.component.template,i=o.substring(o.lastIndexOf(".")+1,o.length),r=i.substring(0,i.indexOf("}"),i.length);r=r.trim(),this.component.masterdata.filter(n=>{(e&&n[this.component.valueProperty]===e||e&&n[this.component.valueProperty]===String(e))&&(e=n[r])})}const s=this.dataValue,l=this.updateValue(e,t);e=this.dataValue;const a=!this.isEmpty(s),h=!this.isEmpty(e);if(this.component.multiple&&Array.isArray(e)?e=e.map(n=>typeof n=="boolean"||typeof n=="number"?n.toString():n):(typeof e=="boolean"||typeof e=="number")&&(e=e.toString()),this.isHtmlRenderMode()&&t&&t.fromSubmission&&l)return this.itemsLoaded.then(()=>{this.redraw()}),l;if(this.loading)return l;if(this.isInitApiCallNeeded(h)){this.loading=!0,this.lazyLoadInit=!0;const n=this.component.searchField||this.component.valueProperty;return this.triggerUpdate(_.get(e.data||e,n,e),!0),l}return this.itemsLoaded.then(()=>{this.addValueOptions(),this.setChoicesValue(e,a,t)}),l}isInitApiCallNeeded(e){return this.component.lazyLoad&&!this.lazyLoadInit&&!this.active&&!this.selectOptions.length&&e&&this.shouldInitialLoad&&this.visible&&(this.component.searchField||this.component.valueProperty)}setChoicesValue(e,t,o={}){const i=!this.isEmpty(e)||o.fromSubmission;if(t=t===void 0?!0:t,this.choices)if(i)if(this.component.dataSrc==="masterdata"&&this.component.masterdata){if(!this.isFromSearch){this.choices.removeActiveItems();const r=Array.isArray(e)?e:[e];this.addCurrentChoices(r,this.selectOptions,!0)||this.choices.setChoices(this.selectOptions,"value","label",!0),this.choices.setChoiceByValue(e)}}else{this.choices.removeActiveItems();const r=Array.isArray(e)?e:[e];this.addCurrentChoices(r,this.selectOptions,!0)||this.choices.setChoices(this.selectOptions,"value","label",!0),this.choices.setChoiceByValue(e)}else(t||o.resetValue)&&this.choices.removeActiveItems();else if(i){const r=Array.isArray(e)?e:[e];if(!_.isEqual(this.dataValue,this.defaultValue)&&this.selectOptions.length<2||this.selectData&&o.fromSubmission){const{value:s,label:l}=this.selectValueAndLabel(this.dataValue);this.addOption(s,l)}_.each(this.selectOptions,s=>{_.each(r,l=>{if(s.value===""&&(s.value={}),_.isEqual(l,s.value)&&s.element)return s.element.selected=!0,s.element.setAttribute("selected","selected"),!1})})}else _.each(this.selectOptions,r=>{r.element&&(r.element.selected=!1,r.element.removeAttribute("selected"))})}get itemsLoaded(){return this._itemsLoaded||Promise.resolve()}set itemsLoaded(e){this._itemsLoaded=e}validateValueAvailability(e,t){if(!F(e)||!t)return!0;const o=this.getOptionsValues();if(o){if(_.isObject(t)){const i=r=>{const s=this.normalizeSingleValue(r,!0);if(!_.isObject(s))return!1;try{return JSON.stringify(s)===JSON.stringify(t)}catch(l){return logger.error("Error while comparing items",l),!1}};return o.findIndex(r=>i(r))!==-1}return o.findIndex(i=>this.normalizeSingleValue(i)===t)!==-1}return!1}getOptionValue(e){return _.isObject(e)&&this.isEntireObjectDisplay()?this.normalizeSingleValue(e):_.isObject(e)&&(this.valueProperty||this.component.key!=="resource")?e:_.isObject(e)&&!this.valueProperty?this.interpolate(this.component.template,{item:e}).replace(/<\/?[^>]+(>|$)/g,""):_.isNull(e)?this.emptyValue:String(this.normalizeSingleValue(e))}getOptionsValues(){let e=[];switch(this.component.dataSrc){case"values":e=this.component.data.values;break;case"json":e=this.component.data.json;break;case"custom":e=this.getCustomItems();break}if(typeof e=="string")try{e=JSON.parse(e)}catch(t){logger.warn(t.message),e=[]}if(Array.isArray(e))return e.map(t=>this.getOptionValue(this.itemValue(t)))}deleteValue(){this.setValue("",{noUpdateEvent:!0}),this.unset()}validateMultiple(){return!1}isBooleanOrNumber(e){return typeof e=="number"||typeof e=="boolean"}getNormalizedValues(){if(!(!this.component||!this.component.data||!this.component.data.values))return this.component.data.values.map(e=>({label:e.label,value:String(this.normalizeSingleValue(e.value))}))}asString(e,t={}){var r;e=e||this.getValue();const o=(s,l)=>l?(Array.isArray(s)?s.forEach(a=>a[l]=a[l].toString()):s[l]=s[l].toString(),s):(this.isBooleanOrNumber(s)&&(s=s.toString()),Array.isArray(s)&&s.some(a=>this.isBooleanOrNumber(a))&&(s=s.map(a=>{this.isBooleanOrNumber(a)&&(a=a.toString())})),s);if(e=o(e),this.component.dataSrc==="masterdata"&&this.component.masterdata){const s=l=>(typeof l=="string"||typeof l=="number")&&this.findMasterdataItem(l)||l;Array.isArray(e)?e=e.map(s):e!=null&&(e=s(e))}if(["values","custom"].includes(this.component.dataSrc)&&!this.asyncCustomValues()){const{items:s,valueProperty:l}=this.component.dataSrc==="values"?{items:o(this.getNormalizedValues(),"value"),valueProperty:"value"}:{items:o(this.getCustomItems(),this.valueProperty),valueProperty:this.valueProperty},a=()=>{const h=_.find(s,[l,e]),n=this.defaultSchema.data.values||[];return _.isEqual(h,n[0])?"-":h};e=this.component.multiple&&Array.isArray(e)?_.filter(s,h=>e.includes(h.value)):l?(r=a())!=null?r:{value:e,label:e}:e}if(_.isString(e)&&this.component.dataSrc!=="masterdata")return e;const i=s=>{const l=this.itemTemplate(s);return t.csv&&l?unescapeHTML(l):l};if(Array.isArray(e)){const s=[];return e.forEach(l=>s.push(i(l))),this.component.dataSrc==="resource"&&s.length>0?s.join(", "):s.length>0?s.join("<br />"):"-"}return this.isEntireObjectDisplay()&&_.isObject(e)?JSON.stringify(e):_.isNil(e)?"-":this.itemTemplate(e)}detach(){this.off("blur"),this.choices&&(this.choices&&this.choices.containerOuter&&this.choices.containerOuter.element&&this.choices.containerOuter.element.parentNode&&this.choices.destroy(),this.choices=null),super.detach()}focus(){this.focusableElement&&(super.focus.call(this),this.focusableElement.focus())}setErrorClasses(e,t,o,i,r=this.element){super.setErrorClasses(e,t,o,i,r),this.choices?super.setErrorClasses([this.choices.containerInner.element],t,o,i,r):super.setErrorClasses([this.refs.selectContainer],t,o,i,r)}addFocusBlurEvents(e){this.addEventListener(e,"focus",()=>{this.root.focusedComponent!==this?(this.root.pendingBlur&&this.root.pendingBlur(),this.root.focusedComponent=this,this.emit("focus",this)):this.root.focusedComponent===this&&this.root.pendingBlur&&(this.root.pendingBlur.cancel(),this.root.pendingBlur=null)}),this.addEventListener(e,"blur",()=>{this.root.pendingBlur=FormioUtils.delay(()=>{this.emit("blur",this),this.component.validateOn==="blur"&&this.root.triggerChange({fromBlur:!0},{instance:this,component:this.component,value:this.dataValue,flags:{fromBlur:!0}}),this.root.focusedComponent=null,this.root.pendingBlur=null})})}}b&&b.Components?b.Components.addComponent("select",I):typeof Formio!="undefined"&&Formio.Components&&Formio.Components.addComponent("select",I)})();</script>
38863
+ `),t}}}static savedValueTypes(e){const{boolean:t,string:n,number:o,object:r,array:s}=componentValueTypes,{dataType:h,reference:a}=e,l=getComponentSavedTypes(e);return l||(a?[r]:h==="object"?[r,s]:componentValueTypes[h]?[componentValueTypes[h]]:[t,n,o,r,s])}init(){super.init(),this.templateData={},this.validators=(this.validators||[]).concat(["select","onlyAvailableItems"]);let e=[];const t=_.debounce((...n)=>(e=[],this.updateItems.apply(this,n)),100);this.triggerUpdate=(...n)=>(typeof this.itemsLoadedResolve=="function"&&this.itemsLoadedResolve(),this.itemsLoaded=new Promise(o=>{this.itemsLoadedResolve=o}),n.length&&(e=n),t(...e)),this.selectOptions=[],this.itemsFromUrl&&(this.isFromSearch=!1,this.searchServerCount=null,this.defaultServerCount=null,this.isScrollLoading=!1,this.searchDownloadedResources=[],this.defaultDownloadedResources=[]),this.activated=!1,this.itemsLoaded=new Promise(n=>{this.itemsLoadedResolve=n}),this.shouldPositionDropdown=this.hasDataGridAncestor(),this.isHtmlRenderMode()&&this.activate(),this.getTemplateKeys()}getTemplateKeys(){const e=this.component.template;this.templateKeys=this.options.readOnly&&e?FormioUtils.getItemTemplateKeys(e):[]}get dataReady(){return this.root&&this.root.submissionSet&&!this.attached?Promise.resolve():this.itemsLoaded}get defaultSchema(){return I.schema()}get emptyValue(){if(this.component.multiple)return[];if(this.component.dataSrc==="json"&&this.component.data.json){const e=this.component.data.json[0];let t;return this.valueProperty?t=_.get(e,this.valueProperty):t=e,t&&typeof t=="string"?"":{}}return this.valueProperty?"":{}}get valueProperty(){return this.component.valueProperty?this.component.valueProperty:this.component.dataSrc==="values"?"value":""}get inputInfo(){const e=super.elementInfo();return e.type="select",e.changeEvent="change",e}get isSelectResource(){return this.component.dataSrc==="resource"}get isSelectMaterdata(){return this.component.dataSrc==="masterdata"}get isSelectURL(){return this.component.dataSrc==="url"}get itemsFromUrl(){return this.isSelectResource||this.isSelectURL||this.isSelectMaterdata}get isInfiniteScrollProvided(){return this.itemsFromUrl}get shouldDisabled(){return super.shouldDisabled||this.parentDisabled}get shouldInitialLoad(){return this.component.widget==="html5"&&this.isEntireObjectDisplay()&&this.component.searchField&&this.dataValue?!1:super.shouldLoad}isEntireObjectDisplay(){return(this.component.dataSrc==="resource"||this.component.dataSrc==="masterdata")&&(this.valueProperty==="data"||this.component.valueProperty==="data")}findMasterdataItem(e){if(!this.component.masterdata||e==null)return null;const t=String(e),n=this.component.valueProperty||this.valueProperty;return this.component.masterdata.find(o=>{if(!o||typeof o!="object")return!1;if(n){let s=_.get(o,n);if(s!=null&&String(s)===t||n.startsWith("data.")&&(s=_.get(o,n.replace(/^data\./,"")),s!=null&&String(s)===t)||o[n]!==void 0&&o[n]!==null&&String(o[n])===t)return!0}const r=o.data||o;for(const s of Object.keys(r))if((/id$/i.test(s)||s==="value"||s==="_id"||s==="id")&&r[s]!==void 0&&r[s]!==null&&String(r[s])===t)return!0;return!1})}selectValueAndLabel(e){if((typeof e=="string"||typeof e=="number")&&this.component.dataSrc==="masterdata"&&this.component.masterdata){const n=this.findMasterdataItem(e);n&&(e=n)}const t=this.getOptionValue(this.isEntireObjectDisplay()&&!this.itemValue(e)?e:this.itemValue(e));return{value:t,label:this.itemTemplate(this.isEntireObjectDisplay()&&!_.isObject(e.data)?{data:e}:e,t)}}itemTemplate(e,t){if(!_.isNumber(e)&&_.isEmpty(e))return"";if((typeof e=="string"||typeof e=="number")&&this.component.dataSrc==="masterdata"&&this.component.masterdata){const r=this.findMasterdataItem(e);r&&(e=r)}if(this.options.readOnly&&this.component.readOnlyValue&&!this.component.template&&!this.component.labelProperty)return this.itemValue(e);if(e&&!this.component.template){const r=e.label||e,s=typeof r=="string"?this.t(r,{_userInput:!0}):r;return this.sanitize(s,this.shouldSanitizeValue)}if(this.component.multiple&&_.isArray(this.dataValue)?this.dataValue.find(r=>t===r):this.dataValue===t){const r=this.selectData;if(r){const s=this.component.reference&&t&&(t._id?t._id.toString():t);(!this.templateData||!this.templateData[s])&&this.getOptionTemplate(e,t),this.component.multiple?r[s]&&(e=r[s]):e=r}}if(typeof e=="string"||typeof e=="number")return this.sanitize(this.t(e,{_userInput:!0}),this.shouldSanitizeValue);if(Array.isArray(e))return e.map(r=>typeof r=="string"||typeof r=="number"?this.sanitize(this.t(r,{_userInput:!0}),this.shouldSanitizeValue):r);if(e.data){const r=/item\.data\.\w*/g.test(this.component.template);e.data=this.isEntireObjectDisplay()&&_.isObject(e.data)&&!r?JSON.stringify(e.data):e.data}let n=e;typeof e=="object"&&e!==null&&!e.data&&(n=Object.assign({data:e},e));const o=this.sanitize(this.component.template?this.interpolate(this.component.template,{item:n}):e.label);if(o){const r=o.replace(/<\/?[^>]+(>|$)/g,"");let s;return this.i18next&&this.i18next.translator&&(s=this.i18next.translator),!r||s&&!this.t(r,{_userInput:!0})?void 0:s?o.replace(r,this.t(r,{_userInput:!0})):r}else return JSON.stringify(e)}addOption(e,t,n={},o=D()){if(_.isNil(t))return;const r=this.component.idPath?this.component.idPath.split(".").reduceRight((a,l)=>({[l]:a}),o):{},s=Object.assign({value:this.getOptionValue(e),label:t},r);if(!(this.component.uniqueOptions&&this.selectOptions.find(a=>_.isEqual(a.value,s.value)))&&(e&&this.selectOptions.push(s),this.refs.selectContainer&&this.component.widget==="html5")){s.value&&_.isObject(s.value)&&_.isEmpty(s.value)&&(s.value="");const a=document.createElement("div");a.innerHTML=this.sanitize(this.renderTemplate("selectOption",{selected:_.isEqual(this.getOptionValue(this.dataValue),s.value),option:s,attrs:n,id:o,useId:(this.valueProperty===""||this.isEntireObjectDisplay())&&_.isObject(e)&&o}),this.shouldSanitizeValue).trim(),s.element=a.firstChild,this.refs.selectContainer.appendChild(s.element)}}addValueOptions(e){e=e||[];let t=!1,n=this.dataValue;if(this.options.pdf&&!e.length&&this.component.dataSrc==="url"&&this.valueProperty&&(n=Array.isArray(n)?n.map(o=>_.set({},this.valueProperty,o)):_.set({},this.valueProperty,n)),!this.selectOptions.length){const o=Array.isArray(n)&&this.component.multiple?n:[n];t=this.addCurrentChoices(o,e),!t&&!this.component.multiple&&this.addPlaceholder()}return t}disableInfiniteScroll(){this.downloadedResources&&(this.downloadedResources.serverCount=this.downloadedResources.length,this.serverCount=this.downloadedResources.length)}setItems(e,t){if(logger.info(`[TF_SDK:171] \u2705 setItems() called for '${this.key}'. Items length:`,e?e.length:0,"fromSearch:",t),this.selectItems=e,typeof e=="string")try{e=JSON.parse(e)}catch(l){logger.warn(l.message),e=[]}if(this.component.onSetItems){const l=typeof this.component.onSetItems=="function"?this.component.onSetItems(this,e):this.evaluate(this.component.onSetItems,{items:e},"items");l&&(e=l)}!this.choices&&this.refs.selectContainer&&this.empty(this.refs.selectContainer),this.component.selectValues&&(e=_.get(e,this.component.selectValues,e)||[]);let n;if(this.itemsFromUrl){n=this.isSelectURL?_.isEqual(e,this.downloadedResources):!1;const l=this.component.limit>e.length,i=n&&this.downloadedResources&&this.downloadedResources.length===e.length;l?this.disableInfiniteScroll():i?this.selectOptions=[]:this.serverCount=e.serverCount}if(this.isScrollLoading&&e)n||(this.downloadedResources=this.downloadedResources?this.downloadedResources.concat(e):e),this.downloadedResources.serverCount=e.serverCount||this.downloadedResources.serverCount;else if(this.downloadedResources=e||[],this.selectOptions=[],!_.isEmpty(this.dataValue)&&this.component.idPath){const l=_.get(this.dataValue,this.component.idPath,null),i=!_.isNil(l)&&e.find(c=>_.get(c,this.component.idPath)===l);i&&this.setValue(i)}if(t||this.addValueOptions(e),this.component.widget==="html5"&&!this.component.placeholder&&this.addOption(null,""),_.each(e,(l,i)=>{if(this.root&&this.root.options.editForm&&this.root.options.editForm._id&&this.root.options.editForm._id===l._id)return;const c=this.selectValueAndLabel(l);this.addOption(c.value,c.label,{},_.get(l,this.component.idPath,String(i)))}),logger.info(`[TF_SDK:172] \u2705 selectOptions generated for '${this.key}', length:`,this.selectOptions.length),this.choices)if(logger.info(`[TF_SDK:173] \u2705 this.choices is true for '${this.key}', dataSrc:`,this.component.dataSrc),this.component.dataSrc==="masterdata"&&this.component.masterdata)if(this.selectOptions.sort(function(l,i){const c=typeof l.label=="string"?l.label:typeof l.value=="string"?l.value:"",d=typeof i.label=="string"?i.label:typeof i.value=="string"?i.value:"";return c.localeCompare?c.localeCompare(d):c>d?1:c<d?-1:0}),this.isScrollLoading){let l=[];for(let i=0;i<e.length;i++)for(let c=0;c<this.selectOptions.length;c++)this.selectOptions[c].value===e[i][this.component.valueProperty]&&l.push(this.selectOptions[c]);logger.info(`[TF_SDK:175] \u2705 setChoices called (scrollLoading) for '${this.key}' with array length:`,l.length),this.choices.setChoices(l,"value","label",!1)}else logger.info(`[TF_SDK:176] \u2705 setChoices called (normal masterdata) for '${this.key}' with array length:`,this.selectOptions.length),this.choices.setChoices(this.selectOptions,"value","label",!0);else logger.info(`[TF_SDK:177] \u2705 setChoices called (non-masterdata) for '${this.key}' with array length:`,this.selectOptions.length),this.choices.setChoices(this.selectOptions,"value","label",!0);else this.loading;this.isScrollLoading=!1,this.loading=!1;let o=!1;if(this.choices&&this.choices.input&&this.choices.input.isFocussed&&(o=this.choices.input.isFocussed),!(t&&o))if(this.isEmpty()){if(this.shouldAddDefaultValue&&!this.options.readOnly){const l=this.defaultValue;this.isEmpty(l)||this.setValue(l)}}else if(localStorage.getItem("renderMode")==="html"){var s=this.component.template,h=s.substring(s.lastIndexOf(".")+1,s.length),a=h.substring(0,h.indexOf("}"),h.length);if(a=a.trim(),e.length>0&&this.component.multiple){let l=[];for(let i=0;i<e.length;i++)l.push(e[i][a]);this.setValue(l,{noUpdateEvent:!1})}}else this.setValue(this.dataValue,{noUpdateEvent:!0});this.itemsLoadedResolve()}getSingleItemValueForHTMLMode(e){const t=this.selectOptions&&this.selectOptions.find(({value:n})=>_.isEqual(n,e));return t&&t.label||e}itemValueForHTMLMode(e){return this.isHtmlRenderMode()?Array.isArray(e)?e.map(n=>Array.isArray(n)?this.itemValueForHTMLMode(n):this.getSingleItemValueForHTMLMode(n)).join(", "):this.getSingleItemValueForHTMLMode(e):super.itemValueForHTMLMode(e)}get defaultValue(){let e=super.defaultValue;return!e&&(this.component.defaultValue===!1||this.component.defaultValue===0)&&(e=this.component.defaultValue),e}get loadingError(){return!this.component.refreshOn&&!this.component.refreshOnBlur&&this.networkError}loadItems(e,t,n,o,r,s){if(o=o||{},!this.shouldLoad||!this.itemsFromUrl&&this.options.readOnly){this.isScrollLoading=!1,this.loading=!1,this.itemsLoadedResolve();return}const h=parseInt(this.component.minSearch,10);if(this.component.searchField&&h>0&&(!t||t.length<h))return this.setItems([]);r=r||"GET",r.toUpperCase()==="GET"&&(s=null);const a=this.component.limit||100,l=this.isScrollLoading?this.selectOptions.length:0,i=this.component.disableLimit?{}:{limit:a,skip:l};if(e=this.interpolate(e,{formioBase:Formio.getBaseUrl(),search:t,limit:a,skip:l,page:Math.abs(Math.floor(l/a))}),this.component.searchField&&t){const c=Array.isArray(t)?t.join(","):typeof t=="object"?JSON.stringify(t):t;i[this.component.searchField]=this.component.searchField.endsWith("__regex")?_.escapeRegExp(c):c}this.component.selectFields&&(i.select=this.component.selectFields),this.component.sort&&(i.sort=this.component.sort),_.isEmpty(i)||(e+=(e.includes("?")?"&":"?")+Formio.serialize(i,c=>this.interpolate(c))),this.component.filter&&(e+=(e.includes("?")?"&":"?")+this.interpolate(this.component.filter)),o.ignoreCache=this.component.ignoreCache,o.header=n,this.loading=!0,Formio.makeRequest(this.options.formio,"select",e,r,s,o).then(c=>{this.loading=!1,this.error=null,this.setItems(c,!!t)}).catch(c=>{this.itemsFromUrl&&(this.setItems([]),this.disableInfiniteScroll()),this.isScrollLoading=!1,this.handleLoadingError(c)})}handleLoadingError(e){this.loading=!1,e.networkError&&(this.networkError=!0),this.itemsLoadedResolve(),this.emit("componentError",{component:this.component,message:e.toString()}),logger.warn(`[TF_SDK:178] \u26A0\uFE0F Unable to load resources for ${this.key}`)}get requestHeaders(){const e=new Formio.Headers;if(this.component.data&&this.component.data.headers)try{_.each(this.component.data.headers,t=>{t.key&&e.set(t.key,this.interpolate(t.value))})}catch(t){logger.warn(t.message)}return e}getCustomItems(){const e=this.evaluate(this.component.data.custom,{values:[]},"values");return this.asyncValues=L(e),e}asyncCustomValues(){return _.isBoolean(this.asyncValues)||this.getCustomItems(),this.asyncValues}updateCustomItems(e){if(this.asyncCustomValues()){if(!e&&!this.active){this.itemsLoadedResolve();return}this.loading=!0,this.getCustomItems().then(t=>{this.loading=!1,this.setItems(t||[])}).catch(t=>{this.handleLoadingError(t)})}else this.setItems(this.getCustomItems()||[])}isEmpty(e=this.dataValue){return super.isEmpty(e)||e===void 0}refresh(e,t){if(this.component.clearOnRefresh){const n=t?t.instance:null;n&&!n.pristine&&this.setValue(this.emptyValue)}this.updateItems(null,!0)}get additionalResourcesAvailable(){return _.isNil(this.serverCount)||this.serverCount>this.downloadedResources.length}get serverCount(){return this.isFromSearch?this.searchServerCount:this.defaultServerCount}set serverCount(e){this.isFromSearch?this.searchServerCount=e:this.defaultServerCount=e}get downloadedResources(){return this.isFromSearch?this.searchDownloadedResources:this.defaultDownloadedResources}set downloadedResources(e){this.isFromSearch?this.searchDownloadedResources=e:this.defaultDownloadedResources=e}get filteredMasterdata(){if(!this.component.masterdata)return[];let e=[...this.component.masterdata];if(this.component.filter)try{const t=this.component.filter.replace(/(~=\s*)(\{\{.*?\}\})/g,'$1"$2"'),n=this.interpolate(t,{data:this.data}),o=filtrex.compileExpression(n,{customProp:filtrex.useDotAccessOperatorAndOptionalChaining,extraFunctions:{equalsIgnoreCase:(r,s)=>String(r).toLowerCase()===String(s).toLowerCase(),matchIgnoreCase:(r,s)=>new RegExp(s,"i").test(String(r))}});e=e.filter(r=>o({data:r}))}catch(t){return console.warn("[TF_SDK:153] \u26A0\uFE0F Filter error:",t),[]}return e}updateItems(e,t){if(logger.info(`[TF_SDK:179] \u2705 updateItems() called for '${this.key}'. searchInput:`,e,"forceUpdate:",t,"dataSrc:",this.component.dataSrc),this.itemsLoaded=new Promise(n=>{this.itemsLoadedResolve=n}),!this.component.data){logger.warn(`[TF_SDK:180] \u26A0\uFE0F Select component ${this.key} does not have data configuration.`),this.itemsLoadedResolve();return}if(!this.visible){this.itemsLoadedResolve();return}switch(this.component.dataSrc){case"values":this.setItems(this.component.data.values);break;case"json":this.setItems(this.component.data.json);break;case"custom":this.updateCustomItems();break;case"masterdata":logger.info(`[TF_SDK:181] \u2705 masterdata case for '${this.key}'. masterdata length:`,this.filteredMasterdata?this.filteredMasterdata.length:0);let n=this.filteredMasterdata||[];if(n.length>0&&(n=n.map(o=>o&&typeof o=="object"&&!o.data?Object.assign({data:o},o):o)),!this.isFromSearch&&!this.isScrollLoading&&!this.component.dropdownOpened)if(logger.info(`[TF_SDK:182] \u2705 masterdata: Initial/Unopened State for '${this.key}'`),this.defaultDownloadedResources&&this.defaultDownloadedResources.length>0&&this.defaultDownloadedResources.length<n.length)logger.info(`[TF_SDK:183] \u2705 masterdata: defaultDownloadedResources > 0 for '${this.key}'`),this.setItems(this.defaultDownloadedResources);else if(!this.component.dropdownOpened&&this.data[this.key]&&String(this.data[this.key]).trim().length>0){logger.info(`[TF_SDK:184] \u2705 masterdata: Has pre-existing value for '${this.key}'`,this.data[this.key]);let o=[];this.component.multiple&&n.length>0?this.data[this.key].forEach(s=>n.filter(h=>{const a=_.get(h,this.component.valueProperty);(typeof a!="string"?String(a):a).includes(s)&&o.push(h)})):n.length>0&&(o=n.filter(s=>{const h=_.get(s,this.component.valueProperty),a=typeof h!="string"?String(h):h;return a==null?void 0:a.includes(this.data[this.key])}));const r=o.filter((s,h)=>h===o.findIndex(a=>_.get(s,this.component.valueProperty)===_.get(a,this.component.valueProperty)));this.setItems(r)}else logger.info(`[TF_SDK:185] \u2705 masterdata: No pre-existing value, loading full list for '${this.key}' (length: ${n.length})`),this.setItems(n);else logger.info(`[TF_SDK:186/187] \u2705 masterdata: Search/Scroll/Opened State for '${this.key}', loading list (length: ${n.length})`),this.setItems(n);break;case"resource":{if(!this.component.data.resource||!t&&!this.active){this.itemsLoadedResolve();return}let o=this.options.formio?this.options.formio.formsUrl:`${Formio.getProjectUrl()}/form`;if(o+=`/${this.component.data.resource}/submission`,t||this.additionalResourcesAvailable||!this.serverCount)try{this.loadItems(o,e,this.requestHeaders)}catch(r){logger.warn(`[TF_SDK:188] \u26A0\uFE0F Unable to load resources for ${this.key}`)}else this.setItems(this.downloadedResources);break}case"url":{if(!t&&!this.active&&!this.calculatedValue){this.itemsLoadedResolve();return}let{url:o}=this.component.data,r,s;o.startsWith("/")&&(o=(o.startsWith("/project")?Formio.getBaseUrl():Formio.getProjectUrl()||Formio.getBaseUrl())+o),this.component.data.method?(r=this.component.data.method,r.toUpperCase()==="POST"?s=this.component.data.body:s=null):r="GET";const h=this.component.authenticate?{}:{noToken:!0};this.loadItems(o,e,this.requestHeaders,h,r,s);break}case"indexeddb":{if(typeof window=="undefined")return;if(window.indexedDB||window.alert("Your browser doesn't support current version of indexedDB"),this.component.indexeddb&&this.component.indexeddb.database&&this.component.indexeddb.table){const o=window.indexedDB.open(this.component.indexeddb.database);o.onupgradeneeded=r=>{if(this.component.customOptions){const s=r.target.result,h=s.createObjectStore(this.component.indexeddb.table,{keyPath:"myKey",autoIncrement:!0});h.transaction.oncomplete=()=>{const a=s.transaction(this.component.indexeddb.table,"readwrite");this.component.customOptions.forEach(l=>{a.objectStore(this.component.indexeddb.table).put(l)})}}},o.onerror=()=>{window.alert(o.errorCode)},o.onsuccess=r=>{const a=r.target.result.transaction(this.component.indexeddb.table,"readwrite").objectStore(this.component.indexeddb.table);new Promise(l=>{const i=[];a.getAll().onsuccess=c=>{c.target.result.forEach(d=>{i.push(d)}),l(i)}}).then(l=>{_.isEmpty(this.component.indexeddb.filter)||(l=_.filter(l,this.component.indexeddb.filter)),this.setItems(l)})}}}}}addPlaceholder(){!this.component.placeholder||!this.component.placeholder.trim()||this.addOption("",this.component.placeholder,{placeholder:!0})}activate(){(this.loading||!this.active)&&this.setLoadingItem(),!this.active&&(this.activated=!0,this.triggerUpdate())}setLoadingItem(e=!1){this.choices?e?this.choices.setChoices([{value:`${this.id}-loading`,label:"Loading...",disabled:!0}],"value","label"):this.choices.setChoices([{value:"",label:`<i class="${this.iconClass("refresh")}" style="font-size:1.3em;"></i>`,disabled:!0}],"value","label",!0):(this.component.dataSrc==="url"||this.component.dataSrc==="resource")&&this.addOption("",this.t("loading..."))}get active(){return this.component.dataSrc==="masterdata"&&this.component.masterdata?!this.component.lazyLoad||this.activated:!this.component.lazyLoad||this.activated}render(){const e=this.inputInfo;return e.attr=e.attr||{},e.multiple=this.component.multiple,super.render(this.wrapElement(this.renderTemplate("select",{input:e,selectOptions:"",index:null})))}wrapElement(e){return this.component.addResource&&!this.options.readOnly?this.renderTemplate("resourceAdd",{element:e}):e}choicesOptions(){const e=this.component.hasOwnProperty("searchEnabled")?this.component.searchEnabled:!0,t=this.t(this.component.placeholder,{_userInput:!0});let n=this.component.customOptions||{};if(typeof n=="string")try{n=JSON.parse(n)}catch(a){logger.warn(a.message),n={}}const o={maxPatternLength:1e3,distance:1e3};let r={tokenize:!0,matchAllTokens:!0},s={include:"score",threshold:_.get(this,"component.searchThreshold",.3)},h={removeItemButton:this.component.disabled?!1:_.get(this.component,"removeItemButton",!0),itemSelectText:"",classNames:{containerOuter:"choices form-group formio-choices",containerInner:this.transform("class","form-control ui fluid selection dropdown")},addItemText:!1,allowHTML:!0,placeholder:!!this.component.placeholder,placeholderValue:t,noResultsText:this.t("No results found"),noChoicesText:this.t("No choices to choose from"),searchPlaceholderValue:this.t("Type to search"),shouldSort:!1,position:this.component.dropdown?this.component.dropdown:window.platform&&window.platform.iosPlatform?"bottom":"auto",searchEnabled:e,searchChoices:!this.component.searchField,searchFields:_.get(this,"component.searchFields",["label"]),searchResultLimit:_.get(this,"component.searchResultLimit",this.component.limit||100),fuseOptions:this.component.useExactSearch?Object.assign(r,o):Object.assign({},_.get(this,"component.fuseOptions",{}),Object.assign(s,o)),valueComparer:(a,l)=>{if(_.isEqual(a,l))return!0;if(a==null||l==null)return!1;if((typeof a=="string"||typeof a=="number")&&typeof l=="object"){const i=l.data||l;return i.id===a||i._id===a||i.value===a||this.component.valueProperty&&_.get(i,this.component.valueProperty)===a?!0:Object.values(i).some(c=>c===a||String(c)===String(a))}if((typeof l=="string"||typeof l=="number")&&typeof a=="object"){const i=a.data||a;return i.id===l||i._id===l||i.value===l||this.component.valueProperty&&_.get(i,this.component.valueProperty)===l?!0:Object.values(i).some(c=>c===l||String(c)===String(l))}if(typeof a=="object"&&typeof l=="object"){const i=a.data||a,c=l.data||l;if(_.isEqual(i,c))return!0;if(this.component.idPath){const d=_.get(a,this.component.idPath)||_.get(i,this.component.idPath),g=_.get(l,this.component.idPath)||_.get(c,this.component.idPath);if(d&&g&&d===g)return!0}if(i.id&&c.id&&String(i.id)===String(c.id)||i._id&&c._id&&String(i._id)===String(c._id))return!0}return!1},resetScrollPosition:!1};return Object.assign(h,n)}attach(e){this.component.dropdownOpened=!1;const t=super.attach(e);this.loadRefs(e,{selectContainer:"single",addResource:"single",autocompleteInput:"single"});const n=this.refs.autocompleteInput;n&&this.addEventListener(n,"change",a=>{this.setValue(a.target.value)});const o=this.refs.selectContainer;if(!o)return;if(this.addEventListener(o,this.inputInfo.changeEvent,()=>{if(this.isUpdatingChoices>0){logger.debug(`[TF_SDK] \u2139\uFE0F Ignored programmatic change event on '${this.key}'`);return}this.updateValue(null,{modified:!0})}),this.attachRefreshOnBlur(),this.component.widget==="html5"){this.addFocusBlurEvents(o),this.triggerUpdate(null,!0),this.visible&&this.setItems(this.selectOptions||[]),this.focusableElement=o,this.addEventListener(o,"focus",()=>this.update()),this.addEventListener(o,"keydown",a=>{const{key:l}=a;["Backspace","Delete"].includes(l)&&this.setValue(this.emptyValue)});return}const r=o.tabIndex;this.addPlaceholder(),o.setAttribute("dir",this.i18next.dir()),this.choices&&this.choices.containerOuter&&this.choices.containerOuter.element&&this.choices.containerOuter.element.parentNode&&this.choices.destroy();const s=this.choicesOptions();if(Choices&&(this.choices=new Choices(o,s),["setChoices","setValue","removeActiveItems","clearStore","removeItemsByValue","setChoiceByValue"].forEach(l=>{if(typeof this.choices[l]=="function"){const i=this.choices[l];this.choices[l]=(...c)=>{this.isUpdatingChoices=(this.isUpdatingChoices||0)+1;try{return i.apply(this.choices,c)}finally{this.isUpdatingChoices--}}}}),this.selectOptions&&this.selectOptions.length&&this.choices.setChoices(this.selectOptions,"value","label",!0),this.component.multiple?this.focusableElement=this.choices.input.element:(s.searchEnabled&&window.platform&&window.platform.iosPlatform?this.focusableElement=this.choices.input.element:this.focusableElement=this.choices.containerInner.element,this.choices.containerOuter.element.setAttribute("tabIndex","-1"),s.searchEnabled&&this.addEventListener(this.choices.containerOuter.element,"mousedown",()=>this.positionDropdown())),this.addFocusBlurEvents(this.focusableElement),this.itemsFromUrl&&!this.component.noRefreshOnScroll&&(this.scrollList=this.choices.choiceList.element,this.addEventListener(this.scrollList,"scroll",l=>{this.onScroll(l)})),s.removeItemButton&&this.addEventListener(o,"removeItem",()=>{if(this.isRemoveButtonPressed=!0,this.isUpdatingChoices>0){logger.debug(`[TF_SDK] \u2139\uFE0F Ignored programmatic removeItem event on '${this.key}' (standard list)`);return}this.isEmpty(this.dataValue)||this.updateValue(null,{modified:!0})})),window&&this.choices&&this.shouldPositionDropdown){const a=document.getElementById("formio-wrapper");a&&this.addEventListener(a,"scroll",()=>{this.positionDropdown(!0)},!1,!0),this.addEventListener(window.document,"scroll",()=>{this.positionDropdown(!0)},!1,!0)}if(this.focusableElement.setAttribute("tabIndex",r),this.component.searchField){if(this.choices&&this.choices.input&&this.choices.input.element){var h=(c,d)=>{let g;return function(){const u=this,p=arguments;clearTimeout(g),g=setTimeout(()=>c.apply(u,p),d)}};let i=this;this.addEventListener(this.choices.input.element,"input",h(function(c){if(logger.info(`[TF_SDK:INPUT] \u2328\uFE0F Choices input event triggered for '${i.key}'. Search input:`,c.target.value),i.isFromSearch=!!c.target.value,i.component.dataSrc==="masterdata"&&i.component.masterdata)if(c.target.value.length==0)logger.info(`[TF_SDK:INPUT] Search cleared for '${i.key}'`),i.triggerUpdate(),i.searchDownloadedResources=[],i.component.totalSearchResults=[],i.isFromSearch=!1,i.setItems(i.defaultDownloadedResources);else{let m=[];var d=i.component.template||"",g=d.lastIndexOf("."),u="label";if(g!==-1){var p=d.substring(g+1,d.length),y=p.indexOf("}");y!==-1&&(u=p.substring(0,y).trim())}if(logger.info(`[TF_SDK:INPUT] Parsed label key: '${u}', labelProperty: '${i.component.labelProperty}', limit: ${i.component.limit}, uniqueOptions: ${i.component.uniqueOptions}`),m=i.component.masterdata.filter(S=>{if(!S)return!1;let O;const f=[];i.component.labelProperty&&f.push(i.component.labelProperty),u&&!f.includes(u)&&f.push(u);const R=["Name","label","value","text","title"];for(const w of R)f.includes(w)||f.push(w);for(const w of f)if(S[w]!==void 0&&S[w]!==null){O=S[w];break}return O==null?Object.values(S).some(w=>w&&String(w).toLowerCase().includes(c.target.value.toLowerCase())):String(O).toLowerCase().includes(c.target.value.toLowerCase())}),logger.info(`[TF_SDK:INPUT] Found ${m.length} items matching '${c.target.value}' out of ${i.component.masterdata.length}`),m.length>i.component.limit){logger.info(`[TF_SDK:INPUT] Found items count ${m.length} exceeds limit ${i.component.limit}. Slicing.`),i.component.totalSearchResults=[],i.component.totalSearchResults=m;let S=i.component.totalSearchResults.slice(0,i.component.limit);i.setItems(S)}else logger.info(`[TF_SDK:INPUT] Setting items directly. Count: ${m.length}`),i.setItems(m)}else c.target.value?(i.serverCount=null,i.downloadedResources=[]):i.triggerUpdate()},1e3))}this.addEventListener(o,"choice",()=>{this.component.multiple&&this.component.dataSrc==="resource"&&this.isFromSearch&&this.triggerUpdate(),this.isFromSearch=!1});const a=this.component.searchField&&(this.isSelectResource||this.isSelectURL)?(this.component.searchDebounce===0?0:this.component.searchDebounce||this.defaultSchema.searchDebounce)*1e3:0,l=i=>{this.triggerUpdate(i.detail.value)};this.addEventListener(o,"search",_.debounce(i=>{l(i),this.positionDropdown()},a)),this.addEventListener(o,"stopSearch",()=>this.triggerUpdate()),this.addEventListener(o,"hideDropdown",()=>{if(this.component.dropdownOpened=!1,this.component.totalSearchResults=[],this.component.searchDownloadedResources=[],this.isFromSearch=!1,this.component.dataSrc==="masterdata"&&this.component.masterdata){let i,c={};c.limit=this.component.limit;const d=this.filteredMasterdata;this.data[this.key]&&String(this.data[this.key]).length>0&&(i=d.filter(u=>{const p=u[this.component.valueProperty],y=typeof p!="string"?String(p):p;return y==null?void 0:y.includes(this.data[this.key])})),this.defaultDownloadedResources.findIndex(u=>u[this.component.valueProperty]===String(this.data[this.key]))>-1||i&&i.length>0&&this.defaultDownloadedResources.push(i[0]),c=this.defaultDownloadedResources,c.serverCount=d.length,c.skip=this.defaultDownloadedResources.length+this.component.limit,this.setItems(this.defaultDownloadedResources)}}),this.addEventListener(o,"hideDropdown",()=>{const i=document.getElementById("form-container"),c=i?i.scrollTop:0;this.choices&&this.choices.input&&this.choices.input.element&&(this.choices.input.element.value=""),this.component.dataSrc==="masterdata"&&this.updateItems(null,!0),i&&c>0&&requestAnimationFrame(()=>{i.scrollTop===0&&!window._unv_selecting&&(i.scrollTop=c)})})}return this.addEventListener(o,"mousedown",()=>{window._unv_selecting=!0,window.platform&&window.platform.iosPlatform&&document.activeElement&&(document.activeElement.tagName==="INPUT"||document.activeElement.classList.contains("choices__input"))&&document.activeElement.blur(),setTimeout(()=>{window._unv_selecting=!1},500),this.positionDropdown()}),this.addEventListener(o,"showDropdown",()=>{this.activated||this.update(),this.positionDropdown(),this.component.dataSrc==="masterdata"&&this.component.masterdata&&(this.component.dropdownOpened=!0,(!this.defaultDownloadedResources||this.defaultDownloadedResources.length<this.filteredMasterdata.length)&&this.updateItems(null,!0))}),this.shouldPositionDropdown&&this.addEventListener(o,"highlightChoice",()=>{this.positionDropdown()}),this.addEventListener(o,"hideDropdown",()=>{this.component.dataSrc==="masterdata"&&this.component.masterdata&&(this.component.dropdownOpened=!1)}),this.addEventListener(o,"search",a=>{if(logger.info(`[TF_SDK:SEARCH] \u{1F50D} Choices search event triggered for '${this.key}'. Search input:`,a.detail.value),this.component.dataSrc==="masterdata"&&this.component.masterdata){var l=this.component.template||"",i=l.lastIndexOf("."),c="label";if(i!==-1){var d=l.substring(i+1,l.length),g=d.indexOf("}");g!==-1&&(c=d.substring(0,g).trim())}const u=this.component.searchField?this.component.searchField.replace(/__regex$/,""):"";logger.info(`[TF_SDK:SEARCH] Configured searchField: '${this.component.searchField}', clean: '${u}', parsedLabel: '${c}', limit: ${this.component.limit}, uniqueOptions: ${this.component.uniqueOptions}`),this.searchDownloadedResources=this.filteredMasterdata.filter(p=>{if(!p)return!1;let y;const m=[];this.component.searchField&&m.push(this.component.searchField),u&&!m.includes(u)&&m.push(u),this.component.labelProperty&&!m.includes(this.component.labelProperty)&&m.push(this.component.labelProperty),c&&!m.includes(c)&&m.push(c);const S=["Name","label","value","text","title"];for(const f of S)m.includes(f)||m.push(f);for(const f of m)if(p[f]!==void 0&&p[f]!==null){y=p[f];break}let O=!1;return y==null?O=Object.values(p).some(f=>f&&String(f).toLowerCase().includes(a.detail.value.toLowerCase())):O=String(y).toLowerCase().includes(a.detail.value.toLowerCase()),O}),logger.info(`[TF_SDK:SEARCH] Found ${this.searchDownloadedResources.length} matching resources out of ${this.filteredMasterdata.length}`),this.isFromSearch=!0}}),this.choices&&s.placeholderValue&&this.choices._isSelectOneElement&&(this.addPlaceholderItem(s.placeholderValue),this.addEventListener(o,"removeItem",()=>{if(this.addPlaceholderItem(s.placeholderValue),this.isUpdatingChoices>0){logger.debug(`[TF_SDK] \u2139\uFE0F Ignored programmatic removeItem event on '${this.key}' (placeholder list)`);return}this.isEmpty(this.dataValue)||this.updateValue(null,{modified:!0})})),this.addValueOptions(),this.setChoicesValue(this.dataValue),this.isSelectResource&&this.refs.addResource&&this.addEventListener(this.refs.addResource,"click",a=>{a.preventDefault();const l=this.ce("div"),i=this.createModal(l),d=`${_.get(this.root,"formio.projectUrl",Formio.getProjectUrl())}/form/${this.component.data.resource}`;new Form(l,d,{}).ready.then(g=>{g.on("submit",u=>{let p=this.valueProperty?_.get(u,this.valueProperty):u;this.component.multiple&&(p=[...this.dataValue,p]),this.setValue(p),this.triggerUpdate(),i.close()})})}),this.disabled=this.shouldDisabled,this.updateItems(),this.triggerUpdate(),this.component.lazyLoad||(this.activated=!0),t}setDropdownPosition(){let e,t;if(this.choices&&this.choices.dropdown&&this.choices.dropdown.element&&(e=this.choices.dropdown.element),this.choices&&this.choices.containerOuter&&this.choices.containerOuter.element&&(t=this.choices.containerOuter.element),!e||!t){console.warn("[TF_SELECT_LOG:ERR] \u26A0\uFE0F dropdown or container element not found in setDropdownPosition");return}const n=t.getBoundingClientRect(),o=window.visualViewport?window.visualViewport.height:window.innerHeight,r=o-(n.top+n.height),s=n.top;let h=t.classList.contains("is-flipped");!h&&r<180&&s>r?(h=!0,t.classList.add("is-flipped"),e.classList.add("is-flipped")):h&&r>=200&&(h=!1,t.classList.remove("is-flipped"),e.classList.remove("is-flipped"));const a=e.offsetHeight||220;let l,i;h?(i=Math.min(a,Math.max(120,s-20)),l=Math.max(10,n.top-i)):(l=n.top+n.height,i=Math.max(120,Math.min(a,o-l-15)));const c={left:`${n.left}px`,width:`${n.width}px`,position:"fixed",bottom:"unset",right:"unset",top:`${l}px`,maxHeight:`${i}px`};_.assign(e.style,c)}hasDataGridAncestor(e){return e=e||this,e.inDataGrid||e.type==="datagrid"?!0:e.parent?this.hasDataGridAncestor(e.parent):!1}positionDropdown(e){!this.shouldPositionDropdown||!this.choices||this.choices.dropdown&&!this.choices.dropdown.isActive&&e||(this.setDropdownPosition(),this.itemsLoaded.then(()=>{this.setDropdownPosition()}))}get isLoadingAvailable(){return!this.isScrollLoading&&this.additionalResourcesAvailable}onScroll(e){if(!this.isFromSearch)if(this.component.dataSrc==="masterdata"&&this.component.masterdata&&this.defaultDownloadedResources.length<this.filteredMasterdata.length){var t=e.target;E?t.scrollHeight-t.scrollTop===t.clientHeight&&(this.isScrollLoading=!0,this.triggerUpdate(this.choices.input.element.value),this.setMasterdata()):(this.isScrollLoading=!0,this.triggerUpdate(this.choices.input.element.value),this.setMasterdata())}else this.isLoadingAvailable&&(this.isScrollLoading=!0,this.setLoadingItem(!0),this.triggerUpdate(this.choices.input.element.value))}setMasterdata(){if(this.component.dataSrc==="masterdata"&&this.component.masterdata){let e={},t;e.limit=this.component.limit;let n;const o=this.filteredMasterdata;if(this.data[this.key]&&String(this.data[this.key]).trim().length>0&&(n=o.filter(r=>{const s=_.get(r,this.component.valueProperty),h=typeof s!="string"?String(s):s;return h==null?void 0:h.includes(this.data[this.key])})),this.isFromSearch&&this.searchDownloadedResources&&this.searchDownloadedResources.length>0){const r=this.component.totalSearchResults||this.searchDownloadedResources||[];t=r.slice(this.searchDownloadedResources.length,this.searchDownloadedResources.length+this.component.limit),e=t,e.serverCount=r.length,e.skip=this.searchDownloadedResources.length+this.component.limit}else{t=o.slice(this.defaultDownloadedResources.length,this.defaultDownloadedResources.length+this.component.limit);let r=this.defaultDownloadedResources.filter(a=>t.includes(a));if(r&&r.length>0){let a=t.findIndex(l=>_.get(l,this.component.valueProperty)===_.get(r[0],this.component.valueProperty));a>-1&&t.splice(a,1)}let s=t.findIndex(a=>_.get(a,this.component.valueProperty)===String(this.data[this.key]));s>-1&&t.splice(s,1),this.defaultDownloadedResources.findIndex(a=>_.get(a,this.component.valueProperty)===String(this.data[this.key]))>-1||n&&n.length>0&&t.push(n[0]),e=t,e.serverCount=o.length,e.skip=this.defaultDownloadedResources.length+this.component.limit}this.setItems(e)}}attachRefreshOnBlur(){this.component.refreshOnBlur&&this.on("blur",e=>{this.checkRefreshOn([{instance:e,value:e.dataValue}],{fromBlur:!0})})}addPlaceholderItem(e){this.choices._store.activeItems.length||this.choices._addItem({value:e,label:e,choiceId:0,groupId:-1,customProperties:null,placeholder:!0,keyCode:null})}update(){this.component.dataSrc==="custom"&&this.updateCustomItems(),this.activate()}set disabled(e){super.disabled=e,this.choices&&(e?(this.setDisabled(this.choices.containerInner.element,!0),this.focusableElement.removeAttribute("tabIndex"),this.choices.disable()):(this.setDisabled(this.choices.containerInner.element,!1),this.focusableElement.setAttribute("tabIndex",this.component.tabindex||0),this.choices.enable()))}get disabled(){return super.disabled}set visible(e){e&&!this._visible!=!e&&this.triggerUpdate(),super.visible=e}get visible(){return super.visible}addCurrentChoices(e,t,n){if(!e)return!1;const o=[],r=e.reduce((s,h)=>{if(!h||_.isEmpty(h))return s;let a=!1;const l=t===this.selectOptions;return t&&t.length&&_.each(t,i=>{if(i._id&&h._id&&i._id===h._id)return a=!0,!1;const c=n?i.value:this.itemValue(i,l);return a|=_.isEqual(c,h),!a}),a?a||s:(o.push(this.selectValueAndLabel(h)),!0)},!1);return this.component.dataSrc==="masterdata"&&this.component.masterdata?this.isFromSearch||o.length&&(this.choices&&this.choices.setChoices(o,"value","label"),o.map(s=>{this.addOption(s.value,s.label)})):o.length&&(this.choices&&this.choices.setChoices(o,"value","label"),o.map(s=>{this.addOption(s.value,s.label)})),r}getValueAsString(e,t){return this.component.multiple&&Array.isArray(e)?e.map(n=>this.asString(n,t)).join(", "):this.asString(e,t)}getValue(){if(this.viewOnly||this.loading||!this.component.lazyLoad&&!this.selectOptions.length||!this.element)return this.dataValue;let e=this.emptyValue;if(this.choices)e=this.choices.getValue(!0),!this.component.multiple&&this.component.placeholder&&e===this.t(this.component.placeholder,{_userInput:!0})&&(e=this.emptyValue);else if(this.refs.selectContainer){if(e=this.refs.selectContainer.value,this.valueProperty===""||this.isEntireObjectDisplay()){if(e==="")return{};const t=this.selectOptions[e]||this.selectOptions.find(n=>n.id===e);t&&_.isObject(t.value)&&(e=t.value)}}else e=this.dataValue;return e==null&&(e=""),e}redraw(){const e=super.redraw();return this.triggerUpdate(),e}normalizeSingleValue(e,t){if(_.isNil(e))return;const n=_.isObject(e);if(n&&Object.keys(e).length===0)return e;if(t){const s=this.component.reference&&e&&e._id?e._id.toString():e,h=!n||this.component.reference;if(s&&h&&this.templateData&&this.templateData[s]&&this.root&&this.root.submission){const a=this.root.submission;a.metadata||(a.metadata={}),a.metadata.selectData||(a.metadata.selectData={});let l=this.templateData[s];if(this.component.multiple){l={};const i=this.dataValue;i&&_.isArray(i)&&i.length&&i.forEach(c=>{const d=this.component.reference?c._id.toString():c;l[d]=this.templateData[d]}),l[e]=this.templateData[e]}_.set(a.metadata.selectData,this.path,l)}}const o=this.component.dataType||"auto",r={value:e,number(){const s=Number(this.value),h=e.toString()===s.toString();return!Number.isNaN(s)&&Number.isFinite(s)&&e!==""&&h&&(this.value=s),this},boolean(){return _.isString(this.value)&&(this.value.toLowerCase()==="true"||this.value.toLowerCase()==="false")&&(this.value=this.value.toLowerCase()==="true"),this},string(){return this.value=String(this.value),this},object(){return this},auto(){return _.isObject(this.value)?this.value=this.object().value:this.value=this.string().number().boolean().value,this}};try{return r[o]().value}catch(s){return logger.warn("[TF_SDK:189] \u26A0\uFE0F Failed to normalize value",s),e}}normalizeValue(e){return this.component.multiple&&Array.isArray(e)?e.map(t=>this.normalizeSingleValue(t,!0)):super.normalizeValue(this.normalizeSingleValue(e,!0))}updateValue(e,t){return this.isUpdatingChoices>0?(logger.debug(`[TF_SDK] \u2139\uFE0F Blocked updateValue call on '${this.key}' due to programmatic choices update.`),!1):super.updateValue(e,t)}setValue(e,t={}){if(e&&String(e).length>0&&$(".barcode-select-error").remove(),localStorage.getItem("renderMode")==="html"&&this.component.dataSrc==="values"&&this.component.data.values.filter(i=>{(e&&i.value===e||e&&i.value===String(e))&&(e=i.label)}),localStorage.getItem("renderMode")==="html"&&this.component.dataSrc==="masterdata"&&!this.component.multiple){var n=this.component.template,o=n.substring(n.lastIndexOf(".")+1,n.length),r=o.substring(0,o.indexOf("}"),o.length);r=r.trim(),this.component.masterdata.filter(i=>{(e&&i[this.component.valueProperty]===e||e&&i[this.component.valueProperty]===String(e))&&(e=i[r])})}const s=this.dataValue,h=this.updateValue(e,t);e=this.dataValue;const a=!this.isEmpty(s),l=!this.isEmpty(e);if(this.component.multiple&&Array.isArray(e)?e=e.map(i=>typeof i=="boolean"||typeof i=="number"?i.toString():i):(typeof e=="boolean"||typeof e=="number")&&(e=e.toString()),this.isHtmlRenderMode()&&t&&t.fromSubmission&&h)return this.itemsLoaded.then(()=>{this.redraw()}),h;if(this.loading)return h;if(this.isInitApiCallNeeded(l)){this.loading=!0,this.lazyLoadInit=!0;const i=this.component.searchField||this.component.valueProperty;return this.triggerUpdate(_.get(e.data||e,i,e),!0),h}return this.itemsLoaded.then(()=>{this.addValueOptions(),this.setChoicesValue(e,a,t)}),h}isInitApiCallNeeded(e){return this.component.lazyLoad&&!this.lazyLoadInit&&!this.active&&!this.selectOptions.length&&e&&this.shouldInitialLoad&&this.visible&&(this.component.searchField||this.component.valueProperty)}setChoicesValue(e,t,n={}){const o=!this.isEmpty(e)||n.fromSubmission;if(t=t===void 0?!0:t,this.choices)if(o)if(this.component.dataSrc==="masterdata"&&this.component.masterdata){if(!this.isFromSearch){this.choices.removeActiveItems();const r=Array.isArray(e)?e:[e];this.addCurrentChoices(r,this.selectOptions,!0)||this.choices.setChoices(this.selectOptions,"value","label",!0),this.choices.setChoiceByValue(e)}}else{this.choices.removeActiveItems();const r=Array.isArray(e)?e:[e];this.addCurrentChoices(r,this.selectOptions,!0)||this.choices.setChoices(this.selectOptions,"value","label",!0),this.choices.setChoiceByValue(e)}else(t||n.resetValue)&&this.choices.removeActiveItems();else if(o){const r=Array.isArray(e)?e:[e];if(!_.isEqual(this.dataValue,this.defaultValue)&&this.selectOptions.length<2||this.selectData&&n.fromSubmission){const{value:s,label:h}=this.selectValueAndLabel(this.dataValue);this.addOption(s,h)}_.each(this.selectOptions,s=>{_.each(r,h=>{if(s.value===""&&(s.value={}),_.isEqual(h,s.value)&&s.element)return s.element.selected=!0,s.element.setAttribute("selected","selected"),!1})})}else _.each(this.selectOptions,r=>{r.element&&(r.element.selected=!1,r.element.removeAttribute("selected"))})}get itemsLoaded(){return this._itemsLoaded||Promise.resolve()}set itemsLoaded(e){this._itemsLoaded=e}validateValueAvailability(e,t){if(!F(e)||!t)return!0;const n=this.getOptionsValues();if(n){if(_.isObject(t)){const o=r=>{const s=this.normalizeSingleValue(r,!0);if(!_.isObject(s))return!1;try{return JSON.stringify(s)===JSON.stringify(t)}catch(h){return logger.error("Error while comparing items",h),!1}};return n.findIndex(r=>o(r))!==-1}return n.findIndex(o=>this.normalizeSingleValue(o)===t)!==-1}return!1}getOptionValue(e){return _.isObject(e)&&this.isEntireObjectDisplay()?this.normalizeSingleValue(e):_.isObject(e)&&(this.valueProperty||this.component.key!=="resource")?e:_.isObject(e)&&!this.valueProperty?this.interpolate(this.component.template,{item:e}).replace(/<\/?[^>]+(>|$)/g,""):_.isNull(e)?this.emptyValue:String(this.normalizeSingleValue(e))}getOptionsValues(){let e=[];switch(this.component.dataSrc){case"values":e=this.component.data.values;break;case"json":e=this.component.data.json;break;case"custom":e=this.getCustomItems();break}if(typeof e=="string")try{e=JSON.parse(e)}catch(t){logger.warn(t.message),e=[]}if(Array.isArray(e))return e.map(t=>this.getOptionValue(this.itemValue(t)))}deleteValue(){this.setValue("",{noUpdateEvent:!0}),this.unset()}validateMultiple(){return!1}isBooleanOrNumber(e){return typeof e=="number"||typeof e=="boolean"}getNormalizedValues(){if(!(!this.component||!this.component.data||!this.component.data.values))return this.component.data.values.map(e=>({label:e.label,value:String(this.normalizeSingleValue(e.value))}))}asString(e,t={}){var r;e=e||this.getValue();const n=(s,h)=>h?(Array.isArray(s)?s.forEach(a=>a[h]=a[h].toString()):s[h]=s[h].toString(),s):(this.isBooleanOrNumber(s)&&(s=s.toString()),Array.isArray(s)&&s.some(a=>this.isBooleanOrNumber(a))&&(s=s.map(a=>{this.isBooleanOrNumber(a)&&(a=a.toString())})),s);if(e=n(e),this.component.dataSrc==="masterdata"&&this.component.masterdata){const s=h=>(typeof h=="string"||typeof h=="number")&&this.findMasterdataItem(h)||h;Array.isArray(e)?e=e.map(s):e!=null&&(e=s(e))}if(["values","custom"].includes(this.component.dataSrc)&&!this.asyncCustomValues()){const{items:s,valueProperty:h}=this.component.dataSrc==="values"?{items:n(this.getNormalizedValues(),"value"),valueProperty:"value"}:{items:n(this.getCustomItems(),this.valueProperty),valueProperty:this.valueProperty},a=()=>{const l=_.find(s,[h,e]),i=this.defaultSchema.data.values||[];return _.isEqual(l,i[0])?"-":l};e=this.component.multiple&&Array.isArray(e)?_.filter(s,l=>e.includes(l.value)):h?(r=a())!=null?r:{value:e,label:e}:e}if(_.isString(e)&&this.component.dataSrc!=="masterdata")return e;const o=s=>{const h=this.itemTemplate(s);return t.csv&&h?unescapeHTML(h):h};if(Array.isArray(e)){const s=[];return e.forEach(h=>s.push(o(h))),this.component.dataSrc==="resource"&&s.length>0?s.join(", "):s.length>0?s.join("<br />"):"-"}return this.isEntireObjectDisplay()&&_.isObject(e)?JSON.stringify(e):_.isNil(e)?"-":this.itemTemplate(e)}detach(){this.off("blur"),this.choices&&(this.choices&&this.choices.containerOuter&&this.choices.containerOuter.element&&this.choices.containerOuter.element.parentNode&&this.choices.destroy(),this.choices=null),super.detach()}focus(){this.focusableElement&&(super.focus.call(this),this.focusableElement.focus())}setErrorClasses(e,t,n,o,r=this.element){super.setErrorClasses(e,t,n,o,r),this.choices?super.setErrorClasses([this.choices.containerInner.element],t,n,o,r):super.setErrorClasses([this.refs.selectContainer],t,n,o,r)}addFocusBlurEvents(e){this.addEventListener(e,"focus",()=>{this.root.focusedComponent!==this?(this.root.pendingBlur&&this.root.pendingBlur(),this.root.focusedComponent=this,this.emit("focus",this)):this.root.focusedComponent===this&&this.root.pendingBlur&&(this.root.pendingBlur.cancel(),this.root.pendingBlur=null)}),this.addEventListener(e,"blur",()=>{this.root.pendingBlur=FormioUtils.delay(()=>{this.emit("blur",this),this.component.validateOn==="blur"&&this.root.triggerChange({fromBlur:!0},{instance:this,component:this.component,value:this.dataValue,flags:{fromBlur:!0}}),this.root.focusedComponent=null,this.root.pendingBlur=null})})}}b&&b.Components?b.Components.addComponent("select",I):typeof Formio!="undefined"&&Formio.Components&&Formio.Components.addComponent("select",I)})();</script>
38326
38864
  <script>(function(){var n=window._;const E=Promise,u=window.Formio;var S=u.Components;const F=u.Components.components.base,v=u.Components.components.componentmodal,w=window.EventEmitter3?window.EventEmitter3.EventEmitter||window.EventEmitter3:window.EventEmitter,V=u.Form,g=u.Utils.isMongoId,C=u.Utils.eachComponent,R=u.Utils.getStringFromComponentPath,D=u.Utils.getArrayFromComponentPath,O=()=>({components:[]});class p extends F{static schema(...t){return F.schema({label:"Form",type:"form",key:"form",src:"",reference:!0,form:"",path:"",tableView:!0},...t)}static get builderInfo(){return{title:"Smart Nested Form",group:"premium",icon:"wpforms",documentation:"/userguide/#smartnestedform",weight:110,schema:p.schema()}}static savedValueTypes(){return[u.Utils.componentValueTypes.object]}init(){if(super.init(),window.formdesign=window.formdesign||[],this.component.form){this.component.formdesign&&window.formdesign&&!window.formdesign.some(o=>o.key===this.component.key)&&window.formdesign.push({key:this.component.key,formdesign:this.component.formdesign,data:!0});let t=[];t=window.formdesign.filter(o=>o.key===this.component.key);let e=this;const s=e.component.form;let i=e.component.selNestedFormVersion;if(t.length>0&&!t[0].data||t.length==0)u.makeStaticRequest(`${localStorage.getItem("UMP_url")}/UMP/API/v3/applications/DIGITAL_FORMS/execute/DIGITAL_FORMS_PA_GET_FORM_DATA?queuedExecute=false&messageFormat=custom&inputMessage=%7B%22formId%22%3A%22${s}%22%2C%22type%22%3A%22form%22%2C%22version%22%3A%22${i}%22%7D&sensitive=undefined&externalReference=undefined`,"POST",null,{headers:{Authorization:"Bearer "+localStorage.getItem("token"),Accept:"application/json","Content-type":"application/json"}}).then(function(o){if(o){typeof o!="object"&&(o=JSON.parse(o));let r=e.getMasterdDataresource(o.formData,"dataSrc","masterdata");const h={key:e.component.key,formdesign:r,category:o.category,data:!0};window.formdesign.push(h),e.createSubForm().then(()=>{e.element&&e.attach(e.element)})}}).catch(o=>{logger.error("[TF_SDK:55] \u274C Error getting form data",o)});else if(window.formdesign&&this.component.form){for(let o=0;o<window.formdesign.length;o++)if(window.formdesign[o].key==this.component.key){let r=this.getMasterdDataresource(window.formdesign[o].formdesign,"dataSrc","masterdata");window.formdesign[o].formdesign=r}}}if(this.formObj={display:this.component.display,settings:this.component.settings,components:this.component.components},this.valueChanged=!1,this.subForm=null,this.formSrc="",this.component.src&&(this.formSrc=this.component.src),!this.component.src&&!this.options.formio&&(this.component.form||this.component.path)&&(this.component.project?(this.formSrc=u.getBaseUrl(),g(this.component.project)&&(this.formSrc+="/project"),this.formSrc+=`/${this.component.project}`,this.options.project=this.formSrc):(this.formSrc=u.getProjectUrl(),this.options.project=this.formSrc),this.component.form?g(this.component.form)?this.formSrc+=`/form/${this.component.form}`:this.formSrc+=`/${this.component.form}`:this.component.path&&(this.formSrc+=`/${this.component.path}`)),!this.formSrc&&this.options.formio){const t=this.options.formio.formsUrl;if(this.component.form&&g(this.component.form))this.formSrc=`${t}/${this.component.form}`;else{const e=this.component.path||this.component.form;this.formSrc=`${t.replace(/\/form$/,"")}/${e}`}}return this.builderMode&&this.component.hasOwnProperty("formRevision")&&(this.component.revision=this.component.formRevision,delete this.component.formRevision),(this.component.revision||this.component.revision===0||this.component.formRevision||this.component.formRevision===0||this.component.revisionId)&&this.setFormRevision(this.component.revisionId||this.component.revision||this.component.formRevision),this.createSubForm()}get dataReady(){var t;return((t=this.subForm)==null?void 0:t.dataReady)||this.subFormReady||Promise.resolve()}get defaultValue(){return this.subForm?super.defaultValue:null}get defaultSchema(){return p.schema()}get emptyValue(){return{data:{}}}get hasDefaultValue(){return!0}get ready(){return this.subFormReady||Promise.resolve()}get useOriginalRevision(){var t,e;return((t=this.component)==null?void 0:t.useOriginalRevision)&&!!((e=this.formObj)!=null&&e.revisions)}setFormRevision(t){this.formSrc=this.formSrc.replace(/\/v\/[0-9a-z]+/,"");const e=Number.parseInt(t);isNaN(e)?this.subFormRevision=void 0:(this.subFormRevision=t,this.formSrc+=`/v/${t}`)}getComponent(t){return this.subForm?this.subForm.getComponent(t):null}getSubOptions(t={}){return t.events=this.createEmitter(),n.set(t,"buttonSettings.showSubmit",!1),t.parent=this,this.options&&(this.options.base&&(t.base=this.options.base),this.options.project&&(t.project=this.options.project),(this.options.readOnly||this.component.disabled)&&(t.readOnly=this.options.readOnly||this.component.disabled),this.options.breadcrumbSettings&&(t.breadcrumbSettings=this.options.breadcrumbSettings),this.options.buttonSettings&&(t.buttonSettings=n.clone(this.options.buttonSettings)),this.options.viewAsHtml&&(t.viewAsHtml=this.options.viewAsHtml),this.options.language&&(t.language=this.options.language),this.options.template&&(t.template=this.options.template),this.options.templates&&(t.templates=this.options.templates),this.options.renderMode&&(t.renderMode=this.options.renderMode),this.options.attachMode&&(t.attachMode=this.options.attachMode),this.options.iconset&&(t.iconset=this.options.iconset),this.options.fileService&&(t.fileService=this.options.fileService),this.options.onChange&&(t.onChange=this.options.onChange),this.options.preview&&(t.preview=this.options.preview),this.options.inEditGrid&&(t.inEditGrid=this.options.inEditGrid),this.options.saveDraft&&(t.saveDraft=this.options.saveDraft,t.formio=new u(this.formSrc)),this.options.saveDraftThrottle&&(t.saveDraftThrottle=this.options.saveDraftThrottle),this.options.skipDraftRestore&&(t.skipDraftRestore=this.options.skipDraftRestore),t.parent=this),t}render(){if(this.builderMode)return super.render(this.component.label||"Nested form");const t=this.subForm?this.subForm.render():this.renderTemplate("loading");return super.render(t)}getMasterdDataresource(t,e,s){let i=[];for(let o in t)if(typeof t[o]=="object")i=i.concat(this.getMasterdDataresource(t[o],e,s));else if(o===e&&t[e]===s){let r;t.data&&typeof t.data=="object"&&t.data!==void 0&&t.data.masterdata&&(r=t.data.masterdata);let h=[];const c=localStorage.getItem("resourceData");let a=[];try{a=c?JSON.parse(c):[]}catch(d){a=[]}if(Array.isArray(a)&&r!==void 0&&r!==""){for(let d=0;d<a.length;d++)if((a[d]?a[d].resourceName:null)===r&&a[d].data)try{h.push(JSON.parse(a[d].data).data)}catch(M){}}else h=[];const l=t.template;let m="";if(l!==""){const d=l.substring(l.lastIndexOf(".")+1,l.length);m=d.substring(0,d.indexOf("}"),d.length);const b="<span>{{item."+m.trim()+"}}</span>";t.template=b}const f=t.valueProperty;let y="";f!==""&&(y=f.substring(f.lastIndexOf(".")+1,f.length),t.valueProperty=y),m=m.trim(),h=h.sort(function(d,b){return d[m]>b[m]?1:d[m]<b[m]?-1:0}),t.masterdata=h}return t}asString(t){return this.getValueAsString(t)}getValueAsString(t,e){if(!t)return"No data provided";if(!t.data&&t._id)return t._id;if(this.component.modalEdit)return this.component.label;if(e!=null&&e.email){let s=`
38327
38865
  <table border="1" style="width:100%">
38328
38866
  <tbody>
@@ -38461,7 +38999,7 @@ Expecting `+b.join(", ")+", got '"+(this.terminals_[y]||y)+"'":x="Parse error on
38461
38999
  </div>
38462
39000
  `,p=document.createElement("div");p.innerHTML=d.trim();const a=p.firstChild;s.appendChild(a);const u=setTimeout(()=>{a.parentNode&&(a.classList.remove("show"),a.style.transition="opacity 0.5s ease",a.style.opacity="0",setTimeout(()=>{a.parentNode&&a.remove()},500))},g),m=a.querySelector(".btn-close");m&&(m.onclick=()=>{clearTimeout(u),a.remove()})}window.showDynamicModal=w,window.showToast=x})();</script>
38463
39001
  <script>(function(){let v=!1,l=null;const g=window.innerHeight;function u(){return/iPad|iPhone|iPod/.test(navigator.userAgent)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1||!!(window.platform&&window.platform.iosPlatform)}logger.info("[TF_SDK:254] \u2705 Focus script initialized. Initial Height:",g,"isIOS:",u());function h(o){if(o&&o.target&&o.target.closest&&o.target.closest(".flatpickr-calendar"))return;document.querySelector(".flatpickr-calendar.open, .flatpickr-calendar.show")&&(document.activeElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur(),document.querySelectorAll("input").forEach(n=>{n._flatpickr&&typeof n._flatpickr.close=="function"&&n._flatpickr.close()}),document.body.dispatchEvent(new MouseEvent("mousedown",{bubbles:!0})))}window.addEventListener("scroll",h,!0),window.addEventListener("wheel",h,{capture:!0,passive:!0}),window.addEventListener("touchmove",h,{capture:!0,passive:!0});function w(o){if(!u())return;const e=document.getElementById("sticky-footer");e&&(o?e.style.display="none":e.style.display="flex")}function a(){if(!u()||!l)return;const o=l.closest(".formio-component")||l,e=window.visualViewport?window.visualViewport.height:window.innerHeight,n=o.getBoundingClientRect(),r=o.querySelector(".choices__list--dropdown.is-active, .choices__list--dropdown"),d=!!(r||o.querySelector(".choices")),s=d&&r?Math.max(140,r.offsetHeight||140):0,t=n.bottom+s>e-15,i=n.top<0;if(!t&&!i)return;if(typeof o.scrollIntoView=="function"){const m=d&&t?"center":"nearest";o.scrollIntoView({behavior:"smooth",block:m,inline:"nearest"})}const f=document.getElementById("formio-wrapper");if(f&&f.scrollHeight>f.clientHeight){let m=0,c=o;for(;c&&c!==f&&c!==null;)m+=c.offsetTop,c=c.offsetParent;if(t){const E=m-(e-o.offsetHeight-s-20);f.scrollTo({top:Math.max(0,E),behavior:"smooth"})}else i&&f.scrollTo({top:Math.max(0,m-20),behavior:"smooth"})}}document.addEventListener("focusin",o=>{if(!u())return;const e=o.target;if(!(!e||!["INPUT","TEXTAREA","SELECT"].includes(e.tagName))){if(w(!0),l=e,e.classList.contains("choices__input")||e.closest(".choices")){const n=e.closest(".choices")||e.closest(".formio-component-barcodeselect")||e.closest(".formio-component-select");n&&(l=n)}setTimeout(a,100),setTimeout(a,350)}}),document.addEventListener("focusout",o=>{u()&&setTimeout(()=>{const e=document.activeElement;!(e&&["INPUT","TEXTAREA","SELECT"].includes(e.tagName))&&!v&&w(!1)},250)}),window.visualViewport&&window.visualViewport.addEventListener("resize",()=>{if(!u())return;const e=window.visualViewport.height;e<g-60||e<screen.height-150?(v=!0,w(!0),l&&(setTimeout(a,150),setTimeout(a,350))):(v=!1,w(!1))}),document.addEventListener("showDropdown",o=>{if(!u())return;const e=o.target,n=e&&e.closest?e.closest(".formio-component-barcodeselect, .formio-component-select, .formio-component")||e:l;n&&(l=n,setTimeout(a,50),setTimeout(a,200),setTimeout(a,400))},!0),document.addEventListener("hideDropdown",()=>{u()&&setTimeout(a,80)},!0),document.addEventListener("FormRenderingComplete",()=>{const o=window.formObj;if(!o)return;let e=0;const n=setInterval(()=>{if(e++,e>8){clearInterval(n);return}let r=null;function d(s){if(!s)return null;for(let p=0;p<s.length;p++){const t=s[p];if(t){if(t.component&&t.component.autofocus){if(t.refs&&t.refs.input&&t.refs.input[0])return t.refs.input[0];if(t.element){const i=t.element.querySelector('input:not([type="hidden"]), textarea, select');if(i)return i}}if(t.components&&Array.isArray(t.components)){const i=d(t.components);if(i)return i}if(t.subForm&&t.subForm.components&&Array.isArray(t.subForm.components)){const i=d(t.subForm.components);if(i)return i}if(t.rows&&Array.isArray(t.rows))for(let i=0;i<t.rows.length;i++){const f=t.rows[i],m=Object.values(f||{}),c=d(m);if(c)return c}}}return null}if(r=d(o.components),r)if(document.activeElement!==r){if(logger.info(`[TF_SDK:262] \u2705 Forcing focus on schema-defined autofocus element (Attempt ${e})`),r.focus(),r.setSelectionRange&&r.value){const s=r.value.length;try{r.blur(),r.focus(),r.setSelectionRange(s,s)}catch(p){}}}else clearInterval(n)},500)})})();</script>
38464
- <script>(function(){var d=null,k=null,ne;let v=[],T=0,_=!1;function L(){sendEventCallback({type:FORM_EVENTS.BACK_NAVIGATION,message:"Back navigation triggered.",data:{}})}function W(e,t){var c,f;const o=document.getElementById("saveBtn"),n=document.getElementById("submitBtn"),r=document.getElementById("prevBtn"),i=document.getElementById("nextBtn"),l=document.getElementById("completeOption"),m=document.getElementById("saveOption"),p=document.getElementById("completeDivider"),y=document.getElementById("saveDivider");if(!o||!n)return;const s=e===!0||e==="true",g=e===!1||e==="false",u=String(t||"").toLowerCase(),a=(h,w,E)=>{h&&(E?h.style.setProperty("display","flex","important"):h.style.setProperty("display","none","important")),w&&(E?w.style.setProperty("display","block","important"):w.style.setProperty("display","none","important"))};a(l,p,!1),a(m,y,!1),u==="read"?(o.style.display="none",n.style.display="none"):g&&u==="writemultiple"?(o.style.display="none",n.style.display="",n.innerHTML='<i class="bi bi-check2-circle"></i> Complete',n.disabled=!0,a(l,p,!1),a(m,y,!1)):g&&u==="writesingle"?(o.style.display="none",n.style.display="",n.innerHTML='<i class="bi bi-check2-circle"></i> Submit',n.disabled=!0):s&&u==="writemultiple"?((c=window.__unviredFormsOptions)==null?void 0:c.showCompleteAlways)===!0||((f=window.__unviredFormsOptions)==null?void 0:f.showCompleteAlways)==="true"?(o.style.display="",n.style.display="",n.innerHTML='<i class="bi bi-check2-circle"></i> Complete',o.disabled=!0,n.disabled=!0,a(l,p,!1),a(m,y,!1)):(o.style.display="",n.style.display="none",o.disabled=!0,a(l,p,!1)):s&&u==="writesingle"?(o.style.display="none",n.style.display="",n.innerHTML='<i class="bi bi-check2-circle"></i> Complete',n.disabled=!0,a(m,y,!0)):(o.style.display="none",n.style.display="",n.innerHTML='<i class="bi bi-check2-circle"></i> Submit',n.disabled=!0),typeof window.checkMoreButtonVisibility=="function"&&window.checkMoreButtonVisibility()}function U(e,t,o,n){var C,F,O,A;const r=document.getElementById("saveBtn"),i=document.getElementById("submitBtn"),l=document.getElementById("prevBtn"),m=document.getElementById("nextBtn");if(!r||!i)return;const p=o===!0||o==="true",y=o===!1||o==="false",s=String(n||"").toLowerCase(),g=document.getElementById("completeOption"),u=document.getElementById("saveOption"),a=document.getElementById("completeDivider"),c=document.getElementById("saveDivider"),f=(b,S,M)=>{b&&(M?b.style.setProperty("display","flex","important"):b.style.setProperty("display","none","important")),S&&(M?S.style.setProperty("display","block","important"):S.style.setProperty("display","none","important"))},h=Object.values(t||{}).some(b=>b!=null&&b!==""&&b!==!1&&!(Array.isArray(b)&&b.length===0)&&!(typeof b=="object"&&!Array.isArray(b)&&Object.keys(b).length===0)),w=e>=100,E=((C=window.__unviredFormsOptions)==null?void 0:C.requireCompleteForm)!==!1&&((F=window.__unviredFormsOptions)==null?void 0:F.requireCompleteForm)!=="false";if(s==="read"){r.style.display="none",i.style.display="none";return}if(p&&s==="writesingle"){r.style.display="none",i.style.display="",i.disabled=!1,f(u,c,!0),f(g,a,!1),typeof window.checkMoreButtonVisibility=="function"&&window.checkMoreButtonVisibility();return}if(p&&s==="writemultiple"){((O=window.__unviredFormsOptions)==null?void 0:O.showCompleteAlways)===!0||((A=window.__unviredFormsOptions)==null?void 0:A.showCompleteAlways)==="true"?(r.style.display="",i.style.display="",i.innerHTML='<i class="bi bi-check2-circle"></i> Complete',r.disabled=!h,i.disabled=!1,f(g,a,!1),f(u,c,!1)):w?(r.style.display="none",i.style.display="",i.innerHTML='<i class="bi bi-check2-circle"></i> Complete',i.disabled=!1,f(u,c,!0),f(g,a,!1)):h?(r.style.display="",i.style.display="none",r.disabled=!1,f(g,a,!0),f(u,c,!1)):(r.style.display="",i.style.display="none",r.disabled=!0,f(g,a,!1),f(u,c,!1)),typeof window.checkMoreButtonVisibility=="function"&&window.checkMoreButtonVisibility();return}if(y&&s==="writemultiple"){r.style.display="none",i.style.display="",i.innerHTML='<i class="bi bi-check2-circle"></i> Complete',i.disabled=!1,f(g,a,!1),f(u,c,!1),typeof window.checkMoreButtonVisibility=="function"&&window.checkMoreButtonVisibility();return}if(y&&s==="writesingle"){r.style.display="none",i.style.display="",i.disabled=!1,f(g,a,!1),f(u,c,!1),typeof window.checkMoreButtonVisibility=="function"&&window.checkMoreButtonVisibility();return}r.style.display="none",i.style.display="",i.disabled=!1,typeof window.checkMoreButtonVisibility=="function"&&window.checkMoreButtonVisibility()}async function z(e,t,o,n,r,i,l,m,p,y){if(window.CURRENT_VIEW!=="comments"){if(H(),logger.info("[TF_SDK:296] \u2705 loadTRform() entered",{mode:n,permission:p,privateExternal:m,language:r}),v=y,typeof Formio=="undefined"){logger.error("[TF_SDK:297] \u274C Formio library not loaded"),sendEventCallback({type:"ERROR",errorMessage:"ErrorCode : 016, Formio library not loaded",data:{reason:"Formio library not loaded"}});return}try{if(logger.info("[TF_SDK:297] \u2705 Initializing loadTRform"),typeof Formio!="undefined"&&Formio.Components&&Formio.Components.components&&Formio.Components.components.component){const c=Formio.Components.components.component;if(!c._requiredFixApplied){c._requiredFixApplied=!0;const f=c.prototype.setCustomValidity;c.prototype.setCustomValidity=function(w,E,C){var F,O,A,b;if(typeof w=="string"&&(w.trim().toLowerCase()==="required"||w.includes("{{field}}"))){const S=(O=(F=this.component)==null?void 0:F.validate)==null?void 0:O.customMessage,M=((A=this.component)==null?void 0:A.errorLabel)||((b=this.component)==null?void 0:b.label)||this.key||"Field";w=S||`${M} is required`}if(f)return f.call(this,w,E,C)};const h=c.prototype.t;c.prototype.t=function(w,E){var C,F,O,A;if(typeof w=="string"&&w.trim().toLowerCase()==="required"){const b=(F=(C=this.component)==null?void 0:C.validate)==null?void 0:F.customMessage;return b||`${(E==null?void 0:E.field)||((O=this.component)==null?void 0:O.errorLabel)||((A=this.component)==null?void 0:A.label)||this.key||"Field"} is required`}return h?h.apply(this,arguments):w}}}let s={noAlerts:!0,scroll:!1,language:window.FORMIO_LANGUAGE||"en",i18n:window.FORMIO_I18N};if(W(m,p),n=="form")s.readOnly=!1,s.flatten=!1,s.viewHtml=!1;else if(n=="pdf"||n=="print"){s.readOnly=!0,s.flatten=!0,s.renderMode="flat",s.viewHtml=!0;const c=document.querySelector(".progress-container");c&&(c.style.display="none")}else if(n=="readOnly"||p=="read"){s.readOnly=!0,s.flatten=!1,s.viewHtml=!1;const c=document.querySelector(".progress-container");c&&(c.style.display="none");const f=document.getElementById("sticky-footer");f&&window.CURRENT_VIEW!=="comments"&&(f.style.display="none")}else s.readOnly=!1,s.flatten=!1,s.viewHtml=!1;const g=document.getElementById("formio");if(!g)throw new Error("DOM Element #formio not found");logger.info("[TF_SDK:298] \u2705 Creating Formio form...",e);try{d=await Formio.createForm(g,e,s)}catch(c){throw logger.error("[TF_SDK:298-ERR] \u274C Error in Formio.createForm:",c),c}let u=!1;if(d.on("change",()=>{if(!u){if(!k)try{k=JSON.parse(JSON.stringify(d.getValue().data))}catch(c){k=d.getValue().data}u=!0}}),document.dispatchEvent(new CustomEvent("LessRenderingComplete")),window.formObj=d,window.FORMIO_I18N&&Object.keys(window.FORMIO_I18N).length>0){const c=document.getElementById("languageSubMenu"),f=document.getElementById("languageMainOption"),h=document.getElementById("languageDivider");if(c&&f){c.innerHTML="";let w=Object.keys(window.FORMIO_I18N).filter(F=>typeof window.FORMIO_I18N[F]=="object"&&window.FORMIO_I18N[F]!==null);const E=window.FORMIO_LANGUAGE||"en";!w.includes(E)&&typeof window.FORMIO_I18N[E]=="object"&&w.unshift(E);let C=null;try{window.Intl&&typeof Intl.DisplayNames=="function"&&(C=new Intl.DisplayNames(["en"],{type:"language"}))}catch(F){logger.warn("Intl.DisplayNames not supported",F)}w.forEach(F=>{const O=document.createElement("div");O.className=f.className,O.style.cursor="pointer",O.style.padding="0.5rem 1rem",O.style.borderTop="none";let A=F.toUpperCase();try{A=C.of(F)||A}catch(S){}let b=F===E?'<i class="bi bi-check2 text-primary" style="margin-right: 8px;"></i>':'<i class="bi bi-check2" style="margin-right: 8px; visibility: hidden;"></i>';f.innerHTML.includes("icon chevron")&&(b=F===E?'<i class="icon check" style="margin-right: 8px;"></i>':'<i class="icon check" style="margin-right: 8px; visibility: hidden;"></i>'),O.innerHTML=`${b}${A}`,O.onclick=function(S){S.stopPropagation(),window.changeFormLanguage&&(window.changeFormLanguage(F),window.FORMIO_LANGUAGE=F);const M=c.children;for(let N=0;N<M.length;N++){const D=M[N].querySelector("i");D&&(w[N]===F?(D.style.visibility="visible",D.className.includes("bi")&&D.classList.add("text-primary")):(D.style.visibility="hidden",D.className.includes("bi")&&D.classList.remove("text-primary")))}window.toggleLanguageSubMenu&&window.toggleLanguageSubMenu(),window.showToast&&window.showToast(`Language set to ${A}`,"success")},c.appendChild(O)}),w.length>1?(f.style.display=f.className.includes("d-flex")?"flex":"block",h&&(h.style.display="block")):(f.style.display="none",h&&(h.style.display="none"))}}else{const c=document.getElementById("languageMainOption"),f=document.getElementById("languageDivider");c&&(c.style.display="none"),f&&(f.style.display="none")}if(!d){logger.error("[TF_SDK:299] \u274C Form not initialized.");return}const a=()=>{['button[type="submit"]',".formio-component-submit"].forEach(h=>{d.element.querySelectorAll(h).forEach(E=>{E.style.display="none"})}),d.element.querySelectorAll('input:not([type="file"]), textarea').forEach(h=>{h.getAttribute("autocomplete")!=="new-password"&&(h.setAttribute("autocomplete","new-password"),h.setAttribute("data-lpignore","true"),h.setAttribute("spellcheck","false"))})};a(),d.on("render",a),Q(m,p),d.formReady.then(()=>{if(logger.info("[TF_SDK:300] \u2705 formReady.then() triggered"),typeof window.initializeWizardLogic=="function"&&window.initializeWizardLogic(d,m,p),t?(logger.info("[TF_SDK:301] \u2705 Previous form data found:",t),d.submission={data:typeof t=="string"?JSON.parse(t):t},logger.info("[TF_SDK:302] \u2705 Previous submission data applied")):logger.info("[TF_SDK:303] \u2705 No previous form data found"),logger.info("[TF_SDK:304] \u2705 Calculating initial progress..."),executeProgressCalculation(m,p),logger.info("[TF_SDK:305] \u2705 Progress calculation completed"),n=="readOnly"){logger.info("[TF_SDK:306] \u2705 ReadOnly mode detected");const w=document.querySelectorAll(".formio-component-submit");logger.info(`[TF_SDK:307] \u2705 Found ${w.length} submit components`),w.forEach((E,C)=>{E.style.display="none",logger.info(`[TF_SDK:308] \u2705 Hidden submit component ${C+1}`)})}else logger.info("[TF_SDK:309] \u2705 Editable mode detected");logger.info("[TF_SDK:310] \u2705 Sending FORM_RENDER callback..."),sendEventCallback({type:FORM_EVENTS.FORM_RENDER,message:"Success: Form rendered successfully.",data:{submissionData:t,formTemplate:e}}),logger.info("[TF_SDK:311] \u2705 FORM_RENDER callback sent");const c=document.getElementById("sdk-form-loader");c?(logger.info("[TF_SDK:312] \u2705 Loader found, hiding..."),c.classList.add("hidden"),logger.info("[TF_SDK:313] \u2705 Loader hidden")):logger.warn("[TF_SDK:314] \u2705 Loader element not found"),document.querySelectorAll(".tf-form-loading").forEach(w=>w.classList.remove("tf-form-loading")),logger.info("[TF_SDK:315] \u2705 Dispatching FormRenderingComplete event...");let f=0;typeof window.getMaxTableWidth=="function"&&(f=window.getMaxTableWidth(document.getElementById("formio")||document.querySelector(".tf-embed-sdk")||document.body).maxWidth),sendEventCallback({type:FORM_EVENTS.FORM_LOADED,message:"Success: Form rendered complete.",data:{maxTableWidth:`${f}px`}}),document.dispatchEvent(new CustomEvent("FormRenderingComplete",{detail:{timestamp:new Date().toISOString(),status:"success",maxTableWidth:f}})),logger.info("[TF_SDK:316] \u2705 FormRenderingComplete event dispatched successfully");const h=document.querySelector('input[type="file"]');h?(h.setAttribute("accept","*/*"),logger.info("[TF_SDK:317] \u2705 File input found, accept=*/* applied")):logger.info("[TF_SDK:318] \u2705 No file input found"),logger.info("[TF_SDK:319] \u2705 Full formReady process completed")}).catch(c=>{logger.error("[TF_SDK:320] \u274C formReady.then() failed:",c)})}catch(s){logger.error("[TF_SDK:321] \u274C Error creating form (after retries):",s?s.message:"Unknown error",s?s.stack:"");const g=document.getElementById("sdk-form-loader");g&&g.classList.add("hidden"),document.querySelectorAll(".tf-form-loading").forEach(u=>u.classList.remove("tf-form-loading")),sendEventCallback({type:"ERROR",errorMessage:"ErrorCode : 005, Formio not rendered the forms",data:{reason:"Failed to render form after retries",technicalError:s}})}}}let B=null,V=null,I=null;function G(){if(I)return I;if(!d)return[];const e=[];function t(o,n=""){Array.isArray(o)&&o.forEach(r=>{var y;if(!r)return;const i=r.component||r;let l=n;if(["columns","panel","fieldset","well","table","tabs","content","htmlelement"].includes(i.type)||(l=n?`${n}.${i.key}`:i.key),["textfield","textarea","number","checkbox","radio","select","selectboxes","email","url","day","datetime","file","datamap","tree","survey","signature","datagrid","editgrid","container"].includes(i.type)&&((y=i.validate)!=null&&y.required)&&e.push({key:i.key,type:i.type,path:l,comp:i,instance:r}),Array.isArray(r.components)&&t(r.components,l),i.type==="form"){let s=l?`${l}.data`:"data";r.subForm&&Array.isArray(r.subForm.components)?t(r.subForm.components,s):Array.isArray(r.components)&&t(r.components,s)}Array.isArray(r.columns)&&r.columns.forEach(s=>{Array.isArray(s.components)&&t(s.components,l)})})}return t(d.components),I=e,e}window.executeProgressCalculation=function(e,t){if(!d)return;const o=d.data||{},n=JSON.stringify(o);if(!(d&&!!d.wizard)&&n===V)return;V=n;const i=G();let l=i.length,m=0;function p(u,a){if(Array.isArray(a)){if(!(["file","datagrid","editgrid","datamap","selectboxes"].includes(u.type)||u.multiple))return a.length>0&&a.every(h=>p(u,h));if(u.type==="file"&&a.length>0&&Array.isArray(a[0]))return a.every(h=>p(u,h))}switch(u.type){case"selectboxes":return Object.values(a||{}).some(Boolean);case"datamap":case"tree":return a&&Object.keys(a).length>0;case"survey":return u.questions&&Array.isArray(u.questions)?a&&Object.keys(a).length>=u.questions.length:a&&Object.keys(a).length>0;case"file":return Array.isArray(a)&&a.length>0;case"checkbox":return a===!0;case"editgrid":case"datagrid":return Array.isArray(a)&&a.length>0;case"signature":return!!a;default:return u.multiple?Array.isArray(a)&&a.length>0&&a.some(c=>c!=null&&c!==""):a!=null&&a!==""}}const y=[];i.forEach(u=>{let a=!0;u.instance&&(u.instance.visible===!1&&(a=!1),a&&typeof u.instance.checkCondition=="function"&&(u.instance.checkCondition(null,o)||(a=!1))),a&&(u.instance&&u.instance.parent&&u.instance.parent.visible===!1||y.push(u))}),l=y.length,m=0,y.forEach(({key:u,type:a,path:c,comp:f})=>{let h=x(o,c);p(f,h)&&m++});const s=l===0?100:Math.round(m/l*100);logger.info("[TF_SDK:322] \u2705 Progress:",{mandatory:l,filledMandatory:m,completion:s+"%"}),T=s,_=s>=100,U(s,d.data,e,t),typeof window.updateWizardNav=="function"&&window.updateWizardNav(d);const g=document.getElementById("progress-bar");if(g){const u=g.querySelector(".progress"),a=g.querySelector(".badge");u.style.width=`${s}%`,a.textContent=`${s}%`;let c=s;s<=0?(c=.5,u.style.width=`${.5}%`,window.innerWidth>768||window.innerWidth>480?a.style.transform="translateX(2%)":a.style.transform="translateX(1%)"):s>=100?(g.classList.add("complete"),c=99.5,window.innerWidth>768||window.innerWidth>480,a.style.transform="translateX(-100%)"):(g.classList.remove("complete"),a.style.transform="translateX(-50%)"),a.style.left=`${c-.25}%`}};function x(e,t){if(e==null||!t)return;if(t.indexOf(".")===-1)return Array.isArray(e)?e.map(r=>r[t]):e[t];const o=t.split(".");let n=e;for(let r=0;r<o.length;r++){const i=o[r];if(n==null)return;if(Array.isArray(n)){const l=o.slice(r).join(".");return n.map(m=>x(m,l))}n=n[i]}return n}function q(e){if(!e)return!0;let t=e.getValue?e.getValue():e.dataValue;return t==null||t===""||Array.isArray(t)&&(t.length===0||!t.some(n=>!(n==null||n===""||typeof n=="object"&&Object.keys(n).length===0)))||typeof t=="object"&&!Array.isArray(t)&&(Object.keys(t).length===0||!Object.values(t).some(n=>n!=null&&n!==""&&n!==!1))?!0:e.isEmpty?e.isEmpty(t):!1}function J(e,t){var r,i,l,m,p,y;if(!e||!t)return null;if(t.component&&t.component.element)return t.component;const o=t.path||((r=t.context)==null?void 0:r.path)||((i=t.context)==null?void 0:i.hasPath);if(o){let s=typeof e.getComponent=="function"?e.getComponent(o):null;if(s&&s.element)return s;const g=String(o).replace(/\[(\d+)\]/g,".$1");if(s=typeof e.getComponent=="function"?e.getComponent(g):null,s&&s.element)return s;const u=String(o).replace(/\.(\d+)\./g,"[$1].");if(s=typeof e.getComponent=="function"?e.getComponent(u):null,s&&s.element)return s}const n=((m=(l=t.context)==null?void 0:l.component)==null?void 0:m.key)||((p=t.component)==null?void 0:p.key)||(typeof((y=t.context)==null?void 0:y.component)=="string"?t.context.component:null);if(n&&typeof e.getComponent=="function"){const s=e.getComponent(n);if(s&&s.element)return s}return null}function P(e){if(!e||!e.element)return;e.error=null,typeof e.setCustomValidity=="function"&&e.setCustomValidity(""),e.element.classList.remove("has-error","formio-error-wrapper","is-invalid"),e.element.querySelectorAll(".choices__inner, .ui.selection.dropdown, .is-invalid").forEach(n=>{n.closest(".formio-component")===e.element&&n.classList.remove("is-invalid")}),e.element.querySelectorAll(".formio-errors, .invalid-feedback, [ref='messageContainer']").forEach(n=>{n.closest(".formio-component")===e.element&&(n.innerHTML="",n.style.display="none")})}function X(e){!e||typeof e.everyComponent!="function"||e.everyComponent(t=>{var l;if(!t||!t.element)return;const o=((l=t.component)==null?void 0:l.type)||t.type;if(["datagrid","editgrid","container","panel","columns","fieldset","well","tabs","form"].includes(o))return;const r=t.element.classList.contains("has-error")||t.element.classList.contains("formio-error-wrapper"),i=Array.from(t.element.querySelectorAll(".formio-errors, .invalid-feedback")).some(m=>m.style.display!=="none"&&m.innerHTML.trim()!==""&&m.closest(".formio-component")===t.element);(r||i)&&!q(t)&&P(t)})}function Y(e,t){var m,p,y,s;if(!e||!e.element)return;e.element.classList.add("has-error","formio-error-wrapper");const o=e.element.querySelector(".choices__inner, .ui.selection.dropdown");o&&o.closest(".formio-component")===e.element&&o.classList.add("is-invalid");const n=t.message||((p=(m=t.context)==null?void 0:m.component)!=null&&p.label?`${t.context.component.label} is required`:`${((y=e.component)==null?void 0:y.label)||e.key} is required`),i=`e-${e.id||((s=e.component)==null?void 0:s.id)||e.key}-${e.key}`;let l=Array.from(e.element.querySelectorAll(".formio-errors, [ref='messageContainer']")).find(g=>g.closest(".formio-component")===e.element);l?(l.setAttribute("ref","messageContainer"),l.classList.contains("invalid-feedback")||l.classList.add("invalid-feedback")):(l=document.createElement("div"),l.setAttribute("ref","messageContainer"),l.className="formio-errors invalid-feedback",e.element.appendChild(l)),l.innerHTML=`<div id="${i}" class="form-text error">${n}</div>`,l.style.display="block"}function Q(e,t){d&&d.on("change",o=>{var n,r;((r=(n=o.changed)==null?void 0:n.component)==null?void 0:r.type)==="datetime"&&document.activeElement.blur(),X(d),B&&clearTimeout(B),I=null,B=setTimeout(()=>{executeProgressCalculation(e,t)},300)})}function K(e,t=[]){let o={};if(!t||t.length===0||!e)return o;let n=e;if(typeof e=="string")try{n=JSON.parse(e)}catch(i){}const r=i=>{if(!(!i||typeof i!="object"))if(Array.isArray(i))i.forEach(r);else for(const l in i)t.includes(l)?o[l]?Array.isArray(o[l])&&Array.isArray(i[l])&&(o[l]=o[l].concat(i[l])):o[l]=i[l]:typeof i[l]=="object"&&r(i[l])};return r(n),o}function R(e,t=[]){if(!e||typeof e!="object")return e;const o=Array.isArray(e)?[...e]:{...e};for(const n in o){const r=o[n];Array.isArray(r)?t.length>0&&t.includes(n)?o[n]=r.map(i=>i&&typeof i=="object"&&(i.uid||i.id)?i.uid||i.id:i):r.length>0&&r.every(i=>i&&typeof i=="object"&&i.storage==="SmartStorage")?o[n]=r.map(i=>i.id||i.uid||i):o[n]=r.map(i=>typeof i=="object"&&i!==null?R(i,t):i):r&&typeof r=="object"&&(o[n]=R(r,t))}return o}function j(){var r,i;if(!d)return;const e=d.getValue(),t=R(e,v),o=K(e.data,v);if(!(((r=window.__unviredFormsOptions)==null?void 0:r.requireCompleteForm)!==!1&&((i=window.__unviredFormsOptions)==null?void 0:i.requireCompleteForm)!=="false")){sendEventCallback({type:FORM_EVENTS.SUBMIT,message:"Success: Form submitted successfully (Validation Bypassed).",data:{formData:t,completeFlag:_,completionPercentage:T,commentsData:FORM_COMMENTS_DATA,result:t,attachmentsData:o}});return}d.errors=[],d.submit().then(l=>{sendEventCallback({type:FORM_EVENTS.SUBMIT,message:"Success: Form submitted successfully.",data:{formData:t,completeFlag:_,completionPercentage:T,commentsData:FORM_COMMENTS_DATA,result:l,attachmentsData:o}})}).catch(l=>{let m=!1,p=[],y=[];if(d&&Array.isArray(d.errors)&&d.errors.length>0&&(y=y.concat(d.errors)),Array.isArray(l)?y=y.concat(l):l&&Array.isArray(l.errors)?y=y.concat(l.errors):l&&Array.isArray(l.details)?y=y.concat(l.details):l&&typeof l=="object"&&(l.message||l.context)&&y.push(l),y.length>0?y.forEach(g=>{const u=J(d,g);u&&u.element?q(u)?(m=!0,p.push(g),Y(u,g)):P(u):(m=!0,p.push(g))}):m=!0,!m){logger.warn("[TF_SDK:321a] \u26A0\uFE0F All reported errors were resolved/hallucinated. Forcing success submit."),sendEventCallback({type:FORM_EVENTS.SUBMIT,message:"Success: Form submitted successfully.",data:{formData:t,completeFlag:_,completionPercentage:T,commentsData:FORM_COMMENTS_DATA,result:t,attachmentsData:o}});return}logger.error("Form submit errors:",p);let s="Please fill in all required fields.";p.length===1&&p[0].message&&(s=p[0].message),showDynamicModal("Error",[{label:"OK"}],s),sendEventCallback({type:FORM_EVENTS.SUBMIT_ERROR,errorMessage:"ErrorCode : 006, Formio not submit the form",data:{reason:"Form submission failed",formData:t,completeFlag:_,completionPercentage:T,technicalError:p.length>0?p:l}})})}function H(){B=null,V=null,I=null}async function Z(){if(!d){logger.error("[TF_SDK:323] \u274C Form object not initialized");return}let e=d.getValue();window.FORM_SUB_TEMP=e;const t=window.FORM_TEMPLATE||{display:"form",type:"form",components:[]};try{typeof window.loadCommentsform=="function"?(await window.loadCommentsform(t,window.FORM_USER_DATA,window.FORM_COMMENTS_DATA,window.FORM_VOB_ARR,window.FORM_USERS_LIST||[]),showCommentsView()):logger.error("[TF_SDK:324] \u274C loadCommentsform is not a function")}catch(o){logger.error("[TF_SDK:325] \u274C Error while loading comments:",o)}}function $(){if(!d)return;const e=d.getValue().data;if(!Object.values(e||{}).some(o=>o!=null&&o!==""&&o!==!1&&!(Array.isArray(o)&&o.length===0)&&!(typeof o=="object"&&!Array.isArray(o)&&Object.keys(o).length===0))){showDynamicModal("Attention",[{label:"OK"}],"Please fill at least one field before saving.");return}showDynamicModal("Do you want to save the data?",[{label:"Yes",callback:()=>{const o=d.getValue(),n=R(o),r=K(o.data,v);sendEventCallback({type:FORM_EVENTS.SAVE,message:"Success: Data saved successfully.",data:{commentsData:FORM_COMMENTS_DATA,formData:n,completeFlag:_,completionPercentage:T,attachmentsData:r}})}},{label:"No",callback:()=>{}}])}function ee(){if(d&&d.options&&d.options.readOnly){L();return}let e;try{e=d?d.getValue().data:null}catch(o){e=null}JSON.stringify(e)===JSON.stringify(k)?L():showDynamicModal("Unsaved Form Data",[{label:"Discard",callback:L},{label:"Save",callback:$}],"Discard your changes or save them before leaving?")}function te(e,t,o){let n=new CustomEvent("capureImageData",{detail:{imageData:e,controlId:t,fileName:o}});document.dispatchEvent(n)}window.checkMoreButtonVisibility=function(){const e=document.getElementById("unvired-more-btn");if(!e)return;const t=window.__unviredFormsOptions||{};if(t.showMoreButton===!1){e.style.display="none";return}const o=document.getElementById("completeOption"),n=document.getElementById("saveOption"),r=document.getElementById("documentsOption"),i=document.getElementById("comments-item"),l=document.getElementById("help-item"),m=(y,s)=>y?s&&t[s]===!0?!0:y.style.display!=="none":!1;m(o)||m(n)||m(r)||t.showComments===!0||t.showHelp===!0?e.style.display="":e.style.display="none"},window.checkMoreButtonVisibility(),window.loadComments=Z,window.loadTRform=z,window.FormOnSave=$,window.FormOnBack=ee,window.setImageData=te,window.FormOnComplete=j,window.FormOnNext=function(){d&&typeof d.nextPage=="function"&&d.nextPage().then(()=>{typeof window.updateWizardNav=="function"&&window.updateWizardNav(d)})},window.FormOnPrevious=function(){d&&typeof d.prevPage=="function"&&d.prevPage().then(()=>{typeof window.updateWizardNav=="function"&&window.updateWizardNav(d)})},window.formOnCompleteFunction=j,window.resetFormCache=H,window.resetInitialFormData=function(){k=null},document.dispatchEvent(new CustomEvent("LoadRNformReady"))})();</script>
39002
+ <script>(function(){var d=null,_=null,ne;let v=[],T=0,k=!1;function L(){sendEventCallback({type:FORM_EVENTS.BACK_NAVIGATION,message:"Back navigation triggered.",data:{}})}function W(e,t){var c,f;const o=document.getElementById("saveBtn"),n=document.getElementById("submitBtn"),r=document.getElementById("prevBtn"),i=document.getElementById("nextBtn"),l=document.getElementById("completeOption"),m=document.getElementById("saveOption"),p=document.getElementById("completeDivider"),y=document.getElementById("saveDivider");if(!o||!n)return;const s=e===!0||e==="true",g=e===!1||e==="false",u=String(t||"").toLowerCase(),a=(h,w,E)=>{h&&(E?h.style.setProperty("display","flex","important"):h.style.setProperty("display","none","important")),w&&(E?w.style.setProperty("display","block","important"):w.style.setProperty("display","none","important"))};a(l,p,!1),a(m,y,!1),u==="read"?(o.style.display="none",n.style.display="none"):g&&u==="writemultiple"?(o.style.display="none",n.style.display="",n.innerHTML='<i class="bi bi-check2-circle"></i> Complete',n.disabled=!0,a(l,p,!1),a(m,y,!1)):g&&u==="writesingle"?(o.style.display="none",n.style.display="",n.innerHTML='<i class="bi bi-check2-circle"></i> Submit',n.disabled=!0):s&&u==="writemultiple"?((c=window.__unviredFormsOptions)==null?void 0:c.showCompleteAlways)===!0||((f=window.__unviredFormsOptions)==null?void 0:f.showCompleteAlways)==="true"?(o.style.display="",n.style.display="",n.innerHTML='<i class="bi bi-check2-circle"></i> Complete',o.disabled=!0,n.disabled=!0,a(l,p,!1),a(m,y,!1)):(o.style.display="",n.style.display="none",o.disabled=!0,a(l,p,!1)):s&&u==="writesingle"?(o.style.display="none",n.style.display="",n.innerHTML='<i class="bi bi-check2-circle"></i> Complete',n.disabled=!0,a(m,y,!0)):(o.style.display="none",n.style.display="",n.innerHTML='<i class="bi bi-check2-circle"></i> Submit',n.disabled=!0),typeof window.checkMoreButtonVisibility=="function"&&window.checkMoreButtonVisibility()}function U(e,t,o,n){var C,F,O,A;const r=document.getElementById("saveBtn"),i=document.getElementById("submitBtn"),l=document.getElementById("prevBtn"),m=document.getElementById("nextBtn");if(!r||!i)return;const p=o===!0||o==="true",y=o===!1||o==="false",s=String(n||"").toLowerCase(),g=document.getElementById("completeOption"),u=document.getElementById("saveOption"),a=document.getElementById("completeDivider"),c=document.getElementById("saveDivider"),f=(b,M,D)=>{b&&(D?b.style.setProperty("display","flex","important"):b.style.setProperty("display","none","important")),M&&(D?M.style.setProperty("display","block","important"):M.style.setProperty("display","none","important"))},h=Object.values(t||{}).some(b=>b!=null&&b!==""&&b!==!1&&!(Array.isArray(b)&&b.length===0)&&!(typeof b=="object"&&!Array.isArray(b)&&Object.keys(b).length===0)),w=e>=100,E=((C=window.__unviredFormsOptions)==null?void 0:C.requireCompleteForm)!==!1&&((F=window.__unviredFormsOptions)==null?void 0:F.requireCompleteForm)!=="false";if(s==="read"){r.style.display="none",i.style.display="none";return}if(p&&s==="writesingle"){r.style.display="none",i.style.display="",i.disabled=!1,f(u,c,!0),f(g,a,!1),typeof window.checkMoreButtonVisibility=="function"&&window.checkMoreButtonVisibility();return}if(p&&s==="writemultiple"){((O=window.__unviredFormsOptions)==null?void 0:O.showCompleteAlways)===!0||((A=window.__unviredFormsOptions)==null?void 0:A.showCompleteAlways)==="true"?(r.style.display="",i.style.display="",i.innerHTML='<i class="bi bi-check2-circle"></i> Complete',r.disabled=!h,i.disabled=!1,f(g,a,!1),f(u,c,!1)):w?(r.style.display="none",i.style.display="",i.innerHTML='<i class="bi bi-check2-circle"></i> Complete',i.disabled=!1,f(u,c,!0),f(g,a,!1)):h?(r.style.display="",i.style.display="none",r.disabled=!1,f(g,a,!0),f(u,c,!1)):(r.style.display="",i.style.display="none",r.disabled=!0,f(g,a,!1),f(u,c,!1)),typeof window.checkMoreButtonVisibility=="function"&&window.checkMoreButtonVisibility();return}if(y&&s==="writemultiple"){r.style.display="none",i.style.display="",i.innerHTML='<i class="bi bi-check2-circle"></i> Complete',i.disabled=!1,f(g,a,!1),f(u,c,!1),typeof window.checkMoreButtonVisibility=="function"&&window.checkMoreButtonVisibility();return}if(y&&s==="writesingle"){r.style.display="none",i.style.display="",i.disabled=!1,f(g,a,!1),f(u,c,!1),typeof window.checkMoreButtonVisibility=="function"&&window.checkMoreButtonVisibility();return}r.style.display="none",i.style.display="",i.disabled=!1,typeof window.checkMoreButtonVisibility=="function"&&window.checkMoreButtonVisibility()}async function z(e,t,o,n,r,i,l,m,p,y){if(window.CURRENT_VIEW!=="comments"){if(H(),logger.info("[TF_SDK:296] \u2705 loadTRform() entered",{mode:n,permission:p,privateExternal:m,language:r}),v=y,typeof Formio=="undefined"){logger.error("[TF_SDK:297] \u274C Formio library not loaded"),sendEventCallback({type:"ERROR",errorMessage:"ErrorCode : 016, Formio library not loaded",data:{reason:"Formio library not loaded"}});return}try{if(logger.info("[TF_SDK:297] \u2705 Initializing loadTRform"),typeof Formio!="undefined"&&Formio.Components&&Formio.Components.components&&Formio.Components.components.component){const c=Formio.Components.components.component;if(!c._requiredFixApplied){c._requiredFixApplied=!0;const f=c.prototype.setCustomValidity;c.prototype.setCustomValidity=function(w,E,C){var F,O,A,b;if(typeof w=="string"&&(w.trim().toLowerCase()==="required"||w.includes("{{field}}"))){const M=(O=(F=this.component)==null?void 0:F.validate)==null?void 0:O.customMessage,D=((A=this.component)==null?void 0:A.errorLabel)||((b=this.component)==null?void 0:b.label)||this.key||"Field";w=M||`${D} is required`}if(f)return f.call(this,w,E,C)};const h=c.prototype.t;c.prototype.t=function(w,E){var C,F,O,A;if(typeof w=="string"&&w.trim().toLowerCase()==="required"){const b=(F=(C=this.component)==null?void 0:C.validate)==null?void 0:F.customMessage;return b||`${(E==null?void 0:E.field)||((O=this.component)==null?void 0:O.errorLabel)||((A=this.component)==null?void 0:A.label)||this.key||"Field"} is required`}return h?h.apply(this,arguments):w}}}let s={noAlerts:!0,scroll:!1,language:window.FORMIO_LANGUAGE||"en",i18n:window.FORMIO_I18N};if(W(m,p),n=="form")s.readOnly=!1,s.flatten=!1,s.viewHtml=!1;else if(n=="pdf"||n=="print"){s.readOnly=!0,s.flatten=!0,s.renderMode="flat",s.viewHtml=!0;const c=document.querySelector(".progress-container");c&&(c.style.display="none")}else if(n=="readOnly"||p=="read"){s.readOnly=!0,s.flatten=!1,s.viewHtml=!1;const c=document.querySelector(".progress-container");c&&(c.style.display="none");const f=document.getElementById("sticky-footer");f&&window.CURRENT_VIEW!=="comments"&&(f.style.display="none")}else s.readOnly=!1,s.flatten=!1,s.viewHtml=!1;const g=document.getElementById("formio");if(!g)throw new Error("DOM Element #formio not found");logger.info("[TF_SDK:298] \u2705 Creating Formio form...",e);try{d=await Formio.createForm(g,e,s)}catch(c){throw logger.error("[TF_SDK:298-ERR] \u274C Error in Formio.createForm:",c),c}let u=!1;if(d.on("change",()=>{if(!u){if(!_)try{_=JSON.parse(JSON.stringify(d.getValue().data))}catch(c){_=d.getValue().data}u=!0}}),document.dispatchEvent(new CustomEvent("LessRenderingComplete")),window.formObj=d,window.FORMIO_I18N&&Object.keys(window.FORMIO_I18N).length>0){const c=document.getElementById("languageSubMenu"),f=document.getElementById("languageMainOption"),h=document.getElementById("languageDivider");if(c&&f){c.innerHTML="";let w=Object.keys(window.FORMIO_I18N).filter(F=>typeof window.FORMIO_I18N[F]=="object"&&window.FORMIO_I18N[F]!==null);const E=window.FORMIO_LANGUAGE||"en";!w.includes(E)&&typeof window.FORMIO_I18N[E]=="object"&&w.unshift(E);let C=null;try{window.Intl&&typeof Intl.DisplayNames=="function"&&(C=new Intl.DisplayNames(["en"],{type:"language"}))}catch(F){logger.warn("Intl.DisplayNames not supported",F)}w.forEach(F=>{const O=document.createElement("div");O.className=f.className,O.style.cursor="pointer",O.style.padding="0.5rem 1rem",O.style.borderTop="none";let A=F.toUpperCase();try{A=C.of(F)||A}catch(M){}let b=F===E?'<i class="bi bi-check2 text-primary" style="margin-right: 8px;"></i>':'<i class="bi bi-check2" style="margin-right: 8px; visibility: hidden;"></i>';f.innerHTML.includes("icon chevron")&&(b=F===E?'<i class="icon check" style="margin-right: 8px;"></i>':'<i class="icon check" style="margin-right: 8px; visibility: hidden;"></i>'),O.innerHTML=`${b}${A}`,O.onclick=function(M){M.stopPropagation(),window.changeFormLanguage&&(window.changeFormLanguage(F),window.FORMIO_LANGUAGE=F);const D=c.children;for(let N=0;N<D.length;N++){const S=D[N].querySelector("i");S&&(w[N]===F?(S.style.visibility="visible",S.className.includes("bi")&&S.classList.add("text-primary")):(S.style.visibility="hidden",S.className.includes("bi")&&S.classList.remove("text-primary")))}window.toggleLanguageSubMenu&&window.toggleLanguageSubMenu(),window.showToast&&window.showToast(`Language set to ${A}`,"success")},c.appendChild(O)}),w.length>1?(f.style.display=f.className.includes("d-flex")?"flex":"block",h&&(h.style.display="block")):(f.style.display="none",h&&(h.style.display="none"))}}else{const c=document.getElementById("languageMainOption"),f=document.getElementById("languageDivider");c&&(c.style.display="none"),f&&(f.style.display="none")}if(!d){logger.error("[TF_SDK:299] \u274C Form not initialized.");return}const a=()=>{['button[type="submit"]',".formio-component-submit"].forEach(h=>{d.element.querySelectorAll(h).forEach(E=>{E.style.display="none"})}),d.element.querySelectorAll('input:not([type="file"]), textarea').forEach(h=>{h.getAttribute("autocomplete")!=="new-password"&&(h.setAttribute("autocomplete","new-password"),h.setAttribute("data-lpignore","true"),h.setAttribute("spellcheck","false"))})};a(),d.on("render",a),Q(m,p),d.formReady.then(()=>{if(logger.info("[TF_SDK:300] \u2705 formReady.then() triggered"),typeof window.initializeWizardLogic=="function"&&window.initializeWizardLogic(d,m,p),t?(logger.info("[TF_SDK:301] \u2705 Previous form data found:",t),d.submission={data:typeof t=="string"?JSON.parse(t):t},logger.info("[TF_SDK:302] \u2705 Previous submission data applied")):logger.info("[TF_SDK:303] \u2705 No previous form data found"),logger.info("[TF_SDK:304] \u2705 Calculating initial progress..."),executeProgressCalculation(m,p),logger.info("[TF_SDK:305] \u2705 Progress calculation completed"),n=="readOnly"){logger.info("[TF_SDK:306] \u2705 ReadOnly mode detected");const w=document.querySelectorAll(".formio-component-submit");logger.info(`[TF_SDK:307] \u2705 Found ${w.length} submit components`),w.forEach((E,C)=>{E.style.display="none",logger.info(`[TF_SDK:308] \u2705 Hidden submit component ${C+1}`)})}else logger.info("[TF_SDK:309] \u2705 Editable mode detected");logger.info("[TF_SDK:310] \u2705 Sending FORM_RENDER callback..."),sendEventCallback({type:FORM_EVENTS.FORM_RENDER,message:"Success: Form rendered successfully.",data:{submissionData:t,formTemplate:e}}),logger.info("[TF_SDK:311] \u2705 FORM_RENDER callback sent");const c=document.getElementById("sdk-form-loader");c?(logger.info("[TF_SDK:312] \u2705 Loader found, hiding..."),c.classList.add("hidden"),logger.info("[TF_SDK:313] \u2705 Loader hidden")):logger.warn("[TF_SDK:314] \u2705 Loader element not found"),document.querySelectorAll(".tf-form-loading").forEach(w=>w.classList.remove("tf-form-loading")),logger.info("[TF_SDK:315] \u2705 Dispatching FormRenderingComplete event...");let f=0;typeof window.getMaxTableWidth=="function"&&(f=window.getMaxTableWidth(document.getElementById("formio")||document.querySelector(".tf-embed-sdk")||document.body).maxWidth),sendEventCallback({type:FORM_EVENTS.FORM_LOADED,message:"Success: Form rendered complete.",data:{maxTableWidth:`${f}px`}}),document.dispatchEvent(new CustomEvent("FormRenderingComplete",{detail:{timestamp:new Date().toISOString(),status:"success",maxTableWidth:f}})),logger.info("[TF_SDK:316] \u2705 FormRenderingComplete event dispatched successfully");const h=document.querySelector('input[type="file"]');h?(h.setAttribute("accept","*/*"),logger.info("[TF_SDK:317] \u2705 File input found, accept=*/* applied")):logger.info("[TF_SDK:318] \u2705 No file input found"),logger.info("[TF_SDK:319] \u2705 Full formReady process completed")}).catch(c=>{logger.error("[TF_SDK:320] \u274C formReady.then() failed:",c)})}catch(s){logger.error("[TF_SDK:321] \u274C Error creating form (after retries):",s?s.message:"Unknown error",s?s.stack:"");const g=document.getElementById("sdk-form-loader");g&&g.classList.add("hidden"),document.querySelectorAll(".tf-form-loading").forEach(u=>u.classList.remove("tf-form-loading")),sendEventCallback({type:"ERROR",errorMessage:"ErrorCode : 005, Formio not rendered the forms",data:{reason:"Failed to render form after retries",technicalError:s}})}}}let B=null,V=null,I=null;function G(){if(I)return I;if(!d)return[];const e=[];function t(o,n=""){Array.isArray(o)&&o.forEach(r=>{var y;if(!r)return;const i=r.component||r;let l=n;if(["columns","panel","fieldset","well","table","tabs","content","htmlelement"].includes(i.type)||(l=n?`${n}.${i.key}`:i.key),["textfield","textarea","number","checkbox","radio","select","selectboxes","email","url","day","datetime","file","datamap","tree","survey","signature","datagrid","editgrid","container"].includes(i.type)&&((y=i.validate)!=null&&y.required)&&e.push({key:i.key,type:i.type,path:l,comp:i,instance:r}),Array.isArray(r.components)&&t(r.components,l),i.type==="form"){let s=l?`${l}.data`:"data";r.subForm&&Array.isArray(r.subForm.components)?t(r.subForm.components,s):Array.isArray(r.components)&&t(r.components,s)}Array.isArray(r.columns)&&r.columns.forEach(s=>{Array.isArray(s.components)&&t(s.components,l)})})}return t(d.components),I=e,e}window.executeProgressCalculation=function(e,t){if(!d)return;const o=d.data||{},n=JSON.stringify(o);if(!(d&&!!d.wizard)&&n===V)return;V=n;const i=G();let l=i.length,m=0;function p(u,a){if(Array.isArray(a)){if(!(["file","datagrid","editgrid","datamap","selectboxes"].includes(u.type)||u.multiple))return a.length>0&&a.every(h=>p(u,h));if(u.type==="file"&&a.length>0&&Array.isArray(a[0]))return a.every(h=>p(u,h))}switch(u.type){case"selectboxes":return Object.values(a||{}).some(Boolean);case"datamap":case"tree":return a&&Object.keys(a).length>0;case"survey":return u.questions&&Array.isArray(u.questions)?a&&Object.keys(a).length>=u.questions.length:a&&Object.keys(a).length>0;case"file":return Array.isArray(a)&&a.length>0;case"checkbox":return a===!0;case"editgrid":case"datagrid":return Array.isArray(a)&&a.length>0;case"signature":return!!a;default:return u.multiple?Array.isArray(a)&&a.length>0&&a.some(c=>c!=null&&c!==""):a!=null&&a!==""}}const y=[];i.forEach(u=>{let a=!0;u.instance&&(u.instance.visible===!1&&(a=!1),a&&typeof u.instance.checkCondition=="function"&&(u.instance.checkCondition(null,o)||(a=!1))),a&&(u.instance&&u.instance.parent&&u.instance.parent.visible===!1||y.push(u))}),l=y.length,m=0,y.forEach(({key:u,type:a,path:c,comp:f})=>{let h=x(o,c);p(f,h)&&m++});const s=l===0?100:Math.round(m/l*100);logger.info("[TF_SDK:322] \u2705 Progress:",{mandatory:l,filledMandatory:m,completion:s+"%"}),T=s,k=s>=100,U(s,d.data,e,t),typeof window.updateWizardNav=="function"&&window.updateWizardNav(d);const g=document.getElementById("progress-bar");if(g){const u=g.querySelector(".progress"),a=g.querySelector(".badge");u.style.width=`${s}%`,a.textContent=`${s}%`;let c=s;s<=0?(c=.5,u.style.width=`${.5}%`,window.innerWidth>768||window.innerWidth>480?a.style.transform="translateX(2%)":a.style.transform="translateX(1%)"):s>=100?(g.classList.add("complete"),c=99.5,window.innerWidth>768||window.innerWidth>480,a.style.transform="translateX(-100%)"):(g.classList.remove("complete"),a.style.transform="translateX(-50%)"),a.style.left=`${c-.25}%`}};function x(e,t){if(e==null||!t)return;if(t.indexOf(".")===-1)return Array.isArray(e)?e.map(r=>r[t]):e[t];const o=t.split(".");let n=e;for(let r=0;r<o.length;r++){const i=o[r];if(n==null)return;if(Array.isArray(n)){const l=o.slice(r).join(".");return n.map(m=>x(m,l))}n=n[i]}return n}function q(e){if(!e)return!0;let t=e.getValue?e.getValue():e.dataValue;return t==null||t===""||Array.isArray(t)&&(t.length===0||!t.some(n=>!(n==null||n===""||typeof n=="object"&&Object.keys(n).length===0)))||typeof t=="object"&&!Array.isArray(t)&&(Object.keys(t).length===0||!Object.values(t).some(n=>n!=null&&n!==""&&n!==!1))?!0:e.isEmpty?e.isEmpty(t):!1}function J(e,t){var r,i,l,m,p,y;if(!e||!t)return null;if(t.component&&t.component.element)return t.component;const o=t.path||((r=t.context)==null?void 0:r.path)||((i=t.context)==null?void 0:i.hasPath);if(o){let s=typeof e.getComponent=="function"?e.getComponent(o):null;if(s&&s.element)return s;const g=String(o).replace(/\[(\d+)\]/g,".$1");if(s=typeof e.getComponent=="function"?e.getComponent(g):null,s&&s.element)return s;const u=String(o).replace(/\.(\d+)\./g,"[$1].");if(s=typeof e.getComponent=="function"?e.getComponent(u):null,s&&s.element)return s}const n=((m=(l=t.context)==null?void 0:l.component)==null?void 0:m.key)||((p=t.component)==null?void 0:p.key)||(typeof((y=t.context)==null?void 0:y.component)=="string"?t.context.component:null);if(n&&typeof e.getComponent=="function"){const s=e.getComponent(n);if(s&&s.element)return s}return null}function P(e){if(!e||!e.element)return;e.error=null,typeof e.setCustomValidity=="function"&&e.setCustomValidity(""),e.element.classList.remove("has-error","formio-error-wrapper","is-invalid"),e.element.querySelectorAll(".choices__inner, .ui.selection.dropdown, .is-invalid").forEach(n=>{n.closest(".formio-component")===e.element&&n.classList.remove("is-invalid")}),e.element.querySelectorAll(".formio-errors, .invalid-feedback, [ref='messageContainer']").forEach(n=>{n.closest(".formio-component")===e.element&&(n.innerHTML="",n.style.display="none")})}function X(e){!e||typeof e.everyComponent!="function"||e.everyComponent(t=>{var l;if(!t||!t.element)return;const o=((l=t.component)==null?void 0:l.type)||t.type;if(["datagrid","editgrid","container","panel","columns","fieldset","well","tabs","form"].includes(o))return;const r=t.element.classList.contains("has-error")||t.element.classList.contains("formio-error-wrapper"),i=Array.from(t.element.querySelectorAll(".formio-errors, .invalid-feedback")).some(m=>m.style.display!=="none"&&m.innerHTML.trim()!==""&&m.closest(".formio-component")===t.element);(r||i)&&!q(t)&&P(t)})}function Y(e,t){var m,p,y,s;if(!e||!e.element)return;e.element.classList.add("has-error","formio-error-wrapper");const o=e.element.querySelector(".choices__inner, .ui.selection.dropdown");o&&o.closest(".formio-component")===e.element&&o.classList.add("is-invalid");const n=t.message||((p=(m=t.context)==null?void 0:m.component)!=null&&p.label?`${t.context.component.label} is required`:`${((y=e.component)==null?void 0:y.label)||e.key} is required`),i=`e-${e.id||((s=e.component)==null?void 0:s.id)||e.key}-${e.key}`;let l=Array.from(e.element.querySelectorAll(".formio-errors, [ref='messageContainer']")).find(g=>g.closest(".formio-component")===e.element);l?(l.setAttribute("ref","messageContainer"),l.classList.contains("invalid-feedback")||l.classList.add("invalid-feedback")):(l=document.createElement("div"),l.setAttribute("ref","messageContainer"),l.className="formio-errors invalid-feedback",e.element.appendChild(l)),l.innerHTML=`<div id="${i}" class="form-text error">${n}</div>`,l.style.display="block"}function Q(e,t){d&&d.on("change",o=>{var n,r;((r=(n=o.changed)==null?void 0:n.component)==null?void 0:r.type)==="datetime"&&document.activeElement.blur(),X(d),B&&clearTimeout(B),I=null,B=setTimeout(()=>{executeProgressCalculation(e,t)},300)})}function K(e,t=[]){let o={};if(!t||t.length===0||!e)return o;let n=e;if(typeof e=="string")try{n=JSON.parse(e)}catch(i){}const r=i=>{if(!(!i||typeof i!="object"))if(Array.isArray(i))i.forEach(r);else for(const l in i)t.includes(l)?o[l]?Array.isArray(o[l])&&Array.isArray(i[l])&&(o[l]=o[l].concat(i[l])):o[l]=i[l]:typeof i[l]=="object"&&r(i[l])};return r(n),o}function R(e,t=[]){if(!e||typeof e!="object")return e;const o=Array.isArray(e)?[...e]:{...e};for(const n in o){const r=o[n];Array.isArray(r)?t.length>0&&t.includes(n)?o[n]=r.map(i=>i&&typeof i=="object"&&(i.uid||i.id)?i.uid||i.id:i):r.length>0&&r.every(i=>i&&typeof i=="object"&&i.storage==="SmartStorage")?o[n]=r.map(i=>i.id||i.uid||i):o[n]=r.map(i=>typeof i=="object"&&i!==null?R(i,t):i):r&&typeof r=="object"&&(o[n]=R(r,t))}return o}function j(){var r,i;if(!d)return;const e=d.getValue(),t=R(e,v),o=K(e.data,v);if(!(((r=window.__unviredFormsOptions)==null?void 0:r.requireCompleteForm)!==!1&&((i=window.__unviredFormsOptions)==null?void 0:i.requireCompleteForm)!=="false")){showDynamicModal("Are you sure you want to complete the form?",[{label:"Yes",callback:()=>{sendEventCallback({type:FORM_EVENTS.SUBMIT,message:"Success: Form submitted successfully (Validation Bypassed).",data:{formData:t,completeFlag:k,completionPercentage:T,commentsData:FORM_COMMENTS_DATA,result:t,attachmentsData:o}})}},{label:"No",callback:()=>{}}]);return}d.errors=[],d.submit().then(l=>{showDynamicModal("Are you sure you want to complete the form?",[{label:"Yes",callback:()=>{sendEventCallback({type:FORM_EVENTS.SUBMIT,message:"Success: Form submitted successfully.",data:{formData:t,completeFlag:k,completionPercentage:T,commentsData:FORM_COMMENTS_DATA,result:l,attachmentsData:o}})}},{label:"No",callback:()=>{}}])}).catch(l=>{let m=!1,p=[],y=[];if(d&&Array.isArray(d.errors)&&d.errors.length>0&&(y=y.concat(d.errors)),Array.isArray(l)?y=y.concat(l):l&&Array.isArray(l.errors)?y=y.concat(l.errors):l&&Array.isArray(l.details)?y=y.concat(l.details):l&&typeof l=="object"&&(l.message||l.context)&&y.push(l),y.length>0?y.forEach(g=>{const u=J(d,g);u&&u.element?q(u)?(m=!0,p.push(g),Y(u,g)):P(u):(m=!0,p.push(g))}):m=!0,!m){logger.warn("[TF_SDK:321a] \u26A0\uFE0F All reported errors were resolved/hallucinated. Forcing success submit."),showDynamicModal("Are you sure you want to complete the form?",[{label:"Yes",callback:()=>{sendEventCallback({type:FORM_EVENTS.SUBMIT,message:"Success: Form submitted successfully.",data:{formData:t,completeFlag:k,completionPercentage:T,commentsData:FORM_COMMENTS_DATA,result:t,attachmentsData:o}})}},{label:"No",callback:()=>{}}]);return}logger.error("Form submit errors:",p);let s="Please fill in all required fields.";p.length===1&&p[0].message&&(s=p[0].message),showDynamicModal("Error",[{label:"OK"}],s),sendEventCallback({type:FORM_EVENTS.SUBMIT_ERROR,errorMessage:"ErrorCode : 006, Formio not submit the form",data:{reason:"Form submission failed",formData:t,completeFlag:k,completionPercentage:T,technicalError:p.length>0?p:l}})})}function H(){B=null,V=null,I=null}async function Z(){if(!d){logger.error("[TF_SDK:323] \u274C Form object not initialized");return}let e=d.getValue();window.FORM_SUB_TEMP=e;const t=window.FORM_TEMPLATE||{display:"form",type:"form",components:[]};try{typeof window.loadCommentsform=="function"?(await window.loadCommentsform(t,window.FORM_USER_DATA,window.FORM_COMMENTS_DATA,window.FORM_VOB_ARR,window.FORM_USERS_LIST||[]),showCommentsView()):logger.error("[TF_SDK:324] \u274C loadCommentsform is not a function")}catch(o){logger.error("[TF_SDK:325] \u274C Error while loading comments:",o)}}function $(){if(!d)return;const e=d.getValue().data;if(!Object.values(e||{}).some(o=>o!=null&&o!==""&&o!==!1&&!(Array.isArray(o)&&o.length===0)&&!(typeof o=="object"&&!Array.isArray(o)&&Object.keys(o).length===0))){showDynamicModal("Attention",[{label:"OK"}],"Please fill at least one field before saving.");return}showDynamicModal("Do you want to save the data?",[{label:"Yes",callback:()=>{const o=d.getValue(),n=R(o),r=K(o.data,v);sendEventCallback({type:FORM_EVENTS.SAVE,message:"Success: Data saved successfully.",data:{commentsData:FORM_COMMENTS_DATA,formData:n,completeFlag:k,completionPercentage:T,attachmentsData:r}})}},{label:"No",callback:()=>{}}])}function ee(){if(d&&d.options&&d.options.readOnly){L();return}let e;try{e=d?d.getValue().data:null}catch(o){e=null}JSON.stringify(e)===JSON.stringify(_)?L():showDynamicModal("Unsaved Form Data",[{label:"Discard",callback:L},{label:"Save",callback:$}],"Discard your changes or save them before leaving?")}function te(e,t,o){let n=new CustomEvent("capureImageData",{detail:{imageData:e,controlId:t,fileName:o}});document.dispatchEvent(n)}window.checkMoreButtonVisibility=function(){const e=document.getElementById("unvired-more-btn");if(!e)return;const t=window.__unviredFormsOptions||{};if(t.showMoreButton===!1){e.style.display="none";return}const o=document.getElementById("completeOption"),n=document.getElementById("saveOption"),r=document.getElementById("documentsOption"),i=document.getElementById("comments-item"),l=document.getElementById("help-item"),m=(y,s)=>y?s&&t[s]===!0?!0:y.style.display!=="none":!1;m(o)||m(n)||m(r)||t.showComments===!0||t.showHelp===!0?e.style.display="":e.style.display="none"},window.checkMoreButtonVisibility(),window.loadComments=Z,window.loadTRform=z,window.FormOnSave=$,window.FormOnBack=ee,window.setImageData=te,window.FormOnComplete=j,window.FormOnNext=function(){d&&typeof d.nextPage=="function"&&d.nextPage().then(()=>{typeof window.updateWizardNav=="function"&&window.updateWizardNav(d)})},window.FormOnPrevious=function(){d&&typeof d.prevPage=="function"&&d.prevPage().then(()=>{typeof window.updateWizardNav=="function"&&window.updateWizardNav(d)})},window.formOnCompleteFunction=j,window.resetFormCache=H,window.resetInitialFormData=function(){_=null},document.dispatchEvent(new CustomEvent("LoadRNformReady"))})();</script>
38465
39003
  <script>(function(){function l(e){if(!e||([".formio-component-wizard_nav",".btn-wizard-nav-next",".btn-wizard-nav-previous",".btn-wizard-nav-cancel",".btn-wizard-nav-submit"].forEach(n=>{e.element.querySelectorAll(n).forEach(t=>{t.style.display="none"})}),typeof e.eachComponent=="function"&&e.eachComponent(n=>{if(n.type==="button"){const o=(n.component.action||"").toLowerCase(),t=(n.component.label||"").toLowerCase();(o==="next"||o==="previous"||o==="cancel"||t==="next"||t==="previous"||t==="cancel")&&(n.visible=!1,n.element&&(n.element.style.display="none"))}}),!e.wizard))return;const i=document.getElementById("prevBtn"),d=document.getElementById("nextBtn"),u=document.getElementById("submitBtn"),y=document.getElementById("saveBtn"),a=e.page||0,c=e.pages&&e.pages.length||0,g=a>=c-1;if(logger.info(`[TF_SDK:326] \u2705 Page: ${a+1}/${c}, isLastPage: ${g}`),i&&(i.style.display=a>0?"inline-block":"none"),d&&(d.style.display=a<c-1?"inline-block":"none"),g)logger.info("[TF_SDK:328] \u2705 Last page: Allowing normal button logic to take over"),typeof window.checkMoreButtonVisibility=="function"&&window.checkMoreButtonVisibility();else{logger.info("[TF_SDK:327] \u2705 Intermediate page: Hiding save/complete actions"),u&&(u.style.display="none"),y&&(y.style.display="none");const n=document.getElementById("completeOption"),o=document.getElementById("saveOption"),t=document.getElementById("completeDivider"),p=document.getElementById("saveDivider");n&&(n.style.display="none"),o&&(o.style.display="none"),t&&(t.style.display="none"),p&&(p.style.display="none");const r=document.getElementById("quickCompleteBtn"),w=document.getElementById("quickSaveBtn");r&&(r.style.display="none"),w&&(w.style.display="none"),typeof window.checkMoreButtonVisibility=="function"&&window.checkMoreButtonVisibility()}}function f(e,s,i){e&&(e.wizard&&(e.on("nextPage",()=>{l(e),typeof window.executeProgressCalculation=="function"&&window.executeProgressCalculation(s,i)}),e.on("prevPage",()=>{l(e),typeof window.executeProgressCalculation=="function"&&window.executeProgressCalculation(s,i)})),e.on("render",()=>{l(e)}))}window.updateWizardNav=l,window.initializeWizardLogic=function(e,s,i){logger.info("[TF_SDK:329] \u2705 Initializing wizard-specific logic..."),f(e,s,i),e.on("change",()=>{l(e)}),l(e)}})();</script>
38466
39004
  <script>(function(){async function d(o,e,n,w,i=[]){var a,c;logger.info("[TF_SDK:279] \u2705 loadCommentsform() called",{users:i==null?void 0:i.length,commentsData:n==null?void 0:n.length});const r=document.getElementById("formio-cmt");if(!r)return logger.error("[TF_SDK:280] \u274C formio-cmt container not found");if(window.commentsResponse){try{(c=(a=window.commentsResponse).destroy)==null||c.call(a)}catch(t){logger.warn("[TF_SDK:281] \u26A0\uFE0F Could not destroy previous Recogito instance",t)}window.commentsResponse=null}if(window.commentsFormObj&&window.commentsFormObj.destroy)try{await window.commentsFormObj.destroy()}catch(t){logger.warn("[TF_SDK:282] \u26A0\uFE0F Could not destroy previous comments Formio form",t)}r.innerHTML="",logger.info("[TF_SDK:283] \u2705 Creating Formio form in read-only mode for comments..."),window.commentsFormObj=await Formio.createForm(r,o,{renderMode:"html",flatten:!0,readOnly:!0,language:localStorage.getItem("language")||"en"}),window.commentsFormObj.nosubmit=!0,window.commentsFormObj.on("change",()=>{}),logger.info("[TF_SDK:284] \u2705 Initializing Recogito annotation overlay..."),window.commentsResponse=Recogito.init({content:document.getElementById("formio-cmt"),locale:localStorage.getItem("language"),widgets:[{widget:recogito.CommentsMention,userSuggestions:i,editable:"MINE_ONLY"},{widget:"TAG",vocabulary:w}],mode:"html"}),window.commentsResponse.setAuthInfo({id:e.email,displayName:e.firstName||e.email}),window.commentsResponse.on("createAnnotation",function(t){}),window.commentsResponse.on("updateAnnotation",function(t){}),window.commentsResponse.on("selectAnnotation",function(t){const g=new CustomEvent("annotateCss",{detail:!0});document.dispatchEvent(g)}),window.commentsFormObj.formReady.then(()=>{setTimeout(()=>{logger.info("[TF_SDK:285] \u2705 Annotations loaded",{count:n==null?void 0:n.length}),window.commentsResponse.setAnnotations(n)},500);const t=new CustomEvent("loadAnnotationComplete",{});document.dispatchEvent(t),logger.info("[TF_SDK:286] \u2705 loadAnnotationComplete dispatched")})}async function m(){logger.info("[TF_SDK:287] \u2705 goToformRender() \u2014 returning to form view");const o=document.getElementById("formio-cmt");if(o&&(o.innerHTML=""),typeof window.resetFormCache=="function"&&window.resetFormCache(),typeof window.showFormView=="function")try{window.commentsResponse&&window.commentsResponse.destroy&&(window.commentsResponse.destroy(),logger.info("[TF_SDK:288] \u2705 Previous Recogito instance destroyed")),window.commentsFormObj&&window.commentsFormObj.destroy&&(await window.commentsFormObj.destroy(),window.commentsFormObj=null),logger.info("[TF_SDK:289] \u2705 Instantly switching back to form view..."),window.showFormView()}catch(e){logger.error("[TF_SDK:290] \u274C Error restoring form view:",e),typeof sendEventCallback=="function"&&sendEventCallback({type:"ERROR",errorMessage:"ErrorCode : 005, Formio not rendered the forms",data:{reason:"Failed to restore form view",technicalError:e}})}else logger.error("[TF_SDK:291] \u274C showFormView is not defined")}function l(){logger.info("[TF_SDK:292] \u2705 CommentOnBack() \u2014 checking for unsaved changes");let o=window.commentsResponse.getAnnotations(),e=window.FORM_COMMENTS_DATA;const n=JSON.stringify(o)===JSON.stringify(e);logger.info("[TF_SDK:293] \u2705 Annotations changed:",!n),n?m():showDynamicModal("Unsaved Comments",[{label:"Discard",callback:m},{label:"Save",callback:s}],"Discard your comments or save them before leaving?")}function s(){logger.info("[TF_SDK:294] \u2705 submitComments() \u2014 sending annotation data to app");let o=window.commentsResponse.getAnnotations();logger.info("[TF_SDK:295] \u2705 Annotations collected",{count:o==null?void 0:o.length}),sendEventCallback({type:"COMMENTS_DATA",message:"Success: getcomments data.",data:{commentsData:o}}),window.FORM_COMMENTS_DATA=o,m()}window.submitComments=s,window.loadCommentsform=d,window.CommentOnBack=l})();</script>
38467
39005
 
@@ -38472,13 +39010,37 @@ Expecting `+b.join(", ")+", got '"+(this.terminals_[y]||y)+"'":x="Parse error on
38472
39010
  <script>(function(){window.applyLocationLayout=n=>{if(n&&n.Components&&n.Components.components){const o=n,{textfield:e}=o.Components.components;!o.Components.components.location&&e&&o.Components.addComponent("location",e);return}const i=n;if(!i||!i.querySelectorAll)return;i.querySelectorAll(".formio-component-location").forEach(o=>{const e=o.querySelector('[ref="element"]');if(e&&!e.querySelector(".location-custom-icon")){const t=document.createElement("span");t.className="location-custom-icon bi bi-geo-alt-fill",t.title="Fetch Location",t.setAttribute("role","button"),t.setAttribute("aria-label","Get current location"),t.addEventListener("click",l=>{l.preventDefault(),l.stopPropagation(),t.style.opacity="0.5",setTimeout(()=>t.style.opacity="1",200),logger.info("[TF_SDK:36] \u2705 Location Icon Clicked!");const c=o.querySelector("input"),a=c?c.id:o.id;logger.info("[TF_SDK:37] \u2705 Dispatching getLocation for:",a);const r=new CustomEvent("getLocation",{detail:{compObj:o,controlId:a}});document.dispatchEvent(r),c&&c.focus()}),e.prepend(t)}})}})();</script>
38473
39011
  <script>(function(){function h(){var d,r,i,o;const s=window.firstName||((d=window.form)==null?void 0:d.firstName)||((r=window.FORM_USER_DATA)==null?void 0:r.firstName)||"",u=window.lastName||((i=window.form)==null?void 0:i.lastName)||((o=window.FORM_USER_DATA)==null?void 0:o.lastName)||"";return`${s} ${u}`.trim()||"Signer"}const S="cursive";window.applySignatureLayout=function(s){if(!s||!s.components)return;const u=new WeakMap,f=t=>t.querySelector(".signature-click-hint"),d=t=>{const e=document.createElement("span");return e.className="signature-click-hint",e.style.pointerEvents="none",e.innerHTML='Sign Here<br>Or<br><span class="signature-click-action" role="button" tabindex="0">Click To Sign</span>',t.appendChild(e),e},r=t=>{let e=f(t);e||(e=d(t)),e.style.display="inline-flex",e.style.opacity="1",e.style.pointerEvents="none"},i=t=>{const e=f(t);!e||e.style.display==="none"||(e.style.opacity="0",setTimeout(()=>{e.style.opacity==="0"&&(e.style.display="none")},420))},o=t=>{const e=t.dataValue;return!!(e&&typeof e=="string"&&e.length>10)};s.everyComponent(t=>{if(t.type!=="signature")return;const e=t.element;if(!e)return;const n=e.querySelector(".signature-pad-body");if(!n||n.dataset.sigBound==="true")return;n.dataset.sigBound="true";const a=e.querySelector(".signature-pad-canvas"),l=n.querySelector(".signature-pad-refresh");l&&l.classList.remove("btn","btn-sm","btn-light");const g={hasDrawn:o(t)};u.set(n,g),t.options&&t.options.readOnly||g.hasDrawn?i(n):r(n);let y=0;const w=c=>{if(!(c.target&&c.target.closest?c.target.closest(".signature-click-action"):null)||t.options&&t.options.readOnly)return;const p=Date.now();p-y<300||(y=p,c.cancelable&&c.preventDefault(),typeof t.drawSignatureFromName=="function"?(t.drawSignatureFromName(),i(n)):t.refs&&t.refs.clicktoSign&&(t.refs.clicktoSign.click(),i(n)))};n.addEventListener("click",w),n.addEventListener("touchend",w,{passive:!1}),a&&(a.addEventListener("pointerdown",()=>{i(n)}),a.addEventListener("mousedown",()=>i(n)),a.addEventListener("touchstart",()=>i(n),{passive:!0})),l&&l.addEventListener("click",()=>{g.hasDrawn=!1,setTimeout(()=>r(n),50)})}),s._sigHintListenerBound||(s._sigHintListenerBound=!0,s.on("change",()=>{setTimeout(()=>{s.everyComponent(t=>{if(t.type!=="signature")return;const e=t.element;if(!e)return;const n=e.querySelector(".signature-pad-body");if(!n)return;const a=u.get(n);if(!a)return;o(t)?(a.hasDrawn=!0,i(n)):a.hasDrawn||r(n)})},100)}))}})();</script>
38474
39012
  <script>(function(){window.applySurveyLayout=function(r){r.querySelectorAll(".formio-component-survey table").forEach(t=>{const i=Array.from(t.querySelectorAll("thead th")).map(l=>l.innerText.trim());t.querySelectorAll("tbody tr").forEach(l=>{l.querySelectorAll("td").forEach((n,o)=>{o>0&&i[o]&&n.setAttribute("data-label",i[o])})})})},window.prepareSurvey=function(r){!window.Formio||!window.Formio.Utils||window.Formio.Utils.eachComponent(r,function(e){if(e.type==="survey"&&e.validate&&e.validate.required){const t=e.label||"This field";e.validate.custom=`var keys = Object.keys(input || {}); valid = (keys.length === 0 || keys.length >= component.questions.length) ? true : '${t} requires you to fill all fields.';`}})}})();</script>
38475
- <script>(function(){window.applyTabsLayout=function(i){if(!i)return;i.querySelectorAll(".formio-component-tabs").forEach(c=>{if(c.dataset.tabsPatched==="true")return;const o=c.querySelectorAll(":scope > .card > .card-header .nav-item"),n=c.querySelectorAll(":scope > .card > .card-header .nav-link"),l=c.querySelectorAll(":scope > .card > .tab-pane");if(!n.length||!l.length)return;const d=e=>{o.forEach((t,a)=>{t.classList.toggle("active",a===e),t.setAttribute("role","tab")}),n.forEach((t,a)=>{const s=a===e;t.classList.toggle("active",s),t.setAttribute("aria-selected",s?"true":"false"),s?t.setAttribute("tabindex","0"):t.setAttribute("tabindex","-1")}),l.forEach((t,a)=>{const s=a===e;t.classList.toggle("active",s),t.style.display=s?"block":"none"}),window.dispatchEvent(new Event("resize"))};n.forEach((e,t)=>{e.addEventListener("click",a=>{a.preventDefault(),d(t)})});let r=Array.from(n).findIndex(e=>e.classList.contains("active"));r<0&&(r=Array.from(o).findIndex(e=>e.classList.contains("active"))),r<0&&(r=0),d(r),c.dataset.tabsPatched="true"})}})();</script>
39013
+ <script>(function(){window.applyTabsLayout=function(B){if(!B)return;B.querySelectorAll(".formio-component-tabs").forEach(A=>{if(A.dataset.tabsPatched==="true")return;const s=A.querySelector(":scope > .card");if(!s)return;const a=s.querySelector(":scope > .card-header"),m=a?a.querySelectorAll(".nav-item"):[],y=a?a.querySelectorAll(".nav-link"):[],x=s.querySelectorAll(":scope > .tab-pane");if(!y.length||!x.length)return;const E=s.classList.contains("card-vertical")||a&&a.querySelector(".nav-tabs-vertical"),o=a?a.querySelector(".tab-component-tabs")||a.querySelector(".nav-tabs"):null;let d=s.querySelector(".tf-tabs-mobile-bar, .tf-vertical-tabs-mobile-bar");d||(d=document.createElement("div"),d.className="tf-tabs-mobile-bar tf-vertical-tabs-mobile-bar",d.innerHTML=`
39014
+ <button type="button" class="tf-tabs-toggle tf-vertical-tabs-toggle" aria-label="Select tab" aria-expanded="false">
39015
+ <span class="tf-tabs-toggle-icon tf-vertical-tabs-toggle-icon">
39016
+ <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
39017
+ <line x1="3" y1="12" x2="21" y2="12"></line>
39018
+ <line x1="3" y1="6" x2="21" y2="6"></line>
39019
+ <line x1="3" y1="18" x2="21" y2="18"></line>
39020
+ </svg>
39021
+ </span>
39022
+ <span class="tf-tabs-current-title tf-vertical-tabs-current-title"></span>
39023
+ <span class="tf-tabs-toggle-arrow tf-vertical-tabs-toggle-arrow">
39024
+ <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
39025
+ <polyline points="6 9 12 15 18 9"></polyline>
39026
+ </svg>
39027
+ </span>
39028
+ </button>
39029
+ `,a?s.insertBefore(d,a):s.insertBefore(d,s.firstChild));let u=s.querySelector(".tf-tabs-backdrop, .tf-vertical-tabs-backdrop");u||(u=document.createElement("div"),u.className="tf-tabs-backdrop tf-vertical-tabs-backdrop",s.appendChild(u));const q=d.querySelector(".tf-tabs-current-title, .tf-vertical-tabs-current-title"),f=d.querySelector(".tf-tabs-toggle, .tf-vertical-tabs-toggle"),w=()=>{s.classList.remove("tf-tabs-overlay-open"),f&&f.setAttribute("aria-expanded","false")},W=t=>{t.stopPropagation();const e=s.classList.toggle("tf-tabs-overlay-open");f&&f.setAttribute("aria-expanded",e?"true":"false")};f&&!f.dataset.bound&&(f.addEventListener("click",W),f.dataset.bound="true"),u&&!u.dataset.bound&&(u.addEventListener("click",t=>{t.stopPropagation(),w()}),u.dataset.bound="true"),s.dataset.overlayListenerBound||(document.addEventListener("click",t=>{s.classList.contains("tf-tabs-overlay-open")&&!s.contains(t.target)&&w()}),s.dataset.overlayListenerBound="true");let L=()=>{};if(!E&&a&&o){let t=a.querySelector(".tf-tabs-scroll-left"),e=a.querySelector(".tf-tabs-scroll-right");t||(t=document.createElement("button"),t.type="button",t.className="tf-tabs-scroll-btn tf-tabs-scroll-left",t.setAttribute("aria-label","Scroll tabs left"),t.innerHTML=`
39030
+ <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round">
39031
+ <polyline points="15 18 9 12 15 6"></polyline>
39032
+ </svg>
39033
+ `,a.insertBefore(t,o)),e||(e=document.createElement("button"),e.type="button",e.className="tf-tabs-scroll-btn tf-tabs-scroll-right",e.setAttribute("aria-label","Scroll tabs right"),e.innerHTML=`
39034
+ <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round">
39035
+ <polyline points="9 18 15 12 9 6"></polyline>
39036
+ </svg>
39037
+ `,a.appendChild(e));let i=null,h=null,l=null,n=null;L=()=>{if(window.innerWidth<=768){i!==!0&&(t.classList.add("tf-scroll-hidden"),e.classList.add("tf-scroll-hidden"),i=!0,h=!0);return}const c=o.scrollWidth-o.clientWidth,p=c<=2;if(i!==p&&(t.classList.toggle("tf-scroll-hidden",p),e.classList.toggle("tf-scroll-hidden",p),i=p,h=p),!p){const D=o.scrollLeft,k=D<=2,S=D>=c-2;l!==k&&(t.classList.toggle("tf-scroll-disabled",k),k?t.setAttribute("disabled","true"):t.removeAttribute("disabled"),l=k),n!==S&&(e.classList.toggle("tf-scroll-disabled",S),S?e.setAttribute("disabled","true"):e.removeAttribute("disabled"),n=S)}};let r=null;const b=()=>{r&&cancelAnimationFrame(r),r=requestAnimationFrame(L)};t.dataset.bound||(t.addEventListener("click",c=>{c.preventDefault(),o.scrollBy({left:-220,behavior:"smooth"})}),t.dataset.bound="true"),e.dataset.bound||(e.addEventListener("click",c=>{c.preventDefault(),o.scrollBy({left:220,behavior:"smooth"})}),e.dataset.bound="true"),o.dataset.scrollBound||(o.addEventListener("scroll",b,{passive:!0}),o.dataset.scrollBound="true"),s.dataset.resizeBound||(window.addEventListener("resize",b),s.dataset.resizeBound="true"),setTimeout(L,50)}let T=-1,v=null;const C=(t,e=!1)=>{if(t===T&&!e)return;let i="";m.forEach((l,n)=>{l.classList.toggle("active",n===t),l.setAttribute("role","tab")}),y.forEach((l,n)=>{const r=n===t;l.classList.toggle("active",r),l.setAttribute("aria-selected",r?"true":"false"),r?(l.setAttribute("tabindex","0"),i=l.textContent.trim()):l.setAttribute("tabindex","-1")}),q&&i&&(q.textContent=i),w();const h=()=>{if(T=t,x.forEach((l,n)=>{const r=n===t;l.classList.toggle("active",r),l.style.display=r?"block":"none"}),!E&&o&&m[t])try{const l=m[t],n=o.scrollLeft,r=o.clientWidth,b=l.offsetLeft,c=l.offsetWidth;b<n?o.scrollTo({left:Math.max(0,b-20),behavior:"auto"}):b+c>n+r&&o.scrollTo({left:b+c-r+20,behavior:"auto"})}catch(l){}L()};e?(v&&(clearTimeout(v),v=null),h()):(v&&clearTimeout(v),v=setTimeout(h,50))};y.forEach((t,e)=>{t.addEventListener("click",i=>{i.preventDefault(),i.stopPropagation(),i.stopImmediatePropagation(),C(e)},!0)});let g=Array.from(y).findIndex(t=>t.classList.contains("active"));g<0&&(g=Array.from(m).findIndex(t=>t.classList.contains("active"))),g<0&&(g=0),C(g,!0),A.dataset.tabsPatched="true"})}})();</script>
38476
39038
 
38477
39039
  <script>(function(){window.applyDayLayout=function(s){if(!s)return;s.querySelectorAll(".formio-component-day").forEach(l=>{l.querySelectorAll("input, select").forEach(e=>{if(e.classList.contains("formio-select-autocomplete-input"))return;if(e.tagName==="SELECT"){const t=e.options[0];t&&(t.value===""||!t.value)&&(t.textContent=" ")}(!e.getAttribute("placeholder")||e.getAttribute("placeholder")==="")&&e.setAttribute("placeholder"," ");const o=()=>{const t=e.closest('[class*="col-"]');if(!t)return;const a=e.value;a!=null&&a.toString().trim()!==""?t.classList.add("has-value"):t.classList.remove("has-value")};e.addEventListener("change",o),e.addEventListener("input",o),o()}),l.classList.add("day-layout-ready")})}})();</script>
38478
39040
  <script>(function(){window.initializeTooltips=r=>{if(!window.tippy)return;if(!window.tippyDelegate){window.tippyDelegate=tippy.delegate(document.body,{target:'[data-tooltip], [data-content], [ref="tooltip"], [data-tippy-content]',trigger:"click",hideOnClick:!1,interactive:!0,touch:!0,appendTo:()=>document.body,boundary:"viewport",flipOnUpdate:!0,maxWidth:350,onShow(t){window.tippyDelegate&&window.tippyDelegate.instances&&window.tippyDelegate.instances.forEach(o=>{o!==t&&o.hide()}),t.reference.setAttribute("aria-expanded","true");const e=t.reference.getAttribute("data-tooltip")||t.reference.getAttribute("data-content")||t.reference.getAttribute("title");e&&t.setContent(e)},onHide(t){t.reference.setAttribute("aria-expanded","false")}}),document.body.addEventListener("click",t=>{!t.target.closest('[ref="tooltip"], .bi-question-circle')&&window.tippyDelegate&&window.tippyDelegate.instances&&window.tippyDelegate.instances.forEach(o=>o.hide())});const i=t=>{const e=t.target.closest('[ref="tooltip"], .bi-question-circle');e&&(t.stopPropagation(),(t.type==="touchstart"||t.type==="touchend"||e.closest("label"))&&t.cancelable&&t.preventDefault())};document.body.addEventListener("click",i,!0),document.body.addEventListener("touchstart",i,{capture:!0,passive:!1}),document.body.addEventListener("touchend",i,{capture:!0,passive:!1})}[].slice.call((r||document).querySelectorAll('[data-tooltip], [data-content], [ref="tooltip"]')).forEach(i=>i.removeAttribute("title"))}})();</script>
38479
39041
  <script>(function(){const t=i=>{(i||document).querySelectorAll(".formio-component-bio").forEach(e=>{const o=e.querySelector(".ck-editor__editable");o&&(o.addEventListener("focus",()=>{e.classList.add("is-focused")}),o.addEventListener("blur",()=>{e.classList.remove("is-focused")}))})};typeof themeHook!="undefined"&&themeHook.register("bio",t)})();</script>
38480
- <script>(function(){window.applyWizardLayout=r=>{if(!r)return;const t=r.querySelector(".breadcrumb")||r.querySelector(".pagination");if(!t)return;const a=Array.from(t.querySelectorAll(".breadcrumb-item, .page-item"));let s=!1;a.forEach(e=>{e.classList.contains("active")?(s=!0,e.classList.remove("completed")):s?e.classList.remove("completed"):e.classList.add("completed")})}})();</script>
38481
- <script>(function(){const c=t=>{if(typeof prepareFloating!="function"||!t)return;t.schema&&(t.schema.components||t.schema.pages)&&prepareFloating(t.schema.components||t.schema.pages||[]);const a=["textfield","email","number","password","phoneNumber","textarea","datetime","dateTime","day","currency","time","barcode","location","barcodeselect","url","website","smartId"];t.everyComponent(n=>{n.component&&a.includes(n.component.type)&&(n.component.placeholder||(n.component.placeholder=" "),n.input&&(Array.isArray(n.input)?n.input:[n.input]).forEach(e=>{e&&(e.placeholder===void 0||e.placeholder==="")&&(e.placeholder=" ")})),n.subForm&&c(n.subForm)})},y=t=>{if(!t||!t.element)return;const a=t.element;c(t),typeof applyCheckboxLayout=="function"&&applyCheckboxLayout(a),typeof applyTableLayout=="function"&&applyTableLayout(a),typeof applySurveyLayout=="function"&&applySurveyLayout(a),typeof applyLocationLayout=="function"&&applyLocationLayout(a),typeof applyTabsLayout=="function"&&applyTabsLayout(a),typeof applyColumnLayout=="function"&&applyColumnLayout(a),typeof applyFloatingLabelsLayout=="function"&&applyFloatingLabelsLayout(a),typeof applyBarcodeLayout=="function"&&applyBarcodeLayout(a),typeof applyFileLayout=="function"&&applyFileLayout(a),typeof applyDayLayout=="function"&&applyDayLayout(a),typeof applySignatureLayout=="function"&&applySignatureLayout(t),typeof applyWizardLayout=="function"&&applyWizardLayout(a),typeof initializeTooltips=="function"&&initializeTooltips(a)},f=()=>{const t=window.Formio;if(!t)return setTimeout(f,100);if(!t._themeIntegrated){if(t._themeIntegrated=!0,t.icons="bi",t.Templates.framework="bootstrap5",typeof applyBarcodeLayout=="function"&&applyBarcodeLayout(t),typeof applyLocationLayout=="function"&&applyLocationLayout(t),t.Components&&t.Components.components){const{select:i}=t.Components.components;if(!t.Components.components.barcodeselect&&i)try{t.Components.addComponent("barcodeselect",i)}catch(e){logger.warn("[TF_SDK:39] \u26A0\uFE0F Could not add barcodeselect component:",e)}}const a=i=>{!i||!Array.isArray(i)||i.forEach(e=>{(e.type==="datetime"||e.type==="day")&&(e.widget=e.widget||{type:"calendar"},e.widget.displayInModal=!1,e.widget.customOptions=e.widget.customOptions||{}),e.components&&Array.isArray(e.components)&&a(e.components),e.columns&&Array.isArray(e.columns)&&a(e.columns),e.rows&&Array.isArray(e.rows)&&e.rows.forEach(r=>{Array.isArray(r)&&r.forEach(o=>{o&&o.components&&a(o.components)})})})},n=t.createForm;t.createForm=async function(i,e,r={}){if(e&&(e.components||e.display)){const s=e.components||(e.display==="wizard"?e.components:[]);s.length>0&&typeof prepareFloating=="function"&&prepareFloating(s),s.length>0&&typeof prepareSurvey=="function"&&prepareSurvey(s),s.length>0&&a(s)}const o=await n.call(this,i,e,r);y(o);let l;const p=()=>{clearTimeout(l),l=setTimeout(()=>{y(o)},20)};return o.on("change",p),o.on("redraw",p),o.on("render",p),window.addEventListener("resize",p),logger.info("[TF_SDK:40] \u2705 Unvired Theme: Applied premium UI to form."),o},window._tfDialogObserver||(window._tfDialogObserver=new MutationObserver(i=>{i.forEach(e=>{e.addedNodes.forEach(r=>{if(r.nodeType===1){let o=null;if(r.classList&&r.classList.contains("formio-dialog")?o=r:typeof r.querySelector=="function"&&(o=r.querySelector(".formio-dialog")),o&&!o.classList.contains("tf-embed-sdk")){const l=document.querySelector(".tf-embed-sdk:not(.formio-dialog)");l&&(o.classList.add("tf-embed-sdk"),l.style&&l.style.cssText&&(o.style.cssText+=l.style.cssText))}}})})}),window._tfDialogObserver.observe(document.body,{childList:!0,subtree:!0}),document.querySelectorAll(".formio-dialog").forEach(i=>{const e=document.querySelector(".tf-embed-sdk:not(.formio-dialog)");!i.classList.contains("tf-embed-sdk")&&e&&(i.classList.add("tf-embed-sdk"),e.style&&e.style.cssText&&(i.style.cssText+=e.style.cssText))})),window._tfFlatpickrScrollFix||(window._tfFlatpickrScrollFix=!0,window.addEventListener("scroll",function(i){if(i.target&&i.target.classList&&i.target.classList.contains("flatpickr-calendar"))return;document.querySelectorAll(".flatpickr-calendar.open").length>0&&document.querySelectorAll(".flatpickr-input").forEach(o=>{o._flatpickr&&o._flatpickr.isOpen&&typeof o._flatpickr.close=="function"&&(o._flatpickr.close(),(document.activeElement===o||document.activeElement===o.nextSibling)&&document.activeElement.blur())})},{capture:!0,passive:!0})),logger.info("[TF_SDK:41] \u2705 Unvired Theme: Global Hook Active.")}};f()})();</script>
39042
+ <script>(function(){window.applyWizardLayout=r=>{if(!r)return;const t=r.querySelector(".breadcrumb")||r.querySelector(".pagination");if(!t)return;const c=Array.from(t.querySelectorAll(".breadcrumb-item, .page-item"));let s=!1;c.forEach(e=>{if(e.classList.contains("active")){s=!0,e.classList.remove("completed");try{e.scrollIntoView({behavior:"smooth",inline:"center",block:"nearest"})}catch(o){}}else s?e.classList.remove("completed"):e.classList.add("completed")})}})();</script>
39043
+ <script>(function(){const c=t=>{if(typeof prepareFloating!="function"||!t)return;t.schema&&(t.schema.components||t.schema.pages)&&prepareFloating(t.schema.components||t.schema.pages||[]);const a=["textfield","email","number","password","phoneNumber","textarea","datetime","dateTime","day","currency","time","barcode","location","barcodeselect","url","website","smartId"];t.everyComponent(n=>{n.component&&a.includes(n.component.type)&&(n.component.placeholder||(n.component.placeholder=" "),n.input&&(Array.isArray(n.input)?n.input:[n.input]).forEach(e=>{e&&(e.placeholder===void 0||e.placeholder==="")&&(e.placeholder=" ")})),n.subForm&&c(n.subForm)})},y=t=>{if(!t||!t.element)return;const a=t.element;c(t),typeof applyCheckboxLayout=="function"&&applyCheckboxLayout(a),typeof applyTableLayout=="function"&&applyTableLayout(a),typeof applySurveyLayout=="function"&&applySurveyLayout(a),typeof applyLocationLayout=="function"&&applyLocationLayout(a),typeof applyTabsLayout=="function"&&applyTabsLayout(a),typeof applyColumnLayout=="function"&&applyColumnLayout(a),typeof applyFloatingLabelsLayout=="function"&&applyFloatingLabelsLayout(a),typeof applyBarcodeLayout=="function"&&applyBarcodeLayout(a),typeof applyFileLayout=="function"&&applyFileLayout(a),typeof applyDayLayout=="function"&&applyDayLayout(a),typeof applySignatureLayout=="function"&&applySignatureLayout(t),typeof applyWizardLayout=="function"&&applyWizardLayout(a),typeof initializeTooltips=="function"&&initializeTooltips(a)},f=()=>{const t=window.Formio;if(!t)return setTimeout(f,100);if(!t._themeIntegrated){if(t._themeIntegrated=!0,t.icons="bi",t.Templates.framework="bootstrap5",typeof applyBarcodeLayout=="function"&&applyBarcodeLayout(t),typeof applyLocationLayout=="function"&&applyLocationLayout(t),t.Components&&t.Components.components){const{select:i}=t.Components.components;if(!t.Components.components.barcodeselect&&i)try{t.Components.addComponent("barcodeselect",i)}catch(e){logger.warn("[TF_SDK:39] \u26A0\uFE0F Could not add barcodeselect component:",e)}}const a=i=>{!i||!Array.isArray(i)||i.forEach(e=>{(e.type==="datetime"||e.type==="day")&&(e.widget=e.widget||{type:"calendar"},e.widget.displayInModal=!1,e.widget.customOptions=e.widget.customOptions||{}),e.components&&Array.isArray(e.components)&&a(e.components),e.columns&&Array.isArray(e.columns)&&a(e.columns),e.rows&&Array.isArray(e.rows)&&e.rows.forEach(r=>{Array.isArray(r)&&r.forEach(o=>{o&&o.components&&a(o.components)})})})},n=t.createForm;t.createForm=async function(i,e,r={}){if(e&&(e.components||e.display)){const s=e.components||(e.display==="wizard"?e.components:[]);s.length>0&&typeof prepareFloating=="function"&&prepareFloating(s),s.length>0&&typeof prepareSurvey=="function"&&prepareSurvey(s),s.length>0&&a(s)}const o=await n.call(this,i,e,r);y(o);let l;const p=()=>{clearTimeout(l),l=setTimeout(()=>{y(o)},100)};return o.on("change",p),o.on("redraw",p),o.on("render",p),window.addEventListener("resize",p),logger.info("[TF_SDK:40] \u2705 Unvired Theme: Applied premium UI to form."),o},window._tfDialogObserver||(window._tfDialogObserver=new MutationObserver(i=>{i.forEach(e=>{e.addedNodes.forEach(r=>{if(r.nodeType===1){let o=null;if(r.classList&&r.classList.contains("formio-dialog")?o=r:typeof r.querySelector=="function"&&(o=r.querySelector(".formio-dialog")),o&&!o.classList.contains("tf-embed-sdk")){const l=document.querySelector(".tf-embed-sdk:not(.formio-dialog)");l&&(o.classList.add("tf-embed-sdk"),l.style&&l.style.cssText&&(o.style.cssText+=l.style.cssText))}}})})}),window._tfDialogObserver.observe(document.body,{childList:!0,subtree:!0}),document.querySelectorAll(".formio-dialog").forEach(i=>{const e=document.querySelector(".tf-embed-sdk:not(.formio-dialog)");!i.classList.contains("tf-embed-sdk")&&e&&(i.classList.add("tf-embed-sdk"),e.style&&e.style.cssText&&(i.style.cssText+=e.style.cssText))})),window._tfFlatpickrScrollFix||(window._tfFlatpickrScrollFix=!0,window.addEventListener("scroll",function(i){if(i.target&&i.target.classList&&i.target.classList.contains("flatpickr-calendar"))return;document.querySelectorAll(".flatpickr-calendar.open").length>0&&document.querySelectorAll(".flatpickr-input").forEach(o=>{o._flatpickr&&o._flatpickr.isOpen&&typeof o._flatpickr.close=="function"&&(o._flatpickr.close(),(document.activeElement===o||document.activeElement===o.nextSibling)&&document.activeElement.blur())})},{capture:!0,passive:!0})),logger.info("[TF_SDK:41] \u2705 Unvired Theme: Global Hook Active.")}};f()})();</script>
38482
39044
 
38483
39045
  </head>
38484
39046
 
@@ -38527,7 +39089,7 @@ Expecting `+b.join(", ")+", got '"+(this.terminals_[y]||y)+"'":x="Parse error on
38527
39089
 
38528
39090
 
38529
39091
  <div id="sticky-footer" class="footer-hidden" style="display: none;">
38530
- <div class="build-version">SDK v2.0.82</div>
39092
+ <div class="build-version">SDK v2.0.83</div>
38531
39093
 
38532
39094
  <button class="footer-btn footer-btn-secondary" id="prevBtn" style="display:none" onclick="FormOnPrevious()">
38533
39095
  <i class="bi bi-chevron-left"></i> Previous