ku4web-components 6.4.44 → 6.4.50

Sign up to get free protection for your applications and to get access to all the features.
Files changed (32) hide show
  1. package/dist/cjs/ku4-carousel-controls.cjs.entry.js +14 -4
  2. package/dist/cjs/ku4-mask.cjs.entry.js +2 -1
  3. package/dist/cjs/ku4-validation.cjs.entry.js +7 -3
  4. package/dist/cjs/ku4web-components.cjs.js +1 -1
  5. package/dist/cjs/loader.cjs.js +1 -1
  6. package/dist/esm/ku4-carousel-controls.entry.js +14 -4
  7. package/dist/esm/ku4-mask.entry.js +2 -1
  8. package/dist/esm/ku4-validation.entry.js +7 -3
  9. package/dist/esm/ku4web-components.js +1 -1
  10. package/dist/esm/loader.js +1 -1
  11. package/dist/esm-es5/ku4-carousel-controls.entry.js +1 -1
  12. package/dist/esm-es5/ku4-mask.entry.js +1 -1
  13. package/dist/esm-es5/ku4-validation.entry.js +1 -1
  14. package/dist/esm-es5/ku4web-components.js +1 -1
  15. package/dist/esm-es5/loader.js +1 -1
  16. package/dist/ku4web-components/ku4web-components.esm.js +1 -1
  17. package/dist/ku4web-components/p-0097c412.entry.js +1 -0
  18. package/dist/ku4web-components/p-0d977a97.system.entry.js +1 -0
  19. package/dist/ku4web-components/p-276972a6.system.entry.js +1 -0
  20. package/dist/ku4web-components/p-6ac96851.entry.js +1 -0
  21. package/dist/ku4web-components/p-7e098f33.system.js +1 -1
  22. package/dist/ku4web-components/p-9d2053c8.system.entry.js +1 -0
  23. package/dist/ku4web-components/p-ed89c024.entry.js +1 -0
  24. package/dist/types/components/ku4-validation/ku4-validation.d.ts +10 -0
  25. package/dist/types/components.d.ts +16 -0
  26. package/package.json +1 -1
  27. package/dist/ku4web-components/p-08ecff99.system.entry.js +0 -1
  28. package/dist/ku4web-components/p-2e3f9824.system.entry.js +0 -1
  29. package/dist/ku4web-components/p-66215fa8.system.entry.js +0 -1
  30. package/dist/ku4web-components/p-7f993bf6.entry.js +0 -1
  31. package/dist/ku4web-components/p-df5ad595.entry.js +0 -1
  32. package/dist/ku4web-components/p-e737181b.entry.js +0 -1
@@ -22,16 +22,26 @@ let Ku4CarouselControls = class {
22
22
  control.removeAttribute('current');
23
23
  control.checked = false;
24
24
  });
25
- const current = this.controls[e.detail - 1];
26
- current.setAttribute('current', e.detail);
27
- current.checked = true;
25
+ try {
26
+ const current = this.controls[e.detail - 1];
27
+ current.setAttribute('current', e.detail);
28
+ current.checked = true;
29
+ }
30
+ catch (e) {
31
+ /* Fail silently */
32
+ }
28
33
  }
29
34
  handleChange(e) {
30
35
  const { carousel, controls } = this;
31
36
  const n = parseInt(e.target.getAttribute('slide'));
32
37
  const slide = isNaN(n) ? controls.indexOf(e.target) + 1 : n;
33
38
  carousel.slideTo(slide);
34
- e.target.setAttribute('current', slide);
39
+ try {
40
+ e.target.setAttribute('current', slide);
41
+ }
42
+ catch (e) {
43
+ /* Fail silently */
44
+ }
35
45
  }
