@smart-webcomponents-angular/passwordtextbox 13.0.10 → 15.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
 
2
- /* Smart UI v13.0.10 (2022-02-21)
3
- Copyright (c) 2011-2021 jQWidgets.
2
+ /* Smart UI v15.0.2 (2023-01-24)
3
+ Copyright (c) 2011-2023 jQWidgets.
4
4
  License: https://htmlelements.com/license/ */ //
5
5
 
6
- Smart("smart-input",class extends Smart.BaseElement{static get properties(){return{autoCompleteDelay:{value:100,type:"number"},dataSource:{type:"any",value:[],reflectToAttribute:!1},dropDownClassList:{value:[],type:"array",reflectToAttribute:!1},dropDownDataSource:{type:"any",value:[]},dropDownHeight:{type:"any",value:200},dropDownOpenMode:{allowedValues:["default","manual"],value:"default",type:"string"},dropDownWidth:{type:"any",value:null},dropDownButtonPosition:{allowedValues:["none","left","right"],value:"none",type:"string"},dropDownOpenPosition:{allowedValues:["bottom","top"],value:"bottom",type:"string"},hint:{type:"string",value:""},inputPurpose:{type:"string",value:"off"},items:{type:"number",value:8},minLength:{type:"number",value:1},name:{value:"",type:"string"},opened:{value:!1,type:"boolean"},query:{type:"string",value:""},queryMode:{allowedValues:["contains","containsIgnoreCase","doesNotContain","doesNotContainIgnoreCase","equals","equalsIgnoreCase","startsWith","startsWithIgnoreCase","endsWith","endsWithIgnoreCase"],type:"string",value:"containsIgnoreCase"},placeholder:{value:"",type:"string"},readonly:{type:"boolean",value:!1},sorted:{value:!1,type:"boolean"},sortDirection:{value:"asc",type:"string"},selectedIndex:{type:"number",value:-1},selectedValues:{value:[],type:"array"},type:{type:"string"},value:{type:"string",value:""}}}static get styleUrls(){return["smart.textbox.css"]}template(){return'<div id="inputContainer" role="presentation"><input class="smart-input" id=\'input\' readonly=\'[[readonly]]\' placeholder=\'[[placeholder]]\' type=\'[[type]]\' name=\'[[name]]\' value=\'{{value::keyup}}\' disabled=\'[[disabled]]\' aria-label="[[placeholder]]" /><span class="smart-hidden smart-hint" id="span">[[hint]]</span><div id="dropDownButton" tabindex=-1 class="smart-drop-down-button" role="button" aria-label="Toggle popup"><div id="arrow" class="arrow" aria-hidden="true"></div></div></div>'}static get listeners(){return{"input.focus":"_focusHandler","input.blur":"_blurHandler","input.keydown":"_keyDownHandler","input.keyup":"_keyUpHandler","input.keypress":"_keyPressHandler","input.paste":"_pasteHandler","dropDownButton.down":"_dropDownButtonDownHandler","inputContainer.down":"_downHandler","document.up":"_documentUpHandler"}}get selectedIndexes(){return this.isCompleted?[this.selectedIndex]:[]}set selectedIndexes(e){this.isCompleted&&(e&&void 0!==e[0]?this.selectedIndex=e[0]:this.selectedIndex=-1)}focus(){this.$.input.focus()}select(){const e=this;e.readonly?e.$.input.focus():e.$.input.select()}_documentUpHandler(e){const t=this,o=t.shadowRoot||t.isInShadowDOM?e.originalEvent.composedPath()[0]:e.originalEvent.target;o!==t&&o!==t.$.dropDownButton&&o!==t.$.input&&o!==t.$.arrow?t.$.scrollView.contains(o.shadowParent||o)?t._isPointerDown&&(t._isPointerDown=!1,t.opened&&(t._preventLookup=!0),t.$.input.focus()):(t.opened&&(t._preventLookup=!0),"manual"===t.dropDownOpenMode||t._isPointerDown||t.close(),t._isPointerDown=!1):t._isPointerDown=!1}_focusHandler(){const e=this;e.setAttribute("focus",""),e.readonly||0!==e.minLength||0!==e.$.input.value.length||e._preventLookup?(e.$.fireEvent("focus"),delete e._preventLookup):e._lookup()}_blurHandler(){const e=this;e.opened||e.removeAttribute("focus"),e.opened||e.$.fireEvent("blur"),e._refreshSelectedIndex(),delete e._preventLookup}_pasteHandler(e){const t=this,o=t.$.input,r=o.value,n=o.selectionStart,a=o.selectionEnd;if(!e.clipboardData&&!window.clipboardData)return;const l=(e.clipboardData||window.clipboardData).getData("text");let s=r.slice(0,n)+l,i=s.length;s+=r.slice(a),e.preventDefault(),t.set("value",s),t.setAttribute("data-value",s),o.setSelectionRange(i,i),t._refreshSelectedIndex()}_refreshSelectedIndex(){const e=this;let t=e.dataSource;if(t){let o=-1;if(e.dataSource instanceof Promise)return;if("function"==typeof e.dataSource)return;"string"==typeof t&&(t=e.$.deserialize(t,"array"));for(let r=0;r<t.length;r++){let n=t[r];if("number"!=typeof n&&"boolean"!=typeof n||(n=""+n),"string"==typeof n){if(n===e.value){o=r;break}}else if(n&&n.label===e.value){o=r;break}}e.set("selectedIndex",o,!1),-1===e.selectedIndex&&(e.$.input.dataValue=null)}}selectItem(e){const t=this;let o=t.dataSource;if("string"==typeof o&&(o=t.$.deserialize(o,"array")),o)for(let r=0;r<o.length;r++){const n=o[r];if(t.set("selectedIndex",-1),t.set("value",""),t.$.input.dataValue=null,"string"==typeof n){if(n===e)return t.set("selectedIndex",r,!1),t.set("value",t.$.input.dataValue=e),void t.setAttribute("data-value",t.$.input.dataValue)}else if(n.value===e)return t.set("selectedIndex",r,!1),t.set("value",n.label),t.$.input.dataValue=e,void t.setAttribute("data-value",t.$.input.dataValue)}else t.set("value",t.$.input.dataValue=e),t.setAttribute("data-value",t.$.input.dataValue),t.set("selectedIndex",-1,!1)}getItem(e){const t=this;if(t.dataSource)for(let o=0;o<t.dataSource.length;o++){const r=t.dataSource[o];if(r.value===e)return r}return null}getPrevItem(){const e=this,t=e.getSelectedItem();if(e.dataSource&&t)for(let o=0;o<e.dataSource.length;o++)if(e.dataSource[o].value===t.value)return e.dataSource[o-1];return null}getNextItem(){const e=this,t=e.getSelectedItem();if(e.dataSource&&t)for(let o=0;o<e.dataSource.length;o++)if(e.dataSource[o].value===t.value)return e.dataSource[o+1];return null}getSelectedItem(){const e=this;return{label:e.value,value:void 0!==e.$.input.dataValue?e.$.input.dataValue:e.value}}_refreshMenu(){const e=this;e.$.menu.classList.remove("scroll"),e.$.scrollView.computedVerticalScrollBarVisibility&&e.$.menu.classList.add("scroll")}_performSelect(){const e=this,t=e.$.menu.querySelector(".active"),o=t.getAttribute("data-label"),r=t.dataValue,n=e.value,a=e.$.input.dataValue;e.set("value",o),e.$.input.dataValue=r,e.setAttribute("data-value",r),e.set("selectedIndex",t.index),e.set("selectedValues",[e.$.input.dataValue]),e.close(),o===n&&r===a||e.$.fireEvent("change",{value:r,label:o,oldValue:a,oldLabel:n})}_open(){const e=this;if(e.opened)return;const t=window.scrollX,o=window.scrollY;let r=e.getBoundingClientRect(),n=0,a=0;if(e.timer&&clearTimeout(e.timer),e.getRootNode()&&e.getRootNode().host?e.getRootNode().host.shadowRoot.appendChild(e.$.scrollView):document.body.appendChild(e.$.scrollView),e.setAttribute("aria-owns",e.$.scrollView.id),e.readonly||e.$.input.setAttribute("aria-controls",e.$.scrollView.id),e.$.scrollView.enableShadowDOM&&!e._importedStyle&&(e.$.scrollView.importStyle(e._getStyleUrl("smart.textbox.css")),e._importedStyle=!0),"static"!==getComputedStyle(document.body).position){const e=document.body.getBoundingClientRect();n=e.left,a=e.top}e.$.scrollView.style.setProperty("--smart-input-drop-down-menu-width",""),e.$.scrollView.style.left=-3+r.left+t-n+"px",e.$.scrollView.classList.remove("open"),"bottom"===e.dropDownOpenPosition?e.$.scrollView.style.top=r.bottom+o-a+1+"px":e.$.scrollView.style.top=r.top-e.$.scrollView.offsetHeight+o-a+1+"px",e.opening=!0,e._positionTimer&&clearInterval(e._positionTimer),e._positionTimer=setInterval((()=>{const t=e.getBoundingClientRect();if(e.opening)e.opening=!1,r=t;else if(Math.abs(parseInt(t.top)-parseInt(r.top))>=10||Math.abs(parseInt(t.left)-parseInt(r.left))>=10){const o=window.scrollX,r=window.scrollY;return e.$.scrollView.style.left=-3+t.left+o-n+"px",void("bottom"===e.dropDownOpenPosition?e.$.scrollView.style.top=t.bottom+r-a+1+"px":e.$.scrollView.style.top=t.top-e.$.scrollView.offsetHeight+r-a+1+"px")}}),50),e.$.scrollView.onpointerdown=function(){e._isPointerDown=!0},requestAnimationFrame((function(){const t=e.dropDownWidth;if(e.$.scrollView.refresh&&e.$.scrollView.refresh(),e._refreshMenu(),e.$.scrollView.setAttribute("open",""),e.setAttribute("open",""),e.$.dropDownButton.setAttribute("open",""),e.$.input.setAttribute("open",""),t&&"string"==typeof t&&-1!==t.indexOf("%")){const o=parseFloat(t)/100;e.$.scrollView.style.setProperty("--smart-input-drop-down-menu-width",e.offsetWidth*o+"px")}else if("auto"!==t&&t)e.$.scrollView.style.setProperty("--smart-input-drop-down-menu-width",parseFloat(t)+"px");else if("auto"===t){if(e.$.scrollView.style.setProperty("--smart-input-drop-down-menu-width",""),e.$.scrollView.$.scrollViewerContainer.classList.contains("vscroll")){const t=e.$.scrollView.offsetWidth+parseFloat(getComputedStyle(e.$.scrollView).getPropertyValue("--smart-scroll-bar-size"));e.$.scrollView.style.setProperty("--smart-input-drop-down-menu-width",t+"px")}}else{e.$.menu.style.width="auto";let t=e.$.menu.offsetWidth;const o=e.$.menu.querySelectorAll("li");for(let t=0;t<o.length;t++)e._maxDropDownWidth=Math.max((o[t].firstElementChild||o[t]).offsetWidth,e._maxDropDownWidth);e.$.scrollView.computedVerticalScrollBarVisibility&&(t+=e.$.scrollView.$&&e.$.scrollView.$.verticalScrollBar?e.$.scrollView.$.verticalScrollBar.offsetWidth:30),e.$.scrollView.style.setProperty("--smart-input-drop-down-menu-width",Math.max(t,e.offsetWidth-8)+"px"),e.$.menu.style.width=""}(e.shadowRoot||e.isInShadowDOM)&&e.$.scrollView._scrollView&&Smart.ScrollBar&&requestAnimationFrame((()=>{e.$.scrollView._scrollView&&e.$.scrollView._scrollView.vScrollBar.refresh()}))})),e.$.scrollView.refresh&&e.$.scrollView.refresh(),e._refreshMenu(),e.set("opened",!0),e.setAttribute("aria-expanded",!0),e.$.fireEvent("open")}close(){const e=this;return!!e.opened&&(e.timer&&clearTimeout(e.timer),e.timer=setTimeout((function(){e.$.scrollView.parentNode&&!e.opened&&(e.$.scrollView.remove(),e.removeAttribute("aria-owns"),e.readonly||e.$.input.removeAttribute("aria-controls"))}),1e3),e._positionTimer&&clearInterval(e._positionTimer),e.$.scrollView.removeAttribute("open"),e.$.dropDownButton.removeAttribute("open"),e.$.input.removeAttribute("open"),e.removeAttribute("open"),e.set("opened",!1),e.setAttribute("aria-expanded",!1),e.$.input.focus(),e.$.fireEvent("close"),!0)}refresh(){const e=this;e.$.scrollView.refresh&&e.$.scrollView.refresh(),e.close()}_lookup(e){const t=this;if(t.query=t.$.input.value,t.$.input.readonly&&(t._incrementalSearchQuery||(t._incrementalSearchQuery=""),t._incrementalSearchQuery+=e.key,t._incrementalSearchTimer&&clearTimeout(t._incrementalSearchTimer),t.query=t._incrementalSearchQuery,t._incrementalSearchTimer=setTimeout((function(){t._incrementalSearchQuery=""}),700)),t.query.length<t.minLength)return void t.close();const o=function(e){clearTimeout(t._autoCompleteTimeout),t._autoCompleteTimeout=setTimeout((()=>{const o=t.context;t.context=t,t._process(e),t.context=o}),t.autoCompleteDelay)};"function"==typeof t.dataSource?t.dataSource(t.query,o):o(t.dataSource)}_downHandler(e){const t=this;t.readonly&&t._dropDownButtonDownHandler(e)}_dropDownButtonDownHandler(e){const t=this;return"manual"!==t.dropDownOpenMode&&t._toggle(),e.preventDefault(),e.stopPropagation(),e.originalEvent.preventDefault(),e.originalEvent.stopPropagation(),t._isPointerDown=!0,!1}_toggle(){const e=this;e.opened?e.close():e.open()}open(){const e=this;function t(t){e._process(t);const o=e.$.menu.querySelector(".active");if(o){const t=e.$.input.dataValue;for(let r=0;r<e.$.menu.children.length;r++){const n=e.$.menu.children[r],a=n.getAttribute("data-label"),l=n.dataValue;if(void 0!==t&&l===t||void 0===t&&a===e.$.input.value){o.classList.remove("active"),n.classList.add("active"),e._setActiveDescendant(n),e.$.input.dataValue=l,e.setAttribute("data-value",l);break}}}e.ensureVisible(),e.$.input.focus(),setTimeout((function(){e.$.input.focus()}),25)}e.dropDownDataSource&&(Array.isArray(e.dropDownDataSource)&&e.dropDownDataSource.length>0||"function"==typeof e.dropDownDataSource)?(e.query="","function"==typeof e.dropDownDataSource?e.dropDownDataSource(e.query,t):t(e.dropDownDataSource)):(e.query="","function"==typeof e.dataSource?e.dataSource(e.query,t):t(e.dataSource))}_process(e){const t=this;"string"==typeof e&&(e=t.$.deserialize(e,"array")),e=t.readonly?e.filter((function(){return!0})):e.filter((function(e){return""===e||(t.matcher?t.matcher(e):t._matcher(e))})),e=t._sorter(e),t.sorted&&(e.sort(((e,t)=>void 0!==e.label?e.label.localeCompare(t.label):e.localeCompare(t))),"desc"===t.sortDirection&&e.reverse()),!e.length&&t.opened&&t.close(),0===e.length&&!0!==t.allowItemsAdd||(t.query.length>0?t._render(e.slice(0,t.items)):t._render(e),t._open(),t.$.scrollView.refresh&&t.$.scrollView.refresh(),t._refreshMenu(),t.ensureVisible())}_matcher(e){const t=this.query;switch(null===e&&(e="null"),e=""+(e=e.label||e),this.queryMode){case"startsWith":return e.startsWith(t);case"startsWithIgnoreCase":return e.toLowerCase().startsWith(t.toLowerCase());case"doesNotContain":return e.indexOf(t)<0;case"doesNotContainIgnoreCase":return e.toLowerCase().indexOf(t.toLowerCase())<0;case"contains":return e.indexOf(t)>-1;default:case"containsIgnoreCase":return~e.toLowerCase().indexOf(t.toLowerCase());case"equals":return 0===e.localeCompare(t);case"equalsIgnoreCase":return 0===e.toLowerCase().localeCompare(t.toLowerCase());case"endsWith":return e.endsWith(t);case"endsWithIgnoreCase":return e.toLowerCase().endsWith(t.toLowerCase())}}_sorter(e){const t=this;let o,r=[],n=[],a=[];if(e&&""===e[0])return e;for(;o=e.shift();){let e=o.label||o;e=""+e,e.toLowerCase().indexOf(t.query.toLowerCase())?~e.indexOf(t.query)?n.push(o):a.push(o):r.push(o)}return r.concat(n,a)}_highlighter(e){const t=this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&");return e.replace(new RegExp("("+t+")","ig"),(function(e,t){return"<strong>"+t+"</strong>"}))}_render(e){const t=this;let o=0;const r=e.map((function(e){let r=e,n=e;"object"==typeof e&&(r=e.label,n=void 0!==e.value?e.value:r),r=""+r;const a=document.createElement("li"),l=document.createElement("a");if(l.href="#",a.id=t.id+"Item"+Math.floor(65536*(1+Math.random())).toString(16).substring(1),a.setAttribute("data-label",r),a.index=o++,a.dataValue=n,"string"==typeof n?a.setAttribute("value",n):a.setAttribute("value",JSON.stringify(n)),a.setAttribute("role","option"),a.setAttribute("aria-label",r),l.innerHTML=t.highlighter?t.highlighter(r):t._highlighter(r),l.setAttribute("aria-hidden",!0),e.icon&&(l.classList.add("icon"),l.classList.add(e.icon)),e.prefix){const t=document.createElement("span");t.innerHTML=e.prefix,l.classList.add("has-prefix"),l.innerHTML=t.innerHTML+l.innerHTML}if(e.suffix){const t=document.createElement("span");t.innerHTML=e.suffix,l.classList.add("has-suffix"),l.innerHTML=l.innerHTML+t.innerHTML}return a.appendChild(l),a}));function n(){const e=t.$.menu.getElementsByClassName("active");e[0]&&e[0].classList.remove("active"),this.classList.add("active"),t._setActiveDescendant(this)}r.length>0&&(r[0].classList.add("active"),t._setActiveDescendant(r[0])),t.$.menu.innerHTML="";for(let e=0;e<r.length;e++){const o=r[e];t.$.menu.appendChild(o),o.onmouseenter=n,o.onmouseleave=function(){this.classList.remove("active"),t._setActiveDescendant(null)},o.onclick=n}}ensureVisible(){const e=this,t=e.$.menu.querySelector(".active");t&&(t.offsetTop+t.offsetHeight>=e.$.scrollView.scrollTop+e.$.scrollView.offsetHeight&&(e.$.scrollView.scrollTop=t.offsetTop+t.offsetHeight),(t.offsetTop<=e.$.scrollView.scrollTop||t.offsetTop>=e.$.scrollView.scrollTop+e.$.scrollView.offsetHeight)&&(e.$.scrollView.scrollTop=t.offsetTop),0===[...e.$.menu.children].indexOf(t)?e.$.scrollView.scrollTop=0:[...e.$.menu.children].indexOf(t)===e.$.menu.children.length-1&&(e.$.scrollView.scrollTop=e.$.scrollView.scrollHeight))}_next(){const e=this,t=e.$.menu.querySelector(".active");if(!t){const t=e.$.menu.firstElementChild;return t.classList.add("active"),void e._setActiveDescendant(t)}t.classList.remove("active");let o=t.nextElementSibling;o||(o=e.$.menu.firstElementChild),o.classList.add("active"),e._setActiveDescendant(o),e.ensureVisible()}_prev(){const e=this,t=e.$.menu.querySelector(".active");if(!t){const t=e.$.menu.firstElementChild;return t.classList.add("active"),void e._setActiveDescendant(t)}t.classList.remove("active");let o=t.previousElementSibling;o||(o=e.$.menu.lastElementChild),o.classList.add("active"),e._setActiveDescendant(o),e.ensureVisible()}_move(e){const t=this;if(t.readonly&&!t.opened){if("ArrowUp"===e.key){const o=t.getPrevItem();o&&t.selectItem(o.value),e.preventDefault()}if("ArrowDown"===e.key){const o=t.getNextItem();o&&t.selectItem(o.value),e.preventDefault()}}if(t.opened){switch(e.keyCode){case 9:case 13:case 27:e.preventDefault();break;case 38:e.preventDefault(),t._prev();break;case 40:e.preventDefault(),t._next()}e.stopPropagation()}}_keyDownHandler(e){const t=this;t._suppressKeyPressRepeat=![40,38,9,13,27,16,17,18].includes(e.keyCode),t._oldValue=t.$.input.value,e.shiftKey||e.altKey||e.ctrlKey||t._move(e)}_keyPressHandler(e){this._suppressKeyPressRepeat||e.shiftKey||e.altKey||e.ctrlKey||this._move(e)}_keyUpHandler(e){const t=this;if(!e.shiftKey&&"F2"!==e.key)switch(e.keyCode){case 40:case 38:case 16:case 17:case 18:40===e.keyCode&&e.altKey&&t.open(),38===e.keyCode&&e.altKey&&t.close();break;case 9:case 13:if(!t.opened)return;t._performSelect(),e.stopPropagation(),e.preventDefault();break;case 27:if(!t.opened)return;t.close(),e.stopPropagation(),e.preventDefault();break;default:t._lookup(e),!t.opened||e.ctrlKey||e.shiftKey||(e.stopPropagation(),e.preventDefault()),t.$.fireEvent("changing",{value:t.$.input.value,oldValue:t._oldValue}),t.$.input.dataValue=t.$.input.value,t.setAttribute("data-value",t.$.input.dataValue)}}propertyChangedHandler(e,t,o){super.propertyChangedHandler(e,t,o);const r=this;if("selectedIndex"===e)r._setSelection();else if("dataSource"===e)r._setSelection(!1);else if("dropDownClassList"===e){const e=r.$.scrollView;for(let o=0,r=t.length;o<r;o+=1)e.classList.remove(t[o]);for(let t=0,r=o.length;t<r;t+=1)e.classList.add(o[t])}else if("dropDownHeight"===e)"auto"!==r.dropDownHeight?r.$.scrollView.style.setProperty("--smart-input-drop-down-menu-height",r.dropDownHeight+"px"):r.$.scrollView.style.setProperty("--smart-input-drop-down-menu-height","auto");else if("opened"===e)r.opened=t,o?r.open():r.close();else if("placeholder"===e){if(r.readonly){const e=r.getAttribute("aria-label");if(e&&e!==t)return;o?r.setAttribute("aria-label",o):r.removeAttribute("aria-label")}}else if("selectedValues"===e)if(null===o)r.$.input.value="",r.$.input.dataValue=o,r.setAttribute("data-value",o),r._refreshSelectedIndex();else{const e=o.join(","),t=r.value;r.value=e,r.propertyChangedHandler("value",t,r.value)}else"value"===e?(r.displayMember!==r.valueMember&&"string"!=typeof o?(r.set("value",o[r.displayMember]),r.$.input.dataValue=o[r.valueMember],r.setAttribute("data-value",r.$.input.dataValue)):(r.$.input.value=r.$.input.dataValue=o,r.setAttribute("data-value",o)),r._refreshSelectedIndex()):"readonly"===e?(r._setAriaRelations(),r._setInputPurpose()):"theme"===e||"rightToLeft"===e?r.$.scrollView[e]=o:"inputPurpose"===e?r._setInputPurpose():"inverted"===e?o?r.$.scrollView.setAttribute("inverted",""):r.$.scrollView.removeAttribute("inverted"):"disabled"!==e&&"unfocusable"!==e||r._setFocusable()}detached(){super.detached(),this.close(),this.removeAttribute("focus")}render(){const e=this,t=e.dropDownClassList;if(e.selectedValues&&e.selectedValues.length){const t=e.selectedValues.join(",");e.value=t}e._createElement&&e._createElement();const o=e.$.scrollView;for(let e=0,r=t.length;e<r;e+=1)o.classList.add(t[e]);e.opened&&(e.opened=!1,e.open());const r=e.$.menu;r&&(r.setAttribute("role","presentation"),o.appendChild(r)),"auto"!==e.dropDownHeight?o.style.setProperty("--smart-input-drop-down-menu-height",e.dropDownHeight+"px"):o.style.setProperty("--smart-input-drop-down-menu-height","auto"),o.classList.add("smart-input-drop-down-menu");for(let t=0;t<e.classList.length;t++){const r=e.classList[t];"smart-element"!==r&&"smart-input"!==r&&o.classList.add(r+"-drop-down-menu")}o.id=e.id+"_"+e.tagName.toLowerCase()+"_menu_"+Math.floor(65536*(1+Math.random())).toString(16).substring(1),o.ownerElement=e,e._setAriaRelations(),e._setInputPurpose(),e._setSelection(),e.isInitialized=!0,super.render()}_setSelection(e){const t=this;let o=t.dataSource;if("string"==typeof o&&(o=t.$.deserialize(o,"array")),t.selectedIndex>=0&&o&&o.length>0){let r=o[t.selectedIndex];if("number"!=typeof r&&"boolean"!=typeof r||(r=""+r),"string"==typeof r){let e=t.$.input.dataValue,o=t.value;t.set("value",r),t.$.input.dataValue=r,t.$.input.setAttribute("data-value",r),t.selectedValues=[t.$.input.dataValue],t.isInitialized&&t.$.fireEvent("change",{value:t.value,label:t.label,oldValue:e,oldLabel:o})}else{let o=t.$.input.dataValue,n=t.value;r&&(void 0!==r.value?(t.set("value",void 0!==r.value?r.value+"":""),t.$.input.dataValue=r.value,t.$.input.setAttribute("data-value",r.value),t.selectedValues=[t.$.input.dataValue]):r.label&&(t.selectedValues=[r.value]),r.label&&t.set("value",r.label)),t.isInitialized&&!1!==e&&t.$.fireEvent("change",{value:t.$.input.dataValue,label:r.value,oldValue:o,oldLabel:n})}}}_createElement(){const e=this,t=document.createElement("ul"),o=document.createElement("smart-scroll-viewer");o.rightToLeft=e.rightToLeft,o.theme=e.theme,o.horizontalScrollBarVisibility="hidden",e.inverted?o.setAttribute("inverted",""):o.removeAttribute("inverted"),e.$.scrollView=o,e.$.menu=t,e._setFocusable(),e.$.menu.onclick=function(t){const o=t.target.closest("li");t.stopPropagation(),t.preventDefault(),e._performSelect(),o&&e.$.fireEvent("itemClick",{item:o,label:o.getAttribute("aria-label"),value:o.dataValue}),e.$.input.focus()}}_setAriaRelations(){const e=this,t=e.getAttribute("aria-label");e.readonly?(e.setAttribute("role","button"),!t&&e.placeholder&&e.setAttribute("aria-label",e.placeholder),e.removeAttribute("aria-readonly"),e.$.input.setAttribute("aria-hidden",!0),e.$.input.removeAttribute("aria-activedescendant"),e.$.input.removeAttribute("aria-controls"),e.$.dropDownButton.setAttribute("aria-hidden",!0)):(e.setAttribute("role","combobox"),t&&t===e.placeholder&&e.removeAttribute("aria-label"),e.$.input.setAttribute("role","searchbox"),e.$.input.removeAttribute("aria-hidden",!0),e.$.dropDownButton.removeAttribute("aria-hidden")),e.setAttribute("aria-expanded",e.opened),e.setAttribute("aria-haspopup","listbox"),e.setAttribute("aria-owns",e.$.scrollView.id),e.$.scrollView.setAttribute("role","listbox")}_setActiveDescendant(e){const t=this;t.readonly||(e?t.setAttribute("aria-activedescendant",e.id):t.removeAttribute("aria-activedescendant"))}_setInputPurpose(){const e=this;e.readonly?e.$.input.removeAttribute("autocomplete"):e.$.input.setAttribute("autocomplete",e.inputPurpose)}_setFocusable(){const e=this;e.disabled||e.unfocusable?e.$.input.setAttribute("tabindex",-1):e.$.input.removeAttribute("tabindex")}});
6
+ Smart("smart-input",class extends Smart.BaseElement{static get properties(){return{autoCompleteDelay:{value:100,type:"number"},dataSource:{type:"any",value:[],reflectToAttribute:!1},dropDownClassList:{value:[],type:"array",reflectToAttribute:!1},dropDownDataSource:{type:"any",value:[]},dropDownHeight:{type:"any",value:200},dropDownOpenMode:{allowedValues:["default","manual"],value:"default",type:"string"},dropDownAppendTo:{value:null,type:"any"},dropDownWidth:{type:"any",value:null},dropDownButtonPosition:{allowedValues:["none","left","right"],value:"none",type:"string"},dropDownOpenPosition:{allowedValues:["bottom","top","auto"],value:"bottom",type:"string"},hint:{type:"string",value:""},inputPurpose:{type:"string",value:"off"},items:{type:"number",value:8},minLength:{type:"number",value:1},name:{value:"",type:"string"},opened:{value:!1,type:"boolean"},query:{type:"string",value:""},queryMode:{allowedValues:["contains","containsIgnoreCase","doesNotContain","doesNotContainIgnoreCase","equals","equalsIgnoreCase","startsWith","startsWithIgnoreCase","endsWith","endsWithIgnoreCase"],type:"string",value:"containsIgnoreCase"},placeholder:{value:"",type:"string"},readonly:{type:"boolean",value:!1},sorted:{value:!1,type:"boolean"},sortDirection:{value:"asc",type:"string"},selectedIndex:{type:"number",value:-1},selectedValue:{type:"any",value:""},selectedValues:{value:[],type:"array"},type:{type:"string"},value:{type:"string",value:""},innerHTML:{type:"string",reflectToAttribute:!1}}}static get styleUrls(){return["smart.textbox.css"]}template(){return'<div id="inputContainer" role="presentation"><div id="optionsContainer" inner-h-t-m-l=\'{{innerHTML}}\' class="smart-hidden"></div><input class="smart-input" id=\'input\' readonly=\'[[readonly]]\' placeholder=\'[[placeholder]]\' type=\'[[type]]\' name=\'[[name]]\' value=\'{{value::keyup}}\' disabled=\'[[disabled]]\' aria-label="[[placeholder]]" /><span class="smart-hidden smart-hint" id="span">[[hint]]</span><div id="dropDownButton" tabindex=-1 class="smart-drop-down-button" role="button" aria-label="Toggle popup"><div id="arrow" class="arrow" aria-hidden="true"></div></div></div>'}static get listeners(){return{"input.focus":"_focusHandler","input.blur":"_blurHandler","input.keydown":"_keyDownHandler","input.keyup":"_keyUpHandler","input.keypress":"_keyPressHandler","input.paste":"_pasteHandler","dropDownButton.down":"_dropDownButtonDownHandler","inputContainer.down":"_downHandler","document.up":"_documentUpHandler"}}get selectedIndexes(){return this.isCompleted?[this.selectedIndex]:[]}set selectedIndexes(e){if(!this.isCompleted)return;const t=this;if(e&&void 0!==e[0]){if(this.selectedIndex=e[0],null===this.dataSource)return;const o=this.dataSource[this.selectedIndex];if(!o)return;const l=this.context;this.context=this,this.$.input.dataValue=this.selectedValue="string"==typeof o?o:o.value,this.setAttribute("data-value",this.$.input.dataValue);let r=t.dataSource;"string"==typeof r&&(r=t.$.deserialize(r,"array"));for(let e=0;e<r.length;e++){let o=r[e];"string"!=typeof o&&"number"!=typeof o&&(o.value===t.$.input.dataValue?o.selected=!0:o.selected=!1)}this.context=l}else{const e=this.context;this.context=this,this.$.input.dataValue=this.selectedValue="",this.setAttribute("data-value",this.$.input.dataValue),this.selectedIndex=-1;let o=t.dataSource;if("string"==typeof o&&(o=t.$.deserialize(o,"array")),o&&Array.isArray(o))for(let e=0;e<o.length;e++){let l=o[e];"string"!=typeof l&&(l.value===t.$.input.dataValue?l.selected=!0:l.selected=!1)}this.context=e}}focus(){this.$.input.focus()}select(){const e=this;e.readonly?e.$.input.focus():e.$.input.select()}_documentUpHandler(e){const t=this,o=t.shadowRoot||t.isInShadowDOM?e.originalEvent.composedPath()[0]:e.originalEvent.target;o!==t&&o!==t.$.dropDownButton&&o!==t.$.input&&o!==t.$.arrow?t.$.scrollView.contains(o.shadowParent||o)?t._isPointerDown&&(t._isPointerDown=!1,t.opened&&(t._preventLookup=!0),t.$.input.focus()):(t.opened&&(t._preventLookup=!0),"manual"===t.dropDownOpenMode||t._isPointerDown||t.close(),t._isPointerDown=!1):t._isPointerDown=!1}_focusHandler(){const e=this;e.setAttribute("focus",""),e.readonly||0!==e.minLength||0!==e.$.input.value.length||e._preventLookup?(e.$.fireEvent("focus"),delete e._preventLookup):e._lookup()}_blurHandler(){const e=this;e.opened||e.removeAttribute("focus"),e.opened||e.$.fireEvent("blur"),e._refreshSelectedIndex(),delete e._preventLookup}_pasteHandler(e){const t=this,o=t.$.input,l=o.value,r=o.selectionStart,a=o.selectionEnd;if(!e.clipboardData&&!window.clipboardData)return;const n=(e.clipboardData||window.clipboardData).getData("text");let s=l.slice(0,r)+n,i=s.length;s+=l.slice(a),e.preventDefault(),t.set("value",s),t.setAttribute("data-value",s),o.setSelectionRange(i,i),t._refreshSelectedIndex()}_refreshSelectedIndex(){const e=this;let t=e.dataSource;if(t){let o=-1,l=null;if(e.dataSource instanceof Promise)return;if("function"==typeof e.dataSource)return;"string"==typeof t&&(t=e.$.deserialize(t,"array"));for(let r=0;r<t.length;r++){let a=t[r];if("number"!=typeof a&&"boolean"!=typeof a||(a=""+a),"string"==typeof a){if(a===e.value){o=r,l=e.value;break}}else a&&(delete a.selected,a.label===e.value&&(o=r,l=a.value,a.selected=!0))}e.set("selectedIndex",o,!1),e.set("selectedValue",l,!1),-1===e.selectedIndex&&(e.$.input.dataValue=null)}}selectItem(e){const t=this;let o=t.dataSource;if("string"==typeof o&&(o=t.$.deserialize(o,"array")),o)for(let l=0;l<o.length;l++){const r=o[l];if(t.set("selectedIndex",-1),t.set("value",""),t.$.input.dataValue=null,"string"==typeof r){if(r===e)return t.set("selectedIndex",l,!1),t.set("value",t.$.input.dataValue=e),void t.setAttribute("data-value",t.$.input.dataValue)}else if(r.value===e)return t.set("selectedIndex",l,!1),t.set("value",r.label),t.$.input.dataValue=e,void t.setAttribute("data-value",t.$.input.dataValue)}else t.set("value",t.$.input.dataValue=e),t.setAttribute("data-value",t.$.input.dataValue),t.set("selectedIndex",-1,!1)}getItem(e){const t=this;if(t.dataSource)for(let o=0;o<t.dataSource.length;o++){const l=t.dataSource[o];if(l.value===e)return l}return null}getPrevItem(){const e=this,t=e.getSelectedItem();if(e.dataSource&&t)for(let o=0;o<e.dataSource.length;o++)if(e.dataSource[o].value===t.value)return e.dataSource[o-1];return null}getNextItem(){const e=this,t=e.getSelectedItem();if(e.dataSource&&t)for(let o=0;o<e.dataSource.length;o++)if(e.dataSource[o].value===t.value)return e.dataSource[o+1];return null}getSelectedItem(){const e=this;return e.dataSource&&0===e.dataSource.length?{label:e.value,value:e.$.input.dataValue?e.$.input.dataValue:e.value}:{label:e.value,value:void 0!==e.$.input.dataValue?e.$.input.dataValue:e.value}}_refreshMenu(){const e=this;e.$.menu.classList.remove("scroll"),e.$.scrollView.computedVerticalScrollBarVisibility&&e.$.menu.classList.add("scroll")}_performSelect(){const e=this,t=e.$.menu.querySelector(".active");let o="",l="";t&&(o=t.getAttribute("data-label"),l=t.dataValue);let r=e.value,a=e.$.input.dataValue;e.set("value",o),e.$.input.dataValue=l,e.setAttribute("data-value",l),t&&e.set("selectedIndex",t.index),e.set("selectedValues",[e.$.input.dataValue]),e.set("selectedValue",e.$.input.dataValue);let n=e.dataSource;if("string"==typeof n&&(n=e.$.deserialize(n,"array")),n&&Array.isArray(n))for(let t=0;t<n.length;t++){let o=n[t];"string"!=typeof o&&"number"!=typeof o&&(o.value===e.$.input.dataValue?o.selected=!0:o.selected=!1)}e.close(),o===r&&l===a||(e.$.fireEvent("change",{value:l,label:o,oldValue:a,oldLabel:r}),e._updateTargetValue())}_open(){const e=this;if(e.opened)return;const t=window.scrollX,o=window.scrollY;let l=e.getBoundingClientRect(),r=0,a=0;if(e.timer&&clearTimeout(e.timer),e.getRootNode()&&e.getRootNode().host)e.getRootNode().host.shadowRoot.appendChild(e.$.scrollView);else if(e.dropDownAppendTo){if("body"===e.dropDownAppendTo||e.dropDownAppendTo===document.body)document.body.appendChild(e.$.scrollView);else if(e.dropDownAppendTo instanceof HTMLElement)e.dropDownAppendTo.appendChild(e.$.scrollView);else if("string"==typeof dropDownAppendTo){let t=document.getElementById(e.dropDownAppendTo);t instanceof HTMLElement?t.appendChild(e.$.scrollView):document.body.appendChild(e.$.scrollView)}}else document.body.appendChild(e.$.scrollView);if(e.setAttribute("aria-owns",e.$.scrollView.id),e.readonly||e.$.input.setAttribute("aria-controls",e.$.scrollView.id),e.$.scrollView.enableShadowDOM&&!e._importedStyle&&(e.$.scrollView.importStyle(e._getStyleUrl("smart.textbox.css")),e._importedStyle=!0),"static"!==getComputedStyle(document.body).position){const e=document.body.getBoundingClientRect();r=e.left,a=e.top}if(e.$.scrollView.style.setProperty("--smart-input-drop-down-menu-width",""),e.$.scrollView.style.left=-3+l.left+t-r+"px",e.$.scrollView.classList.remove("open"),e.$.scrollView.removeAttribute("top"),"bottom"===e.dropDownOpenPosition)e.$.scrollView.style.top=l.bottom+o-a+1+"px";else if("top"===e.dropDownOpenPosition)e.$.scrollView.style.top=l.top-e.$.scrollView.offsetHeight+o-a-2+"px",e.$.scrollView.setAttribute("top","");else if("auto"===e.dropDownOpenPosition){e.$.scrollView.style.top=l.bottom+o-a+1+"px";const t=l.top-e.$.scrollView.offsetHeight+o-a-2;window.innerHeight<parseInt(e.$.scrollView.style.top)+e.$.scrollView.offsetHeight-o?t>=0&&(e.$.scrollView.style.top=t+"px",e.$.scrollView.setAttribute("top","")):e.$.scrollView.style.top=l.bottom+o-a+1+"px"}if(e.dropDownAppendTo&&"body"!==e.dropDownAppendTo){e.$.scrollView.style.position="absolute",e.$.scrollView.style.width="auto",e.$.scrollView.style.height="auto";const t=e.$.scrollView.parentNode.getBoundingClientRect();e.$.scrollView.style.top=l.bottom-t.top+"px","top"===e.dropDownOpenPosition&&(e.$.scrollView.style.top=l.top-t.top-e.$.scrollView.offsetHeight+"px"),e.$.scrollView.style.left=-3+l.left-t.left+"px",e.dropDownHeight&&(e.$.scrollView.style.height=e.dropDownHeight),e.dropDownWidth&&(e.$.scrollView.style.width=e.dropDownWidth)}e.opening=!0,e._positionTimer&&clearInterval(e._positionTimer),e.dropDownAppendTo||(e._positionTimer=setInterval((()=>{const t=e.getBoundingClientRect();if(e.opening)e.opening=!1,l=t;else if(Math.abs(parseInt(t.top)-parseInt(l.top))>=10||Math.abs(parseInt(t.left)-parseInt(l.left))>=10){const o=window.scrollX,l=window.scrollY;return e.$.scrollView.style.left=-3+t.left+o-r+"px",void("bottom"===e.dropDownOpenPosition?e.$.scrollView.style.top=t.bottom+l-a+1+"px":"top"===e.dropDownOpenPosition?e.$.scrollView.style.top=t.top-e.$.scrollView.offsetHeight+l-a+1+"px":"auto"===e.dropDownOpenPosition&&(e.$.scrollView.removeAttribute("top"),e.$.scrollView.style.top=t.bottom+l-a+1+"px",window.innerHeight<parseInt(e.$.scrollView.style.top)+e.$.scrollView.offsetHeight-l?(e.$.scrollView.style.top=t.top-e.$.scrollView.offsetHeight+l-a+1+"px",e.$.scrollView.setAttribute("top","")):e.$.scrollView.style.top=t.bottom+l-a+1+"px"))}}),50)),e.$.scrollView.onpointerdown=function(){e._isPointerDown=!0},requestAnimationFrame((function(){const t=e.dropDownWidth;if(e.$.scrollView.refresh&&e.$.scrollView.refresh(),e._refreshMenu(),e.$.scrollView.setAttribute("open",""),e.setAttribute("open",""),e.$.dropDownButton.setAttribute("open",""),e.$.input.setAttribute("open",""),t&&"string"==typeof t&&-1!==t.indexOf("%")){const o=parseFloat(t)/100;e.$.scrollView.style.setProperty("--smart-input-drop-down-menu-width",e.offsetWidth*o+"px")}else if("auto"!==t&&t)e.$.scrollView.style.setProperty("--smart-input-drop-down-menu-width",parseFloat(t)+"px");else if("auto"===t){if(e.$.scrollView.style.setProperty("--smart-input-drop-down-menu-width",""),e.$.scrollView.$.scrollViewerContainer.classList.contains("vscroll")){const t=e.$.scrollView.offsetWidth+parseFloat(getComputedStyle(e.$.scrollView).getPropertyValue("--smart-scroll-bar-size"));e.$.scrollView.style.setProperty("--smart-input-drop-down-menu-width",t+"px")}}else{e.$.menu.style.width="auto";let t=e.$.menu.offsetWidth;const o=e.$.menu.querySelectorAll("li");for(let t=0;t<o.length;t++)e._maxDropDownWidth=Math.max((o[t].firstElementChild||o[t]).offsetWidth,e._maxDropDownWidth);e.$.scrollView.computedVerticalScrollBarVisibility&&(t+=e.$.scrollView.$&&e.$.scrollView.$.verticalScrollBar?e.$.scrollView.$.verticalScrollBar.offsetWidth:30),e.$.scrollView.style.setProperty("--smart-input-drop-down-menu-width",Math.max(t,e.offsetWidth-8)+"px"),e.$.menu.style.width=""}(e.shadowRoot||e.isInShadowDOM)&&e.$.scrollView._scrollView&&Smart.ScrollBar&&requestAnimationFrame((()=>{e.$.scrollView._scrollView&&e.$.scrollView._scrollView.vScrollBar.refresh()}))})),e.$.scrollView.refresh&&e.$.scrollView.refresh(),e._refreshMenu(),e.set("opened",!0),e.setAttribute("aria-expanded",!0),e.$.fireEvent("open")}close(){const e=this;return!!e.opened&&(e.timer&&clearTimeout(e.timer),e.timer=setTimeout((function(){e.$.scrollView.parentNode&&!e.opened&&(e.$.scrollView.remove(),e.removeAttribute("aria-owns"),e.readonly||e.$.input.removeAttribute("aria-controls"))}),1e3),e._positionTimer&&clearInterval(e._positionTimer),e.$.scrollView.removeAttribute("open"),e.$.dropDownButton.removeAttribute("open"),e.$.input.removeAttribute("open"),e.removeAttribute("open"),e.set("opened",!1),e.setAttribute("aria-expanded",!1),e.$.input.focus(),e.$.fireEvent("close"),!0)}refresh(){const e=this;e.$.scrollView.refresh&&e.$.scrollView.refresh(),e._getDataSourceFromOption(),e.close()}_lookup(e){const t=this;if(t.query=t.$.input.value,t.$.input.readonly&&(t._incrementalSearchQuery||(t._incrementalSearchQuery=""),t._incrementalSearchQuery+=e.key,t._incrementalSearchTimer&&clearTimeout(t._incrementalSearchTimer),t.query=t._incrementalSearchQuery,t._incrementalSearchTimer=setTimeout((function(){t._incrementalSearchQuery=""}),700)),t.query.length<t.minLength)return void t.close();const o=function(e){clearTimeout(t._autoCompleteTimeout),t._autoCompleteTimeout=setTimeout((()=>{const o=t.context;t.context=t,t._process(e),t.context=o}),t.autoCompleteDelay)};"function"==typeof t.dataSource?t.dataSource(t.query,o):o(t.dataSource)}_downHandler(e){const t=this;t.readonly&&t._dropDownButtonDownHandler(e)}_dropDownButtonDownHandler(e){const t=this;return"manual"!==t.dropDownOpenMode&&t._toggle(),e.preventDefault(),e.stopPropagation(),e.originalEvent.preventDefault(),e.originalEvent.stopPropagation(),t._isPointerDown=!0,!1}_toggle(){const e=this;e.opened?e.close():e.open()}open(){const e=this;function t(t){e._process(t);const o=e.$.menu.querySelector(".active");if(o){const t=e.$.input.dataValue;for(let l=0;l<e.$.menu.children.length;l++){const r=e.$.menu.children[l],a=r.getAttribute("data-label"),n=r.dataValue;if(void 0!==t&&n===t||void 0===t&&a===e.$.input.value){o.classList.remove("active"),r.classList.add("active"),e._setActiveDescendant(r),e.$.input.dataValue=n,e.setAttribute("data-value",n);break}}}e.ensureVisible(),e.$.input.focus(),setTimeout((function(){e.$.input.focus()}),25)}e.dropDownDataSource&&(Array.isArray(e.dropDownDataSource)&&e.dropDownDataSource.length>0||"function"==typeof e.dropDownDataSource)?(e.query="","function"==typeof e.dropDownDataSource?e.dropDownDataSource(e.query,t):t(e.dropDownDataSource)):(e.query="","function"==typeof e.dataSource?e.dataSource(e.query,t):t(e.dataSource))}_process(e){const t=this;"string"==typeof e&&(e=t.$.deserialize(e,"array")),e=t.readonly?e.filter((function(){return!0})):e.filter((function(e){return""===e||(t.matcher?t.matcher(e):t._matcher(e))})),e=t._sorter(e),t.sorted&&(e.sort(((e,t)=>void 0!==e.label?e.label.localeCompare(t.label):e.localeCompare(t))),"desc"===t.sortDirection&&e.reverse()),!e.length&&t.opened&&t.close(),0===e.length&&!0!==t.allowItemsAdd||(t.query.length>0?t._render(e.slice(0,t.items)):t._render(e),t._open(),t.$.scrollView.refresh&&t.$.scrollView.refresh(),t._refreshMenu(),t.ensureVisible())}_matcher(e){const t=this.query;switch(null===e&&(e="null"),e=""+(e=e.label||e),this.queryMode){case"startsWith":return e.startsWith(t);case"startsWithIgnoreCase":return e.toLowerCase().startsWith(t.toLowerCase());case"doesNotContain":return e.indexOf(t)<0;case"doesNotContainIgnoreCase":return e.toLowerCase().indexOf(t.toLowerCase())<0;case"contains":return e.indexOf(t)>-1;default:case"containsIgnoreCase":return~e.toLowerCase().indexOf(t.toLowerCase());case"equals":return 0===e.localeCompare(t);case"equalsIgnoreCase":return 0===e.toLowerCase().localeCompare(t.toLowerCase());case"endsWith":return e.endsWith(t);case"endsWithIgnoreCase":return e.toLowerCase().endsWith(t.toLowerCase())}}_sorter(e){const t=this;let o,l=[],r=[],a=[];if(e&&""===e[0])return e;for(;o=e.shift();){let e=o.label||o;e=""+e,e.toLowerCase().indexOf(t.query.toLowerCase())?~e.indexOf(t.query)?r.push(o):a.push(o):l.push(o)}return l.concat(r,a)}_highlighter(e){const t=this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&");return this.query?e.replace(new RegExp("("+t+")","ig"),(function(e,t){return"<strong>"+t+"</strong>"})):e}_render(e){const t=this;let o=0,l=-1,r=null;const a=e.map((function(e){let a=e,n=e;"object"==typeof e&&(a=e.label,n=void 0!==e.value?e.value:a),a=""+a,a=a.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/'/g,"&#39;").replace(/"/g,"&quot;");const s=document.createElement("li"),i=document.createElement("a");if(i.href="#",s.id=t.id+"Item"+Math.floor(65536*(1+Math.random())).toString(16).substring(1),s.setAttribute("data-label",a),s.index=o++,s.dataValue=n,"string"==typeof n?s.setAttribute("value",n):s.setAttribute("value",JSON.stringify(n)),s.setAttribute("role","option"),s.setAttribute("aria-label",a),void 0!==e.menuLabel?(a=e.menuLabel,i.innerHTML=a):i.innerHTML=t.highlighter?t.highlighter(a):t._highlighter(a),i.setAttribute("aria-hidden",!0),e.disabled&&s.classList.add("smart-disabled"),e.icon&&(i.classList.add("icon"),i.classList.add(e.icon)),e.prefix){const t=document.createElement("span");t.innerHTML=e.prefix,i.classList.add("has-prefix"),i.innerHTML=t.innerHTML+i.innerHTML}if(e.suffix){const t=document.createElement("span");t.innerHTML=e.suffix,i.classList.add("has-suffix"),i.innerHTML=i.innerHTML+t.innerHTML}if(e.dataset)for(let t in e.dataset)s.setAttribute("data-"+t,e.dataset[t]);if(e.className){const t=e.className.split(" ");for(let e=0;e<t.length;e++)s.classList.add(t[e].trim())}return void 0!==t.selectedValue&&void 0!==e.value&&""!==t.selectedValue&&t.selectedValue===e.value&&(e.selected=!0,r=e,l=s.index,s.classList.add("active")),s.appendChild(i),s}));function n(){const e=t.$.menu.getElementsByClassName("active");e[0]&&e[0].classList.remove("active"),this.classList.add("active"),t._setActiveDescendant(this)}-1===l&&a.length>0&&(a[0].classList.add("active"),t._setActiveDescendant(a[0])),r&&(t.$.input.value=r.label,t.$.input.dataValue=r.value,t.setAttribute("data-value",t.$.input.dataValue)),t.$.menu.innerHTML="";for(let e=0;e<a.length;e++){const o=a[e];t.$.menu.appendChild(o),o.onmouseenter=n,o.onmouseleave=function(){this.classList.remove("active"),t._setActiveDescendant(null)},o.onclick=n}}ensureVisible(){const e=this,t=e.$.menu.querySelector(".active");t&&(t.offsetTop+t.offsetHeight>=e.$.scrollView.scrollTop+e.$.scrollView.offsetHeight&&(e.$.scrollView.scrollTop=t.offsetTop+t.offsetHeight),(t.offsetTop<=e.$.scrollView.scrollTop||t.offsetTop>=e.$.scrollView.scrollTop+e.$.scrollView.offsetHeight)&&(e.$.scrollView.scrollTop=t.offsetTop),0===[...e.$.menu.children].indexOf(t)?e.$.scrollView.scrollTop=0:[...e.$.menu.children].indexOf(t)===e.$.menu.children.length-1&&(e.$.scrollView.scrollTop=e.$.scrollView.scrollHeight))}_next(){const e=this,t=e.$.menu.querySelector(".active");if(!t){const t=e.$.menu.firstElementChild;return t.classList.add("active"),void e._setActiveDescendant(t)}t.classList.remove("active");let o=t.nextElementSibling;o||(o=e.$.menu.firstElementChild),o.classList.add("active"),e._setActiveDescendant(o),e.ensureVisible()}_prev(){const e=this,t=e.$.menu.querySelector(".active");if(!t){const t=e.$.menu.firstElementChild;return t.classList.add("active"),void e._setActiveDescendant(t)}t.classList.remove("active");let o=t.previousElementSibling;o||(o=e.$.menu.lastElementChild),o.classList.add("active"),e._setActiveDescendant(o),e.ensureVisible()}_move(e){const t=this;if(t.readonly&&!t.opened){if("ArrowUp"===e.key){const o=t.getPrevItem();o&&t.selectItem(o.value),e.preventDefault()}if("ArrowDown"===e.key){const o=t.getNextItem();o&&t.selectItem(o.value),e.preventDefault()}}if(t.opened){switch(e.keyCode){case 9:case 13:case 27:e.preventDefault();break;case 38:e.preventDefault(),t._prev();break;case 40:e.preventDefault(),t._next()}e.stopPropagation()}}_keyDownHandler(e){const t=this;t._suppressKeyPressRepeat=![40,38,9,13,27,16,17,18].includes(e.keyCode),t._oldValue=t.$.input.value,e.shiftKey||e.altKey||e.ctrlKey||t._move(e)}_keyPressHandler(e){this._suppressKeyPressRepeat||e.shiftKey||e.altKey||e.ctrlKey||this._move(e)}_keyUpHandler(e){const t=this;if(!e.shiftKey&&"F2"!==e.key)switch(e.keyCode){case 40:case 38:case 16:case 17:case 18:40===e.keyCode&&e.altKey&&t.open(),38===e.keyCode&&e.altKey&&t.close();break;case 9:case 13:if(!t.opened)return;t._performSelect(),e.stopPropagation(),e.preventDefault();break;case 27:if(!t.opened)return;t.close(),e.stopPropagation(),e.preventDefault();break;default:t._lookup(e),!t.opened||e.ctrlKey||e.shiftKey||(e.stopPropagation(),e.preventDefault()),t.$.fireEvent("changing",{value:t.$.input.value,oldValue:t._oldValue}),t.$.input.dataValue=t.$.input.value,t.setAttribute("data-value",t.$.input.dataValue),t._updateTargetValue()}}propertyChangedHandler(e,t,o){super.propertyChangedHandler(e,t,o);const l=this;if("innerHTML"===e&&(l._getDataSourceFromOption(),l._setSelection(!1)),"selectedValue"===e){let e=-1;if(l.dataSource&&Array.isArray(l.dataSource)&&l.dataSource.forEach(((t,l)=>{"string"==typeof t?t===o&&(e=l):t&&t.value===o&&(e=l)})),e>=0){const t=l.context;l.context=l,l.selectedIndex=e,l.context=t}l._setSelection()}if("selectedIndex"===e){let e=l.dataSource;if(l.selectedValue=null,e&&Array.isArray(e))for(let t=0;t<e.length;t++){let o=e[t];"string"!=typeof o&&"number"!=typeof o&&(o.selected=!1)}l._setSelection()}else if("dataSource"===e){if(l.dataSource&&Array.isArray(l.dataSource)){let e=-1;if(l.dataSource.forEach(((t,o)=>{t.selected&&(e=o)})),e>=0){const t=l.context;l.context=l,l.selectedIndex=e,l.context=t}}l._setSelection(!1)}else if("dropDownClassList"===e){const e=l.$.scrollView;for(let o=0,l=t.length;o<l;o+=1)e.classList.remove(t[o]);for(let t=0,l=o.length;t<l;t+=1)e.classList.add(o[t])}else if("dropDownHeight"===e)"auto"!==l.dropDownHeight?l.$.scrollView.style.setProperty("--smart-input-drop-down-menu-height",l.dropDownHeight+"px"):l.$.scrollView.style.setProperty("--smart-input-drop-down-menu-height","auto");else if("opened"===e)l.opened=t,o?l.open():l.close();else if("placeholder"===e){if(l.readonly){const e=l.getAttribute("aria-label");if(e&&e!==t)return;o?l.setAttribute("aria-label",o):l.removeAttribute("aria-label")}}else if("selectedValues"===e)if(null===o)l.$.input.value="",l.$.input.dataValue=o,l.setAttribute("data-value",o),l._refreshSelectedIndex();else{const e=o.join(","),t=l.value;l.$.input.dataValue=e,l._setSelection(),l.propertyChangedHandler("value",t,l.value)}else"value"===e?(l.displayMember!==l.valueMember&&"string"!=typeof o?(l.set("value",o[l.displayMember]),l.$.input.dataValue=o[l.valueMember],l.setAttribute("data-value",l.$.input.dataValue)):(l.$.input.value=l.$.input.dataValue=o,l.setAttribute("data-value",o)),l._refreshSelectedIndex()):"readonly"===e?(l._setAriaRelations(),l._setInputPurpose()):"theme"===e||"rightToLeft"===e?l.$.scrollView[e]=o:"inputPurpose"===e?l._setInputPurpose():"inverted"===e?o?l.$.scrollView.setAttribute("inverted",""):l.$.scrollView.removeAttribute("inverted"):"disabled"!==e&&"unfocusable"!==e||l._setFocusable()}_updateTargetValue(){const e=this;if(e.dataset.target){const t=document.querySelector(e.dataset.target);if(t){const o=e.dataset.property,l=e.value;o&&void 0!==t[o]&&(t[o]=l)}}}detached(){super.detached(),this.close(),this.removeAttribute("focus")}_getDataSourceFromOption(){const e=this;if(e.innerHTML.indexOf("<option")>=0){e.$.optionsContainer.innerHTML=e.innerHTML.trim();const t=e.querySelectorAll("option");let o=[];for(let e=0;e<t.length;e++){const l=t[e],r=l.hasAttribute("selected")||l.hasAttribute("is-selected")&&"false"!==l.getAttribute("is-selected");let a=(""+l.textContent).trim();const n=(""+l.innerHTML).trim(),s=l.hasAttribute("value")?l.getAttribute("value"):a,i=l.hasAttribute("disabled"),u=l.hasAttribute("label")?l.getAttribute("label"):null;u&&(a=u),o.push({label:a,menuLabel:n,value:s,disabled:i,selected:r,className:l.className,dataset:l.dataset}),l.classList.add("smart-hidden")}e.dataSource=o}}render(){const e=this,t=e.dropDownClassList;if(e._getDataSourceFromOption(),e.selectedValues&&e.selectedValues.length){const t=e.selectedValues.join(",");e.value=t}e._createElement&&e._createElement();const o=e.$.scrollView;for(let e=0,l=t.length;e<l;e+=1)o.classList.add(t[e]);e.opened&&(e.opened=!1,e.open());const l=e.$.menu;l&&(l.setAttribute("role","presentation"),o.appendChild(l)),"auto"!==e.dropDownHeight?o.style.setProperty("--smart-input-drop-down-menu-height",e.dropDownHeight+"px"):o.style.setProperty("--smart-input-drop-down-menu-height","auto"),o.classList.add("smart-input-drop-down-menu");for(let t=0;t<e.classList.length;t++){const l=e.classList[t];"smart-element"!==l&&"smart-input"!==l&&o.classList.add(l+"-drop-down-menu")}o.id=e.id+"_"+e.tagName.toLowerCase()+"_menu_"+Math.floor(65536*(1+Math.random())).toString(16).substring(1),o.ownerElement=e;let r=e.dataSource;if("string"==typeof r&&(r=e.$.deserialize(r,"array")),r&&r.length&&Array.isArray(r)){let t=-1;if(r.forEach(((e,o)=>{e.selected&&(t=o)})),t>=0){e.selectedIndex=t;const o=r[t];e.selectedValue="string"==typeof o?r[t]:r[t].value}}e._setAriaRelations(),e._setInputPurpose(),e._setSelection(),e.isInitialized=!0,super.render()}_setSelection(e){const t=this;let o=t.dataSource;if("string"==typeof o&&(o=t.$.deserialize(o,"array")),t.selectedIndex>=0&&o&&o.length>0){let l=o[t.selectedIndex];if("number"!=typeof l&&"boolean"!=typeof l||(l=""+l),"string"==typeof l){let o=t.$.input.dataValue,r=t.value;t.set("value",l),t.$.input.dataValue=l,t.$.input.setAttribute("data-value",l),t.selectedValues=[t.$.input.dataValue],t.isInitialized&&!1!==e&&(t.$.fireEvent("change",{value:t.value,label:t.label,oldValue:o,oldLabel:r}),t._updateTargetValue())}else{let o=t.$.input.dataValue,r=t.value;l&&(void 0!==l.value?(t.set("value",void 0!==l.value?l.value+"":""),t.$.input.dataValue=l.value,t.$.input.setAttribute("data-value",l.value),t.selectedValues=[t.$.input.dataValue]):l.label&&(t.selectedValues=[l.value]),l.label&&t.set("value",l.label)),t.isInitialized&&!1!==e&&(t.$.fireEvent("change",{value:t.$.input.dataValue,label:l.value,oldValue:o,oldLabel:r}),t._updateTargetValue())}}}_createElement(){const e=this,t=document.createElement("ul"),o=document.createElement("smart-scroll-viewer");o.rightToLeft=e.rightToLeft,o.theme=e.theme,o.horizontalScrollBarVisibility="hidden",e.inverted?o.setAttribute("inverted",""):o.removeAttribute("inverted"),e.$.scrollView=o,e.$.menu=t,e._setFocusable();const l=e.$.input;e.$.menu.onclick=function(t){const o=t.target.closest("li");t.stopPropagation(),t.preventDefault(),e._performSelect(),o&&e.$.fireEvent("itemClick",{index:[...o.parentNode.children].indexOf(o),item:o,label:o.getAttribute("aria-label"),value:o.dataValue}),l.focus()}}_setAriaRelations(){const e=this,t=e.getAttribute("aria-label");e.readonly?(e.setAttribute("role","button"),!t&&e.placeholder&&e.setAttribute("aria-label",e.placeholder),e.removeAttribute("aria-readonly"),e.$.input.setAttribute("aria-hidden",!0),e.$.input.removeAttribute("aria-activedescendant"),e.$.input.removeAttribute("aria-controls"),e.$.dropDownButton.setAttribute("aria-hidden",!0)):(e.setAttribute("role","combobox"),t&&t===e.placeholder&&e.removeAttribute("aria-label"),e.$.input.setAttribute("role","searchbox"),e.$.input.removeAttribute("aria-hidden",!0),e.$.dropDownButton.removeAttribute("aria-hidden")),e.setAttribute("aria-expanded",e.opened),e.setAttribute("aria-haspopup","listbox"),e.setAttribute("aria-owns",e.$.scrollView.id),e.$.scrollView.setAttribute("role","listbox")}_setActiveDescendant(e){const t=this;t.readonly||(e?t.setAttribute("aria-activedescendant",e.id):t.removeAttribute("aria-activedescendant"))}_setInputPurpose(){const e=this;e.readonly?e.$.input.removeAttribute("autocomplete"):e.$.input.setAttribute("autocomplete",e.inputPurpose)}_setFocusable(){const e=this;e.disabled||e.unfocusable?e.$.input.setAttribute("tabindex",-1):e.$.input.removeAttribute("tabindex")}});
@@ -1,6 +1,6 @@
1
1
 
2
- /* Smart UI v13.0.10 (2022-02-21)
3
- Copyright (c) 2011-2021 jQWidgets.
2
+ /* Smart UI v15.0.2 (2023-01-24)
3
+ Copyright (c) 2011-2023 jQWidgets.
4
4
  License: https://htmlelements.com/license/ */ //
5
5
 
6
- Smart("smart-password-text-box",class extends Smart.BaseElement{static get properties(){return{autoFocus:{value:!1,type:"boolean"},hint:{value:"",reflectToAttribute:!0,type:"string"},label:{value:"",reflectToAttribute:!0,type:"string"},maxLength:{value:null,type:"number?"},minLength:{value:2,type:"number"},messages:{value:{en:{passwordStrength:"Password strength",short:"Short",weak:"Weak",far:"Far",good:"Good",strong:"Strong",showPassword:"Show password"}},type:"object",extend:!0},name:{value:"",type:"string"},passwordStrength:{value:null,type:"function?",reflectToAttribute:!1},placeholder:{value:"",type:"string"},selectAllOnFocus:{value:!1,type:"boolean"},showPasswordIcon:{value:!1,type:"boolean"},showPasswordStrength:{value:!1,type:"boolean"},tooltipArrow:{value:!1,type:"boolean"},tooltipDelay:{value:0,type:"number"},tooltipPosition:{allowedValues:["bottom","top","left","right","absolute"],value:"top",type:"string"},tooltipTemplate:{value:null,type:"string?"},type:{value:"password",type:"string",defaultReflectToAttribute:!0,readonly:!0},value:{value:"",reflectToAttribute:!1,type:"string"}}}static get listeners(){return{"document.up":"_documentUpHandler",mouseenter:"_mouseEventsHandler",mouseleave:"_mouseEventsHandler","passwordIcon.down":"_showPassword","input.change":"_textBoxChangeHandler","input.paste":"_textBoxChangeHandler","input.keyup":"_textBoxChangeHandler","input.blur":"_blurHandler","input.focus":"_focusHandler"}}static get requires(){return{"Smart.Tooltip":"smart.tooltip.js"}}static get styleUrls(){return["smart.textbox.css","smart.passwordtextbox.css"]}template(){return'<div id="container" role="presentation"><span id="label" class="smart-label">[[label]]</span><div id="innerContainer" class="smart-content" role="presentation"><input class="smart-input" type="password" id="input"\n disabled="[[disabled]]"\n maxlength="[[maxLength]]"\n minlength="[[minLength]]"\n name="[[name]]"\n placeholder="[[placeholder]]"\n readonly="[[readonly]]"\n value="[[value]]"/><span id="passwordIcon" title="Show Password" class="smart-password-icon smart-hidden" role="button" aria-label="Show Password"></span></div><span id="hint" class="smart-hint">[[hint]]</span><smart-tooltip id="tooltip"\n open-mode="manual"\n arrow="[[tooltipArrow]]"\n right-to-left="[[rightToLeft]]"\n tooltip-template="[[tooltipTemplate]]"\n position="[[tooltipPosition]]"\n delay="[[tooltipDelay]]"></smart-tooltip></div>'}propertyChangedHandler(e,t,s){const a=this;let o;switch(e){case"locale":case"messages":case"passwordStrength":o=a._evaluatePasswordStrength(),a._updateTooltipString(o),a.$.passwordIcon.setAttribute("title",a.localize("showPassword")),a._updatePasswordStrengthStyles(o);break;case"tooltipPosition":a.$.tooltip.position=a.tooltipPosition;break;case"tooltipTemplate":a.$.tooltip.tooltipTemplate=a.tooltipTemplate;break;case"value":o=a._evaluatePasswordStrength(),a._updateTooltipString(o),a._updatePasswordStrengthStyles(o);break;case"disabled":case"unfocusable":a._setFocusable();break;case"readonly":break;default:super.propertyChangedHandler(e,t,s)}}_setFocusable(){const e=this;e.disabled||e.unfocusable?e.$.input.tabIndex=-1:e.$.input.removeAttribute("tabindex")}render(){this._createElement(),super.render()}focus(){this.$.input.focus()}blur(){this.$.input.blur()}reset(){const e=this;e.$.input.value=e.value=e._initializationValue}_createElement(){const e=this;e.autoFocus&&e.$.input.focus(),e.$.addClass("smart-input"),e._setFocusable(),e.$.tooltip.selector=e.$.innerContainer,e.$.passwordIcon.setAttribute("title",e.localize("showPassword")),e._updateTooltipString("short"),e._updatePasswordStrengthStyles(),e._initializationValue=e.value,e.value.length>0?e.$.addClass("has-value"):e.$.removeClass("has-value"),e._handleHintContainer(),e.shadowRoot&&(e.$.tooltip.style.display="none",requestAnimationFrame((()=>e.$.tooltip.style.display=""))),e.$.label.id||(e.$.label.id=e.id+"Label"),e.$.hint.id||(e.$.hint.id=e.id+"Hint"),e.setAttribute("role","presentation"),e.$.innerContainer.removeAttribute("aria-describedby"),e.$.input.setAttribute("aria-describedby",e.$.tooltip.id+" "+e.$.hint.id),e.$.input.setAttribute("aria-labelledby",e.$.label.id)}_handleHintContainer(){const e=this;if(!e.hint)return;const t=e.$.hint;if("function"==typeof e.hint){const s=e.value;e.hint(s,t)?e.$.addClass("invalid"):e.$.removeClass("invalid")}else"string"==typeof e.hint&&(t.innerHTML=e.hint,e.$.removeClass("invalid"))}_focusHandler(){const e=this;e.disabled||(e.selectAllOnFocus&&e.$.input.select(),e.showPasswordIcon&&e.$passwordIcon.removeClass("smart-hidden"),e.setAttribute("focus",""),e._valueBeforeChange=e.value,e.$.fireEvent("focus"),e.showPasswordStrength&&(e._tooltipOpened||(e.$.tooltip.open(),e._tooltipOpened=!0)))}_blurHandler(){const e=this;e.disabled||e._passwordIconPressed||(e._valueBeforeChange!==e.value&&(e.$.fireEvent("change",{value:e.value,oldValue:e._valueBeforeChange}),e._valueBeforeChange=""),e.showPasswordIcon&&e.$passwordIcon.addClass("smart-hidden"),e.removeAttribute("focus"),e.value.length>0?e.$.addClass("has-value"):e.$.removeClass("has-value"),e.$.fireEvent("blur"),e._tooltipOpened&&(e.$.tooltip.close(),e._tooltipOpened=!1))}_showPassword(){const e=this;!e.disabled&&e.showPasswordIcon&&(e.$.input.type="text",e._passwordIconPressed=!0)}_documentUpHandler(){const e=this;!e.disabled&&e.showPasswordIcon&&e._passwordIconPressed&&(e.$.input.type="password",e._passwordIconPressed=!1,e.$.input.focus())}_textBoxChangeHandler(e){const t=this;if(t.disabled||t.readonly)return;const s=t.value;if(t.value=t.$.input.value,t.$.input){const a=t.$.input.value;s!==a&&t.$.fireEvent("changing",{oldValue:s,value:a}),e&&"Enter"===e.key&&(t.$.fireEvent("change",{value:t.value,oldValue:t._valueBeforeChange}),t._valueBeforeChange=t.value)}e&&"keyup"!==e.type&&e.stopPropagation();let a=t._evaluatePasswordStrength();t._updateTooltipString(a),t._updatePasswordStrengthStyles(a)}_updatePasswordStrengthStyles(e){const t=this,s=["short","weak","far","good","strong"];e=e||"short";for(let e=0;e<s.length;e++)t.$container.removeClass("smart-password-"+s[e]);t.disabled||t.$container.addClass("smart-password-"+e)}_evaluatePasswordStrength(){const e=this,t=e.$.input.value,s=t.length,a="<>@!#$%^&*()_+[]{}?:;|'\"\\,./~`-=";if(e.disabled)return;if(e.passwordStrength)return e.passwordStrength(t,a);let o=0,n=0,r=0,l=0;for(var i=0;i<s;i++){const e=t.charAt(i),s=t.charCodeAt(i);s>64&&s<91||s>96&&s<123||s>127&&s<155||s>159&&s<166?o+=1:!1!==isNaN(e)?-1===a.indexOf(e)||(r+=1):n+=1}return l=o+n+2*r+o*n/2+s,s<8?"short":l<20?"weak":l<30?"far":l<40?"good":"strong"}refresh(){}_keyUpHandler(){}_mouseWheelHandler(){}_resizeHandler(){}_selectStartHandler(){}_setDropDownSize(){}_styleChangedHandler(){}_mouseEventsHandler(e){"mouseenter"===e.type?this.setAttribute("hover",""):this.removeAttribute("hover")}_updateTooltipString(e){const t=this;t.$.tooltip.value='<span class="password-strength-label">'+t.localize("passwordStrength")+': </span><span class="password-strength-value">'+t.localize(e)+"</span>"}});
6
+ Smart("smart-password-text-box",class extends Smart.BaseElement{static get properties(){return{autoFocus:{value:!1,type:"boolean"},hint:{value:"",reflectToAttribute:!0,type:"string"},label:{value:"",reflectToAttribute:!0,type:"string"},maxLength:{value:null,type:"number?"},minLength:{value:2,type:"number"},messages:{value:{en:{passwordStrength:"Password strength",short:"Short",weak:"Weak",far:"Far",good:"Good",strong:"Strong",showPassword:"Show password"}},type:"object",extend:!0},name:{value:"",type:"string"},passwordStrength:{value:null,type:"function?",reflectToAttribute:!1},placeholder:{value:"",type:"string"},selectAllOnFocus:{value:!1,type:"boolean"},showPasswordIcon:{value:!1,type:"boolean"},showPasswordStrength:{value:!1,type:"boolean"},tooltipArrow:{value:!1,type:"boolean"},tooltipDelay:{value:0,type:"number"},tooltipPosition:{allowedValues:["bottom","top","left","right","absolute"],value:"top",type:"string"},tooltipTemplate:{value:null,type:"string?"},type:{value:"password",type:"string",defaultReflectToAttribute:!0,readonly:!0},value:{value:"",reflectToAttribute:!1,type:"string"}}}static get listeners(){return{"document.up":"_documentUpHandler",mouseenter:"_mouseEventsHandler",mouseleave:"_mouseEventsHandler","passwordIcon.down":"_showPassword","input.change":"_textBoxChangeHandler","input.paste":"_textBoxChangeHandler","input.keyup":"_textBoxChangeHandler","input.blur":"_blurHandler","input.focus":"_focusHandler"}}static get requires(){return{"Smart.Tooltip":"smart.tooltip.js"}}static get styleUrls(){return["smart.textbox.css","smart.passwordtextbox.css"]}template(){return'<div id="container" role="presentation"><span id="label" class="smart-label">[[label]]</span><div id="innerContainer" class="smart-content" role="presentation"><input class="smart-input" type="password" id="input"\n disabled="[[disabled]]"\n maxlength="[[maxLength]]"\n minlength="[[minLength]]"\n name="[[name]]"\n placeholder="[[placeholder]]"\n readonly="[[readonly]]"\n value="[[value]]"/><span id="passwordIcon" title="Show Password" class="smart-password-icon smart-hidden" role="button" aria-label="Show Password"></span></div><span id="hint" class="smart-hint">[[hint]]</span><smart-tooltip id="tooltip"\n open-mode="manual"\n arrow="[[tooltipArrow]]"\n right-to-left="[[rightToLeft]]"\n tooltip-template="[[tooltipTemplate]]"\n position="[[tooltipPosition]]"\n delay="[[tooltipDelay]]"></smart-tooltip></div>'}propertyChangedHandler(e,t,s){const a=this;let o;switch(e){case"locale":case"messages":case"passwordStrength":o=a._evaluatePasswordStrength(),a._updateTooltipString(o),a.$.passwordIcon.setAttribute("title",a.localize("showPassword")),a._updatePasswordStrengthStyles(o);break;case"tooltipPosition":a.$.tooltip.position=a.tooltipPosition;break;case"tooltipTemplate":a.$.tooltip.tooltipTemplate=a.tooltipTemplate;break;case"value":o=a._evaluatePasswordStrength(),a._updateTooltipString(o),a._updatePasswordStrengthStyles(o);break;case"disabled":case"unfocusable":a._setFocusable();break;case"readonly":break;default:super.propertyChangedHandler(e,t,s)}}_setFocusable(){const e=this;e.disabled||e.unfocusable?e.$.input.tabIndex=-1:e.$.input.removeAttribute("tabindex")}render(){this._createElement(),super.render()}focus(){this.$.input.focus()}blur(){this.$.input.blur()}reset(){const e=this;e.$.input.value=e.value=e._initializationValue}_createElement(){const e=this;e.autoFocus&&e.$.input.focus(),e.$.input.autocomplete="new-password",e.$.addClass("smart-input"),e._setFocusable(),e.$.tooltip.selector=e.$.innerContainer,e.$.passwordIcon.setAttribute("title",e.localize("showPassword")),e._updateTooltipString("short"),e._updatePasswordStrengthStyles(),e._initializationValue=e.value,e.value.length>0?e.$.addClass("has-value"):e.$.removeClass("has-value"),e._handleHintContainer(),e.shadowRoot&&(e.$.tooltip.style.display="none",requestAnimationFrame((()=>e.$.tooltip.style.display=""))),e.$.label.id||(e.$.label.id=e.id+"Label"),e.$.hint.id||(e.$.hint.id=e.id+"Hint"),e.setAttribute("role","presentation"),e.$.innerContainer.removeAttribute("aria-describedby"),e.$.input.setAttribute("aria-describedby",e.$.tooltip.id+" "+e.$.hint.id),e.$.input.setAttribute("aria-labelledby",e.$.label.id)}_handleHintContainer(){const e=this;if(!e.hint)return;const t=e.$.hint;if("function"==typeof e.hint){const s=e.value;e.hint(s,t)?e.$.addClass("invalid"):e.$.removeClass("invalid")}else"string"==typeof e.hint&&(t.innerHTML=e.hint,e.$.removeClass("invalid"))}_focusHandler(){const e=this;e.disabled||(e.selectAllOnFocus&&e.$.input.select(),e.showPasswordIcon&&e.$passwordIcon.removeClass("smart-hidden"),e.setAttribute("focus",""),e._valueBeforeChange=e.value,e.$.fireEvent("focus"),e.showPasswordStrength&&(e._tooltipOpened||(e.$.tooltip.open(),e._tooltipOpened=!0)))}_blurHandler(){const e=this;e.disabled||e._passwordIconPressed||(e._valueBeforeChange!==e.value&&(e.$.fireEvent("change",{value:e.value,oldValue:e._valueBeforeChange}),e._valueBeforeChange=""),e.showPasswordIcon&&e.$passwordIcon.addClass("smart-hidden"),e.removeAttribute("focus"),e.value.length>0?e.$.addClass("has-value"):e.$.removeClass("has-value"),e.$.fireEvent("blur"),e._tooltipOpened&&(e.$.tooltip.close(),e._tooltipOpened=!1))}_showPassword(){const e=this;!e.disabled&&e.showPasswordIcon&&(e.$.input.type="text",e._passwordIconPressed=!0)}_documentUpHandler(){const e=this;!e.disabled&&e.showPasswordIcon&&e._passwordIconPressed&&(e.$.input.type="password",e._passwordIconPressed=!1,e.$.input.focus())}_textBoxChangeHandler(e){const t=this;if(t.disabled||t.readonly)return;const s=t.value;if(t.value=t.$.input.value,t.$.input){const a=t.$.input.value;s!==a&&t.$.fireEvent("changing",{oldValue:s,value:a}),e&&"Enter"===e.key&&(t.$.fireEvent("change",{value:t.value,oldValue:t._valueBeforeChange}),t._valueBeforeChange=t.value)}e&&"keyup"!==e.type&&e.stopPropagation();let a=t._evaluatePasswordStrength();t._updateTooltipString(a),t._updatePasswordStrengthStyles(a)}_updatePasswordStrengthStyles(e){const t=this,s=["short","weak","far","good","strong"];e=e||"short";for(let e=0;e<s.length;e++)t.$container.removeClass("smart-password-"+s[e]);t.disabled||t.$container.addClass("smart-password-"+e)}_evaluatePasswordStrength(){const e=this,t=e.$.input.value,s=t.length,a="<>@!#$%^&*()_+[]{}?:;|'\"\\,./~`-=";if(e.disabled)return;if(e.passwordStrength)return e.passwordStrength(t,a);let o=0,n=0,r=0,l=0;for(var i=0;i<s;i++){const e=t.charAt(i),s=t.charCodeAt(i);s>64&&s<91||s>96&&s<123||s>127&&s<155||s>159&&s<166?o+=1:!1!==isNaN(e)?-1===a.indexOf(e)||(r+=1):n+=1}return l=o+n+2*r+o*n/2+s,s<8?"short":l<20?"weak":l<30?"far":l<40?"good":"strong"}refresh(){}_keyUpHandler(){}_mouseWheelHandler(){}_resizeHandler(){}_selectStartHandler(){}_setDropDownSize(){}_styleChangedHandler(){}_mouseEventsHandler(e){"mouseenter"===e.type?this.setAttribute("hover",""):this.removeAttribute("hover")}_updateTooltipString(e){const t=this;t.$.tooltip.value='<span class="password-strength-label">'+t.localize("passwordStrength")+': </span><span class="password-strength-value">'+t.localize(e)+"</span>"}});
@@ -1,6 +1,6 @@
1
1
 
2
- /* Smart UI v13.0.10 (2022-02-21)
3
- Copyright (c) 2011-2021 jQWidgets.
2
+ /* Smart UI v15.0.2 (2023-01-24)
3
+ Copyright (c) 2011-2023 jQWidgets.
4
4
  License: https://htmlelements.com/license/ */ //
5
5
 
6
- Smart("smart-tooltip",class extends Smart.ContentElement{static get properties(){return{arrow:{value:!1,type:"boolean"},arrowDirection:{allowedValues:["bottom","top","left","right"],value:"bottom",type:"string"},align:{allowedValues:["left","center","right"],value:"center",type:"string"},delay:{value:0,type:"number"},messages:{extend:!0,value:{en:{invalidSelector:'{{elementType}}: "{{property}}" must be a String, an HTMLElement or null.',htmlTemplateNotSuported:"{{elementType}}: Browser doesn't support HTMLTemplate elements.",invalidTemplate:'{{elementType}}: "{{property}}" property accepts a string that must match the id of an HTMLTemplate element from the DOM.',invalidNode:'{{elementType}}: Invalid parameter "{{node}}" when calling {{method}}.'}},type:"object"},iframeRect:{value:null,type:"object?"},offset:{value:[],type:"array"},openMode:{allowedValues:["click","focus","hover","manual"],value:"hover",type:"string"},position:{allowedValues:["bottom","top","left","right","absolute","auto"],value:"top",type:"string"},selector:{value:null,type:"any?"},tooltipTemplate:{value:null,type:"any"},value:{value:"",type:"string",reflectToAttribute:!1},visible:{value:!1,type:"boolean"}}}static get styleUrls(){return["smart.tooltip.css"]}template(){return'<div id="container" role="presentation">\n <div id="content" class="smart-tooltip-content" inner-h-t-m-l="[[innerHTML]]" role="presentation">\n <content></content>\n </div>\n </div>'}propertyChangedHandler(e,t,n){super.propertyChangedHandler(e,t,n);const o=this;let l;switch(e){case"align":o._applyPosition(n);break;case"openMode":o.close(),o._handleEventListeners(t),o._handleResize();break;case"selector":o._oldOwnerElement=o._ownerElement,o._handleSelector(n,t),o._handleEventListeners();break;case"tooltipTemplate":o._handleTemplate(t);break;case"value":o.tooltipTemplate?o._handleTemplate():o.$.content.innerHTML=o.value;break;case"visible":l=n?"open":"close",o.$.fireEvent(l,{owner:o._ownerElement},o.isInShadowDOM?{composed:!0,bubbles:!0,cancelable:!0}:void 0);break;case"position":return void o._applyPosition(t)}o._applyPosition()}ready(){const e=this;super.ready(),e.getAttribute("role")||e.setAttribute("role","tooltip"),e._isParentPositionStatic="static"===window.getComputedStyle(e.parentElement||document.querySelector("body")).position,e._handleSelector(e.selector),e.visible&&e._applyPosition(),e._handleEventListeners(),e._handleResize(),e.value=e.$.content.innerHTML=e.value?e.value:e.innerHTML,e._handleTemplate()}appendChild(e){const t=this;if(!t.isCompleted){const e=Array.prototype.slice.call(arguments,2);return HTMLElement.prototype.appendChild.apply(t,e.concat(Array.prototype.slice.call(arguments)))}e?(t.$.content.appendChild(e),t._applyPosition()):t.error(t.localize("invalidNode",{elementType:t.nodeName.toLowerCase(),method:"appendChild",node:"node"}))}close(){const e=this;if(e._isOpening&&clearTimeout(e._isOpening),!e.visible)return;const t=e.isInShadowDOM?{composed:!0,bubbles:!0,cancelable:!0}:void 0;e.$.fireEvent("closing",{owner:e._ownerElement},t).defaultPrevented||(e.$.fireEvent("close",{owner:e._ownerElement},t),e.visible=!1)}clear(){const e=this.$.content;if(e)for(;e.childNodes.length;)e.removeChild(e.firstChild)}insertBefore(e,t){const n=this;if(!n.isCompleted){const e=Array.prototype.slice.call(arguments,2);return HTMLElement.prototype.insertBefore.apply(n,e.concat(Array.prototype.slice.call(arguments)))}e&&t?(n.$.content.insertBefore(e,t),n._applyPosition()):n.error(n.localize("invalidNode",{elementType:n.nodeName.toLowerCase(),method:"insertBefore",node:"newNode/referenceNode"}))}open(){const e=this;e.disabled||e.readonly||e.visible||(clearTimeout(e._isOpening),e._isOpening=setTimeout((function(){const t=e.isInShadowDOM?{composed:!0,bubbles:!0,cancelable:!0}:void 0;if(e.$.fireEvent("opening",{owner:e._ownerElement},t).defaultPrevented)return void clearTimeout(e._isOpening);e._applyPosition(),e.$.fireEvent("open",{owner:e._ownerElement},t);const n=e.context;e.context=e,e.visible=!0,e.context=n}),e.delay))}removeChild(e){const t=this;if(!t.isCompleted){const e=Array.prototype.slice.call(arguments,2);return HTMLElement.prototype.insertBefore.apply(t,e.concat(Array.prototype.slice.call(arguments)))}e?(t.$.content.removeChild(e),t._applyPosition()):t.error(t.localize("invalidNode",{elementType:t.nodeName.toLowerCase(),method:"removeChild",node:"node"}))}reposition(){const e=this;e.isRendered&&e._applyPosition()}toggle(){const e=this;e.visible?e.close():e.open()}_getDomElementPosition(e){let t=[],n=e.parentElement;for(;n&&"BODY"!==n.nodeName;)t.push(n),n=!this.enableShadowDOM||n.parentElement?n.parentElement:n.getRootNode().host;return t}_getElementAndOwnerRelation(e){const t=this._getDomElementPosition(e||this),n=t.length;let o=null;for(let e=0;e<n;e++)if("static"!==window.getComputedStyle(t[e]).getPropertyValue("position")){o=t[e];break}return o}_applyPosition(e){const t=this;if(!t._ownerElement)return;if(!t.parentElement)return;t._isParentPositionStatic="static"===window.getComputedStyle(t.parentElement).position;const n=t._ownerElement.getBoundingClientRect(),o=t.parentElement?t.parentElement.getBoundingClientRect():{top:0,left:0};let l,i;t.parentElement&&"BODY"===t.parentElement.nodeName.toUpperCase()?(l=n.top+window.scrollY,i=n.left+window.scrollX):(l=n.top-o.top,i=n.left-o.left);const r=t.position,s=t.iframeRect;let a,p={top:n.top,left:n.left,right:n.right,width:n.width,height:n.height,nonStaticParent:t._getElementAndOwnerRelation()};switch(s&&(p.top+=s.top,p.left+=s.left,p.right+=s.right),r){case"auto":case"bottom":case"top":case"left":case"right":{t.style.left="";const e=t["_position"+r.charAt(0).toUpperCase()+r.slice(1)](i,l,p);l=e.top,i=e.left,a=e.translate;break}case"absolute":e?(t.style.top=t.style.left="",l=i=0):(l=parseFloat(t.style.top),i=parseFloat(t.style.left))}const d=t.getAttribute("arrow-direction");a?t.$.container.style.setProperty("--smart-tooltip-arrow-translate",a+"px"):t.$.container.style.removeProperty("--smart-tooltip-arrow-translate"),void 0===l||isNaN(l)||(l+=("auto"===r&&"top"===d?-1:1)*parseInt(t.offset[1])||0,t.style.top=l+"px"),void 0===i||isNaN(i)||(i+=("auto"===r&&"left"===d?-1:1)*parseInt(t.offset[0])||0,t.style.left=i+"px")}_positionAuto(e,t,n){const o=this;let l,i,r=o.parentElement;for(;r;){if("hidden"===getComputedStyle(r).getPropertyValue("overflow")){l=r;break}r=r.parentElement}if(l)i=l.getBoundingClientRect();else{const e=document.scrollingElement;let t,n;document.scrollingElement?(t=e.offsetWidth,n=e.offsetHeight):(t=window.innerWidth,n=window.innerHeight),l=document.body,i={width:t,height:n,left:0,top:0,right:t,bottom:n}}const s=parseFloat(window.getComputedStyle(o).getPropertyValue("--smart-tooltip-arrow-width"))||0;let a=o._positionTop(e,t,n),p=n.nonStaticParent,d=o.offsetWidth/2-s,c=0,f=0,m=a.left,h=i.right-(m+f+o.offsetWidth),u=Math.min(0,h);if(m<=0&&h>0&&(m=Math.min(e,m+h)),u<=0&&(u=Math.sign(u)*(Math.abs(u)+i.right-(e+n.width))),p){const e=p.getBoundingClientRect();c=e.top,f=e.left}return a.top+c>=i.top?(m<=0&&(m=e),t=a.top,{left:e=Math.max(i.left-f,m+u),top:t,translate:Math.max(-d,Math.min(d,a.left-e))}):(a=o._positionBottom(e,t,n),a.top+o.offsetHeight+c<=i.bottom?(m=a.left,m<=0&&(m=e),t=a.top,{left:e=Math.max(i.left-f,m+u),top:t,translate:Math.max(-d,Math.min(d,a.left-e))}):(a=o._positionLeft(e,t,n),t=a.top,d=o.offsetHeight/2-s,t=Math.max(i.top-c,a.top+Math.min(0,i.bottom-(a.top+c+o.offsetHeight))),a.left+f>=i.left?e=a.left:(a=o._positionRight(e,t,n),e=a.left+o.offsetWidth+f<=i.right?a.left:i.right-o.offsetWidth),{left:e,top:t,translate:Math.max(-d,Math.min(d,a.top-t))}))}_getRelativeParentOffset(e){const t=this,n=t._ownerElement;let o=t._getElementAndOwnerRelation(n),l=0,i=0;if(!e)return{left:i,top:l};for(;e&&o&&e!==o;)l+=o.offsetTop,i+=o.offsetLeft,o=t._getElementAndOwnerRelation(o);return{left:i,top:l}}_positionTop(e,t,n){const o=this,l=o._getRelativeParentOffset(n.nonStaticParent);if(o.set("arrowDirection","bottom"),null===n.nonStaticParent)return t=n.top+window.scrollY-o.offsetHeight,{left:(e=o._getAlignmentOffset(n.left,o.offsetWidth,n.width)+window.scrollX)+l.left,top:t+l.top};if(o._isParentPositionStatic){if(t=o._ownerElement.offsetTop-o.offsetHeight,e=o._getAlignmentOffset(o._ownerElement.offsetLeft,o.offsetWidth,n.width),o._ownerElement instanceof SVGElement){const n=o._ownerElement.getBoundingClientRect(),l=o._ownerElement.parentNode.getBoundingClientRect();t=n.top-l.top-o.offsetHeight/2,e=o._getAlignmentOffset(n.left,o.offsetWidth,l.left)}return{left:e+l.left,top:t+l.top}}if(o._ownerElement instanceof SVGElement&&o._ownerElement.parentElement){const n=o._ownerElement.getBoundingClientRect(),i=o._ownerElement.parentNode.getBoundingClientRect();return t=n.top-i.top-o.offsetHeight,{left:(e=o._getAlignmentOffset(n.left-i.left,o.offsetWidth,n.width))+l.left,top:t+l.top}}return t-=o.offsetHeight,{left:(e=o._getAlignmentOffset(e,o.offsetWidth,n.width))+l.left,top:t+l.top}}_positionBottom(e,t,n){const o=this,l=o._getRelativeParentOffset(n.nonStaticParent);return o.set("arrowDirection","top"),null===n.nonStaticParent?(t=n.top+window.scrollY+n.height,{left:(e=o._getAlignmentOffset(n.left,o.offsetWidth,n.width)+window.scrollX)+l.left,top:t+l.top}):o._isParentPositionStatic?(t=o._ownerElement.offsetTop+n.height,{left:(e=o._getAlignmentOffset(o._ownerElement.offsetLeft,o.offsetWidth,n.width))+l.left,top:t+l.top}):(t+=n.height,{left:(e=o._getAlignmentOffset(e,o.offsetWidth,n.width))+l.left,top:t+l.top})}_getAlignmentOffset(e,t,n){switch(this.align){case"left":return e;case"right":return e-t+n;default:return e-t/2+n/2}}_positionLeft(e,t,n){const o=this,l=o._getRelativeParentOffset(n.nonStaticParent);return o.set("arrowDirection","right"),null===n.nonStaticParent?(t=n.top+window.scrollY+n.height/2-o.$.content.offsetHeight/2,{left:(e=n.left+window.scrollX-o.offsetWidth)+l.left,top:t+l.top}):o._isParentPositionStatic?(t=o._ownerElement.offsetTop+n.height/2-o.$.content.offsetHeight/2,{left:(e=o._ownerElement.offsetLeft-o.offsetWidth)+l.left,top:t+l.top}):(t=t+n.height/2-o.$.content.offsetHeight/2,{left:(e-=o.offsetWidth)+l.left,top:t+l.top})}_positionRight(e,t,n){const o=this,l=o._getRelativeParentOffset(n.nonStaticParent);return o.set("arrowDirection","left"),null===n.nonStaticParent?(t=n.top+window.scrollY+n.height/2-o.$.content.offsetHeight/2,{left:(e=n.left+window.scrollX+n.width)+l.left,top:t+l.top}):o._isParentPositionStatic?(t=o._ownerElement.offsetTop+n.height/2-o.$.content.offsetHeight/2,{left:(e=o._ownerElement.offsetLeft+n.width)+l.left,top:t+l.top}):(t=t+n.height/2-o.$.content.offsetHeight/2,{left:(e+=n.width)+l.left,top:t+l.top})}_eventsHandler(e){const t=this;t.disabled||t.readonly||("click"!==e.type?"mouseenter"===e.type||"focus"===e.type?this.open():this.close():t.visible?this.close():this.open())}_handleEventListeners(e){const t=this;if(t._oldOwnerElement&&"manual"!==t.openMode){let e=t._oldOwnerElement.getAttribute("aria-describedby");e&&"tooltip"===t.getAttribute("role")&&(e===t.id?t._oldOwnerElement.removeAttribute("aria-describedby"):(e=e.replace(" "+t.id,""),e=e.replace(t.id+" ",""),t._oldOwnerElement.setAttribute("aria-describedby",e))),t._oldOwnerElement.$.unlisten("mouseenter.tooltip"),t._oldOwnerElement.$.unlisten("mouseleave.tooltip"),t._oldOwnerElement.$.unlisten("focus.tooltip"),t._oldOwnerElement.$.unlisten("blur.tooltip"),t._oldOwnerElement.$.unlisten("click.tooltip"),t._oldOwnerElement=null}if(t._ownerElement){if(e)switch(e){case"hover":t._ownerElement.$.unlisten("mouseenter.tooltip"),t._ownerElement.$.unlisten("mouseleave.tooltip");break;case"focus":t._ownerElement.$.unlisten("focus.tooltip"),t._ownerElement.$.unlisten("blur.tooltip");break;case"click":t._ownerElement.$.unlisten("click.tooltip")}if("manual"!==t.openMode)switch(t._ownerElement instanceof Smart.BaseElement||(t._ownerElement.$=Smart.Utilities.Extend(t._ownerElement)),t.openMode){case"hover":t._ownerElement.$.listen("mouseenter.tooltip",t._eventsHandler.bind(t)),t._ownerElement.$.listen("mouseleave.tooltip",t._eventsHandler.bind(t));break;case"focus":t._ownerElement.$.listen("focus.tooltip",t._eventsHandler.bind(t)),t._ownerElement.$.listen("blur.tooltip",t._eventsHandler.bind(t));break;case"click":t._ownerElement.$.listen("click.tooltip",t._eventsHandler.bind(t))}}}_handleResize(){const e=this;function t(){e._applyPosition()}"click"===e.openMode?window.addEventListener("resize",t):window.removeEventListener("resize",t)}_handleSelector(e,t){const n=this;if(t&&t.removeAttribute&&t.removeAttribute("aria-describedby"),"string"==typeof e)n._ownerElement=e.length>0?document.getElementById(e):void 0;else if(e&&e.nodeType===Node.ELEMENT_NODE)n._ownerElement=e;else{if(null===e)return void(n._ownerElement=void 0);n.error(n.localize("invalidSelector",{elementType:n.nodeName.toLowerCase(),property:"selector"}))}if(!n._ownerElement||"tooltip"!==n.getAttribute("role"))return;if(!n.value)return;const o=n._ownerElement?n._ownerElement.getAttribute("aria-describedby"):null;o?o.indexOf(n.id)<0&&n._ownerElement.setAttribute("aria-describedby",o+" "+n.id):n._ownerElement.setAttribute("aria-describedby",n.id)}_handleTemplate(e){const t=this;let n=t.tooltipTemplate;if(e&&(t.$.content.innerHTML=t.value?t.value:""),null===n||!n)return;if("function"==typeof t.tooltipTemplate)return void t.tooltipTemplate(t.$.content,{value:t.value});if(!("content"in document.createElement("template")))return void t.error(t.localize("htmlTemplateNotSuported",{elementType:t.nodeName.toLowerCase()}));if(n=document.getElementById(n),null===n||!("content"in n))return void t.error(t.localize("invalidTemplate",{elementType:t.nodeName.toLowerCase(),property:"template"}));const o=n.content,l=o.childNodes.length,i=/{{\w+}}/g;let r,s=[];for(let e=0;e<l;e++)for(r=i.exec(o.childNodes[e].innerHTML);r;)s.push({childNodeIndex:e,bindingString:r[0]}),r=i.exec(o.childNodes[e].innerHTML);const a=s.length;let p,d,c=document.importNode(n.content,!0);for(let e=0;e<a;e++){p=c.childNodes[s[e].childNodeIndex],d=s.length;for(let n=0;n<d;n++)p.innerHTML=p.innerHTML.replace(s[e].bindingString,t.value)}t.$.content.innerHTML="";for(let e=0;e<c.childNodes.length;e++)c.childNodes[e].outerHTML&&(t.$.content.innerHTML+=c.childNodes[e].outerHTML)}}),function(){const e=()=>{const e=document.querySelectorAll('[data-toggle="tooltip"');if(e.length>0)for(let t=0;t<e.length;t++){if(!e[t].hasAttribute("data-title"))continue;const n=document.createElement("smart-tooltip");n.selector=e[t],n.innerHTML=e[t].getAttribute("data-title"),document.body.appendChild(n),e[t].hasAttribute("data-placement")&&(n.position=e[t].getAttribute("data-placement"))}};"complete"===document.readyState?e():(window.removeEventListener("load",e),window.addEventListener("load",e))}();
6
+ Smart("smart-tooltip",class extends Smart.ContentElement{static get properties(){return{arrow:{value:!1,type:"boolean"},arrowDirection:{allowedValues:["bottom","top","left","right"],value:"bottom",type:"string"},align:{allowedValues:["left","center","right"],value:"center",type:"string"},delay:{value:0,type:"number"},messages:{extend:!0,value:{en:{invalidSelector:'{{elementType}}: "{{property}}" must be a String, an HTMLElement or null.',htmlTemplateNotSuported:"{{elementType}}: Browser doesn't support HTMLTemplate elements.",invalidTemplate:'{{elementType}}: "{{property}}" property accepts a string that must match the id of an HTMLTemplate element from the DOM.',invalidNode:'{{elementType}}: Invalid parameter "{{node}}" when calling {{method}}.'}},type:"object"},iframeRect:{value:null,type:"object?"},offset:{value:[],type:"array"},openMode:{allowedValues:["click","focus","hover","manual"],value:"hover",type:"string"},position:{allowedValues:["bottom","top","left","right","absolute","auto"],value:"top",type:"string"},selector:{value:null,type:"any?"},tooltipTemplate:{value:null,type:"any"},value:{value:"",type:"string",reflectToAttribute:!1},visible:{value:!1,type:"boolean"}}}static get styleUrls(){return["smart.tooltip.css"]}template(){return'<div id="container" role="presentation">\n <div id="content" class="smart-tooltip-content" inner-h-t-m-l="[[innerHTML]]" role="presentation">\n <content></content>\n </div>\n </div>'}propertyChangedHandler(e,t,n){super.propertyChangedHandler(e,t,n);const o=this;let l;switch(e){case"align":o._applyPosition(n);break;case"openMode":o.close(),o._handleEventListeners(t),o._handleResize();break;case"selector":o._oldOwnerElement=o._ownerElement,o._handleSelector(n,t),o._handleEventListeners();break;case"tooltipTemplate":o._handleTemplate(t);break;case"value":o.tooltipTemplate?o._handleTemplate():o.$.content.innerHTML=o.value;break;case"visible":l=n?"open":"close",o.$.fireEvent(l,{owner:o._ownerElement},o.isInShadowDOM?{composed:!0,bubbles:!0,cancelable:!0}:void 0);break;case"position":return void o._applyPosition(t)}o._applyPosition()}ready(){super.ready()}render(){const e=this;super.render(),e.getAttribute("role")||e.setAttribute("role","tooltip"),e._isParentPositionStatic="static"===window.getComputedStyle(e.parentElement||document.querySelector("body")).position,e._handleSelector(e.selector),e.visible&&e._applyPosition(),e._handleEventListeners(),e._handleResize(),e.value=e.$.content.innerHTML=e.value?e.value:e.innerHTML,e._handleTemplate()}appendChild(e){const t=this;if(!t.isCompleted){const e=Array.prototype.slice.call(arguments,2);return HTMLElement.prototype.appendChild.apply(t,e.concat(Array.prototype.slice.call(arguments)))}e?(t.$.content.appendChild(e),t._applyPosition()):t.error(t.localize("invalidNode",{elementType:t.nodeName.toLowerCase(),method:"appendChild",node:"node"}))}close(){const e=this;if(e._isOpening&&clearTimeout(e._isOpening),!e.visible)return;const t=e.isInShadowDOM?{composed:!0,bubbles:!0,cancelable:!0}:void 0;e.$.fireEvent("closing",{owner:e._ownerElement},t).defaultPrevented||(e.$.fireEvent("close",{owner:e._ownerElement},t),e.visible=!1)}clear(){const e=this.$.content;if(e)for(;e.childNodes.length;)e.removeChild(e.firstChild)}insertBefore(e,t){const n=this;if(!n.isCompleted){const e=Array.prototype.slice.call(arguments,2);return HTMLElement.prototype.insertBefore.apply(n,e.concat(Array.prototype.slice.call(arguments)))}e&&t?(n.$.content.insertBefore(e,t),n._applyPosition()):n.error(n.localize("invalidNode",{elementType:n.nodeName.toLowerCase(),method:"insertBefore",node:"newNode/referenceNode"}))}open(){const e=this;e.disabled||e.readonly||e.visible||(clearTimeout(e._isOpening),e._isOpening=setTimeout((function(){const t=e.isInShadowDOM?{composed:!0,bubbles:!0,cancelable:!0}:void 0;if(e.$.fireEvent("opening",{owner:e._ownerElement},t).defaultPrevented)return void clearTimeout(e._isOpening);e._applyPosition(),e.$.fireEvent("open",{owner:e._ownerElement},t);const n=e.context;e.context=e,e.visible=!0,e.context=n}),e.delay))}removeChild(e){const t=this;if(!t.isCompleted){const e=Array.prototype.slice.call(arguments,2);return HTMLElement.prototype.insertBefore.apply(t,e.concat(Array.prototype.slice.call(arguments)))}e?(t.$.content.removeChild(e),t._applyPosition()):t.error(t.localize("invalidNode",{elementType:t.nodeName.toLowerCase(),method:"removeChild",node:"node"}))}reposition(){const e=this;e.isRendered&&e._applyPosition()}toggle(){const e=this;e.visible?e.close():e.open()}_getDomElementPosition(e){let t=[],n=e.parentElement;for(;n&&"BODY"!==n.nodeName;)t.push(n),n=!this.enableShadowDOM||n.parentElement?n.parentElement:n.getRootNode().host;return t}_getElementAndOwnerRelation(e){const t=this._getDomElementPosition(e||this),n=t.length;let o=null;for(let e=0;e<n;e++)if("static"!==window.getComputedStyle(t[e]).getPropertyValue("position")){o=t[e];break}return o}_applyPosition(e){const t=this;if(!t._ownerElement)return;if(!t.parentElement)return;t._isParentPositionStatic="static"===window.getComputedStyle(t.parentElement).position;const n=t._ownerElement.getBoundingClientRect(),o=t.parentElement?t.parentElement.getBoundingClientRect():{top:0,left:0};let l,i;t.parentElement&&"BODY"===t.parentElement.nodeName.toUpperCase()?(l=n.top+window.scrollY,i=n.left+window.scrollX):(l=n.top-o.top,i=n.left-o.left);const r=t.position,s=t.iframeRect;let a,p={top:n.top,left:n.left,right:n.right,width:n.width,height:n.height,nonStaticParent:t._getElementAndOwnerRelation()};switch(s&&(p.top+=s.top,p.left+=s.left,p.right+=s.right),r){case"auto":case"bottom":case"top":case"left":case"right":{t.style.left="";const e=t["_position"+r.charAt(0).toUpperCase()+r.slice(1)](i,l,p);l=e.top,i=e.left,a=e.translate;break}case"absolute":e?(t.style.top=t.style.left="",l=i=0):(l=parseFloat(t.style.top),i=parseFloat(t.style.left))}const d=t.getAttribute("arrow-direction");a?t.$.container.style.setProperty("--smart-tooltip-arrow-translate",a+"px"):t.$.container.style.removeProperty("--smart-tooltip-arrow-translate"),void 0===l||isNaN(l)||(l+=("auto"===r&&"top"===d?-1:1)*parseInt(t.offset[1])||0,t.style.top=l+"px"),void 0===i||isNaN(i)||(i+=("auto"===r&&"left"===d?-1:1)*parseInt(t.offset[0])||0,t.style.left=i+"px")}_positionAuto(e,t,n){const o=this;let l,i,r=o.parentElement;for(;r;){if("hidden"===getComputedStyle(r).getPropertyValue("overflow")){l=r;break}r=r.parentElement}if(l)i=l.getBoundingClientRect();else{const e=document.scrollingElement;let t,n;document.scrollingElement?(t=e.offsetWidth,n=e.offsetHeight):(t=window.innerWidth,n=window.innerHeight),l=document.body,i={width:t,height:n,left:0,top:0,right:t,bottom:n}}const s=parseFloat(window.getComputedStyle(o).getPropertyValue("--smart-tooltip-arrow-width"))||0;let a=o._positionTop(e,t,n),p=n.nonStaticParent,d=o.offsetWidth/2-s,c=0,f=0,m=a.left,h=i.right-(m+f+o.offsetWidth),u=Math.min(0,h);if(m<=0&&h>0&&(m=Math.min(e,m+h)),u<=0&&(u=Math.sign(u)*(Math.abs(u)+i.right-(e+n.width))),p){const e=p.getBoundingClientRect();c=e.top,f=e.left}return a.top+c>=i.top?(m<=0&&(m=e),t=a.top,{left:e=Math.max(i.left-f,m+u),top:t,translate:Math.max(-d,Math.min(d,a.left-e))}):(a=o._positionBottom(e,t,n),a.top+o.offsetHeight+c<=i.bottom?(m=a.left,m<=0&&(m=e),t=a.top,{left:e=Math.max(i.left-f,m+u),top:t,translate:Math.max(-d,Math.min(d,a.left-e))}):(a=o._positionLeft(e,t,n),t=a.top,d=o.offsetHeight/2-s,t=Math.max(i.top-c,a.top+Math.min(0,i.bottom-(a.top+c+o.offsetHeight))),a.left+f>=i.left?e=a.left:(a=o._positionRight(e,t,n),e=a.left+o.offsetWidth+f<=i.right?a.left:i.right-o.offsetWidth),{left:e,top:t,translate:Math.max(-d,Math.min(d,a.top-t))}))}_getRelativeParentOffset(e){const t=this,n=t._ownerElement;let o=t._getElementAndOwnerRelation(n),l=0,i=0;if(!e)return{left:i,top:l};for(;e&&o&&e!==o;)l+=o.offsetTop,i+=o.offsetLeft,o=t._getElementAndOwnerRelation(o);return{left:i,top:l}}_positionTop(e,t,n){const o=this,l=o._getRelativeParentOffset(n.nonStaticParent);if(o.set("arrowDirection","bottom"),null===n.nonStaticParent)return t=n.top+window.scrollY-o.offsetHeight,{left:(e=o._getAlignmentOffset(n.left,o.offsetWidth,n.width)+window.scrollX)+l.left,top:t+l.top};if(o._isParentPositionStatic){if(t=o._ownerElement.offsetTop-o.offsetHeight,e=o._getAlignmentOffset(o._ownerElement.offsetLeft,o.offsetWidth,n.width),o._ownerElement instanceof SVGElement){const n=o._ownerElement.getBoundingClientRect(),l=o._ownerElement.parentNode.getBoundingClientRect();t=n.top-l.top-o.offsetHeight/2,e=o._getAlignmentOffset(n.left,o.offsetWidth,l.left)}return{left:e+l.left,top:t+l.top}}if(o._ownerElement instanceof SVGElement&&o._ownerElement.parentElement){const n=o._ownerElement.getBoundingClientRect(),i=o._ownerElement.parentNode.getBoundingClientRect();return t=n.top-i.top-o.offsetHeight,{left:(e=o._getAlignmentOffset(n.left-i.left,o.offsetWidth,n.width))+l.left,top:t+l.top}}return t-=o.offsetHeight,{left:(e=o._getAlignmentOffset(e,o.offsetWidth,n.width))+l.left,top:t+l.top}}_positionBottom(e,t,n){const o=this,l=o._getRelativeParentOffset(n.nonStaticParent);return o.set("arrowDirection","top"),null===n.nonStaticParent?(t=n.top+window.scrollY+n.height,{left:(e=o._getAlignmentOffset(n.left,o.offsetWidth,n.width)+window.scrollX)+l.left,top:t+l.top}):o._isParentPositionStatic?(t=o._ownerElement.offsetTop+n.height,{left:(e=o._getAlignmentOffset(o._ownerElement.offsetLeft,o.offsetWidth,n.width))+l.left,top:t+l.top}):(t+=n.height,{left:(e=o._getAlignmentOffset(e,o.offsetWidth,n.width))+l.left,top:t+l.top})}_getAlignmentOffset(e,t,n){switch(this.align){case"left":return e;case"right":return e-t+n;default:return e-t/2+n/2}}_positionLeft(e,t,n){const o=this,l=o._getRelativeParentOffset(n.nonStaticParent);return o.set("arrowDirection","right"),null===n.nonStaticParent?(t=n.top+window.scrollY+n.height/2-o.$.content.offsetHeight/2,{left:(e=n.left+window.scrollX-o.offsetWidth)+l.left,top:t+l.top}):o._isParentPositionStatic?(t=o._ownerElement.offsetTop+n.height/2-o.$.content.offsetHeight/2,{left:(e=o._ownerElement.offsetLeft-o.offsetWidth)+l.left,top:t+l.top}):(t=t+n.height/2-o.$.content.offsetHeight/2,{left:(e-=o.offsetWidth)+l.left,top:t+l.top})}_positionRight(e,t,n){const o=this,l=o._getRelativeParentOffset(n.nonStaticParent);return o.set("arrowDirection","left"),null===n.nonStaticParent?(t=n.top+window.scrollY+n.height/2-o.$.content.offsetHeight/2,{left:(e=n.left+window.scrollX+n.width)+l.left,top:t+l.top}):o._isParentPositionStatic?(t=o._ownerElement.offsetTop+n.height/2-o.$.content.offsetHeight/2,{left:(e=o._ownerElement.offsetLeft+n.width)+l.left,top:t+l.top}):(t=t+n.height/2-o.$.content.offsetHeight/2,{left:(e+=n.width)+l.left,top:t+l.top})}_eventsHandler(e){const t=this;t.disabled||t.readonly||("click"!==e.type?"mouseenter"===e.type||"focus"===e.type?this.open():this.close():t.visible?this.close():this.open())}_handleEventListeners(e){const t=this;if(t._oldOwnerElement&&"manual"!==t.openMode){let e=t._oldOwnerElement.getAttribute("aria-describedby");e&&"tooltip"===t.getAttribute("role")&&(e===t.id?t._oldOwnerElement.removeAttribute("aria-describedby"):(e=e.replace(" "+t.id,""),e=e.replace(t.id+" ",""),t._oldOwnerElement.setAttribute("aria-describedby",e))),t._oldOwnerElement.$.unlisten("mouseenter.tooltip"),t._oldOwnerElement.$.unlisten("mouseleave.tooltip"),t._oldOwnerElement.$.unlisten("focus.tooltip"),t._oldOwnerElement.$.unlisten("blur.tooltip"),t._oldOwnerElement.$.unlisten("click.tooltip"),t._oldOwnerElement=null}if(t._ownerElement){if(e)switch(e){case"hover":t._ownerElement.$.unlisten("mouseenter.tooltip"),t._ownerElement.$.unlisten("mouseleave.tooltip");break;case"focus":t._ownerElement.$.unlisten("focus.tooltip"),t._ownerElement.$.unlisten("blur.tooltip");break;case"click":t._ownerElement.$.unlisten("click.tooltip")}if("manual"!==t.openMode)switch(t._ownerElement instanceof Smart.BaseElement||(t._ownerElement.$=Smart.Utilities.Extend(t._ownerElement)),t.openMode){case"hover":t._ownerElement.$.listen("mouseenter.tooltip",t._eventsHandler.bind(t)),t._ownerElement.$.listen("mouseleave.tooltip",t._eventsHandler.bind(t));break;case"focus":t._ownerElement.$.listen("focus.tooltip",t._eventsHandler.bind(t)),t._ownerElement.$.listen("blur.tooltip",t._eventsHandler.bind(t));break;case"click":t._ownerElement.$.listen("click.tooltip",t._eventsHandler.bind(t))}}}_handleResize(){const e=this;function t(){e._applyPosition()}"click"===e.openMode?window.addEventListener("resize",t):window.removeEventListener("resize",t)}_handleSelector(e,t){const n=this;if(t&&t.removeAttribute&&t.removeAttribute("aria-describedby"),"string"==typeof e)n._ownerElement=e.length>0?document.getElementById(e):void 0;else if(e&&e.nodeType===Node.ELEMENT_NODE)n._ownerElement=e;else{if(null===e)return void(n._ownerElement=void 0);n.error(n.localize("invalidSelector",{elementType:n.nodeName.toLowerCase(),property:"selector"}))}if(!n._ownerElement||"tooltip"!==n.getAttribute("role"))return;if(!n.value)return;const o=n._ownerElement?n._ownerElement.getAttribute("aria-describedby"):null;o?o.indexOf(n.id)<0&&n._ownerElement.setAttribute("aria-describedby",o+" "+n.id):n._ownerElement.setAttribute("aria-describedby",n.id)}_handleTemplate(e){const t=this;let n=t.tooltipTemplate;if(e&&(t.$.content.innerHTML=t.value?t.value:""),null===n||!n)return;if("function"==typeof t.tooltipTemplate)return void t.tooltipTemplate(t.$.content,{value:t.value});if(!("content"in document.createElement("template")))return void t.error(t.localize("htmlTemplateNotSuported",{elementType:t.nodeName.toLowerCase()}));if(n=document.getElementById(n),null===n||!("content"in n))return void t.error(t.localize("invalidTemplate",{elementType:t.nodeName.toLowerCase(),property:"template"}));const o=n.content,l=o.childNodes.length,i=/{{\w+}}/g;let r,s=[];for(let e=0;e<l;e++)for(r=i.exec(o.childNodes[e].innerHTML);r;)s.push({childNodeIndex:e,bindingString:r[0]}),r=i.exec(o.childNodes[e].innerHTML);const a=s.length;let p,d,c=document.importNode(n.content,!0);for(let e=0;e<a;e++){p=c.childNodes[s[e].childNodeIndex],d=s.length;for(let n=0;n<d;n++)p.innerHTML=p.innerHTML.replace(s[e].bindingString,t.value)}t.$.content.innerHTML="";for(let e=0;e<c.childNodes.length;e++)c.childNodes[e].outerHTML&&(t.$.content.innerHTML+=c.childNodes[e].outerHTML)}}),function(){const e=()=>{const e=document.querySelectorAll('[data-toggle="tooltip"');if(e.length>0)for(let t=0;t<e.length;t++){if(!e[t].hasAttribute("data-title"))continue;const n=document.createElement("smart-tooltip");n.selector=e[t],n.innerHTML=e[t].getAttribute("data-title"),document.body.appendChild(n),e[t].hasAttribute("data-placement")&&(n.position=e[t].getAttribute("data-placement"))}};"complete"===document.readyState?e():(window.removeEventListener("load",e),window.addEventListener("load",e))}();
Binary file
@@ -136,6 +136,16 @@
136
136
 
137
137
  <glyph glyph-name="videocam" unicode="&#xe840;" d="M1000 654v-608q0-23-22-32-7-3-14-3-15 0-25 10l-225 225v-92q0-67-47-114t-113-47h-393q-67 0-114 47t-47 114v392q0 67 47 114t114 47h393q66 0 113-47t47-114v-92l225 225q10 10 25 10 7 0 14-2 22-10 22-33z" horiz-adv-x="1000" />
138
138
 
139
+ <glyph glyph-name="zoom-in" unicode="&#xe841;" d="M571 404v-36q0-7-5-13t-12-5h-125v-125q0-7-6-13t-12-5h-36q-7 0-13 5t-5 13v125h-125q-7 0-12 5t-6 13v36q0 7 6 12t12 5h125v125q0 8 5 13t13 5h36q7 0 12-5t6-13v-125h125q7 0 12-5t5-12z m72-18q0 103-73 176t-177 74-177-74-73-176 73-177 177-73 177 73 73 177z m286-465q0-29-21-50t-51-21q-30 0-50 21l-191 191q-100-69-223-69-80 0-153 31t-125 84-84 125-31 153 31 152 84 126 125 84 153 31 153-31 125-84 84-126 31-152q0-123-69-223l191-191q21-21 21-51z" horiz-adv-x="928.6" />
140
+
141
+ <glyph glyph-name="zoom-out" unicode="&#xe842;" d="M571 404v-36q0-7-5-13t-12-5h-322q-7 0-12 5t-6 13v36q0 7 6 12t12 5h322q7 0 12-5t5-12z m72-18q0 103-73 176t-177 74-177-74-73-176 73-177 177-73 177 73 73 177z m286-465q0-29-21-50t-51-21q-30 0-50 21l-191 191q-100-69-223-69-80 0-153 31t-125 84-84 125-31 153 31 152 84 126 125 84 153 31 153-31 125-84 84-126 31-152q0-123-69-223l191-191q21-21 21-51z" horiz-adv-x="928.6" />
142
+
143
+ <glyph glyph-name="home" unicode="&#xe843;" d="M786 296v-267q0-15-11-25t-25-11h-214v214h-143v-214h-214q-15 0-25 11t-11 25v267q0 1 0 2t0 2l321 264 321-264q1-1 1-4z m124 39l-34-41q-5-5-12-6h-2q-7 0-12 3l-386 322-386-322q-7-4-13-3-7 1-12 6l-35 41q-4 6-3 13t6 12l401 334q18 15 42 15t43-15l136-113v108q0 8 5 13t13 5h107q8 0 13-5t5-13v-227l122-102q6-4 6-12t-4-13z" horiz-adv-x="928.6" />
144
+
145
+ <glyph glyph-name="target" unicode="&#xe844;" d="M668 279h-61q-14 0-25 10t-11 25v72q0 14 11 25t25 10h61q-18 61-63 106t-105 62v-60q0-15-11-25t-25-11h-71q-15 0-25 11t-11 25v60q-60-17-105-62t-63-106h61q15 0 25-10t11-25v-72q0-14-11-25t-25-10h-61q18-61 63-106t105-62v60q0 15 11 26t25 10h71q15 0 25-10t11-26v-60q60 18 105 62t63 106z m189 107v-72q0-14-10-25t-26-10h-79q-21-90-87-156t-155-86v-80q0-14-11-25t-25-11h-71q-15 0-25 11t-11 25v80q-90 21-155 86t-86 156h-80q-15 0-25 10t-11 25v72q0 14 11 25t25 10h80q20 90 86 156t155 86v80q0 14 11 25t25 11h71q15 0 25-11t11-25v-80q90-21 155-86t87-156h79q15 0 26-10t10-25z" horiz-adv-x="857.1" />
146
+
147
+ <glyph glyph-name="doc" unicode="&#xe845;" d="M819 638q16-16 27-42t11-50v-642q0-23-15-38t-38-16h-750q-23 0-38 16t-16 38v892q0 23 16 38t38 16h500q22 0 49-11t42-27z m-248 136v-210h210q-5 17-12 23l-175 175q-6 7-23 12z m215-853v572h-232q-23 0-38 16t-16 37v233h-429v-858h715z" horiz-adv-x="857.1" />
148
+
139
149
  <glyph glyph-name="first_page" unicode="&#xe900;" d="M250 600h84v-500h-84v500z m518-441l-59-59-250 250 250 250 59-59-192-191z" horiz-adv-x="1000" />
140
150
 
141
151
  <glyph glyph-name="keyboard_arrow_down" unicode="&#xe901;" d="M309 524l191-192 191 192 59-59-250-250-250 250z" horiz-adv-x="1000" />
@@ -166,6 +176,8 @@
166
176
 
167
177
  <glyph glyph-name="font" unicode="&#xf031;" d="M844 38c17 0 31-14 31-32v-62c0-18-14-32-31-32h-250c-17 0-31 14-31 32v62c0 18 14 32 31 32h38l-45 125h-298l-46-125h38c18 0 32-14 32-32v-62c0-18-14-32-32-32h-250c-17 0-31 14-31 32v62c0 18 14 32 31 32h46l255 707c8 24 35 43 59 43h0 93 0c24 0 51-19 59-43l255-707h46z m-499 281h185l-92 253z" horiz-adv-x="875" />
168
178
 
179
+ <glyph glyph-name="move" unicode="&#xf047;" d="M1000 350q0-14-11-25l-142-143q-11-11-26-11t-25 11-10 25v72h-215v-215h72q14 0 25-10t11-25-11-25l-143-143q-10-11-25-11t-25 11l-143 143q-11 10-11 25t11 25 25 10h72v215h-215v-72q0-14-10-25t-25-11-25 11l-143 143q-11 11-11 25t11 25l143 143q10 11 25 11t25-11 10-25v-72h215v215h-72q-14 0-25 10t-11 25 11 26l143 142q11 11 25 11t25-11l143-142q11-11 11-26t-11-25-25-10h-72v-215h215v72q0 14 10 25t25 11 26-11l142-143q11-10 11-25z" horiz-adv-x="1000" />
180
+
169
181
  <glyph glyph-name="contains" unicode="&#xf063;" d="M192 80l-4 42q-15-23-40-37t-53-13h-1-1v0h-1-1q-37 0-64 26t-27 65v3 3 0q0 61 47 94t136 31v8q0 21-12 50t-61 28q-21 0-40-6t-36-17v0l-11 39q20 16 45 24t53 8v0q70 0 93-44t23-98v-125-4-5q0-19 2-38t3-37v3h-50z m-8 172q-45 0-87-13t-42-64v-3-3q0-21 15-37t36-15h1 0v0q26 1 45 17t27 39v1q0 2 0 5t1 5q0 2-1 4t0 6v0z m316 105q-31-1-55-21t-28-49l-1-1v-6-6-6-7 1-57-5-5-6-5 0q6-30 28-50t54-21v0q43 0 67 33t24 90q0 54-23 88t-66 33v0z m-214 286v-644h428v644h-428z m223-571q-1-1-3-1h-2q-31 0-57 16t-38 43l-1 1v-52h-51v38 44 386h54v-201q14 27 40 43t57 16h3 2v0q53 0 90-45t37-118q2-85-40-128t-91-42v0z m491 19q-17-10-37-14t-41-5h-2-2 1q-64 0-104 48t-40 125q-1 5-1 11v13q0 64 45 111t110 48v0h0 1q19 0 37-4t34-13h-1l-12-54q-12 9-28 14t-31 5v0q-49 0-75-37t-26-91q0-53 28-90t71-37v0 0q17 0 34 4t30 13h-1z" horiz-adv-x="1000" />
170
182
 
171
183
  <glyph glyph-name="starts_with" unicode="&#xf064;" d="M0 643v-644h714v644h-714z m264-563l-4 42q-16-23-40-37t-53-13h-1-2v0h0-1q-38 0-65 26t-27 65v3 3 0q0 62 48 95t135 31v8q0 21-12 49t-59 29q-22-1-41-7t-36-17v0l-13 41q20 15 46 22t52 8h1 1-1q71 0 94-44t23-98v-125-4-5q0-19 1-38t4-37v3h-50z m245-8q-1-1-3-1h-2q-31 0-57 16t-38 43l-1 1v-52h-51v38 44 386h54v-201q14 27 40 43t57 16h3 2v0q53 0 90-45t37-118q2-85-40-128t-91-42v0z m-383 103v-3-3q0-21 15-37t37-15h1v0 0q25 1 45 17t26 39v1q0 2 1 5t0 5q0 2 0 4t-1 6v0 58q-41 1-82-13t-42-64v0z m374 182q-31-1-55-21t-28-49l-1-1v-6-6-6-7 1-57-5-5-6-5 0q6-30 28-50t54-21v0q43 0 67 33t24 90q0 54-23 88t-66 33v0z m500-266q-17-10-37-14t-41-5h-2-2 1q-64 0-104 48t-40 125q-1 5-1 11v13q0 64 45 111t110 48v0h0 1q19 0 37-4t34-13h-1l-12-54q-12 9-28 14t-31 5v0q-49 0-75-37t-26-91q0-53 28-90t71-37v0 0q17 0 34 4t30 13h-1z" horiz-adv-x="1000" />
@@ -212,6 +224,8 @@
212
224
 
213
225
  <glyph glyph-name="bell-alt" unicode="&#xf0f3;" d="M509-96q0 8-9 8-33 0-57 24t-23 57q0 9-9 9t-9-9q0-41 29-70t69-28q9 0 9 9z m455 160q0-29-21-50t-50-21h-250q0-59-42-101t-101-42-101 42-42 101h-250q-29 0-50 21t-21 50q28 24 51 49t47 67 42 89 27 115 11 145q0 84 66 157t171 89q-5 10-5 21 0 23 16 38t38 16 38-16 16-38q0-11-5-21 106-16 171-89t66-157q0-78 11-145t28-115 41-89 48-67 50-49z" horiz-adv-x="1000" />
214
226
 
227
+ <glyph glyph-name="doc-text" unicode="&#xf0f6;" d="M819 638q16-16 27-42t11-50v-642q0-23-15-38t-38-16h-750q-23 0-38 16t-16 38v892q0 23 16 38t38 16h500q22 0 49-11t42-27z m-248 136v-210h210q-5 17-12 23l-175 175q-6 7-23 12z m215-853v572h-232q-23 0-38 16t-16 37v233h-429v-858h715z m-572 483q0 7 5 12t13 5h393q8 0 13-5t5-12v-36q0-8-5-13t-13-5h-393q-8 0-13 5t-5 13v36z m411-125q8 0 13-5t5-13v-36q0-8-5-13t-13-5h-393q-8 0-13 5t-5 13v36q0 8 5 13t13 5h393z m0-143q8 0 13-5t5-13v-36q0-8-5-13t-13-5h-393q-8 0-13 5t-5 13v36q0 8 5 13t13 5h393z" horiz-adv-x="857.1" />
228
+
215
229
  <glyph glyph-name="circle-empty" unicode="&#xf10c;" d="M429 648q-83 0-153-41t-110-111-41-152 41-152 110-111 153-41 152 41 110 111 41 152-41 152-110 111-152 41z m428-304q0-117-57-215t-156-156-215-58-216 58-155 156-58 215 58 215 155 156 216 58 215-58 156-156 57-215z" horiz-adv-x="857.4" />
216
230
 
217
231
  <glyph glyph-name="circle" unicode="&#xf111;" d="M857 344q0-117-57-215t-156-156-215-58-216 58-155 156-58 215 58 215 155 156 216 58 215-58 156-156 57-215z" horiz-adv-x="857.4" />
@@ -248,6 +262,16 @@
248
262
 
249
263
  <glyph glyph-name="dot-circled" unicode="&#xf192;" d="M571 344q0-59-41-101t-101-42-101 42-42 101 42 101 101 42 101-42 41-101z m-142 304q-83 0-153-41t-110-111-41-152 41-152 110-111 153-41 152 41 110 111 41 152-41 152-110 111-152 41z m428-304q0-117-57-215t-156-156-215-58-216 58-155 156-58 215 58 215 155 156 216 58 215-58 156-156 57-215z" horiz-adv-x="857.4" />
250
264
 
265
+ <glyph glyph-name="file-pdf" unicode="&#xf1c1;" d="M819 638q16-16 27-42t11-50v-642q0-23-15-38t-38-16h-750q-23 0-38 16t-16 38v892q0 23 16 38t38 16h500q22 0 49-11t42-27z m-248 136v-210h210q-5 17-12 23l-175 175q-6 7-23 12z m215-853v572h-232q-23 0-38 16t-16 37v233h-429v-858h715z m-287 331q18-14 47-31 33 4 65 4 82 0 99-27 9-13 1-29 0-1-1-1l-1-2v0q-3-21-39-21-27 0-64 11t-73 29q-123-13-219-46-85-146-135-146-8 0-15 4l-14 7q0 0-3 2-6 6-4 20 5 23 32 51t73 54q8 5 13-3 1-1 1-2 29 47 60 110 38 76 58 146-13 46-17 89t4 71q6 22 23 22h12q13 0 20-8 10-12 5-38-1-3-2-4 0-2 0-5v-17q-1-68-8-107 31-91 82-133z m-321-229q29 13 76 88-29-22-49-47t-27-41z m222 513q-9-23-2-73 1 4 4 24 0 2 4 24 1 3 3 5-1 0-1 1-1 1-1 2 0 12-7 20 0-1 0-1v-2z m-70-368q76 30 159 45-1 0-7 5t-9 8q-43 37-71 98-15-48-46-110-17-31-26-46z m361 9q-13 13-78 13 42-16 69-16 8 0 10 1 0 0-1 2z" horiz-adv-x="857.1" />
266
+
267
+ <glyph glyph-name="file-word" unicode="&#xf1c2;" d="M819 638q16-16 27-42t11-50v-642q0-23-15-38t-38-16h-750q-23 0-38 16t-16 38v892q0 23 16 38t38 16h500q22 0 49-11t42-27z m-248 136v-210h210q-5 17-12 23l-175 175q-6 7-23 12z m215-853v572h-232q-23 0-38 16t-16 37v233h-429v-858h715z m-656 500v-59h39l92-369h88l72 271q4 11 5 25 2 9 2 14h2l1-14q1-1 2-11t3-14l72-271h89l91 369h39v59h-167v-59h50l-55-245q-3-11-4-25l-1-12h-3q0 2 0 4t-1 4 0 4q-1 2-2 11t-3 14l-81 304h-63l-81-304q-1-5-2-13t-2-12l-2-12h-2l-2 12q-1 14-3 25l-56 245h50v59h-167z" horiz-adv-x="857.1" />
268
+
269
+ <glyph glyph-name="file-excel" unicode="&#xf1c3;" d="M819 638q16-16 27-42t11-50v-642q0-23-15-38t-38-16h-750q-23 0-38 16t-16 38v892q0 23 16 38t38 16h500q22 0 49-11t42-27z m-248 136v-210h210q-5 17-12 23l-175 175q-6 7-23 12z m215-853v572h-232q-23 0-38 16t-16 37v233h-429v-858h715z m-547 131v-59h157v59h-42l58 90q3 4 5 9t5 8 2 2h1q0-2 3-6 1-2 2-4t3-4 4-5l60-90h-43v-59h163v59h-38l-107 152 108 158h38v59h-156v-59h41l-57-89q-2-4-6-9t-5-8l-1-1h-1q0 2-3 5-3 6-9 13l-59 89h42v59h-162v-59h38l106-152-109-158h-38z" horiz-adv-x="857.1" />
270
+
271
+ <glyph glyph-name="file-powerpoint" unicode="&#xf1c4;" d="M819 638q16-16 27-42t11-50v-642q0-23-15-38t-38-16h-750q-23 0-38 16t-16 38v892q0 23 16 38t38 16h500q22 0 49-11t42-27z m-248 136v-210h210q-5 17-12 23l-175 175q-6 7-23 12z m215-853v572h-232q-23 0-38 16t-16 37v233h-429v-858h715z m-554 131v-59h183v59h-52v93h76q43 0 66 9 37 12 60 48t22 82q0 45-21 78t-56 49q-27 10-72 10h-206v-59h52v-310h-52z m197 156h-66v150h67q29 0 46-10 31-19 31-64 0-50-34-67-18-9-44-9z" horiz-adv-x="857.1" />
272
+
273
+ <glyph glyph-name="file-archive" unicode="&#xf1c6;" d="M357 636v71h-71v-71h71z m72-72v72h-72v-72h72z m-72-71v71h-71v-71h71z m72-72v72h-72v-72h72z m390 217q16-16 27-42t11-50v-642q0-23-15-38t-38-16h-750q-23 0-38 16t-16 38v892q0 23 16 38t38 16h500q22 0 49-11t42-27z m-248 136v-210h210q-5 17-12 23l-175 175q-6 7-23 12z m215-853v572h-232q-23 0-38 16t-16 37v233h-71v-72h-72v72h-286v-858h715z m-350 403l60-195q4-15 4-29 0-46-40-77t-103-30-102 30-41 77q0 14 5 29 12 35 67 221v71h71v-71h44q13 0 22-7t13-19z m-79-260q30 0 51 11t21 25-21 25-51 11-50-11-21-25 21-25 50-11z" horiz-adv-x="857.1" />
274
+
251
275
  <glyph glyph-name="header" unicode="&#xf1dc;" d="M939-79q-25 0-74 2t-75 2q-24 0-73-2t-74-2q-13 0-21 12t-7 25q0 18 9 26t22 9 29 4 25 9q18 11 18 78l0 218q0 12-1 17-7 3-28 3h-376q-22 0-29-3 0-5 0-17l-1-207q0-79 21-91 9-6 26-8t32-2 25-8 11-26q0-14-6-26t-21-13q-26 0-78 2t-77 2q-24 0-71-2t-71-2q-13 0-20 12t-7 25q0 17 9 25t20 10 26 4 24 9q18 13 18 80l-1 31v454q0 2 1 15t0 20-1 21-2 24-4 20-6 18-9 10q-8 5-25 7t-29 1-23 7-10 26q0 14 6 26t20 13q26 0 78-2t77-2q23 0 71 2t70 2q14 0 21-13t7-26q0-17-9-25t-22-8-27-2-24-7q-20-12-20-90l1-178q0-12 0-18 7-2 22-2h390q14 0 21 2 1 6 1 18l0 178q0 78-19 90-10 6-33 7t-37 7-14 28q0 14 7 26t21 13q24 0 74-2t73-2q24 0 72 2t72 2q14 0 21-13t7-26q0-17-10-25t-22-8-29-2-24-7q-20-13-20-90l1-526q0-66 19-78 9-6 25-8t30-2 23-9 10-25q0-14-6-26t-20-13z" horiz-adv-x="1000" />
252
276
 
253
277
  <glyph glyph-name="brush" unicode="&#xf1fc;" d="M901 850q39 0 69-26t29-65q0-35-25-84-185-351-260-420-54-51-121-51-71 0-121 52t-51 123q0 71 52 118l356 323q33 30 72 30z m-507-577q22-42 59-73t84-42l1-40q2-118-72-193t-195-75q-68 0-121 26t-85 71-49 102-16 123q4-3 23-17t35-25 32-20 26-9q23 0 31 20 14 37 32 63t39 42 49 27 57 14 70 6z" horiz-adv-x="1000" />
Binary file
Binary file
Binary file