@native-systems/ui 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs ADDED
@@ -0,0 +1,1340 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var React = require('react');
6
+ var reactHookForm = require('react-hook-form');
7
+ var utility = require('@native-systems/utility');
8
+
9
+ function _interopNamespaceDefault(e) {
10
+ var n = Object.create(null);
11
+ if (e) {
12
+ Object.keys(e).forEach(function (k) {
13
+ if (k !== 'default') {
14
+ var d = Object.getOwnPropertyDescriptor(e, k);
15
+ Object.defineProperty(
16
+ n,
17
+ k,
18
+ d.get
19
+ ? d
20
+ : {
21
+ enumerable: true,
22
+ get: function () {
23
+ return e[k];
24
+ },
25
+ }
26
+ );
27
+ }
28
+ });
29
+ }
30
+ n.default = e;
31
+ return Object.freeze(n);
32
+ }
33
+
34
+ var React__namespace = /*#__PURE__*/ _interopNamespaceDefault(React);
35
+
36
+ // shim for using process in browser
37
+ // based off https://github.com/defunctzombie/node-process/blob/master/browser.js
38
+
39
+ var env = {};
40
+
41
+ var browser$1 = {
42
+ env: env,
43
+ };
44
+
45
+ var jsxRuntime = { exports: {} };
46
+
47
+ var reactJsxRuntime_production = {};
48
+
49
+ /**
50
+ * @license React
51
+ * react-jsx-runtime.production.js
52
+ *
53
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
54
+ *
55
+ * This source code is licensed under the MIT license found in the
56
+ * LICENSE file in the root directory of this source tree.
57
+ */
58
+
59
+ var hasRequiredReactJsxRuntime_production;
60
+
61
+ function requireReactJsxRuntime_production() {
62
+ if (hasRequiredReactJsxRuntime_production) return reactJsxRuntime_production;
63
+ hasRequiredReactJsxRuntime_production = 1;
64
+ var REACT_ELEMENT_TYPE = Symbol.for('react.transitional.element'),
65
+ REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');
66
+ function jsxProd(type, config, maybeKey) {
67
+ var key = null;
68
+ void 0 !== maybeKey && (key = '' + maybeKey);
69
+ void 0 !== config.key && (key = '' + config.key);
70
+ if ('key' in config) {
71
+ maybeKey = {};
72
+ for (var propName in config)
73
+ 'key' !== propName && (maybeKey[propName] = config[propName]);
74
+ } else maybeKey = config;
75
+ config = maybeKey.ref;
76
+ return {
77
+ $$typeof: REACT_ELEMENT_TYPE,
78
+ type: type,
79
+ key: key,
80
+ ref: void 0 !== config ? config : null,
81
+ props: maybeKey,
82
+ };
83
+ }
84
+ reactJsxRuntime_production.Fragment = REACT_FRAGMENT_TYPE;
85
+ reactJsxRuntime_production.jsx = jsxProd;
86
+ reactJsxRuntime_production.jsxs = jsxProd;
87
+ return reactJsxRuntime_production;
88
+ }
89
+
90
+ var reactJsxRuntime_development = {};
91
+
92
+ var hasRequiredReactJsxRuntime_development;
93
+
94
+ function requireReactJsxRuntime_development() {
95
+ if (hasRequiredReactJsxRuntime_development)
96
+ return reactJsxRuntime_development;
97
+ hasRequiredReactJsxRuntime_development = 1;
98
+ 'production' !== browser$1.env.NODE_ENV &&
99
+ (function () {
100
+ function getComponentNameFromType(type) {
101
+ if (null == type) return null;
102
+ if ('function' === typeof type)
103
+ return type.$$typeof === REACT_CLIENT_REFERENCE
104
+ ? null
105
+ : type.displayName || type.name || null;
106
+ if ('string' === typeof type) return type;
107
+ switch (type) {
108
+ case REACT_FRAGMENT_TYPE:
109
+ return 'Fragment';
110
+ case REACT_PROFILER_TYPE:
111
+ return 'Profiler';
112
+ case REACT_STRICT_MODE_TYPE:
113
+ return 'StrictMode';
114
+ case REACT_SUSPENSE_TYPE:
115
+ return 'Suspense';
116
+ case REACT_SUSPENSE_LIST_TYPE:
117
+ return 'SuspenseList';
118
+ case REACT_ACTIVITY_TYPE:
119
+ return 'Activity';
120
+ }
121
+ if ('object' === typeof type)
122
+ switch (
123
+ ('number' === typeof type.tag &&
124
+ console.error(
125
+ 'Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.'
126
+ ),
127
+ type.$$typeof)
128
+ ) {
129
+ case REACT_PORTAL_TYPE:
130
+ return 'Portal';
131
+ case REACT_CONTEXT_TYPE:
132
+ return (type.displayName || 'Context') + '.Provider';
133
+ case REACT_CONSUMER_TYPE:
134
+ return (type._context.displayName || 'Context') + '.Consumer';
135
+ case REACT_FORWARD_REF_TYPE:
136
+ var innerType = type.render;
137
+ type = type.displayName;
138
+ type ||
139
+ ((type = innerType.displayName || innerType.name || ''),
140
+ (type =
141
+ '' !== type ? 'ForwardRef(' + type + ')' : 'ForwardRef'));
142
+ return type;
143
+ case REACT_MEMO_TYPE:
144
+ return (
145
+ (innerType = type.displayName || null),
146
+ null !== innerType
147
+ ? innerType
148
+ : getComponentNameFromType(type.type) || 'Memo'
149
+ );
150
+ case REACT_LAZY_TYPE:
151
+ innerType = type._payload;
152
+ type = type._init;
153
+ try {
154
+ return getComponentNameFromType(type(innerType));
155
+ } catch (x) {}
156
+ }
157
+ return null;
158
+ }
159
+ function testStringCoercion(value) {
160
+ return '' + value;
161
+ }
162
+ function checkKeyStringCoercion(value) {
163
+ try {
164
+ testStringCoercion(value);
165
+ var JSCompiler_inline_result = !1;
166
+ } catch (e) {
167
+ JSCompiler_inline_result = true;
168
+ }
169
+ if (JSCompiler_inline_result) {
170
+ JSCompiler_inline_result = console;
171
+ var JSCompiler_temp_const = JSCompiler_inline_result.error;
172
+ var JSCompiler_inline_result$jscomp$0 =
173
+ ('function' === typeof Symbol &&
174
+ Symbol.toStringTag &&
175
+ value[Symbol.toStringTag]) ||
176
+ value.constructor.name ||
177
+ 'Object';
178
+ JSCompiler_temp_const.call(
179
+ JSCompiler_inline_result,
180
+ 'The provided key is an unsupported type %s. This value must be coerced to a string before using it here.',
181
+ JSCompiler_inline_result$jscomp$0
182
+ );
183
+ return testStringCoercion(value);
184
+ }
185
+ }
186
+ function getTaskName(type) {
187
+ if (type === REACT_FRAGMENT_TYPE) return '<>';
188
+ if (
189
+ 'object' === typeof type &&
190
+ null !== type &&
191
+ type.$$typeof === REACT_LAZY_TYPE
192
+ )
193
+ return '<...>';
194
+ try {
195
+ var name = getComponentNameFromType(type);
196
+ return name ? '<' + name + '>' : '<...>';
197
+ } catch (x) {
198
+ return '<...>';
199
+ }
200
+ }
201
+ function getOwner() {
202
+ var dispatcher = ReactSharedInternals.A;
203
+ return null === dispatcher ? null : dispatcher.getOwner();
204
+ }
205
+ function UnknownOwner() {
206
+ return Error('react-stack-top-frame');
207
+ }
208
+ function hasValidKey(config) {
209
+ if (hasOwnProperty.call(config, 'key')) {
210
+ var getter = Object.getOwnPropertyDescriptor(config, 'key').get;
211
+ if (getter && getter.isReactWarning) return false;
212
+ }
213
+ return void 0 !== config.key;
214
+ }
215
+ function defineKeyPropWarningGetter(props, displayName) {
216
+ function warnAboutAccessingKey() {
217
+ specialPropKeyWarningShown ||
218
+ ((specialPropKeyWarningShown = true),
219
+ console.error(
220
+ '%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)',
221
+ displayName
222
+ ));
223
+ }
224
+ warnAboutAccessingKey.isReactWarning = true;
225
+ Object.defineProperty(props, 'key', {
226
+ get: warnAboutAccessingKey,
227
+ configurable: true,
228
+ });
229
+ }
230
+ function elementRefGetterWithDeprecationWarning() {
231
+ var componentName = getComponentNameFromType(this.type);
232
+ didWarnAboutElementRef[componentName] ||
233
+ ((didWarnAboutElementRef[componentName] = true),
234
+ console.error(
235
+ 'Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.'
236
+ ));
237
+ componentName = this.props.ref;
238
+ return void 0 !== componentName ? componentName : null;
239
+ }
240
+ function ReactElement(
241
+ type,
242
+ key,
243
+ self,
244
+ source,
245
+ owner,
246
+ props,
247
+ debugStack,
248
+ debugTask
249
+ ) {
250
+ self = props.ref;
251
+ type = {
252
+ $$typeof: REACT_ELEMENT_TYPE,
253
+ type: type,
254
+ key: key,
255
+ props: props,
256
+ _owner: owner,
257
+ };
258
+ null !== (void 0 !== self ? self : null)
259
+ ? Object.defineProperty(type, 'ref', {
260
+ enumerable: false,
261
+ get: elementRefGetterWithDeprecationWarning,
262
+ })
263
+ : Object.defineProperty(type, 'ref', {
264
+ enumerable: false,
265
+ value: null,
266
+ });
267
+ type._store = {};
268
+ Object.defineProperty(type._store, 'validated', {
269
+ configurable: false,
270
+ enumerable: false,
271
+ writable: true,
272
+ value: 0,
273
+ });
274
+ Object.defineProperty(type, '_debugInfo', {
275
+ configurable: false,
276
+ enumerable: false,
277
+ writable: true,
278
+ value: null,
279
+ });
280
+ Object.defineProperty(type, '_debugStack', {
281
+ configurable: false,
282
+ enumerable: false,
283
+ writable: true,
284
+ value: debugStack,
285
+ });
286
+ Object.defineProperty(type, '_debugTask', {
287
+ configurable: false,
288
+ enumerable: false,
289
+ writable: true,
290
+ value: debugTask,
291
+ });
292
+ Object.freeze && (Object.freeze(type.props), Object.freeze(type));
293
+ return type;
294
+ }
295
+ function jsxDEVImpl(
296
+ type,
297
+ config,
298
+ maybeKey,
299
+ isStaticChildren,
300
+ source,
301
+ self,
302
+ debugStack,
303
+ debugTask
304
+ ) {
305
+ var children = config.children;
306
+ if (void 0 !== children)
307
+ if (isStaticChildren)
308
+ if (isArrayImpl(children)) {
309
+ for (
310
+ isStaticChildren = 0;
311
+ isStaticChildren < children.length;
312
+ isStaticChildren++
313
+ )
314
+ validateChildKeys(children[isStaticChildren]);
315
+ Object.freeze && Object.freeze(children);
316
+ } else
317
+ console.error(
318
+ 'React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.'
319
+ );
320
+ else validateChildKeys(children);
321
+ if (hasOwnProperty.call(config, 'key')) {
322
+ children = getComponentNameFromType(type);
323
+ var keys = Object.keys(config).filter(function (k) {
324
+ return 'key' !== k;
325
+ });
326
+ isStaticChildren =
327
+ 0 < keys.length
328
+ ? '{key: someKey, ' + keys.join(': ..., ') + ': ...}'
329
+ : '{key: someKey}';
330
+ didWarnAboutKeySpread[children + isStaticChildren] ||
331
+ ((keys =
332
+ 0 < keys.length ? '{' + keys.join(': ..., ') + ': ...}' : '{}'),
333
+ console.error(
334
+ 'A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',
335
+ isStaticChildren,
336
+ children,
337
+ keys,
338
+ children
339
+ ),
340
+ (didWarnAboutKeySpread[children + isStaticChildren] = true));
341
+ }
342
+ children = null;
343
+ void 0 !== maybeKey &&
344
+ (checkKeyStringCoercion(maybeKey), (children = '' + maybeKey));
345
+ hasValidKey(config) &&
346
+ (checkKeyStringCoercion(config.key), (children = '' + config.key));
347
+ if ('key' in config) {
348
+ maybeKey = {};
349
+ for (var propName in config)
350
+ 'key' !== propName && (maybeKey[propName] = config[propName]);
351
+ } else maybeKey = config;
352
+ children &&
353
+ defineKeyPropWarningGetter(
354
+ maybeKey,
355
+ 'function' === typeof type
356
+ ? type.displayName || type.name || 'Unknown'
357
+ : type
358
+ );
359
+ return ReactElement(
360
+ type,
361
+ children,
362
+ self,
363
+ source,
364
+ getOwner(),
365
+ maybeKey,
366
+ debugStack,
367
+ debugTask
368
+ );
369
+ }
370
+ function validateChildKeys(node) {
371
+ 'object' === typeof node &&
372
+ null !== node &&
373
+ node.$$typeof === REACT_ELEMENT_TYPE &&
374
+ node._store &&
375
+ (node._store.validated = 1);
376
+ }
377
+ var React$1 = React,
378
+ REACT_ELEMENT_TYPE = Symbol.for('react.transitional.element'),
379
+ REACT_PORTAL_TYPE = Symbol.for('react.portal'),
380
+ REACT_FRAGMENT_TYPE = Symbol.for('react.fragment'),
381
+ REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode'),
382
+ REACT_PROFILER_TYPE = Symbol.for('react.profiler');
383
+ var REACT_CONSUMER_TYPE = Symbol.for('react.consumer'),
384
+ REACT_CONTEXT_TYPE = Symbol.for('react.context'),
385
+ REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref'),
386
+ REACT_SUSPENSE_TYPE = Symbol.for('react.suspense'),
387
+ REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list'),
388
+ REACT_MEMO_TYPE = Symbol.for('react.memo'),
389
+ REACT_LAZY_TYPE = Symbol.for('react.lazy'),
390
+ REACT_ACTIVITY_TYPE = Symbol.for('react.activity'),
391
+ REACT_CLIENT_REFERENCE = Symbol.for('react.client.reference'),
392
+ ReactSharedInternals =
393
+ React$1.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
394
+ hasOwnProperty = Object.prototype.hasOwnProperty,
395
+ isArrayImpl = Array.isArray,
396
+ createTask = console.createTask
397
+ ? console.createTask
398
+ : function () {
399
+ return null;
400
+ };
401
+ React$1 = {
402
+ react_stack_bottom_frame: function (callStackForError) {
403
+ return callStackForError();
404
+ },
405
+ };
406
+ var specialPropKeyWarningShown;
407
+ var didWarnAboutElementRef = {};
408
+ var unknownOwnerDebugStack = React$1.react_stack_bottom_frame.bind(
409
+ React$1,
410
+ UnknownOwner
411
+ )();
412
+ var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
413
+ var didWarnAboutKeySpread = {};
414
+ reactJsxRuntime_development.Fragment = REACT_FRAGMENT_TYPE;
415
+ reactJsxRuntime_development.jsx = function (
416
+ type,
417
+ config,
418
+ maybeKey,
419
+ source,
420
+ self
421
+ ) {
422
+ var trackActualOwner =
423
+ 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
424
+ return jsxDEVImpl(
425
+ type,
426
+ config,
427
+ maybeKey,
428
+ false,
429
+ source,
430
+ self,
431
+ trackActualOwner
432
+ ? Error('react-stack-top-frame')
433
+ : unknownOwnerDebugStack,
434
+ trackActualOwner
435
+ ? createTask(getTaskName(type))
436
+ : unknownOwnerDebugTask
437
+ );
438
+ };
439
+ reactJsxRuntime_development.jsxs = function (
440
+ type,
441
+ config,
442
+ maybeKey,
443
+ source,
444
+ self
445
+ ) {
446
+ var trackActualOwner =
447
+ 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
448
+ return jsxDEVImpl(
449
+ type,
450
+ config,
451
+ maybeKey,
452
+ true,
453
+ source,
454
+ self,
455
+ trackActualOwner
456
+ ? Error('react-stack-top-frame')
457
+ : unknownOwnerDebugStack,
458
+ trackActualOwner
459
+ ? createTask(getTaskName(type))
460
+ : unknownOwnerDebugTask
461
+ );
462
+ };
463
+ })();
464
+ return reactJsxRuntime_development;
465
+ }
466
+
467
+ (function (module) {
468
+ if (browser$1.env.NODE_ENV === 'production') {
469
+ module.exports = requireReactJsxRuntime_production();
470
+ } else {
471
+ module.exports = requireReactJsxRuntime_development();
472
+ }
473
+ })(jsxRuntime);
474
+
475
+ function EyeSlashIcon({ title, titleId, ...props }, svgRef) {
476
+ return /*#__PURE__*/ React__namespace.createElement(
477
+ 'svg',
478
+ Object.assign(
479
+ {
480
+ 'xmlns': 'http://www.w3.org/2000/svg',
481
+ 'fill': 'none',
482
+ 'viewBox': '0 0 24 24',
483
+ 'strokeWidth': 1.5,
484
+ 'stroke': 'currentColor',
485
+ 'aria-hidden': 'true',
486
+ 'data-slot': 'icon',
487
+ 'ref': svgRef,
488
+ 'aria-labelledby': titleId,
489
+ },
490
+ props
491
+ ),
492
+ title
493
+ ? /*#__PURE__*/ React__namespace.createElement(
494
+ 'title',
495
+ {
496
+ id: titleId,
497
+ },
498
+ title
499
+ )
500
+ : null,
501
+ /*#__PURE__*/ React__namespace.createElement('path', {
502
+ strokeLinecap: 'round',
503
+ strokeLinejoin: 'round',
504
+ d: 'M3.98 8.223A10.477 10.477 0 0 0 1.934 12C3.226 16.338 7.244 19.5 12 19.5c.993 0 1.953-.138 2.863-.395M6.228 6.228A10.451 10.451 0 0 1 12 4.5c4.756 0 8.773 3.162 10.065 7.498a10.522 10.522 0 0 1-4.293 5.774M6.228 6.228 3 3m3.228 3.228 3.65 3.65m7.894 7.894L21 21m-3.228-3.228-3.65-3.65m0 0a3 3 0 1 0-4.243-4.243m4.242 4.242L9.88 9.88',
505
+ })
506
+ );
507
+ }
508
+ const ForwardRef$5 = /*#__PURE__*/ React__namespace.forwardRef(EyeSlashIcon);
509
+
510
+ function EyeIcon({ title, titleId, ...props }, svgRef) {
511
+ return /*#__PURE__*/ React__namespace.createElement(
512
+ 'svg',
513
+ Object.assign(
514
+ {
515
+ 'xmlns': 'http://www.w3.org/2000/svg',
516
+ 'fill': 'none',
517
+ 'viewBox': '0 0 24 24',
518
+ 'strokeWidth': 1.5,
519
+ 'stroke': 'currentColor',
520
+ 'aria-hidden': 'true',
521
+ 'data-slot': 'icon',
522
+ 'ref': svgRef,
523
+ 'aria-labelledby': titleId,
524
+ },
525
+ props
526
+ ),
527
+ title
528
+ ? /*#__PURE__*/ React__namespace.createElement(
529
+ 'title',
530
+ {
531
+ id: titleId,
532
+ },
533
+ title
534
+ )
535
+ : null,
536
+ /*#__PURE__*/ React__namespace.createElement('path', {
537
+ strokeLinecap: 'round',
538
+ strokeLinejoin: 'round',
539
+ d: 'M2.036 12.322a1.012 1.012 0 0 1 0-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178Z',
540
+ }),
541
+ /*#__PURE__*/ React__namespace.createElement('path', {
542
+ strokeLinecap: 'round',
543
+ strokeLinejoin: 'round',
544
+ d: 'M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z',
545
+ })
546
+ );
547
+ }
548
+ const ForwardRef$4 = /*#__PURE__*/ React__namespace.forwardRef(EyeIcon);
549
+
550
+ function _array_like_to_array(arr, len) {
551
+ if (len == null || len > arr.length) len = arr.length;
552
+ for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
553
+ return arr2;
554
+ }
555
+ function _array_with_holes(arr) {
556
+ if (Array.isArray(arr)) return arr;
557
+ }
558
+ function _define_property$2(obj, key, value) {
559
+ if (key in obj) {
560
+ Object.defineProperty(obj, key, {
561
+ value: value,
562
+ enumerable: true,
563
+ configurable: true,
564
+ writable: true,
565
+ });
566
+ } else {
567
+ obj[key] = value;
568
+ }
569
+ return obj;
570
+ }
571
+ function _iterable_to_array_limit(arr, i) {
572
+ var _i =
573
+ arr == null
574
+ ? null
575
+ : (typeof Symbol !== 'undefined' && arr[Symbol.iterator]) ||
576
+ arr['@@iterator'];
577
+ if (_i == null) return;
578
+ var _arr = [];
579
+ var _n = true;
580
+ var _d = false;
581
+ var _s, _e;
582
+ try {
583
+ for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
584
+ _arr.push(_s.value);
585
+ if (i && _arr.length === i) break;
586
+ }
587
+ } catch (err) {
588
+ _d = true;
589
+ _e = err;
590
+ } finally {
591
+ try {
592
+ if (!_n && _i['return'] != null) _i['return']();
593
+ } finally {
594
+ if (_d) throw _e;
595
+ }
596
+ }
597
+ return _arr;
598
+ }
599
+ function _non_iterable_rest() {
600
+ throw new TypeError(
601
+ 'Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.'
602
+ );
603
+ }
604
+ function _object_spread$2(target) {
605
+ for (var i = 1; i < arguments.length; i++) {
606
+ var source = arguments[i] != null ? arguments[i] : {};
607
+ var ownKeys = Object.keys(source);
608
+ if (typeof Object.getOwnPropertySymbols === 'function') {
609
+ ownKeys = ownKeys.concat(
610
+ Object.getOwnPropertySymbols(source).filter(function (sym) {
611
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
612
+ })
613
+ );
614
+ }
615
+ ownKeys.forEach(function (key) {
616
+ _define_property$2(target, key, source[key]);
617
+ });
618
+ }
619
+ return target;
620
+ }
621
+ function _sliced_to_array(arr, i) {
622
+ return (
623
+ _array_with_holes(arr) ||
624
+ _iterable_to_array_limit(arr, i) ||
625
+ _unsupported_iterable_to_array(arr, i) ||
626
+ _non_iterable_rest()
627
+ );
628
+ }
629
+ function _unsupported_iterable_to_array(o, minLen) {
630
+ if (!o) return;
631
+ if (typeof o === 'string') return _array_like_to_array(o, minLen);
632
+ var n = Object.prototype.toString.call(o).slice(8, -1);
633
+ if (n === 'Object' && o.constructor) n = o.constructor.name;
634
+ if (n === 'Map' || n === 'Set') return Array.from(n);
635
+ if (n === 'Arguments' || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
636
+ return _array_like_to_array(o, minLen);
637
+ }
638
+ function InputField(param) {
639
+ var id = param.id,
640
+ label = param.label,
641
+ register = param.register,
642
+ type = param.type,
643
+ required = param.required,
644
+ _param_autoCompleteId = param.autoCompleteId,
645
+ autoCompleteId =
646
+ _param_autoCompleteId === void 0 ? 'off' : _param_autoCompleteId,
647
+ _param_isPasswordField = param.isPasswordField,
648
+ isPasswordField =
649
+ _param_isPasswordField === void 0 ? false : _param_isPasswordField;
650
+ var _useState = _sliced_to_array(React.useState(false), 2),
651
+ isPasswordVisible = _useState[0],
652
+ setIsPasswordVisible = _useState[1];
653
+ return jsxRuntime.exports.jsxs('div', {
654
+ className: 'flex flex-col space-y-2',
655
+ children: [
656
+ jsxRuntime.exports.jsx('label', {
657
+ htmlFor: id,
658
+ className:
659
+ 'block ml-1 text-sm font-medium text-gray-700 dark:text-white',
660
+ children: label,
661
+ }),
662
+ isPasswordField
663
+ ? jsxRuntime.exports.jsxs('div', {
664
+ className: 'relative w-full',
665
+ children: [
666
+ jsxRuntime.exports.jsx(
667
+ 'input',
668
+ _object_spread$2(
669
+ {
670
+ id: id,
671
+ required: required,
672
+ type: isPasswordVisible ? 'text' : 'password',
673
+ autoComplete: autoCompleteId,
674
+ placeholder: label,
675
+ className:
676
+ 'w-full block py-3 pr-8 pl-3 text-gray-600 bg-white border-none rounded-lg shadow-sm shadow-input appearance-none focus:outline-none focus:ring-primary placeholder-gray-400 sm:text-sm dark:text-black dark:placeholder-gray-500 '.concat(
677
+ type === 'number' ? 'text-right' : ''
678
+ ),
679
+ },
680
+ register
681
+ )
682
+ ),
683
+ jsxRuntime.exports.jsx('div', {
684
+ className:
685
+ 'absolute top-1/2 right-2 w-5 h-5 -translate-y-1/2 text-text-color-300 hover:cursor-pointer',
686
+ children: isPasswordVisible
687
+ ? jsxRuntime.exports.jsx(ForwardRef$5, {
688
+ onClick: function () {
689
+ setIsPasswordVisible(false);
690
+ },
691
+ })
692
+ : jsxRuntime.exports.jsx(ForwardRef$4, {
693
+ onClick: function () {
694
+ setIsPasswordVisible(true);
695
+ },
696
+ }),
697
+ }),
698
+ ],
699
+ })
700
+ : jsxRuntime.exports.jsx(
701
+ 'input',
702
+ _object_spread$2(
703
+ {
704
+ id: id,
705
+ required: required,
706
+ type: type,
707
+ autoComplete: autoCompleteId,
708
+ placeholder: label,
709
+ className:
710
+ 'relative w-full block py-3 pr-10 pl-3 text-gray-600 bg-white border-none rounded-lg shadow-sm shadow-input appearance-none focus:outline-none focus:ring-primary placeholder-gray-400 sm:text-sm dark:text-black dark:placeholder-gray-500 '.concat(
711
+ type === 'number' ? 'text-right' : ''
712
+ ),
713
+ },
714
+ register
715
+ )
716
+ ),
717
+ ],
718
+ });
719
+ }
720
+
721
+ var SigninForm = function (param) {
722
+ var mapText = param.mapText,
723
+ onSubmit = param.onSubmit,
724
+ errorMessage = param.errorMessage;
725
+ var _useForm = reactHookForm.useForm({
726
+ shouldUseNativeValidation: true,
727
+ }),
728
+ register = _useForm.register,
729
+ handleSubmit = _useForm.handleSubmit;
730
+ return jsxRuntime.exports.jsxs('form', {
731
+ onSubmit: handleSubmit(onSubmit),
732
+ className: 'space-y-6',
733
+ children: [
734
+ jsxRuntime.exports.jsx(InputField, {
735
+ id: 'email',
736
+ label: mapText('auth:form.email.label'),
737
+ type: 'text',
738
+ required: true,
739
+ autoCompleteId: 'email',
740
+ register: register('email', {
741
+ required: mapText('form.email.validations.required'),
742
+ }),
743
+ }),
744
+ jsxRuntime.exports.jsx('div', {
745
+ className: 'relative',
746
+ children: jsxRuntime.exports.jsx(InputField, {
747
+ id: 'password',
748
+ label: mapText('auth:form.password.label'),
749
+ type: 'password',
750
+ required: true,
751
+ autoCompleteId: 'password',
752
+ register: register('password', {
753
+ required: mapText('form.password.validations.required'),
754
+ }),
755
+ isPasswordField: true,
756
+ }),
757
+ }),
758
+ jsxRuntime.exports.jsxs('div', {
759
+ children: [
760
+ jsxRuntime.exports.jsx('button', {
761
+ type: 'submit',
762
+ className:
763
+ 'w-full flex justify-center px-4 py-3 text-sm font-medium text-white bg-[length:200%_200%] bg-primary-shimmer border-none border rounded-lg shadow-sm transition-transform animate-shimmerdelayed hover:scale-105 focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2',
764
+ children: mapText('auth:form.submit.text'),
765
+ }),
766
+ jsxRuntime.exports.jsx('span', {
767
+ className: 'block mt-2 text-sm font-medium text-red-500',
768
+ children: errorMessage,
769
+ }),
770
+ ],
771
+ }),
772
+ jsxRuntime.exports.jsx('div', {
773
+ className: 'flex justify-between items-center',
774
+ children: jsxRuntime.exports.jsx('div', {
775
+ className: 'text-sm',
776
+ children: jsxRuntime.exports.jsx('a', {
777
+ href: '',
778
+ className:
779
+ 'font-medium text-primary transition-colors hover:text-primary-500 dark:text-white',
780
+ children: mapText('auth:form.forgot.text'),
781
+ }),
782
+ }),
783
+ }),
784
+ ],
785
+ });
786
+ };
787
+
788
+ function SigninLayout(param) {
789
+ var mapText = param.mapText,
790
+ onSubmit = param.onSubmit,
791
+ errorMessage = param.errorMessage;
792
+ return jsxRuntime.exports.jsxs('div', {
793
+ className: 'h-full flex flex-col sm:flex-row',
794
+ children: [
795
+ jsxRuntime.exports.jsx('div', {
796
+ className:
797
+ "relative w-auto h-full bg-[url('/assets/signup_cover.png')] bg-no-repeat bg-center bg-cover sm:flex-1",
798
+ }),
799
+ jsxRuntime.exports.jsx('div', {
800
+ className:
801
+ 'flex-1 w-auto flex flex-col lg:flex-none max-sm:absolute max-sm:top-1/2 max-sm:left-1/2 max-sm:w-full max-sm:-translate-x-1/2 max-sm:-translate-y-1/2 max-sm:max-w-96 dark:sm:bg-base-900',
802
+ children: jsxRuntime.exports.jsx('div', {
803
+ className:
804
+ 'flex-1 flex flex-col p-4 sm:justify-center sm:px-6 sm:py-12 lg:px-20 xl:px-24 2xl:px-40 max-sm:px-5 max-sm:mx-5 max-sm:bg-white/80 max-sm:rounded-lg dark:max-sm:bg-base-900/80',
805
+ children: jsxRuntime.exports.jsxs('div', {
806
+ className: 'w-full mx-auto lg:w-96 max-w-xl',
807
+ children: [
808
+ jsxRuntime.exports.jsx('h2', {
809
+ className:
810
+ 'mt-6 text-3xl font-extrabold text-gray-900 select-none dark:text-white',
811
+ children: mapText('auth:page.title'),
812
+ }),
813
+ jsxRuntime.exports.jsx('div', {
814
+ className: 'mt-10',
815
+ children: jsxRuntime.exports.jsx(SigninForm, {
816
+ mapText: mapText,
817
+ onSubmit: function (values) {
818
+ return onSubmit(values.email, values.password);
819
+ },
820
+ errorMessage: errorMessage,
821
+ }),
822
+ }),
823
+ ],
824
+ }),
825
+ }),
826
+ }),
827
+ ],
828
+ });
829
+ }
830
+
831
+ var UI = /*#__PURE__*/ Object.freeze({
832
+ __proto__: null,
833
+ SigninForm: SigninForm,
834
+ SigninLayout: SigninLayout,
835
+ });
836
+
837
+ function MainContentFrame(param) {
838
+ var children = param.children;
839
+ return jsxRuntime.exports.jsx('main', {
840
+ className:
841
+ 'w-full pb-2 overflow-hidden bg-zinc-100 lg:pt-2 lg:pr-2 dark:bg-zinc-950',
842
+ children: jsxRuntime.exports.jsx('div', {
843
+ className:
844
+ 'w-full h-full p-6 content-canvas bg-white border-zinc-950/10 lg:p-10 lg:border lg:rounded-lg lg:shadow-xs dark:bg-zinc-900 dark:border-white/5',
845
+ children: jsxRuntime.exports.jsx('div', {
846
+ className: 'mx-auto max-w-[1400px]',
847
+ children: children,
848
+ }),
849
+ }),
850
+ });
851
+ }
852
+
853
+ function ChevronDoubleLeftIcon({ title, titleId, ...props }, svgRef) {
854
+ return /*#__PURE__*/ React__namespace.createElement(
855
+ 'svg',
856
+ Object.assign(
857
+ {
858
+ 'xmlns': 'http://www.w3.org/2000/svg',
859
+ 'viewBox': '0 0 20 20',
860
+ 'fill': 'currentColor',
861
+ 'aria-hidden': 'true',
862
+ 'data-slot': 'icon',
863
+ 'ref': svgRef,
864
+ 'aria-labelledby': titleId,
865
+ },
866
+ props
867
+ ),
868
+ title
869
+ ? /*#__PURE__*/ React__namespace.createElement(
870
+ 'title',
871
+ {
872
+ id: titleId,
873
+ },
874
+ title
875
+ )
876
+ : null,
877
+ /*#__PURE__*/ React__namespace.createElement('path', {
878
+ fillRule: 'evenodd',
879
+ d: 'M4.72 9.47a.75.75 0 0 0 0 1.06l4.25 4.25a.75.75 0 1 0 1.06-1.06L6.31 10l3.72-3.72a.75.75 0 1 0-1.06-1.06L4.72 9.47Zm9.25-4.25L9.72 9.47a.75.75 0 0 0 0 1.06l4.25 4.25a.75.75 0 1 0 1.06-1.06L11.31 10l3.72-3.72a.75.75 0 0 0-1.06-1.06Z',
880
+ clipRule: 'evenodd',
881
+ })
882
+ );
883
+ }
884
+ const ForwardRef$3 = /*#__PURE__*/ React__namespace.forwardRef(
885
+ ChevronDoubleLeftIcon
886
+ );
887
+
888
+ function ChevronDoubleRightIcon({ title, titleId, ...props }, svgRef) {
889
+ return /*#__PURE__*/ React__namespace.createElement(
890
+ 'svg',
891
+ Object.assign(
892
+ {
893
+ 'xmlns': 'http://www.w3.org/2000/svg',
894
+ 'viewBox': '0 0 20 20',
895
+ 'fill': 'currentColor',
896
+ 'aria-hidden': 'true',
897
+ 'data-slot': 'icon',
898
+ 'ref': svgRef,
899
+ 'aria-labelledby': titleId,
900
+ },
901
+ props
902
+ ),
903
+ title
904
+ ? /*#__PURE__*/ React__namespace.createElement(
905
+ 'title',
906
+ {
907
+ id: titleId,
908
+ },
909
+ title
910
+ )
911
+ : null,
912
+ /*#__PURE__*/ React__namespace.createElement('path', {
913
+ fillRule: 'evenodd',
914
+ d: 'M15.28 9.47a.75.75 0 0 1 0 1.06l-4.25 4.25a.75.75 0 1 1-1.06-1.06L13.69 10 9.97 6.28a.75.75 0 0 1 1.06-1.06l4.25 4.25ZM6.03 5.22l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.75.75 0 0 1-1.06-1.06L8.69 10 4.97 6.28a.75.75 0 0 1 1.06-1.06Z',
915
+ clipRule: 'evenodd',
916
+ })
917
+ );
918
+ }
919
+ const ForwardRef$2 = /*#__PURE__*/ React__namespace.forwardRef(
920
+ ChevronDoubleRightIcon
921
+ );
922
+
923
+ function ChevronLeftIcon({ title, titleId, ...props }, svgRef) {
924
+ return /*#__PURE__*/ React__namespace.createElement(
925
+ 'svg',
926
+ Object.assign(
927
+ {
928
+ 'xmlns': 'http://www.w3.org/2000/svg',
929
+ 'viewBox': '0 0 20 20',
930
+ 'fill': 'currentColor',
931
+ 'aria-hidden': 'true',
932
+ 'data-slot': 'icon',
933
+ 'ref': svgRef,
934
+ 'aria-labelledby': titleId,
935
+ },
936
+ props
937
+ ),
938
+ title
939
+ ? /*#__PURE__*/ React__namespace.createElement(
940
+ 'title',
941
+ {
942
+ id: titleId,
943
+ },
944
+ title
945
+ )
946
+ : null,
947
+ /*#__PURE__*/ React__namespace.createElement('path', {
948
+ fillRule: 'evenodd',
949
+ d: 'M11.78 5.22a.75.75 0 0 1 0 1.06L8.06 10l3.72 3.72a.75.75 0 1 1-1.06 1.06l-4.25-4.25a.75.75 0 0 1 0-1.06l4.25-4.25a.75.75 0 0 1 1.06 0Z',
950
+ clipRule: 'evenodd',
951
+ })
952
+ );
953
+ }
954
+ const ForwardRef$1 = /*#__PURE__*/ React__namespace.forwardRef(ChevronLeftIcon);
955
+
956
+ function ChevronRightIcon({ title, titleId, ...props }, svgRef) {
957
+ return /*#__PURE__*/ React__namespace.createElement(
958
+ 'svg',
959
+ Object.assign(
960
+ {
961
+ 'xmlns': 'http://www.w3.org/2000/svg',
962
+ 'viewBox': '0 0 20 20',
963
+ 'fill': 'currentColor',
964
+ 'aria-hidden': 'true',
965
+ 'data-slot': 'icon',
966
+ 'ref': svgRef,
967
+ 'aria-labelledby': titleId,
968
+ },
969
+ props
970
+ ),
971
+ title
972
+ ? /*#__PURE__*/ React__namespace.createElement(
973
+ 'title',
974
+ {
975
+ id: titleId,
976
+ },
977
+ title
978
+ )
979
+ : null,
980
+ /*#__PURE__*/ React__namespace.createElement('path', {
981
+ fillRule: 'evenodd',
982
+ d: 'M8.22 5.22a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.75.75 0 0 1-1.06-1.06L11.94 10 8.22 6.28a.75.75 0 0 1 0-1.06Z',
983
+ clipRule: 'evenodd',
984
+ })
985
+ );
986
+ }
987
+ const ForwardRef = /*#__PURE__*/ React__namespace.forwardRef(ChevronRightIcon);
988
+
989
+ function Pagination(param) {
990
+ var currentPage = param.currentPage,
991
+ totalPages = param.totalPages,
992
+ hasPrevPage = param.hasPrevPage,
993
+ hasNextPage = param.hasNextPage,
994
+ goToFirstPage = param.goToFirstPage,
995
+ goToPreviousPage = param.goToPreviousPage,
996
+ goToNextPage = param.goToNextPage,
997
+ goToLastPage = param.goToLastPage;
998
+ if (totalPages === 0) {
999
+ return null;
1000
+ }
1001
+ return jsxRuntime.exports.jsxs('div', {
1002
+ className: 'w-full flex justify-center items-center gap-x-2 mt-6',
1003
+ children: [
1004
+ jsxRuntime.exports.jsxs('button', {
1005
+ onClick: goToFirstPage,
1006
+ disabled: !hasPrevPage,
1007
+ className:
1008
+ 'flex gap-0.5 px-4 py-2.5 text-sm text-white bg-primary-500 rounded-lg transition-colors disabled:bg-zinc-300 enabled:hover:bg-primary-400 dark:disabled:bg-zinc-800',
1009
+ children: [
1010
+ jsxRuntime.exports.jsx(ForwardRef$3, {
1011
+ className: 'w-5 h-auto',
1012
+ }),
1013
+ 'Erste',
1014
+ ],
1015
+ }),
1016
+ jsxRuntime.exports.jsxs('button', {
1017
+ onClick: goToPreviousPage,
1018
+ disabled: !hasPrevPage,
1019
+ className:
1020
+ 'flex gap-0.5 px-4 py-2.5 text-sm text-white bg-primary-500 rounded-lg transition-colors disabled:bg-zinc-300 enabled:hover:bg-primary-400 dark:disabled:bg-zinc-800',
1021
+ children: [
1022
+ jsxRuntime.exports.jsx(ForwardRef$1, {
1023
+ className: 'w-5 h-auto',
1024
+ }),
1025
+ 'Zur\xfcck',
1026
+ ],
1027
+ }),
1028
+ jsxRuntime.exports.jsxs('span', {
1029
+ className: 'px-3 text-sm text-black dark:text-white',
1030
+ children: [
1031
+ 'Seite ',
1032
+ jsxRuntime.exports.jsx('strong', {
1033
+ children: currentPage,
1034
+ }),
1035
+ ' von',
1036
+ ' ',
1037
+ jsxRuntime.exports.jsx('strong', {
1038
+ children:
1039
+ totalPages !== null && totalPages !== void 0 ? totalPages : 1,
1040
+ }),
1041
+ ],
1042
+ }),
1043
+ jsxRuntime.exports.jsxs('button', {
1044
+ onClick: goToNextPage,
1045
+ disabled: !hasNextPage,
1046
+ className:
1047
+ 'flex gap-0.5 px-4 py-2.5 text-sm text-white bg-primary-500 rounded-lg transition-colors disabled:bg-zinc-300 enabled:hover:bg-primary-400 dark:disabled:bg-zinc-800',
1048
+ children: [
1049
+ 'Weiter',
1050
+ jsxRuntime.exports.jsx(ForwardRef, {
1051
+ className: 'w-5 h-5',
1052
+ }),
1053
+ ],
1054
+ }),
1055
+ jsxRuntime.exports.jsxs('button', {
1056
+ onClick: function () {
1057
+ return goToLastPage(
1058
+ totalPages !== null && totalPages !== void 0
1059
+ ? totalPages
1060
+ : currentPage
1061
+ );
1062
+ },
1063
+ disabled: !hasNextPage,
1064
+ className:
1065
+ 'flex gap-0.5 px-4 py-2.5 text-sm text-white bg-primary-500 rounded-lg transition-colors disabled:bg-zinc-300 enabled:hover:bg-primary-400 dark:disabled:bg-zinc-800',
1066
+ children: [
1067
+ 'Letzte',
1068
+ jsxRuntime.exports.jsx(ForwardRef$2, {
1069
+ className: 'w-5 h-5',
1070
+ }),
1071
+ ],
1072
+ }),
1073
+ ],
1074
+ });
1075
+ }
1076
+
1077
+ function CancelButton(param) {
1078
+ var onClick = param.onClick;
1079
+ return jsxRuntime.exports.jsx('button', {
1080
+ type: 'button',
1081
+ className:
1082
+ 'px-5 py-1.5 isolate text-sm font-semibold text-white bg-zinc-500 rounded-lg transition-colors cursor-pointer hover:bg-zinc-400 ',
1083
+ onClick: onClick,
1084
+ children: 'Cancel',
1085
+ });
1086
+ }
1087
+
1088
+ function ErrorDisplay(param) {
1089
+ var error = param.error;
1090
+ if (!error) return null;
1091
+ return jsxRuntime.exports.jsx('div', {
1092
+ className:
1093
+ 'error-display p-4 mb-4 text-red-700 bg-red-100 border rounded border-red-400',
1094
+ children: error,
1095
+ });
1096
+ }
1097
+
1098
+ function HowToCloseText() {
1099
+ return jsxRuntime.exports.jsx('p', {
1100
+ className: 'absolute top-full mt-2 text-xs text-black dark:text-white',
1101
+ children:
1102
+ 'Schlie\xdfen: au\xdferhalb klicken oder die Esc-Taste dr\xfccken',
1103
+ });
1104
+ }
1105
+
1106
+ function r(e) {
1107
+ var t,
1108
+ f,
1109
+ n = '';
1110
+ if ('string' == typeof e || 'number' == typeof e) n += e;
1111
+ else if ('object' == typeof e)
1112
+ if (Array.isArray(e)) {
1113
+ var o = e.length;
1114
+ for (t = 0; t < o; t++)
1115
+ e[t] && (f = r(e[t])) && (n && (n += ' '), (n += f));
1116
+ } else for (f in e) e[f] && (n && (n += ' '), (n += f));
1117
+ return n;
1118
+ }
1119
+ function clsx() {
1120
+ for (var e, t, f = 0, n = '', o = arguments.length; f < o; f++)
1121
+ (e = arguments[f]) && (t = r(e)) && (n && (n += ' '), (n += t));
1122
+ return n;
1123
+ }
1124
+
1125
+ function LoadingSpinner(param) {
1126
+ var className = param.className,
1127
+ innerClassName = param.innerClassName;
1128
+ return jsxRuntime.exports.jsx('div', {
1129
+ className: clsx(
1130
+ 'loading-spinner w-full h-full flex flex-col justify-center items-center px-1',
1131
+ className
1132
+ ),
1133
+ children: jsxRuntime.exports.jsx('div', {
1134
+ 'className': clsx(
1135
+ 'size-5 inline-block border-[3px] border-t-transparent rounded-full border-current animate-spin',
1136
+ innerClassName
1137
+ ),
1138
+ 'role': 'status',
1139
+ 'aria-label': 'loading',
1140
+ 'children': jsxRuntime.exports.jsx('span', {
1141
+ className: 'sr-only',
1142
+ children: 'Loading...',
1143
+ }),
1144
+ }),
1145
+ });
1146
+ }
1147
+
1148
+ function SaveButton(param) {
1149
+ var isSaving = param.isSaving,
1150
+ onClick = param.onClick,
1151
+ disabled = param.disabled;
1152
+ return jsxRuntime.exports.jsx('button', {
1153
+ type: 'submit',
1154
+ className:
1155
+ 'px-5 py-1.5 isolate text-sm font-semibold text-white bg-primary-500 rounded-lg transition-colors cursor-pointer disabled:bg-zinc-300 disabled:cursor-default enabled:hover:bg-primary-400 dark:disabled:bg-zinc-800',
1156
+ onClick: onClick,
1157
+ disabled: disabled || isSaving,
1158
+ children: isSaving ? jsxRuntime.exports.jsx(LoadingSpinner, {}) : 'Save',
1159
+ });
1160
+ }
1161
+
1162
+ function Textarea(param) {
1163
+ var value = param.value,
1164
+ onChange = param.onChange,
1165
+ _param_rows = param.rows,
1166
+ rows = _param_rows === void 0 ? 2 : _param_rows;
1167
+ return jsxRuntime.exports.jsx('textarea', {
1168
+ className: clsx(
1169
+ 'w-full block px-3 py-1.5 mt-3 text-sm/6 text-white bg-white/5 border-none rounded-lg'
1170
+ ),
1171
+ rows: rows,
1172
+ value: value,
1173
+ onChange: function (e) {
1174
+ return onChange(e.target.value);
1175
+ },
1176
+ });
1177
+ }
1178
+
1179
+ var Util = /*#__PURE__*/ Object.freeze({
1180
+ __proto__: null,
1181
+ CancelButton: CancelButton,
1182
+ ErrorDisplay: ErrorDisplay,
1183
+ HowToCloseText: HowToCloseText,
1184
+ InputField: InputField,
1185
+ LoadingSpinner: LoadingSpinner,
1186
+ MainContentFrame: MainContentFrame,
1187
+ Pagination: Pagination,
1188
+ SaveButton: SaveButton,
1189
+ Textarea: Textarea,
1190
+ });
1191
+
1192
+ function _define_property$1(obj, key, value) {
1193
+ if (key in obj) {
1194
+ Object.defineProperty(obj, key, {
1195
+ value: value,
1196
+ enumerable: true,
1197
+ configurable: true,
1198
+ writable: true,
1199
+ });
1200
+ } else {
1201
+ obj[key] = value;
1202
+ }
1203
+ return obj;
1204
+ }
1205
+ function _object_spread$1(target) {
1206
+ for (var i = 1; i < arguments.length; i++) {
1207
+ var source = arguments[i] != null ? arguments[i] : {};
1208
+ var ownKeys = Object.keys(source);
1209
+ if (typeof Object.getOwnPropertySymbols === 'function') {
1210
+ ownKeys = ownKeys.concat(
1211
+ Object.getOwnPropertySymbols(source).filter(function (sym) {
1212
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
1213
+ })
1214
+ );
1215
+ }
1216
+ ownKeys.forEach(function (key) {
1217
+ _define_property$1(target, key, source[key]);
1218
+ });
1219
+ }
1220
+ return target;
1221
+ }
1222
+ var TemplateParserContext = React.createContext({
1223
+ parse: function () {
1224
+ return String();
1225
+ },
1226
+ addToTemporaryView: function () {},
1227
+ });
1228
+ var TemplateParserProvider = function (props) {
1229
+ var _Intl_DateTimeFormat, _Intl;
1230
+ var children = props.children;
1231
+ props.navigationView;
1232
+ var systemTimezone = 'Europe/Berlin';
1233
+ var systemLocale = 'de-DE';
1234
+ var timezone =
1235
+ ((_Intl = Intl) === null || _Intl === void 0
1236
+ ? void 0
1237
+ : (_Intl_DateTimeFormat = _Intl.DateTimeFormat) === null ||
1238
+ _Intl_DateTimeFormat === void 0
1239
+ ? void 0
1240
+ : _Intl_DateTimeFormat.call(_Intl).resolvedOptions().timeZone) ||
1241
+ systemTimezone;
1242
+ var locale =
1243
+ (Array.isArray(navigator.languages) && navigator.languages[0]) ||
1244
+ navigator.language ||
1245
+ systemLocale;
1246
+ var temporaryView = React.useRef({});
1247
+ var compiler = React.useRef(
1248
+ new utility.PatternCompiler(temporaryView.current, function (handlebars) {
1249
+ utility.eqPlugin(handlebars);
1250
+ utility.stringPlugin(handlebars);
1251
+ utility.timezonePlugin(handlebars, {
1252
+ timezone: systemTimezone,
1253
+ locale: systemLocale,
1254
+ });
1255
+ utility.userTimezonePlugin(handlebars, {
1256
+ timezone: timezone,
1257
+ locale: locale,
1258
+ });
1259
+ utility.urlPlugin(handlebars);
1260
+ })
1261
+ );
1262
+ var parse = function (source, partialView) {
1263
+ return compiler.current.compile(
1264
+ source,
1265
+ _object_spread$1({}, temporaryView.current, partialView)
1266
+ );
1267
+ };
1268
+ var addToTemporaryView = function (key, value) {
1269
+ temporaryView.current[key] = value;
1270
+ };
1271
+ return jsxRuntime.exports.jsx(TemplateParserContext.Provider, {
1272
+ value: {
1273
+ parse: parse,
1274
+ addToTemporaryView: addToTemporaryView,
1275
+ },
1276
+ children: children,
1277
+ });
1278
+ };
1279
+ var useTemplateParser = function () {
1280
+ var context = React.useContext(TemplateParserContext);
1281
+ if (context === undefined) {
1282
+ throw new Error(
1283
+ 'useTemplateParser must be used within a TemplateParseProvider'
1284
+ );
1285
+ }
1286
+ return context;
1287
+ };
1288
+
1289
+ var Ctx = /*#__PURE__*/ Object.freeze({
1290
+ __proto__: null,
1291
+ TemplateParserProvider: TemplateParserProvider,
1292
+ useTemplateParser: useTemplateParser,
1293
+ });
1294
+
1295
+ function _define_property(obj, key, value) {
1296
+ if (key in obj) {
1297
+ Object.defineProperty(obj, key, {
1298
+ value: value,
1299
+ enumerable: true,
1300
+ configurable: true,
1301
+ writable: true,
1302
+ });
1303
+ } else {
1304
+ obj[key] = value;
1305
+ }
1306
+ return obj;
1307
+ }
1308
+ function _object_spread(target) {
1309
+ for (var i = 1; i < arguments.length; i++) {
1310
+ var source = arguments[i] != null ? arguments[i] : {};
1311
+ var ownKeys = Object.keys(source);
1312
+ if (typeof Object.getOwnPropertySymbols === 'function') {
1313
+ ownKeys = ownKeys.concat(
1314
+ Object.getOwnPropertySymbols(source).filter(function (sym) {
1315
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
1316
+ })
1317
+ );
1318
+ }
1319
+ ownKeys.forEach(function (key) {
1320
+ _define_property(target, key, source[key]);
1321
+ });
1322
+ }
1323
+ return target;
1324
+ }
1325
+ var index = _object_spread({}, UI, Util, Ctx);
1326
+
1327
+ exports.CancelButton = CancelButton;
1328
+ exports.ErrorDisplay = ErrorDisplay;
1329
+ exports.HowToCloseText = HowToCloseText;
1330
+ exports.InputField = InputField;
1331
+ exports.LoadingSpinner = LoadingSpinner;
1332
+ exports.MainContentFrame = MainContentFrame;
1333
+ exports.Pagination = Pagination;
1334
+ exports.SaveButton = SaveButton;
1335
+ exports.SigninForm = SigninForm;
1336
+ exports.SigninLayout = SigninLayout;
1337
+ exports.TemplateParserProvider = TemplateParserProvider;
1338
+ exports.Textarea = Textarea;
1339
+ exports.default = index;
1340
+ exports.useTemplateParser = useTemplateParser;