@porsche-design-system/components-react 3.7.0-rc.2 → 3.8.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/CHANGELOG.md +125 -17
  2. package/cjs/lib/components/button-pure.wrapper.cjs +1 -1
  3. package/cjs/lib/components/carousel.wrapper.cjs +1 -1
  4. package/cjs/lib/components/display.wrapper.cjs +1 -1
  5. package/cjs/lib/components/flyout.wrapper.cjs +1 -1
  6. package/cjs/lib/components/heading.wrapper.cjs +1 -1
  7. package/cjs/lib/components/headline.wrapper.cjs +1 -1
  8. package/cjs/lib/components/link-pure.wrapper.cjs +1 -1
  9. package/cjs/lib/components/modal.wrapper.cjs +3 -3
  10. package/cjs/lib/components/switch.wrapper.cjs +1 -1
  11. package/cjs/lib/components/text.wrapper.cjs +1 -1
  12. package/esm/lib/components/button-pure.wrapper.d.ts +1 -1
  13. package/esm/lib/components/button-pure.wrapper.mjs +1 -1
  14. package/esm/lib/components/carousel.wrapper.d.ts +1 -1
  15. package/esm/lib/components/carousel.wrapper.mjs +1 -1
  16. package/esm/lib/components/display.wrapper.d.ts +1 -1
  17. package/esm/lib/components/display.wrapper.mjs +1 -1
  18. package/esm/lib/components/flyout.wrapper.d.ts +1 -1
  19. package/esm/lib/components/flyout.wrapper.mjs +1 -1
  20. package/esm/lib/components/heading.wrapper.d.ts +1 -1
  21. package/esm/lib/components/heading.wrapper.mjs +1 -1
  22. package/esm/lib/components/headline.wrapper.d.ts +1 -1
  23. package/esm/lib/components/headline.wrapper.mjs +1 -1
  24. package/esm/lib/components/link-pure.wrapper.d.ts +1 -1
  25. package/esm/lib/components/link-pure.wrapper.mjs +1 -1
  26. package/esm/lib/components/modal.wrapper.d.ts +9 -1
  27. package/esm/lib/components/modal.wrapper.mjs +3 -3
  28. package/esm/lib/components/switch.wrapper.d.ts +1 -1
  29. package/esm/lib/components/switch.wrapper.mjs +1 -1
  30. package/esm/lib/components/text.wrapper.d.ts +1 -1
  31. package/esm/lib/components/text.wrapper.mjs +1 -1
  32. package/esm/lib/types.d.ts +36 -28
  33. package/package.json +2 -2
  34. package/ssr/cjs/components/dist/styles/esm/styles-entry.cjs +3188 -3069
  35. package/ssr/cjs/components/dist/utils/esm/utils-entry.cjs +1129 -1262
  36. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/button-pure.wrapper.cjs +1 -1
  37. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/carousel.wrapper.cjs +1 -1
  38. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/display.wrapper.cjs +1 -1
  39. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/flyout.wrapper.cjs +1 -1
  40. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/heading.wrapper.cjs +1 -1
  41. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/headline.wrapper.cjs +1 -1
  42. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/link-pure.wrapper.cjs +1 -1
  43. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/modal.wrapper.cjs +4 -4
  44. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/switch.wrapper.cjs +1 -1
  45. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/text.wrapper.cjs +1 -1
  46. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/carousel.cjs +4 -1
  47. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/display.cjs +5 -1
  48. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/flyout.cjs +9 -3
  49. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/heading.cjs +5 -1
  50. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/headline.cjs +5 -1
  51. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link-tile-model-signature.cjs +1 -1
  52. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/modal.cjs +5 -2
  53. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/pin-code.cjs +1 -1
  54. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/popover.cjs +5 -6
  55. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/scroller.cjs +1 -1
  56. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/text-list-item.cjs +1 -1
  57. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/text.cjs +5 -1
  58. package/ssr/esm/components/dist/styles/esm/styles-entry.mjs +3188 -3069
  59. package/ssr/esm/components/dist/utils/esm/utils-entry.mjs +1130 -1264
  60. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/button-pure.wrapper.mjs +1 -1
  61. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/carousel.wrapper.mjs +1 -1
  62. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/display.wrapper.mjs +1 -1
  63. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/flyout.wrapper.mjs +1 -1
  64. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/heading.wrapper.mjs +1 -1
  65. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/headline.wrapper.mjs +1 -1
  66. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/link-pure.wrapper.mjs +1 -1
  67. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/modal.wrapper.mjs +4 -4
  68. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/switch.wrapper.mjs +1 -1
  69. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/text.wrapper.mjs +1 -1
  70. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/carousel.mjs +4 -1
  71. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/display.mjs +5 -1
  72. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/flyout.mjs +10 -4
  73. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/heading.mjs +5 -1
  74. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/headline.mjs +5 -1
  75. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link-tile-model-signature.mjs +1 -1
  76. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/modal.mjs +5 -2
  77. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/pin-code.mjs +1 -1
  78. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/popover.mjs +5 -6
  79. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/scroller.mjs +2 -2
  80. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/text-list-item.mjs +1 -1
  81. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/text.mjs +5 -1
  82. package/ssr/esm/lib/components/modal.wrapper.d.ts +9 -1
  83. package/ssr/esm/lib/dsr-components/popover.d.ts +2 -0
  84. package/ssr/esm/lib/types.d.ts +36 -28
@@ -37,1102 +37,776 @@ const isDisabledOrLoading = (disabled, loading) => {
37
37
  return disabled || loading;
38
38
  };
39
39
 
40
- const parseJSONAttribute = (attribute) => {
41
- return typeof attribute === 'string'
42
- ? // input is potentially JSON parsable string, e.g. "{ aria-label: 'Some label' }"
43
- JSON.parse(attribute
44
- .replace(/'/g, '"') // convert single quotes to double quotes
45
- .replace(/[\s"]?([\w-]+)[\s"]?:/g, '"$1":') // wrap keys in double quotes
46
- )
47
- : // input is object, e.g. { aria-label: 'Some label' }
48
- attribute;
49
- };
50
-
51
- const hasWindow = typeof window !== 'undefined';
52
- const parseAndGetAriaAttributes = (rawAttributes) => {
53
- if (rawAttributes) {
54
- const attributes = parseJSONAttribute(rawAttributes);
55
- const attributeKeys = Object.keys(attributes);
56
- // convert booleans to strings so that values are properly set and not just result in attributes without a value when true in jsx
57
- for (const key of attributeKeys) {
58
- if (typeof attributes[key] === 'boolean') {
59
- attributes[key] = `${attributes[key]}`;
60
- }
40
+ function _extends() {
41
+ _extends = Object.assign ? Object.assign.bind() : function (target) {
42
+ for (var i = 1; i < arguments.length; i++) {
43
+ var source = arguments[i];
44
+ for (var key in source) {
45
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
46
+ target[key] = source[key];
61
47
  }
62
- return attributes;
48
+ }
63
49
  }
64
- };
65
- const isHighContrastMode = hasWindow && window.matchMedia && matchMedia('(forced-colors: active)').matches;
50
+ return target;
51
+ };
52
+ return _extends.apply(this, arguments);
53
+ }
66
54
 
67
- const getButtonBaseAriaAttributes = (isDisabled, isLoading) => {
68
- return {
69
- 'aria-disabled': isDisabledOrLoading(isDisabled, isLoading) ? 'true' : null,
70
- 'aria-busy': isLoading ? 'true' : null,
71
- };
72
- };
55
+ var _typeof$1 = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
73
56
 
74
- const attributeMutationMap = new Map();
75
- hasWindow &&
76
- new MutationObserver((mutations) => {
77
- mutations
78
- // reduce array to only entries that have really a changed value
79
- .filter((mutation) => mutation.oldValue !== mutation.target.getAttribute(mutation.attributeName))
80
- // remove duplicates so we execute callback only once per node
81
- .filter((mutation, idx, arr) => arr.findIndex((m) => m.target === mutation.target) === idx)
82
- .forEach((mutation) => attributeMutationMap.get(mutation.target)?.());
83
- });
57
+ var isBrowser = (typeof window === "undefined" ? "undefined" : _typeof$1(window)) === "object" && (typeof document === "undefined" ? "undefined" : _typeof$1(document)) === 'object' && document.nodeType === 9;
84
58
 
85
- const borderWidthBase = '2px';
59
+ function _typeof(o) {
60
+ "@babel/helpers - typeof";
86
61
 
87
- const fontFamily = "'Porsche Next','Arial Narrow',Arial,'Heiti SC',SimHei,sans-serif";
62
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
63
+ return typeof o;
64
+ } : function (o) {
65
+ return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
66
+ }, _typeof(o);
67
+ }
88
68
 
89
- const fontHyphenationStyle = {
90
- overflowWrap: 'break-word',
91
- hyphens: 'auto',
92
- };
69
+ function _toPrimitive(input, hint) {
70
+ if (_typeof(input) !== "object" || input === null) return input;
71
+ var prim = input[Symbol.toPrimitive];
72
+ if (prim !== undefined) {
73
+ var res = prim.call(input, hint || "default");
74
+ if (_typeof(res) !== "object") return res;
75
+ throw new TypeError("@@toPrimitive must return a primitive value.");
76
+ }
77
+ return (hint === "string" ? String : Number)(input);
78
+ }
93
79
 
94
- const fontLineHeight = 'calc(6px + 2.125ex)';
80
+ function _toPropertyKey(arg) {
81
+ var key = _toPrimitive(arg, "string");
82
+ return _typeof(key) === "symbol" ? key : String(key);
83
+ }
95
84
 
96
- const fontSizeTextXSmall = 'clamp(0.81rem, 0.23vw + 0.77rem, 0.88rem)';
85
+ function _defineProperties(target, props) {
86
+ for (var i = 0; i < props.length; i++) {
87
+ var descriptor = props[i];
88
+ descriptor.enumerable = descriptor.enumerable || false;
89
+ descriptor.configurable = true;
90
+ if ("value" in descriptor) descriptor.writable = true;
91
+ Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
92
+ }
93
+ }
94
+ function _createClass(Constructor, protoProps, staticProps) {
95
+ if (protoProps) _defineProperties(Constructor.prototype, protoProps);
96
+ if (staticProps) _defineProperties(Constructor, staticProps);
97
+ Object.defineProperty(Constructor, "prototype", {
98
+ writable: false
99
+ });
100
+ return Constructor;
101
+ }
97
102
 
98
- const fontSizeTextSmall = '1rem';
103
+ function _setPrototypeOf(o, p) {
104
+ _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
105
+ o.__proto__ = p;
106
+ return o;
107
+ };
108
+ return _setPrototypeOf(o, p);
109
+ }
99
110
 
100
- const fontWeightRegular = 400;
111
+ function _inheritsLoose(subClass, superClass) {
112
+ subClass.prototype = Object.create(superClass.prototype);
113
+ subClass.prototype.constructor = subClass;
114
+ _setPrototypeOf(subClass, superClass);
115
+ }
101
116
 
102
- const fontStyleNormal = 'normal';
117
+ function _assertThisInitialized(self) {
118
+ if (self === void 0) {
119
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
120
+ }
121
+ return self;
122
+ }
103
123
 
104
- const fontVariant = 'normal';
124
+ function _objectWithoutPropertiesLoose(source, excluded) {
125
+ if (source == null) return {};
126
+ var target = {};
127
+ var sourceKeys = Object.keys(source);
128
+ var key, i;
129
+ for (i = 0; i < sourceKeys.length; i++) {
130
+ key = sourceKeys[i];
131
+ if (excluded.indexOf(key) >= 0) continue;
132
+ target[key] = source[key];
133
+ }
134
+ return target;
135
+ }
105
136
 
106
- const breakpointBase = 0;
137
+ var plainObjectConstrurctor = {}.constructor;
138
+ function cloneStyle(style) {
139
+ if (style == null || typeof style !== 'object') return style;
140
+ if (Array.isArray(style)) return style.map(cloneStyle);
141
+ if (style.constructor !== plainObjectConstrurctor) return style;
142
+ var newStyle = {};
107
143
 
108
- const breakpointXS = 480;
144
+ for (var name in style) {
145
+ newStyle[name] = cloneStyle(style[name]);
146
+ }
109
147
 
110
- const breakpointS = 760;
148
+ return newStyle;
149
+ }
111
150
 
112
- const breakpointM = 1000;
151
+ /**
152
+ * Create a rule instance.
153
+ */
113
154
 
114
- const breakpointL = 1300;
155
+ function createRule(name, decl, options) {
156
+ if (name === void 0) {
157
+ name = 'unnamed';
158
+ }
115
159
 
116
- const breakpointXL = 1760;
160
+ var jss = options.jss;
161
+ var declCopy = cloneStyle(decl);
162
+ var rule = jss.plugins.onCreateRule(name, declCopy, options);
163
+ if (rule) return rule; // It is an at-rule and it has no instance.
117
164
 
118
- const breakpointXXL = 1920;
165
+ if (name[0] === '@') ;
119
166
 
120
- const breakpoint = {
121
- base: breakpointBase,
122
- xs: breakpointXS,
123
- s: breakpointS,
124
- m: breakpointM,
125
- l: breakpointL,
126
- xl: breakpointXL,
127
- xxl: breakpointXXL,
128
- };
167
+ return null;
168
+ }
129
169
 