36
46
  componentWillLoad() {
37
47
  const { carousel, controls } = this;
@@ -161,6 +161,7 @@ let Ku4Mask = class {
161
161
  e.inputType !== 'insertFromPaste' &&
162
162
  e.inputType !== 'deleteContentBackward' &&
163
163
  e.inputType !== 'deleteContentForward' &&
164
+ e.inputType !== 'deleteByCut' &&
164
165
  selectionStart === selectionEnd) {
165
166
  this.value = previousValue;
166
167
  return;
@@ -205,7 +206,7 @@ let Ku4Mask = class {
205
206
  return;
206
207
  }
207
208
  }
208
- if (e.inputType === 'deleteContentBackward') {
209
+ if (e.inputType === 'deleteContentBackward' || e.inputType === 'deleteByCut') {
209
210
  const startValue = reverseCharIndexes.find(v => v <= selectionStart - 1);
210
211
  const endValue = reverseCharIndexes.find(v => v <= selectionEnd - 1);
211
212
  const startInsertIndex = charIndexes.findIndex(v => v === startValue);
@@ -20,7 +20,7 @@ const validate = (expressions, value, options, element) => options
20
20
  ? element.value === value && expressions.every(r => r.test(value))
21
21
  : expressions.every(r => r.test(value));
22
22
 
23
- const ku4ValidationCss = ":host{visibility:hidden !important}:host([invalid]){visibility:visible !important}:host([disabled]){visibility:hidden !important}:host([invalid][disabled]){visibility:hidden !important}";
23
+ const ku4ValidationCss = ":host{visibility:hidden !important}:host([invalid]){visibility:visible !important}:host([disabled]){visibility:hidden !important}:host([invalid][disabled]){visibility:hidden !important}:host([invalid][hidden]){visibility:hidden !important}";
24
24
 
25
25
  let Ku4Validation = class {
26
26
  constructor(hostRef) {
@@ -92,12 +92,16 @@ let Ku4Validation = class {
92
92
  this.input.setAttribute('aria-invalid', this.invalid);
93
93
  }
94
94
  assert() {
95
- const { ele, validOptions, input, regex } = this;
95
+ const { ele, validOptions, input, regex, checked } = this;
96
96
  if (input.type === 'file' && index$1.t.isNullOrEmpty(input.value)) {
97
97
  return;
98
98
  }
99
99
  const previousIsValid = this.isValid;
100
- this.isValid = this.disabled ? true : validate(regex, input.value, validOptions, ele) && this.validationMethod(input.value);
100
+ this.isValid = this.disabled
101
+ ? true
102
+ : index$1.t.isBool(checked)
103
+ ? input.checked === checked
104
+ : validate(regex, input.value, validOptions, ele) && this.validationMethod(input.value);
101
105
  this.invalid = !this.isValid;
102
106
  input.setAttribute('aria-invalid', this.invalid);
103
107
  if (index$1.t.isFalse(previousIsValid) && this.isValid) {
@@ -32,5 +32,5 @@ const patchBrowser = () => {
32
32
  };
33
33
 
34
34
  patchBrowser().then(options => {
35
- return index.bootstrapLazy([["ku4-carousel.cjs",[[1,"ku4-carousel",{"swipeTolerance":[2,"swipe-tolerance"],"auto":[4],"noSwipe":[4,"no-swipe"],"delay":[2],"slideState":[32],"next":[64],"previous":[64],"slideTo":[64],"pause":[64],"play":[64]}]]],["ku4-carousel-controls.cjs",[[1,"ku4-carousel-controls",{"for":[1]}]]],["ku4-carousel-slide.cjs",[[1,"ku4-carousel-slide",{"active":[32],"classList":[32],"slideIn":[64],"slideOut":[64],"activate":[64],"deactivate":[64]}]]],["ku4-col.cjs",[[1,"ku4-col",{"startXs":[2,"start-xs"],"startSm":[2,"start-sm"],"startMd":[2,"start-md"],"startLg":[2,"start-lg"],"spanXs":[2,"span-xs"],"spanSm":[2,"span-sm"],"spanMd":[2,"span-md"],"spanLg":[2,"span-lg"],"orderXs":[2,"order-xs"],"orderSm":[2,"order-sm"],"orderMd":[2,"order-md"],"orderLg":[2,"order-lg"]}]]],["ku4-drawer.cjs",[[1,"ku4-drawer",{"bottom":[516],"left":[516],"right":[516],"top":[516],"size":[1],"open":[1540],"toggle":[64]}]]],["ku4-feature.cjs",[[1,"ku4-feature",{"on":[4],"policy":[1],"enabled":[32]}]]],["ku4-focus-trap.cjs",[[1,"ku4-focus-trap",{"active":[1540],"include":[1],"exclude":[1],"excludeShadow":[1,"exclude-shadow"],"initial":[1],"return":[1],"activate":[64],"deactivate":[64]}]]],["ku4-form.cjs",[[4,"ku4-form",{"invalid":[1540],"validate":[64],"invalidate":[64],"read":[64],"write":[64]}]]],["ku4-grid.cjs",[[1,"ku4-grid",{"columnsXs":[2,"columns-xs"],"columnsSm":[2,"columns-sm"],"columnsMd":[2,"columns-md"],"columnsLg":[2,"columns-lg"],"offsetLeftXs":[2,"offset-left-xs"],"offsetLeftSm":[2,"offset-left-sm"],"offsetLeftMd":[2,"offset-left-md"],"offsetLeftLg":[2,"offset-left-lg"],"offsetRight":[2,"offset-right"],"offsetRightXs":[2,"offset-right-xs"],"offsetRightSm":[2,"offset-right-sm"],"offsetRightMd":[2,"offset-right-md"],"offsetRightLg":[2,"offset-right-lg"],"offsetXs":[2,"offset-xs"],"offsetSm":[2,"offset-sm"],"offsetMd":[2,"offset-md"],"offsetLg":[2,"offset-lg"]}]]],["ku4-label.cjs",[[1,"ku4-label",{"for":[1],"value":[1],"empty":[32]}]]],["ku4-mask.cjs",[[1,"ku4-mask",{"for":[1],"template":[1],"ban":[1],"pattern":[1],"char":[1],"hidden":[4]}]]],["ku4-modal.cjs",[[1,"ku4-modal",{"visible":[1540],"focusTrap":[1,"focus-trap"],"display":[64],"dismiss":[64]},[[8,"keyup","handleKeyUp"]]]]],["ku4-panel.cjs",[[1,"ku4-panel",{"open":[1540],"maxHeight":[32],"toggle":[64],"close":[64]},[[0,"transitionend","handleTransitionEnd"]]]]],["ku4-preview.cjs",[[1,"ku4-preview",{"for":[1],"src":[1],"orientation":[2],"resolutionX":[2,"resolution-x"],"resolutionY":[2,"resolution-y"],"capture":[1],"status":[1537],"alt":[1],"currentSrc":[32],"read":[64]}]]],["ku4-tab.cjs",[[1,"ku4-tab",{"selected":[1540],"panel":[32],"select":[64],"deselect":[64],"connect":[64]},[[0,"click","handleClick"],[0,"keyup","handleKeyUp"]]]]],["ku4-tab-list.cjs",[[1,"ku4-tab-list",{"open":[64]},[[0,"ku4TabClick","handleHpTabClick"],[0,"ku4TabKeyup","handleHpTabKeyUp"]]]]],["ku4-tab-panel.cjs",[[1,"ku4-tab-panel",{"selected":[1540],"maxHeight":[32],"tab":[32],"select":[64],"deselect":[64],"connect":[64]},[[0,"transitionend","handleTransitionEnd"]]]]],["ku4-table.cjs",[[4,"ku4-table",{"stackXs":[1537,"stack-xs"],"stackSm":[1537,"stack-sm"]}]]],["ku4-tooltip.cjs",[[1,"ku4-tooltip",{"element":[1],"top":[4],"left":[4],"bottom":[4],"right":[4],"debug":[4],"show":[64],"hide":[64]}]]],["ku4-validation.cjs",[[1,"ku4-validation",{"for":[1],"element":[1],"pattern":[1],"flags":[1],"values":[1],"method":[1],"invalid":[1540],"disabled":[1540],"isValid":[32],"validate":[64]}]]]], options);
35
+ return index.bootstrapLazy([["ku4-carousel.cjs",[[1,"ku4-carousel",{"swipeTolerance":[2,"swipe-tolerance"],"auto":[4],"noSwipe":[4,"no-swipe"],"delay":[2],"slideState":[32],"next":[64],"previous":[64],"slideTo":[64],"pause":[64],"play":[64]}]]],["ku4-carousel-controls.cjs",[[1,"ku4-carousel-controls",{"for":[1]}]]],["ku4-carousel-slide.cjs",[[1,"ku4-carousel-slide",{"active":[32],"classList":[32],"slideIn":[64],"slideOut":[64],"activate":[64],"deactivate":[64]}]]],["ku4-col.cjs",[[1,"ku4-col",{"startXs":[2,"start-xs"],"startSm":[2,"start-sm"],"startMd":[2,"start-md"],"startLg":[2,"start-lg"],"spanXs":[2,"span-xs"],"spanSm":[2,"span-sm"],"spanMd":[2,"span-md"],"spanLg":[2,"span-lg"],"orderXs":[2,"order-xs"],"orderSm":[2,"order-sm"],"orderMd":[2,"order-md"],"orderLg":[2,"order-lg"]}]]],["ku4-drawer.cjs",[[1,"ku4-drawer",{"bottom":[516],"left":[516],"right":[516],"top":[516],"size":[1],"open":[1540],"toggle":[64]}]]],["ku4-feature.cjs",[[1,"ku4-feature",{"on":[4],"policy":[1],"enabled":[32]}]]],["ku4-focus-trap.cjs",[[1,"ku4-focus-trap",{"active":[1540],"include":[1],"exclude":[1],"excludeShadow":[1,"exclude-shadow"],"initial":[1],"return":[1],"activate":[64],"deactivate":[64]}]]],["ku4-form.cjs",[[4,"ku4-form",{"invalid":[1540],"validate":[64],"invalidate":[64],"read":[64],"write":[64]}]]],["ku4-grid.cjs",[[1,"ku4-grid",{"columnsXs":[2,"columns-xs"],"columnsSm":[2,"columns-sm"],"columnsMd":[2,"columns-md"],"columnsLg":[2,"columns-lg"],"offsetLeftXs":[2,"offset-left-xs"],"offsetLeftSm":[2,"offset-left-sm"],"offsetLeftMd":[2,"offset-left-md"],"offsetLeftLg":[2,"offset-left-lg"],"offsetRight":[2,"offset-right"],"offsetRightXs":[2,"offset-right-xs"],"offsetRightSm":[2,"offset-right-sm"],"offsetRightMd":[2,"offset-right-md"],"offsetRightLg":[2,"offset-right-lg"],"offsetXs":[2,"offset-xs"],"offsetSm":[2,"offset-sm"],"offsetMd":[2,"offset-md"],"offsetLg":[2,"offset-lg"]}]]],["ku4-label.cjs",[[1,"ku4-label",{"for":[1],"value":[1],"empty":[32]}]]],["ku4-mask.cjs",[[1,"ku4-mask",{"for":[1],"template":[1],"ban":[1],"pattern":[1],"char":[1],"hidden":[4]}]]],["ku4-modal.cjs",[[1,"ku4-modal",{"visible":[1540],"focusTrap":[1,"focus-trap"],"display":[64],"dismiss":[64]},[[8,"keyup","handleKeyUp"]]]]],["ku4-panel.cjs",[[1,"ku4-panel",{"open":[1540],"maxHeight":[32],"toggle":[64],"close":[64]},[[0,"transitionend","handleTransitionEnd"]]]]],["ku4-preview.cjs",[[1,"ku4-preview",{"for":[1],"src":[1],"orientation":[2],"resolutionX":[2,"resolution-x"],"resolutionY":[2,"resolution-y"],"capture":[1],"status":[1537],"alt":[1],"currentSrc":[32],"read":[64]}]]],["ku4-tab.cjs",[[1,"ku4-tab",{"selected":[1540],"panel":[32],"select":[64],"deselect":[64],"connect":[64]},[[0,"click","handleClick"],[0,"keyup","handleKeyUp"]]]]],["ku4-tab-list.cjs",[[1,"ku4-tab-list",{"open":[64]},[[0,"ku4TabClick","handleHpTabClick"],[0,"ku4TabKeyup","handleHpTabKeyUp"]]]]],["ku4-tab-panel.cjs",[[1,"ku4-tab-panel",{"selected":[1540],"maxHeight":[32],"tab":[32],"select":[64],"deselect":[64],"connect":[64]},[[0,"transitionend","handleTransitionEnd"]]]]],["ku4-table.cjs",[[4,"ku4-table",{"stackXs":[1537,"stack-xs"],"stackSm":[1537,"stack-sm"]}]]],["ku4-tooltip.cjs",[[1,"ku4-tooltip",{"element":[1],"top":[4],"left":[4],"bottom":[4],"right":[4],"debug":[4],"show":[64],"hide":[64]}]]],["ku4-validation.cjs",[[1,"ku4-validation",{"for":[1],"element":[1],"pattern":[1],"flags":[1],"values":[1],"checked":[4],"method":[1],"invalid":[1540],"disabled":[1540],"hidden":[1540],"isValid":[32],"validate":[64]}]]]], options);
36
36
  });
@@ -14,7 +14,7 @@ const patchEsm = () => {
14
14
  const defineCustomElements = (win, options) => {
15
15
  if (typeof window === 'undefined') return Promise.resolve();
16
16
  return patchEsm().then(() => {
17
- return index.bootstrapLazy([["ku4-carousel.cjs",[[1,"ku4-carousel",{"swipeTolerance":[2,"swipe-tolerance"],"auto":[4],"noSwipe":[4,"no-swipe"],"delay":[2],"slideState":[32],"next":[64],"previous":[64],"slideTo":[64],"pause":[64],"play":[64]}]]],["ku4-carousel-controls.cjs",[[1,"ku4-carousel-controls",{"for":[1]}]]],["ku4-carousel-slide.cjs",[[1,"ku4-carousel-slide",{"active":[32],"classList":[32],"slideIn":[64],"slideOut":[64],"activate":[64],"deactivate":[64]}]]],["ku4-col.cjs",[[1,"ku4-col",{"startXs":[2,"start-xs"],"startSm":[2,"start-sm"],"startMd":[2,"start-md"],"startLg":[2,"start-lg"],"spanXs":[2,"span-xs"],"spanSm":[2,"span-sm"],"spanMd":[2,"span-md"],"spanLg":[2,"span-lg"],"orderXs":[2,"order-xs"],"orderSm":[2,"order-sm"],"orderMd":[2,"order-md"],"orderLg":[2,"order-lg"]}]]],["ku4-drawer.cjs",[[1,"ku4-drawer",{"bottom":[516],"left":[516],"right":[516],"top":[516],"size":[1],"open":[1540],"toggle":[64]}]]],["ku4-feature.cjs",[[1,"ku4-feature",{"on":[4],"policy":[1],"enabled":[32]}]]],["ku4-focus-trap.cjs",[[1,"ku4-focus-trap",{"active":[1540],"include":[1],"exclude":[1],"excludeShadow":[1,"exclude-shadow"],"initial":[1],"return":[1],"activate":[64],"deactivate":[64]}]]],["ku4-form.cjs",[[4,"ku4-form",{"invalid":[1540],"validate":[64],"invalidate":[64],"read":[64],"write":[64]}]]],["ku4-grid.cjs",[[1,"ku4-grid",{"columnsXs":[2,"columns-xs"],"columnsSm":[2,"columns-sm"],"columnsMd":[2,"columns-md"],"columnsLg":[2,"columns-lg"],"offsetLeftXs":[2,"offset-left-xs"],"offsetLeftSm":[2,"offset-left-sm"],"offsetLeftMd":[2,"offset-left-md"],"offsetLeftLg":[2,"offset-left-lg"],"offsetRight":[2,"offset-right"],"offsetRightXs":[2,"offset-right-xs"],"offsetRightSm":[2,"offset-right-sm"],"offsetRightMd":[2,"offset-right-md"],"offsetRightLg":[2,"offset-right-lg"],"offsetXs":[2,"offset-xs"],"offsetSm":[2,"offset-sm"],"offsetMd":[2,"offset-md"],"offsetLg":[2,"offset-lg"]}]]],["ku4-label.cjs",[[1,"ku4-label",{"for":[1],"value":[1],"empty":[32]}]]],["ku4-mask.cjs",[[1,"ku4-mask",{"for":[1],"template":[1],"ban":[1],"pattern":[1],"char":[1],"hidden":[4]}]]],["ku4-modal.cjs",[[1,"ku4-modal",{"visible":[1540],"focusTrap":[1,"focus-trap"],"display":[64],"dismiss":[64]},[[8,"keyup","handleKeyUp"]]]]],["ku4-panel.cjs",[[1,"ku4-panel",{"open":[1540],"maxHeight":[32],"toggle":[64],"close":[64]},[[0,"transitionend","handleTransitionEnd"]]]]],["ku4-preview.cjs",[[1,"ku4-preview",{"for":[1],"src":[1],"orientation":[2],"resolutionX":[2,"resolution-x"],"resolutionY":[2,"resolution-y"],"capture":[1],"status":[1537],"alt":[1],"currentSrc":[32],"read":[64]}]]],["ku4-tab.cjs",[[1,"ku4-tab",{"selected":[1540],"panel":[32],"select":[64],"deselect":[64],"connect":[64]},[[0,"click","handleClick"],[0,"keyup","handleKeyUp"]]]]],["ku4-tab-list.cjs",[[1,"ku4-tab-list",{"open":[64]},[[0,"ku4TabClick","handleHpTabClick"],[0,"ku4TabKeyup","handleHpTabKeyUp"]]]]],["ku4-tab-panel.cjs",[[1,"ku4-tab-panel",{"selected":[1540],"maxHeight":[32],"tab":[32],"select":[64],"deselect":[64],"connect":[64]},[[0,"transitionend","handleTransitionEnd"]]]]],["ku4-table.cjs",[[4,"ku4-table",{"stackXs":[1537,"stack-xs"],"stackSm":[1537,"stack-sm"]}]]],["ku4-tooltip.cjs",[[1,"ku4-tooltip",{"element":[1],"top":[4],"left":[4],"bottom":[4],"right":[4],"debug":[4],"show":[64],"hide":[64]}]]],["ku4-validation.cjs",[[1,"ku4-validation",{"for":[1],"element":[1],"pattern":[1],"flags":[1],"values":[1],"method":[1],"invalid":[1540],"disabled":[1540],"isValid":[32],"validate":[64]}]]]], options);
17
+ return index.bootstrapLazy([["ku4-carousel.cjs",[[1,"ku4-carousel",{"swipeTolerance":[2,"swipe-tolerance"],"auto":[4],"noSwipe":[4,"no-swipe"],"delay":[2],"slideState":[32],"next":[64],"previous":[64],"slideTo":[64],"pause":[64],"play":[64]}]]],["ku4-carousel-controls.cjs",[[1,"ku4-carousel-controls",{"for":[1]}]]],["ku4-carousel-slide.cjs",[[1,"ku4-carousel-slide",{"active":[32],"classList":[32],"slideIn":[64],"slideOut":[64],"activate":[64],"deactivate":[64]}]]],["ku4-col.cjs",[[1,"ku4-col",{"startXs":[2,"start-xs"],"startSm":[2,"start-sm"],"startMd":[2,"start-md"],"startLg":[2,"start-lg"],"spanXs":[2,"span-xs"],"spanSm":[2,"span-sm"],"spanMd":[2,"span-md"],"spanLg":[2,"span-lg"],"orderXs":[2,"order-xs"],"orderSm":[2,"order-sm"],"orderMd":[2,"order-md"],"orderLg":[2,"order-lg"]}]]],["ku4-drawer.cjs",[[1,"ku4-drawer",{"bottom":[516],"left":[516],"right":[516],"top":[516],"size":[1],"open":[1540],"toggle":[64]}]]],["ku4-feature.cjs",[[1,"ku4-feature",{"on":[4],"policy":[1],"enabled":[32]}]]],["ku4-focus-trap.cjs",[[1,"ku4-focus-trap",{"active":[1540],"include":[1],"exclude":[1],"excludeShadow":[1,"exclude-shadow"],"initial":[1],"return":[1],"activate":[64],"deactivate":[64]}]]],["ku4-form.cjs",[[4,"ku4-form",{"invalid":[1540],"validate":[64],"invalidate":[64],"read":[64],"write":[64]}]]],["ku4-grid.cjs",[[1,"ku4-grid",{"columnsXs":[2,"columns-xs"],"columnsSm":[2,"columns-sm"],"columnsMd":[2,"columns-md"],"columnsLg":[2,"columns-lg"],"offsetLeftXs":[2,"offset-left-xs"],"offsetLeftSm":[2,"offset-left-sm"],"offsetLeftMd":[2,"offset-left-md"],"offsetLeftLg":[2,"offset-left-lg"],"offsetRight":[2,"offset-right"],"offsetRightXs":[2,"offset-right-xs"],"offsetRightSm":[2,"offset-right-sm"],"offsetRightMd":[2,"offset-right-md"],"offsetRightLg":[2,"offset-right-lg"],"offsetXs":[2,"offset-xs"],"offsetSm":[2,"offset-sm"],"offsetMd":[2,"offset-md"],"offsetLg":[2,"offset-lg"]}]]],["ku4-label.cjs",[[1,"ku4-label",{"for":[1],"value":[1],"empty":[32]}]]],["ku4-mask.cjs",[[1,"ku4-mask",{"for":[1],"template":[1],"ban":[1],"pattern":[1],"char":[1],"hidden":[4]}]]],["ku4-modal.cjs",[[1,"ku4-modal",{"visible":[1540],"focusTrap":[1,"focus-trap"],"display":[64],"dismiss":[64]},[[8,"keyup","handleKeyUp"]]]]],["ku4-panel.cjs",[[1,"ku4-panel",{"open":[1540],"maxHeight":[32],"toggle":[64],"close":[64]},[[0,"transitionend","handleTransitionEnd"]]]]],["ku4-preview.cjs",[[1,"ku4-preview",{"for":[1],"src":[1],"orientation":[2],"resolutionX":[2,"resolution-x"],"resolutionY":[2,"resolution-y"],"capture":[1],"status":[1537],"alt":[1],"currentSrc":[32],"read":[64]}]]],["ku4-tab.cjs",[[1,"ku4-tab",{"selected":[1540],"panel":[32],"select":[64],"deselect":[64],"connect":[64]},[[0,"click","handleClick"],[0,"keyup","handleKeyUp"]]]]],["ku4-tab-list.cjs",[[1,"ku4-tab-list",{"open":[64]},[[0,"ku4TabClick","handleHpTabClick"],[0,"ku4TabKeyup","handleHpTabKeyUp"]]]]],["ku4-tab-panel.cjs",[[1,"ku4-tab-panel",{"selected":[1540],"maxHeight":[32],"tab":[32],"select":[64],"deselect":[64],"connect":[64]},[[0,"transitionend","handleTransitionEnd"]]]]],["ku4-table.cjs",[[4,"ku4-table",{"stackXs":[1537,"stack-xs"],"stackSm":[1537,"stack-sm"]}]]],["ku4-tooltip.cjs",[[1,"ku4-tooltip",{"element":[1],"top":[4],"left":[4],"bottom":[4],"right":[4],"debug":[4],"show":[64],"hide":[64]}]]],["ku4-validation.cjs",[[1,"ku4-validation",{"for":[1],"element":[1],"pattern":[1],"flags":[1],"values":[1],"checked":[4],"method":[1],"invalid":[1540],"disabled":[1540],"hidden":[1540],"isValid":[32],"validate":[64]}]]]], options);
18
18
  });
19
19
  };
20
20
 
@@ -18,16 +18,26 @@ let Ku4CarouselControls = class {
18
18
  control.removeAttribute('current');
19
19
  control.checked = false;
20
20
  });
21
- const current = this.controls[e.detail - 1];
22
- current.setAttribute('current', e.detail);
23
- current.checked = true;
21
+ try {
22
+ const current = this.controls[e.detail - 1];
23
+ current.setAttribute('current', e.detail);
24
+ current.checked = true;
25
+ }
26
+ catch (e) {
27
+ /* Fail silently */
28
+ }
24
29
  }
25
30
  handleChange(e) {
26
31
  const { carousel, controls } = this;
27
32
  const n = parseInt(e.target.getAttribute('slide'));
28
33
  const slide = isNaN(n) ? controls.indexOf(e.target) + 1 : n;
29
34
  carousel.slideTo(slide);
30
- e.target.setAttribute('current', slide);
35
+ try {
36
+ e.target.setAttribute('current', slide);
37
+ }
38
+ catch (e) {
39
+ /* Fail silently */
40
+ }
31
41
  }
32
42
  componentWillLoad() {
33
43
  const { carousel, controls } = this;
@@ -157,6 +157,7 @@ let Ku4Mask = class {
157
157
  e.inputType !== 'insertFromPaste' &&
158
158
  e.inputType !== 'deleteContentBackward' &&
159
159
  e.inputType !== 'deleteContentForward' &&
160
+ e.inputType !== 'deleteByCut' &&
160
161
  selectionStart === selectionEnd) {
161
162
  this.value = previousValue;
162
163
  return;
@@ -201,7 +202,7 @@ let Ku4Mask = class {
201
202
  return;
202
203
  }
203
204
  }
204
- if (e.inputType === 'deleteContentBackward') {
205
+ if (e.inputType === 'deleteContentBackward' || e.inputType === 'deleteByCut') {
205
206
  const startValue = reverseCharIndexes.find(v => v <= selectionStart - 1);
206
207
  const endValue = reverseCharIndexes.find(v => v <= selectionEnd - 1);
207
208
  const startInsertIndex = charIndexes.findIndex(v => v === startValue);
@@ -16,7 +16,7 @@ const validate = (expressions, value, options, element) => options
16
16
  ? element.value === value && expressions.every(r => r.test(value))
17
17
  : expressions.every(r => r.test(value));
18
18
 
19
- const ku4ValidationCss = ":host{visibility:hidden !important}:host([invalid]){visibility:visible !important}:host([disabled]){visibility:hidden !important}:host([invalid][disabled]){visibility:hidden !important}";
19
+ const ku4ValidationCss = ":host{visibility:hidden !important}:host([invalid]){visibility:visible !important}:host([disabled]){visibility:hidden !important}:host([invalid][disabled]){visibility:hidden !important}:host([invalid][hidden]){visibility:hidden !important}";
20
20
 
21
21
  let Ku4Validation = class {
22
22
  constructor(hostRef) {
@@ -88,12 +88,16 @@ let Ku4Validation = class {
88
88
  this.input.setAttribute('aria-invalid', this.invalid);
89
89
  }
90
90
  assert() {
91
- const { ele, validOptions, input, regex } = this;
91
+ const { ele, validOptions, input, regex, checked } = this;
92
92
  if (input.type === 'file' && t.isNullOrEmpty(input.value)) {
93
93
  return;
94
94
  }
95
95
  const previousIsValid = this.isValid;
96
- this.isValid = this.disabled ? true : validate(regex, input.value, validOptions, ele) && this.validationMethod(input.value);
96
+ this.isValid = this.disabled
97
+ ? true
98
+ : t.isBool(checked)
99
+ ? input.checked === checked
100
+ : validate(regex, input.value, validOptions, ele) && this.validationMethod(input.value);
97
101
  this.invalid = !this.isValid;
98
102
  input.setAttribute('aria-invalid', this.invalid);
99
103
  if (t.isFalse(previousIsValid) && this.isValid) {
@@ -30,5 +30,5 @@ const patchBrowser = () => {
30
30
  };
31
31
 
32
32
  patchBrowser().then(options => {
33
- return bootstrapLazy([["ku4-carousel",[[1,"ku4-carousel",{"swipeTolerance":[2,"swipe-tolerance"],"auto":[4],"noSwipe":[4,"no-swipe"],"delay":[2],"slideState":[32],"next":[64],"previous":[64],"slideTo":[64],"pause":[64],"play":[64]}]]],["ku4-carousel-controls",[[1,"ku4-carousel-controls",{"for":[1]}]]],["ku4-carousel-slide",[[1,"ku4-carousel-slide",{"active":[32],"classList":[32],"slideIn":[64],"slideOut":[64],"activate":[64],"deactivate":[64]}]]],["ku4-col",[[1,"ku4-col",{"startXs":[2,"start-xs"],"startSm":[2,"start-sm"],"startMd":[2,"start-md"],"startLg":[2,"start-lg"],"spanXs":[2,"span-xs"],"spanSm":[2,"span-sm"],"spanMd":[2,"span-md"],"spanLg":[2,"span-lg"],"orderXs":[2,"order-xs"],"orderSm":[2,"order-sm"],"orderMd":[2,"order-md"],"orderLg":[2,"order-lg"]}]]],["ku4-drawer",[[1,"ku4-drawer",{"bottom":[516],"left":[516],"right":[516],"top":[516],"size":[1],"open":[1540],"toggle":[64]}]]],["ku4-feature",[[1,"ku4-feature",{"on":[4],"policy":[1],"enabled":[32]}]]],["ku4-focus-trap",[[1,"ku4-focus-trap",{"active":[1540],"include":[1],"exclude":[1],"excludeShadow":[1,"exclude-shadow"],"initial":[1],"return":[1],"activate":[64],"deactivate":[64]}]]],["ku4-form",[[4,"ku4-form",{"invalid":[1540],"validate":[64],"invalidate":[64],"read":[64],"write":[64]}]]],["ku4-grid",[[1,"ku4-grid",{"columnsXs":[2,"columns-xs"],"columnsSm":[2,"columns-sm"],"columnsMd":[2,"columns-md"],"columnsLg":[2,"columns-lg"],"offsetLeftXs":[2,"offset-left-xs"],"offsetLeftSm":[2,"offset-left-sm"],"offsetLeftMd":[2,"offset-left-md"],"offsetLeftLg":[2,"offset-left-lg"],"offsetRight":[2,"offset-right"],"offsetRightXs":[2,"offset-right-xs"],"offsetRightSm":[2,"offset-right-sm"],"offsetRightMd":[2,"offset-right-md"],"offsetRightLg":[2,"offset-right-lg"],"offsetXs":[2,"offset-xs"],"offsetSm":[2,"offset-sm"],"offsetMd":[2,"offset-md"],"offsetLg":[2,"offset-lg"]}]]],["ku4-label",[[1,"ku4-label",{"for":[1],"value":[1],"empty":[32]}]]],["ku4-mask",[[1,"ku4-mask",{"for":[1],"template":[1],"ban":[1],"pattern":[1],"char":[1],"hidden":[4]}]]],["ku4-modal",[[1,"ku4-modal",{"visible":[1540],"focusTrap":[1,"focus-trap"],"display":[64],"dismiss":[64]},[[8,"keyup","handleKeyUp"]]]]],["ku4-panel",[[1,"ku4-panel",{"open":[1540],"maxHeight":[32],"toggle":[64],"close":[64]},[[0,"transitionend","handleTransitionEnd"]]]]],["ku4-preview",[[1,"ku4-preview",{"for":[1],"src":[1],"orientation":[2],"resolutionX":[2,"resolution-x"],"resolutionY":[2,"resolution-y"],"capture":[1],"status":[1537],"alt":[1],"currentSrc":[32],"read":[64]}]]],["ku4-tab",[[1,"ku4-tab",{"selected":[1540],"panel":[32],"select":[64],"deselect":[64],"connect":[64]},[[0,"click","handleClick"],[0,"keyup","handleKeyUp"]]]]],["ku4-tab-list",[[1,"ku4-tab-list",{"open":[64]},[[0,"ku4TabClick","handleHpTabClick"],[0,"ku4TabKeyup","handleHpTabKeyUp"]]]]],["ku4-tab-panel",[[1,"ku4-tab-panel",{"selected":[1540],"maxHeight":[32],"tab":[32],"select":[64],"deselect":[64],"connect":[64]},[[0,"transitionend","handleTransitionEnd"]]]]],["ku4-table",[[4,"ku4-table",{"stackXs":[1537,"stack-xs"],"stackSm":[1537,"stack-sm"]}]]],["ku4-tooltip",[[1,"ku4-tooltip",{"element":[1],"top":[4],"left":[4],"bottom":[4],"right":[4],"debug":[4],"show":[64],"hide":[64]}]]],["ku4-validation",[[1,"ku4-validation",{"for":[1],"element":[1],"pattern":[1],"flags":[1],"values":[1],"method":[1],"invalid":[1540],"disabled":[1540],"isValid":[32],"validate":[64]}]]]], options);
33
+ return bootstrapLazy([["ku4-carousel",[[1,"ku4-carousel",{"swipeTolerance":[2,"swipe-tolerance"],"auto":[4],"noSwipe":[4,"no-swipe"],"delay":[2],"slideState":[32],"next":[64],"previous":[64],"slideTo":[64],"pause":[64],"play":[64]}]]],["ku4-carousel-controls",[[1,"ku4-carousel-controls",{"for":[1]}]]],["ku4-carousel-slide",[[1,"ku4-carousel-slide",{"active":[32],"classList":[32],"slideIn":[64],"slideOut":[64],"activate":[64],"deactivate":[64]}]]],["ku4-col",[[1,"ku4-col",{"startXs":[2,"start-xs"],"startSm":[2,"start-sm"],"startMd":[2,"start-md"],"startLg":[2,"start-lg"],"spanXs":[2,"span-xs"],"spanSm":[2,"span-sm"],"spanMd":[2,"span-md"],"spanLg":[2,"span-lg"],"orderXs":[2,"order-xs"],"orderSm":[2,"order-sm"],"orderMd":[2,"order-md"],"orderLg":[2,"order-lg"]}]]],["ku4-drawer",[[1,"ku4-drawer",{"bottom":[516],"left":[516],"right":[516],"top":[516],"size":[1],"open":[1540],"toggle":[64]}]]],["ku4-feature",[[1,"ku4-feature",{"on":[4],"policy":[1],"enabled":[32]}]]],["ku4-focus-trap",[[1,"ku4-focus-trap",{"active":[1540],"include":[1],"exclude":[1],"excludeShadow":[1,"exclude-shadow"],"initial":[1],"return":[1],"activate":[64],"deactivate":[64]}]]],["ku4-form",[[4,"ku4-form",{"invalid":[1540],"validate":[64],"invalidate":[64],"read":[64],"write":[64]}]]],["ku4-grid",[[1,"ku4-grid",{"columnsXs":[2,"columns-xs"],"columnsSm":[2,"columns-sm"],"columnsMd":[2,"columns-md"],"columnsLg":[2,"columns-lg"],"offsetLeftXs":[2,"offset-left-xs"],"offsetLeftSm":[2,"offset-left-sm"],"offsetLeftMd":[2,"offset-left-md"],"offsetLeftLg":[2,"offset-left-lg"],"offsetRight":[2,"offset-right"],"offsetRightXs":[2,"offset-right-xs"],"offsetRightSm":[2,"offset-right-sm"],"offsetRightMd":[2,"offset-right-md"],"offsetRightLg":[2,"offset-right-lg"],"offsetXs":[2,"offset-xs"],"offsetSm":[2,"offset-sm"],"offsetMd":[2,"offset-md"],"offsetLg":[2,"offset-lg"]}]]],["ku4-label",[[1,"ku4-label",{"for":[1],"value":[1],"empty":[32]}]]],["ku4-mask",[[1,"ku4-mask",{"for":[1],"template":[1],"ban":[1],"pattern":[1],"char":[1],"hidden":[4]}]]],["ku4-modal",[[1,"ku4-modal",{"visible":[1540],"focusTrap":[1,"focus-trap"],"display":[64],"dismiss":[64]},[[8,"keyup","handleKeyUp"]]]]],["ku4-panel",[[1,"ku4-panel",{"open":[1540],"maxHeight":[32],"toggle":[64],"close":[64]},[[0,"transitionend","handleTransitionEnd"]]]]],["ku4-preview",[[1,"ku4-preview",{"for":[1],"src":[1],"orientation":[2],"resolutionX":[2,"resolution-x"],"resolutionY":[2,"resolution-y"],"capture":[1],"status":[1537],"alt":[1],"currentSrc":[32],"read":[64]}]]],["ku4-tab",[[1,"ku4-tab",{"selected":[1540],"panel":[32],"select":[64],"deselect":[64],"connect":[64]},[[0,"click","handleClick"],[0,"keyup","handleKeyUp"]]]]],["ku4-tab-list",[[1,"ku4-tab-list",{"open":[64]},[[0,"ku4TabClick","handleHpTabClick"],[0,"ku4TabKeyup","handleHpTabKeyUp"]]]]],["ku4-tab-panel",[[1,"ku4-tab-panel",{"selected":[1540],"maxHeight":[32],"tab":[32],"select":[64],"deselect":[64],"connect":[64]},[[0,"transitionend","handleTransitionEnd"]]]]],["ku4-table",[[4,"ku4-table",{"stackXs":[1537,"stack-xs"],"stackSm":[1537,"stack-sm"]}]]],["ku4-tooltip",[[1,"ku4-tooltip",{"element":[1],"top":[4],"left":[4],"bottom":[4],"right":[4],"debug":[4],"show":[64],"hide":[64]}]]],["ku4-validation",[[1,"ku4-validation",{"for":[1],"element":[1],"pattern":[1],"flags":[1],"values":[1],"checked":[4],"method":[1],"invalid":[1540],"disabled":[1540],"hidden":[1540],"isValid":[32],"validate":[64]}]]]], options);
34
34
  });
@@ -10,7 +10,7 @@ const patchEsm = () => {
10
10
  const defineCustomElements = (win, options) => {
11
11
  if (typeof window === 'undefined') return Promise.resolve();
12
12
  return patchEsm().then(() => {
13
- return bootstrapLazy([["ku4-carousel",[[1,"ku4-carousel",{"swipeTolerance":[2,"swipe-tolerance"],"auto":[4],"noSwipe":[4,"no-swipe"],"delay":[2],"slideState":[32],"next":[64],"previous":[64],"slideTo":[64],"pause":[64],"play":[64]}]]],["ku4-carousel-controls",[[1,"ku4-carousel-controls",{"for":[1]}]]],["ku4-carousel-slide",[[1,"ku4-carousel-slide",{"active":[32],"classList":[32],"slideIn":[64],"slideOut":[64],"activate":[64],"deactivate":[64]}]]],["ku4-col",[[1,"ku4-col",{"startXs":[2,"start-xs"],"startSm":[2,"start-sm"],"startMd":[2,"start-md"],"startLg":[2,"start-lg"],"spanXs":[2,"span-xs"],"spanSm":[2,"span-sm"],"spanMd":[2,"span-md"],"spanLg":[2,"span-lg"],"orderXs":[2,"order-xs"],"orderSm":[2,"order-sm"],"orderMd":[2,"order-md"],"orderLg":[2,"order-lg"]}]]],["ku4-drawer",[[1,"ku4-drawer",{"bottom":[516],"left":[516],"right":[516],"top":[516],"size":[1],"open":[1540],"toggle":[64]}]]],["ku4-feature",[[1,"ku4-feature",{"on":[4],"policy":[1],"enabled":[32]}]]],["ku4-focus-trap",[[1,"ku4-focus-trap",{"active":[1540],"include":[1],"exclude":[1],"excludeShadow":[1,"exclude-shadow"],"initial":[1],"return":[1],"activate":[64],"deactivate":[64]}]]],["ku4-form",[[4,"ku4-form",{"invalid":[1540],"validate":[64],"invalidate":[64],"read":[64],"write":[64]}]]],["ku4-grid",[[1,"ku4-grid",{"columnsXs":[2,"columns-xs"],"columnsSm":[2,"columns-sm"],"columnsMd":[2,"columns-md"],"columnsLg":[2,"columns-lg"],"offsetLeftXs":[2,"offset-left-xs"],"offsetLeftSm":[2,"offset-left-sm"],"offsetLeftMd":[2,"offset-left-md"],"offsetLeftLg":[2,"offset-left-lg"],"offsetRight":[2,"offset-right"],"offsetRightXs":[2,"offset-right-xs"],"offsetRightSm":[2,"offset-right-sm"],"offsetRightMd":[2,"offset-right-md"],"offsetRightLg":[2,"offset-right-lg"],"offsetXs":[2,"offset-xs"],"offsetSm":[2,"offset-sm"],"offsetMd":[2,"offset-md"],"offsetLg":[2,"offset-lg"]}]]],["ku4-label",[[1,"ku4-label",{"for":[1],"value":[1],"empty":[32]}]]],["ku4-mask",[[1,"ku4-mask",{"for":[1],"template":[1],"ban":[1],"pattern":[1],"char":[1],"hidden":[4]}]]],["ku4-modal",[[1,"ku4-modal",{"visible":[1540],"focusTrap":[1,"focus-trap"],"display":[64],"dismiss":[64]},[[8,"keyup","handleKeyUp"]]]]],["ku4-panel",[[1,"ku4-panel",{"open":[1540],"maxHeight":[32],"toggle":[64],"close":[64]},[[0,"transitionend","handleTransitionEnd"]]]]],["ku4-preview",[[1,"ku4-preview",{"for":[1],"src":[1],"orientation":[2],"resolutionX":[2,"resolution-x"],"resolutionY":[2,"resolution-y"],"capture":[1],"status":[1537],"alt":[1],"currentSrc":[32],"read":[64]}]]],["ku4-tab",[[1,"ku4-tab",{"selected":[1540],"panel":[32],"select":[64],"deselect":[64],"connect":[64]},[[0,"click","handleClick"],[0,"keyup","handleKeyUp"]]]]],["ku4-tab-list",[[1,"ku4-tab-list",{"open":[64]},[[0,"ku4TabClick","handleHpTabClick"],[0,"ku4TabKeyup","handleHpTabKeyUp"]]]]],["ku4-tab-panel",[[1,"ku4-tab-panel",{"selected":[1540],"maxHeight":[32],"tab":[32],"select":[64],"deselect":[64],"connect":[64]},[[0,"transitionend","handleTransitionEnd"]]]]],["ku4-table",[[4,"ku4-table",{"stackXs":[1537,"stack-xs"],"stackSm":[1537,"stack-sm"]}]]],["ku4-tooltip",[[1,"ku4-tooltip",{"element":[1],"top":[4],"left":[4],"bottom":[4],"right":[4],"debug":[4],"show":[64],"hide":[64]}]]],["ku4-validation",[[1,"ku4-validation",{"for":[1],"element":[1],"pattern":[1],"flags":[1],"values":[1],"method":[1],"invalid":[1540],"disabled":[1540],"isValid":[32],"validate":[64]}]]]], options);
13
+ return bootstrapLazy([["ku4-carousel",[[1,"ku4-carousel",{"swipeTolerance":[2,"swipe-tolerance"],"auto":[4],"noSwipe":[4,"no-swipe"],"delay":[2],"slideState":[32],"next":[64],"previous":[64],"slideTo":[64],"pause":[64],"play":[64]}]]],["ku4-carousel-controls",[[1,"ku4-carousel-controls",{"for":[1]}]]],["ku4-carousel-slide",[[1,"ku4-carousel-slide",{"active":[32],"classList":[32],"slideIn":[64],"slideOut":[64],"activate":[64],"deactivate":[64]}]]],["ku4-col",[[1,"ku4-col",{"startXs":[2,"start-xs"],"startSm":[2,"start-sm"],"startMd":[2,"start-md"],"startLg":[2,"start-lg"],"spanXs":[2,"span-xs"],"spanSm":[2,"span-sm"],"spanMd":[2,"span-md"],"spanLg":[2,"span-lg"],"orderXs":[2,"order-xs"],"orderSm":[2,"order-sm"],"orderMd":[2,"order-md"],"orderLg":[2,"order-lg"]}]]],["ku4-drawer",[[1,"ku4-drawer",{"bottom":[516],"left":[516],"right":[516],"top":[516],"size":[1],"open":[1540],"toggle":[64]}]]],["ku4-feature",[[1,"ku4-feature",{"on":[4],"policy":[1],"enabled":[32]}]]],["ku4-focus-trap",[[1,"ku4-focus-trap",{"active":[1540],"include":[1],"exclude":[1],"excludeShadow":[1,"exclude-shadow"],"initial":[1],"return":[1],"activate":[64],"deactivate":[64]}]]],["ku4-form",[[4,"ku4-form",{"invalid":[1540],"validate":[64],"invalidate":[64],"read":[64],"write":[64]}]]],["ku4-grid",[[1,"ku4-grid",{"columnsXs":[2,"columns-xs"],"columnsSm":[2,"columns-sm"],"columnsMd":[2,"columns-md"],"columnsLg":[2,"columns-lg"],"offsetLeftXs":[2,"offset-left-xs"],"offsetLeftSm":[2,"offset-left-sm"],"offsetLeftMd":[2,"offset-left-md"],"offsetLeftLg":[2,"offset-left-lg"],"offsetRight":[2,"offset-right"],"offsetRightXs":[2,"offset-right-xs"],"offsetRightSm":[2,"offset-right-sm"],"offsetRightMd":[2,"offset-right-md"],"offsetRightLg":[2,"offset-right-lg"],"offsetXs":[2,"offset-xs"],"offsetSm":[2,"offset-sm"],"offsetMd":[2,"offset-md"],"offsetLg":[2,"offset-lg"]}]]],["ku4-label",[[1,"ku4-label",{"for":[1],"value":[1],"empty":[32]}]]],["ku4-mask",[[1,"ku4-mask",{"for":[1],"template":[1],"ban":[1],"pattern":[1],"char":[1],"hidden":[4]}]]],["ku4-modal",[[1,"ku4-modal",{"visible":[1540],"focusTrap":[1,"focus-trap"],"display":[64],"dismiss":[64]},[[8,"keyup","handleKeyUp"]]]]],["ku4-panel",[[1,"ku4-panel",{"open":[1540],"maxHeight":[32],"toggle":[64],"close":[64]},[[0,"transitionend","handleTransitionEnd"]]]]],["ku4-preview",[[1,"ku4-preview",{"for":[1],"src":[1],"orientation":[2],"resolutionX":[2,"resolution-x"],"resolutionY":[2,"resolution-y"],"capture":[1],"status":[1537],"alt":[1],"currentSrc":[32],"read":[64]}]]],["ku4-tab",[[1,"ku4-tab",{"selected":[1540],"panel":[32],"select":[64],"deselect":[64],"connect":[64]},[[0,"click","handleClick"],[0,"keyup","handleKeyUp"]]]]],["ku4-tab-list",[[1,"ku4-tab-list",{"open":[64]},[[0,"ku4TabClick","handleHpTabClick"],[0,"ku4TabKeyup","handleHpTabKeyUp"]]]]],["ku4-tab-panel",[[1,"ku4-tab-panel",{"selected":[1540],"maxHeight":[32],"tab":[32],"select":[64],"deselect":[64],"connect":[64]},[[0,"transitionend","handleTransitionEnd"]]]]],["ku4-table",[[4,"ku4-table",{"stackXs":[1537,"stack-xs"],"stackSm":[1537,"stack-sm"]}]]],["ku4-tooltip",[[1,"ku4-tooltip",{"element":[1],"top":[4],"left":[4],"bottom":[4],"right":[4],"debug":[4],"show":[64],"hide":[64]}]]],["ku4-validation",[[1,"ku4-validation",{"for":[1],"element":[1],"pattern":[1],"flags":[1],"values":[1],"checked":[4],"method":[1],"invalid":[1540],"disabled":[1540],"hidden":[1540],"isValid":[32],"validate":[64]}]]]], options);
14
14
  });
15
15
  };
16
16
 
@@ -1 +1 @@
1
- import{r as registerInstance,h,g as getElement}from"./index-fe3424be.js";import{t}from"./index-20c3926d.js";var ku4CarouselControlsCss=':host{position:relative;display:block}input[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;position:relative;width:20px;height:20px;margin:0;padding:0;border:solid 1px #888;border-radius:50%;-webkit-box-sizing:border-box;box-sizing:border-box;vertical-align:middle}input[type=radio]:checked:after{content:"";position:absolute;top:2px;left:2px;width:14px;height:14px;margin:0;padding:0;border:solid 1px #888;border-radius:50%;-webkit-box-sizing:border-box;box-sizing:border-box;text-align:center;background-color:#333}';var Ku4CarouselControls=function(){function e(e){registerInstance(this,e);this.carousel=document.getElementById(this.for);this.handleSlide=this.handleSlide.bind(this);this.handleChange=this.handleChange.bind(this)}Object.defineProperty(e.prototype,"controls",{get:function(){return[].slice.call(this.host.children)},enumerable:false,configurable:true});e.prototype.handleSlide=function(e){this.controls.forEach((function(e){e.removeAttribute("current");e.checked=false}));var t=this.controls[e.detail-1];t.setAttribute("current",e.detail);t.checked=true};e.prototype.handleChange=function(e){var t=this,n=t.carousel,r=t.controls;var o=parseInt(e.target.getAttribute("slide"));var i=isNaN(o)?r.indexOf(e.target)+1:o;n.slideTo(i);e.target.setAttribute("current",i)};e.prototype.componentWillLoad=function(){var e=this;var n=this,r=n.carousel,o=n.controls;try{r.addEventListener("slide",this.handleSlide);o.forEach((function(t,n){if(n===0){t.setAttribute("current",n+1)}if(t.nodeName==="INPUT"){t.addEventListener("change",e.handleChange)}else{t.addEventListener("keyup",e.handleChange);t.addEventListener("mouseup",e.handleChange)}}))}catch(i){if(!t.exists(r)){throw new ReferenceError("ku4-carousel-controls must connect to a ku4-carousel.")}}};e.prototype.disconnectedCallback=function(){var e=this;var t=this,n=t.carousel,r=t.controls;n.removeEventListener("slide",this.handleSlide);r.forEach((function(t){t.removeEventListener("change",e.handleChange);t.removeEventListener("keyup",e.handleChange);t.removeEventListener("mouseup",e.handleChange)}))};e.prototype.render=function(){return h("slot",null)};Object.defineProperty(e.prototype,"host",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();Ku4CarouselControls.style=ku4CarouselControlsCss;export{Ku4CarouselControls as ku4_carousel_controls};
1
+ import{r as registerInstance,h,g as getElement}from"./index-fe3424be.js";import{t}from"./index-20c3926d.js";var ku4CarouselControlsCss=':host{position:relative;display:block}input[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;position:relative;width:20px;height:20px;margin:0;padding:0;border:solid 1px #888;border-radius:50%;-webkit-box-sizing:border-box;box-sizing:border-box;vertical-align:middle}input[type=radio]:checked:after{content:"";position:absolute;top:2px;left:2px;width:14px;height:14px;margin:0;padding:0;border:solid 1px #888;border-radius:50%;-webkit-box-sizing:border-box;box-sizing:border-box;text-align:center;background-color:#333}';var Ku4CarouselControls=function(){function e(e){registerInstance(this,e);this.carousel=document.getElementById(this.for);this.handleSlide=this.handleSlide.bind(this);this.handleChange=this.handleChange.bind(this)}Object.defineProperty(e.prototype,"controls",{get:function(){return[].slice.call(this.host.children)},enumerable:false,configurable:true});e.prototype.handleSlide=function(e){this.controls.forEach((function(e){e.removeAttribute("current");e.checked=false}));try{var t=this.controls[e.detail-1];t.setAttribute("current",e.detail);t.checked=true}catch(e){}};e.prototype.handleChange=function(e){var t=this,r=t.carousel,n=t.controls;var o=parseInt(e.target.getAttribute("slide"));var i=isNaN(o)?n.indexOf(e.target)+1:o;r.slideTo(i);try{e.target.setAttribute("current",i)}catch(e){}};e.prototype.componentWillLoad=function(){var e=this;var r=this,n=r.carousel,o=r.controls;try{n.addEventListener("slide",this.handleSlide);o.forEach((function(t,r){if(r===0){t.setAttribute("current",r+1)}if(t.nodeName==="INPUT"){t.addEventListener("change",e.handleChange)}else{t.addEventListener("keyup",e.handleChange);t.addEventListener("mouseup",e.handleChange)}}))}catch(i){if(!t.exists(n)){throw new ReferenceError("ku4-carousel-controls must connect to a ku4-carousel.")}}};e.prototype.disconnectedCallback=function(){var e=this;var t=this,r=t.carousel,n=t.controls;r.removeEventListener("slide",this.handleSlide);n.forEach((function(t){t.removeEventListener("change",e.handleChange);t.removeEventListener("keyup",e.handleChange);t.removeEventListener("mouseup",e.handleChange)}))};e.prototype.render=function(){return h("slot",null)};Object.defineProperty(e.prototype,"host",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();Ku4CarouselControls.style=ku4CarouselControlsCss;export{Ku4CarouselControls as ku4_carousel_controls};
@@ -1 +1 @@
1
- var __spreadArray=this&&this.__spreadArray||function(t,e){for(var n=0,r=e.length,a=t.length;n<r;n++,a++)t[a]=e[n];return t};import{r as registerInstance,h}from"./index-fe3424be.js";import{a,Y,t}from"./index-20c3926d.js";var ku4MaskCss=":host{display:none}";var Ku4Mask=function(){function e(t){registerInstance(this,t);this.charIndexes=[];this.reverseCharIndexes=[];this.previousValue="";this.currentValue="";this.touchStart=false;this.template="";this.ban="";this.pattern="";this.char="_";this.hidden=false;this.handleFocus=this.handleFocus.bind(this);this.handleBlur=this.handleBlur.bind(this);this.handleKeyDown=this.handleKeyDown.bind(this);this.handleInput=this.handleInput.bind(this);this.handleTouchStart=this.handleTouchStart.bind(this);this.init()}e.prototype.init=function(){var t=this;this.chars=this.char&&new RegExp(this.char);this.banned=this.ban&&new RegExp(this.ban);var e=this.pattern.replace(/[\s\n]/gm,"");this.patterns=e.substr(1).split(e[0]).map((function(t){try{return t&&new RegExp(t)||null}catch(e){}}));this.charIndexes=this.template.split("").reduce((function(e,n,r){if(t.chars.test(n)){e.push(r)}return e}),[]);this.reverseCharIndexes=__spreadArray([],this.charIndexes).reverse();return this};e.prototype.templateHandler=function(t,e){var n=this,r=n.input,i=n.previousCharIndex,s=n.previousValue,u=n.currentValue,h=n.value,o=n.char;var l=a.unmask(s,e,o).length;var d=a.unmask(u,e,o).length;var c=l<d?i+1:i;this.init().value=a.mask(a.unmask(h,e,o),t,o);r.setSelectionRange(c,c)};e.prototype.charHandler=function(t,e){var n=this,r=n.value,i=n.template;this.init().value=a.mask(a.unmask(r,i,e),i,t)};Object.defineProperty(e.prototype,"previousCharIndex",{get:function(){var t=this;return this.reverseCharIndexes.find((function(e){return t.selectionStart>e}))||this.charIndexes[0]},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"value",{get:function(){return this.currentValue},set:function(t){var e=this,n=e.chars,r=e.hidden,a=e.input;var i=t.search(n);this.currentValue=t;a.value=r&&i>-1?t.substring(0,i):t},enumerable:false,configurable:true});e.prototype.handleTouchStart=function(){this.touchStart=true};e.prototype.handleFocus=function(){var t=this;if(window.document.documentMode){return}var e=this,n=e.input,r=e.template,i=e.char,s=e.chars,u=e.touchStart;this.value=a.mask(a.unmask(this.value,r,i),r,i);Y(0).then((function(){var e=n.value.search(s);var r=e<0?n.value.length:e;t.input.setSelectionRange(e<0&&!u?0:r,r);t.touchStart=false}))};e.prototype.handleBlur=function(){var e=this,n=e.template,r=e.char;if(t.isEmpty(a.unmask(this.value,n,r))){this.value=""}};e.prototype.handleKeyDown=function(t){if(window.document.documentMode){return}var e=this,n=e.banned,r=e.hidden,i=e.template,s=e.char;if(t.key&&t.key.length===1&&n&&(n.test(t.key)&&!(t.altKey||t.ctrlKey||t.metaKey))){t.preventDefault()}this.previousValue=r?a.mask(a.unmask(t.target.value,i,s),i,s):t.target.value;this.selectionStart=t.target.selectionStart;this.selectionEnd=t.target.selectionEnd};e.prototype.handleInput=function(e){var n=this;if(window.document.documentMode){return}var r=this,i=r.input,s=r.template,u=r.char,h=r.chars,o=r.previousValue,l=r.banned,d=r.selectionStart,c=r.selectionEnd,v=r.previousCharIndex,p=r.patterns,f=r.charIndexes,g=r.reverseCharIndexes;if(!h.test(this.previousValue)&&e.inputType!=="insertFromPaste"&&e.inputType!=="deleteContentBackward"&&e.inputType!=="deleteContentForward"&&d===c){this.value=o;return}if(e.inputType==="insertFromPaste"){try{navigator.clipboard.readText().then((function(e){var r=e.replace(new RegExp(l,"g"),"");if(t.isNullOrEmpty(r)){n.value=o;i.setSelectionRange(d,d);return}if(!l||!l.test(r)){var v=o;if(d<c){var p=g.find((function(t){return t<=d-1}));var m=g.find((function(t){return t<=c-1}));var y=f.findIndex((function(t){return t===p}));var k=f.findIndex((function(t){return t===m}));var b=a.unmask(o,s,u);var x=b.substring(0,y+1)+b.substring(k+1,o.length);v=a.mask(x,s,u)}var I=f.find((function(t){return t>=d}));var S=f.findIndex((function(t){return t===I}));var w=a.unmask(v,s,u);v=w.substring(0,S)+r+w.substring(S,o.length);n.value=a.mask(v,s,u);var E=f[S+r.length]||n.value.search(h)||n.value.length;i.setSelectionRange(E,E)}}));this.value=o;i.setSelectionRange(d,d);return}catch(e){this.value=o;i.setSelectionRange(d,d);return}}if(e.inputType==="deleteContentBackward"){var m=g.find((function(t){return t<=d-1}));var y=g.find((function(t){return t<=c-1}));var k=f.findIndex((function(t){return t===m}));var b=f.findIndex((function(t){return t===y}));var x=a.unmask(o,s,u);if(k<b){var I=x.substring(0,k+1)+x.substring(b+1,o.length);this.value=a.mask(I,s,u);I&&k>-1?i.setSelectionRange(v+1,v+1):i.setSelectionRange(v,v)}else{var I=x.substring(0,k)+x.substring(b+1,o.length);this.value=a.mask(I,s,u);i.setSelectionRange(v,v)}return}if(e.inputType==="deleteContentForward"){var S=f.find((function(t){return t>=d}));var w=f.findIndex((function(t){return t===S}));var x=a.unmask(o,s,u);var I=x.substring(0,w)+x.substring(w+1,o.length);this.value=a.mask(I,s,u);i.setSelectionRange(d,d);return}if(e.altKey||e.ctrlKey||e.metaKey){return}if(!e.data){this.value=o;i.setSelectionRange(d,d);return}if(h.test(o.charAt(d))||d===s.length){var x=a.unmask(o,s,u);this.value=a.mask(x+e.data,s,u);var E=this.value.search(h);var R=E<0?s.length:E;i.setSelectionRange(R,R);var C=f.findIndex((function(t){return t>=R}));var K=C<0?f.length-1:C-1;this.validate(e.data,p[K])}else{var L=o;if(d<c){var T=g.find((function(t){return t<=d-1}));var V=g.find((function(t){return t<=c-1}));var k=f.findIndex((function(t){return t===T}));var b=f.findIndex((function(t){return t===V}));var F=a.unmask(o,s,u);var I=F.substring(0,k+1)+F.substring(b+1,o.length);L=a.mask(I,s,u)}var B=f.find((function(t){return t>=d}));var w=f.findIndex((function(t){return t===B}));var x=a.unmask(L,s,u);L=x.substring(0,w)+e.data+x.substring(w,o.length);var M=f.find((function(t){return t>B}));this.value=a.mask(L,s,u);i.setSelectionRange(M,M);var C=f.findIndex((function(t){return t>=M}));var K=C<0?f.length-1:C-1;this.validate(e.data,p[K])}};e.prototype.validate=function(e,n){var r=this,a=r.previousValue,i=r.input,s=r.value,u=r.selectionStart;if(t.exists(n)&&!(n.test(e)||/\(\?[!<=]/.test(n.toString())&&n.test(s))){this.value=a;i.setSelectionRange(u,u)}};e.prototype.componentWillLoad=function(){this.input=document.getElementById(this.for);if(t.exists(this.input)){this.input.addEventListener("focus",this.handleFocus);this.input.addEventListener("blur",this.handleBlur);this.input.addEventListener("keydown",this.handleKeyDown);this.input.addEventListener("input",this.handleInput);this.input.addEventListener("touchstart",this.handleTouchStart)}else{console.error("ku4-mask must have a valid `for` referencing target field `id`.")}};e.prototype.disconnectedCallback=function(){if(this.input&&this.input.removeEventListener){this.input.removeEventListener("focus",this.handleFocus);this.input.removeEventListener("blur",this.handleBlur);this.input.removeEventListener("keydown",this.handleKeyDown);this.input.removeEventListener("input",this.handleInput);this.input.removeEventListener("touchstart",this.handleTouchStart)}};e.prototype.render=function(){return h("slot",null)};Object.defineProperty(e,"watchers",{get:function(){return{template:["templateHandler"],char:["charHandler"]}},enumerable:false,configurable:true});return e}();Ku4Mask.style=ku4MaskCss;export{Ku4Mask as ku4_mask};
1
+ var __spreadArray=this&&this.__spreadArray||function(t,e){for(var n=0,r=e.length,a=t.length;n<r;n++,a++)t[a]=e[n];return t};import{r as registerInstance,h}from"./index-fe3424be.js";import{a,Y,t}from"./index-20c3926d.js";var ku4MaskCss=":host{display:none}";var Ku4Mask=function(){function e(t){registerInstance(this,t);this.charIndexes=[];this.reverseCharIndexes=[];this.previousValue="";this.currentValue="";this.touchStart=false;this.template="";this.ban="";this.pattern="";this.char="_";this.hidden=false;this.handleFocus=this.handleFocus.bind(this);this.handleBlur=this.handleBlur.bind(this);this.handleKeyDown=this.handleKeyDown.bind(this);this.handleInput=this.handleInput.bind(this);this.handleTouchStart=this.handleTouchStart.bind(this);this.init()}e.prototype.init=function(){var t=this;this.chars=this.char&&new RegExp(this.char);this.banned=this.ban&&new RegExp(this.ban);var e=this.pattern.replace(/[\s\n]/gm,"");this.patterns=e.substr(1).split(e[0]).map((function(t){try{return t&&new RegExp(t)||null}catch(e){}}));this.charIndexes=this.template.split("").reduce((function(e,n,r){if(t.chars.test(n)){e.push(r)}return e}),[]);this.reverseCharIndexes=__spreadArray([],this.charIndexes).reverse();return this};e.prototype.templateHandler=function(t,e){var n=this,r=n.input,i=n.previousCharIndex,s=n.previousValue,u=n.currentValue,h=n.value,o=n.char;var l=a.unmask(s,e,o).length;var d=a.unmask(u,e,o).length;var c=l<d?i+1:i;this.init().value=a.mask(a.unmask(h,e,o),t,o);r.setSelectionRange(c,c)};e.prototype.charHandler=function(t,e){var n=this,r=n.value,i=n.template;this.init().value=a.mask(a.unmask(r,i,e),i,t)};Object.defineProperty(e.prototype,"previousCharIndex",{get:function(){var t=this;return this.reverseCharIndexes.find((function(e){return t.selectionStart>e}))||this.charIndexes[0]},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"value",{get:function(){return this.currentValue},set:function(t){var e=this,n=e.chars,r=e.hidden,a=e.input;var i=t.search(n);this.currentValue=t;a.value=r&&i>-1?t.substring(0,i):t},enumerable:false,configurable:true});e.prototype.handleTouchStart=function(){this.touchStart=true};e.prototype.handleFocus=function(){var t=this;if(window.document.documentMode){return}var e=this,n=e.input,r=e.template,i=e.char,s=e.chars,u=e.touchStart;this.value=a.mask(a.unmask(this.value,r,i),r,i);Y(0).then((function(){var e=n.value.search(s);var r=e<0?n.value.length:e;t.input.setSelectionRange(e<0&&!u?0:r,r);t.touchStart=false}))};e.prototype.handleBlur=function(){var e=this,n=e.template,r=e.char;if(t.isEmpty(a.unmask(this.value,n,r))){this.value=""}};e.prototype.handleKeyDown=function(t){if(window.document.documentMode){return}var e=this,n=e.banned,r=e.hidden,i=e.template,s=e.char;if(t.key&&t.key.length===1&&n&&(n.test(t.key)&&!(t.altKey||t.ctrlKey||t.metaKey))){t.preventDefault()}this.previousValue=r?a.mask(a.unmask(t.target.value,i,s),i,s):t.target.value;this.selectionStart=t.target.selectionStart;this.selectionEnd=t.target.selectionEnd};e.prototype.handleInput=function(e){var n=this;if(window.document.documentMode){return}var r=this,i=r.input,s=r.template,u=r.char,h=r.chars,o=r.previousValue,l=r.banned,d=r.selectionStart,c=r.selectionEnd,v=r.previousCharIndex,p=r.patterns,f=r.charIndexes,g=r.reverseCharIndexes;if(!h.test(this.previousValue)&&e.inputType!=="insertFromPaste"&&e.inputType!=="deleteContentBackward"&&e.inputType!=="deleteContentForward"&&e.inputType!=="deleteByCut"&&d===c){this.value=o;return}if(e.inputType==="insertFromPaste"){try{navigator.clipboard.readText().then((function(e){var r=e.replace(new RegExp(l,"g"),"");if(t.isNullOrEmpty(r)){n.value=o;i.setSelectionRange(d,d);return}if(!l||!l.test(r)){var v=o;if(d<c){var p=g.find((function(t){return t<=d-1}));var m=g.find((function(t){return t<=c-1}));var y=f.findIndex((function(t){return t===p}));var k=f.findIndex((function(t){return t===m}));var b=a.unmask(o,s,u);var x=b.substring(0,y+1)+b.substring(k+1,o.length);v=a.mask(x,s,u)}var I=f.find((function(t){return t>=d}));var S=f.findIndex((function(t){return t===I}));var w=a.unmask(v,s,u);v=w.substring(0,S)+r+w.substring(S,o.length);n.value=a.mask(v,s,u);var E=f[S+r.length]||n.value.search(h)||n.value.length;i.setSelectionRange(E,E)}}));this.value=o;i.setSelectionRange(d,d);return}catch(e){this.value=o;i.setSelectionRange(d,d);return}}if(e.inputType==="deleteContentBackward"||e.inputType==="deleteByCut"){var m=g.find((function(t){return t<=d-1}));var y=g.find((function(t){return t<=c-1}));var k=f.findIndex((function(t){return t===m}));var b=f.findIndex((function(t){return t===y}));var x=a.unmask(o,s,u);if(k<b){var I=x.substring(0,k+1)+x.substring(b+1,o.length);this.value=a.mask(I,s,u);I&&k>-1?i.setSelectionRange(v+1,v+1):i.setSelectionRange(v,v)}else{var I=x.substring(0,k)+x.substring(b+1,o.length);this.value=a.mask(I,s,u);i.setSelectionRange(v,v)}return}if(e.inputType==="deleteContentForward"){var S=f.find((function(t){return t>=d}));var w=f.findIndex((function(t){return t===S}));var x=a.unmask(o,s,u);var I=x.substring(0,w)+x.substring(w+1,o.length);this.value=a.mask(I,s,u);i.setSelectionRange(d,d);return}if(e.altKey||e.ctrlKey||e.metaKey){return}if(!e.data){this.value=o;i.setSelectionRange(d,d);return}if(h.test(o.charAt(d))||d===s.length){var x=a.unmask(o,s,u);this.value=a.mask(x+e.data,s,u);var E=this.value.search(h);var R=E<0?s.length:E;i.setSelectionRange(R,R);var C=f.findIndex((function(t){return t>=R}));var K=C<0?f.length-1:C-1;this.validate(e.data,p[K])}else{var T=o;if(d<c){var L=g.find((function(t){return t<=d-1}));var B=g.find((function(t){return t<=c-1}));var k=f.findIndex((function(t){return t===L}));var b=f.findIndex((function(t){return t===B}));var V=a.unmask(o,s,u);var I=V.substring(0,k+1)+V.substring(b+1,o.length);T=a.mask(I,s,u)}var F=f.find((function(t){return t>=d}));var w=f.findIndex((function(t){return t===F}));var x=a.unmask(T,s,u);T=x.substring(0,w)+e.data+x.substring(w,o.length);var M=f.find((function(t){return t>F}));this.value=a.mask(T,s,u);i.setSelectionRange(M,M);var C=f.findIndex((function(t){return t>=M}));var K=C<0?f.length-1:C-1;this.validate(e.data,p[K])}};e.prototype.validate=function(e,n){var r=this,a=r.previousValue,i=r.input,s=r.value,u=r.selectionStart;if(t.exists(n)&&!(n.test(e)||/\(\?[!<=]/.test(n.toString())&&n.test(s))){this.value=a;i.setSelectionRange(u,u)}};e.prototype.componentWillLoad=function(){this.input=document.getElementById(this.for);if(t.exists(this.input)){this.input.addEventListener("focus",this.handleFocus);this.input.addEventListener("blur",this.handleBlur);this.input.addEventListener("keydown",this.handleKeyDown);this.input.addEventListener("input",this.handleInput);this.input.addEventListener("touchstart",this.handleTouchStart)}else{console.error("ku4-mask must have a valid `for` referencing target field `id`.")}};e.prototype.disconnectedCallback=function(){if(this.input&&this.input.removeEventListener){this.input.removeEventListener("focus",this.handleFocus);this.input.removeEventListener("blur",this.handleBlur);this.input.removeEventListener("keydown",this.handleKeyDown);this.input.removeEventListener("input",this.handleInput);this.input.removeEventListener("touchstart",this.handleTouchStart)}};e.prototype.render=function(){return h("slot",null)};Object.defineProperty(e,"watchers",{get:function(){return{template:["templateHandler"],char:["charHandler"]}},enumerable:false,configurable:true});return e}();Ku4Mask.style=ku4MaskCss;export{Ku4Mask as ku4_mask};
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(t,e,i,n){function s(t){return t instanceof i?t:new i((function(e){e(t)}))}return new(i||(i=Promise))((function(i,r){function a(t){try{o(n.next(t))}catch(e){r(e)}}function l(t){try{o(n["throw"](t))}catch(e){r(e)}}function o(t){t.done?i(t.value):s(t.value).then(a,l)}o((n=n.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var i={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},n,s,r,a;return a={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function l(t){return function(e){return o([t,e])}}function o(a){if(n)throw new TypeError("Generator is already executing.");while(i)try{if(n=1,s&&(r=a[0]&2?s["return"]:a[0]?s["throw"]||((r=s["return"])&&r.call(s),0):s.next)&&!(r=r.call(s,a[1])).done)return r;if(s=0,r)a=[a[0]&2,r.value];switch(a[0]){case 0:case 1:r=a;break;case 4:i.label++;return{value:a[1],done:false};case 5:i.label++;s=a[1];a=[0];continue;case 7:a=i.ops.pop();i.trys.pop();continue;default:if(!(r=i.trys,r=r.length>0&&r[r.length-1])&&(a[0]===6||a[0]===2)){i=0;continue}if(a[0]===3&&(!r||a[1]>r[0]&&a[1]<r[3])){i.label=a[1];break}if(a[0]===6&&i.label<r[1]){i.label=r[1];r=a;break}if(r&&i.label<r[2]){i.label=r[2];i.ops.push(a);break}if(r[2])i.ops.pop();i.trys.pop();continue}a=e.call(t,i)}catch(l){a=[6,l];s=0}finally{n=r=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-fe3424be.js";import{t,R,Y}from"./index-20c3926d.js";var validate=function(t,e,i,n){return i?i.some((function(t){return t===e}))&&t.every((function(t){return t.test(e)})):n?n.value===e&&t.every((function(t){return t.test(e)})):t.every((function(t){return t.test(e)}))};var ku4ValidationCss=":host{visibility:hidden !important}:host([invalid]){visibility:visible !important}:host([disabled]){visibility:hidden !important}:host([invalid][disabled]){visibility:hidden !important}";var Ku4Validation=function(){function e(e){registerInstance(this,e);this.didValidate=createEvent(this,"validate",7);this.pattern=".*";this.flags="";this.method="";var i=this.pattern.split(" ");var n=this.flags.split(" ");var s=this.method.trim();this.regex=i.map((function(t,e){return new RegExp(t,n[e])}));this.validationMethod=t.isNullOrEmpty(s)?function(){return true}:new Function("value",/^return/.test(s)?s:"return "+s);this.handleInput=this.handleInput.bind(this);this.handleChange=this.handleChange.bind(this);this.handleBlur=this.handleBlur.bind(this);this.handleReset=this.handleReset.bind(this)}e.prototype.validate=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.assert()]}))}))};e.prototype.handleInput=function(){(this.input.type==="file"||t.isFalse(this.isValid))&&this.assert()};e.prototype.handleChange=function(){(this.input.type==="file"||t.isFalse(this.isValid))&&this.assert()};e.prototype.handleBlur=function(){this.assert()};e.prototype.handleReset=function(){this.isValid=true;this.invalid=!this.isValid;this.input.setAttribute("aria-invalid",this.invalid)};e.prototype.assert=function(){var e=this,i=e.ele,n=e.validOptions,s=e.input,r=e.regex;if(s.type==="file"&&t.isNullOrEmpty(s.value)){return}var a=this.isValid;this.isValid=this.disabled?true:validate(r,s.value,n,i)&&this.validationMethod(s.value);this.invalid=!this.isValid;s.setAttribute("aria-invalid",this.invalid);if(t.isFalse(a)&&this.isValid){this.didValidate.emit(this.isValid)}return this.isValid};e.prototype.componentWillLoad=function(){var e=this;this.input=document.getElementById(this.for);if(t.exists(this.input)){this.ele=document.getElementById(this.element)||document.querySelector(this.element);this.validOptions=t.exists(this.values)?this.values.split(","):this.ele&&this.ele.nodeName==="DATALIST"&&[].slice.call(this.ele.querySelectorAll("option")).map((function(t){return t.value}));var i=this.input.getAttribute("aria-describedby");var n=this.host.getAttribute("id")||R.uid();this.host.setAttribute("id",n);if(t.isNullOrEmpty(i)){this.input.setAttribute("aria-describedby",n)}Y(0).then((function(){e.input.addEventListener("input",e.handleInput);e.input.addEventListener("change",e.handleChange);e.input.addEventListener("blur",e.handleBlur)}));if(t.isFunction(this.host.closest)){this.form=this.host.closest("form");if(this.form&&this.form.addEventListener){this.form.addEventListener("reset",this.handleReset)}}}else{console.error("ku4-validation must have a valid `for` referencing target field `id`.")}};e.prototype.disconnectedCallback=function(){if(this.input&&this.input.removeEventListener){this.input.removeEventListener("input",this.handleInput);this.input.removeEventListener("change",this.handleChange);this.input.removeEventListener("blur",this.handleBlur)}if(this.form&&this.form.removeEventListener){this.form.removeEventListener("reset",this.handleReset)}};e.prototype.render=function(){return h(Host,{role:"alert","aria-live":"assertive"},h("slot",null))};Object.defineProperty(e.prototype,"host",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();Ku4Validation.style=ku4ValidationCss;export{Ku4Validation as ku4_validation};
1
+ var __awaiter=this&&this.__awaiter||function(t,e,i,n){function s(t){return t instanceof i?t:new i((function(e){e(t)}))}return new(i||(i=Promise))((function(i,r){function a(t){try{o(n.next(t))}catch(e){r(e)}}function l(t){try{o(n["throw"](t))}catch(e){r(e)}}function o(t){t.done?i(t.value):s(t.value).then(a,l)}o((n=n.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var i={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},n,s,r,a;return a={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function l(t){return function(e){return o([t,e])}}function o(a){if(n)throw new TypeError("Generator is already executing.");while(i)try{if(n=1,s&&(r=a[0]&2?s["return"]:a[0]?s["throw"]||((r=s["return"])&&r.call(s),0):s.next)&&!(r=r.call(s,a[1])).done)return r;if(s=0,r)a=[a[0]&2,r.value];switch(a[0]){case 0:case 1:r=a;break;case 4:i.label++;return{value:a[1],done:false};case 5:i.label++;s=a[1];a=[0];continue;case 7:a=i.ops.pop();i.trys.pop();continue;default:if(!(r=i.trys,r=r.length>0&&r[r.length-1])&&(a[0]===6||a[0]===2)){i=0;continue}if(a[0]===3&&(!r||a[1]>r[0]&&a[1]<r[3])){i.label=a[1];break}if(a[0]===6&&i.label<r[1]){i.label=r[1];r=a;break}if(r&&i.label<r[2]){i.label=r[2];i.ops.push(a);break}if(r[2])i.ops.pop();i.trys.pop();continue}a=e.call(t,i)}catch(l){a=[6,l];s=0}finally{n=r=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-fe3424be.js";import{t,R,Y}from"./index-20c3926d.js";var validate=function(t,e,i,n){return i?i.some((function(t){return t===e}))&&t.every((function(t){return t.test(e)})):n?n.value===e&&t.every((function(t){return t.test(e)})):t.every((function(t){return t.test(e)}))};var ku4ValidationCss=":host{visibility:hidden !important}:host([invalid]){visibility:visible !important}:host([disabled]){visibility:hidden !important}:host([invalid][disabled]){visibility:hidden !important}:host([invalid][hidden]){visibility:hidden !important}";var Ku4Validation=function(){function e(e){registerInstance(this,e);this.didValidate=createEvent(this,"validate",7);this.pattern=".*";this.flags="";this.method="";var i=this.pattern.split(" ");var n=this.flags.split(" ");var s=this.method.trim();this.regex=i.map((function(t,e){return new RegExp(t,n[e])}));this.validationMethod=t.isNullOrEmpty(s)?function(){return true}:new Function("value",/^return/.test(s)?s:"return "+s);this.handleInput=this.handleInput.bind(this);this.handleChange=this.handleChange.bind(this);this.handleBlur=this.handleBlur.bind(this);this.handleReset=this.handleReset.bind(this)}e.prototype.validate=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.assert()]}))}))};e.prototype.handleInput=function(){(this.input.type==="file"||t.isFalse(this.isValid))&&this.assert()};e.prototype.handleChange=function(){(this.input.type==="file"||t.isFalse(this.isValid))&&this.assert()};e.prototype.handleBlur=function(){this.assert()};e.prototype.handleReset=function(){this.isValid=true;this.invalid=!this.isValid;this.input.setAttribute("aria-invalid",this.invalid)};e.prototype.assert=function(){var e=this,i=e.ele,n=e.validOptions,s=e.input,r=e.regex,a=e.checked;if(s.type==="file"&&t.isNullOrEmpty(s.value)){return}var l=this.isValid;this.isValid=this.disabled?true:t.isBool(a)?s.checked===a:validate(r,s.value,n,i)&&this.validationMethod(s.value);this.invalid=!this.isValid;s.setAttribute("aria-invalid",this.invalid);if(t.isFalse(l)&&this.isValid){this.didValidate.emit(this.isValid)}return this.isValid};e.prototype.componentWillLoad=function(){var e=this;this.input=document.getElementById(this.for);if(t.exists(this.input)){this.ele=document.getElementById(this.element)||document.querySelector(this.element);this.validOptions=t.exists(this.values)?this.values.split(","):this.ele&&this.ele.nodeName==="DATALIST"&&[].slice.call(this.ele.querySelectorAll("option")).map((function(t){return t.value}));var i=this.input.getAttribute("aria-describedby");var n=this.host.getAttribute("id")||R.uid();this.host.setAttribute("id",n);if(t.isNullOrEmpty(i)){this.input.setAttribute("aria-describedby",n)}Y(0).then((function(){e.input.addEventListener("input",e.handleInput);e.input.addEventListener("change",e.handleChange);e.input.addEventListener("blur",e.handleBlur)}));if(t.isFunction(this.host.closest)){this.form=this.host.closest("form");if(this.form&&this.form.addEventListener){this.form.addEventListener("reset",this.handleReset)}}}else{console.error("ku4-validation must have a valid `for` referencing target field `id`.")}};e.prototype.disconnectedCallback=function(){if(this.input&&this.input.removeEventListener){this.input.removeEventListener("input",this.handleInput);this.input.removeEventListener("change",this.handleChange);this.input.removeEventListener("blur",this.handleBlur)}if(this.form&&this.form.removeEventListener){this.form.removeEventListener("reset",this.handleReset)}};e.prototype.render=function(){return h(Host,{role:"alert","aria-live":"assertive"},h("slot",null))};Object.defineProperty(e.prototype,"host",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();Ku4Validation.style=ku4ValidationCss;export{Ku4Validation as ku4_validation};
@@ -1 +1 @@
1
- import{d as doc,N as NAMESPACE,w as win,p as promiseResolve,b as bootstrapLazy}from"./index-fe3424be.js";var patchBrowser=function(){var e=Array.from(doc.querySelectorAll("script")).find((function(e){return new RegExp("/"+NAMESPACE+"(\\.esm)?\\.js($|\\?|#)").test(e.src)||e.getAttribute("data-stencil-namespace")===NAMESPACE}));var t={};if("onbeforeload"in e&&!history.scrollRestoration){return{then:function(){}}}{t.resourcesUrl=new URL(".",new URL(e.getAttribute("data-resources-url")||e.src,win.location.href)).href}return promiseResolve(t)};patchBrowser().then((function(e){return bootstrapLazy([["ku4-carousel",[[1,"ku4-carousel",{swipeTolerance:[2,"swipe-tolerance"],auto:[4],noSwipe:[4,"no-swipe"],delay:[2],slideState:[32],next:[64],previous:[64],slideTo:[64],pause:[64],play:[64]}]]],["ku4-carousel-controls",[[1,"ku4-carousel-controls",{for:[1]}]]],["ku4-carousel-slide",[[1,"ku4-carousel-slide",{active:[32],classList:[32],slideIn:[64],slideOut:[64],activate:[64],deactivate:[64]}]]],["ku4-col",[[1,"ku4-col",{startXs:[2,"start-xs"],startSm:[2,"start-sm"],startMd:[2,"start-md"],startLg:[2,"start-lg"],spanXs:[2,"span-xs"],spanSm:[2,"span-sm"],spanMd:[2,"span-md"],spanLg:[2,"span-lg"],orderXs:[2,"order-xs"],orderSm:[2,"order-sm"],orderMd:[2,"order-md"],orderLg:[2,"order-lg"]}]]],["ku4-drawer",[[1,"ku4-drawer",{bottom:[516],left:[516],right:[516],top:[516],size:[1],open:[1540],toggle:[64]}]]],["ku4-feature",[[1,"ku4-feature",{on:[4],policy:[1],enabled:[32]}]]],["ku4-focus-trap",[[1,"ku4-focus-trap",{active:[1540],include:[1],exclude:[1],excludeShadow:[1,"exclude-shadow"],initial:[1],return:[1],activate:[64],deactivate:[64]}]]],["ku4-form",[[4,"ku4-form",{invalid:[1540],validate:[64],invalidate:[64],read:[64],write:[64]}]]],["ku4-grid",[[1,"ku4-grid",{columnsXs:[2,"columns-xs"],columnsSm:[2,"columns-sm"],columnsMd:[2,"columns-md"],columnsLg:[2,"columns-lg"],offsetLeftXs:[2,"offset-left-xs"],offsetLeftSm:[2,"offset-left-sm"],offsetLeftMd:[2,"offset-left-md"],offsetLeftLg:[2,"offset-left-lg"],offsetRight:[2,"offset-right"],offsetRightXs:[2,"offset-right-xs"],offsetRightSm:[2,"offset-right-sm"],offsetRightMd:[2,"offset-right-md"],offsetRightLg:[2,"offset-right-lg"],offsetXs:[2,"offset-xs"],offsetSm:[2,"offset-sm"],offsetMd:[2,"offset-md"],offsetLg:[2,"offset-lg"]}]]],["ku4-label",[[1,"ku4-label",{for:[1],value:[1],empty:[32]}]]],["ku4-mask",[[1,"ku4-mask",{for:[1],template:[1],ban:[1],pattern:[1],char:[1],hidden:[4]}]]],["ku4-modal",[[1,"ku4-modal",{visible:[1540],focusTrap:[1,"focus-trap"],display:[64],dismiss:[64]},[[8,"keyup","handleKeyUp"]]]]],["ku4-panel",[[1,"ku4-panel",{open:[1540],maxHeight:[32],toggle:[64],close:[64]},[[0,"transitionend","handleTransitionEnd"]]]]],["ku4-preview",[[1,"ku4-preview",{for:[1],src:[1],orientation:[2],resolutionX:[2,"resolution-x"],resolutionY:[2,"resolution-y"],capture:[1],status:[1537],alt:[1],currentSrc:[32],read:[64]}]]],["ku4-tab",[[1,"ku4-tab",{selected:[1540],panel:[32],select:[64],deselect:[64],connect:[64]},[[0,"click","handleClick"],[0,"keyup","handleKeyUp"]]]]],["ku4-tab-list",[[1,"ku4-tab-list",{open:[64]},[[0,"ku4TabClick","handleHpTabClick"],[0,"ku4TabKeyup","handleHpTabKeyUp"]]]]],["ku4-tab-panel",[[1,"ku4-tab-panel",{selected:[1540],maxHeight:[32],tab:[32],select:[64],deselect:[64],connect:[64]},[[0,"transitionend","handleTransitionEnd"]]]]],["ku4-table",[[4,"ku4-table",{stackXs:[1537,"stack-xs"],stackSm:[1537,"stack-sm"]}]]],["ku4-tooltip",[[1,"ku4-tooltip",{element:[1],top:[4],left:[4],bottom:[4],right:[4],debug:[4],show:[64],hide:[64]}]]],["ku4-validation",[[1,"ku4-validation",{for:[1],element:[1],pattern:[1],flags:[1],values:[1],method:[1],invalid:[1540],disabled:[1540],isValid:[32],validate:[64]}]]]],e)}));
1
+ import{d as doc,N as NAMESPACE,w as win,p as promiseResolve,b as bootstrapLazy}from"./index-fe3424be.js";var patchBrowser=function(){var e=Array.from(doc.querySelectorAll("script")).find((function(e){return new RegExp("/"+NAMESPACE+"(\\.esm)?\\.js($|\\?|#)").test(e.src)||e.getAttribute("data-stencil-namespace")===NAMESPACE}));var t={};if("onbeforeload"in e&&!history.scrollRestoration){return{then:function(){}}}{t.resourcesUrl=new URL(".",new URL(e.getAttribute("data-resources-url")||e.src,win.location.href)).href}return promiseResolve(t)};patchBrowser().then((function(e){return bootstrapLazy([["ku4-carousel",[[1,"ku4-carousel",{swipeTolerance:[2,"swipe-tolerance"],auto:[4],noSwipe:[4,"no-swipe"],delay:[2],slideState:[32],next:[64],previous:[64],slideTo:[64],pause:[64],play:[64]}]]],["ku4-carousel-controls",[[1,"ku4-carousel-controls",{for:[1]}]]],["ku4-carousel-slide",[[1,"ku4-carousel-slide",{active:[32],classList:[32],slideIn:[64],slideOut:[64],activate:[64],deactivate:[64]}]]],["ku4-col",[[1,"ku4-col",{startXs:[2,"start-xs"],startSm:[2,"start-sm"],startMd:[2,"start-md"],startLg:[2,"start-lg"],spanXs:[2,"span-xs"],spanSm:[2,"span-sm"],spanMd:[2,"span-md"],spanLg:[2,"span-lg"],orderXs:[2,"order-xs"],orderSm:[2,"order-sm"],orderMd:[2,"order-md"],orderLg:[2,"order-lg"]}]]],["ku4-drawer",[[1,"ku4-drawer",{bottom:[516],left:[516],right:[516],top:[516],size:[1],open:[1540],toggle:[64]}]]],["ku4-feature",[[1,"ku4-feature",{on:[4],policy:[1],enabled:[32]}]]],["ku4-focus-trap",[[1,"ku4-focus-trap",{active:[1540],include:[1],exclude:[1],excludeShadow:[1,"exclude-shadow"],initial:[1],return:[1],activate:[64],deactivate:[64]}]]],["ku4-form",[[4,"ku4-form",{invalid:[1540],validate:[64],invalidate:[64],read:[64],write:[64]}]]],["ku4-grid",[[1,"ku4-grid",{columnsXs:[2,"columns-xs"],columnsSm:[2,"columns-sm"],columnsMd:[2,"columns-md"],columnsLg:[2,"columns-lg"],offsetLeftXs:[2,"offset-left-xs"],offsetLeftSm:[2,"offset-left-sm"],offsetLeftMd:[2,"offset-left-md"],offsetLeftLg:[2,"offset-left-lg"],offsetRight:[2,"offset-right"],offsetRightXs:[2,"offset-right-xs"],offsetRightSm:[2,"offset-right-sm"],offsetRightMd:[2,"offset-right-md"],offsetRightLg:[2,"offset-right-lg"],offsetXs:[2,"offset-xs"],offsetSm:[2,"offset-sm"],offsetMd:[2,"offset-md"],offsetLg:[2,"offset-lg"]}]]],["ku4-label",[[1,"ku4-label",{for:[1],value:[1],empty:[32]}]]],["ku4-mask",[[1,"ku4-mask",{for:[1],template:[1],ban:[1],pattern:[1],char:[1],hidden:[4]}]]],["ku4-modal",[[1,"ku4-modal",{visible:[1540],focusTrap:[1,"focus-trap"],display:[64],dismiss:[64]},[[8,"keyup","handleKeyUp"]]]]],["ku4-panel",[[1,"ku4-panel",{open:[1540],maxHeight:[32],toggle:[64],close:[64]},[[0,"transitionend","handleTransitionEnd"]]]]],["ku4-preview",[[1,"ku4-preview",{for:[1],src:[1],orientation:[2],resolutionX:[2,"resolution-x"],resolutionY:[2,"resolution-y"],capture:[1],status:[1537],alt:[1],currentSrc:[32],read:[64]}]]],["ku4-tab",[[1,"ku4-tab",{selected:[1540],panel:[32],select:[64],deselect:[64],connect:[64]},[[0,"click","handleClick"],[0,"keyup","handleKeyUp"]]]]],["ku4-tab-list",[[1,"ku4-tab-list",{open:[64]},[[0,"ku4TabClick","handleHpTabClick"],[0,"ku4TabKeyup","handleHpTabKeyUp"]]]]],["ku4-tab-panel",[[1,"ku4-tab-panel",{selected:[1540],maxHeight:[32],tab:[32],select:[64],deselect:[64],connect:[64]},[[0,"transitionend","handleTransitionEnd"]]]]],["ku4-table",[[4,"ku4-table",{stackXs:[1537,"stack-xs"],stackSm:[1537,"stack-sm"]}]]],["ku4-tooltip",[[1,"ku4-tooltip",{element:[1],top:[4],left:[4],bottom:[4],right:[4],debug:[4],show:[64],hide:[64]}]]],["ku4-validation",[[1,"ku4-validation",{for:[1],element:[1],pattern:[1],flags:[1],values:[1],checked:[4],method:[1],invalid:[1540],disabled:[1540],hidden:[1540],isValid:[32],validate:[64]}]]]],e)}));
@@ -1 +1 @@
1
- import{p as promiseResolve,b as bootstrapLazy}from"./index-fe3424be.js";var patchEsm=function(){return promiseResolve()};var defineCustomElements=function(e,t){if(typeof window==="undefined")return Promise.resolve();return patchEsm().then((function(){return bootstrapLazy([["ku4-carousel",[[1,"ku4-carousel",{swipeTolerance:[2,"swipe-tolerance"],auto:[4],noSwipe:[4,"no-swipe"],delay:[2],slideState:[32],next:[64],previous:[64],slideTo:[64],pause:[64],play:[64]}]]],["ku4-carousel-controls",[[1,"ku4-carousel-controls",{for:[1]}]]],["ku4-carousel-slide",[[1,"ku4-carousel-slide",{active:[32],classList:[32],slideIn:[64],slideOut:[64],activate:[64],deactivate:[64]}]]],["ku4-col",[[1,"ku4-col",{startXs:[2,"start-xs"],startSm:[2,"start-sm"],startMd:[2,"start-md"],startLg:[2,"start-lg"],spanXs:[2,"span-xs"],spanSm:[2,"span-sm"],spanMd:[2,"span-md"],spanLg:[2,"span-lg"],orderXs:[2,"order-xs"],orderSm:[2,"order-sm"],orderMd:[2,"order-md"],orderLg:[2,"order-lg"]}]]],["ku4-drawer",[[1,"ku4-drawer",{bottom:[516],left:[516],right:[516],top:[516],size:[1],open:[1540],toggle:[64]}]]],["ku4-feature",[[1,"ku4-feature",{on:[4],policy:[1],enabled:[32]}]]],["ku4-focus-trap",[[1,"ku4-focus-trap",{active:[1540],include:[1],exclude:[1],excludeShadow:[1,"exclude-shadow"],initial:[1],return:[1],activate:[64],deactivate:[64]}]]],["ku4-form",[[4,"ku4-form",{invalid:[1540],validate:[64],invalidate:[64],read:[64],write:[64]}]]],["ku4-grid",[[1,"ku4-grid",{columnsXs:[2,"columns-xs"],columnsSm:[2,"columns-sm"],columnsMd:[2,"columns-md"],columnsLg:[2,"columns-lg"],offsetLeftXs:[2,"offset-left-xs"],offsetLeftSm:[2,"offset-left-sm"],offsetLeftMd:[2,"offset-left-md"],offsetLeftLg:[2,"offset-left-lg"],offsetRight:[2,"offset-right"],offsetRightXs:[2,"offset-right-xs"],offsetRightSm:[2,"offset-right-sm"],offsetRightMd:[2,"offset-right-md"],offsetRightLg:[2,"offset-right-lg"],offsetXs:[2,"offset-xs"],offsetSm:[2,"offset-sm"],offsetMd:[2,"offset-md"],offsetLg:[2,"offset-lg"]}]]],["ku4-label",[[1,"ku4-label",{for:[1],value:[1],empty:[32]}]]],["ku4-mask",[[1,"ku4-mask",{for:[1],template:[1],ban:[1],pattern:[1],char:[1],hidden:[4]}]]],["ku4-modal",[[1,"ku4-modal",{visible:[1540],focusTrap:[1,"focus-trap"],display:[64],dismiss:[64]},[[8,"keyup","handleKeyUp"]]]]],["ku4-panel",[[1,"ku4-panel",{open:[1540],maxHeight:[32],toggle:[64],close:[64]},[[0,"transitionend","handleTransitionEnd"]]]]],["ku4-preview",[[1,"ku4-preview",{for:[1],src:[1],orientation:[2],resolutionX:[2,"resolution-x"],resolutionY:[2,"resolution-y"],capture:[1],status:[1537],alt:[1],currentSrc:[32],read:[64]}]]],["ku4-tab",[[1,"ku4-tab",{selected:[1540],panel:[32],select:[64],deselect:[64],connect:[64]},[[0,"click","handleClick"],[0,"keyup","handleKeyUp"]]]]],["ku4-tab-list",[[1,"ku4-tab-list",{open:[64]},[[0,"ku4TabClick","handleHpTabClick"],[0,"ku4TabKeyup","handleHpTabKeyUp"]]]]],["ku4-tab-panel",[[1,"ku4-tab-panel",{selected:[1540],maxHeight:[32],tab:[32],select:[64],deselect:[64],connect:[64]},[[0,"transitionend","handleTransitionEnd"]]]]],["ku4-table",[[4,"ku4-table",{stackXs:[1537,"stack-xs"],stackSm:[1537,"stack-sm"]}]]],["ku4-tooltip",[[1,"ku4-tooltip",{element:[1],top:[4],left:[4],bottom:[4],right:[4],debug:[4],show:[64],hide:[64]}]]],["ku4-validation",[[1,"ku4-validation",{for:[1],element:[1],pattern:[1],flags:[1],values:[1],method:[1],invalid:[1540],disabled:[1540],isValid:[32],validate:[64]}]]]],t)}))};export{defineCustomElements};
1
+ import{p as promiseResolve,b as bootstrapLazy}from"./index-fe3424be.js";var patchEsm=function(){return promiseResolve()};var defineCustomElements=function(e,t){if(typeof window==="undefined")return Promise.resolve();return patchEsm().then((function(){return bootstrapLazy([["ku4-carousel",[[1,"ku4-carousel",{swipeTolerance:[2,"swipe-tolerance"],auto:[4],noSwipe:[4,"no-swipe"],delay:[2],slideState:[32],next:[64],previous:[64],slideTo:[64],pause:[64],play:[64]}]]],["ku4-carousel-controls",[[1,"ku4-carousel-controls",{for:[1]}]]],["ku4-carousel-slide",[[1,"ku4-carousel-slide",{active:[32],classList:[32],slideIn:[64],slideOut:[64],activate:[64],deactivate:[64]}]]],["ku4-col",[[1,"ku4-col",{startXs:[2,"start-xs"],startSm:[2,"start-sm"],startMd:[2,"start-md"],startLg:[2,"start-lg"],spanXs:[2,"span-xs"],spanSm:[2,"span-sm"],spanMd:[2,"span-md"],spanLg:[2,"span-lg"],orderXs:[2,"order-xs"],orderSm:[2,"order-sm"],orderMd:[2,"order-md"],orderLg:[2,"order-lg"]}]]],["ku4-drawer",[[1,"ku4-drawer",{bottom:[516],left:[516],right:[516],top:[516],size:[1],open:[1540],toggle:[64]}]]],["ku4-feature",[[1,"ku4-feature",{on:[4],policy:[1],enabled:[32]}]]],["ku4-focus-trap",[[1,"ku4-focus-trap",{active:[1540],include:[1],exclude:[1],excludeShadow:[1,"exclude-shadow"],initial:[1],return:[1],activate:[64],deactivate:[64]}]]],["ku4-form",[[4,"ku4-form",{invalid:[1540],validate:[64],invalidate:[64],read:[64],write:[64]}]]],["ku4-grid",[[1,"ku4-grid",{columnsXs:[2,"columns-xs"],columnsSm:[2,"columns-sm"],columnsMd:[2,"columns-md"],columnsLg:[2,"columns-lg"],offsetLeftXs:[2,"offset-left-xs"],offsetLeftSm:[2,"offset-left-sm"],offsetLeftMd:[2,"offset-left-md"],offsetLeftLg:[2,"offset-left-lg"],offsetRight:[2,"offset-right"],offsetRightXs:[2,"offset-right-xs"],offsetRightSm:[2,"offset-right-sm"],offsetRightMd:[2,"offset-right-md"],offsetRightLg:[2,"offset-right-lg"],offsetXs:[2,"offset-xs"],offsetSm:[2,"offset-sm"],offsetMd:[2,"offset-md"],offsetLg:[2,"offset-lg"]}]]],["ku4-label",[[1,"ku4-label",{for:[1],value:[1],empty:[32]}]]],["ku4-mask",[[1,"ku4-mask",{for:[1],template:[1],ban:[1],pattern:[1],char:[1],hidden:[4]}]]],["ku4-modal",[[1,"ku4-modal",{visible:[1540],focusTrap:[1,"focus-trap"],display:[64],dismiss:[64]},[[8,"keyup","handleKeyUp"]]]]],["ku4-panel",[[1,"ku4-panel",{open:[1540],maxHeight:[32],toggle:[64],close:[64]},[[0,"transitionend","handleTransitionEnd"]]]]],["ku4-preview",[[1,"ku4-preview",{for:[1],src:[1],orientation:[2],resolutionX:[2,"resolution-x"],resolutionY:[2,"resolution-y"],capture:[1],status:[1537],alt:[1],currentSrc:[32],read:[64]}]]],["ku4-tab",[[1,"ku4-tab",{selected:[1540],panel:[32],select:[64],deselect:[64],connect:[64]},[[0,"click","handleClick"],[0,"keyup","handleKeyUp"]]]]],["ku4-tab-list",[[1,"ku4-tab-list",{open:[64]},[[0,"ku4TabClick","handleHpTabClick"],[0,"ku4TabKeyup","handleHpTabKeyUp"]]]]],["ku4-tab-panel",[[1,"ku4-tab-panel",{selected:[1540],maxHeight:[32],tab:[32],select:[64],deselect:[64],connect:[64]},[[0,"transitionend","handleTransitionEnd"]]]]],["ku4-table",[[4,"ku4-table",{stackXs:[1537,"stack-xs"],stackSm:[1537,"stack-sm"]}]]],["ku4-tooltip",[[1,"ku4-tooltip",{element:[1],top:[4],left:[4],bottom:[4],right:[4],debug:[4],show:[64],hide:[64]}]]],["ku4-validation",[[1,"ku4-validation",{for:[1],element:[1],pattern:[1],flags:[1],values:[1],checked:[4],method:[1],invalid:[1540],disabled:[1540],hidden:[1540],isValid:[32],validate:[64]}]]]],t)}))};export{defineCustomElements};
@@ -1 +1 @@
1
- import{d as e,N as t,w as s,p as a,b as o}from"./p-c4cf99d8.js";(()=>{const o=Array.from(e.querySelectorAll("script")).find((e=>new RegExp(`/${t}(\\.esm)?\\.js($|\\?|#)`).test(e.src)||e.getAttribute("data-stencil-namespace")===t)),d={};return"onbeforeload"in o&&!history.scrollRestoration?{then(){}}:(d.resourcesUrl=new URL(".",new URL(o.getAttribute("data-resources-url")||o.src,s.location.href)).href,a(d))})().then((e=>o([["p-c5027727",[[1,"ku4-carousel",{swipeTolerance:[2,"swipe-tolerance"],auto:[4],noSwipe:[4,"no-swipe"],delay:[2],slideState:[32],next:[64],previous:[64],slideTo:[64],pause:[64],play:[64]}]]],["p-7f993bf6",[[1,"ku4-carousel-controls",{for:[1]}]]],["p-ef15df08",[[1,"ku4-carousel-slide",{active:[32],classList:[32],slideIn:[64],slideOut:[64],activate:[64],deactivate:[64]}]]],["p-7d8bdc7c",[[1,"ku4-col",{startXs:[2,"start-xs"],startSm:[2,"start-sm"],startMd:[2,"start-md"],startLg:[2,"start-lg"],spanXs:[2,"span-xs"],spanSm:[2,"span-sm"],spanMd:[2,"span-md"],spanLg:[2,"span-lg"],orderXs:[2,"order-xs"],orderSm:[2,"order-sm"],orderMd:[2,"order-md"],orderLg:[2,"order-lg"]}]]],["p-427c9b42",[[1,"ku4-drawer",{bottom:[516],left:[516],right:[516],top:[516],size:[1],open:[1540],toggle:[64]}]]],["p-1159d944",[[1,"ku4-feature",{on:[4],policy:[1],enabled:[32]}]]],["p-d587f83c",[[1,"ku4-focus-trap",{active:[1540],include:[1],exclude:[1],excludeShadow:[1,"exclude-shadow"],initial:[1],return:[1],activate:[64],deactivate:[64]}]]],["p-49cffed7",[[4,"ku4-form",{invalid:[1540],validate:[64],invalidate:[64],read:[64],write:[64]}]]],["p-67b6fa5d",[[1,"ku4-grid",{columnsXs:[2,"columns-xs"],columnsSm:[2,"columns-sm"],columnsMd:[2,"columns-md"],columnsLg:[2,"columns-lg"],offsetLeftXs:[2,"offset-left-xs"],offsetLeftSm:[2,"offset-left-sm"],offsetLeftMd:[2,"offset-left-md"],offsetLeftLg:[2,"offset-left-lg"],offsetRight:[2,"offset-right"],offsetRightXs:[2,"offset-right-xs"],offsetRightSm:[2,"offset-right-sm"],offsetRightMd:[2,"offset-right-md"],offsetRightLg:[2,"offset-right-lg"],offsetXs:[2,"offset-xs"],offsetSm:[2,"offset-sm"],offsetMd:[2,"offset-md"],offsetLg:[2,"offset-lg"]}]]],["p-877dcd7e",[[1,"ku4-label",{for:[1],value:[1],empty:[32]}]]],["p-e737181b",[[1,"ku4-mask",{for:[1],template:[1],ban:[1],pattern:[1],char:[1],hidden:[4]}]]],["p-439260fd",[[1,"ku4-modal",{visible:[1540],focusTrap:[1,"focus-trap"],display:[64],dismiss:[64]},[[8,"keyup","handleKeyUp"]]]]],["p-672c7fcf",[[1,"ku4-panel",{open:[1540],maxHeight:[32],toggle:[64],close:[64]},[[0,"transitionend","handleTransitionEnd"]]]]],["p-9d5ed8ad",[[1,"ku4-preview",{for:[1],src:[1],orientation:[2],resolutionX:[2,"resolution-x"],resolutionY:[2,"resolution-y"],capture:[1],status:[1537],alt:[1],currentSrc:[32],read:[64]}]]],["p-71e8a6a7",[[1,"ku4-tab",{selected:[1540],panel:[32],select:[64],deselect:[64],connect:[64]},[[0,"click","handleClick"],[0,"keyup","handleKeyUp"]]]]],["p-499c1d7b",[[1,"ku4-tab-list",{open:[64]},[[0,"ku4TabClick","handleHpTabClick"],[0,"ku4TabKeyup","handleHpTabKeyUp"]]]]],["p-70416bfc",[[1,"ku4-tab-panel",{selected:[1540],maxHeight:[32],tab:[32],select:[64],deselect:[64],connect:[64]},[[0,"transitionend","handleTransitionEnd"]]]]],["p-9def145d",[[4,"ku4-table",{stackXs:[1537,"stack-xs"],stackSm:[1537,"stack-sm"]}]]],["p-d92776d8",[[1,"ku4-tooltip",{element:[1],top:[4],left:[4],bottom:[4],right:[4],debug:[4],show:[64],hide:[64]}]]],["p-df5ad595",[[1,"ku4-validation",{for:[1],element:[1],pattern:[1],flags:[1],values:[1],method:[1],invalid:[1540],disabled:[1540],isValid:[32],validate:[64]}]]]],e)));
1
+ import{d as e,N as t,w as s,p as a,b as o}from"./p-c4cf99d8.js";(()=>{const o=Array.from(e.querySelectorAll("script")).find((e=>new RegExp(`/${t}(\\.esm)?\\.js($|\\?|#)`).test(e.src)||e.getAttribute("data-stencil-namespace")===t)),d={};return"onbeforeload"in o&&!history.scrollRestoration?{then(){}}:(d.resourcesUrl=new URL(".",new URL(o.getAttribute("data-resources-url")||o.src,s.location.href)).href,a(d))})().then((e=>o([["p-c5027727",[[1,"ku4-carousel",{swipeTolerance:[2,"swipe-tolerance"],auto:[4],noSwipe:[4,"no-swipe"],delay:[2],slideState:[32],next:[64],previous:[64],slideTo:[64],pause:[64],play:[64]}]]],["p-ed89c024",[[1,"ku4-carousel-controls",{for:[1]}]]],["p-ef15df08",[[1,"ku4-carousel-slide",{active:[32],classList:[32],slideIn:[64],slideOut:[64],activate:[64],deactivate:[64]}]]],["p-7d8bdc7c",[[1,"ku4-col",{startXs:[2,"start-xs"],startSm:[2,"start-sm"],startMd:[2,"start-md"],startLg:[2,"start-lg"],spanXs:[2,"span-xs"],spanSm:[2,"span-sm"],spanMd:[2,"span-md"],spanLg:[2,"span-lg"],orderXs:[2,"order-xs"],orderSm:[2,"order-sm"],orderMd:[2,"order-md"],orderLg:[2,"order-lg"]}]]],["p-427c9b42",[[1,"ku4-drawer",{bottom:[516],left:[516],right:[516],top:[516],size:[1],open:[1540],toggle:[64]}]]],["p-1159d944",[[1,"ku4-feature",{on:[4],policy:[1],enabled:[32]}]]],["p-d587f83c",[[1,"ku4-focus-trap",{active:[1540],include:[1],exclude:[1],excludeShadow:[1,"exclude-shadow"],initial:[1],return:[1],activate:[64],deactivate:[64]}]]],["p-49cffed7",[[4,"ku4-form",{invalid:[1540],validate:[64],invalidate:[64],read:[64],write:[64]}]]],["p-67b6fa5d",[[1,"ku4-grid",{columnsXs:[2,"columns-xs"],columnsSm:[2,"columns-sm"],columnsMd:[2,"columns-md"],columnsLg:[2,"columns-lg"],offsetLeftXs:[2,"offset-left-xs"],offsetLeftSm:[2,"offset-left-sm"],offsetLeftMd:[2,"offset-left-md"],offsetLeftLg:[2,"offset-left-lg"],offsetRight:[2,"offset-right"],offsetRightXs:[2,"offset-right-xs"],offsetRightSm:[2,"offset-right-sm"],offsetRightMd:[2,"offset-right-md"],offsetRightLg:[2,"offset-right-lg"],offsetXs:[2,"offset-xs"],offsetSm:[2,"offset-sm"],offsetMd:[2,"offset-md"],offsetLg:[2,"offset-lg"]}]]],["p-877dcd7e",[[1,"ku4-label",{for:[1],value:[1],empty:[32]}]]],["p-0097c412",[[1,"ku4-mask",{for:[1],template:[1],ban:[1],pattern:[1],char:[1],hidden:[4]}]]],["p-439260fd",[[1,"ku4-modal",{visible:[1540],focusTrap:[1,"focus-trap"],display:[64],dismiss:[64]},[[8,"keyup","handleKeyUp"]]]]],["p-672c7fcf",[[1,"ku4-panel",{open:[1540],maxHeight:[32],toggle:[64],close:[64]},[[0,"transitionend","handleTransitionEnd"]]]]],["p-9d5ed8ad",[[1,"ku4-preview",{for:[1],src:[1],orientation:[2],resolutionX:[2,"resolution-x"],resolutionY:[2,"resolution-y"],capture:[1],status:[1537],alt:[1],currentSrc:[32],read:[64]}]]],["p-71e8a6a7",[[1,"ku4-tab",{selected:[1540],panel:[32],select:[64],deselect:[64],connect:[64]},[[0,"click","handleClick"],[0,"keyup","handleKeyUp"]]]]],["p-499c1d7b",[[1,"ku4-tab-list",{open:[64]},[[0,"ku4TabClick","handleHpTabClick"],[0,"ku4TabKeyup","handleHpTabKeyUp"]]]]],["p-70416bfc",[[1,"ku4-tab-panel",{selected:[1540],maxHeight:[32],tab:[32],select:[64],deselect:[64],connect:[64]},[[0,"transitionend","handleTransitionEnd"]]]]],["p-9def145d",[[4,"ku4-table",{stackXs:[1537,"stack-xs"],stackSm:[1537,"stack-sm"]}]]],["p-d92776d8",[[1,"ku4-tooltip",{element:[1],top:[4],left:[4],bottom:[4],right:[4],debug:[4],show:[64],hide:[64]}]]],["p-6ac96851",[[1,"ku4-validation",{for:[1],element:[1],pattern:[1],flags:[1],values:[1],checked:[4],method:[1],invalid:[1540],disabled:[1540],hidden:[1540],isValid:[32],validate:[64]}]]]],e)));
@@ -0,0 +1 @@
1
+ import{r as t,h as s}from"./p-c4cf99d8.js";import{a as i,Y as e,t as h}from"./p-c1068ffa.js";let n=class{constructor(s){t(this,s),this.charIndexes=[],this.reverseCharIndexes=[],this.previousValue="",this.currentValue="",this.touchStart=!1,this.template="",this.ban="",this.pattern="",this.char="_",this.hidden=!1,this.handleFocus=this.handleFocus.bind(this),this.handleBlur=this.handleBlur.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleInput=this.handleInput.bind(this),this.handleTouchStart=this.handleTouchStart.bind(this),this.init()}init(){this.chars=this.char&&new RegExp(this.char),this.banned=this.ban&&new RegExp(this.ban);const t=this.pattern.replace(/[\s\n]/gm,"");return this.patterns=t.substr(1).split(t[0]).map((t=>{try{return t&&new RegExp(t)||null}catch(s){}})),this.charIndexes=this.template.split("").reduce(((t,s,i)=>(this.chars.test(s)&&t.push(i),t)),[]),this.reverseCharIndexes=[...this.charIndexes].reverse(),this}templateHandler(t,s){const{input:e,previousCharIndex:h,previousValue:n,currentValue:r,value:a,char:o}=this,c=i.unmask(n,s,o).length<i.unmask(r,s,o).length?h+1:h;this.init().value=i.mask(i.unmask(a,s,o),t,o),e.setSelectionRange(c,c)}charHandler(t,s){const{value:e,template:h}=this;this.init().value=i.mask(i.unmask(e,h,s),h,t)}get previousCharIndex(){return this.reverseCharIndexes.find((t=>this.selectionStart>t))||this.charIndexes[0]}get value(){return this.currentValue}set value(t){const{chars:s,hidden:i,input:e}=this,h=t.search(s);this.currentValue=t,e.value=i&&h>-1?t.substring(0,h):t}handleTouchStart(){this.touchStart=!0}handleFocus(){if(window.document.documentMode)return;const{input:t,template:s,char:h,chars:n,touchStart:r}=this;this.value=i.mask(i.unmask(this.value,s,h),s,h),e(0).then((()=>{const s=t.value.search(n),i=s<0?t.value.length:s;this.input.setSelectionRange(s<0&&!r?0:i,i),this.touchStart=!1}))}handleBlur(){const{template:t,char:s}=this;h.isEmpty(i.unmask(this.value,t,s))&&(this.value="")}handleKeyDown(t){if(window.document.documentMode)return;const{banned:s,hidden:e,template:h,char:n}=this;t.key&&1===t.key.length&&s&&s.test(t.key)&&!(t.altKey||t.ctrlKey||t.metaKey)&&t.preventDefault(),this.previousValue=e?i.mask(i.unmask(t.target.value,h,n),h,n):t.target.value,this.selectionStart=t.target.selectionStart,this.selectionEnd=t.target.selectionEnd}handleInput(t){if(window.document.documentMode)return;const{input:s,template:e,char:n,chars:r,previousValue:a,banned:o,selectionStart:c,selectionEnd:l,previousCharIndex:u,patterns:d,charIndexes:p,reverseCharIndexes:f}=this;if(r.test(this.previousValue)||"insertFromPaste"===t.inputType||"deleteContentBackward"===t.inputType||"deleteContentForward"===t.inputType||"deleteByCut"===t.inputType||c!==l){if("insertFromPaste"===t.inputType)try{return navigator.clipboard.readText().then((t=>{const u=t.replace(new RegExp(o,"g"),"");if(h.isNullOrEmpty(u))return this.value=a,void s.setSelectionRange(c,c);if(!o||!o.test(u)){let t=a;if(c<l){const s=f.find((t=>t<=c-1)),h=f.find((t=>t<=l-1)),r=p.findIndex((t=>t===s)),o=p.findIndex((t=>t===h)),u=i.unmask(a,e,n),d=u.substring(0,r+1)+u.substring(o+1,a.length);t=i.mask(d,e,n)}const h=p.find((t=>t>=c)),o=p.findIndex((t=>t===h)),d=i.unmask(t,e,n);t=d.substring(0,o)+u+d.substring(o,a.length),this.value=i.mask(t,e,n);const v=p[o+u.length]||this.value.search(r)||this.value.length;s.setSelectionRange(v,v)}})),this.value=a,void s.setSelectionRange(c,c)}catch(t){return this.value=a,void s.setSelectionRange(c,c)}if("deleteContentBackward"!==t.inputType&&"deleteByCut"!==t.inputType){if("deleteContentForward"===t.inputType){const t=p.find((t=>t>=c)),h=p.findIndex((s=>s===t)),r=i.unmask(a,e,n),o=r.substring(0,h)+r.substring(h+1,a.length);return this.value=i.mask(o,e,n),void s.setSelectionRange(c,c)}if(!(t.altKey||t.ctrlKey||t.metaKey)){if(!t.data)return this.value=a,void s.setSelectionRange(c,c);if(r.test(a.charAt(c))||c===e.length){const h=i.unmask(a,e,n);this.value=i.mask(h+t.data,e,n);const o=this.value.search(r),c=o<0?e.length:o;s.setSelectionRange(c,c);const l=p.findIndex((t=>t>=c));this.validate(t.data,d[l<0?p.length-1:l-1])}else{let h=a;if(c<l){const t=f.find((t=>t<=c-1)),s=f.find((t=>t<=l-1)),r=p.findIndex((s=>s===t)),o=p.findIndex((t=>t===s)),u=i.unmask(a,e,n),d=u.substring(0,r+1)+u.substring(o+1,a.length);h=i.mask(d,e,n)}const r=p.find((t=>t>=c)),o=p.findIndex((t=>t===r)),u=i.unmask(h,e,n);h=u.substring(0,o)+t.data+u.substring(o,a.length);const v=p.find((t=>t>r));this.value=i.mask(h,e,n),s.setSelectionRange(v,v);const m=p.findIndex((t=>t>=v));this.validate(t.data,d[m<0?p.length-1:m-1])}}}else{const t=f.find((t=>t<=c-1)),h=f.find((t=>t<=l-1)),r=p.findIndex((s=>s===t)),o=p.findIndex((t=>t===h)),d=i.unmask(a,e,n);if(r<o){const t=d.substring(0,r+1)+d.substring(o+1,a.length);this.value=i.mask(t,e,n),t&&r>-1?s.setSelectionRange(u+1,u+1):s.setSelectionRange(u,u)}else{const t=d.substring(0,r)+d.substring(o+1,a.length);this.value=i.mask(t,e,n),s.setSelectionRange(u,u)}}}else this.value=a}validate(t,s){const{previousValue:i,input:e,value:n,selectionStart:r}=this;h.exists(s)&&!(s.test(t)||/\(\?[!<=]/.test(s.toString())&&s.test(n))&&(this.value=i,e.setSelectionRange(r,r))}componentWillLoad(){this.input=document.getElementById(this.for),h.exists(this.input)?(this.input.addEventListener("focus",this.handleFocus),this.input.addEventListener("blur",this.handleBlur),this.input.addEventListener("keydown",this.handleKeyDown),this.input.addEventListener("input",this.handleInput),this.input.addEventListener("touchstart",this.handleTouchStart)):console.error("ku4-mask must have a valid `for` referencing target field `id`.")}disconnectedCallback(){this.input&&this.input.removeEventListener&&(this.input.removeEventListener("focus",this.handleFocus),this.input.removeEventListener("blur",this.handleBlur),this.input.removeEventListener("keydown",this.handleKeyDown),this.input.removeEventListener("input",this.handleInput),this.input.removeEventListener("touchstart",this.handleTouchStart))}render(){return s("slot",null)}static get watchers(){return{template:["templateHandler"],char:["charHandler"]}}};n.style=":host{display:none}";export{n as ku4_mask}
@@ -0,0 +1 @@
1
+ var __spreadArray=this&&this.__spreadArray||function(t,e){for(var n=0,r=e.length,i=t.length;n<r;n++,i++)t[i]=e[n];return t};System.register(["./p-0207cb44.system.js","./p-0785fc39.system.js"],(function(t){"use strict";var e,n,r,i,a;return{setters:[function(t){e=t.r;n=t.h},function(t){r=t.a;i=t.Y;a=t.t}],execute:function(){var s=":host{display:none}";var u=t("ku4_mask",function(){function t(t){e(this,t);this.charIndexes=[];this.reverseCharIndexes=[];this.previousValue="";this.currentValue="";this.touchStart=false;this.template="";this.ban="";this.pattern="";this.char="_";this.hidden=false;this.handleFocus=this.handleFocus.bind(this);this.handleBlur=this.handleBlur.bind(this);this.handleKeyDown=this.handleKeyDown.bind(this);this.handleInput=this.handleInput.bind(this);this.handleTouchStart=this.handleTouchStart.bind(this);this.init()}t.prototype.init=function(){var t=this;this.chars=this.char&&new RegExp(this.char);this.banned=this.ban&&new RegExp(this.ban);var e=this.pattern.replace(/[\s\n]/gm,"");this.patterns=e.substr(1).split(e[0]).map((function(t){try{return t&&new RegExp(t)||null}catch(e){}}));this.charIndexes=this.template.split("").reduce((function(e,n,r){if(t.chars.test(n)){e.push(r)}return e}),[]);this.reverseCharIndexes=__spreadArray([],this.charIndexes).reverse();return this};t.prototype.templateHandler=function(t,e){var n=this,i=n.input,a=n.previousCharIndex,s=n.previousValue,u=n.currentValue,h=n.value,o=n.char;var l=r.unmask(s,e,o).length;var c=r.unmask(u,e,o).length;var d=l<c?a+1:a;this.init().value=r.mask(r.unmask(h,e,o),t,o);i.setSelectionRange(d,d)};t.prototype.charHandler=function(t,e){var n=this,i=n.value,a=n.template;this.init().value=r.mask(r.unmask(i,a,e),a,t)};Object.defineProperty(t.prototype,"previousCharIndex",{get:function(){var t=this;return this.reverseCharIndexes.find((function(e){return t.selectionStart>e}))||this.charIndexes[0]},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"value",{get:function(){return this.currentValue},set:function(t){var e=this,n=e.chars,r=e.hidden,i=e.input;var a=t.search(n);this.currentValue=t;i.value=r&&a>-1?t.substring(0,a):t},enumerable:false,configurable:true});t.prototype.handleTouchStart=function(){this.touchStart=true};t.prototype.handleFocus=function(){var t=this;if(window.document.documentMode){return}var e=this,n=e.input,a=e.template,s=e.char,u=e.chars,h=e.touchStart;this.value=r.mask(r.unmask(this.value,a,s),a,s);i(0).then((function(){var e=n.value.search(u);var r=e<0?n.value.length:e;t.input.setSelectionRange(e<0&&!h?0:r,r);t.touchStart=false}))};t.prototype.handleBlur=function(){var t=this,e=t.template,n=t.char;if(a.isEmpty(r.unmask(this.value,e,n))){this.value=""}};t.prototype.handleKeyDown=function(t){if(window.document.documentMode){return}var e=this,n=e.banned,i=e.hidden,a=e.template,s=e.char;if(t.key&&t.key.length===1&&n&&(n.test(t.key)&&!(t.altKey||t.ctrlKey||t.metaKey))){t.preventDefault()}this.previousValue=i?r.mask(r.unmask(t.target.value,a,s),a,s):t.target.value;this.selectionStart=t.target.selectionStart;this.selectionEnd=t.target.selectionEnd};t.prototype.handleInput=function(t){var e=this;if(window.document.documentMode){return}var n=this,i=n.input,s=n.template,u=n.char,h=n.chars,o=n.previousValue,l=n.banned,c=n.selectionStart,d=n.selectionEnd,v=n.previousCharIndex,p=n.patterns,f=n.charIndexes,g=n.reverseCharIndexes;if(!h.test(this.previousValue)&&t.inputType!=="insertFromPaste"&&t.inputType!=="deleteContentBackward"&&t.inputType!=="deleteContentForward"&&t.inputType!=="deleteByCut"&&c===d){this.value=o;return}if(t.inputType==="insertFromPaste"){try{navigator.clipboard.readText().then((function(t){var n=t.replace(new RegExp(l,"g"),"");if(a.isNullOrEmpty(n)){e.value=o;i.setSelectionRange(c,c);return}if(!l||!l.test(n)){var v=o;if(c<d){var p=g.find((function(t){return t<=c-1}));var m=g.find((function(t){return t<=d-1}));var y=f.findIndex((function(t){return t===p}));var b=f.findIndex((function(t){return t===m}));var k=r.unmask(o,s,u);var x=k.substring(0,y+1)+k.substring(b+1,o.length);v=r.mask(x,s,u)}var S=f.find((function(t){return t>=c}));var I=f.findIndex((function(t){return t===S}));var w=r.unmask(v,s,u);v=w.substring(0,I)+n+w.substring(I,o.length);e.value=r.mask(v,s,u);var E=f[I+n.length]||e.value.search(h)||e.value.length;i.setSelectionRange(E,E)}}));this.value=o;i.setSelectionRange(c,c);return}catch(t){this.value=o;i.setSelectionRange(c,c);return}}if(t.inputType==="deleteContentBackward"||t.inputType==="deleteByCut"){var m=g.find((function(t){return t<=c-1}));var y=g.find((function(t){return t<=d-1}));var b=f.findIndex((function(t){return t===m}));var k=f.findIndex((function(t){return t===y}));var x=r.unmask(o,s,u);if(b<k){var S=x.substring(0,b+1)+x.substring(k+1,o.length);this.value=r.mask(S,s,u);S&&b>-1?i.setSelectionRange(v+1,v+1):i.setSelectionRange(v,v)}else{var S=x.substring(0,b)+x.substring(k+1,o.length);this.value=r.mask(S,s,u);i.setSelectionRange(v,v)}return}if(t.inputType==="deleteContentForward"){var I=f.find((function(t){return t>=c}));var w=f.findIndex((function(t){return t===I}));var x=r.unmask(o,s,u);var S=x.substring(0,w)+x.substring(w+1,o.length);this.value=r.mask(S,s,u);i.setSelectionRange(c,c);return}if(t.altKey||t.ctrlKey||t.metaKey){return}if(!t.data){this.value=o;i.setSelectionRange(c,c);return}if(h.test(o.charAt(c))||c===s.length){var x=r.unmask(o,s,u);this.value=r.mask(x+t.data,s,u);var E=this.value.search(h);var R=E<0?s.length:E;i.setSelectionRange(R,R);var C=f.findIndex((function(t){return t>=R}));var T=C<0?f.length-1:C-1;this.validate(t.data,p[T])}else{var L=o;if(c<d){var K=g.find((function(t){return t<=c-1}));var B=g.find((function(t){return t<=d-1}));var b=f.findIndex((function(t){return t===K}));var k=f.findIndex((function(t){return t===B}));var V=r.unmask(o,s,u);var S=V.substring(0,b+1)+V.substring(k+1,o.length);L=r.mask(S,s,u)}var F=f.find((function(t){return t>=c}));var w=f.findIndex((function(t){return t===F}));var x=r.unmask(L,s,u);L=x.substring(0,w)+t.data+x.substring(w,o.length);var _=f.find((function(t){return t>F}));this.value=r.mask(L,s,u);i.setSelectionRange(_,_);var C=f.findIndex((function(t){return t>=_}));var T=C<0?f.length-1:C-1;this.validate(t.data,p[T])}};t.prototype.validate=function(t,e){var n=this,r=n.previousValue,i=n.input,s=n.value,u=n.selectionStart;if(a.exists(e)&&!(e.test(t)||/\(\?[!<=]/.test(e.toString())&&e.test(s))){this.value=r;i.setSelectionRange(u,u)}};t.prototype.componentWillLoad=function(){this.input=document.getElementById(this.for);if(a.exists(this.input)){this.input.addEventListener("focus",this.handleFocus);this.input.addEventListener("blur",this.handleBlur);this.input.addEventListener("keydown",this.handleKeyDown);this.input.addEventListener("input",this.handleInput);this.input.addEventListener("touchstart",this.handleTouchStart)}else{console.error("ku4-mask must have a valid `for` referencing target field `id`.")}};t.prototype.disconnectedCallback=function(){if(this.input&&this.input.removeEventListener){this.input.removeEventListener("focus",this.handleFocus);this.input.removeEventListener("blur",this.handleBlur);this.input.removeEventListener("keydown",this.handleKeyDown);this.input.removeEventListener("input",this.handleInput);this.input.removeEventListener("touchstart",this.handleTouchStart)}};t.prototype.render=function(){return n("slot",null)};Object.defineProperty(t,"watchers",{get:function(){return{template:["templateHandler"],char:["charHandler"]}},enumerable:false,configurable:true});return t}());u.style=s}}}));
@@ -0,0 +1 @@
1
+ System.register(["./p-0207cb44.system.js","./p-0785fc39.system.js"],(function(e){"use strict";var t,n,r,o;return{setters:[function(e){t=e.r;n=e.h;r=e.g},function(e){o=e.t}],execute:function(){var i=':host{position:relative;display:block}input[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;position:relative;width:20px;height:20px;margin:0;padding:0;border:solid 1px #888;border-radius:50%;-webkit-box-sizing:border-box;box-sizing:border-box;vertical-align:middle}input[type=radio]:checked:after{content:"";position:absolute;top:2px;left:2px;width:14px;height:14px;margin:0;padding:0;border:solid 1px #888;border-radius:50%;-webkit-box-sizing:border-box;box-sizing:border-box;text-align:center;background-color:#333}';var a=e("ku4_carousel_controls",function(){function e(e){t(this,e);this.carousel=document.getElementById(this.for);this.handleSlide=this.handleSlide.bind(this);this.handleChange=this.handleChange.bind(this)}Object.defineProperty(e.prototype,"controls",{get:function(){return[].slice.call(this.host.children)},enumerable:false,configurable:true});e.prototype.handleSlide=function(e){this.controls.forEach((function(e){e.removeAttribute("current");e.checked=false}));try{var t=this.controls[e.detail-1];t.setAttribute("current",e.detail);t.checked=true}catch(e){}};e.prototype.handleChange=function(e){var t=this,n=t.carousel,r=t.controls;var o=parseInt(e.target.getAttribute("slide"));var i=isNaN(o)?r.indexOf(e.target)+1:o;n.slideTo(i);try{e.target.setAttribute("current",i)}catch(e){}};e.prototype.componentWillLoad=function(){var e=this;var t=this,n=t.carousel,r=t.controls;try{n.addEventListener("slide",this.handleSlide);r.forEach((function(t,n){if(n===0){t.setAttribute("current",n+1)}if(t.nodeName==="INPUT"){t.addEventListener("change",e.handleChange)}else{t.addEventListener("keyup",e.handleChange);t.addEventListener("mouseup",e.handleChange)}}))}catch(i){if(!o.exists(n)){throw new ReferenceError("ku4-carousel-controls must connect to a ku4-carousel.")}}};e.prototype.disconnectedCallback=function(){var e=this;var t=this,n=t.carousel,r=t.controls;n.removeEventListener("slide",this.handleSlide);r.forEach((function(t){t.removeEventListener("change",e.handleChange);t.removeEventListener("keyup",e.handleChange);t.removeEventListener("mouseup",e.handleChange)}))};e.prototype.render=function(){return n("slot",null)};Object.defineProperty(e.prototype,"host",{get:function(){return r(this)},enumerable:false,configurable:true});return e}());a.style=i}}}));
@@ -0,0 +1 @@
1
+ import{r as i,c as t,h as s,H as h,g as e}from"./p-c4cf99d8.js";import{t as n,R as a,Y as r}from"./p-c1068ffa.js";let d=class{constructor(s){i(this,s),this.didValidate=t(this,"validate",7),this.pattern=".*",this.flags="",this.method="";const h=this.pattern.split(" "),e=this.flags.split(" "),a=this.method.trim();this.regex=h.map(((i,t)=>new RegExp(i,e[t]))),this.validationMethod=n.isNullOrEmpty(a)?()=>!0:new Function("value",/^return/.test(a)?a:`return ${a}`),this.handleInput=this.handleInput.bind(this),this.handleChange=this.handleChange.bind(this),this.handleBlur=this.handleBlur.bind(this),this.handleReset=this.handleReset.bind(this)}async validate(){return this.assert()}handleInput(){("file"===this.input.type||n.isFalse(this.isValid))&&this.assert()}handleChange(){("file"===this.input.type||n.isFalse(this.isValid))&&this.assert()}handleBlur(){this.assert()}handleReset(){this.isValid=!0,this.invalid=!this.isValid,this.input.setAttribute("aria-invalid",this.invalid)}assert(){const{ele:i,validOptions:t,input:s,regex:h,checked:e}=this;if("file"===s.type&&n.isNullOrEmpty(s.value))return;const a=this.isValid;var r,d,l,o;return this.isValid=!!this.disabled||(n.isBool(e)?s.checked===e:(r=h,d=s.value,o=i,((l=t)?l.some((i=>i===d))&&r.every((i=>i.test(d))):o?o.value===d&&r.every((i=>i.test(d))):r.every((i=>i.test(d))))&&this.validationMethod(s.value))),this.invalid=!this.isValid,s.setAttribute("aria-invalid",this.invalid),n.isFalse(a)&&this.isValid&&this.didValidate.emit(this.isValid),this.isValid}componentWillLoad(){if(this.input=document.getElementById(this.for),n.exists(this.input)){this.ele=document.getElementById(this.element)||document.querySelector(this.element),this.validOptions=n.exists(this.values)?this.values.split(","):this.ele&&"DATALIST"===this.ele.nodeName&&[].slice.call(this.ele.querySelectorAll("option")).map((i=>i.value));const i=this.input.getAttribute("aria-describedby"),t=this.host.getAttribute("id")||a.uid();this.host.setAttribute("id",t),n.isNullOrEmpty(i)&&this.input.setAttribute("aria-describedby",t),r(0).then((()=>{this.input.addEventListener("input",this.handleInput),this.input.addEventListener("change",this.handleChange),this.input.addEventListener("blur",this.handleBlur)})),n.isFunction(this.host.closest)&&(this.form=this.host.closest("form"),this.form&&this.form.addEventListener&&this.form.addEventListener("reset",this.handleReset))}else console.error("ku4-validation must have a valid `for` referencing target field `id`.")}disconnectedCallback(){this.input&&this.input.removeEventListener&&(this.input.removeEventListener("input",this.handleInput),this.input.removeEventListener("change",this.handleChange),this.input.removeEventListener("blur",this.handleBlur)),this.form&&this.form.removeEventListener&&this.form.removeEventListener("reset",this.handleReset)}render(){return s(h,{role:"alert","aria-live":"assertive"},s("slot",null))}get host(){return e(this)}};d.style=":host{visibility:hidden !important}:host([invalid]){visibility:visible !important}:host([disabled]){visibility:hidden !important}:host([invalid][disabled]){visibility:hidden !important}:host([invalid][hidden]){visibility:hidden !important}";export{d as ku4_validation}
@@ -1 +1 @@
1
- System.register(["./p-0207cb44.system.js"],(function(){"use strict";var e,t,s,a,o;return{setters:[function(r){e=r.d;t=r.N;s=r.w;a=r.p;o=r.b}],execute:function(){var r=function(){var o=Array.from(e.querySelectorAll("script")).find((function(e){return new RegExp("/"+t+"(\\.esm)?\\.js($|\\?|#)").test(e.src)||e.getAttribute("data-stencil-namespace")===t}));var r={};if("onbeforeload"in o&&!history.scrollRestoration){return{then:function(){}}}{r.resourcesUrl=new URL(".",new URL(o.getAttribute("data-resources-url")||o.src,s.location.href)).href}return a(r)};r().then((function(e){return o([["p-361a6c0c.system",[[1,"ku4-carousel",{swipeTolerance:[2,"swipe-tolerance"],auto:[4],noSwipe:[4,"no-swipe"],delay:[2],slideState:[32],next:[64],previous:[64],slideTo:[64],pause:[64],play:[64]}]]],["p-66215fa8.system",[[1,"ku4-carousel-controls",{for:[1]}]]],["p-b498029c.system",[[1,"ku4-carousel-slide",{active:[32],classList:[32],slideIn:[64],slideOut:[64],activate:[64],deactivate:[64]}]]],["p-65c78087.system",[[1,"ku4-col",{startXs:[2,"start-xs"],startSm:[2,"start-sm"],startMd:[2,"start-md"],startLg:[2,"start-lg"],spanXs:[2,"span-xs"],spanSm:[2,"span-sm"],spanMd:[2,"span-md"],spanLg:[2,"span-lg"],orderXs:[2,"order-xs"],orderSm:[2,"order-sm"],orderMd:[2,"order-md"],orderLg:[2,"order-lg"]}]]],["p-47373702.system",[[1,"ku4-drawer",{bottom:[516],left:[516],right:[516],top:[516],size:[1],open:[1540],toggle:[64]}]]],["p-0eaea039.system",[[1,"ku4-feature",{on:[4],policy:[1],enabled:[32]}]]],["p-9100e5d3.system",[[1,"ku4-focus-trap",{active:[1540],include:[1],exclude:[1],excludeShadow:[1,"exclude-shadow"],initial:[1],return:[1],activate:[64],deactivate:[64]}]]],["p-93972ad5.system",[[4,"ku4-form",{invalid:[1540],validate:[64],invalidate:[64],read:[64],write:[64]}]]],["p-a76949aa.system",[[1,"ku4-grid",{columnsXs:[2,"columns-xs"],columnsSm:[2,"columns-sm"],columnsMd:[2,"columns-md"],columnsLg:[2,"columns-lg"],offsetLeftXs:[2,"offset-left-xs"],offsetLeftSm:[2,"offset-left-sm"],offsetLeftMd:[2,"offset-left-md"],offsetLeftLg:[2,"offset-left-lg"],offsetRight:[2,"offset-right"],offsetRightXs:[2,"offset-right-xs"],offsetRightSm:[2,"offset-right-sm"],offsetRightMd:[2,"offset-right-md"],offsetRightLg:[2,"offset-right-lg"],offsetXs:[2,"offset-xs"],offsetSm:[2,"offset-sm"],offsetMd:[2,"offset-md"],offsetLg:[2,"offset-lg"]}]]],["p-d8a87f87.system",[[1,"ku4-label",{for:[1],value:[1],empty:[32]}]]],["p-08ecff99.system",[[1,"ku4-mask",{for:[1],template:[1],ban:[1],pattern:[1],char:[1],hidden:[4]}]]],["p-8480fc4b.system",[[1,"ku4-modal",{visible:[1540],focusTrap:[1,"focus-trap"],display:[64],dismiss:[64]},[[8,"keyup","handleKeyUp"]]]]],["p-b5dd0acc.system",[[1,"ku4-panel",{open:[1540],maxHeight:[32],toggle:[64],close:[64]},[[0,"transitionend","handleTransitionEnd"]]]]],["p-ff344008.system",[[1,"ku4-preview",{for:[1],src:[1],orientation:[2],resolutionX:[2,"resolution-x"],resolutionY:[2,"resolution-y"],capture:[1],status:[1537],alt:[1],currentSrc:[32],read:[64]}]]],["p-87f49411.system",[[1,"ku4-tab",{selected:[1540],panel:[32],select:[64],deselect:[64],connect:[64]},[[0,"click","handleClick"],[0,"keyup","handleKeyUp"]]]]],["p-4eba8303.system",[[1,"ku4-tab-list",{open:[64]},[[0,"ku4TabClick","handleHpTabClick"],[0,"ku4TabKeyup","handleHpTabKeyUp"]]]]],["p-9ab5c68b.system",[[1,"ku4-tab-panel",{selected:[1540],maxHeight:[32],tab:[32],select:[64],deselect:[64],connect:[64]},[[0,"transitionend","handleTransitionEnd"]]]]],["p-9c0e57e7.system",[[4,"ku4-table",{stackXs:[1537,"stack-xs"],stackSm:[1537,"stack-sm"]}]]],["p-6baef622.system",[[1,"ku4-tooltip",{element:[1],top:[4],left:[4],bottom:[4],right:[4],debug:[4],show:[64],hide:[64]}]]],["p-2e3f9824.system",[[1,"ku4-validation",{for:[1],element:[1],pattern:[1],flags:[1],values:[1],method:[1],invalid:[1540],disabled:[1540],isValid:[32],validate:[64]}]]]],e)}))}}}));
1
+ System.register(["./p-0207cb44.system.js"],(function(){"use strict";var e,t,s,a,o;return{setters:[function(r){e=r.d;t=r.N;s=r.w;a=r.p;o=r.b}],execute:function(){var r=function(){var o=Array.from(e.querySelectorAll("script")).find((function(e){return new RegExp("/"+t+"(\\.esm)?\\.js($|\\?|#)").test(e.src)||e.getAttribute("data-stencil-namespace")===t}));var r={};if("onbeforeload"in o&&!history.scrollRestoration){return{then:function(){}}}{r.resourcesUrl=new URL(".",new URL(o.getAttribute("data-resources-url")||o.src,s.location.href)).href}return a(r)};r().then((function(e){return o([["p-361a6c0c.system",[[1,"ku4-carousel",{swipeTolerance:[2,"swipe-tolerance"],auto:[4],noSwipe:[4,"no-swipe"],delay:[2],slideState:[32],next:[64],previous:[64],slideTo:[64],pause:[64],play:[64]}]]],["p-276972a6.system",[[1,"ku4-carousel-controls",{for:[1]}]]],["p-b498029c.system",[[1,"ku4-carousel-slide",{active:[32],classList:[32],slideIn:[64],slideOut:[64],activate:[64],deactivate:[64]}]]],["p-65c78087.system",[[1,"ku4-col",{startXs:[2,"start-xs"],startSm:[2,"start-sm"],startMd:[2,"start-md"],startLg:[2,"start-lg"],spanXs:[2,"span-xs"],spanSm:[2,"span-sm"],spanMd:[2,"span-md"],spanLg:[2,"span-lg"],orderXs:[2,"order-xs"],orderSm:[2,"order-sm"],orderMd:[2,"order-md"],orderLg:[2,"order-lg"]}]]],["p-47373702.system",[[1,"ku4-drawer",{bottom:[516],left:[516],right:[516],top:[516],size:[1],open:[1540],toggle:[64]}]]],["p-0eaea039.system",[[1,"ku4-feature",{on:[4],policy:[1],enabled:[32]}]]],["p-9100e5d3.system",[[1,"ku4-focus-trap",{active:[1540],include:[1],exclude:[1],excludeShadow:[1,"exclude-shadow"],initial:[1],return:[1],activate:[64],deactivate:[64]}]]],["p-93972ad5.system",[[4,"ku4-form",{invalid:[1540],validate:[64],invalidate:[64],read:[64],write:[64]}]]],["p-a76949aa.system",[[1,"ku4-grid",{columnsXs:[2,"columns-xs"],columnsSm:[2,"columns-sm"],columnsMd:[2,"columns-md"],columnsLg:[2,"columns-lg"],offsetLeftXs:[2,"offset-left-xs"],offsetLeftSm:[2,"offset-left-sm"],offsetLeftMd:[2,"offset-left-md"],offsetLeftLg:[2,"offset-left-lg"],offsetRight:[2,"offset-right"],offsetRightXs:[2,"offset-right-xs"],offsetRightSm:[2,"offset-right-sm"],offsetRightMd:[2,"offset-right-md"],offsetRightLg:[2,"offset-right-lg"],offsetXs:[2,"offset-xs"],offsetSm:[2,"offset-sm"],offsetMd:[2,"offset-md"],offsetLg:[2,"offset-lg"]}]]],["p-d8a87f87.system",[[1,"ku4-label",{for:[1],value:[1],empty:[32]}]]],["p-0d977a97.system",[[1,"ku4-mask",{for:[1],template:[1],ban:[1],pattern:[1],char:[1],hidden:[4]}]]],["p-8480fc4b.system",[[1,"ku4-modal",{visible:[1540],focusTrap:[1,"focus-trap"],display:[64],dismiss:[64]},[[8,"keyup","handleKeyUp"]]]]],["p-b5dd0acc.system",[[1,"ku4-panel",{open:[1540],maxHeight:[32],toggle:[64],close:[64]},[[0,"transitionend","handleTransitionEnd"]]]]],["p-ff344008.system",[[1,"ku4-preview",{for:[1],src:[1],orientation:[2],resolutionX:[2,"resolution-x"],resolutionY:[2,"resolution-y"],capture:[1],status:[1537],alt:[1],currentSrc:[32],read:[64]}]]],["p-87f49411.system",[[1,"ku4-tab",{selected:[1540],panel:[32],select:[64],deselect:[64],connect:[64]},[[0,"click","handleClick"],[0,"keyup","handleKeyUp"]]]]],["p-4eba8303.system",[[1,"ku4-tab-list",{open:[64]},[[0,"ku4TabClick","handleHpTabClick"],[0,"ku4TabKeyup","handleHpTabKeyUp"]]]]],["p-9ab5c68b.system",[[1,"ku4-tab-panel",{selected:[1540],maxHeight:[32],tab:[32],select:[64],deselect:[64],connect:[64]},[[0,"transitionend","handleTransitionEnd"]]]]],["p-9c0e57e7.system",[[4,"ku4-table",{stackXs:[1537,"stack-xs"],stackSm:[1537,"stack-sm"]}]]],["p-6baef622.system",[[1,"ku4-tooltip",{element:[1],top:[4],left:[4],bottom:[4],right:[4],debug:[4],show:[64],hide:[64]}]]],["p-9d2053c8.system",[[1,"ku4-validation",{for:[1],element:[1],pattern:[1],flags:[1],values:[1],checked:[4],method:[1],invalid:[1540],disabled:[1540],hidden:[1540],isValid:[32],validate:[64]}]]]],e)}))}}}));
@@ -0,0 +1 @@
1
+ var __awaiter=this&&this.__awaiter||function(t,e,i,n){function s(t){return t instanceof i?t:new i((function(e){e(t)}))}return new(i||(i=Promise))((function(i,r){function a(t){try{o(n.next(t))}catch(e){r(e)}}function l(t){try{o(n["throw"](t))}catch(e){r(e)}}function o(t){t.done?i(t.value):s(t.value).then(a,l)}o((n=n.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var i={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},n,s,r,a;return a={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function l(t){return function(e){return o([t,e])}}function o(a){if(n)throw new TypeError("Generator is already executing.");while(i)try{if(n=1,s&&(r=a[0]&2?s["return"]:a[0]?s["throw"]||((r=s["return"])&&r.call(s),0):s.next)&&!(r=r.call(s,a[1])).done)return r;if(s=0,r)a=[a[0]&2,r.value];switch(a[0]){case 0:case 1:r=a;break;case 4:i.label++;return{value:a[1],done:false};case 5:i.label++;s=a[1];a=[0];continue;case 7:a=i.ops.pop();i.trys.pop();continue;default:if(!(r=i.trys,r=r.length>0&&r[r.length-1])&&(a[0]===6||a[0]===2)){i=0;continue}if(a[0]===3&&(!r||a[1]>r[0]&&a[1]<r[3])){i.label=a[1];break}if(a[0]===6&&i.label<r[1]){i.label=r[1];r=a;break}if(r&&i.label<r[2]){i.label=r[2];i.ops.push(a);break}if(r[2])i.ops.pop();i.trys.pop();continue}a=e.call(t,i)}catch(l){a=[6,l];s=0}finally{n=r=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};System.register(["./p-0207cb44.system.js","./p-0785fc39.system.js"],(function(t){"use strict";var e,i,n,s,r,a,l,o;return{setters:[function(t){e=t.r;i=t.c;n=t.h;s=t.H;r=t.g},function(t){a=t.t;l=t.R;o=t.Y}],execute:function(){var h=function(t,e,i,n){return i?i.some((function(t){return t===e}))&&t.every((function(t){return t.test(e)})):n?n.value===e&&t.every((function(t){return t.test(e)})):t.every((function(t){return t.test(e)}))};var u=":host{visibility:hidden !important}:host([invalid]){visibility:visible !important}:host([disabled]){visibility:hidden !important}:host([invalid][disabled]){visibility:hidden !important}:host([invalid][hidden]){visibility:hidden !important}";var d=t("ku4_validation",function(){function t(t){e(this,t);this.didValidate=i(this,"validate",7);this.pattern=".*";this.flags="";this.method="";var n=this.pattern.split(" ");var s=this.flags.split(" ");var r=this.method.trim();this.regex=n.map((function(t,e){return new RegExp(t,s[e])}));this.validationMethod=a.isNullOrEmpty(r)?function(){return true}:new Function("value",/^return/.test(r)?r:"return "+r);this.handleInput=this.handleInput.bind(this);this.handleChange=this.handleChange.bind(this);this.handleBlur=this.handleBlur.bind(this);this.handleReset=this.handleReset.bind(this)}t.prototype.validate=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.assert()]}))}))};t.prototype.handleInput=function(){(this.input.type==="file"||a.isFalse(this.isValid))&&this.assert()};t.prototype.handleChange=function(){(this.input.type==="file"||a.isFalse(this.isValid))&&this.assert()};t.prototype.handleBlur=function(){this.assert()};t.prototype.handleReset=function(){this.isValid=true;this.invalid=!this.isValid;this.input.setAttribute("aria-invalid",this.invalid)};t.prototype.assert=function(){var t=this,e=t.ele,i=t.validOptions,n=t.input,s=t.regex,r=t.checked;if(n.type==="file"&&a.isNullOrEmpty(n.value)){return}var l=this.isValid;this.isValid=this.disabled?true:a.isBool(r)?n.checked===r:h(s,n.value,i,e)&&this.validationMethod(n.value);this.invalid=!this.isValid;n.setAttribute("aria-invalid",this.invalid);if(a.isFalse(l)&&this.isValid){this.didValidate.emit(this.isValid)}return this.isValid};t.prototype.componentWillLoad=function(){var t=this;this.input=document.getElementById(this.for);if(a.exists(this.input)){this.ele=document.getElementById(this.element)||document.querySelector(this.element);this.validOptions=a.exists(this.values)?this.values.split(","):this.ele&&this.ele.nodeName==="DATALIST"&&[].slice.call(this.ele.querySelectorAll("option")).map((function(t){return t.value}));var e=this.input.getAttribute("aria-describedby");var i=this.host.getAttribute("id")||l.uid();this.host.setAttribute("id",i);if(a.isNullOrEmpty(e)){this.input.setAttribute("aria-describedby",i)}o(0).then((function(){t.input.addEventListener("input",t.handleInput);t.input.addEventListener("change",t.handleChange);t.input.addEventListener("blur",t.handleBlur)}));if(a.isFunction(this.host.closest)){this.form=this.host.closest("form");if(this.form&&this.form.addEventListener){this.form.addEventListener("reset",this.handleReset)}}}else{console.error("ku4-validation must have a valid `for` referencing target field `id`.")}};t.prototype.disconnectedCallback=function(){if(this.input&&this.input.removeEventListener){this.input.removeEventListener("input",this.handleInput);this.input.removeEventListener("change",this.handleChange);this.input.removeEventListener("blur",this.handleBlur)}if(this.form&&this.form.removeEventListener){this.form.removeEventListener("reset",this.handleReset)}};t.prototype.render=function(){return n(s,{role:"alert","aria-live":"assertive"},n("slot",null))};Object.defineProperty(t.prototype,"host",{get:function(){return r(this)},enumerable:false,configurable:true});return t}());d.style=u}}}));
@@ -0,0 +1 @@
1
+ import{r as t,h as e,g as o}from"./p-c4cf99d8.js";import{t as r}from"./p-c1068ffa.js";let i=class{constructor(e){t(this,e),this.carousel=document.getElementById(this.for),this.handleSlide=this.handleSlide.bind(this),this.handleChange=this.handleChange.bind(this)}get controls(){return[].slice.call(this.host.children)}handleSlide(t){this.controls.forEach((t=>{t.removeAttribute("current"),t.checked=!1}));try{const e=this.controls[t.detail-1];e.setAttribute("current",t.detail),e.checked=!0}catch(t){}}handleChange(t){const{carousel:e,controls:o}=this,r=parseInt(t.target.getAttribute("slide")),i=isNaN(r)?o.indexOf(t.target)+1:r;e.slideTo(i);try{t.target.setAttribute("current",i)}catch(t){}}componentWillLoad(){const{carousel:t,controls:e}=this;try{t.addEventListener("slide",this.handleSlide),e.forEach(((t,e)=>{0===e&&t.setAttribute("current",e+1),"INPUT"===t.nodeName?t.addEventListener("change",this.handleChange):(t.addEventListener("keyup",this.handleChange),t.addEventListener("mouseup",this.handleChange))}))}catch(o){if(!r.exists(t))throw new ReferenceError("ku4-carousel-controls must connect to a ku4-carousel.")}}disconnectedCallback(){const{carousel:t,controls:e}=this;t.removeEventListener("slide",this.handleSlide),e.forEach((t=>{t.removeEventListener("change",this.handleChange),t.removeEventListener("keyup",this.handleChange),t.removeEventListener("mouseup",this.handleChange)}))}render(){return e("slot",null)}get host(){return o(this)}};i.style=':host{position:relative;display:block}input[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;position:relative;width:20px;height:20px;margin:0;padding:0;border:solid 1px #888;border-radius:50%;-webkit-box-sizing:border-box;box-sizing:border-box;vertical-align:middle}input[type=radio]:checked:after{content:"";position:absolute;top:2px;left:2px;width:14px;height:14px;margin:0;padding:0;border:solid 1px #888;border-radius:50%;-webkit-box-sizing:border-box;box-sizing:border-box;text-align:center;background-color:#333}';export{i as ku4_carousel_controls}
@@ -52,6 +52,11 @@ export declare class Ku4Validation {
52
52
  * want to be invalid.
53
53
  */
54
54
  readonly values: string;
55
+ /**
56
+ * Boolean value describing is the target field should be checked
57
+ * or unchecked
58
+ */
59
+ readonly checked: boolean;
55
60
  /**
56
61
  * A reference to a named function or a function body that
57
62
  * define a validation criteria and return `true` when the
@@ -72,6 +77,11 @@ export declare class Ku4Validation {
72
77
  * validation to always be valid.
73
78
  */
74
79
  disabled: boolean;
80
+ /**
81
+ * Visibly hides the validation. Useful when wanting to support
82
+ * 503 WCAG validation while allowing different visual decisions.
83
+ */
84
+ hidden: boolean;
75
85
  isValid: boolean;
76
86
  /**
77
87
  * Event fired when this validation changes from
@@ -486,6 +486,10 @@ export namespace Components {
486
486
  "top": boolean;
487
487
  }
488
488
  interface Ku4Validation {
489
+ /**
490
+ * Boolean value describing is the target field should be checked or unchecked
491
+ */
492
+ "checked": boolean;
489
493
  /**
490
494
  * Disables validation when true causing validation to always be valid.
491
495
  */
@@ -502,6 +506,10 @@ export namespace Components {
502
506
  * The value of the id attribute of the field that this is the validation for.
503
507
  */
504
508
  "for": string;
509
+ /**
510
+ * Visibly hides the validation. Useful when wanting to support 503 WCAG validation while allowing different visual decisions.
511
+ */
512
+ "hidden": boolean;
505
513
  /**
506
514
  * Set to true to display as invalid
507
515
  */
@@ -1040,6 +1048,10 @@ declare namespace LocalJSX {
1040
1048
  "top"?: boolean;
1041
1049
  }
1042
1050
  interface Ku4Validation {
1051
+ /**
1052
+ * Boolean value describing is the target field should be checked or unchecked
1053
+ */
1054
+ "checked"?: boolean;
1043
1055
  /**
1044
1056
  * Disables validation when true causing validation to always be valid.
1045
1057
  */
@@ -1056,6 +1068,10 @@ declare namespace LocalJSX {
1056
1068
  * The value of the id attribute of the field that this is the validation for.
1057
1069
  */
1058
1070
  "for"?: string;
1071
+ /**
1072
+ * Visibly hides the validation. Useful when wanting to support 503 WCAG validation while allowing different visual decisions.
1073
+ */
1074
+ "hidden"?: boolean;
1059
1075
  /**
1060
1076
  * Set to true to display as invalid
1061
1077
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ku4web-components",
3
- "version": "6.4.44",
3
+ "version": "6.4.50",
4
4
  "description": "kodmunki™ Web Components",
5
5
  "main": "./dist/index.cjs.js",
6
6
  "module": "./dist/index.js",
@@ -1 +0,0 @@
1
- var __spreadArray=this&&this.__spreadArray||function(t,e){for(var n=0,r=e.length,i=t.length;n<r;n++,i++)t[i]=e[n];return t};System.register(["./p-0207cb44.system.js","./p-0785fc39.system.js"],(function(t){"use strict";var e,n,r,i,a;return{setters:[function(t){e=t.r;n=t.h},function(t){r=t.a;i=t.Y;a=t.t}],execute:function(){var s=":host{display:none}";var u=t("ku4_mask",function(){function t(t){e(this,t);this.charIndexes=[];this.reverseCharIndexes=[];this.previousValue="";this.currentValue="";this.touchStart=false;this.template="";this.ban="";this.pattern="";this.char="_";this.hidden=false;this.handleFocus=this.handleFocus.bind(this);this.handleBlur=this.handleBlur.bind(this);this.handleKeyDown=this.handleKeyDown.bind(this);this.handleInput=this.handleInput.bind(this);this.handleTouchStart=this.handleTouchStart.bind(this);this.init()}t.prototype.init=function(){var t=this;this.chars=this.char&&new RegExp(this.char);this.banned=this.ban&&new RegExp(this.ban);var e=this.pattern.replace(/[\s\n]/gm,"");this.patterns=e.substr(1).split(e[0]).map((function(t){try{return t&&new RegExp(t)||null}catch(e){}}));this.charIndexes=this.template.split("").reduce((function(e,n,r){if(t.chars.test(n)){e.push(r)}return e}),[]);this.reverseCharIndexes=__spreadArray([],this.charIndexes).reverse();return this};t.prototype.templateHandler=function(t,e){var n=this,i=n.input,a=n.previousCharIndex,s=n.previousValue,u=n.currentValue,h=n.value,o=n.char;var l=r.unmask(s,e,o).length;var c=r.unmask(u,e,o).length;var d=l<c?a+1:a;this.init().value=r.mask(r.unmask(h,e,o),t,o);i.setSelectionRange(d,d)};t.prototype.charHandler=function(t,e){var n=this,i=n.value,a=n.template;this.init().value=r.mask(r.unmask(i,a,e),a,t)};Object.defineProperty(t.prototype,"previousCharIndex",{get:function(){var t=this;return this.reverseCharIndexes.find((function(e){return t.selectionStart>e}))||this.charIndexes[0]},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"value",{get:function(){return this.currentValue},set:function(t){var e=this,n=e.chars,r=e.hidden,i=e.input;var a=t.search(n);this.currentValue=t;i.value=r&&a>-1?t.substring(0,a):t},enumerable:false,configurable:true});t.prototype.handleTouchStart=function(){this.touchStart=true};t.prototype.handleFocus=function(){var t=this;if(window.document.documentMode){return}var e=this,n=e.input,a=e.template,s=e.char,u=e.chars,h=e.touchStart;this.value=r.mask(r.unmask(this.value,a,s),a,s);i(0).then((function(){var e=n.value.search(u);var r=e<0?n.value.length:e;t.input.setSelectionRange(e<0&&!h?0:r,r);t.touchStart=false}))};t.prototype.handleBlur=function(){var t=this,e=t.template,n=t.char;if(a.isEmpty(r.unmask(this.value,e,n))){this.value=""}};t.prototype.handleKeyDown=function(t){if(window.document.documentMode){return}var e=this,n=e.banned,i=e.hidden,a=e.template,s=e.char;if(t.key&&t.key.length===1&&n&&(n.test(t.key)&&!(t.altKey||t.ctrlKey||t.metaKey))){t.preventDefault()}this.previousValue=i?r.mask(r.unmask(t.target.value,a,s),a,s):t.target.value;this.selectionStart=t.target.selectionStart;this.selectionEnd=t.target.selectionEnd};t.prototype.handleInput=function(t){var e=this;if(window.document.documentMode){return}var n=this,i=n.input,s=n.template,u=n.char,h=n.chars,o=n.previousValue,l=n.banned,c=n.selectionStart,d=n.selectionEnd,v=n.previousCharIndex,p=n.patterns,f=n.charIndexes,g=n.reverseCharIndexes;if(!h.test(this.previousValue)&&t.inputType!=="insertFromPaste"&&t.inputType!=="deleteContentBackward"&&t.inputType!=="deleteContentForward"&&c===d){this.value=o;return}if(t.inputType==="insertFromPaste"){try{navigator.clipboard.readText().then((function(t){var n=t.replace(new RegExp(l,"g"),"");if(a.isNullOrEmpty(n)){e.value=o;i.setSelectionRange(c,c);return}if(!l||!l.test(n)){var v=o;if(c<d){var p=g.find((function(t){return t<=c-1}));var m=g.find((function(t){return t<=d-1}));var y=f.findIndex((function(t){return t===p}));var b=f.findIndex((function(t){return t===m}));var k=r.unmask(o,s,u);var x=k.substring(0,y+1)+k.substring(b+1,o.length);v=r.mask(x,s,u)}var S=f.find((function(t){return t>=c}));var I=f.findIndex((function(t){return t===S}));var w=r.unmask(v,s,u);v=w.substring(0,I)+n+w.substring(I,o.length);e.value=r.mask(v,s,u);var E=f[I+n.length]||e.value.search(h)||e.value.length;i.setSelectionRange(E,E)}}));this.value=o;i.setSelectionRange(c,c);return}catch(t){this.value=o;i.setSelectionRange(c,c);return}}if(t.inputType==="deleteContentBackward"){var m=g.find((function(t){return t<=c-1}));var y=g.find((function(t){return t<=d-1}));var b=f.findIndex((function(t){return t===m}));var k=f.findIndex((function(t){return t===y}));var x=r.unmask(o,s,u);if(b<k){var S=x.substring(0,b+1)+x.substring(k+1,o.length);this.value=r.mask(S,s,u);S&&b>-1?i.setSelectionRange(v+1,v+1):i.setSelectionRange(v,v)}else{var S=x.substring(0,b)+x.substring(k+1,o.length);this.value=r.mask(S,s,u);i.setSelectionRange(v,v)}return}if(t.inputType==="deleteContentForward"){var I=f.find((function(t){return t>=c}));var w=f.findIndex((function(t){return t===I}));var x=r.unmask(o,s,u);var S=x.substring(0,w)+x.substring(w+1,o.length);this.value=r.mask(S,s,u);i.setSelectionRange(c,c);return}if(t.altKey||t.ctrlKey||t.metaKey){return}if(!t.data){this.value=o;i.setSelectionRange(c,c);return}if(h.test(o.charAt(c))||c===s.length){var x=r.unmask(o,s,u);this.value=r.mask(x+t.data,s,u);var E=this.value.search(h);var R=E<0?s.length:E;i.setSelectionRange(R,R);var C=f.findIndex((function(t){return t>=R}));var L=C<0?f.length-1:C-1;this.validate(t.data,p[L])}else{var T=o;if(c<d){var K=g.find((function(t){return t<=c-1}));var V=g.find((function(t){return t<=d-1}));var b=f.findIndex((function(t){return t===K}));var k=f.findIndex((function(t){return t===V}));var F=r.unmask(o,s,u);var S=F.substring(0,b+1)+F.substring(k+1,o.length);T=r.mask(S,s,u)}var B=f.find((function(t){return t>=c}));var w=f.findIndex((function(t){return t===B}));var x=r.unmask(T,s,u);T=x.substring(0,w)+t.data+x.substring(w,o.length);var _=f.find((function(t){return t>B}));this.value=r.mask(T,s,u);i.setSelectionRange(_,_);var C=f.findIndex((function(t){return t>=_}));var L=C<0?f.length-1:C-1;this.validate(t.data,p[L])}};t.prototype.validate=function(t,e){var n=this,r=n.previousValue,i=n.input,s=n.value,u=n.selectionStart;if(a.exists(e)&&!(e.test(t)||/\(\?[!<=]/.test(e.toString())&&e.test(s))){this.value=r;i.setSelectionRange(u,u)}};t.prototype.componentWillLoad=function(){this.input=document.getElementById(this.for);if(a.exists(this.input)){this.input.addEventListener("focus",this.handleFocus);this.input.addEventListener("blur",this.handleBlur);this.input.addEventListener("keydown",this.handleKeyDown);this.input.addEventListener("input",this.handleInput);this.input.addEventListener("touchstart",this.handleTouchStart)}else{console.error("ku4-mask must have a valid `for` referencing target field `id`.")}};t.prototype.disconnectedCallback=function(){if(this.input&&this.input.removeEventListener){this.input.removeEventListener("focus",this.handleFocus);this.input.removeEventListener("blur",this.handleBlur);this.input.removeEventListener("keydown",this.handleKeyDown);this.input.removeEventListener("input",this.handleInput);this.input.removeEventListener("touchstart",this.handleTouchStart)}};t.prototype.render=function(){return n("slot",null)};Object.defineProperty(t,"watchers",{get:function(){return{template:["templateHandler"],char:["charHandler"]}},enumerable:false,configurable:true});return t}());u.style=s}}}));
@@ -1 +0,0 @@
1
- var __awaiter=this&&this.__awaiter||function(t,e,i,n){function s(t){return t instanceof i?t:new i((function(e){e(t)}))}return new(i||(i=Promise))((function(i,r){function a(t){try{o(n.next(t))}catch(e){r(e)}}function l(t){try{o(n["throw"](t))}catch(e){r(e)}}function o(t){t.done?i(t.value):s(t.value).then(a,l)}o((n=n.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var i={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},n,s,r,a;return a={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function l(t){return function(e){return o([t,e])}}function o(a){if(n)throw new TypeError("Generator is already executing.");while(i)try{if(n=1,s&&(r=a[0]&2?s["return"]:a[0]?s["throw"]||((r=s["return"])&&r.call(s),0):s.next)&&!(r=r.call(s,a[1])).done)return r;if(s=0,r)a=[a[0]&2,r.value];switch(a[0]){case 0:case 1:r=a;break;case 4:i.label++;return{value:a[1],done:false};case 5:i.label++;s=a[1];a=[0];continue;case 7:a=i.ops.pop();i.trys.pop();continue;default:if(!(r=i.trys,r=r.length>0&&r[r.length-1])&&(a[0]===6||a[0]===2)){i=0;continue}if(a[0]===3&&(!r||a[1]>r[0]&&a[1]<r[3])){i.label=a[1];break}if(a[0]===6&&i.label<r[1]){i.label=r[1];r=a;break}if(r&&i.label<r[2]){i.label=r[2];i.ops.push(a);break}if(r[2])i.ops.pop();i.trys.pop();continue}a=e.call(t,i)}catch(l){a=[6,l];s=0}finally{n=r=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};System.register(["./p-0207cb44.system.js","./p-0785fc39.system.js"],(function(t){"use strict";var e,i,n,s,r,a,l,o;return{setters:[function(t){e=t.r;i=t.c;n=t.h;s=t.H;r=t.g},function(t){a=t.t;l=t.R;o=t.Y}],execute:function(){var h=function(t,e,i,n){return i?i.some((function(t){return t===e}))&&t.every((function(t){return t.test(e)})):n?n.value===e&&t.every((function(t){return t.test(e)})):t.every((function(t){return t.test(e)}))};var u=":host{visibility:hidden !important}:host([invalid]){visibility:visible !important}:host([disabled]){visibility:hidden !important}:host([invalid][disabled]){visibility:hidden !important}";var d=t("ku4_validation",function(){function t(t){e(this,t);this.didValidate=i(this,"validate",7);this.pattern=".*";this.flags="";this.method="";var n=this.pattern.split(" ");var s=this.flags.split(" ");var r=this.method.trim();this.regex=n.map((function(t,e){return new RegExp(t,s[e])}));this.validationMethod=a.isNullOrEmpty(r)?function(){return true}:new Function("value",/^return/.test(r)?r:"return "+r);this.handleInput=this.handleInput.bind(this);this.handleChange=this.handleChange.bind(this);this.handleBlur=this.handleBlur.bind(this);this.handleReset=this.handleReset.bind(this)}t.prototype.validate=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.assert()]}))}))};t.prototype.handleInput=function(){(this.input.type==="file"||a.isFalse(this.isValid))&&this.assert()};t.prototype.handleChange=function(){(this.input.type==="file"||a.isFalse(this.isValid))&&this.assert()};t.prototype.handleBlur=function(){this.assert()};t.prototype.handleReset=function(){this.isValid=true;this.invalid=!this.isValid;this.input.setAttribute("aria-invalid",this.invalid)};t.prototype.assert=function(){var t=this,e=t.ele,i=t.validOptions,n=t.input,s=t.regex;if(n.type==="file"&&a.isNullOrEmpty(n.value)){return}var r=this.isValid;this.isValid=this.disabled?true:h(s,n.value,i,e)&&this.validationMethod(n.value);this.invalid=!this.isValid;n.setAttribute("aria-invalid",this.invalid);if(a.isFalse(r)&&this.isValid){this.didValidate.emit(this.isValid)}return this.isValid};t.prototype.componentWillLoad=function(){var t=this;this.input=document.getElementById(this.for);if(a.exists(this.input)){this.ele=document.getElementById(this.element)||document.querySelector(this.element);this.validOptions=a.exists(this.values)?this.values.split(","):this.ele&&this.ele.nodeName==="DATALIST"&&[].slice.call(this.ele.querySelectorAll("option")).map((function(t){return t.value}));var e=this.input.getAttribute("aria-describedby");var i=this.host.getAttribute("id")||l.uid();this.host.setAttribute("id",i);if(a.isNullOrEmpty(e)){this.input.setAttribute("aria-describedby",i)}o(0).then((function(){t.input.addEventListener("input",t.handleInput);t.input.addEventListener("change",t.handleChange);t.input.addEventListener("blur",t.handleBlur)}));if(a.isFunction(this.host.closest)){this.form=this.host.closest("form");if(this.form&&this.form.addEventListener){this.form.addEventListener("reset",this.handleReset)}}}else{console.error("ku4-validation must have a valid `for` referencing target field `id`.")}};t.prototype.disconnectedCallback=function(){if(this.input&&this.input.removeEventListener){this.input.removeEventListener("input",this.handleInput);this.input.removeEventListener("change",this.handleChange);this.input.removeEventListener("blur",this.handleBlur)}if(this.form&&this.form.removeEventListener){this.form.removeEventListener("reset",this.handleReset)}};t.prototype.render=function(){return n(s,{role:"alert","aria-live":"assertive"},n("slot",null))};Object.defineProperty(t.prototype,"host",{get:function(){return r(this)},enumerable:false,configurable:true});return t}());d.style=u}}}));
@@ -1 +0,0 @@
1
- System.register(["./p-0207cb44.system.js","./p-0785fc39.system.js"],(function(e){"use strict";var t,n,r,o;return{setters:[function(e){t=e.r;n=e.h;r=e.g},function(e){o=e.t}],execute:function(){var i=':host{position:relative;display:block}input[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;position:relative;width:20px;height:20px;margin:0;padding:0;border:solid 1px #888;border-radius:50%;-webkit-box-sizing:border-box;box-sizing:border-box;vertical-align:middle}input[type=radio]:checked:after{content:"";position:absolute;top:2px;left:2px;width:14px;height:14px;margin:0;padding:0;border:solid 1px #888;border-radius:50%;-webkit-box-sizing:border-box;box-sizing:border-box;text-align:center;background-color:#333}';var a=e("ku4_carousel_controls",function(){function e(e){t(this,e);this.carousel=document.getElementById(this.for);this.handleSlide=this.handleSlide.bind(this);this.handleChange=this.handleChange.bind(this)}Object.defineProperty(e.prototype,"controls",{get:function(){return[].slice.call(this.host.children)},enumerable:false,configurable:true});e.prototype.handleSlide=function(e){this.controls.forEach((function(e){e.removeAttribute("current");e.checked=false}));var t=this.controls[e.detail-1];t.setAttribute("current",e.detail);t.checked=true};e.prototype.handleChange=function(e){var t=this,n=t.carousel,r=t.controls;var o=parseInt(e.target.getAttribute("slide"));var i=isNaN(o)?r.indexOf(e.target)+1:o;n.slideTo(i);e.target.setAttribute("current",i)};e.prototype.componentWillLoad=function(){var e=this;var t=this,n=t.carousel,r=t.controls;try{n.addEventListener("slide",this.handleSlide);r.forEach((function(t,n){if(n===0){t.setAttribute("current",n+1)}if(t.nodeName==="INPUT"){t.addEventListener("change",e.handleChange)}else{t.addEventListener("keyup",e.handleChange);t.addEventListener("mouseup",e.handleChange)}}))}catch(i){if(!o.exists(n)){throw new ReferenceError("ku4-carousel-controls must connect to a ku4-carousel.")}}};e.prototype.disconnectedCallback=function(){var e=this;var t=this,n=t.carousel,r=t.controls;n.removeEventListener("slide",this.handleSlide);r.forEach((function(t){t.removeEventListener("change",e.handleChange);t.removeEventListener("keyup",e.handleChange);t.removeEventListener("mouseup",e.handleChange)}))};e.prototype.render=function(){return n("slot",null)};Object.defineProperty(e.prototype,"host",{get:function(){return r(this)},enumerable:false,configurable:true});return e}());a.style=i}}}));
@@ -1 +0,0 @@
1
- import{r as t,h as e,g as o}from"./p-c4cf99d8.js";import{t as r}from"./p-c1068ffa.js";let i=class{constructor(e){t(this,e),this.carousel=document.getElementById(this.for),this.handleSlide=this.handleSlide.bind(this),this.handleChange=this.handleChange.bind(this)}get controls(){return[].slice.call(this.host.children)}handleSlide(t){this.controls.forEach((t=>{t.removeAttribute("current"),t.checked=!1}));const e=this.controls[t.detail-1];e.setAttribute("current",t.detail),e.checked=!0}handleChange(t){const{carousel:e,controls:o}=this,r=parseInt(t.target.getAttribute("slide")),i=isNaN(r)?o.indexOf(t.target)+1:r;e.slideTo(i),t.target.setAttribute("current",i)}componentWillLoad(){const{carousel:t,controls:e}=this;try{t.addEventListener("slide",this.handleSlide),e.forEach(((t,e)=>{0===e&&t.setAttribute("current",e+1),"INPUT"===t.nodeName?t.addEventListener("change",this.handleChange):(t.addEventListener("keyup",this.handleChange),t.addEventListener("mouseup",this.handleChange))}))}catch(o){if(!r.exists(t))throw new ReferenceError("ku4-carousel-controls must connect to a ku4-carousel.")}}disconnectedCallback(){const{carousel:t,controls:e}=this;t.removeEventListener("slide",this.handleSlide),e.forEach((t=>{t.removeEventListener("change",this.handleChange),t.removeEventListener("keyup",this.handleChange),t.removeEventListener("mouseup",this.handleChange)}))}render(){return e("slot",null)}get host(){return o(this)}};i.style=':host{position:relative;display:block}input[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;position:relative;width:20px;height:20px;margin:0;padding:0;border:solid 1px #888;border-radius:50%;-webkit-box-sizing:border-box;box-sizing:border-box;vertical-align:middle}input[type=radio]:checked:after{content:"";position:absolute;top:2px;left:2px;width:14px;height:14px;margin:0;padding:0;border:solid 1px #888;border-radius:50%;-webkit-box-sizing:border-box;box-sizing:border-box;text-align:center;background-color:#333}';export{i as ku4_carousel_controls}
@@ -1 +0,0 @@
1
- import{r as i,c as t,h as s,H as h,g as e}from"./p-c4cf99d8.js";import{t as a,R as n,Y as r}from"./p-c1068ffa.js";let l=class{constructor(s){i(this,s),this.didValidate=t(this,"validate",7),this.pattern=".*",this.flags="",this.method="";const h=this.pattern.split(" "),e=this.flags.split(" "),n=this.method.trim();this.regex=h.map(((i,t)=>new RegExp(i,e[t]))),this.validationMethod=a.isNullOrEmpty(n)?()=>!0:new Function("value",/^return/.test(n)?n:`return ${n}`),this.handleInput=this.handleInput.bind(this),this.handleChange=this.handleChange.bind(this),this.handleBlur=this.handleBlur.bind(this),this.handleReset=this.handleReset.bind(this)}async validate(){return this.assert()}handleInput(){("file"===this.input.type||a.isFalse(this.isValid))&&this.assert()}handleChange(){("file"===this.input.type||a.isFalse(this.isValid))&&this.assert()}handleBlur(){this.assert()}handleReset(){this.isValid=!0,this.invalid=!this.isValid,this.input.setAttribute("aria-invalid",this.invalid)}assert(){const{ele:i,validOptions:t,input:s,regex:h}=this;if("file"===s.type&&a.isNullOrEmpty(s.value))return;const e=this.isValid;var n,r,l,d;return this.isValid=!!this.disabled||(n=h,r=s.value,d=i,((l=t)?l.some((i=>i===r))&&n.every((i=>i.test(r))):d?d.value===r&&n.every((i=>i.test(r))):n.every((i=>i.test(r))))&&this.validationMethod(s.value)),this.invalid=!this.isValid,s.setAttribute("aria-invalid",this.invalid),a.isFalse(e)&&this.isValid&&this.didValidate.emit(this.isValid),this.isValid}componentWillLoad(){if(this.input=document.getElementById(this.for),a.exists(this.input)){this.ele=document.getElementById(this.element)||document.querySelector(this.element),this.validOptions=a.exists(this.values)?this.values.split(","):this.ele&&"DATALIST"===this.ele.nodeName&&[].slice.call(this.ele.querySelectorAll("option")).map((i=>i.value));const i=this.input.getAttribute("aria-describedby"),t=this.host.getAttribute("id")||n.uid();this.host.setAttribute("id",t),a.isNullOrEmpty(i)&&this.input.setAttribute("aria-describedby",t),r(0).then((()=>{this.input.addEventListener("input",this.handleInput),this.input.addEventListener("change",this.handleChange),this.input.addEventListener("blur",this.handleBlur)})),a.isFunction(this.host.closest)&&(this.form=this.host.closest("form"),this.form&&this.form.addEventListener&&this.form.addEventListener("reset",this.handleReset))}else console.error("ku4-validation must have a valid `for` referencing target field `id`.")}disconnectedCallback(){this.input&&this.input.removeEventListener&&(this.input.removeEventListener("input",this.handleInput),this.input.removeEventListener("change",this.handleChange),this.input.removeEventListener("blur",this.handleBlur)),this.form&&this.form.removeEventListener&&this.form.removeEventListener("reset",this.handleReset)}render(){return s(h,{role:"alert","aria-live":"assertive"},s("slot",null))}get host(){return e(this)}};l.style=":host{visibility:hidden !important}:host([invalid]){visibility:visible !important}:host([disabled]){visibility:hidden !important}:host([invalid][disabled]){visibility:hidden !important}";export{l as ku4_validation}
@@ -1 +0,0 @@
1
- import{r as t,h as s}from"./p-c4cf99d8.js";import{a as i,Y as h,t as e}from"./p-c1068ffa.js";let n=class{constructor(s){t(this,s),this.charIndexes=[],this.reverseCharIndexes=[],this.previousValue="",this.currentValue="",this.touchStart=!1,this.template="",this.ban="",this.pattern="",this.char="_",this.hidden=!1,this.handleFocus=this.handleFocus.bind(this),this.handleBlur=this.handleBlur.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleInput=this.handleInput.bind(this),this.handleTouchStart=this.handleTouchStart.bind(this),this.init()}init(){this.chars=this.char&&new RegExp(this.char),this.banned=this.ban&&new RegExp(this.ban);const t=this.pattern.replace(/[\s\n]/gm,"");return this.patterns=t.substr(1).split(t[0]).map((t=>{try{return t&&new RegExp(t)||null}catch(s){}})),this.charIndexes=this.template.split("").reduce(((t,s,i)=>(this.chars.test(s)&&t.push(i),t)),[]),this.reverseCharIndexes=[...this.charIndexes].reverse(),this}templateHandler(t,s){const{input:h,previousCharIndex:e,previousValue:n,currentValue:r,value:a,char:o}=this,c=i.unmask(n,s,o).length<i.unmask(r,s,o).length?e+1:e;this.init().value=i.mask(i.unmask(a,s,o),t,o),h.setSelectionRange(c,c)}charHandler(t,s){const{value:h,template:e}=this;this.init().value=i.mask(i.unmask(h,e,s),e,t)}get previousCharIndex(){return this.reverseCharIndexes.find((t=>this.selectionStart>t))||this.charIndexes[0]}get value(){return this.currentValue}set value(t){const{chars:s,hidden:i,input:h}=this,e=t.search(s);this.currentValue=t,h.value=i&&e>-1?t.substring(0,e):t}handleTouchStart(){this.touchStart=!0}handleFocus(){if(window.document.documentMode)return;const{input:t,template:s,char:e,chars:n,touchStart:r}=this;this.value=i.mask(i.unmask(this.value,s,e),s,e),h(0).then((()=>{const s=t.value.search(n),i=s<0?t.value.length:s;this.input.setSelectionRange(s<0&&!r?0:i,i),this.touchStart=!1}))}handleBlur(){const{template:t,char:s}=this;e.isEmpty(i.unmask(this.value,t,s))&&(this.value="")}handleKeyDown(t){if(window.document.documentMode)return;const{banned:s,hidden:h,template:e,char:n}=this;t.key&&1===t.key.length&&s&&s.test(t.key)&&!(t.altKey||t.ctrlKey||t.metaKey)&&t.preventDefault(),this.previousValue=h?i.mask(i.unmask(t.target.value,e,n),e,n):t.target.value,this.selectionStart=t.target.selectionStart,this.selectionEnd=t.target.selectionEnd}handleInput(t){if(window.document.documentMode)return;const{input:s,template:h,char:n,chars:r,previousValue:a,banned:o,selectionStart:c,selectionEnd:l,previousCharIndex:u,patterns:d,charIndexes:p,reverseCharIndexes:f}=this;if(r.test(this.previousValue)||"insertFromPaste"===t.inputType||"deleteContentBackward"===t.inputType||"deleteContentForward"===t.inputType||c!==l){if("insertFromPaste"===t.inputType)try{return navigator.clipboard.readText().then((t=>{const u=t.replace(new RegExp(o,"g"),"");if(e.isNullOrEmpty(u))return this.value=a,void s.setSelectionRange(c,c);if(!o||!o.test(u)){let t=a;if(c<l){const s=f.find((t=>t<=c-1)),e=f.find((t=>t<=l-1)),r=p.findIndex((t=>t===s)),o=p.findIndex((t=>t===e)),u=i.unmask(a,h,n),d=u.substring(0,r+1)+u.substring(o+1,a.length);t=i.mask(d,h,n)}const e=p.find((t=>t>=c)),o=p.findIndex((t=>t===e)),d=i.unmask(t,h,n);t=d.substring(0,o)+u+d.substring(o,a.length),this.value=i.mask(t,h,n);const v=p[o+u.length]||this.value.search(r)||this.value.length;s.setSelectionRange(v,v)}})),this.value=a,void s.setSelectionRange(c,c)}catch(t){return this.value=a,void s.setSelectionRange(c,c)}if("deleteContentBackward"!==t.inputType){if("deleteContentForward"===t.inputType){const t=p.find((t=>t>=c)),e=p.findIndex((s=>s===t)),r=i.unmask(a,h,n),o=r.substring(0,e)+r.substring(e+1,a.length);return this.value=i.mask(o,h,n),void s.setSelectionRange(c,c)}if(!(t.altKey||t.ctrlKey||t.metaKey)){if(!t.data)return this.value=a,void s.setSelectionRange(c,c);if(r.test(a.charAt(c))||c===h.length){const e=i.unmask(a,h,n);this.value=i.mask(e+t.data,h,n);const o=this.value.search(r),c=o<0?h.length:o;s.setSelectionRange(c,c);const l=p.findIndex((t=>t>=c));this.validate(t.data,d[l<0?p.length-1:l-1])}else{let e=a;if(c<l){const t=f.find((t=>t<=c-1)),s=f.find((t=>t<=l-1)),r=p.findIndex((s=>s===t)),o=p.findIndex((t=>t===s)),u=i.unmask(a,h,n),d=u.substring(0,r+1)+u.substring(o+1,a.length);e=i.mask(d,h,n)}const r=p.find((t=>t>=c)),o=p.findIndex((t=>t===r)),u=i.unmask(e,h,n);e=u.substring(0,o)+t.data+u.substring(o,a.length);const v=p.find((t=>t>r));this.value=i.mask(e,h,n),s.setSelectionRange(v,v);const m=p.findIndex((t=>t>=v));this.validate(t.data,d[m<0?p.length-1:m-1])}}}else{const t=f.find((t=>t<=c-1)),e=f.find((t=>t<=l-1)),r=p.findIndex((s=>s===t)),o=p.findIndex((t=>t===e)),d=i.unmask(a,h,n);if(r<o){const t=d.substring(0,r+1)+d.substring(o+1,a.length);this.value=i.mask(t,h,n),t&&r>-1?s.setSelectionRange(u+1,u+1):s.setSelectionRange(u,u)}else{const t=d.substring(0,r)+d.substring(o+1,a.length);this.value=i.mask(t,h,n),s.setSelectionRange(u,u)}}}else this.value=a}validate(t,s){const{previousValue:i,input:h,value:n,selectionStart:r}=this;e.exists(s)&&!(s.test(t)||/\(\?[!<=]/.test(s.toString())&&s.test(n))&&(this.value=i,h.setSelectionRange(r,r))}componentWillLoad(){this.input=document.getElementById(this.for),e.exists(this.input)?(this.input.addEventListener("focus",this.handleFocus),this.input.addEventListener("blur",this.handleBlur),this.input.addEventListener("keydown",this.handleKeyDown),this.input.addEventListener("input",this.handleInput),this.input.addEventListener("touchstart",this.handleTouchStart)):console.error("ku4-mask must have a valid `for` referencing target field `id`.")}disconnectedCallback(){this.input&&this.input.removeEventListener&&(this.input.removeEventListener("focus",this.handleFocus),this.input.removeEventListener("blur",this.handleBlur),this.input.removeEventListener("keydown",this.handleKeyDown),this.input.removeEventListener("input",this.handleInput),this.input.removeEventListener("touchstart",this.handleTouchStart))}render(){return s("slot",null)}static get watchers(){return{template:["templateHandler"],char:["charHandler"]}}};n.style=":host{display:none}";export{n as ku4_mask}