@aquera/nile-elements 0.1.3 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -79,6 +79,12 @@ To run a local development server that serves the basic demo located in `demo/in
79
79
 
80
80
  In this section, you can find the updates for each release of `nile-elements`. It's a good practice to maintain detailed release notes to help users and developers understand what changes have been made from one version to another and how these changes might affect their projects.
81
81
 
82
+ #### Version 0.1.5
83
+ - Nile Form Help Text - Slot content passing fixes
84
+
85
+ #### Version 0.1.4
86
+ - Nile Tour - Restructure and New theme
87
+
82
88
  #### Version 0.1.3
83
89
  - Nile Code Editor - HTML language support available
84
90
  - Nile Form Help Text - Help message UI fixes
package/demo/index.html CHANGED
@@ -10,101 +10,115 @@
10
10
  <script type="module" src="index.js"></script>
11
11
  </head>
12
12
 
13
+
14
+ <style>
15
+ .flex-container {
16
+ display: flex;
17
+ flex-wrap: wrap;
18
+ gap: 30px; /* Space between items */
19
+ padding: 0;
20
+ margin: 0;
21
+ border: 1px solid silver;
22
+
23
+ height: 900px;
24
+ }
25
+
26
+ nile-button {
27
+ flex: 0 0 auto; /* Prevent items from stretching */
28
+ background-color: lightgray;
29
+ padding: 10px 20px;
30
+ border: 1px solid #ccc;
31
+ }
32
+ </style>
33
+
34
+
35
+ <!-- Add the tour component -->
36
+ <nile-tour id="tour" .showBackdrop="false" .disableInteraction="false"></nile-tour>
37
+
38
+
13
39
  <body>
14
- <div id="demo">
15
- <div class="container">
16
- <nile-icon name="search" id="search-icon"></nile-icon>
17
- <div class="stack frame-left-lg" id="report-setup">
18
- <h1 id="title">Setup Reports</h1>
19
- <nile-checkbox
20
- label="This is label"
21
- help-text="this is help text"
22
- id="checkbox"
23
- ></nile-checkbox>
24
- <nile-textarea
25
- label="this is label"
26
- help-text="i'm here to help you"
27
- resize="vertical"
28
- id="textarea"
29
- ></nile-textarea>
30
- <nile-input label="Name of the report" required id="report-name">
31
- <p slot="help" class="nds-help">2FA Enabled</p>
32
- </nile-input>
33
- <nile-input label="Password" id="password-input"></nile-input>
34
- <nile-input label="City" id="city-input"></nile-input>
35
- <nile-input label="Address" id="address-input"></nile-input>
36
- <div class="stack--hor" slot="footer" id="footer-buttons">
37
- <nile-button id="save-button">Save</nile-button>
38
- <nile-button id="reset-button" variant="secondary">Reset</nile-button>
39
- <nile-button id="help-button" variant="tertiary">Help</nile-button>
40
- </div>
41
- </div>
42
- <div id="island">
43
- <nile-button id="drawer-button">Show Drawer</nile-button>
44
- </div>
45
- <div id="new-icons"></div>
46
- </div>
47
- </div>
48
-
49
- <!-- Add the tour component -->
50
- <nile-tour id="tour" show-backdrop="false" disable-interaction="false"></nile-tour>
51
-
52
- <script>
53
- // Reference to the tour element
54
- const tourElement = document.getElementById('tour');
55
-
56
- // Define the steps for the guided tour
57
- tourElement.steps = [
58
- {
59
- stepNo: 1,
60
- element: '#title',
61
- title: 'Welcome to Reports',
62
- content: 'This is the title section for setting up reports.',
63
- position: 'bottom',
64
- },
65
- {
66
- stepNo: 2,
67
- element: '#report-name',
68
- title: 'Report Name',
69
- content: 'Enter the name of the report you want to create here.',
70
- position: 'top',
71
- beforeChange: () => { return false }
72
- },
73
- {
74
- stepNo: 3,
75
- element: '#checkbox',
76
- title: 'Checkbox',
77
- content: 'Select this checkbox for additional options.',
78
- position: 'right',
79
- },
80
- {
81
- stepNo: 4,
82
- element: '#textarea',
83
- title: 'Text Area',
84
- content: 'Provide additional details about the report in this text area.',
85
- position: 'top',
86
- },
87
- {
88
- stepNo: 5,
89
- element: '#footer-buttons',
90
- title: 'Actions',
91
- content: 'Use the Save, Reset, and Help buttons to manage your actions.',
92
- position: 'left',
93
- },
94
- {
95
- stepNo: 6,
96
- element: '#drawer-button',
97
- title: 'Show Drawer',
98
- content: 'Click this button to open the drawer.',
99
- position: 'right',
100
- },
101
- ];
102
-
103
- // Start the tour when the page loads
104
- window.onload = () => {
105
- tourElement.startTour();
106
- };
107
- </script>
40
+ <div class="flex-container wrap" id="button-container"></div>
41
+
42
+
43
+
44
+
45
+ <style>
46
+ .frame-left-lg {
47
+ padding-left: 4rem;
48
+ margin-left: 208px;
49
+ }
50
+ </style>
51
+ <script>
52
+ const container = document.getElementById("button-container");
53
+ const tourElement = document.getElementById("tour");
54
+
55
+ // Define an array of random titles and contents
56
+ const titles = [
57
+ "Welcome to Reports", "Checkbox", "Text Area", "Actions",
58
+ "Submit Form", "Edit Item", "Delete Item", "View Details", "Settings"
59
+ ];
60
+
61
+ const contents = [
62
+ "This is the title section for setting up reports.",
63
+ "Select this checkbox for additional options.",
64
+ "Provide additional details about the report in this text area.",
65
+ "Use the Save, Reset, and Help buttons to manage your actions.",
66
+ "Click to submit your changes.",
67
+ "Click to edit this item.",
68
+ "Click to delete this item.",
69
+ "Click to view more details.",
70
+ "Change settings here."
71
+ ];
72
+
73
+ // Generate 100 buttons with random content and data-tour attributes
74
+ tourElement.steps = [];
75
+ for (let i = 1; i <= 80; i++) {
76
+ const button = document.createElement("nile-button");
77
+ const stepNo = i;
78
+ const elementId = `${i}`;
79
+ button.setAttribute("data-tour", stepNo);
80
+ button.setAttribute("variant", "secondary");
81
+ button.textContent = `Button ${i}`;
82
+
83
+ // Assign random content for the tour steps
84
+ const randomTitle = titles[Math.floor(Math.random() * titles.length)];
85
+ const randomContent = contents[Math.floor(Math.random() * contents.length)];
86
+
87
+ // Create random position (top, left, right, bottom)
88
+ const positions = [
89
+ "top", "bottom", "left", "right",
90
+ "top-right-aligned", "top-left-aligned",
91
+ "top-middle-aligned", "bottom-right-aligned",
92
+ "bottom-left-aligned", "bottom-middle-aligned"
93
+ ]; const randomPosition = positions[Math.floor(Math.random() * positions.length)];
94
+
95
+ // Add the button to the container
96
+ container.appendChild(button);
97
+
98
+ // Create a tour step for this button
99
+ tourElement.steps.push({
100
+ stepNo: stepNo,
101
+ element: elementId,
102
+ title: randomTitle,
103
+ content: randomContent,
104
+ position:'bottom-middle-aligned',
105
+ });
106
+ }
107
+
108
+
109
+
110
+ console.log(tourElement.steps);
111
+
112
+ // Start the tour when the page loads
113
+ window.onload = () => {
114
+
115
+ setTimeout(()=>{
116
+ tourElement.startTour();
117
+
118
+ },300);
119
+ };
120
+
121
+ </script>
108
122
  </body>
109
123
 
110
124
  </html>
@@ -1,2 +1,2 @@
1
- function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}System.register(["tslib","lit","lit/decorators.js","./nile-form-help-text.css.cjs.js"],function(_export,_context){"use strict";var t,e,i,s,o,r,n,_templateObject,_templateObject2,l;function _taggedTemplateLiteral(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,_toPropertyKey(descriptor.key),descriptor);}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);Object.defineProperty(Constructor,"prototype",{writable:false});return Constructor;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call;}else if(call!==void 0){throw new TypeError("Derived constructors may only return object or undefined");}return _assertThisInitialized(self);}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return self;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _get(){if(typeof Reflect!=="undefined"&&Reflect.get){_get=Reflect.get.bind();}else{_get=function _get(target,property,receiver){var base=_superPropBase(target,property);if(!base)return;var desc=Object.getOwnPropertyDescriptor(base,property);if(desc.get){return desc.get.call(arguments.length<3?target:receiver);}return desc.value;};}return _get.apply(this,arguments);}function _superPropBase(object,property){while(!Object.prototype.hasOwnProperty.call(object,property)){object=_getPrototypeOf(object);if(object===null)break;}return object;}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o);};return _getPrototypeOf(o);}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function");}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});Object.defineProperty(subClass,"prototype",{writable:false});if(superClass)_setPrototypeOf(subClass,superClass);}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){o.__proto__=p;return o;};return _setPrototypeOf(o,p);}return{setters:[function(_tslib){t=_tslib.__decorate;},function(_lit){e=_lit.LitElement;i=_lit.html;},function(_litDecoratorsJs){s=_litDecoratorsJs.property;o=_litDecoratorsJs.query;r=_litDecoratorsJs.customElement;},function(_nileFormHelpTextCssCjsJs){n=_nileFormHelpTextCssCjsJs.s;}],execute:function execute(){_export("N",l=/*#__PURE__*/function(_e){function l(){var _this;_classCallCheck(this,l);_this=_callSuper(this,l,arguments),_this.isExpanded=!1,_this.fullText="",_this.textLimit=47,_this.displayedText="";return _this;}_inherits(l,_e);return _createClass(l,[{key:"connectedCallback",value:function connectedCallback(){var _this2=this;_get(_getPrototypeOf(l.prototype),"connectedCallback",this).call(this),requestAnimationFrame(function(){var _this2$slotElement;(_this2$slotElement=_this2.slotElement)===null||_this2$slotElement===void 0||_this2$slotElement.addEventListener("slotchange",_this2.handleSlotChange.bind(_this2));});}},{key:"firstUpdated",value:function firstUpdated(){this.handleSlotChange();}},{key:"handleSlotChange",value:function handleSlotChange(){var t=this.slotElement.assignedNodes({flatten:!0}).map(function(t){return t.textContent;}).join("");this.fullText=t.trim(),this.updateDisplayedText();}},{key:"toggleExpanded",value:function toggleExpanded(){this.isExpanded=!this.isExpanded,this.updateDisplayedText();}},{key:"updateDisplayedText",value:function updateDisplayedText(){if(this.isExpanded)this.displayedText=this.fullText;else{var _t=function(t,e){if(e<0||e>t.length)throw new Error("Invalid value of n. It must be between 0 and the sentence length.");if(" "!==t[e]&&0!==e&&e!==t.length){var _i2=e;for(;_i2>0&&" "!==t[_i2-1];)_i2--;var _s=e;for(;_s<t.length&&" "!==t[_s];)_s++;e=e-_i2<=_s-e?_i2:_s;}return e;}(this.fullText,this.textLimit),_e2=this.fullText.slice(0,_t),_i=this.fullText.length>_t?"...":"";this.displayedText="".concat(_e2).concat(_i);}}},{key:"render",value:function render(){var t=this.fullText.length>this.textLimit,e=this.isExpanded?"arrowup":"arrowdown";return i(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <div class=\"nile-form-help-text\" part=\"container\">\n <slot hidden>","</slot>\n <div part=\"text\">\n <span>","</span>\n ","\n </div>\n </div>\n "])),this.fullText,this.displayedText,t?i(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n <span\n class=\"nile-form-help-text__more-button\"\n part=\"toggle-button\"\n @click=","\n >","\n <nile-icon color=\"#005EA6\" part=\"icon\" size=\"14\" name=\"","\"></nile-icon>\n </span>\n "])),this.toggleExpanded,this.isExpanded?"View Less":"View More",e):"");}}],[{key:"styles",get:function get(){return[n];}}]);}(e));t([s({type:Boolean,reflect:!0})],l.prototype,"isExpanded",void 0),t([s({type:String,reflect:!0})],l.prototype,"fullText",void 0),t([s({type:Number,reflect:!0})],l.prototype,"textLimit",void 0),t([s({type:String,reflect:!0})],l.prototype,"displayedText",void 0),t([o("slot")],l.prototype,"slotElement",void 0),_export("N",l=t([r("nile-form-help-text")],l));}};});
1
+ function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}System.register(["tslib","lit","lit/decorators.js","./nile-form-help-text.css.cjs.js"],function(_export,_context){"use strict";var t,e,i,s,o,r,n,_templateObject,_templateObject2,l;function _taggedTemplateLiteral(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,_toPropertyKey(descriptor.key),descriptor);}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);Object.defineProperty(Constructor,"prototype",{writable:false});return Constructor;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call;}else if(call!==void 0){throw new TypeError("Derived constructors may only return object or undefined");}return _assertThisInitialized(self);}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return self;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _get(){if(typeof Reflect!=="undefined"&&Reflect.get){_get=Reflect.get.bind();}else{_get=function _get(target,property,receiver){var base=_superPropBase(target,property);if(!base)return;var desc=Object.getOwnPropertyDescriptor(base,property);if(desc.get){return desc.get.call(arguments.length<3?target:receiver);}return desc.value;};}return _get.apply(this,arguments);}function _superPropBase(object,property){while(!Object.prototype.hasOwnProperty.call(object,property)){object=_getPrototypeOf(object);if(object===null)break;}return object;}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o);};return _getPrototypeOf(o);}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function");}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});Object.defineProperty(subClass,"prototype",{writable:false});if(superClass)_setPrototypeOf(subClass,superClass);}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){o.__proto__=p;return o;};return _setPrototypeOf(o,p);}return{setters:[function(_tslib){t=_tslib.__decorate;},function(_lit){e=_lit.LitElement;i=_lit.html;},function(_litDecoratorsJs){s=_litDecoratorsJs.property;o=_litDecoratorsJs.query;r=_litDecoratorsJs.customElement;},function(_nileFormHelpTextCssCjsJs){n=_nileFormHelpTextCssCjsJs.s;}],execute:function execute(){_export("N",l=/*#__PURE__*/function(_e){function l(){var _this;_classCallCheck(this,l);_this=_callSuper(this,l,arguments),_this.isExpanded=!1,_this.fullText="",_this.textLimit=47,_this.displayedText="";return _this;}_inherits(l,_e);return _createClass(l,[{key:"connectedCallback",value:function connectedCallback(){var _this2=this;_get(_getPrototypeOf(l.prototype),"connectedCallback",this).call(this),requestAnimationFrame(function(){var _this2$slotElement;(_this2$slotElement=_this2.slotElement)===null||_this2$slotElement===void 0||_this2$slotElement.addEventListener("slotchange",_this2.handleSlotChange.bind(_this2));});}},{key:"firstUpdated",value:function firstUpdated(){this.handleSlotChange();}},{key:"handleSlotChange",value:function handleSlotChange(){var t=this.slotElement.assignedNodes({flatten:!0}).map(function(t){return t.textContent;}).join("");this.fullText=t.trim(),this.updateDisplayedText();}},{key:"toggleExpanded",value:function toggleExpanded(){this.isExpanded=!this.isExpanded,this.updateDisplayedText();}},{key:"updateDisplayedText",value:function updateDisplayedText(){if(this.isExpanded)this.displayedText=this.fullText;else{var _t=function(t,e){if(e<0||e>t.length)return e;if(" "!==t[e]&&0!==e&&e!==t.length){var _i2=e;for(;_i2>0&&" "!==t[_i2-1];)_i2--;var _s=e;for(;_s<t.length&&" "!==t[_s];)_s++;e=e-_i2<=_s-e?_i2:_s;}return e;}(this.fullText,this.textLimit),_e2=this.fullText.slice(0,_t),_i=this.fullText.length>_t?"...":"";this.displayedText="".concat(_e2).concat(_i);}}},{key:"render",value:function render(){var t=this.fullText.length>this.textLimit,e=this.isExpanded?"arrowup":"arrowdown";return i(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <div class=\"nile-form-help-text\" part=\"container\">\n <slot hidden>","</slot>\n <div part=\"text\">\n <span>","</span>\n ","\n </div>\n </div>\n "])),this.fullText,this.displayedText,t?i(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n <span\n class=\"nile-form-help-text__more-button\"\n part=\"toggle-button\"\n @click=","\n >","\n <nile-icon color=\"#005EA6\" part=\"icon\" size=\"14\" name=\"","\"></nile-icon>\n </span>\n "])),this.toggleExpanded,this.isExpanded?"View Less":"View More",e):"");}}],[{key:"styles",get:function get(){return[n];}}]);}(e));t([s({type:Boolean,reflect:!0})],l.prototype,"isExpanded",void 0),t([s({type:String,reflect:!0})],l.prototype,"fullText",void 0),t([s({type:Number,reflect:!0})],l.prototype,"textLimit",void 0),t([s({type:String,reflect:!0})],l.prototype,"displayedText",void 0),t([o("slot")],l.prototype,"slotElement",void 0),_export("N",l=t([r("nile-form-help-text")],l));}};});
2
2
  //# sourceMappingURL=nile-form-help-text.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"nile-form-help-text.cjs.js","sources":["../../../src/nile-form-help-text/nile-form-help-text.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {LitElement, html, CSSResultArray, TemplateResult} from 'lit';\nimport { customElement, query, property } from 'lit/decorators.js';\nimport {styles} from './nile-form-help-text.css';\n\n/**\n * Nile icon component.\n *\n * @tag nile-form-help-text\n *\n */\n@customElement('nile-form-help-text')\nexport class NileFormHelpText extends LitElement {\n /**\n * The styles for FormHelpText\n * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`\n */\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n @property({ type: Boolean, reflect: true }) isExpanded: boolean = false;\n\n @property({ type: String, reflect: true }) fullText: string = '';\n\n @property({ type: Number, reflect: true }) textLimit: number = 47;\n\n @property({ type: String, reflect: true }) displayedText: string = '';\n\n @query('slot') slotElement!: HTMLSlotElement;\n\n connectedCallback() {\n super.connectedCallback();\n requestAnimationFrame(() => {\n this.slotElement?.addEventListener('slotchange', this.handleSlotChange.bind(this));\n });\n }\n\n firstUpdated() {\n this.handleSlotChange();\n }\n\n handleSlotChange() {\n const nodes = this.slotElement.assignedNodes({flatten: true});\n const textContent = nodes.map(node => node.textContent).join('');\n this.fullText = textContent.trim();\n this.updateDisplayedText()\n }\n\n toggleExpanded() {\n this.isExpanded = !this.isExpanded;\n this.updateDisplayedText()\n }\n\n updateDisplayedText() {\n if (this.isExpanded) {\n this.displayedText = this.fullText;\n } else {\n const validConcatNumber=concatSentence(this.fullText, this.textLimit)\n const truncatedText = this.fullText.slice(0, validConcatNumber);\n const ellipsis = this.fullText.length > validConcatNumber ? '...' : '';\n this.displayedText = `${truncatedText}${ellipsis}`;\n }\n }\n\n /* #endregion */\n\n /* #region Methods */\n\n /**\n * Render method\n * @slot This is a slot test\n */\n public render(): TemplateResult {\n const showMoreButton = this.fullText.length > this.textLimit;\n const iconName = this.isExpanded ? 'arrowup' : 'arrowdown';\n\n return html`\n <div class=\"nile-form-help-text\" part=\"container\">\n <slot hidden>${this.fullText}</slot>\n <div part=\"text\">\n <span>${this.displayedText}</span>\n ${showMoreButton ? html`\n <span\n class=\"nile-form-help-text__more-button\"\n part=\"toggle-button\"\n @click=${this.toggleExpanded}\n >${this.isExpanded ? 'View Less' : 'View More'}\n <nile-icon color=\"#005EA6\" part=\"icon\" size=\"14\" name=\"${iconName}\"></nile-icon>\n </span>\n ` : ''}\n </div>\n </div>\n `;\n }\n}\n\nexport default NileFormHelpText;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-form-help-text': NileFormHelpText;\n }\n}\n\nfunction concatSentence(sentence:string, n:number) {\n if (n < 0 || n > sentence.length) {\n throw new Error(\"Invalid value of n. It must be between 0 and the sentence length.\");\n }\n\n // Adjust n if it falls in the middle of a word\n if (sentence[n] !== \" \" && n !== 0 && n !== sentence.length) {\n // Move left until the start of the word or the beginning of the sentence\n let left = n;\n while (left > 0 && sentence[left - 1] !== \" \") {\n left--;\n }\n\n // Move right until the end of the word or the end of the sentence\n let right = n;\n while (right < sentence.length && sentence[right] !== \" \") {\n right++;\n }\n\n // Adjust n to the closer boundary\n n = (n - left <= right - n) ? left : right;\n }\n\n // Return the substring from the start to the adjusted n\n return n;\n}\n"],"names":["NileFormHelpText","_e","l","constructor","this","isExpanded","fullText","textLimit","displayedText","_this","_inherits","_createClass","key","value","connectedCallback","super","requestAnimationFrame","slotElement","addEventListener","handleSlotChange","bind","firstUpdated","textContent","assignedNodes","flatten","map","node","join","trim","updateDisplayedText","toggleExpanded","validConcatNumber","sentence","n","length","Error","left","right","concatSentence","truncatedText","slice","ellipsis","render","showMoreButton","iconName","html","_templateObject","_taggedTemplateLiteral","_templateObject2","get","styles","LitElement","__decorate","property","type","Boolean","reflect","prototype","String","Number","query","_export","customElement"],"mappings":"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"}
