PageSourceSearch

https://www.provincia.terni.it/portal/combo?browserId=chrome&minif…&/o/frontend-js-web/liferay/workflow.js

js provincia.terni.it collected 2026-10-02 12:10:58 UTC 375,578 bytes, 6,938 lines download raw bytes

1YUI.add('widget-stdmod', function (Y, NAME) {
2
3/**
4 * Provides standard module support for Widgets through an extension.
5 *
6 * @module widget-stdmod
7 */
8    var L = Y.Lang,
9        Node = Y.Node,
10        UA = Y.UA,
11        Widget = Y.Widget,
12
13        EMPTY = "",
14        HD = "hd",
15        BD = "bd",
16        FT = "ft",
17        HEADER = "header",
18        BODY = "body",
19        FOOTER = "footer",
20        FILL_HEIGHT = "fillHeight",
21        STDMOD = "stdmod",
22
23        NODE_SUFFIX = "Node",
24        CONTENT_SUFFIX = "Content",
25
26        FIRST_CHILD = "firstChild",
27        CHILD_NODES = "childNodes",
28        OWNER_DOCUMENT = "ownerDocument",
29
30        CONTENT_BOX = "contentBox",
31
32        HEIGHT = "height",
33        OFFSET_HEIGHT = "offsetHeight",
34        AUTO = "auto",
35
36        HeaderChange = "headerContentChange",
37        BodyChange = "bodyContentChange",
38        FooterChange = "footerContentChange",
39        FillHeightChange = "fillHeightChange",
40        HeightChange = "heightChange",
41        ContentUpdate = "contentUpdate",
42
43        RENDERUI = "renderUI",
44        BINDUI = "bindUI",
45        SYNCUI = "syncUI",
46
47        APPLY_PARSED_CONFIG = "_applyParsedConfig",
48
49        UI = Y.Widget.UI_SRC;
50
51    /**
52     * Widget extension, which can be used to add Standard Module support to the
53     * base Widget class, through the <a href="Base.html#method_build">Base.build</a>
54     * method.
55     * <p>
56     * The extension adds header, body and footer sections to the Widget's content box and
57     * provides the corresponding methods and attributes to modify the contents of these sections.
58     * </p>
59     * @class WidgetStdMod
60     * @param {Object} The user configuration object
61     */
62    function StdMod(config) {}
63
64    /**
65     * Constant used to refer the the standard module header, in methods which expect a section specifier
66     *
67     * @property HEADER
68     * @static
69     * @type String
70     */
71    StdMod.HEADER = HEADER;
72
73    /**
74     * Constant used to refer the the standard module body, in methods which expect a section specifier
75     *
76     * @property BODY
77     * @static
78     * @type String
79     */
80    StdMod.BODY = BODY;
81
82    /**
83     * Constant used to refer the the standard module footer, in methods which expect a section specifier
84     *
85     * @property FOOTER
86     * @static
87     * @type String
88     */
89    StdMod.FOOTER = FOOTER;
90
91    /**
92     * Constant used to specify insertion position, when adding content to sections of the standard module in
93     * methods which expect a "where" argument.
94     * <p>
95     * Inserts new content <em>before</em> the sections existing content.
96     * </p>
97     * @property AFTER
98     * @static
99     * @type String
100     */
101    StdMod.AFTER = "after";
102
103    /**
104     * Constant used to specify insertion position, when adding content to sections of the standard module in
105     * methods which expect a "where" argument.
106     * <p>
107     * Inserts new content <em>before</em> the sections existing content.
108     * </p>
109     * @property BEFORE
110     * @static
111     * @type String
112     */
113    StdMod.BEFORE = "before";
114    /**
115     * Constant used to specify insertion position, when adding content to sections of the standard module in
116     * methods which expect a "where" argument.
117     * <p>
118     * <em>Replaces</em> the sections existing content, with new content.
119     * </p>
120     * @property REPLACE
121     * @static
122     * @type String
123     */
124    StdMod.REPLACE = "replace";
125
126    var STD_HEADER = StdMod.HEADER,
127        STD_BODY = StdMod.BODY,
128        STD_FOOTER = StdMod.FOOTER,
129
130        HEADER_CONTENT = STD_HEADER + CONTENT_SUFFIX,
131        FOOTER_CONTENT = STD_FOOTER + CONTENT_SUFFIX,
132        BODY_CONTENT = STD_BODY + CONTENT_SUFFIX;
133
134    /**
135     * Static property used to define the default attribute
136     * configuration introduced by WidgetStdMod.
137     *
138     * @property ATTRS
139     * @type Object
140     * @static
141     */
142    StdMod.ATTRS = {
143
144        /**
145         * @attribute headerContent
146         * @type HTML
147         * @default undefined
148         * @description The content to be added to the header section. This will replace any existing content
149         * in the header. If you want to append, or insert new content, use the <a href="#method_setStdModContent">setStdModContent</a> method.
150         */
151        headerContent: {
152            value:null
153        },
154
155        /**
156         * @attribute footerContent
157         * @type HTML
158         * @default undefined
159         * @description The content to be added to the footer section. This will replace any existing content
160         * in the footer. If you want to append, or insert new content, use the <a href="#method_setStdModContent">setStdModContent</a> method.
161         */
162        footerContent: {
163            value:null
164        },
165
166        /**
167         * @attribute bodyContent
168         * @type HTML
169         * @default undefined
170         * @description The content to be added to the body section. This will replace any existing content
171         * in the body. If you want to append, or insert new content, use the <a href="#method_setStdModContent">setStdModContent</a> method.
172         */
173        bodyContent: {
174            value:null
175        },
176
177        /**
178         * @attribute fillHeight
179         * @type {String}
180         * @default WidgetStdMod.BODY
181         * @description The section (WidgetStdMod.HEADER, WidgetStdMod.BODY or WidgetStdMod.FOOTER) which should be resized to fill the height of the standard module, when a
182         * height is set on the Widget. If a height is not set on the widget, then all sections are sized based on
183         * their content.
184         */
185        fillHeight: {
186            value: StdMod.BODY,
187            validator: function(val) {
188                 return this._validateFillHeight(val);
189            }
190        }
191    };
192
193    /**
194     * The HTML parsing rules for the WidgetStdMod class.
195     *
196     * @property HTML_PARSER
197     * @static
198     * @type Object
199     */
200    StdMod.HTML_PARSER = {
201        headerContent: function(contentBox) {
202            return this._parseStdModHTML(STD_HEADER);
203        },
204
205        bodyContent: function(contentBox) {
206            return this._parseStdModHTML(STD_BODY);
207        },
208
209        footerContent : function(contentBox) {
210            return this._parseStdModHTML(STD_FOOTER);
211        }
212    };
213
214    /**
215     * Static hash of default class names used for the header,
216     * body and footer sections of the standard module, keyed by
217     * the section identifier (WidgetStdMod.STD_HEADER, WidgetStdMod.STD_BODY, WidgetStdMod.STD_FOOTER)
218     *
219     * @property SECTION_CLASS_NAMES
220     * @static
221     * @type Object
222     */
223    StdMod.SECTION_CLASS_NAMES = {
224        header: Widget.getClassName(HD),
225        body: Widget.getClassName(BD),
226        footer: Widget.getClassName(FT)
227    };
228
229    /**
230     * The template HTML strings for each of the standard module sections. Section entries are keyed by the section constants,
231     * WidgetStdMod.HEADER, WidgetStdMod.BODY, WidgetStdMod.FOOTER, and contain the HTML to be added for each section.
232     * e.g.
233     * <pre>
234     *    {
235     *       header : '&lt;div class="yui-widget-hd"&gt;&lt;/div&gt;',
236     *       body : '&lt;div class="yui-widget-bd"&gt;&lt;/div&gt;',
237     *       footer : '&lt;div class="yui-widget-ft"&gt;&lt;/div&gt;'
238     *    }
239     * </pre>
240     * @property TEMPLATES
241     * @type Object
242     * @static
243     */
244    StdMod.TEMPLATES = {
245        header : '<div class="' + StdMod.SECTION_CLASS_NAMES[STD_HEADER] + '"></div>',
246        body : '<div class="' + StdMod.SECTION_CLASS_NAMES[STD_BODY] + '"></div>',
247        footer : '<div class="' + StdMod.SECTION_CLASS_NAMES[STD_FOOTER] + '"></div>'
248    };
249
250    StdMod.prototype = {
251
252        initializer : function() {
253            this._stdModNode = this.get(CONTENT_BOX);
254
255            Y.before(this._renderUIStdMod, this, RENDERUI);
256            Y.before(this._bindUIStdMod, this, BINDUI);
257            Y.before(this._syncUIStdMod, this, SYNCUI);
258        },
259
260        /**
261         * Synchronizes the UI to match the Widgets standard module state.
262         * <p>
263         * This method is invoked after syncUI is invoked for the Widget class
264         * using YUI's aop infrastructure.
265         * </p>
266         * @method _syncUIStdMod
267         * @protected
268         */
269        _syncUIStdMod : function() {
270            var stdModParsed = this._stdModParsed;
271
272            if (!stdModParsed || !stdModParsed[HEADER_CONTENT]) {
273                this._uiSetStdMod(STD_HEADER, this.get(HEADER_CONTENT));
274            }
275
276            if (!stdModParsed || !stdModParsed[BODY_CONTENT]) {
277                this._uiSetStdMod(STD_BODY, this.get(BODY_CONTENT));
278            }
279
280            if (!stdModParsed || !stdModParsed[FOOTER_CONTENT]) {
281                this._uiSetStdMod(STD_FOOTER, this.get(FOOTER_CONTENT));
282            }
283
284            this._uiSetFillHeight(this.get(FILL_HEIGHT));
285        },
286
287        /**
288         * Creates/Initializes the DOM for standard module support.
289         * <p>
290         * This method is invoked after renderUI is invoked for the Widget class
291         * using YUI's aop infrastructure.
292         * </p>
293         * @method _renderUIStdMod
294         * @protected
295         */
296        _renderUIStdMod : function() {
297            this._stdModNode.addClass(Widget.getClassName(STDMOD));
298            this._renderStdModSections();
299
300            //This normally goes in bindUI but in order to allow setStdModContent() to work before renderUI
301            //stage, these listeners should be set up at the earliest possible time.
302            this.after(HeaderChange, this._afterHeaderChange);
303            this.after(BodyChange, this._afterBodyChange);
304            this.after(FooterChange, this._afterFooterChange);
305        },
306
307        _renderStdModSections : function() {
308            if (L.isValue(this.get(HEADER_CONTENT))) { this._renderStdMod(STD_HEADER); }
309            if (L.isValue(this.get(BODY_CONTENT))) { this._renderStdMod(STD_BODY); }
310            if (L.isValue(this.get(FOOTER_CONTENT))) { this._renderStdMod(STD_FOOTER); }
311        },
312
313        /**
314         * Binds event listeners responsible for updating the UI state in response to
315         * Widget standard module related state changes.
316         * <p>
317         * This method is invoked after bindUI is invoked for the Widget class
318         * using YUI's aop infrastructure.
319         * </p>
320         * @method _bindUIStdMod
321         * @protected
322         */
323        _bindUIStdMod : function() {
324            // this.after(HeaderChange, this._afterHeaderChange);
325            // this.after(BodyChange, this._afterBodyChange);
326            // this.after(FooterChange, this._afterFooterChange);
327
328            this.after(FillHeightChange, this._afterFillHeightChange);
329            this.after(HeightChange, this._fillHeight);
330            this.after(ContentUpdate, this._fillHeight);
331        },
332
333        /**
334         * Default attribute change listener for the headerContent attribute, responsible
335         * for updating the UI, in response to attribute changes.
336         *
337         * @method _afterHeaderChange
338         * @protected
339         * @param {EventFacade} e The event facade for the attribute change
340         */
341        _afterHeaderChange : function(e) {
342            if (e.src !== UI) {
343                this._uiSetStdMod(STD_HEADER, e.newVal, e.stdModPosition);
344            }
345        },
346
347        /**
348         * Default attribute change listener for the bodyContent attribute, responsible
349         * for updating the UI, in response to attribute changes.
350         *
351         * @method _afterBodyChange
352         * @protected
353         * @param {EventFacade} e The event facade for the attribute change
354         */
355        _afterBodyChange : function(e) {
356            if (e.src !== UI) {
357                this._uiSetStdMod(STD_BODY, e.newVal, e.stdModPosition);
358            }
359        },
360
361        /**
362         * Default attribute change listener for the footerContent attribute, responsible
363         * for updating the UI, in response to attribute changes.
364         *
365         * @method _afterFooterChange
366         * @protected
367         * @param {EventFacade} e The event facade for the attribute change
368         */
369        _afterFooterChange : function(e) {
370            if (e.src !== UI) {
371                this._uiSetStdMod(STD_FOOTER, e.newVal, e.stdModPosition);
372            }
373        },
374
375        /**
376         * Default attribute change listener for the fillHeight attribute, responsible
377         * for updating the UI, in response to attribute changes.
378         *
379         * @method _afterFillHeightChange
380         * @protected
381         * @param {EventFacade} e The event facade for the attribute change
382         */
383        _afterFillHeightChange: function (e) {
384            this._uiSetFillHeight(e.newVal);
385        },
386
387        /**
388         * Default validator for the fillHeight attribute. Verifies that the
389         * value set is a valid section specifier - one of WidgetStdMod.HEADER, WidgetStdMod.BODY or WidgetStdMod.FOOTER,
390         * or a falsey value if fillHeight is to be disabled.
391         *
392         * @method _validateFillHeight
393         * @protected
394         * @param {String} val The section which should be setup to fill height, or false/null to disable fillHeight
395         * @return true if valid, false if not
396         */
397        _validateFillHeight : function(val) {
398            return !val || val == StdMod.BODY || val == StdMod.HEADER || val == StdMod.FOOTER;
399        },
400
401        /**
402         * Updates the rendered UI, to resize the provided section so that the standard module fills out
403         * the specified widget height. Note: This method does not check whether or not a height is set
404         * on the Widget.
405         *
406         * @method _uiSetFillHeight
407         * @protected
408         * @param {String} fillSection A valid section specifier - one of WidgetStdMod.HEADER, WidgetStdMod.BODY or WidgetStdMod.FOOTER
409         */
410        _uiSetFillHeight : function(fillSection) {
411            var fillNode = this.getStdModNode(fillSection);
412            var currNode = this._currFillNode;
413
414            if (currNode && fillNode !== currNode){
415                currNode.setStyle(HEIGHT, EMPTY);
416            }
417
418            if (fillNode) {
419                this._currFillNode = fillNode;
420            }
421
422            this._fillHeight();
423        },
424
425        /**
426         * Updates the rendered UI, to resize the current section specified by the fillHeight attribute, so
427         * that the standard module fills out the Widget height. If a height has not been set on Widget,
428         * the section is not resized (height is set to "auto").
429         *
430         * @method _fillHeight
431         * @private
432         */
433        _fillHeight : function() {
434            if (this.get(FILL_HEIGHT)) {
435                var height = this.get(HEIGHT);
436                if (height != EMPTY && height != AUTO) {
437                    this.fillHeight(this.getStdModNode(this.get(FILL_HEIGHT)));
438                }
439            }
440        },
441
442        /**
443         * Updates the rendered UI, adding the provided content (either an HTML string, or node reference),
444         * to the specified section. The content is either added before, after or replaces existing content
445         * in the section, based on the value of the <code>where</code> argument.
446         *
447         * @method _uiSetStdMod
448         * @protected
449         *
450         * @param {String} section The section to be updated. Either WidgetStdMod.HEADER, WidgetStdMod.BODY or WidgetStdMod.FOOTER.
451         * @param {String | Node} content The new content (either as an HTML string, or Node reference) to add to the section
452         * @param {String} where Optional. Either WidgetStdMod.AFTER, WidgetStdMod.BEFORE or WidgetStdMod.REPLACE.
453         * If not provided, the content will replace existing content in the section.
454         */
455        _uiSetStdMod : function(section, content, where) {
456            // Using isValue, so that "" is valid content
457            if (L.isValue(content)) {
458                var node = this.getStdModNode(section, true);
459
460                this._addStdModContent(node, content, where);
461
462                this.set(section + CONTENT_SUFFIX, this._getStdModContent(section), {src:UI});
463            } else {
464                this._eraseStdMod(section);
465            }
466            this.fire(ContentUpdate);
467        },
468
469        /**
470         * Creates the DOM node for the given section, and inserts it into the correct location in the contentBox.
471         *
472         * @method _renderStdMod
473         * @protected
474         * @param {String} section The section to create/render. Either WidgetStdMod.HEADER, WidgetStdMod.BODY or WidgetStdMod.FOOTER.
475         * @return {Node} A reference to the added section node
476         */
477        _renderStdMod : function(section) {
478
479            var contentBox = this.get(CONTENT_BOX),
480                sectionNode = this._findStdModSection(section);
481
482            if (!sectionNode) {
483                sectionNode = this._getStdModTemplate(section);
484            }
485
486            this._insertStdModSection(contentBox, section, sectionNode);
487
488            this[section + NODE_SUFFIX] = sectionNode;
489            return this[section + NODE_SUFFIX];
490        },
491
492        /**
493         * Removes the DOM node for the given section.
494         *
495         * @method _eraseStdMod
496         * @protected
497         * @param {String} section The section to remove. Either WidgetStdMod.HEADER, WidgetStdMod.BODY or WidgetStdMod.FOOTER.
498         */
499        _eraseStdMod : function(section) {
500            var sectionNode = this.getStdModNode(section);
501            if (sectionNode) {
502                sectionNode.remove(true);
503                delete this[section + NODE_SUFFIX];
504            }
505        },
506
507        /**
508         * Helper method to insert the Node for the given section into the correct location in the contentBox.
509         *
510         * @method _insertStdModSection
511         * @private
512         * @param {Node} contentBox A reference to the Widgets content box.
513         * @param {String} section The section to create/render. Either WidgetStdMod.HEADER, WidgetStdMod.BODY or WidgetStdMod.FOOTER.
514         * @param {Node} sectionNode The Node for the section.
515         */
516        _insertStdModSection : function(contentBox, section, sectionNode) {
517            var fc = contentBox.get(FIRST_CHILD);
518
519            if (section === STD_FOOTER || !fc) {
520                contentBox.appendChild(sectionNode);
521            } else {
522                if (section === STD_HEADER) {
523                    contentBox.insertBefore(sectionNode, fc);
524                } else {
525                    var footer = this[STD_FOOTER + NODE_SUFFIX];
526                    if (footer) {
527                        contentBox.insertBefore(sectionNode, footer);
528                    } else {
529                        contentBox.appendChild(sectionNode);
530                    }
531                }
532            }
533        },
534
535        /**
536         * Gets a new Node reference for the given standard module section, by cloning
537         * the stored template node.
538         *
539         * @method _getStdModTemplate
540         * @protected
541         * @param {String} section The section to create a new node for. Either WidgetStdMod.HEADER, WidgetStdMod.BODY or WidgetStdMod.FOOTER.
542         * @return {Node} The new Node instance for the section
543         */
544        _getStdModTemplate : function(section) {
545            return Node.create(StdMod.TEMPLATES[section], this._stdModNode.get(OWNER_DOCUMENT));
546        },
547
548        /**
549         * Helper method to add content to a StdMod section node.
550         * The content is added either before, after or replaces the existing node content
551         * based on the value of the <code>where</code> argument.
552         *
553         * @method _addStdModContent
554         * @private
555         *
556         * @param {Node} node The section Node to be updated.
557         * @param {Node|NodeList|String} children The new content Node, NodeList or String to be added to section Node provided.
558         * @param {String} where Optional. Either WidgetStdMod.AFTER, WidgetStdMod.BEFORE or WidgetStdMod.REPLACE.
559         * If not provided, the content will replace existing content in the Node.
560         */
561        _addStdModContent : function(node, children, where) {
562
563            // StdMod where to Node where
564            switch (where) {
565                case StdMod.BEFORE:  // 0 is before fistChild
566                    where = 0;
567                    break;
568                case StdMod.AFTER:   // undefined is appendChild
569                    where = undefined;
570                    break;
571                default:            // replace is replace, not specified is replace
572                    where = StdMod.REPLACE;
573            }
574
575            node.insert(children, where);
576        },
577
578        /**
579         * Helper method to obtain the precise height of the node provided, including padding and border.
580         * The height could be a sub-pixel value for certain browsers, such as Firefox 3.
581         *
582         * @method _getPreciseHeight
583         * @private
584         * @param {Node} node The node for which the precise height is required.
585         * @return {Number} The height of the Node including borders and padding, possibly a float.
586         */
587        _getPreciseHeight : function(node) {
588            var height = (node) ? node.get(OFFSET_HEIGHT) : 0,
589                getBCR = "getBoundingClientRect";
590
591            if (node && node.hasMethod(getBCR)) {
592                var preciseRegion = node.invoke(getBCR);
593                if (preciseRegion) {
594                    height = preciseRegion.bottom - preciseRegion.top;
595                }
596            }
597
598            return height;
599        },
600
601        /**
602         * Helper method to to find the rendered node for the given section,
603         * if it exists.
604         *
605         * @method _findStdModSection
606         * @private
607         * @param {String} section The section for which the render Node is to be found. Either WidgetStdMod.HEADER, WidgetStdMod.BODY or WidgetStdMod.FOOTER.
608         * @return {Node} The rendered node for the given section, or null if not found.
609         */
610        _findStdModSection: function(section) {
611            return this.get(CONTENT_BOX).one("> ." + StdMod.SECTION_CLASS_NAMES[section]);
612        },
613
614        /**
615         * Utility method, used by WidgetStdMods HTML_PARSER implementation
616         * to extract data for each section from markup.
617         *
618         * @method _parseStdModHTML
619         * @private
620         * @param {String} section
621         * @return {String}
621 Inner HTML string with the contents of the section
622         */
623        _parseStdModHTML : function(section) {
624
625            var node = this._findStdModSection(section);
626
627            if (node) {
628                if (!this._stdModParsed) {
629                    this._stdModParsed = {};
630                    Y.before(this._applyStdModParsedConfig, this, APPLY_PARSED_CONFIG);
631                }
632                this._stdModParsed[section + CONTENT_SUFFIX] = 1;
633
634                return node.get("innerHTML");
635            }
636
637            return null;
638        },
639
640        /**
641         * This method is injected before the _applyParsedConfig step in
642         * the application of HTML_PARSER, and sets up the state to
643         * identify whether or not we should remove the current DOM content
644         * or not, based on whether or not the current content attribute value
645         * was extracted from the DOM, or provided by the user configuration
646         *
647         * @method _applyStdModParsedConfig
648         * @private
649         */
650        _applyStdModParsedConfig : function(node, cfg, parsedCfg) {
651            var parsed = this._stdModParsed;
652            if (parsed) {
653                parsed[HEADER_CONTENT] = !(HEADER_CONTENT in cfg) && (HEADER_CONTENT in parsed);
654                parsed[BODY_CONTENT] = !(BODY_CONTENT in cfg) && (BODY_CONTENT in parsed);
655                parsed[FOOTER_CONTENT] = !(FOOTER_CONTENT in cfg) && (FOOTER_CONTENT in parsed);
656            }
657        },
658
659        /**
660         * Retrieves the child nodes (content) of a standard module section
661         *
662         * @method _getStdModContent
663         * @private
664         * @param {String} section The standard module section whose child nodes are to be retrieved. Either WidgetStdMod.HEADER, WidgetStdMod.BODY or WidgetStdMod.FOOTER.
665         * @return {Node} The child node collection of the standard module section.
666         */
667        _getStdModContent : function(section) {
668            return (this[section + NODE_SUFFIX]) ? this[section + NODE_SUFFIX].get(CHILD_NODES) : null;
669        },
670
671        /**
672         * Updates the body section of the standard module with the content provided (either an HTML string, or node reference).
673         * <p>
674         * This method can be used instead of the corresponding section content attribute if you'd like to retain the current content of the section,
675         * and insert content before or after it, by specifying the <code>where</code> argument.
676         * </p>
677         * @method setStdModContent
678         * @param {String} section The standard module section whose content is to be updated. Either WidgetStdMod.HEADER, WidgetStdMod.BODY or WidgetStdMod.FOOTER.
679         * @param {String | Node} content The content to be added, either an HTML string or a Node reference.
680         * @param {String} where Optional. Either WidgetStdMod.AFTER, WidgetStdMod.BEFORE or WidgetStdMod.REPLACE.
681         * If not provided, the content will replace existing content in the section.
682         */
683        setStdModContent : function(section, content, where) {
684            //var node = this.getStdModNode(section) || this._renderStdMod(section);
685            this.set(section + CONTENT_SUFFIX, content, {stdModPosition:where});
686            //this._addStdModContent(node, content, where);
687        },
688
689        /**
690        Returns the node reference for the specified `section`.
691
692        **Note:** The DOM is not queried for the node reference. The reference
693        stored by the widget instance is returned if it was set. Passing a
694        truthy for `forceCreate` will create the section node if it does not
695        already exist.
696
697        @method getStdModNode
698        @param {String} section The section whose node reference is required.
699            Either `WidgetStdMod.HEADER`, `WidgetStdMod.BODY`, or
700            `WidgetStdMod.FOOTER`.
701        @param {Boolean} forceCreate Whether the section node should be created
702            if it does not already exist.
703        @return {Node} The node reference for the `section`, or null if not set.
704        **/
705        getStdModNode : function(section, forceCreate) {
706            var node = this[section + NODE_SUFFIX] || null;
707
708            if (!node && forceCreate) {
709                node = this._renderStdMod(section);
710            }
711
712            return node;
713        },
714
715        /**
716         * Sets the height on the provided header, body or footer element to
717         * fill out the height of the Widget. It determines the height of the
718         * widgets bounding box, based on it's configured height value, and
719         * sets the height of the provided section to fill out any
720         * space remaining after the other standard module section heights
721         * have been accounted for.
722         *
723         * <p><strong>NOTE:</strong> This method is not designed to work if an explicit
724         * height has not been set on the Widget, since for an "auto" height Widget,
725         * the heights of the header/body/footer will drive the height of the Widget.</p>
726         *
727         * @method fillHeight
728         * @param {Node} node The node which should be resized to fill out the height
729         * of the Widget bounding box. Should be a standard module section node which belongs
730         * to the widget.
731         */
732        fillHeight : function(node) {
733            if (node) {
734                var contentBox = this.get(CONTENT_BOX),
735                    stdModNodes = [this.headerNode, this.bodyNode, this.footerNode],
736                    stdModNode,
737                    cbContentHeight,
738                    filled = 0,
739                    remaining = 0,
740
741                    validNode = false;
742
743                for (var i = 0, l = stdModNodes.length; i < l; i++) {
744                    stdModNode = stdModNodes[i];
745                    if (stdModNode) {
746                        if (stdModNode !== node) {
747                            filled += this._getPreciseHeight(stdModNode);
748                        } else {
749                            validNode = true;
750                        }
751                    }
752                }
753
754                if (validNode) {
755                    if (UA.ie || UA.opera) {
756                        // Need to set height to 0, to allow height to be reduced
757                        node.set(OFFSET_HEIGHT, 0);
758                    }
759
760                    cbContentHeight = contentBox.get(OFFSET_HEIGHT) -
761                            parseInt(contentBox.getComputedStyle("paddingTop"), 10) -
762                            parseInt(contentBox.getComputedStyle("paddingBottom"), 10) -
763                            parseInt(contentBox.getComputedStyle("borderBottomWidth"), 10) -
764                            parseInt(contentBox.getComputedStyle("borderTopWidth"), 10);
765
766                    if (L.isNumber(cbContentHeight)) {
767                        remaining = cbContentHeight - filled;
768                        if (remaining >= 0) {
769                            node.set(OFFSET_HEIGHT, remaining);
770                        }
771                    }
772                }
773            }
774        }
775    };
776
777    Y.WidgetStdMod = StdMod;
778
779
780}, 'patched-v3.18.1', {"requires": ["base-build", "widget"]});
781
782YUI.add('aui-aria', function (A, NAME) {
783
784/**
785 * The Aria Component.
786 *
787 * @module aui-aria
788 */
789
790var Lang = A.Lang,
791    isBoolean = Lang.isBoolean,
792    isFunction = Lang.isFunction,
793    isObject = Lang.isObject,
794    isString = Lang.isString,
795    STR_REGEX = /([^a-z])/ig,
796
797    _toAriaRole = A.cached(function(str) {
798        return str.replace(STR_REGEX, function() {
799            return '';
800        }).toLowerCase();
801    });
802
803/**
804 * A base class for Aria.
805 *
806 * @class A.Plugin.Aria
807 * @extends Plugin.Base
808 * @param {Object} config Object literal specifying widget configuration
809 *     properties.
810 * @constructor
811 */
812var Aria = A.Component.create({
813
814    /**
815     * Static property provides a string to identify the class.
816     *
817     * @property NAME
818     * @type String
819     * @static
820     */
821    NAME: 'aria',
822
823    /**
824     * Static property provides a string to identify the namespace.
825     *
826     * @property NS
827     * @type String
828     * @static
829     */
830    NS: 'aria',
831
832    /**
833     * Static property used to define the default attribute configuration for
834     * the `A.Aria`.
835     *
836     * @property ATTRS
837     * @type Object
838     * @static
839     */
840    ATTRS: {
841
842        /**
843         * The ARIA attributes collection.
844         *
845         * @attribute attributes
846         * @default {}
847         * @type Object
848         */
849        attributes: {
850            value: {},
851            validator: isObject
852        },
853
854        /**
855         * The ARIA attribute value format.
856         *
857         * @attribute attributeValueFormat
858         * @type Function
859         */
860        attributeValueFormat: {
861            value: function(val) {
862                return val;
863            },
864            validator: isFunction
865        },
866
867        /**
868         * Node container for the ARIA attribute.
869         *
870         * @attribute attributeNode
871         * @writeOnce
872         */
873        attributeNode: {
874            writeOnce: true,
875            setter: A.one,
876            valueFn: function() {
877                return this.get('host').get('boundingBox');
878            }
879        },
880
881        /**
882         * The ARIA role name.
883         *
884         * @attribute roleName
885         * @type String
886         */
887        roleName: {
888            valueFn: function() {
889                var instance = this;
890                var host = instance.get('host');
891                var roleName = _toAriaRole(host.constructor.NAME || '');
892
893                return (instance.isValidRole(roleName) ? roleName : '');
894            },
895            validator: isString
896        },
897
898        /**
899         * Node container for the ARIA role.
900         *
901         * @attribute roleNode
902         * @writeOnce
903         */
904        roleNode: {
905            writeOnce: true,
906            setter: A.one,
907            valueFn: function() {
908                return this.get('host').get('boundingBox');
909            }
910        },
911
912        /**
913         * Checks if the attribute is valid with W3C rules.
914         *
915         * @attribute validateW3C
916         * @default true
917         * @type Boolean
918         */
919        validateW3C: {
920            value: true,
921            validator: isBoolean
922        }
923    },
924
925    /**
926     * Static property used to define which component it extends.
927     *
928     * @property EXTENDS
929     * @type Object
930     * @static
931     */
932    EXTENDS: A.Plugin.Base,
933
934    prototype: {
935
936        /**
937         * Construction logic executed during Aria instantiation. Lifecycle.
938         *
939         * @method initializer
940         * @protected
941         */
942        initializer: function() {
943            var instance = this;
944
945            instance.publish('aria:processAttribute', {
946                defaultFn: instance._defProcessFn,
947                queuable: false,
948                emitFacade: true,
949                bubbles: true,
950                prefix: 'aria'
951            });
952
953            instance._uiSetRoleName(
954                instance.get('roleName')
955            );
956
957            instance.after('roleNameChange', instance._afterRoleNameChange);
958
959            instance._bindHostAttributes();
960        },
961
962        /**
963         * Checks if the ARIA attribute is valid.
964         *
965         * @method isValidAttribute
966         * @param attrName
967         * @return {Boolean}
968         */
969        isValidAttribute: function(attrName) {
970            var instance = this;
971
972            return (instance.get('validateW3C') ? A.Plugin.Aria.W3C_ATTRIBUTES[attrName] : true);
973        },
974
975        /**
976         * Checks if the ARIA role is valid.
977         *
978         * @method isValidRole
979         * @param roleName
980         * @return {Boolean}
981         */
982        isValidRole: function(roleName) {
983            var instance = this;
984
985            return (instance.get('validateW3C') ? A.Plugin.Aria.W3C_ROLES[roleName] : true);
986        },
987
988        /**
989         * Set a single ARIA attribute.
990         *
991         * @method setAttribute
992         * @param attrName
993         * @param attrValue
994         * @param node
995         * @return {Boolean}
996         */
997        setAttribute: function(attrName, attrValue, node) {
998            var instance = this;
999
1000            if (instance.isValidAttribute(attrName)) {
1001                (node || instance.get('attributeNode')).set('aria-' + attrName, attrValue);
1002
1003                return true;
1004            }
1005
1006            return false;
1007        },
1008
1009        /**
1010         * Set a list of ARIA attributes.
1011         *
1012         * @method setAttributes
1013         * @param attributes
1014         */
1015        setAttributes: function(attributes) {
1016            var instance = this;
1017
1018            A.Array.each(attributes, function(attribute) {
1019                instance.setAttribute(attribute.name, attribute.value, attribute.node);
1020            });
1021        },
1022
1023        /**
1024         * Set a single ARIA role.
1025         *
1026         * @method setRole
1027         * @param roleName
1028         * @param node
1029         * @return {Boolean}
1030         */
1031        setRole: function(roleName, node) {
1032            var instance = this;
1033
1034            if (instance.isValidRole(roleName)) {
1035                (node || instance.get('roleNode')).set('role', roleName);
1036
1037                return true;
1038            }
1039
1040            return false;
1041        },
1042
1043        /**
1044         * Set a list of ARIA roles.
1045         *
1046         * @method setRoles
1047         * @param roles
1048         */
1049        setRoles: function(roles) {
1050            var instance = this;
1051
1052            A.Array.each(roles, function(role) {
1053                instance.setRole(role.name, role.node);
1054            });
1055        },
1056
1057        /**
1058         * Fires after a host attribute change.
1059         *
1060         * @method _afterHostAttributeChange
1061         * @param event
1062         * @protected
1063         */
1064        _afterHostAttributeChange: function(event) {
1065            var instance = this;
1066
1067            instance._handleProcessAttribute(event);
1068        },
1069
1070        /**
1071         * Triggers after `roleName` attribute change.
1072         *
1073         * @method _afterRoleNameChange
1074         * @param event
1075         * @protected
1076         */
1077        _afterRoleNameChange: function(event) {
1078            var instance = this;
1079
1080            instance._uiSetRoleName(event.newVal);
1081        },
1082
1083        /**
1084         * Bind the list of host attributes.
1085         *
1086         * @method _bindHostAttributes
1087         * @protected
1088         */
1089        _bindHostAttributes: function() {
1090            var instance = this;
1091            var attributes = instance.get('attributes');
1092
1093            A.each(attributes, function(aria, attrName) {
1094                var ariaAttr = instance._getAriaAttribute(aria, attrName);
1095
1096                instance._handleProcessAttribute({
1097                    aria: ariaAttr
1098                });
1099
1100                instance.afterHostEvent(attrName + 'Change', function(event) {
1101                    event.aria = ariaAttr;
1102                    instance._afterHostAttributeChange(event);
1103                });
1104            });
1105        },
1106
1107        /**
1108         * Calls the `_setAttribute` method.
1109         *
1110         * @method _defProcessFn
1111         * @param event
1112         * @protected
1113         */
1114        _defProcessFn: function(event) {
1115            var instance = this;
1116
1117            instance._setAttribute(event.aria);
1118        },
1119
1120        /**
1121         * Get the ARIA attribute.
1122         *
1123         * @method _getAriaAttribute
1124         * @param aria
1125         * @param attrName
1126         * @protected
1127         * @return {Object}
1128         */
1129        _getAriaAttribute: function(aria, attrName) {
1130            var instance = this;
1131            var attributeValueFormat = instance.get('attributeValueFormat');
1132            var prepared = {};
1133
1134            if (isString(aria)) {
1135                prepared = A.merge(prepared, {
1136                    ariaName: aria,
1137                    attrName: attrName,
1138                    format: attributeValueFormat,
1139                    node: null
1140                });
1141            }
1142            else if (isObject(aria)) {
1143                prepared = A.mix(aria, {
1144                    ariaName: '',
1145                    attrName: attrName,
1146                    format: attributeValueFormat,
1147                    node: null
1148                });
1149            }
1150
1151            return prepared;
1152        },
1153
1154        /**
1155         * Fires ARIA process attribute event handle.
1156         *
1157         * @method _handleProcessAttribute
1158         * @param event
1159         * @protected
1160         */
1161        _handleProcessAttribute: function(event) {
1162            var instance = this;
1163
1164            instance.fire('aria:processAttribute', {
1165                aria: event.aria
1166            });
1167        },
1168
1169        /**
1170         * Set the attribute in the DOM.
1171         *
1172         * @method _setAttribute
1173         * @param ariaAttr
1174         * @protected
1175         */
1176        _setAttribute: function(ariaAttr) {
1177            var instance = this;
1178            var host = instance.get('host');
1179            var attrValue = host.get(ariaAttr.attrName);
1180            var attrNode = ariaAttr.node;
1181
1182            if (isFunction(attrNode)) {
1183                attrNode = attrNode.apply(instance, [ariaAttr]);
1184            }
1185
1186            instance.setAttribute(
1187                ariaAttr.ariaName,
1188                ariaAttr.format.apply(instance, [attrValue, ariaAttr]),
1189                attrNode
1190            );
1191        },
1192
1193        /**
1194         * Set the `roleName` attribute on the UI.
1195         *
1196         * @method _uiSetRoleName
1197         * @param val
1198         * @protected
1199         */
1200        _uiSetRoleName: function(val) {
1201            var instance = this;
1202
1203            instance.setRole(val);
1204        }
1205    }
1206});
1207
1208A.Plugin.Aria = Aria;
1209/**
1210 * Static property used to define [W3C's Roles Model](http://www.w3.org/TR/wai-
1211 * aria/roles).
1212 *
1213 * @property W3C_ROLES
1214 * @type Object
1215 * @static
1216 */
1217A.Plugin.Aria.W3C_ROLES = {
1218    'alert': 1,
1219    'alertdialog': 1,
1220    'application': 1,
1221    'article': 1,
1222    'banner': 1,
1223    'button': 1,
1224    'checkbox': 1,
1225    'columnheader': 1,
1226    'combobox': 1,
1227    'command': 1,
1228    'complementary': 1,
1229    'composite': 1,
1230    'contentinfo': 1,
1231    'definition': 1,
1232    'dialog': 1,
1233    'directory': 1,
1234    'document': 1,
1235    'form': 1,
1236    'grid': 1,
1237    'gridcell': 1,
1238    'group': 1,
1239    'heading': 1,
1240    'img': 1,
1241    'input': 1,
1242    'landmark': 1,
1243    'link': 1,
1244    'list': 1,
1245    'listbox': 1,
1246    'listitem': 1,
1247    'log': 1,
1248    'main': 1,
1249    'marquee': 1,
1250    'math': 1,
1251    'menu': 1,
1252    'menubar': 1,
1253    'menuitem': 1,
1254    'menuitemcheckbox': 1,
1255    'menuitemradio': 1,
1256    'navigation': 1,
1257    'note': 1,
1258    'option': 1,
1259    'presentation': 1,
1260    'progressbar': 1,
1261    'radio': 1,
1262    'radiogroup': 1,
1263    'range': 1,
1264    'region': 1,
1265    'roletype': 1,
1266    'row': 1,
1267    'rowheader': 1,
1268    'scrollbar': 1,
1269    'search': 1,
1270    'section': 1,
1271    'sectionhead': 1,
1272    'select': 1,
1273    'separator': 1,
1274    'slider': 1,
1275    'spinbutton': 1,
1276    'status': 1,
1277    'structure': 1,
1278    'tab': 1,
1279    'tablist': 1,
1280    'tabpanel': 1,
1281    'textbox': 1,
1282    'timer': 1,
1283    'toolbar': 1,
1284    'tooltip': 1,
1285    'tree': 1,
1286    'treegrid': 1,
1287    'treeitem': 1,
1288    'widget': 1,
1289    'window': 1
1290};
1291/**
1292 * Static property used to define [W3C's Supported States and
1293 * Properties](http://www.w3.org/TR/wai-aria/states_and_properties).
1294 *
1295 * @property W3C_ATTRIBUTES
1296 * @type Object
1297 * @static
1298 */
1299A.Plugin.Aria.W3C_ATTRIBUTES = {
1300    'activedescendant': 1,
1301    'atomic': 1,
1302    'autocomplete': 1,
1303    'busy': 1,
1304    'checked': 1,
1305    'controls': 1,
1306    'describedby': 1,
1307    'disabled': 1,
1308    'dropeffect': 1,
1309    'expanded': 1,
1310    'flowto': 1,
1311    'grabbed': 1,
1312    'haspopup': 1,
1313    'hidden': 1,
1314    'invalid': 1,
1315    'label': 1,
1316    'labelledby': 1,
1317    'level': 1,
1318    'live': 1,
1319    'multiline': 1,
1320    'multiselectable': 1,
1321    'orientation': 1,
1322    'owns': 1,
1323    'posinset': 1,
1324    'pressed': 1,
1325    'readonly': 1,
1326    'relevant': 1,
1327    'required': 1,
1328    'selected': 1,
1329    'setsize': 1,
1330    'sort': 1,
1331    'valuemax': 1,
1332    'valuemin': 1,
1333    'valuenow': 1,
1334    'valuetext': 1
1335};
1336
1337
1338}, '3.1.0-deprecated.77', {"requires": ["plugin", "aui-component"]});
1339
1340YUI.add('aui-io-plugin-deprecated', function (A, NAME) {
1341
1342/**
1343 * The IOPlugin Utility - When plugged to a Node or Widget loads the content
1344 * of a URI and set as its content, parsing the <code>script</code> tags if
1345 * present on the code.
1346 *
1347 * @module aui-io
1348 * @submodule aui-io-plugin
1349 */
1350
1351var L = A.Lang,
1352    isBoolean = L.isBoolean,
1353    isString = L.isString,
1354
1355    isNode = function(v) {
1356        return (v instanceof A.Node);
1357    },
1358
1359    StdMod = A.WidgetStdMod,
1360
1361    TYPE_NODE = 'Node',
1362    TYPE_WIDGET = 'Widget',
1363
1364    EMPTY = '',
1365    FAILURE = 'failure',
1366    FAILURE_MESSAGE = 'failureMessage',
1367    HOST = 'host',
1368    ICON = 'icon',
1369    IO = 'io',
1370    IO_PLUGIN = 'IOPlugin',
1371    LOADING = 'loading',
1372    LOADING_MASK = 'loadingMask',
1373    NODE = 'node',
1374    OUTER = 'outer',
1375    PARSE_CONTENT = 'parseContent',
1376    QUEUE = 'queue',
1377    RENDERED = 'rendered',
1378    SECTION = 'section',
1379    SHOW_LOADING = 'showLoading',
1380    SUCCESS = 'success',
1381    TYPE = 'type',
1382    WHERE = 'where',
1383
1384    getCN = A.getClassName,
1385
1386    CSS_ICON_LOADING = getCN(ICON, LOADING);
1387
1388/**
1389 * A base class for IOPlugin, providing:
1390 * <ul>
1391 *    <li>Loads the content of a URI as content of a Node or Widget</li>
1392 *    <li>Use <a href="ParseContent.html">ParseContent</a> to parse the JavaScript tags from the content and evaluate them</li>
1393 * </ul>
1394 *
1395 * Quick Example:<br/>
1396 *
1397 * <pre><code>A.one('#content').plug(A.Plugin.IO, { uri: 'assets/content.html', method: 'GET' });</code></pre>
1398 *
1399 * Check the list of <a href="A.Plugin.IO.html#configattributes">Configuration Attributes</a> available for
1400 * IOPlugin.
1401 *
1402 * @param config {Object} Object literal specifying widget configuration properties.
1403 *
1404 * @class A.Plugin.IO
1405 * @constructor
1406 * @extends IORequest
1407 */
1408var IOPlugin = A.Component.create({
1409    /**
1410     * Static property provides a string to identify the class.
1411     *
1412     * @property A.Plugin.IO.NAME
1413     * @type String
1414     * @static
1415     */
1416    NAME: IO_PLUGIN,
1417
1418    /**
1419     * Static property provides a string to identify the namespace.
1420     *
1421     * @property A.Plugin.IO.NS
1422     * @type String
1423     * @static
1424     */
1425    NS: IO,
1426
1427    /**
1428     * Static property used to define the default attribute
1429     * configuration for the A.Plugin.IO.
1430     *
1431     * @property A.Plugin.IO.ATTRS
1432     * @type Object
1433     * @static
1434     */
1435    ATTRS: {
1436        /**
1437         * Plug IO in any object we want, the setContent will use the node to
1438         * set the content.
1439         *
1440         * @attribute node
1441         * @default null
1442         * @type Node | String
1443         */
1444        node: {
1445            value: null,
1446            getter: function(value) {
1447                var instance = this;
1448
1449                if (!value) {
1450                    var host = instance.get(HOST);
1451                    var type = instance.get(TYPE);
1452
1453                    if (type == TYPE_NODE) {
1454                        value = host;
1455                    }
1456                    else if (type == TYPE_WIDGET) {
1457                        var section = instance.get(SECTION);
1458
1459                        // if there is no node for the SECTION, forces creation
1460                        if (!host.getStdModNode(section)) {
1461                            host.setStdModContent(section, EMPTY);
1462                        }
1463
1464                        value = host.getStdModNode(section);
1465                    }
1466                }
1467
1468                return A.one(value);
1469            },
1470            validator: isNode
1471        },
1472
1473        /**
1474         * Message to be set on the content when the transaction fails.
1475         *
1476         * @attribute failureMessage
1477         * @default 'Failed to retrieve content'
1478         * @type String
1479         */
1480        failureMessage: {
1481            value: 'Failed to retrieve content',
1482            validator: isString
1483        },
1484
1485        /**
1486         * Options passed to the <a href="LoadingMask.html">LoadingMask</a>.
1487         *
1488         * @attribute loadingMask
1489         * @default {}
1490         * @type Object
1491         */
1492        loadingMask: {
1493            value: {}
1494        },
1495
1496        /**
1497         * If true the <a href="ParseContent.html">ParseContent</a> plugin
1498         * will be plugged to the <a href="A.Plugin.IO.html#config_node">node</a>.
1499         *
1500         * @attribute parseContent
1501         * @default true
1502         * @type boolean
1503         */
1504        parseContent: {
1505            value: true,
1506            validator: isBoolean
1507        },
1508
1509        /**
1510         * Show the <a href="LoadingMask.html">LoadingMask</a> covering the <a
1511         * href="A.Plugin.IO.html#config_node">node</a> while loading.
1512         *
1513         * @attribute showLoading
1514         * @default true
1515         * @type boolean
1516         */
1517        showLoading: {
1518            value: true,
1519            validator: isBoolean
1520        },
1521
1522        /**
1523         * Section where the content will be set in case you are plugging it
1524         * on a instace of <a href="WidgetStdMod.html">WidgetStdMod</a>.
1525         *
1526         * @attribute section
1527         * @default StdMod.BODY
1528         * @type String
1529         */
1530        section: {
1531            value: StdMod.BODY,
1532            validator: function(val) {
1533                return (!val || val == StdMod.BODY || val == StdMod.HEADER || val == StdMod.FOOTER);
1534            }
1535        },
1536
1537        /**
1538         * Type of the <code>instance</code> we are pluggin the A.Plugin.IO.
1539         * Could be a Node, or a Widget.
1540         *
1541         * @attribute type
1542         * @default 'Node'
1543         * @readOnly
1544         * @type String
1545         */
1546        type: {
1547            readOnly: true,
1548            valueFn: function() {
1549                var instance = this;
1550                // NOTE: default type
1551                var type = TYPE_NODE;
1552
1553                if (instance.get(HOST) instanceof A.Widget) {
1554                    type = TYPE_WIDGET;
1555                }
1556
1557                return type;
1558            },
1559            validator: isString
1560        },
1561
1562        /**
1563         * Where to insert the content, AFTER, BEFORE or REPLACE. If you're plugging a Node, there is a fourth option called OUTER that will not only replace the entire node itself. This is different from REPLACE, in that REPLACE will replace the *contents* of the node, OUTER will replace the entire Node itself.
1564         *
1565         * @attribute where
1566         * @default StdMod.REPLACE
1567         * @type String
1568         */
1569        where: {
1570            value: StdMod.REPLACE,
1571            validator: function(val) {
1572                return (!val || val == StdMod.AFTER || val == StdMod.BEFORE || val == StdMod.REPLACE || val ==
1573                    OUTER);
1574            }
1575        }
1576    },
1577
1578    EXTENDS: A.IORequest,
1579
1580    prototype: {
1581        /**
1582         * Bind the events on the A.Plugin.IO UI. Lifecycle.
1583         *
1584         * @method bindUI
1585         * @protected
1586         */
1587        bindUI: function() {
1588            var instance = this;
1589
1590            instance.on('activeChange', instance._onActiveChange);
1591
1592            instance.on(SUCCESS, instance._successHandler);
1593            instance.on(FAILURE, instance._failureHandler);
1594
1595            if ((instance.get(TYPE) == TYPE_WIDGET) && instance.get(SHOW_LOADING)) {
1596                var host = instance.get(HOST);
1597
1598                host.after('heightChange', instance._syncLoadingMaskUI, instance);
1599                host.after('widthChange', instance._syncLoadingMaskUI, instance);
1600            }
1601        },
1602
1603        /**
1604         * Invoke the <code>start</code> method (autoLoad attribute).
1605         *
1606         * @method _autoStart
1607         * @protected
1608         */
1609        _autoStart: function() {
1610            var instance = this;
1611
1612            instance.bindUI();
1613
1614            IOPlugin.superclass._autoStart.apply(this, arguments);
1615        },
1616
1617        /**
1618         * Bind the ParseContent plugin on the <code>instance</code>.
1619         *
1620         * @method _bindParseContent
1621         * @protected
1622         */
1623        _bindParseContent: function() {
1624            var instance = this;
1625            var node = instance.get(NODE);
1626
1627            if (node && !node.ParseContent && instance.get(PARSE_CONTENT)) {
1628                node.plug(A.Plugin.ParseContent);
1629            }
1630        },
1631
1632        /**
1633         * Invoke the <a href="OverlayMask.html#method_hide">OverlayMask hide</a> method.
1634         *
1635         * @method hideLoading
1636         */
1637        hideLoading: function() {
1638            var instance = this;
1639
1640            var node = instance.get(NODE);
1641
1642            if (node.loadingmask) {
1643                node.loadingmask.hide();
1644            }
1645        },
1646
1647        /**
1648         * Set the content of the <a href="A.Plugin.IO.html#config_node">node</a>.
1649         *
1650         * @method setContent
1651         */
1652        setContent: function(content) {
1653            var instance = this;
1654
1655            instance._bindParseContent();
1656
1657            instance._getContentSetterByType().apply(instance, [content]);
1658
1659            if (instance.overlayMaskBoundingBox) {
1660                instance.overlayMaskBoundingBox.remove();
1661            }
1662        },
1663
1664        /**
1665         * Invoke the <a href="OverlayMask.html#method_show">OverlayMask show</a> method.
1666         *
1667         * @method showLoading
1668         */
1669        showLoading: function() {
1670            var instance = this;
1671            var node = instance.get(NODE);
1672
1673            if (node.loadingmask) {
1674                if (instance.overlayMaskBoundingBox) {
1675                    node.append(instance.overlayMaskBoundingBox);
1676                }
1677            }
1678            else {
1679                node.plug(
1680                    A.LoadingMask,
1681                    instance.get(LOADING_MASK)
1682                );
1683
1684                instance.overlayMaskBoundingBox = node.loadingmask.overlayMask.get('boundingBox');
1685            }
1686
1687            node.loadingmask.show();
1688        },
1689
1690        /**
1691         * Overload to the <a href="IORequest.html#method_start">IORequest
1692         * start</a> method. Check if the <code>host</code> is already rendered,
1693         * otherwise wait to after render phase and to show the LoadingMask.
1694         *
1695         * @method start
1696         */
1697        start: function() {
1698            var instance = this;
1699            var host = instance.get(HOST);
1700
1701            if (!host.get(RENDERED)) {
1702                host.after('render', function() {
1703                    instance._setLoadingUI(true);
1704                });
1705            }
1706
1707            IOPlugin.superclass.start.apply(instance, arguments);
1708        },
1709
1710        /**
1711         * Get the appropriated <a
1712         * href="A.Plugin.IO.html#method_setContent">setContent</a> function
1713         * implementation for each <a href="A.Plugin.IO.html#config_type">type</a>.
1714         *
1715         * @method _getContentSetterByType
1716         * @protected
1717         * @return {function}
1718         */
1719        _getContentSetterByType: function() {
1720            var instance = this;
1721
1722            var setters = {
1723                // NOTE: default setter, see 'type' attribute definition
1724                Node: function(content) {
1725                    var instance = this;
1726                    // when this.get(HOST) is a Node instance the NODE is the host
1727                    var node = instance.get(NODE);
1728
1729                    if (content instanceof A.NodeList) {
1730                        content = content.toFrag();
1731                    }
1732
1733                    if (content instanceof A.Node) {
1734                        content = content._node;
1735                    }
1736
1737                    var where = instance.get(WHERE);
1738
1739                    if (where == OUTER) {
1740                        node.replace(content);
1741                    }
1742                    else {
1743                        node.insert(content, where);
1744                    }
1745                },
1746
1747                // Widget forces set the content on the SECTION node using setStdModContent method
1748                Widget: function(content) {
1749                    var instance = this;
1750                    var host = instance.get(HOST);
1751
1752                    host.setStdModContent.apply(host, [
1753       instance.get(SECTION),
1754       content,
1755       instance.get(WHERE)
1756      ]);
1757                }
1758            };
1759
1760            return setters[this.get(TYPE)];
1761        },
1762
1763        /**
1764         * Whether the <code>show</code> is true show the LoadingMask.
1765         *
1766         * @method _setLoadingUI
1767         * @param {boolean} show
1768         * @protected
1769         */
1770        _setLoadingUI: function(show) {
1771            var instance = this;
1772
1773            if (instance.get(SHOW_LOADING)) {
1774                if (show) {
1775                    instance.showLoading();
1776                }
1777                else {
1778                    instance.hideLoading();
1779                }
1780            }
1781        },
1782
1783        /**
1784         * Sync the loading mask UI.
1785         *
1786         * @method _syncLoadingMaskUI
1787         * @protected
1788         */
1789        _syncLoadingMaskUI: function() {
1790            var instance = this;
1791
1792            instance.get(NODE).loadingmask.refreshMask();
1793        },
1794
1795        /**
1796         * Internal success callback for the IO transaction.
1797         *
1798         * @method _successHandler
1799         * @param {EventFavade} event
1800         * @param {String} id Id of the IO transaction.
1801         * @param {Object} obj XHR transaction Object.
1802         * @protected
1803         */
1804        _successHandler: function(event, id, xhr) {
1805            var instance = this;
1806
1807            instance.setContent(
1808                this.get('responseData')
1809            );
1810        },
1811
1812        /**
1813         * Internal failure callback for the IO transaction.
1814         *
1815         * @method _failureHandler
1816         * @param {EventFavade} event
1817         * @param {String} id Id of the IO transaction.
1818         * @param {Object} obj XHR transaction Object.
1819         * @protected
1820         */
1821        _failureHandler: function(event, id, xhr) {
1822            var instance = this;
1823
1824            instance.setContent(
1825                instance.get(FAILURE_MESSAGE)
1826            );
1827        },
1828
1829        /**
1830         * Fires after the value of the
1831         * <a href="A.Plugin.IO.html#config_active">active</a> attribute change.
1832         *
1833         * @method _onActiveChange
1834         * @param {EventFacade} event
1835         * @protected
1836         */
1837        _onActiveChange: function(event) {
1838            var instance = this;
1839            var host = instance.get(HOST);
1840            var widget = instance.get(TYPE) == TYPE_WIDGET;
1841
1842            if (!widget || (widget && host && host.get(RENDERED))) {
1843                instance._setLoadingUI(event.newVal);
1844            }
1845        }
1846    }
1847});
1848
1849A.Node.prototype.load = function(uri, config, callback) {
1850    var instance = this;
1851
1852    var index = uri.indexOf(' ');
1853    var selector;
1854
1855    if (index > 0) {
1856        selector = uri.slice(index, uri.length);
1857
1858        uri = uri.slice(0, index);
1859    }
1860
1861    if (L.isFunction(config)) {
1862        callback = config;
1863        config = null;
1864    }
1865
1866    config = config || {};
1867
1868    if (callback) {
1869        config.after = config.after || {};
1870
1871        config.after.success = callback;
1872    }
1873
1874    var where = config.where;
1875
1876    config.uri = uri;
1877    config.where = where;
1878
1879    if (selector) {
1880        config.selector = selector;
1881        config.where = where || 'replace';
1882    }
1883
1884    instance.plug(A.Plugin.IO, config);
1885
1886    return instance;
1887};
1888
1889A.namespace('Plugin').IO = IOPlugin;
1890
1891
1892}, '3.1.0-deprecated.77', {
1893    "requires": [
1894        "aui-overlay-base-deprecated",
1895        "aui-parse-content",
1896        "aui-io-request",
1897        "aui-loading-mask-deprecated"
1898    ]
1899});
1900
1901YUI.add('aui-io-request', function (A, NAME) {
1902
1903/**
1904 * The IORequest Utility - Provides response data normalization for 'xml', 'json',
1905 * JavaScript and cache option.
1906 *
1907 * @module aui-io
1908 * @submodule aui-io-request
1909 */
1910
1911var L = A.Lang,
1912    isBoolean = L.isBoolean,
1913    isFunction = L.isFunction,
1914    isString = L.isString,
1915
1916    defaults = A.namespace('config.io'),
1917
1918    getDefault = function(attr) {
1919        return function() {
1920            return defaults[attr];
1921        };
1922    },
1923
1924    ACCEPTS = {
1925        all: '*/*',
1926        html: 'text/html',
1927        json: 'application/json, text/javascript',
1928        text: 'text/plain',
1929        xml: 'application/xml, text/xml'
1930    };
1931
1932/**
1933 * A base class for IORequest, providing:
1934 *
1935 * - Response data normalization for XML, JSON, JavaScript
1936 * - Cache options
1937 *
1938 * Check the [live demo](http://alloyui.com/examples/io/).
1939 *
1940 * @class A.IORequest
1941 * @extends Plugin.Base
1942 * @param {Object} config Object literal specifying widget configuration
1943 *     properties.
1944 * @uses io
1945 * @constructor
1946 * @include http://alloyui.com/examples/io/basic.js
1947 */
1948var IORequest = A.Component.create({
1949    /**
1950     * Static property provides a string to identify the class.
1951     *
1952     * @property NAME
1953     * @type String
1954     * @static
1955     */
1956    NAME: 'IORequest',
1957
1958    /**
1959     * Static property used to define the default attribute
1960     * configuration for the IORequest.
1961     *
1962     * @property ATTRS
1963     * @type Object
1964     * @static
1965     */
1966    ATTRS: {
1967
1968        /**
1969         * If `true` invoke the [start](A.IORequest.html#method_start) method
1970         * automatically, initializing the IO transaction.
1971         *
1972         * @attribute autoLoad
1973         * @default true
1974         * @type Boolean
1975         */
1976        autoLoad: {
1977            value: true,
1978            validator: isBoolean
1979        },
1980
1981        /**
1982         * If `false` the current timestamp will be appended to the
1983         * url, avoiding the url to be cached.
1984         *
1985         * @attribute cache
1986         * @default true
1987         * @type Boolean
1988         */
1989        cache: {
1990            value: true,
1991            validator: isBoolean
1992        },
1993
1994        /**
1995         * The type of the request (i.e., could be xml, json, javascript, text).
1996         *
1997         * @attribute dataType
1998         * @default null
1999         * @type String
2000         */
2001        dataType: {
2002            setter: function(v) {
2003                return (v || '').toLowerCase();
2004            },
2005            value: null,
2006            validator: isString
2007        },
2008
2009        /**
2010         * This is a normalized attribute for the response data. It's useful to
2011         * retrieve the correct type for the
2012         * [dataType](A.IORequest.html#attr_dataType) (i.e., in json requests
2013         * the `responseData`) is a JSONObject.
2014         *
2015         * @attribute responseData
2016         * @default null
2017         * @type String | JSONObject | XMLDocument
2018         */
2019        responseData: {
2020            setter: function(v) {
2021                return this._setResponseData(v);
2022            },
2023            value: null
2024        },
2025
2026        /**
2027         * URI to be requested using AJAX.
2028         *
2029         * @attribute uri
2030         * @default null
2031         * @type String
2032         */
2033        uri: {
2034            setter: function(v) {
2035                return this._parseURL(v);
2036            },
2037            value: null,
2038            validator: isString
2039        },
2040
2041        // User readOnly variables
2042
2043        /**
2044         * Whether the transaction is active or not.
2045         *
2046         * @attribute active
2047         * @default false
2048         * @type Boolean
2049         */
2050        active: {
2051            value: false,
2052            validator: isBoolean
2053        },
2054
2055        /**
2056         * Object containing all the [IO Configuration Attributes](A.io.html).
2057         * This Object is passed to the `A.io` internally.
2058         *
2059         * @attribute cfg
2060         * @default Object containing all the [IO Configuration
2061         *     Attributes](A.io.html).
2062         * @readOnly
2063         * @type String
2064         */
2065        cfg: {
2066            getter: function() {
2067                var instance = this;
2068
2069                // keep the current cfg object always synchronized with the
2070                // mapped public attributes when the user call .start() it
2071                // always retrieve the last set values for each mapped attr
2072                return {
2073                    arguments: instance.get('arguments'),
2074                    context: instance.get('context'),
2075                    data: instance.getFormattedData(),
2076                    form: instance.get('form'),
2077                    headers: instance.get('headers'),
2078                    method: instance.get('method'),
2079                    on: {
2080                        complete: A.bind(instance.fire, instance, 'complete'),
2081                        end: A.bind(instance._end, instance),
2082                        failure: A.bind(instance.fire, instance, 'failure'),
2083                        start: A.bind(instance.fire, instance, 'start'),
2084                        success: A.bind(instance._success, instance)
2085                    },
2086                    sync: instance.get('sync'),
2087                    timeout: instance.get('timeout'),
2088                    xdr: instance.get('xdr')
2089                };
2090            },
2091            readOnly: true
2092        },
2093
2094        /**
2095         * Stores the IO Object of the current transaction.
2096         *
2097         * @attribute transaction
2098         * @default null
2099         * @type Object
2100         */
2101        transaction: {
2102            value: null
2103        },
2104
2105        // Configuration Object mapping
2106        // To take advantages of the Attribute listeners of A.Base
2107        // See: http://yuilibrary.com/yui/docs/io/
2108
2109        /**
2110         * See [IO
2111         * Configuration](http://yuilibrary.com/yui/docs/io/#the-configuration-object).
2112         *
2113         * @attribute arguments
2114         * @default Value mapped on YUI.AUI.defaults.io.
2115         * @type Object
2116         */
2117        arguments: {
2118            valueFn: getDefault('arguments')
2119        },
2120
2121        /**
2122         * See [IO
2123         * Configuration](http://yuilibrary.com/yui/docs/io/#the-configuration-object).
2124         *
2125         * @attribute context
2126         * @default Value mapped on YUI.AUI.defaults.io.
2127         * @type Object
2128         */
2129        context: {
2130            valueFn: getDefault('context')
2131        },
2132
2133        /**
2134         * See [IO
2135         * Configuration](http://yuilibrary.com/yui/docs/io/#the-configuration-object).
2136         *
2137         * @attribute data
2138         * @default Value mapped on YUI.AUI.defaults.io.
2139         * @type Object
2140         */
2141        data: {
2142            valueFn: getDefault('data')
2143        },
2144
2145        /**
2146         * See [IO
2147         * Configuration](http://yuilibrary.com/yui/docs/io/#the-configuration-object).
2148         *
2149         * @attribute form
2150         * @default Value mapped on YUI.AUI.defaults.io.
2151         * @type Object
2152         */
2153        form: {
2154            valueFn: getDefault('form')
2155        },
2156
2157        /**
2158         * Set the correct ACCEPT header based on the dataType.
2159         *
2160         * @attribute headers
2161         * @default Object
2162         * @type Object
2163         */
2164        headers: {
2165            getter: function(value) {
2166                var header = [];
2167                var instance = this;
2168                var dataType = instance.get('dataType');
2169
2170                if (dataType) {
2171                    header.push(
2172                        ACCEPTS[dataType]
2173                    );
2174                }
2175
2176                // always add *.* to the accept header
2177                header.push(
2178                    ACCEPTS.all
2179                );
2180
2181                return A.merge(
2182                    value, {
2183                        Accept: header.join(', ')
2184                    }
2185                );
2186            },
2187            valueFn: getDefault('headers')
2188        },
2189
2190        /**
2191         * See [IO
2192         * Configuration](http://yuilibrary.com/yui/docs/io/#the-configuration-object).
2193         *
2194         * @attribute method
2195         * @default Value mapped on YUI.AUI.defaults.io.
2196         * @type String
2197         */
2198        method: {
2199            setter: function(val) {
2200                return val.toLowerCase();
2201            },
2202            valueFn: getDefault('method')
2203        },
2204
2205        /**
2206         * A selector to be used to query against the response of the
2207         * request. Only works if the response is XML or HTML.
2208         *
2209         * @attribute selector
2210         * @default null
2211         * @type String
2212         */
2213        selector: {
2214            value: null
2215        },
2216
2217        /**
2218         * See [IO
2219         * Configuration](http://yuilibrary.com/yui/docs/io/#the-configuration-object).
2220         *
2221         * @attribute sync
2222         * @default Value mapped on YUI.AUI.defaults.io.
2223         * @type Boolean
2224         */
2225        sync: {
2226            valueFn: getDefault('sync')
2227        },
2228
2229        /**
2230         * See [IO
2231         * Configuration](http://yuilibrary.com/yui/docs/io/#the-configuration-object).
2232         *
2233         * @attribute timeout
2234         * @default Value mapped on YUI.AUI.defaults.io.
2235         * @type Number
2236         */
2237        timeout: {
2238            valueFn: getDefault('timeout')
2239        },
2240
2241        /**
2242         * See [IO
2243         * Configuration](http://yuilibrary.com/yui/docs/io/#the-configuration-object).
2244         *
2245         * @attribute xdr
2246         * @default Value mapped on YUI.AUI.defaults.io.
2247         * @type Object
2248         */
2249        xdr: {
2250            valueFn: getDefault('xdr')
2251        }
2252    },
2253
2254    /**
2255     * Static property used to define which component it extends.
2256     *
2257     * @property EXTENDS
2258     * @type Object
2259     * @static
2260     */
2261    EXTENDS: A.Plugin.Base,
2262
2263    prototype: {
2264
2265        /**
2266         * Construction logic executed during IORequest instantiation.
2267         * Lifecycle.
2268         *
2269         * @method initializer
2270         * @param config
2271         * @protected
2272         */
2273        init: function() {
2274            var instance = this;
2275
2276            IORequest.superclass.init.apply(this, arguments);
2277
2278            instance._autoStart();
2279        },
2280
2281        /**
2282         * Destructor lifecycle implementation for the `IORequest` class.
2283         * Purges events attached to the node (and all child nodes).
2284         *
2285         * @method destructor
2286         * @protected
2287         */
2288        destructor: function() {
2289            var instance = this;
2290
2291            instance.stop();
2292
2293            instance.set('transaction', null);
2294        },
2295
2296        /**
2297         * Applies the `YUI.AUI.defaults.io.dataFormatter` if
2298         * defined and return the formatted data.
2299         *
2300         * @method getFormattedData
2301         * @return {String}
2302         */
2303        getFormattedData: function() {
2304            var instance = this;
2305            var value = instance.get('data');
2306            var dataFormatter = defaults.dataFormatter;
2307
2308            if (isFunction(dataFormatter)) {
2309                value = dataFormatter.call(instance, value);
2310            }
2311
2312            return value;
2313        },
2314
2315        /**
2316         * Starts the IO transaction. Used to refresh the content also.
2317         *
2318         * @method start
2319         */
2320        start: function() {
2321            var instance = this;
2322
2323            instance.destructor();
2324
2325            instance.set('active', true);
2326
2327            var ioObj = instance._yuiIOObj;
2328
2329            if (!ioObj) {
2330                ioObj = new A.IO();
2331
2332                instance._yuiIOObj = ioObj;
2333            }
2334
2335            var transaction = ioObj.send(
2336                instance.get('uri'),
2337                instance.get('cfg')
2338            );
2339
2340            instance.set('transaction', transaction);
2341        },
2342
2343        /**
2344         * Stops the IO transaction.
2345         *
2346         * @method stop
2347         */
2348        stop: function() {
2349            var instance = this;
2350            var transaction = instance.get('transaction');
2351
2352            if (transaction) {
2353                transaction.abort();
2354            }
2355        },
2356
2357        /**
2358         * Invoke the `start` method (autoLoad attribute).
2359         *
2360         * @method _autoStart
2361         * @protected
2362         */
2363        _autoStart: function() {
2364            var instance = this;
2365
2366            if (instance.get('autoLoad')) {
2367                instance.start();
2368            }
2369        },
2370
2371        /**
2372         * Parse the [uri](A.IORequest.html#attr_uri) to add a
2373         * timestamp if [cache](A.IORequest.html#attr_cache) is
2374         * `true`. Also applies the `YUI.AUI.defaults.io.uriFormatter`.
2375         *
2376         * @method _parseURL
2377         * @param {String} url
2378         * @protected
2379         * @return {String}
2380         */
2381        _parseURL: function(url) {
2382            var instance = this;
2383            var cache = instance.get('cache');
2384            var method = instance.get('method');
2385
2386            // reusing logic to add a timestamp on the url from jQuery 1.3.2
2387            if ((cache === false) && (method === 'get')) {
2388                var ts = +new Date();
2389                // try replacing _= if it is there
2390                var ret = url.replace(/(\?|&)_=.*?(&|$)/, '$1_=' + ts + '$2');
2391                // if nothing was replaced, add timestamp to the end
2392                url = ret + ((ret === url) ? (url.match(/\?/) ? '&' : '?') + '_=' + ts : '');
2393            }
2394
2395            // formatting the URL with the default uriFormatter after the cache
2396            // timestamp was added
2397            var uriFormatter = defaults.uriFormatter;
2398
2399            if (isFunction(uriFormatter)) {
2400                url = uriFormatter.apply(instance, [url]);
2401            }
2402
2403            return url;
2404        },
2405
2406        /**
2407         * Internal end callback for the IO transaction.
2408         *
2409         * @method _end
2410         * @param {Number} id ID of the IO transaction.
2411         * @param {Object} args Custom arguments, passed to the event handler.
2412         *     See [IO](http://yuilibrary.com/yui/docs/io/#the-configuration-object).
2413         * @protected
2414         */
2415        _end: function(id, args) {
2416            var instance = this;
2417
2418            instance.set('active', false);
2419            instance.set('transaction', null);
2420
2421            instance.fire('end', id, args);
2422        },
2423
2424        /**
2425         * Internal success callback for the IO transaction.
2426         *
2427         * @method _success
2428         * @param {Number} id ID of the IO transaction.
2429         * @param {Object} obj IO transaction Object.
2430         * @param {Object} args Custom arguments, passed to the event handler.
2431         *     See [IO](http://yuilibrary.com/yui/docs/io/#the-configuration-object).
2432         * @protected
2433         */
2434        _success: function(id, obj, args) {
2435            var instance = this;
2436
2437            // update the responseData attribute with the new data from xhr
2438            instance.set('responseData', obj);
2439
2440            instance.fire('success', id, obj, args);
2441        },
2442
2443        /**
2444         * Setter for [responseData](A.IORequest.html#attr_responseData).
2445         *
2446         * @method _setResponseData
2447         * @protected
2448         * @param {Object} xhr XHR Object.
2449         * @return {Object}
2450         */
2451        _setResponseData: function(xhr) {
2452            var data = null;
2453            var instance = this;
2454
2455            if (xhr) {
2456                var dataType = instance.get('dataType');
2457                var contentType = xhr.getResponseHeader('content-type') || '';
2458
2459                // if the dataType or the content-type is XML...
2460                if ((dataType === 'xml') ||
2461                    (!dataType && contentType.indexOf('xml') >= 0)) {
2462
2463                    // use responseXML
2464                    data = xhr.responseXML;
2465
2466                    // check if the XML was parsed correctly
2467                    if (data.documentElement.tagName === 'parsererror') {
2468                        throw 'Parser error: IO dataType is not correctly parsing';
2469                    }
2470                }
2471                else {
2472                    // otherwise use the responseText
2473                    data = xhr.responseText;
2474                }
2475
2476                // empty string is not a valid 'json', convert it to null
2477                if (data === '') {
2478                    data = null;
2479                }
2480
2481                // trying to parse to JSON if dataType is a valid json
2482                if (dataType === 'json') {
2483                    try {
2484                        data = A.JSON.parse(data);
2485                    }
2486                    catch (e) {
2487                        // throw 'Parser error: IO dataType is not correctly parsing';
2488                    }
2489                }
2490                else {
2491                    var selector = instance.get('selector');
2492
2493                    if (data && selector) {
2494                        var tempRoot;
2495
2496                        if (data.documentElement) {
2497                            tempRoot = A.one(data);
2498                        }
2499                        else {
2500                            tempRoot = A.Node.create(data);
2501                        }
2502
2503                        data = tempRoot.all(selector);
2504                    }
2505                }
2506            }
2507
2508            return data;
2509        }
2510    }
2511});
2512
2513A.IORequest = IORequest;
2514
2515/**
2516 * Alloy IO extension
2517 *
2518 * @class A.io
2519 * @static
2520 */
2521
2522/**
2523 * Static method to invoke the [IORequest](A.IORequest.html).
2524 * Likewise [IO](A.io.html).
2525 *
2526 * @method A.io.request
2527 * @for A.io
2528 * @param {String} uri URI to be requested.
2529 * @param {Object} config Configuration Object for the [IO](A.io.html).
2530 * @return {IORequest}
2531 */
2532A.io.request = function(uri, config) {
2533    return new A.IORequest(
2534        A.merge(config, {
2535            uri: uri
2536        })
2537    );
2538};
2539
2540
2541}, '3.1.0-deprecated.77', {"requires": ["io-base", "json", "plugin", "querystring-stringify", "aui-component"]});
2542
2543YUI.add('aui-loading-mask-deprecated', function (A, NAME) {
2544
2545/**
2546 * The LoadingMask Utility
2547 *
2548 * @module aui-loading-mask
2549 */
2550
2551var Lang = A.Lang,
2552
2553    BOUNDING_BOX = 'boundingBox',
2554    CONTENT_BOX = 'contentBox',
2555    HIDE = 'hide',
2556    HOST = 'host',
2557    MESSAGE_EL = 'messageEl',
2558    NAME = 'loadingmask',
2559    POSITION = 'position',
2560    SHOW = 'show',
2561    STATIC = 'static',
2562    STRINGS = 'strings',
2563    TARGET = 'target',
2564    TOGGLE = 'toggle',
2565
2566    getClassName = A.getClassName,
2567
2568    CSS_LOADINGMASK = getClassName(NAME),
2569    CSS_MASKED = getClassName(NAME, 'masked'),
2570    CSS_MASKED_RELATIVE = getClassName(NAME, 'masked', 'relative'),
2571    CSS_MESSAGE_LOADING = getClassName(NAME, 'message'),
2572    CSS_MESSAGE_LOADING_CONTENT = getClassName(NAME, 'message', 'content'),
2573
2574    TPL_MESSAGE_LOADING = '<div class="' + CSS_MESSAGE_LOADING + '"><div class="' + CSS_MESSAGE_LOADING_CONTENT +
2575        '">{0}</div></div>';
2576
2577/**
2578 * <p><img src="assets/images/aui-loading-mask/main.png"/></p>
2579 *
2580 * A base class for LoadingMask, providing:
2581 * <ul>
2582 *    <li>Cross browser mask functionality to cover an element or the entire page</li>
2583 *    <li>Customizable mask (i.e., background, opacity)</li>
2584 *    <li>Display a centered "loading" message on the masked node</li>
2585 * </ul>
2586 *
2587 * Quick Example:<br/>
2588 *
2589 * <pre><code>node.plug(A.LoadingMask, { background: '#000' });</code></pre>
2590 *
2591 * Check the list of <a href="LoadingMask.html#configattributes">Configuration Attributes</a> available for
2592 * LoadingMask.
2593 *
2594 * @param config {Object} Object literal specifying widget configuration properties.
2595 *
2596 * @class LoadingMask
2597 * @constructor
2598 * @extends Plugin.Base
2599 */
2600var LoadingMask = A.Component.create({
2601
2602    /**
2603     * Static property provides a string to identify the class.
2604     *
2605     * @property LoadingMask.NAME
2606     * @type String
2607     * @static
2608     */
2609    NAME: NAME,
2610
2611    /**
2612     * Static property provides a string to identify the namespace.
2613     *
2614     * @property LoadingMask.NS
2615     * @type String
2616     * @static
2617     */
2618    NS: NAME,
2619
2620    /**
2621     * Static property used to define the default attribute
2622     * configuration for the LoadingMask.
2623     *
2624     * @property LoadingMask.ATTRS
2625     * @type Object
2626     * @static
2627     */
2628    ATTRS: {
2629        /**
2630         * Node element to display the message.
2631         *
2632         * @attribute messageEl
2633         * @default Generated HTML div element.
2634         * @type String
2635         */
2636        messageEl: {
2637            valueFn: function(val) {
2638                var instance = this;
2639                var strings = instance.get(STRINGS);
2640
2641                return A.Node.create(
2642                    Lang.sub(TPL_MESSAGE_LOADING, [strings.loading])
2643                );
2644            }
2645        },
2646
2647        /**
2648         * Strings used on the LoadingMask. See
2649         * <a href="Widget.html#method_strings">strings</a>.
2650         *
2651         * @attribute strings
2652         * @default { loading: 'Loading&hellip;' }
2653         * @type Object
2654         */
2655        strings: {
2656            value: {
2657                loading: 'Loading&hellip;'
2658            }
2659        },
2660
2661        /**
2662         * Node where the mask will be positioned and re-dimensioned.
2663         *
2664         * @attribute target
2665         * @default null
2666         * @type Node | Widget
2667         */
2668        target: {
2669            setter: function() {
2670                var instance = this;
2671                var target = instance.get(HOST);
2672
2673                if (target instanceof A.Widget) {
2674                    target = target.get(CONTENT_BOX);
2675                }
2676
2677                return target;
2678            },
2679            value: null
2680        }
2681    },
2682
2683    EXTENDS: A.Plugin.Base,
2684
2685    prototype: {
2686        /**
2687         * Construction logic executed during LoadingMask instantiation. Lifecycle.
2688         *
2689         * @method initializer
2690         * @protected
2691         */
2692        initializer: function(config) {
2693            var instance = this;
2694
2695            instance.IGNORED_ATTRS = A.merge({
2696                    host: true
2697                },
2698                LoadingMask.ATTRS
2699            );
2700
2701            instance.renderUI();
2702            instance.bindUI();
2703
2704            instance._createDynamicAttrs(config);
2705        },
2706
2707        /**
2708         * Create the DOM structure for the LoadingMask. Lifecycle.
2709         *
2710         * @method renderUI
2711         * @protected
2712         */
2713        renderUI: function() {
2714            var instance = this;
2715            var strings = instance.get(STRINGS);
2716
2717            instance._renderOverlayMask();
2718
2719            instance.overlayMask.get(BOUNDING_BOX).append(
2720                instance.get(MESSAGE_EL)
2721            );
2722        },
2723
2724        /**
2725         * Bind the events on the LoadingMask UI. Lifecycle.
2726         *
2727         * @method bindUI
2728         * @protected
2729         */
2730        bindUI: function() {
2731            var instance = this;
2732
2733            instance._bindOverlayMaskUI();
2734        },
2735
2736        destructor: function() {
2737            var instance = this;
2738
2739            instance.overlayMask.destroy();
2740
2741            instance._visibleChangeHandle.detach();
2742        },
2743
2744        /**
2745         * Bind events to the
2746         * <a href="LoadingMask.html#property_overlayMask">overlayMask</a>.
2747         *
2748         * @method _bindOverlayMaskUI
2749         * @protected
2750         */
2751        _bindOverlayMaskUI: function() {
2752            var instance = this;
2753
2754            instance._visibleChangeHandle = instance.overlayMask.after('visibleChange', instance._afterVisibleChange, instance);
2755        },
2756
2757        /**
2758         * Center the
2759         * <a href="LoadingMask.html#config_messageEl">messageEl</a> with the
2760         * <a href="LoadingMask.html#config_target">target</a> node.
2761         *
2762         * @method centerMessage
2763         */
2764        centerMessage: function() {
2765            var instance = this;
2766
2767            instance.get(MESSAGE_EL).center(
2768                instance.overlayMask.get(BOUNDING_BOX)
2769            );
2770        },
2771
2772        /**
2773         * Invoke the
2774         * <a href="LoadingMask.html#property_overlayMask">overlayMask</a>
2775         * <code>refreshMask</code> method.
2776         *
2777         * @method refreshMask
2778         */
2779        refreshMask: function() {
2780            var instance = this;
2781
2782            instance.overlayMask.refreshMask();
2783
2784            instance.centerMessage();
2785        },
2786
2787        /**
2788         * Fires after the value of the
2789         * <a href="LoadingMask.html#config_visible">visible</a> attribute change.
2790         *
2791         * @method _afterVisibleChange
2792         * @param {EventFacade} event
2793         * @protected
2794         */
2795        _afterVisibleChange: function(event) {
2796            var instance = this;
2797            var target = instance.get(TARGET);
2798            var isStaticPositioned = (target.getStyle(POSITION) == STATIC);
2799
2800            target.toggleClass(CSS_MASKED, (event.newVal));
2801            target.toggleClass(CSS_MASKED_RELATIVE, (event.newVal && isStaticPositioned));
2802
2803            if (event.newVal) {
2804                instance.refreshMask();
2805            }
2806        },
2807
2808        /**
2809         * Render
2810         * <a href="LoadingMask.html#property_overlayMask">overlayMask</a>
2811         * instance.
2812         *
2813         * @method _renderOverlayMask
2814         * @protected
2815         */
2816        _renderOverlayMask: function() {
2817            var instance = this;
2818            var target = instance.get(TARGET);
2819
2820            /**
2821             * Stores the <a href="OverlayMask.html">OverlayMask</a> used
2822             * internally.
2823             *
2824             * @property overlayMask
2825             * @type OverlayMask
2826             * @protected
2827             */
2828            instance.overlayMask = new A.OverlayMask({
2829                target: target,
2830                cssClass: CSS_LOADINGMASK
2831            }).render(target);
2832        },
2833
2834        /**
2835         * Create dynamic attributes listeners to invoke the setter on
2836         * <a href="LoadingMask.html#property_overlayMask">overlayMask</a> after
2837         * the attribute is set on the LoadingMask instance.
2838         *
2839         * @method _createDynamicAttrs
2840         * @param {Object} config Object literal specifying widget configuration properties.
2841         * @protected
2842         */
2843        _createDynamicAttrs: function(config) {
2844            var instance = this;
2845
2846            A.each(config, function(value, key) {
2847                var ignoredAttr = instance.IGNORED_ATTRS[key];
2848
2849                if (!ignoredAttr) {
2850                    instance.addAttr(key, {
2851                        setter: function(val) {
2852                            this.overlayMask.set(key, val);
2853
2854                            return val;
2855                        },
2856                        value: value
2857                    });
2858                }
2859            });
2860        }
2861    }
2862});
2863
2864A.each([HIDE, SHOW, TOGGLE], function(method) {
2865    /**
2866     * Invoke the
2867     * <a href="LoadingMask.html#property_overlayMask">overlayMask</a>
2868     * <code>hide</code> method.
2869     *
2870     * @method hide
2871     */
2872
2873    /**
2874     * Invoke the
2875     * <a href="LoadingMask.html#property_overlayMask">overlayMask</a>
2876     * <code>show</code> method.
2877     *
2878     * @method show
2879     */
2880
2881    /**
2882     * Invoke the
2883     * <a href="LoadingMask.html#property_overlayMask">overlayMask</a>
2884     * <code>toggle</code> method.
2885     *
2886     * @method toggle
2887     */
2888    LoadingMask.prototype[method] = function() {
2889        this.overlayMask[method]();
2890    };
2891});
2892
2893A.LoadingMask = LoadingMask;
2894
2895
2896}, '3.1.0-deprecated.77', {"requires": ["plugin", "aui-overlay-mask-deprecated"], "skinnable": true});
2897
2898YUI.add('aui-overlay-base-deprecated', function (A, NAME) {
2899
2900/**
2901 * Provides a basic Overlay widget, with Standard Module content support. The Overlay widget
2902 * provides Page XY positioning support, alignment and centering support along with basic
2903 * stackable support (z-index and shimming).
2904 *
2905 * @module aui-overlay
2906 * @submodule aui-overlay-base
2907 */
2908
2909/**
2910 * A basic Overlay Widget, which can be positioned based on Page XY co-ordinates and is stackable (z-index support).
2911 * It also provides alignment and centering support and uses a standard module format for it's content, with header,
2912 * body and footer section support.
2913 *
2914 * @class OverlayBase
2915 * @constructor
2916 * @extends Component
2917 * @uses WidgetStdMod
2918 * @uses WidgetPosition
2919 * @uses WidgetStack
2920 * @uses WidgetPositionAlign
2921 * @uses WidgetPositionConstrain
2922 * @param {Object} object The user configuration for the instance.
2923 */
2924A.OverlayBase = A.Component.create({
2925    NAME: 'overlay',
2926    ATTRS: {
2927        hideClass: {
2928            value: false
2929        }
2930    },
2931    AUGMENTS: [A.WidgetPosition, A.WidgetStack, A.WidgetPositionAlign, A.WidgetPositionConstrain, A.WidgetStdMod]
2932});
2933
2934
2935}, '3.1.0-deprecated.77', {
2936    "requires": [
2937        "widget-position",
2938        "widget-stack",
2939        "widget-position-align",
2940        "widget-position-constrain",
2941        "widget-stdmod",
2942        "aui-component"
2943    ]
2944});
2945
2946YUI.add('aui-overlay-context-deprecated', function (A, NAME) {
2947
2948/**
2949 * The OverlayContext Utility
2950 *
2951 * @module aui-overlay
2952 * @submodule aui-overlay-context
2953 */
2954
2955var L = A.Lang,
2956    isString = L.isString,
2957    isNumber = L.isNumber,
2958    isObject = L.isObject,
2959    isBoolean = L.isBoolean,
2960
2961    isNodeList = function(v) {
2962        return (v instanceof A.NodeList);
2963    },
2964
2965    ALIGN = 'align',
2966    BL = 'bl',
2967    BOUNDING_BOX = 'boundingBox',
2968    CANCELLABLE_HIDE = 'cancellableHide',
2969    OVERLAY_CONTEXT = 'overlaycontext',
2970    CURRENT_NODE = 'currentNode',
2971    FOCUSED = 'focused',
2972    HIDE = 'hide',
2973    HIDE_DELAY = 'hideDelay',
2974    HIDE_ON = 'hideOn',
2975    HIDE_ON_DOCUMENT_CLICK = 'hideOnDocumentClick',
2976    MOUSEDOWN = 'mousedown',
2977    SHOW = 'show',
2978    SHOW_DELAY = 'showDelay',
2979    SHOW_ON = 'showOn',
2980    TL = 'tl',
2981    TRIGGER = 'trigger',
2982    USE_ARIA = 'useARIA',
2983    VISIBLE = 'visible';
2984
2985/**
2986 * <p><img src="assets/images/aui-overlay-context/main.png"/></p>
2987 *
2988 * A base class for OverlayContext, providing:
2989 * <ul>
2990 *    <li>Widget Lifecycle (initializer, renderUI, bindUI, syncUI, destructor)</li>
2991 *    <li>Able to display an <a href="Overlay.html">Overlay</a> at a specified corner of an element <a href="OverlayContext.html#config_trigger">trigger</a></li>
2992 * </ul>
2993 *
2994 * Quick Example:<br/>
2995 *
2996 * <pre><code>var instance = new A.OverlayContext({
2997 *  boundingBox: '#OverlayBoundingBox',
2998 *  hideOn: 'mouseleave',
2999 *  showOn: 'mouseenter',
3000 *	trigger: '.menu-trigger'
3001 * }).render();
3002 * </code></pre>
3003 *
3004 * Check the list of <a href="OverlayContext.html#configattributes">Configuration Attributes</a> available for
3005 * OverlayContext.
3006 *
3007 * @class OverlayContext
3008 * @constructor
3009 * @extends OverlayBase
3010 * @param config {Object} Object literal specifying widget configuration properties.
3011 */
3012var OverlayContext = A.Component.create({
3013    /**
3014     * Static property provides a string to identify the class.
3015     *
3016     * @property OverlayContext.NAME
3017     * @type String
3018     * @static
3019     */
3020    NAME: OVERLAY_CONTEXT,
3021
3022    /**
3023     * Static property used to define the default attribute
3024     * configuration for the OverlayContext.
3025     *
3026     * @property OverlayContext.ATTRS
3027     * @type Object
3028     * @static
3029     */
3030    ATTRS: {
3031        /**
3032         * Inherited from <a href="Overlay.html#config_align">Overlay</a>.
3033         *
3034         * @attribute align
3035         * @default { node: null, points: [ TL, BL ] }
3036         * @type Object
3037         */
3038        align: {
3039            value: {
3040                node: null,
3041                points: [TL, BL]
3042            }
3043        },
3044
3045        /**
3046         * Cancel auto hide delay if the user interact with the Overlay
3047         * (focus, click, mouseover)
3048         *
3049         * @attribute cancellableHide
3050         * @default true
3051         * @type boolean
3052         */
3053        cancellableHide: {
3054            value: true,
3055            validator: isBoolean
3056        },
3057
3058        /**
3059         * OverlayContext allow multiple elements to be the
3060         * <a href="OverlayContext.html#config_trigger">trigger</a>, the
3061         * currentNode stores the current active one.
3062         *
3063         * @attribute currentNode
3064         * @default First item of the
3065         * <a href="OverlayContext.html#config_trigger">trigger</a> NodeList.
3066         * @type Node
3067         */
3068        currentNode: {
3069            valueFn: function() {
3070                // define default currentNode as the first item from trigger
3071                return this.get(TRIGGER).item(0);
3072            }
3073        },
3074
3075        delay: {
3076            value: null,
3077            validator: isObject
3078        },
3079
3080        /**
3081         * The event which is responsible to hide the OverlayContext.
3082         *
3083         * @attribute hideOn
3084         * @default mouseout
3085         * @type String
3086         */
3087        hideOn: {
3088            lazyAdd: false,
3089            value: 'mouseout',
3090            setter: function(v) {
3091                return this._setHideOn(v);
3092            }
3093        },
3094
3095        /**
3096         * If true the instance is registered on the
3097         * <a href="OverlayContextManager.html">OverlayContextManager</a> static
3098         * class and will be hide when the user click on document.
3099         *
3100         * @attribute hideOnDocumentClick
3101         * @default true
3102         * @type boolean
3103         */
3104        hideOnDocumentClick: {
3105            lazyAdd: false,
3106            setter: function(v) {
3107                return this._setHideOnDocumentClick(v);
3108            },
3109            value: true,
3110            validator: isBoolean
3111        },
3112
3113        /**
3114         * Number of milliseconds after the hide method is invoked to hide the
3115         * OverlayContext.
3116         *
3117         * @attribute hideDelay
3118         * @default 0
3119         * @type Number
3120         */
3121        hideDelay: {
3122            lazyAdd: false,
3123            setter: '_setHideDelay',
3124            value: 0,
3125            validator: isNumber
3126        },
3127
3128        /**
3129         * The event which is responsible to show the OverlayContext.
3130         *
3131         * @attribute showOn
3132         * @default mouseover
3133         * @type String
3134         */
3135        showOn: {
3136            lazyAdd: false,
3137            value: 'mouseover',
3138            setter: function(v) {
3139                return this._setShowOn(v);
3140            }
3141        },
3142
3143        /**
3144         * Number of milliseconds after the show method is invoked to show the
3145         * OverlayContext.
3146         *
3147         * @attribute showDelay
3148         * @default 0
3149         * @type Number
3150         */
3151        showDelay: {
3152            lazyAdd: false,
3153            setter: '_setShowDelay',
3154            value: 0,
3155            validator: isNumber
3156        },
3157
3158        /**
3159         * Node, NodeList or Selector which will be used as trigger elements
3160         * to show or hide the OverlayContext.
3161         *
3162         * @attribute trigger
3163         * @default null
3164         * @type {Node | NodeList | String}
3165         */
3166        trigger: {
3167            lazyAdd: false,
3168            setter: function(v) {
3169                if (isNodeList(v)) {
3170                    return v;
3171                }
3172                else if (isString(v)) {
3173                    return A.all(v);
3174                }
3175
3176                return new A.NodeList([v]);
3177            }
3178        },
3179
3180        /**
3181         * True if Overlay should use ARIA plugin
3182         *
3183         * @attribute useARIA
3184         * @default true
3185         * @type Boolean
3186         */
3187        useARIA: {
3188            value: true
3189        },
3190
3191        /**
3192         * If true the OverlayContext is visible by default after the render phase.
3193         * Inherited from <a href="Overlay.html">Overlay</a>.
3194         *
3195         * @attribute visible
3196         * @default false
3197         * @type boolean
3198         */
3199        visible: {
3200            value: false
3201        }
3202    },
3203
3204    EXTENDS: A.OverlayBase,
3205
3206    constructor: function(config) {
3207        var instance = this;
3208
3209        instance._showCallback = null;
3210        instance._hideCallback = null;
3211
3212        OverlayContext.superclass.constructor.apply(this, arguments);
3213    },
3214
3215    prototype: {
3216        /**
3217         * Construction logic executed during OverlayContext instantiation. Lifecycle.
3218         *
3219         * @method initializer
3220         * @protected
3221         */
3222        initializer: function() {
3223            var instance = this;
3224
3225            var trigger = instance.get(TRIGGER);
3226
3227            if (trigger && trigger.size()) {
3228                instance.set('align.node', trigger.item(0));
3229            }
3230        },
3231
3232        /**
3233         * Bind the events on the OverlayContext UI. Lifecycle.
3234         *
3235         * @method bindUI
3236         * @protected
3237         */
3238        bindUI: function() {
3239            var instance = this;
3240            var boundingBox = instance.get(BOUNDING_BOX);
3241
3242            boundingBox.on(MOUSEDOWN, instance._stopTriggerEventPropagation);
3243
3244            instance.before('triggerChange', instance._beforeTriggerChange);
3245            instance.before('showOnChange', instance._beforeShowOnChange);
3246            instance.before('hideOnChange', instance._beforeHideOnChange);
3247
3248            instance.after('triggerChange', instance._afterTriggerChange);
3249            instance.after('showOnChange', instance._afterShowOnChange);
3250            instance.after('hideOnChange', instance._afterHideOnChange);
3251
3252            boundingBox.on('click', A.bind(instance._cancelAutoHide, instance));
3253            boundingBox.on('mouseenter', A.bind(instance._cancelAutoHide, instance));
3254            boundingBox.on('mouseleave', A.bind(instance._invokeHideTaskOnInteraction, instance));
3255            instance.after('focusedChange', A.bind(instance._invokeHideTaskOnInteraction, instance));
3256
3257            instance.on('visibleChange', instance._onVisibleChangeOverlayContext);
3258        },
3259
3260        /**
3261         * Hides the OverlayContext.
3262         *
3263         * @method hide
3264         */
3265        hide: function() {
3266            var instance = this;
3267
3268            instance.clearIntervals();
3269
3270            instance.fire('hide');
3271
3272            OverlayContext.superclass.hide.apply(instance, arguments);
3273        },
3274
3275        /**
3276         * Shows the OverlayContext.
3277         *
3278         * @method hide
3279         */
3280        show: function(event) {
3281            var instance = this;
3282
3283            instance.clearIntervals();
3284
3285            instance.updateCurrentNode(event);
3286
3287            instance.fire('show');
3288
3289            OverlayContext.superclass.show.apply(instance, arguments);
3290
3291            instance.refreshAlign();
3292        },
3293
3294        /**
3295         * Refreshes the rendered UI, based on Widget State
3296         *
3297         * @method syncUI
3298         * @protected
3299         *
3300         */
3301        syncUI: function() {
3302            var instance = this;
3303
3304            if (instance.get(USE_ARIA)) {
3305                instance.plug(A.Plugin.Aria, {
3306                    attributes: {
3307                        trigger: {
3308                            ariaName: 'controls',
3309                            format: function(value) {
3310                                var id = instance.get(BOUNDING_BOX).generateID();
3311
3312                                return id;
3313                            },
3314                            node: function() {
3315                                return instance.get(TRIGGER);
3316                            }
3317                        },
3318                        visible: {
3319                            ariaName: 'hidden',
3320                            format: function(value) {
3321                                return !value;
3322                            }
3323                        }
3324                    },
3325                    roleName: 'dialog'
3326                });
3327            }
3328        },
3329
3330        /**
3331         * Toggles visibility of the OverlayContext.
3332         *
3333         * @method toggle
3334         * @param {EventFacade} event
3335         */
3336        toggle: function(event) {
3337            var instance = this;
3338
3339            if (instance.get(VISIBLE)) {
3340                instance._hideTask(event);
3341            }
3342            else {
3343                instance._showTask(event);
3344            }
3345        },
3346
3347        /**
3348         * Clear the intervals to show or hide the OverlayContext. See
3349         * <a href="OverlayContext.html#config_hideDelay">hideDelay</a> and
3350         * <a href="OverlayContext.html#config_showDelay">showDelay</a>.
3351         *
3352         * @method clearIntervals
3353         */
3354        clearIntervals: function() {
3355            this._hideTask.cancel();
3356            this._showTask.cancel();
3357        },
3358
3359        /**
3360         * Refreshes the alignment of the OverlayContext with the
3361         * <a href="OverlayContext.html#config_currentNode">currentNode</a>. See
3362         * also <a href="OverlayContext.html#config_align">align</a>.
3363         *
3364         * @method refreshAlign
3365         */
3366        refreshAlign: function() {
3367            var instance = this;
3368            var align = instance.get(ALIGN);
3369            var currentNode = instance.get(CURRENT_NODE);
3370
3371            if (currentNode) {
3372                instance._uiSetAlign(currentNode, align.points);
3373            }
3374        },
3375
3376        /**
3377         * Update the
3378         * <a href="OverlayContext.html#config_currentNode">currentNode</a> with the
3379         * <a href="OverlayContext.html#config_align">align</a> node or the
3380         * event.currentTarget and in last case with the first item of the
3381         * <a href="OverlayContext.html#config_trigger">trigger</a>.
3382         *
3383         * @method updateCurrentNode
3384         * @param {EventFacade} event
3385         */
3386        updateCurrentNode: function(event) {
3387            var instance = this;
3388            var align = instance.get(ALIGN);
3389            var trigger = instance.get(TRIGGER);
3390            var currentTarget = null;
3391
3392            if (event) {
3393                currentTarget = event.currentTarget;
3394            }
3395
3396            var node = currentTarget || trigger.item(0) || align.node;
3397
3398            if (node) {
3399                instance.set(CURRENT_NODE, node);
3400            }
3401        },
3402
3403        /**
3404         * Handles the logic for the
3405         * <a href="OverlayContext.html#method_toggle">toggle</a>.
3406         *
3407         * @method _toggle
3408         * @param {EventFacade} event
3409         * @protected
3410         */
3411        _toggle: function(event) {
3412            var instance = this;
3413
3414            if (instance.get('disabled')) {
3415                return;
3416            }
3417
3418            var currentTarget = event.currentTarget;
3419
3420            // check if the target is different and simulate a .hide() before toggle
3421            if (instance._lastTarget != currentTarget) {
3422                instance.hide();
3423            }
3424
3425            instance.toggle(event);
3426
3427            event.stopPropagation();
3428
3429            instance._lastTarget = currentTarget;
3430        },
3431
3432        /**
3433         * Fires after the <a href="OverlayContext.html#config_showOn">showOn</a>
3434         * attribute change.
3435         *
3436         * @method _afterShowOnChange
3437         * @param {EventFacade} event
3438         * @protected
3439         */
3440        _afterShowOnChange: function(event) {
3441            var instance = this;
3442            var wasToggle = event.prevVal == instance.get(HIDE_ON);
3443
3444            if (wasToggle) {
3445                var trigger = instance.get(TRIGGER);
3446
3447                // if wasToggle remove the toggle callback
3448                trigger.detach(event.prevVal, instance._hideCallback);
3449                // and re attach the hide event
3450                instance._setHideOn(instance.get(HIDE_ON));
3451            }
3452        },
3453
3454        /**
3455         * Fires after the <a href="OverlayContext.html#config_hideOn">hideOn</a>
3456         * attribute change.
3457         *
3458         * @method _afterHideOnChange
3459         * @param {EventFacade} event
3460         * @protected
3461         */
3462        _afterHideOnChange: function(event) {
3463            var instance = this;
3464            var wasToggle = event.prevVal == instance.get(SHOW_ON);
3465
3466            if (wasToggle) {
3467                var trigger = instance.get(TRIGGER);
3468
3469                // if wasToggle remove the toggle callback
3470                trigger.detach(event.prevVal, instance._showCallback);
3471                // and re attach the show event
3472                instance._setShowOn(instance.get(SHOW_ON));
3473            }
3474        },
3475
3476        /**
3477         * Fires after the <a href="OverlayContext.html#config_trigger">trigger</a>
3478         * attribute change.
3479         *
3480         * @method _afterTriggerChange
3481         * @param {EventFacade} event
3482         * @protected
3483         */
3484        _afterTriggerChange: function(event) {
3485            var instance = this;
3486
3487            instance._setShowOn(instance.get(SHOW_ON));
3488            instance._setHideOn(instance.get(HIDE_ON));
3489        },
3490
3491        /**
3492         * Fires before the <a href="OverlayContext.html#config_showOn">showOn</a>
3493         * attribute change.
3494         *
3495         * @method _beforeShowOnChange
3496         * @param {EventFacade} event
3497         * @protected
3498         */
3499        _beforeShowOnChange: function(event) {
3500            var instance = this;
3501            var trigger = instance.get(TRIGGER);
3502
3503            // detach the old callback
3504            trigger.detach(event.prevVal, instance._showCallback);
3505        },
3506
3507        /**
3508         * Fires before the <a href="OverlayContext.html#config_hideOn">hideOn</a>
3509         * attribute change.
3510         *
3511         * @method _beforeHideOnChange
3512         * @param {EventFacade} event
3513         * @protected
3514         */
3515        _beforeHideOnChange: function(event) {
3516            var instance = this;
3517            var trigger = instance.get(TRIGGER);
3518
3519            // detach the old callback
3520            trigger.detach(event.prevVal, instance._hideCallback);
3521        },
3522
3523        /**
3524         * Fires before the <a href="OverlayContext.html#config_trigger">trigger</a>
3525         * attribute change.
3526         *
3527         * @method _beforeTriggerChange
3528         * @param {EventFacade} event
3529         * @protected
3530         */
3531        _beforeTriggerChange: function(event) {
3532            var instance = this;
3533            var trigger = instance.get(TRIGGER);
3534            var showOn = instance.get(SHOW_ON);
3535            var hideOn = instance.get(HIDE_ON);
3536
3537            trigger.detach(showOn, instance._showCallback);
3538            trigger.detach(hideOn, instance._hideCallback);
3539            trigger.detach(MOUSEDOWN, instance._stopTriggerEventPropagation);
3540        },
3541
3542        /**
3543         * Cancel hide event if the user does some interaction with the
3544         * OverlayContext (focus, click or mouseover).
3545         *
3546         * @method _cancelAutoHide
3547         * @param {EventFacade} event
3548         * @protected
3549         */
3550        _cancelAutoHide: function(event) {
3551            var instance = this;
3552
3553            if (instance.get(CANCELLABLE_HIDE)) {
3554                instance.clearIntervals();
3555            }
3556
3557            event.stopPropagation();
3558        },
3559
3560        /**
3561         * Invoke the hide event when the OverlayContext looses the focus.
3562         *
3563         * @method _invokeHideTaskOnInteraction
3564         * @param {EventFacade} event
3565         * @protected
3566         */
3567        _invokeHideTaskOnInteraction: function(event) {
3568            var instance = this;
3569            var cancellableHide = instance.get(CANCELLABLE_HIDE);
3570            var focused = instance.get(FOCUSED);
3571
3572            if (!focused && !cancellableHide) {
3573                instance._hideTask();
3574            }
3575        },
3576
3577        /**
3578         * Fires when the <a href="OverlayContext.html#config_visible">visible</a>
3579         * attribute changes.
3580         *
3581         * @method _onVisibleChangeOverlayContext
3582         * @param {EventFacade} event
3583         * @protected
3584         */
3585        _onVisibleChangeOverlayContext: function(event) {
3586            var instance = this;
3587
3588            if (event.newVal && instance.get('disabled')) {
3589                event.preventDefault();
3590            }
3591        },
3592
3593        /**
3594         * Helper method to invoke event.stopPropagation().
3595         *
3596         * @method _stopTriggerEventPropagation
3597         * @param {EventFacade} event
3598         * @protected
3599         */
3600        _stopTriggerEventPropagation: function(event) {
3601            event.stopPropagation();
3602        },
3603
3604        /**
3605         * Setter for the
3606         * <a href="OverlayContext.html#config_hideDelay">hideDelay</a>
3607         * attribute.
3608         *
3609         * @method _setHideDelay
3610         * @param {number} val
3611         * @protected
3612         * @return {number}
3613         */
3614        _setHideDelay: function(val) {
3615            var instance = this;
3616
3617            instance._hideTask = A.debounce(instance.hide, val, instance);
3618
3619            return val;
3620        },
3621
3622        /**
3623         * Setter for the <a href="OverlayContext.html#config_hideOn">hideOn</a>
3624         * attribute.
3625         *
3626         * @method _setHideOn
3627         * @param {String} eventType Event type
3628         * @protected
3629         * @return {String}
3630         */
3631        _setHideOn: function(eventType) {
3632            var instance = this;
3633            var trigger = instance.get(TRIGGER);
3634            var toggle = eventType == instance.get(SHOW_ON);
3635
3636            if (toggle) {
3637                instance._hideCallback = A.bind(instance._toggle, instance);
3638
3639                // only one attached event is enough for toggle
3640                trigger.detach(eventType, instance._showCallback);
3641            }
3642            else {
3643                var delay = instance.get(HIDE_DELAY);
3644
3645                instance._hideCallback = function(event) {
3646                    instance._hideTask(event);
3647
3648                    event.stopPropagation();
3649                };
3650            }
3651
3652            trigger.on(eventType, instance._hideCallback);
3653
3654            return eventType;
3655        },
3656
3657        /**
3658         * Setter for the
3659         * <a href="OverlayContext.html#config_hideOnDocumentClick">hideOnDocumentClick</a>
3660         * attribute.
3661         *
3662         * @method _setHideOn
3663         * @param {boolean} value
3664         * @protected
3665         * @return {boolean}
3666         */
3667        _setHideOnDocumentClick: function(value) {
3668            var instance = this;
3669
3670            if (value) {
3671                A.OverlayContextManager.register(instance);
3672            }
3673            else {
3674                A.OverlayContextManager.remove(instance);
3675            }
3676
3677            return value;
3678        },
3679
3680        /**
3681         * Setter for the
3682         * <a href="OverlayContext.html#config_showDelay">showDelay</a>
3683         * attribute.
3684         *
3685         * @method _setShowDelay
3686         * @param {number} val
3687         * @protected
3688         * @return {number}
3689         */
3690        _setShowDelay: function(val) {
3691            var instance = this;
3692
3693            instance._showTask = A.debounce(instance.show, val, instance);
3694
3695            return val;
3696        },
3697
3698        /**
3699         * Setter for the <a href="OverlayContext.html#config_showOn">showOn</a>
3700         * attribute.
3701         *
3702         * @method _setShowOn
3703         * @param {String} eventType Event type
3704         * @protected
3705         * @return {String}
3706         */
3707        _setShowOn: function(eventType) {
3708            var instance = this;
3709            var trigger = instance.get(TRIGGER);
3710            var toggle = eventType == instance.get(HIDE_ON);
3711
3712            if (toggle) {
3713                instance._showCallback = A.bind(instance._toggle, instance);
3714
3715                // only one attached event is enough for toggle
3716                trigger.detach(eventType, instance._hideCallback);
3717            }
3718            else {
3719                var delay = instance.get(SHOW_DELAY);
3720
3721                instance._showCallback = function(event) {
3722                    instance._showTask(event);
3723
3724                    event.stopPropagation();
3725                };
3726            }
3727
3728            if (eventType != MOUSEDOWN) {
3729                trigger.on(MOUSEDOWN, instance._stopTriggerEventPropagation);
3730            }
3731            else {
3732                trigger.detach(MOUSEDOWN, instance._stopTriggerEventPropagation);
3733            }
3734
3735            trigger.on(eventType, instance._showCallback);
3736
3737            return eventType;
3738        }
3739    }
3740});
3741
3742A.OverlayContext = OverlayContext;
3743
3744/**
3745 * A base class for OverlayContextManager:
3746 *
3747 * @param config {Object} Object literal specifying widget configuration properties.
3748 *
3749 * @class OverlayContextManager
3750 * @constructor
3751 * @extends OverlayManager
3752 * @static
3753 */
3754A.OverlayContextManager = new A.OverlayManager({});
3755
3756A.on(MOUSEDOWN, function() {
3757    A.OverlayContextManager.hideAll();
3758}, A.getDoc());
3759
3760
3761}, '3.1.0-deprecated.77', {"requires": ["aui-overlay-manager-deprecated", "aui-delayed-task-deprecated", "aui-aria"]});
3762
3763YUI.add('aui-overlay-manager-deprecated', function (A, NAME) {
3764
3765/**
3766 * The OverlayManager Utility
3767 *
3768 * @module aui-overlay
3769 * @submodule aui-overlay-manager
3770 */
3771
3772var Lang = A.Lang,
3773    isArray = Lang.isArray,
3774    isBoolean = Lang.isBoolean,
3775    isNumber = Lang.isNumber,
3776    isString = Lang.isString,
3777
3778    BOUNDING_BOX = 'boundingBox',
3779    DEFAULT = 'default',
3780    HOST = 'host',
3781    OVERLAY_MANAGER = 'OverlayManager',
3782    GROUP = 'group',
3783    Z_INDEX = 'zIndex',
3784    Z_INDEX_BASE = 'zIndexBase';
3785
3786/**
3787 * <p><img src="assets/images/aui-overlay-manager/main.png"/></p>
3788 *
3789 * A base class for OverlayManager, providing:
3790 * <ul>
3791 *    <li>Grouping overlays</li>
3792 *    <li>Show or hide the entire group of registered overlays</li>
3793 *    <li>Basic Overlay Stackability (zIndex support)</li>
3794 * </ul>
3795 *
3796 * Quick Example:<br/>
3797 *
3798 * <pre><code>var groupOverlayManager = new A.OverlayManager();
3799 * groupOverlayManager.register([overlay1, overlay2, overlay3]);
3800 * groupOverlayManager.hideAll();
3801 * </code></pre>
3802 *
3803 * Check the list of <a href="OverlayManager.html#configattributes">Configuration Attributes</a> available for
3804 * OverlayManager.
3805 *
3806 * @param config {Object} Object literal specifying widget configuration properties.
3807 *
3808 * @class OverlayManager
3809 * @constructor
3810 * @extends Base
3811 */
3812var OverlayManager = A.Component.create({
3813    /**
3814     * Static property provides a string to identify the class.
3815     *
3816     * @property OverlayManager.NAME
3817     * @type String
3818     * @static
3819     */
3820    NAME: OVERLAY_MANAGER.toLowerCase(),
3821
3822    /**
3823     * Static property used to define the default attribute
3824     * configuration for the OverlayManager.
3825     *
3826     * @property OverlayManager.ATTRS
3827     * @type Object
3828     * @static
3829     */
3830    ATTRS: {
3831        /**
3832         * The zIndex base to be used on the stacking for all overlays
3833         * registered on the OverlayManager.
3834         *
3835         * @attribute zIndexBase
3836         * @default 1000
3837         * @type Number
3838         */
3839        zIndexBase: {
3840            value: 1000,
3841            validator: isNumber,
3842            setter: Lang.toInt
3843        }
3844    },
3845
3846    EXTENDS: A.Base,
3847
3848    prototype: {
3849        /**
3850         * Construction logic executed during OverlayManager instantiation. Lifecycle.
3851         *
3852         * @method initializer
3853         * @protected
3854         */
3855        initializer: function() {
3856            var instance = this;
3857
3858            instance._overlays = [];
3859        },
3860
3861        /**
3862         * Set the passed overlay zIndex to the highest value.
3863         *
3864         * @method bringToTop
3865         * @param {Overlay} overlay Instance of
3866         * <a href="Overlay.html">Overlay</a>.
3867         */
3868        bringToTop: function(overlay) {
3869            var instance = this;
3870
3871            var overlays = instance._overlays.sort(instance.sortByZIndexDesc);
3872
3873            var highest = overlays[0];
3874
3875            if (highest !== overlay) {
3876                var overlayZ = overlay.get(Z_INDEX);
3877                var highestZ = highest.get(Z_INDEX);
3878
3879                overlay.set(Z_INDEX, highestZ + 1);
3880
3881                overlay.set('focused', true);
3882            }
3883        },
3884
3885        /**
3886         * Destructor lifecycle implementation for the OverlayManager class.
3887         * Purges events attached to the node (and all child nodes).
3888         *
3889         * @method destructor
3890         * @protected
3891         */
3892        destructor: function() {
3893            var instance = this;
3894
3895            instance._overlays = [];
3896        },
3897
3898        /**
3899         * Register the passed <a href="Overlay.html">Overlay</a> to this
3900         * OverlayManager.
3901         *
3902         * @method register
3903         * @param {Overlay} overlay <a href="Overlay.html">Overlay</a> instance to be registered
3904         * @return {Array} Registered overlays
3905         */
3906        register: function(overlay) {
3907            var instance = this;
3908
3909            var overlays = instance._overlays;
3910
3911            if (isArray(overlay)) {
3912                A.Array.each(overlay, function(o) {
3913                    instance.register(o);
3914                });
3915            }
3916            else {
3917                var zIndexBase = instance.get(Z_INDEX_BASE);
3918                var registered = instance._registered(overlay);
3919
3920                if (!registered && overlay &&
3921                    ((overlay instanceof A.Overlay) ||
3922                        (A.Component && overlay instanceof A.Component))
3923                ) {
3924                    var boundingBox = overlay.get(BOUNDING_BOX);
3925
3926                    overlays.push(overlay);
3927
3928                    var zIndex = overlay.get(Z_INDEX) || 0;
3929                    var newZIndex = overlays.length + zIndex + zIndexBase;
3930
3931                    overlay.set(Z_INDEX, newZIndex);
3932
3933                    overlay.on('focusedChange', instance._onFocusedChange, instance);
3934                    boundingBox.on('mousedown', instance._onMouseDown, instance);
3935                }
3936            }
3937
3938            return overlays;
3939        },
3940
3941        /**
3942         * Remove the passed <a href="Overlay.html">Overlay</a> from this
3943         * OverlayManager.
3944         *
3945         * @method remove
3946         * @param {Overlay} overlay <a href="Overlay.html">Overlay</a> instance to be removed
3947         * @return {null}
3948         */
3949        remove: function(overlay) {
3950            var instance = this;
3951
3952            var overlays = instance._overlays;
3953
3954            if (overlays.length) {
3955                return A.Array.removeItem(overlays, overlay);
3956            }
3957
3958            return null;
3959        },
3960
3961        /**
3962         * Loop through all registered <a href="Overlay.html">Overlay</a> and
3963         * execute a callback.
3964         *
3965         * @method each
3966         * @param {function} fn Callback to be executed on the
3967         * <a href="Array.html#method_each">Array.each</a>
3968         * @return {null}
3969         */
3970        each: function(fn) {
3971            var instance = this;
3972
3973            var overlays = instance._overlays;
3974
3975            A.Array.each(overlays, fn);
3976        },
3977
3978        /**
3979         * Invoke the <a href="Overlay.html#method_show">show</a> method from
3980         * all registered Overlays.
3981         *
3982         * @method showAll
3983         */
3984        showAll: function() {
3985            this.each(
3986                function(overlay) {
3987                    overlay.show();
3988                }
3989            );
3990        },
3991
3992        /**
3993         * Invoke the <a href="Overlay.html#method_hide">hide</a> method from
3994         * all registered Overlays.
3995         *
3996         * @method hideAll
3997         */
3998        hideAll: function() {
3999            this.each(
4000                function(overlay) {
4001                    overlay.hide();
4002                }
4003            );
4004        },
4005
4006        /**
4007         * zIndex comparator. Used on Array.sort.
4008         *
4009         * @method sortByZIndexDesc
4010         * @param {Overlay} a Overlay
4011         * @param {Overlay} b Overlay
4012         * @return {Number}
4013         */
4014        sortByZIndexDesc: function(a, b) {
4015            if (!a || !b || !a.hasImpl(A.WidgetStack) || !b.hasImpl(A.WidgetStack)) {
4016                return 0;
4017            }
4018            else {
4019                var aZ = a.get(Z_INDEX);
4020                var bZ = b.get(Z_INDEX);
4021
4022                if (aZ > bZ) {
4023                    return -1;
4024                }
4025                else if (aZ < bZ) {
4026                    return 1;
4027                }
4028                else {
4029                    return 0;
4030                }
4031            }
4032        },
4033
4034        /**
4035         * Check if the overlay is registered.
4036         *
4037         * @method _registered
4038         * @param {Overlay} overlay Overlay
4039         * @protected
4040         * @return {boolean}
4041         */
4042        _registered: function(overlay) {
4043            var instance = this;
4044
4045            return A.Array.indexOf(instance._overlays, overlay) != -1;
4046        },
4047
4048        /**
4049         * Mousedown event handler, used to invoke
4050         * <a href="OverlayManager.html#method_bringToTop">bringToTop</a>.
4051         *
4052         * @method _onMouseDown
4053         * @param {EventFacade} event
4054         * @protected
4055         */
4056        _onMouseDown: function(event) {
4057            var instance = this;
4058            var overlay = A.Widget.getByNode(event.currentTarget || event.target);
4059            var registered = instance._registered(overlay);
4060
4061            if (overlay && registered) {
4062                instance.bringToTop(overlay);
4063            }
4064        },
4065
4066        /**
4067         * Fires when the <a href="Widget.html#config_focused">focused</a>
4068         * attribute change. Used to invoke
4069         * <a href="OverlayManager.html#method_bringToTop">bringToTop</a>.
4070         *
4071         * @method _onFocusedChange
4072         * @param {EventFacade} event
4073         * @protected
4074         */
4075        _onFocusedChange: function(event) {
4076            var instance = this;
4077
4078            if (event.newVal) {
4079                var overlay = event.currentTarget || event.target;
4080                var registered = instance._registered(overlay);
4081
4082                if (overlay && registered) {
4083                    instance.bringToTop(overlay);
4084                }
4085            }
4086        }
4087    }
4088});
4089
4090A.OverlayManager = OverlayManager;
4091
4092
4093}, '3.1.0-deprecated.77', {"requires": ["overlay", "plugin", "aui-base-deprecated", "aui-overlay-base-deprecated"]});
4094
4095YUI.add('aui-overlay-mask-deprecated', function (A, NAME) {
4096
4097/**
4098 * The OverlayMask Utility
4099 *
4100 * @module aui-overlay
4101 * @submodule aui-overlay-mask
4102 */
4103
4104var L = A.Lang,
4105    isArray = L.isArray,
4106    isString = L.isString,
4107    isNumber = L.isNumber,
4108    isValue = L.isValue,
4109
4110    CONFIG = A.config,
4111
4112    UA = A.UA,
4113
4114    IE6 = (UA.ie <= 6),
4115
4116    ABSOLUTE = 'absolute',
4117    ALIGN_POINTS = 'alignPoints',
4118    BACKGROUND = 'background',
4119    BOUNDING_BOX = 'boundingBox',
4120    CONTENT_BOX = 'contentBox',
4121    FIXED = 'fixed',
4122    HEIGHT = 'height',
4123    OFFSET_HEIGHT = 'offsetHeight',
4124    OFFSET_WIDTH = 'offsetWidth',
4125    OPACITY = 'opacity',
4126    OVERLAY_MASK = 'overlaymask',
4127    POSITION = 'position',
4128    TARGET = 'target',
4129    WIDTH = 'width';
4130
4131/**
4132 * A base class for OverlayMask, providing:
4133 * <ul>
4134 *    <li>Widget Lifecycle (initializer, renderUI, bindUI, syncUI, destructor)</li>
4135 *    <li>Cross browser mask functionality to cover an element or the entire page</li>
4136 *    <li>Customizable mask (i.e., background, opacity)</li>
4137 * </ul>
4138 *
4139 * Quick Example:<br/>
4140 *
4141 * <pre><code>var instance = new A.OverlayMask().render();</code></pre>
4142 *
4143 * Check the list of <a href="OverlayMask.html#configattributes">Configuration Attributes</a> available for
4144 * OverlayMask.
4145 *
4146 * @param config {Object} Object literal specifying widget configuration properties.
4147 *
4148 * @class OverlayMask
4149 * @constructor
4150 * @extends OverlayBase
4151 */
4152var OverlayMask = A.Component.create({
4153    /**
4154     * Static property provides a string to identify the class.
4155     *
4156     * @property OverlayMask.NAME
4157     * @type String
4158     * @static
4159     */
4160    NAME: OVERLAY_MASK,
4161
4162    /**
4163     * Static property used to define the default attribute
4164     * configuration for the OverlayMask.
4165     *
4166     * @property OverlayMask.ATTRS
4167     * @type Object
4168     * @static
4169     */
4170    ATTRS: {
4171        /**
4172         * Points to align the <a href="Overlay.html">Overlay</a> used as
4173         * mask.
4174         *
4175         * @attribute alignPoints
4176         * @default [ 'tl', 'tl' ]
4177         * @type Array
4178         */
4179        alignPoints: {
4180            value: ['tl', 'tl'],
4181            validator: isArray
4182        },
4183
4184        /**
4185         * Background color of the mask.
4186         *
4187         * @attribute background
4188         * @default null
4189         * @type String
4190         */
4191        background: {
4192            lazyAdd: false,
4193            value: null,
4194            validator: isString,
4195            setter: function(v) {
4196                if (v) {
4197                    this.get(CONTENT_BOX).setStyle(BACKGROUND, v);
4198                }
4199
4200                return v;
4201            }
4202        },
4203
4204        /**
4205         * Node where the mask will be positioned and re-dimensioned. The
4206         * default is the document, which means that if not specified the mask
4207         * takes the full screen.
4208         *
4209         * @attribute target
4210         * @default document
4211         * @type Node | String
4212         */
4213        target: {
4214            cloneDefaultValue: false,
4215            lazyAdd: false,
4216            value: CONFIG.doc,
4217            setter: function(v) {
4218                var instance = this;
4219
4220                var target = A.one(v);
4221
4222                var isDoc = instance._isDoc = target.compareTo(CONFIG.doc);
4223                var isWin = instance._isWin = target.compareTo(CONFIG.win);
4224
4225                instance._fullPage = isDoc || isWin;
4226
4227                return target;
4228            }
4229        },
4230
4231        /**
4232         * CSS opacity of the mask.
4233         *
4234         * @attribute opacity
4235         * @default .5
4236         * @type Number
4237         */
4238        opacity: {
4239            value: 0.5,
4240            validator: isNumber,
4241            setter: function(v) {
4242                return this._setOpacity(v);
4243            }
4244        },
4245
4246        /**
4247         * Use shim option.
4248         *
4249         * @attribute shim
4250         * @default True on IE.
4251         * @type boolean
4252         */
4253        shim: {
4254            value: A.UA.ie
4255        },
4256
4257        /**
4258         * If true the Overlay is visible by default after the render phase.
4259         * Inherited from <a href="Overlay.html">Overlay</a>.
4260         *
4261         * @attribute visible
4262         * @default false
4263         * @type boolean
4264         */
4265        visible: {
4266            value: false
4267        },
4268
4269        /**
4270         * zIndex of the OverlayMask.
4271         *
4272         * @attribute zIndex
4273         * @default 1000
4274         * @type Number
4275         */
4276        zIndex: {
4277            value: 1000
4278        }
4279    },
4280
4281    EXTENDS: A.OverlayBase,
4282
4283    prototype: {
4284        /**
4285         * Bind the events on the OverlayMask UI. Lifecycle.
4286         *
4287         * @method bindUI
4288         * @protected
4289         */
4290        bindUI: function() {
4291            var instance = this;
4292
4293            OverlayMask.superclass.bindUI.apply(this, arguments);
4294
4295            instance._eventHandles = [
4296                instance.after('targetChange', instance._afterTargetChange),
4297                instance.after('visibleChange', instance._afterVisibleChange),
4298
4299                // window:resize YUI normalized event is not working, bug?
4300                A.on('windowresize', A.bind(instance.refreshMask, instance))
4301            ];
4302        },
4303
4304        /**
4305         * Sync the OverlayMask UI. Lifecycle.
4306         *
4307         * @method syncUI
4308         * @protected
4309         */
4310        syncUI: function() {
4311            var instance = this;
4312
4313            instance.refreshMask();
4314        },
4315
4316        destructor: function() {
4317            var instance = this;
4318
4319            (new A.EventHandle(instance._eventHandles)).detach();
4320        },
4321
4322        /**
4323         * Get the size of the
4324         * <a href="OverlayMask.html#config_target">target</a>. Used to dimension
4325         * the mask node.
4326         *
4327         * @method getTargetSize
4328         * @return {Object} Object containing the { height: height, width: width }.
4329         */
4330        getTargetSize: function() {
4331            var instance = this;
4332            var target = instance.get(TARGET);
4333
4334            var isDoc = instance._isDoc;
4335            var isWin = instance._isWin;
4336
4337            var height = target.get(OFFSET_HEIGHT);
4338            var width = target.get(OFFSET_WIDTH);
4339
4340            if (IE6) {
4341                // IE6 doesn't support height/width 100% on doc/win
4342                if (isWin) {
4343                    width = A.DOM.winWidth();
4344                    height = A.DOM.winHeight();
4345                }
4346                else if (isDoc) {
4347                    width = A.DOM.docWidth();
4348                    height = A.DOM.docHeight();
4349                }
4350            }
4351            // good browsers...
4352            else if (instance._fullPage) {
4353                height = '100%';
4354                width = '100%';
4355            }
4356
4357            return {
4358                height: height,
4359                width: width
4360            };
4361        },
4362
4363        /**
4364         * Repaint the OverlayMask UI, respecting the
4365         * <a href="OverlayMask.html#config_target">target</a> size and the
4366         * <a href="OverlayMask.html#config_alignPoints">alignPoints</a>.
4367         *
4368         * @method refreshMask
4369         */
4370        refreshMask: function() {
4371            var instance = this;
4372            var alignPoints = instance.get(ALIGN_POINTS);
4373            var target = instance.get(TARGET);
4374            var boundingBox = instance.get(BOUNDING_BOX);
4375            var targetSize = instance.getTargetSize();
4376
4377            var fullPage = instance._fullPage;
4378
4379            boundingBox.setStyles({
4380                position: (IE6 || !fullPage) ? ABSOLUTE : FIXED,
4381                left: 0,
4382                top: 0
4383            });
4384
4385            var height = targetSize.height;
4386            var width = targetSize.width;
4387
4388            if (isValue(height)) {
4389                instance.set(HEIGHT, height);
4390            }
4391
4392            if (isValue(width)) {
4393                instance.set(WIDTH, width);
4394            }
4395
4396            // if its not a full mask...
4397            if (!fullPage) {
4398                // if the target is not document|window align the overlay
4399                instance.align(target, alignPoints);
4400            }
4401        },
4402
4403        /**
4404         * Setter for <a href="Paginator.html#config_opacity">opacity</a>.
4405         *
4406         * @method _setOpacity
4407         * @protected
4408         * @param {Number} v
4409         * @return {Number}
4410         */
4411        _setOpacity: function(v) {
4412            var instance = this;
4413
4414            instance.get(CONTENT_BOX).setStyle(OPACITY, v);
4415
4416            return v;
4417        },
4418
4419        /**
4420         * Invoke the <code>OverlayMask.superclass._uiSetVisible</code>. Used to
4421         * reset the <code>opacity</code> to work around IE bugs when set opacity
4422         * of hidden elements.
4423         *
4424         * @method _uiSetVisible
4425         * @param {boolean} val
4426         * @protected
4427         */
4428        _uiSetVisible: function(val) {
4429            var instance = this;
4430
4431            OverlayMask.superclass._uiSetVisible.apply(this, arguments);
4432
4433            if (val) {
4434                instance._setOpacity(
4435                    instance.get(OPACITY)
4436                );
4437            }
4438        },
4439
4440        /**
4441         * Fires after the value of the
4442         * <a href="Paginator.html#config_target">target</a> attribute change.
4443         *
4444         * @method _afterTargetChange
4445         * @param {EventFacade} event
4446         * @protected
4447         */
4448        _afterTargetChange: function(event) {
4449            var instance = this;
4450
4451            instance.refreshMask();
4452        },
4453
4454        /**
4455         * Fires after the value of the
4456         * <a href="Paginator.html#config_visible">visible</a> attribute change.
4457         *
4458         * @method _afterVisibleChange
4459         * @param {EventFacade} event
4460         * @protected
4461         */
4462        _afterVisibleChange: function(event) {
4463            var instance = this;
4464
4465            instance._uiSetVisible(event.newVal);
4466        },
4467
4468        /**
4469         * UI Setter for the
4470         * <a href="Paginator.html#config_xy">XY</a> attribute.
4471         *
4472         * @method _uiSetXY
4473         * @param {EventFacade} event
4474         * @protected
4475         */
4476        _uiSetXY: function() {
4477            var instance = this;
4478
4479            if (!instance._fullPage || IE6) {
4480                OverlayMask.superclass._uiSetXY.apply(instance, arguments);
4481            }
4482        }
4483    }
4484});
4485
4486A.OverlayMask = OverlayMask;
4487
4488
4489}, '3.1.0-deprecated.77', {"requires": ["event-resize", "aui-base-deprecated", "aui-overlay-base-deprecated"], "skinnable": true});
4490
4491YUI.add('aui-parse-content', function (A, NAME) {
4492
4493/**
4494 * The ParseContent Utility - Parse the content of a Node so that all of the
4495 * javascript contained in that Node will be executed according to the order
4496 * that it appears.
4497 *
4498 * @module aui-parse-content
4499 */
4500
4501/*
4502 * NOTE: The inspiration of ParseContent cames from the "Caridy Patino" Node
4503 *       Dispatcher Plugin http://github.com/caridy/yui3-gallery/blob/master/src
4504 *       /gallery-dispatcher/
4505 */
4506
4507var L = A.Lang,
4508    isString = L.isString,
4509
4510    DOC = A.config.doc,
4511    PADDING_NODE = '<div>_</div>',
4512
4513    SCRIPT_TYPES = {
4514        '': 1,
4515        'text/javascript': 1,
4516        'text/parsed': 1
4517    };
4518
4519/**
4520 * A base class for ParseContent, providing:
4521 *
4522 * - After plug ParseContent on a A.Node instance the javascript chunks will be
4523 *   executed (remote and inline scripts)
4524 * - All the javascripts within a content will be executed according to the
4525 *   order of apparition
4526 *
4527 * **NOTE:** For performance reasons on DOM manipulation,
4528 * ParseContent only parses the content passed to the
4529 * [setContent](Node.html#method_setContent),
4530 * [prepend](Node.html#method_prepend) and
4531 * [append](Node.html#method_append) methods.
4532 *
4533 * Quick Example:
4534 *
4535 * ```
4536 * node.plug(A.Plugin.ParseContent);
4537 * ```
4538 *
4539 * @class A.ParseContent
4540 * @extends Plugin.Base
4541 * @param {Object} config Object literal specifying widget configuration
4542 *     properties.
4543 * @constructor
4544 */
4545var ParseContent = A.Component.create({
4546    /**
4547     * Static property provides a string to identify the class.
4548     *
4549     * @property NAME
4550     * @type String
4551     * @static
4552     */
4553    NAME: 'ParseContent',
4554
4555    /**
4556     * Static property provides a string to identify the namespace.
4557     *
4558     * @property NS
4559     * @type String
4560     * @static
4561     */
4562    NS: 'ParseContent',
4563
4564    /**
4565     * Static property used to define the default attribute
4566     * configuration for the ParseContent.
4567     *
4568     * @property ATTRS
4569     * @type Object
4570     * @static
4571     */
4572    ATTRS: {
4573        /**
4574         * A queue of elements to be parsed.
4575         *
4576         * @attribute queue
4577         * @default null
4578         */
4579        queue: {
4580            value: null
4581        },
4582
4583        /**
4584         * When true, script nodes will not be removed from original content,
4585         * instead the script type attribute will be set to `text/plain`.
4586         *
4587         * @attribute preserveScriptNodes
4588         * @default false
4589         */
4590        preserveScriptNodes: {
4591            validator: L.isBoolean,
4592            value: false
4593        }
4594    },
4595
4596    /**
4597     * Static property used to define which component it extends.
4598     *
4599     * @property EXTENDS
4600     * @type Object
4601     * @static
4602     */
4603    EXTENDS: A.Plugin.Base,
4604
4605    prototype: {
4606
4607        /**
4608         * Construction logic executed during ParseContent instantiation.
4609         * Lifecycle.
4610         *
4611         * @method initializer
4612         * @protected
4613         */
4614        initializer: function() {
4615            var instance = this;
4616
4617            ParseContent.superclass.initializer.apply(this, arguments);
4618
4619            instance.set(
4620                'queue',
4621                new A.AsyncQueue()
4622            );
4623
4624            instance._bindAOP();
4625        },
4626
4627        /**
4628         * Global eval the <data>data</data> passed.
4629         *
4630         * @method globalEval
4631         * @param {String} data JavaScript String.
4632         */
4633        globalEval: function(data) {
4634            var doc = A.getDoc();
4635            var head = doc.one('head') || doc.get('documentElement');
4636
4637            // NOTE: A.Node.create('<script></script>') doesn't work correctly
4638            // on Opera
4639            var newScript = DOC.createElement('script');
4640
4641            newScript.type = 'text/javascript';
4642
4643            if (data) {
4644                // NOTE: newScript.set(TEXT, data) breaks on IE, YUI BUG.
4645                newScript.text = L.trim(data);
4646            }
4647
4648            //removes the script node immediately after executing it
4649            head.appendChild(newScript).remove();
4650        },
4651
4652        /**
4653         * Extract the `script` tags from the string content and
4654         * evaluate the chunks.
4655         *
4656         * @method parseContent
4657         * @param {String} content HTML string
4658         * @return {String}
4659         */
4660        parseContent: function(content) {
4661            var instance = this;
4662
4663            var output = instance._extractScripts(content);
4664
4665            instance._dispatch(output);
4666
4667            return output;
4668        },
4669
4670        /**
4671         * Add inline script data to the queue.
4672         *
4673         * @method _addInlineScript
4674         * @param {String} data The script content which should be added to the
4675         *     queue
4676         * @protected
4677         */
4678        _addInlineScript: function(data) {
4679            var instance = this;
4680
4681            instance.get('queue').add({
4682                args: data,
4683                context: instance,
4684                fn: instance.globalEval,
4685                timeout: 0
4686            });
4687        },
4688
4689        /**
4690         * Bind listeners on the `insert` and `setContent` methods of the Node
4691         * instance where you are plugging the ParseContent. These listeners are
4692         * responsible for intercept the HTML passed and parse them.
4693         *
4694         * @method _bindAOP
4695         * @protected
4696         */
4697        _bindAOP: function() {
4698            var instance = this;
4699
4700            var cleanFirstArg = function(content) {
4701                var args = Array.prototype.slice.call(arguments);
4702                var output = instance.parseContent(content);
4703
4704                // replace the first argument with the clean fragment
4705                args.splice(0, 1, output.fragment);
4706
4707                return new A.Do.AlterArgs(null, args);
4708            };
4709
4710            this.doBefore('insert', cleanFirstArg);
4711            this.doBefore('replaceChild', cleanFirstArg);
4712
4713            var cleanArgs = function(content) {
4714                var output = instance.parseContent(content);
4715
4716                return new A.Do.AlterArgs(null, [output.fragment]);
4717            };
4718
4719            this.doBefore('replace', cleanArgs);
4720            this.doBefore('setContent', cleanArgs);
4721        },
4722
4723        /**
4724         * Create an HTML fragment with the String passed, extract all the
4725         * script tags and return an Object with a reference for the extracted
4726         * scripts and the fragment.
4727         *
4728         * @method clean
4729         * @param {String} content HTML content.
4730         * @protected
4731         * @return {Object}
4732         */
4733        _extractScripts: function(content) {
4734            var instance = this,
4735                fragment = A.Node.create('<div></div>'),
4736                output = {},
4737                preserveScriptNodes = instance.get('preserveScriptNodes');
4738
4739            // For PADDING_NODE, instead of fixing all tags in the content to be
4740            // "XHTML"-style, we make the firstChild be a valid non-empty tag,
4741            // then we remove it later
4742
4743            if (isString(content)) {
4744                content = PADDING_NODE + content;
4745
4746                // create fragment from {String}
4747                A.DOM.addHTML(fragment, content, 'append');
4748            }
4749            else {
4750                fragment.append(PADDING_NODE);
4751
4752                // create fragment from {Y.Node | HTMLElement}
4753                fragment.append(content);
4754            }
4755
4756            output.js = fragment.all('script').filter(function(script) {
4757                var includeScript = SCRIPT_TYPES[script.getAttribute('type').toLowerCase()];
4758                if (preserveScriptNodes) {
4759                    script.setAttribute('type', 'text/parsed');
4760                }
4761                return includeScript;
4762            });
4763
4764            if (!preserveScriptNodes) {
4765                output.js.each(
4766                    function(node) {
4767                        node.remove();
4768                    }
4769                );
4770            }
4771
4772            // remove PADDING_NODE
4773            fragment.get('firstChild').remove();
4774
4775            output.fragment = fragment.get('childNodes').toFrag();
4776
4777            return output;
4778        },
4779
4780        /**
4781         * Loop trough all extracted `script` tags and evaluate them.
4782         *
4783         * @method _dispatch
4784         * @param {Object} output Object containing the reference for the
4785         *     fragment and the extracted `script` tags.
4786         * @protected
4787         * @return {String}
4788         */
4789        _dispatch: function(output) {
4790            var instance = this;
4791
4792            var queue = instance.get('queue');
4793
4794            var scriptContent = [];
4795
4796            output.js.each(function(node) {
4797                var src = node.get('src');
4798
4799                if (src) {
4800                    if (scriptContent.length) {
4801                        instance._addInlineScript(scriptContent.join(';'));
4802
4803                        scriptContent.length = 0;
4804                    }
4805
4806                    queue.add({
4807                        autoContinue: false,
4808                        fn: function() {
4809                            A.Get.script(src, {
4810                                onEnd: function(o) {
4811                                    //removes the script node immediately after
4812                                    //executing it
4813                                    o.purge();
4814                                    queue.run();
4815                                }
4816                            });
4817                        },
4818                        timeout: 0
4819                    });
4820                }
4821                else {
4822                    var dom = node._node;
4823
4824                    scriptContent.push(dom.text || dom.textContent || dom.innerHTML || '');
4825                }
4826            });
4827
4828            if (scriptContent.length) {
4829                instance._addInlineScript(scriptContent.join(';'));
4830            }
4831
4832            queue.run();
4833        }
4834    }
4835});
4836
4837A.namespace('Plugin').ParseContent = ParseContent;
4838
4839
4840}, '3.1.0-deprecated.77', {"requires": ["async-queue", "plugin", "io-base", "aui-component", "aui-node-base"]});
4841
4842function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
4843
4844function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); }
4844 else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
4845
4846function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
4847
4848/**
4849 * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
4850 *
4851 * This library is free software; you can redistribute it and/or modify it under
4852 * the terms of the GNU Lesser General Public License as published by the Free
4853 * Software Foundation; either version 2.1 of the License, or (at your option)
4854 * any later version.
4855 *
4856 * This library is distributed in the hope that it will be useful, but WITHOUT
4857 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
4858 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
4859 * details.
4860 */
4861AUI.add('liferay-session', function (A) {
4862  var Lang = A.Lang;
4863  var BUFFER_TIME = [];
4864  var CONFIG = A.config;
4865  var DOC = CONFIG.doc;
4866  var MAP_SESSION_STATE_EVENTS = {
4867    active: 'activated'
4868  };
4869  var SRC = {};
4870  var SRC_EVENT_OBJ = {
4871    src: SRC
4872  };
4873  var URL_BASE = themeDisplay.getPathMain() + '/portal/';
4874  var SessionBase = A.Component.create({
4875    ATTRS: {
4876      autoExtend: {
4877        value: false
4878      },
4879      redirectOnExpire: {
4880        value: true
4881      },
4882      redirectUrl: {
4883        value: ''
4884      },
4885      sessionLength: {
4886        getter: '_getLengthInMillis',
4887        value: 0
4888      },
4889      sessionState: {
4890        value: 'active'
4891      },
4892      timestamp: {
4893        getter: '_getTimestamp',
4894        setter: '_setTimestamp',
4895        value: 0
4896      },
4897      warningLength: {
4898        getter: '_getLengthInMillis',
4899        setter: '_setWarningLength',
4900        value: 0
4901      },
4902      warningTime: {
4903        getter: '_getWarningTime',
4904        value: 0
4905      }
4906    },
4907    EXTENDS: A.Base,
4908    NAME: 'liferaysession',
4909    prototype: {
4910      _afterSessionStateChange: function _afterSessionStateChange(event) {
4911        var instance = this;
4912        var details = event.details;
4913        var newVal = event.newVal;
4914        var src = null;
4915
4916        if ('src' in event && details.length) {
4917          src = details[0];
4918        }
4919
4920        instance.fire(MAP_SESSION_STATE_EVENTS[newVal] || newVal, src);
4921      },
4922      _defActivatedFn: function _defActivatedFn(event) {
4923        var instance = this;
4924        instance.set('timestamp');
4925
4926        if (event.src == SRC) {
4927          Liferay.Util.fetch(URL_BASE + 'extend_session');
4928        }
4929      },
4930      _defExpiredFn: function _defExpiredFn(event) {
4931        var instance = this;
4932        A.clearInterval(instance._intervalId);
4933        instance.set('timestamp', 'expired');
4934
4935        if (event.src === SRC) {
4936          instance._expireSession();
4937        }
4938      },
4939      _expireSession: function _expireSession() {
4940        var instance = this;
4941        Liferay.Util.fetch(URL_BASE + 'expire_session').then(function (response) {
4942          if (response.ok) {
4943            Liferay.fire('sessionExpired');
4944
4945            if (instance.get('redirectOnExpire')) {
4946              location.href = instance.get('redirectUrl');
4947            }
4948          } else {
4949            A.setTimeout(function () {
4950              instance._expireSession();
4951            }, 1000);
4952          }
4953        });
4954      },
4955      _getLengthInMillis: function _getLengthInMillis(value) {
4956        return value * 1000;
4957      },
4958      _getTimestamp: function _getTimestamp() {
4959        var instance = this;
4960        return A.Cookie.get(instance._cookieKey, instance._cookieOptions) || instance._initTimestamp;
4961      },
4962      _getWarningTime: function _getWarningTime() {
4963        var instance = this;
4964        return instance.get('sessionLength') - instance.get('warningLength');
4965      },
4966      _initEvents: function _initEvents() {
4967        var instance = this;
4968        instance.publish('activated', {
4969          defaultFn: A.bind('_defActivatedFn', instance)
4970        });
4971        instance.publish('expired', {
4972          defaultFn: A.bind('_defExpiredFn', instance)
4973        });
4974        instance.publish('warned');
4975        instance._eventHandlers = [instance.on('sessionStateChange', instance._onSessionStateChange), instance.after('sessionStateChange', instance._afterSessionStateChange), A.on('io:complete', function (transactionId, response, args) {
4976          if (!args || args && args.sessionExtend || !Lang.isBoolean(args.sessionExtend)) {
4977            instance.resetInterval();
4978          }
4979        }), Liferay.once('screenLoad', function () {
4980          instance.destroy();
4981        })];
4982      },
4983      _onSessionStateChange: function _onSessionStateChange(event) {
4984        var instance = this;
4985        var newVal = event.newVal;
4986        var prevVal = event.prevVal;
4987
4988        if (prevVal == 'expired' && prevVal != newVal) {
4989          event.preventDefault();
4990        } else if (prevVal == 'active' && prevVal == newVal) {
4991          instance._afterSessionStateChange(event);
4992        }
4993      },
4994      _setTimestamp: function _setTimestamp(value) {
4995        var instance = this;
4996        value = String(value || Date.now());
4997        instance._initTimestamp = value;
4998
4999        if (navigator.cookieEnabled) {
5000          A.Cookie.set(instance._cookieKey, value, instance._cookieOptions);
5001        }
5002      },
5003      _setWarningLength: function _setWarningLength(value) {
5004        var instance = this;
5005        return Math.min(instance.get('sessionLength'), value);
5006      },
5007      _startTimer: function _startTimer() {
5008        var instance = this;
5009        var sessionLength = instance.get('sessionLength');
5010        var warningTime = instance.get('warningTime');
5011        var registered = instance._registered;
5012        var interval = 1000;
5013        instance._intervalId = A.setInterval(function () {
5014          var sessionState = instance.get('sessionState');
5015          var timeOffset;
5016          var timestamp = instance.get('timestamp');
5017          var elapsed = sessionLength;
5018
5019          if (Lang.toInt(timestamp)) {
5020            timeOffset = Math.floor((Date.now() - timestamp) / 1000) * 1000;
5021            elapsed = timeOffset;
5022
5023            if (instance._initTimestamp !== timestamp) {
5024              instance.set('timestamp', timestamp);
5025
5026              if (sessionState != 'active') {
5027                instance.set('sessionState', 'active', SRC_EVENT_OBJ);
5028              }
5029            }
5030          } else {
5031            timestamp = 'expired';
5032          }
5033
5034          var extend = instance.get('autoExtend');
5035          var expirationMoment = false;
5036          var warningMoment = false;
5037          var hasExpired = elapsed >= sessionLength;
5038          var hasWarned = elapsed >= warningTime;
5039
5040          if (hasWarned) {
5041            if (timestamp == 'expired') {
5042              expirationMoment = true;
5043              extend = false;
5044              hasExpired = true;
5045            }
5046
5047            if (hasExpired && sessionState != 'expired') {
5048              if (extend) {
5049                expirationMoment = false;
5050                hasExpired = false;
5051                hasWarned = false;
5052                warningMoment = false;
5053                instance.extend();
5054              } else {
5055                instance.expire();
5056                expirationMoment = true;
5057              }
5058            } else if (hasWarned && !hasExpired && !extend && sessionState != 'warned') {
5059              instance.warn();
5060              warningMoment = true;
5061            }
5062          }
5063
5064          for (var i in registered) {
5065            registered[i](elapsed, interval, hasWarned, hasExpired, warningMoment, expirationMoment);
5066          }
5067        }, interval);
5068      },
5069      _stopTimer: function _stopTimer() {
5070        var instance = this;
5071        A.clearInterval(instance._intervalId);
5072      },
5073      destructor: function destructor() {
5074        var instance = this;
5075        new A.EventHandle(instance._eventHandlers).detach();
5076
5077        instance._stopTimer();
5078      },
5079      expire: function expire() {
5080        var instance = this;
5081        instance.set('sessionState', 'expired', SRC_EVENT_OBJ);
5082      },
5083      extend: function extend() {
5084        var instance = this;
5085        instance.set('sessionState', 'active', SRC_EVENT_OBJ);
5086      },
5087      initializer: function initializer() {
5088        var instance = this;
5089        instance._cookieKey = 'LFR_SESSION_STATE_' + themeDisplay.getUserId();
5090        instance._cookieOptions = {
5091          path: '/',
5092          secure: A.UA.secure
5093        };
5094        instance._registered = {};
5095        instance.set('timestamp');
5096
5097        instance._initEvents();
5098
5099        instance._startTimer();
5100      },
5101      registerInterval: function registerInterval(fn) {
5102        var instance = this;
5103        var fnId;
5104        var registered = instance._registered;
5105
5106        if (Lang.isFunction(fn)) {
5107          fnId = A.stamp(fn);
5108          registered[fnId] = fn;
5109        }
5110
5111        return fnId;
5112      },
5113      resetInterval: function resetInterval() {
5114        var instance = this;
5115
5116        instance._stopTimer();
5117
5118        instance._startTimer();
5119      },
5120      unregisterInterval: function unregisterInterval(fnId) {
5121        var instance = this;
5122        var registered = instance._registered;
5123
5124        if (Object.prototype.hasOwnProperty.call(registered, fnId)) {
5125          delete registered[fnId];
5126        }
5127
5128        return fnId;
5129      },
5130      warn: function warn() {
5131        var instance = this;
5132        instance.set('sessionState', 'warned', SRC_EVENT_OBJ);
5133      }
5134    }
5135  });
5136  SessionBase.SRC = SRC;
5137  var SessionDisplay = A.Component.create({
5138    ATTRS: {
5139      openToast: {
5140        validator: Lang.isFunction
5141      },
5142      pageTitle: {
5143        value: DOC.title
5144      }
5145    },
5146    EXTENDS: A.Plugin.Base,
5147    NAME: 'liferaysessiondisplay',
5148    NS: 'display',
5149    prototype: {
5150      _afterDefActivatedFn: function _afterDefActivatedFn() {
5151        var instance = this;
5152
5153        instance._uiSetActivated();
5154      },
5155      _afterDefExpiredFn: function _afterDefExpiredFn() {
5156        var instance = this;
5157
5158        instance._host.unregisterInterval(instance._intervalId);
5159
5160        instance._uiSetExpired();
5161      },
5162      _beforeHostWarned: function _beforeHostWarned() {
5163        var instance = this;
5164        var host = instance._host;
5165        var sessionLength = host.get('sessionLength');
5166        var timestamp = host.get('timestamp');
5167        var warningLength = host.get('warningLength');
5168        var elapsed = sessionLength;
5169
5170        if (Lang.toInt(timestamp)) {
5171          elapsed = Math.floor((Date.now() - timestamp) / 1000) * 1000;
5172        }
5173
5174        var remainingTime = sessionLength - elapsed;
5175
5176        if (remainingTime > warningLength) {
5177          remainingTime = warningLength;
5178        }
5179
5180        var banner = instance._getBanner();
5181
5182        var counterTextNode = banner.one('.countdown-timer').getDOMNode();
5183
5184        instance._uiSetRemainingTime(remainingTime, counterTextNode);
5185
5186        banner.show();
5187        instance._intervalId = host.registerInterval(function (elapsed, interval, hasWarned, hasExpired, warningMoment) {
5188          if (!hasWarned) {
5189            instance._uiSetActivated();
5190          } else if (!hasExpired) {
5191            if (warningMoment) {
5192              if (remainingTime <= 0) {
5193                remainingTime = warningLength;
5194              }
5195
5196              banner.show();
5197            }
5198
5199            elapsed = Math.floor((Date.now() - timestamp) / 1000) * 1000;
5200            remainingTime = sessionLength - elapsed;
5201
5202            instance._uiSetRemainingTime(remainingTime, counterTextNode);
5203          }
5204
5205          remainingTime -= interval;
5206        });
5207      },
5208      _destroyBanner: function _destroyBanner() {
5209        var instance = this;
5210
5211        if (Lang.isFunction(instance._banner.destroy)) {
5212          instance._banner.destroy();
5213        }
5214
5215        instance._banner = false;
5216      },
5217      _formatNumber: function _formatNumber(value) {
5218        return Lang.String.padNumber(Math.floor(value), 2);
5219      },
5220      _formatTime: function _formatTime(time) {
5221        var instance = this;
5222        time = Number(time);
5223
5224        if (Lang.isNumber(time) && time > 0) {
5225          time /= 1000;
5226          BUFFER_TIME[0] = instance._formatNumber(time / 3600);
5227          time %= 3600;
5228          BUFFER_TIME[1] = instance._formatNumber(time / 60);
5229          time %= 60;
5230          BUFFER_TIME[2] = instance._formatNumber(time);
5231          time = BUFFER_TIME.join(':');
5232        } else {
5233          time = 0;
5234        }
5235
5236        return time;
5237      },
5238      _getBanner: function _getBanner() {
5239        var instance = this;
5240        var banner = instance._banner;
5241
5242        if (!banner) {
5243          var openToast = instance.get('openToast');
5244          var toastId = 'sessionToast';
5245          var toastDefaultConfig = {
5246            onClick: function onClick(_ref) {
5247              var event = _ref.event;
5248
5249              if (event.target.classList.contains('alert-link')) {
5250                instance._host.extend();
5251              }
5252            },
5253            onClose: function onClose(_ref2) {
5254              var event = _ref2.event;
5255              event.preventDefault();
5256              A.one("#".concat(toastId)).toggleClass('hide', true);
5257            },
5258            renderData: {
5259              componentId: toastId
5260            },
5261            toastProps: {
5262              autoClose: false,
5263              id: toastId,
5264              role: 'alert'
5265            }
5266          };
5267          openToast(_objectSpread({
5268            message: instance._warningText,
5269            type: 'warning'
5270          }, toastDefaultConfig));
5271          var toastComponent = Liferay.component(toastId);
5272          banner = _objectSpread({
5273            one: A.one("#".concat(toastId)).one,
5274            setAttrs: function setAttrs(attrs) {
5275              toastComponent.destroy();
5276              openToast(_objectSpread({}, attrs, {}, toastDefaultConfig));
5277            },
5278            show: function show() {
5279              A.one("#".concat(toastId)).toggleClass('hide', false);
5280            }
5281          }, toastComponent);
5282          instance._banner = banner;
5283        }
5284
5285        return banner;
5286      },
5287      _onHostSessionStateChange: function _onHostSessionStateChange(event) {
5288        var instance = this;
5289
5290        if (event.newVal == 'warned') {
5291          instance._beforeHostWarned(event);
5292        }
5293      },
5294      _uiSetActivated: function _uiSetActivated() {
5295        var instance = this;
5296        DOC.title = instance.reset('pageTitle').get('pageTitle');
5297
5298        instance._host.unregisterInterval(instance._intervalId);
5299
5300        var banner = instance._getBanner();
5301
5302        if (banner) {
5303          instance._destroyBanner();
5304        }
5305      },
5306      _uiSetExpired: function _uiSetExpired() {
5307        var instance = this;
5308
5309        var banner = instance._getBanner();
5310
5311        banner.setAttrs({
5312          message: instance._expiredText,
5313          title: 'Attenzione',
5314          type: 'danger'
5315        });
5316        DOC.title = instance.get('pageTitle');
5317      },
5318      _uiSetRemainingTime: function _uiSetRemainingTime(remainingTime, counterTextNode) {
5319        var instance = this;
5320        remainingTime = instance._formatTime(remainingTime);
5321
5322        if (!instance._alertClosed) {
5323          var alert = counterTextNode.closest('div[role="alert"]'); // Prevent screen reader from rereading alert
5324
5325          if (alert) {
5326            alert.removeAttribute('role');
5327            instance._alert = alert;
5328          }
5329
5330          counterTextNode.innerHTML = remainingTime;
5331        }
5332
5333        DOC.title = Lang.sub('La\x20sessione\x20scadra\x20tra\x20\x7b0\x7d\x2e', [remainingTime]) + ' | ' + instance.get('pageTitle');
5334      },
5335      destructor: function destructor() {
5336        var instance = this;
5337
5338        if (instance._banner) {
5339          instance._destroyBanner();
5340        }
5341      },
5342      initializer: function initializer() {
5343        var instance = this;
5344        var host = instance.get('host');
5345
5346        if (Liferay.Util.getTop() == CONFIG.win) {
5347          instance._host = host;
5348          instance._toggleText = {
5349            hide: 'Nascondi',
5350            show: 'Mostra'
5351          };
5352          instance._expiredText = 'A\x20causa\x20di\x20inattività\x2c\x20la\x20sessione\x20è\x20scaduta\x2e\x20Prima\x20di\x20aggiornare\x20la\x20pagina\x20si\x20prega\x20di\x20salvare\x20tutti\x20i\x20dati\x20immessi\x2e';
5353          instance._warningText = 'A\x20causa\x20di\x20inattività\x2c\x20la\x20sessione\x20scadrà\x20tra\x20\x7b0\x7d\x20minuti\x2e\x20Per\x20estendere\x20la\x20sessione\x20di\x20altri\x20\x7b1\x7d\x20minuto\x2fi\x2c\x20premere\x20il\x20tasto\x20\x3c\x2fem\x3eEstendi\x3cem\x3e\x2e\x20\x7b2\x7d';
5354          instance._warningText = Lang.sub(instance._warningText, ['<span class="countdown-timer">{0}</span>', host.get('sessionLength') / 60000, '<a class="alert-link" href="javascript:;">' + 'Estendi' + '</a>']);
5355          host.on('sessionStateChange', instance._onHostSessionStateChange, instance);
5356          instance.afterHostMethod('_defActivatedFn', instance._afterDefActivatedFn);
5357          instance.afterHostMethod('_defExpiredFn', instance._afterDefExpiredFn);
5358        } else {
5359          host.unplug(instance);
5360        }
5361      }
5362    }
5363  });
5364  Liferay.SessionBase = SessionBase;
5365  Liferay.SessionDisplay = SessionDisplay;
5366}, '', {
5367  requires: ['aui-base', 'aui-component', 'aui-timer', 'cookie', 'plugin']
5368});
5369//# sourceMappingURL=session.js.map
5370/**
5371 * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
5372 *
5373 * This library is free software; you can redistribute it and/or modify it under
5374 * the terms of the GNU Lesser General Public License as published by the Free
5375 * Software Foundation; either version 2.1 of the License, or (at your option)
5376 * any later version.
5377 *
5378 * This library is distributed in the hope that it will be useful, but WITHOUT
5379 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
5380 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
5381 * details.
5382 */
5383// For details about this file see: LPS-2155
5384(function (A, Liferay) {
5385  var Util = Liferay.Util;
5386  var Lang = A.Lang;
5387  var AObject = A.Object;
5388  var htmlEscapedValues = [];
5389  var htmlUnescapedValues = [];
5390  var MAP_HTML_CHARS_ESCAPED = {
5391    '"': '&#034;',
5392    '&': '&amp;',
5393    "'": '&#039;',
5394    '/': '&#047;',
5395    '<': '&lt;',
5396    '>': '&gt;',
5397    '`': '&#096;'
5398  };
5399  var MAP_HTML_CHARS_UNESCAPED = {};
5400  AObject.each(MAP_HTML_CHARS_ESCAPED, function (item, index) {
5401    MAP_HTML_CHARS_UNESCAPED[item] = index;
5402    htmlEscapedValues.push(item);
5403    htmlUnescapedValues.push(index);
5404  });
5405  var REGEX_DASH = /-([a-z])/gi;
5406  var STR_RIGHT_SQUARE_BRACKET = ']';
5407  /**
5408   * @deprecated As of Athanasius (7.3.x), with no direct replacement
5409   */
5410
5411  Util.actsAsAspect = function (object) {
5412    object["yield"] = null;
5413    object.rv = {};
5414
5415    object.before = function (method, f) {
5416      var original = eval('this.' + method);
5417
5418      this[method] = function () {
5419        f.apply(this, arguments);
5420        return original.apply(this, arguments);
5421      };
5422    };
5423
5424    object.after = function (method, f) {
5425      var original = eval('this.' + method);
5426
5427      this[method] = function () {
5428        this.rv[method] = original.apply(this, arguments);
5429        return f.apply(this, arguments);
5430      };
5431    };
5432
5433    object.around = function (method, f) {
5434      var original = eval('this.' + method);
5435
5436      this[method] = function () {
5437        this["yield"] = original;
5438        return f.apply(this, arguments);
5439      };
5440    };
5441  };
5442  /**
5443   * @deprecated As of Athanasius (7.3.x), with no direct replacement
5444   */
5445
5446
5447  Util.addInputFocus = function () {
5448    A.use('aui-base', function (A) {
5449      var handleFocus = function handleFocus(event) {
5450        var target = event.target;
5451        var tagName = target.get('tagName');
5452
5453        if (tagName) {
5454          tagName = tagName.toLowerCase();
5455        }
5456
5457        var nodeType = target.get('type');
5458
5459        if (tagName == 'input' && /text|password/.test(nodeType) || tagName == 'textarea') {
5460          var action = 'addClass';
5461
5462          if (/blur|focusout/.test(event.type)) {
5463            action = 'removeClass';
5464          }
5465
5466          target[action]('focus');
5467        }
5468      };
5469
5470      A.on('focus', handleFocus, document);
5471      A.on('blur', handleFocus, document);
5472    });
5473
5474    Util.addInputFocus = function () {};
5475  };
5476  /**
5477   * @deprecated As of Athanasius (7.3.x), with no direct replacement
5478   */
5479
5480
5481  Util.addInputType = function (el) {
5482    Util.addInputType = Lang.emptyFn;
5483
5484    if (Liferay.Browser.isIe() && Liferay.Browser.getMajorVersion() < 7) {
5485      Util.addInputType = function (el) {
5486        if (el) {
5487          el = A.one(el);
5488        } else {
5489          el = A.one(document.body);
5490        }
5491
5492        var defaultType = 'text';
5493        el.all('input').each(function (item) {
5494          var type = item.get('type') || defaultType;
5495          item.addClass(type);
5496        });
5497      };
5498    }
5499
5500    return Util.addInputType(el);
5501  };
5502  /**
5503   * @deprecated As of Athanasius (7.3.x), with no direct replacement
5504   */
5505
5506
5507  Util.camelize = function (value, separator) {
5508    var regex = REGEX_DASH;
5509
5510    if (separator) {
5511      regex = new RegExp(separator + '([a-z])', 'gi');
5512    }
5513
5514    value = value.replace(regex, function (match0, match1) {
5515      return match1.toUpperCase();
5516    });
5517    return value;
5518  };
5519  /**
5520   * @deprecated As of Athanasius (7.3.x), with no direct replacement
5521   */
5522
5523
5524  Util.clamp = function (value, min, max) {
5525    return Math.min(Math.max(value, min), max);
5526  };
5527  /**
5528   * @deprecated As of Athanasius (7.3.x), with no direct replacement
5529   */
5530
5531
5532  Util.isEditorPresent = function (editorName) {
5533    return Liferay.EDITORS && Liferay.EDITORS[editorName];
5534  };
5535  /**
5536   * @deprecated As of Athanasius (7.3.x), with no direct replacement
5537   */
5538
5539
5540  Util.randomMinMax = function (min, max) {
5541    return Math.round(Math.random() * (max - min)) + min;
5542  };
5543  /**
5544   * @deprecated As of Athanasius (7.3.x), with no direct replacement
5545   */
5546
5547
5548  Util.selectAndCopy = function (el) {
5549    el.focus();
5550    el.select();
5551
5552    if (document.all) {
5553      var textRange = el.createTextRange();
5554      textRange.execCommand('copy');
5555    }
5556  };
5557  /**
5558   * @deprecated As of Athanasius (7.3.x), with no direct replacement
5559   */
5560
5561
5562  Util.setBox = function (oldBox, newBox) {
5563    for (var i = oldBox.length - 1; i > -1; i--) {
5564      oldBox.options[i] = null;
5565    }
5566
5567    for (i = 0; i < newBox.length; i++) {
5568      oldBox.options[i] = new Option(newBox[i].value, i);
5569    }
5570
5571    oldBox.options[0].selected = true;
5572  };
5573  /**
5574   * @deprecated As of Athanasius (7.3.x), with no direct replacement
5575   */
5576
5577
5578  Util.startsWith = function (str, x) {
5579    return str.indexOf(x) === 0;
5580  };
5581  /**
5582   * @deprecated As of Athanasius (7.3.x), with no direct replacement
5583   */
5584
5585
5586  Util.textareaTabs = function (event) {
5587    var el = event.currentTarget.getDOM();
5588
5589    if (event.isKey('TAB')) {
5590      event.halt();
5591      var oldscroll = el.scrollTop;
5592
5593      if (el.setSelectionRange) {
5594        var caretPos = el.selectionStart + 1;
5595        var elValue = el.value;
5596        el.value = elValue.substring(0, el.selectionStart) + '\t' + elValue.substring(el.selectionEnd, elValue.length);
5597        setTimeout(function () {
5598          el.focus();
5599          el.setSelectionRange(caretPos, caretPos);
5600        }, 0);
5601      } else {
5602        document.selection.createRange().text = '\t';
5603      }
5604
5605      el.scrollTop = oldscroll;
5606      return false;
5607    }
5608  };
5609  /**
5610   * @deprecated As of Athanasius (7.3.x), with no direct replacement
5611   */
5612
5613
5614  Util.uncamelize = function (value, separator) {
5615    separator = separator || ' ';
5616    value = value.replace(/([a-zA-Z][a-zA-Z])([A-Z])([a-z])/g, '$1' + separator + '$2$3');
5617    value = value.replace(/([a-z])([A-Z])/g, '$1' + separator + '$2');
5618    return value;
5619  };
5620  /**
5621   * @deprecated As of Athanasius (7.3.x), with no direct replacement
5622   */
5623
5624
5625  Liferay.provide(Util, 'check', function (form, name, checked) {
5626    var checkbox = A.one(form[name]);
5627
5628    if (checkbox) {
5629      checkbox.attr('checked', checked);
5630    }
5631  }, ['aui-base']);
5632  /**
5633   * @deprecated As of Athanasius (7.3.x), with no direct replacement
5634   */
5635
5636  Liferay.provide(Util, 'disableSelectBoxes', function (toggleBoxId, value, selectBoxId) {
5637    var selectBox = A.one('#' + selectBoxId);
5638    var toggleBox = A.one('#' + toggleBoxId);
5639
5640    if (selectBox && toggleBox) {
5641      var dynamicValue = Lang.isFunction(value);
5642
5643      var disabled = function disabled() {
5644        var currentValue = selectBox.val();
5645        var visible = value == currentValue;
5646
5647        if (dynamicValue) {
5648          visible = value(currentValue, value);
5649        }
5650
5651        toggleBox.attr('disabled', !visible);
5652      };
5653
5654      disabled();
5655      selectBox.on('change', disabled);
5656    }
5657  }, ['aui-base']);
5658  /**
5659   * @deprecated As of Athanasius (7.3.x), with no direct replacement
5660   */
5661
5662  Liferay.provide(Util, 'disableTextareaTabs', function (textarea) {
5663    textarea = A.one(textarea);
5664
5665    if (textarea && textarea.attr('textareatabs') != 'enabled') {
5666      textarea.attr('textareatabs', 'disabled');
5667      textarea.detach('keydown', Util.textareaTabs);
5668    }
5669  }, ['aui-base']);
5670  /**
5671   * @deprecated As of Athanasius (7.3.x), with no direct replacement
5672   */
5673
5674  Liferay.provide(Util, 'enableTextareaTabs', function (textarea) {
5675    textarea = A.one(textarea);
5676
5677    if (textarea && textarea.attr('textareatabs') != 'enabled') {
5678      textarea.attr('textareatabs', 'disabled');
5679      textarea.on('keydown', Util.textareaTabs);
5680    }
5681  }, ['aui-base']);
5682  /**
5683   * @deprecated As of Athanasius (7.3.x), with no direct replacement
5684   */
5685
5686  Liferay.provide(Util, 'removeItem', function (box, value) {
5687    box = A.one(box);
5688    var selectedIndex = box.get('selectedIndex');
5689
5690    if (!value) {
5691      box.all('option').item(selectedIndex).remove(true);
5692    } else {
5693      box.all('option[value=' + value + STR_RIGHT_SQUARE_BRACKET).item(selectedIndex).remove(true);
5694    }
5695  }, ['aui-base']);
5696  /**
5697   * @deprecated As of Athanasius (7.3.x), with no direct replacement
5698   */
5699
5700  Liferay.provide(Util, 'resizeTextarea', function (elString, usingRichEditor) {
5701    var el = A.one('#' + elString);
5702
5703    if (!el) {
5704      el = A.one('textarea[name=' + elString + STR_RIGHT_SQUARE_BRACKET);
5705    }
5706
5707    if (el) {
5708      var pageBody = A.getBody();
5709      var diff;
5710
5711      var resize = function resize(event) {
5712        var pageBodyHeight = pageBody.get('winHeight');
5713
5714        if (usingRichEditor) {
5715          try {
5716            if (el.get('nodeName').toLowerCase() != 'iframe') {
5717              el = window[elString];
5718            }
5719          } catch (e) {}
5720        }
5721
5722        if (!diff) {
5723          var buttonRow = pageBody.one('.button-holder');
5724          var templateEditor = pageBody.one('.lfr-template-editor');
5725
5726          if (buttonRow && templateEditor) {
5727            var region = templateEditor.getXY();
5728            diff = buttonRow.outerHeight(true) + region[1] + 25;
5729          } else {
5730            diff = 170;
5731          }
5732        }
5733
5734        el = A.one(el);
5735        var styles = {
5736          width: '98%'
5737        };
5738
5739        if (event) {
5740          styles.height = pageBodyHeight - diff;
5741        }
5742
5743        if (usingRichEditor) {
5744          if (!el || !A.DOM.inDoc(el)) {
5745            A.on('available', function () {
5746              el = A.one(window[elString]);
5747
5748              if (el) {
5749                el.setStyles(styles);
5750              }
5751            }, '#' + elString + '_cp');
5752            return;
5753          }
5754        }
5755
5756        if (el) {
5757          el.setStyles(styles);
5758        }
5759      };
5760
5761      resize();
5762      var dialog = Liferay.Util.getWindow();
5763
5764      if (dialog) {
5765        var resizeEventHandle = dialog.iframe.after('resizeiframe:heightChange', resize);
5766        A.getWin().on('unload', resizeEventHandle.detach, resizeEventHandle);
5767      }
5768    }
5769  }, ['aui-base']);
5770  /**
5771   * @deprecated As of Athanasius (7.3.x), with no direct replacement
5772   */
5773
5774  Liferay.provide(Util, 'setSelectedValue', function (col, value) {
5775    var option = A.one(col).one('option[value=' + value + STR_RIGHT_SQUARE_BRACKET);
5776
5777    if (option) {
5778      option.attr('selected', true);
5779    }
5780  }, ['aui-base']);
5781  /**
5782   * @deprecated As of Athanasius (7.3.x), with no direct replacement
5783   */
5784
5785  Liferay.provide(Util, 'switchEditor', function (options) {
5786    var uri = options.uri;
5787    var windowName = Liferay.Util.getWindowName();
5788    var dialog = Liferay.Util.getWindow(windowName);
5789
5790    if (dialog) {
5791      dialog.iframe.set('uri', uri);
5792    }
5793  }, ['aui-io']);
5794})(AUI(), Liferay);
5795//# sourceMappingURL=deprecated.js.map
5796/**
5797 * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
5798 *
5799 * This library is free software; you can redistribute it and/or modify it under
5800 * the terms of the GNU Lesser General Public License as published by the Free
5801 * Software Foundation; either version 2.1 of the License, or (at your option)
5802 * any later version.
5803 *
5804 * This library is distributed in the hope that it will be useful, but WITHOUT
5805 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
5806 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
5807 * details.
5808 */
5809(function () {
5810  var LiferayAUI = Liferay.AUI;
5811  var combine = LiferayAUI.getCombine();
5812  window.__CONFIG__ = {
5813    basePath: '',
5814    combine: combine,
5815    reportMismatchedAnonymousModules: 'warn',
5816    url: combine ? LiferayAUI.getComboPath() : Liferay.ThemeDisplay.getCDNBaseURL()
5817  };
5818
5819  if (!combine) {
5820    __CONFIG__.defaultURLParams = {
5821      languageId: themeDisplay.getLanguageId()
5822    };
5823  }
5824
5825  __CONFIG__.maps = Liferay.MAPS;
5826  __CONFIG__.modules = Liferay.MODULES;
5827  __CONFIG__.paths = Liferay.PATHS;
5828  __CONFIG__.resolvePath = Liferay.RESOLVE_PATH;
5829  __CONFIG__.namespace = 'Liferay';
5830  __CONFIG__.explainResolutions = Liferay.EXPLAIN_RESOLUTIONS;
5831  __CONFIG__.exposeGlobal = Liferay.EXPOSE_GLOBAL;
5832  __CONFIG__.logLevel = Liferay.LOG_LEVEL;
5833  __CONFIG__.waitTimeout = Liferay.WAIT_TIMEOUT;
5834})();
5835//# sourceMappingURL=config.js.map
5836!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var o=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._config=t}return r(e,[{key:"build",value:function(e){var t=this,n=this._config,r=[],o=[],i=[],a=n.basePath;return a.length&&"/"!==a.charAt(a.length-1)&&(a+="/"),e.forEach((function(e){var l=n.getModule(e),u=t._getModulePath(l);n.combine?(r.push(u),o.push(l.name)):i.push({modules:[l.name],url:t._getURLWithParams(n.url+a+u)})})),r.length&&(i=i.concat(this._generateBufferURLs(o,r,{basePath:a,url:n.url,urlMaxLength:n.urlMaxLength})),r.length=0),i}},{key:"_generateBufferURLs",value:function(e,t,n){for(var r=n.basePath,o=[],i=n.urlMaxLength,a={modules:[e[0]],url:n.url+r+t[0]},l=1;l<t.length;l++){var u=e[l],s=t[l];a.url.length+r.length+s.length+1<i?(a.modules.push(u),a.url+="&"+r+s):(o.push(a),a={modules:[u],url:n.url+r+s})}return a.url=this._getURLWithParams(a.url),o.push(a),o}},{key:"_getModulePath",value:function(e){var t=this._config.paths,n=e.name;return Object.keys(t).forEach((function(e){n!==e&&0!==n.indexOf(e+"/")||(n=t[e]+n.substring(e.length))})),n.lastIndexOf(".js")!==n.length-3&&(n+=".js"),n}},{key:"_getURLWithParams",value:function(e){var t=this._config.defaultURLParams||{},n=Object.keys(t);if(!n.length)return e;var r=n.map((function(e){return e+"="+t[e]})).join("&");return e+(e.indexOf("?")>-1?"&":"?")+r}}]),e}();t.default=o},function(e,t,n){"use strict";var r,o=n(2),i=(r=o)&&r.__esModule?r:{default:r};var a=window.__CONFIG__||{},l="string"==typeof a.namespace?a.namespace:void 0,u=void 0===a.exposeGlobal||a.exposeGlobal,s=new i.default(a);if(l){var c=window[l]?window[l]:{};c.Loader=s,window[l]=c}else window.Loader=s;u&&(window.Loader=s,window.require=i.default.prototype.require.bind(s),window.define=i.default.prototype.define.bind(s),window.define.amd={})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=c(n(3)),i=c(n(4)),a=c(n(7)),l=c(n(8)),u=c(n(9)),s=c(n(0));function c(e){return e&&e.__esModule?e:{default:e}}function f(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var d=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._config=new i.default(t||window.__CONFIG__),this._log=new l.default(this._config),this._dependencyResolver=new a.default(this._config),this._urlBuilder=new s.default(this._config),this._scriptLoader=new u.default(n||window.document,this._config,this._log),this._requireCallId=0}return r(e,[{key:"version",value:function(){return o.default.version}},{key:"define",value:function(){for(var e=this._config,t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];var o=n[0],i=e.getModule(o);if(i&&i.defined)this._log.warn("Module '"+o+"' is being redefined. Only the first","definition will be used");else{var a=n[1],l=n[2];if(2==n.length&&(l=a,a=["require","exports","module"]),"function"!=typeof l){var u=l;l=function(){return u}}if(!(i=e.getModule(o)))throw new Error("Trying to define a module that was not registered: "+o+"\nThis usually means that someone is calling define() for a module that has not been previously required.");
5836if(i.defined)throw new Error("Trying to define a module more than once: "+o+"\nThis usually means that someone is calling define() more than once for the same module, which can lead to unexpected results.");this._log.resolution("Defining",i.name),i.factory=l,i.dependencies=a,i.define.resolve(n)}}},{key:"require",value:function(){for(var e=this,t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];var o=this._scriptLoader,i=this._config,a=this._requireCallId++,l=void 0,u=void 0,s=void 0;if(1==n.length)l=n[0],u=void 0,s=void 0;else if(2==n.length){var c=n[n.length-1];"function"==typeof c?(l=n[0],u=c,s=void 0):null==c?(l=n[0],u=void 0,s=void 0):(l=n,u=void 0,s=void 0)}else{var d=n[n.length-1],h=!1;if("function"!=typeof d&&null!=d||(h=!0),h){var p=n[n.length-2],m=!1;"function"!=typeof p&&null!=p||(m=!0),m?(l=n.slice(0,n.length-2),u=p,s=d):(l=n.slice(0,n.length-1),u=d,s=void 0)}else l=n,u=void 0,s=void 0}if("string"==typeof l)l=[l];else if(1==l.length&&Array.isArray(l[0])){var v;l=(v=[]).concat.apply(v,f(l))}if(void 0===u&&(u=function(){}),void 0===s){var g=new Error("");s=function(t){var n="(n/a)";g.stack&&(n="\n"+(n=g.stack.split("\n").map((function(e){return"        "+e})).join("\n"))),e._log.error("\n","A require() call has failed but no failure handler was","provided.\n","Note that even if the call stack of this error trace","looks like coming from the Liferay AMD Loader, it is not","an error in the Loader what has caused it, but an error","caused by the require() call.\n","The reason why the Loader is in the stack trace is","because it is printing the error so that it doesn't get","lost.\n","However, we recommend providing a failure handler in all","require() calls to be able to recover from errors better","and to avoid the appearance of this message.\n","\n","Some information about the require() call follows:\n","  · Require call id:",a,"\n","  · Required modules:",l,"\n","  · Missing modules:",t.missingModules?t.missingModules:"(n/a)","\n","  · Stack trace of the require() call:",""+n,"\n",t)}}u=this._interceptHandler(u,"success",a),s=this._interceptHandler(s,"failure",a);var y=void 0,_=void 0,b=void 0,w=!1;this._dependencyResolver.resolve(l).then((function(t){if(e._log.resolution("Require call",a,"resolved modules",l,"to",t),e._throwOnLegacyProtocolResolutionErrors(t),e._logServerMessages(l,t),t.errors&&t.errors.length>1)throw Object.assign(new Error("The server generated some errors while resolving modules"),{resolutionErrors:t.errors});return i.addMappings(t.configMap),i.addPaths(t.pathMap),y=t.resolvedModules,(_=e._getUnregisteredModuleNames(y)).forEach((function(e){var n={map:t.moduleMap[e]},r=t.moduleFlags?t.moduleFlags[e]:{};(r=r||{}).esModule&&(n.esModule=!0),i.addModule(e,n)})),b=e._setRejectTimeout(l,t,(function(){w=!0,s.apply(void 0,arguments)})),e._log.resolution("Fetching",_,"from require call",a),o.loadModules(_)})).then((function(){if(!w)return e._waitForModuleDefinitions(y)})).then((function(){if(!w){clearTimeout(b),e._setModuleImplementations(a,y);var t=e._getModuleImplementations(l);u.apply(void 0,f(t))}})).catch((function(e){w||(b&&clearTimeout(b),s(e))}))}},{key:"_interceptHandler",value:function(e,t,n){var r=this;return function(){r._log.resolution("Invoking",t,"handler for","require call",n);try{e.apply(void 0,arguments)}catch(e){r._log.error("\n","A require() call",t,"handler has thrown an error.\n","Note that even if the call stack of this error trace","looks like coming from the Liferay AMD Loader, it is not","an error in the Loader what has caused it, but an error","in the handler's code.\n","The reason why the Loader is in the stack trace is","because it is printing the error on behalf of the handler","so that it doesn't get lost.\n","However, we recommend wrapping all handler code inside a","try/catch to be able to recover from errors better and to","avoid the appearance of this message.\n","\n",e)}}}},{key:"_getUnregisteredModuleNames",value:function(e){var t=this._config;return e.filter((function(e){return!t.getModule(e)}))}},{key:"_logServerMessages",value:function(e,t){t.errors&&t.errors.length>0&&this._log.error("Errors returned from server for require(",e,"):",t.errors),t.warnings&&t.warnings.length>0&&this._log.warn("Warnings returned from server for require(",e,"):",t.warnings)}},{key:"_setRejectTimeout",value:function(e,t,n){var r=this._config;if(0!==r.waitTimeout)return setTimeout((function(){var o=t.resolvedModules.filter((function(e){var t=r.getModule(e);return!t||!t.implemented})),i=Object.assign(new Error("Load timeout for modules: "+e),{missingModules:o,modules:e,resolution:t});n(i)}),r.waitTimeout)}},{key:"_throwOnLegacyProtocolResolutionErrors",value:function(e){var t=e.resolvedModules.filter((function(e){return 0===e.indexOf(":ERROR:")})).map((function(e){return e.substr(7)}));if(t.length>0)throw Object.assign(new Error("The following problems where detected while resolving modules:\n"+t.map((function(e){return"    · "+e})).join("\n")),{resolutionErrors:t})}},{key:"_waitForModuleDefinitions",value:function(e){var t=this._config;return Promise.all(t.getModules(e).map((function(e){return e.define})))}},{key:"_waitForModuleImplementations",value:function(e){var t=this._config;return Promise.all(t.getModules(e).map((function(e){return e.implement})))}},{key:"_setModuleImplementations",value:function(e,t){var n=this,r=this._config;r.getModules(t).forEach((function(t){if(!t.implemented){if(t.implement.rejected)throw t.implement.rejection;n._log.resolution("Implementing",t.name,"from require call",e);try{var o={get exports(){return t.implementation},set exports(e){t.implementation=e}},i=t.dependencies.map((function(e){if("exports"===e)return o.exports;if("module"===e)return o;if("require"===e)return n._createLocalRequire(t);var i=r.getDependency(t.name,e);if(!i)throw new Error("Unsatisfied dependency: "+e+" found in module "+t.name);if(!i.implementation&&!i.implemented)throw new Error('Module "'+i.name+'" has not been loaded yet for context: '+t.name);return i.implementation})),a=t.factory.apply(t,f(i));void 0!==a&&(t.implementation=a),t.implement.resolve(t.implementation)}catch(e){throw t.implement.fulfilled||t.implement.reject(e),e}}}))}},{key:"_createLocalRequire",value:function(e){var t=this,n=this._config,r=function(r){for(var o=arguments.length,i=Array(o>1?o-1:0),a=1;a<o;a++)i[a-1]=arguments[a];if(i.length>0)return t.require.apply(t,[r].concat(i));var l=n.getDependency(e.name,r);
5836if(!(l&&"implementation"in l))throw new Error('Module "'+r+'" has not been loaded yet for context: '+e.name);return l.implementation};return r.toUrl=function(e){return t._urlBuilder.build([e])[0].url},r}},{key:"_getModuleImplementations",value:function(e){return this._config.getModules(e).map((function(e){return e.implementation}))}}]),e}();t.default=d,d.prototype.define.amd={}},function(e){e.exports=JSON.parse('{"name":"liferay-amd-loader","version":"4.3.0","description":"AMD Loader with support for combo URL and conditional loading","scripts":{"clean":"rm -rf build","build":"node bin/build-loader.js","ci":"yarn format:check && yarn lint && yarn build && yarn build-demo && yarn test","build-demo":"node bin/build-demo.js","demo":"node bin/run-demo.js","test":"jest --runInBand","format":"prettier --write \'{*,.*}.js\' \'bin/**/{*,.*}.js\' \'src/**/{*,.*}.js\'","format:check":"prettier --list-different \'{*,.*}.js\' \'bin/**/{*,.*}.js\' \'src/**/{*,.*}.js\'","lint":"eslint \'.*.js\' \'*.js\' \'bin/**/{*,.*}.js\' \'src/**/{*,.*}.js\'","lint:fix":"eslint --fix \'.*.js\' \'*.js\' \'bin/**/{*,.*}.js\' \'src/**/{*,.*}.js\'","prepublish":"publish-please guard","publish-please":"publish-please","prepublishOnly":"yarn build && yarn build-demo && yarn test","proxyPortal":"webpack-dev-server --config webpack.proxyPortal.js"},"repository":{"type":"git","url":"git+https://github.com/liferay/liferay-amd-loader.git"},"jest":{"collectCoverage":true,"coverageDirectory":"build/coverage","modulePathIgnorePatterns":["liferay-amd-loader/build/.*",".*/__tests__/__fixtures__/.*"],"testPathIgnorePatterns":[".eslintrc.js"],"testURL":"http://localhost/"},"author":{"name":"Iliyan Peychev"},"license":"LGPL-3.0","keywords":["Liferay","AMD","ES6","Loader"],"bugs":{"url":"https://github.com/liferay/liferay-amd-loader/issues"},"homepage":"https://github.com/liferay/liferay-amd-loader","files":[".babelrc",".eslintrc.js",".publishrc","LICENSE.md","package.json","README.md","webpack.config.js","src","bin","build","src"],"devDependencies":{"babel-loader":"^7.1.2","babel-preset-es2015":"^6.24.1","combohandler":"^0.4.0","eslint":"^6.5.1","eslint-config-liferay":"^13.0.0","fs-extra":"^5.0.0","globby":"^7.1.1","http-server":"^0.11.1","jest":"^22.2.1","prettier":"^1.16.4","publish-please":"^2.3.1","uglifyjs-webpack-plugin":"^1.2.0","webpack":"^4.29.6","webpack-cli":"^3.3.0","webpack-dev-server":"^3.2.1"}}')},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,l=e[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&l.return&&l.return()}finally{if(o)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(5),u=(r=l)&&r.__esModule?r:{default:r};var s=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._modules={},this._maps={},this._paths={},this._config={maps:{},paths:{}},this._parse(t,"defaultURLParams",{}),this._parse(t,"explainResolutions",!1),this._parse(t,"showWarnings",!1),this._parse(t,"waitTimeout",7e3),this._parse(t,"basePath","/"),this._parse(t,"resolvePath","/o/js_resolve_modules"),this._parse(t,"combine",!1),this._parse(t,"url",""),this._parse(t,"urlMaxLength",2e3),this._parse(t,"logLevel","error")}return a(e,[{key:"addModule",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this._modules[e])throw new Error("Module is already registered: "+e);var n=new u.default(e);return Object.entries(t).forEach((function(e){var t=i(e,2),r=t[0],o=t[1];n[r]=o})),this._modules[e]=n,n}},{key:"addMappings",value:function(e){Object.assign(this._maps,e)}},{key:"addPaths",value:function(e){Object.assign(this._paths,e)}},{key:"getModules",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;return void 0===t?Object.values(this._modules):t.map((function(t){return e.getModule(t)}))}},{key:"getModule",value:function(e){var t=this._modules[e];if(!t){var n=this._mapModule(e);t=this._modules[n]}return t}},{key:"getDependency",value:function(e,t){var n=this.getModule(e),r=this._modules[t];if(!r){var o=this._mapModule(t,n.map);r=this._modules[o]}return r}},{key:"_parse",value:function(e,t,n){this._config[t]=Object.prototype.hasOwnProperty.call(e,t)?e[t]:n}},{key:"_mapModule",value:function(e,t){return t&&(e=this._mapMatches(e,t)),Object.keys(this._maps).length>0&&(e=this._mapMatches(e,this._maps)),e}},{key:"_mapMatches",value:function(e,t){var n=t[e];return n?"object"===(void 0===n?"undefined":o(n))?n.value:n:((n=this._mapExactMatch(e,t))||(n=this._mapPartialMatch(e,t)),n||(n=this._mapWildcardMatch(e,t)),n||e)}},{key:"_mapExactMatch",value:function(e,t){for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var r=t[n];if(r.value&&r.exactMatch&&e===n)return r.value}}},{key:"_mapPartialMatch",value:function(e,t){for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var r=t[n];if(!r.exactMatch&&(r.value&&(r=r.value),e===n||0===e.indexOf(n+"/")))return r+e.substring(n.length)}}},{key:"_mapWildcardMatch",value:function(e,t){if("function"==typeof t["*"])return t["*"](e)}},{key:"explainResolutions",get:function(){return this._config.explainResolutions}},{key:"showWarnings",get:function(){return this._config.showWarnings}},{key:"waitTimeout",get:function(){return this._config.waitTimeout}},{key:"basePath",get:function(){return this._config.basePath}},{key:"resolvePath",get:function(){return this._config.resolvePath}},{key:"combine",get:function(){return this._config.combine}},{key:"url",get:function(){return this._config.url}},{key:"urlMaxLength",get:function(){return this._config.urlMaxLength}},{key:"logLevel",get:function(){return this._config.logLevel}},{key:"defaultURLParams",get:function(){return this._config.defaultURLParams}},{key:"paths",get:function(){return this._paths}}]),e}();t.default=s},function(e,t,n){"use strict";
5836Object.defineProperty(t,"__esModule",{value:!0});var r,o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(6),a=(r=i)&&r.__esModule?r:{default:r};var l=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._name=t,this._dependencies=void 0,this._factory=void 0,this._implementation={},this._map=void 0,this._state={_define:a.default.new(),_fetch:a.default.new(),_implement:a.default.new()}}return o(e,[{key:"name",get:function(){return this._name},set:function(e){throw new Error("Name of module "+this.name+" is read-only")}},{key:"dependencies",get:function(){return this._dependencies},set:function(e){if(this._dependencies)throw new Error("Dependencies of module "+this.name+" already set");this._dependencies=e}},{key:"factory",get:function(){return this._factory},set:function(e){if(this._factory)throw new Error("Factory of module "+this.name+" already set");this._factory=e}},{key:"implementation",get:function(){return this._implementation},set:function(e){this._implementation=e}},{key:"map",get:function(){return this._map},set:function(e){if(this._map)throw new Error("Local module map of module "+this.name+" already set");this._map=e}},{key:"esModule",get:function(){return this._implementation.__esModule},set:function(e){Object.defineProperty(this._implementation,"__esModule",{configurable:!0,value:e,writable:!0})}},{key:"fetch",get:function(){return this._state._fetch}},{key:"fetched",get:function(){return this.fetch.resolved}},{key:"define",get:function(){return this._state._define}},{key:"defined",get:function(){return this.define.resolved}},{key:"implement",get:function(){return this._state._implement}},{key:"implemented",get:function(){return this.implement.resolved}}]),e}();t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function e(){throw function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),new Error("Don't construct ResolvablePromise objects directly: rely on ResolvablePromise.new() instead")};function o(e){if(e.fulfilled)throw new Error("Promise already fulfilled")}t.default=r,r.new=function(){var e={},t=new Promise((function(t,n){e._resolve=t,e._reject=n}));return Object.assign(t,e,{fulfilled:!1,rejected:!1,rejection:void 0,resolution:void 0,resolved:!1}),t.resolve=function(e){return function(e,t){o(e),e.fulfilled=!0,e.resolved=!0,e.resolution=t,e._resolve(t)}(t,e)},t.reject=function(e){return function(e,t){o(e),e.fulfilled=!0,e.rejected=!0,e.rejection=t,e._reject(t)}(t,e)},"undefined"!=typeof jest&&t.catch((function(){})),t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var o=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._config=t,this._cachedResolutions={}}return r(e,[{key:"resolve",value:function(e){var t=this;if(void 0===e||0==e.length)throw new Error("Argument 'modules' cannot be undefined or empty");var n=this._config;return new Promise((function(r,o){var i=t._cachedResolutions[e];if(i)r(i);else{var a="modules="+encodeURIComponent(e),l=n.resolvePath+"?"+a,u={};l.length>n.urlMaxLength&&(l=n.resolvePath,u={body:a,method:"POST"}),fetch(l,u).then((function(e){return e.text()})).then((function(n){var o=JSON.parse(n);t._cachedResolutions[e]=o,r(o)})).catch(o)}}))}}]),e}();t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var o={off:0,error:1,warn:2,info:3,debug:4},i="liferay-amd-loader |",a=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._config=t}return r(e,[{key:"error",value:function(){var e;if(this._applies("error")){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];(e=console).error.apply(e,[i].concat(n))}}},{key:"warn",value:function(){var e;if(this._applies("warn")){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];(e=console).warn.apply(e,[i].concat(n))}}},{key:"info",value:function(){var e;if(this._applies("info")){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];(e=console).info.apply(e,[i].concat(n))}}},{key:"debug",value:function(){var e;if(this._applies("debug")){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];(e=console).debug.apply(e,[i].concat(n))}}},{key:"resolution",value:function(){var e;if(this._config.explainResolutions){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];
5836(e=console).log.apply(e,[i].concat(n))}}},{key:"_applies",value:function(e){var t=o[this._config.logLevel];return o[e]<=t}}]),e}();t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(0),a=(r=i)&&r.__esModule?r:{default:r};var l=function(){function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._document=t,this._config=n,this._log=r,this._urlBuilder=new a.default(n),this._injectedScripts={}}return o(e,[{key:"loadModules",value:function(e){var t=this,n=this._urlBuilder;if(0==e.length)return Promise.resolve();var r=n.build(e).map((function(e){return t._loadScript(e)}));return Promise.all(r)}},{key:"_loadScript",value:function(e){var t=this,n=this._config.getModules(e.modules),r=this._injectedScripts[e.url];return r||((r=this._document.createElement("script")).src=e.url,r.async=!1,r.onload=r.onreadystatechange=function(){t.readyState&&"complete"!==t.readyState&&"load"!==t.readyState||(r.onload=r.onreadystatechange=null,r.onerror=null,n.forEach((function(e){e.fetch.fulfilled?t._log.warn("Module '"+e.name+"' is being fetched from\n",r.src,"but was already fetched from\n",e.fetch.resolved?e.fetch.resolution.src:e.fetch.rejection.script.src):e.fetch.resolve(r)})))},r.onerror=function(){r.onload=r.onreadystatechange=null,r.onerror=null;var t=Object.assign(new Error("Unable to load script from URL "+e.url),{modules:e.modules,script:r,url:e.url});n.forEach((function(e){return e.fetch.reject(t)}))},this._injectedScripts[e.url]=r,this._document.head.appendChild(r)),Promise.all(n.map((function(e){return e.fetch})))}}]),e}();t.default=l}]);
5837//# sourceMappingURL=loader.js.map
5838!function(root, factory) {
5839    false && "function" == typeof define && define.amd ? // AMD. Register as an anonymous module unless amdModuleId is set
5840    define([], function() {
5841        return root.svg4everybody = factory();
5842    }) : "object" == typeof module && module.exports ? // Node. Does not work with strict CommonJS, but
5843    // only CommonJS-like environments that support module.exports,
5844    // like Node.
5845    module.exports = factory() : root.svg4everybody = factory();
5846}(this, function() {
5847    /*! svg4everybody v2.1.9 | github.com/jonathantneal/svg4everybody */
5848    function embed(parent, svg, target) {
5849        // if the target exists
5850        if (target) {
5851            // create a document fragment to hold the contents of the target
5852            var fragment = document.createDocumentFragment(), viewBox = !svg.hasAttribute("viewBox") && target.getAttribute("viewBox");
5853            // conditionally set the viewBox on the svg
5854            viewBox && svg.setAttribute("viewBox", viewBox);
5855            // copy the contents of the clone into the fragment
5856            for (// clone the target
5857            var clone = target.cloneNode(!0); clone.childNodes.length; ) {
5858                fragment.appendChild(clone.firstChild);
5859            }
5860            // append the fragment into the svg
5861            parent.appendChild(fragment);
5862        }
5863    }
5864    function loadreadystatechange(xhr) {
5865        // listen to changes in the request
5866        xhr.onreadystatechange = function() {
5867            // if the request is ready
5868            if (4 === xhr.readyState) {
5869                // get the cached html document
5870                var cachedDocument = xhr._cachedDocument;
5871                // ensure the cached html document based on the xhr response
5872                cachedDocument || (cachedDocument = xhr._cachedDocument = document.implementation.createHTMLDocument(""), 
5873                cachedDocument.body.innerHTML = xhr.responseText, xhr._cachedTarget = {}), // clear the xhr embeds list and embed each item
5874                xhr._embeds.splice(0).map(function(item) {
5875                    // get the cached target
5876                    var target = xhr._cachedTarget[item.id];
5877                    // ensure the cached target
5878                    target || (target = xhr._cachedTarget[item.id] = cachedDocument.getElementById(item.id)), 
5879                    // embed the target into the svg
5880                    embed(item.parent, item.svg, target);
5881                });
5882            }
5883        }, // test the ready state change immediately
5884        xhr.onreadystatechange();
5885    }
5886    function svg4everybody(rawopts) {
5887        function oninterval() {
5888            // while the index exists in the live <use> collection
5889            for (// get the cached <use> index
5890            var index = 0; index < uses.length; ) {
5891                // get the current <use>
5892                var use = uses[index], parent = use.parentNode, svg = getSVGAncestor(parent), src = use.getAttribute("xlink:href") || use.getAttribute("href");
5893                if (!src && opts.attributeName && (src = use.getAttribute(opts.attributeName)), 
5894                svg && src) {
5895                    if (polyfill) {
5896                        if (!opts.validate || opts.validate(src, svg, use)) {
5897                            // remove the <use> element
5898                            parent.removeChild(use);
5899                            // parse the src and get the url and id
5900                            var srcSplit = src.split("#"), url = srcSplit.shift(), id = srcSplit.join("#");
5901                            // if the link is external
5902                            if (url.length) {
5903                                // get the cached xhr request
5904                                var xhr = requests[url];
5905                                // ensure the xhr request exists
5906                                xhr || (xhr = requests[url] = new XMLHttpRequest(), xhr.open("GET", url), xhr.send(), 
5907                                xhr._embeds = []), // add the svg and id as an item to the xhr embeds list
5908                                xhr._embeds.push({
5909                                    parent: parent,
5910                                    svg: svg,
5911                                    id: id
5912                                }), // prepare the xhr ready state change event
5913                                loadreadystatechange(xhr);
5914                            } else {
5915                                // embed the local id into the svg
5916                                embed(parent, svg, document.getElementById(id));
5917                            }
5918                        } else {
5919                            // increase the index when the previous value was not "valid"
5920                            ++index, ++numberOfSvgUseElementsToBypass;
5921                        }
5922                    }
5923                } else {
5924                    // increase the index when the previous value was not "valid"
5925                    ++index;
5926                }
5927            }
5928            // continue the interval
5929            (!uses.length || uses.length - numberOfSvgUseElementsToBypass > 0) && requestAnimationFrame(oninterval, 67);
5930        }
5931        var polyfill, opts = Object(rawopts), newerIEUA = /\bTrident\/[567]\b|\bMSIE (?:9|10)\.0\b/, webkitUA = /\bAppleWebKit\/(\d+)\b/, olderEdgeUA = /\bEdge\/12\.(\d+)\b/, edgeUA = /\bEdge\/.(\d+)\b/, inIframe = window.top !== window.self;
5932        polyfill = "polyfill" in opts ? opts.polyfill : newerIEUA.test(navigator.userAgent) || (navigator.userAgent.match(olderEdgeUA) || [])[1] < 10547 || (navigator.userAgent.match(webkitUA) || [])[1] < 537 || edgeUA.test(navigator.userAgent) && inIframe;
5933        // create xhr requests object
5934        var requests = {}, requestAnimationFrame = window.requestAnimationFrame || setTimeout, uses = document.getElementsByTagName("use"), numberOfSvgUseElementsToBypass = 0;
5935        // conditionally start the interval if the polyfill is active
5936        polyfill && oninterval();
5937    }
5938    function getSVGAncestor(node) {
5939        for (var svg = node; "svg" !== svg.nodeName.toLowerCase() && (svg = svg.parentNode); ) {}
5940        return svg;
5941    }
5942    return svg4everybody;
5943});
5944/**
5945 * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
5946 *
5947 * This library is free software; you can redistribute it and/or modify it under
5948 * the terms of the GNU Lesser General Public License as published by the Free
5949 * Software Foundation; either version 2.1 of the License, or (at your option)
5950 * any later version.
5951 *
5952 * This library is distributed in the hope that it will be useful, but WITHOUT
5953 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
5954 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
5955 * details.
5956 */
5957(function (Liferay) {
5958  var DOMTaskRunner = {
5959    _scheduledTasks: [],
5960    _taskStates: [],
5961    addTask: function addTask(task) {
5962      var instance = this;
5963
5964      instance._scheduledTasks.push(task);
5965    },
5966    addTaskState: function addTaskState(state) {
5967      var instance = this;
5968
5969      instance._taskStates.push(state);
5970    },
5971    reset: function reset() {
5972      var instance = this;
5973      instance._taskStates.length = 0;
5974      instance._scheduledTasks.length = 0;
5975    },
5976    runTasks: function runTasks(node) {
5977      var instance = this;
5978      var scheduledTasks = instance._scheduledTasks;
5979      var taskStates = instance._taskStates;
5980      var tasksLength = scheduledTasks.length;
5981      var taskStatesLength = taskStates.length;
5982
5983      for (var i = 0; i < tasksLength; i++) {
5984        var task = scheduledTasks[i];
5985        var taskParams = task.params;
5986
5987        for (var j = 0; j < taskStatesLength; j++) {
5988          var state = taskStates[j];
5989
5990          if (task.condition(state, taskParams, node)) {
5991            task.action(state, taskParams, node);
5992          }
5993        }
5994      }
5995    }
5996  };
5997  Liferay.DOMTaskRunner = DOMTaskRunner;
5998})(Liferay);
5999//# sourceMappingURL=dom_task_runner.js.map
6000/**
6001 * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
6002 *
6003 * This library is free software; you can redistribute it and/or modify it under
6004 * the terms of the GNU Lesser General Public License as published by the Free
6005 * Software Foundation; either version 2.1 of the License, or (at your option)
6006 * any later version.
6007 *
6008 * This library is distributed in the hope that it will be useful, but WITHOUT
6009 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
6010 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
6011 * details.
6012 */
6013(function (A, Liferay) {
6014  var CLICK_EVENTS = {};
6015  var Util = Liferay.Util;
6016  A.use('attribute', 'oop', function (A) {
6017    A.augment(Liferay, A.Attribute, true);
6018  });
6019  Liferay.provide(Liferay, 'delegateClick', function (id, fn) {
6020    var el = A.config.doc.getElementById(id);
6021
6022    if (!el || el.id != id) {
6023      return;
6024    }
6025
6026    var guid = A.one(el).addClass('lfr-delegate-click').guid();
6027    CLICK_EVENTS[guid] = fn;
6028
6029    if (!Liferay._baseDelegateHandle) {
6030      Liferay._baseDelegateHandle = A.getBody().delegate('click', Liferay._baseDelegate, '.lfr-delegate-click');
6031    }
6032  }, ['aui-base']);
6033
6034  Liferay._baseDelegate = function (event) {
6035    var id = event.currentTarget.attr('id');
6036    var fn = CLICK_EVENTS[id];
6037
6038    if (fn) {
6039      fn.apply(this, arguments);
6040    }
6041  };
6042
6043  Liferay._CLICK_EVENTS = CLICK_EVENTS;
6044  Liferay.provide(window, 'submitForm', function (form, action, singleSubmit, validate) {
6045    if (!Util._submitLocked) {
6046      if (form.jquery) {
6047        form = form[0];
6048      }
6049
6050      Liferay.fire('submitForm', {
6051        action: action,
6052        form: A.one(form),
6053        singleSubmit: singleSubmit,
6054        validate: validate !== false
6055      });
6056    }
6057  }, ['aui-base', 'aui-form-validator', 'aui-url', 'liferay-form']);
6058  Liferay.publish('submitForm', {
6059    defaultFn: function defaultFn(event) {
6060      var form = event.form;
6061      var hasErrors = false;
6062
6063      if (event.validate) {
6064        var liferayForm = Liferay.Form.get(form.attr('id'));
6065
6066        if (liferayForm) {
6067          var validator = liferayForm.formValidator;
6068
6069          if (A.instanceOf(validator, A.FormValidator)) {
6070            validator.validate();
6071            hasErrors = validator.hasErrors();
6072
6073            if (hasErrors) {
6074              validator.focusInvalidField();
6075            }
6076          }
6077        }
6078      }
6079
6080      if (!hasErrors) {
6081        var action = event.action || form.attr('action');
6082        var singleSubmit = event.singleSubmit;
6083        var inputs = form.all('button[type=submit], input[type=button], input[type=image], input[type=reset], input[type=submit]');
6084        Util.disableFormButtons(inputs, form);
6085
6086        if (singleSubmit === false) {
6087          Util._submitLocked = A.later(1000, Util, Util.enableFormButtons, [inputs, form]);
6088        } else {
6089          Util._submitLocked = true;
6090        }
6091
6092        var baseURL;
6093        var queryString;
6094        var searchParamsIndex = action.indexOf('?');
6095
6096        if (searchParamsIndex === -1) {
6097          baseURL = action;
6098          queryString = '';
6099        } else {
6100          baseURL = action.slice(0, searchParamsIndex);
6101          queryString = action.slice(searchParamsIndex + 1);
6102        }
6103
6104        var searchParams = new URLSearchParams(queryString);
6105        var authToken = searchParams.get('p_auth') || '';
6106
6107        if (authToken.includes('#')) {
6108          authToken = authToken.substring(0, authToken.indexOf('#'));
6109        }
6110
6111        form.append('<input name="p_auth" type="hidden" value="' + authToken + '" />');
6112
6113        if (authToken) {
6114          searchParams["delete"]('p_auth');
6115          action = baseURL + '?' + searchParams.toString();
6116        }
6117
6118        form.attr('action', action);
6119        Util.submitForm(form);
6120        form.attr('target', '');
6121        Util._submitLocked = null;
6122      }
6123    }
6124  });
6125  Liferay.after('closeWindow', function (event) {
6126    var id = event.id;
6127    var dialog = Util.getTop().Liferay.Util.Window.getById(id);
6128
6129    if (dialog && dialog.iframe) {
6130      var dialogWindow = dialog.iframe.node.get('contentWindow').getDOM();
6131      var openingWindow = dialogWindow.Liferay.Util.getOpener();
6132      var redirect = event.redirect;
6133
6134      if (redirect) {
6135        openingWindow.Liferay.Util.navigate(redirect);
6136      } else {
6137        var refresh = event.refresh;
6138
6139        if (refresh && openingWindow) {
6140          var data;
6141
6142          if (!event.portletAjaxable) {
6143            data = {
6144              portletAjaxable: false
6145            };
6146          }
6147
6148          openingWindow.Liferay.Portlet.refresh('#p_p_id_' + refresh + '_', data);
6149        }
6150      }
6151
6152      dialog.hide();
6153    }
6154  });
6155})(AUI(), Liferay);
6156//# sourceMappingURL=events.js.map
6157/**
6158 * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
6159 *
6160 * This library is free software; you can redistribute it and/or modify it under
6161 * the terms of the GNU Lesser General Public License as published by the Free
6162 * Software Foundation; either version 2.1 of the License, or (at your option)
6163 * any later version.
6164 *
6165 * This library is distributed in the hope that it will be useful, but WITHOUT
6166 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
6167 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
6168 * details.
6169 */
6170(function (Liferay) {
6171  Liferay.lazyLoad = function () {
6172    var failureCallback;
6173
6174    var isFunction = function isFunction(val) {
6175      return typeof val === 'function';
6176    };
6177
6178    var modules;
6179    var successCallback;
6180
6181    if (Array.isArray(arguments[0])) {
6182      modules = arguments[0];
6183      successCallback = isFunction(arguments[1]) ? arguments[1] : null;
6184      failureCallback = isFunction(arguments[2]) ? arguments[2] : null;
6185    } else {
6186      modules = [];
6187
6188      for (var i = 0; i < arguments.length; ++i) {
6189        if (typeof arguments[i] === 'string') {
6190          modules[i] = arguments[i];
6191        } else if (isFunction(arguments[i])) {
6192          successCallback = arguments[i];
6193          failureCallback = isFunction(arguments[++i]) ? arguments[i] : null;
6194          break;
6195        }
6196      }
6197    }
6198
6199    return function () {
6200      var args = [];
6201
6202      for (var i = 0; i < arguments.length; ++i) {
6203        args.push(arguments[i]);
6204      }
6205
6206      Liferay.Loader.require(modules, function () {
6207        for (var i = 0; i < arguments.length; ++i) {
6208          args.splice(i, 0, arguments[i]);
6209        }
6210
6211        successCallback.apply(successCallback, args);
6212      }, failureCallback);
6213    };
6214  };
6215})(Liferay);
6216//# sourceMappingURL=lazy_load.js.map
6217function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
6218
6219/**
6220 * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
6221 *
6222 * This library is free software; you can redistribute it and/or modify it under
6223 * the terms of the GNU Lesser General Public License as published by the Free
6224 * Software Foundation; either version 2.1 of the License, or (at your option)
6225 * any later version.
6226 *
6227 * This library is distributed in the hope that it will be useful, but WITHOUT
6228 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
6229 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
6230 * details.
6231 */
6232Liferay = window.Liferay || {};
6233
6234(function (Liferay) {
6235  var isFunction = function isFunction(val) {
6236    return typeof val === 'function';
6237  };
6238
6239  var isNode = function isNode(node) {
6240    return node && (node._node || node.jquery || node.nodeType);
6241  };
6242
6243  var REGEX_METHOD_GET = /^get$/i;
6244  var STR_MULTIPART = 'multipart/form-data';
6245
6246  Liferay.namespace = function namespace(obj, path) {
6247    if (path === undefined) {
6248      path = obj;
6249      obj = this;
6250    }
6251
6252    var parts = path.split('.');
6253
6254    for (var part; parts.length && (part = parts.shift());) {
6255      if (obj[part] && obj[part] !== Object.prototype[part]) {
6256        obj = obj[part];
6257      } else {
6258        obj = obj[part] = {};
6259      }
6260    }
6261
6262    return obj;
6263  };
6264  /**
6265   * OPTIONS
6266   *
6267   * Required
6268   * service {string|object}: Either the service name, or an object with the keys as the service to call, and the value as the service configuration object.
6269   *
6270   * Optional
6271   * data {object|node|string}: The data to send to the service. If the object passed is the ID of a form or a form element, the form fields will be serialized and used as the data.
6272   * successCallback {function}: A function to execute when the server returns a response. It receives a JSON object as it's first parameter.
6273   * exceptionCallback {function}: A function to execute when the response from the server contains a service exception. It receives a the exception message as it's first parameter.
6274   */
6275
6276
6277  var Service = function Service() {
6278    var args = Service.parseInvokeArgs(Array.prototype.slice.call(arguments, 0));
6279    return Service.invoke.apply(Service, args);
6280  };
6281
6282  Service.URL_INVOKE = themeDisplay.getPathContext() + '/api/jsonws/invoke';
6283
6284  Service.bind = function () {
6285    var args = Array.prototype.slice.call(arguments, 0);
6286    return function () {
6287      var newArgs = Array.prototype.slice.call(arguments, 0);
6288      return Service.apply(Service, args.concat(newArgs));
6289    };
6290  };
6291
6292  Service.parseInvokeArgs = function (args) {
6293    var instance = this;
6294    var payload = args[0];
6295    var ioConfig = instance.parseIOConfig(args);
6296
6297    if (typeof payload === 'string') {
6298      payload = instance.parseStringPayload(args);
6299      instance.parseIOFormConfig(ioConfig, args);
6300      var lastArg = args[args.length - 1];
6301
6302      if (_typeof(lastArg) === 'object' && lastArg.method) {
6303        ioConfig.method = lastArg.method;
6304      }
6305    }
6306
6307    return [payload, ioConfig];
6308  };
6309
6310  Service.parseIOConfig = function (args) {
6311    var payload = args[0];
6312    var ioConfig = payload.io || {};
6313    delete payload.io;
6314
6315    if (!ioConfig.success) {
6316      var callbacks = args.filter(isFunction);
6317      var callbackException = callbacks[1];
6318      var callbackSuccess = callbacks[0];
6319
6320      if (!callbackException) {
6321        callbackException = callbackSuccess;
6322      }
6323
6324      ioConfig.error = callbackException;
6325
6326      ioConfig.complete = function (response) {
6327        if (response !== null && !Object.prototype.hasOwnProperty.call(response, 'exception')) {
6328          if (callbackSuccess) {
6329            callbackSuccess.call(this, response);
6330          }
6331        } else if (callbackException) {
6332          var exception = response ? response.exception : 'The server returned an empty response';
6333          callbackException.call(this, exception, response);
6334        }
6335      };
6336    }
6337
6338    if (!Object.prototype.hasOwnProperty.call(ioConfig, 'cache') && REGEX_METHOD_GET.test(ioConfig.type)) {
6339      ioConfig.cache = false;
6340    }
6341
6342    if (Liferay.PropsValues.NTLM_AUTH_ENABLED && Liferay.Browser.isIe()) {
6343      ioConfig.type = 'GET';
6344    }
6345
6346    return ioConfig;
6347  };
6348
6349  Service.parseIOFormConfig = function (ioConfig, args) {
6350    var form = args[1];
6351
6352    if (isNode(form)) {
6353      if (form.enctype == STR_MULTIPART) {
6354        ioConfig.contentType = 'multipart/form-data';
6355      }
6356
6357      ioConfig.formData = new FormData(form);
6358    }
6359  };
6360
6361  Service.parseStringPayload = function (args) {
6362    var params = {};
6363    var payload = {};
6364    var config = args[1];
6365
6366    if (!isFunction(config) && !isNode(config)) {
6367      params = config;
6368    }
6369
6370    payload[args[0]] = params;
6371    return payload;
6372  };
6373
6374  Service.invoke = function (payload, ioConfig) {
6375    var instance = this;
6376    var cmd = JSON.stringify(payload);
6377    var data = cmd;
6378
6379    if (ioConfig.formData) {
6380      ioConfig.formData.append('cmd', cmd);
6381      data = ioConfig.formData;
6382    }
6383
6384    return Liferay.Util.fetch(instance.URL_INVOKE, {
6385      body: data,
6386      headers: {
6387        contentType: ioConfig.contentType
6388      },
6389      method: 'POST'
6390    }).then(function (response) {
6391      return response.json();
6392    }).then(ioConfig.complete)["catch"](ioConfig.error);
6393  };
6394
6395  function getHttpMethodFunction(httpMethodName) {
6396    return function () {
6397      var args = Array.prototype.slice.call(arguments, 0);
6398      var method = {
6399        method: httpMethodName
6400      };
6401      args.push(method);
6402      return Service.apply(Service, args);
6403    };
6404  }
6405
6406  Service.get = getHttpMethodFunction('get');
6407  Service.del = getHttpMethodFunction('delete');
6408  Service.post = getHttpMethodFunction('post');
6409  Service.put = getHttpMethodFunction('put');
6410  Service.update = getHttpMethodFunction('update');
6411  Liferay.Service = Service;
6412  Liferay.Template = {
6413    PORTLET: '<div class="portlet"><div class="portlet-topper"><div class="portlet-title"></div></div><div class="portlet-content"></div><div class="forbidden-action"></div></div>'
6414  };
6415})(Liferay);
6416//# sourceMappingURL=liferay.js.map
6417!function(e,t){for(var n in t)e[n]=t[n]}(window,function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/o/frontend-js-web/liferay/",n(n.s=27)}([function(e,t,n){"use strict";
6417Object.defineProperty(t,"__esModule",{value:!0}),t.string=t.object=t.Disposable=t.async=t.array=void 0;var r=n(34);Object.keys(r).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return r[e]}})}));var o=s(r),i=s(n(35)),a=s(n(36)),u=s(n(39)),c=s(n(40)),l=s(n(41));function s(e){return e&&e.__esModule?e:{default:e}}t.array=i.default,t.async=a.default,t.Disposable=u.default,t.object=c.default,t.string=l.default,t.default=o.default},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dom=void 0;var r=n(62);Object.keys(r).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return r[e]}})}));var o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(r);t.default=o,t.dom=o},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("string"!=typeof e)throw new TypeError("basePortletURL parameter must be a string");if(!t||"object"!==i(t))throw new TypeError("parameters argument must be an object");var n=new Set(["doAsGroupId","doAsUserId","doAsUserLanguageId","p_auth","p_auth_secret","p_f_id","p_j_a_id","p_l_id","p_l_reset","p_p_auth","p_p_cacheability","p_p_i_id","p_p_id","p_p_isolated","p_p_lifecycle","p_p_mode","p_p_resource_id","p_p_state","p_p_state_rcv","p_p_static","p_p_url_type","p_p_width","p_t_lifecycle","p_v_l_s_g_id","refererGroupId","refererPlid","saveLastPath","scroll"]);0===e.indexOf(Liferay.ThemeDisplay.getPortalURL())||u(e)||(e=0!==e.indexOf("/")?"".concat(Liferay.ThemeDisplay.getPortalURL(),"/").concat(e):Liferay.ThemeDisplay.getPortalURL()+e);
6417var r=new URL(e),a=new URLSearchParams(r.search),c=t.p_p_id||a.get("p_p_id");if(Object.entries(t).length&&!c)throw new TypeError("Portlet ID must not be null if parameters are provided");var l="";Object.entries(t).length&&(l=(0,o.default)(c));return Object.keys(t).forEach((function(e){var r;r=n.has(e)?e:"".concat(l).concat(e),a.set(r,t[e])})),r.search=a.toString(),r};var r,o=(r=n(17))&&r.__esModule?r:{default:r};function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var a=/^[a-z][a-z0-9+.-]*:/i;function u(e){return a.test(e)}},function(e,t){function n(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function r(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach((function(t){o(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=new Headers({"x-csrf-token":Liferay.authToken});new Headers(t.headers||{}).forEach((function(e,t){n.set(t,e)}));var o=r({},i,{},t);return o.headers=n,fetch(e,o)};var i={credentials:"include"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventHandler=t.EventHandle=t.EventEmitterProxy=t.EventEmitter=void 0;var r=u(n(53)),o=u(n(54)),i=u(n(20)),a=u(n(55));function u(e){return e&&e.__esModule?e:{default:e}}t.default=r.default,t.EventEmitter=r.default,t.EventEmitterProxy=o.default,t.EventHandle=i.default,t.EventHandler=a.default},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={PHONE:768,TABLET:980}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=(0,o.default)(e);return"string"==typeof t?document.querySelector(t):t.jquery?t[0]:t};var r,o=(r=n(21))&&r.__esModule?r:{default:r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(0);var i="__metal_data__",a=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return r(e,null,[{key:"get",value:function(e,t,n){return e[i]||(e[i]={}),t?(!(0,o.isDef)(e[i][t])&&(0,o.isDef)(n)&&(e[i][t]=n),e[i][t]):e[i]}},{key:"has",value:function(e){return!!e[i]}},{key:"set",value:function(e,t,n){return e[i]||(e[i]={}),t&&(0,o.isDef)(n)?(e[i][t]=n,e[i][t]):e[i]}}]),e}();t.default=a},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){"string"==typeof e?e=document.querySelectorAll(e):e._node?e=[e._node]:e._nodes?e=e._nodes:e.nodeType===Node.ELEMENT_NODE&&(e=[e]);e.forEach((function(e){e.disabled=t,t?e.classList.add("disabled"):e.classList.remove("disabled")}))}},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.abstractMethod=function(){throw Error("Unimplemented abstract method")},t.disableCompatibilityMode=function(){r=void 0},t.enableCompatibilityMode=a,t.getCompatibilityModeData=function(){void 0===r&&"undefined"!=typeof window&&window.__METAL_COMPATIBILITY__&&a(window.__METAL_COMPATIBILITY__);return r},t.getFunctionName=function(e){if(!e.name){var t=e.toString();e.name=t.substring(9,t.indexOf("("))}return e.name},t.getStaticProperty=function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:u,o=n+"_MERGED";if(!t.hasOwnProperty(o)){var i=t.hasOwnProperty(n)?t[n]:null;t.__proto__&&!t.__proto__.isPrototypeOf(Function)&&(i=r(i,e(t.__proto__,n,r))),t[o]=i}return t[o]},t.getUid=function(e,t){if(e){var n=e[i];return t&&!e.hasOwnProperty(i)&&(n=null),n||(e[i]=o++)}return o++},t.identityFunction=function(e){return e},t.isBoolean=function(e){return"boolean"==typeof e},t.isDef=c,t.isDefAndNotNull=function(e){return c(e)&&!l(e)},t.isDocument=function(e){return e&&"object"===(void 0===e?"undefined":n(e))&&9===e.nodeType},t.isDocumentFragment=function(e){return e&&"object"===(void 0===e?"undefined":n(e))&&11===e.nodeType},t.isElement=function(e){return e&&"object"===(void 0===e?"undefined":n(e))&&1===e.nodeType},t.isFunction=function(e){return"function"==typeof e},t.isNull=l,t.isNumber=function(e){return"number"==typeof e},t.isWindow=function(e){return null!==e&&e===e.window}
6417,t.isObject=function(e){var t=void 0===e?"undefined":n(e);return"object"===t&&null!==e||"function"===t},t.isPromise=function(e){return e&&"object"===(void 0===e?"undefined":n(e))&&"function"==typeof e.then},t.isString=function(e){return"string"==typeof e||e instanceof String},t.isServerSide=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{checkEnv:!0},n=void 0!==e&&!e.browser;n&&t.checkEnv&&(n=void 0!==e.env&&!0);return n},t.nullFunction=function(){};var r=void 0,o=1,i=t.UID_PROPERTY="core_"+(1e9*Math.random()>>>0);function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};r=e}function u(e,t){return e||t}function c(e){return void 0!==e}function l(e){return null===e}}).call(this,n(12))},function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function u(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var c,l=[],s=!1,f=-1;function d(){s&&c&&(s=!1,c.length?l=c.concat(l):f=-1,l.length&&p())}function p(){if(!s){var e=u(d);s=!0;for(var t=l.length;t;){for(c=l,l=[];++f<t;)c&&c[f].run();f=-1,t=l.length}c=null,s=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function v(e,t){this.fun=e,this.array=t}function y(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];l.push(new v(e,t)),1!==l.length||s||u(p)},v.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=y,o.addListener=y,o.once=y,o.off=y,o.removeListener=y,o.removeAllListeners=y,o.emit=y,o.prependListener=y,o.prependOnceListener=y,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t,n){var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=(0,((r=n(14))&&r.__esModule?r:{default:r}).default)((function(e){return e.split("").map((function(e){return e.charCodeAt()})).join("")}));t.default=o},function(e,t,n){(function(t){var n=/^\[object .+?Constructor\]$/,r="object"==typeof t&&t&&t.Object===Object&&t,o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();var a,u=Array.prototype,c=Function.prototype,l=Object.prototype,s=i["__core-js_shared__"],f=(a=/[^.]+$/.exec(s&&s.keys&&s.keys.IE_PROTO||""))?"Symbol(src)_1."+a:"",d=c.toString,p=l.hasOwnProperty,v=l.toString,y=RegExp("^"+d.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),h=u.splice,m=S(i,"Map"),b=S(Object,"create");function g(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function _(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function w(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function O(e,t){for(var n,r,o=e.length;o--;)if((n=e[o][0])===(r=t)||n!=n&&r!=r)return o;return-1}function j(e){return!(!T(e)||(t=e,f&&f in t))&&(function(e){var t=T(e)?v.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?y:n).test(function(e){if(null!=e){try{return d.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e));var t}function E(e,t){var n,r,o=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map}function S(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return j(n)?n:void 0}function P(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a),a};return n.cache=new(P.Cache||w),n}function T(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}g.prototype.clear=function(){this.__data__=b?b(null):{}},g.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},g.prototype.get=function(e){var t=this.__data__;if(b){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return p.call(t,e)?t[e]:void 0},g.prototype.has=function(e){var t=this.__data__;return b?void 0!==t[e]:p.call(t,e)},g.prototype.set=function(e,t){return this.__data__[e]=b&&void 0===t?"__lodash_hash_undefined__":t,this},_.prototype.clear=function(){this.__data__=[]},_.prototype.delete=function(e){var t=this.__data__,n=O(t,e);return!(n<0)&&(n==t.length-1?t.pop():h.call(t,n,1),!0)},_.prototype.get=function(e){var t=this.__data__,n=O(t,e);return n<0?void 0:t[n][1]},_.prototype.has=function(e){return O(this.__data__,e)>-1},_.prototype.set=function(e,t){var n=this.__data__,r=O(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},w.prototype.clear=function(){this.__data__={hash:new g,map:new(m||_),string:new g}},w.prototype.delete=function(e){return E(this,e).delete(e)},w.prototype.get=function(e){return E(this,e).get(e)},w.prototype.has=function(e){return E(this,e).has(e)},w.prototype.set=function(e,t){return E(this,e).set(e,t),this},P.Cache=w,e.exports=P}).call(this,n(1))}
6417,function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new FormData,a=arguments.length>2?arguments[2]:void 0;return Object.entries(t).forEach((function(t){var u=i(t,2),c=u[0],l=u[1],s=a?"".concat(a,"[").concat(c,"]"):c;Array.isArray(l)?l.forEach((function(t){e(o({},s,t),n)})):!(0,r.isObject)(l)||l instanceof File?n.append(s,l):e(l,n,s)})),n};var r=n(0);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e))&&"[object Arguments]"!==Object.prototype.toString.call(e))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e.replace(n,"$1")};var n=/^(?:p_p_id)?_(.*)_.*$/},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if("string"!=typeof e)throw new TypeError("portletId must be a string");return"_".concat(e,"_")}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.PortletConstants=void 0;var n={EDIT:"edit",HELP:"help",VIEW:"view",MAXIMIZED:"maximized",MINIMIZED:"minimized",NORMAL:"normal",FULL:"cacheLevelFull",PAGE:"cacheLevelPage",PORTLET:"cacheLevelPortlet"};t.PortletConstants=n;var r=n;t.default=r},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.validateState=t.validatePortletId=t.validateParameters=t.validateForm=t.validateArguments=t.getUrl=t.getUpdatedPublicRenderParameters=t.generatePortletModeAndWindowStateString=t.generateActionUrl=t.encodeFormAsString=t.decodeUpdateString=void 0;var r=n(0);function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}t.decodeUpdateString=function(e,t){var n=e&&e.portlets?e.portlets:{};try{var r=JSON.parse(t);if(r.portlets)Object.keys(n).forEach((function(t){var o=r.portlets[t].state,i=n[t].state;if(!o||!i)throw new Error("Invalid update string.\nold state=".concat(i,"\nnew state=").concat(o));p(e,o,t)&&(n[t]=r.portlets[t])}))}catch(e){}return n};var a=function(e,t){for(var n=[],r=function(r){var o=t.elements[r],a=o.name,u=o.nodeName.toUpperCase(),c="INPUT"===u?o.type.toUpperCase():"",l=o.value;if(a&&!o.disabled&&"FILE"!==c)if("SELECT"===u&&o.multiple)i(o.options).forEach((function(t){if(t.checked){var r=t.value,o=encodeURIComponent(e+a)+"="+encodeURIComponent(r);n.push(o)}}));else if("CHECKBOX"!==c&&"RADIO"!==c||o.checked){var s=encodeURIComponent(e+a)+"="+encodeURIComponent(l);n.push(s)}},o=0;o<t.elements.length;o++)r(o);return n.join("&")};t.encodeFormAsString=a;var u=function(e,t){var n="";return Array.isArray(t)&&(0===t.length?n+="&"+encodeURIComponent(e)+"=":t.forEach((function(t){n+="&"+encodeURIComponent(e),n+=null===t?"=":"="+encodeURIComponent(t)}))),n};t.generateActionUrl=function(e,t,n){var r={credentials:"same-origin",method:"POST",url:t};if(n)if("multipart/form-data"===n.enctype){var o=new FormData(n);r.body=o}else{var i=a(e,n);"GET"===(n.method?n.method.toUpperCase():"GET")?(t.indexOf("?")>=0?t+="&".concat(i):t+="?".concat(i),r.url=t):(r.body=i,r.headers={"Content-Type":"application/x-www-form-urlencoded"})}return r};var c=function(e,t,n,r,o){var i="";if(e.portlets&&e.portlets[t]){var a=e.portlets[t];
6417if(a&&a.state&&a.state.parameters){var c=a.state.parameters[n];void 0!==c&&(i+=u("p_r_p_"===r?o:"priv_r_p_"===r?t+"priv_r_p_"+n:t+n,c))}}return i},l=function(e,t){var n="";if(e.portlets){var r=e.portlets[t];if(r.state){var o=r.state;n+="&p_p_mode="+encodeURIComponent(o.portletMode),n+="&p_p_state="+encodeURIComponent(o.windowState)}}return n};t.generatePortletModeAndWindowStateString=l;t.getUpdatedPublicRenderParameters=function(e,t,n){var r={};if(e&&e.portlets){var o=e.portlets[t];if(o&&o.pubParms){var i=o.pubParms;Object.keys(i).forEach((function(o){if(!f(e,t,n,o)){var a=i[o];r[a]=n.parameters[o]}}))}}return r};t.getUrl=function(e,t,n,r,o,i){var a="cacheLevelPage",s="",f="";if(e&&e.portlets){"RENDER"===t&&void 0===n&&(n=null);var p=e.portlets[n];if(p&&("RESOURCE"===t?(f=decodeURIComponent(p.encodedResourceURL),o&&(a=o),f+="&p_p_cacheability="+encodeURIComponent(a),i&&(f+="&p_p_resource_id="+encodeURIComponent(i))):"RENDER"===t&&null!==n?f=decodeURIComponent(p.encodedRenderURL):"RENDER"===t?f=decodeURIComponent(e.encodedCurrentURL):"ACTION"===t?(f=decodeURIComponent(p.encodedActionURL),f+="&p_p_hub="+encodeURIComponent("0")):"PARTIAL_ACTION"===t&&(f=decodeURIComponent(p.encodedActionURL),f+="&p_p_hub="+encodeURIComponent("1")),"RESOURCE"!==t||"cacheLevelFull"!==a)){if(n&&(f+=l(e,n)),n&&(s="",p.state&&p.state.parameters)){var v=p.state.parameters;Object.keys(v).forEach((function(t){d(e,n,t)||(s+=c(e,n,t,"priv_r_p_"))})),f+=s}if(e.prpMap){s="";var y={};Object.keys(e.prpMap).forEach((function(t){Object.keys(e.prpMap[t]).forEach((function(n){var r=e.prpMap[t][n].split("|");Object.hasOwnProperty.call(y,t)||(y[t]=c(e,r[0],r[1],"p_r_p_",t),s+=y[t])}))})),f+=s}}}r&&(s="",Object.keys(r).forEach((function(e){s+=u(n+e,r[e])})),f+=s);return Promise.resolve(f)};var s=function(e,t){var n=!1;void 0===e&&void 0===t&&(n=!0),void 0!==e&&void 0!==t||(n=!1),e.length!==t.length&&(n=!1);for(var r=e.length-1;r>=0;r--)e[r]!==t[r]&&(n=!1);return n},f=function(e,t,n,r){var o=!1;if(e&&e.portlets){var i=e.portlets[t];if(n.parameters[r]&&i.state.parameters[r]){var a=n.parameters[r],u=i.state.parameters[r];o=s(a,u)}}return o},d=function(e,t,n){var r=!1;if(e&&e.portlets){var o=e.portlets[t];if(o&&o.pubParms)r=Object.keys(o.pubParms).includes(n)}return r},p=function(e,t,n){var r=!1;if(e&&e.portlets&&e.portlets[n]){var o=e.portlets[n].state;if(!t.portletMode||!t.windowState||!t.parameters)throw new Error("Error decoding state: ".concat(t));if(t.porletMode!==o.portletMode||t.windowState!==o.windowState)r=!0;else Object.keys(t.parameters).forEach((function(e){var n=t.parameters[e],i=o.parameters[e];s(n,i)||(r=!0)})),Object.keys(o.parameters).forEach((function(e){t.parameters[e]||(r=!0)}))}return r};t.validateArguments=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];if(e.length<t)throw new TypeError("Too few arguments provided: Number of arguments: ".concat(e.length));if(e.length>n)throw new TypeError("Too many arguments provided: ".concat([].join.call(e,", ")));if(Array.isArray(r))for(var i=Math.min(e.length,r.length)-1;i>=0;i--){if(o(e[i])!==r[i])throw new TypeError("Parameter ".concat(i," is of type ").concat(o(e[i])," rather than the expected type ").concat(r[i]));if(null===e[i]||void 0===e[i])throw new TypeError("Argument is ".concat(o(e[i])))}};t.validateForm=function(e){if(!(e instanceof HTMLFormElement))throw new TypeError("Element must be an HTMLFormElement");var t=e.method?e.method.toUpperCase():void 0;if(t&&"GET"!==t&&"POST"!==t)throw new TypeError("Invalid form method ".concat(t,". Allowed methods are GET & POST"));var n=e.enctype;if(n&&"application/x-www-form-urlencoded"!==n&&"multipart/form-data"!==n)throw new TypeError("Invalid form enctype ".concat(n,". Allowed: 'application/x-www-form-urlencoded' & 'multipart/form-data'"));if(n&&"multipart/form-data"===n&&"POST"!==t)throw new TypeError("Invalid method with multipart/form-data. Must be POST");if(!n||"application/x-www-form-urlencoded"===n)for(var r=e.elements.length,o=0;o<r;o++)if("INPUT"===e.elements[o].nodeName.toUpperCase()&&"FILE"===e.elements[o].type.toUpperCase())throw new TypeError("Mu
6417st use enctype = 'multipart/form-data' with input type FILE.")};var v=function(e){if(!(0,r.isDefAndNotNull)(e))throw new TypeError("The parameter object is: ".concat(o(e)));Object.keys(e).forEach((function(t){if(!Array.isArray(e[t]))throw new TypeError("".concat(t," parameter is not an array"));if(!e[t].length)throw new TypeError("".concat(t," parameter is an empty array"))}))};t.validateParameters=v;t.validatePortletId=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e.portlets&&Object.keys(e.portlets).includes(t)};t.validateState=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};v(e.parameters);var n=e.portletMode;if(!(0,r.isString)(n))throw new TypeError("Invalid parameters. portletMode is ".concat(o(n)));var i=t.allowedPM;if(!i.includes(n.toLowerCase()))throw new TypeError("Invalid portletMode=".concat(n," is not in ").concat(i));var a=e.windowState;if(!(0,r.isString)(a))throw new TypeError("Invalid parameters. windowState is ".concat(o(a)));var u=t.allowedWS;if(!u.includes(a.toLowerCase()))throw new TypeError("Invalid windowState=".concat(a," is not in ").concat(u))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var o=function(e){function t(e,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return o.emitter_=e,o.event_=n,o.listener_=r,o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"disposeInternal",value:function(){this.removeListener(),this.emitter_=null,this.listener_=null}},{key:"removeListener",value:function(){this.emitter_.isDisposed()||this.emitter_.removeListener(this.event_,this.listener_)}}]),t}(n(0).Disposable);t.default=o},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if(e._node||e._nodes)return e.nodeType?e:e._node||null;return e}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t,n,r){var i=!1;if(t=(0,o.default)(t)){r||((r={left:(r=t.getBoundingClientRect()).left+window.scrollX,top:r.top+window.scrollY}).bottom=r.top+t.offsetHeight,r.right=r.left+t.offsetWidth),n||(n=window),n=(0,o.default)(n);var a={};if(a.left=n.scrollX,a.right=a.left+n.innerWidth,a.top=n.scrollY,a.bottom=a.top+n.innerHeight,i=r.bottom<=a.bottom&&r.left>=a.left&&r.right<=a.right&&r.top>=a.top){var u=n.frameElement;if(u){var c=u.getBoundingClientRect(),l=(c={left:c.left+window.scrollX,top:c.top+window.scrollY}).left-a.left;r.left+=l,r.right+=l;var s=c.top-a.top;r.top+=s,r.bottom+=s,i=e(t,n.parent,r)}}}return i};var r,o=(r=n(7))&&r.__esModule?r:{default:r}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=null;if((0,r.isDef)(e)&&"FORM"===e.nodeName&&(0,r.isString)(t)){var o=e.dataset.fmNamespace||"";n=e.elements[o+t]||null}return n};var r=n(0)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var o=function(e){function t(e,n,r,o){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n,r));return i.capture_=o,i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"removeListener",value:function(){this.emitter_.removeEventListener(this.event_,this.listener_,this.capture_)}}]),t}(n(5).EventHandle);t.default=o},function(e,t,n){"use strict";
6417Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(2),i=n(0);var a=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return r(e,null,[{key:"checkAnimationEventName",value:function(){return void 0===e.animationEventName_&&(e.animationEventName_={animation:e.checkAnimationEventName_("animation"),transition:e.checkAnimationEventName_("transition")}),e.animationEventName_}},{key:"checkAnimationEventName_",value:function(t){var n=["Webkit","MS","O",""],r=i.string.replaceInterval(t,0,1,t.substring(0,1).toUpperCase()),o=[r+"End",r+"End",r+"End",t+"end"];e.animationElement_||(e.animationElement_=document.createElement("div"));for(var a=0;a<n.length;a++)if(void 0!==e.animationElement_.style[n[a]+r])return n[a].toLowerCase()+o[a];return t+"end"}},{key:"checkAttrOrderChange",value:function(){if(void 0===e.attrOrderChange_){var t=document.createElement("div");(0,o.append)(t,'<div data-component="" data-ref=""></div>'),e.attrOrderChange_='<div data-component="" data-ref=""></div>'!==t.innerHTML}return e.attrOrderChange_}}]),e}();a.animationElement_=void 0,a.animationEventName_=void 0,a.attrOrderChange_=void 0,t.default=a},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(!(0,o.isDef)(e)||"FORM"!==e.nodeName||!(0,o.isObject)(t))return;Object.entries(t).forEach((function(t){var n,r,o=(r=2,function(e){if(Array.isArray(e))return e}(n=t)||function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}return n}}(n,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()),a=o[0],u=o[1],c=(0,i.default)(e,a);c&&(c.value=u)}))};var r,o=n(0),i=(r=n(23))&&r.__esModule?r:{default:r}},function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"portlet",{enumerable:!0,get:function(){return v.default}});var o=Q(n(28)),i=Q(n(29)),a=Q(n(30)),u=Q(n(31)),c=Q(n(32)),l=Q(n(6)),s=n(33),f=n(42),d=n(43),p=n(44),v=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var t=G();if(t&&t.has(e))return t.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}n.default=e,t&&t.set(e,n);return n}(n(45)),y=Q(n(52)),h=Q(n(56)),m=Q(n(57)),b=Q(n(58)),g=Q(n(4)),_=Q(n(59)),w=Q(n(23)),O=Q(n(15)),j=Q(n(60)),E=Q(n(26)),S=Q(n(68)),P=Q(n(69)),T=Q(n(70)),L=Q(n(21)),k=Q(n(7)),A=Q(n(16)),M=Q(n(17)),I=n(71),C=Q(n(22)),x=Q(n(72)),D=Q(n(73)),U=Q(n(74)),R=Q(n(75)),N=Q(n(76)),F=Q(n(77)),H=Q(n(78)),q=Q(n(3)),z=Q(n(79)),B=Q(n(80)),W=n(81),V=Q(n(13)),$=Q(n(10));function G(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return G=function(){return e},e}function Q(e){return e&&e.__esModule?e:{default:e}}Liferay=window.Liferay||{},Liferay.BREAKPOINTS=l.default,Liferay.component=s.component,Liferay.componentReady=s.componentReady,Liferay.destroyComponent=s.destroyComponent,Liferay.destroyComponents=s.destroyComponents,Liferay.destroyUnfulfilledPromises=s.destroyUnfulfilledPromises,Liferay.getComponentCache=s.getComponentCache,Liferay.initComponentCache=s.initComponentCache,Liferay.Address={getCountries:m.default,getRegions:b.default},Liferay.DynamicSelect=c.default,Liferay.Language={get:function(e){return e}},Liferay.LayoutExporter={all:f.hideLayoutPane,details:f.toggleLayoutDetails,icons:(0,f.getLayoutIcons)(),proposeLayout:f.proposeLayout,publishToLive:f.publishToLive,selected:f.showLayoutPane},Liferay.Portal={Tabs:{show:d.showTab},ToolTip:{show:p.showTooltip}},Liferay.Portlet=Liferay.Portlet||{},Liferay.Portlet.minimize=v.minimizePortlet,Liferay.Portlet.openModal=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];Liferay.Loader.require("frontend-js-web/liferay/modal/Modal",(function(e){e.openPortletModal.apply(e,t)}))},Liferay.Portlet.openWindow=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];Liferay.Loader.require("frontend-js-web/liferay/modal/Modal",(function(e){e.openPortletWindow.apply(e,t)}))},Liferay.SideNavigation=y.default,Liferay.Util=Liferay.Util||{},Liferay.Util.MAP_HTML_CHARS_ESCAPED=I.MAP_HTML_CHARS_ESCAPED,Liferay.Util.addParams=h.default,Liferay.Util.disableEsc=function(){document.all&&27===window.event.keyCode&&(window.event.returnValue=!1)},Liferay.Util.escape=o.default,Liferay.Util.escapeHTML=I.escapeHTML,Liferay.Util.fetch=g.default,Liferay.Util.focu
6417sFormField=_.default,Liferay.Util.formatStorage=S.default,Liferay.Util.formatXML=P.default,Liferay.Util.getCropRegion=T.default,Liferay.Util.getDOM=L.default,Liferay.Util.getElement=k.default,Liferay.Util.getFormElement=w.default,Liferay.Util.getPortletId=A.default,Liferay.Util.getPortletNamespace=M.default,Liferay.Util.groupBy=i.default,Liferay.Util.inBrowserView=C.default,Liferay.Util.isEqual=a.default,Liferay.Util.isPhone=x.default,Liferay.Util.isTablet=D.default,Liferay.Util.navigate=U.default,Liferay.Util.ns=N.default,Liferay.Util.objectToFormData=O.default,Liferay.Util.objectToURLSearchParams=F.default,Liferay.Util.normalizeFriendlyURL=R.default,Liferay.Util.PortletURL={createActionURL:H.default,createPortletURL:q.default,createRenderURL:z.default,createResourceURL:B.default},Liferay.Util.postForm=j.default,Liferay.Util.setFormValues=E.default,Liferay.Util.toCharCode=V.default,Liferay.Util.toggleDisabled=$.default,Liferay.Util.openModal=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];Liferay.Loader.require("frontend-js-web/liferay/modal/Modal",(function(e){e.openModal.apply(e,t)}))},Liferay.Util.openToast=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];Liferay.Loader.require("frontend-js-web/liferay/toast/commands/OpenToast.es",(function(e){e.openToast.apply(e,t)}))},Liferay.Util.Session={get:W.getSessionValue,set:W.setSessionValue},Liferay.Util.unescape=u.default,Liferay.Util.unescapeHTML=I.unescapeHTML},function(e,t,n){(function(t){var n=/[&<>"'`]/g,r=RegExp(n.source),o="object"==typeof t&&t&&t.Object===Object&&t,i="object"==typeof self&&self&&self.Object===Object&&self,a=o||i||Function("return this")();var u,c=(u={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","`":"&#96;"},function(e){return null==u?void 0:u[e]}),l=Object.prototype.toString,s=a.Symbol,f=s?s.prototype:void 0,d=f?f.toString:void 0;function p(e){if("string"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==l.call(e)}(e))return d?d.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}e.exports=function(e){var t;return(e=null==(t=e)?"":p(t))&&r.test(e)?e.replace(n,c):e}}).call(this,n(1))},function(e,t,n){(function(e,n){var r="[object Arguments]",o="[object Map]",i="[object Object]",a="[object Set]",u=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,c=/^\w*$/,l=/^\./,s=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,f=/\\(\\)?/g,d=/^\[object .+?Constructor\]$/,p=/^(?:0|[1-9]\d*)$/,v={};v["[object Float32Array]"]=v["[object Float64Array]"]=v["[object Int8Array]"]=v["[object Int16Array]"]=v["[object Int32Array]"]=v["[object Uint8Array]"]=v["[object Uint8ClampedArray]"]=v["[object Uint16Array]"]=v["[object Uint32Array]"]=!0,v[r]=v["[object Array]"]=v["[object ArrayBuffer]"]=v["[object Boolean]"]=v["[object DataView]"]=v["[object Date]"]=v["[object Error]"]=v["[object Function]"]=v[o]=v["[object Number]"]=v[i]=v["[object RegExp]"]=v[a]=v["[object String]"]=v["[object WeakMap]"]=!1;var y="object"==typeof e&&e&&e.Object===Object&&e,h="object"==typeof self&&self&&self.Object===Object&&self,m=y||h||Function("return this")(),b=t&&!t.nodeType&&t,g=b&&"object"==typeof n&&n&&!n.nodeType&&n,_=g&&g.exports===b&&y.process,w=function(){try{return _&&_.binding("util")}catch(e){}}(),O=w&&w.isTypedArray;function j(e,t,n,r){for(var o=-1,i=e?e.length:0;++o<i;){var a=e[o];t(r,a,n(a),e)}return r}function E(e,t){for(var n=-1,r=e?e.length:0;++n<r;)if(t(e[n],n,e))return!0;return!1}function S(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}function P(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function T(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var L,k,A,M=Array.prototype,I=Function.prototype,C=Object.prototype,x=m["__core-js_shared__"],D=(L=/[^.]+$/.exec(x&&x.keys&&x.keys.IE_PROTO||""))?"Symbol(src)_1."+L:"",U=I.toString,R=C.hasOwnProperty,N=C.toString,F=RegExp("^"+U.call(R).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),H=m.Symbol,q=m.Uint8Array,z=C.propertyIsEnumerable,B=M.splice,W=(k=Object.keys,A=Object,function(e){return k(A(e))}),V=Pe(m,"DataView"),$=Pe(m,"Map"),G=Pe(m,"Promise"),Q=Pe(m,"Set"),X=Pe(m,"WeakMap"),Y=Pe(Object,"create"),K=xe(V),J=xe($),Z=xe(G),ee=xe(Q),te=xe(X),ne=H?H.prototype:void 0,re=ne?ne.valueOf:void 0,oe=ne?ne.toString:void 0;function ie(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ae(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ue(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ce(e){var t=-1,n=e?e.length:0;for(this.__data__=new ue;++t<n;)this.add(e[t])}function le(e){this.__data__=new ae(e)}function se(e,t){var n=qe(e)||He(e)?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],r=n.length,o=!!r;for(var i in e)!t&&!R.call(e,i)||o&&("length"==i||Le(i,r))||n.push(i);return n}function fe(e,t){for(var n=e.length;n--;)if(Fe(e[n][0],t))return n;return-1}function de(e,t,n,r){return ye(e,(function(e,o,i){t(r,e,n(e),i)})),r}ie.prototype.clear=function(){this.__data__=Y?Y(null):{}},ie.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},ie.prototype.get=function(e){var t=this.__data__;if(Y){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return R.call(t,e)?t[e]:void 0},ie.prototype.has=function(e){var t=this.__data__;return Y?void 0!==t[e]:R.call(t,e)},ie.prototype.set=function(e,t){return this.__data__[e]=Y&&void 0===t?"__lodash_hash_undefined__":t,this},ae.prototype.clear=function(){this.__data__=[]},ae.prototype.delete=function(e){var t=this.__data__,n=fe(t,e);return!(n<0)&&(n==t.length-1?t.pop():B.call(t,n,1),!0)},ae.prototype.get=function(e){var t=this.__data__,n=fe(t,e);return n<0?void 0:t[n][1]},ae.prototype.has=function(e){return fe(this.__data__,e)>-1},ae.prototype.set=function(e,t){var n=this.__data__,r=fe(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},ue.prototype.clear=function(){this.__data__={hash:new ie,map:new($||ae),string:new ie}},ue.prototype.delete=function(e){return Se(this,e).delete(e)},ue.prototype.get=function(e){return Se(this,e).get(e)},ue.prototype.has=function(e){return Se(this,e).has(e)},ue.prototype.set=function(e,t){return Se(this,e).set(e,t),this},ce.prototype.add=ce.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},ce.prototype.has=function(e){return this.__data__.has(e)},le.prototype.clear=function(){this.__data__=new ae},le.prototype.delete=function(e){return this.__data__.delete(e)},le.prototype.get=function(e){return this.__data__.get(e)},le.prototype.has=function(e){return this.__data__.has(e)},le.prototype.set=function(e,t){var n=this.__data__;if(n instanceof ae){var r=n.__data__;if(!$||r.length<199)return r.push([e,t]),this;n=this.__data__=new ue(r)}return n.set(e,t),this};var pe,ve,ye=(pe=function(e,t){return e&&he(e,t,Xe)},function(e,t){if(null==e)return e;if(!ze(e))return pe(e,t);for(var n=e.length,r=ve?n:-1,o=Object(e);(ve?r--:++r<n)&&!1!==t(o[r],r,o););return e}),he=function(e){return function(t,n,r){for(var o=-1,i=Object(t),a=r
vendor: 17,452 bytes, line 6417
6417(t),u=a.length;u--;){var c=a[e?u:++o];if(!1===n(i[c],c,i))break}return t}}();function me(e,t){for(var n=0,r=(t=ke(t,e)?[t]:je(t)).length;null!=e&&n<r;)e=e[Ce(t[n++])];return n&&n==r?e:void 0}function be(e,t){return null!=e&&t in Object(e)}function ge(e,t,n,u,c){return e===t||(null==e||null==t||!Ve(e)&&!$e(t)?e!=e&&t!=t:function(e,t,n,u,c,l){var s=qe(e),f=qe(t),d="[object Array]",p="[object Array]";s||(d=(d=Te(e))==r?i:d);f||(p=(p=Te(t))==r?i:p);var v=d==i&&!S(e),y=p==i&&!S(t),h=d==p;if(h&&!v)return l||(l=new le),s||Qe(e)?Ee(e,t,n,u,c,l):function(e,t,n,r,i,u,c){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!r(new q(e),new q(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Fe(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case o:var l=P;case a:var s=2&u;if(l||(l=T),e.size!=t.size&&!s)return!1;var f=c.get(e);if(f)return f==t;u|=1,c.set(e,t);var d=Ee(l(e),l(t),r,i,u,c);return c.delete(e),d;case"[object Symbol]":if(re)return re.call(e)==re.call(t)}return!1}(e,t,d,n,u,c,l);if(!(2&c)){var m=v&&R.call(e,"__wrapped__"),b=y&&R.call(t,"__wrapped__");if(m||b){var g=m?e.value():e,_=b?t.value():t;return l||(l=new le),n(g,_,u,c,l)}}if(!h)return!1;return l||(l=new le),function(e,t,n,r,o,i){var a=2&o,u=Xe(e),c=u.length,l=Xe(t).length;if(c!=l&&!a)return!1;var s=c;for(;s--;){var f=u[s];if(!(a?f in t:R.call(t,f)))return!1}var d=i.get(e);if(d&&i.get(t))return d==t;var p=!0;i.set(e,t),i.set(t,e);var v=a;for(;++s<c;){f=u[s];var y=e[f],h=t[f];if(r)var m=a?r(h,y,f,t,e,i):r(y,h,f,e,t,i);if(!(void 0===m?y===h||n(y,h,r,o,i):m)){p=!1;break}v||(v="constructor"==f)}if(p&&!v){var b=e.constructor,g=t.constructor;b==g||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&b instanceof b&&"function"==typeof g&&g instanceof g||(p=!1)}return i.delete(e),i.delete(t),p}(e,t,n,u,c,l)}(e,t,ge,n,u,c))}function _e(e){return!(!Ve(e)||function(e){return!!D&&D in e}(e))&&(Be(e)||S(e)?F:d).test(xe(e))}function we(e){return"function"==typeof e?e:null==e?Ye:"object"==typeof e?qe(e)?function(e,t){if(ke(e)&&Ae(t))return Me(Ce(e),t);return function(n){var r=function(e,t,n){var r=null==e?void 0:me(e,t);return void 0===r?n:r}(n,e);return void 0===r&&r===t?function(e,t){return null!=e&&function(e,t,n){t=ke(t,e)?[t]:je(t);var r,o=-1,i=t.length;for(;++o<i;){var a=Ce(t[o]);if(!(r=null!=e&&n(e,a)))break;e=e[a]}if(r)return r;return!!(i=e?e.length:0)&&We(i)&&Le(a,i)&&(qe(e)||He(e))}(e,t,be)}(n,e):ge(t,r,void 0,3)}}(e[0],e[1]):function(e){var t=function(e){var t=Xe(e),n=t.length;for(;n--;){var r=t[n],o=e[r];t[n]=[r,o,Ae(o)]}return t}(e);if(1==t.length&&t[0][2])return Me(t[0][0],t[0][1]);return function(n){return n===e||function(e,t,n,r){var o=n.length,i=o,a=!r;if(null==e)return!i;for(e=Object(e);o--;){var u=n[o];if(a&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++o<i;){var c=(u=n[o])[0],l=e[c],s=u[1];if(a&&u[2]){if(void 0===l&&!(c in e))return!1}else{var f=new le;if(r)var d=r(l,s,c,e,t,f);if(!(void 0===d?ge(s,l,r,3,f):d))return!1}}return!0}(n,e,t)}}(e):ke(t=e)?(n=Ce(t),function(e){return null==e?void 0:e[n]}):function(e){return function(t){return me(t,e)}}(t);var t,n}function Oe(e){if(n=(t=e)&&t.constructor,r="function"==typeof n&&n.prototype||C,t!==r)return W(e);var t,n,r,o=[];for(var i in Object(e))R.call(e,i)&&"constructor"!=i&&o.push(i);return o}function je(e){return qe(e)?e:Ie(e)}function Ee(e,t,n,r,o,i){var a=2&o,u=e.length,c=t.length;if(u!=c&&!(a&&c>u))return!1;var l=i.get(e);if(l&&i.get(t))return l==t;var s=-1,f=!0,d=1&o?new ce:void 0;for(i.set(e,t),i.set(t,e);++s<u;){var p=e[s],v=t[s];if(r)var y=a?r(v,p,s,t,e,i):r(p,v,s,e,t,i);if(void 0!==y){if(y)continue;f=!1;break}if(d){if(!E(t,(function(e,t){if(!d.has(t)&&(p===e||n(p,e,r,o,i)))return d.add(t)}))){f=!1;break}}else if(p!==v&&!n(p,v,r,o,i)){f=!1;break}}return i.delete(e),i.delete(t),f}function Se(e,t){var n,r,o=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map}function Pe(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return _e(n)?n:void 0}var Te=function(e){return N.call(e)};function Le(e,t){return!!(t=null==t?9007199254740991:t)&&("number"==typeof e||p.test(e))&&e>-1&&e%1==0&&e<t}function ke(e,t){if(qe(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!Ge(e))||(c.test(e)||!u.test(e)||null!=t&&e in Object(t))}function Ae(e){return e==e&&!Ve(e)}function Me(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}(V&&"[object DataView]"!=Te(new V(new ArrayBuffer(1)))||$&&Te(new $)!=o||G&&"[object Promise]"!=Te(G.resolve())||Q&&Te(new Q)!=a||X&&"[object WeakMap]"!=Te(new X))&&(Te=function(e){var t=N.call(e),n=t==i?e.constructor:void 0,r=n?xe(n):void 0;if(r)switch(r){case K:return"[object DataView]";case J:return o;case Z:return"[object Promise]";case ee:return a;case te:return"[object WeakMap]"}return t});var Ie=Ne((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(Ge(e))return oe?oe.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(t);var n=[];return l.test(e)&&n.push(""),e.replace(s,(function(e,t,r,o){n.push(r?o.replace(f,"$1"):t||e)})),n}));function Ce(e){if("string"==typeof e||Ge(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function xe(e){if(null!=e){try{return U.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var De,Ue,Re=(De=function(e,t,n){R.call(e,n)?e[n].push(t):e[n]=[t]},function(e,t){var n=qe(e)?j:de,r=Ue?Ue():{};return n(e,De,we(t),r)});function Ne(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a),a};return n.cache=new(Ne.Cache||ue),n}function Fe(e,t){return e===t||e!=e&&t!=t}function He(e){return function(e){return $e(e)&&ze(e)}(e)&&R.call(e,"callee")&&(!z.call(e,"callee")||N.call(e)==r)}Ne.Cache=ue;var qe=Array.isArray;function ze(e){return null!=e&&We(e.length)&&!Be(e)}function Be(e){var t=Ve(e)?N.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}function We(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function Ve(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function $e(e){return!!e&&"object"==typeof e}function Ge(e){return"symbol"==typeof e||$e(e)&&"[object Symbol]"==N.call(e)}var Qe=O?function(e){return function(t){return e(t)}}(O):function(e){return $e(e)&&We(e.length)&&!!v[N.call(e)]};function Xe(e){return ze(e)?se(e):Oe(e)}function Ye(e){return e}n.exports=Re}).call(this,n(1),n(9)(e))},function(e,t,n){(function(e,n){var r="[object Arguments]",o="[object Map]",i="[object Object]",a="[object Set]",u=/^\[object .+?Constructor\]$/,c=/^(?:0|[1-9]\d*)$/,l={};l["[object Float32Array]"]=l["[object Float64Array]"]=l["[object Int8Array]"]=l["[object Int16Array]"]=l["[object Int32Array]"]=l["[object Uint8Array]"]=l["[object Uint8ClampedArray]"]=l["[object Uint16Array]"]=l["[object Uint32Array]"]=!0,l[r]=l["[object Array]"]=l["[object ArrayBuffer]"]=l["[object Boolean]"]=l["[object DataView]"]=l["[object Date]"]=l["[object Error]"]=l["[object Function]"]=l[o]=l["[object Number]"]=l[i]=l["[object RegExp]"]=l[a]=l["[object String]"]=l["[object WeakMap]"]=!1;var s="object"==typeof e&&e&&e.Object===Object&&e,f="object"==typeof self&&self&&self.Object===Object&&self,d=s||f||Function("return this")(),p=t&&!t.nodeType&&t,v=p&&"object"==typeof n&&n&&!n.nodeType&&n,y=v&&v.exports===p,h=y&&s.process,m=function(){try{return h&&h.binding&&h.binding("util")}catch(e){}}(),b=m&&m.isTypedArray;function g(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function _(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function w(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var O,j,E,S=Array.prototype,P=Function.prototype,T=Object.prototype,L=d["__core-js_shared__"],k=P.toString,A=T.hasOwnProperty,M=(O=/[^.]+$/.exec(L&&L.keys&&L.keys.IE_PROTO||""))?"Symbol(src)_1."+O:"",I=T.toString,C=RegExp("^"+k.call(A).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),x=y?d.Buffer:void 0,D=d.Symbol,U=d.Uint8Array,R=T.propertyIsEnumerable,N=S.splice,F=D?D.toStringTag:void 0,H=Object.getOwnPropertySymbols,q=x?x.isBuffer:void 0,z=(j=Object.keys,E=Object,function(e){return j(E(e))}),B=me(d,"DataView"),W=me(d,"Map"),V=me(d,"Promise"),$=me(d,"Set"),G=me(d,"WeakMap"),Q=me(Object,"create"),X=we(B),Y=we(W),K=we(V),J=we($),Z=we(G),ee=D?D.prototype:void 0,te=ee?ee.valueOf:void 0;function ne(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function re(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function oe(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ie(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new oe;++t<n;)this.add(e[t])}function ae(e){var t=this.__data__=new re(e);this.size=t.size}function ue(e,t){var n=Ee(e),r=!n&&je(e),o=!n&&!r&&Se(e),i=!n&&!r&&!o&&Ae(e),a=n||r||o||i,u=a?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],c=u.length;for(var l in e)!t&&!A.call(e,l)||a&&("length"==l||o&&("offset"==l||"parent"==l)||i&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||_e(l,c))||u.push(l);return u}function ce(e,t){for(var n=e.length;n--;)if(Oe(e[n][0],t))return n;return-1}function le(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":F&&F in Object(e)?function(e){var t=A.call(e,F),n=e[F];try{e[F]=void 0;var r=!0}catch(e){}var o=I.call(e);r&&(t?e[F]=n:delete e[F]);return o}(e):function(e){return I.call(e)}(e)}function se(e){return ke(e)&&le(e)==r}function fe(e,t,n,u,c){return e===t||(null==e||null==t||!ke(e)&&!ke(t)?e!=e&&t!=t:function(e,t,n,u,c,l){var s=Ee(e),f=Ee(t),d=s?"[object Array]":ge(e),p=f?"[object Array]":ge(t),v=(d=d==r?i:d)==i,y=(p=p==r?i:p)==i,h=d==p;if(h&&Se(e)){if(!Se(t))return!1;s=!0,v=!1}if(h&&!v)return l||(l=new ae),s||Ae(e)?ve(e,t,n,u,c,l):function(e,t,n,r,i,u,c){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!u(new U(e),new U(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Oe(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case o:var l=_;case a:var s=1&r;if(l||(l=w),e.size!=t.size&&!s)return!1;var f=c.get(e);if(f)return f==t;r|=2,c.set(e,t);var d=ve(l(e),l(t),r,i,u,c);return c.delete(e),d;case"[object Symbol]":if(te)return te.call(e)==te.call(t)}return!1}(e,t,d,n,u,c,l);if(!(1&n)){var m=v&&A.call(e,"__wrapped__"),b=y&&A.call(t,"__wrapped__");if(m||b){var g=m?e.value():e,O=b?t.value():t;return l||(l=new ae),c(g,O,n,u,l)}}if(!h)return!1;return l||(l=new ae),function(e,t,n,r,o,i){var a=1&n,u=ye(e),c=u.length,l=ye(t).length;if(c!=l&&!a)return!1;var s=c;for(;s--;){var f=u[s];if(!(a?f in t:A.call(t,f)))return!1}var d=i.get(e);if(d&&i.get(t))return d==t;var p=!0;i.set(e,t),i.set(t,e);var v=a;for(;++s<c;){f=u[s];var y=e[f],h=t[f];if(r)var m=a?r(h,y,f,t,e,i):r(y,h,f,e,t,i);if(!(void 0===m?y===h||o(y,h,n,r,i):m)){p=!1;break}v||(v="constructor"==f)}if(p&&!v){var b=e.constructor,g=t.constructor;b==g||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&b instanceof b&&"function"==typeof g&&g instanceof g||(p=!1)}return i.delete(e),i.delete(t),p}(e,t,n,u,c,l)}(e,t,n,u,fe,c))}function de(e){return!(!Le(e)||function(e){return!!M&&M in e}(e))&&(Pe(e)?C:u).test(we(e))}function pe(e){if(n=(t=e)&&t.constructor,r="function"==typeof n&&n.prototype||T,t!==r)return z(e);var t,n,r,o=[];for(var i in Object(e))A.call(e,i)&&"constructor"!=i&&o.push(i);return o}function ve(e,t,n,r,o,i){var a=1&n,u=e.length,c=t.length;if(u!=c&&!(a&&c>u))return!1;var l=i.get(e);if(l&&i.get(t))return l==t;var s=-1,f=!0,d=2&n?new ie:void 0;for(i.set(e,t),i.set(t,e);++s<u;){var p=e[s],v=t[s];if(r)var y=a?r(v,p,s,t,e,i):r(p,v,s,e,t,i);if(void 0!==y){if(y)continue;f=!1;break}if(d){if(!g(t,(function(e,t){if(a=t,!d.has(a)&&(p===e||o(p,e,n,r,i)))return d.push(t);var a}))){f=!1;break}}else if(p!==v&&!o(p,v,n,r,i)){f=!1;break}}return i.delete(e),i.delete(t),f}function ye(e){return function(e,t,n){var r=t(e);return Ee(e)?r:function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}(r,n(e))}(e,Me,be)}function he(e,t){var n,r,o=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map}function me(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return de(n)?n:void 0}ne.prototype.clear=function(){this.__data__=Q?Q(null):{},this.size=0},ne.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},ne.prototype.get=function(e){var t=this.__data__;if(Q){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return A.call(t,e)?t[e]:void 0},ne.prototype.has=function(e){var t=this.__data__;return Q?void 0!==t[e]:A.call(t,e)},ne.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Q&&void 0===t?"__lodash_hash_undefined__":t,this},re.prototype.clear=function(){this.__data__=[],this.size=0},re.prototype.delete=function(e){var t=this.__data__,n=ce(t,e);return!(n<0)&&(n==t.length-1?t.pop():N.call(t,n,1),--this.size,!0)},re.prototype.get=function(e){var t=this.__data__,n=ce(t,e);return n<0?void 0:t[n][1]},re.prototype.has=function(e){return ce(this.__data__,e)>-1},re.prototype.set=function(e,t){var n=this.__data__,r=ce(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},oe.prototype.clear=function(){this.size=0,this.__data__={hash:new ne,map:new(W||re),string:new ne}},oe.prototype.delete=function(e){var t=he(this,e).delete(e);return this.size-=t?1:0,t},oe.prototype.get=function(e){return he(this,e).get(e)},oe.prototype.has=function(e){return he(this,e).has(e)},oe.prototype.set=function(e,t){var n=he(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},ie.prototype.add=ie.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},ie.prototype.has=function(e){return this.__data__.has(e)},ae.prototype.clear=function(){this.__data__=new re,this.size=0},ae.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},ae.prototype.get=function(e){return this.__data__.get(e)},ae.prototype.has=function(e){return this.__data__.has(e)},ae.prototype.set=function(e,t){var n=this.__data__;if(n instanceof re){var r=n.__data__;if(!W||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new oe(r)}return n.set(e,t),this.size=n.size,this};var be=H?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}(H(e),(function(t){return R.call(e,t)})))}:function(){return[]},ge=le;function _e(e,t){return!!(t=null==t?9007199254740991:t)&&("number"==typeof e||c.test(e))&&e>-1&&e%1==0&&e<t}function we(e){if(null!=e){try{return k.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Oe(e,t){return e===t||e!=e&&t!=t}(B&&"[object DataView]"!=ge(new B(new ArrayBuffer(1)))||W&&ge(new W)!=o||V&&"[object Promise]"!=ge(V.resolve())||$&&ge(new $)!=a||G&&"[object WeakMap]"!=ge(new G))&&(ge=function(e){var t=le(e),n=t==i?e.constructor:void 0,r=n?we(n):"";if(r)switch(r){case X:return"[object DataView]";case Y:return o;case K:return"[object Promise]";case J:return a;case Z:return"[object WeakMap]"}return t});var je=se(function(){return arguments}())?se:function(e){return ke(e)&&A.call(e,"callee")&&!R.call(e,"callee")},Ee=Array.isArray;var Se=q||function(){return!1};function Pe(e){if(!Le(e))return!1;var t=le(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Te(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function Le(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ke(e){return null!=e&&"object"==typeof e}var Ae=b?function(e){return function(t){return e(t)}}(b):function(e){return ke(e)&&Te(e.length)&&!!l[le(e)]};function Me(e){return null!=(t=e)&&Te(t.length)&&!Pe(t)?ue(e):pe(e);var t}n.exports=function(e,t){return fe(e,t)}}).call(this,n(1),n(9)(e))},function(e,t,n){(function(t){var n=/&(?:amp|lt|gt|quot|#39|#96);/g,r=RegExp(n.source),o="object"==typeof t&&t&&t.Object===Object&&t,i="object"==typeof self&&self&&self.Object===Object&&self,a=o||i||Function("return this")();var u,c=(u={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'","&#96;":"`"},function(e){return null==u?void 0:u[e]}),l=Object.prototype.toString,s=a.Symbol,f=s?s.prototype:void 0,d=f?f.toString:void 0;function p(e){if("string"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==l.call(e)}(e))return d?d.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}e.exports=function(e){var t;
6417return(e=null==(t=e)?"":p(t))&&r.test(e)?e.replace(n,c):e}}).call(this,n(1))},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=(r=n(10))&&r.__esModule?r:{default:r};function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){var n=e.indexOf('">'),r=e.substring(n);n=t.indexOf('">');var o=t.substring(n);return r<o?-1:r>o?1:0}function u(e){return function(e){return!!Array.isArray(e)||!(!e||"object"!==i(e)||"number"!=typeof e.length||e.tagName||e.scrollTo||e.document)}(e)?Array.from(e):[e]}function c(e,t,n){var r=e[t],i=document.getElementById(r.select);if(i){var c=u(r.selectVal),l=[];for(!1!==r.selectNullable&&l.push('<option selected value="0"></option>'),n.forEach((function(e){var t=e[r.selectId],n=e[r.selectDesc],o="";c.indexOf(t)>-1&&(o='selected="selected"'),l.push("<option ".concat(o,' value="').concat(t,'">').concat(n,"</option>"))})),r.selectSort&&l.sort(a);i.lastChild;)i.removeChild(i.lastChild);i.innerHTML=l.join(""),r.selectDisableOnEmpty&&(0,o.default)(i,!n.length)}}function l(e){e.forEach((function(t,n){var r,o=t.select,i=document.getElementById(o),a=t.selectData;i&&(i.setAttribute("data-componentType","dynamic_select"),n>0&&(r=e[n-1].selectVal),a((function(t){c(e,n,t)}),r),i.getAttribute("name")||i.setAttribute("name",o),i.addEventListener("change",(function(){!function(e,t){if(t+1<e.length){var n=document.getElementById(e[t].select);(0,e[t+1].selectData)((function(n){c(e,t+1,n)}),n&&n.value)}}(e,n)})))}))}t.default=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),l(t)}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.initComponentCache=t.getComponentCache=t.destroyUnfulfilledPromises=t.destroyComponents=t.destroyComponent=t.componentReady=t.component=void 0;var r=n(0),o={},i={},a={},u={},c={},l=["p_p_id","p_p_lifecycle"],s=["ddmStructureKey","fileEntryTypeId","folderId","navigation","status"],f=function(e){var t,n;e?t={promise:Promise.resolve(e),resolve:function(){}}:t={promise:new Promise((function(e){n=e})),resolve:n};return t},d=function(e,t,n){var r=e.data;Object.keys(r).forEach((function(e){var t=n.querySelector("#".concat(e));t&&(t.innerHTML=r[e].html)}))},p=function(e){var t=new URL(window.location.href),n=new URL(e.path,window.location.href);if(l.every((function(e){return n.searchParams.get(e)===t.searchParams.get(e)}))){var i=Object.keys(a);i=i.filter((function(e){var i=a[e],u=o[e],c=s.every((function(e){var r=!1;if(u){var o="_".concat(u.portletId,"_").concat(e);r=n.searchParams.get(o)===t.searchParams.get(o)}return r}));return!!(0,r.isFunction)(i.isCacheable)&&i.isCacheable(n)&&c&&u&&u.cacheState&&i.element&&i.getState})),u=i.reduce((function(e,t){var n=a[t],r=o[t],i=n.getState(),u=r.cacheState.reduce((function(e,t){return e[t]=i[t],e}),{});return e[t]={html:n.element.innerHTML,state:u},e}),[]),Liferay.DOMTaskRunner.addTask({action:d,condition:function(e){return"liferay.component"===e.owner}}),Liferay.DOMTaskRunner.addTaskState({data:u,owner:"liferay.component"})}else u={}},v=function(e,t,n){var u;if(1===arguments.length){var l=a[e];l&&(0,r.isFunction)(l)&&(c[e]=l,l=l(),a[e]=l),u=l}else if(a[e]&&null!==t&&(delete o[e],delete i[e],console.warn('Component with id "'+e+'" is being registered twice. This can lead to unexpected behaviour in the "Liferay.component" and "Liferay.componentReady" APIs, as well as in the "*:registered" events.')),u=a[e]=t,null===t)delete o[e],delete i[e];else{o[e]=n,Liferay.fire(e+":registered");var s=i[e];s?s.resolve(t):i[e]=f(t)}return u};t.component=v;t.componentReady=function e(){var t,n;if(1===arguments.length)t=arguments[0];else{t=[];for(var r=0;r<arguments.length;r++)t[r]=arguments[r]}if(Array.isArray(t))n=Promise.all(t.map((function(t){return e(t)})));else{var o=i[t];o||(i[t]=o=f()),n=o.promise}return n};var y=function(e){var t=a[e];if(t){var n=t.destroy||t.dispose;n&&n.call(t),delete o[e],delete i[e],delete c[e],delete a[e]}};t.destroyComponent=y;t.destroyComponents=function(e){var t=Object.keys(a);e&&(t=t.filter((function(t){return e(a[t],o[t]||{})}))),t.forEach(y)};t.destroyUnfulfilledPromises=function(){i={}};t.getComponentCache=function(e){var t=u[e];return t?t.state:{}};t.initComponentCache=function(){Liferay.on("startNavigate",p)};var h=v;t.default=h},function(e,t,n){"use strict";
6417Object.defineProperty(t,"__esModule",{value:!0}),t.core=void 0;var r=n(11);Object.keys(r).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return r[e]}})}));var o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(r);t.default=o,t.core=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var o=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return r(e,null,[{key:"equal",value:function(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}},{key:"firstDefinedValue",value:function(e){for(var t=0;t<e.length;t++)if(void 0!==e[t])return e[t]}},{key:"flatten",value:function(t){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=0;r<t.length;r++)Array.isArray(t[r])?e.flatten(t[r],n):n.push(t[r]);return n}},{key:"remove",value:function(t,n){var r,o=t.indexOf(n);return(r=o>=0)&&e.removeAt(t,o),r}},{key:"removeAt",value:function(e,t){return 1===Array.prototype.splice.call(e,t,1).length}},{key:"slice",value:function(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,r=[],o=t;o<n;o++)r.push(e[o]);return r}}]),e}();t.default=o},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var r=n(11),o={throwException:function(e){o.nextTick((function(){throw e}))},run:function(e,t){o.run.workQueueScheduled_||(o.nextTick(o.run.processWorkQueue),o.run.workQueueScheduled_=!0),o.run.workQueue_.push(new o.run.WorkItem_(e,t))}};o.run.workQueueScheduled_=!1,o.run.workQueue_=[],o.run.processWorkQueue=function(){for(;o.run.workQueue_.length;){var e=o.run.workQueue_;o.run.workQueue_=[];for(var t=0;t<e.length;t++){var n=e[t];try{n.fn.call(n.scope)}catch(e){o.throwException(e)}}}o.run.workQueueScheduled_=!1},o.run.WorkItem_=function(e,t){this.fn=e,this.scope=t},o.nextTick=function(t,n){var i=t;n&&(i=t.bind(n)),i=o.nextTick.wrapCallback_(i),o.nextTick.setImmediate_||("function"==typeof e&&(0,r.isServerSide)({checkEnv:!1})?o.nextTick.setImmediate_=e:o.nextTick.setImmediate_=o.nextTick.getSetImmediateEmulator_()),o.nextTick.setImmediate_(i)},o.nextTick.setImmediate_=null,o.nextTick.getSetImmediateEmulator_=function(){var e=void 0;if("function"==typeof MessageChannel&&(e=MessageChannel),void 0===e&&"undefined"!=typeof window&&window.postMessage&&window.addEventListener&&(e=function(){var e=document.createElement("iframe");e.style.display="none",e.src="",e.title="",document.documentElement.appendChild(e);var t=e.contentWindow,n=t.document;n.open(),n.write(""),n.close();var r="callImmediate"+Math.random(),o=t.location.protocol+"//"+t.location.host,i=function(e){e.origin!==o&&e.data!==r||this.port1.onmessage()}.bind(this);t.addEventListener("message",i,!1),this.port1={},this.port2={postMessage:function(){t.postMessage(r,o)}}}),void 0!==e){var t=new e,n={},r=n;return t.port1.onmessage=function(){var e=(n=n.next).cb;n.cb=null,e()},function(e){r.next={cb:e},r=r.next,t.port2.postMessage(0)}}return"undefined"!=typeof document&&"onreadystatechange"in document.createElement("script")?function(e){var t=document.createElement("script");t.onreadystatechange=function(){t.onreadystatechange=null,t.parentNode.removeChild(t),t=null,e(),e=null},document.documentElement.appendChild(t)}:function(e){setTimeout(e,0)}},o.nextTick.wrapCallback_=function(e){return e},t.default=o}).call(this,n(37).setImmediate)},function(e,t,n){(function(e){var r=void 0!==e&&e||"undefined"!=typeof self&&self||window,o=Function.prototype.apply;function i(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new i(o.call(setTimeout,r,arguments),clearTimeout)},t.setInterval=function(){return new i(o.call(setInterval,r,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},i.prototype.unref=i.prototype.ref=function(){},i.prototype.close=function(){this._clearFn.call(r,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n(38),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n(1))},function(e,t,n){(function(e,t){!function(e,n){"use strict";if(!e.setImmediate){var r,o,i,a,u,c=1,l={},s=!1,f=e.document,d=Object.getPrototypeOf&&Object.getPrototypeOf(e);d=d&&d.setTimeout?d:e,"[object process]"==={}.toString.call(e.process)?r=function(e){t.nextTick((function(){v(e)}))}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?e.MessageChannel?((i=new MessageChannel).port1.onmessage=function(e){v(e.data)},r=function(e){i.port2.postMessage(e)}):f&&"onreadystatechange"in f.createElement("script")?(o=f.documentElement,r=function(e){var t=f.createElement("script");t.onreadystatechange=function(){v(e),t.onreadystatechange=null,o.removeChild(t),t=null},o.appendChild(t)}):r=function(e){setTimeout(v,0,e)}:(a="setImmediate$"+Math.random()+"$",u=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(a)&&v(+t.data.slice(a.length))},e.addEventListener?e.addEventListener("message",u,!1):e.attachEvent("onmessage",u),r=function(t){e.postMessage(
6417a+t,"*")}),d.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];var o={callback:e,args:t};return l[c]=o,r(c),c++},d.clearImmediate=p}function p(e){delete l[e]}function v(e){if(s)setTimeout(v,0,e);else{var t=l[e];if(t){s=!0;try{!function(e){var t=e.callback,n=e.args;switch(n.length){case 0:t();break;case 1:t(n[0]);break;case 2:t(n[0],n[1]);break;case 3:t(n[0],n[1],n[2]);break;default:t.apply(void 0,n)}}(t)}finally{p(e),s=!1}}}}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,n(1),n(12))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var o=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.disposed_=!1}return r(e,[{key:"dispose",value:function(){this.disposed_||(this.disposeInternal(),this.disposed_=!0)}},{key:"disposeInternal",value:function(){}},{key:"isDisposed",value:function(){return this.disposed_}}]),e}();t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var o=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return r(e,null,[{key:"mixin",value:function(e){for(var t=void 0,n=void 0,r=arguments.length,o=Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];for(var a=0;a<o.length;a++)for(t in n=o[a])e[t]=n[t];return e}},{key:"getObjectByName",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window,n=e.split(".");return n.reduce((function(e,t){return e[t]}),t)}},{key:"map",value:function(e,t){for(var n={},r=Object.keys(e),o=0;o<r.length;o++)n[r[o]]=t(r[o],e[r[o]]);return n}},{key:"shallowEqual",value:function(e,t){if(e===t)return!0;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var o=0;o<n.length;o++)if(e[n[o]]!==t[n[o]])return!1;return!0}}]),e}();t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var o=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return r(e,null,[{key:"caseInsensitiveCompare",value:function(e,t){var n=String(e).toLowerCase(),r=String(t).toLowerCase();return n<r?-1:n===r?0:1}},{key:"collapseBreakingSpaces",value:function(e){return e.replace(/[\t\r\n ]+/g," ").replace(/^[\t\r\n ]+|[\t\r\n ]+$/g,"")}},{key:"escapeRegex",value:function(e){return String(e).replace(/([-()[\]{}+?*.$^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08")}},{key:"getRandomString",value:function(){var e=2147483648;return Math.floor(Math.random()*e).toString(36)+Math.abs(Math.floor(Math.random()*e)^Date.now()).toString(36)}},{key:"hashCode",value:function(e){for(var t=0,n=0,r=e.length;n<r;n++)t=31*t+e.charCodeAt(n),t%=4294967296;return t}},{key:"replaceInterval",value:function(e,t,n,r){return e.substring(0,t)+r+e.substring(n)}}]),e}();t.default=o},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.hideLayoutPane=function(e){var t=(e=e||{}).obj,n=e.pane;t&&t.checked&&(n=document.querySelector(n))&&n.classList.add("hide")},t.getLayoutIcons=function(){return{minus:themeDisplay.getPathThemeImages()+"/arrows/01_minus.png",plus:themeDisplay.getPathThemeImages()+"/arrows/01_plus.png"}},t.proposeLayout=function(e){var t=(e=e||{}).namespace,n=e.reviewers,r='<div><form action="'+e.url+'" method="post">';if(n.length>0){r+='<textarea name="'+t+'description" style="height: 100px; width: 284px;"></textarea><br /><br />'+'Revisore'+' <select name="'+t+'reviewUserId">';for(var o=0;o<n.length;o++)r+='<option value="'+n[o].userId+'">'+n[o].fullName+"</option>";r+='</select><br /><br /><input type="submit" value="'+'Procedi'+'" />'}else r+='Nessun\x20revisore\x20è\x20stato\x20trovato\x2e'+"<br />
6417"+'Contatta\x20il\x20coordinatore\x20per\x20assegnare\x20i\x20revisori\x2e'+"<br /><br />";r+="</form></div>",Liferay.Util.openWindow({dialog:{destroyOnHide:!0},title:r})},t.publishToLive=function(e){e=e||{},Liferay.Util.openWindow({dialog:{constrain:!0,modal:!0,on:{visibleChange:function(e){e.newVal||this.destroy()}}},title:e.title,uri:e.url})},t.showLayoutPane=function(e){var t=(e=e||{}).obj,n=e.pane;t&&t.checked&&(n=document.querySelector(n))&&n.classList.remove("hide")},t.toggleLayoutDetails=function(e){e=e||{};var t=document.querySelector(e.detail),n=document.querySelector(e.toggle);if(t&&n){var r=themeDisplay.getPathThemeImages()+"/arrows/01_plus.png";t.classList.contains("hide")?(t.classList.remove("hide"),r=themeDisplay.getPathThemeImages()+"/arrows/01_minus.png"):t.classList.add("hide"),n.setAttribute("src",r)}}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.showTab=function(e,t,n,r){var a=e+(0,o.default)(n),u=document.getElementById(a+"TabsId"),c=document.getElementById(a+"TabsSection");if(u&&c){var l={id:n,names:t,namespace:e,selectedTab:u,selectedTabSection:c};r&&"function"==typeof r&&r.call(this,e,t,n,l);try{Liferay.on("showTab",i),Liferay.fire("showTab",l)}finally{Liferay.detach("showTab",i)}}},t.applyTabSelectionDOMChanges=i;var r,o=(r=n(13))&&r.__esModule?r:{default:r};function i(e){var t=e.id,n=e.names,r=e.namespace,i=e.selectedTab,a=e.selectedTabSection,u=i.querySelector("a");if(i&&u){var c=i.parentElement.querySelector(".active");c&&c.classList.remove("active"),u.classList.add("active")}a&&a.classList.remove("hide");var l,s=document.getElementById(r+"dropdownTitle");s&&u&&(s.innerHTML=u.textContent),n.splice(n.indexOf(t),1);for(var f=0;f<n.length;f++)(l=document.getElementById(r+(0,o.default)(n[f])+"TabsSection"))&&l.classList.add("hide")}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.showTooltip=function(e,t){e.setAttribute("title",t),e.classList.add("lfr-portal-tooltip")}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.minimizePortlet=function(e,t,n){n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){l(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({doAsUserId:themeDisplay.getDoAsUserIdEncoded(),plid:themeDisplay.getPlid()},n);var u=document.querySelector(e);if(u){var s=u.querySelector(".portlet-content-container");if(s){var f=s.classList.contains("hide");if(f?(s.classList.remove("hide"),u.classList.remove("portlet-minimized")):(s.classList.add("hide"),u.classList.add("portlet-minimized")),t){var d=f?'Minimizza':'Ripristina';t.setAttribute("alt",d),t.setAttribute("title",d);var p=t.querySelector(".taglib-text-icon");p&&(p.innerHTML=d);var v=t.querySelector("i");v&&(v.classList.remove("icon-minus","icon-resize-vertical"),f?(v.classList.add("icon-minus"),v.classList.remove("icon-resize-vertical")):(v.classList.add("icon-resize-vertical"),v.classList.remove("icon-minus")))}var y=(0,i.default)(u.id),h=(0,o.default)({cmd:"minimize",doAsUserId:n.doAsUserId,p_auth:Liferay.authToken,p_l_id:n.plid,p_p_id:y,p_p_restore:f,p_v_l_s_g_id:themeDisplay.getSiteGroupId()});(0,r.default)(themeDisplay.getPathMain()+"/portal/update_layout",{body:h,method:"POST"}).then((function(e){if(e.ok&&f){var t={doAsUserId:n.doAsUserId,p_l_id:n.plid,p_p_boundary:!1,p_p_id:y,p_p_isolated:!0};(0,r.default)((0,a.default)(themeDisplay.getPathMain()+"/portal/render_portlet",t)).then((function(e){return e.text()})).then((function(e){var t=document.createRange();t.selectNode(u),u.innerHTML="";var n=t.createContextualFragment(e);u.appendChild(n)})).catch((function(e){0}))}})).catch((function(e){0}))}}},t.default=void 0;var r=u(n(4)),o=u(n(15)),i=u(n(16)),a=u(n(3));function u(e){return e&&e.__esModule?e:{default:e}}function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var s={register:u(n(46)).default};t.default=s}
6417,function(e,t,n){(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.register=void 0;var r,o=(r=n(47))&&r.__esModule?r:{default:r},i=n(19);var a=function(t){(0,i.validateArguments)(arguments,1,1,["string"]);var n=e.portlet.data.pageRenderState;return new Promise((function(e,r){(0,i.validatePortletId)(n,t)?e(new o.default(t)):r(new Error("Invalid portlet ID"))}))};t.register=a;var u=a;t.default=u}).call(this,n(1))},function(e,t,n){(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.PortletInit=void 0;var r=n(0),o=l(n(48)),i=l(n(4)),a=l(n(51)),u=l(n(18)),c=n(19);function l(e){return e&&e.__esModule?e:{default:e}}function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function f(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e))&&"[object Arguments]"!==Object.prototype.toString.call(e))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function d(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function v(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function y(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var h,m=window.history&&window.history.pushState,b=!1,g={},_=[],w=function(){function t(n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),this._portletId=n,this.constants=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){v(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},u.default),h||(h=e.portlet.data.pageRenderState,this._updateHistory(!0)),this.portletModes=h.portlets[this._portletId].allowedPM.slice(0),this.windowStates=h.portlets[this._portletId].allowedWS.slice(0)}var n,l,w;return n=t,(l=[{key:"_executeAction",value:function(e,t){var n=this;return new Promise((function(r,o){(0,c.getUrl)(h,"ACTION",n._portletId,e).then((function(e){var a=(0,c.generateActionUrl)(n._portletId,e,t);(0,i.default)(a.url,a).then((function(e){return e.text()})).then((function(e){var t=n._updatePageStateFromString(e,n._portletId);r(t)})).catch((function(e){o(e)}))}))}))}},{key:"_hasListener",value:function(e){return Object.keys(g).map((function(e){return g[e].id})).includes(e)}},{key:"_reportError",value:function(e,t){Object.keys(g).map((function(n){var r=g[n];return r.id===e&&"portlet.onError"===r.type&&setTimeout((function(){r.handler("portlet.onError",t)})),!1}))}},{key:"_setPageState",value:function(e,t){var n=this;if(!(0,r.isString)(t))throw new TypeError("Invalid update string: ".concat(t));this._updatePageState(t,e).then((function(e){n._updatePortletStates(e)}),(function(t){b=!1,n._reportError(e,t)}))}},{key:"_setState",value:function(e){var t=this,n=(0,c.getUpdatedPublicRenderParameters)(h,this._portletId,e),r=[];
6417Object.keys(n).forEach((function(e){var o=n[e],i=h.prpMap[e];Object.keys(i).forEach((function(e){if(e!==t._portletId){var n=i[e].split("|"),a=n[0],u=n[1];void 0===o?delete h.portlets[a].state.parameters[u]:h.portlets[a].state.parameters[u]=d(o),r.push(a)}}))}));var o=this._portletId;return h.portlets[o].state=e,r.push(o),r.forEach((function(e){h.portlets[e].renderData.content=null})),this._updateHistory(),Promise.resolve(r)}},{key:"_setupAction",value:function(e,t){var n=this;if(this.isInProgress())throw{message:"Operation is already in progress",name:"AccessDeniedException"};if(!this._hasListener(this._portletId))throw{message:"No onStateChange listener registered for portlet: ".concat(this._portletId),name:"NotInitializedException"};return b=!0,this._executeAction(e,t).then((function(e){return n._updatePortletStates(e).then((function(e){return b=!1,e}))}),(function(e){b=!1,n._reportError(n._portletId,e)}))}},{key:"_updateHistory",value:function(e){m&&(0,c.getUrl)(h,"RENDER",null,{}).then((function(t){var n=JSON.stringify(h);if(e)history.replaceState(n,"");else try{history.pushState(n,"",t)}catch(e){}}))}},{key:"_updatePageState",value:function(e){var t=this;return new Promise((function(n,r){try{n(t._updatePageStateFromString(e,t._portletId))}catch(e){r(new Error("Partial Action decode status: ".concat(e.message)))}}))}},{key:"_updatePageStateFromString",value:function(e,t){var n=(0,c.decodeUpdateString)(h,e),r=[],o=!1;return Object.entries(n).forEach((function(e){var t=f(e,2),n=t[0],i=t[1];h.portlets[n]=i,r.push(n),o=!0})),o&&t&&this._updateHistory(),r}},{key:"_updatePortletStates",value:function(e){var t=this;return new Promise((function(n){0===e.length?b=!1:e.forEach((function(e){t._updateStateForPortlet(e)})),n(e)}))}},{key:"_updateState",value:function(e){var t=this;if(b)throw{message:"Operation in progress",name:"AccessDeniedException"};if(!this._hasListener(this._portletId))throw{message:"No onStateChange listener registered for portlet: ".concat(this._portletId),name:"NotInitializedException"};b=!0,this._setState(e).then((function(e){t._updatePortletStates(e)})).catch((function(e){b=!1,t._reportError(t._portletId,e)}))}},{key:"_updateStateForPortlet",value:function(e){var t=_.map((function(e){return e.handle}));Object.entries(g).forEach((function(n){var r=f(n,2),o=r[0],i=r[1];"portlet.onStateChange"===i.type&&(i.id!==e||t.includes(o)||_.push(i))})),_.length>0&&setTimeout((function(){for(b=!0;_.length>0;){var e=_.shift(),t=e.handler,n=e.id;if(h.portlets[n]){var r=h.portlets[n].renderData,o=new a.default(h.portlets[n].state);r&&r.content?t("portlet.onStateChange",o,r):t("portlet.onStateChange",o)}}b=!1}))}},{key:"action",value:function(){for(var e=null,t=0,n=null,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return i.forEach((function(o){if(o instanceof HTMLFormElement){if(null!==n)throw new TypeError("Too many [object HTMLFormElement] arguments: ".concat(o,", ").concat(n));n=o}else if((0,r.isObject)(o)){if((0,c.validateParameters)(o),null!==e)throw new TypeError("Too many parameters arguments");e=o}else if(void 0!==o){var i=Object.prototype.toString.call(o);throw new TypeError("Invalid argument type. Argument ".concat(t+1," is of type ").concat(i))}t++})),n&&(0,c.validateForm)(n),this._setupAction(e,n).then((function(e){Promise.resolve(e)})).catch((function(e){Promise.reject(e)}))}},{key:"addEventListener",value:function(e,t){if(arguments.length>2)throw new TypeError("Too many arguments passed to addEventListener");if(!(0,r.isString)(e)||!(0,r.isFunction)(t))throw new TypeError("Invalid arguments passed to addEventListener");var n=this._portletId;if(e.startsWith("portlet.")&&"portlet.onStateChange"!==e&&"portlet.onError"!==e)throw new TypeError("The system event type is invalid: ".concat(e));var i=(0,o.default)(),a={handle:i,handler:t,id:n,type:e};return g[i]=a,"portlet.onStateChange"===e&&this._updateStateForPortlet(this._portletId),i}},{key:"createResourceUrl",value:function(e,t,n){if(arguments.length>3)throw new TypeError("Too many arguments. 3 arguments are allowed.");if(e){if(!(0,r.isObject)(e))throw new TypeError("Invalid argument type. Resource parameters must be a parameters object.");(0,c.validateParameters)(e)}var o=null;if(t){if(!(0,r.isString)(t))throw new TypeError("Invalid argument type. Cacheability argument must be a string.");if("cacheLevelPage"!==t&&"cacheLevelPortlet"!==t&&"cacheLevelFull"!==t)throw new TypeError("Invalid cac
6417heability argument: ".concat(t));o=t}if(o||(o="cacheLevelPage"),n&&!(0,r.isString)(n))throw new TypeError("Invalid argument type. Resource ID argument must be a string.");return(0,c.getUrl)(h,"RESOURCE",this._portletId,e,o,n)}},{key:"dispatchClientEvent",value:function(e,t){if((0,c.validateArguments)(arguments,2,2,["string"]),e.match(new RegExp("^portlet[.].*")))throw new TypeError("The event type is invalid: "+e);return Object.keys(g).reduce((function(n,r){var o=g[r];return e.match(o.type)&&(o.handler(e,t),n++),n}),0)}},{key:"isInProgress",value:function(){return b}},{key:"newParameters",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={};return Object.keys(e).forEach((function(n){Array.isArray(e[n])&&(t[n]=d(e[n]))})),t}},{key:"newState",value:function(e){return new a.default(e)}},{key:"removeEventListener",value:function(e){if(arguments.length>1)throw new TypeError("Too many arguments passed to removeEventListener");if(!(0,r.isDefAndNotNull)(e))throw new TypeError("The event handle provided is ".concat(s(e)));var t=!1;if((0,r.isObject)(g[e])&&g[e].id===this._portletId){delete g[e];for(var n=_.length,o=0;o<n;o++){var i=_[o];i&&i.handle===e&&_.splice(o,1)}t=!0}if(!t)throw new TypeError("The event listener handle doesn't match any listeners.")}},{key:"setRenderState",value:function(e){if((0,c.validateArguments)(arguments,1,1,["object"]),h.portlets&&h.portlets[this._portletId]){var t=h.portlets[this._portletId];(0,c.validateState)(e,t),this._updateState(e)}}},{key:"startPartialAction",value:function(e){var t=this,n=null;if(arguments.length>1)throw new TypeError("Too many arguments. 1 arguments are allowed");if(void 0!==e){if(!(0,r.isObject)(e))throw new TypeError("Invalid argument type. Argument is of type ".concat(s(e)));(0,c.validateParameters)(e),n=e}if(!0===b)throw{message:"Operation in progress",name:"AccessDeniedException"};if(!this._hasListener(this._portletId))throw{message:"No onStateChange listener registered for portlet: ".concat(this._portletId),name:"NotInitializedException"};b=!0;var o={setPageState:function(e){t._setPageState(t._portletId,e)},url:""};return(0,c.getUrl)(h,"PARTIAL_ACTION",this._portletId,n).then((function(e){return o.url=e,o}))}}])&&y(n.prototype,l),w&&y(n,w),t}();t.PortletInit=w;var O=w;t.default=O}).call(this,n(1))},function(e,t,n){var r,o,i=n(49),a=n(50),u=0,c=0;e.exports=function(e,t,n){var l=t&&n||0,s=t||[],f=(e=e||{}).node||r,d=void 0!==e.clockseq?e.clockseq:o;if(null==f||null==d){var p=i();null==f&&(f=r=[1|p[0],p[1],p[2],p[3],p[4],p[5]]),null==d&&(d=o=16383&(p[6]<<8|p[7]))}var v=void 0!==e.msecs?e.msecs:(new Date).getTime(),y=void 0!==e.nsecs?e.nsecs:c+1,h=v-u+(y-c)/1e4;if(h<0&&void 0===e.clockseq&&(d=d+1&16383),(h<0||v>u)&&void 0===e.nsecs&&(y=0),y>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");u=v,c=y,o=d;var m=(1e4*(268435455&(v+=122192928e5))+y)%4294967296;s[l++]=m>>>24&255,s[l++]=m>>>16&255,s[l++]=m>>>8&255,s[l++]=255&m;var b=v/4294967296*1e4&268435455;s[l++]=b>>>8&255,s[l++]=255&b,s[l++]=b>>>24&15|16,s[l++]=b>>>16&255,s[l++]=d>>>8|128,s[l++]=255&d;for(var g=0;g<6;++g)s[l+g]=f[g];return t||a(s)}},function(e,t){var n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(n){var r=new Uint8Array(16);e.exports=function(){return n(r),r}}else{var o=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),o[t]=e>>>((3&t)<<3)&255;return o}}},function(e,t){for(var n=[],r=0;r<256;++r)n[r]=(r+256).toString(16).substr(1);e.exports=function(e,t){var r=t||0,o=n;return[o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]]].join("")}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.RenderState=void 0;var r,o=n(0),i=(r=n(18))&&r.__esModule?r:{default:r};function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var u=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),(0,o.isObject)(t)?this.from(t):(this.parameters={},this.portletMode=i.default.VIEW,this.windowState=i.default.NORMAL)}var t,n,r;return t=e,(n=[{key:"clone",value:function(){return new e(this)}},{key:"from",value:function(e){var t=this;this.parameters={}
6417,Object.keys(e.parameters).forEach((function(n){Array.isArray(e.parameters[n])&&(t.parameters[n]=e.parameters[n].slice(0))})),this.setPortletMode(e.portletMode),this.setWindowState(e.windowState)}},{key:"getPortletMode",value:function(){return this.portletMode}},{key:"getValue",value:function(e,t){if(!(0,o.isString)(e))throw new TypeError("Parameter name must be a string");var n=this.parameters[e];return Array.isArray(n)&&(n=n[0]),void 0===n&&void 0!==t&&(n=t),n}},{key:"getValues",value:function(e,t){if(!(0,o.isString)(e))throw new TypeError("Parameter name must be a string");var n=this.parameters[e];return n||t}},{key:"getWindowState",value:function(){return this.windowState}},{key:"remove",value:function(e){if(!(0,o.isString)(e))throw new TypeError("Parameter name must be a string");void 0!==this.parameters[e]&&delete this.parameters[e]}},{key:"setPortletMode",value:function(e){if(!(0,o.isString)(e))throw new TypeError("Portlet Mode must be a string");e!==i.default.EDIT&&e!==i.default.HELP&&e!==i.default.VIEW||(this.portletMode=e)}},{key:"setValue",value:function(e,t){if(!(0,o.isString)(e))throw new TypeError("Parameter name must be a string");if(!(0,o.isString)(t)&&null!==t&&!Array.isArray(t))throw new TypeError("Parameter value must be a string, an array or null");Array.isArray(t)||(t=[t]),this.parameters[e]=t}},{key:"setValues",value:function(e,t){this.setValue(e,t)}},{key:"setWindowState",value:function(e){if(!(0,o.isString)(e))throw new TypeError("Window State must be a string");e!==i.default.MAXIMIZED&&e!==i.default.MINIMIZED&&e!==i.default.NORMAL||(this.windowState=e)}}])&&a(t.prototype,n),r&&a(t,r),e}();t.RenderState=u;var c=u;t.default=c},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=(r=n(5))&&r.__esModule?r:{default:r};function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e))&&"[object Arguments]"!==Object.prototype.toString.call(e))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var l=new WeakMap;function s(e){if(e&&e.jquery){if(e.length>1)throw new Error("getElement(): Expected at most one element, got ".concat(e.length));e=e.get(0)}return!e||e instanceof HTMLElement||(e=e.element),e}function f(e){return e=s(e),l.get(e)}var d=[/^aria-/,/^data-/,/^type$/];function p(e,t){y(e,u({},t,!0))}function v(e,t){y(e,u({},t,!1))}function y(e,t){(e=s(e))&&Object.entries(t).forEach((function(t){var n=a(t,2),r=n[0],o=n[1];r.split(/\s+/).forEach((function(t){o?e.classList.add(t):e.classList.remove(t)}))}))}function h(e,t){return e=s(e),t.split(/\s+/).every((function(t){return e.classList.contains(t)}))}function m(e,t){(e=s(e))&&Object.entries(t).forEach((function(t){var n=a(t,2),r=n[0],o=n[1];e.style[r]=o}))}function b(e){return"number"==typeof e?e+"px":"string"==typeof e&&e.match(/^\s*\d+\s*$/)?e.trim()+"px":e}function g(e){return e.getBoundingClientRect().left+(e.ownerDocument.defaultView.pageOffsetX||0)}var _={};function w(e,t,n){if(e){_[t]||(_[t]={},document.body.addEventListener(t,(function(e){return function(e,t){Object.keys(_[e]).forEac
6417h((function(n){for(var r=!1,o=t.target;o&&!(r=o.matches&&o.matches(n));)o=o.parentNode;r&&_[e][n].emit("click",t)}))}(t,e)})));var r=_[t],i="string"==typeof e?e:function(e){if((e=s(e)).id)return"#".concat(e.id);for(var t=e.parentNode;t&&!t.id;)t=t.parentNode;var n=Array.from(e.attributes).map((function(e){var t=e.name,n=e.value;return d.some((function(e){return e.test(t)}))?"[".concat(t,"=").concat(JSON.stringify(n),"]"):null})).filter(Boolean).sort();return[t?"#".concat(t.id," "):"",e.tagName.toLowerCase()].concat(c(n)).join("")}(e);r[i]||(r[i]=new o.default);var a=r[i].on(t,(function(e){e.defaultPrevented||n(e)}));return{dispose:function(){a.dispose()}}}return null}function O(e){return parseInt(e,10)||0}function j(e,t){e=s(e),this.init(e,t)}j.TRANSITION_DURATION=500,j.prototype={_bindUI:function(){this._subscribeClickTrigger(),this._subscribeClickSidenavClose()},_emit:function(e){this._emitter.emit(e,this)},_getSidenavWidth:function(){var e=this.options.widthOriginal,t=e,n=window.innerWidth;return n<e+40&&(t=n-40),t},_getSimpleSidenavType:function(){var e=this.options,t=this._isDesktop(),n=e.type,r=e.typeMobile;return t&&"fixed-push"===n?"desktop-fixed-push":t||"fixed-push"!==r?"fixed":"mobile-fixed-push"},_isDesktop:function(){return window.innerWidth>=this.options.breakpoint},_isSidenavRight:function(){var e=this.options;return h(document.querySelector(e.container),"sidenav-right")},_isSimpleSidenavClosed:function(){var e=this.options,t=e.openClass;return!h(document.querySelector(e.container),t)},_loadUrl:function(e,t){var n=this,r=e.querySelector(".sidebar-body");if(!n._fetchPromise&&r){for(;r.firstChild;)r.removeChild(r.firstChild);var o=document.createElement("div");p(o,"sidenav-loading"),o.innerHTML=n.options.loadingIndicatorTPL,r.appendChild(o),n._fetchPromise=Liferay.Util.fetch(t),n._fetchPromise.then((function(e){if(!e.ok)throw new Error("Failed to fetch ".concat(t));return e.text()})).then((function(e){var t=document.createRange();t.selectNode(r);var i=t.createContextualFragment(e);r.removeChild(o),r.appendChild(i),n.setHeight()})).catch((function(e){console.error(e)}))}},_renderNav:function(){var e=this.options,t=document.querySelector(e.container),n=t.querySelector(e.navigation).querySelector(".sidenav-menu"),r=h(t,"closed"),o=this._isSidenavRight(),i=this._getSidenavWidth();r?(m(n,{width:b(i)}),o&&m(n,u({},e.rtl?"left":"right",b(i)))):(this.showSidenav(),this.setHeight())},_renderUI:function(){var e=this.options,t=document.querySelector(e.container),n=this.toggler,r=this.mobile,o=r?e.typeMobile:e.type;this.useDataAttribute||(r&&(y(t,{closed:!0,open:!1}),y(n,{active:!1,open:!1})),"right"===e.position&&p(t,"sidenav-right"),"relative"!==o&&p(t,"sidenav-fixed"),this._renderNav()),m(t,{display:""})},_subscribeClickSidenavClose:function(){var e=this,t=e.options.container;if(!e._sidenavCloseSubscription){var n="".concat(t," .sidenav-close");e._sidenavCloseSubscription=w(n,"click",(function(t){t.preventDefault(),e.toggle()}))}},_subscribeClickTrigger:function(){var e=this;if(!e._togglerSubscription){var t=e.toggler;e._togglerSubscription=w(t,"click",(function(t){e.toggle(),t.preventDefault()}))}},_subscribeSidenavTransitionEnd:function(e,t){setTimeout((function(){v(e,"sidenav-transition"),t()}),j.TRANSITION_DURATION)},clearHeight:function(){var e=this.options,t=document.querySelector(e.container);t&&[t.querySelector(e.content),t.querySelector(e.navigation),t.querySelector(".sidenav-menu")].forEach((function(e){m(e,{height:"","min-height":""})}))},destroy:function(){this._sidenavCloseSubscription&&(this._sidenavCloseSubscription.dispose(),this._sidenavCloseSubscription=null),this._togglerSubscription&&(this._togglerSubscription.dispose(),this._togglerSubscription=null),l.delete(this.toggler)},hide:function(){this.useDataAttribute?this.hideSimpleSidenav():this.toggleNavigation(!1)},hideSidenav:function(){var e=this.options,t=document.querySelector(e.container);if(t){var n,r=t.querySelector(e.content),o=t.querySelector(e.navigation),i=o.querySelector(".sidenav-menu"),a=this._isSidenavRight(),c=e.rtl?"right":"left";a&&(c=e.rtl?"left":"right"),m(r,(u(n={},"padding-"+c,""),u(n,c,""),n)),m(o,{width:""}),a&&m(i,u({},c,b(this._getSidenavWidth())))}},hideSimpleSidenav:function(){var e=this,t=e.options;if(!e._isSimpleSidenavClosed()){var n,r,o=document.querySelector(t.content),i=document.querySelector(t.container),a=t.closedClass,c=t.openClass,l=e.toggler,s=l.dataset.target||l.getAttribute("href");if(e._emit("closedStart.lexicon.sidenav"),e._subscribeSidenavTransitionEnd(o,(function(){v(i,"sidenav-transition"),v(l,"sidenav-transition"),e._emit("closed.lexicon.sidenav")})),h(o,c))y(o,(u(r={}
6417,a,!0),u(r,c,!1),u(r,"sidenav-transition",!0),r));p(i,"sidenav-transition"),p(l,"sidenav-transition"),y(i,(u(n={},a,!0),u(n,c,!1),n));var f=document.querySelectorAll('[data-target="'.concat(s,'"], [href="').concat(s,'"]'));Array.from(f).forEach((function(e){y(e,u({active:!1},c,!1)),y(e,u({active:!1},c,!1))}))}},init:function(e,t){var n="liferay-sidenav"===e.dataset.toggle;(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){u(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},E,{},t)).breakpoint=O(t.breakpoint),t.container=t.container||e.dataset.target||e.getAttribute("href"),t.gutter=O(t.gutter),t.rtl="rtl"===document.dir,t.width=O(t.width),t.widthOriginal=t.width,n&&(t.closedClass=e.dataset.closedClass||"closed",t.content=e.dataset.content,t.loadingIndicatorTPL=e.dataset.loadingIndicatorTpl||t.loadingIndicatorTPL,t.openClass=e.dataset.openClass||"open",t.type=e.dataset.type,t.typeMobile=e.dataset.typeMobile,t.url=e.dataset.url,t.width=""),this.toggler=e,this.options=t,this.useDataAttribute=n,this._emitter=new o.default,this._bindUI(),this._renderUI()},on:function(e,t){return this._emitter.on(e,t)},setHeight:function(){var e=this.options,t=document.querySelector(e.container),n=this.mobile?e.typeMobile:e.type;if("fixed"!==n&&"fixed-push"!==n){var r=t.querySelector(e.content),o=t.querySelector(e.navigation),i=t.querySelector(".sidenav-menu"),a=r.getBoundingClientRect().height,u=o.getBoundingClientRect().height,c=b(Math.max(a,u));m(r,{"min-height":c}),m(o,{height:"100%","min-height":c}),m(i,{height:"100%","min-height":c})}},show:function(){this.useDataAttribute?this.showSimpleSidenav():this.toggleNavigation(!0)},showSidenav:function(){var e=this.mobile,t=this.options,n=document.querySelector(t.container),r=n.querySelector(t.content),o=n.querySelector(t.navigation),i=o.querySelector(".sidenav-menu"),a=this._isSidenavRight(),c=this._getSidenavWidth(),l=c+t.gutter,s=t.url;s&&this._loadUrl(i,s),m(o,{width:b(c)}),m(i,{width:b(c)});var f=t.rtl?"right":"left";a&&(f=t.rtl?"left":"right");var d=e?f:"padding-"+f;if("fixed"!==(e?t.typeMobile:t.type)){var p=h(n,"open")?g(o)-t.gutter:g(o)-l,v=g(r),y=O(getComputedStyle(r).width),_="";t.rtl&&a||!t.rtl&&"left"===t.position?(p=g(o)+l)>v&&(_=p-v):(t.rtl&&"left"===t.position||!t.rtl&&a)&&p<v+y&&(_=v+y-p)>=l&&(_=l),m(r,u({},d,b(_)))}},showSimpleSidenav:function(){var e=this,t=e.options;if(e._isSimpleSidenavClosed()){var n,r,o,i=document.querySelector(t.content),a=document.querySelector(t.container),c=t.closedClass,l=t.openClass,s=e.toggler,f=s.dataset.url;f&&e._loadUrl(a,f),e._emit("openStart.lexicon.sidenav"),e._subscribeSidenavTransitionEnd(i,(function(){v(a,"sidenav-transition"),v(s,"sidenav-transition"),e._emit("open.lexicon.sidenav")})),y(i,(u(n={},c,!1),u(n,l,!0),u(n,"sidenav-transition",!0),n)),y(a,(u(r={},c,!1),u(r,l,!0),u(r,"sidenav-transition",!0),r)),y(s,(u(o={active:!0},l,!0),u(o,"sidenav-transition",!0),o))}},toggle:function(){this.useDataAttribute?this.toggleSimpleSidenav():this.toggleNavigation()},toggleNavigation:function(e){var t=this,n=t.options,r=document.querySelector(n.container),o=r.querySelector(".sidenav-menu"),i=t.toggler,a=n.width,c="boolean"==typeof e?e:h(r,"closed"),l=t._isSidenavRight();if(c?t._emit("openStart.lexicon.sidenav"):t._emit("closedStart.lexicon.sidenav"),t._subscribeSidenavTransitionEnd(r,(function(){var e=r.querySelector(".sidenav-menu");h(r,"closed")?(t.clearHeight(),y(i,{open:!1,"sidenav-transition":!1}),t._emit("closed.lexicon.sidenav")):(y(i,{open:!0,"sidenav-transition":!1}),t._emit("open.lexicon.sidenav")),t.mobile&&e.focus()})),c){t.setHeight(),m(o,{width:b(a)});var s=n.rtl?"left":"right";l&&m(o,u({},s,""))}p(r,"sidenav-transition"),p(i,"sidenav-transition"),c?t.showSidenav():t.hideSidenav(),y(r,{closed:!c,open:c}),y(i,{active:c,open:c})},toggleSimpleSidenav:function(){this._isSimpleSidenavClosed()?this.showSimpleSidenav():this.hideSimpleSidenav()},visible:function(){var e;if(this.useDataAttribute)e=this._isSimpleSidenavClosed();else{var t=document.querySelector(this.options.container);e=h(t,"sidenav-transition")?!h(t,"closed"):h(t,"closed")}return!e}},j.destroy=function(e){var t=f(e);t&&t.destroy()},j.hide=function(e){var t=f(e);t&&t.hide()},j.initialize=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=s(e);var n=l.get(e);return n||(n=new j(e,t),l.set(e,n)),n},j.instance=f;var E={breakpoint:768,content:".sidenav-content",gutter:"0px",loadingIndicatorTPL:'<div class="loading-animation loading-animation-md"></div>',navigation:".sidenav-menu-slider",position:"left",type:"relative",typeMobile:"relative",url:null,width:"225px"};function S(){var e=document.querySelectorAll('[data-toggle="liferay-sidenav"]');Array.from(e).forEach(j.initialize)}"loading"!==document.readyState?S():document.addEventListener("DOMContentLoaded",(function(){S()}));var P=j;t.default=P},function(e,t,n){"use strict";
6417Object.defineProperty(t,"__esModule",{value:!0});var r,o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(0),a=n(20),u=(r=a)&&r.__esModule?r:{default:r};var c=[0],l=function(e){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var e=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.events_=null,e.listenerHandlers_=null,e.shouldUseFacade_=!1,e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"addHandler_",value:function(e,t){return e?(Array.isArray(e)||(e=[e]),e.push(t)):e=t,e}},{key:"addListener",value:function(e,t,n){this.validateListener_(t);for(var r=this.toEventsArray_(e),o=0;o<r.length;o++)this.addSingleListener_(r[o],t,n);return new u.default(this,e,t)}},{key:"addSingleListener_",value:function(e,t,n,r){this.runListenerHandlers_(e),(n||r)&&(t={default:n,fn:t,origin:r}),this.events_=this.events_||{},this.events_[e]=this.addHandler_(this.events_[e],t)}},{key:"buildFacade_",value:function(e){if(this.getShouldUseFacade()){var t={preventDefault:function(){t.preventedDefault=!0},target:this,type:e};return t}}},{key:"disposeInternal",value:function(){this.events_=null}},{key:"emit",value:function(e){var t=this.getRawListeners_(e);if(0===t.length)return!1;var n=i.array.slice(arguments,1);return this.runListeners_(t,n,this.buildFacade_(e)),!0}},{key:"getRawListeners_",value:function(e){return s(this.events_&&this.events_[e]).concat(s(this.events_&&this.events_["*"]))}},{key:"getShouldUseFacade",value:function(){return this.shouldUseFacade_}},{key:"listeners",value:function(e){return this.getRawListeners_(e).map((function(e){return e.fn?e.fn:e}))}},{key:"many",value:function(e,t,n){for(var r=this.toEventsArray_(e),o=0;o<r.length;o++)this.many_(r[o],t,n);return new u.default(this,e,n)}},{key:"many_",value:function(e,t,n){var r=this;t<=0||r.addSingleListener_(e,(function o(){0==--t&&r.removeListener(e,o),n.apply(r,arguments)}),!1,n)}},{key:"matchesListener_",value:function(e,t){return(e.fn||e)===t||e.origin&&e.origin===t}},{key:"off",value:function(e,t){if(this.validateListener_(t),!this.events_)return this;for(var n=this.toEventsArray_(e),r=0;r<n.length;r++)this.events_[n[r]]=this.removeMatchingListenerObjs_(s(this.events_[n[r]]),t);return this}},{key:"on",value:function(){return this.addListener.apply(this,arguments)}},{key:"onListener",value:function(e){this.listenerHandlers_=this.addHandler_(this.listenerHandlers_,e)}},{key:"once",value:function(e,t){return this.many(e,1,t)}},{key:"removeAllListeners",value:function(e){if(this.events_)if(e)for(var t=this.toEventsArray_(e),n=0;n<t.length;n++)this.events_[t[n]]=null;else this.events_=null;return this}},{key:"removeMatchingListenerObjs_",value:function(e,t){for(var n=[],r=0;r<e.length;r++)this.matchesListener_(e[r],t)||n.push(e[r]);return n.length>0?n:null}},{key:"removeListener",value:function(){return this.off.apply(this,arguments)}},{key:"runListenerHandlers_",value:function(e){var t=this.listenerHandlers_;if(t){t=s(t);for(var n=0;n<t.length;n++)t[n](e)}}},{key:"runListeners_",value:function(e,t,n){n&&t.push(n);for(var r=[],o=0;o<e.length;o++){var i=e[o].fn||e[o];e[o].default?r.push(i):i.apply(this,t)}if(!n||!n.preventedDefault)for(var a=0;a<r.length;a++)r[a].apply(this,t)}},{key:"setShouldUseFacade",value:function(e){return this.shouldUseFacade_=e,this}},{key:"toEventsArray_",value:function(e){return(0,i.isString)(e)&&(c[0]=e,e=c),e}},{key:"validateListener_",value:function(e){if(!(0,i.isFunction)(e))throw new TypeError("Listener must be a function")}}]),t}(i.Disposable);function s(e){return e=e||[],Array.isArray(e)?e:[e]}t.default=l},function(e,t,n){"use strict";
6417Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var o=function(e){function t(e,n,r,o){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return i.blacklist_=r,i.originEmitter_=e,i.pendingEvents_=null,i.proxiedEvents_=null,i.targetEmitter_=n,i.whitelist_=o,i.startProxy_(),i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"addListener_",value:function(e,t){return this.originEmitter_.on(e,t)}},{key:"disposeInternal",value:function(){this.removeListeners_(),this.proxiedEvents_=null,this.originEmitter_=null,this.targetEmitter_=null}},{key:"emitOnTarget_",value:function(){var e;(e=this.targetEmitter_).emit.apply(e,arguments)}},{key:"proxyEvent",value:function(e){this.shouldProxyEvent_(e)&&this.tryToAddListener_(e)}},{key:"removeListeners_",value:function(){if(this.proxiedEvents_){for(var e=Object.keys(this.proxiedEvents_),t=0;t<e.length;t++)this.proxiedEvents_[e[t]].removeListener();this.proxiedEvents_=null}this.pendingEvents_=null}},{key:"setOriginEmitter",value:function(e){var t=this,n=this.originEmitter_&&this.proxiedEvents_?Object.keys(this.proxiedEvents_):this.pendingEvents_;this.originEmitter_=e,n&&(this.removeListeners_(),n.forEach((function(e){return t.proxyEvent(e)})))}},{key:"shouldProxyEvent_",value:function(e){return!(this.whitelist_&&!this.whitelist_[e])&&((!this.blacklist_||!this.blacklist_[e])&&(!this.proxiedEvents_||!this.proxiedEvents_[e]))}},{key:"startProxy_",value:function(){this.targetEmitter_.onListener(this.proxyEvent.bind(this))}},{key:"tryToAddListener_",value:function(e){this.originEmitter_?(this.proxiedEvents_=this.proxiedEvents_||{},this.proxiedEvents_[e]=this.addListener_(e,this.emitOnTarget_.bind(this,e))):(this.pendingEvents_=this.pendingEvents_||[],this.pendingEvents_.pu
6417sh(e))}}]),t}(n(0).Disposable);t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var o=function(e){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var e=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.eventHandles_=[],e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"add",value:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var r=0;r<arguments.length;r++)this.eventHandles_.push(t[r])}},{key:"disposeInternal",value:function(){this.eventHandles_=null}},{key:"removeAllListeners",value:function(){for(var e=0;e<this.eventHandles_.length;e++)this.eventHandles_[e].removeListener();this.eventHandles_=[]}}]),t}(n(0).Disposable);t.default=o},function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(!e||"object"!==n(e)&&"string"!=typeof e)throw new TypeError("Parameter params must be an object or string");if("string"!=typeof t)throw new TypeError("Parameter baseUrl must be a string");var r=t.startsWith("/")?new URL(t,location.href):new URL(t);if("object"===n(e))Object.entries(e).forEach((function(e){var t,n,o=(n=2,function(e){if(Array.isArray(e))return e}(t=e)||function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}return n}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()),i=o[0],a=o[1];r.searchParams.append(i,a)}));else{new URLSearchParams(e.trim()).forEach((function(e,t){e?r.searchParams.append(t,e):r.searchParams.append(t,"")}))}return r.toString()}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if("function"!=typeof e)throw new TypeError("Parameter callback must be a function");Liferay.Service("/country/get-countries",{active:!0},e)}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if("function"!=typeof e)throw new TypeError("Parameter callback must be a function");if("string"!=typeof t)throw new TypeError("Parameter selectKey must be a string");Liferay.Service("/region/get-regions",{active:!0,countryId:parseInt(t,10)},e)}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if(e=(0,r.default)(e),(0,o.default)(e)){var t=function(e){var t=[];for(;e.parentElement;)e.parentElement.getAttribute("disabled")&&t.push(e.parentElement),e=e.parentElement;return t}(e),n=!e.getAttribute("disabled")&&e.offsetWidth>0&&e.offsetHeight>0&&!t.length,i=e.closest("form");if(!i||n)e.focus();else if(i){var a=i.getAttribute("data-fm-namespace")+"formReady";Liferay.on(a,(function t(n){i.getAttribute("name")===n.formName&&(e.focus(),Liferay.detach(a,t))}))}}};var r=i(n(7)),o=i(n(22));function i(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if((e=o.default.toElement(e))&&"FORM"===e.nodeName)if(e.setAttribute("method","post"),(0,r.isObject)(t)){var n=t.data,a=t.url;if(!(0,r.isObject)(n))return;(0,i.default)(e,n),(0,r.isDef)(a)?(0,r.isString)(a)&&submitForm(e,a):submitForm(e)}else submitForm(e)};var r=n(0),o=a(n(61)),i=a(n(26));
6417function a(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.globalEvalStyles=t.globalEval=t.features=t.DomEventHandle=t.DomEventEmitterProxy=t.domData=void 0;var r=n(2);Object.keys(r).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return r[e]}})}));var o=f(r),i=f(n(8)),a=f(n(64)),u=f(n(24)),c=f(n(25)),l=f(n(65)),s=f(n(66));function f(e){return e&&e.__esModule?e:{default:e}}n(67),t.domData=i.default,t.DomEventEmitterProxy=a.default,t.DomEventHandle=u.default,t.features=c.default,t.globalEval=l.default,t.globalEvalStyles=s.default,t.default=o.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.customEvents=void 0,t.addClasses=function(e,t){if(!(0,r.isObject)(e)||!(0,r.isString)(t))return;e.length||(e=[e]);for(var n=0;n<e.length;n++)"classList"in e[n]?d(e[n],t):p(e[n],t)},t.closest=y,t.append=h,t.buildFragment=m,t.contains=b,t.delegate=g,t.isNodeListLike=w,t.enterDocument=function(e){e&&h(document.body,e)},t.exitDocument=function(e){e&&e.parentNode&&e.parentNode.removeChild(e)},t.hasClass=function(e,t){return"classList"in e?function(e,t){return-1===t.indexOf(" ")&&e.classList.contains(t)}(e,t):function(e,t){return(" "+e.className+" ").indexOf(" "+t+" ")>=0&&1===t.split(" ").length}(e,t)},t.isEmpty=function(e){return 0===e.childNodes.length},t.match=j,t.next=function(e,t){do{if((e=e.nextSibling)&&j(e,t))return e}while(e);return null},t.on=E,t.once=function(e,t,n){var r=E(e,t,(function(){return r.removeListener(),n.apply(this,arguments)}));return r},t.parent=S,t.prepend=function(e,t){(0,r.isString)(t)&&(t=m(t));if(!w(t)&&!(0,r.isDefAndNotNull)(e.firstChild))return h(e,t);if(w(t))for(var n=Array.prototype.slice.call(t),o=n.length-1;o>=0;o--)e.insertBefore(n[o],e.firstChild);else e.insertBefore(t,e.firstChild);return t},t.registerCustomEvent=function(e,t){s[e]=t},t.removeChildren=function(e){var t=void 0;for(;t=e.firstChild;)e.removeChild(t)},t.removeClasses=function(e,t){if(!(0,r.isObject)(e)||!(0,r.isString)(t))return;e.length||(e=[e]);for(var n=0;n<e.length;n++)"classList"in e[n]?P(e[n],t):T(e[n],t)},t.replace=function(e,t){e&&t&&e!==t&&e.parentNode&&e.parentNode.replaceChild(t,e)},t.supportsEvent=function(e,t){if(s[t])return!0;(0,r.isString)(e)&&(c[e]||(c[e]=document.createElement(e)),e=c[e]);var n=e.tagName;l[n]&&l[n].hasOwnProperty(t)||(l[n]=l[n]||{},l[n][t]="on"+t in e);return l[n][t]},t.toElement=function(e){return(0,r.isElement)(e)||(0,r.isDocument)(e)||(0,r.isDocumentFragment)(e)?e:(0,r.isString)(e)?document.querySelector(e):null},t.toggleClasses=function(e,t){if(!(0,r.isObject)(e)||!(0,r.isString)(t))return;"classList"in e?function(e,t){t.split(" ").forEach((function(t){e.classList.toggle(t)}))}(e,t):function(e,t){var n=" "+e.className+" ";t=t.split(" ");for(var r=0;r<t.length;r++){var o=" "+t[r]+" ",i=n.indexOf(o);if(-1===i)n=""+n+t[r]+" ";else{var a=n.substring(0,i),u=n.substring(i+o.length);n=a+" "+u}}e.className=n.trim()}(e,t)},t.triggerEvent=function(e,t,n){if(_(e,t,n)){var o=document.createEvent("HTMLEvents");o.initEvent(t,!0,!0),r.object.mixin(o,n),e.dispatchEvent(o)}};var r=n(0),o=u(n(8)),i=u(n(63)),a=u(n(24));function u(e){return e&&e.__esModule?e:{default:e}}var c={},l={},s=t.customEvents={},f={blur:!0,error:!0,focus:!0,invalid:!0,load:!0,scroll:!0};function d(e,t){t.split(" ").forEach((function(t){t&&e.classList.add(t)}))}function p(e,t){var n=" "+e.className+" ",r="";t=t.split(" ");for(var o=0;o<t.length;o++){var i=t[o];-1===n.indexOf(" "+i+" ")&&(r+=" "+i)}r&&(e.className=e.className+r)}function v(e,t,n){e[t]||(e[t]=[]),e[t].push(n)}function y(e,t){for(;e&&!j(e,t);)e=e.parentNode;return e}function h(e,t){if((0,r.isString)(t)&&(t=m(t)),w(t))for(var n=Array.prototype.slice.call(t),o=0;o<n.length;o++)e.appendChild(n[o]);else e.appendChild(t);return t}function m(e){var t=document.createElement("div");t.innerHTML="<br>"+e,t.removeChild(t.firstChild);for(var n=document.createDocumentFragment();t.firstChild;)n.appendChild(t.firstChild);return n}function b(e,t){return(0,r.isDocument)(e)?e.documentElement.contains(t):e.contains(t)}function g(e,t,n,a,u){var c=s[t];return c&&c.delegate&&(t=c.originalEvent,a=c.handler.bind(c,a)),u&&((a=a.bind()).defaultListener_=!0),function(e,t){var n=o.default.get(e,"delegating",{});n[t]||(n[t]={handle:E(e,t,O,!!f[t]),selectors:{}})}(e,t),(0,r.isString)(n)?function(e,t,n,r){v(o.default.get(e,"delegating",{})[t].selectors,n,r)}(e,t,n,a):function(e,t,n){v(o.default.get(e,"listeners",{}),t,n)}(n,t,a),new i.default((0,r.isString)(n)?e:n,t,a,(0,r.isString)(n)?n:null)}function _(e,t,n){if(n&&"click"===t&&2===n.button)return!1;return!("click"===t&&["BUTTON","INPUT","SELECT","TEXTAREA","FIELDSET"].indexOf(e.tagName)>-1)||!(e.disabled||S(e,"fieldset[disabled]"))}function w(e){return(0,r.isDefAndNotNull)(e)&&"number"==typeof e.length&&"function"==typeof e.item}function O(e){!function(e){e.stopPropagation=k,e.stopImmediatePropagation=L}(e);var t=!0,n=e.currentTarget,r=[];return t&=function(e,t,n){var r=!0,o=t.target,i=e.parentNode;for(;o&&o!==i&&!t.stopped;)_(o,t.type,t)&&(t.delegateTarget=o,r&=A(o,t,n),r&=I(e,o,t,n)),o=o.parentNode;return r}(n,e,r),t&=function(e,t){for(var n=!0,r=0;r<e.length&&!t.defaultPrevented;r++)t.delegateTarget=e[r].element,n&=e[r].fn(t);return n}(r,e),e.delegateTarget=null,e.__metal_last_container__=n,t}function j(e,t){if(!e||1!==e.nodeType)return!1;var n=Element.prototype,r=n.matches||n.webkitMatchesSelector||n.mozMatchesSelector||n.msMatchesSelector||n.oMatchesSelector;return r?r.call(e,t):function(e,t){var n=e.parentNode;if(n)for(var r=n.querySelectorAll(t),o=0;o<r.length;++o)if(r[o]===e)return!0;return!1}(e,t)}function E(e,t,n,o){if((0,r.isString)(e))return g(document,t,e,n);var i=s[t];return i&&i.event&&(t=i.originalEvent,n=i.handler.bind(i,n)),e.addEventListener(t,n,o),new a.default(e,t,n,o)}function S(e,t){return y(e.parentNode,t)}function P(e,t){t.split(" ").forEach((function(t){t&&e.classList.remove(t)}))}function T(e,t){var n=" "+e.className+" ";t=t.split(" ");for(var r=0;r<t.length;r++)n=n.replace(" "+t[r]+" "," ");e.className=n.trim()}function L(){this.stopped=!0,this.stoppedImmediate=!0,Event.prototype.stopImmediatePropagation.call(this)}function k(){this.stopped=!0,Event.prototype.stopPropagation.call(this)}function A(e,t,n){var i=t.__metal_last_container__;return!(!(0,r.isDef)(i)||!b(i,e))||M(o.default.get(e,"listeners",{})[t.type],t,e,n)}function M(e,t,n,r){var o=!0;e=e||[];for(var i=0;i<e.length&&!t.stoppedImmediate;i++)e[i].defaultListener_?r.push({element:n,fn:e[i]}):o&=e[i](t);return o}function I(e,t,n,r){for(var i=!0,a=o.default.get(e,"delegating",{})[n.type].selectors,u=Object.keys(a),c=0;c<u.length&&!n.stoppedImmediate;c++){if(j(t,u[c]))i&=M(a[u[c]],n,t,r)}return i}},function(e,t,n){"use strict";
6417Object.defineProperty(t,"__esModule",{value:!0});var r,o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(0),a=n(8),u=(r=a)&&r.__esModule?r:{default:r};var c=function(e){function t(e,n,r,o){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n,r));return i.selector_=o,i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"removeListener",value:function(){var e=u.default.get(this.emitter_,"delegating",{}),t=u.default.get(this.emitter_,"listeners",{}),n=this.selector_,r=(0,i.isString)(n)?e[this.event_].selectors:t,o=(0,i.isString)(n)?n:this.event_;i.array.remove(r[o]||[],this.listener_),r[o]&&0===r[o].length&&delete r[o]}}]),t}(n(5).EventHandle);t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,r)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(r):void 0},i=n(2);function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var c=function(e){function t(){return a(this,t),u(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"addListener_",value:function(e,n){if(this.originEmitter_.addEventListener){if(this.isDelegateEvent_(e)){var r=e.indexOf(":",9),a=e.substring(9,r),u=e.substring(r+1);return(0,i.delegate)(this.originEmitter_,a,u,n)}return(0,i.on)(this.originEmitter_,e,n)}return o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"addListener_",this).call(this,e,n)}},{key:"isDelegateEvent_",value:function(e){return"delegate:"===e.substr(0,9)}},{key:"isSupportedDomEvent_",value:function(e){return!this.originEmitter_||!this.originEmitter_.addEventListener||(this.isDelegateEvent_(e)&&-1!==e.indexOf(":",9)||(0,i.supportsEvent)(this.originEmitter_,e))}},{key:"shouldProxyEvent_",value:function(e){return o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"shouldProxyEvent_",this).call(this,e)&&this.isSupportedDomEvent_(e)}}]),t}(n(5).EventEmitterProxy);t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(0),i=n(2);var a=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return r(e,null,[{key:"run",value:function(e,t){var n=document.createElement("script");return n.text=e,t?t(n):document.head.appendChild(n),(0,i.exitDocument)(n),n}},{key:"runFile",value:function(e,t,n){var r=document.createElement("script");r.src=e;var o=function(){(0,i.exitDocument)(r),t&&t()};return(0,i.once)(r,"load",o),(0,i.once)(r,"error",o),n?n(r):document.head.appendChild(r),r}},{key:"runScript",value:function(t,n,r){var a=function(){n&&n()};if(!t.type||"text/javascript"===t.type)return(0,i.exitDocument)(t),t.src?e.runFile(t.src,n,r):(o.async.nextTick(a),e.run(t.text,r));o.async.nextTick(a)}},{key:"runScriptsInElement",value:function(t,n,r){var i=t.querySelectorAll("script");i.length?e.runScriptsInOrder(i,0,n,r):n&&o.async.nextTick(n)}},{key:"runScriptsInOrder",value:function(t,n,r,i){e.runScript(t.item(n),(function(){n<t.length-1?e.runScriptsInOrder(t,n+1,r,i):r&&o.async.nextTick(r)}),i)}}]),e}();t.default=a},function(e,t,n){"use strict";
6417Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(0),i=n(2);var a=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return r(e,null,[{key:"run",value:function(e,t){var n=document.createElement("style");return n.innerHTML=e,t?t(n):document.head.appendChild(n),n}},{key:"runFile",value:function(t,n,r){var o=document.createElement("link");return o.rel="stylesheet",o.href=t,e.runStyle(o,n,r),o}},{key:"runStyle",value:function(e,t,n){var r=function(){t&&t()};if(!e.rel||"stylesheet"===e.rel||"canonical"===e.rel||"alternate"===e.rel)return"STYLE"===e.tagName||"canonical"===e.rel||"alternate"===e.rel?o.async.nextTick(r):((0,i.once)(e,"load",r),(0,i.once)(e,"error",r)),n?n(e):document.head.appendChild(e),e;o.async.nextTick(r)}},{key:"runStylesInElement",value:function(t,n,r){var i=t.querySelectorAll("style,link");if(0===i.length&&n)o.async.nextTick(n);else for(var a=0,u=function(){n&&++a===i.length&&o.async.nextTick(n)},c=0;c<i.length;c++)e.runStyle(i[c],u,r)}}]),e}();t.default=a},function(e,t,n){"use strict";var r,o=n(0),i=n(2),a=n(25),u=(r=a)&&r.__esModule?r:{default:r};(0,o.isServerSide)()||function(){var e={mouseenter:"mouseover",mouseleave:"mou
6417seout",pointerenter:"pointerover",pointerleave:"pointerout"};Object.keys(e).forEach((function(t){(0,i.registerCustomEvent)(t,{delegate:!0,handler:function(e,n){var r=n.relatedTarget,o=n.delegateTarget;if(!r||r!==o&&!(0,i.contains)(o,r))return n.customType=t,e(n)},originalEvent:e[t]})}));var t={animation:"animationend",transition:"transitionend"};Object.keys(t).forEach((function(e){var n=t[e];(0,i.registerCustomEvent)(n,{event:!0,delegate:!0,handler:function(e,t){return t.customType=n,e(t)},originalEvent:u.default.checkAnimationEventName()[e]})}))}()},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=i({},u,{},t),o=n.addSpaceBeforeSuffix,a=n.decimalSeparator,c=n.denominator,l=n.suffixGB,s=n.suffixKB,f=n.suffixMB;if(!(0,r.isNumber)(e))throw new TypeError("Parameter size must be a number");var d=0,p=s;(e/=c)>=c&&(p=f,e/=c,d=1);e>=c&&(p=l,e/=c,d=1);var v=e.toFixed(d);"."!==a&&(v=v.replace(/\./,a));return v+(o?" ":"")+p};var r=n(0);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var u={addSpaceBeforeSuffix:!1,decimalSeparator:".",denominator:1024,suffixGB:"GB",suffixKB:"KB",suffixMB:"MB"}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=i({},j,{},t),o=n.newLine,a=n.tagIndent;if(!(0,r.isString)(e))throw new TypeError("Parameter content must be a string");var S=[];e=(e=(e=(e=(e=(e=e.trim()).replace(u,(function(e){return S.push(e),"<~::~CDATA~::~>"}))).replace(w,"><")).replace(g,"~::~<")).replace(m,"~::~$1$2")).replace(O,(function(){return S.shift()}));var P=0,T=!1,L=e.split("~::~"),k=0,A="";return L.forEach((function(e,t){u.test(e)?A+=E(k,o,a)+e:l.test(e)?(A+=E(k,o,a)+e,P++,T=!0,(c.test(e)||f.test(e))&&(P--,T=0!==P)):c.test(e)?(A+=e,P--,T=0!==P):d.exec(L[t-1])&&p.exec(e)&&v.exec(L[t-1])==y.exec(e)[0].replace("/","")?(A+=e,T||--k):!h.test(e)||b.test(e)||_.test(e)?h.test(e)&&b.test(e)?A+=T?e:E(k,o,a)+e:b.test(e)?A+=T?e:E(--k,o,a)+e:_.test(e)?A+=T?e:E(k,o,a)+e:(s.test(e),A+=E(k,o,a)+e):A+=T?e:E(k++,o,a)+e,new RegExp("^"+o).test(A)&&(A=A.slice(o.length))})),A};var r=n(0);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var u=/<!\[CDATA\[[\0-\uFFFF]*?\]\]>/g,c=/-->|\]>/,l=/<!/,s=/<\?/,f=/!DOCTYPE/,d=/^<\w/,p=/^<\/\w/,v=/^<[\w:\-.,]+/,y=/^<\/[\w:\-.,]+/,h=/<\w/,m=/\s*(xmlns)(:|=)/g,b=/<\//,g=/</g,_=/\/>/,w=/>\s+</g,O=new RegExp("<~::~CDATA~::~>","g"),j={newLine:"\r\n",tagIndent:"\t"};function E(e,t,n){return t+new Array(e+1).join(n)}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(!(0,r.isObject)(e)||(0,r.isObject)(e)&&"IMG"!==e.tagName)throw new TypeError("Parameter imagePreview must be an image");if(!(0,r.isObject)(t))throw new TypeError("Parameter region must be an object");
6417var n=e.naturalWidth/e.offsetWidth,o=e.naturalHeight/e.offsetHeight,i=t.height?t.height*o:e.naturalHeight,a=t.width?t.width*n:e.naturalWidth,u=t.x?Math.max(t.x*n,0):0,c=t.y?Math.max(t.y*o,0):0;return{height:i,width:a,x:u,y:c}};var r=n(0)},function(e,t){function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e))&&"[object Arguments]"!==Object.prototype.toString.call(e))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}Object.defineProperty(t,"__esModule",{value:!0}),t.escapeHTML=function(e){return e.replace(a,(function(e){return r[e]}))},t.unescapeHTML=function(e){return e.replace(u,(function(e){return(new DOMParser).parseFromString(e,"text/html").documentElement.textContent}))},t.MAP_HTML_CHARS_ESCAPED=void 0;var r={'"':"&#034;","&":"&amp;","'":"&#039;","/":"&#047;","<":"&lt;",">":"&gt;","`":"&#096;"};t.MAP_HTML_CHARS_ESCAPED=r;var o={};Object.entries(r).forEach((function(e){var t=n(e,2),r=t[0],i=t[1];o[i]=r}));var i=Object.keys(r),a=new RegExp("[".concat(i.join(""),"]"),"g"),u=/&([^;]+);/g},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return window.innerWidth<o.default.PHONE};var r,o=(r=n(6))&&r.__esModule?r:{default:r}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return window.innerWidth<o.default.TABLET};var r,o=(r=n(6))&&r.__esModule?r:{default:r}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){Liferay.SPA&&Liferay.SPA.app&&Liferay.SPA.app.canNavigate(e)?(Liferay.SPA.app.navigate(e),t&&Object.keys(t).forEach((function(e){Liferay.once(e,t[e])}))):window.location.href=e}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if("string"!=typeof e)throw new TypeError("parameter text must be a string");return e.replace(/[^a-z0-9_-]/gi,"-").replace(/^-+/,"").replace(/--+/,"-").toLowerCase()}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n;if("object"!==i(t))n=u(e,t);else{n={},Object.keys(t).forEach((function(r){var o=r;r=u(e,r),n[r]=t[o]}))}return n};var r,o=(r=n(14))&&r.__esModule?r:{default:r};function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var a,u=(a=function(e,t){return void 0!==t&&0!==t.lastIndexOf(e,0)&&(t="".concat(e).concat(t)),t},(0,o.default)(a,(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.length>1?Array.prototype.join.call(t,"_"):String(t[0])})))},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if(!(0,r.isObject)(e))throw new TypeError("Parameter obj must be an object");var t=new URLSearchParams;return Object.entries(e).forEach((function(e){var n=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e))&&"[object Arguments]"!==Object.prototype.toString.call(e))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}(e,2),r=n[0],o=n[1];if(Array.isArray(o))for(var i=0;i<o.length;i++)t.append(r,o[i]);else t.append(r,o)})),t};var r=n(0)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,o.default)(e,a({},t,{p_p_lifecycle:"1"}))};var r,o=(r=n(3))&&r.__esModule?r:{default:r};function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
6417t%2?i(Object(n),!0).forEach((function(t){u(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,o.default)(e,a({},t,{p_p_lifecycle:"0"}))};var r,o=(r=n(3))&&r.__esModule?r:{default:r};function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){u(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,o.default)(e,a({},t,{p_p_lifecycle:"2"}))};var r,o=(r=n(3))&&r.__esModule?r:{default:r};function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){u(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.getSessionValue=function(e){var t=a("get");return t.append("key",e),(0,o.default)(u(),{body:t,method:"POST"}).then((function(e){return e.text()})).then((function(e){if(e.startsWith("serialize://")){var t=e.substring("serialize://".length);e=JSON.parse(t)}return e}))},t.setSessionValue=function(e,t){var n=a("set");t&&"object"===i(t)&&(t="serialize://"+JSON.stringify(t));return n.append(e,t),(0,o.default)(u(),{body:n,method:"POST"})};var r,o=(r=n(4))&&r.__esModule?r:{default:r};function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e){var t=Liferay.ThemeDisplay.getDoAsUserIdEncoded(),n=new FormData;return n.append("cmd",e),n.append("p_auth",Liferay.authToken),t&&n.append("doAsUserId",t),n}function u(){return"".concat(Liferay.ThemeDisplay.getPortalURL()).concat(Liferay.ThemeDisplay.getPathMain(),"/portal/session_click")}}]));
6418//# sourceMappingURL=global.bundle.js.map
6419function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
6420
6421function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); }
6421 else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
6422
6423function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6424
6425/**
6426 * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
6427 *
6428 * This library is free software; you can redistribute it and/or modify it under
6429 * the terms of the GNU Lesser General Public License as published by the Free
6430 * Software Foundation; either version 2.1 of the License, or (at your option)
6431 * any later version.
6432 *
6433 * This library is distributed in the hope that it will be useful, but WITHOUT
6434 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
6435 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
6436 * details.
6437 */
6438(function (A, Liferay) {
6439  var Lang = A.Lang;
6440  var Util = Liferay.Util;
6441  var STR_HEAD = 'head';
6442  var TPL_NOT_AJAXABLE = '<div class="alert alert-info">{0}</div>';
6443
6444  var Portlet = _objectSpread({}, Liferay.Portlet, {
6445    _defCloseFn: function _defCloseFn(event) {
6446      event.portlet.remove(true);
6447
6448      if (!event.nestedPortlet) {
6449        var formData = Liferay.Util.objectToFormData({
6450          cmd: 'delete',
6451          doAsUserId: event.doAsUserId,
6452          p_auth: Liferay.authToken,
6453          p_l_id: event.plid,
6454          p_p_id: event.portletId,
6455          p_v_l_s_g_id: themeDisplay.getSiteGroupId()
6456        });
6457        Liferay.Util.fetch(themeDisplay.getPathMain() + '/portal/update_layout', {
6458          body: formData,
6459          method: 'POST'
6460        }).then(function (response) {
6461          if (response.ok) {
6462            Liferay.fire('updatedLayout');
6463          }
6464        });
6465      }
6466    },
6467    _loadMarkupHeadElements: function _loadMarkupHeadElements(response) {
6468      var markupHeadElements = response.markupHeadElements;
6469
6470      if (markupHeadElements && markupHeadElements.length) {
6471        var head = A.one(STR_HEAD);
6472        head.append(markupHeadElements);
6473        var container = A.Node.create('<div />');
6474        container.plug(A.Plugin.ParseContent);
6475        container.setContent(markupHeadElements);
6476      }
6477    },
6478    _loadPortletFiles: function _loadPortletFiles(response, loadHTML) {
6479      var footerCssPaths = response.footerCssPaths || [];
6480      var headerCssPaths = response.headerCssPaths || [];
6481      var javascriptPaths = response.headerJavaScriptPaths || [];
6482      javascriptPaths = javascriptPaths.concat(response.footerJavaScriptPaths || []);
6483      var body = A.getBody();
6484      var head = A.one(STR_HEAD);
6485
6486      if (headerCssPaths.length) {
6487        A.Get.css(headerCssPaths, {
6488          insertBefore: head.get('firstChild').getDOM()
6489        });
6490      }
6491
6492      var lastChild = body.get('lastChild').getDOM();
6493
6494      if (footerCssPaths.length) {
6495        A.Get.css(footerCssPaths, {
6496          insertBefore: lastChild
6497        });
6498      }
6499
6500      var responseHTML = response.portletHTML;
6501
6502      if (javascriptPaths.length) {
6503        A.Get.script(javascriptPaths, {
6504          onEnd: function onEnd() {
6505            loadHTML(responseHTML);
6506          }
6507        });
6508      } else {
6509        loadHTML(responseHTML);
6510      }
6511    },
6512    _mergeOptions: function _mergeOptions(portlet, options) {
6513      options = options || {};
6514      options.doAsUserId = options.doAsUserId || themeDisplay.getDoAsUserIdEncoded();
6515      options.plid = options.plid || themeDisplay.getPlid();
6516      options.portlet = portlet;
6517      options.portletId = portlet.portletId;
6518      return options;
6519    },
6520    _staticPortlets: {},
6521    destroyComponents: function destroyComponents(portletId) {
6522      Liferay.destroyComponents(function (_component, componentConfig) {
6523        return portletId === componentConfig.portletId;
6524      });
6525    },
6526    isStatic: function isStatic(portletId) {
6527      var instance = this;
6528      var id = Util.getPortletId(portletId.id || portletId);
6529      return id in instance._staticPortlets;
6530    },
6531    list: [],
6532    readyCounter: 0,
6533    refreshLayout: function refreshLayout(_portletBoundary) {},
6534    register: function register(portletId) {
6535      var instance = this;
6536
6537      if (instance.list.indexOf(portletId) < 0) {
6538        instance.list.push(portletId);
6539      }
6540    }
6541  });
6542
6543  Liferay.provide(Portlet, 'add', function (options) {
6544    var instance = this;
6545    Liferay.fire('initLayout');
6546    var doAsUserId = options.doAsUserId || themeDisplay.getDoAsUserIdEncoded();
6547    var plid = options.plid || themeDisplay.getPlid();
6548    var portletData = options.portletData;
6549    var portletId = options.portletId;
6550    var portletItemId = options.portletItemId;
6551    var placeHolder = options.placeHolder;
6552
6553    if (!placeHolder) {
6554      placeHolder = A.Node.create('<div class="loading-animation" />');
6555    } else {
6556      placeHolder = A.one(placeHolder);
6557    }
6558
6559    var beforePortletLoaded = options.beforePortletLoaded;
6560    var onCompleteFn = options.onComplete;
6561
6562    var onComplete = function onComplete(portlet, portletId) {
6563      if (onCompleteFn) {
6564        onCompleteFn(portlet, portletId);
6565      }
6566
6567      instance.list.push(portlet.portletId);
6568
6569      if (portlet) {
6570        portlet.attr('data-qa-id', 'app-loaded');
6571      }
6572
6573      Liferay.fire('addPortlet', {
6574        portlet: portlet
6575      });
6576    };
6577
6578    var container = null;
6579
6580    if (Liferay.Layout && Liferay.Layout.INITIALIZED) {
6581      container = Liferay.Layout.getActiveDropContainer();
6582    }
6583
6584    if (!container) {
6585      return;
6586    }
6587
6588    var currentColumnId = Util.getColumnId(container.attr('id'));
6589    var portletPosition = 0;
6590
6591    if (options.placeHolder) {
6592      var column = placeHolder.get('parentNode');
6593
6594      if (!column) {
6595        return;
6596      }
6597
6598      placeHolder.addClass('portlet-boundary');
6599      var columnPortlets = column.all('.portlet-boundary');
6600      var nestedPortlets = column.all('.portlet-nested-portlets');
6601      portletPosition = columnPortlets.indexOf(placeHolder);
6602      var nestedPortletOffset = 0;
6603      nestedPortlets.some(function (nestedPortlet) {
6604        var nestedPortletIndex = columnPortlets.indexOf(nestedPortlet);
6605
6606        if (nestedPortletIndex !== -1 && nestedPortletIndex < portletPosition) {
6607          nestedPortletOffset += nestedPortlet.all('.portlet-boundary').size();
6608        } else if (nestedPortletIndex >= portletPosition) {
6609          return true;
6610        }
6611      });
6612      portletPosition -= nestedPortletOffset;
6613      currentColumnId = Util.getColumnId(column.attr('id'));
6614    }
6615
6616    var url = themeDisplay.getPathMain() + '/portal/update_layout';
6617    var data = {
6618      cmd: 'add',
6619      dataType: 'JSON',
6620      doAsUserId: doAsUserId,
6621      p_auth: Liferay.authToken,
6622      p_l_id: plid,
6623      p_p_col_id: currentColumnId,
6624      p_p_col_pos: portletPosition,
6625      p_p_i_id: portletItemId,
6626      p_p_id: portletId,
6627      p_p_isolated: true,
6628      p_v_l_s_g_id: themeDisplay.getSiteGroupId(),
6629      portletData: portletData
6630    };
6631    var firstPortlet = container.one('.portlet-boundary');
6632    var hasStaticPortlet = firstPortlet && firstPortlet.isStatic;
6633
6634    if (!options.placeHolder && !options.plid) {
6635      if (!hasStaticPortlet) {
6636        container.prepend(placeHolder);
6637      } else {
6638        firstPortlet.placeAfter(placeHolder);
6639      }
6640    }
6641
6642    data.currentURL = Liferay.currentURL;
6643    instance.addHTML({
6644      beforePortletLoaded: beforePortletLoaded,
6645      data: data,
6646      onComplete: onComplete,
6647      placeHolder: placeHolder,
6648      url: url
6649    });
6650  }, ['aui-base']);
6651  Liferay.provide(Portlet, 'addHTML', function (options) {
6652    var instance = this;
6653    var portletBoundary = null;
6654    var beforePortletLoaded = options.beforePortletLoaded;
6655    var data = options.data;
6656    var dataType = 'HTML';
6657    var onComplete = options.onComplete;
6658    var placeHolder = options.placeHolder;
6659    var url = options.url;
6660
6661    if (data && Lang.isString(data.dataType)) {
6662      dataType = data.dataType;
6663    }
6664
6665    dataType = dataType.toUpperCase();
6666
6667    var addPortletReturn = function addPortletReturn(html) {
6668      var container = placeHolder.get('parentNode');
6669      var portletBound = A.Node.create('<div></div>');
6670      portletBound.plug(A.Plugin.ParseContent);
6671      portletBound.setContent(html);
6672      portletBound = portletBound.one('> *');
6673      var portletId;
6674
6675      if (portletBound) {
6676        var id = portletBound.attr('id');
6677        portletId = Util.getPortletId(id);
6678        portletBound.portletId = portletId;
6679        placeHolder.hide();
6680        placeHolder.placeAfter(portletBound);
6681        placeHolder.remove();
6682        instance.refreshLayout(portletBound);
6683
6684        if (window.location.hash) {
6685          window.location.href = window.location.hash;
6686        }
6687
6688        portletBoundary = portletBound;
6689        var Layout = Liferay.Layout;
6690
6691        if (Layout && Layout.INITIALIZED) {
6692          Layout.updateCurrentPortletInfo(portletBoundary);
6693
6694          if (container) {
6695            Layout.syncEmptyColumnClassUI(container);
6696          }
6697
6698          Layout.syncDraggableClassUI();
6699          Layout.updatePortletDropZones(portletBoundary);
6700        }
6701
6702        if (onComplete) {
6703          onComplete(portletBoundary, portletId);
6704        }
6705      } else {
6706        placeHolder.remove();
6707      }
6708
6709      return portletId;
6710    };
6711
6712    if (beforePortletLoaded) {
6713      beforePortletLoaded(placeHolder);
6714    }
6715
6716    Liferay.Util.fetch(url, {
6717      body: Liferay.Util.objectToURLSearchParams(data),
6718      method: 'POST'
6719    }).then(function (response) {
6720      if (dataType === 'JSON') {
6721        return response.json();
6722      } else {
6723        return response.text();
6724      }
6725    }).then(function (response) {
6726      if (dataType === 'HTML') {
6727        addPortletReturn(response);
6728      } else if (response.refresh) {
6729        addPortletReturn(response.portletHTML);
6730      } else {
6731        Portlet._loadMarkupHeadElements(response);
6732
6733        Portlet._loadPortletFiles(response, addPortletReturn);
6734      }
6735
6736      if (!data || !data.preventNotification) {
6737        Liferay.fire('updatedLayout');
6738      }
6739    })["catch"](function (error) {
6740      var message = typeof error === 'string' ? error : 'Errore\x20Inaspettato\x2e\x20Aggiorna\x20la\x20pagina\x20corrente\x2e';
6741      Liferay.Util.openToast({
6742        message: message,
6743        type: 'danger'
6744      });
6745    });
6746  }, ['aui-parse-content']);
6747  Liferay.provide(Portlet, 'close', function (portlet, skipConfirm, options) {
6748    var instance = this;
6749    portlet = A.one(portlet);
6750
6751    if (portlet && (skipConfirm || confirm('Sei\x20sicuro\x20di\x20voler\x20rimuovere\x20questo\x20componente\x3f'))) {
6752      var portletId = portlet.portletId;
6753      var portletIndex = instance.list.indexOf(portletId);
6754
6755      if (portletIndex >= 0) {
6756        instance.list.splice(portletIndex, 1);
6757      }
6758
6759      options = Portlet._mergeOptions(portlet, options);
6760      Portlet.destroyComponents(portletId);
6761      Liferay.fire('destroyPortlet', options);
6762      Liferay.fire('closePortlet', options);
6763    } else {
6764      A.config.win.focus();
6765    }
6766  }, []);
6767  Liferay.provide(Portlet, 'destroy', function (portlet, options) {
6768    portlet = A.one(portlet);
6769
6770    if (portlet) {
6771      var portletId = portlet.portletId || Util.getPortletId(portlet.attr('id'));
6772      Portlet.destroyComponents(portletId);
6773      Liferay.fire('destroyPortlet', Portlet._mergeOptions(portlet, options));
6774    }
6775  }, ['aui-node-base']);
6776  Liferay.provide(Portlet, 'onLoad', function (options) {
6777    var instance = this;
6778    var canEditTitle = options.canEditTitle;
6779    var columnPos = options.columnPos;
6780    var isStatic = options.isStatic == 'no' ? null : options.isStatic;
6781    var namespacedId = options.namespacedId;
6782    var portletId = options.portletId;
6783    var refreshURL = options.refreshURL;
6784    var refreshURLData = options.refreshURLData;
6785
6786    if (isStatic) {
6787      instance.registerStatic(portletId);
6788    }
6789
6790    var portlet = A.one('#' + namespacedId);
6791
6792    if (portlet && !portlet.portletProcessed) {
6793      portlet.portletProcessed = true;
6794      portlet.portletId = portletId;
6795      portlet.columnPos = columnPos;
6796      portlet.isStatic = isStatic;
6797      portlet.refreshURL = refreshURL;
6798      portlet.refreshURLData = refreshURLData; // Functions to run on portlet load
6799
6800      if (canEditTitle) {
6801        // https://github.com/yui/yui3/issues/1808
6802        var events = 'focus';
6803
6804        if (!A.UA.touchEnabled) {
6805          events = ['focus', 'mousemove'];
6806        }
6807
6808        var handle = portlet.on(events, function () {
6809          Util.portletTitleEdit({
6810            doAsUserId: themeDisplay.getDoAsUserIdEncoded(),
6811            obj: portlet,
6812            plid: themeDisplay.getPlid(),
6813            portletId: portletId
6814          });
6815          handle.detach();
6816        });
6817      }
6818    }
6819
6820    Liferay.fire('portletReady', {
6821      portlet: portlet,
6822      portletId: portletId
6823    });
6824    instance.readyCounter++;
6825
6826    if (instance.readyCounter === instance.list.length) {
6827      Liferay.fire('allPortletsReady', {
6828        portletId: portletId
6829      });
6830    }
6831  }, ['aui-base', 'aui-timer', 'event-move']);
6832  Liferay.provide(Portlet, 'refresh', function (portlet, data) {
6833    var instance = this;
6834    portlet = A.one(portlet);
6835
6836    if (portlet) {
6837      data = data || portlet.refreshURLData || {};
6838
6839      if (!Object.prototype.hasOwnProperty.call(data, 'portletAjaxable')) {
6840        data.portletAjaxable = true;
6841      }
6842
6843      var id = portlet.attr('portlet');
6844      var url = portlet.refreshURL;
6845      var placeHolder = A.Node.create('<div class="loading-animation" id="p_p_id' + id + '" />');
6846
6847      if (data.portletAjaxable && url) {
6848        portlet.placeBefore(placeHolder);
6849        portlet.remove(true);
6850        Portlet.destroyComponents(portlet.portletId);
6851        var params = {};
6852        var urlPieces = url.split('?');
6853
6854        if (urlPieces.length > 1) {
6855          params = A.QueryString.parse(urlPieces[1]);
6856          delete params.dataType;
6857          url = urlPieces[0];
6858        }
6859
6860        instance.addHTML({
6861          data: A.mix(params, data, true),
6862          onComplete: function onComplete(portlet, portletId) {
6863            portlet.refreshURL = url;
6864
6865            if (portlet) {
6866              portlet.attr('data-qa-id', 'app-refreshed');
6867            }
6868
6869            Liferay.fire(portlet.portletId + ':portletRefreshed', {
6870              portlet: portlet,
6871              portletId: portletId
6872            });
6873          },
6874          placeHolder: placeHolder,
6875          url: url
6876        });
6877      } else if (!portlet.getData('pendingRefresh')) {
6878        portlet.setData('pendingRefresh', true);
6879        var nonAjaxableContentMessage = Lang.sub(TPL_NOT_AJAXABLE, ['Questa\x20modifica\x20sarà\x20mostrata\x20solo\x20dopo\x20l\x27aggiornamento\x20della\x20pagina\x20corrente\x2e']);
6880        var portletBody = portlet.one('.portlet-body');
6881        portletBody.placeBefore(nonAjaxableContentMessage);
6882        portletBody.hide();
6883      }
6884    }
6885  }, ['aui-base', 'querystring-parse']);
6886  Liferay.provide(Portlet, 'registerStatic', function (portletId) {
6887    var instance = this;
6888    var Node = A.Node;
6889
6890    if (Node && portletId instanceof Node) {
6891      portletId = portletId.attr('id');
6892    } else if (portletId.id) {
6893      portletId = portletId.id;
6894    }
6895
6896    var id = Util.getPortletId(portletId);
6897    instance._staticPortlets[id] = true;
6898  }, ['aui-base']);
6899  Liferay.publish('closePortlet', {
6900    defaultFn: Portlet._defCloseFn
6901  });
6902  Liferay.publish('allPortletsReady', {
6903    fireOnce: true
6904  }); // Backwards compatability
6905
6906  Portlet.ready = function (fn) {
6907    Liferay.on('portletReady', function (event) {
6908      fn(event.portletId, event.portlet);
6909    });
6910  };
6911
6912  Liferay.Portlet = Portlet;
6913})(AUI(), Liferay);
6914//# sourceMappingURL=portlet.js.map
6915/**
6916 * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
6917 *
6918 * This library is free software; you can redistribute it and/or modify it under
6919 * the terms of the GNU Lesser General Public License as published by the Free
6920 * Software Foundation; either version 2.1 of the License, or (at your option)
6921 * any later version.
6922 *
6923 * This library is distributed in the hope that it will be useful, but WITHOUT
6924 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
6925 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
6926 * details.
6927 */
6928Liferay.Workflow = {
6929  ACTION_PUBLISH: 1,
6930  ACTION_SAVE_DRAFT: 2,
6931  STATUS_ANY: -1,
6932  STATUS_APPROVED: 0,
6933  STATUS_DENIED: 4,
6934  STATUS_DRAFT: 2,
6935  STATUS_EXPIRED: 3,
6936  STATUS_PENDING: 1
6937};
6938//# sourceMappingURL=workflow.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.