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