1
+ {"version":3,"file":"nile-form-help-text.cjs.js","sources":["../../../src/nile-form-help-text/nile-form-help-text.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {LitElement, html, CSSResultArray, TemplateResult} from 'lit';\nimport { customElement, query, property } from 'lit/decorators.js';\nimport {styles} from './nile-form-help-text.css';\n\n/**\n * Nile icon component.\n *\n * @tag nile-form-help-text\n *\n */\n@customElement('nile-form-help-text')\nexport class NileFormHelpText extends LitElement {\n /**\n * The styles for FormHelpText\n * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`\n */\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n @property({ type: Boolean, reflect: true }) isExpanded: boolean = false;\n\n @property({ type: String, reflect: true }) fullText: string = '';\n\n @property({ type: Number, reflect: true }) textLimit: number = 47;\n\n @property({ type: String, reflect: true }) displayedText: string = '';\n\n @query('slot') slotElement!: HTMLSlotElement;\n\n connectedCallback() {\n super.connectedCallback();\n requestAnimationFrame(() => {\n this.slotElement?.addEventListener('slotchange', this.handleSlotChange.bind(this));\n });\n }\n\n firstUpdated() {\n this.handleSlotChange();\n }\n\n handleSlotChange() {\n const nodes = this.slotElement.assignedNodes({flatten: true});\n const textContent = nodes.map(node => node.textContent).join('');\n this.fullText = textContent.trim();\n this.updateDisplayedText()\n }\n\n toggleExpanded() {\n this.isExpanded = !this.isExpanded;\n this.updateDisplayedText()\n }\n\n updateDisplayedText() {\n if (this.isExpanded) {\n this.displayedText = this.fullText;\n } else {\n const validConcatNumber=concatSentence(this.fullText, this.textLimit)\n const truncatedText = this.fullText.slice(0, validConcatNumber);\n const ellipsis = this.fullText.length > validConcatNumber ? '...' : '';\n this.displayedText = `${truncatedText}${ellipsis}`;\n }\n }\n\n /* #endregion */\n\n /* #region Methods */\n\n /**\n * Render method\n * @slot This is a slot test\n */\n public render(): TemplateResult {\n const showMoreButton = this.fullText.length > this.textLimit;\n const iconName = this.isExpanded ? 'arrowup' : 'arrowdown';\n\n return html`\n <div class=\"nile-form-help-text\" part=\"container\">\n <slot hidden>${this.fullText}</slot>\n <div part=\"text\">\n <span>${this.displayedText}</span>\n ${showMoreButton ? html`\n <span\n class=\"nile-form-help-text__more-button\"\n part=\"toggle-button\"\n @click=${this.toggleExpanded}\n >${this.isExpanded ? 'View Less' : 'View More'}\n <nile-icon color=\"#005EA6\" part=\"icon\" size=\"14\" name=\"${iconName}\"></nile-icon>\n </span>\n ` : ''}\n </div>\n </div>\n `;\n }\n}\n\nexport default NileFormHelpText;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-form-help-text': NileFormHelpText;\n }\n}\n\nfunction concatSentence(sentence:string, n:number) {\n if (n < 0 || n > sentence.length) {\n return n;\n }\n\n // Adjust n if it falls in the middle of a word\n if (sentence[n] !== \" \" && n !== 0 && n !== sentence.length) {\n // Move left until the start of the word or the beginning of the sentence\n let left = n;\n while (left > 0 && sentence[left - 1] !== \" \") {\n left--;\n }\n\n // Move right until the end of the word or the end of the sentence\n let right = n;\n while (right < sentence.length && sentence[right] !== \" \") {\n right++;\n }\n\n // Adjust n to the closer boundary\n n = (n - left <= right - n) ? left : right;\n }\n\n // Return the substring from the start to the adjusted n\n return n;\n}\n"],"names":["NileFormHelpText","_e","l","constructor","this","isExpanded","fullText","textLimit","displayedText","_this","_inherits","_createClass","key","value","connectedCallback","super","requestAnimationFrame","slotElement","addEventListener","handleSlotChange","bind","firstUpdated","textContent","assignedNodes","flatten","map","node","join","trim","updateDisplayedText","toggleExpanded","validConcatNumber","sentence","n","length","left","right","concatSentence","truncatedText","slice","ellipsis","render","showMoreButton","iconName","html","_templateObject","_taggedTemplateLiteral","_templateObject2","get","styles","LitElement","__decorate","property","type","Boolean","reflect","prototype","String","Number","query","_export","customElement"],"mappings":"imIAkBaA,CAAN,uBAAAC,EAAA,EAAA,SAAAC,EAAA,CAAAC,KAAAA,KAAAA,CAAAA,eAAAA,MAAAA,CAAAA,mCASwCC,EAAAA,KAAAA,CAAUC,UAAY,CAAA,CAAA,CAAA,CAEvBD,KAAAA,CAAQE,QAAAA,CAAW,GAEnBF,KAAAA,CAASG,SAAAA,CAAW,GAEpBH,KAAAA,CAAaI,aAAAA,CAAW,EAoErE,QAAAC,KAAA,EA9EQC,SAAA,CAAAR,CAAA,CAAAD,EAAA,SAAAU,YAAA,CAAAT,CAAA,GAAAU,GAAA,qBAAAC,KAAA,CAcP,SAAAC,kBAAA,kBACEC,IAAAA,CAAAA,eAAAA,CAAAA,CAAAA,CAAAA,SAAAA,4BAAAA,IAAAA,OACAC,sBAAsB,UACpBZ,KAAAA,kBAAAA,CAAAA,CAAAA,kBAAAA,CAAAA,MAAAA,CAAKa,WAAaC,UAAAA,kBAAAA,WAAlBd,kBAAAA,CAAkBc,gBAAAA,CAAiB,YAAcd,CAAAA,MAAAA,CAAKe,iBAAiBC,IAAKhB,CAAAA,MAAAA,CAAAA,CAAM,GAErF,EAED,GAAAQ,GAAA,gBAAAC,KAAA,UAAAQ,aAAA,EACEjB,IAAKe,CAAAA,gBAAAA,CAAAA,CACN,EAED,GAAAP,GAAA,oBAAAC,KAAA,UAAAM,iBAAA,CAAAA,CACE,GACMG,CAAAA,CADQlB,CAAAA,IAAAA,CAAKa,YAAYM,aAAc,CAAA,CAACC,SAAS,CAC7BC,CAAAA,CAAAA,CAAAA,GAAAA,CAAIC,SAAAA,CAAQA,QAAAA,CAAAA,CAAAA,CAAKJ,WAAaK,EAAAA,CAAAA,CAAAA,IAAAA,CAAK,IAC7DvB,IAAKE,CAAAA,QAAAA,CAAWgB,EAAYM,IAC5BxB,CAAAA,CAAAA,CAAAA,IAAAA,CAAKyB,qBACN,EAED,GAAAjB,GAAA,kBAAAC,KAAA,UAAAiB,eAAA,EACE1B,IAAKC,CAAAA,UAAAA,CAAAA,CAAcD,KAAKC,UACxBD,CAAAA,IAAAA,CAAKyB,qBACN,EAED,GAAAjB,GAAA,uBAAAC,KAAA,UAAAgB,oBAAA,EACE,GAAIzB,IAAAA,CAAKC,UACPD,CAAAA,IAAAA,CAAKI,aAAgBJ,CAAAA,IAAAA,CAAKE,aACrB,CACL,GAAMyB,CAAAA,GA+CZ,SAAwBC,CAAAA,CAAiBC,GACvC,GAAIA,CAAAA,CAAI,GAAKA,CAAID,CAAAA,CAAAA,CAASE,OACxB,MAAOD,CAAAA,CAAAA,CAIT,GAAoB,GAAhBD,GAAAA,CAAAA,CAASC,IAAoB,CAANA,GAAAA,CAAAA,EAAWA,CAAMD,GAAAA,CAAAA,CAASE,MAAQ,CAAA,CAE3D,GAAIC,CAAAA,GAAOF,CAAAA,CAAAA,CACX,KAAOE,GAAO,CAAA,CAAA,EAA4B,MAAvBH,CAASG,CAAAA,GAAAA,CAAO,IACjCA,GAIF,EAAA,CAAA,GAAIC,CAAAA,GAAQH,CACZ,CAAA,KAAOG,GAAQJ,CAASE,CAAAA,MAAAA,EAA8B,MAApBF,CAASI,CAAAA,EAAAA,CAAAA,EACzCA,EAIFH,EAAAA,CAAAA,CAAAA,CAAKA,CAAIE,CAAAA,GAAAA,EAAQC,GAAQH,CAAKE,CAAAA,GAAAA,CAAOC,EACtC,EAGD,MAAOH,CAAAA,CACT,EAxE8BI,CAAejC,KAAKE,QAAUF,CAAAA,IAAAA,CAAKG,WACrD+B,GAAgBlC,CAAAA,IAAAA,CAAKE,SAASiC,KAAM,CAAA,CAAA,CAAGR,IACvCS,EAAWpC,CAAAA,IAAAA,CAAKE,QAAS4B,CAAAA,MAAAA,CAASH,EAAoB,CAAA,KAAA,CAAQ,GACpE3B,IAAKI,CAAAA,aAAAA,IAAAA,MAAAA,CAAmB8B,GAAgBE,EAAAA,MAAAA,CAAAA,EAAAA,CACzC,EACF,CAUM,GAAA5B,GAAA,UAAAC,KAAA,UAAA4B,OAAA,EACL,GAAMC,CAAAA,CAAAA,CAAiBtC,KAAKE,QAAS4B,CAAAA,MAAAA,CAAS9B,KAAKG,SAC7CoC,CAAAA,CAAAA,CAAWvC,KAAKC,UAAa,CAAA,SAAA,CAAY,WAE/C,CAAA,MAAOuC,CAAAA,CAAI,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA,+LAEM1C,IAAKE,CAAAA,QAAAA,CAEVF,IAAKI,CAAAA,aAAAA,CACXkC,CAAAA,CAAiBE,CAAI,CAAAG,gBAAA,GAAAA,gBAAA,CAAAD,sBAAA,kRAIV1C,IAAK0B,CAAAA,cAAAA,CACX1B,IAAAA,CAAKC,WAAa,WAAc,CAAA,WAAA,CACsBsC,CAAAA,EAEzD,EAAA,EAIT,CAAA,KAAA/B,GAAA,UAAAoC,GAAA,CA7EM,SAAAA,IAAA,EACL,MAAO,CAACC,EACT,EAYD,MAnBoCC,IASSC,CAAA,CAAA,CAA5CC,CAAS,CAAA,CAAEC,IAAMC,CAAAA,OAAAA,CAASC,OAAS,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAqCvD,CAAAwD,CAAAA,SAAAA,CAAA,YAAA,CAAA,IAAA,EAAA,CAAA,CAE7BL,CAAA,CAAA,CAA3CC,CAAS,CAAA,CAAEC,IAAMI,CAAAA,MAAAA,CAAQF,OAAS,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAA+BvD,CAAAwD,CAAAA,SAAAA,CAAA,UAAA,CAAA,IAAA,EAAA,CAAA,CAEtBL,CAAA,CAAA,CAA3CC,CAAS,CAAA,CAAEC,IAAMK,CAAAA,MAAAA,CAAQH,OAAS,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAgCvD,CAAAwD,CAAAA,SAAAA,CAAA,WAAA,CAAA,IAAA,EAAA,CAAA,CAEvBL,CAAA,CAAA,CAA3CC,CAAS,CAAA,CAAEC,IAAMI,CAAAA,MAAAA,CAAQF,OAAS,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAoCvD,CAAAwD,CAAAA,SAAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAExDL,CAAA,CAAA,CAAdQ,CAAM,CAAA,MAAA,CAAA,CAAA,CAAsC3D,CAAAwD,CAAAA,SAAAA,CAAA,aAAA,CAAA,IAAA,EAAA,CAAA,CAAAI,OAAA,KAjBlC5D,CAAgBmD,CAAAA,CAAAA,CAAA,CAD5BU,CAAAA,CAAc,wBACF7D"}
@@ -1,4 +1,4 @@
1
- import{__decorate as t}from"tslib";import{LitElement as e,html as i}from"lit";import{property as s,query as o,customElement as r}from"lit/decorators.js";import{s as n}from"./nile-form-help-text.css.esm.js";let l=class extends e{constructor(){super(...arguments),this.isExpanded=!1,this.fullText="",this.textLimit=47,this.displayedText=""}static get styles(){return[n]}connectedCallback(){super.connectedCallback(),requestAnimationFrame((()=>{this.slotElement?.addEventListener("slotchange",this.handleSlotChange.bind(this))}))}firstUpdated(){this.handleSlotChange()}handleSlotChange(){const t=this.slotElement.assignedNodes({flatten:!0}).map((t=>t.textContent)).join("");this.fullText=t.trim(),this.updateDisplayedText()}toggleExpanded(){this.isExpanded=!this.isExpanded,this.updateDisplayedText()}updateDisplayedText(){if(this.isExpanded)this.displayedText=this.fullText;else{const t=function(t,e){if(e<0||e>t.length)throw new Error("Invalid value of n. It must be between 0 and the sentence length.");if(" "!==t[e]&&0!==e&&e!==t.length){let i=e;for(;i>0&&" "!==t[i-1];)i--;let s=e;for(;s<t.length&&" "!==t[s];)s++;e=e-i<=s-e?i:s}return e}(this.fullText,this.textLimit),e=this.fullText.slice(0,t),i=this.fullText.length>t?"...":"";this.displayedText=`${e}${i}`}}render(){const t=this.fullText.length>this.textLimit,e=this.isExpanded?"arrowup":"arrowdown";return i`
1
+ import{__decorate as t}from"tslib";import{LitElement as e,html as i}from"lit";import{property as s,query as o,customElement as r}from"lit/decorators.js";import{s as n}from"./nile-form-help-text.css.esm.js";let l=class extends e{constructor(){super(...arguments),this.isExpanded=!1,this.fullText="",this.textLimit=47,this.displayedText=""}static get styles(){return[n]}connectedCallback(){super.connectedCallback(),requestAnimationFrame((()=>{this.slotElement?.addEventListener("slotchange",this.handleSlotChange.bind(this))}))}firstUpdated(){this.handleSlotChange()}handleSlotChange(){const t=this.slotElement.assignedNodes({flatten:!0}).map((t=>t.textContent)).join("");this.fullText=t.trim(),this.updateDisplayedText()}toggleExpanded(){this.isExpanded=!this.isExpanded,this.updateDisplayedText()}updateDisplayedText(){if(this.isExpanded)this.displayedText=this.fullText;else{const t=function(t,e){if(e<0||e>t.length)return e;if(" "!==t[e]&&0!==e&&e!==t.length){let i=e;for(;i>0&&" "!==t[i-1];)i--;let s=e;for(;s<t.length&&" "!==t[s];)s++;e=e-i<=s-e?i:s}return e}(this.fullText,this.textLimit),e=this.fullText.slice(0,t),i=this.fullText.length>t?"...":"";this.displayedText=`${e}${i}`}}render(){const t=this.fullText.length>this.textLimit,e=this.isExpanded?"arrowup":"arrowdown";return i`
2
2
  <div class="nile-form-help-text" part="container">
3
3
  <slot hidden>${this.fullText}</slot>
4
4
  <div part="text">
@@ -6,5 +6,5 @@ System.register(["tslib","lit","lit/decorators.js","./nile-tour.css.cjs.js","../
6
6
  * https://introjs.com
7
7
  *
8
8
  * Date: Mon, 14 Aug 2023 19:47:14 GMT
9
- */function s(t){return(s="function"==typeof Symbol&&"symbol"==_typeof(Symbol.iterator)?function(t){return _typeof(t);}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":_typeof(t);})(t);}function a(t,n,i,r){return new(i||(i=Promise))(function(o,e){function s(t){try{u(r.next(t));}catch(t){e(t);}}function a(t){try{u(r["throw"](t));}catch(t){e(t);}}function u(t){var n;t.done?o(t.value):(n=t.value,n instanceof i?n:new i(function(t){t(n);})).then(s,a);}u((r=r.apply(t,n||[])).next());});}function u(t,n){var i,r,o,e,s={label:0,sent:function sent(){if(1&o[0])throw o[1];return o[1];},trys:[],ops:[]};return e={next:a(0),"throw":a(1),"return":a(2)},"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this;}),e;function a(a){return function(u){return function(a){if(i)throw new TypeError("Generator is already executing.");for(;e&&(e=0,a[0]&&(s=0)),s;)try{if(i=1,r&&(o=2&a[0]?r["return"]:a[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue;}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){s.label=a[1];break;}if(6===a[0]&&s.label<o[1]){s.label=o[1],o=a;break;}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(a);break;}o[2]&&s.ops.pop(),s.trys.pop();continue;}a=n.call(t,s);}catch(t){a=[6,t],r=0;}finally{i=o=0;}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0};}([a,u]);};}}function c(t,n,i){var r,o=((r={})[t]=n,r.path="/",r.expires=void 0,r);if(i){var e=new Date();e.setTime(e.getTime()+24*i*60*60*1e3),o.expires=e.toUTCString();}var s=[];for(var a in o)s.push("".concat(a,"=").concat(o[a]));return document.cookie=s.join("; "),l(t);}function l(t){return(n={},document.cookie.split(";").forEach(function(t){var i=t.split("="),r=i[0],o=i[1];n[r.trim()]=o;}),n)[t];var n;}function p(t,n){if(t instanceof SVGElement){var i=t.getAttribute("class")||"";i.match(n)||t.setAttribute("class","".concat(i," ").concat(n));}else if(void 0!==t.classList)for(var r=0,o=n.split(" ");r<o.length;r++){var e=o[r];t.classList.add(e);}else t.className.match(n)||(t.className+=" ".concat(n));}function w(t,n){var i="";return"currentStyle"in t?i=t.currentStyle[n]:document.defaultView&&document.defaultView.getComputedStyle&&(i=document.defaultView.getComputedStyle(t,null).getPropertyValue(n)),i&&i.toLowerCase?i.toLowerCase():i;}function b(t,n){if(t){var i=function(t){var n=window.getComputedStyle(t),i="absolute"===n.position,r=/(auto|scroll)/;if("fixed"===n.position)return document.body;for(var o=t;o=o.parentElement;)if(n=window.getComputedStyle(o),(!i||"static"!==n.position)&&r.test(n.overflow+n.overflowY+n.overflowX))return o;return document.body;}(n);i!==document.body&&(i.scrollTop=n.offsetTop-i.offsetTop);}}function m(){if(void 0!==window.innerWidth)return{width:window.innerWidth,height:window.innerHeight};var t=document.documentElement;return{width:t.clientWidth,height:t.clientHeight};}function j(t,n,i,r,o){var e;if("off"!==n&&t&&(e="tooltip"===n?o.getBoundingClientRect():r.getBoundingClientRect(),!function(t){var n=t.getBoundingClientRect();return n.top>=0&&n.left>=0&&n.bottom+80<=window.innerHeight&&n.right<=window.innerWidth;}(r))){var s=m().height;e.bottom-(e.bottom-e.top)<0||r.clientHeight>s?window.scrollBy(0,e.top-(s/2-e.height/2)-i):window.scrollBy(0,e.top-(s/2-e.height/2)+i);}}function g(t){t.setAttribute("role","button"),t.tabIndex=0;}function y(t){var n=t.parentElement;return!(!n||"HTML"===n.nodeName)&&("fixed"===w(t,"position")||y(n));}function x(t,n){var i=document.body,r=document.documentElement,o=window.pageYOffset||r.scrollTop||i.scrollTop,e=window.pageXOffset||r.scrollLeft||i.scrollLeft;n=n||i;var s=t.getBoundingClientRect(),a=n.getBoundingClientRect(),u=w(n,"position"),c={width:s.width,height:s.height};return"body"!==n.tagName.toLowerCase()&&"relative"===u||"sticky"===u?Object.assign(c,{top:s.top-a.top,left:s.left-a.left}):y(t)?Object.assign(c,{top:s.top,left:s.left}):Object.assign(c,{top:s.top+o,left:s.left+e});}function k(t,n){if(t instanceof SVGElement){var i=t.getAttribute("class")||"";t.setAttribute("class",i.replace(n,"").replace(/^\s+|\s+$/g,""));}else t.className=t.className.replace(n,"").replace(/^\s+|\s+$/g,"");}function E(t,n){var i="";if(t.style.cssText&&(i+=t.style.cssText),"string"==typeof n)i+=n;else for(var r in n)i+="".concat(r,":").concat(n[r],";");t.style.cssText=i;}function N(t,n,i){if(i&&n){var r=x(n.element,t._targetElement),o=t._options.helperElementPadding;n.element instanceof Element&&y(n.element)?p(i,"introjs-fixedTooltip"):k(i,"introjs-fixedTooltip"),"floating"===n.position&&(o=0),E(i,{width:"".concat(r.width+o,"px"),height:"".concat(r.height+o,"px"),top:"".concat(r.top-o/2,"px"),left:"".concat(r.left-o/2,"px")});}}function S(t,n,i,r,o){return t.left+n+i.width>r.width?(o.style.left="".concat(r.width-i.width-t.left,"px"),!1):(o.style.left="".concat(n,"px"),!0);}function A(t,n,i,r){return t.left+t.width-n-i.width<0?(r.style.left="".concat(-t.left,"px"),!1):(r.style.right="".concat(n,"px"),!0);}function L(t,n){t.includes(n)&&t.splice(t.indexOf(n),1);}function P(t,n,i,r,o){if(void 0===o&&(o=!1),n){var e,s,a,u,c="";i.style.top="",i.style.right="",i.style.bottom="",i.style.left="",i.style.marginLeft="",i.style.marginTop="",r.style.display="inherit",c="string"==typeof n.tooltipClass?n.tooltipClass:t._options.tooltipClass,i.className=["introjs-tooltip",c].filter(Boolean).join(" "),i.setAttribute("role","dialog"),"floating"!==(u=n.position)&&t._options.autoPosition&&(u=function(t,n,i,r){var o=t.slice(),e=m(),s=x(i).height+10,a=x(i).width+20,u=n.getBoundingClientRect(),c="floating";if(u.bottom+s>e.height&&L(o,"bottom"),u.top-s<0&&L(o,"top"),u.right+a>e.width&&L(o,"right"),u.left-a<0&&L(o,"left"),r&&(r=r.split("-")[0]),o.length&&(c=o[0],o.includes(r)&&(c=r)),"top"===c||"bottom"===c){var l=void 0,d=[];"top"===c?(l="top-middle-aligned",d=["top-left-aligned","top-middle-aligned","top-right-aligned"]):(l="bottom-middle-aligned",d=["bottom-left-aligned","bottom-middle-aligned","bottom-right-aligned"]),c=function(t,n,i,r){var o=n/2,e=Math.min(i,window.screen.width);return e-t<n&&(L(r,"top-left-aligned"),L(r,"bottom-left-aligned")),(t<o||e-t<o)&&(L(r,"top-middle-aligned"),L(r,"bottom-middle-aligned")),t<n&&(L(r,"top-right-aligned"),L(r,"bottom-right-aligned")),r.length?r[0]:null;}(u.left,a,e.width,d)||l;}return c;}(t._options.positionPrecedence,n.element,i,u)),s=x(n.element),e=x(i),a=m(),p(i,"introjs-".concat(u));var l=s.width/2-e.width/2;switch(u){case"top-right-aligned":r.className="introjs-arrow bottom-right";var d=0;A(s,d,e,i),i.style.bottom="".concat(s.height+20,"px");break;case"top-middle-aligned":r.className="introjs-arrow bottom-middle",o&&(l+=5),A(s,l,e,i)&&(i.style.right="",S(s,l,e,a,i)),i.style.bottom="".concat(s.height+20,"px");break;case"top-left-aligned":case"top":r.className="introjs-arrow bottom",S(s,o?0:15,e,a,i),i.style.bottom="".concat(s.height+20,"px");break;case"right":i.style.left="".concat(s.width+20,"px"),s.top+e.height>a.height?(r.className="introjs-arrow left-bottom",i.style.top="-".concat(e.height-s.height-20,"px")):r.className="introjs-arrow left";break;case"left":o||!0!==t._options.showStepNumbers||(i.style.top="15px"),s.top+e.height>a.height?(i.style.top="-".concat(e.height-s.height-20,"px"),r.className="introjs-arrow right-bottom"):r.className="introjs-arrow right",i.style.right="".concat(s.width+20,"px");break;case"floating":r.style.display="none",i.style.left="50%",i.style.top="50%",i.style.marginLeft="-".concat(e.width/2,"px"),i.style.marginTop="-".concat(e.height/2,"px");break;case"bottom-right-aligned":r.className="introjs-arrow top-right",A(s,d=0,e,i),i.style.top="".concat(s.height+20,"px");break;case"bottom-middle-aligned":r.className="introjs-arrow top-middle",o&&(l+=5),A(s,l,e,i)&&(i.style.right="",S(s,l,e,a,i)),i.style.top="".concat(s.height+20,"px");break;default:r.className="introjs-arrow top",S(s,0,e,a,i),i.style.top="".concat(s.height+20,"px");}}}function I(){for(var t=0,n=Array.from(document.querySelectorAll(".introjs-showElement"));t<n.length;t++)k(n[t],/introjs-[a-zA-Z]+/g);}function C(t,n){var i=document.createElement(t);n=n||{};var r=/^(?:role|data-|aria-)/;for(var o in n){var e=n[o];"style"===o&&"function"!=typeof e?E(i,e):"string"==typeof e&&o.match(r)?i.setAttribute(o,e):i[o]=e;}return i;}function O(t,n,i){if(void 0===i&&(i=!1),i){var r=n.style.opacity||"1";E(n,{opacity:"0"}),window.setTimeout(function(){E(n,{opacity:r});},10);}t.appendChild(n);}function T(t,n){return(t+1)/n*100;}function B(t,n){var i=C("div",{className:"introjs-bullets"});!1===t._options.showBullets&&(i.style.display="none");var r=C("ul");r.setAttribute("role","tablist");for(var o=function o(){var n=this.getAttribute("data-step-number");null!=n&&t.goToStep(parseInt(n,10));},e=0;e<t._introItems.length;e++){var s=t._introItems[e].step,a=C("li"),u=C("a");a.setAttribute("role","presentation"),u.setAttribute("role","tab"),u.onclick=o,e===n.step-1&&(u.className="active"),g(u),u.innerHTML="&nbsp;",u.setAttribute("data-step-number",s.toString()),a.appendChild(u),r.appendChild(a);}return i.appendChild(r),i;}function R(t,n,i){var r=t.querySelector(".introjs-progress .introjs-progressbar");if(r){var o=T(n,i);r.style.cssText="width:".concat(o,"%;"),r.setAttribute("aria-valuenow",o.toString());}}function J(t,n){return a(this,void 0,void 0,function(){var i,r,o,e,s,c,l,d,f,h,m,y,x,k,S,A,L,J,$,z,G,M,V,_,H=this;return u(this,function(Q){switch(Q.label){case 0:return v(t._introChangeCallback)?[4,t._introChangeCallback.call(t,n.element)]:[3,2];case 1:Q.sent(),Q.label=2;case 2:return i=document.querySelector(".introjs-helperLayer"),r=document.querySelector(".introjs-tooltipReferenceLayer"),o="introjs-helperLayer","string"==typeof n.highlightClass&&(o+=" ".concat(n.highlightClass)),"string"==typeof t._options.highlightClass&&(o+=" ".concat(t._options.highlightClass)),null!==i&&null!==r?(l=r.querySelector(".introjs-helperNumberLayer"),d=r.querySelector(".introjs-tooltiptext"),f=r.querySelector(".introjs-tooltip-title"),h=r.querySelector(".introjs-arrow"),m=r.querySelector(".introjs-tooltip"),c=r.querySelector(".introjs-skipbutton"),s=r.querySelector(".introjs-prevbutton"),e=r.querySelector(".introjs-nextbutton"),i.className=o,m.style.opacity="0",m.style.display="none",b(t._options.scrollToElement,n.element),N(t,n,i),N(t,n,r),I(),t._lastShowElementTimer&&window.clearTimeout(t._lastShowElementTimer),t._lastShowElementTimer=window.setTimeout(function(){null!==l&&(l.innerHTML="".concat(n.step," ").concat(t._options.stepNumbersOfLabel," ").concat(t._introItems.length)),d.innerHTML=n.intro||"",f.innerHTML=n.title||"",m.style.display="block",P(t,n,m,h),function(t,n,i){if(t){var r=n.querySelector(".introjs-bullets li > a.active"),o=n.querySelector('.introjs-bullets li > a[data-step-number="'.concat(i.step,'"]'));r&&o&&(r.className="",o.className="active");}}(t._options.showBullets,r,n),R(r,t._currentStep,t._introItems.length),m.style.opacity="1",(null!=e&&/introjs-donebutton/gi.test(e.className)||null!=e)&&e.focus(),j(t._options.scrollToElement,n.scrollTo,t._options.scrollPadding,n.element,d);},350)):(y=C("div",{className:o}),x=C("div",{className:"introjs-tooltipReferenceLayer"}),k=C("div",{className:"introjs-arrow"}),S=C("div",{className:"introjs-tooltip"}),A=C("div",{className:"introjs-tooltiptext"}),L=C("div",{className:"introjs-tooltip-header"}),J=C("h1",{className:"introjs-tooltip-title"}),$=C("div"),E(y,{"box-shadow":"0 0 1px 2px rgba(33, 33, 33, 0.8), rgba(33, 33, 33, ".concat(t._options.overlayOpacity.toString(),") 0 0 0 5000px")}),b(t._options.scrollToElement,n.element),N(t,n,y),N(t,n,x),O(t._targetElement,y,!0),O(t._targetElement,x),A.innerHTML=n.intro,J.innerHTML=n.title,$.className="introjs-tooltipbuttons",!1===t._options.showButtons&&($.style.display="none"),L.appendChild(J),S.appendChild(L),S.appendChild(A),t._options.dontShowAgain&&(z=C("div",{className:"introjs-dontShowAgain"}),(G=C("input",{type:"checkbox",id:"introjs-dontShowAgain",name:"introjs-dontShowAgain"})).onchange=function(n){t.setDontShowAgain(n.target.checked);},(M=C("label",{htmlFor:"introjs-dontShowAgain"})).innerText=t._options.dontShowAgainLabel,z.appendChild(G),z.appendChild(M),S.appendChild(z)),S.appendChild(B(t,n)),S.appendChild(function(t){var n=C("div");n.className="introjs-progress",!1===t._options.showProgress&&(n.style.display="none");var i=C("div",{className:"introjs-progressbar"});t._options.progressBarAdditionalClass&&(i.className+=" "+t._options.progressBarAdditionalClass);var r=T(t._currentStep,t._introItems.length);return i.setAttribute("role","progress"),i.setAttribute("aria-valuemin","0"),i.setAttribute("aria-valuemax","100"),i.setAttribute("aria-valuenow",r.toString()),i.style.cssText="width:".concat(r,"%;"),n.appendChild(i),n;}(t)),V=C("div"),!0===t._options.showStepNumbers&&(V.className="introjs-helperNumberLayer",V.innerHTML="".concat(n.step," ").concat(t._options.stepNumbersOfLabel," ").concat(t._introItems.length),S.appendChild(V)),S.appendChild(k),x.appendChild(S),(e=C("a")).onclick=function(){return a(H,void 0,void 0,function(){return u(this,function(n){switch(n.label){case 0:return t._introItems.length-1===t._currentStep?[3,2]:[4,D(t)];case 1:return n.sent(),[3,6];case 2:return /introjs-donebutton/gi.test(e.className)?v(t._introCompleteCallback)?[4,t._introCompleteCallback.call(t,t._currentStep,"done")]:[3,4]:[3,6];case 3:n.sent(),n.label=4;case 4:return[4,et(t,t._targetElement)];case 5:n.sent(),n.label=6;case 6:return[2];}});});},g(e),e.innerHTML=t._options.nextLabel,(s=C("a")).onclick=function(){return a(H,void 0,void 0,function(){return u(this,function(n){switch(n.label){case 0:return t._currentStep>0?[4,F(t)]:[3,2];case 1:n.sent(),n.label=2;case 2:return[2];}});});},g(s),s.innerHTML=t._options.prevLabel,g(c=C("a",{className:"introjs-skipbutton"})),c.innerHTML=t._options.skipLabel,c.onclick=function(){return a(H,void 0,void 0,function(){return u(this,function(n){switch(n.label){case 0:return t._introItems.length-1===t._currentStep&&v(t._introCompleteCallback)?[4,t._introCompleteCallback.call(t,t._currentStep,"skip")]:[3,2];case 1:n.sent(),n.label=2;case 2:return v(t._introSkipCallback)?[4,t._introSkipCallback.call(t,t._currentStep)]:[3,4];case 3:n.sent(),n.label=4;case 4:return[4,et(t,t._targetElement)];case 5:return n.sent(),[2];}});});},L.appendChild(c),t._introItems.length>1&&$.appendChild(s),$.appendChild(e),S.appendChild($),P(t,n,S,k),j(t._options.scrollToElement,n.scrollTo,t._options.scrollPadding,n.element,S)),(_=t._targetElement.querySelector(".introjs-disableInteraction"))&&_.parentNode&&_.parentNode.removeChild(_),n.disableInteraction&&function(t,n){var i=document.querySelector(".introjs-disableInteraction");null===i&&(i=C("div",{className:"introjs-disableInteraction"}),t._targetElement.appendChild(i)),N(t,n,i);}(t,n),0===t._currentStep&&t._introItems.length>1?(null!=e&&(e.className="".concat(t._options.buttonClass," introjs-nextbutton"),e.innerHTML=t._options.nextLabel),!0===t._options.hidePrev?(null!=s&&(s.className="".concat(t._options.buttonClass," introjs-prevbutton introjs-hidden")),null!=e&&p(e,"introjs-fullbutton")):null!=s&&(s.className="".concat(t._options.buttonClass," introjs-prevbutton introjs-disabled"))):t._introItems.length-1===t._currentStep||1===t._introItems.length?(null!=s&&(s.className="".concat(t._options.buttonClass," introjs-prevbutton")),!0===t._options.hideNext?(null!=e&&(e.className="".concat(t._options.buttonClass," introjs-nextbutton introjs-hidden")),null!=s&&p(s,"introjs-fullbutton")):null!=e&&(!0===t._options.nextToDone?(e.innerHTML=t._options.doneLabel,p(e,"".concat(t._options.buttonClass," introjs-nextbutton introjs-donebutton"))):e.className="".concat(t._options.buttonClass," introjs-nextbutton introjs-disabled"))):(null!=s&&(s.className="".concat(t._options.buttonClass," introjs-prevbutton")),null!=e&&(e.className="".concat(t._options.buttonClass," introjs-nextbutton"),e.innerHTML=t._options.nextLabel)),null!=s&&s.setAttribute("role","button"),null!=e&&e.setAttribute("role","button"),null!=c&&c.setAttribute("role","button"),null!=e&&e.focus(),function(t){p(t,"introjs-showElement");var n=w(t,"position");"absolute"!==n&&"relative"!==n&&"sticky"!==n&&"fixed"!==n&&p(t,"introjs-relativePosition");}(n.element),v(t._introAfterChangeCallback)?[4,t._introAfterChangeCallback.call(t,n.element)]:[3,4];case 3:Q.sent(),Q.label=4;case 4:return[2];}});});}function $(t,n){return a(this,void 0,void 0,function(){return u(this,function(i){switch(i.label){case 0:return t._currentStep=n-2,void 0===t._introItems?[3,2]:[4,D(t)];case 1:i.sent(),i.label=2;case 2:return[2];}});});}function z(t,n){return a(this,void 0,void 0,function(){return u(this,function(i){switch(i.label){case 0:return t._currentStepNumber=n,void 0===t._introItems?[3,2]:[4,D(t)];case 1:i.sent(),i.label=2;case 2:return[2];}});});}function D(t){return a(this,void 0,void 0,function(){var n,i,r;return u(this,function(o){switch(o.label){case 0:if(t._direction="forward",void 0!==t._currentStepNumber)for(n=0;n<t._introItems.length;n++)t._introItems[n].step===t._currentStepNumber&&(t._currentStep=n-1,t._currentStepNumber=void 0);return-1===t._currentStep?t._currentStep=0:++t._currentStep,i=t._introItems[t._currentStep],r=!0,v(t._introBeforeChangeCallback)?[4,t._introBeforeChangeCallback.call(t,i&&i.element,t._currentStep,t._direction)]:[3,2];case 1:r=o.sent(),o.label=2;case 2:return!1===r?(--t._currentStep,[2,!1]):t._introItems.length<=t._currentStep?v(t._introCompleteCallback)?[4,t._introCompleteCallback.call(t,t._currentStep,"end")]:[3,4]:[3,6];case 3:o.sent(),o.label=4;case 4:return[4,et(t,t._targetElement)];case 5:return o.sent(),[2,!1];case 6:return[4,J(t,i)];case 7:return o.sent(),[2,!0];}});});}function F(t){return a(this,void 0,void 0,function(){var n,i;return u(this,function(r){switch(r.label){case 0:return t._direction="backward",t._currentStep<=0?[2,!1]:(--t._currentStep,n=t._introItems[t._currentStep],i=!0,v(t._introBeforeChangeCallback)?[4,t._introBeforeChangeCallback.call(t,n&&n.element,t._currentStep,t._direction)]:[3,2]);case 1:i=r.sent(),r.label=2;case 2:return!1===i?(++t._currentStep,[2,!1]):[4,J(t,n)];case 3:return r.sent(),[2,!0];}});});}function G(t,n){return a(this,void 0,void 0,function(){var i,r;return u(this,function(o){switch(o.label){case 0:return null===(i=void 0===n.code?n.which:n.code)&&(i=null===n.charCode?n.keyCode:n.charCode),"Escape"!==i&&27!==i||!0!==t._options.exitOnEsc?[3,2]:[4,et(t,t._targetElement)];case 1:return o.sent(),[3,16];case 2:return"ArrowLeft"!==i&&37!==i?[3,4]:[4,F(t)];case 3:return o.sent(),[3,16];case 4:return"ArrowRight"!==i&&39!==i?[3,6]:[4,D(t)];case 5:return o.sent(),[3,16];case 6:return"Enter"!==i&&"NumpadEnter"!==i&&13!==i?[3,16]:(r=n.target||n.srcElement)&&r.className.match("introjs-prevbutton")?[4,F(t)]:[3,8];case 7:return o.sent(),[3,15];case 8:return r&&r.className.match("introjs-skipbutton")?t._introItems.length-1===t._currentStep&&v(t._introCompleteCallback)?[4,t._introCompleteCallback.call(t,t._currentStep,"skip")]:[3,10]:[3,12];case 9:o.sent(),o.label=10;case 10:return[4,et(t,t._targetElement)];case 11:return o.sent(),[3,15];case 12:return r&&r.getAttribute("data-step-number")?(r.click(),[3,15]):[3,13];case 13:return[4,D(t)];case 14:o.sent(),o.label=15;case 15:n.preventDefault?n.preventDefault():n.returnValue=!1,o.label=16;case 16:return[2];}});});}function M(t){if(null===t||"object"!==s(t)||"nodeType"in t)return t;var n={};for(var i in t)"jQuery"in window&&t[i]instanceof window.jQuery?n[i]=t[i]:n[i]=M(t[i]);return n;}function V(t){var n=document.querySelector(".introjs-hints");return n?Array.from(n.querySelectorAll(t)):[];}function _(t,n){return a(this,void 0,void 0,function(){var i;return u(this,function(r){switch(r.label){case 0:return i=V('.introjs-hint[data-step="'.concat(n,'"]'))[0],X(),i&&p(i,"introjs-hidehint"),v(t._hintCloseCallback)?[4,t._hintCloseCallback.call(t,n)]:[3,2];case 1:r.sent(),r.label=2;case 2:return[2];}});});}function H(t){return a(this,void 0,void 0,function(){var n,i,r,o,e;return u(this,function(s){switch(s.label){case 0:n=V(".introjs-hint"),i=0,r=n,s.label=1;case 1:return i<r.length?(o=r[i],(e=o.getAttribute("data-step"))?[4,_(t,parseInt(e,10))]:[3,3]):[3,4];case 2:s.sent(),s.label=3;case 3:return i++,[3,1];case 4:return[2];}});});}function Q(t){return a(this,void 0,void 0,function(){var n,i,r,o,e;return u(this,function(s){switch(s.label){case 0:if(!(n=V(".introjs-hint"))||!n.length)return[3,1];for(i=0,r=n;i<r.length;i++)o=r[i],(e=o.getAttribute("data-step"))&&Z(parseInt(e,10));return[3,3];case 1:return[4,Y(t,t._targetElement)];case 2:s.sent(),s.label=3;case 3:return[2];}});});}function Z(t){var n=V('.introjs-hint[data-step="'.concat(t,'"]'))[0];n&&k(n,/introjs-hidehint/g);}function q(t){var n=V('.introjs-hint[data-step="'.concat(t,'"]'))[0];n&&n.parentNode&&n.parentNode.removeChild(n);}function K(t){return a(this,void 0,void 0,function(){var n,i,r,o,e,s,a;return u(this,function(u){switch(u.label){case 0:for(null===(n=document.querySelector(".introjs-hints"))&&(n=C("div",{className:"introjs-hints"})),i=function i(n){return function(i){var r=i||window.event;r&&r.stopPropagation&&r.stopPropagation(),r&&null!==r.cancelBubble&&(r.cancelBubble=!0),W(t,n);};},r=0;r<t._hintItems.length;r++){if(o=t._hintItems[r],document.querySelector('.introjs-hint[data-step="'.concat(r,'"]')))return[2];g(e=C("a",{className:"introjs-hint"})),e.onclick=i(r),o.hintAnimation||p(e,"introjs-hint-no-anim"),y(o.element)&&p(e,"introjs-fixedhint"),s=C("div",{className:"introjs-hint-dot"}),a=C("div",{className:"introjs-hint-pulse"}),e.appendChild(s),e.appendChild(a),e.setAttribute("data-step",r.toString()),o.hintTargetElement=o.element,o.element=e,U(o.hintPosition,e,o.hintTargetElement),n.appendChild(e);}return document.body.appendChild(n),v(t._hintsAddedCallback)?[4,t._hintsAddedCallback.call(t)]:[3,2];case 1:u.sent(),u.label=2;case 2:return t._options.hintAutoRefreshInterval>=0&&(t._hintsAutoRefreshFunction=(c=function c(){return tt(t);},l=t._options.hintAutoRefreshInterval,function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];window.clearTimeout(d),d=window.setTimeout(function(){c();},l);}),h.on(window,"scroll",t._hintsAutoRefreshFunction,t,!0)),[2];}var c,l,d;});});}function U(t,n,i){if(void 0!==i){var r=x(i),o=20,e=20;switch(t){default:case"top-left":n.style.left="".concat(r.left,"px"),n.style.top="".concat(r.top,"px");break;case"top-right":n.style.left="".concat(r.left+r.width-o,"px"),n.style.top="".concat(r.top,"px");break;case"bottom-left":n.style.left="".concat(r.left,"px"),n.style.top="".concat(r.top+r.height-e,"px");break;case"bottom-right":n.style.left="".concat(r.left+r.width-o,"px"),n.style.top="".concat(r.top+r.height-e,"px");break;case"middle-left":n.style.left="".concat(r.left,"px"),n.style.top="".concat(r.top+(r.height-e)/2,"px");break;case"middle-right":n.style.left="".concat(r.left+r.width-o,"px"),n.style.top="".concat(r.top+(r.height-e)/2,"px");break;case"middle-middle":n.style.left="".concat(r.left+(r.width-o)/2,"px"),n.style.top="".concat(r.top+(r.height-e)/2,"px");break;case"bottom-middle":n.style.left="".concat(r.left+(r.width-o)/2,"px"),n.style.top="".concat(r.top+r.height-e,"px");break;case"top-middle":n.style.left="".concat(r.left+(r.width-o)/2,"px"),n.style.top="".concat(r.top,"px");}}}function W(t,n){return a(this,void 0,void 0,function(){var i,r,o,e,s,a,c,l,d,f,h;return u(this,function(u){switch(u.label){case 0:return i=document.querySelector('.introjs-hint[data-step="'.concat(n,'"]')),r=t._hintItems[n],v(t._hintClickCallback)?[4,t._hintClickCallback.call(t,i,r,n)]:[3,2];case 1:u.sent(),u.label=2;case 2:return void 0!==(o=X())&&parseInt(o,10)===n||(e=C("div",{className:"introjs-tooltip"}),s=C("div"),a=C("div"),c=C("div"),e.onclick=function(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0;},s.className="introjs-tooltiptext",(l=C("p")).innerHTML=r.hint||"",s.appendChild(l),t._options.hintShowButton&&((d=C("a")).className=t._options.buttonClass,d.setAttribute("role","button"),d.innerHTML=t._options.hintButtonLabel,d.onclick=function(){return _(t,n);},s.appendChild(d)),a.className="introjs-arrow",e.appendChild(a),e.appendChild(s),f=i.getAttribute("data-step")||"",t._currentStep=parseInt(f,10),h=t._hintItems[t._currentStep],c.className="introjs-tooltipReferenceLayer introjs-hintReference",c.setAttribute("data-step",f),N(t,h,c),c.appendChild(e),document.body.appendChild(c),P(t,h,e,a,!0)),[2];}});});}function X(){var t=document.querySelector(".introjs-hintReference");if(t&&t.parentNode){var n=t.getAttribute("data-step");if(!n)return;return t.parentNode.removeChild(t),n;}}function Y(t,n){return a(this,void 0,void 0,function(){var i,r,o,e,s,a,c,l,d,f;return u(this,function(u){switch(u.label){case 0:if(t._hintItems=[],t._options.hints&&t._options.hints.length>0)for(i=0,r=t._options.hints;i<r.length;i++)o=r[i],"string"==typeof(e=M(o)).element&&(e.element=document.querySelector(e.element)),e.hintPosition=e.hintPosition||t._options.hintPosition,e.hintAnimation=e.hintAnimation||t._options.hintAnimation,null!==e.element&&t._hintItems.push(e);else{if(!(s=Array.from(n.querySelectorAll("*[data-hint]")))||!s.length)return[2,!1];for(a=0,c=s;a<c.length;a++)l=c[a],d=l.getAttribute("data-hint-animation"),f=t._options.hintAnimation,d&&(f="true"===d),t._hintItems.push({element:l,hint:l.getAttribute("data-hint")||"",hintPosition:l.getAttribute("data-hint-position")||t._options.hintPosition,hintAnimation:f,tooltipClass:l.getAttribute("data-tooltip-class")||void 0,position:l.getAttribute("data-position")||t._options.tooltipPosition});}return[4,K(t)];case 1:return u.sent(),h.on(document,"click",X,t,!1),h.on(window,"resize",tt,t,!0),[2,!0];}});});}function tt(t){for(var n=0,i=t._hintItems;n<i.length;n++){var r=i[n],o=r.hintTargetElement;U(r.hintPosition,r.element,o);}}function nt(t,n){var i=Array.from(n.querySelectorAll("*[data-intro]")),r=[];if(t._options.steps&&t._options.steps.length)for(var o=0,e=t._options.steps;o<e.length;o++){var s=M(f=e[o]);if(s.step=r.length+1,s.title=s.title||"","string"==typeof s.element&&(s.element=document.querySelector(s.element)||void 0),void 0===s.element||null===s.element){var a=document.querySelector(".introjsFloatingElement");null===a&&(a=C("div",{className:"introjsFloatingElement"}),document.body.appendChild(a)),s.element=a,s.position="floating";}s.position=s.position||t._options.tooltipPosition,s.scrollTo=s.scrollTo||t._options.scrollTo,void 0===s.disableInteraction&&(s.disableInteraction=t._options.disableInteraction),null!==s.element&&r.push(s);}else{var u=void 0;if(i.length<1)return[];for(var c=0,l=i;c<l.length;c++){var d=l[c];if((!t._options.group||d.getAttribute("data-intro-group")===t._options.group)&&"none"!==d.style.display){var f=parseInt(d.getAttribute("data-step")||"",10);u=t._options.disableInteraction,d.hasAttribute("data-disable-interaction")&&(u=!!d.getAttribute("data-disable-interaction")),f>0&&(r[f-1]={step:f,element:d,title:d.getAttribute("data-title")||"",intro:d.getAttribute("data-intro")||"",tooltipClass:d.getAttribute("data-tooltip-class")||void 0,highlightClass:d.getAttribute("data-highlight-class")||void 0,position:d.getAttribute("data-position")||t._options.tooltipPosition,scrollTo:d.getAttribute("data-scroll-to")||t._options.scrollTo,disableInteraction:u});}}for(var h=0,v=0,p=i;v<p.length;v++)if(d=p[v],(!t._options.group||d.getAttribute("data-intro-group")===t._options.group)&&null===d.getAttribute("data-step")){for(;void 0!==r[h];)h++;u=d.hasAttribute("data-disable-interaction")?!!d.getAttribute("data-disable-interaction"):t._options.disableInteraction,r[h]={element:d,title:d.getAttribute("data-title")||"",intro:d.getAttribute("data-intro")||"",step:h+1,tooltipClass:d.getAttribute("data-tooltip-class")||void 0,highlightClass:d.getAttribute("data-highlight-class")||void 0,position:d.getAttribute("data-position")||t._options.tooltipPosition,scrollTo:d.getAttribute("data-scroll-to")||t._options.scrollTo,disableInteraction:u};}}for(var w=[],b=0;b<r.length;b++)r[b]&&w.push(r[b]);return(r=w).sort(function(t,n){return t.step-n.step;}),r;}function it(t,n){var i=t._currentStep;if(null!=i&&-1!=i){var r=t._introItems[i],o=document.querySelector(".introjs-tooltipReferenceLayer"),e=document.querySelector(".introjs-helperLayer"),s=document.querySelector(".introjs-disableInteraction");N(t,r,e),N(t,r,o),N(t,r,s),n&&(t._introItems=nt(t,t._targetElement),function(t,n){if(t._options.showBullets){var i=document.querySelector(".introjs-bullets");i&&i.parentNode&&i.parentNode.replaceChild(B(t,n),i);}}(t,r),R(o,i,t._introItems.length));var a=document.querySelector(".introjs-arrow"),u=document.querySelector(".introjs-tooltip");return u&&a&&P(t,t._introItems[i],u,a),tt(t),t;}}function rt(t){it(t);}function ot(t,n){if(void 0===n&&(n=!1),t&&t.parentElement){var i=t.parentElement;n?(E(t,{opacity:"0"}),window.setTimeout(function(){try{i.removeChild(t);}catch(t){}},500)):i.removeChild(t);}}function et(t,n,i){return void 0===i&&(i=!1),a(this,void 0,void 0,function(){var r,o,e,s;return u(this,function(a){switch(a.label){case 0:return r=!0,void 0===t._introBeforeExitCallback?[3,2]:[4,t._introBeforeExitCallback.call(t,n)];case 1:r=a.sent(),a.label=2;case 2:if(!i&&!1===r)return[2];if((o=Array.from(n.querySelectorAll(".introjs-overlay")))&&o.length)for(e=0,s=o;e<s.length;e++)ot(s[e]);return ot(n.querySelector(".introjs-helperLayer"),!0),ot(n.querySelector(".introjs-tooltipReferenceLayer")),ot(n.querySelector(".introjs-disableInteraction")),ot(document.querySelector(".introjsFloatingElement")),I(),h.off(window,"keydown",G,t,!0),h.off(window,"resize",rt,t,!0),v(t._introExitCallback)?[4,t._introExitCallback.call(t)]:[3,4];case 3:a.sent(),a.label=4;case 4:return t._currentStep=-1,[2];}});});}function st(t,n){return a(this,void 0,void 0,function(){var i;return u(this,function(r){switch(r.label){case 0:return t.isActive()?v(t._introStartCallback)?[4,t._introStartCallback.call(t,n)]:[3,2]:[2,!1];case 1:r.sent(),r.label=2;case 2:return 0===(i=nt(t,n)).length?[2,!1]:(t._introItems=i,function(t,n){var i=this,r=C("div",{className:"introjs-overlay"});E(r,{top:0,bottom:0,left:0,right:0,position:"fixed"}),n.appendChild(r),!0===t._options.exitOnOverlayClick&&(E(r,{cursor:"pointer"}),r.onclick=function(){return a(i,void 0,void 0,function(){return u(this,function(i){switch(i.label){case 0:return[4,et(t,n)];case 1:return i.sent(),[2];}});});});}(t,n),[4,D(t)]);case 3:r.sent(),n.addEventListener,t._options.keyboardNavigation&&h.on(window,"keydown",G,t,!0),h.on(window,"resize",rt,t,!0),r.label=4;case 4:return[2,!1];}});});}function at(t,n,i){return t[n]=i,t;}return{setters:[function(_tslib){t=_tslib.__decorate;},function(_lit){n=_lit.LitElement;i=_lit.html;},function(_litDecoratorsJs){r=_litDecoratorsJs.property;o=_litDecoratorsJs.customElement;},function(_nileTourCssCjsJs){e=_nileTourCssCjsJs.s;},function(_litElement001CjsJs){},function(_cssTag002CjsJs){}],execute:function execute(){"function"==typeof SuppressedError&&SuppressedError;f=(d={},function(t,n){return void 0===n&&(n="introjs-stamp"),d[n]=d[n]||0,void 0===t[n]&&(t[n]=d[n]++),t[n];});h=new(function(){function t(){this.events_key="introjs_event";}return t.prototype._id=function(t,n,i){return t+f(n)+(i?"_".concat(f(i)):"");},t.prototype.on=function(t,n,i,r,o){var e=this._id(n,i,r),s=function s(n){return i(r||t,n||window.event);};"addEventListener"in t?t.addEventListener(n,s,o):"attachEvent"in t&&t.attachEvent("on".concat(n),s),t[this.events_key]=t[this.events_key]||{},t[this.events_key][e]=s;},t.prototype.off=function(t,n,i,r,o){var e=this._id(n,i,r),s=t[this.events_key]&&t[this.events_key][e];s&&("removeEventListener"in t?t.removeEventListener(n,s,o):"detachEvent"in t&&t.detachEvent("on".concat(n),s),t[this.events_key][e]=null);},t;}())();v=function v(t){return"function"==typeof t;};ut=function(){function t(t){this._currentStep=-1,this._introItems=[],this._hintItems=[],this._targetElement=t,this._options={steps:[],hints:[],isActive:!0,nextLabel:"Next",prevLabel:"Back",skipLabel:"×",doneLabel:"Done",hidePrev:!1,hideNext:!1,nextToDone:!0,tooltipPosition:"bottom",tooltipClass:"",group:"",highlightClass:"",exitOnEsc:!0,exitOnOverlayClick:!0,showStepNumbers:!1,stepNumbersOfLabel:"of",keyboardNavigation:!0,showButtons:!0,showBullets:!0,showProgress:!1,scrollToElement:!0,scrollTo:"element",scrollPadding:30,overlayOpacity:.5,autoPosition:!0,positionPrecedence:["bottom","top","right","left"],disableInteraction:!1,dontShowAgain:!1,dontShowAgainLabel:"Don't show this again",dontShowAgainCookie:"introjs-dontShowAgain",dontShowAgainCookieDays:365,helperElementPadding:10,hintPosition:"top-middle",hintButtonLabel:"Got it",hintShowButton:!0,hintAutoRefreshInterval:10,hintAnimation:!0,buttonClass:"introjs-button",progressBarAdditionalClass:!1};}return t.prototype.isActive=function(){return(!this._options.dontShowAgain||""===(t=l(this._options.dontShowAgainCookie))||"true"!==t)&&this._options.isActive;var t;},t.prototype.clone=function(){return new t(this._targetElement);},t.prototype.setOption=function(t,n){return this._options=at(this._options,t,n),this;},t.prototype.setOptions=function(t){return this._options=function(t,n){for(var i=0,r=Object.entries(n);i<r.length;i++){var o=r[i];t=at(t,o[0],o[1]);}return t;}(this._options,t),this;},t.prototype.start=function(){return a(this,void 0,void 0,function(){return u(this,function(t){switch(t.label){case 0:return[4,st(this,this._targetElement)];case 1:return t.sent(),[2,this];}});});},t.prototype.goToStep=function(t){return a(this,void 0,void 0,function(){return u(this,function(n){switch(n.label){case 0:return[4,$(this,t)];case 1:return n.sent(),[2,this];}});});},t.prototype.addStep=function(t){return this._options.steps||(this._options.steps=[]),this._options.steps.push(t),this;},t.prototype.addSteps=function(t){if(!t.length)return this;for(var n=0;n<t.length;n++)this.addStep(t[n]);return this;},t.prototype.goToStepNumber=function(t){return a(this,void 0,void 0,function(){return u(this,function(n){switch(n.label){case 0:return[4,z(this,t)];case 1:return n.sent(),[2,this];}});});},t.prototype.nextStep=function(){return a(this,void 0,void 0,function(){return u(this,function(t){switch(t.label){case 0:return[4,D(this)];case 1:return t.sent(),[2,this];}});});},t.prototype.previousStep=function(){return a(this,void 0,void 0,function(){return u(this,function(t){switch(t.label){case 0:return[4,F(this)];case 1:return t.sent(),[2,this];}});});},t.prototype.currentStep=function(){return this._currentStep;},t.prototype.exit=function(t){return a(this,void 0,void 0,function(){return u(this,function(n){switch(n.label){case 0:return[4,et(this,this._targetElement,t)];case 1:return n.sent(),[2,this];}});});},t.prototype.refresh=function(t){return it(this,t),this;},t.prototype.setDontShowAgain=function(t){return function(t,n){n?c(t._options.dontShowAgainCookie,"true",t._options.dontShowAgainCookieDays):c(t._options.dontShowAgainCookie,"",-1);}(this,t),this;},t.prototype.onbeforechange=function(t){if(!v(t))throw new Error("Provided callback for onbeforechange was not a function");return this._introBeforeChangeCallback=t,this;},t.prototype.onchange=function(t){if(!v(t))throw new Error("Provided callback for onchange was not a function.");return this._introChangeCallback=t,this;},t.prototype.onafterchange=function(t){if(!v(t))throw new Error("Provided callback for onafterchange was not a function");return this._introAfterChangeCallback=t,this;},t.prototype.oncomplete=function(t){if(!v(t))throw new Error("Provided callback for oncomplete was not a function.");return this._introCompleteCallback=t,this;},t.prototype.onhintsadded=function(t){if(!v(t))throw new Error("Provided callback for onhintsadded was not a function.");return this._hintsAddedCallback=t,this;},t.prototype.onhintclick=function(t){if(!v(t))throw new Error("Provided callback for onhintclick was not a function.");return this._hintClickCallback=t,this;},t.prototype.onhintclose=function(t){if(!v(t))throw new Error("Provided callback for onhintclose was not a function.");return this._hintCloseCallback=t,this;},t.prototype.onstart=function(t){if(!v(t))throw new Error("Provided callback for onstart was not a function.");return this._introStartCallback=t,this;},t.prototype.onexit=function(t){if(!v(t))throw new Error("Provided callback for onexit was not a function.");return this._introExitCallback=t,this;},t.prototype.onskip=function(t){if(!v(t))throw new Error("Provided callback for onskip was not a function.");return this._introSkipCallback=t,this;},t.prototype.onbeforeexit=function(t){if(!v(t))throw new Error("Provided callback for onbeforeexit was not a function.");return this._introBeforeExitCallback=t,this;},t.prototype.addHints=function(){return a(this,void 0,void 0,function(){return u(this,function(t){switch(t.label){case 0:return[4,Y(this,this._targetElement)];case 1:return t.sent(),[2,this];}});});},t.prototype.hideHint=function(t){return a(this,void 0,void 0,function(){return u(this,function(n){switch(n.label){case 0:return[4,_(this,t)];case 1:return n.sent(),[2,this];}});});},t.prototype.hideHints=function(){return a(this,void 0,void 0,function(){return u(this,function(t){switch(t.label){case 0:return[4,H(this)];case 1:return t.sent(),[2,this];}});});},t.prototype.showHint=function(t){return Z(t),this;},t.prototype.showHints=function(){return a(this,void 0,void 0,function(){return u(this,function(t){switch(t.label){case 0:return[4,Q(this)];case 1:return t.sent(),[2,this];}});});},t.prototype.removeHints=function(){return function(t){for(var n=0,i=V(".introjs-hint");n<i.length;n++){var r=i[n].getAttribute("data-step");r&&q(parseInt(r,10));}h.off(document,"click",X,t,!1),h.off(window,"resize",tt,t,!0),t._hintsAutoRefreshFunction&&h.off(window,"scroll",t._hintsAutoRefreshFunction,t,!0);}(this),this;},t.prototype.removeHint=function(t){return q(t),this;},t.prototype.showHintDialog=function(t){return a(this,void 0,void 0,function(){return u(this,function(n){switch(n.label){case 0:return[4,W(this,t)];case 1:return n.sent(),[2,this];}});});},t;}();ct=function t(n){var i;if("object"===s(n))i=new ut(n);else if("string"==typeof n){var r=document.querySelector(n);if(!r)throw new Error("There is no element with given selector.");i=new ut(r);}else i=new ut(document.body);return t.instances[f(i,"introjs-instance")]=i,i;};ct.version="7.2.0",ct.instances={};_export("N",lt=/*#__PURE__*/function(_n){function lt(){var _this;_classCallCheck(this,lt);_this=_callSuper(this,lt),_this.tourInstance=null,_this.steps=[],_this.stepsJson="",_this.showBackdrop=!1,_this.disableInteraction=!1;return _this;}_inherits(lt,_n);return _createClass(lt,[{key:"createRenderRoot",value:function createRenderRoot(){return this;}},{key:"updated",value:function updated(t){t.has("stepsJson")&&this.parseStepsJson(),_get(_getPrototypeOf(lt.prototype),"updated",this).call(this,t);}},{key:"parseStepsJson",value:function parseStepsJson(){if(this.stepsJson)try{var _t=JSON.parse(this.stepsJson);Array.isArray(_t)?this.steps=_t:console.error("Invalid JSON: Expected an array");}catch(t){console.error("Failed to parse stepsJson:",t);}}},{key:"startTour",value:function startTour(){var _this2=this;console.log("start of tour");var t=this.steps.map(function(t){return{element:document.querySelector("[data-tour=\"".concat(t.element,"\"]")),intro:t.content,title:t.title,position:t.position,beforeChange:t.beforeChange,afterChange:t.afterChange};}).filter(function(t){return null!==t.element;});this.tourInstance=ct().setOptions({steps:t,nextLabel:"<button class='introjs-button introjs-next-button'>Next</button>",prevLabel:"<button class='introjs-button introjs-prev-button'>Prev</button>",overlayOpacity:0,disableInteraction:this.disableInteraction,showButtons:!0,showStepNumbers:!1,exitOnOverlayClick:!1}),this.tourInstance.onbeforechange(/*#__PURE__*/function(){var _ref=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(t){var _this2$tourInstance$_,_this2$tourInstance;var n,i;return _regeneratorRuntime().wrap(function _callee$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:n=(_this2$tourInstance$_=(_this2$tourInstance=_this2.tourInstance)===null||_this2$tourInstance===void 0?void 0:_this2$tourInstance._currentStep)!==null&&_this2$tourInstance$_!==void 0?_this2$tourInstance$_:0,i=_this2.steps[n];if(!(i!==null&&i!==void 0&&i.beforeChange)){_context2.next=6;break;}_context2.next=4;return i.beforeChange();case 4:if(_context2.sent){_context2.next=6;break;}return _context2.abrupt("return",(_this2.shakeTooltip(),!1));case 6:return _context2.abrupt("return",!0);case 7:case"end":return _context2.stop();}},_callee);}));return function(_x){return _ref.apply(this,arguments);};}()),this.tourInstance.onafterchange(function(t){var _this2$tourInstance$_2,_this2$tourInstance2;var n=(_this2$tourInstance$_2=(_this2$tourInstance2=_this2.tourInstance)===null||_this2$tourInstance2===void 0?void 0:_this2$tourInstance2._currentStep)!==null&&_this2$tourInstance$_2!==void 0?_this2$tourInstance$_2:0,i=_this2.steps[n];(i===null||i===void 0?void 0:i.afterChange)&&i.afterChange();}),this.tourInstance.onchange(function(t){var _this2$tourInstance$_3,_this2$tourInstance3;var n=(_this2$tourInstance$_3=(_this2$tourInstance3=_this2.tourInstance)===null||_this2$tourInstance3===void 0?void 0:_this2$tourInstance3._currentStep)!==null&&_this2$tourInstance$_3!==void 0?_this2$tourInstance$_3:0,i=_this2.steps.length,r=document.querySelector(".introjs-tooltip");if(r){var _t2=r.querySelector(".introjs-tooltipbuttons");if(_t2){var _r=_t2.querySelector(".introjs-step-counter");_r||(_r=document.createElement("div"),_r.className="introjs-step-counter",_t2.insertBefore(_r,_t2.firstChild)),_r.textContent="".concat(n+1," of ").concat(i);}}}),this.tourInstance.start();}},{key:"shakeTooltip",value:function shakeTooltip(){var t=document.querySelector(".introjs-tooltip");t&&(t.classList.add("introjs-shake"),setTimeout(function(){t.classList.remove("introjs-shake");},1500));}},{key:"render",value:function render(){return i(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <style>\n ","\n </style>\n <slot></slot>\n "])),e.cssText);}}],[{key:"styles",get:function get(){return[e];}}]);}(n));t([r({type:Array})],lt.prototype,"steps",void 0),t([r({type:String})],lt.prototype,"stepsJson",void 0),t([r({type:Boolean})],lt.prototype,"showBackdrop",void 0),t([r({type:Boolean})],lt.prototype,"disableInteraction",void 0),_export("N",lt=t([o("nile-tour")],lt));}};});
9
+ */function s(t){return(s="function"==typeof Symbol&&"symbol"==_typeof(Symbol.iterator)?function(t){return _typeof(t);}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":_typeof(t);})(t);}function a(t,n,i,r){return new(i||(i=Promise))(function(o,e){function s(t){try{u(r.next(t));}catch(t){e(t);}}function a(t){try{u(r["throw"](t));}catch(t){e(t);}}function u(t){var n;t.done?o(t.value):(n=t.value,n instanceof i?n:new i(function(t){t(n);})).then(s,a);}u((r=r.apply(t,n||[])).next());});}function u(t,n){var i,r,o,e,s={label:0,sent:function sent(){if(1&o[0])throw o[1];return o[1];},trys:[],ops:[]};return e={next:a(0),"throw":a(1),"return":a(2)},"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this;}),e;function a(a){return function(u){return function(a){if(i)throw new TypeError("Generator is already executing.");for(;e&&(e=0,a[0]&&(s=0)),s;)try{if(i=1,r&&(o=2&a[0]?r["return"]:a[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue;}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){s.label=a[1];break;}if(6===a[0]&&s.label<o[1]){s.label=o[1],o=a;break;}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(a);break;}o[2]&&s.ops.pop(),s.trys.pop();continue;}a=n.call(t,s);}catch(t){a=[6,t],r=0;}finally{i=o=0;}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0};}([a,u]);};}}function c(t,n,i){var r,o=((r={})[t]=n,r.path="/",r.expires=void 0,r);if(i){var e=new Date();e.setTime(e.getTime()+24*i*60*60*1e3),o.expires=e.toUTCString();}var s=[];for(var a in o)s.push("".concat(a,"=").concat(o[a]));return document.cookie=s.join("; "),l(t);}function l(t){return(n={},document.cookie.split(";").forEach(function(t){var i=t.split("="),r=i[0],o=i[1];n[r.trim()]=o;}),n)[t];var n;}function p(t,n){if(t instanceof SVGElement){var i=t.getAttribute("class")||"";i.match(n)||t.setAttribute("class","".concat(i," ").concat(n));}else if(void 0!==t.classList)for(var r=0,o=n.split(" ");r<o.length;r++){var e=o[r];t.classList.add(e);}else t.className.match(n)||(t.className+=" ".concat(n));}function w(t,n){var i="";return"currentStyle"in t?i=t.currentStyle[n]:document.defaultView&&document.defaultView.getComputedStyle&&(i=document.defaultView.getComputedStyle(t,null).getPropertyValue(n)),i&&i.toLowerCase?i.toLowerCase():i;}function m(t,n){if(t){var i=function(t){var n=window.getComputedStyle(t),i="absolute"===n.position,r=/(auto|scroll)/;if("fixed"===n.position)return document.body;for(var o=t;o=o.parentElement;)if(n=window.getComputedStyle(o),(!i||"static"!==n.position)&&r.test(n.overflow+n.overflowY+n.overflowX))return o;return document.body;}(n);i!==document.body&&(i.scrollTop=n.offsetTop-i.offsetTop);}}function b(){if(void 0!==window.innerWidth)return{width:window.innerWidth,height:window.innerHeight};var t=document.documentElement;return{width:t.clientWidth,height:t.clientHeight};}function j(t,n,i,r,o){var e;if("off"!==n&&t&&(e="tooltip"===n?o.getBoundingClientRect():r.getBoundingClientRect(),!function(t){var n=t.getBoundingClientRect();return n.top>=0&&n.left>=0&&n.bottom+80<=window.innerHeight&&n.right<=window.innerWidth;}(r))){var s=b().height;e.bottom-(e.bottom-e.top)<0||r.clientHeight>s?window.scrollBy(0,e.top-(s/2-e.height/2)-i):window.scrollBy(0,e.top-(s/2-e.height/2)+i);}}function g(t){t.setAttribute("role","button"),t.tabIndex=0;}function y(t){var n=t.parentElement;return!(!n||"HTML"===n.nodeName)&&("fixed"===w(t,"position")||y(n));}function x(t,n){var i=document.body,r=document.documentElement,o=window.pageYOffset||r.scrollTop||i.scrollTop,e=window.pageXOffset||r.scrollLeft||i.scrollLeft;n=n||i;var s=t.getBoundingClientRect(),a=n.getBoundingClientRect(),u=w(n,"position"),c={width:s.width,height:s.height};return"body"!==n.tagName.toLowerCase()&&"relative"===u||"sticky"===u?Object.assign(c,{top:s.top-a.top,left:s.left-a.left}):y(t)?Object.assign(c,{top:s.top,left:s.left}):Object.assign(c,{top:s.top+o,left:s.left+e});}function k(t,n){if(t instanceof SVGElement){var i=t.getAttribute("class")||"";t.setAttribute("class",i.replace(n,"").replace(/^\s+|\s+$/g,""));}else t.className=t.className.replace(n,"").replace(/^\s+|\s+$/g,"");}function E(t,n){var i="";if(t.style.cssText&&(i+=t.style.cssText),"string"==typeof n)i+=n;else for(var r in n)i+="".concat(r,":").concat(n[r],";");t.style.cssText=i;}function N(t,n,i){if(i&&n){var r=x(n.element,t._targetElement),o=t._options.helperElementPadding;n.element instanceof Element&&y(n.element)?p(i,"introjs-fixedTooltip"):k(i,"introjs-fixedTooltip"),"floating"===n.position&&(o=0),E(i,{width:"".concat(r.width+o,"px"),height:"".concat(r.height+o,"px"),top:"".concat(r.top-o/2,"px"),left:"".concat(r.left-o/2,"px")});}}function S(t,n,i,r,o){return t.left+n+i.width>r.width?(o.style.left="".concat(r.width-i.width-t.left,"px"),!1):(o.style.left="".concat(n,"px"),!0);}function A(t,n,i,r){return t.left+t.width-n-i.width<0?(r.style.left="".concat(-t.left,"px"),!1):(r.style.right="".concat(n,"px"),!0);}function L(t,n){t.includes(n)&&t.splice(t.indexOf(n),1);}function P(t,n,i,r,o){if(void 0===o&&(o=!1),n){var e,s,a,u,c="";i.style.top="",i.style.right="",i.style.bottom="",i.style.left="",i.style.marginLeft="",i.style.marginTop="",r.style.display="inherit",c="string"==typeof n.tooltipClass?n.tooltipClass:t._options.tooltipClass,i.className=["introjs-tooltip",c].filter(Boolean).join(" "),i.setAttribute("role","dialog"),"floating"!==(u=n.position)&&t._options.autoPosition&&(u=function(t,n,i,r){var o=t.slice(),e=b(),s=x(i).height+10,a=x(i).width+20,u=n.getBoundingClientRect(),c="floating";if(u.bottom+s>e.height&&L(o,"bottom"),u.top-s<0&&L(o,"top"),u.right+a>e.width&&L(o,"right"),u.left-a<0&&L(o,"left"),r&&(r=r.split("-")[0]),o.length&&(c=o[0],o.includes(r)&&(c=r)),"top"===c||"bottom"===c){var l=void 0,d=[];"top"===c?(l="top-middle-aligned",d=["top-left-aligned","top-middle-aligned","top-right-aligned"]):(l="bottom-middle-aligned",d=["bottom-left-aligned","bottom-middle-aligned","bottom-right-aligned"]),c=function(t,n,i,r){var o=n/2,e=Math.min(i,window.screen.width);return e-t<n&&(L(r,"top-left-aligned"),L(r,"bottom-left-aligned")),(t<o||e-t<o)&&(L(r,"top-middle-aligned"),L(r,"bottom-middle-aligned")),t<n&&(L(r,"top-right-aligned"),L(r,"bottom-right-aligned")),r.length?r[0]:null;}(u.left,a,e.width,d)||l;}return c;}(t._options.positionPrecedence,n.element,i,u)),s=x(n.element),e=x(i),a=b(),p(i,"introjs-".concat(u));var l=s.width/2-e.width/2;switch(u){case"top-right-aligned":r.className="introjs-arrow bottom-right";var d=0;A(s,d,e,i),i.style.bottom="".concat(s.height+20,"px");break;case"top-middle-aligned":r.className="introjs-arrow bottom-middle",o&&(l+=5),A(s,l,e,i)&&(i.style.right="",S(s,l,e,a,i)),i.style.bottom="".concat(s.height+20,"px");break;case"top-left-aligned":case"top":r.className="introjs-arrow bottom",S(s,o?0:15,e,a,i),i.style.bottom="".concat(s.height+20,"px");break;case"right":i.style.left="".concat(s.width+20,"px"),s.top+e.height>a.height?(r.className="introjs-arrow left-bottom",i.style.top="-".concat(e.height-s.height-20,"px")):r.className="introjs-arrow left";break;case"left":o||!0!==t._options.showStepNumbers||(i.style.top="15px"),s.top+e.height>a.height?(i.style.top="-".concat(e.height-s.height-20,"px"),r.className="introjs-arrow right-bottom"):r.className="introjs-arrow right",i.style.right="".concat(s.width+20,"px");break;case"floating":r.style.display="none",i.style.left="50%",i.style.top="50%",i.style.marginLeft="-".concat(e.width/2,"px"),i.style.marginTop="-".concat(e.height/2,"px");break;case"bottom-right-aligned":r.className="introjs-arrow top-right",A(s,d=0,e,i),i.style.top="".concat(s.height+20,"px");break;case"bottom-middle-aligned":r.className="introjs-arrow top-middle",o&&(l+=5),A(s,l,e,i)&&(i.style.right="",S(s,l,e,a,i)),i.style.top="".concat(s.height+20,"px");break;default:r.className="introjs-arrow top",S(s,0,e,a,i),i.style.top="".concat(s.height+20,"px");}}}function I(){for(var t=0,n=Array.from(document.querySelectorAll(".introjs-showElement"));t<n.length;t++)k(n[t],/introjs-[a-zA-Z]+/g);}function C(t,n){var i=document.createElement(t);n=n||{};var r=/^(?:role|data-|aria-)/;for(var o in n){var e=n[o];"style"===o&&"function"!=typeof e?E(i,e):"string"==typeof e&&o.match(r)?i.setAttribute(o,e):i[o]=e;}return i;}function O(t,n,i){if(void 0===i&&(i=!1),i){var r=n.style.opacity||"1";E(n,{opacity:"0"}),window.setTimeout(function(){E(n,{opacity:r});},10);}t.appendChild(n);}function T(t,n){return(t+1)/n*100;}function B(t,n){var i=C("div",{className:"introjs-bullets"});!1===t._options.showBullets&&(i.style.display="none");var r=C("ul");r.setAttribute("role","tablist");for(var o=function o(){var n=this.getAttribute("data-step-number");null!=n&&t.goToStep(parseInt(n,10));},e=0;e<t._introItems.length;e++){var s=t._introItems[e].step,a=C("li"),u=C("a");a.setAttribute("role","presentation"),u.setAttribute("role","tab"),u.onclick=o,e===n.step-1&&(u.className="active"),g(u),u.innerHTML="&nbsp;",u.setAttribute("data-step-number",s.toString()),a.appendChild(u),r.appendChild(a);}return i.appendChild(r),i;}function R(t,n,i){var r=t.querySelector(".introjs-progress .introjs-progressbar");if(r){var o=T(n,i);r.style.cssText="width:".concat(o,"%;"),r.setAttribute("aria-valuenow",o.toString());}}function $(t,n){return a(this,void 0,void 0,function(){var i,r,o,e,s,c,l,d,f,h,b,y,x,k,S,A,L,$,J,z,G,M,V,_,H=this;return u(this,function(Q){switch(Q.label){case 0:return v(t._introChangeCallback)?[4,t._introChangeCallback.call(t,n.element)]:[3,2];case 1:Q.sent(),Q.label=2;case 2:return i=document.querySelector(".introjs-helperLayer"),r=document.querySelector(".introjs-tooltipReferenceLayer"),o="introjs-helperLayer","string"==typeof n.highlightClass&&(o+=" ".concat(n.highlightClass)),"string"==typeof t._options.highlightClass&&(o+=" ".concat(t._options.highlightClass)),null!==i&&null!==r?(l=r.querySelector(".introjs-helperNumberLayer"),d=r.querySelector(".introjs-tooltiptext"),f=r.querySelector(".introjs-tooltip-title"),h=r.querySelector(".introjs-arrow"),b=r.querySelector(".introjs-tooltip"),c=r.querySelector(".introjs-skipbutton"),s=r.querySelector(".introjs-prevbutton"),e=r.querySelector(".introjs-nextbutton"),i.className=o,b.style.opacity="0",b.style.display="none",m(t._options.scrollToElement,n.element),N(t,n,i),N(t,n,r),I(),t._lastShowElementTimer&&window.clearTimeout(t._lastShowElementTimer),t._lastShowElementTimer=window.setTimeout(function(){null!==l&&(l.innerHTML="".concat(n.step," ").concat(t._options.stepNumbersOfLabel," ").concat(t._introItems.length)),d.innerHTML=n.intro||"",f.innerHTML=n.title||"",b.style.display="block",P(t,n,b,h),function(t,n,i){if(t){var r=n.querySelector(".introjs-bullets li > a.active"),o=n.querySelector('.introjs-bullets li > a[data-step-number="'.concat(i.step,'"]'));r&&o&&(r.className="",o.className="active");}}(t._options.showBullets,r,n),R(r,t._currentStep,t._introItems.length),b.style.opacity="1",(null!=e&&/introjs-donebutton/gi.test(e.className)||null!=e)&&e.focus(),j(t._options.scrollToElement,n.scrollTo,t._options.scrollPadding,n.element,d);},350)):(y=C("div",{className:o}),x=C("div",{className:"introjs-tooltipReferenceLayer"}),k=C("div",{className:"introjs-arrow"}),S=C("div",{className:"introjs-tooltip"}),A=C("div",{className:"introjs-tooltiptext"}),L=C("div",{className:"introjs-tooltip-header"}),$=C("h1",{className:"introjs-tooltip-title"}),J=C("div"),E(y,{"box-shadow":"0 0 1px 2px rgba(33, 33, 33, 0.8), rgba(33, 33, 33, ".concat(t._options.overlayOpacity.toString(),") 0 0 0 5000px")}),m(t._options.scrollToElement,n.element),N(t,n,y),N(t,n,x),O(t._targetElement,y,!0),O(t._targetElement,x),A.innerHTML=n.intro,$.innerHTML=n.title,J.className="introjs-tooltipbuttons",!1===t._options.showButtons&&(J.style.display="none"),L.appendChild($),S.appendChild(L),S.appendChild(A),t._options.dontShowAgain&&(z=C("div",{className:"introjs-dontShowAgain"}),(G=C("input",{type:"checkbox",id:"introjs-dontShowAgain",name:"introjs-dontShowAgain"})).onchange=function(n){t.setDontShowAgain(n.target.checked);},(M=C("label",{htmlFor:"introjs-dontShowAgain"})).innerText=t._options.dontShowAgainLabel,z.appendChild(G),z.appendChild(M),S.appendChild(z)),S.appendChild(B(t,n)),S.appendChild(function(t){var n=C("div");n.className="introjs-progress",!1===t._options.showProgress&&(n.style.display="none");var i=C("div",{className:"introjs-progressbar"});t._options.progressBarAdditionalClass&&(i.className+=" "+t._options.progressBarAdditionalClass);var r=T(t._currentStep,t._introItems.length);return i.setAttribute("role","progress"),i.setAttribute("aria-valuemin","0"),i.setAttribute("aria-valuemax","100"),i.setAttribute("aria-valuenow",r.toString()),i.style.cssText="width:".concat(r,"%;"),n.appendChild(i),n;}(t)),V=C("div"),!0===t._options.showStepNumbers&&(V.className="introjs-helperNumberLayer",V.innerHTML="".concat(n.step," ").concat(t._options.stepNumbersOfLabel," ").concat(t._introItems.length),S.appendChild(V)),S.appendChild(k),x.appendChild(S),(e=C("a")).onclick=function(){return a(H,void 0,void 0,function(){return u(this,function(n){switch(n.label){case 0:return t._introItems.length-1===t._currentStep?[3,2]:[4,D(t)];case 1:return n.sent(),[3,6];case 2:return /introjs-donebutton/gi.test(e.className)?v(t._introCompleteCallback)?[4,t._introCompleteCallback.call(t,t._currentStep,"done")]:[3,4]:[3,6];case 3:n.sent(),n.label=4;case 4:return[4,et(t,t._targetElement)];case 5:n.sent(),n.label=6;case 6:return[2];}});});},g(e),e.innerHTML=t._options.nextLabel,(s=C("a")).onclick=function(){return a(H,void 0,void 0,function(){return u(this,function(n){switch(n.label){case 0:return t._currentStep>0?[4,F(t)]:[3,2];case 1:n.sent(),n.label=2;case 2:return[2];}});});},g(s),s.innerHTML=t._options.prevLabel,g(c=C("a",{className:"introjs-skipbutton"})),c.innerHTML=t._options.skipLabel,c.onclick=function(){return a(H,void 0,void 0,function(){return u(this,function(n){switch(n.label){case 0:return t._introItems.length-1===t._currentStep&&v(t._introCompleteCallback)?[4,t._introCompleteCallback.call(t,t._currentStep,"skip")]:[3,2];case 1:n.sent(),n.label=2;case 2:return v(t._introSkipCallback)?[4,t._introSkipCallback.call(t,t._currentStep)]:[3,4];case 3:n.sent(),n.label=4;case 4:return[4,et(t,t._targetElement)];case 5:return n.sent(),[2];}});});},L.appendChild(c),t._introItems.length>1&&J.appendChild(s),J.appendChild(e),S.appendChild(J),P(t,n,S,k),j(t._options.scrollToElement,n.scrollTo,t._options.scrollPadding,n.element,S)),(_=t._targetElement.querySelector(".introjs-disableInteraction"))&&_.parentNode&&_.parentNode.removeChild(_),n.disableInteraction&&function(t,n){var i=document.querySelector(".introjs-disableInteraction");null===i&&(i=C("div",{className:"introjs-disableInteraction"}),t._targetElement.appendChild(i)),N(t,n,i);}(t,n),0===t._currentStep&&t._introItems.length>1?(null!=e&&(e.className="".concat(t._options.buttonClass," introjs-nextbutton"),e.innerHTML=t._options.nextLabel),!0===t._options.hidePrev?(null!=s&&(s.className="".concat(t._options.buttonClass," introjs-prevbutton introjs-hidden")),null!=e&&p(e,"introjs-fullbutton")):null!=s&&(s.className="".concat(t._options.buttonClass," introjs-prevbutton introjs-disabled"))):t._introItems.length-1===t._currentStep||1===t._introItems.length?(null!=s&&(s.className="".concat(t._options.buttonClass," introjs-prevbutton")),!0===t._options.hideNext?(null!=e&&(e.className="".concat(t._options.buttonClass," introjs-nextbutton introjs-hidden")),null!=s&&p(s,"introjs-fullbutton")):null!=e&&(!0===t._options.nextToDone?(e.innerHTML=t._options.doneLabel,p(e,"".concat(t._options.buttonClass," introjs-nextbutton introjs-donebutton"))):e.className="".concat(t._options.buttonClass," introjs-nextbutton introjs-disabled"))):(null!=s&&(s.className="".concat(t._options.buttonClass," introjs-prevbutton")),null!=e&&(e.className="".concat(t._options.buttonClass," introjs-nextbutton"),e.innerHTML=t._options.nextLabel)),null!=s&&s.setAttribute("role","button"),null!=e&&e.setAttribute("role","button"),null!=c&&c.setAttribute("role","button"),null!=e&&e.focus(),function(t){p(t,"introjs-showElement");var n=w(t,"position");"absolute"!==n&&"relative"!==n&&"sticky"!==n&&"fixed"!==n&&p(t,"introjs-relativePosition");}(n.element),v(t._introAfterChangeCallback)?[4,t._introAfterChangeCallback.call(t,n.element)]:[3,4];case 3:Q.sent(),Q.label=4;case 4:return[2];}});});}function J(t,n){return a(this,void 0,void 0,function(){return u(this,function(i){switch(i.label){case 0:return t._currentStep=n-2,void 0===t._introItems?[3,2]:[4,D(t)];case 1:i.sent(),i.label=2;case 2:return[2];}});});}function z(t,n){return a(this,void 0,void 0,function(){return u(this,function(i){switch(i.label){case 0:return t._currentStepNumber=n,void 0===t._introItems?[3,2]:[4,D(t)];case 1:i.sent(),i.label=2;case 2:return[2];}});});}function D(t){return a(this,void 0,void 0,function(){var n,i,r;return u(this,function(o){switch(o.label){case 0:if(t._direction="forward",void 0!==t._currentStepNumber)for(n=0;n<t._introItems.length;n++)t._introItems[n].step===t._currentStepNumber&&(t._currentStep=n-1,t._currentStepNumber=void 0);return-1===t._currentStep?t._currentStep=0:++t._currentStep,i=t._introItems[t._currentStep],r=!0,v(t._introBeforeChangeCallback)?[4,t._introBeforeChangeCallback.call(t,i&&i.element,t._currentStep,t._direction)]:[3,2];case 1:r=o.sent(),o.label=2;case 2:return!1===r?(--t._currentStep,[2,!1]):t._introItems.length<=t._currentStep?v(t._introCompleteCallback)?[4,t._introCompleteCallback.call(t,t._currentStep,"end")]:[3,4]:[3,6];case 3:o.sent(),o.label=4;case 4:return[4,et(t,t._targetElement)];case 5:return o.sent(),[2,!1];case 6:return[4,$(t,i)];case 7:return o.sent(),[2,!0];}});});}function F(t){return a(this,void 0,void 0,function(){var n,i;return u(this,function(r){switch(r.label){case 0:return t._direction="backward",t._currentStep<=0?[2,!1]:(--t._currentStep,n=t._introItems[t._currentStep],i=!0,v(t._introBeforeChangeCallback)?[4,t._introBeforeChangeCallback.call(t,n&&n.element,t._currentStep,t._direction)]:[3,2]);case 1:i=r.sent(),r.label=2;case 2:return!1===i?(++t._currentStep,[2,!1]):[4,$(t,n)];case 3:return r.sent(),[2,!0];}});});}function G(t,n){return a(this,void 0,void 0,function(){var i,r;return u(this,function(o){switch(o.label){case 0:return null===(i=void 0===n.code?n.which:n.code)&&(i=null===n.charCode?n.keyCode:n.charCode),"Escape"!==i&&27!==i||!0!==t._options.exitOnEsc?[3,2]:[4,et(t,t._targetElement)];case 1:return o.sent(),[3,16];case 2:return"ArrowLeft"!==i&&37!==i?[3,4]:[4,F(t)];case 3:return o.sent(),[3,16];case 4:return"ArrowRight"!==i&&39!==i?[3,6]:[4,D(t)];case 5:return o.sent(),[3,16];case 6:return"Enter"!==i&&"NumpadEnter"!==i&&13!==i?[3,16]:(r=n.target||n.srcElement)&&r.className.match("introjs-prevbutton")?[4,F(t)]:[3,8];case 7:return o.sent(),[3,15];case 8:return r&&r.className.match("introjs-skipbutton")?t._introItems.length-1===t._currentStep&&v(t._introCompleteCallback)?[4,t._introCompleteCallback.call(t,t._currentStep,"skip")]:[3,10]:[3,12];case 9:o.sent(),o.label=10;case 10:return[4,et(t,t._targetElement)];case 11:return o.sent(),[3,15];case 12:return r&&r.getAttribute("data-step-number")?(r.click(),[3,15]):[3,13];case 13:return[4,D(t)];case 14:o.sent(),o.label=15;case 15:n.preventDefault?n.preventDefault():n.returnValue=!1,o.label=16;case 16:return[2];}});});}function M(t){if(null===t||"object"!==s(t)||"nodeType"in t)return t;var n={};for(var i in t)"jQuery"in window&&t[i]instanceof window.jQuery?n[i]=t[i]:n[i]=M(t[i]);return n;}function V(t){var n=document.querySelector(".introjs-hints");return n?Array.from(n.querySelectorAll(t)):[];}function _(t,n){return a(this,void 0,void 0,function(){var i;return u(this,function(r){switch(r.label){case 0:return i=V('.introjs-hint[data-step="'.concat(n,'"]'))[0],X(),i&&p(i,"introjs-hidehint"),v(t._hintCloseCallback)?[4,t._hintCloseCallback.call(t,n)]:[3,2];case 1:r.sent(),r.label=2;case 2:return[2];}});});}function H(t){return a(this,void 0,void 0,function(){var n,i,r,o,e;return u(this,function(s){switch(s.label){case 0:n=V(".introjs-hint"),i=0,r=n,s.label=1;case 1:return i<r.length?(o=r[i],(e=o.getAttribute("data-step"))?[4,_(t,parseInt(e,10))]:[3,3]):[3,4];case 2:s.sent(),s.label=3;case 3:return i++,[3,1];case 4:return[2];}});});}function Q(t){return a(this,void 0,void 0,function(){var n,i,r,o,e;return u(this,function(s){switch(s.label){case 0:if(!(n=V(".introjs-hint"))||!n.length)return[3,1];for(i=0,r=n;i<r.length;i++)o=r[i],(e=o.getAttribute("data-step"))&&Z(parseInt(e,10));return[3,3];case 1:return[4,Y(t,t._targetElement)];case 2:s.sent(),s.label=3;case 3:return[2];}});});}function Z(t){var n=V('.introjs-hint[data-step="'.concat(t,'"]'))[0];n&&k(n,/introjs-hidehint/g);}function q(t){var n=V('.introjs-hint[data-step="'.concat(t,'"]'))[0];n&&n.parentNode&&n.parentNode.removeChild(n);}function K(t){return a(this,void 0,void 0,function(){var n,i,r,o,e,s,a;return u(this,function(u){switch(u.label){case 0:for(null===(n=document.querySelector(".introjs-hints"))&&(n=C("div",{className:"introjs-hints"})),i=function i(n){return function(i){var r=i||window.event;r&&r.stopPropagation&&r.stopPropagation(),r&&null!==r.cancelBubble&&(r.cancelBubble=!0),W(t,n);};},r=0;r<t._hintItems.length;r++){if(o=t._hintItems[r],document.querySelector('.introjs-hint[data-step="'.concat(r,'"]')))return[2];g(e=C("a",{className:"introjs-hint"})),e.onclick=i(r),o.hintAnimation||p(e,"introjs-hint-no-anim"),y(o.element)&&p(e,"introjs-fixedhint"),s=C("div",{className:"introjs-hint-dot"}),a=C("div",{className:"introjs-hint-pulse"}),e.appendChild(s),e.appendChild(a),e.setAttribute("data-step",r.toString()),o.hintTargetElement=o.element,o.element=e,U(o.hintPosition,e,o.hintTargetElement),n.appendChild(e);}return document.body.appendChild(n),v(t._hintsAddedCallback)?[4,t._hintsAddedCallback.call(t)]:[3,2];case 1:u.sent(),u.label=2;case 2:return t._options.hintAutoRefreshInterval>=0&&(t._hintsAutoRefreshFunction=(c=function c(){return tt(t);},l=t._options.hintAutoRefreshInterval,function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];window.clearTimeout(d),d=window.setTimeout(function(){c();},l);}),h.on(window,"scroll",t._hintsAutoRefreshFunction,t,!0)),[2];}var c,l,d;});});}function U(t,n,i){if(void 0!==i){var r=x(i),o=20,e=20;switch(t){default:case"top-left":n.style.left="".concat(r.left,"px"),n.style.top="".concat(r.top,"px");break;case"top-right":n.style.left="".concat(r.left+r.width-o,"px"),n.style.top="".concat(r.top,"px");break;case"bottom-left":n.style.left="".concat(r.left,"px"),n.style.top="".concat(r.top+r.height-e,"px");break;case"bottom-right":n.style.left="".concat(r.left+r.width-o,"px"),n.style.top="".concat(r.top+r.height-e,"px");break;case"middle-left":n.style.left="".concat(r.left,"px"),n.style.top="".concat(r.top+(r.height-e)/2,"px");break;case"middle-right":n.style.left="".concat(r.left+r.width-o,"px"),n.style.top="".concat(r.top+(r.height-e)/2,"px");break;case"middle-middle":n.style.left="".concat(r.left+(r.width-o)/2,"px"),n.style.top="".concat(r.top+(r.height-e)/2,"px");break;case"bottom-middle":n.style.left="".concat(r.left+(r.width-o)/2,"px"),n.style.top="".concat(r.top+r.height-e,"px");break;case"top-middle":n.style.left="".concat(r.left+(r.width-o)/2,"px"),n.style.top="".concat(r.top,"px");}}}function W(t,n){return a(this,void 0,void 0,function(){var i,r,o,e,s,a,c,l,d,f,h;return u(this,function(u){switch(u.label){case 0:return i=document.querySelector('.introjs-hint[data-step="'.concat(n,'"]')),r=t._hintItems[n],v(t._hintClickCallback)?[4,t._hintClickCallback.call(t,i,r,n)]:[3,2];case 1:u.sent(),u.label=2;case 2:return void 0!==(o=X())&&parseInt(o,10)===n||(e=C("div",{className:"introjs-tooltip"}),s=C("div"),a=C("div"),c=C("div"),e.onclick=function(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0;},s.className="introjs-tooltiptext",(l=C("p")).innerHTML=r.hint||"",s.appendChild(l),t._options.hintShowButton&&((d=C("a")).className=t._options.buttonClass,d.setAttribute("role","button"),d.innerHTML=t._options.hintButtonLabel,d.onclick=function(){return _(t,n);},s.appendChild(d)),a.className="introjs-arrow",e.appendChild(a),e.appendChild(s),f=i.getAttribute("data-step")||"",t._currentStep=parseInt(f,10),h=t._hintItems[t._currentStep],c.className="introjs-tooltipReferenceLayer introjs-hintReference",c.setAttribute("data-step",f),N(t,h,c),c.appendChild(e),document.body.appendChild(c),P(t,h,e,a,!0)),[2];}});});}function X(){var t=document.querySelector(".introjs-hintReference");if(t&&t.parentNode){var n=t.getAttribute("data-step");if(!n)return;return t.parentNode.removeChild(t),n;}}function Y(t,n){return a(this,void 0,void 0,function(){var i,r,o,e,s,a,c,l,d,f;return u(this,function(u){switch(u.label){case 0:if(t._hintItems=[],t._options.hints&&t._options.hints.length>0)for(i=0,r=t._options.hints;i<r.length;i++)o=r[i],"string"==typeof(e=M(o)).element&&(e.element=document.querySelector(e.element)),e.hintPosition=e.hintPosition||t._options.hintPosition,e.hintAnimation=e.hintAnimation||t._options.hintAnimation,null!==e.element&&t._hintItems.push(e);else{if(!(s=Array.from(n.querySelectorAll("*[data-hint]")))||!s.length)return[2,!1];for(a=0,c=s;a<c.length;a++)l=c[a],d=l.getAttribute("data-hint-animation"),f=t._options.hintAnimation,d&&(f="true"===d),t._hintItems.push({element:l,hint:l.getAttribute("data-hint")||"",hintPosition:l.getAttribute("data-hint-position")||t._options.hintPosition,hintAnimation:f,tooltipClass:l.getAttribute("data-tooltip-class")||void 0,position:l.getAttribute("data-position")||t._options.tooltipPosition});}return[4,K(t)];case 1:return u.sent(),h.on(document,"click",X,t,!1),h.on(window,"resize",tt,t,!0),[2,!0];}});});}function tt(t){for(var n=0,i=t._hintItems;n<i.length;n++){var r=i[n],o=r.hintTargetElement;U(r.hintPosition,r.element,o);}}function nt(t,n){var i=Array.from(n.querySelectorAll("*[data-intro]")),r=[];if(t._options.steps&&t._options.steps.length)for(var o=0,e=t._options.steps;o<e.length;o++){var s=M(f=e[o]);if(s.step=r.length+1,s.title=s.title||"","string"==typeof s.element&&(s.element=document.querySelector(s.element)||void 0),void 0===s.element||null===s.element){var a=document.querySelector(".introjsFloatingElement");null===a&&(a=C("div",{className:"introjsFloatingElement"}),document.body.appendChild(a)),s.element=a,s.position="floating";}s.position=s.position||t._options.tooltipPosition,s.scrollTo=s.scrollTo||t._options.scrollTo,void 0===s.disableInteraction&&(s.disableInteraction=t._options.disableInteraction),null!==s.element&&r.push(s);}else{var u=void 0;if(i.length<1)return[];for(var c=0,l=i;c<l.length;c++){var d=l[c];if((!t._options.group||d.getAttribute("data-intro-group")===t._options.group)&&"none"!==d.style.display){var f=parseInt(d.getAttribute("data-step")||"",10);u=t._options.disableInteraction,d.hasAttribute("data-disable-interaction")&&(u=!!d.getAttribute("data-disable-interaction")),f>0&&(r[f-1]={step:f,element:d,title:d.getAttribute("data-title")||"",intro:d.getAttribute("data-intro")||"",tooltipClass:d.getAttribute("data-tooltip-class")||void 0,highlightClass:d.getAttribute("data-highlight-class")||void 0,position:d.getAttribute("data-position")||t._options.tooltipPosition,scrollTo:d.getAttribute("data-scroll-to")||t._options.scrollTo,disableInteraction:u});}}for(var h=0,v=0,p=i;v<p.length;v++)if(d=p[v],(!t._options.group||d.getAttribute("data-intro-group")===t._options.group)&&null===d.getAttribute("data-step")){for(;void 0!==r[h];)h++;u=d.hasAttribute("data-disable-interaction")?!!d.getAttribute("data-disable-interaction"):t._options.disableInteraction,r[h]={element:d,title:d.getAttribute("data-title")||"",intro:d.getAttribute("data-intro")||"",step:h+1,tooltipClass:d.getAttribute("data-tooltip-class")||void 0,highlightClass:d.getAttribute("data-highlight-class")||void 0,position:d.getAttribute("data-position")||t._options.tooltipPosition,scrollTo:d.getAttribute("data-scroll-to")||t._options.scrollTo,disableInteraction:u};}}for(var w=[],m=0;m<r.length;m++)r[m]&&w.push(r[m]);return(r=w).sort(function(t,n){return t.step-n.step;}),r;}function it(t,n){var i=t._currentStep;if(null!=i&&-1!=i){var r=t._introItems[i],o=document.querySelector(".introjs-tooltipReferenceLayer"),e=document.querySelector(".introjs-helperLayer"),s=document.querySelector(".introjs-disableInteraction");N(t,r,e),N(t,r,o),N(t,r,s),n&&(t._introItems=nt(t,t._targetElement),function(t,n){if(t._options.showBullets){var i=document.querySelector(".introjs-bullets");i&&i.parentNode&&i.parentNode.replaceChild(B(t,n),i);}}(t,r),R(o,i,t._introItems.length));var a=document.querySelector(".introjs-arrow"),u=document.querySelector(".introjs-tooltip");return u&&a&&P(t,t._introItems[i],u,a),tt(t),t;}}function rt(t){it(t);}function ot(t,n){if(void 0===n&&(n=!1),t&&t.parentElement){var i=t.parentElement;n?(E(t,{opacity:"0"}),window.setTimeout(function(){try{i.removeChild(t);}catch(t){}},500)):i.removeChild(t);}}function et(t,n,i){return void 0===i&&(i=!1),a(this,void 0,void 0,function(){var r,o,e,s;return u(this,function(a){switch(a.label){case 0:return r=!0,void 0===t._introBeforeExitCallback?[3,2]:[4,t._introBeforeExitCallback.call(t,n)];case 1:r=a.sent(),a.label=2;case 2:if(!i&&!1===r)return[2];if((o=Array.from(n.querySelectorAll(".introjs-overlay")))&&o.length)for(e=0,s=o;e<s.length;e++)ot(s[e]);return ot(n.querySelector(".introjs-helperLayer"),!0),ot(n.querySelector(".introjs-tooltipReferenceLayer")),ot(n.querySelector(".introjs-disableInteraction")),ot(document.querySelector(".introjsFloatingElement")),I(),h.off(window,"keydown",G,t,!0),h.off(window,"resize",rt,t,!0),v(t._introExitCallback)?[4,t._introExitCallback.call(t)]:[3,4];case 3:a.sent(),a.label=4;case 4:return t._currentStep=-1,[2];}});});}function st(t,n){return a(this,void 0,void 0,function(){var i;return u(this,function(r){switch(r.label){case 0:return t.isActive()?v(t._introStartCallback)?[4,t._introStartCallback.call(t,n)]:[3,2]:[2,!1];case 1:r.sent(),r.label=2;case 2:return 0===(i=nt(t,n)).length?[2,!1]:(t._introItems=i,function(t,n){var i=this,r=C("div",{className:"introjs-overlay"});E(r,{top:0,bottom:0,left:0,right:0,position:"fixed"}),n.appendChild(r),!0===t._options.exitOnOverlayClick&&(E(r,{cursor:"pointer"}),r.onclick=function(){return a(i,void 0,void 0,function(){return u(this,function(i){switch(i.label){case 0:return[4,et(t,n)];case 1:return i.sent(),[2];}});});});}(t,n),[4,D(t)]);case 3:r.sent(),n.addEventListener,t._options.keyboardNavigation&&h.on(window,"keydown",G,t,!0),h.on(window,"resize",rt,t,!0),r.label=4;case 4:return[2,!1];}});});}function at(t,n,i){return t[n]=i,t;}return{setters:[function(_tslib){t=_tslib.__decorate;},function(_lit){n=_lit.LitElement;i=_lit.html;},function(_litDecoratorsJs){r=_litDecoratorsJs.property;o=_litDecoratorsJs.customElement;},function(_nileTourCssCjsJs){e=_nileTourCssCjsJs.s;},function(_litElement001CjsJs){},function(_cssTag002CjsJs){}],execute:function execute(){"function"==typeof SuppressedError&&SuppressedError;f=(d={},function(t,n){return void 0===n&&(n="introjs-stamp"),d[n]=d[n]||0,void 0===t[n]&&(t[n]=d[n]++),t[n];});h=new(function(){function t(){this.events_key="introjs_event";}return t.prototype._id=function(t,n,i){return t+f(n)+(i?"_".concat(f(i)):"");},t.prototype.on=function(t,n,i,r,o){var e=this._id(n,i,r),s=function s(n){return i(r||t,n||window.event);};"addEventListener"in t?t.addEventListener(n,s,o):"attachEvent"in t&&t.attachEvent("on".concat(n),s),t[this.events_key]=t[this.events_key]||{},t[this.events_key][e]=s;},t.prototype.off=function(t,n,i,r,o){var e=this._id(n,i,r),s=t[this.events_key]&&t[this.events_key][e];s&&("removeEventListener"in t?t.removeEventListener(n,s,o):"detachEvent"in t&&t.detachEvent("on".concat(n),s),t[this.events_key][e]=null);},t;}())();v=function v(t){return"function"==typeof t;};ut=function(){function t(t){this._currentStep=-1,this._introItems=[],this._hintItems=[],this._targetElement=t,this._options={steps:[],hints:[],isActive:!0,nextLabel:"Next",prevLabel:"Back",skipLabel:"×",doneLabel:"Done",hidePrev:!1,hideNext:!1,nextToDone:!0,tooltipPosition:"bottom",tooltipClass:"",group:"",highlightClass:"",exitOnEsc:!0,exitOnOverlayClick:!0,showStepNumbers:!1,stepNumbersOfLabel:"of",keyboardNavigation:!0,showButtons:!0,showBullets:!0,showProgress:!1,scrollToElement:!0,scrollTo:"element",scrollPadding:30,overlayOpacity:.5,autoPosition:!0,positionPrecedence:["bottom","top","right","left"],disableInteraction:!1,dontShowAgain:!1,dontShowAgainLabel:"Don't show this again",dontShowAgainCookie:"introjs-dontShowAgain",dontShowAgainCookieDays:365,helperElementPadding:10,hintPosition:"top-middle",hintButtonLabel:"Got it",hintShowButton:!0,hintAutoRefreshInterval:10,hintAnimation:!0,buttonClass:"introjs-button",progressBarAdditionalClass:!1};}return t.prototype.isActive=function(){return(!this._options.dontShowAgain||""===(t=l(this._options.dontShowAgainCookie))||"true"!==t)&&this._options.isActive;var t;},t.prototype.clone=function(){return new t(this._targetElement);},t.prototype.setOption=function(t,n){return this._options=at(this._options,t,n),this;},t.prototype.setOptions=function(t){return this._options=function(t,n){for(var i=0,r=Object.entries(n);i<r.length;i++){var o=r[i];t=at(t,o[0],o[1]);}return t;}(this._options,t),this;},t.prototype.start=function(){return a(this,void 0,void 0,function(){return u(this,function(t){switch(t.label){case 0:return[4,st(this,this._targetElement)];case 1:return t.sent(),[2,this];}});});},t.prototype.goToStep=function(t){return a(this,void 0,void 0,function(){return u(this,function(n){switch(n.label){case 0:return[4,J(this,t)];case 1:return n.sent(),[2,this];}});});},t.prototype.addStep=function(t){return this._options.steps||(this._options.steps=[]),this._options.steps.push(t),this;},t.prototype.addSteps=function(t){if(!t.length)return this;for(var n=0;n<t.length;n++)this.addStep(t[n]);return this;},t.prototype.goToStepNumber=function(t){return a(this,void 0,void 0,function(){return u(this,function(n){switch(n.label){case 0:return[4,z(this,t)];case 1:return n.sent(),[2,this];}});});},t.prototype.nextStep=function(){return a(this,void 0,void 0,function(){return u(this,function(t){switch(t.label){case 0:return[4,D(this)];case 1:return t.sent(),[2,this];}});});},t.prototype.previousStep=function(){return a(this,void 0,void 0,function(){return u(this,function(t){switch(t.label){case 0:return[4,F(this)];case 1:return t.sent(),[2,this];}});});},t.prototype.currentStep=function(){return this._currentStep;},t.prototype.exit=function(t){return a(this,void 0,void 0,function(){return u(this,function(n){switch(n.label){case 0:return[4,et(this,this._targetElement,t)];case 1:return n.sent(),[2,this];}});});},t.prototype.refresh=function(t){return it(this,t),this;},t.prototype.setDontShowAgain=function(t){return function(t,n){n?c(t._options.dontShowAgainCookie,"true",t._options.dontShowAgainCookieDays):c(t._options.dontShowAgainCookie,"",-1);}(this,t),this;},t.prototype.onbeforechange=function(t){if(!v(t))throw new Error("Provided callback for onbeforechange was not a function");return this._introBeforeChangeCallback=t,this;},t.prototype.onchange=function(t){if(!v(t))throw new Error("Provided callback for onchange was not a function.");return this._introChangeCallback=t,this;},t.prototype.onafterchange=function(t){if(!v(t))throw new Error("Provided callback for onafterchange was not a function");return this._introAfterChangeCallback=t,this;},t.prototype.oncomplete=function(t){if(!v(t))throw new Error("Provided callback for oncomplete was not a function.");return this._introCompleteCallback=t,this;},t.prototype.onhintsadded=function(t){if(!v(t))throw new Error("Provided callback for onhintsadded was not a function.");return this._hintsAddedCallback=t,this;},t.prototype.onhintclick=function(t){if(!v(t))throw new Error("Provided callback for onhintclick was not a function.");return this._hintClickCallback=t,this;},t.prototype.onhintclose=function(t){if(!v(t))throw new Error("Provided callback for onhintclose was not a function.");return this._hintCloseCallback=t,this;},t.prototype.onstart=function(t){if(!v(t))throw new Error("Provided callback for onstart was not a function.");return this._introStartCallback=t,this;},t.prototype.onexit=function(t){if(!v(t))throw new Error("Provided callback for onexit was not a function.");return this._introExitCallback=t,this;},t.prototype.onskip=function(t){if(!v(t))throw new Error("Provided callback for onskip was not a function.");return this._introSkipCallback=t,this;},t.prototype.onbeforeexit=function(t){if(!v(t))throw new Error("Provided callback for onbeforeexit was not a function.");return this._introBeforeExitCallback=t,this;},t.prototype.addHints=function(){return a(this,void 0,void 0,function(){return u(this,function(t){switch(t.label){case 0:return[4,Y(this,this._targetElement)];case 1:return t.sent(),[2,this];}});});},t.prototype.hideHint=function(t){return a(this,void 0,void 0,function(){return u(this,function(n){switch(n.label){case 0:return[4,_(this,t)];case 1:return n.sent(),[2,this];}});});},t.prototype.hideHints=function(){return a(this,void 0,void 0,function(){return u(this,function(t){switch(t.label){case 0:return[4,H(this)];case 1:return t.sent(),[2,this];}});});},t.prototype.showHint=function(t){return Z(t),this;},t.prototype.showHints=function(){return a(this,void 0,void 0,function(){return u(this,function(t){switch(t.label){case 0:return[4,Q(this)];case 1:return t.sent(),[2,this];}});});},t.prototype.removeHints=function(){return function(t){for(var n=0,i=V(".introjs-hint");n<i.length;n++){var r=i[n].getAttribute("data-step");r&&q(parseInt(r,10));}h.off(document,"click",X,t,!1),h.off(window,"resize",tt,t,!0),t._hintsAutoRefreshFunction&&h.off(window,"scroll",t._hintsAutoRefreshFunction,t,!0);}(this),this;},t.prototype.removeHint=function(t){return q(t),this;},t.prototype.showHintDialog=function(t){return a(this,void 0,void 0,function(){return u(this,function(n){switch(n.label){case 0:return[4,W(this,t)];case 1:return n.sent(),[2,this];}});});},t;}();ct=function t(n){var i;if("object"===s(n))i=new ut(n);else if("string"==typeof n){var r=document.querySelector(n);if(!r)throw new Error("There is no element with given selector.");i=new ut(r);}else i=new ut(document.body);return t.instances[f(i,"introjs-instance")]=i,i;};ct.version="7.2.0",ct.instances={};_export("N",lt=/*#__PURE__*/function(_n){function lt(){var _this;_classCallCheck(this,lt);_this=_callSuper(this,lt),_this.tourInstance=null,_this.steps=[],_this.stepsJson="",_this.showBackdrop=!1,_this.disableInteraction=!1;return _this;}_inherits(lt,_n);return _createClass(lt,[{key:"createRenderRoot",value:function createRenderRoot(){return this;}},{key:"updated",value:function updated(t){t.has("stepsJson")&&this.parseStepsJson(),_get(_getPrototypeOf(lt.prototype),"updated",this).call(this,t);}},{key:"parseStepsJson",value:function parseStepsJson(){if(this.stepsJson)try{var _t=JSON.parse(this.stepsJson);Array.isArray(_t)?this.steps=_t:console.error("Invalid JSON: Expected an array");}catch(t){console.error("Failed to parse stepsJson:",t);}}},{key:"startTour",value:function startTour(){var _this2=this;console.log("start of tour");var t=this.steps.map(function(t){return{element:document.querySelector("[data-tour=\"".concat(t.element,"\"]")),intro:t.content,title:t.title,position:t.position,beforeChange:t.beforeChange,afterChange:t.afterChange};});this.tourInstance=ct().setOptions({steps:t,nextLabel:"Next",prevLabel:"Prev",overlayOpacity:0,disableInteraction:this.disableInteraction,showButtons:!0,showStepNumbers:!1,exitOnOverlayClick:!1}),this.tourInstance.onbeforechange(/*#__PURE__*/function(){var _ref=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(t){var _this2$tourInstance$_,_this2$tourInstance;var n,i;return _regeneratorRuntime().wrap(function _callee$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:n=(_this2$tourInstance$_=(_this2$tourInstance=_this2.tourInstance)===null||_this2$tourInstance===void 0?void 0:_this2$tourInstance._currentStep)!==null&&_this2$tourInstance$_!==void 0?_this2$tourInstance$_:0,i=_this2.steps[n];if(!(i!==null&&i!==void 0&&i.beforeChange)){_context2.next=6;break;}_context2.next=4;return i.beforeChange();case 4:if(_context2.sent){_context2.next=6;break;}return _context2.abrupt("return",(_this2.shakeTooltip(),!1));case 6:return _context2.abrupt("return",!0);case 7:case"end":return _context2.stop();}},_callee);}));return function(_x){return _ref.apply(this,arguments);};}()),this.tourInstance.onafterchange(function(t){var _this2$tourInstance$_2,_this2$tourInstance2;var n=(_this2$tourInstance$_2=(_this2$tourInstance2=_this2.tourInstance)===null||_this2$tourInstance2===void 0?void 0:_this2$tourInstance2._currentStep)!==null&&_this2$tourInstance$_2!==void 0?_this2$tourInstance$_2:0,i=_this2.steps[n];(i===null||i===void 0?void 0:i.afterChange)&&i.afterChange();}),this.tourInstance.onchange(function(t){var _this2$tourInstance$_3,_this2$tourInstance3;var n=(_this2$tourInstance$_3=(_this2$tourInstance3=_this2.tourInstance)===null||_this2$tourInstance3===void 0?void 0:_this2$tourInstance3._currentStep)!==null&&_this2$tourInstance$_3!==void 0?_this2$tourInstance$_3:0,i=_this2.steps.length,r=document.querySelector(".introjs-tooltip");if(r){var _t2=r.querySelector(".introjs-tooltipbuttons");if(_t2){var _r=_t2.querySelector(".introjs-step-counter");_r||(_r=document.createElement("div"),_r.className="introjs-step-counter",_t2.insertBefore(_r,_t2.firstChild)),_r.textContent="".concat(n+1," of ").concat(i);}}}),this.tourInstance.start().then(function(){var _this2$tourInstance$_4,_this2$tourInstance4;var t=(_this2$tourInstance$_4=(_this2$tourInstance4=_this2.tourInstance)===null||_this2$tourInstance4===void 0?void 0:_this2$tourInstance4._currentStep)!==null&&_this2$tourInstance$_4!==void 0?_this2$tourInstance$_4:0,n=_this2.steps.length,i=document.querySelector(".introjs-tooltip");if(i){var _r2=i.querySelector(".introjs-tooltipbuttons");if(_r2){var _i=_r2.querySelector(".introjs-step-counter");_i||(_i=document.createElement("div"),_i.className="introjs-step-counter",_r2.insertBefore(_i,_r2.firstChild)),_i.textContent="".concat(t+1," of ").concat(n);}}})["catch"](function(t){console.error("Error starting the tour:",t);});}},{key:"shakeTooltip",value:function shakeTooltip(){var t=document.querySelector(".introjs-tooltip");t&&(t.classList.add("introjs-shake"),setTimeout(function(){t.classList.remove("introjs-shake");},1500));}},{key:"render",value:function render(){return i(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <style>\n ","\n </style>\n <slot></slot>\n "])),e.cssText);}}],[{key:"styles",get:function get(){return[e];}}]);}(n));t([r({type:Array})],lt.prototype,"steps",void 0),t([r({type:String})],lt.prototype,"stepsJson",void 0),t([r({type:Boolean})],lt.prototype,"showBackdrop",void 0),t([r({type:Boolean})],lt.prototype,"disableInteraction",void 0),_export("N",lt=t([o("nile-tour")],lt));}};});
10
10
  //# sourceMappingURL=nile-tour.cjs.js.map