130
- const breakpoints = ['base', 'xs', 's', 'm', 'l', 'xl', 'xxl'];
170
+ var join$1 = function join(value, by) {
171
+ var result = '';
131
172
 
132
- const _textFontPartA = `${fontStyleNormal} ${fontVariant} ${fontWeightRegular} `;
133
- const _textFontPartB = `/${fontLineHeight} ${fontFamily}`;
173
+ for (var i = 0; i < value.length; i++) {
174
+ // Remove !important from the value, it will be readded later.
175
+ if (value[i] === '!important') break;
176
+ if (result) result += by;
177
+ result += value[i];
178
+ }
134
179
 
135
- const textXSmallStyle = {
136
- font: `${_textFontPartA}${fontSizeTextXSmall}${_textFontPartB}`,
137
- ...fontHyphenationStyle,
180
+ return result;
138
181
  };
182
+ /**
183
+ * Converts JSS array value to a CSS string.
184
+ *
185
+ * `margin: [['5px', '10px']]` > `margin: 5px 10px;`
186
+ * `border: ['1px', '2px']` > `border: 1px, 2px;`
187
+ * `margin: [['5px', '10px'], '!important']` > `margin: 5px 10px !important;`
188
+ * `color: ['red', !important]` > `color: red !important;`
189
+ */
139
190
 
140
- const textSmallStyle = {
141
- font: `${_textFontPartA}${fontSizeTextSmall}${_textFontPartB}`,
142
- ...fontHyphenationStyle,
143
- };
144
191
 
145
- const mediaQueries = Object.values(breakpoint).map((v) => `(min-width:${v}px)`);
146
- hasWindow && window.matchMedia ? mediaQueries.map(window.matchMedia) : [];
192
+ var toCssValue = function toCssValue(value) {
193
+ if (!Array.isArray(value)) return value;
194
+ var cssValue = ''; // Support space separated values via `[['5px', '10px']]`.
147
195
 
148
- Object.entries(breakpoint).reduce((result, [key, val]) => ({ ...result, [`${val}px`]: key }), {});
196
+ if (Array.isArray(value[0])) {
197
+ for (var i = 0; i < value.length; i++) {
198
+ if (value[i] === '!important') break;
199
+ if (cssValue) cssValue += ', ';
200
+ cssValue += join$1(value[i], ' ');
201
+ }
202
+ } else cssValue = join$1(value, ', '); // Add !important, because it was ignored.
149
203
 
150
- const hasVisibleIcon = (iconName, iconSource) => {
151
- return iconName !== 'none' || !!iconSource;
152
- };
153
204
 
154
- /**
155
- * Map of observed nodes and their corresponding callback functions.
156
- */
157
- const observedNodesMap = new Map();
158
- /**
159
- * Mutation observer for observing changes in the children of observed nodes.
160
- */
161
- hasWindow &&
162
- new MutationObserver((mutations) => {
163
- // there may be race conditions in jsdom-polyfill tests where the map is already empty when a mutation happens
164
- if (observedNodesMap.size) {
165
- const observedNodes = Array.from(observedNodesMap.keys());
166
- mutations
167
- // remove duplicates so we execute callback only once per node
168
- .filter((mutation, idx, arr) => arr.findIndex((m) => m.target === mutation.target) === idx)
169
- // find all observing parent nodes of mutated node and invoke their callbacks
170
- .forEach((mutation) => {
171
- observedNodes
172
- .filter((node) => node.contains(mutation.target))
173
- .forEach((node) => observedNodesMap.get(node)?.());
174
- });
175
- }
176
- });
205
+ if (value[value.length - 1] === '!important') {
206
+ cssValue += ' !important';
207
+ }
177
208
 
178
- const isTouchDevice = () => {
179
- if (!hasWindow) {
180
- return;
181
- }
182
- return !!('ontouchstart' in window || window.navigator.maxTouchPoints > 0);
209
+ return cssValue;
183
210
  };
184
211
 
185
- /* eslint-disable no-undefined,no-param-reassign,no-shadow */
212
+ function getWhitespaceSymbols(options) {
213
+ if (options && options.format === false) {
214
+ return {
215
+ linebreak: '',
216
+ space: ''
217
+ };
218
+ }
219
+
220
+ return {
221
+ linebreak: '\n',
222
+ space: ' '
223
+ };
224
+ }
186
225
 
187
226
  /**
188
- * Throttle execution of a function. Especially useful for rate limiting
189
- * execution of handlers on events like resize and scroll.
190
- *
191
- * @param {number} delay - A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher)
192
- * are most useful.
193
- * @param {Function} callback - A function to be executed after delay milliseconds. The `this` context and all arguments are passed through,
194
- * as-is, to `callback` when the throttled-function is executed.
195
- * @param {object} [options] - An object to configure options.
196
- * @param {boolean} [options.noTrailing] - Optional, defaults to false. If noTrailing is true, callback will only execute every `delay` milliseconds
197
- * while the throttled-function is being called. If noTrailing is false or unspecified, callback will be executed
198
- * one final time after the last throttled-function call. (After the throttled-function has not been called for
199
- * `delay` milliseconds, the internal counter is reset).
200
- * @param {boolean} [options.noLeading] - Optional, defaults to false. If noLeading is false, the first throttled-function call will execute callback
201
- * immediately. If noLeading is true, the first the callback execution will be skipped. It should be noted that
202
- * callback will never executed if both noLeading = true and noTrailing = true.
203
- * @param {boolean} [options.debounceMode] - If `debounceMode` is true (at begin), schedule `clear` to execute after `delay` ms. If `debounceMode` is
204
- * false (at end), schedule `callback` to execute after `delay` ms.
205
- *
206
- * @returns {Function} A new, throttled, function.
227
+ * Indent a string.
228
+ * http://jsperf.com/array-join-vs-for
207
229
  */
208
- function throttle (delay, callback, options) {
209
- var _ref = options || {},
210
- _ref$noTrailing = _ref.noTrailing,
211
- noTrailing = _ref$noTrailing === void 0 ? false : _ref$noTrailing,
212
- _ref$noLeading = _ref.noLeading,
213
- noLeading = _ref$noLeading === void 0 ? false : _ref$noLeading,
214
- _ref$debounceMode = _ref.debounceMode,
215
- debounceMode = _ref$debounceMode === void 0 ? undefined : _ref$debounceMode;
216
- /*
217
- * After wrapper has stopped being called, this timeout ensures that
218
- * `callback` is executed at the proper times in `throttle` and `end`
219
- * debounce modes.
220
- */
221
230
 
231
+ function indentStr(str, indent) {
232
+ var result = '';
222
233
 
223
- var timeoutID;
224
- var cancelled = false; // Keep track of the last time `callback` was executed.
234
+ for (var index = 0; index < indent; index++) {
235
+ result += ' ';
236
+ }
225
237
 
226
- var lastExec = 0; // Function to clear existing timeout
238
+ return result + str;
239
+ }
240
+ /**
241
+ * Converts a Rule to CSS string.
242
+ */
227
243
 
228
- function clearExistingTimeout() {
229
- if (timeoutID) {
230
- clearTimeout(timeoutID);
231
- }
232
- } // Function to cancel next exec
233
244
 
245
+ function toCss(selector, style, options) {
246
+ if (options === void 0) {
247
+ options = {};
248
+ }
234
249
 
235
- function cancel(options) {
236
- var _ref2 = options || {},
237
- _ref2$upcomingOnly = _ref2.upcomingOnly,
238
- upcomingOnly = _ref2$upcomingOnly === void 0 ? false : _ref2$upcomingOnly;
250
+ var result = '';
251
+ if (!style) return result;
252
+ var _options = options,
253
+ _options$indent = _options.indent,
254
+ indent = _options$indent === void 0 ? 0 : _options$indent;
255
+ var fallbacks = style.fallbacks;
239
256
 
240
- clearExistingTimeout();
241
- cancelled = !upcomingOnly;
257
+ if (options.format === false) {
258
+ indent = -Infinity;
242
259
  }
243
- /*
244
- * The `wrapper` function encapsulates all of the throttling / debouncing
245
- * functionality and when executed will limit the rate at which `callback`
246
- * is executed.
247
- */
248
260
 
261
+ var _getWhitespaceSymbols = getWhitespaceSymbols(options),
262
+ linebreak = _getWhitespaceSymbols.linebreak,
263
+ space = _getWhitespaceSymbols.space;
249
264
 
250
- function wrapper() {
251
- for (var _len = arguments.length, arguments_ = new Array(_len), _key = 0; _key < _len; _key++) {
252
- arguments_[_key] = arguments[_key];
253
- }
265
+ if (selector) indent++; // Apply fallbacks first.
254
266
 
255
- var self = this;
256
- var elapsed = Date.now() - lastExec;
267
+ if (fallbacks) {
268
+ // Array syntax {fallbacks: [{prop: value}]}
269
+ if (Array.isArray(fallbacks)) {
270
+ for (var index = 0; index < fallbacks.length; index++) {
271
+ var fallback = fallbacks[index];
257
272
 
258
- if (cancelled) {
259
- return;
260
- } // Execute `callback` and update the `lastExec` timestamp.
273
+ for (var prop in fallback) {
274
+ var value = fallback[prop];
261
275
 
276
+ if (value != null) {
277
+ if (result) result += linebreak;
278
+ result += indentStr(prop + ":" + space + toCssValue(value) + ";", indent);
279
+ }
280
+ }
281
+ }
282
+ } else {
283
+ // Object syntax {fallbacks: {prop: value}}
284
+ for (var _prop in fallbacks) {
285
+ var _value = fallbacks[_prop];
262
286
 
263
- function exec() {
264
- lastExec = Date.now();
265
- callback.apply(self, arguments_);
287
+ if (_value != null) {
288
+ if (result) result += linebreak;
289
+ result += indentStr(_prop + ":" + space + toCssValue(_value) + ";", indent);
290
+ }
291
+ }
266
292
  }
267
- /*
268
- * If `debounceMode` is true (at begin) this is used to clear the flag
269
- * to allow future `callback` executions.
270
- */
293
+ }
271
294
 
295
+ for (var _prop2 in style) {
296
+ var _value2 = style[_prop2];
272
297
 
273
- function clear() {
274
- timeoutID = undefined;
298
+ if (_value2 != null && _prop2 !== 'fallbacks') {
299
+ if (result) result += linebreak;
300
+ result += indentStr(_prop2 + ":" + space + toCssValue(_value2) + ";", indent);
275
301
  }
302
+ } // Allow empty style in this case, because properties will be added dynamically.
276
303
 
277
- if (!noLeading && debounceMode && !timeoutID) {
278
- /*
279
- * Since `wrapper` is being called for the first time and
280
- * `debounceMode` is true (at begin), execute `callback`
281
- * and noLeading != true.
282
- */
283
- exec();
284
- }
285
304
 
286
- clearExistingTimeout();
305
+ if (!result && !options.allowEmpty) return result; // When rule is being stringified before selector was defined.
287
306
 
288
- if (debounceMode === undefined && elapsed > delay) {
289
- if (noLeading) {
290
- /*
291
- * In throttle mode with noLeading, if `delay` time has
292
- * been exceeded, update `lastExec` and schedule `callback`
293
- * to execute after `delay` ms.
294
- */
295
- lastExec = Date.now();
307
+ if (!selector) return result;
308
+ indent--;
309
+ if (result) result = "" + linebreak + result + linebreak;
310
+ return indentStr("" + selector + space + "{" + result, indent) + indentStr('}', indent);
311
+ }
296
312
 
297
- if (!noTrailing) {
298
- timeoutID = setTimeout(debounceMode ? clear : exec, delay);
299
- }
300
- } else {
301
- /*
302
- * In throttle mode without noLeading, if `delay` time has been exceeded, execute
303
- * `callback`.
304
- */
305
- exec();
306
- }
307
- } else if (noTrailing !== true) {
308
- /*
309
- * In trailing throttle mode, since `delay` time has not been
310
- * exceeded, schedule `callback` to execute `delay` ms after most
311
- * recent execution.
312
- *
313
- * If `debounceMode` is true (at begin), schedule `clear` to execute
314
- * after `delay` ms.
315
- *
316
- * If `debounceMode` is false (at end), schedule `callback` to
317
- * execute after `delay` ms.
318
- */
319
- timeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);
320
- }
313
+ var escapeRegex = /([[\].#*$><+~=|^:(),"'`\s])/g;
314
+ var nativeEscape = typeof CSS !== 'undefined' && CSS.escape;
315
+ var escape = (function (str) {
316
+ return nativeEscape ? nativeEscape(str) : str.replace(escapeRegex, '\\$1');
317
+ });
318
+
319
+ var BaseStyleRule =
320
+ /*#__PURE__*/
321
+ function () {
322
+ function BaseStyleRule(key, style, options) {
323
+ this.type = 'style';
324
+ this.isProcessed = false;
325
+ var sheet = options.sheet,
326
+ Renderer = options.Renderer;
327
+ this.key = key;
328
+ this.options = options;
329
+ this.style = style;
330
+ if (sheet) this.renderer = sheet.renderer;else if (Renderer) this.renderer = new Renderer();
321
331
  }
332
+ /**
333
+ * Get or set a style property.
334
+ */
322
335
 
323
- wrapper.cancel = cancel; // Return the wrapper function.
324
336
 
325
- return wrapper;
326
- }
337
+ var _proto = BaseStyleRule.prototype;
327
338
 
328
- /* eslint-disable no-undefined */
329
- /**
330
- * Debounce execution of a function. Debouncing, unlike throttling,
331
- * guarantees that a function is only executed a single time, either at the
332
- * very beginning of a series of calls, or at the very end.
333
- *
334
- * @param {number} delay - A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher) are most useful.
335
- * @param {Function} callback - A function to be executed after delay milliseconds. The `this` context and all arguments are passed through, as-is,
336
- * to `callback` when the debounced-function is executed.
337
- * @param {object} [options] - An object to configure options.
338
- * @param {boolean} [options.atBegin] - Optional, defaults to false. If atBegin is false or unspecified, callback will only be executed `delay` milliseconds
339
- * after the last debounced-function call. If atBegin is true, callback will be executed only at the first debounced-function call.
340
- * (After the throttled-function has not been called for `delay` milliseconds, the internal counter is reset).
341
- *
342
- * @returns {Function} A new, debounced function.
343
- */
339
+ _proto.prop = function prop(name, value, options) {
340
+ // It's a getter.
341
+ if (value === undefined) return this.style[name]; // Don't do anything if the value has not changed.
344
342
 
345
- function debounce (delay, callback, options) {
346
- var _ref = options || {},
347
- _ref$atBegin = _ref.atBegin,
348
- atBegin = _ref$atBegin === void 0 ? false : _ref$atBegin;
343
+ var force = options ? options.force : false;
344
+ if (!force && this.style[name] === value) return this;
345
+ var newValue = value;
349
346
 
350
- return throttle(delay, callback, {
351
- debounceMode: atBegin !== false
352
- });
353
- }
354
- debounce(800, (el, ariaElement) => {
355
- ariaElement.innerText = `You have ${el.maxLength - el.value.length} out of ${el.maxLength} characters left`;
356
- });
347
+ if (!options || options.process !== false) {
348
+ newValue = this.options.jss.plugins.onChangeValue(value, name, this);
349
+ }
357
350
 
358
- const getRole = (state) => {
359
- return state === 'error' ? 'alert' : state === 'success' ? 'status' : null;
360
- };
351
+ var isEmpty = newValue == null || newValue === false;
352
+ var isDefined = name in this.style; // Value is empty and wasn't defined before.
361
353
 
362
- const isWithinForm = (host) => !!getClosestHTMLElement(host, 'form');
354
+ if (isEmpty && !isDefined && !force) return this; // We are going to remove this value.
363
355
 
364
- const getCDNBaseURL = () => global.PORSCHE_DESIGN_SYSTEM_CDN_URL + "/porsche-design-system";
356
+ var remove = isEmpty && isDefined;
357
+ if (remove) delete this.style[name];else this.style[name] = newValue; // Renderable is defined if StyleSheet option `link` is true.
365
358
 
366
- function _extends() {
367
- _extends = Object.assign ? Object.assign.bind() : function (target) {
368
- for (var i = 1; i < arguments.length; i++) {
369
- var source = arguments[i];
370
- for (var key in source) {
371
- if (Object.prototype.hasOwnProperty.call(source, key)) {
372
- target[key] = source[key];
373
- }
374
- }
359
+ if (this.renderable && this.renderer) {
360
+ if (remove) this.renderer.removeProperty(this.renderable, name);else this.renderer.setProperty(this.renderable, name, newValue);
361
+ return this;
375
362
  }
376
- return target;
377
- };
378
- return _extends.apply(this, arguments);
379
- }
380
363
 
381
- var _typeof$1 = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
364
+ var sheet = this.options.sheet;
382
365
 
383
- var isBrowser = (typeof window === "undefined" ? "undefined" : _typeof$1(window)) === "object" && (typeof document === "undefined" ? "undefined" : _typeof$1(document)) === 'object' && document.nodeType === 9;
366
+ if (sheet && sheet.attached) ;
384
367
 
385
- function _typeof(o) {
386
- "@babel/helpers - typeof";
368
+ return this;
369
+ };
387
370
 
388
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
389
- return typeof o;
390
- } : function (o) {
391
- return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
392
- }, _typeof(o);
393
- }
371
+ return BaseStyleRule;
372
+ }();
373
+ var StyleRule =
374
+ /*#__PURE__*/
375
+ function (_BaseStyleRule) {
376
+ _inheritsLoose(StyleRule, _BaseStyleRule);
394
377
 
395
- function _toPrimitive(input, hint) {
396
- if (_typeof(input) !== "object" || input === null) return input;
397
- var prim = input[Symbol.toPrimitive];
398
- if (prim !== undefined) {
399
- var res = prim.call(input, hint || "default");
400
- if (_typeof(res) !== "object") return res;
401
- throw new TypeError("@@toPrimitive must return a primitive value.");
402
- }
403
- return (hint === "string" ? String : Number)(input);
404
- }
378
+ function StyleRule(key, style, options) {
379
+ var _this;
405
380
 
406
- function _toPropertyKey(arg) {
407
- var key = _toPrimitive(arg, "string");
408
- return _typeof(key) === "symbol" ? key : String(key);
409
- }
381
+ _this = _BaseStyleRule.call(this, key, style, options) || this;
382
+ var selector = options.selector,
383
+ scoped = options.scoped,
384
+ sheet = options.sheet,
385
+ generateId = options.generateId;
410
386
 
411
- function _defineProperties(target, props) {
412
- for (var i = 0; i < props.length; i++) {
413
- var descriptor = props[i];
414
- descriptor.enumerable = descriptor.enumerable || false;
415
- descriptor.configurable = true;
416
- if ("value" in descriptor) descriptor.writable = true;
417
- Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
387
+ if (selector) {
388
+ _this.selectorText = selector;
389
+ } else if (scoped !== false) {
390
+ _this.id = generateId(_assertThisInitialized(_assertThisInitialized(_this)), sheet);
391
+ _this.selectorText = "." + escape(_this.id);
392
+ }
393
+
394
+ return _this;
418
395
  }
419
- }
420
- function _createClass(Constructor, protoProps, staticProps) {
421
- if (protoProps) _defineProperties(Constructor.prototype, protoProps);
422
- if (staticProps) _defineProperties(Constructor, staticProps);
423
- Object.defineProperty(Constructor, "prototype", {
424
- writable: false
425
- });
426
- return Constructor;
427
- }
396
+ /**
397
+ * Set selector string.
398
+ * Attention: use this with caution. Most browsers didn't implement
399
+ * selectorText setter, so this may result in rerendering of entire Style Sheet.
400
+ */
428
401
 
429
- function _setPrototypeOf(o, p) {
430
- _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
431
- o.__proto__ = p;
432
- return o;
433
- };
434
- return _setPrototypeOf(o, p);
435
- }
436
402
 
437
- function _inheritsLoose(subClass, superClass) {
438
- subClass.prototype = Object.create(superClass.prototype);
439
- subClass.prototype.constructor = subClass;
440
- _setPrototypeOf(subClass, superClass);
441
- }
403
+ var _proto2 = StyleRule.prototype;
442
404
 
443
- function _assertThisInitialized(self) {
444
- if (self === void 0) {
445
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
446
- }
447
- return self;
448
- }
405
+ /**
406
+ * Apply rule to an element inline.
407
+ */
408
+ _proto2.applyTo = function applyTo(renderable) {
409
+ var renderer = this.renderer;
449
410
 
450
- function _objectWithoutPropertiesLoose(source, excluded) {
451
- if (source == null) return {};
452
- var target = {};
453
- var sourceKeys = Object.keys(source);
454
- var key, i;
455
- for (i = 0; i < sourceKeys.length; i++) {
456
- key = sourceKeys[i];
457
- if (excluded.indexOf(key) >= 0) continue;
458
- target[key] = source[key];
459
- }
460
- return target;
461
- }
411
+ if (renderer) {
412
+ var json = this.toJSON();
462
413
 
463
- var plainObjectConstrurctor = {}.constructor;
464
- function cloneStyle(style) {
465
- if (style == null || typeof style !== 'object') return style;
466
- if (Array.isArray(style)) return style.map(cloneStyle);
467
- if (style.constructor !== plainObjectConstrurctor) return style;
468
- var newStyle = {};
414
+ for (var prop in json) {
415
+ renderer.setProperty(renderable, prop, json[prop]);
416
+ }
417
+ }
469
418
 
470
- for (var name in style) {
471
- newStyle[name] = cloneStyle(style[name]);
419
+ return this;
472
420
  }
421
+ /**
422
+ * Returns JSON representation of the rule.
423
+ * Fallbacks are not supported.
424
+ * Useful for inline styles.
425
+ */
426
+ ;
473
427
 
474
- return newStyle;
475
- }
428
+ _proto2.toJSON = function toJSON() {
429
+ var json = {};
476
430
 
477
- /**
478
- * Create a rule instance.
479
- */
431
+ for (var prop in this.style) {
432
+ var value = this.style[prop];
433
+ if (typeof value !== 'object') json[prop] = value;else if (Array.isArray(value)) json[prop] = toCssValue(value);
434
+ }
480
435
 
481
- function createRule(name, decl, options) {
482
- if (name === void 0) {
483
- name = 'unnamed';
436
+ return json;
484
437
  }
438
+ /**
439
+ * Generates a CSS string.
440
+ */
441
+ ;
485
442
 
486
- var jss = options.jss;
487
- var declCopy = cloneStyle(decl);
488
- var rule = jss.plugins.onCreateRule(name, declCopy, options);
489
- if (rule) return rule; // It is an at-rule and it has no instance.
443
+ _proto2.toString = function toString(options) {
444
+ var sheet = this.options.sheet;
445
+ var link = sheet ? sheet.options.link : false;
446
+ var opts = link ? _extends({}, options, {
447
+ allowEmpty: true
448
+ }) : options;
449
+ return toCss(this.selectorText, this.style, opts);
450
+ };
490
451
 
491
- if (name[0] === '@') ;
452
+ _createClass(StyleRule, [{
453
+ key: "selector",
454
+ set: function set(selector) {
455
+ if (selector === this.selectorText) return;
456
+ this.selectorText = selector;
457
+ var renderer = this.renderer,
458
+ renderable = this.renderable;
459
+ if (!renderable || !renderer) return;
460
+ var hasChanged = renderer.setSelector(renderable, selector); // If selector setter is not implemented, rerender the rule.
492
461
 
493
- return null;
494
- }
462
+ if (!hasChanged) {
463
+ renderer.replaceRule(renderable, this);
464
+ }
465
+ }
466
+ /**
467
+ * Get selector string.
468
+ */
469
+ ,
470
+ get: function get() {
471
+ return this.selectorText;
472
+ }
473
+ }]);
495
474
 
496
- var join$1 = function join(value, by) {
497
- var result = '';
475
+ return StyleRule;
476
+ }(BaseStyleRule);
477
+ var pluginStyleRule = {
478
+ onCreateRule: function onCreateRule(key, style, options) {
479
+ if (key[0] === '@' || options.parent && options.parent.type === 'keyframes') {
480
+ return null;
481
+ }
498
482
 
499
- for (var i = 0; i < value.length; i++) {
500
- // Remove !important from the value, it will be readded later.
501
- if (value[i] === '!important') break;
502
- if (result) result += by;
503
- result += value[i];
483
+ return new StyleRule(key, style, options);
504
484
  }
485
+ };
505
486
 
506
- return result;
487
+ var defaultToStringOptions = {
488
+ indent: 1,
489
+ children: true
507
490
  };
491
+ var atRegExp = /@([\w-]+)/;
508
492
  /**
509
- * Converts JSS array value to a CSS string.
510
- *
511
- * `margin: [['5px', '10px']]` > `margin: 5px 10px;`
512
- * `border: ['1px', '2px']` > `border: 1px, 2px;`
513
- * `margin: [['5px', '10px'], '!important']` > `margin: 5px 10px !important;`
514
- * `color: ['red', !important]` > `color: red !important;`
493
+ * Conditional rule for @media, @supports
515
494
  */
516
495
 
496
+ var ConditionalRule =
497
+ /*#__PURE__*/
498
+ function () {
499
+ function ConditionalRule(key, styles, options) {
500
+ this.type = 'conditional';
501
+ this.isProcessed = false;
502
+ this.key = key;
503
+ var atMatch = key.match(atRegExp);
504
+ this.at = atMatch ? atMatch[1] : 'unknown'; // Key might contain a unique suffix in case the `name` passed by user was duplicate.
517
505
 
518
- var toCssValue = function toCssValue(value) {
519
- if (!Array.isArray(value)) return value;
520
- var cssValue = ''; // Support space separated values via `[['5px', '10px']]`.
506
+ this.query = options.name || "@" + this.at;
507
+ this.options = options;
508
+ this.rules = new RuleList(_extends({}, options, {
509
+ parent: this
510
+ }));
521
511
 
522
- if (Array.isArray(value[0])) {
523
- for (var i = 0; i < value.length; i++) {
524
- if (value[i] === '!important') break;
525
- if (cssValue) cssValue += ', ';
526
- cssValue += join$1(value[i], ' ');
512
+ for (var name in styles) {
513
+ this.rules.add(name, styles[name]);
527
514
  }
528
- } else cssValue = join$1(value, ', '); // Add !important, because it was ignored.
529
-
530
515
 
531
- if (value[value.length - 1] === '!important') {
532
- cssValue += ' !important';
516
+ this.rules.process();
533
517
  }
518
+ /**
519
+ * Get a rule.
520
+ */
534
521
 
535
- return cssValue;
536
- };
537
522
 
538
- function getWhitespaceSymbols(options) {
539
- if (options && options.format === false) {
540
- return {
541
- linebreak: '',
542
- space: ''
543
- };
544
- }
523
+ var _proto = ConditionalRule.prototype;
545
524
 
546
- return {
547
- linebreak: '\n',
548
- space: ' '
549
- };
550
- }
551
-
552
- /**
553
- * Indent a string.
554
- * http://jsperf.com/array-join-vs-for
555
- */
556
-
557
- function indentStr(str, indent) {
558
- var result = '';
559
-
560
- for (var index = 0; index < indent; index++) {
561
- result += ' ';
525
+ _proto.getRule = function getRule(name) {
526
+ return this.rules.get(name);
562
527
  }
528
+ /**
529
+ * Get index of a rule.
530
+ */
531
+ ;
563
532
 
564
- return result + str;
565
- }
566
- /**
567
- * Converts a Rule to CSS string.
568
- */
569
-
570
-
571
- function toCss(selector, style, options) {
572
- if (options === void 0) {
573
- options = {};
533
+ _proto.indexOf = function indexOf(rule) {
534
+ return this.rules.indexOf(rule);
574
535
  }
536
+ /**
537
+ * Create and register rule, run plugins.
538
+ */
539
+ ;
575
540
 
576
- var result = '';
577
- if (!style) return result;
578
- var _options = options,
579
- _options$indent = _options.indent,
580
- indent = _options$indent === void 0 ? 0 : _options$indent;
581
- var fallbacks = style.fallbacks;
582
-
583
- if (options.format === false) {
584
- indent = -Infinity;
541
+ _proto.addRule = function addRule(name, style, options) {
542
+ var rule = this.rules.add(name, style, options);
543
+ if (!rule) return null;
544
+ this.options.jss.plugins.onProcessRule(rule);
545
+ return rule;
585
546
  }
547
+ /**
548
+ * Replace rule, run plugins.
549
+ */
550
+ ;
586
551
 
587
- var _getWhitespaceSymbols = getWhitespaceSymbols(options),
588
- linebreak = _getWhitespaceSymbols.linebreak,
589
- space = _getWhitespaceSymbols.space;
590
-
591
- if (selector) indent++; // Apply fallbacks first.
592
-
593
- if (fallbacks) {
594
- // Array syntax {fallbacks: [{prop: value}]}
595
- if (Array.isArray(fallbacks)) {
596
- for (var index = 0; index < fallbacks.length; index++) {
597
- var fallback = fallbacks[index];
598
-
599
- for (var prop in fallback) {
600
- var value = fallback[prop];
601
-
602
- if (value != null) {
603
- if (result) result += linebreak;
604
- result += indentStr(prop + ":" + space + toCssValue(value) + ";", indent);
605
- }
606
- }
607
- }
608
- } else {
609
- // Object syntax {fallbacks: {prop: value}}
610
- for (var _prop in fallbacks) {
611
- var _value = fallbacks[_prop];
552
+ _proto.replaceRule = function replaceRule(name, style, options) {
553
+ var newRule = this.rules.replace(name, style, options);
554
+ if (newRule) this.options.jss.plugins.onProcessRule(newRule);
555
+ return newRule;
556
+ }
557
+ /**
558
+ * Generates a CSS string.
559
+ */
560
+ ;
612
561
 
613
- if (_value != null) {
614
- if (result) result += linebreak;
615
- result += indentStr(_prop + ":" + space + toCssValue(_value) + ";", indent);
616
- }
617
- }
562
+ _proto.toString = function toString(options) {
563
+ if (options === void 0) {
564
+ options = defaultToStringOptions;
618
565
  }
619
- }
620
566
 
621
- for (var _prop2 in style) {
622
- var _value2 = style[_prop2];
567
+ var _getWhitespaceSymbols = getWhitespaceSymbols(options),
568
+ linebreak = _getWhitespaceSymbols.linebreak;
623
569
 
624
- if (_value2 != null && _prop2 !== 'fallbacks') {
625
- if (result) result += linebreak;
626
- result += indentStr(_prop2 + ":" + space + toCssValue(_value2) + ";", indent);
627
- }
628
- } // Allow empty style in this case, because properties will be added dynamically.
570
+ if (options.indent == null) options.indent = defaultToStringOptions.indent;
571
+ if (options.children == null) options.children = defaultToStringOptions.children;
629
572
 
573
+ if (options.children === false) {
574
+ return this.query + " {}";
575
+ }
630
576
 
631
- if (!result && !options.allowEmpty) return result; // When rule is being stringified before selector was defined.
577
+ var children = this.rules.toString(options);
578
+ return children ? this.query + " {" + linebreak + children + linebreak + "}" : '';
579
+ };
632
580
 
633
- if (!selector) return result;
634
- indent--;
635
- if (result) result = "" + linebreak + result + linebreak;
636
- return indentStr("" + selector + space + "{" + result, indent) + indentStr('}', indent);
637
- }
581
+ return ConditionalRule;
582
+ }();
583
+ var keyRegExp = /@container|@media|@supports\s+/;
584
+ var pluginConditionalRule = {
585
+ onCreateRule: function onCreateRule(key, styles, options) {
586
+ return keyRegExp.test(key) ? new ConditionalRule(key, styles, options) : null;
587
+ }
588
+ };
638
589
 
639
- var escapeRegex = /([[\].#*$><+~=|^:(),"'`\s])/g;
640
- var nativeEscape = typeof CSS !== 'undefined' && CSS.escape;
641
- var escape = (function (str) {
642
- return nativeEscape ? nativeEscape(str) : str.replace(escapeRegex, '\\$1');
643
- });
590
+ var defaultToStringOptions$1 = {
591
+ indent: 1,
592
+ children: true
593
+ };
594
+ var nameRegExp = /@keyframes\s+([\w-]+)/;
595
+ /**
596
+ * Rule for @keyframes
597
+ */
644
598
 
645
- var BaseStyleRule =
599
+ var KeyframesRule =
646
600
  /*#__PURE__*/
647
601
  function () {
648
- function BaseStyleRule(key, style, options) {
649
- this.type = 'style';
602
+ function KeyframesRule(key, frames, options) {
603
+ this.type = 'keyframes';
604
+ this.at = '@keyframes';
650
605
  this.isProcessed = false;
651
- var sheet = options.sheet,
652
- Renderer = options.Renderer;
653
- this.key = key;
606
+ var nameMatch = key.match(nameRegExp);
607
+
608
+ if (nameMatch && nameMatch[1]) {
609
+ this.name = nameMatch[1];
610
+ } else {
611
+ this.name = 'noname';
612
+ }
613
+
614
+ this.key = this.type + "-" + this.name;
654
615
  this.options = options;
655
- this.style = style;
656
- if (sheet) this.renderer = sheet.renderer;else if (Renderer) this.renderer = new Renderer();
616
+ var scoped = options.scoped,
617
+ sheet = options.sheet,
618
+ generateId = options.generateId;
619
+ this.id = scoped === false ? this.name : escape(generateId(this, sheet));
620
+ this.rules = new RuleList(_extends({}, options, {
621
+ parent: this
622
+ }));
623
+
624
+ for (var name in frames) {
625
+ this.rules.add(name, frames[name], _extends({}, options, {
626
+ parent: this
627
+ }));
628
+ }
629
+
630
+ this.rules.process();
657
631
  }
658
632
  /**
659
- * Get or set a style property.
633
+ * Generates a CSS string.
660
634
  */
661
635
 
662
636
 
663
- var _proto = BaseStyleRule.prototype;
664
-
665
- _proto.prop = function prop(name, value, options) {
666
- // It's a getter.
667
- if (value === undefined) return this.style[name]; // Don't do anything if the value has not changed.
668
-
669
- var force = options ? options.force : false;
670
- if (!force && this.style[name] === value) return this;
671
- var newValue = value;
637
+ var _proto = KeyframesRule.prototype;
672
638
 
673
- if (!options || options.process !== false) {
674
- newValue = this.options.jss.plugins.onChangeValue(value, name, this);
639
+ _proto.toString = function toString(options) {
640
+ if (options === void 0) {
641
+ options = defaultToStringOptions$1;
675
642
  }
676
643
 
677
- var isEmpty = newValue == null || newValue === false;
678
- var isDefined = name in this.style; // Value is empty and wasn't defined before.
679
-
680
- if (isEmpty && !isDefined && !force) return this; // We are going to remove this value.
644
+ var _getWhitespaceSymbols = getWhitespaceSymbols(options),
645
+ linebreak = _getWhitespaceSymbols.linebreak;
681
646
 
682
- var remove = isEmpty && isDefined;
683
- if (remove) delete this.style[name];else this.style[name] = newValue; // Renderable is defined if StyleSheet option `link` is true.
647
+ if (options.indent == null) options.indent = defaultToStringOptions$1.indent;
648
+ if (options.children == null) options.children = defaultToStringOptions$1.children;
684
649
 
685
- if (this.renderable && this.renderer) {
686
- if (remove) this.renderer.removeProperty(this.renderable, name);else this.renderer.setProperty(this.renderable, name, newValue);
687
- return this;
650
+ if (options.children === false) {
651
+ return this.at + " " + this.id + " {}";
688
652
  }
689
653
 
690
- var sheet = this.options.sheet;
691
-
692
- if (sheet && sheet.attached) ;
693
-
694
- return this;
654
+ var children = this.rules.toString(options);
655
+ if (children) children = "" + linebreak + children + linebreak;
656
+ return this.at + " " + this.id + " {" + children + "}";
695
657
  };
696
658
 
697
- return BaseStyleRule;
659
+ return KeyframesRule;
698
660
  }();
699
- var StyleRule =
700
- /*#__PURE__*/
701
- function (_BaseStyleRule) {
702
- _inheritsLoose(StyleRule, _BaseStyleRule);
661
+ var keyRegExp$1 = /@keyframes\s+/;
662
+ var refRegExp$1 = /\$([\w-]+)/g;
703
663
 
704
- function StyleRule(key, style, options) {
705
- var _this;
664
+ var findReferencedKeyframe = function findReferencedKeyframe(val, keyframes) {
665
+ if (typeof val === 'string') {
666
+ return val.replace(refRegExp$1, function (match, name) {
667
+ if (name in keyframes) {
668
+ return keyframes[name];
669
+ }
670
+ return match;
671
+ });
672
+ }
706
673
 
707
- _this = _BaseStyleRule.call(this, key, style, options) || this;
708
- var selector = options.selector,
709
- scoped = options.scoped,
710
- sheet = options.sheet,
711
- generateId = options.generateId;
674
+ return val;
675
+ };
676
+ /**
677
+ * Replace the reference for a animation name.
678
+ */
712
679
 
713
- if (selector) {
714
- _this.selectorText = selector;
715
- } else if (scoped !== false) {
716
- _this.id = generateId(_assertThisInitialized(_assertThisInitialized(_this)), sheet);
717
- _this.selectorText = "." + escape(_this.id);
718
- }
719
680
 
720
- return _this;
721
- }
722
- /**
723
- * Set selector string.
724
- * Attention: use this with caution. Most browsers didn't implement
725
- * selectorText setter, so this may result in rerendering of entire Style Sheet.
726
- */
727
-
728
-
729
- var _proto2 = StyleRule.prototype;
681
+ var replaceRef = function replaceRef(style, prop, keyframes) {
682
+ var value = style[prop];
683
+ var refKeyframe = findReferencedKeyframe(value, keyframes);
730
684
 
731
- /**
732
- * Apply rule to an element inline.
733
- */
734
- _proto2.applyTo = function applyTo(renderable) {
735
- var renderer = this.renderer;
685
+ if (refKeyframe !== value) {
686
+ style[prop] = refKeyframe;
687
+ }
688
+ };
736
689
 
737
- if (renderer) {
738
- var json = this.toJSON();
690
+ var pluginKeyframesRule = {
691
+ onCreateRule: function onCreateRule(key, frames, options) {
692
+ return typeof key === 'string' && keyRegExp$1.test(key) ? new KeyframesRule(key, frames, options) : null;
693
+ },
694
+ // Animation name ref replacer.
695
+ onProcessStyle: function onProcessStyle(style, rule, sheet) {
696
+ if (rule.type !== 'style' || !sheet) return style;
697
+ if ('animation-name' in style) replaceRef(style, 'animation-name', sheet.keyframes);
698
+ if ('animation' in style) replaceRef(style, 'animation', sheet.keyframes);
699
+ return style;
700
+ },
701
+ onChangeValue: function onChangeValue(val, prop, rule) {
702
+ var sheet = rule.options.sheet;
739
703
 
740
- for (var prop in json) {
741
- renderer.setProperty(renderable, prop, json[prop]);
742
- }
704
+ if (!sheet) {
705
+ return val;
743
706
  }
744
707
 
745
- return this;
746
- }
747
- /**
748
- * Returns JSON representation of the rule.
749
- * Fallbacks are not supported.
750
- * Useful for inline styles.
751
- */
752
- ;
708
+ switch (prop) {
709
+ case 'animation':
710
+ return findReferencedKeyframe(val, sheet.keyframes);
753
711
 
754
- _proto2.toJSON = function toJSON() {
755
- var json = {};
712
+ case 'animation-name':
713
+ return findReferencedKeyframe(val, sheet.keyframes);
756
714
 
757
- for (var prop in this.style) {
758
- var value = this.style[prop];
759
- if (typeof value !== 'object') json[prop] = value;else if (Array.isArray(value)) json[prop] = toCssValue(value);
715
+ default:
716
+ return val;
760
717
  }
718
+ }
719
+ };
761
720
 
762
- return json;
721
+ var KeyframeRule =
722
+ /*#__PURE__*/
723
+ function (_BaseStyleRule) {
724
+ _inheritsLoose(KeyframeRule, _BaseStyleRule);
725
+
726
+ function KeyframeRule() {
727
+ return _BaseStyleRule.apply(this, arguments) || this;
763
728
  }
729
+
730
+ var _proto = KeyframeRule.prototype;
731
+
764
732
  /**
765
733
  * Generates a CSS string.
766
734
  */
767
- ;
768
-
769
- _proto2.toString = function toString(options) {
735
+ _proto.toString = function toString(options) {
770
736
  var sheet = this.options.sheet;
771
737
  var link = sheet ? sheet.options.link : false;
772
738
  var opts = link ? _extends({}, options, {
773
739
  allowEmpty: true
774
740
  }) : options;
775
- return toCss(this.selectorText, this.style, opts);
741
+ return toCss(this.key, this.style, opts);
776
742
  };
777
743
 
778
- _createClass(StyleRule, [{
779
- key: "selector",
780
- set: function set(selector) {
781
- if (selector === this.selectorText) return;
782
- this.selectorText = selector;
783
- var renderer = this.renderer,
784
- renderable = this.renderable;
785
- if (!renderable || !renderer) return;
786
- var hasChanged = renderer.setSelector(renderable, selector); // If selector setter is not implemented, rerender the rule.
787
-
788
- if (!hasChanged) {
789
- renderer.replaceRule(renderable, this);
790
- }
791
- }
792
- /**
793
- * Get selector string.
794
- */
795
- ,
796
- get: function get() {
797
- return this.selectorText;
798
- }
799
- }]);
800
-
801
- return StyleRule;
744
+ return KeyframeRule;
802
745
  }(BaseStyleRule);
803
- var pluginStyleRule = {
746
+ var pluginKeyframeRule = {
804
747
  onCreateRule: function onCreateRule(key, style, options) {
805
- if (key[0] === '@' || options.parent && options.parent.type === 'keyframes') {
806
- return null;
748
+ if (options.parent && options.parent.type === 'keyframes') {
749
+ return new KeyframeRule(key, style, options);
807
750
  }
808
751
 
809
- return new StyleRule(key, style, options);
752
+ return null;
810
753
  }
811
754
  };
812
755
 
813
- var defaultToStringOptions = {
814
- indent: 1,
815
- children: true
816
- };
817
- var atRegExp = /@([\w-]+)/;
818
- /**
819
- * Conditional rule for @media, @supports
820
- */
821
-
822
- var ConditionalRule =
756
+ var FontFaceRule =
823
757
  /*#__PURE__*/
824
758
  function () {
825
- function ConditionalRule(key, styles, options) {
826
- this.type = 'conditional';
759
+ function FontFaceRule(key, style, options) {
760
+ this.type = 'font-face';
761
+ this.at = '@font-face';
827
762
  this.isProcessed = false;
828
763
  this.key = key;
829
- var atMatch = key.match(atRegExp);
830
- this.at = atMatch ? atMatch[1] : 'unknown'; // Key might contain a unique suffix in case the `name` passed by user was duplicate.
831
-
832
- this.query = options.name || "@" + this.at;
764
+ this.style = style;
833
765
  this.options = options;
834
- this.rules = new RuleList(_extends({}, options, {
835
- parent: this
836
- }));
837
-
838
- for (var name in styles) {
839
- this.rules.add(name, styles[name]);
840
- }
841
-
842
- this.rules.process();
843
- }
844
- /**
845
- * Get a rule.
846
- */
847
-
848
-
849
- var _proto = ConditionalRule.prototype;
850
-
851
- _proto.getRule = function getRule(name) {
852
- return this.rules.get(name);
853
- }
854
- /**
855
- * Get index of a rule.
856
- */
857
- ;
858
-
859
- _proto.indexOf = function indexOf(rule) {
860
- return this.rules.indexOf(rule);
861
766
  }
862
767
  /**
863
- * Create and register rule, run plugins.
768
+ * Generates a CSS string.
864
769
  */
865
- ;
866
770
 
867
- _proto.addRule = function addRule(name, style, options) {
868
- var rule = this.rules.add(name, style, options);
869
- if (!rule) return null;
870
- this.options.jss.plugins.onProcessRule(rule);
871
- return rule;
872
- }
873
- /**
874
- * Replace rule, run plugins.
875
- */
876
- ;
877
771
 
878
- _proto.replaceRule = function replaceRule(name, style, options) {
879
- var newRule = this.rules.replace(name, style, options);
880
- if (newRule) this.options.jss.plugins.onProcessRule(newRule);
881
- return newRule;
882
- }
883
- /**
884
- * Generates a CSS string.
885
- */
886
- ;
772
+ var _proto = FontFaceRule.prototype;
887
773
 
888
774
  _proto.toString = function toString(options) {
889
- if (options === void 0) {
890
- options = defaultToStringOptions;
891
- }
892
-
893
775
  var _getWhitespaceSymbols = getWhitespaceSymbols(options),
894
776
  linebreak = _getWhitespaceSymbols.linebreak;
895
777
 
896
- if (options.indent == null) options.indent = defaultToStringOptions.indent;
897
- if (options.children == null) options.children = defaultToStringOptions.children;
778
+ if (Array.isArray(this.style)) {
779
+ var str = '';
898
780
 
899
- if (options.children === false) {
900
- return this.query + " {}";
781
+ for (var index = 0; index < this.style.length; index++) {
782
+ str += toCss(this.at, this.style[index]);
783
+ if (this.style[index + 1]) str += linebreak;
784
+ }
785
+
786
+ return str;
901
787
  }
902
788
 
903
- var children = this.rules.toString(options);
904
- return children ? this.query + " {" + linebreak + children + linebreak + "}" : '';
789
+ return toCss(this.at, this.style, options);
905
790
  };
906
791
 
907
- return ConditionalRule;
792
+ return FontFaceRule;
908
793
  }();
909
- var keyRegExp = /@container|@media|@supports\s+/;
910
- var pluginConditionalRule = {
911
- onCreateRule: function onCreateRule(key, styles, options) {
912
- return keyRegExp.test(key) ? new ConditionalRule(key, styles, options) : null;
794
+ var keyRegExp$2 = /@font-face/;
795
+ var pluginFontFaceRule = {
796
+ onCreateRule: function onCreateRule(key, style, options) {
797
+ return keyRegExp$2.test(key) ? new FontFaceRule(key, style, options) : null;
913
798
  }
914
799
  };
915
800
 
916
- var defaultToStringOptions$1 = {
917
- indent: 1,
918
- children: true
919
- };
920
- var nameRegExp = /@keyframes\s+([\w-]+)/;
921
- /**
922
- * Rule for @keyframes
923
- */
924
-
925
- var KeyframesRule =
801
+ var ViewportRule =
926
802
  /*#__PURE__*/
927
803
  function () {
928
- function KeyframesRule(key, frames, options) {
929
- this.type = 'keyframes';
930
- this.at = '@keyframes';
804
+ function ViewportRule(key, style, options) {
805
+ this.type = 'viewport';
806
+ this.at = '@viewport';
931
807
  this.isProcessed = false;
932
- var nameMatch = key.match(nameRegExp);
933
-
934
- if (nameMatch && nameMatch[1]) {
935
- this.name = nameMatch[1];
936
- } else {
937
- this.name = 'noname';
938
- }
939
-
940
- this.key = this.type + "-" + this.name;
941
- this.options = options;
942
- var scoped = options.scoped,
943
- sheet = options.sheet,
944
- generateId = options.generateId;
945
- this.id = scoped === false ? this.name : escape(generateId(this, sheet));
946
- this.rules = new RuleList(_extends({}, options, {
947
- parent: this
948
- }));
949
-
950
- for (var name in frames) {
951
- this.rules.add(name, frames[name], _extends({}, options, {
952
- parent: this
953
- }));
954
- }
955
-
956
- this.rules.process();
957
- }
958
- /**
959
- * Generates a CSS string.
960
- */
961
-
962
-
963
- var _proto = KeyframesRule.prototype;
964
-
965
- _proto.toString = function toString(options) {
966
- if (options === void 0) {
967
- options = defaultToStringOptions$1;
968
- }
969
-
970
- var _getWhitespaceSymbols = getWhitespaceSymbols(options),
971
- linebreak = _getWhitespaceSymbols.linebreak;
972
-
973
- if (options.indent == null) options.indent = defaultToStringOptions$1.indent;
974
- if (options.children == null) options.children = defaultToStringOptions$1.children;
975
-
976
- if (options.children === false) {
977
- return this.at + " " + this.id + " {}";
978
- }
979
-
980
- var children = this.rules.toString(options);
981
- if (children) children = "" + linebreak + children + linebreak;
982
- return this.at + " " + this.id + " {" + children + "}";
983
- };
984
-
985
- return KeyframesRule;
986
- }();
987
- var keyRegExp$1 = /@keyframes\s+/;
988
- var refRegExp$1 = /\$([\w-]+)/g;
989
-
990
- var findReferencedKeyframe = function findReferencedKeyframe(val, keyframes) {
991
- if (typeof val === 'string') {
992
- return val.replace(refRegExp$1, function (match, name) {
993
- if (name in keyframes) {
994
- return keyframes[name];
995
- }
996
- return match;
997
- });
998
- }
999
-
1000
- return val;
1001
- };
1002
- /**
1003
- * Replace the reference for a animation name.
1004
- */
1005
-
1006
-
1007
- var replaceRef = function replaceRef(style, prop, keyframes) {
1008
- var value = style[prop];
1009
- var refKeyframe = findReferencedKeyframe(value, keyframes);
1010
-
1011
- if (refKeyframe !== value) {
1012
- style[prop] = refKeyframe;
1013
- }
1014
- };
1015
-
1016
- var pluginKeyframesRule = {
1017
- onCreateRule: function onCreateRule(key, frames, options) {
1018
- return typeof key === 'string' && keyRegExp$1.test(key) ? new KeyframesRule(key, frames, options) : null;
1019
- },
1020
- // Animation name ref replacer.
1021
- onProcessStyle: function onProcessStyle(style, rule, sheet) {
1022
- if (rule.type !== 'style' || !sheet) return style;
1023
- if ('animation-name' in style) replaceRef(style, 'animation-name', sheet.keyframes);
1024
- if ('animation' in style) replaceRef(style, 'animation', sheet.keyframes);
1025
- return style;
1026
- },
1027
- onChangeValue: function onChangeValue(val, prop, rule) {
1028
- var sheet = rule.options.sheet;
1029
-
1030
- if (!sheet) {
1031
- return val;
1032
- }
1033
-
1034
- switch (prop) {
1035
- case 'animation':
1036
- return findReferencedKeyframe(val, sheet.keyframes);
1037
-
1038
- case 'animation-name':
1039
- return findReferencedKeyframe(val, sheet.keyframes);
1040
-
1041
- default:
1042
- return val;
1043
- }
1044
- }
1045
- };
1046
-
1047
- var KeyframeRule =
1048
- /*#__PURE__*/
1049
- function (_BaseStyleRule) {
1050
- _inheritsLoose(KeyframeRule, _BaseStyleRule);
1051
-
1052
- function KeyframeRule() {
1053
- return _BaseStyleRule.apply(this, arguments) || this;
1054
- }
1055
-
1056
- var _proto = KeyframeRule.prototype;
1057
-
1058
- /**
1059
- * Generates a CSS string.
1060
- */
1061
- _proto.toString = function toString(options) {
1062
- var sheet = this.options.sheet;
1063
- var link = sheet ? sheet.options.link : false;
1064
- var opts = link ? _extends({}, options, {
1065
- allowEmpty: true
1066
- }) : options;
1067
- return toCss(this.key, this.style, opts);
1068
- };
1069
-
1070
- return KeyframeRule;
1071
- }(BaseStyleRule);
1072
- var pluginKeyframeRule = {
1073
- onCreateRule: function onCreateRule(key, style, options) {
1074
- if (options.parent && options.parent.type === 'keyframes') {
1075
- return new KeyframeRule(key, style, options);
1076
- }
1077
-
1078
- return null;
1079
- }
1080
- };
1081
-
1082
- var FontFaceRule =
1083
- /*#__PURE__*/
1084
- function () {
1085
- function FontFaceRule(key, style, options) {
1086
- this.type = 'font-face';
1087
- this.at = '@font-face';
1088
- this.isProcessed = false;
1089
- this.key = key;
1090
- this.style = style;
1091
- this.options = options;
1092
- }
1093
- /**
1094
- * Generates a CSS string.
1095
- */
1096
-
1097
-
1098
- var _proto = FontFaceRule.prototype;
1099
-
1100
- _proto.toString = function toString(options) {
1101
- var _getWhitespaceSymbols = getWhitespaceSymbols(options),
1102
- linebreak = _getWhitespaceSymbols.linebreak;
1103
-
1104
- if (Array.isArray(this.style)) {
1105
- var str = '';
1106
-
1107
- for (var index = 0; index < this.style.length; index++) {
1108
- str += toCss(this.at, this.style[index]);
1109
- if (this.style[index + 1]) str += linebreak;
1110
- }
1111
-
1112
- return str;
1113
- }
1114
-
1115
- return toCss(this.at, this.style, options);
1116
- };
1117
-
1118
- return FontFaceRule;
1119
- }();
1120
- var keyRegExp$2 = /@font-face/;
1121
- var pluginFontFaceRule = {
1122
- onCreateRule: function onCreateRule(key, style, options) {
1123
- return keyRegExp$2.test(key) ? new FontFaceRule(key, style, options) : null;
1124
- }
1125
- };
1126
-
1127
- var ViewportRule =
1128
- /*#__PURE__*/
1129
- function () {
1130
- function ViewportRule(key, style, options) {
1131
- this.type = 'viewport';
1132
- this.at = '@viewport';
1133
- this.isProcessed = false;
1134
- this.key = key;
1135
- this.style = style;
808
+ this.key = key;
809
+ this.style = style;
1136
810
  this.options = options;
1137
811
  }
1138
812
  /**
@@ -2729,80 +2403,6 @@ var jss_esm = /*#__PURE__*/Object.freeze({
2729
2403
  toCssValue: toCssValue
2730
2404
  });
2731
2405
 
2732
- /* eslint-disable no-var, prefer-template */
2733
- var uppercasePattern = /[A-Z]/g;
2734
- var msPattern = /^ms-/;
2735
- var cache = {};
2736
-
2737
- function toHyphenLower(match) {
2738
- return '-' + match.toLowerCase()
2739
- }
2740
-
2741
- function hyphenateStyleName(name) {
2742
- if (cache.hasOwnProperty(name)) {
2743
- return cache[name]
2744
- }
2745
-
2746
- var hName = name.replace(uppercasePattern, toHyphenLower);
2747
- return (cache[name] = msPattern.test(hName) ? '-' + hName : hName)
2748
- }
2749
-
2750
- /**
2751
- * Convert camel cased property names to dash separated.
2752
- */
2753
-
2754
- function convertCase(style) {
2755
- var converted = {};
2756
-
2757
- for (var prop in style) {
2758
- var key = prop.indexOf('--') === 0 ? prop : hyphenateStyleName(prop);
2759
- converted[key] = style[prop];
2760
- }
2761
-
2762
- if (style.fallbacks) {
2763
- if (Array.isArray(style.fallbacks)) converted.fallbacks = style.fallbacks.map(convertCase);else converted.fallbacks = convertCase(style.fallbacks);
2764
- }
2765
-
2766
- return converted;
2767
- }
2768
- /**
2769
- * Allow camel cased property names by converting them back to dasherized.
2770
- */
2771
-
2772
-
2773
- function camelCase() {
2774
- function onProcessStyle(style) {
2775
- if (Array.isArray(style)) {
2776
- // Handle rules like @font-face, which can have multiple styles in an array
2777
- for (var index = 0; index < style.length; index++) {
2778
- style[index] = convertCase(style[index]);
2779
- }
2780
-
2781
- return style;
2782
- }
2783
-
2784
- return convertCase(style);
2785
- }
2786
-
2787
- function onChangeValue(value, prop, rule) {
2788
- if (prop.indexOf('--') === 0) {
2789
- return value;
2790
- }
2791
-
2792
- var hyphenatedProp = hyphenateStyleName(prop); // There was no camel case in place
2793
-
2794
- if (prop === hyphenatedProp) return value;
2795
- rule.prop(hyphenatedProp, value); // Core will ignore that property value we set the proper one above.
2796
-
2797
- return null;
2798
- }
2799
-
2800
- return {
2801
- onProcessStyle: onProcessStyle,
2802
- onChangeValue: onChangeValue
2803
- };
2804
- }
2805
-
2806
2406
  var at = '@global';
2807
2407
  var atPrefix = '@global ';
2808
2408
 
@@ -3092,9 +2692,83 @@ function jssNested() {
3092
2692
  };
3093
2693
  }
3094
2694
 
3095
- function getDefaultExportFromCjs (x) {
3096
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
3097
- }
2695
+ /* eslint-disable no-var, prefer-template */
2696
+ var uppercasePattern = /[A-Z]/g;
2697
+ var msPattern = /^ms-/;
2698
+ var cache = {};
2699
+
2700
+ function toHyphenLower(match) {
2701
+ return '-' + match.toLowerCase()
2702
+ }
2703
+
2704
+ function hyphenateStyleName(name) {
2705
+ if (cache.hasOwnProperty(name)) {
2706
+ return cache[name]
2707
+ }
2708
+
2709
+ var hName = name.replace(uppercasePattern, toHyphenLower);
2710
+ return (cache[name] = msPattern.test(hName) ? '-' + hName : hName)
2711
+ }
2712
+
2713
+ /**
2714
+ * Convert camel cased property names to dash separated.
2715
+ */
2716
+
2717
+ function convertCase(style) {
2718
+ var converted = {};
2719
+
2720
+ for (var prop in style) {
2721
+ var key = prop.indexOf('--') === 0 ? prop : hyphenateStyleName(prop);
2722
+ converted[key] = style[prop];
2723
+ }
2724
+
2725
+ if (style.fallbacks) {
2726
+ if (Array.isArray(style.fallbacks)) converted.fallbacks = style.fallbacks.map(convertCase);else converted.fallbacks = convertCase(style.fallbacks);
2727
+ }
2728
+
2729
+ return converted;
2730
+ }
2731
+ /**
2732
+ * Allow camel cased property names by converting them back to dasherized.
2733
+ */
2734
+
2735
+
2736
+ function camelCase() {
2737
+ function onProcessStyle(style) {
2738
+ if (Array.isArray(style)) {
2739
+ // Handle rules like @font-face, which can have multiple styles in an array
2740
+ for (var index = 0; index < style.length; index++) {
2741
+ style[index] = convertCase(style[index]);
2742
+ }
2743
+
2744
+ return style;
2745
+ }
2746
+
2747
+ return convertCase(style);
2748
+ }
2749
+
2750
+ function onChangeValue(value, prop, rule) {
2751
+ if (prop.indexOf('--') === 0) {
2752
+ return value;
2753
+ }
2754
+
2755
+ var hyphenatedProp = hyphenateStyleName(prop); // There was no camel case in place
2756
+
2757
+ if (prop === hyphenatedProp) return value;
2758
+ rule.prop(hyphenatedProp, value); // Core will ignore that property value we set the proper one above.
2759
+
2760
+ return null;
2761
+ }
2762
+
2763
+ return {
2764
+ onProcessStyle: onProcessStyle,
2765
+ onChangeValue: onChangeValue
2766
+ };
2767
+ }
2768
+
2769
+ function getDefaultExportFromCjs (x) {
2770
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
2771
+ }
3098
2772
 
3099
2773
  function getAugmentedNamespace(n) {
3100
2774
  if (n.__esModule) return n;
@@ -3364,260 +3038,487 @@ sortCSSmq$1.desktopFirst = function (a, b) {
3364
3038
  const minA = isMinWidth(a) || isMinHeight(a);
3365
3039
  const maxA = isMaxWidth(a) || isMaxHeight(a);
3366
3040
 
3367
- const minB = isMinWidth(b) || isMinHeight(b);
3368
- const maxB = isMaxWidth(b) || isMaxHeight(b);
3041
+ const minB = isMinWidth(b) || isMinHeight(b);
3042
+ const maxB = isMaxWidth(b) || isMaxHeight(b);
3043
+
3044
+ if (minA && maxB) {
3045
+ return 1
3046
+ }
3047
+ if (maxA && minB) {
3048
+ return -1
3049
+ }
3050
+
3051
+ const lengthA = _getQueryLength(a);
3052
+ const lengthB = _getQueryLength(b);
3053
+
3054
+ if (lengthA === maxValue && lengthB === maxValue) {
3055
+ return a.localeCompare(b)
3056
+ } else if (lengthA === maxValue) {
3057
+ return 1
3058
+ } else if (lengthB === maxValue) {
3059
+ return -1
3060
+ }
3061
+
3062
+ if (lengthA > lengthB) {
3063
+ if (maxA) {
3064
+ return -1
3065
+ }
3066
+ return 1
3067
+ }
3068
+
3069
+ if (lengthA < lengthB) {
3070
+ if (maxA) {
3071
+ return 1
3072
+ }
3073
+ return -1
3074
+ }
3075
+
3076
+ return -(a.localeCompare(b))
3077
+ };
3078
+
3079
+ // ----------------------------------------
3080
+ // Exports
3081
+ // ----------------------------------------
3082
+
3083
+ var sortCssMediaQueries = sortCSSmq$1;
3084
+
3085
+ var _tslib = _tslib$1;
3086
+ var jss$1 = require$$1;
3087
+ var sortCSSmq = sortCssMediaQueries;
3088
+
3089
+ function _interopDefaultLegacy(e) {
3090
+ return e && typeof e === 'object' && 'default' in e ? e : { default: e };
3091
+ }
3092
+
3093
+ var sortCSSmq__default = /*#__PURE__*/ _interopDefaultLegacy(sortCSSmq);
3094
+
3095
+ function isPlainObject(sample) {
3096
+ return (
3097
+ sample !== null && typeof sample === 'object' && Array.isArray(sample) === false
3098
+ );
3099
+ }
3100
+ var UN_QUERIED = '__UN_QUERIED';
3101
+ function recursiveInnerAndGetQueries(pluginOptions, rules) {
3102
+ var queries = {
3103
+ groups: {},
3104
+ groupsSortNames: []
3105
+ };
3106
+ for (var index = 0; index < rules.length; index++) {
3107
+ var rule = rules[index];
3108
+ var query =
3109
+ rule.type === 'conditional' && typeof rule.query === 'string'
3110
+ ? rule.query
3111
+ : UN_QUERIED;
3112
+ if (!queries.groups.hasOwnProperty(query)) {
3113
+ queries.groupsSortNames.push(query);
3114
+ queries.groups[query] = [];
3115
+ }
3116
+ queries.groups[query].push(index);
3117
+ // eslint-disable-next-line @typescript-eslint/no-use-before-define
3118
+ recursive(pluginOptions, rule);
3119
+ }
3120
+ queries.groupsSortNames.sort(function (a, b) {
3121
+ var aWeight = a === UN_QUERIED ? 0 : a.length;
3122
+ var bWeight = b === UN_QUERIED ? 0 : b.length;
3123
+ if (aWeight > 0 && bWeight > 0) {
3124
+ if (pluginOptions.desktopFirst) {
3125
+ return sortCSSmq__default['default'].desktopFirst(a, b);
3126
+ } else {
3127
+ return sortCSSmq__default['default'](a, b);
3128
+ }
3129
+ } else {
3130
+ return aWeight - bWeight;
3131
+ }
3132
+ });
3133
+ return queries;
3134
+ }
3135
+ function recursive(pluginOptions, data) {
3136
+ if (isPlainObject(data) && data.rules instanceof jss$1.RuleList) {
3137
+ data.rules.toString = function (options) {
3138
+ if (options === void 0) {
3139
+ options = {};
3140
+ }
3141
+ var str = '';
3142
+ var sheet = this.options.sheet;
3143
+ var link = sheet ? sheet.options.link : false;
3144
+ var _a = recursiveInnerAndGetQueries(pluginOptions, this.index),
3145
+ groups = _a.groups,
3146
+ groupsSortNames = _a.groupsSortNames;
3147
+ for (var i = 0; i < groupsSortNames.length; i++) {
3148
+ var groupName = groupsSortNames[i];
3149
+ var group = groups[groupsSortNames[i]];
3150
+ if (groupName !== UN_QUERIED && pluginOptions.combineMediaQueries) {
3151
+ str += '\n' + groupName + ' {';
3152
+ for (var i_1 = 0; i_1 < group.length; i_1++) {
3153
+ var rule = this.index[group[i_1]];
3154
+ var css = rule.rules.toString(
3155
+ _tslib.__assign(_tslib.__assign({}, options), {
3156
+ indent: (options.indent || 0) + 1
3157
+ })
3158
+ );
3159
+ if (!css && !link) continue;
3160
+ if (str) str += '\n';
3161
+ str += css;
3162
+ }
3163
+ str += '\n}\n';
3164
+ } else {
3165
+ for (var i_2 = 0; i_2 < group.length; i_2++) {
3166
+ var rule = this.index[group[i_2]];
3167
+ var css = rule.toString(options);
3168
+ if (!css && !link) continue;
3169
+ if (str) str += '\n';
3170
+ str += css;
3171
+ }
3172
+ }
3173
+ }
3174
+ return str;
3175
+ };
3176
+ }
3177
+ }
3178
+ function jssCombineAndSortMQ(options) {
3179
+ if (options === void 0) {
3180
+ options = {};
3181
+ }
3182
+ return {
3183
+ onProcessSheet: function (sheet) {
3184
+ recursive(options, sheet);
3185
+ }
3186
+ };
3187
+ }
3188
+
3189
+ var dist = jssCombineAndSortMQ;
3190
+
3191
+ var jssPluginSortMediaQueries = /*@__PURE__*/getDefaultExportFromCjs(dist);
3192
+
3193
+ const parseJSONAttribute = (attribute) => {
3194
+ return typeof attribute === 'string'
3195
+ ? // input is potentially JSON parsable string, e.g. "{ aria-label: 'Some label' }"
3196
+ JSON.parse(attribute
3197
+ .replace(/'/g, '"') // convert single quotes to double quotes
3198
+ .replace(/[\s"]?([\w-]+)[\s"]?:/g, '"$1":') // wrap keys in double quotes
3199
+ )
3200
+ : // input is object, e.g. { aria-label: 'Some label' }
3201
+ attribute;
3202
+ };
3203
+
3204
+ const hasWindow = typeof window !== 'undefined';
3205
+ const parseAndGetAriaAttributes = (rawAttributes) => {
3206
+ if (rawAttributes) {
3207
+ return Object.fromEntries(Object.entries(parseJSONAttribute(rawAttributes)).map(([key, val]) => [
3208
+ key,
3209
+ // convert booleans to strings so that values are properly set and not just result in attributes without a value when true in jsx
3210
+ typeof val === 'boolean' ? `${val}` : val,
3211
+ ]));
3212
+ }
3213
+ };
3214
+ hasWindow && window.matchMedia && matchMedia('(forced-colors: active)').matches;
3215
+
3216
+ const getButtonBaseAriaAttributes = (isDisabled, isLoading) => {
3217
+ return {
3218
+ 'aria-disabled': isDisabledOrLoading(isDisabled, isLoading) ? 'true' : null,
3219
+ 'aria-busy': isLoading ? 'true' : null,
3220
+ };
3221
+ };
3222
+
3223
+ const attributeMutationMap = new Map();
3224
+ hasWindow &&
3225
+ new MutationObserver((mutations) => {
3226
+ mutations
3227
+ // reduce array to only entries that have really a changed value
3228
+ .filter((mutation) => mutation.oldValue !== mutation.target.getAttribute(mutation.attributeName))
3229
+ // remove duplicates so we execute callback only once per node
3230
+ .filter((mutation, idx, arr) => arr.findIndex((m) => m.target === mutation.target) === idx)
3231
+ .forEach((mutation) => attributeMutationMap.get(mutation.target)?.());
3232
+ });
3233
+
3234
+ const borderWidthBase = '2px';
3235
+
3236
+ const fontFamily = "'Porsche Next','Arial Narrow',Arial,'Heiti SC',SimHei,sans-serif";
3237
+
3238
+ const fontHyphenationStyle = {
3239
+ overflowWrap: 'break-word',
3240
+ hyphens: 'auto',
3241
+ };
3242
+
3243
+ const fontLineHeight = 'calc(6px + 2.125ex)';
3244
+
3245
+ const fontSizeTextXSmall = 'clamp(0.81rem, 0.23vw + 0.77rem, 0.88rem)';
3246
+
3247
+ const fontSizeTextSmall = '1rem';
3248
+
3249
+ const fontWeightRegular = 400;
3250
+
3251
+ const fontStyleNormal = 'normal';
3252
+
3253
+ const fontVariant = 'normal';
3254
+
3255
+ const breakpointBase = 0;
3256
+
3257
+ const breakpointXS = 480;
3258
+
3259
+ const breakpointS = 760;
3260
+
3261
+ const breakpointM = 1000;
3262
+
3263
+ const breakpointL = 1300;
3264
+
3265
+ const breakpointXL = 1760;
3266
+
3267
+ const breakpointXXL = 1920;
3268
+
3269
+ const breakpoint = {
3270
+ base: breakpointBase,
3271
+ xs: breakpointXS,
3272
+ s: breakpointS,
3273
+ m: breakpointM,
3274
+ l: breakpointL,
3275
+ xl: breakpointXL,
3276
+ xxl: breakpointXXL,
3277
+ };
3278
+
3279
+ const breakpoints = ['base', 'xs', 's', 'm', 'l', 'xl', 'xxl'];
3280
+
3281
+ const _textFontPartA = `${fontStyleNormal} ${fontVariant} ${fontWeightRegular} `;
3282
+ const _textFontPartB = `/${fontLineHeight} ${fontFamily}`;
3283
+
3284
+ const textXSmallStyle = {
3285
+ font: `${_textFontPartA}${fontSizeTextXSmall}${_textFontPartB}`,
3286
+ ...fontHyphenationStyle,
3287
+ };
3288
+
3289
+ const textSmallStyle = {
3290
+ font: `${_textFontPartA}${fontSizeTextSmall}${_textFontPartB}`,
3291
+ ...fontHyphenationStyle,
3292
+ };
3293
+
3294
+ const mediaQueries = Object.values(breakpoint).map((v) => `(min-width:${v}px)`);
3295
+ hasWindow && window.matchMedia ? mediaQueries.map(window.matchMedia) : [];
3296
+
3297
+ Object.entries(breakpoint).reduce((result, [key, val]) => ({ ...result, [`${val}px`]: key }), {});
3298
+
3299
+ const hasVisibleIcon = (iconName, iconSource) => {
3300
+ return iconName !== 'none' || !!iconSource;
3301
+ };
3302
+
3303
+ /**
3304
+ * Map of observed nodes and their corresponding callback functions.
3305
+ */
3306
+ const observedNodesMap = new Map();
3307
+ /**
3308
+ * Mutation observer for observing changes in the children of observed nodes.
3309
+ */
3310
+ hasWindow &&
3311
+ new MutationObserver((mutations) => {
3312
+ // there may be race conditions in jsdom-polyfill tests where the map is already empty when a mutation happens
3313
+ if (observedNodesMap.size) {
3314
+ const observedNodes = Array.from(observedNodesMap.keys());
3315
+ mutations
3316
+ // remove duplicates so we execute callback only once per node
3317
+ .filter((mutation, idx, arr) => arr.findIndex((m) => m.target === mutation.target) === idx)
3318
+ // find all observing parent nodes of mutated node and invoke their callbacks
3319
+ .forEach((mutation) => {
3320
+ observedNodes
3321
+ .filter((node) => node.contains(mutation.target))
3322
+ .forEach((node) => observedNodesMap.get(node)?.());
3323
+ });
3324
+ }
3325
+ });
3326
+
3327
+ const isTouchDevice = () => {
3328
+ if (!hasWindow) {
3329
+ return;
3330
+ }
3331
+ return !!('ontouchstart' in window || window.navigator.maxTouchPoints > 0);
3332
+ };
3333
+
3334
+ /* eslint-disable no-undefined,no-param-reassign,no-shadow */
3335
+
3336
+ /**
3337
+ * Throttle execution of a function. Especially useful for rate limiting
3338
+ * execution of handlers on events like resize and scroll.
3339
+ *
3340
+ * @param {number} delay - A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher)
3341
+ * are most useful.
3342
+ * @param {Function} callback - A function to be executed after delay milliseconds. The `this` context and all arguments are passed through,
3343
+ * as-is, to `callback` when the throttled-function is executed.
3344
+ * @param {object} [options] - An object to configure options.
3345
+ * @param {boolean} [options.noTrailing] - Optional, defaults to false. If noTrailing is true, callback will only execute every `delay` milliseconds
3346
+ * while the throttled-function is being called. If noTrailing is false or unspecified, callback will be executed
3347
+ * one final time after the last throttled-function call. (After the throttled-function has not been called for
3348
+ * `delay` milliseconds, the internal counter is reset).
3349
+ * @param {boolean} [options.noLeading] - Optional, defaults to false. If noLeading is false, the first throttled-function call will execute callback
3350
+ * immediately. If noLeading is true, the first the callback execution will be skipped. It should be noted that
3351
+ * callback will never executed if both noLeading = true and noTrailing = true.
3352
+ * @param {boolean} [options.debounceMode] - If `debounceMode` is true (at begin), schedule `clear` to execute after `delay` ms. If `debounceMode` is
3353
+ * false (at end), schedule `callback` to execute after `delay` ms.
3354
+ *
3355
+ * @returns {Function} A new, throttled, function.
3356
+ */
3357
+ function throttle (delay, callback, options) {
3358
+ var _ref = options || {},
3359
+ _ref$noTrailing = _ref.noTrailing,
3360
+ noTrailing = _ref$noTrailing === void 0 ? false : _ref$noTrailing,
3361
+ _ref$noLeading = _ref.noLeading,
3362
+ noLeading = _ref$noLeading === void 0 ? false : _ref$noLeading,
3363
+ _ref$debounceMode = _ref.debounceMode,
3364
+ debounceMode = _ref$debounceMode === void 0 ? undefined : _ref$debounceMode;
3365
+ /*
3366
+ * After wrapper has stopped being called, this timeout ensures that
3367
+ * `callback` is executed at the proper times in `throttle` and `end`
3368
+ * debounce modes.
3369
+ */
3370
+
3371
+
3372
+ var timeoutID;
3373
+ var cancelled = false; // Keep track of the last time `callback` was executed.
3374
+
3375
+ var lastExec = 0; // Function to clear existing timeout
3376
+
3377
+ function clearExistingTimeout() {
3378
+ if (timeoutID) {
3379
+ clearTimeout(timeoutID);
3380
+ }
3381
+ } // Function to cancel next exec
3382
+
3383
+
3384
+ function cancel(options) {
3385
+ var _ref2 = options || {},
3386
+ _ref2$upcomingOnly = _ref2.upcomingOnly,
3387
+ upcomingOnly = _ref2$upcomingOnly === void 0 ? false : _ref2$upcomingOnly;
3388
+
3389
+ clearExistingTimeout();
3390
+ cancelled = !upcomingOnly;
3391
+ }
3392
+ /*
3393
+ * The `wrapper` function encapsulates all of the throttling / debouncing
3394
+ * functionality and when executed will limit the rate at which `callback`
3395
+ * is executed.
3396
+ */
3397
+
3398
+
3399
+ function wrapper() {
3400
+ for (var _len = arguments.length, arguments_ = new Array(_len), _key = 0; _key < _len; _key++) {
3401
+ arguments_[_key] = arguments[_key];
3402
+ }
3403
+
3404
+ var self = this;
3405
+ var elapsed = Date.now() - lastExec;
3406
+
3407
+ if (cancelled) {
3408
+ return;
3409
+ } // Execute `callback` and update the `lastExec` timestamp.
3410
+
3369
3411
 
3370
- if (minA && maxB) {
3371
- return 1
3372
- }
3373
- if (maxA && minB) {
3374
- return -1
3375
- }
3412
+ function exec() {
3413
+ lastExec = Date.now();
3414
+ callback.apply(self, arguments_);
3415
+ }
3416
+ /*
3417
+ * If `debounceMode` is true (at begin) this is used to clear the flag
3418
+ * to allow future `callback` executions.
3419
+ */
3376
3420
 
3377
- const lengthA = _getQueryLength(a);
3378
- const lengthB = _getQueryLength(b);
3379
3421
 
3380
- if (lengthA === maxValue && lengthB === maxValue) {
3381
- return a.localeCompare(b)
3382
- } else if (lengthA === maxValue) {
3383
- return 1
3384
- } else if (lengthB === maxValue) {
3385
- return -1
3386
- }
3422
+ function clear() {
3423
+ timeoutID = undefined;
3424
+ }
3387
3425
 
3388
- if (lengthA > lengthB) {
3389
- if (maxA) {
3390
- return -1
3426
+ if (!noLeading && debounceMode && !timeoutID) {
3427
+ /*
3428
+ * Since `wrapper` is being called for the first time and
3429
+ * `debounceMode` is true (at begin), execute `callback`
3430
+ * and noLeading != true.
3431
+ */
3432
+ exec();
3391
3433
  }
3392
- return 1
3393
- }
3394
3434
 
3395
- if (lengthA < lengthB) {
3396
- if (maxA) {
3397
- return 1
3435
+ clearExistingTimeout();
3436
+
3437
+ if (debounceMode === undefined && elapsed > delay) {
3438
+ if (noLeading) {
3439
+ /*
3440
+ * In throttle mode with noLeading, if `delay` time has
3441
+ * been exceeded, update `lastExec` and schedule `callback`
3442
+ * to execute after `delay` ms.
3443
+ */
3444
+ lastExec = Date.now();
3445
+
3446
+ if (!noTrailing) {
3447
+ timeoutID = setTimeout(debounceMode ? clear : exec, delay);
3448
+ }
3449
+ } else {
3450
+ /*
3451
+ * In throttle mode without noLeading, if `delay` time has been exceeded, execute
3452
+ * `callback`.
3453
+ */
3454
+ exec();
3455
+ }
3456
+ } else if (noTrailing !== true) {
3457
+ /*
3458
+ * In trailing throttle mode, since `delay` time has not been
3459
+ * exceeded, schedule `callback` to execute `delay` ms after most
3460
+ * recent execution.
3461
+ *
3462
+ * If `debounceMode` is true (at begin), schedule `clear` to execute
3463
+ * after `delay` ms.
3464
+ *
3465
+ * If `debounceMode` is false (at end), schedule `callback` to
3466
+ * execute after `delay` ms.
3467
+ */
3468
+ timeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);
3398
3469
  }
3399
- return -1
3400
3470
  }
3401
3471
 
3402
- return -(a.localeCompare(b))
3403
- };
3472
+ wrapper.cancel = cancel; // Return the wrapper function.
3404
3473
 
3405
- // ----------------------------------------
3406
- // Exports
3407
- // ----------------------------------------
3474
+ return wrapper;
3475
+ }
3408
3476
 
3409
- var sortCssMediaQueries = sortCSSmq$1;
3477
+ /* eslint-disable no-undefined */
3478
+ /**
3479
+ * Debounce execution of a function. Debouncing, unlike throttling,
3480
+ * guarantees that a function is only executed a single time, either at the
3481
+ * very beginning of a series of calls, or at the very end.
3482
+ *
3483
+ * @param {number} delay - A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher) are most useful.
3484
+ * @param {Function} callback - A function to be executed after delay milliseconds. The `this` context and all arguments are passed through, as-is,
3485
+ * to `callback` when the debounced-function is executed.
3486
+ * @param {object} [options] - An object to configure options.
3487
+ * @param {boolean} [options.atBegin] - Optional, defaults to false. If atBegin is false or unspecified, callback will only be executed `delay` milliseconds
3488
+ * after the last debounced-function call. If atBegin is true, callback will be executed only at the first debounced-function call.
3489
+ * (After the throttled-function has not been called for `delay` milliseconds, the internal counter is reset).
3490
+ *
3491
+ * @returns {Function} A new, debounced function.
3492
+ */
3410
3493
 
3411
- var _tslib = _tslib$1;
3412
- var jss$1 = require$$1;
3413
- var sortCSSmq = sortCssMediaQueries;
3494
+ function debounce (delay, callback, options) {
3495
+ var _ref = options || {},
3496
+ _ref$atBegin = _ref.atBegin,
3497
+ atBegin = _ref$atBegin === void 0 ? false : _ref$atBegin;
3414
3498
 
3415
- function _interopDefaultLegacy(e) {
3416
- return e && typeof e === 'object' && 'default' in e ? e : { default: e };
3499
+ return throttle(delay, callback, {
3500
+ debounceMode: atBegin !== false
3501
+ });
3417
3502
  }
3503
+ debounce(800, (el, ariaElement) => {
3504
+ ariaElement.innerText = `You have ${el.maxLength - el.value.length} out of ${el.maxLength} characters left`;
3505
+ });
3418
3506
 
3419
- var sortCSSmq__default = /*#__PURE__*/ _interopDefaultLegacy(sortCSSmq);
3507
+ const getRole = (state) => {
3508
+ return state === 'error' ? 'alert' : state === 'success' ? 'status' : null;
3509
+ };
3420
3510
 
3421
- function isPlainObject(sample) {
3422
- return (
3423
- sample !== null && typeof sample === 'object' && Array.isArray(sample) === false
3424
- );
3425
- }
3426
- var UN_QUERIED = '__UN_QUERIED';
3427
- function recursiveInnerAndGetQueries(pluginOptions, rules) {
3428
- var queries = {
3429
- groups: {},
3430
- groupsSortNames: []
3431
- };
3432
- for (var index = 0; index < rules.length; index++) {
3433
- var rule = rules[index];
3434
- var query =
3435
- rule.type === 'conditional' && typeof rule.query === 'string'
3436
- ? rule.query
3437
- : UN_QUERIED;
3438
- if (!queries.groups.hasOwnProperty(query)) {
3439
- queries.groupsSortNames.push(query);
3440
- queries.groups[query] = [];
3441
- }
3442
- queries.groups[query].push(index);
3443
- // eslint-disable-next-line @typescript-eslint/no-use-before-define
3444
- recursive(pluginOptions, rule);
3445
- }
3446
- queries.groupsSortNames.sort(function (a, b) {
3447
- var aWeight = a === UN_QUERIED ? 0 : a.length;
3448
- var bWeight = b === UN_QUERIED ? 0 : b.length;
3449
- if (aWeight > 0 && bWeight > 0) {
3450
- if (pluginOptions.desktopFirst) {
3451
- return sortCSSmq__default['default'].desktopFirst(a, b);
3452
- } else {
3453
- return sortCSSmq__default['default'](a, b);
3454
- }
3455
- } else {
3456
- return aWeight - bWeight;
3457
- }
3458
- });
3459
- return queries;
3460
- }
3461
- function recursive(pluginOptions, data) {
3462
- if (isPlainObject(data) && data.rules instanceof jss$1.RuleList) {
3463
- data.rules.toString = function (options) {
3464
- if (options === void 0) {
3465
- options = {};
3466
- }
3467
- var str = '';
3468
- var sheet = this.options.sheet;
3469
- var link = sheet ? sheet.options.link : false;
3470
- var _a = recursiveInnerAndGetQueries(pluginOptions, this.index),
3471
- groups = _a.groups,
3472
- groupsSortNames = _a.groupsSortNames;
3473
- for (var i = 0; i < groupsSortNames.length; i++) {
3474
- var groupName = groupsSortNames[i];
3475
- var group = groups[groupsSortNames[i]];
3476
- if (groupName !== UN_QUERIED && pluginOptions.combineMediaQueries) {
3477
- str += '\n' + groupName + ' {';
3478
- for (var i_1 = 0; i_1 < group.length; i_1++) {
3479
- var rule = this.index[group[i_1]];
3480
- var css = rule.rules.toString(
3481
- _tslib.__assign(_tslib.__assign({}, options), {
3482
- indent: (options.indent || 0) + 1
3483
- })
3484
- );
3485
- if (!css && !link) continue;
3486
- if (str) str += '\n';
3487
- str += css;
3488
- }
3489
- str += '\n}\n';
3490
- } else {
3491
- for (var i_2 = 0; i_2 < group.length; i_2++) {
3492
- var rule = this.index[group[i_2]];
3493
- var css = rule.toString(options);
3494
- if (!css && !link) continue;
3495
- if (str) str += '\n';
3496
- str += css;
3497
- }
3498
- }
3499
- }
3500
- return str;
3501
- };
3502
- }
3503
- }
3504
- function jssCombineAndSortMQ(options) {
3505
- if (options === void 0) {
3506
- options = {};
3507
- }
3508
- return {
3509
- onProcessSheet: function (sheet) {
3510
- recursive(options, sheet);
3511
- }
3512
- };
3513
- }
3511
+ const isWithinForm = (host) => !!getClosestHTMLElement(host, 'form');
3514
3512
 
3515
- var dist = jssCombineAndSortMQ;
3513
+ const getCDNBaseURL = () => global.PORSCHE_DESIGN_SYSTEM_CDN_URL + "/porsche-design-system";
3516
3514
 
3517
- var jssPluginSortMediaQueries = /*@__PURE__*/getDefaultExportFromCjs(dist);
3515
+ const CRESTS_MANIFEST = { "porscheCrest": { "1x": { "png": "porsche-crest.min.d76137cf8cf94822b7aedb534ba88418@1x.png", "webp": "porsche-crest.min.0d0cc89ae5ee57c4c15bd0dbbcbfe5d0@1x.webp" }, "2x": { "png": "porsche-crest.min.8a292fbd35a5155789ddd011585e05c4@2x.png", "webp": "porsche-crest.min.2245c45e99be5a46b4b56e73c43d5c63@2x.webp" }, "3x": { "png": "porsche-crest.min.18d6f02003b0829bac939fade88fd4e6@3x.png", "webp": "porsche-crest.min.19b429278b158b5cb5aa6ce80751e3fe@3x.webp" } } };
3518
3516
 
3519
- /* Auto Generated Start */
3520
- const themeLight = {
3521
- primaryColor: '#010205',
3522
- primaryColorDarken: '#000000',
3523
- backgroundColor: '#FFF',
3524
- backgroundColorDarken: '#E0E0E0',
3525
- backgroundColorLighten: '#FFFFFF',
3526
- backgroundSurfaceColor: '#EEEFF2',
3527
- backgroundSurfaceColorDarken: '#CBCED7',
3528
- backgroundSurfaceColorLighten: '#FFFFFF',
3529
- contrastLowColor: '#D8D8DB',
3530
- contrastMediumColor: '#6B6D70',
3531
- contrastHighColor: '#535457',
3532
- contrastHighColorDarken: '#353638',
3533
- contrastHighColorLighten: '#717276',
3534
- hoverColor: 'rgba(148, 149, 152, .18)',
3535
- hoverColorDarken: '#75767A',
3536
- activeColor: 'rgba(148, 149, 152, 0.20)',
3537
- focusColor: '#1A44EA',
3538
- disabledColor: '#949598',
3539
- errorColor: '#CC1922',
3540
- errorColorDarken: '#951219',
3541
- errorSoftColor: '#FFE2E4',
3542
- errorSoftColorDarken: '#F4CED1',
3543
- errorSoftColorLighten: '#FFFFFF',
3544
- successColor: '#197E10',
3545
- successColorDarken: '#0E4809',
3546
- successSoftColor: '#E4FFEC',
3547
- successSoftColorDarken: '#D0F4DB',
3548
- successSoftColorLighten: '#FFFFFF',
3549
- warningColor: '#F3BE00',
3550
- warningSoftColor: '#FFF4D2',
3551
- warningSoftColorDarken: '#F1E5C1',
3552
- warningSoftColorLighten: '#FCFAF3',
3553
- infoColor: '#2762EC',
3554
- infoSoftColor: '#D3E1FF',
3555
- infoSoftColorDarken: '#C2D1F1',
3556
- infoSoftColorLighten: '#F4F7FD'
3557
- };
3558
- const themeDark = {
3559
- primaryColor: '#FBFCFF',
3560
- primaryColorDarken: '#BECEFF',
3561
- backgroundColor: '#0E0E12',
3562
- backgroundColorDarken: '#000000',
3563
- backgroundColorLighten: '#292934',
3564
- backgroundSurfaceColor: '#212225',
3565
- backgroundSurfaceColorDarken: '#040405',
3566
- backgroundSurfaceColorLighten: '#3E4045',
3567
- contrastLowColor: '#404044',
3568
- contrastMediumColor: '#88898C',
3569
- contrastHighColor: '#AFB0B3',
3570
- contrastHighColorDarken: '#909195',
3571
- contrastHighColorLighten: '#CECFD1',
3572
- hoverColor: 'rgba(148, 149, 152, .18)',
3573
- hoverColorDarken: '#75767A',
3574
- activeColor: 'rgba(126, 127, 130, 0.20)',
3575
- focusColor: '#1A44EA',
3576
- disabledColor: '#7E7F82',
3577
- errorColor: '#FC4040',
3578
- errorColorDarken: '#FB0404',
3579
- errorSoftColor: '#3A0F0F',
3580
- errorSoftColorDarken: '#1A1111',
3581
- errorSoftColorLighten: '#3F2828',
3582
- successColor: '#09D087',
3583
- successColorDarken: '#069561',
3584
- successSoftColor: '#003320',
3585
- successSoftColorDarken: '#04110C',
3586
- successSoftColorLighten: '#0F432F',
3587
- warningColor: '#F7CB47',
3588
- warningSoftColor: '#362B0A',
3589
- warningSoftColorDarken: '#16130B',
3590
- warningSoftColorLighten: '#3E3720',
3591
- infoColor: '#178BFF',
3592
- infoSoftColor: '#04294E',
3593
- infoSoftColorDarken: '#0C1A27',
3594
- infoSoftColorLighten: '#1A3856'
3595
- };
3596
- const themeAuto = {
3597
- ...themeLight,
3598
- };
3599
- const themes = {
3600
- 'light': themeLight,
3601
- 'dark': themeDark,
3602
- 'auto': themeAuto
3603
- };
3604
- /* Auto Generated End */
3605
- const schemeHighContrastMerged = {
3606
- disabledColor: 'GrayText',
3607
- focusColor: 'Highlight',
3608
- };
3609
- const schemeHighContrast = {
3610
- canvasColor: 'Canvas',
3611
- canvasTextColor: 'CanvasText',
3612
- highlightColor: 'Highlight',
3613
- linkColor: 'LinkText',
3614
- };
3615
- const getThemedColors = (theme) => {
3616
- return isHighContrastMode ? { ...themes[theme], ...schemeHighContrastMerged } : themes[theme];
3617
- };
3618
- const getHighContrastColors = () => {
3619
- return schemeHighContrast;
3620
- };
3517
+ const ICONS_MANIFEST = { "360": "360.min.5f2fcac02969bc425484fe8d80e5a1c9.svg", "accessibility": "accessibility.min.295a9d53a11c42212b8cce594982dfd2.svg", "active-cabin-ventilation": "active-cabin-ventilation.min.030c46def7a7397091d920b65bc0da3c.svg", "add": "add.min.8578a2d10c79a78e398e963b506b6cb5.svg", "adjust": "adjust.min.cdb89f5c161a4c82328fe60e72a88c59.svg", "arrow-double-down": "arrow-double-down.min.3b17923187ef2114d1f17da042fc97ca.svg", "arrow-double-left": "arrow-double-left.min.bba22e26f025c439b600bf74f0566465.svg", "arrow-double-right": "arrow-double-right.min.14f743d4adb5467fc0e95ac7f6426e1f.svg", "arrow-double-up": "arrow-double-up.min.8e3b3e31d227366f916c91dcb6e1b466.svg", "arrow-down": "arrow-down.min.84e69acc6554637cc373b8a4f50ba991.svg", "arrow-first": "arrow-first.min.bc51317ecf4953a664870ebab5059775.svg", "arrow-head-down": "arrow-head-down.min.454c189f4914925447670d0ae9bd2043.svg", "arrow-head-left": "arrow-head-left.min.aa2da7b4dbbb8a28c046592290054e94.svg", "arrow-head-right": "arrow-head-right.min.fb602ae5cb51970770570a70287e77e9.svg", "arrow-head-up": "arrow-head-up.min.2c282619214e4f998e1ac64a61b5545b.svg", "arrow-last": "arrow-last.min.72553c4284717d4961f8bcf8d51e0303.svg", "arrow-left": "arrow-left.min.24e8467ef0f8f206f228a3d8d443d70b.svg", "arrow-right": "arrow-right.min.8fb7b42d2d08d60f918602aa28475c0b.svg", "arrow-up": "arrow-up.min.0bc737f7f2cc56ef65c5d33472e014b0.svg", "augmented-reality": "augmented-reality.min.290ff033e35774fd093e1ab8ed07e10f.svg", "battery-empty": "battery-empty.min.8594e37d3e67a95b85eb9935f02e69cf.svg", "battery-full": "battery-full.min.4c75acb5a64a6dd3116ede7b1859a6d6.svg", "bell": "bell.min.d69dc9a220dec323e758ccbff756b5b5.svg", "bookmark": "bookmark.min.0cb177c79674593133f6d3d384c5df4b.svg", "broadcast": "broadcast.min.edbfac03d4afdc964d350f54df79c6f3.svg", "calculator": "calculator.min.2518729352d3709e488e71dcbf449247.svg", "calendar": "calendar.min.588fabe880634ece974291f5adfee50d.svg", "camera": "camera.min.10af3a4fac8c289775390534a50606d0.svg", "car": "car.min.4eeec04c87a14bb5d3d316eeeee0185b.svg", "car-battery": "car-battery.min.2a619bbd456ad531c922bf8f51b70977.svg", "card": "card.min.06394222c7ca5d6c7e783d6f86f030a6.svg", "charging-active": "charging-active.min.915410d626a52a3a76b6bf498491c255.svg", "charging-state": "charging-state.min.c5cb87ef2808f824f352a6ebd9b9d4a9.svg", "charging-station": "charging-station.min.211fcf0f9a9bb50b6e83482ee588dda9.svg", "chart": "chart.min.267e23c07f47784c186c5119b870df76.svg", "chat": "chat.min.a8a52d1b8b463ee0e5a3b0d812c9a40c.svg", "check": "check.min.0cb26d9a5ee1d217e5054f1ad60ae3b4.svg", "city": "city.min.a99b88b51adda8244a2c72953a2f4ab4.svg", "climate": "climate.min.5d52b2880552275d9032afc0fa2b7296.svg", "climate-control": "climate-control.min.152235d2bf2b7ec6e1a3c40e6971c446.svg", "clock": "clock.min.bcea9f182e1fe861ea6e765650f79b38.svg", "close": "close.min.eefab6ef191882058f9ed548bd5a467e.svg", "closed-caption": "closed-caption.min.b93ac43c07223fda14249d2279823f6a.svg", "co2-emission": "co2-emission.min.788590454baa0f6c52dfc99a55fe0b85.svg", "compare": "compare.min.657a924ca48bf93d200d2e6539fa8050.svg", "configurate": "configurate.min.2d137bc6f43ee03587188b571c97aacd.svg", "copy": "copy.min.b47f2ffbfefd05782509bb83951c6577.svg", "country-road": "country-road.min.3ee2c1be9d063f5d7c5772fcc7ae2568.svg", "cubic-capacity": "cubic-capacity.min.b5df863671bdf059bce19eddc2990698.svg", "delete": "delete.min.fd9788c3a0842a7bb1d737c6de1969d1.svg", "disable": "disable.min.c3d85d4ed9738c077d19e524775dbd56.svg", "document": "document.min.d2db26d7049ab2180361c7ce40f52d57.svg", "download": "download.min.d7c63bcbadf4dd5b14c3c79a438d93f3.svg", "duration": "duration.min.9405be759f64c8253076f7e55c80c336.svg", "edit": "edit.min.06bde2175fafb58233fa1ce6d3d00f83.svg", "email": "email.min.eb8ff02812a48c5098d3c40614e8d9d7.svg", "error-filled": "error-filled.min.35d7da7cb866bcfd3a25859f8cd2246b.svg", "exclamation": "exclamation.min.6ca46945978bd4eb2a40dc29766b1882.svg", "external": "external.min.b804bef35446f6b3cb379c121de3f13d.svg", "filter": "filter.min.60f168332c7550dfdf714ed0507877b0.svg", "fingerprint": "fingerprint.min.edc52a4b691f8495ef0ca66184f62544.svg", "flash": "flash.min.e5a6de1239300a6104076ee67aec42ca.svg", "fuel-station": "fuel-station.min.0155159076984cccdbfe854eb4da3720.svg", "garage": "garage.min.463577e6a1ffac592b5aa7bec9a82d39.svg", "gift": "gift.min.eeb1a5871a4008bcafd9495fe11ec9bc.svg", "globe": "globe.min.50fd2c886a822673902bd106efc73c3f.svg", "grid": "grid.min.c36c5015115005dcb9c948f07af0be80.svg", "heart": "heart.min.132eca7a5d16b091f23340b3ae359294.svg", "heart-filled": "heart-filled.min.4d48b6bb07a6a2159e765d0c621543a0.svg", "highway": "highway.min.ea773dcf33a43fa8e82beae96c1222b7.svg", "home": "home.min.2bdc01bb7c9b39fa5ef5a81c8c3f9f49.svg", "horn": "horn.min.77105eb430a033a3ffdf21f9fecd32de.svg", "image": "image.min.851c64681e1950312a934a723ca04a85.svg", "increase": "increase.min.45bfe421e86192da37c8cca4917c10c2.svg", "information": "information.min.d387e44cc786ca3df3702f429518a1d9.svg", "information-filled": "information-filled.min.1055e842bb7d89c061ff1b5f47ed6169.svg", "key": "key.min.37b5e8ff9fda430f855f4b82bfd03485.svg", "leaf": "leaf.min.ea91b1d04ade4c49640e89ade35c9d90.svg", "leather": "leather.min.ef9e664d2fc3c28171fbd3d93b079503.svg", "light": "light.min.5fa3dd77ee9c63e28614c4c7c4a6d39c.svg", "list": "list.min.ecaeee96ec6cf2f8c9028ea404113a9e.svg", "locate": "locate.min.c28bdf292bbf297eb8109a272e2ffb91.svg", "lock": "lock.min.d258c21c7217cd1342307c45ecd5176e.svg", "lock-open": "lock-open.min.2ef427e273635e3aab7601b0fe92e86e.svg", "logo-apple-podcast": "logo-apple-podcast.min.af7a1f162ae9d6dba90fe155d8688b9c.svg", "logo-baidu": "logo-baidu.min.a8eb57b32e616b21820d86882835fe20.svg", "logo-delicious": "logo-delicious.min.fc2927d4979ffaed1f23160091e0975e.svg", "logo-digg": "logo-digg.min.d7340b3f22cf4a22a8ac3b472c16e0e2.svg", "logo-facebook": "logo-facebook.min.0c2e020d0b61d37e76e6bab67e4d149e.svg", "logo-foursquare": "logo-foursquare.min.b2699d993d9d731892ba01874c0e023d.svg", "logo-gmail": "logo-gmail.min.0c14069d86c2ba0a42c726d96f0cae9c.svg", "logo-google": "logo-google.min.c1f3931d74e40e5cdc875236b7e674a1.svg", "logo-hatena": "logo-hatena.min.021834899da6e6f6a9dd963f4fc3337c.svg", "logo-instagram": "logo-instagram.min.2f8c578e2472dc13b2f0ec8d1b936442.svg", "logo-kaixin": "logo-kaixin.min.8fb995689a3442669df37b5f375922fc.svg", "logo-kakaotalk": "logo-kakaotalk.min.988146b4cd8bced103fd8b5a9be064d8.svg", "logo-linkedin": "logo-linkedin.min.e4848fd4b74404e504fd1a4d5a25b960.svg", "logo-naver": "logo-naver.min.13f97e4c3ad4898d169904caa609f2d0.svg", "logo-pinterest": "logo-pinterest.min.101284bac1d7cf468719fccf416069df.svg", "logo-qq": "logo-qq.min.5d89ab35e4e00e81deadaa2fe0d51a5d.svg", "logo-qq-share": "logo-qq-share.min.01da8f9d6665f4529f349f88b4fb0cfc.svg", "logo-reddit": "logo-reddit.min.40dd42ee1368dbc74611afee4d3c9850.svg", "logo-skyrock": "logo-skyrock.min.9440a0e4a088cdfbfcc99bc91010768a.svg", "logo-sohu": "logo-sohu.min.d7a030336d712a2b44982e65071cd2bc.svg", "logo-spotify": "logo-spotify.min.48fb45730d66998420f8760b6d2f7fcc.svg", "logo-tecent": "logo-tecent.min.fd1ec329327f4cbf5706c393df66af9d.svg", "logo-telegram": "logo-telegram.min.624fca36dd6f6c5b64bce6e617372d77.svg", "logo-tiktok": "logo-tiktok.min.9c5ffad4c76353afaa99feca9e4f2f0a.svg", "logo-tumblr": "logo-tumblr.min.9b77d06b659cee9d5f45015c33c23967.svg", "logo-twitter": "logo-twitter.min.a6a1098cf290c07051a53f14a4efe1b0.svg", "logo-viber": "logo-viber.min.330fbae7d2683b7910d828cbe864f738.svg", "logo-vk": "logo-vk.min.727ba204a194c8cf1b7fc389ac1db14b.svg", "logo-wechat": "logo-wechat.min.0392ff30f188aa9f52480e965142474a.svg", "logo-weibo": "logo-weibo.min.3ded49004baea42d85fa6fcb9d79ccb1.svg", "logo-whatsapp": "logo-whatsapp.min.02c83d3cbde89763eee8fc3bcab02257.svg", "logo-xing": "logo-xing.min.6a5f5fde119a841823d0ef05293b3454.svg", "logo-yahoo": "logo-yahoo.min.622e886e777c08cf80c31dc99ca13f1a.svg", "logo-youku": "logo-youku.min.d35a5283c6d3094748f565c729f56d9f.svg", "logo-youtube": "logo-youtube.min.59c939904cbec0c7793289eb5e68cb99.svg", "logout": "logout.min.aa54756e3aec12f347fdec0a2905a232.svg", "map": "map.min.643551801bfc27a93438c30ebe1d1387.svg", "menu-dots-horizontal": "menu-dots-horizontal.min.94e0804e3a5a30a577cab6296ad8d15d.svg", "menu-dots-vertical": "menu-dots-vertical.min.7ec3f5be33dd3459d7a9bed9fdbe22d3.svg", "menu-lines": "menu-lines.min.30ff09f6e2ce846286dd136279636097.svg", "minus": "minus.min.00cca11ec9ce4bd913abba2059c3f10b.svg", "mobile": "mobile.min.71d3c0d7fb4349383562cc233478f7fb.svg", "moon": "moon.min.5c447b4013210e7c7723ca4b6fdbfa9f.svg", "oil-can": "oil-can.min.31978141ee5529f97833027b1e03294a.svg", "parking-brake": "parking-brake.min.f03105e84898f1db02c6fcbdd008bfcf.svg", "parking-light": "parking-light.min.968af68684df1220b15cff6616e8376e.svg", "pause": "pause.min.dd29b256b73311abf1549ed16fe7a47b.svg", "phone": "phone.min.e1a58c454ffe074b30a5bb16c75ff23f.svg", "pin": "pin.min.c6ce5ea394fd9cf9dca80a592e2aeae4.svg", "pin-filled": "pin-filled.min.e47cf748ce9a27ced935c6b6cf4c59f1.svg", "play": "play.min.703fb2dbebac16ea91a6524914626ae2.svg", "plug": "plug.min.02d79b2702ac5c41020b54bd9eedf523.svg", "plus": "plus.min.dd34f71292a547080b9247a72c1adda2.svg", "preheating": "preheating.min.96ccdd3d24b0634ca820dc894894a34d.svg", "printer": "printer.min.bcd50214772a8fcc1d0f0ae1205610bf.svg", "purchase": "purchase.min.70535cff1a085154ab49ab958fe91aae.svg", "push-pin": "push-pin.min.7cec1084d78eb838957424d8ed62ecf5.svg", "push-pin-off": "push-pin-off.min.de81e394f6d02de580d4408070986097.svg", "qr": "qr.min.1facfc2c9b70057552904fe123674746.svg", "question": "question.min.df469b72598d2dbfb458c46430c0690a.svg", "racing-flag": "racing-flag.min.1aee1d177d44aaaca113a8b7a81db573.svg", "refresh": "refresh.min.36ced59c8e8d06980d6ac20cca8a9057.svg", "replay": "replay.min.d4f212bf3d5f8fe166d78dba57eeacde.svg", "reset": "reset.min.e1ce71f684b6e83b9ed8182389bd407f.svg", "roof-closed": "roof-closed.min.99006124d26ea3014b9169900bc266e1.svg", "roof-open": "roof-open.min.c0322e148f7071f2cb8f6b5d8ef15337.svg", "route": "route.min.49f1935d2a563b150bb382eb56a04972.svg", "rss": "rss.min.eaf3873673fcbff72833e7a77f9510f8.svg", "save": "save.min.6506e50ad89aee223e85fe52242c232e.svg", "screen": "screen.min.c17978f44a7bf9f7d80f178fd2b7d116.svg", "search": "search.min.f2755d61c24b6ad037f51d65588be308.svg", "send": "send.min.544f2b90e562b8582808f735846b1351.svg", "share": "share.min.b7b59aa7085cc865735acfd940480234.svg", "shopping-bag": "shopping-bag.min.9d99682e614f5bbb9760c1a0272bd1e0.svg", "shopping-bag-filled": "shopping-bag-filled.min.566efdc835446512c426a9ef5e3badb0.svg", "shopping-cart": "shopping-cart.min.05a6c651afb21246daba2e941e8366cc.svg", "shopping-cart-filled": "shopping-cart-filled.min.c166601be618e0aadd596b54785f18f2.svg", "sidelights": "sidelights.min.996d591ee87247eae32968bf0b588d1e.svg", "snowflake": "snowflake.min.cf85d1b3c62e223ffb80d8c838d4f0b8.svg", "sort": "sort.min.d90a6657569305b9b09b0c6997b5b915.svg", "stack": "stack.min.d36295767f8e2540bbbf60278114ca09.svg", "star": "star.min.d7445429f599f915661e6c57841ae339.svg", "steering-wheel": "steering-wheel.min.c632bf7d06f41d68f0a95d76615f3981.svg", "stopwatch": "stopwatch.min.c90f1fde0961349fe79c0b077f7b0d41.svg", "subtract": "subtract.min.bb9f2dcb0c81ac7f216f6fe2ba916c09.svg", "success": "success.min.4401a4715549bd7dfaaa4f54684b2088.svg", "success-filled": "success-filled.min.c9cb3c66aebf9c4f40b897064f901335.svg", "sun": "sun.min.a68eb6225965558e4498d3d38c33d52a.svg", "switch": "switch.min.ab6c8b55ab119d9bd5170a1893a75ed2.svg", "tablet": "tablet.min.60e7c4ef821bf610d2b2d5b06c7e88b7.svg", "tachometer": "tachometer.min.348f8c5eed7c61993a864ebcffee98bd.svg", "tire": "tire.min.2094760dbaee1d169fa86f2113a5ca40.svg", "truck": "truck.min.43f91b0320003695d8804cf6a8a86da4.svg", "upload": "upload.min.cf3aaf8fb27e339d26133cbd6a5332ca.svg", "user": "user.min.0f8dcfbe34322e7968b4b23e11d963f0.svg", "user-filled": "user-filled.min.aa7b4c61ce78e08ba35fb513ff9e19dd.svg", "user-group": "user-group.min.87f6ca16e7174b9a8d1894283a8ff1d4.svg", "user-manual": "user-manual.min.0b87e500e3d747e67be964c47a3ae312.svg", "video": "video.min.107dfd64c6fd7398dd48b94d61b2fe11.svg", "view": "view.min.cd78cae7309f44d941e9264047e3efa0.svg", "view-off": "view-off.min.e27746517bdb4c2c9ae5f025c7e74991.svg", "volume-off": "volume-off.min.711d24824df04d61c3129bbdcdbfa083.svg", "volume-up": "volume-up.min.0a2ebc984c6b9d2f53c747f9ba2028f1.svg", "warning": "warning.min.04529c502dddce98f0ae2eec0bfb3432.svg", "warning-filled": "warning-filled.min.ee8effcdc653f660043f909b6f0c938b.svg", "weight": "weight.min.47ef0b98ca8ed590dd7d6e6c3f1bcd46.svg", "wifi": "wifi.min.14540859e9241374bd9d0c89eb85667b.svg", "work": "work.min.d17986d8fcff6a5fcd5e9925e838fade.svg", "wrench": "wrench.min.90e402dc170fe83de23e2c11588ba037.svg", "wrenches": "wrenches.min.990b074555825a218e86fd35397fc88c.svg", "zoom-in": "zoom-in.min.22fa9d7ee8748debc801fe910f2d3d01.svg", "zoom-out": "zoom-out.min.9408a4dc5786ed5a783a729e58ab3d6d.svg" };
3518
+
3519
+ const MARQUES_MANIFEST = { "porscheMarqueTrademark": { "medium": { "1x": { "png": "porsche-marque-trademark.medium.min.da075315857e239ff46bf4c150648ff0@1x.png", "webp": "porsche-marque-trademark.medium.min.5c6af9aa7946fea34f60c8f8c95d0188@1x.webp" }, "2x": { "png": "porsche-marque-trademark.medium.min.aa801f42028b1c385a5e26ae115da598@2x.png", "webp": "porsche-marque-trademark.medium.min.fff6e9b91481cc5b1fc6c9b62987ccaf@2x.webp" }, "3x": { "png": "porsche-marque-trademark.medium.min.824818d15eaf445f50e0a2391613f214@3x.png", "webp": "porsche-marque-trademark.medium.min.f67092ff6b5f4ecb4add73d6ae153db0@3x.webp" } }, "small": { "1x": { "png": "porsche-marque-trademark.small.min.020244b41a29323e2a7932a264514cdf@1x.png", "webp": "porsche-marque-trademark.small.min.783639706bead66b2d56e3b8b64bd61f@1x.webp" }, "2x": { "png": "porsche-marque-trademark.small.min.92184fae44511ceda8320443c17110b1@2x.png", "webp": "porsche-marque-trademark.small.min.760a57efa93d4e7e16e26128ec7ead46@2x.webp" }, "3x": { "png": "porsche-marque-trademark.small.min.fd545cea4298f5d797246d5805711646@3x.png", "webp": "porsche-marque-trademark.small.min.1726036a7829347e1e24d1eb54fc0d64@3x.webp" } } }, "porscheMarque": { "medium": { "1x": { "png": "porsche-marque.medium.min.a98627440b05154565f9f9dfc1ad6187@1x.png", "webp": "porsche-marque.medium.min.fa908e4dfdc5536b0e933e1670d20e1f@1x.webp" }, "2x": { "png": "porsche-marque.medium.min.089d6dd560fff7a2bf613ae6d528990e@2x.png", "webp": "porsche-marque.medium.min.7f0893dc57f2607a2cb0b817d96cb985@2x.webp" }, "3x": { "png": "porsche-marque.medium.min.2cb874345ef290831c929f6caabfeef8@3x.png", "webp": "porsche-marque.medium.min.3534cf066b4e2e737dca62de495f9616@3x.webp" } }, "small": { "1x": { "png": "porsche-marque.small.min.ac2042736af5512cf547c89fa7924c4f@1x.png", "webp": "porsche-marque.small.min.005debed5bf72cf0a9a791b1521f5e1d@1x.webp" }, "2x": { "png": "porsche-marque.small.min.22f1e9dc90399d9a5287eda689b60dba@2x.png", "webp": "porsche-marque.small.min.df4317325d04ffef28c7839aa6d499a0@2x.webp" }, "3x": { "png": "porsche-marque.small.min.49209245f04eadef8817b9bbae80d3e1@3x.png", "webp": "porsche-marque.small.min.cfd6149aaa3bc5b3b522538e5f650890@3x.webp" } } }, "porscheMarque75": { "medium": { "1x": { "png": "porsche-marque75.medium.min.0a02e2256062de963f2fef2c02d20200@1x.png", "webp": "porsche-marque75.medium.min.99b2d657558f0531d639782974e8fd06@1x.webp" }, "2x": { "png": "porsche-marque75.medium.min.1d41ecfb8f5277d3f4bd65d25d22eea3@2x.png", "webp": "porsche-marque75.medium.min.e32580cd1ac179e354ed8fcb31694168@2x.webp" }, "3x": { "png": "porsche-marque75.medium.min.373bcb5f89d31c8b6084e66e902b9f4c@3x.png", "webp": "porsche-marque75.medium.min.4a003d1e5e81db062bf92d52ba797087@3x.webp" } }, "small": { "1x": { "png": "porsche-marque75.small.min.f5b37fe12cd4487432ff77fdd8469f7d@1x.png", "webp": "porsche-marque75.small.min.146b06cffe2b11c07f3113a51f337b98@1x.webp" }, "2x": { "png": "porsche-marque75.small.min.20d86908f2190640a6f24fce1ee49035@2x.png", "webp": "porsche-marque75.small.min.025770f8db54857874c130999b370ed8@2x.webp" }, "3x": { "png": "porsche-marque75.small.min.e89b13e14a088a273107bf1057f7f67d@3x.png", "webp": "porsche-marque75.small.min.a725d2ec7bd07be17afd8feb2589b156@3x.webp" } } } };
3520
+
3521
+ const MODEL_SIGNATURES_MANIFEST = { "718": "718.min.d92dc0fe91e67bd51120d91c5cd1eb2f.svg", "911": "911.min.5c462658f9d472e90a139173414e8fdd.svg", "boxster": "boxster.min.5e7b22a1fa25004a4f97807d57f32b21.svg", "cayenne": "cayenne.min.4026ba6b335cc98e10592f900cf731e1.svg", "cayman": "cayman.min.c634f6f3de1d67610b2e4230e60337fb.svg", "macan": "macan.min.e38fbf34ed4f00066620901babd99af0.svg", "panamera": "panamera.min.d35913b252657f7c5cfcae74cfd61b26.svg", "taycan": "taycan.min.ba4e7c3cb86a78d626d4463b81be0f23.svg", "turbo-s": "turbo-s.min.8201d60c1b5e00daf9e23784fd199111.svg", "turbo": "turbo.min.cfde5de85fdc84be597dfad4402c5f6f.svg" };
3621
3522
  const pxToRemWithUnit = (px) => `${px / 16}rem`;
3622
3523
 
3623
3524
  // NOTE: handpicked selection of plugins from jss-preset-default
@@ -3639,10 +3540,27 @@ const supportsConstructableStylesheets = () => {
3639
3540
  };
3640
3541
  // determine it once
3641
3542
  supportsConstructableStylesheets();
3543
+
3544
+ // This class is shared since the popover needs to register a scroll listener to this node in order to hide the popover when the table is scrolled
3545
+ const scrollAreaClass = 'scroll-area';
3642
3546
  const isScrollable = (isPrevHidden, isNextHidden) => {
3643
3547
  return !(isPrevHidden && isNextHidden);
3644
3548
  };
3645
3549
 
3550
+ /**
3551
+ * Checks if the current environment supports the native Popover API.
3552
+ *
3553
+ * @returns {boolean} `true` if the native Popover API is supported, `false` otherwise.
3554
+ */
3555
+ const supportsNativePopover = () => {
3556
+ if (!hasWindow) {
3557
+ return false;
3558
+ }
3559
+ return HTMLElement.prototype.hasOwnProperty('popover');
3560
+ };
3561
+ // determine it once
3562
+ supportsNativePopover();
3563
+
3646
3564
  const hasDocument = typeof document !== 'undefined';
3647
3565
 
3648
3566
  const isThemeDark = (theme) => {
@@ -3679,8 +3597,6 @@ const isInfinitePagination = (amountOfPages) => {
3679
3597
  return amountOfPages > INFINITE_BULLET_THRESHOLD;
3680
3598
  };
3681
3599
 
3682
- const CRESTS_MANIFEST = { "porscheCrest": { "1x": { "png": "porsche-crest.min.d76137cf8cf94822b7aedb534ba88418@1x.png", "webp": "porsche-crest.min.0d0cc89ae5ee57c4c15bd0dbbcbfe5d0@1x.webp" }, "2x": { "png": "porsche-crest.min.8a292fbd35a5155789ddd011585e05c4@2x.png", "webp": "porsche-crest.min.2245c45e99be5a46b4b56e73c43d5c63@2x.webp" }, "3x": { "png": "porsche-crest.min.18d6f02003b0829bac939fade88fd4e6@3x.png", "webp": "porsche-crest.min.19b429278b158b5cb5aa6ce80751e3fe@3x.webp" } } };
3683
-
3684
3600
  const buildCrestSrcSet = (format) => {
3685
3601
  return Object.entries(CRESTS_MANIFEST.porscheCrest)
3686
3602
  .map(([resolution, fileName]) => `${getCDNBaseURL()}/crest/${fileName[format]} ${resolution}`)
@@ -3751,8 +3667,6 @@ const getHeadlineTagType = (host, variant, tag) => {
3751
3667
  return variantToTagMap[variant] || 'h1';
3752
3668
  }
3753
3669
  };
3754
-
3755
- const ICONS_MANIFEST = { "360": "360.min.5f2fcac02969bc425484fe8d80e5a1c9.svg", "accessibility": "accessibility.min.295a9d53a11c42212b8cce594982dfd2.svg", "active-cabin-ventilation": "active-cabin-ventilation.min.030c46def7a7397091d920b65bc0da3c.svg", "add": "add.min.8578a2d10c79a78e398e963b506b6cb5.svg", "adjust": "adjust.min.cdb89f5c161a4c82328fe60e72a88c59.svg", "arrow-double-down": "arrow-double-down.min.3b17923187ef2114d1f17da042fc97ca.svg", "arrow-double-left": "arrow-double-left.min.bba22e26f025c439b600bf74f0566465.svg", "arrow-double-right": "arrow-double-right.min.14f743d4adb5467fc0e95ac7f6426e1f.svg", "arrow-double-up": "arrow-double-up.min.8e3b3e31d227366f916c91dcb6e1b466.svg", "arrow-down": "arrow-down.min.84e69acc6554637cc373b8a4f50ba991.svg", "arrow-first": "arrow-first.min.bc51317ecf4953a664870ebab5059775.svg", "arrow-head-down": "arrow-head-down.min.454c189f4914925447670d0ae9bd2043.svg", "arrow-head-left": "arrow-head-left.min.aa2da7b4dbbb8a28c046592290054e94.svg", "arrow-head-right": "arrow-head-right.min.fb602ae5cb51970770570a70287e77e9.svg", "arrow-head-up": "arrow-head-up.min.2c282619214e4f998e1ac64a61b5545b.svg", "arrow-last": "arrow-last.min.72553c4284717d4961f8bcf8d51e0303.svg", "arrow-left": "arrow-left.min.24e8467ef0f8f206f228a3d8d443d70b.svg", "arrow-right": "arrow-right.min.8fb7b42d2d08d60f918602aa28475c0b.svg", "arrow-up": "arrow-up.min.0bc737f7f2cc56ef65c5d33472e014b0.svg", "augmented-reality": "augmented-reality.min.290ff033e35774fd093e1ab8ed07e10f.svg", "battery-empty": "battery-empty.min.8594e37d3e67a95b85eb9935f02e69cf.svg", "battery-full": "battery-full.min.4c75acb5a64a6dd3116ede7b1859a6d6.svg", "bell": "bell.min.d69dc9a220dec323e758ccbff756b5b5.svg", "bookmark": "bookmark.min.0cb177c79674593133f6d3d384c5df4b.svg", "broadcast": "broadcast.min.edbfac03d4afdc964d350f54df79c6f3.svg", "calculator": "calculator.min.2518729352d3709e488e71dcbf449247.svg", "calendar": "calendar.min.588fabe880634ece974291f5adfee50d.svg", "camera": "camera.min.10af3a4fac8c289775390534a50606d0.svg", "car": "car.min.4eeec04c87a14bb5d3d316eeeee0185b.svg", "car-battery": "car-battery.min.2a619bbd456ad531c922bf8f51b70977.svg", "card": "card.min.06394222c7ca5d6c7e783d6f86f030a6.svg", "charging-active": "charging-active.min.915410d626a52a3a76b6bf498491c255.svg", "charging-state": "charging-state.min.c5cb87ef2808f824f352a6ebd9b9d4a9.svg", "charging-station": "charging-station.min.211fcf0f9a9bb50b6e83482ee588dda9.svg", "chart": "chart.min.267e23c07f47784c186c5119b870df76.svg", "chat": "chat.min.a8a52d1b8b463ee0e5a3b0d812c9a40c.svg", "check": "check.min.0cb26d9a5ee1d217e5054f1ad60ae3b4.svg", "city": "city.min.a99b88b51adda8244a2c72953a2f4ab4.svg", "climate": "climate.min.5d52b2880552275d9032afc0fa2b7296.svg", "climate-control": "climate-control.min.152235d2bf2b7ec6e1a3c40e6971c446.svg", "clock": "clock.min.bcea9f182e1fe861ea6e765650f79b38.svg", "close": "close.min.eefab6ef191882058f9ed548bd5a467e.svg", "closed-caption": "closed-caption.min.b93ac43c07223fda14249d2279823f6a.svg", "co2-emission": "co2-emission.min.788590454baa0f6c52dfc99a55fe0b85.svg", "compare": "compare.min.657a924ca48bf93d200d2e6539fa8050.svg", "configurate": "configurate.min.2d137bc6f43ee03587188b571c97aacd.svg", "copy": "copy.min.b47f2ffbfefd05782509bb83951c6577.svg", "country-road": "country-road.min.3ee2c1be9d063f5d7c5772fcc7ae2568.svg", "cubic-capacity": "cubic-capacity.min.b5df863671bdf059bce19eddc2990698.svg", "delete": "delete.min.fd9788c3a0842a7bb1d737c6de1969d1.svg", "disable": "disable.min.c3d85d4ed9738c077d19e524775dbd56.svg", "document": "document.min.d2db26d7049ab2180361c7ce40f52d57.svg", "download": "download.min.d7c63bcbadf4dd5b14c3c79a438d93f3.svg", "duration": "duration.min.9405be759f64c8253076f7e55c80c336.svg", "edit": "edit.min.06bde2175fafb58233fa1ce6d3d00f83.svg", "email": "email.min.eb8ff02812a48c5098d3c40614e8d9d7.svg", "error-filled": "error-filled.min.35d7da7cb866bcfd3a25859f8cd2246b.svg", "exclamation": "exclamation.min.6ca46945978bd4eb2a40dc29766b1882.svg", "external": "external.min.b804bef35446f6b3cb379c121de3f13d.svg", "filter": "filter.min.60f168332c7550dfdf714ed0507877b0.svg", "fingerprint": "fingerprint.min.edc52a4b691f8495ef0ca66184f62544.svg", "flash": "flash.min.e5a6de1239300a6104076ee67aec42ca.svg", "fuel-station": "fuel-station.min.0155159076984cccdbfe854eb4da3720.svg", "garage": "garage.min.463577e6a1ffac592b5aa7bec9a82d39.svg", "gift": "gift.min.eeb1a5871a4008bcafd9495fe11ec9bc.svg", "globe": "globe.min.50fd2c886a822673902bd106efc73c3f.svg", "grid": "grid.min.c36c5015115005dcb9c948f07af0be80.svg", "heart": "heart.min.132eca7a5d16b091f23340b3ae359294.svg", "heart-filled": "heart-filled.min.4d48b6bb07a6a2159e765d0c621543a0.svg", "highway": "highway.min.ea773dcf33a43fa8e82beae96c1222b7.svg", "home": "home.min.2bdc01bb7c9b39fa5ef5a81c8c3f9f49.svg", "horn": "horn.min.77105eb430a033a3ffdf21f9fecd32de.svg", "image": "image.min.851c64681e1950312a934a723ca04a85.svg", "increase": "increase.min.45bfe421e86192da37c8cca4917c10c2.svg", "information": "information.min.d387e44cc786ca3df3702f429518a1d9.svg", "information-filled": "information-filled.min.1055e842bb7d89c061ff1b5f47ed6169.svg", "key": "key.min.37b5e8ff9fda430f855f4b82bfd03485.svg", "leaf": "leaf.min.ea91b1d04ade4c49640e89ade35c9d90.svg", "leather": "leather.min.ef9e664d2fc3c28171fbd3d93b079503.svg", "light": "light.min.5fa3dd77ee9c63e28614c4c7c4a6d39c.svg", "list": "list.min.ecaeee96ec6cf2f8c9028ea404113a9e.svg", "locate": "locate.min.c28bdf292bbf297eb8109a272e2ffb91.svg", "lock": "lock.min.d258c21c7217cd1342307c45ecd5176e.svg", "lock-open": "lock-open.min.2ef427e273635e3aab7601b0fe92e86e.svg", "logo-apple-podcast": "logo-apple-podcast.min.af7a1f162ae9d6dba90fe155d8688b9c.svg", "logo-baidu": "logo-baidu.min.a8eb57b32e616b21820d86882835fe20.svg", "logo-delicious": "logo-delicious.min.fc2927d4979ffaed1f23160091e0975e.svg", "logo-digg": "logo-digg.min.d7340b3f22cf4a22a8ac3b472c16e0e2.svg", "logo-facebook": "logo-facebook.min.0c2e020d0b61d37e76e6bab67e4d149e.svg", "logo-foursquare": "logo-foursquare.min.b2699d993d9d731892ba01874c0e023d.svg", "logo-gmail": "logo-gmail.min.0c14069d86c2ba0a42c726d96f0cae9c.svg", "logo-google": "logo-google.min.c1f3931d74e40e5cdc875236b7e674a1.svg", "logo-hatena": "logo-hatena.min.021834899da6e6f6a9dd963f4fc3337c.svg", "logo-instagram": "logo-instagram.min.2f8c578e2472dc13b2f0ec8d1b936442.svg", "logo-kaixin": "logo-kaixin.min.8fb995689a3442669df37b5f375922fc.svg", "logo-kakaotalk": "logo-kakaotalk.min.988146b4cd8bced103fd8b5a9be064d8.svg", "logo-linkedin": "logo-linkedin.min.e4848fd4b74404e504fd1a4d5a25b960.svg", "logo-naver": "logo-naver.min.13f97e4c3ad4898d169904caa609f2d0.svg", "logo-pinterest": "logo-pinterest.min.101284bac1d7cf468719fccf416069df.svg", "logo-qq": "logo-qq.min.5d89ab35e4e00e81deadaa2fe0d51a5d.svg", "logo-qq-share": "logo-qq-share.min.01da8f9d6665f4529f349f88b4fb0cfc.svg", "logo-reddit": "logo-reddit.min.40dd42ee1368dbc74611afee4d3c9850.svg", "logo-skyrock": "logo-skyrock.min.9440a0e4a088cdfbfcc99bc91010768a.svg", "logo-sohu": "logo-sohu.min.d7a030336d712a2b44982e65071cd2bc.svg", "logo-spotify": "logo-spotify.min.48fb45730d66998420f8760b6d2f7fcc.svg", "logo-tecent": "logo-tecent.min.fd1ec329327f4cbf5706c393df66af9d.svg", "logo-telegram": "logo-telegram.min.624fca36dd6f6c5b64bce6e617372d77.svg", "logo-tiktok": "logo-tiktok.min.9c5ffad4c76353afaa99feca9e4f2f0a.svg", "logo-tumblr": "logo-tumblr.min.9b77d06b659cee9d5f45015c33c23967.svg", "logo-twitter": "logo-twitter.min.a6a1098cf290c07051a53f14a4efe1b0.svg", "logo-viber": "logo-viber.min.330fbae7d2683b7910d828cbe864f738.svg", "logo-vk": "logo-vk.min.727ba204a194c8cf1b7fc389ac1db14b.svg", "logo-wechat": "logo-wechat.min.0392ff30f188aa9f52480e965142474a.svg", "logo-weibo": "logo-weibo.min.3ded49004baea42d85fa6fcb9d79ccb1.svg", "logo-whatsapp": "logo-whatsapp.min.02c83d3cbde89763eee8fc3bcab02257.svg", "logo-xing": "logo-xing.min.6a5f5fde119a841823d0ef05293b3454.svg", "logo-yahoo": "logo-yahoo.min.622e886e777c08cf80c31dc99ca13f1a.svg", "logo-youku": "logo-youku.min.d35a5283c6d3094748f565c729f56d9f.svg", "logo-youtube": "logo-youtube.min.59c939904cbec0c7793289eb5e68cb99.svg", "logout": "logout.min.aa54756e3aec12f347fdec0a2905a232.svg", "map": "map.min.643551801bfc27a93438c30ebe1d1387.svg", "menu-dots-horizontal": "menu-dots-horizontal.min.94e0804e3a5a30a577cab6296ad8d15d.svg", "menu-dots-vertical": "menu-dots-vertical.min.7ec3f5be33dd3459d7a9bed9fdbe22d3.svg", "menu-lines": "menu-lines.min.30ff09f6e2ce846286dd136279636097.svg", "minus": "minus.min.00cca11ec9ce4bd913abba2059c3f10b.svg", "mobile": "mobile.min.71d3c0d7fb4349383562cc233478f7fb.svg", "moon": "moon.min.5c447b4013210e7c7723ca4b6fdbfa9f.svg", "oil-can": "oil-can.min.31978141ee5529f97833027b1e03294a.svg", "parking-brake": "parking-brake.min.f03105e84898f1db02c6fcbdd008bfcf.svg", "parking-light": "parking-light.min.968af68684df1220b15cff6616e8376e.svg", "pause": "pause.min.dd29b256b73311abf1549ed16fe7a47b.svg", "phone": "phone.min.e1a58c454ffe074b30a5bb16c75ff23f.svg", "pin": "pin.min.c6ce5ea394fd9cf9dca80a592e2aeae4.svg", "pin-filled": "pin-filled.min.e47cf748ce9a27ced935c6b6cf4c59f1.svg", "play": "play.min.703fb2dbebac16ea91a6524914626ae2.svg", "plug": "plug.min.02d79b2702ac5c41020b54bd9eedf523.svg", "plus": "plus.min.dd34f71292a547080b9247a72c1adda2.svg", "preheating": "preheating.min.96ccdd3d24b0634ca820dc894894a34d.svg", "printer": "printer.min.bcd50214772a8fcc1d0f0ae1205610bf.svg", "purchase": "purchase.min.70535cff1a085154ab49ab958fe91aae.svg", "push-pin": "push-pin.min.7cec1084d78eb838957424d8ed62ecf5.svg", "push-pin-off": "push-pin-off.min.de81e394f6d02de580d4408070986097.svg", "qr": "qr.min.1facfc2c9b70057552904fe123674746.svg", "question": "question.min.df469b72598d2dbfb458c46430c0690a.svg", "racing-flag": "racing-flag.min.1aee1d177d44aaaca113a8b7a81db573.svg", "refresh": "refresh.min.36ced59c8e8d06980d6ac20cca8a9057.svg", "replay": "replay.min.d4f212bf3d5f8fe166d78dba57eeacde.svg", "reset": "reset.min.e1ce71f684b6e83b9ed8182389bd407f.svg", "roof-closed": "roof-closed.min.99006124d26ea3014b9169900bc266e1.svg", "roof-open": "roof-open.min.c0322e148f7071f2cb8f6b5d8ef15337.svg", "route": "route.min.49f1935d2a563b150bb382eb56a04972.svg", "rss": "rss.min.eaf3873673fcbff72833e7a77f9510f8.svg", "save": "save.min.6506e50ad89aee223e85fe52242c232e.svg", "screen": "screen.min.c17978f44a7bf9f7d80f178fd2b7d116.svg", "search": "search.min.f2755d61c24b6ad037f51d65588be308.svg", "send": "send.min.544f2b90e562b8582808f735846b1351.svg", "share": "share.min.b7b59aa7085cc865735acfd940480234.svg", "shopping-bag": "shopping-bag.min.9d99682e614f5bbb9760c1a0272bd1e0.svg", "shopping-bag-filled": "shopping-bag-filled.min.566efdc835446512c426a9ef5e3badb0.svg", "shopping-cart": "shopping-cart.min.05a6c651afb21246daba2e941e8366cc.svg", "shopping-cart-filled": "shopping-cart-filled.min.c166601be618e0aadd596b54785f18f2.svg", "sidelights": "sidelights.min.996d591ee87247eae32968bf0b588d1e.svg", "snowflake": "snowflake.min.cf85d1b3c62e223ffb80d8c838d4f0b8.svg", "sort": "sort.min.d90a6657569305b9b09b0c6997b5b915.svg", "stack": "stack.min.d36295767f8e2540bbbf60278114ca09.svg", "star": "star.min.d7445429f599f915661e6c57841ae339.svg", "steering-wheel": "steering-wheel.min.c632bf7d06f41d68f0a95d76615f3981.svg", "stopwatch": "stopwatch.min.c90f1fde0961349fe79c0b077f7b0d41.svg", "subtract": "subtract.min.bb9f2dcb0c81ac7f216f6fe2ba916c09.svg", "success": "success.min.4401a4715549bd7dfaaa4f54684b2088.svg", "success-filled": "success-filled.min.c9cb3c66aebf9c4f40b897064f901335.svg", "sun": "sun.min.a68eb6225965558e4498d3d38c33d52a.svg", "switch": "switch.min.ab6c8b55ab119d9bd5170a1893a75ed2.svg", "tablet": "tablet.min.60e7c4ef821bf610d2b2d5b06c7e88b7.svg", "tachometer": "tachometer.min.348f8c5eed7c61993a864ebcffee98bd.svg", "tire": "tire.min.2094760dbaee1d169fa86f2113a5ca40.svg", "truck": "truck.min.43f91b0320003695d8804cf6a8a86da4.svg", "upload": "upload.min.cf3aaf8fb27e339d26133cbd6a5332ca.svg", "user": "user.min.0f8dcfbe34322e7968b4b23e11d963f0.svg", "user-filled": "user-filled.min.aa7b4c61ce78e08ba35fb513ff9e19dd.svg", "user-group": "user-group.min.87f6ca16e7174b9a8d1894283a8ff1d4.svg", "user-manual": "user-manual.min.0b87e500e3d747e67be964c47a3ae312.svg", "video": "video.min.107dfd64c6fd7398dd48b94d61b2fe11.svg", "view": "view.min.cd78cae7309f44d941e9264047e3efa0.svg", "view-off": "view-off.min.e27746517bdb4c2c9ae5f025c7e74991.svg", "volume-off": "volume-off.min.711d24824df04d61c3129bbdcdbfa083.svg", "volume-up": "volume-up.min.0a2ebc984c6b9d2f53c747f9ba2028f1.svg", "warning": "warning.min.04529c502dddce98f0ae2eec0bfb3432.svg", "warning-filled": "warning-filled.min.ee8effcdc653f660043f909b6f0c938b.svg", "weight": "weight.min.47ef0b98ca8ed590dd7d6e6c3f1bcd46.svg", "wifi": "wifi.min.14540859e9241374bd9d0c89eb85667b.svg", "work": "work.min.d17986d8fcff6a5fcd5e9925e838fade.svg", "wrench": "wrench.min.90e402dc170fe83de23e2c11588ba037.svg", "wrenches": "wrenches.min.990b074555825a218e86fd35397fc88c.svg", "zoom-in": "zoom-in.min.22fa9d7ee8748debc801fe910f2d3d01.svg", "zoom-out": "zoom-out.min.9408a4dc5786ed5a783a729e58ab3d6d.svg" };
3756
3670
  const isUrl = (str) => str?.length > 0 && /(\/)/.test(str);
3757
3671
  const DEFAULT_ICON_NAME = 'arrow-right';
3758
3672
  // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
@@ -3787,8 +3701,6 @@ const getContentAriaAttributes = (state, labelId, descriptionId) => {
3787
3701
  'aria-describedby': descriptionId,
3788
3702
  };
3789
3703
  };
3790
-
3791
- const MARQUES_MANIFEST = { "porscheMarqueTrademark": { "medium": { "1x": { "png": "porsche-marque-trademark.medium.min.da075315857e239ff46bf4c150648ff0@1x.png", "webp": "porsche-marque-trademark.medium.min.5c6af9aa7946fea34f60c8f8c95d0188@1x.webp" }, "2x": { "png": "porsche-marque-trademark.medium.min.aa801f42028b1c385a5e26ae115da598@2x.png", "webp": "porsche-marque-trademark.medium.min.fff6e9b91481cc5b1fc6c9b62987ccaf@2x.webp" }, "3x": { "png": "porsche-marque-trademark.medium.min.824818d15eaf445f50e0a2391613f214@3x.png", "webp": "porsche-marque-trademark.medium.min.f67092ff6b5f4ecb4add73d6ae153db0@3x.webp" } }, "small": { "1x": { "png": "porsche-marque-trademark.small.min.020244b41a29323e2a7932a264514cdf@1x.png", "webp": "porsche-marque-trademark.small.min.783639706bead66b2d56e3b8b64bd61f@1x.webp" }, "2x": { "png": "porsche-marque-trademark.small.min.92184fae44511ceda8320443c17110b1@2x.png", "webp": "porsche-marque-trademark.small.min.760a57efa93d4e7e16e26128ec7ead46@2x.webp" }, "3x": { "png": "porsche-marque-trademark.small.min.fd545cea4298f5d797246d5805711646@3x.png", "webp": "porsche-marque-trademark.small.min.1726036a7829347e1e24d1eb54fc0d64@3x.webp" } } }, "porscheMarque": { "medium": { "1x": { "png": "porsche-marque.medium.min.a98627440b05154565f9f9dfc1ad6187@1x.png", "webp": "porsche-marque.medium.min.fa908e4dfdc5536b0e933e1670d20e1f@1x.webp" }, "2x": { "png": "porsche-marque.medium.min.089d6dd560fff7a2bf613ae6d528990e@2x.png", "webp": "porsche-marque.medium.min.7f0893dc57f2607a2cb0b817d96cb985@2x.webp" }, "3x": { "png": "porsche-marque.medium.min.2cb874345ef290831c929f6caabfeef8@3x.png", "webp": "porsche-marque.medium.min.3534cf066b4e2e737dca62de495f9616@3x.webp" } }, "small": { "1x": { "png": "porsche-marque.small.min.ac2042736af5512cf547c89fa7924c4f@1x.png", "webp": "porsche-marque.small.min.005debed5bf72cf0a9a791b1521f5e1d@1x.webp" }, "2x": { "png": "porsche-marque.small.min.22f1e9dc90399d9a5287eda689b60dba@2x.png", "webp": "porsche-marque.small.min.df4317325d04ffef28c7839aa6d499a0@2x.webp" }, "3x": { "png": "porsche-marque.small.min.49209245f04eadef8817b9bbae80d3e1@3x.png", "webp": "porsche-marque.small.min.cfd6149aaa3bc5b3b522538e5f650890@3x.webp" } } }, "porscheMarque75": { "medium": { "1x": { "png": "porsche-marque75.medium.min.0a02e2256062de963f2fef2c02d20200@1x.png", "webp": "porsche-marque75.medium.min.99b2d657558f0531d639782974e8fd06@1x.webp" }, "2x": { "png": "porsche-marque75.medium.min.1d41ecfb8f5277d3f4bd65d25d22eea3@2x.png", "webp": "porsche-marque75.medium.min.e32580cd1ac179e354ed8fcb31694168@2x.webp" }, "3x": { "png": "porsche-marque75.medium.min.373bcb5f89d31c8b6084e66e902b9f4c@3x.png", "webp": "porsche-marque75.medium.min.4a003d1e5e81db062bf92d52ba797087@3x.webp" } }, "small": { "1x": { "png": "porsche-marque75.small.min.f5b37fe12cd4487432ff77fdd8469f7d@1x.png", "webp": "porsche-marque75.small.min.146b06cffe2b11c07f3113a51f337b98@1x.webp" }, "2x": { "png": "porsche-marque75.small.min.20d86908f2190640a6f24fce1ee49035@2x.png", "webp": "porsche-marque75.small.min.025770f8db54857874c130999b370ed8@2x.webp" }, "3x": { "png": "porsche-marque75.small.min.e89b13e14a088a273107bf1057f7f67d@3x.png", "webp": "porsche-marque75.small.min.a725d2ec7bd07be17afd8feb2589b156@3x.webp" } } } };
3792
3704
  const getInnerManifest = (variant, trademark) => MARQUES_MANIFEST[variant === '75-years' ? 'porscheMarque75' : `porscheMarque${trademark ? 'Trademark' : ''}`];
3793
3705
  const buildSrcSet = (innerManifest, size, format) =>
3794
3706
  // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
@@ -3796,8 +3708,6 @@ Object.entries(innerManifest[size])
3796
3708
  .map(([resolution, fileName]) => `${getCDNBaseURL()}/marque/${fileName[format]} ${resolution}`)
3797
3709
  .join();
3798
3710
  const buildImgSrc = (innerManifest) => `${getCDNBaseURL()}/marque/${innerManifest.medium['2x'].png}`;
3799
-
3800
- const MODEL_SIGNATURES_MANIFEST = { "718": "718.min.d92dc0fe91e67bd51120d91c5cd1eb2f.svg", "911": "911.min.5c462658f9d472e90a139173414e8fdd.svg", "boxster": "boxster.min.5e7b22a1fa25004a4f97807d57f32b21.svg", "cayenne": "cayenne.min.4026ba6b335cc98e10592f900cf731e1.svg", "cayman": "cayman.min.c634f6f3de1d67610b2e4230e60337fb.svg", "macan": "macan.min.e38fbf34ed4f00066620901babd99af0.svg", "panamera": "panamera.min.d35913b252657f7c5cfcae74cfd61b26.svg", "taycan": "taycan.min.ba4e7c3cb86a78d626d4463b81be0f23.svg", "turbo-s": "turbo-s.min.8201d60c1b5e00daf9e23784fd199111.svg", "turbo": "turbo.min.cfde5de85fdc84be597dfad4402c5f6f.svg" };
3801
3711
  const getSvgUrl = (model) => {
3802
3712
  return `${getCDNBaseURL()}/model-signatures/${MODEL_SIGNATURES_MANIFEST[model]}`;
3803
3713
  };
@@ -3899,50 +3809,6 @@ const getTotalPages = (totalItemsCount, itemsPerPage) => {
3899
3809
  };
3900
3810
  const hiddenInputSlotName = 'hidden-input';
3901
3811
 
3902
- const { backgroundColor: backgroundColorThemeLight, primaryColor: primaryColorThemeLight } = getThemedColors('light');
3903
- const { canvasColor, canvasTextColor } = getHighContrastColors();
3904
- const borderWidth = '12px';
3905
- const transparentColor = 'transparent';
3906
- const join = (...arr) => arr.join(' ');
3907
- ({
3908
- top: {
3909
- top: 0,
3910
- left: '50%',
3911
- transform: 'translateX(-50%)',
3912
- borderWidth: join(borderWidth, borderWidth, 0),
3913
- borderColor: isHighContrastMode
3914
- ? join(canvasTextColor, canvasColor, canvasColor)
3915
- : join(backgroundColorThemeLight, transparentColor, transparentColor),
3916
- },
3917
- right: {
3918
- top: '50%',
3919
- right: 0,
3920
- transform: 'translateY(-50%)',
3921
- borderWidth: join(borderWidth, borderWidth, borderWidth, 0),
3922
- borderColor: isHighContrastMode
3923
- ? join(canvasColor, canvasTextColor, canvasColor, canvasColor)
3924
- : join(transparentColor, backgroundColorThemeLight, transparentColor, transparentColor),
3925
- },
3926
- bottom: {
3927
- bottom: 0,
3928
- left: '50%',
3929
- transform: 'translateX(-50%)',
3930
- borderWidth: join(0, borderWidth, borderWidth),
3931
- borderColor: isHighContrastMode
3932
- ? join(canvasColor, canvasColor, canvasTextColor)
3933
- : join(transparentColor, transparentColor, backgroundColorThemeLight),
3934
- },
3935
- left: {
3936
- top: '50%',
3937
- left: 0,
3938
- transform: 'translateY(-50%)',
3939
- borderWidth: join(borderWidth, 0, borderWidth, borderWidth),
3940
- borderColor: isHighContrastMode
3941
- ? join(canvasColor, canvasColor, canvasColor, canvasTextColor)
3942
- : join(transparentColor, transparentColor, transparentColor, backgroundColorThemeLight),
3943
- },
3944
- });
3945
-
3946
3812
  const getButtonAttributes = (isSelected, isDisabled) => ({
3947
3813
  ...getButtonBaseAriaAttributes(isDisabled, false),
3948
3814
  ...parseAndGetAriaAttributes({ 'aria-pressed': isSelected }),
@@ -4086,7 +3952,6 @@ exports.hasWindow = hasWindow;
4086
3952
  exports.hiddenInputSlotName = hiddenInputSlotName;
4087
3953
  exports.isCustomDropdown = isCustomDropdown;
4088
3954
  exports.isDisabledOrLoading = isDisabledOrLoading;
4089
- exports.isHighContrastMode = isHighContrastMode;
4090
3955
  exports.isInfinitePagination = isInfinitePagination;
4091
3956
  exports.isListTypeOrdered = isListTypeOrdered;
4092
3957
  exports.isScrollable = isScrollable;
@@ -4101,8 +3966,10 @@ exports.modelSignatureHeight = modelSignatureHeight;
4101
3966
  exports.observedNodesMap = observedNodesMap;
4102
3967
  exports.parseAndGetAriaAttributes = parseAndGetAriaAttributes;
4103
3968
  exports.parseJSONAttribute = parseJSONAttribute;
3969
+ exports.scrollAreaClass = scrollAreaClass;
4104
3970
  exports.showCustomCalendarOrTimeIndicator = showCustomCalendarOrTimeIndicator;
4105
3971
  exports.supportsConstructableStylesheets = supportsConstructableStylesheets;
3972
+ exports.supportsNativePopover = supportsNativePopover;
4106
3973
  exports.tempDiv = tempDiv;
4107
3974
  exports.tempIcon = tempIcon;
4108
3975
  exports.tempLabel = tempLabel;