@zanichelli/zanichelli-it-frontend-kit 1.4.1 → 1.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{index-BLzQAHAI.js → index-BKkNg6ed.js} +498 -358
- package/dist/cjs/index.cjs.js +0 -3
- package/dist/cjs/loader.cjs.js +2 -5
- package/dist/cjs/zanichelli-it-frontend-kit.cjs.js +3 -6
- package/dist/cjs/zanit-back-to-top_4.cjs.entry.js +75 -62
- package/dist/collection/collection-manifest.json +3 -2
- package/dist/collection/components/back-to-top/back-to-top.js +3 -4
- package/dist/collection/components/menubar/menu/menu.js +0 -1
- package/dist/collection/components/menubar/menubar.js +12 -11
- package/dist/collection/components/menubar/mobile-menubar/mobile-menubar.js +12 -13
- package/dist/collection/components/menubar/search-form/search-form.js +14 -12
- package/dist/collection/components/menubar/search-form/suggestions.js +0 -1
- package/dist/collection/index.js +0 -1
- package/dist/collection/utils/index.js +0 -1
- package/dist/collection/utils/subjects.api.js +0 -1
- package/dist/collection/utils/utils.js +0 -1
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +1 -1335
- package/dist/components/p-BMtMaJq9.js +1 -0
- package/dist/components/p-BXeRLfHX.js +1 -0
- package/dist/components/zanit-back-to-top.js +1 -88
- package/dist/components/zanit-menubar.js +1 -455
- package/dist/components/zanit-mobile-menubar.js +1 -9
- package/dist/components/zanit-search-form.js +1 -9
- package/dist/esm/{index-DSdvvVFj.js → index-CFgcJxsy.js} +498 -358
- package/dist/esm/index.js +0 -3
- package/dist/esm/loader.js +3 -6
- package/dist/esm/zanichelli-it-frontend-kit.js +4 -7
- package/dist/esm/zanit-back-to-top_4.entry.js +75 -62
- package/dist/types/components/back-to-top/back-to-top.d.ts +2 -1
- package/dist/types/components/menubar/menubar.d.ts +2 -1
- package/dist/types/components/menubar/mobile-menubar/mobile-menubar.d.ts +2 -1
- package/dist/types/components/menubar/search-form/search-form.d.ts +3 -2
- package/dist/types/components.d.ts +35 -8
- package/dist/types/stencil-public-runtime.d.ts +169 -11
- package/dist/zanichelli-it-frontend-kit/index.esm.js +0 -2
- package/dist/zanichelli-it-frontend-kit/p-93d8b277.entry.js +1 -0
- package/dist/zanichelli-it-frontend-kit/p-CFgcJxsy.js +2 -0
- package/dist/zanichelli-it-frontend-kit/zanichelli-it-frontend-kit.esm.js +1 -2
- package/package.json +17 -15
- package/www/build/index.esm.js +0 -2
- package/www/build/p-93d8b277.entry.js +1 -0
- package/www/build/p-CFgcJxsy.js +2 -0
- package/www/build/p-ec9829f4.js +1 -0
- package/www/build/zanichelli-it-frontend-kit.esm.js +1 -2
- package/www/index.html +2 -1
- package/dist/cjs/index-BLzQAHAI.js.map +0 -1
- package/dist/cjs/index.cjs.js.map +0 -1
- package/dist/cjs/loader.cjs.js.map +0 -1
- package/dist/cjs/zanichelli-it-frontend-kit.cjs.js.map +0 -1
- package/dist/cjs/zanit-back-to-top.zanit-menubar.zanit-mobile-menubar.zanit-search-form.entry.cjs.js.map +0 -1
- package/dist/cjs/zanit-back-to-top_4.cjs.entry.js.map +0 -1
- package/dist/collection/components/back-to-top/back-to-top.js.map +0 -1
- package/dist/collection/components/menubar/menu/menu.js.map +0 -1
- package/dist/collection/components/menubar/menubar.js.map +0 -1
- package/dist/collection/components/menubar/mobile-menubar/mobile-menubar.js.map +0 -1
- package/dist/collection/components/menubar/search-form/search-form.js.map +0 -1
- package/dist/collection/components/menubar/search-form/suggestions.js.map +0 -1
- package/dist/collection/index.js.map +0 -1
- package/dist/collection/utils/index.js.map +0 -1
- package/dist/collection/utils/subjects.api.js.map +0 -1
- package/dist/collection/utils/utils.js.map +0 -1
- package/dist/components/index.js.map +0 -1
- package/dist/components/p-BlgoYKK3.js +0 -246
- package/dist/components/p-BlgoYKK3.js.map +0 -1
- package/dist/components/p-DqMqkNnl.js +0 -386
- package/dist/components/p-DqMqkNnl.js.map +0 -1
- package/dist/components/zanit-back-to-top.js.map +0 -1
- package/dist/components/zanit-menubar.js.map +0 -1
- package/dist/components/zanit-mobile-menubar.js.map +0 -1
- package/dist/components/zanit-search-form.js.map +0 -1
- package/dist/esm/index-DSdvvVFj.js.map +0 -1
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/loader.js.map +0 -1
- package/dist/esm/zanichelli-it-frontend-kit.js.map +0 -1
- package/dist/esm/zanit-back-to-top.zanit-menubar.zanit-mobile-menubar.zanit-search-form.entry.js.map +0 -1
- package/dist/esm/zanit-back-to-top_4.entry.js.map +0 -1
- package/dist/zanichelli-it-frontend-kit/index.esm.js.map +0 -1
- package/dist/zanichelli-it-frontend-kit/loader.esm.js.map +0 -1
- package/dist/zanichelli-it-frontend-kit/p-62cc02c2.entry.js +0 -2
- package/dist/zanichelli-it-frontend-kit/p-62cc02c2.entry.js.map +0 -1
- package/dist/zanichelli-it-frontend-kit/p-DSdvvVFj.js +0 -3
- package/dist/zanichelli-it-frontend-kit/p-DSdvvVFj.js.map +0 -1
- package/dist/zanichelli-it-frontend-kit/zanichelli-it-frontend-kit.esm.js.map +0 -1
- package/dist/zanichelli-it-frontend-kit/zanit-back-to-top.zanit-menubar.zanit-mobile-menubar.zanit-search-form.entry.esm.js.map +0 -1
- package/www/build/index.esm.js.map +0 -1
- package/www/build/loader.esm.js.map +0 -1
- package/www/build/p-62cc02c2.entry.js +0 -2
- package/www/build/p-62cc02c2.entry.js.map +0 -1
- package/www/build/p-DSdvvVFj.js +0 -3
- package/www/build/p-DSdvvVFj.js.map +0 -1
- package/www/build/p-fe3aec03.js +0 -2
- package/www/build/zanichelli-it-frontend-kit.esm.js.map +0 -1
- package/www/build/zanit-back-to-top.zanit-menubar.zanit-mobile-menubar.zanit-search-form.entry.esm.js.map +0 -1
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
type CustomMethodDecorator<T> = (target: object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<T>) => TypedPropertyDescriptor<T> | void;
|
|
2
|
+
type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
|
|
3
|
+
type MixinInstance<F> = F extends (base: MixedInCtor) => MixedInCtor<infer I> ? I : never;
|
|
2
4
|
export interface ComponentDecorator {
|
|
3
5
|
(opts?: ComponentOptions): ClassDecorator;
|
|
4
6
|
}
|
|
@@ -61,6 +63,12 @@ export interface ShadowRootOptions {
|
|
|
61
63
|
* focusable part is given focus, and the shadow host is given any available `:focus` styling.
|
|
62
64
|
*/
|
|
63
65
|
delegatesFocus?: boolean;
|
|
66
|
+
/**
|
|
67
|
+
* Sets the slot assignment mode for the shadow root. When set to `'manual'`, enables imperative
|
|
68
|
+
* slotting using the `HTMLSlotElement.assign()` method. Defaults to `'named'` for standard
|
|
69
|
+
* declarative slotting behavior.
|
|
70
|
+
*/
|
|
71
|
+
slotAssignment?: 'manual' | 'named';
|
|
64
72
|
}
|
|
65
73
|
export interface ModeStyles {
|
|
66
74
|
[modeName: string]: string | string[];
|
|
@@ -117,12 +125,34 @@ export interface EventOptions {
|
|
|
117
125
|
*/
|
|
118
126
|
composed?: boolean;
|
|
119
127
|
}
|
|
128
|
+
export interface AttachInternalsOptions {
|
|
129
|
+
/**
|
|
130
|
+
* Initial custom states to set on the ElementInternals.states CustomStateSet.
|
|
131
|
+
* Each key is the state name and the value is the initial boolean state.
|
|
132
|
+
*
|
|
133
|
+
* These states can be targeted with the CSS `:state()` pseudo-class.
|
|
134
|
+
*
|
|
135
|
+
* @example
|
|
136
|
+
* ```tsx
|
|
137
|
+
* @AttachInternals({ states: { open: true, active: false } })
|
|
138
|
+
* internals: ElementInternals;
|
|
139
|
+
* ```
|
|
140
|
+
*
|
|
141
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/CustomStateSet
|
|
142
|
+
*/
|
|
143
|
+
states?: {
|
|
144
|
+
[stateName: string]: boolean;
|
|
145
|
+
};
|
|
146
|
+
}
|
|
120
147
|
export interface AttachInternalsDecorator {
|
|
121
|
-
(): PropertyDecorator;
|
|
148
|
+
(opts?: AttachInternalsOptions): PropertyDecorator;
|
|
122
149
|
}
|
|
123
150
|
export interface ListenDecorator {
|
|
124
151
|
(eventName: string, opts?: ListenOptions): CustomMethodDecorator<any>;
|
|
125
152
|
}
|
|
153
|
+
export interface ResolveVarFunction {
|
|
154
|
+
<T>(variable: T): string;
|
|
155
|
+
}
|
|
126
156
|
export interface ListenOptions {
|
|
127
157
|
/**
|
|
128
158
|
* Handlers can also be registered for an event other than the host itself.
|
|
@@ -151,7 +181,15 @@ export interface StateDecorator {
|
|
|
151
181
|
(): PropertyDecorator;
|
|
152
182
|
}
|
|
153
183
|
export interface WatchDecorator {
|
|
154
|
-
(propName:
|
|
184
|
+
(propName: any, watchOptions?: {
|
|
185
|
+
immediate?: boolean;
|
|
186
|
+
}): CustomMethodDecorator<(newValue?: any, oldValue?: any, propName?: any, ...args: any[]) => any | void>;
|
|
187
|
+
}
|
|
188
|
+
export interface PropSerializeDecorator {
|
|
189
|
+
(propName: any): CustomMethodDecorator<(newValue?: any, propName?: string, ...args: any[]) => string | null>;
|
|
190
|
+
}
|
|
191
|
+
export interface AttrDeserializeDecorator {
|
|
192
|
+
(propName: any): CustomMethodDecorator<(newValue?: any, propName?: string, ...args: any[]) => any>;
|
|
155
193
|
}
|
|
156
194
|
export interface UserBuildConditionals {
|
|
157
195
|
isDev: boolean;
|
|
@@ -200,6 +238,24 @@ export declare const AttachInternals: AttachInternalsDecorator;
|
|
|
200
238
|
* https://stenciljs.com/docs/events#listen-decorator
|
|
201
239
|
*/
|
|
202
240
|
export declare const Listen: ListenDecorator;
|
|
241
|
+
/**
|
|
242
|
+
* The `resolveVar()` function is a compile-time utility that resolves const variables
|
|
243
|
+
* and object properties to their string literal values. This allows variables to be
|
|
244
|
+
* used in `@Listen` and `@Event` decorators instead of hardcoded strings.
|
|
245
|
+
*
|
|
246
|
+
* @example
|
|
247
|
+
* ```ts
|
|
248
|
+
* const MY_EVENT = 'myEvent';
|
|
249
|
+
* @Listen(resolveVar(MY_EVENT))
|
|
250
|
+
* ```
|
|
251
|
+
*
|
|
252
|
+
* @example
|
|
253
|
+
* ```ts
|
|
254
|
+
* const EVENTS = { MY_EVENT: 'myEvent' } as const;
|
|
255
|
+
* @Event({ eventName: resolveVar(EVENTS.MY_EVENT) })
|
|
256
|
+
* ```
|
|
257
|
+
*/
|
|
258
|
+
export declare const resolveVar: ResolveVarFunction;
|
|
203
259
|
/**
|
|
204
260
|
* The `@Method()` decorator is used to expose methods on the public API.
|
|
205
261
|
* Class methods decorated with the @Method() decorator can be called directly
|
|
@@ -233,6 +289,14 @@ export declare const State: StateDecorator;
|
|
|
233
289
|
* https://stenciljs.com/docs/reactive-data#watch-decorator
|
|
234
290
|
*/
|
|
235
291
|
export declare const Watch: WatchDecorator;
|
|
292
|
+
/**
|
|
293
|
+
* Decorator to serialize a property to an attribute string.
|
|
294
|
+
*/
|
|
295
|
+
export declare const PropSerialize: PropSerializeDecorator;
|
|
296
|
+
/**
|
|
297
|
+
* Decorator to deserialize an attribute string to a property.
|
|
298
|
+
*/
|
|
299
|
+
export declare const AttrDeserialize: AttrDeserializeDecorator;
|
|
236
300
|
export type ResolutionHandler = (elm: HTMLElement) => string | undefined | null;
|
|
237
301
|
export type ErrorHandler = (err: any, element?: HTMLElement) => void;
|
|
238
302
|
/**
|
|
@@ -349,6 +413,58 @@ export declare function readTask(task: RafCallback): void;
|
|
|
349
413
|
* Unhandled exception raised while rendering, during event handling, or lifecycles will trigger the custom event handler.
|
|
350
414
|
*/
|
|
351
415
|
export declare const setErrorHandler: (handler: ErrorHandler) => void;
|
|
416
|
+
export type TagTransformer = (tag: string) => string;
|
|
417
|
+
/**
|
|
418
|
+
* Sets a tag transformer to be used when rendering your custom elements.
|
|
419
|
+
* ```ts
|
|
420
|
+
* setTagTransformer((tag) => {
|
|
421
|
+
* if (tag.startsWith('my-')) return `new-${tag}`
|
|
422
|
+
* return tag;
|
|
423
|
+
* });
|
|
424
|
+
* ```
|
|
425
|
+
* Will mean all your components that start with `my-` are defined instead with `new-my-` prefix.
|
|
426
|
+
*
|
|
427
|
+
* @param transformer the transformer function to use which must return a string.
|
|
428
|
+
*/
|
|
429
|
+
export declare function setTagTransformer(transformer: TagTransformer): void;
|
|
430
|
+
/**
|
|
431
|
+
* Transforms a tag name using a transformer set via `setTagTransformer`
|
|
432
|
+
*
|
|
433
|
+
* @param tag - the tag to transform e.g. `my-tag`
|
|
434
|
+
* @returns the transformed tag e.g. `new-my-tag`
|
|
435
|
+
*/
|
|
436
|
+
export declare function transformTag(tag: string): string;
|
|
437
|
+
/**
|
|
438
|
+
* @deprecated - Use `MixedInCtor` instead:
|
|
439
|
+
* ```ts
|
|
440
|
+
* import { MixedInCtor } from '@stencil/core';
|
|
441
|
+
*
|
|
442
|
+
* const AFactoryFn = <B extends MixedInCtor>(Base: B) => {class A extends Base { propA = A }; return A;}
|
|
443
|
+
* ```
|
|
444
|
+
*/
|
|
445
|
+
export type MixinFactory = (base: MixedInCtor) => MixedInCtor;
|
|
446
|
+
export type MixedInCtor<T = {}> = new (...args: any[]) => T;
|
|
447
|
+
/**
|
|
448
|
+
* Compose multiple mixin classes into a single constructor.
|
|
449
|
+
* The resulting class has the combined instance types of all mixed-in classes.
|
|
450
|
+
*
|
|
451
|
+
* Example:
|
|
452
|
+
* ```ts
|
|
453
|
+
* import { Mixin, MixedInCtor } from '@stencil/core';
|
|
454
|
+
*
|
|
455
|
+
* const AWrap = <B extends MixedInCtor>(Base: B) => {class A extends Base { propA = A }; return A;}
|
|
456
|
+
* const BWrap = <B extends MixedInCtor>(Base: B) => {class B extends Base { propB = B }; return B;}
|
|
457
|
+
* const CWrap = <B extends MixedInCtor>(Base: B) => {class C extends Base { propC = C }; return C;}
|
|
458
|
+
*
|
|
459
|
+
* class X extends Mixin(AWrap, BWrap, CWrap) {
|
|
460
|
+
* render() { return <div>{this.propA} {this.propB} {this.propC}</div>; }
|
|
461
|
+
* }
|
|
462
|
+
* ```
|
|
463
|
+
*
|
|
464
|
+
* @param mixinFactories mixin factory functions that return a class which extends from the provided class.
|
|
465
|
+
* @returns a class that is composed from extending each of the provided classes in the order they were provided.
|
|
466
|
+
*/
|
|
467
|
+
export declare function Mixin<const TMixins extends readonly MixinFactory[]>(...mixinFactories: TMixins): abstract new (...args: any[]) => UnionToIntersection<MixinInstance<TMixins[number]>>;
|
|
352
468
|
/**
|
|
353
469
|
* This file gets copied to all distributions of stencil component collections.
|
|
354
470
|
* - no imports
|
|
@@ -521,7 +637,7 @@ export interface FunctionalUtilities {
|
|
|
521
637
|
map: (children: VNode[], cb: (vnode: ChildNode, index: number, array: ChildNode[]) => ChildNode) => VNode[];
|
|
522
638
|
}
|
|
523
639
|
export interface FunctionalComponent<T = {}> {
|
|
524
|
-
(props: T, children: VNode[], utils: FunctionalUtilities): VNode | VNode[];
|
|
640
|
+
(props: T, children: VNode[], utils: FunctionalUtilities): VNode | VNode[] | null;
|
|
525
641
|
}
|
|
526
642
|
/**
|
|
527
643
|
* A Child VDOM node
|
|
@@ -563,6 +679,7 @@ export declare namespace h {
|
|
|
563
679
|
function h(sel: any, data: VNodeData | null, text: string): VNode;
|
|
564
680
|
function h(sel: any, data: VNodeData | null, children: Array<VNode | undefined | null>): VNode;
|
|
565
681
|
function h(sel: any, data: VNodeData | null, children: VNode): VNode;
|
|
682
|
+
function h(sel: any, data: VNodeData | null, ...children: (VNode | string | number)[]): VNode;
|
|
566
683
|
namespace JSX {
|
|
567
684
|
interface IntrinsicElements extends LocalJSX.IntrinsicElements, JSXBase.IntrinsicElements {
|
|
568
685
|
[tagName: string]: any;
|
|
@@ -577,6 +694,36 @@ export declare function h(sel: any, children: Array<VNode | undefined | null>):
|
|
|
577
694
|
export declare function h(sel: any, data: VNodeData | null, text: string): VNode;
|
|
578
695
|
export declare function h(sel: any, data: VNodeData | null, children: Array<VNode | undefined | null>): VNode;
|
|
579
696
|
export declare function h(sel: any, data: VNodeData | null, children: VNode): VNode;
|
|
697
|
+
export declare function h(sel: any, data: VNodeData | null, ...children: (VNode | string | number)[]): VNode;
|
|
698
|
+
/**
|
|
699
|
+
* Automatic JSX runtime functions for TypeScript's react-jsx mode.
|
|
700
|
+
* These functions are called automatically by TypeScript when using "jsx": "react-jsx".
|
|
701
|
+
* @param type type of node
|
|
702
|
+
* @param props properties of node
|
|
703
|
+
* @param key optional key for the node
|
|
704
|
+
* @returns a jsx vnode
|
|
705
|
+
*/
|
|
706
|
+
export declare function jsx(type: any, props: any, key?: string): VNode;
|
|
707
|
+
/**
|
|
708
|
+
* Automatic JSX runtime functions for TypeScript's react-jsxmode with multiple children.
|
|
709
|
+
* @param type type of node
|
|
710
|
+
* @param props properties of node
|
|
711
|
+
* @param key optional key for the node
|
|
712
|
+
* @returns a jsx vnode
|
|
713
|
+
*/
|
|
714
|
+
export declare function jsxs(type: any, props: any, key?: string): VNode;
|
|
715
|
+
/**
|
|
716
|
+
* Automatic JSX runtime functions for TypeScript's react-jsxdev mode.
|
|
717
|
+
* These functions are called automatically by TypeScript when using "jsx": "react-jsxdev".
|
|
718
|
+
* @param type type of node
|
|
719
|
+
* @param props properties of node
|
|
720
|
+
* @param key optional key for the node
|
|
721
|
+
* @param isStaticChildren indicates if the children are static
|
|
722
|
+
* @param source source information
|
|
723
|
+
* @param self reference to the component instance
|
|
724
|
+
* @returns a jsx vnode
|
|
725
|
+
*/
|
|
726
|
+
export declare function jsxDEV(type: any, props: any, key?: string | number, isStaticChildren?: boolean, source?: any, self?: any): VNode;
|
|
580
727
|
/**
|
|
581
728
|
* A virtual DOM node
|
|
582
729
|
*/
|
|
@@ -606,7 +753,7 @@ declare namespace LocalJSX {
|
|
|
606
753
|
export { LocalJSX as JSX };
|
|
607
754
|
export declare namespace JSXBase {
|
|
608
755
|
interface IntrinsicElements {
|
|
609
|
-
slot: JSXBase.SlotAttributes
|
|
756
|
+
slot: JSXBase.SlotAttributes<HTMLSlotElement>;
|
|
610
757
|
a: JSXBase.AnchorHTMLAttributes<HTMLAnchorElement>;
|
|
611
758
|
abbr: JSXBase.HTMLAttributes;
|
|
612
759
|
address: JSXBase.HTMLAttributes;
|
|
@@ -776,7 +923,7 @@ export declare namespace JSXBase {
|
|
|
776
923
|
use: JSXBase.SVGAttributes;
|
|
777
924
|
view: JSXBase.SVGAttributes;
|
|
778
925
|
}
|
|
779
|
-
interface SlotAttributes extends JSXAttributes {
|
|
926
|
+
interface SlotAttributes<T = HTMLSlotElement> extends JSXAttributes<T> {
|
|
780
927
|
name?: string;
|
|
781
928
|
slot?: string;
|
|
782
929
|
onSlotchange?: (event: Event) => void;
|
|
@@ -832,6 +979,9 @@ export declare namespace JSXBase {
|
|
|
832
979
|
popoverTargetAction?: string;
|
|
833
980
|
popoverTargetElement?: Element | null;
|
|
834
981
|
popoverTarget?: string;
|
|
982
|
+
command?: string;
|
|
983
|
+
commandFor?: string;
|
|
984
|
+
commandfor?: string;
|
|
835
985
|
}
|
|
836
986
|
interface CanvasHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
837
987
|
height?: number | string;
|
|
@@ -846,7 +996,7 @@ export declare namespace JSXBase {
|
|
|
846
996
|
interface DetailsHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
847
997
|
open?: boolean;
|
|
848
998
|
name?: string;
|
|
849
|
-
onToggle?: (event:
|
|
999
|
+
onToggle?: (event: ToggleEvent) => void;
|
|
850
1000
|
}
|
|
851
1001
|
interface DelHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
852
1002
|
cite?: string;
|
|
@@ -1552,6 +1702,13 @@ export declare namespace JSXBase {
|
|
|
1552
1702
|
z?: number | string;
|
|
1553
1703
|
zoomAndPan?: string;
|
|
1554
1704
|
}
|
|
1705
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ToggleEvent) */
|
|
1706
|
+
interface ToggleEvent extends Event {
|
|
1707
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ToggleEvent/newState) */
|
|
1708
|
+
readonly newState: string;
|
|
1709
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ToggleEvent/oldState) */
|
|
1710
|
+
readonly oldState: string;
|
|
1711
|
+
}
|
|
1555
1712
|
interface DOMAttributes<T> extends JSXAttributes<T> {
|
|
1556
1713
|
slot?: string;
|
|
1557
1714
|
part?: string;
|
|
@@ -1568,6 +1725,10 @@ export declare namespace JSXBase {
|
|
|
1568
1725
|
onCompositionstartCapture?: (event: CompositionEvent) => void;
|
|
1569
1726
|
onCompositionupdate?: (event: CompositionEvent) => void;
|
|
1570
1727
|
onCompositionupdateCapture?: (event: CompositionEvent) => void;
|
|
1728
|
+
onBeforeToggle?: (event: ToggleEvent) => void;
|
|
1729
|
+
onBeforeToggleCapture?: (event: ToggleEvent) => void;
|
|
1730
|
+
onToggle?: (event: ToggleEvent) => void;
|
|
1731
|
+
onToggleCapture?: (event: ToggleEvent) => void;
|
|
1571
1732
|
onFocus?: (event: FocusEvent) => void;
|
|
1572
1733
|
onFocusCapture?: (event: FocusEvent) => void;
|
|
1573
1734
|
onFocusin?: (event: FocusEvent) => void;
|
|
@@ -1586,10 +1747,6 @@ export declare namespace JSXBase {
|
|
|
1586
1747
|
onSubmitCapture?: (event: Event) => void;
|
|
1587
1748
|
onInvalid?: (event: Event) => void;
|
|
1588
1749
|
onInvalidCapture?: (event: Event) => void;
|
|
1589
|
-
onBeforeToggle?: (event: Event) => void;
|
|
1590
|
-
onBeforeToggleCapture?: (event: Event) => void;
|
|
1591
|
-
onToggle?: (event: Event) => void;
|
|
1592
|
-
onToggleCapture?: (event: Event) => void;
|
|
1593
1750
|
onLoad?: (event: Event) => void;
|
|
1594
1751
|
onLoadCapture?: (event: Event) => void;
|
|
1595
1752
|
onError?: (event: Event) => void;
|
|
@@ -1693,6 +1850,7 @@ export interface CustomElementsDefineOptions {
|
|
|
1693
1850
|
exclude?: string[];
|
|
1694
1851
|
resourcesUrl?: string;
|
|
1695
1852
|
syncQueue?: boolean;
|
|
1853
|
+
/** @deprecated in-favour of `setTagTransformer` and `transformTag` */
|
|
1696
1854
|
transformTagName?: (tagName: string) => string;
|
|
1697
1855
|
jmp?: (c: Function) => any;
|
|
1698
1856
|
raf?: (c: FrameRequestCallback) => number;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,a as t,h as i,H as a,F as r,c as s}from"./p-CFgcJxsy.js";const n=class{constructor(t){e(this,t)}resizeObserver;mutationObserver;get host(){return t(this)}showFab=!1;currentPageHeight;isMobile=!1;pageMinHeight=1600;scrollMinHeight=800;handleScroll(){this.updateFabVisibility()}handleResize=()=>{const e=document.body.scrollHeight;e!==this.currentPageHeight&&(this.currentPageHeight=e,this.updateFabVisibility())};connectedCallback(){this.currentPageHeight=document.body.scrollHeight,this.resizeObserver=new ResizeObserver(this.handleResize),this.resizeObserver.observe(document.body),this.mutationObserver=new MutationObserver(this.handleResize),this.mutationObserver.observe(document.body,{childList:!0,subtree:!0}),this.updateFabVisibility();const e=window.matchMedia("(width < 768px)");this.isMobile=e.matches,e.onchange=e=>{this.isMobile=e.matches}}disconnectedCallback(){this.resizeObserver.disconnect(),this.mutationObserver.disconnect()}updateFabVisibility(){this.showFab=this.currentPageHeight>this.pageMinHeight&&window.scrollY>this.scrollMinHeight}scroll(){window.scrollTo({top:0,behavior:"smooth"})}render(){return i(a,{key:"8db557141277e71d6d2fdaad2e525df03fb78461",class:{hidden:!this.showFab},"aria-hidden":this.showFab?"false":"true"},i("button",{key:"e9a1cfcc75c39e6a5d657712306e331bbfabbcf9",class:{"z-fab":!0,"z-fab-extended":!this.isMobile},onClick:()=>this.scroll()},i("z-icon",{key:"c83accba15ee2efbbef5f17cdbb92c57f7aee0a0",name:"back-top"}),i("span",{key:"59167788a06ac2b45b4e91c944c0fefd1dc79780"},"Torna su")))}};n.style=".sc-zanit-back-to-top-h{opacity:1;transition:all 0.2s linear;visibility:visible}.hidden.sc-zanit-back-to-top-h{opacity:0;visibility:hidden}.sc-zanit-back-to-top-h .z-fab.sc-zanit-back-to-top{--color-primary01:var(--gray950);outline:1px solid var(--color-white)}";const o=(e,t)=>t.composedPath().filter((e=>e!==document&&e!==window.window)).some((t=>e.contains(t))),h=(e,t)=>{e.tabIndex=-1,t.tabIndex=0,t.focus({preventScroll:!0})},c=e=>"ArrowDown"===e.key,d=e=>"Escape"===e.key;var l;!function(e){e.DEV="dev",e.TEST="test",e.PROD="prod"}(l||(l={}));const u={dev:"https://zanichelli-shop-dev.s3.eu-west-1.amazonaws.com",test:"https://zanichelli-shop-test.s3.eu-west-1.amazonaws.com",prod:"https://zanichelli-shop.s3.eu-west-1.amazonaws.com"},m="default",p={id:m,label:m},b=({controlledBy:e,items:t,currentPath:a=[],onItemKeyDown:r})=>{if(!t?.length)return null;const s=(e=>e.reduce(((e,t)=>{const i=e.find((({group:e})=>e.id===(t.group?.id||p.id)));return i?i.items.push(t):e.push({group:t.group??p,items:[t]}),e}),[]).sort(((e,t)=>e.group.id===m?1:t.group.id===m?-1:0)))(t),n=t=>a.includes(e)&&a.includes(t.id);return i("div",{class:"menu-wrapper",role:"none"},i("div",{class:"menu","aria-labelledby":e??void 0,role:"menu"},s.map((({group:e,items:t})=>i("div",{class:{group:!0,highlight:t.some((e=>e.highlight))}},e.id!==m?i("div",{class:"group-name",id:e.id},e.label):s.length>1?i("div",{class:"group-name"}):null,i("ul",{class:"menu-list",role:"group","aria-labelledby":e.id!==m?e.id:void 0},t.map((e=>i("li",{role:"none"},e.href&&i("a",{class:{"menu-item":!0,active:n(e)},href:e.href,role:"menuitem",tabIndex:-1,"aria-current":n(e)?"page":"false",onKeyDown:e=>r(e),target:e.target},e.label))))))))))},g=class{constructor(t){e(this,t)}get host(){return t(this)}items=[];openMenu=void 0;openNavbar=void 0;currentPath=[];isMobile=!1;loading=!1;data;current=void 0;searchQuery=void 0;searchEnv=l.PROD;searchArea;timerId;async parseData(e){if(e)if(e instanceof URL)this.items=await this.fetchData(e);else if(e instanceof Promise)this.loading=!0,this.items=await e,this.loading=!1;else if("string"==typeof e)try{if(this.items=JSON.parse(e),!Array.isArray(this.items)||!this.items?.every((e=>e)))throw new Error("Expected an array of MenubarItem objects.")}catch{let t;try{t=new URL(e)}catch{throw new Error("Invalid string provided for `data` property: not a valid url or JSON.")}this.items=await this.fetchData(t)}else{if(!Array.isArray(e)||!e.every((e=>e)))throw new Error("Invalid `data` property value. Expected an url, a JSON or an array/promise of MenubarItem objects.");this.items=e}}onItemsChange(){this.initTabindex()}onCurrentChange(){this.currentPath=this.current?.split("/").filter(Boolean)||[]}async connectedCallback(){const e=window.matchMedia("(width < 768px)");this.isMobile=e.matches,e.onchange=e=>{this.isMobile=e.matches,this.initTabindex(),this.openMenu=void 0},await this.parseData(this.data),this.onCurrentChange(),this.initTabindex()}handleOutsideClick(e){this.openMenu&&!o(this.host,e)&&(this.openMenu=void 0)}handleKeydown(e){switch(e.key){case"Escape":if(this.openMenu){e.preventDefault();const t=this.openMenu;this.openMenu=void 0,setTimeout((()=>{const e=this.host.shadowRoot.getElementById(t);e&&e.focus()}),0)}break;case"Tab":this.openMenu=void 0}}handleMouseover(){clearTimeout(this.timerId)}handleMouseout(e){this.timerId=window.setTimeout((()=>{this.openMenu&&!o(this.host,e)&&(this.openMenu=void 0)}),500)}handleFocusout(e){const t=e.relatedTarget;this.openMenu&&!this.host.shadowRoot.querySelector(".menu")?.contains(t)&&(this.openMenu=void 0)}async fetchData(e){try{this.loading=!0;const t=await(await fetch(e)).json();if(this.loading=!1,!Array.isArray(t)||!t.every((e=>e)))throw new Error("Invalid data structure. Expected an array of MenuItem objects.");return t}catch(e){throw this.loading=!1,console.error("Error fetching menubar data:",e),new Error("Failed to fetch menubar data from the provided URL.",{cause:e})}}initTabindex(){setTimeout((()=>{this.host.shadowRoot.querySelectorAll('[role="menubar"]')?.forEach((e=>{e.querySelectorAll('[role="menuitem"]')?.forEach(((e,t)=>e.setAttribute("tabindex",0===t?"0":"-1")))}))}),100)}isActive(e){return 0!==this.currentPath.length&&(!!this.currentPath.includes(e.id)||(e.menuItems?.length?e.menuItems.some((e=>e.id===this.current)):!(!e.navbarItems?.length||!e.navbarItems.some((e=>this.isActive(e))))))}showMenu(e){this.openMenu=void 0,e.menuItems?.length&&(this.openMenu=e.id)}getParentMenubarElements(e){return Array.from(e?.closest('[role="menubar"]')?.querySelectorAll(':scope > li a[role="menuitem"]')??[])}focusPreviousItem(e){this.openMenu=void 0;const t=this.getParentMenubarElements(e),i=t.indexOf(e),a=t[(i-1+t.length)%t.length];h(e,a),"true"===a.ariaHasPopup&&this.openMenu&&(this.openMenu=a.id)}focusNextItem(e){this.openMenu=void 0;const t=this.getParentMenubarElements(e),i=t.indexOf(e),a=t[(i+1)%t.length];h(e,a),"true"===a.ariaHasPopup&&this.openMenu&&(this.openMenu=a.id)}handleItemKeydown(e,t){const i=e.target;switch(e.key){case"Home":{e.preventDefault(),e.stopPropagation();const t=this.getParentMenubarElements(i)[0];h(i,t);break}case"End":{e.preventDefault(),e.stopPropagation();const t=this.getParentMenubarElements(i).pop();h(i,t);break}case"ArrowUp":if(!t.menuItems?.length)break;e.preventDefault(),e.stopPropagation(),this.openMenu=t.id,setTimeout((()=>{const e=Array.from(this.host.shadowRoot.querySelectorAll(`[aria-labelledby=${t.id}] [role="menuitem"]`));h(i,e[e.length-1])}),100);break;case"ArrowRight":e.preventDefault(),e.stopPropagation(),this.focusNextItem(i);break;case"ArrowDown":if(!t.menuItems?.length)break;this.openItemMenu(t);break;case"ArrowLeft":e.preventDefault(),e.stopPropagation(),this.focusPreviousItem(i);break;case" ":if(e.preventDefault(),e.stopPropagation(),this.openMenu===t.id){this.openMenu=void 0;break}if(t.menuItems?.length){this.openItemMenu(t);break}}}getPreviousGroup(e){const t=Array.from(e?.closest('[role="menu"]')?.querySelectorAll('[role="group"]')??[]),i=t.indexOf(e);return t[i-1]}getNextGroup(e){const t=Array.from(e?.closest('[role="menu"]')?.querySelectorAll('[role="group"]')??[]),i=t.indexOf(e);return t[i+1]}openItemMenu(e){this.openMenu=e.id,setTimeout((()=>{const t=this.host.shadowRoot.querySelector(`[aria-labelledby=${e.id}] [role="menuitem"]`);t.tabIndex=0,t.focus({preventScroll:!0})}),100)}handleMenuKeydown(e){const t=e.target,i=Array.from(t.closest('[role="menu"]')?.querySelectorAll('[role="menuitem"]')??[]),a=i.indexOf(t);switch(e.key){case"ArrowUp":e.preventDefault(),e.stopPropagation(),h(t,i[a-1]||i[i.length-1]);break;case"ArrowRight":{e.preventDefault(),e.stopPropagation();const i=t.closest("[role=group]"),a=this.getNextGroup(i);if(!a){t.tabIndex=-1;const e=t.closest('[role="menu"][aria-labelledby]').getAttribute("aria-labelledby"),i=this.host.shadowRoot.getElementById(e);this.focusNextItem(i);break}const r=a.querySelectorAll('[role="menuitem"]')??[];h(t,r[0]);break}case"ArrowDown":e.preventDefault(),e.stopPropagation(),h(t,i[a+1]||i[0]);break;case"ArrowLeft":{e.preventDefault(),e.stopPropagation();const i=t.closest("[role=group]"),a=this.getPreviousGroup(i);if(!a){t.tabIndex=-1;const e=t.closest('[role="menu"][aria-labelledby]').getAttribute("aria-labelledby"),i=this.host.shadowRoot.getElementById(e);this.focusPreviousItem(i);break}const r=a.querySelectorAll('[role="menuitem"]')??[];h(t,r[0]);break}case"Home":e.preventDefault(),e.stopPropagation(),h(t,i[0]);break;case"End":e.preventDefault(),e.stopPropagation(),h(t,i[i.length-1])}}render(){return this.isMobile?i("zanit-mobile-menubar",{items:this.items,currentPath:this.currentPath,searchQuery:this.searchQuery,loading:this.loading,searchArea:this.searchArea,searchEnv:this.searchEnv}):i("nav",{"aria-label":"Zanichelli.it"},i("div",{class:"shadow-wrapper"},i("div",{class:"width-limiter"},i("ul",{class:"menubar",role:"menubar","aria-label":"Zanichelli.it"},this.loading&&[...new Array(4)].map(((e,t)=>i(r,null,i("li",{role:"none"},i("div",{class:"menubar-item"},i("z-ghost-loading",null))),t<3&&i("li",{role:"separator"})))),this.items?.map(((e,t)=>i(r,null,i("li",{role:"none"},i("a",{class:{"menubar-item":!0,active:this.isActive(e)},href:e.href,id:e.id,role:"menuitem",tabIndex:-1,"aria-expanded":e.menuItems?.length?this.openMenu===e.id?"true":"false":void 0,"aria-haspopup":e.menuItems?.length?"true":"false","aria-current":this.current.includes(e.id)?"page":"false",onPointerOver:()=>this.showMenu(e),onKeyDown:t=>this.handleItemKeydown(t,e),target:e.target},i("span",{"data-text":e.label},e.label),e.menuItems?.length>0&&i("z-icon",{name:this.openMenu===e.id?"chevron-up":"chevron-down",width:"0.875rem",height:"0.875rem"}))),t<this.items?.length-1&&i("li",{role:"separator"}))))),i("zanit-search-form",{searchQuery:this.searchQuery,searchArea:this.searchArea,searchEnv:this.searchEnv,onResetSearch:()=>this.searchQuery=void 0})),this.items.map((e=>this.openMenu===e.id&&i(b,{controlledBy:e.id,items:e.menuItems,currentPath:this.currentPath,onItemKeyDown:e=>this.handleMenuKeydown(e)})))),this.items?.filter((e=>this.isActive(e))).map((e=>e.navbarItems?.length&&i("nav",{class:{"sub-menubar":!0,"shadow-wrapper":!0},"aria-label":`Sezioni: ${e.label}`},i("ul",{role:"menubar"},e.navbarItems.map((t=>i(r,null,i("li",{role:"none"},i("a",{class:{"menubar-item":!0,active:this.isActive(t)},href:t.href,id:t.id,role:"menuitem",tabIndex:-1,"aria-haspopup":t.menuItems?.length?"true":"false","aria-expanded":t.menuItems?.length?this.openMenu===t.id?"true":"false":void 0,"aria-current":this.current.includes(t.id)?"page":"false",onPointerOver:()=>this.showMenu(t),onKeyDown:e=>this.handleItemKeydown(e,t),target:e.target},i("span",null,t.label),t.menuItems?.length>0&&i("z-icon",{name:this.openMenu===t.id?"chevron-up":"chevron-down",width:"0.75rem",height:"0.75rem"}))))))),e.navbarItems.map((e=>this.openMenu===e.id&&i(b,{controlledBy:e.id,items:e.menuItems,currentPath:this.currentPath,onItemKeyDown:e=>this.handleMenuKeydown(e)})))))))}static get delegatesFocus(){return!0}static get watchers(){return{data:[{parseData:0}],items:[{onItemsChange:0}],current:[{onCurrentChange:0}]}}};g.style=":host{position:relative;z-index:2;display:flex;width:100%;background-color:#fff;color:var(--gray900);font-family:var(--font-family-sans)}:host,*,::before,::after{box-sizing:border-box}*:focus:focus-visible{box-shadow:var(--shadow-focus-primary);outline:none}ul{padding:0;margin:0;list-style:none}a{color:var(--gray900);cursor:pointer;text-decoration:none}button{all:unset;cursor:pointer}:host nav{width:100%}.shadow-wrapper{position:relative;z-index:1;display:flex;width:100%}.shadow-wrapper::after{position:absolute;top:0;right:0;width:100%;height:100%;background:transparent;box-shadow:var(--shadow-1);content:'';pointer-events:none}.width-limiter{position:relative;display:flex;width:100%;max-width:var(--zanit-menubar-max-width, 1366px);margin:0 auto}.shadow-wrapper+.shadow-wrapper{z-index:0}.sub-menubar>ul{gap:28px}.width-limiter>ul,.sub-menubar>ul{position:relative;z-index:3;display:flex;width:100%;align-items:center;padding:0 var(--grid-margin);margin-right:auto;margin-left:auto;gap:20px}.shadow-wrapper>.width-limiter,.shadow-wrapper>ul{width:100%;max-width:var(--zanit-menubar-max-width, 1366px)}ul.menubar{height:3rem;padding-right:0}.menubar z-ghost-loading{display:block;width:120px;height:1.25rem}.menubar>li[role='separator']{width:1px;height:1.25rem;background-color:#000}.menubar-item{position:relative;display:flex;align-items:center;padding:14px 0;font-size:1rem;gap:8px;line-height:1.25rem}.menubar .menubar-item{text-transform:uppercase}.menubar-item [data-text]{display:flex;flex-direction:column}.menubar-item.active>[data-text],.menubar-item:hover>[data-text],.menubar-item:focus:focus-visible>[data-text]{font-weight:var(--font-bd)}.menubar-item>[data-text]::after{height:0;content:attr(data-text) / '';font-weight:var(--font-bd);letter-spacing:normal;pointer-events:none;user-select:none;visibility:hidden}.sub-menubar .menubar-item.active::after{position:absolute;z-index:-1;bottom:0;left:-4px;width:calc(100% + 8px);height:4px;background-color:var(--red500);content:''}zanit-search-form{margin-left:auto}.menu-wrapper{width:100%;background-color:#fff}.menu{position:relative;display:flex;width:100%;flex-direction:column;gap:32px 0}.menu .group{display:flex;flex-direction:column}.menu .group .group-name{border-bottom:1px solid currentcolor;margin-bottom:4px;color:var(--red500);font-size:0.875rem;font-weight:var(--font-md)}.menu .group .menu-list{display:flex;flex-direction:column;gap:8px}.menu .group .menu-list .menu-item{display:block;border-bottom:2px solid transparent;font-size:0.875rem;font-weight:var(--font-md)}.menu .menu-list .menu-item.active,.menu .menu-list .menu-item:hover{border-bottom-color:var(--red500)}.menu .group.highlight .menu-list .menu-item{font-size:1rem}@media (width >= 768px){.menu-wrapper{position:absolute;top:100%;left:0;display:flex;justify-content:center;box-shadow:var(--shadow-1)}.menu{display:grid;width:100%;max-width:var(--zanit-menubar-max-width, 1366px);padding:16px var(--grid-margin);gap:0 24px;grid-auto-columns:minmax(0, max-content);grid-auto-flow:column;grid-template-rows:minmax(0, max-content) max-content}.menu .group{display:grid;grid-row:1 / -1;grid-template-columns:1fr;grid-template-rows:subgrid}@supports not (grid-template-rows: subgrid){.menu .group{grid-template-rows:repeat(auto-fit, minmax(0, max-content))}}.menu .group .group-name{border:none;margin-bottom:16px}.menu .group .menu-list .menu-item{font-size:1rem}.menu .group.highlight .menu-list .menu-item{font-size:1.5rem}}";const f=class{constructor(t){e(this,t)}get host(){return t(this)}currentPath=[];items=[];searchQuery=void 0;loading=!1;searchEnv=l.PROD;searchArea;lastCurrent=void 0;parentItem=void 0;menuItems=void 0;menuType=void 0;open=!1;onItemsChange(){this.lastCurrent=this.currentPath?.length?this.currentPath[this.currentPath.length-1]:void 0,this.setupData(this.items)}setupData(e,t){if(void 0===this.lastCurrent)return this.parentItem=void 0,this.menuType="menubar",void(this.menuItems=e);for(const i of e){if(i.id===this.lastCurrent)return this.parentItem=t,this.menuType=i.menuItems?.length?"menu":"menubar",void(this.menuItems=i.menuItems||i.navbarItems);if(this.currentPath.length>1&&i.id===this.currentPath[this.currentPath.length-2]&&i.menuItems?.some((({id:e})=>e===this.lastCurrent)))return this.parentItem=i,this.menuType=i.menuItems?.length?"menu":"menubar",void(this.menuItems=i.menuItems||i.navbarItems);i.navbarItems?.length&&this.setupData(i.navbarItems,i)}}get menuItemsElement(){return Array.from(this.host.shadowRoot.querySelectorAll('[role="menuitem"]'))}initTabindex(){this.menuItemsElement.forEach(((e,t)=>e.setAttribute("tabindex",0===t?"0":"-1")))}toggleMenu(){this.open?this.open=!1:(this.open=!0,setTimeout((()=>{this.initTabindex(),this.menuItemsElement[0]?.focus({preventScroll:!0})}),200))}handleItemKeydown(e){switch(e.key){case"ArrowUp":{e.preventDefault(),e.stopPropagation();const t=this.menuItemsElement,i=t.indexOf(e.target);h(t[i],t[(i-1+t.length)%t.length]);break}case"ArrowDown":{e.preventDefault(),e.stopPropagation();const t=this.menuItemsElement,i=t.indexOf(e.target);h(t[i],t[(i+1)%t.length]);break}case"Home":e.preventDefault(),e.stopPropagation(),h(e.target,this.menuItemsElement[0]);break;case"End":e.preventDefault(),e.stopPropagation(),h(e.target,this.menuItemsElement.pop())}}connectedCallback(){this.lastCurrent=this.currentPath?.length?this.currentPath[this.currentPath.length-1]:void 0,this.setupData(this.items)}handleOutsideClick(e){o(this.host,e)||(this.open=!1)}handleKeydown(e){switch(e.key){case"Escape":this.open=!1;break;case"Tab":if(o(this.host,e))break;this.open=!1}}handleFocusout(e){o(this.host,e)||(this.open=!1)}render(){return i("nav",{key:"e3c4f8212d54b84206c2d40c9670263dd0f2460a","aria-label":"Zanichelli.it"},i("button",{key:"8f4600dbb2c530e5901127d556eee94dcd60947a",class:"burger-button",type:"button","aria-expanded":this.open?"true":"false","aria-controls":"mobile-menu","aria-label":this.open?"Chiudi menù":"Apri menù",onClick:()=>this.toggleMenu()},i("z-icon",{key:"aa3d06cca2f2c7e92cb4afb37a5085ea37ec8283",name:this.open?"multiply":"burger-menu",width:"1.5rem",height:"1.5rem"})),i("z-logo",{key:"af3724fc7f330c7b2f7d826bd0dd2edc2dbb5742",imageAlt:"Logo Zanichelli",link:"/",height:32,width:126}),i("zanit-search-form",{key:"cc3c8e2ece6ac0428864d8affcd567c9a1272824",searchQuery:this.searchQuery,onResetSearch:()=>this.searchQuery=void 0,searchArea:this.searchArea,searchEnv:this.searchEnv}),this.open&&i("ul",{key:"0c35b0f4869ae076a1c02f07f1b19e787f4c3780",class:"mobile-menu",role:"menubar"},!this.loading&&this.currentPath&&this.currentPath.length>0&&i("li",{key:"ff8e9d8871ebea21ba178d1ba9d295d26b018be2",role:"none"},i("a",{key:"4afb5ccda0e206f640f429ecfe7ac1e3491a475d",class:"parent",href:this.parentItem?.href??"/",id:this.parentItem?.id??void 0,role:"menuitem",tabIndex:-1,onKeyDown:e=>this.handleItemKeydown(e),target:this.parentItem?.target},i("z-icon",{key:"2db8da21ad88b937d591eac551a3599704e13147",name:"arrow-left",width:"0.5rem",height:"0.5rem"}),i("span",{key:"d285244285ccee5e76db049cb4fba1dd591d7ce1"},this.parentItem?.label||"Home"))),this.loading?i("div",{class:"items-container",role:"none"},[...new Array(4)].map((()=>i("li",{role:"none"},i("div",{class:"menubar-item",role:"none"},i("z-ghost-loading",null)))))):"menu"===this.menuType?i(b,{items:this.menuItems,controlledBy:this.parentItem?.id,currentPath:this.currentPath,onItemKeyDown:e=>this.handleItemKeydown(e)}):this.menuItems?.length>0&&i("div",{class:"items-container",role:"none"},this.menuItems.map((e=>i("li",{role:"none"},i("a",{class:{"menu-item":"menu"===this.menuType,"menubar-item":"menubar"===this.menuType},href:e.href,id:e.id,role:"menuitem","aria-current":this.lastCurrent===e.id?"page":"false",tabIndex:-1,onKeyDown:e=>this.handleItemKeydown(e),target:e.target},i("span",{"data-text":e.label},e.label))))))))}static get delegatesFocus(){return!0}static get watchers(){return{items:[{onItemsChange:0}],currentPath:[{onItemsChange:0}]}}};var w;f.style=":host{position:relative;z-index:2;display:block;width:100%;max-width:100%;height:3rem;background-color:#fff;color:var(--gray900);fill:var(--gray900);font-family:var(--font-family-sans)}:host,*,::before,::after{box-sizing:border-box}*:focus:focus-visible{box-shadow:var(--shadow-focus-primary);outline:none}ul{padding:0;margin:0;list-style:none}a{color:var(--gray900);cursor:pointer;text-decoration:none}button{all:unset;cursor:pointer}nav{display:flex;width:100%;align-items:center;padding-left:var(--grid-margin);gap:8px}nav::after{position:absolute;top:0;right:0;width:100%;height:100%;background:transparent;box-shadow:var(--shadow-1);content:'';pointer-events:none}z-logo{margin:8px 0}.mobile-menu{position:absolute;top:100%;left:0;display:flex;overflow:auto;width:100%;max-height:calc(100vh - 48px - var(--zanit-menubar-top-offset, 0px));flex-direction:column;padding:16px var(--grid-margin) 32px;background-color:#fff;box-shadow:var(--shadow-2);gap:8px}.mobile-menu li{width:100%}.mobile-menu .items-container{display:flex;min-height:256px;flex-direction:column;gap:8px}.mobile-menu .items-container z-ghost-loading{width:40%;height:1.2rem}.mobile-menu .items-container .menubar-item{display:block;width:100%;padding:8px 0;font-size:1rem;text-align:left}.mobile-menu .items-container li:not(:last-child) .menubar-item{border-bottom:1px solid #000}[role='menuitem'].parent{display:flex;width:fit-content;align-items:center;padding:0;border:none;font-size:0.875rem;gap:8px}zanit-search-form{margin-left:auto}.menu-wrapper{width:100%;background-color:#fff}.menu{position:relative;display:flex;width:100%;flex-direction:column;gap:32px 0}.menu .group{display:flex;flex-direction:column}.menu .group .group-name{border-bottom:1px solid currentcolor;margin-bottom:4px;color:var(--red500);font-size:0.875rem;font-weight:var(--font-md)}.menu .group .menu-list{display:flex;flex-direction:column;gap:8px}.menu .group .menu-list .menu-item{display:block;border-bottom:2px solid transparent;font-size:0.875rem;font-weight:var(--font-md)}.menu .menu-list .menu-item.active,.menu .menu-list .menu-item:hover{border-bottom-color:var(--red500)}.menu .group.highlight .menu-list .menu-item{font-size:1rem}@media (width >= 768px){.menu-wrapper{position:absolute;top:100%;left:0;display:flex;justify-content:center;box-shadow:var(--shadow-1)}.menu{display:grid;width:100%;max-width:var(--zanit-menubar-max-width, 1366px);padding:16px var(--grid-margin);gap:0 24px;grid-auto-columns:minmax(0, max-content);grid-auto-flow:column;grid-template-rows:minmax(0, max-content) max-content}.menu .group{display:grid;grid-row:1 / -1;grid-template-columns:1fr;grid-template-rows:subgrid}@supports not (grid-template-rows: subgrid){.menu .group{grid-template-rows:repeat(auto-fit, minmax(0, max-content))}}.menu .group .group-name{border:none;margin-bottom:16px}.menu .group .menu-list .menu-item{font-size:1rem}.menu .group.highlight .menu-list .menu-item{font-size:1.5rem}}",function(e){e.SCUOLA="Scuola",e["UNIVERSITÀ"]="Università",e.GIURIDICO="Giuridico",e.DIZIONARI="Dizionari",e.SAGGISTICA="Saggistica"}(w||(w={}));const v=Object.keys(w);const x=(e,t)=>({id:k(`word-${e}-${t}`),label:C(e,t),aria_label:A(e,t,!1),url:z({q:e,...t?{area:t}:{},user_query:e}),...S(e,e,t)}),y=(e,t,i)=>({id:k(`subj-${e}-${t}-${i}`),label:C(e,t),aria_label:A(e,t,!0),url:z({area:t,materia:i,user_query:e}),...S(e,void 0,t,i)}),k=e=>e.split("").map((e=>e.charCodeAt(0).toString(16))).join(""),z=e=>`/ricerca?${new URLSearchParams(e).toString()}`,S=(e,t,i,a)=>({user_query:e,...t?{query:t}:{},...i?{area:i}:{},...a?{subject:a}:{}}),C=(e,t)=>`<mark>${e}</mark> in <strong>${t?`${w[t]??t}`:"tutto il sito"}</strong>`,A=(e,t,i=!1)=>`Cerca la ${i?"materia":"parola"} ${e} ${t?`nel catalogo ${w[t]??t}`:"in tutto il sito"}`,I=e=>e.toLowerCase().replace(/\s+/g," "),E=e=>{const t=v.indexOf(e);return t>=0?t:100},T=class{constructor(t){e(this,t),this.search=s(this,"search"),this.resetSearch=s(this,"resetSearch")}formElement;subjectsByArea={};timer;get host(){return t(this)}showSearchbar=!1;_searchQuery=void 0;suggestions=[];activeSuggestion="";showSuggestions=!1;searchQuery=void 0;searchEnv=l.PROD;searchArea;onSearchQueryChange(){this._searchQuery=this.searchQuery,this.searchQuery&&this.openSearchbar(),this.resetSuggestions()}onSearchAreaChange(){this.resetSuggestions()}onShowSearchbarChange(){this.showSearchbar||(this.showSuggestions=!1)}onShowSuggestionsChange(){this.activeSuggestion=""}search;resetSearch;async connectedCallback(){this.subjectsByArea=await async function(e){try{const t=await fetch(`${u[e]}/categories.json`);if(!t.ok)throw new Error(`HTTP ${t.status}`);return await t.json()}catch(e){return console.error("Error fetching subjects:",e),{}}}(this.searchEnv),this.showSearchbar=!!this.searchQuery,this._searchQuery=this.searchQuery}handleOutsideClick(e){this.showSearchbar&&this.host&&!o(this.host,e)&&(this.showSearchbar=!1)}handleEsc(e){d(e)&&(this.showSuggestions?this.showSuggestions=!1:this.showSearchbar=!1)}handleTab(e){(e=>"Tab"===e.key)(e)&&(this.showSuggestions=!1,o(this.host,e)||(this.showSearchbar=!1))}openSearchbar(){this.showSearchbar=!0,setTimeout((()=>{this.host.shadowRoot.querySelector("#searchbar-input").focus({preventScroll:!0})}),500)}resetSearchQuery(){this.searchQuery=void 0,this.resetSearch.emit()}resetSuggestions(){this.suggestions=[],this.showSuggestions=!1}handleInputChange(e){this._searchQuery=e.target.value,this._searchQuery||(this.searchQuery=void 0),this.updateSuggestions()}updateSuggestions(){clearTimeout(this.timer);const e=(this._searchQuery||"").trim();e.length<3?this.resetSuggestions():this.timer=setTimeout((()=>{this.resetSuggestions(),this.suggestions=function(e,t,i){const a=function(e,t){const i=I(e);return Object.entries(t).filter((([,e])=>e.some((e=>e.toLowerCase()===i)))).map((([e])=>e))}(e,t),r=a.length>0,s=r?e.toUpperCase():void 0,n=[];return i&&n.push(x(e,i)),n.push(x(e)),r&&(i?[...a.filter((e=>e===i)),...a.filter((e=>e!==i)).sort(((e,t)=>E(e)-E(t)))].forEach((t=>n.push(y(e,t,s)))):a.sort(((e,t)=>E(e)-E(t))).forEach((t=>n.push(y(e,t,s))))),n}(e,this.subjectsByArea,this.searchArea?.toUpperCase()),this.showSuggestions=!0}),300)}onSearchSubmit(e){if(e.preventDefault(),this._searchQuery){if(this.activeSuggestion){const e=this.suggestions.find((e=>e.id===this.activeSuggestion));if(e)return this.submitSuggestionSearch(e),void(this.showSuggestions=!1)}this.showSearchbar=!1,this.search.emit({query:this._searchQuery,area:this.searchArea}).defaultPrevented||this.formElement.submit()}}submitSuggestionSearch(e){this.search.emit({user_query:e.user_query,query:e.query,area:e.area,subject:e.subject}).defaultPrevented||(window.location.href=e.url)}handleSuggestionsNav(e){if(!c(e)&&!(e=>"ArrowUp"===e.key)(e))return;if(!this.suggestions.length)return;const t=this.suggestions.map((e=>e.id));if(!t.length)return;e.preventDefault(),e.stopPropagation(),this.showSuggestions||(this.showSuggestions=!0);let i=null;const a=t[0],r=t[t.length-1],s=t.indexOf(this.activeSuggestion);i=s<0?c(e)?a:r:c(e)?t[s+1]||r:t[s-1]||a,this.activeSuggestion=i}renderSuggestions(){const e=(e,t)=>i("span",{key:t,class:"suggestion-head","aria-hidden":"true"},e);return i("div",{class:{"suggestions-wrapper":!0,hidden:!this.showSuggestions||!this.suggestions.length},onPointerOver:e=>e.preventDefault()},i("div",{id:"search-suggestions",class:"suggestions",role:"listbox","aria-label":"Seleziona tra i suggerimenti"},this.suggestions.map(((t,a)=>{const r=[];return 0===a?r.push(e("Cerca la parola","word-head")):t.subject&&!this.suggestions[a-1].subject&&(r.push(i("z-divider",{"aria-hidden":"true"})),r.push(e("Cerca la materia","subj-head"))),r.push(i("span",{key:a,id:t.id,class:"suggestion",role:"option","aria-label":t.aria_label,"aria-selected":this.activeSuggestion===t.id?"true":void 0,onClick:()=>this.submitSuggestionSearch(t)},i("z-icon",{name:"left-magnifying-glass"}),i("span",{"aria-hidden":"true",innerHTML:t.label}))),r}))))}render(){return i(a,{key:"c87ecbcbff0205ddb35fb96bbfbcca6bb7ac8802"},i("form",{key:"77f2951f88ae0361897161688f3a9875d555b20c",class:{searchbar:!0,"searchbar-open":this.showSearchbar},ref:e=>this.formElement=e,role:"search","aria-label":"Cerca nel sito",method:"get",action:"/ricerca",onSubmit:e=>this.onSearchSubmit(e),onReset:()=>this.resetSearchQuery()},!!this.searchArea&&i("input",{key:"3cf0dceef1acc58c3c0e637f974db6c7587be081",type:"hidden",name:"area",value:this.searchArea}),i("div",{key:"d797f9832f29b723010ca486298f0c4a4aabe3ee",class:"input-wrapper",role:"none"},this.searchQuery&&i("button",{key:"2d5971957d84e83120fc96f49e359635e3792104",type:"reset","aria-label":"Svuota campo di ricerca",disabled:!this.showSearchbar,"aria-hidden":this.showSearchbar?void 0:"true",tabIndex:this.showSearchbar?0:-1},i("z-icon",{key:"7027abe8c6a2211433048041a4ef2a5e273ca226",name:"multiply-circled"})),i("input",{key:"2184d3fa615d94bf3615606a4624abdbb81cb2ae",id:"searchbar-input",name:"q",type:"search",disabled:!this.showSearchbar,placeholder:"Cerca per parola chiave o ISBN",value:this.searchQuery,required:!0,autocomplete:"off",role:"combobox","aria-autocomplete":"list","aria-expanded":this.showSuggestions?"true":"false","aria-controls":"search-suggestions","aria-activedescendant":this.activeSuggestion,"aria-label":"Cerca per parola chiave o ISBN","aria-hidden":this.showSearchbar?void 0:"true",tabIndex:this.showSearchbar?0:-1,onInput:e=>this.handleInputChange(e),onKeyDown:e=>{d(e)&&e.preventDefault(),this.handleSuggestionsNav(e)}})),i("button",{key:"06a7ad6e3e4c74f2dd3bd56fb6f2da006c8d59c0",class:"searchbar-button","aria-label":this.showSearchbar?"Esegui ricerca":"Apri il campo di ricerca","aria-controls":"searchbar-input",type:this.showSearchbar?"submit":"button",onClick:()=>this.openSearchbar()},this.showSearchbar?null:i("span",{class:"searchbar-button-label"},"Cerca"),i("z-icon",{key:"72e66f0280f0b835e760c1631076b71fa5dc03fa",name:"search"}))),this.renderSuggestions())}static get watchers(){return{searchQuery:[{onSearchQueryChange:0}],searchArea:[{onSearchAreaChange:0}],showSearchbar:[{onShowSearchbarChange:0}],showSuggestions:[{onShowSuggestionsChange:0}]}}};T.style=":host,*,::before,::after{box-sizing:border-box}*:focus:focus-visible{box-shadow:var(--shadow-focus-primary);outline:none}button{all:unset;cursor:pointer}.searchbar{--searchbar-button-x-padding:14px;--searchbar-button-icon-width:1.75rem;--closed-searchbar-width:calc((var(--searchbar-button-x-padding) * 2) + var(--searchbar-button-icon-width) + 1px);position:absolute;z-index:5;top:0;right:0;display:flex;width:var(--closed-searchbar-width);height:3rem;justify-content:flex-end;transition:width 0.4s ease-in-out}.searchbar.searchbar-open{width:100%}.searchbar .input-wrapper{display:flex;overflow:hidden;width:100%;align-items:center;padding:8px;padding-left:var(--grid-margin);background-color:#fff;gap:8px;transition-duration:0.4s;transition-property:padding-right, padding-left, width;transition-timing-function:ease-in-out}.searchbar:not(.searchbar-open) .input-wrapper{overflow:hidden;width:0;padding:0}.searchbar button[type='reset']{--z-icon-width:1rem;--z-icon-height:1rem;display:flex;align-items:center;cursor:pointer}.searchbar input{z-index:1;width:100%;height:100%;padding:0;border:none;background-color:#fff;font-family:var(--font-family-sans);font-size:1rem}.searchbar.searchbar-open input:first-child{padding-left:4px;margin-left:-4px;}.searchbar input[type='search']::-webkit-search-cancel-button,.searchbar input[type='search']::-webkit-search-decoration{appearance:none}.searchbar input::placeholder{color:var(--gray500)}.searchbar .searchbar-button{display:flex;align-items:center;justify-content:center;padding:10px var(--searchbar-button-x-padding);border-left:1px solid #000;background:var(--zanit-accent-color);font-family:inherit;font-size:inherit;gap:64px;line-height:1}.searchbar .searchbar-button:focus-visible{z-index:1}.searchbar-button z-icon{--z-icon-width:var(--searchbar-button-icon-width);--z-icon-height:var(--searchbar-button-icon-width)}.suggestions-wrapper{position:absolute;z-index:4;top:3rem;left:50%;width:100vw;border-top:1px solid var(--gray200);margin-left:-50vw;background:#fff;box-shadow:var(--shadow-1)}.suggestions-wrapper.hidden{display:none}.suggestions{display:flex;width:100%;flex-direction:column;align-items:stretch;padding:var(--space-unit);margin:0 auto}.suggestion-head{padding:calc(var(--space-unit) * 0.75) var(--space-unit);color:var(--gray700);font-size:0.875rem;font-weight:var(--font-md);line-height:1.125rem}.suggestion{display:flex;padding:calc(var(--space-unit) * 0.75) var(--space-unit);color:var(--gray900);cursor:pointer;font-size:1rem;gap:var(--space-unit);line-height:1.5rem}.suggestion:hover,.suggestion[aria-selected='true']{background:var(--gray100)}.suggestion strong{font-weight:var(--font-bd)}.suggestion mark{background-color:var(--red50)}.suggestion z-icon{--z-icon-height:1.125rem;margin-top:0.125rem}.suggestions z-divider{margin:var(--space-unit) 0}@media (width < 1152px){.searchbar .searchbar-button>.searchbar-button-label{display:none}}@media (width >= 768px){.searchbar{--searchbar-button-x-padding:16px;--searchbar-button-icon-width:2rem}.searchbar .input-wrapper{gap:14px}.searchbar button[type='reset']{--z-icon-width:1.5rem;--z-icon-height:1.5rem}.searchbar input,.searchbar .searchbar-button{font-size:1.5rem}.searchbar .searchbar-button{padding:8px var(--searchbar-button-x-padding)}.suggestions{padding:var(--space-unit) calc(var(--space-unit) * 2)}}@media (width >= 1152px){.searchbar{--closed-searchbar-width:190px}}@media (width >= 1366px){.searchbar .searchbar-button{border-right:1px solid #000}.suggestions{max-width:1366px;padding:var(--space-unit) calc(var(--space-unit) * 3)}}";export{n as zanit_back_to_top,g as zanit_menubar,f as zanit_mobile_menubar,T as zanit_search_form}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const t=()=>{},e=":root{--font-md:500}.title-1,.title-2,.title-3,.title-4,.title-5,.title-6,.title-1-rg,.title-2-rg,.title-3-rg,.title-4-rg,.title-5-rg,.title-6-rg,.title-1-lt,.title-2-lt,.title-3-lt,.title-4-lt,.title-5-lt,.title-6-lt,.title-1-sb,.title-2-sb,.title-3-sb,.title-4-sb,.title-5-sb,.title-6-sb,.title-1-bd,.title-2-bd,.title-3-bd,.title-4-bd,.title-5-bd,.title-6-bd,.title-1-md,.title-2-md,.title-3-md,.title-4-md,.title-5-md,.title-6-md{font-family:var(--font-family-serif);font-weight:var(--font-rg)}.title-1-lt,.title-2-lt,.title-3-lt,.title-4-lt,.title-5-lt,.title-6-lt,.heading-1-lt,.heading-2-lt,.heading-3-lt,.heading-4-lt,.body-1-lt,.body-2-lt,.body-3-lt,.body-4-lt,.body-5-lt,.body-6-lt,.body-7-lt,.interactive-1-lt,.interactive-2-lt{font-weight:var(--font-lt)}.title-1-md,.title-2-md,.title-3-md,.title-4-md,.title-5-md,.title-6-md,.heading-1-md,.heading-2-md,.heading-3-md,.heading-4-md,.body-1-md,.body-2-md,.body-3-md,.body-4-md,.body-5-md,.body-6-md,.body-7-md,.interactive-1-md,.interactive-2-md{font-weight:var(--font-md)}.title-1-rg,.title-2-rg,.title-3-rg,.title-4-rg,.title-5-rg,.title-6-rg,.heading-1-rg,.heading-2-rg,.heading-3-rg,.heading-4-rg,.body-1-rg,.body-2-rg,.body-3-rg,.body-4-rg,.body-5-rg,.body-6-rg,.body-7-rg,.interactive-1-rg,.interactive-2-rg{font-weight:var(--font-rg)}.title-1-sb,.title-2-sb,.title-3-sb,.title-4-sb,.title-5-sb,.title-6-sb,.heading-1-sb,.heading-2-sb,.heading-3-sb,.heading-4-sb,.body-2-sb,.body-3-sb,.body-4-sb,.body-5-sb,.body-6-sb,.body-7-sb,.interactive-1-sb,.interactive-2-sb{font-weight:var(--font-sb)}.title-1-bd,.title-2-bd,.title-3-bd,.title-4-bd,.title-5-bd,.title-6-bd,.heading-1-bd,.heading-2-bd,.heading-3-bd,.heading-4-bd,.body-1-bd,.body-2-bd,.body-3-bd,.body-4-bd,.body-5-bd,.body-6-bd,.body-7-bd,.interactive-1-bd,.interactive-2-bd{font-weight:var(--font-bd)}.font-lt{font-weight:var(--font-lt)}.font-rg{font-weight:var(--font-rg)}.font-md{font-weight:var(--font-md)}.font-sb{font-weight:var(--font-sb)}.font-bd{font-weight:var(--font-bd)}.font-it{font-style:italic}.font-serif{font-family:var(--font-family-serif)}.font-sans{font-family:var(--font-family-sans)}.title-1,.title-1-sb,.title-1-bd,.title-1-rg,.title-1-lt,.title-1-md{font-size:72px;line-height:80px}.title-2,.title-2-sb,.title-2-bd,.title-2-rg,.title-2-lt,.title-2-md{font-size:48px;line-height:52px}.title-3,.title-3-sb,.title-3-bd,.title-3-rg,.title-3-lt,.title-3-md{font-size:2rem;line-height:2.75rem;}.title-4,.title-4-sb,.title-4-bd,.title-4-rg,.title-4-lt,.title-4-md{font-size:1.75rem;line-height:2rem;}.title-5,.title-5-sb,.title-5-bd,.title-5-rg,.title-5-lt,.title-5-md{font-size:1.5rem;line-height:1.75rem;}.title-6,.title-6-sb,.title-6-bd,.title-6-rg,.title-6-lt,.title-6-md{font-size:1.25rem;line-height:1.75rem;}.heading-1,.heading-1-sb,.heading-1-bd,.heading-1-rg,.heading-1-lt,.heading-1-md{font-size:2rem;line-height:2.75rem;}.heading-2,.heading-2-sb,.heading-2-bd,.heading-2-rg,.heading-2-lt,.heading-2-md{font-size:1.75rem;line-height:2rem;}.heading-3,.heading-3-sb,.heading-3-bd,.heading-3-rg,.heading-3-lt,.heading-3-md{font-size:1.5rem;line-height:1.75rem;}.heading-4,.heading-4-sb,.heading-4-bd,.heading-4-rg,.heading-4-lt,.heading-4-md{font-size:1.125rem;line-height:1.375rem;}.body-1,.body-1-sb,.body-1-bd,.body-1-rg,.body-1-lt,.body-1-md{font-size:1.5rem;line-height:2rem;}.body-2,.body-2-sb,.body-2-bd,.body-2-rg,.body-2-lt,.body-2-md{font-size:1.25rem;line-height:1.75rem;}.body-3,.body-3-sb,.body-3-bd,.body-3-rg,.body-3-lt,.body-3-md{font-size:1.125rem;line-height:1.5rem;}.body-4,.body-4-sb,.body-4-bd,.body-4-rg,.body-4-lt,.body-4-md{font-size:1rem;line-height:1.5rem;}.body-5,.body-5-sb,.body-5-bd,.body-5-rg,.body-5-lt,.body-5-md{font-size:0.875rem;line-height:1.125rem;}.body-6,.body-6-sb,.body-6-bd,.body-6-rg,.body-6-lt,.body-6-md{font-size:0.75rem;line-height:1rem;}.body-7,.body-7-sb,.body-7-bd,.body-7-rg,.body-7-lt,.body-7-md{font-size:0.625rem;line-height:0.875rem;}.interactive-1,.interactive-1-sb,.interactive-1-bd,.interactive-1-rg,.interactive-1-lt,.interactive-1-md{font-size:1rem;line-height:1.5rem;}.interactive-2,.interactive-2-sb,.interactive-2-bd,.interactive-2-rg,.interactive-2-lt,.interactive-2-md{font-size:0.875rem;line-height:1.125rem;}@media (width < 768px){.mobile-title-1,.mobile-title-1-sb,.mobile-title-1-bd,.mobile-title-1-rg,.mobile-title-1-lt,.mobile-title-1-md{font-size:4.5rem;line-height:5rem;}.mobile-title-2,.mobile-title-2-sb,.mobile-title-2-bd,.mobile-title-2-rg,.mobile-title-2-lt,.mobile-title-2-md{font-size:3rem;line-height:3.25rem;}.mobile-title-3,.mobile-title-3-sb,.mobile-title-3-bd,.mobile-title-3-rg,.mobile-title-3-lt,.mobile-title-3-md{font-size:2rem;line-height:2.75rem;}.mobile-title-4,.mobile-title-4-sb,.mobile-title-4-bd,.mobile-title-4-rg,.mobile-title-4-lt,.mobile-title-4-md{font-size:1.75rem;line-height:2rem;}.mobile-title-5,.mobile-title-5-sb,.mobile-title-5-bd,.mobile-title-5-rg,.mobile-title-5-lt,.mobile-title-5-md{font-size:1.5rem;line-height:1.75rem;}.mobile-title-6,.mobile-title-6-sb,.mobile-title-6-bd,.mobile-title-6-rg,.mobile-title-6-lt,.mobile-title-6-md{font-size:1.25rem;line-height:1.75rem;}.mobile-heading-1,.mobile-heading-1-sb,.mobile-heading-1-bd,.mobile-heading-1-rg,.mobile-heading-1-lt,.mobile-heading-1-md{font-size:2rem;line-height:2.75rem;}.mobile-heading-2,.mobile-heading-2-sb,.mobile-heading-2-bd,.mobile-heading-2-rg,.mobile-heading-2-lt,.mobile-heading-2-md{font-size:1.75rem;line-height:2rem;}.mobile-heading-3,.mobile-heading-3-sb,.mobile-heading-3-bd,.mobile-heading-3-rg,.mobile-heading-3-lt,.mobile-heading-3-md{font-size:1.5rem;line-height:1.75rem;}.mobile-heading-4,.mobile-heading-4-sb,.mobile-heading-4-bd,.mobile-heading-4-rg,.mobile-heading-4-lt,.mobile-heading-4-md{font-size:1.125rem;line-height:1.375rem;}.mobile-body-1,.mobile-body-1-sb,.mobile-body-1-bd,.mobile-body-1-rg,.mobile-body-1-lt,.mobile-body-1-md{font-size:1.5rem;line-height:2rem;}.mobile-body-2,.mobile-body-2-sb,.mobile-body-2-bd,.mobile-body-2-rg,.mobile-body-2-lt,.mobile-body-2-md{font-size:1.25rem;line-height:1.75rem;}.mobile-body-3,.mobile-body-3-sb,.mobile-body-3-bd,.mobile-body-3-rg,.mobile-body-3-lt,.mobile-body-3-md{font-size:1.125rem;line-height:1.5rem;}.mobile-body-4,.mobile-body-4-sb,.mobile-body-4-bd,.mobile-body-4-rg,.mobile-body-4-lt,.mobile-body-4-md{font-size:1rem;line-height:1.5rem;}.mobile-body-5,.mobile-body-5-sb,.mobile-body-5-bd,.mobile-body-5-rg,.mobile-body-5-lt,.mobile-body-5-md{font-size:0.875rem;line-height:1.125rem;}.mobile-body-6,.mobile-body-6-sb,.mobile-body-6-bd,.mobile-body-6-rg,.mobile-body-6-lt,.mobile-body-6-md{font-size:0.75rem;line-height:1rem;}.mobile-body-7,.mobile-body-7-sb,.mobile-body-7-bd,.mobile-body-7-rg,.mobile-body-7-lt,.mobile-body-7-md{font-size:0.625rem;line-height:0.875rem;}.mobile-interactive-1,.mobile-interactive-1-sb,.mobile-interactive-1-bd,.mobile-interactive-1-rg,.mobile-interactive-1-lt,.mobile-interactive-1-md{font-size:1rem;line-height:1.5rem;}.mobile-interactive-2,.mobile-interactive-2-sb,.mobile-interactive-2-bd,.mobile-interactive-2-rg,.mobile-interactive-2-lt,.mobile-interactive-2-md{font-size:0.875rem;line-height:1.125rem;}}@media (width >= 768px) and (width < 1152px){.tablet-title-1,.tablet-title-1-sb,.tablet-title-1-bd,.tablet-title-1-rg,.tablet-title-1-lt,.tablet-title-1-md{font-size:4.5rem;line-height:5rem;}.tablet-title-2,.tablet-title-2-sb,.tablet-title-2-bd,.tablet-title-2-rg,.tablet-title-2-lt,.tablet-title-2-md{font-size:3rem;line-height:3.25rem;}.tablet-title-3,.tablet-title-3-sb,.tablet-title-3-bd,.tablet-title-3-rg,.tablet-title-3-lt,.tablet-title-3-md{font-size:2rem;line-height:2.75rem;}.tablet-title-4,.tablet-title-4-sb,.tablet-title-4-bd,.tablet-title-4-rg,.tablet-title-4-lt,.tablet-title-4-md{font-size:1.75rem;line-height:2rem;}.tablet-title-5,.tablet-title-5-sb,.tablet-title-5-bd,.tablet-title-5-rg,.tablet-title-5-lt,.tablet-title-5-md{font-size:1.5rem;line-height:1.75rem;}.tablet-title-6,.tablet-title-6-sb,.tablet-title-6-bd,.tablet-title-6-rg,.tablet-title-6-lt,.tablet-title-6-md{font-size:1.25rem;line-height:1.75rem;}.tablet-heading-1,.tablet-heading-1-sb,.tablet-heading-1-bd,.tablet-heading-1-rg,.tablet-heading-1-lt,.tablet-heading-1-md{font-size:2rem;line-height:2.75rem;}.tablet-heading-2,.tablet-heading-2-sb,.tablet-heading-2-bd,.tablet-heading-2-rg,.tablet-heading-2-lt,.tablet-heading-2-md{font-size:1.75rem;line-height:2rem;}.tablet-heading-3,.tablet-heading-3-sb,.tablet-heading-3-bd,.tablet-heading-3-rg,.tablet-heading-3-lt,.tablet-heading-3-md{font-size:1.5rem;line-height:1.75rem;}.tablet-heading-4,.tablet-heading-4-sb,.tablet-heading-4-bd,.tablet-heading-4-rg,.tablet-heading-4-lt,.tablet-heading-4-md{font-size:1.125rem;line-height:1.375rem;}.tablet-body-1,.tablet-body-1-sb,.tablet-body-1-bd,.tablet-body-1-rg,.tablet-body-1-lt,.tablet-body-1-md{font-size:1.5rem;line-height:2rem;}.tablet-body-2,.tablet-body-2-sb,.tablet-body-2-bd,.tablet-body-2-rg,.tablet-body-2-lt,.tablet-body-2-md{font-size:1.25rem;line-height:1.75rem;}.tablet-body-3,.tablet-body-3-sb,.tablet-body-3-bd,.tablet-body-3-rg,.tablet-body-3-lt,.tablet-body-3-md{font-size:1.125rem;line-height:1.5rem;}.tablet-body-4,.tablet-body-4-sb,.tablet-body-4-bd,.tablet-body-4-rg,.tablet-body-4-lt,.tablet-body-4-md{font-size:1rem;line-height:1.5rem;}.tablet-body-5,.tablet-body-5-sb,.tablet-body-5-bd,.tablet-body-5-rg,.tablet-body-5-lt,.tablet-body-5-md{font-size:0.875rem;line-height:1.125rem;}.tablet-body-6,.tablet-body-6-sb,.tablet-body-6-bd,.tablet-body-6-rg,.tablet-body-6-lt,.tablet-body-6-md{font-size:0.75rem;line-height:1rem;}.tablet-body-7,.tablet-body-7-sb,.tablet-body-7-bd,.tablet-body-7-rg,.tablet-body-7-lt,.tablet-body-7-md{font-size:0.625rem;line-height:0.875rem;}.tablet-interactive-1,.tablet-interactive-1-sb,.tablet-interactive-1-bd,.tablet-interactive-1-rg,.tablet-interactive-1-lt,.tablet-interactive-1-md{font-size:1rem;line-height:1.5rem;}.tablet-interactive-2,.tablet-interactive-2-sb,.tablet-interactive-2-bd,.tablet-interactive-2-rg,.tablet-interactive-2-lt,.tablet-interactive-2-md{font-size:0.875rem;line-height:1.125rem;}}@media (width >= 1152px){.desktop-title-1,.desktop-title-1-sb,.desktop-title-1-bd,.desktop-title-1-rg,.desktop-title-1-lt,.desktop-title-1-md{font-size:4.5rem;line-height:5rem;}.desktop-title-2,.desktop-title-2-sb,.desktop-title-2-bd,.desktop-title-2-rg,.desktop-title-2-lt,.desktop-title-2-md{font-size:3rem;line-height:3.25rem;}.desktop-title-3,.desktop-title-3-sb,.desktop-title-3-bd,.desktop-title-3-rg,.desktop-title-3-lt,.desktop-title-3-md{font-size:2rem;line-height:2.75rem;}.desktop-title-4,.desktop-title-4-sb,.desktop-title-4-bd,.desktop-title-4-rg,.desktop-title-4-lt,.desktop-title-4-md{font-size:1.75rem;line-height:2rem;}.desktop-title-5,.desktop-title-5-sb,.desktop-title-5-bd,.desktop-title-5-rg,.desktop-title-5-lt,.desktop-title-5-md{font-size:1.5rem;line-height:1.75rem;}.desktop-title-6,.desktop-title-6-sb,.desktop-title-6-bd,.desktop-title-6-rg,.desktop-title-6-lt,.desktop-title-6-md{font-size:1.25rem;line-height:1.75rem;}.desktop-heading-1,.desktop-heading-1-sb,.desktop-heading-1-bd,.desktop-heading-1-rg,.desktop-heading-1-lt,.desktop-heading-1-md{font-size:2rem;line-height:2.75rem;}.desktop-heading-2,.desktop-heading-2-sb,.desktop-heading-2-bd,.desktop-heading-2-rg,.desktop-heading-2-lt,.desktop-heading-2-md{font-size:1.75rem;line-height:2rem;}.desktop-heading-3,.desktop-heading-3-sb,.desktop-heading-3-bd,.desktop-heading-3-rg,.desktop-heading-3-lt,.desktop-heading-3-md{font-size:1.5rem;line-height:1.75rem;}.desktop-heading-4,.desktop-heading-4-sb,.desktop-heading-4-bd,.desktop-heading-4-rg,.desktop-heading-4-lt,.desktop-heading-4-md{font-size:1.125rem;line-height:1.375rem;}.desktop-body-1,.desktop-body-1-sb,.desktop-body-1-bd,.desktop-body-1-rg,.desktop-body-1-lt,.desktop-body-1-md{font-size:1.5rem;line-height:2rem;}.desktop-body-2,.desktop-body-2-sb,.desktop-body-2-bd,.desktop-body-2-rg,.desktop-body-2-lt,.desktop-body-2-md{font-size:1.25rem;line-height:1.75rem;}.desktop-body-3,.desktop-body-3-sb,.desktop-body-3-bd,.desktop-body-3-rg,.desktop-body-3-lt,.desktop-body-3-md{font-size:1.125rem;line-height:1.5rem;}.desktop-body-4,.desktop-body-4-sb,.desktop-body-4-bd,.desktop-body-4-rg,.desktop-body-4-lt,.desktop-body-4-md{font-size:1rem;line-height:1.5rem;}.desktop-body-5,.desktop-body-5-sb,.desktop-body-5-bd,.desktop-body-5-rg,.desktop-body-5-lt,.desktop-body-5-md{font-size:0.875rem;line-height:1.125rem;}.desktop-body-6,.desktop-body-6-sb,.desktop-body-6-bd,.desktop-body-6-rg,.desktop-body-6-lt,.desktop-body-6-md{font-size:0.75rem;line-height:1rem;}.desktop-body-7,.desktop-body-7-sb,.desktop-body-7-bd,.desktop-body-7-rg,.desktop-body-7-lt,.desktop-body-7-md{font-size:0.625rem;line-height:0.875rem;}.desktop-interactive-1,.desktop-interactive-1-sb,.desktop-interactive-1-bd,.desktop-interactive-1-rg,.desktop-interactive-1-lt,.desktop-interactive-1-md{font-size:1rem;line-height:1.5rem;}.desktop-interactive-2,.desktop-interactive-2-sb,.desktop-interactive-2-bd,.desktop-interactive-2-rg,.desktop-interactive-2-lt,.desktop-interactive-2-md{font-size:0.875rem;line-height:1.125rem;}}z-button.zanit-button{--color-primary01:var(--red500);--color-hover-primary:var(--red800);--color-pressed-primary:var(--red400);--color-button-secondary:transparent;--color-primary02:transparent;--color-primary03:transparent}z-button.zanit-button-dark{--color-primary01:var(--gray950);--color-hover-primary:#000;--color-pressed-primary:var(--gray950);--color-button-secondary:transparent;--color-primary02:transparent;--color-primary03:transparent}:root{--zanit-accent-color:#ffe74c;--shadow-focus-primary:0 0 0 2px #fff, 0 0 2px 5px var(--gray950)}.zanit-link,.zanit-link-inverse{color:currentcolor;font-family:inherit;text-decoration:underline solid 12% var(--red500);text-underline-offset:28%}.zanit-link-inverse{color:var(--color-text-inverse);text-decoration-color:var(--color-text-inverse)}";function i(t,e,i){const l="undefined"!=typeof HTMLElement?HTMLElement.prototype:null;for(;t&&t!==l;){const l=Object.getOwnPropertyDescriptor(t,e);if(l&&(!i||l.get))return l;t=Object.getPrototypeOf(t)}}var l,o=(t,e)=>{var l;Object.entries(null!=(l=e.i.t)?l:{}).map((([l,[o]])=>{if(31&o||32&o){const o=t[l],n=i(Object.getPrototypeOf(t),l,!0)||Object.getOwnPropertyDescriptor(t,l);n&&Object.defineProperty(t,l,{get(){return n.get.call(this)},set(t){n.set.call(this,t)},configurable:!0,enumerable:!0}),e.l.has(l)?t[l]=e.l.get(l):void 0!==o&&(t[l]=o)}}))},n=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},d=(t,e)=>{e&&(t.__stencil__getHostRef=()=>e,e.o=t,512&e.i.m&&o(t,e))},b=(t,e)=>e in t,r=(t,e)=>(0,console.error)(t,e),s=new Map,a=new Map,m="undefined"!=typeof window?window:{},h={m:0,h:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,i,l)=>t.addEventListener(e,i,l),rel:(t,e,i,l)=>t.removeEventListener(e,i,l),ce:(t,e)=>new CustomEvent(t,e)},g=t=>Promise.resolve(t),c=(()=>{try{return!!m.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(t){}return!1})(),f=!!c&&(()=>!!m.document&&Object.getOwnPropertyDescriptor(m.document.adoptedStyleSheets,"length").writable)(),y=!1,p=[],u=[],v=(t,e)=>i=>{t.push(i),y||(y=!0,e&&4&h.m?w(z):h.raf(z))},k=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){r(t)}t.length=0},z=()=>{k(p),k(u),(y=p.length>0)&&h.raf(z)},w=t=>g().then(t),$=v(u,!0);function j(t){var i;const o={mode:"open"};o.delegatesFocus=!!(16&t.m);const n=this.attachShadow(o);if(void 0===l&&(l=null!=(i=function(t){if(!c)return;const e=new CSSStyleSheet;return e.replaceSync(t),e}(e))?i:null),l)f?n.adoptedStyleSheets.push(l):n.adoptedStyleSheets=[...n.adoptedStyleSheets,l];else if(!c){const t=document.createElement("style");t.innerHTML=e,n.prepend(t)}}function S(t){var e,i,l;return null!=(l=null==(i=null==(e=t.head)?void 0:e.querySelector('meta[name="csp-nonce"]'))?void 0:i.getAttribute("content"))?l:void 0}var x,O,E=new WeakMap,M=t=>"sc-"+t.p,C=t=>"object"==(t=typeof t)||"function"===t,L=(t,e,...i)=>{let l=null,o=null,n=!1,d=!1;const b=[],r=e=>{for(let i=0;i<e.length;i++)l=e[i],Array.isArray(l)?r(l):null!=l&&"boolean"!=typeof l&&((n="function"!=typeof t&&!C(l))&&(l+=""),n&&d?b[b.length-1].u+=l:b.push(n?N(null,l):l),d=n)};if(r(i),e){e.key&&(o=e.key);{const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}}if("function"==typeof t)return t(null===e?{}:e,b,D);const s=N(t,null);return s.v=e,b.length>0&&(s.k=b),s.$=o,s},N=(t,e)=>({m:0,j:t,u:null!=e?e:null,S:null,k:null,v:null,$:null}),R={},D={forEach:(t,e)=>t.map(H).forEach(e),map:(t,e)=>t.map(H).map(e).map(P)},H=t=>({vattrs:t.v,vchildren:t.k,vkey:t.$,vname:t.O,vtag:t.j,vtext:t.u}),P=t=>{if("function"==typeof t.vtag){const e={...t.vattrs};return t.vkey&&(e.key=t.vkey),t.vname&&(e.name=t.vname),L(t.vtag,e,...t.vchildren||[])}const e=N(t.vtag,t.vtext);return e.v=t.vattrs,e.k=t.vchildren,e.$=t.vkey,e.O=t.vname,e},T=t=>{if(!t)return;const e=Object.keys(t);if(0===e.length)return;let i=!1;for(const l of e){if(i)break;for(const e of t[l])if("string"==typeof e){i=!0;break}}if(!i)return t;const l={};for(const i of e)l[i]=t[i].map((t=>"string"==typeof t?{[t]:0}:t));return l},A=(t,e)=>null==t||C(t)?t:4&e?"false"!==t&&(""===t||!!t):2&e?"string"==typeof t?parseFloat(t):"number"==typeof t?t:NaN:1&e?t+"":t,U=t=>{var e;return null==(e=n(t))?void 0:e.$hostElement$},F=(t,e)=>{const i=U(t);return{emit:t=>W(i,e,{bubbles:!0,composed:!0,cancelable:!0,detail:t})}},W=(t,e,i)=>{const l=h.ce(e,i);return t.dispatchEvent(l),l},V=(t,e,i,l,o,d)=>{if(i===l)return;let r=b(t,e),s=e.toLowerCase();if("class"===e){const e=t.classList,o=G(i);let n=G(l);e.remove(...o.filter((t=>t&&!n.includes(t)))),e.add(...n.filter((t=>t&&!o.includes(t))))}else if("key"===e);else if("ref"===e)l&&ot(l,t);else if(r||"o"!==e[0]||"n"!==e[1]){if("a"===e[0]&&e.startsWith("attr:")){const i=e.slice(5);let o;{const e=n(t);if(e&&e.i&&e.i.t){const t=e.i.t[i];t&&t[1]&&(o=t[1])}}return o||(o=i.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),void(null==l||!1===l?!1===l&&""!==t.getAttribute(o)||t.removeAttribute(o):t.setAttribute(o,!0===l?"":l))}if("p"===e[0]&&e.startsWith("prop:")){const i=e.slice(5);try{t[i]=l}catch(t){}return}{const n=C(l);if((r||n&&null!==l)&&!o)try{if(t.tagName.includes("-"))t[e]!==l&&(t[e]=l);else{const o=null==l?"":l;"list"===e?r=!1:null!=i&&t[e]===o||("function"==typeof t.__lookupSetter__(e)?t[e]=o:t.setAttribute(e,o))}}catch(t){}null==l||!1===l?!1===l&&""!==t.getAttribute(e)||t.removeAttribute(e):(!r||4&d||o)&&!n&&1===t.nodeType&&t.setAttribute(e,l=!0===l?"":l)}}else if(e="-"===e[2]?e.slice(3):b(m,s)?s.slice(2):s[2]+e.slice(3),i||l){const o=e.endsWith(Y);e=e.replace(Z,""),i&&h.rel(t,e,i,o),l&&h.ael(t,e,l,o)}},q=/\s/,G=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(q):[]),Y="Capture",Z=RegExp(Y+"$"),_=(t,e,i)=>{const l=11===e.S.nodeType&&e.S.host?e.S.host:e.S,o=t&&t.v||{},n=e.v||{};for(const t of B(Object.keys(o)))t in n||V(l,t,o[t],void 0,i,e.m);for(const t of B(Object.keys(n)))V(l,t,o[t],n[t],i,e.m)};function B(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var I=!1,J=[],K=[],Q=(t,e,i)=>{const l=e.k[i];let o,n,d=0;if(null!=l.u)o=l.S=m.document.createTextNode(l.u);else{if(!m.document)throw Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");if(o=l.S=m.document.createElement(l.j),_(null,l,I),null!=x&&void 0!==x&&o["s-si"]!==x&&o.classList.add(o["s-si"]=x),l.k){const e="template"===l.j?o.content:o;for(d=0;d<l.k.length;++d)n=Q(t,l,d),n&&e.appendChild(n)}}return o["s-hn"]=O,o},X=(t,e,i,l,o,n)=>{let d,b=t;for(b.shadowRoot&&b.tagName===O&&(b=b.shadowRoot),"template"===i.j&&(b=b.content);o<=n;++o)l[o]&&(d=Q(null,i,o),d&&(l[o].S=d,nt(b,d,e)))},tt=(t,e,i)=>{for(let l=e;l<=i;++l){const e=t[l];if(e){const t=e.S;lt(e),t&&t.remove()}}},et=(t,e,i=!1)=>t.j===e.j&&(i?(i&&!t.$&&e.$&&(t.$=e.$),!0):t.$===e.$),it=(t,e,i=!1)=>{const l=e.S=t.S,o=t.k,n=e.k,d=e.u;null==d?(_(t,e,I),null!==o&&null!==n?((t,e,i,l,o=!1)=>{let n,d,b=0,r=0,s=0,a=0,m=e.length-1,h=e[0],g=e[m],c=l.length-1,f=l[0],y=l[c];const p="template"===i.j?t.content:t;for(;b<=m&&r<=c;)if(null==h)h=e[++b];else if(null==g)g=e[--m];else if(null==f)f=l[++r];else if(null==y)y=l[--c];else if(et(h,f,o))it(h,f,o),h=e[++b],f=l[++r];else if(et(g,y,o))it(g,y,o),g=e[--m],y=l[--c];else if(et(h,y,o))it(h,y,o),nt(p,h.S,g.S.nextSibling),h=e[++b],y=l[--c];else if(et(g,f,o))it(g,f,o),nt(p,g.S,h.S),g=e[--m],f=l[++r];else{for(s=-1,a=b;a<=m;++a)if(e[a]&&null!==e[a].$&&e[a].$===f.$){s=a;break}s>=0?(d=e[s],d.j!==f.j?n=Q(e&&e[r],i,s):(it(d,f,o),e[s]=void 0,n=d.S),f=l[++r]):(n=Q(e&&e[r],i,r),f=l[++r]),n&&nt(h.S.parentNode,n,h.S)}b>m?X(t,null==l[c+1]?null:l[c+1].S,i,l,r,c):r>c&&tt(e,b,m)})(l,o,e,n,i):null!==n?(null!==t.u&&(l.textContent=""),X(l,null,e,n,0,n.length-1)):!i&&null!==o&&tt(o,0,o.length-1)):t.u!==d&&(l.data=d)},lt=t=>{t.v&&t.v.ref&&J.push((()=>t.v.ref(null))),t.k&&t.k.map(lt)},ot=(t,e)=>{K.push((()=>t(e)))},nt=(t,e,i)=>t.__insertBefore?t.__insertBefore(e,i):null==t?void 0:t.insertBefore(e,i),dt=(t,e)=>{if(e&&!t.M&&e["s-p"]){const i=e["s-p"].push(new Promise((l=>t.M=()=>{e["s-p"].splice(i-1,1),l()})))}},bt=(t,e)=>{if(t.m|=16,4&t.m)return void(t.m|=512);dt(t,t.C);const i=()=>rt(t,e);if(!e)return $(i);queueMicrotask((()=>{i()}))},rt=(t,e)=>{const i=t.$hostElement$,l=t.o;if(!l)throw Error(`Can't render component <${i.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let o;return e?(t.m|=256,t.L&&(t.L.map((([t,e])=>ft(l,t,e,i))),t.L=void 0),t.N.length&&t.N.forEach((t=>t(i))),o=ft(l,"componentWillLoad",void 0,i)):o=ft(l,"componentWillUpdate",void 0,i),o=st(o,(()=>ft(l,"componentWillRender",void 0,i))),st(o,(()=>mt(t,l,e)))},st=(t,e)=>at(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),at=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,mt=async(t,e,i)=>{var l;const o=t.$hostElement$,n=o["s-rc"];i&&(t=>{const e=t.i,i=t.$hostElement$,l=e.m,o=((t,e)=>{var i,l,o;const n=M(e),d=a.get(n);if(!m.document)return n;if(t=11===t.nodeType?t:m.document,d)if("string"==typeof d){let o,b=E.get(t=t.head||t);if(b||E.set(t,b=new Set),!b.has(n)){o=m.document.createElement("style"),o.textContent=d;const r=null!=(i=h.R)?i:S(m.document);if(null!=r&&o.setAttribute("nonce",r),!(1&e.m))if("HEAD"===t.nodeName){const e=t.querySelectorAll("link[rel=preconnect]"),i=e.length>0?e[e.length-1].nextSibling:t.querySelector("style");t.insertBefore(o,(null==i?void 0:i.parentNode)===t?i:null)}else if("host"in t)if(c){const e=new(null!=(l=t.defaultView)?l:t.ownerDocument.defaultView).CSSStyleSheet;e.replaceSync(d),f?t.adoptedStyleSheets.unshift(e):t.adoptedStyleSheets=[e,...t.adoptedStyleSheets]}else{const e=t.querySelector("style");e?e.textContent=d+e.textContent:t.prepend(o)}else t.append(o);1&e.m&&t.insertBefore(o,null),4&e.m&&(o.textContent+="slot-fb{display:contents}slot-fb[hidden]{display:none}"),b&&b.add(n)}}else{let e=E.get(t);if(e||E.set(t,e=new Set),!e.has(n)){const i=null!=(o=t.defaultView)?o:t.ownerDocument.defaultView;let l;if(d.constructor===i.CSSStyleSheet)l=d;else{l=new i.CSSStyleSheet;for(let t=0;t<d.cssRules.length;t++)l.insertRule(d.cssRules[t].cssText,t)}f?t.adoptedStyleSheets.push(l):t.adoptedStyleSheets=[...t.adoptedStyleSheets,l],e.add(n)}}return n})(i.shadowRoot?i.shadowRoot:i.getRootNode(),e);10&l&&(i["s-sc"]=o,i.classList.add(o+"-h"))})(t);ht(t,e,o,i),n&&(n.map((t=>t())),o["s-rc"]=void 0);{const e=null!=(l=o["s-p"])?l:[],i=()=>gt(t);0===e.length?i():(Promise.all(e).then(i).catch(i),t.m|=4,e.length=0)}},ht=(t,e,i,l)=>{try{e=e.render(),t.m&=-17,t.m|=2,((t,e,i=!1)=>{const l=t.$hostElement$,o=t.D||N(null,null),n=(t=>t&&t.j===R)(e)?e:L(null,null,e);if(O=l.tagName,i&&n.v)for(const t of Object.keys(n.v))l.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(n.v[t]=l[t]);n.j=null,n.m|=4,t.D=n,n.S=o.S=l.shadowRoot||l,x=l["s-sc"],it(o,n,i),J.forEach((t=>t())),J.length=0,K.forEach((t=>t())),K.length=0})(t,e,l)}catch(e){r(e,t.$hostElement$)}return null},gt=t=>{const e=t.$hostElement$,i=t.o,l=t.C;ft(i,"componentDidRender",void 0,e),64&t.m?ft(i,"componentDidUpdate",void 0,e):(t.m|=64,yt(e),ft(i,"componentDidLoad",void 0,e),t.H(e),l||ct()),t.M&&(t.M(),t.M=void 0),512&t.m&&w((()=>bt(t,!1))),t.m&=-517},ct=()=>{w((()=>W(m,"appload",{detail:{namespace:"zanichelli-it-frontend-kit"}})))},ft=(t,e,i,l)=>{if(t&&t[e])try{return t[e](i)}catch(t){r(t,l)}},yt=t=>t.classList.add("hydrated"),pt=(t,e,i,l)=>{const o=n(t);if(!o)return;if(!o)throw Error(`Couldn't find host element for "${l.p}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/stenciljs/core/issues/5457).`);const d=o.$hostElement$,b=o.l.get(e),s=o.m,a=o.o;if(i=A(i,l.t[e][0]),!(8&s&&void 0!==b||i===b||Number.isNaN(b)&&Number.isNaN(i))){if(o.l.set(e,i),l.P){const t=l.P[e];t&&t.map((t=>{try{const[[l,n]]=Object.entries(t);(128&s||1&n)&&(a?a[l](i,b,e):o.N.push((()=>{o.o[l](i,b,e)})))}catch(t){r(t,d)}}))}if(2&s){if(a.componentShouldUpdate&&!1===a.componentShouldUpdate(i,b,e)&&!(16&s))return;16&s||bt(o,!1)}}},ut=(t,e,l)=>{var o,d;const b=t.prototype;{t.watchers&&!e.P&&(e.P=T(t.watchers)),t.deserializers&&!e.T&&(e.T=t.deserializers),t.serializers&&!e.A&&(e.A=t.serializers);const r=Object.entries(null!=(o=e.t)?o:{});if(r.map((([t,[o]])=>{if(31&o||2&l&&32&o){const{get:d,set:r}=i(b,t)||{};d&&(e.t[t][0]|=2048),r&&(e.t[t][0]|=4096),(1&l||!d)&&Object.defineProperty(b,t,{get(){{if(!(2048&e.t[t][0]))return((t,e)=>n(this).l.get(e))(0,t);const i=n(this),l=i?i.o:b;if(!l)return;return l[t]}},configurable:!0,enumerable:!0}),Object.defineProperty(b,t,{set(i){const d=n(this);if(d){if(r)return void 0===(32&o?this[t]:d.$hostElement$[t])&&d.l.get(t)&&(i=d.l.get(t)),r.call(this,A(i,o)),void pt(this,t,i=32&o?this[t]:d.$hostElement$[t],e);{if(!(1&l&&4096&e.t[t][0]))return pt(this,t,i,e),void(1&l&&!d.o&&d.N.push((()=>{4096&e.t[t][0]&&d.o[t]!==d.l.get(t)&&(d.o[t]=i)})));const n=()=>{const l=d.o[t];!d.l.get(t)&&l&&d.l.set(t,l),d.o[t]=A(i,o),pt(this,t,d.o[t],e)};d.o?n():d.N.push((()=>{n()}))}}}})}})),1&l){const i=new Map;b.attributeChangedCallback=function(t,l,o){h.jmp((()=>{var d;const s=i.get(t),a=n(this);if(this.hasOwnProperty(s)&&(o=this[s],delete this[s]),b.hasOwnProperty(s)&&"number"==typeof this[s]&&this[s]==o)return;if(null==s){const i=null==a?void 0:a.m;if(a&&i&&!(8&i)&&o!==l){const n=a.o,b=null==(d=e.P)?void 0:d[t];null==b||b.forEach((e=>{const[[d,b]]=Object.entries(e);null!=n[d]&&(128&i||1&b)&&n[d].call(n,o,l,t)}))}return}const m=r.find((([t])=>t===s)),h=m&&4&m[1][0],g=h&&null===o&&void 0===this[s];h&&(o=null!==o&&"false"!==o);const c=Object.getOwnPropertyDescriptor(b,s);g||o==this[s]||c.get&&!c.set||(this[s]=o)}))},t.observedAttributes=Array.from(new Set([...Object.keys(null!=(d=e.P)?d:{}),...r.filter((([t,e])=>31&e[0])).map((([t,e])=>{const l=e[1]||t;return i.set(l,t),l}))]))}}return t},vt=(t,e)=>{ft(t,"connectedCallback",void 0,e)},kt=(t,e)=>{ft(t,"disconnectedCallback",void 0,e||t)},zt=(t,e={})=>{var i;if(!m.document)return void console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");const l=[],o=e.exclude||[],d=m.customElements,b=m.document.head,g=b.querySelector("meta[charset]"),f=m.document.createElement("style"),y=[];let p,u=!0;if(Object.assign(h,e),h.h=new URL(e.resourcesUrl||"./",m.document.baseURI).href,t.map((t=>{t[1].map((e=>{var i,b;const m={m:e[0],p:e[1],t:e[2],U:e[3]};m.t=e[2],m.U=e[3],m.P=T(e[4]),m.A=null!=(i=e[5])?i:{},m.T=null!=(b=e[6])?b:{};const g=m.p,f=class extends HTMLElement{"s-p";"s-rc";hasRegisteredEventListeners=!1;constructor(t){if(super(t),((t,e)=>{const i={m:0,$hostElement$:t,i:e,l:new Map,F:new Map};i.W=new Promise((t=>i.H=t)),t["s-p"]=[],t["s-rc"]=[],i.N=[];const l=i;t.__stencil__getHostRef=()=>l})(t=this,m),1&m.m)if(t.shadowRoot){if("open"!==t.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${m.p}! Mode is set to ${t.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else j.call(t,m)}connectedCallback(){const t=n(this);t&&(this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0,$t(this,t,m.U)),p&&(clearTimeout(p),p=null),u?y.push(this):h.jmp((()=>(t=>{if(!(1&h.m)){const e=n(t);if(!e)return;const i=e.i,l=()=>{};if(1&e.m)$t(t,e,i.U),(null==e?void 0:e.o)?vt(e.o,t):(null==e?void 0:e.W)&&e.W.then((()=>vt(e.o,t)));else{e.m|=1;{let i=t;for(;i=i.parentNode||i.host;)if(i["s-p"]){dt(e,e.C=i);break}}i.t&&Object.entries(i.t).map((([e,[i]])=>{if(31&i&&Object.prototype.hasOwnProperty.call(t,e)){const i=t[e];delete t[e],t[e]=i}})),(async(t,e,i)=>{let l;try{if(!(32&e.m)){if(e.m|=32,i.V){const o=((t,e)=>{const i=t.p.replace(/-/g,"_"),l=t.V;if(!l)return;const o=s.get(l);return o?o[i]:import(`./${l}.entry.js`).then((t=>(s.set(l,t),t[i])),(t=>{r(t,e.$hostElement$)}))
|
|
2
|
+
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(i,e);if(o&&"then"in o){const t=()=>{};l=await o,t()}else l=o;if(!l)throw Error(`Constructor for "${i.p}#${e.q}" was not found`);l.isProxied||(i.P=T(l.watchers),i.A=l.serializers,i.T=l.deserializers,ut(l,i,2),l.isProxied=!0);const n=()=>{};e.m|=8;try{new l(e)}catch(e){r(e,t)}e.m&=-9,e.m|=128,n(),vt(e.o,t)}else l=t.constructor,customElements.whenDefined(t.localName).then((()=>e.m|=128));if(l&&l.style){let t;"string"==typeof l.style&&(t=l.style);const e=M(i);if(!a.has(e)){const l=()=>{};((t,e,i)=>{let l=a.get(t);c&&i?(l=l||new CSSStyleSheet,"string"==typeof l?l=e:l.replaceSync(e)):l=e,a.set(t,l)})(e,t,!!(1&i.m)),l()}}}const o=e.C,n=()=>bt(e,!0);o&&o["s-rc"]?o["s-rc"].push(n):n()}catch(i){r(i,t),e.M&&(e.M(),e.M=void 0),e.H&&e.H(t)}})(t,e,i)}l()}})(this))))}disconnectedCallback(){h.jmp((()=>(async t=>{if(!(1&h.m)){const e=n(t);(null==e?void 0:e.G)&&(e.G.map((t=>t())),e.G=void 0),(null==e?void 0:e.o)?kt(e.o,t):(null==e?void 0:e.W)&&e.W.then((()=>kt(e.o,t)))}E.has(t)&&E.delete(t),t.shadowRoot&&E.has(t.shadowRoot)&&E.delete(t.shadowRoot)})(this))),h.raf((()=>{var t;const e=n(this);if(!e)return;const i=y.findIndex((t=>t===this));i>-1&&y.splice(i,1),(null==(t=null==e?void 0:e.D)?void 0:t.S)instanceof Node&&!e.D.S.isConnected&&delete e.D.S}))}componentOnReady(){var t;return null==(t=n(this))?void 0:t.W}};m.V=t[0],o.includes(g)||d.get(g)||(l.push(g),d.define(g,ut(f,m,1)))}))})),l.length>0&&(f.textContent+=l.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",f.innerHTML.length)){f.setAttribute("data-styles","");const t=null!=(i=h.R)?i:S(m.document);null!=t&&f.setAttribute("nonce",t),b.insertBefore(f,g?g.nextSibling:b.firstChild)}u=!1,y.length?y.map((t=>t.connectedCallback())):h.jmp((()=>p=setTimeout(ct,30)))},wt=(t,e)=>e,$t=(t,e,i)=>{i&&m.document&&i.map((([i,l,o])=>{const n=St(m.document,t,i),d=jt(e,o),b=xt(i);h.ael(n,l,d,b),(e.G=e.G||[]).push((()=>h.rel(n,l,d,b)))}))},jt=(t,e)=>i=>{var l;try{256&t.m?null==(l=t.o)||l[e](i):(t.L=t.L||[]).push([e,i])}catch(e){r(e,t.$hostElement$)}},St=(t,e,i)=>4&i?t:8&i?m:e,xt=t=>({passive:!!(1&t),capture:!!(2&t)}),Ot=t=>h.R=t;export{wt as F,R as H,U as a,zt as b,F as c,t as g,L as h,g as p,d as r,Ot as s}
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
import{p as e,g as a,b as r}from"./p-
|
|
2
|
-
//# sourceMappingURL=zanichelli-it-frontend-kit.esm.js.map
|
|
1
|
+
import{p as e,g as a,b as r}from"./p-CFgcJxsy.js";export{s as setNonce}from"./p-CFgcJxsy.js";(()=>{const a=import.meta.url,r={};return""!==a&&(r.resourcesUrl=new URL(".",a).href),e(r)})().then((async e=>(await a(),r([["p-93d8b277",[[529,"zanit-menubar",{data:[1],current:[1],searchQuery:[1025,"search-query"],searchEnv:[1,"search-env"],searchArea:[1,"search-area"],items:[32],openMenu:[32],openNavbar:[32],currentPath:[32],isMobile:[32],loading:[32]},[[5,"click","handleOutsideClick"],[5,"keydown","handleKeydown"],[1,"mouseover","handleMouseover"],[1,"mouseout","handleMouseout"],[1,"focusout","handleFocusout"]],{data:[{parseData:0}],items:[{onItemsChange:0}],current:[{onCurrentChange:0}]}],[514,"zanit-back-to-top",{pageMinHeight:[2,"page-min-height"],scrollMinHeight:[2,"scroll-min-height"],showFab:[32],currentPageHeight:[32],isMobile:[32]},[[9,"scroll","handleScroll"]]],[529,"zanit-mobile-menubar",{currentPath:[16],items:[16],searchQuery:[1025,"search-query"],loading:[4],searchEnv:[1,"search-env"],searchArea:[1,"search-area"],lastCurrent:[32],parentItem:[32],menuItems:[32],menuType:[32],open:[32]},[[5,"click","handleOutsideClick"],[1,"keydown","handleKeydown"],[5,"focusin","handleFocusout"]],{items:[{onItemsChange:0}],currentPath:[{onItemsChange:0}]}],[513,"zanit-search-form",{searchQuery:[1025,"search-query"],searchEnv:[1,"search-env"],searchArea:[1,"search-area"],showSearchbar:[32],_searchQuery:[32],suggestions:[32],activeSuggestion:[32],showSuggestions:[32]},[[5,"mousedown","handleOutsideClick"],[1,"keydown","handleEsc"],[5,"keyup","handleTab"]],{searchQuery:[{onSearchQueryChange:0}],searchArea:[{onSearchAreaChange:0}],showSearchbar:[{onShowSearchbarChange:0}],showSuggestions:[{onShowSuggestionsChange:0}]}]]]],e))));
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zanichelli/zanichelli-it-frontend-kit",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.2",
|
|
4
4
|
"description": "Zanichelli.it frontend kit",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
|
-
"url": "https://github.com/ZanichelliEditore/zanichelli-it-frontend-kit.git"
|
|
8
|
+
"url": "git+https://github.com/ZanichelliEditore/zanichelli-it-frontend-kit.git"
|
|
9
9
|
},
|
|
10
10
|
"type": "module",
|
|
11
11
|
"main": "dist/index.cjs.js",
|
|
@@ -37,14 +37,24 @@
|
|
|
37
37
|
"loader/",
|
|
38
38
|
"www/"
|
|
39
39
|
],
|
|
40
|
+
"scripts": {
|
|
41
|
+
"build": "stencil build",
|
|
42
|
+
"start": "stencil build --dev --watch --no-cache --serve",
|
|
43
|
+
"test": "stencil test --spec --e2e",
|
|
44
|
+
"test.watch": "stencil test --spec --e2e --watchAll",
|
|
45
|
+
"generate": "stencil generate",
|
|
46
|
+
"lint": "eslint . && stylelint \"src/**/*.css\" && prettier --check .",
|
|
47
|
+
"lint-fix": "eslint . --fix && stylelint \"src/**/*.css\" --fix && prettier --write ."
|
|
48
|
+
},
|
|
40
49
|
"peerDependencies": {
|
|
41
50
|
"@zanichelli/albe-web-components": "^18.3.2"
|
|
42
51
|
},
|
|
43
52
|
"devDependencies": {
|
|
44
|
-
"@eslint/js": "^9.
|
|
45
|
-
"@stencil/core": "^4.
|
|
53
|
+
"@eslint/js": "^9.39.4",
|
|
54
|
+
"@stencil/core": "^4.43.4",
|
|
55
|
+
"@stencil/eslint-plugin": "^1.2.0",
|
|
46
56
|
"@types/node": "^22.13.5",
|
|
47
|
-
"eslint": "^9.
|
|
57
|
+
"eslint": "^9.39.4",
|
|
48
58
|
"prettier": "3.5.3",
|
|
49
59
|
"stylelint": "^16.19.1",
|
|
50
60
|
"stylelint-config-idiomatic-order": "^10.0.0",
|
|
@@ -52,13 +62,5 @@
|
|
|
52
62
|
"typescript": "^5.8.3",
|
|
53
63
|
"typescript-eslint": "^8.33.1"
|
|
54
64
|
},
|
|
55
|
-
"
|
|
56
|
-
|
|
57
|
-
"start": "stencil build --dev --watch --no-cache --serve",
|
|
58
|
-
"test": "stencil test --spec --e2e",
|
|
59
|
-
"test.watch": "stencil test --spec --e2e --watchAll",
|
|
60
|
-
"generate": "stencil generate",
|
|
61
|
-
"lint": "eslint . && stylelint \"src/**/*.css\" && prettier --check .",
|
|
62
|
-
"lint-fix": "eslint . --fix && stylelint \"src/**/*.css\" --fix && prettier --write ."
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
+
"packageManager": "pnpm@10.10.0+sha256.fa0f513aa8191764d2b6b432420788c270f07b4f999099b65bb2010eec702a30"
|
|
66
|
+
}
|
package/www/build/index.esm.js
CHANGED