@everymatrix/lottery-ticket-controller 1.54.6 → 1.54.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/helper-accordion_5.cjs.entry.js +10966 -13043
- package/dist/cjs/{index-805691f2.js → index-267c1262.js} +15 -6
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/lottery-ticket-controller.cjs.js +3 -3
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/lottery-ticket-controller/lottery-ticket-controller.js +26 -2
- package/dist/collection/utils/locale.utils.js +7 -0
- package/dist/esm/helper-accordion_5.entry.js +10966 -13043
- package/dist/esm/{index-112e65a8.js → index-d1ea9b41.js} +15 -6
- package/dist/esm/loader.js +3 -3
- package/dist/esm/lottery-ticket-controller.js +4 -4
- package/dist/lottery-ticket-controller/lottery-ticket-controller.esm.js +1 -1
- package/dist/lottery-ticket-controller/{p-6d913fec.entry.js → p-6e6f07dc.entry.js} +102 -490
- package/dist/lottery-ticket-controller/p-d0de5ea9.js +2 -0
- package/dist/types/components/lottery-ticket-controller/lottery-ticket-controller.d.ts +5 -0
- package/dist/types/components.d.ts +8 -0
- package/dist/types/utils/locale.utils.d.ts +1 -0
- package/package.json +1 -1
- package/dist/lottery-ticket-controller/p-1090b990.js +0 -2
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
import{r as t,c as e,h as i}from"./p-1090b990.js";const o=["ro","en","hr"],s={en:{deleteTicket:"Delete ticket"},ro:{deleteTicket:"Sterge biletul"},fr:{deleteTicket:"Supprimer le billet"},ar:{deleteTicket:"حذف التذكرة"},hr:{deleteTicket:"Izbriši listić"}},r=class{constructor(i){t(this,i),this.accordionEvent=e(this,"helperAccordionAction",7),this.ticketHistoryFlag=!1,this.headerTitle="",this.headerSubtitle="",this.description="",this.footer=!1,this.deleteTab=!1,this.postMessage=!1,this.eventName="helperAccordionAction",this.collapsed=!0,this.language="en",this.clientStyling="",this.clientStylingUrlContent="",this.limitStylingAppends=!1,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)}}connectedCallback(){this.showContent=!this.collapsed}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}toggleContent(){this.showContent=!this.showContent}deleteAction(){this.postMessage&&window.postMessage({type:this.eventName},window.location.href),this.accordionEvent.emit()}render(){return i("div",{key:"ad26faefd6e3dd089171c7e2bff13faa5a26d972",class:"Wrapper",ref:t=>this.stylingContainer=t},i("div",{key:"bb7045653ec12a2526029589744f7ef014ec6a6a",class:!0===this.ticketHistoryFlag?"HeaderTicketHistory":"Header",onClick:()=>this.toggleContent()},i("p",{key:"ae30943582063e368e942124d8d5acadc1732629",class:"Title"},this.headerTitle),i("p",{key:"7c35076cb768de784177988900c61fe40a71594c",class:"Subtitle"},this.headerSubtitle),i("p",{key:"daff2b456a427f45b00efc32ba33a68cdc2228f0",class:"Subtitle Description"},this.description),i("span",{key:"0c4f942642da6e8b1ac3d2aeac46034963965d8f",class:"Expand"},this.showContent?"<":">")),this.showContent&&i("div",{key:"c688ab7cc629a3974b905a2fdc43063e996a3b90"},i("div",{key:"aaa3ad7d9f1503b8e1baaa2c756376a580ffe261",class:"Content"},i("slot",{key:"8c5c8ff70857da9414c7284b052a3fbc5f503f4a",name:"accordionContent"}),this.footer&&this.showContent&&i("div",{key:"917191f55a45647d708a5e3ff5e188c7e565a0c0"},this.deleteTab&&i("span",{key:"e7fdd5b4f18cacaceda206b36ce9576cc3fc1472",class:"ActionButton",onClick:()=>this.deleteAction()},(()=>{const t=this.language;return s[void 0!==t&&o.includes(t)?t:"en"].deleteTicket})())))))}};r.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.Header{border-radius:5px;background:var(--emw--color-background, #009993);display:flex;gap:30px;border:1px solid var(--emw--color-typography, #009993);padding:8px 10px;user-select:none;margin-bottom:1px;cursor:pointer}.Header:hover{background:var(--emw--color-background-secondary, #00ABA4)}.Header .Title,.Header .Subtitle,.Header .Description{margin:0;font-size:14px;color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));text-transform:capitalize}.Header .Expand{margin-left:auto;color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));width:17px;height:17px;cursor:pointer;text-align:center;transform:rotate(90deg);font-size:20px;user-select:none}.HeaderTicketHistory{border-radius:4px;background:var(--emw--color-gray-50, #F1F1F1);display:flex;gap:30px;border:1px solid var(--emw--color-typography, #009993);padding:8px 10px;user-select:none;margin-bottom:5px;cursor:pointer}.HeaderTicketHistory:hover{background:var(--emw--color-secondary, #00ABA4)}.HeaderTicketHistory .Title,.HeaderTicketHistory .Subtitle,.HeaderTicketHistory .Description{margin:0;font-size:14px;color:var(--emw--button-text-color, #000)}.HeaderTicketHistory .Expand{margin-left:auto;color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));width:17px;height:17px;cursor:pointer;text-align:center;transform:rotate(90deg);font-size:20px;user-select:none}.Content{border-radius:0 0 4px 4px;background:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));border:1px solid var(--emw--button-border-color, #009993);padding:10px 15px;user-select:none;color:var(--emw--button-text-color, #000);margin-bottom:10px}.ActionButton{cursor:pointer;display:inline-block;border-radius:var(--emw--button-border-radius, 4px);margin:20px 0 10px;text-transform:uppercase;font-size:12px;text-align:center;padding:8px 20px;min-width:80px;background:var(--emw--color-error, #FF3D00);border:1px solid var(--emw--color-error, #FF3D00);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255))}.ActionButton:hover{background:var(--emw--color-secondary, #FF6536);border:1px solid var(--emw--color-error, #FF3D00)}';const n=class{constructor(i){t(this,i),this.bulletEvent=e(this,"lotteryBulletSelection",7),this.value="0",this.selectable=!0,this.isSelected=!1,this.isBonus=!1,this.clientStyling="",this.clientStylingUrlContent="",this.limitStylingAppends=!1,this.select=()=>{this.selectable&&(this.isSelected=!this.isSelected,this.bulletEvent.emit({value:this.value,selected:this.isSelected}))},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)}}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}render(){return i("div",{key:"a21cbee8f556bfbbe9f97be5f44bfc08b6f24dd6",class:"Circle "+(this.selectable?"":"Disabled")+(this.isSelected?"Selected":"")+(this.isBonus?" Bonus":""),onClick:()=>this.select(),ref:t=>this.stylingContainer=t},this.value)}};n.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}@-webkit-keyframes Circle{0%{-webkit-transform:scale(0.5);transform:scale(0.5)}100%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes Circle{0%{-webkit-transform:scale(0.5);transform:scale(0.5)}100%{-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes hover-rotate{0%{-webkit-transform:scale(1) rotateZ(0);transform:scale(1) rotateZ(0)}50%{-webkit-transform:scale(1.2) rotateZ(180deg);transform:scale(1.22) rotateZ(180deg)}100%{-webkit-transform:scale(1) rotateZ(360deg);transform:scale(1) rotateZ(360deg)}}@keyframes hover-rotate{0%{-webkit-transform:scale(1) rotateZ(0);transform:scale(1) rotateZ(0)}50%{-webkit-transform:scale(1.2) rotateZ(180deg);transform:scale(1.2) rotateZ(180deg)}100%{-webkit-transform:scale(1) rotateZ(360deg);transform:scale(1) rotateZ(360deg)}}@-webkit-keyframes selected-scaleUp{0%{-webkit-transform:scale(0.5);transform:scale(0.5)}100%{-webkit-transform:scale(1.2);transform:scale(1.2)}}@keyframes selected-scaleUp{0%{-webkit-transform:scale(0.5);transform:scale(0.5)}100%{-webkit-transform:scale(1);transform:scale(1)}}.Circle{-webkit-animation:Circle 0.8s cubic-bezier(0.39, 0.575, 0.565, 1) both;animation:Circle 0.8s cubic-bezier(0.39, 0.575, 0.565, 1) both;cursor:pointer;color:var(--emw--button-text-color, #000);display:block;height:30px;width:30px;margin:0;display:flex;align-items:center;justify-content:center;justify-content:center;align-items:center;border:solid 2px var(--emw--color-gray-transparency-100, rgb(255, 255, 255));background:radial-gradient(circle at top, var(--emw--color-gray-transparency-100, rgb(255, 255, 255)) 0%, var(--emw--color-gray-transparency-100, rgb(255, 255, 255)) 100%);font-weight:bold;border-radius:50%;box-shadow:0 2px 4px 0 rgba(0, 0, 0, 0.5);user-select:none;font-size:16px;line-height:16px;font-weight:600;position:relative}.Circle:hover{-webkit-animation:hover-rotate 0.4s linear both;animation:hover-rotate 0.4s linear both;background:radial-gradient(circle at top, var(--emw--color-gray-transparency-100, rgb(255, 255, 255)) 0%, var(--emw--color-gray-50, #F1F1F1) 100%)}.Circle.Selected{-webkit-animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));background:var(--emw--color-primary, #9EC258);background:-webkit-radial-gradient(top, var(--emw--button-background-color, #00958f), var(--emw--color-primary-variant, #004D4A));background:-moz-radial-gradient(top, var(--emw--button-background-color, #00958f), var(--emw--color-primary-variant, #004D4A));background:radial-gradient(circle at top, var(--emw--button-background-color, #00958f), var(--emw--color-primary-variant, #004D4A));border:solid 2px var(--emw--button-border-color, #00958f)}.Circle.Disabled{-webkit-animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;color:var(--emw--color-gray-50, #F1F1F1);background:var(--emw--color-gray-100, #D4D4D4);border:solid 2px var(--emw--color-gray-100, #D4D4D4);cursor:default}.Circle.DisabledSelected{-webkit-animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;color:var(--emw--color-gray-50, #F1F1F1);background:var(--emw--color-primary, #9EC258);background:-webkit-radial-gradient(top, var(--emw--button-background-color, #00958f), var(--emw--color-primary-variant, #004D4A));background:-moz-radial-gradient(top, var(--emw--button-background-color, #00958f), var(--emw--color-primary-variant, #004D4A));background:radial-gradient(circle at top, var(--emw--button-background-color, #00958f), var(--emw--color-primary-variant, #004D4A));border:solid 2px var(--emw--color-gray-100, #D4D4D4);cursor:default}.Circle.Bonus{background:var(--emw--color-error, #FF3D00)}';const a=class{constructor(i){t(this,i),this.gridFilledEvent=e(this,"gridFilled",7),this.gridDirtyEvent=e(this,"gridDirty",7),this.gridClearAllEvent=e(this,"gridClearAllEvent",7),this.totalNumbers=0,this.maximumAllowed=7,this.minimumAllowed=3,this.selectable=!0,this.selectedNumbers="",this.secondaryNumbers="",this.displaySelected=!1,this.language="en",this.gridType="",this.clientStyling="",this.clientStylingUrlContent="",this.highNumber=47,this.lowNumber=1,this.selectionType="mainSelection",this.partialQuickpickAvailable=!1,this.numbers=[],this.bonusNumbers=[],this.limitStylingAppends=!1,this.selectedCounter=0,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)}}connectedCallback(){let t=[];this.selectedNumbers.length>0&&(t=this.selectedNumbers.split(","),this.selectedCounter=t.length),this.secondaryNumbers.length>0&&(this.bonusNumbers=this.secondaryNumbers.split(",").map((t=>({number:t,selected:!0,selectable:this.selectable})))),this.displaySelected?t.forEach((t=>{this.numbers.push({number:t,selected:!0,selectable:this.selectable})})):Array.from({length:this.highNumber-this.lowNumber+1},((t,e)=>this.lowNumber+e)).map((t=>t.toString())).forEach((e=>{this.numbers.push({number:e,selected:t.indexOf(e)>=0,selectable:this.selectedCounter!=this.maximumAllowed&&this.selectable})}))}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}shuffleArray(t){const e=[];for(;t.length>0;){const i=Math.floor(Math.random()*t.length);e.push(t.splice(i,1)[0])}return e}lotteryBulletSelectionHandler(t){this.numbers=this.numbers.map((e=>({number:e.number,selected:e.number==t.detail.value?t.detail.selected:e.selected,selectable:e.selectable}))),t.detail.selected?(this.selectedCounter+=1,this.selectedCounter>=this.minimumAllowed&&this.selectedCounter<=this.maximumAllowed&&(this.numbers=this.numbers.map((t=>this.selectedCounter===this.maximumAllowed?{number:t.number,selected:t.selected,selectable:!!t.selected}:{number:t.number,selected:t.selected,selectable:!0})),JSON.parse(this.numberRange).includes(this.selectedCounter)?this.gridFilledEvent.emit({id:this.ticketId,index:this.gridIndex,selectionType:this.selectionType,selectedNumbers:this.numbers.filter((t=>t.selected)).map((t=>t.number))}):this.gridDirtyEvent.emit({id:this.ticketId,index:this.gridIndex,selectionType:this.selectionType,selectedNumbers:this.numbers.filter((t=>t.selected)).map((t=>t.number))}))):(this.selectedCounter-=1,this.numbers=this.numbers.map((t=>({number:t.number,selected:t.selected,selectable:!0}))),this.selectedCounter<this.minimumAllowed?this.gridDirtyEvent.emit({id:this.ticketId,index:this.gridIndex,selectionType:this.selectionType,selectedNumbers:this.numbers.filter((t=>t.selected)).map((t=>t.number))}):this.gridFilledEvent.emit({id:this.ticketId,index:this.gridIndex,selectionType:this.selectionType,selectedNumbers:this.numbers.filter((t=>t.selected)).map((t=>t.number))}),0===this.selectedCounter&&this.gridClearAllEvent.emit(this.gridIndex))}async resetSelectionHandler(t){t.detail&&t.detail.ticketId==this.ticketId&&t.detail.index===this.gridIndex&&(this.selectedCounter=0,this.numbers=this.numbers.map((t=>({number:t.number,selected:!1,selectable:this.selectable}))),this.gridDirtyEvent.emit({id:this.ticketId,index:this.gridIndex,selectionType:this.selectionType,selectedNumbers:[]}))}async autoSelectionHandler(t){if(t.detail&&t.detail.ticketId==this.ticketId&&t.detail.index===this.gridIndex){this.resetSelectionHandler(t);let e=Array.from({length:this.highNumber-this.lowNumber+1},((t,e)=>this.lowNumber+e));e=this.shuffleArray(e),e=e.slice(0,this.minimumAllowed),this.numbers=this.numbers.map((t=>({number:t.number,selected:e.indexOf(parseInt(t.number,10))>=0,selectable:!!this.partialQuickpickAvailable&&e.indexOf(parseInt(t.number,10))>=0}))),this.gridFilledEvent.emit({id:this.ticketId,index:this.gridIndex,selectionType:this.selectionType,selectedNumbers:this.numbers.filter((t=>t.selected)).map((t=>t.number))}),this.selectedCounter=this.minimumAllowed}}render(){return i("div",{key:"8ad436904a126e6bee036c7372cf45c075022e5f",class:"GridContainer",ref:t=>this.stylingContainer=t},i("div",{key:"5a8818209485f0808a99978910f6f26473dd6f59",class:"ticket"===this.gridType?"Grid TicketGrid":"Grid"},this.numbers.map((t=>i("div",null,i("lottery-bullet",{value:t.number,selectable:t.selectable,"is-selected":t.selected,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent})))),this.bonusNumbers.length?this.bonusNumbers.map((t=>i("div",null,i("lottery-bullet",{value:t.number,selectable:t.selectable,"is-selected":t.selected,"is-bonus":!0,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent})))):""))}};a.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.GridContainer{display:flex;flex-direction:column;max-width:1200px}.Grid{margin-top:10px 0 10px 0;display:flex;flex-direction:row;flex-wrap:wrap;gap:20px}.Grid.TicketGrid{gap:5px}';const l=["ro","en","hr"],c={en:{loading:"Loading, please wait ...",error:"It was an error while trying to fetch the data",grid:"Grid",multiplier:"Multiplier",numberOfDraws:"Number of draws",wagerPerDraw:"Wager per draw",resetButton:"Reset",autoButton:"quick pick",lines:"Select how many lines you want to buy",lineName:"Line",playType:"Select one play type you want to buy"},ro:{loading:"Se incarca, va rugam asteptati ...",error:"A fost o eroare in timp ce asteptam datele",grid:"Grid",multiplier:"Multiplicator",numberOfDraws:"Numarul de extrageri",wagerPerDraw:"Pariul per extragere",resetButton:"Reseteaza",autoButton:"quick pick",lines:"Select how many lines you want to buy",lineName:"Line",playType:"Select one play type you want to buy"},fr:{loading:"Loading, please wait ...",error:"It was an error while trying to fetch the data",grid:"Grid",multiplier:"Multiplier",numberOfDraws:"Number of draws",wagerPerDraw:"Wager per draw",resetButton:"Reset",autoButton:"quick pick",lines:"Select how many lines you want to buy",lineName:"Line",playType:"Select one play type you want to buy"},ar:{loading:"Loading, please wait ...",error:"It was an error while trying to fetch the data",grid:"Grid",multiplier:"Multiplier",numberOfDraws:"Number of draws",wagerPerDraw:"Wager per draw",resetButton:"Reset",autoButton:"quick pick",lines:"Select how many lines you want to buy",lineName:"Line",playType:"Select one play type you want to buy"},hr:{loading:"Učitavanje, molimo pričekajte ...",error:"Došlo je do pogreške prilikom pokušaja dohvaćanja podataka",grid:"Tablica",multiplier:"Multiplikator",numberOfDraws:"Broj izvlačenja",wagerPerDraw:"Ulog po izvlačenju",resetButton:"Resetiraj",autoButton:"quick pick",lines:"Select how many lines you want to buy",lineName:"Line",playType:"Select one play type you want to buy"}},h=(t,e)=>{const i=e;return c[void 0!==i&&l.includes(i)?i:"en"][t]};
|
|
1
|
+
import{r as t,c as e,h as i}from"./p-d0de5ea9.js";const s=["ro","en","hr"],o={en:{deleteTicket:"Delete ticket"},ro:{deleteTicket:"Sterge biletul"},fr:{deleteTicket:"Supprimer le billet"},ar:{deleteTicket:"حذف التذكرة"},hr:{deleteTicket:"Izbriši listić"}},r=class{constructor(i){t(this,i),this.accordionEvent=e(this,"helperAccordionAction",7),this.ticketHistoryFlag=!1,this.headerTitle="",this.headerSubtitle="",this.description="",this.footer=!1,this.deleteTab=!1,this.postMessage=!1,this.eventName="helperAccordionAction",this.collapsed=!0,this.language="en",this.clientStyling="",this.clientStylingUrlContent="",this.limitStylingAppends=!1,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)}}connectedCallback(){this.showContent=!this.collapsed}componentWillLoad(){var t;this.translationUrl&&(t=JSON.parse(this.translationUrl),Object.keys(t).forEach((e=>{for(let i in t[e])o[e][i]=t[e][i]})))}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}toggleContent(){this.showContent=!this.showContent}deleteAction(){this.postMessage&&window.postMessage({type:this.eventName},window.location.href),this.accordionEvent.emit()}render(){return i("div",{key:"2db19795aa22479f038d9fc7c936cf7403efa43e",class:"Wrapper",ref:t=>this.stylingContainer=t},i("div",{key:"6804e27dbd68e4f4182ab07beb665c53b54069b6",class:!0===this.ticketHistoryFlag?"HeaderTicketHistory":"Header",onClick:()=>this.toggleContent()},i("p",{key:"d1293990d39da1f50d36dff28e1abbe53259356b",class:"Title"},this.headerTitle),i("p",{key:"7632e3ddda5dea8e91d8a3935ff46c0f357c4397",class:"Subtitle"},this.headerSubtitle),i("p",{key:"1ab0dd4cc2625ef20c858738ee290e922e37dd21",class:"Subtitle Description"},this.description),i("span",{key:"3c7e3d3092aa97d24f62383e17a8a91646a78058",class:"Expand"},this.showContent?"<":">")),this.showContent&&i("div",{key:"ba970b8947e1986aedbdfd37b044e05f2b1c29fc"},i("div",{key:"7cfc0ca2b99d76d7647569f7105c29d1be8cf994",class:"Content"},i("slot",{key:"a2d866a914d33eac26b3b7e138e611be9f942c65",name:"accordionContent"}),this.footer&&this.showContent&&i("div",{key:"c44d54e98f712c921e7dd16faaaaa7cfb92e17c4"},this.deleteTab&&i("span",{key:"8c46aa94fcce959f370d07da69bd58509c143373",class:"ActionButton",onClick:()=>this.deleteAction()},(()=>{const t=this.language;return o[void 0!==t&&s.includes(t)?t:"en"].deleteTicket})())))))}};r.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.Header{border-radius:5px;background:var(--emw--color-background, #009993);display:flex;gap:30px;border:1px solid var(--emw--color-typography, #009993);padding:8px 10px;user-select:none;margin-bottom:1px;cursor:pointer}.Header:hover{background:var(--emw--color-background-secondary, #00ABA4)}.Header .Title,.Header .Subtitle,.Header .Description{margin:0;font-size:14px;color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));text-transform:capitalize}.Header .Expand{margin-left:auto;color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));width:17px;height:17px;cursor:pointer;text-align:center;transform:rotate(90deg);font-size:20px;user-select:none}.HeaderTicketHistory{border-radius:4px;background:var(--emw--color-gray-50, #F1F1F1);display:flex;gap:30px;border:1px solid var(--emw--color-typography, #009993);padding:8px 10px;user-select:none;margin-bottom:5px;cursor:pointer}.HeaderTicketHistory:hover{background:var(--emw--color-secondary, #00ABA4)}.HeaderTicketHistory .Title,.HeaderTicketHistory .Subtitle,.HeaderTicketHistory .Description{margin:0;font-size:14px;color:var(--emw--button-text-color, #000)}.HeaderTicketHistory .Expand{margin-left:auto;color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));width:17px;height:17px;cursor:pointer;text-align:center;transform:rotate(90deg);font-size:20px;user-select:none}.Content{border-radius:0 0 4px 4px;background:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));border:1px solid var(--emw--button-border-color, #009993);padding:10px 15px;user-select:none;color:var(--emw--button-text-color, #000);margin-bottom:10px}.ActionButton{cursor:pointer;display:inline-block;border-radius:var(--emw--button-border-radius, 4px);margin:20px 0 10px;text-transform:uppercase;font-size:12px;text-align:center;padding:8px 20px;min-width:80px;background:var(--emw--color-error, #FF3D00);border:1px solid var(--emw--color-error, #FF3D00);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255))}.ActionButton:hover{background:var(--emw--color-secondary, #FF6536);border:1px solid var(--emw--color-error, #FF3D00)}';const n=class{constructor(i){t(this,i),this.bulletEvent=e(this,"lotteryBulletSelection",7),this.value="0",this.selectable=!0,this.isSelected=!1,this.isBonus=!1,this.clientStyling="",this.clientStylingUrlContent="",this.limitStylingAppends=!1,this.select=()=>{this.selectable&&(this.isSelected=!this.isSelected,this.bulletEvent.emit({value:this.value,selected:this.isSelected}))},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)}}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}render(){return i("div",{key:"a21cbee8f556bfbbe9f97be5f44bfc08b6f24dd6",class:"Circle "+(this.selectable?"":"Disabled")+(this.isSelected?"Selected":"")+(this.isBonus?" Bonus":""),onClick:()=>this.select(),ref:t=>this.stylingContainer=t},this.value)}};n.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}@-webkit-keyframes Circle{0%{-webkit-transform:scale(0.5);transform:scale(0.5)}100%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes Circle{0%{-webkit-transform:scale(0.5);transform:scale(0.5)}100%{-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes hover-rotate{0%{-webkit-transform:scale(1) rotateZ(0);transform:scale(1) rotateZ(0)}50%{-webkit-transform:scale(1.2) rotateZ(180deg);transform:scale(1.22) rotateZ(180deg)}100%{-webkit-transform:scale(1) rotateZ(360deg);transform:scale(1) rotateZ(360deg)}}@keyframes hover-rotate{0%{-webkit-transform:scale(1) rotateZ(0);transform:scale(1) rotateZ(0)}50%{-webkit-transform:scale(1.2) rotateZ(180deg);transform:scale(1.2) rotateZ(180deg)}100%{-webkit-transform:scale(1) rotateZ(360deg);transform:scale(1) rotateZ(360deg)}}@-webkit-keyframes selected-scaleUp{0%{-webkit-transform:scale(0.5);transform:scale(0.5)}100%{-webkit-transform:scale(1.2);transform:scale(1.2)}}@keyframes selected-scaleUp{0%{-webkit-transform:scale(0.5);transform:scale(0.5)}100%{-webkit-transform:scale(1);transform:scale(1)}}.Circle{-webkit-animation:Circle 0.8s cubic-bezier(0.39, 0.575, 0.565, 1) both;animation:Circle 0.8s cubic-bezier(0.39, 0.575, 0.565, 1) both;cursor:pointer;color:var(--emw--button-text-color, #000);display:block;height:30px;width:30px;margin:0;display:flex;align-items:center;justify-content:center;justify-content:center;align-items:center;border:solid 2px var(--emw--color-gray-transparency-100, rgb(255, 255, 255));background:radial-gradient(circle at top, var(--emw--color-gray-transparency-100, rgb(255, 255, 255)) 0%, var(--emw--color-gray-transparency-100, rgb(255, 255, 255)) 100%);font-weight:bold;border-radius:50%;box-shadow:0 2px 4px 0 rgba(0, 0, 0, 0.5);user-select:none;font-size:16px;line-height:16px;font-weight:600;position:relative}.Circle:hover{-webkit-animation:hover-rotate 0.4s linear both;animation:hover-rotate 0.4s linear both;background:radial-gradient(circle at top, var(--emw--color-gray-transparency-100, rgb(255, 255, 255)) 0%, var(--emw--color-gray-50, #F1F1F1) 100%)}.Circle.Selected{-webkit-animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));background:var(--emw--color-primary, #9EC258);background:-webkit-radial-gradient(top, var(--emw--button-background-color, #00958f), var(--emw--color-primary-variant, #004D4A));background:-moz-radial-gradient(top, var(--emw--button-background-color, #00958f), var(--emw--color-primary-variant, #004D4A));background:radial-gradient(circle at top, var(--emw--button-background-color, #00958f), var(--emw--color-primary-variant, #004D4A));border:solid 2px var(--emw--button-border-color, #00958f)}.Circle.Disabled{-webkit-animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;color:var(--emw--color-gray-50, #F1F1F1);background:var(--emw--color-gray-100, #D4D4D4);border:solid 2px var(--emw--color-gray-100, #D4D4D4);cursor:default}.Circle.DisabledSelected{-webkit-animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;color:var(--emw--color-gray-50, #F1F1F1);background:var(--emw--color-primary, #9EC258);background:-webkit-radial-gradient(top, var(--emw--button-background-color, #00958f), var(--emw--color-primary-variant, #004D4A));background:-moz-radial-gradient(top, var(--emw--button-background-color, #00958f), var(--emw--color-primary-variant, #004D4A));background:radial-gradient(circle at top, var(--emw--button-background-color, #00958f), var(--emw--color-primary-variant, #004D4A));border:solid 2px var(--emw--color-gray-100, #D4D4D4);cursor:default}.Circle.Bonus{background:var(--emw--color-error, #FF3D00)}';const a=class{constructor(i){t(this,i),this.gridFilledEvent=e(this,"gridFilled",7),this.gridDirtyEvent=e(this,"gridDirty",7),this.gridClearAllEvent=e(this,"gridClearAllEvent",7),this.totalNumbers=0,this.maximumAllowed=7,this.minimumAllowed=3,this.selectable=!0,this.selectedNumbers="",this.secondaryNumbers="",this.displaySelected=!1,this.language="en",this.gridType="",this.clientStyling="",this.clientStylingUrlContent="",this.highNumber=47,this.lowNumber=1,this.selectionType="mainSelection",this.partialQuickpickAvailable=!1,this.numbers=[],this.bonusNumbers=[],this.limitStylingAppends=!1,this.selectedCounter=0,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)}}connectedCallback(){let t=[];this.selectedNumbers.length>0&&(t=this.selectedNumbers.split(","),this.selectedCounter=t.length),this.secondaryNumbers.length>0&&(this.bonusNumbers=this.secondaryNumbers.split(",").map((t=>({number:t,selected:!0,selectable:this.selectable})))),this.displaySelected?t.forEach((t=>{this.numbers.push({number:t,selected:!0,selectable:this.selectable})})):Array.from({length:this.highNumber-this.lowNumber+1},((t,e)=>this.lowNumber+e)).map((t=>t.toString())).forEach((e=>{this.numbers.push({number:e,selected:t.indexOf(e)>=0,selectable:this.selectedCounter!=this.maximumAllowed&&this.selectable})}))}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}shuffleArray(t){const e=[];for(;t.length>0;){const i=Math.floor(Math.random()*t.length);e.push(t.splice(i,1)[0])}return e}lotteryBulletSelectionHandler(t){this.numbers=this.numbers.map((e=>({number:e.number,selected:e.number==t.detail.value?t.detail.selected:e.selected,selectable:e.selectable}))),t.detail.selected?(this.selectedCounter+=1,this.selectedCounter>=this.minimumAllowed&&this.selectedCounter<=this.maximumAllowed&&(this.numbers=this.numbers.map((t=>this.selectedCounter===this.maximumAllowed?{number:t.number,selected:t.selected,selectable:!!t.selected}:{number:t.number,selected:t.selected,selectable:!0})),JSON.parse(this.numberRange).includes(this.selectedCounter)?this.gridFilledEvent.emit({id:this.ticketId,index:this.gridIndex,selectionType:this.selectionType,selectedNumbers:this.numbers.filter((t=>t.selected)).map((t=>t.number))}):this.gridDirtyEvent.emit({id:this.ticketId,index:this.gridIndex,selectionType:this.selectionType,selectedNumbers:this.numbers.filter((t=>t.selected)).map((t=>t.number))}))):(this.selectedCounter-=1,this.numbers=this.numbers.map((t=>({number:t.number,selected:t.selected,selectable:!0}))),this.selectedCounter<this.minimumAllowed?this.gridDirtyEvent.emit({id:this.ticketId,index:this.gridIndex,selectionType:this.selectionType,selectedNumbers:this.numbers.filter((t=>t.selected)).map((t=>t.number))}):this.gridFilledEvent.emit({id:this.ticketId,index:this.gridIndex,selectionType:this.selectionType,selectedNumbers:this.numbers.filter((t=>t.selected)).map((t=>t.number))}),0===this.selectedCounter&&this.gridClearAllEvent.emit(this.gridIndex))}async resetSelectionHandler(t){t.detail&&t.detail.ticketId==this.ticketId&&t.detail.index===this.gridIndex&&(this.selectedCounter=0,this.numbers=this.numbers.map((t=>({number:t.number,selected:!1,selectable:this.selectable}))),this.gridDirtyEvent.emit({id:this.ticketId,index:this.gridIndex,selectionType:this.selectionType,selectedNumbers:[]}))}async autoSelectionHandler(t){if(t.detail&&t.detail.ticketId==this.ticketId&&t.detail.index===this.gridIndex){this.resetSelectionHandler(t);let e=Array.from({length:this.highNumber-this.lowNumber+1},((t,e)=>this.lowNumber+e));e=this.shuffleArray(e),e=e.slice(0,this.minimumAllowed),this.numbers=this.numbers.map((t=>({number:t.number,selected:e.indexOf(parseInt(t.number,10))>=0,selectable:!!this.partialQuickpickAvailable&&e.indexOf(parseInt(t.number,10))>=0}))),this.gridFilledEvent.emit({id:this.ticketId,index:this.gridIndex,selectionType:this.selectionType,selectedNumbers:this.numbers.filter((t=>t.selected)).map((t=>t.number))}),this.selectedCounter=this.minimumAllowed}}render(){return i("div",{key:"8ad436904a126e6bee036c7372cf45c075022e5f",class:"GridContainer",ref:t=>this.stylingContainer=t},i("div",{key:"5a8818209485f0808a99978910f6f26473dd6f59",class:"ticket"===this.gridType?"Grid TicketGrid":"Grid"},this.numbers.map((t=>i("div",null,i("lottery-bullet",{value:t.number,selectable:t.selectable,"is-selected":t.selected,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent})))),this.bonusNumbers.length?this.bonusNumbers.map((t=>i("div",null,i("lottery-bullet",{value:t.number,selectable:t.selectable,"is-selected":t.selected,"is-bonus":!0,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent})))):""))}};a.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.GridContainer{display:flex;flex-direction:column;max-width:1200px}.Grid{margin-top:10px 0 10px 0;display:flex;flex-direction:row;flex-wrap:wrap;gap:20px}.Grid.TicketGrid{gap:5px}';const l=["ro","en","hr"],h={en:{loading:"Loading, please wait ...",error:"It was an error while trying to fetch the data",multiplier:"Multiplier",numberOfDraws:"Number of draws",wagerPerDraw:"Wager per draw",resetButton:"Reset",autoButton:"quick pick",lines:"Select how many lines you want to buy",lineName:"Line",playType:"Select one play type you want to buy"},ro:{loading:"Se incarca, va rugam asteptati ...",error:"A fost o eroare in timp ce asteptam datele",multiplier:"Multiplicator",numberOfDraws:"Numarul de extrageri",wagerPerDraw:"Pariul per extragere",resetButton:"Reseteaza",autoButton:"quick pick",lines:"Select how many lines you want to buy",lineName:"Line",playType:"Select one play type you want to buy"},fr:{loading:"Loading, please wait ...",error:"It was an error while trying to fetch the data",multiplier:"Multiplier",numberOfDraws:"Number of draws",wagerPerDraw:"Wager per draw",resetButton:"Reset",autoButton:"quick pick",lines:"Select how many lines you want to buy",lineName:"Line",playType:"Select one play type you want to buy"},ar:{loading:"Loading, please wait ...",error:"It was an error while trying to fetch the data",multiplier:"Multiplier",numberOfDraws:"Number of draws",wagerPerDraw:"Wager per draw",resetButton:"Reset",autoButton:"quick pick",lines:"Select how many lines you want to buy",lineName:"Line",playType:"Select one play type you want to buy"},hr:{loading:"Učitavanje, molimo pričekajte ...",error:"Došlo je do pogreške prilikom pokušaja dohvaćanja podataka",multiplier:"Multiplikator",numberOfDraws:"Broj izvlačenja",wagerPerDraw:"Ulog po izvlačenju",resetButton:"Resetiraj",autoButton:"quick pick",lines:"Select how many lines you want to buy",lineName:"Line",playType:"Select one play type you want to buy"}},c=(t,e)=>{const i=e;return h[void 0!==i&&l.includes(i)?i:"en"][t]};
|
|
2
2
|
/**
|
|
3
3
|
* @license
|
|
4
4
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
5
5
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6
6
|
*/
|
|
7
|
-
window.Vaadin||={},window.Vaadin.featureFlags||={};const
|
|
7
|
+
window.Vaadin||={},window.Vaadin.featureFlags||={};const d={};function u(t,e="24.6.3"){if(Object.defineProperty(t,"version",{get:()=>e}),t.experimental){const e="string"==typeof t.experimental?t.experimental:`${i=t.is.split("-").slice(1).join("-"),i.replace(/-[a-z]/gu,(t=>t[1].toUpperCase()))}Component`;if(!window.Vaadin.featureFlags[e]&&!d[e])return d[e]=new Set,d[e].add(t),void Object.defineProperty(window.Vaadin.featureFlags,e,{get:()=>0===d[e].size,set(t){t&&d[e].size>0&&(d[e].forEach((t=>{customElements.define(t.is,t)})),d[e].clear())}});if(d[e])return void d[e].add(t)}var i;const s=customElements.get(t.is);if(s){const e=s.version;e&&t.version&&e===t.version?console.warn(`The component ${t.is} has been loaded twice`):console.error(`Tried to define ${t.is} version ${t.version} when version ${s.version} is already in use. Something will probably break.`)}else customElements.define(t.is,t)}
|
|
8
8
|
/**
|
|
9
9
|
* @license
|
|
10
10
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
11
11
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12
|
-
*/class p extends HTMLElement{static get is(){return"vaadin-lumo-styles"}}
|
|
12
|
+
*/class p extends HTMLElement{static get is(){return"vaadin-lumo-styles"}}u(p);
|
|
13
13
|
/**
|
|
14
14
|
* @license
|
|
15
15
|
* Copyright 2019 Google LLC
|
|
16
16
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
17
17
|
*/
|
|
18
|
-
const m=globalThis,f=m.ShadowRoot&&(void 0===m.ShadyCSS||m.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,v=Symbol(),b=new WeakMap;class g{constructor(t,e,i){if(this._$cssResult$=!0,i!==v)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(f&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=b.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&b.set(e,t))}return t}toString(){return this.cssText}}const y=(t,...e)=>{const i=1===t.length?t[0]:e.reduce(((e,i,
|
|
18
|
+
const m=globalThis,f=m.ShadowRoot&&(void 0===m.ShadyCSS||m.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,v=Symbol(),b=new WeakMap;class g{constructor(t,e,i){if(this._$cssResult$=!0,i!==v)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(f&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=b.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&b.set(e,t))}return t}toString(){return this.cssText}}const y=(t,...e)=>{const i=1===t.length?t[0]:e.reduce(((e,i,s)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[s+1]),t[0]);return new g(i,t,v)},w=(t,e)=>{if(f)t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const i of e){const e=document.createElement("style"),s=m.litNonce;void 0!==s&&e.setAttribute("nonce",s),e.textContent=i.cssText,t.appendChild(e)}},x=f?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return(t=>new g("string"==typeof t?t:t+"",void 0,v))(e)})(t):t
|
|
19
19
|
/**
|
|
20
20
|
* @license
|
|
21
21
|
* Copyright 2017 Google LLC
|
|
22
22
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
23
|
-
*/,{is:k,defineProperty:_,getOwnPropertyDescriptor:A,getOwnPropertyNames:S,getOwnPropertySymbols:C,getPrototypeOf:T}=Object,z=globalThis,N=z.trustedTypes,E=N?N.emptyScript:"",O=z.reactiveElementPolyfillSupport,I={toAttribute(t,e){switch(e){case Boolean:t=t?E:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},
|
|
23
|
+
*/,{is:k,defineProperty:_,getOwnPropertyDescriptor:A,getOwnPropertyNames:S,getOwnPropertySymbols:C,getPrototypeOf:T}=Object,z=globalThis,N=z.trustedTypes,E=N?N.emptyScript:"",O=z.reactiveElementPolyfillSupport,I={toAttribute(t,e){switch(e){case Boolean:t=t?E:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},P=(t,e)=>!k(t,e),B={attribute:!0,type:String,converter:I,reflect:!1,hasChanged:P};Symbol.metadata??=Symbol("metadata"),z.litPropertyMetadata??=new WeakMap;class M extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=B){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const i=Symbol(),s=this.getPropertyDescriptor(t,i,e);void 0!==s&&_(this.prototype,t,s)}}static getPropertyDescriptor(t,e,i){const{get:s,set:o}=A(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get(){return s?.call(this)},set(e){const r=s?.call(this);o.call(this,e),this.requestUpdate(t,r,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??B}static _$Ei(){if(this.hasOwnProperty("elementProperties"))return;const t=T(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty("finalized"))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty("properties")){const t=this.properties,e=[...S(t),...C(t)];for(const i of e)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,i]of e)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const i=this._$Eu(t,e);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(x(t))}else void 0!==t&&e.push(x(t));return e}static _$Eu(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const i of e.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return w(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EC(t,e){const i=this.constructor.elementProperties.get(t),s=this.constructor._$Eu(t,i);if(void 0!==s&&!0===i.reflect){const o=(void 0!==i.converter?.toAttribute?i.converter:I).toAttribute(e,i.type);this._$Em=t,null==o?this.removeAttribute(s):this.setAttribute(s,o),this._$Em=null}}_$AK(t,e){const i=this.constructor,s=i._$Eh.get(t);if(void 0!==s&&this._$Em!==s){const t=i.getPropertyOptions(s),o="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:I;this._$Em=s,this[s]=o.fromAttribute(e,t.type),this._$Em=null}}requestUpdate(t,e,i){if(void 0!==t){if(i??=this.constructor.getPropertyOptions(t),!(i.hasChanged??P)(this[t],e))return;this.P(t,e,i)}!1===this.isUpdatePending&&(this._$ES=this._$ET())}P(t,e,i){this._$AL.has(t)||this._$AL.set(t,e),!0===i.reflect&&this._$Em!==t&&(this._$Ej??=new Set).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,i]of t)!0!==i.wrapped||this._$AL.has(e)||void 0===this[e]||this.P(e,this[e],i)}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(e)):this._$EU()}catch(e){throw t=!1,this._$EU(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&=this._$Ej.forEach((t=>this._$EC(t,this[t]))),this._$EU()}updated(t){}firstUpdated(t){}}M.elementStyles=[],M.shadowRootOptions={mode:"open"},M.elementProperties=new Map,M.finalized=new Map,O?.({ReactiveElement:M}),(z.reactiveElementVersions??=[]).push("2.0.4");
|
|
24
24
|
/**
|
|
25
25
|
* @license
|
|
26
26
|
* Copyright 2017 Google LLC
|
|
27
27
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
28
28
|
*/
|
|
29
|
-
const D=globalThis,j=D.trustedTypes,F=j?j.createPolicy("lit-html",{createHTML:t=>t}):void 0,
|
|
29
|
+
const D=globalThis,j=D.trustedTypes,F=j?j.createPolicy("lit-html",{createHTML:t=>t}):void 0,L="$lit$",R=`lit$${Math.random().toFixed(9).slice(2)}$`,H="?"+R,W=`<${H}>`,G=document,U=()=>G.createComment(""),q=t=>null===t||"object"!=typeof t&&"function"!=typeof t,J=Array.isArray,V="[ \t\n\f\r]",Y=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,$=/-->/g,Z=/>/g,K=RegExp(`>|${V}(?:([^\\s"'>=/]+)(${V}*=${V}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),X=/'/g,Q=/"/g,tt=/^(?:script|style|textarea|title)$/i,et=Symbol.for("lit-noChange"),it=Symbol.for("lit-nothing"),st=new WeakMap,ot=G.createTreeWalker(G,129);function rt(t,e){if(!J(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==F?F.createHTML(e):e}const nt=(t,e)=>{const i=t.length-1,s=[];let o,r=2===e?"<svg>":3===e?"<math>":"",n=Y;for(let e=0;e<i;e++){const i=t[e];let a,l,h=-1,c=0;for(;c<i.length&&(n.lastIndex=c,l=n.exec(i),null!==l);)c=n.lastIndex,n===Y?"!--"===l[1]?n=$:void 0!==l[1]?n=Z:void 0!==l[2]?(tt.test(l[2])&&(o=RegExp("</"+l[2],"g")),n=K):void 0!==l[3]&&(n=K):n===K?">"===l[0]?(n=o??Y,h=-1):void 0===l[1]?h=-2:(h=n.lastIndex-l[2].length,a=l[1],n=void 0===l[3]?K:'"'===l[3]?Q:X):n===Q||n===X?n=K:n===$||n===Z?n=Y:(n=K,o=void 0);const d=n===K&&t[e+1].startsWith("/>")?" ":"";r+=n===Y?i+W:h>=0?(s.push(a),i.slice(0,h)+L+i.slice(h)+R+d):i+R+(-2===h?e:d)}return[rt(t,r+(t[i]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),s]};class at{constructor({strings:t,_$litType$:e},i){let s;this.parts=[];let o=0,r=0;const n=t.length-1,a=this.parts,[l,h]=nt(t,e);if(this.el=at.createElement(l,i),ot.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(s=ot.nextNode())&&a.length<n;){if(1===s.nodeType){if(s.hasAttributes())for(const t of s.getAttributeNames())if(t.endsWith(L)){const e=h[r++],i=s.getAttribute(t).split(R),n=/([.?@])?(.*)/.exec(e);a.push({type:1,index:o,name:n[2],strings:i,ctor:"."===n[1]?ut:"?"===n[1]?pt:"@"===n[1]?mt:dt}),s.removeAttribute(t)}else t.startsWith(R)&&(a.push({type:6,index:o}),s.removeAttribute(t));if(tt.test(s.tagName)){const t=s.textContent.split(R),e=t.length-1;if(e>0){s.textContent=j?j.emptyScript:"";for(let i=0;i<e;i++)s.append(t[i],U()),ot.nextNode(),a.push({type:2,index:++o});s.append(t[e],U())}}}else if(8===s.nodeType)if(s.data===H)a.push({type:2,index:o});else{let t=-1;for(;-1!==(t=s.data.indexOf(R,t+1));)a.push({type:7,index:o}),t+=R.length-1}o++}}static createElement(t,e){const i=G.createElement("template");return i.innerHTML=t,i}}function lt(t,e,i=t,s){if(e===et)return e;let o=void 0!==s?i._$Co?.[s]:i._$Cl;const r=q(e)?void 0:e._$litDirective$;return o?.constructor!==r&&(o?._$AO?.(!1),void 0===r?o=void 0:(o=new r(t),o._$AT(t,i,s)),void 0!==s?(i._$Co??=[])[s]=o:i._$Cl=o),void 0!==o&&(e=lt(t,o._$AS(t,e.values),o,s)),e}class ht{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:i}=this._$AD,s=(t?.creationScope??G).importNode(e,!0);ot.currentNode=s;let o=ot.nextNode(),r=0,n=0,a=i[0];for(;void 0!==a;){if(r===a.index){let e;2===a.type?e=new ct(o,o.nextSibling,this,t):1===a.type?e=new a.ctor(o,a.name,a.strings,this,t):6===a.type&&(e=new ft(o,this,t)),this._$AV.push(e),a=i[++n]}r!==a?.index&&(o=ot.nextNode(),r++)}return ot.currentNode=G,s}p(t){let e=0;for(const i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class ct{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,i,s){this.type=2,this._$AH=it,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=s,this._$Cv=s?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=lt(this,t,e),q(t)?t===it||null==t||""===t?(this._$AH!==it&&this._$AR(),this._$AH=it):t!==this._$AH&&t!==et&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>J(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==it&&q(this._$AH)?this._$AA.nextSibling.data=t:this.T(G.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:i}=t,s="number"==typeof i?this._$AC(t):(void 0===i.el&&(i.el=at.createElement(rt(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===s)this._$AH.p(e);else{const t=new ht(s,this),i=t.u(this.options);t.p(e),this.T(i),this._$AH=t}}_$AC(t){let e=st.get(t.strings);return void 0===e&&st.set(t.strings,e=new at(t)),e}k(t){J(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,s=0;for(const o of t)s===e.length?e.push(i=new ct(this.O(U()),this.O(U()),this,this.options)):i=e[s],i._$AI(o),s++;s<e.length&&(this._$AR(i&&i._$AB.nextSibling,s),e.length=s)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class dt{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,i,s,o){this.type=1,this._$AH=it,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=o,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=it}_$AI(t,e=this,i,s){const o=this.strings;let r=!1;if(void 0===o)t=lt(this,t,e,0),r=!q(t)||t!==this._$AH&&t!==et,r&&(this._$AH=t);else{const s=t;let n,a;for(t=o[0],n=0;n<o.length-1;n++)a=lt(this,s[i+n],e,n),a===et&&(a=this._$AH[n]),r||=!q(a)||a!==this._$AH[n],a===it?t=it:t!==it&&(t+=(a??"")+o[n+1]),this._$AH[n]=a}r&&!s&&this.j(t)}j(t){t===it?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class ut extends dt{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===it?void 0:t}}class pt extends dt{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==it)}}class mt extends dt{constructor(t,e,i,s,o){super(t,e,i,s,o),this.type=5}_$AI(t,e=this){if((t=lt(this,t,e,0)??it)===et)return;const i=this._$AH,s=t===it&&i!==it||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,o=t!==it&&(i===it||s);s&&this.element.removeEventListener(this.name,this,i),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class ft{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){lt(this,t)}}const vt=D.litHtmlPolyfillSupport;vt?.(at,ct),(D.litHtmlVersions??=[]).push("3.2.1");
|
|
30
30
|
/**
|
|
31
31
|
* @license
|
|
32
32
|
* Copyright 2017 Google LLC
|
|
33
33
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
34
34
|
*/
|
|
35
|
-
class bt extends M{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,i)=>{const
|
|
35
|
+
class bt extends M{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,i)=>{const s=i?.renderBefore??e;let o=s._$litPart$;if(void 0===o){const t=i?.renderBefore??null;s._$litPart$=o=new ct(e.insertBefore(U(),t),t,void 0,i??{})}return o._$AI(t),o})(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return et}}bt._$litElement$=!0,bt.finalized=!0,globalThis.litElementHydrateSupport?.({LitElement:bt});const gt=globalThis.litElementPolyfillSupport;gt?.({LitElement:bt}),(globalThis.litElementVersions??=[]).push("4.1.1");
|
|
36
36
|
/**
|
|
37
37
|
* @license
|
|
38
38
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
@@ -43,12 +43,12 @@ const yt=t=>class extends t{static get properties(){return{_theme:{type:String,r
|
|
|
43
43
|
* @license
|
|
44
44
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
45
45
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
46
|
-
*/,wt=[],xt=new Set,kt=new Set;function _t(t){return t&&Object.prototype.hasOwnProperty.call(t,"__themes")}function At(t,e){return(t||"").split(" ").some((t=>new RegExp(`^${t.split("*").join(".*")}$`,"u").test(e)))}function St(t){return t.map((t=>t.cssText)).join("\n")}const Ct="vaadin-themable-mixin-style";function Tt(t){t.prototype instanceof bt?t.elementStyles=t.finalizeStyles(t.styles):t.prototype._template.content.getElementById(Ct).textContent=St(t.getStylesForThis()),kt.forEach((e=>{const i=customElements.get(e);i!==t&&i.prototype instanceof t&&Tt(i)}))}function zt(t,e,i={}){e=function(t=[]){return[t].flat(1/0).filter((t=>t instanceof g||(console.warn("An item in styles is not of type CSSResult. Use `unsafeCSS` or `css`."),!1)))}(e),window.Vaadin&&window.Vaadin.styleModules?window.Vaadin.styleModules.registerStyles(t,e,i):wt.push({themeFor:t,styles:e,include:i.include,moduleId:i.moduleId}),t&&kt.forEach((i=>{if(At(t,i)&&function(t){return _t(customElements.get(t))}(i)){const t=customElements.get(i);!function(t,e){const i=t.__themes;return!(!i||!e)&&i.some((t=>t.styles.some((t=>e.some((e=>e.cssText===t.cssText))))))}(t,e)?window.Vaadin&&window.Vaadin.suppressPostFinalizeStylesWarning||console.warn(`The custom element definition for "${i}" was finalized before a style module was registered. Ideally, import component specific style modules before importing the corresponding custom element. This warning can be suppressed by setting "window.Vaadin.suppressPostFinalizeStylesWarning = true".`):console.warn(`Registering styles that already exist for ${i}`),Tt(t),function(t){xt.forEach((e=>{const i=e.deref();i instanceof t?function(t){if(!t.shadowRoot)return;const e=t.constructor;t instanceof bt?([...t.shadowRoot.querySelectorAll("style")].forEach((t=>t.remove())),w(t.shadowRoot,e.elementStyles)):t.shadowRoot.getElementById(Ct).textContent=e.prototype._template.content.getElementById(Ct).textContent}(i):i||xt.delete(e)}))}(t)}}))}function Nt(){return window.Vaadin&&window.Vaadin.styleModules?window.Vaadin.styleModules.getAllThemes():wt}function Et(t=""){let e=0;return t.startsWith("lumo-")||t.startsWith("material-")?e=1:t.startsWith("vaadin-")&&(e=2),e}function Ot(t){const e=[];return t.include&&[].concat(t.include).forEach((t=>{const i=Nt().find((e=>e.moduleId===t));i?e.push(...Ot(i),...i.styles):console.warn(`Included moduleId ${t} not found in style registry`)}),t.styles),e}function It(t){const e=`${t}-default-theme`,i=Nt().filter((i=>i.moduleId!==e&&At(i.themeFor,t))).map((t=>({...t,styles:[...Ot(t),...t.styles],includePriority:Et(t.moduleId)}))).sort(((t,e)=>e.includePriority-t.includePriority));return i.length>0?i:Nt().filter((t=>t.moduleId===e))}const
|
|
46
|
+
*/,wt=[],xt=new Set,kt=new Set;function _t(t){return t&&Object.prototype.hasOwnProperty.call(t,"__themes")}function At(t,e){return(t||"").split(" ").some((t=>new RegExp(`^${t.split("*").join(".*")}$`,"u").test(e)))}function St(t){return t.map((t=>t.cssText)).join("\n")}const Ct="vaadin-themable-mixin-style";function Tt(t){t.prototype instanceof bt?t.elementStyles=t.finalizeStyles(t.styles):t.prototype._template.content.getElementById(Ct).textContent=St(t.getStylesForThis()),kt.forEach((e=>{const i=customElements.get(e);i!==t&&i.prototype instanceof t&&Tt(i)}))}function zt(t,e,i={}){e=function(t=[]){return[t].flat(1/0).filter((t=>t instanceof g||(console.warn("An item in styles is not of type CSSResult. Use `unsafeCSS` or `css`."),!1)))}(e),window.Vaadin&&window.Vaadin.styleModules?window.Vaadin.styleModules.registerStyles(t,e,i):wt.push({themeFor:t,styles:e,include:i.include,moduleId:i.moduleId}),t&&kt.forEach((i=>{if(At(t,i)&&function(t){return _t(customElements.get(t))}(i)){const t=customElements.get(i);!function(t,e){const i=t.__themes;return!(!i||!e)&&i.some((t=>t.styles.some((t=>e.some((e=>e.cssText===t.cssText))))))}(t,e)?window.Vaadin&&window.Vaadin.suppressPostFinalizeStylesWarning||console.warn(`The custom element definition for "${i}" was finalized before a style module was registered. Ideally, import component specific style modules before importing the corresponding custom element. This warning can be suppressed by setting "window.Vaadin.suppressPostFinalizeStylesWarning = true".`):console.warn(`Registering styles that already exist for ${i}`),Tt(t),function(t){xt.forEach((e=>{const i=e.deref();i instanceof t?function(t){if(!t.shadowRoot)return;const e=t.constructor;t instanceof bt?([...t.shadowRoot.querySelectorAll("style")].forEach((t=>t.remove())),w(t.shadowRoot,e.elementStyles)):t.shadowRoot.getElementById(Ct).textContent=e.prototype._template.content.getElementById(Ct).textContent}(i):i||xt.delete(e)}))}(t)}}))}function Nt(){return window.Vaadin&&window.Vaadin.styleModules?window.Vaadin.styleModules.getAllThemes():wt}function Et(t=""){let e=0;return t.startsWith("lumo-")||t.startsWith("material-")?e=1:t.startsWith("vaadin-")&&(e=2),e}function Ot(t){const e=[];return t.include&&[].concat(t.include).forEach((t=>{const i=Nt().find((e=>e.moduleId===t));i?e.push(...Ot(i),...i.styles):console.warn(`Included moduleId ${t} not found in style registry`)}),t.styles),e}function It(t){const e=`${t}-default-theme`,i=Nt().filter((i=>i.moduleId!==e&&At(i.themeFor,t))).map((t=>({...t,styles:[...Ot(t),...t.styles],includePriority:Et(t.moduleId)}))).sort(((t,e)=>e.includePriority-t.includePriority));return i.length>0?i:Nt().filter((t=>t.moduleId===e))}const Pt=t=>class extends(yt(t)){constructor(){super(),xt.add(new WeakRef(this))}static finalize(){if(super.finalize(),this.is&&kt.add(this.is),this.elementStyles)return;const t=this.prototype._template;t&&!_t(this)&&function(t,e){const i=document.createElement("style");i.id=Ct,i.textContent=St(t),e.content.appendChild(i)}(this.getStylesForThis(),t)}static finalizeStyles(t){const e=this.getStylesForThis();return t?[...[t].flat(1/0),...e]:e}static getStylesForThis(){const e=t.__themes||[],i=Object.getPrototypeOf(this.prototype);this.__themes=[...e,...(i?i.constructor.__themes:[])||[],...It(this.is)];const s=this.__themes.flatMap((t=>t.styles));return s.filter(((t,e)=>e===s.lastIndexOf(t)))}}
|
|
47
47
|
/**
|
|
48
48
|
* @license
|
|
49
49
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
50
50
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
51
|
-
*/,
|
|
51
|
+
*/,Bt=(t,...e)=>{((t,...e)=>{const i=document.createElement("style");i.id=t,i.textContent=e.map((t=>t.toString())).join("\n").replace(":host","html"),document.head.insertAdjacentElement("afterbegin",i)})(`lumo-${t}`,e)};Bt("color-props",y`
|
|
52
52
|
:host {
|
|
53
53
|
/* Base (background) */
|
|
54
54
|
--lumo-base-color: #fff;
|
|
@@ -251,7 +251,7 @@ const yt=t=>class extends t{static get properties(){return{_theme:{type:String,r
|
|
|
251
251
|
pre code {
|
|
252
252
|
background: transparent;
|
|
253
253
|
}
|
|
254
|
-
`,{moduleId:"lumo-color"}),
|
|
254
|
+
`,{moduleId:"lumo-color"}),Bt("sizing-props",y`
|
|
255
255
|
:host {
|
|
256
256
|
--lumo-size-xs: 1.625rem;
|
|
257
257
|
--lumo-size-s: 1.875rem;
|
|
@@ -349,7 +349,7 @@ const yt=t=>class extends t{static get properties(){return{_theme:{type:String,r
|
|
|
349
349
|
--vaadin-input-field-value-font-size: var(--lumo-font-size-m);
|
|
350
350
|
--vaadin-input-field-value-font-weight: 500;
|
|
351
351
|
}
|
|
352
|
-
`,
|
|
352
|
+
`,Bt("style-props",y`
|
|
353
353
|
:host {
|
|
354
354
|
/* Border radius */
|
|
355
355
|
--lumo-border-radius-s: 0.25em; /* Checkbox, badge, date-picker year indicator, etc */
|
|
@@ -484,7 +484,7 @@ const Mt=y`
|
|
|
484
484
|
border-left: none;
|
|
485
485
|
border-right: 2px solid var(--lumo-contrast-30pct);
|
|
486
486
|
}
|
|
487
|
-
`,{moduleId:"lumo-typography"}),
|
|
487
|
+
`,{moduleId:"lumo-typography"}),Bt("typography-props",Mt),zt("vaadin-input-container",y`
|
|
488
488
|
:host {
|
|
489
489
|
background: var(--_background);
|
|
490
490
|
padding: 0 calc(0.375em + var(--_input-container-radius) / 4 - 1px);
|
|
@@ -662,7 +662,7 @@ const Mt=y`
|
|
|
662
662
|
--_lumo-text-field-overflow-mask-image: linear-gradient(to left, transparent 0.25em, #000 1.5em);
|
|
663
663
|
}
|
|
664
664
|
}
|
|
665
|
-
`,{moduleId:"lumo-input-container"}),
|
|
665
|
+
`,{moduleId:"lumo-input-container"}),Bt("font-icons",y`
|
|
666
666
|
@font-face {
|
|
667
667
|
font-family: 'lumo-icons';
|
|
668
668
|
src: url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAABHAAAsAAAAAI6AAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADsAAABUIIslek9TLzIAAAFEAAAAQwAAAFZAIUuNY21hcAAAAYgAAAD+AAADymne8hxnbHlmAAACiAAAC+gAABioIzlOlWhlYWQAAA5wAAAAMAAAADZa/6SsaGhlYQAADqAAAAAdAAAAJAbpA4BobXR4AAAOwAAAABAAAAC0q+AAAGxvY2EAAA7QAAAAXAAAAFyF7o1GbWF4cAAADywAAAAfAAAAIAFMAXBuYW1lAAAPTAAAATEAAAIuUUJZCHBvc3QAABCAAAABPQAAAgfdkltveJxjYGRgYOBiMGCwY2BycfMJYeDLSSzJY5BiYGGAAJA8MpsxJzM9kYEDxgPKsYBpDiBmg4gCACY7BUgAeJxjYGS+xDiBgZWBgamKaQ8DA0MPhGZ8wGDIyAQUZWBlZsAKAtJcUxgcXjG+0mEO+p/FEMUcxDANKMwIkgMABvgMMAB4nO3SV26EMABF0UsZpjG9d6Y3FpgF5StLYxMTP16WEUvHV1gGIQzQAJKgDFKIfojQ+A6rUb2e0KnXU77qPanWq/LzCXOkOVyn9RyHvWl4YkaTFu1wX5ecHn0GDBkxZsKUGXMWLFmxZsOWHXsOFBw5cebClRt3Hjx58dZ7RRn/I9cUF39Xpb691acRG2piOtUqNZ1P1TCdeJUZatNQW4baNtSO6U+ouoaam96u6hlq31AHhjo01JGhjg11YqhTQ50Z6txQF4a6NNSVoa4NdWOoW0PdGereUA+GWhjq0VBPhno21IuhXg31Zqh3Q30Y6tNQX4b6NtTSKH8BOIRpQQAAeJy1WH1sW9UVv+fG9vPz+7Bf/N6zHcd2/J04jbP6s0lap4kDpB9JWzUUCqxNgaHxpTI6hNhUNLVr17HSISb2D2iAJrWb6FTWahNQdQxRvmHamAR0qibE1E18CG3QaVNFvJ17n+3YIf1AiMQ679x77j3v3HPPPed3H7ER/OsYpw8TmQRIiuQJ8RZK+WjO1B3xaCzla21orY10a+OQ6aHTHtP0zB31mBs1GZ6RNU2uXc7oPL+xdRS9R9X1oK4fVfijdsBqvqF6vd1eLzPrYrYZ57WteF7bPDIc5+ZcJnta+S9i2Vfhs4MaMwZNQmO0Vv7gF/MZcNsCcJp4sJFSwYyAmRuFCmTBDRBUkwGqnlViyjmVBpLqaXhNpt0J5V1JOqMkuqn8WkMHvZX+iOlImiqkBiFVYDrCqINulmkwKb8ry2fkZBBn7FcTlk4ZdfpRZ9MOesLSAakKt0N3g4p2jAL8eIEOOqom/U0lgQRXUl8LtXM7HFkojUIpF0ErVBhcZC1vtyjtpsqr83a8RVcSH+ool8LgcIMjNohmVCACuDs506BdO6WIQeXjUsh1XKZGRNpp9piv3+Givoh00OU6KEV81HUHTLtN093Q+YGlE3wLHWRtMNy9XWqdLm2HKbaNsGzhu+41eswFOjE6WKSk2/1Wpt+qHeM6phbohmVmj3GvpdcVkiy9zbXfzHVqKuDB0IR2P6ZpF+D7dy6YC/9svGmBE5hKB9+X2+hh4iYRMkhGyTqyFc9APmeGQHf043tWQKHkizmwaY5AroTNVJzJDc2SFzUu92kOLsdmKu77vByb8/IjtxmhkMFISRBFISO4XMLJlj4XgGuRXtaHw2FLyHifdSOpisIhJjgkiPBAyJh7lfXTkhEadwk1mUngrOC6MazX7mASeEAPV1FyjEumBOaEDu4DP/ogRDKkiLEV1woVyMeLLKJCEM+FwdCwL4XLcRgdbfkhbzS8BNvXDKzNQiAWgOzagTXF1Eyq+Ci6/TPm/JrNY/59p1epKN4jQFGe0fx+LTMwNVCrAU2VSqnaKYzIiGmWe2Rvp9KDJhncrjLaFce8VCUbyQ1kB9lNfkJ+To6R58mfyd/Ip9ABXohDHqqwEW7A2Mij1ehntLu+h8xMtocjUJcYwoLdtYafv/1Vjy8vjLaLtBfOt3/B931Rexa24e5zstgnyqvZHs69zuhq3vFgRpQVJyN7FuE++RLSeW4xMi+t6Zeo5sIK6S5dlGVRD2hWnGoB3j7OV3lesvNLic8tOnLRSRfRdOna63VJp/1WbYs5dFZjy1AqpGICQEWKmNI+CZNoVTJ7pNop+IZkRrBHgnEmqr3TrEsfw1Gi8LqE+S1aV0SNNwXVVVvuUoU3ld6TLwmditIpvKTU50zSzWwO1h0rL8awnulwTXMYrGDT4aQ1fb4GPkyv5vMEh5Vec6yw0AMXnfcx1l/rfVZaKLDi0W4j/HfeyGZuHOf1IUGW1udizU2leXY0OmLpVDpVKJfKpZzPRKHgEBzpXAUKWYipoIeBdl3JfLZVBizEqWun1i4ZGFiyduq3DebayXsmJ+95gBG4+Urm1a2SdpKV57lP2wZyZqI+FAlfUtO+NCmgdWhMOS1gDY+jHWnBhwjBQLMEXxmLbx6t9JXTWDLtsSxgisfErqvQMbbBoywZmeyLeWe8OWNydFDxzMx4lMGRtX0xN3YFJkeW+O0bascGNwwObtjCCOzrzAVWjSwN2K9cpyn9o5cZOXMmkAuM85EbNHnJyHhfLLCnPhxJYw9eoIMkyC3l+4ZuY5ig7lW2oYUynDgg+Xrk+++Xe3zSgRYetnyuy+KbfjiB+GAAtZ8HHXmtijZfFFgrujhmOs2qkXvuSV6WqA1WLYqhPHOfsa26rklKFqbAGL2dOIlGurB6LWFVFd/KoBBaYTFYVBs93hZRFlrG5Ex4NVFIJguJVvqnBW2kNNvFGx90YUcSEvyZSMDeZjc0xYlEYy8+hHcWx9YrZOaPPyCGepP5Q34aXnGBr8d1QhSf4yjtiebZqNJfEYl4SY6dDRb8WSguLZW9ZQtBpoW4hX0QMyB2KmsYcOh8HMQxBn288oZ6BXV0GOq/ClKsC6T8g9X3OFKZNkJrYkOx2lEk+KNDy953+wGHXuGGzhGZ+uLK8FVrQkbtKBv+9EztU2sgTCNpvXMdJjqJ4tkdw+x00dPKkZ1QR254x7GQoFmvfakSnL3gCc5nREly2mN2pyTLMacMipNT7YInGU7JzlN2p9N+yinXTirOKEvPUafSWMNDmCf9pIQYaG19DSxKGqvAQ+xg60iabEm5MheUU2n+HxO4TDDbjnw6xxK8QzfhbHXq8pWVqanKysun9s6ztdt7sivGqruqYyuyPS6Hw9XehGt6q+l0dT0jvaFMZjiTuTHo7+vdtHJTb58/2ML+IxHt9/n9vv5owiWKrrbWD+sakKxhKoYzxF5f7y9INxki42QNuYrVFDPfvqxyY83xWNMV+ZxPSMWb62W+wPSCJwkDDl1WZOGW84nAEo4A7HjB/uWmOdayRFnKjazi668u/ajJlUd87aPk048Crlu4j1Oh9gxdL3Z1inNPIt2xvKNlsU4hn54Z5Y6YbTDu9hHOvkcFAb35fU6hNovKOrtQmcvbNV9/Ntfv5xf4atDWOOTX6CSHZ08xujhPs51+f9zvf1YLIGoPPKvxVh0TSLAXzzUBFiXs7GJVB7vH5/PAXznd4+vx4a95h3qI/oYIpIdMkA1kC7kVLS3GhWI5bwj1fIaVKG/Ei5gXWOjhtcJbzFthaMQrwIcIRj0ppvO6yV95icu9j/YPDNySWp7w+kOr95R1RfGpfVlDVhS/2geJ5Umv2mn0rkxBvzvgdisndJXaVF1X5z5jdHGe2n/QnYo8+b2uaMivhowgjYcLnVqnrEpQezsieyVZ6ooETbdJO6ip+cORLpes6BL82/qg8VHbo45B/vch/YQeJX28QvEANR3sQhxh+TcMCEd4l8BKF7uID7KM05tRYlIHHXY63YIi2fXQyj5XSBbcMeewKLpttkJ2Syz33YJfDdJdSYkqHbYb3VHRJgTV8c0TAy67YHeK7htwOKWax5co7Do8Pfh1tKdx1g5j9o6TZeQyMo27FuW3vbYsbY/Op3AG06DMKionRlpgHzCEeMmLU5opRrCyS670RzppZeW5p/iT3jL3lB4O63QS6dzzh8SAtOqwGJK3bv+lGJTWbr++471wsVKMRJCEK5H+cLg/Qp+IDsdqs7HhKD7hMXyyrD/Li8RjRqimHhI7HP2vSDZn9brplySb0L9dgpURSwmSiBFhilrwB8OA9gZ29NkRO/669parW9e7XZDxwvgRu+SE7zgl+xG5p/HtRqJ3cdwSZwsbwTA1WT3jEdyPN0sWxvDGy+xovIzHosnwc9LePf9tywun0fMkWaFYZbB4oovRq8VyKYUBkMVXqVhBHSylQ0wanvla3+rQ1XbR8ZzstYOo2Mf7vjk8ftcGDWxdSdXx0cAVveHg1TZFtEOn8ntBBFs11V++vuLUQ5qz+U6d/oUjpGIdNjOQhJXNqn5YCS1Yy5PofLGEs6Js2yOKe2yyOLxtaGjbt7cNIURCEDdWfaQ6lurtRYbePCuItv1iUNxvE4Vdw2zQ0LZhdv2fxjHp5uAmdlBpopHXoJGU8e6BRc0yi+PztkaHTRRrW1m2hcfFLlEUzzD+DGczjEVCg9jEQZhFcdAL2DjD+DPiSWQzjM2I89g5RXdxfECS+CIWy1hTGmFs6EIbkv/pbtkfU3aPrZ+4c2Lizn07qufym/L5TTdtyuU2/We3HPeDsjtb3bGPSSfW31aX3LQpX/d9sL7fWYpRJPBbCJavYjrFjj0rT2GWCZjf6Ytffr8beXl/HYeyGwJiIK8FLDHbfo65xGz7YCSRqCQSkbbHI5eUU5X4sjj+zrU9aHnRlEnrd7YGptd0x2Jf/RbH9PAiovadckSnEsJ661OgPFuH9B4O6e202vIN0h9xHXSJh1wRP5Vqv1uI6Wn9Gxmrwzqrii1gqhEscJanuAlGas+s2/uzvetgS72NpHZ6aHbZstmh/wPq1seEeJxjYGRgYADi31ySEvH8Nl8ZuJlfAEUYalQ3NCLo/6+ZpzLdAnI5GJhAogAiBgraeJxjYGRgYA76nwUkXzAAAfNUBkYGVKALAFb4A3EAAAB4nGNgYGBgfjG0MAAMzihlAAAAAABOAJoA6AEKASwBTgFwAZoBxAHuAhoCnALoBJoEvATWBPIFDgUqBXoF0AX+BkQGlga4BwgHagfiCGoIpAi8CVAJmAoQCiwKVgqQCtYLGAtOC4gL6AwuDFR4nGNgZGBg0GVMYRBlAAEmIOYCQgaG/2A+AwAYygG+AHicbZE9TsMwGIbf9A/RSggEYmHxAgtq+jN2ZGj3Dt3T1GlTOXHkuBW9AyfgEByCgTNwCA7BW/NJlVBtyd/jx+8XKwmAa3whwnFE6Ib1OBq44O6Pm6Qb4Rb5QbiNHh6FO/RD4S6eMRHu4RaaT4halzR3eBVu4Apvwk36d+EW+UO4jXt8Cnfov4W7WOBHuIen6MXsCtvPU1vWc73emcSdxIkW2tW5LdUoHp7kTJfaJV6v1PKg6v167H2mMmcLNbWl18ZYVTm71amPN95Xk8EgEx+ntoDBDgUs+siRspaoMef7rukNEriziXNuwS7Hmoe9wggxv+e55IzJMqQTeNYV00scuNbY8+YxrUfGfcaMZb/CNPQe04bT0lThbEuT0sfYhK6K/23Amf3Lx+H24hcj4GScAAAAeJxtjuduwzAMhH2NnTqOk+6993TfSZFY24giGZTVon36eiRFf5SAiO/A05HBWtBXEvxfGdYwQIgIQ6wjxggJxkgxwRQb2MQWtrGDXexhHwc4xBGOcYJTnOEcF7jEFa5xg1vc4R4PeMQTnvGCV2R4C1Khy9xkkkxNnPRC03s97pHLvKgTYXJNmbKfZom9o8POEffsq0Qw28+ltcPe2uHS2rGvRjPBmSwE1+GMtI6l0GSU4JEsSM4XgudpQx9sTRf3K9rAyUr0962UryKprZwPpM0jyda5uP2qrVBjxSLPCmGUplixrdpBSKqsI2oO4gF9Udq8TJVOzDSpcEHGR4vSeJdaVsSkMl26OqoKa6jttQ0rLb6a5l3YjO2QqV01YXLlNy2XDR0JlkXojbJTb/5GDX3V+kPviIPgB9AUks0AAAA=)
|
|
@@ -717,7 +717,7 @@ const Mt=y`
|
|
|
717
717
|
--lumo-icons-upload: '\\ea2b';
|
|
718
718
|
--lumo-icons-user: '\\ea2c';
|
|
719
719
|
}
|
|
720
|
-
`),
|
|
720
|
+
`),Bt("spacing-props",y`
|
|
721
721
|
:host {
|
|
722
722
|
/* Square */
|
|
723
723
|
--lumo-space-xs: 0.25rem;
|
|
@@ -824,356 +824,7 @@ const Mt=y`
|
|
|
824
824
|
width: var(--lumo-icon-size-m);
|
|
825
825
|
height: var(--lumo-icon-size-m);
|
|
826
826
|
}
|
|
827
|
-
`;zt("vaadin-item",Dt,{moduleId:"lumo-item"})
|
|
828
|
-
/**
|
|
829
|
-
* @license
|
|
830
|
-
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
831
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
832
|
-
*/
|
|
833
|
-
window.Vaadin||={},window.Vaadin.featureFlags||={};const jt={};
|
|
834
|
-
/**
|
|
835
|
-
* @license
|
|
836
|
-
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
837
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
838
|
-
*/
|
|
839
|
-
class Ft extends HTMLElement{static get is(){return"vaadin-lumo-styles"}}!function(t,e="24.6.3"){if(Object.defineProperty(t,"version",{get:()=>e}),t.experimental){const e="string"==typeof t.experimental?t.experimental:`${i=t.is.split("-").slice(1).join("-"),i.replace(/-[a-z]/gu,(t=>t[1].toUpperCase()))}Component`;if(!window.Vaadin.featureFlags[e]&&!jt[e])return jt[e]=new Set,jt[e].add(t),void Object.defineProperty(window.Vaadin.featureFlags,e,{get:()=>0===jt[e].size,set(t){t&&jt[e].size>0&&(jt[e].forEach((t=>{customElements.define(t.is,t)})),jt[e].clear())}});if(jt[e])return void jt[e].add(t)}var i;const o=customElements.get(t.is);if(o){const e=o.version;e&&t.version&&e===t.version?console.warn(`The component ${t.is} has been loaded twice`):console.error(`Tried to define ${t.is} version ${t.version} when version ${o.version} is already in use. Something will probably break.`)}else customElements.define(t.is,t)}(Ft);
|
|
840
|
-
/**
|
|
841
|
-
* @license
|
|
842
|
-
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
843
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
844
|
-
*/
|
|
845
|
-
const Rt=new Set,Lt=new Set;const Ht="vaadin-themable-mixin-style";function Gt(t){t.prototype instanceof bt?t.elementStyles=t.finalizeStyles(t.styles):t.prototype._template.content.getElementById(Ht).textContent=t.getStylesForThis().map((t=>t.cssText)).join("\n"),Lt.forEach((e=>{const i=customElements.get(e);i!==t&&i.prototype instanceof t&&Gt(i)}))}function Wt(t,e,i={}){e=function(t=[]){return[t].flat(1/0).filter((t=>t instanceof g||(console.warn("An item in styles is not of type CSSResult. Use `unsafeCSS` or `css`."),!1)))}(e),window.Vaadin&&window.Vaadin.styleModules&&window.Vaadin.styleModules.registerStyles(t,e,i),t&&Lt.forEach((i=>{if(function(t,e){return(t||"").split(" ").some((t=>new RegExp(`^${t.split("*").join(".*")}$`,"u").test(e)))}(t,i)&&function(t){return(e=customElements.get(t))&&Object.prototype.hasOwnProperty.call(e,"__themes");var e}(i)){const t=customElements.get(i);!function(t,e){const i=t.__themes;return!(!i||!e)&&i.some((t=>t.styles.some((t=>e.some((e=>e.cssText===t.cssText))))))}(t,e)?window.Vaadin&&window.Vaadin.suppressPostFinalizeStylesWarning||console.warn(`The custom element definition for "${i}" was finalized before a style module was registered. Ideally, import component specific style modules before importing the corresponding custom element. This warning can be suppressed by setting "window.Vaadin.suppressPostFinalizeStylesWarning = true".`):console.warn(`Registering styles that already exist for ${i}`),Gt(t),function(t){Rt.forEach((e=>{const i=e.deref();i instanceof t?function(t){if(!t.shadowRoot)return;const e=t.constructor;t instanceof bt?([...t.shadowRoot.querySelectorAll("style")].forEach((t=>t.remove())),w(t.shadowRoot,e.elementStyles)):t.shadowRoot.getElementById(Ht).textContent=e.prototype._template.content.getElementById(Ht).textContent}(i):i||Rt.delete(e)}))}(t)}}))}
|
|
846
|
-
/**
|
|
847
|
-
* @license
|
|
848
|
-
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
849
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
850
|
-
*/const Ut=(t,...e)=>{((t,...e)=>{const i=document.createElement("style");i.id=t,i.textContent=e.map((t=>t.toString())).join("\n").replace(":host","html"),document.head.insertAdjacentElement("afterbegin",i)})(`lumo-${t}`,e)};Ut("color-props",y`
|
|
851
|
-
:host {
|
|
852
|
-
/* Base (background) */
|
|
853
|
-
--lumo-base-color: #fff;
|
|
854
|
-
|
|
855
|
-
/* Tint */
|
|
856
|
-
--lumo-tint-5pct: hsla(0, 0%, 100%, 0.3);
|
|
857
|
-
--lumo-tint-10pct: hsla(0, 0%, 100%, 0.37);
|
|
858
|
-
--lumo-tint-20pct: hsla(0, 0%, 100%, 0.44);
|
|
859
|
-
--lumo-tint-30pct: hsla(0, 0%, 100%, 0.5);
|
|
860
|
-
--lumo-tint-40pct: hsla(0, 0%, 100%, 0.57);
|
|
861
|
-
--lumo-tint-50pct: hsla(0, 0%, 100%, 0.64);
|
|
862
|
-
--lumo-tint-60pct: hsla(0, 0%, 100%, 0.7);
|
|
863
|
-
--lumo-tint-70pct: hsla(0, 0%, 100%, 0.77);
|
|
864
|
-
--lumo-tint-80pct: hsla(0, 0%, 100%, 0.84);
|
|
865
|
-
--lumo-tint-90pct: hsla(0, 0%, 100%, 0.9);
|
|
866
|
-
--lumo-tint: #fff;
|
|
867
|
-
|
|
868
|
-
/* Shade */
|
|
869
|
-
--lumo-shade-5pct: hsla(214, 61%, 25%, 0.05);
|
|
870
|
-
--lumo-shade-10pct: hsla(214, 57%, 24%, 0.1);
|
|
871
|
-
--lumo-shade-20pct: hsla(214, 53%, 23%, 0.16);
|
|
872
|
-
--lumo-shade-30pct: hsla(214, 50%, 22%, 0.26);
|
|
873
|
-
--lumo-shade-40pct: hsla(214, 47%, 21%, 0.38);
|
|
874
|
-
--lumo-shade-50pct: hsla(214, 45%, 20%, 0.52);
|
|
875
|
-
--lumo-shade-60pct: hsla(214, 43%, 19%, 0.6);
|
|
876
|
-
--lumo-shade-70pct: hsla(214, 42%, 18%, 0.69);
|
|
877
|
-
--lumo-shade-80pct: hsla(214, 41%, 17%, 0.83);
|
|
878
|
-
--lumo-shade-90pct: hsla(214, 40%, 16%, 0.94);
|
|
879
|
-
--lumo-shade: hsl(214, 35%, 15%);
|
|
880
|
-
|
|
881
|
-
/* Contrast */
|
|
882
|
-
--lumo-contrast-5pct: var(--lumo-shade-5pct);
|
|
883
|
-
--lumo-contrast-10pct: var(--lumo-shade-10pct);
|
|
884
|
-
--lumo-contrast-20pct: var(--lumo-shade-20pct);
|
|
885
|
-
--lumo-contrast-30pct: var(--lumo-shade-30pct);
|
|
886
|
-
--lumo-contrast-40pct: var(--lumo-shade-40pct);
|
|
887
|
-
--lumo-contrast-50pct: var(--lumo-shade-50pct);
|
|
888
|
-
--lumo-contrast-60pct: var(--lumo-shade-60pct);
|
|
889
|
-
--lumo-contrast-70pct: var(--lumo-shade-70pct);
|
|
890
|
-
--lumo-contrast-80pct: var(--lumo-shade-80pct);
|
|
891
|
-
--lumo-contrast-90pct: var(--lumo-shade-90pct);
|
|
892
|
-
--lumo-contrast: var(--lumo-shade);
|
|
893
|
-
|
|
894
|
-
/* Text */
|
|
895
|
-
--lumo-header-text-color: var(--lumo-contrast);
|
|
896
|
-
--lumo-body-text-color: var(--lumo-contrast-90pct);
|
|
897
|
-
--lumo-secondary-text-color: var(--lumo-contrast-70pct);
|
|
898
|
-
--lumo-tertiary-text-color: var(--lumo-contrast-50pct);
|
|
899
|
-
--lumo-disabled-text-color: var(--lumo-contrast-30pct);
|
|
900
|
-
|
|
901
|
-
/* Primary */
|
|
902
|
-
--lumo-primary-color: hsl(214, 100%, 48%);
|
|
903
|
-
--lumo-primary-color-50pct: hsla(214, 100%, 49%, 0.76);
|
|
904
|
-
--lumo-primary-color-10pct: hsla(214, 100%, 60%, 0.13);
|
|
905
|
-
--lumo-primary-text-color: hsl(214, 100%, 43%);
|
|
906
|
-
--lumo-primary-contrast-color: #fff;
|
|
907
|
-
|
|
908
|
-
/* Error */
|
|
909
|
-
--lumo-error-color: hsl(3, 85%, 48%);
|
|
910
|
-
--lumo-error-color-50pct: hsla(3, 85%, 49%, 0.5);
|
|
911
|
-
--lumo-error-color-10pct: hsla(3, 85%, 49%, 0.1);
|
|
912
|
-
--lumo-error-text-color: hsl(3, 89%, 42%);
|
|
913
|
-
--lumo-error-contrast-color: #fff;
|
|
914
|
-
|
|
915
|
-
/* Success */
|
|
916
|
-
--lumo-success-color: hsl(145, 72%, 30%);
|
|
917
|
-
--lumo-success-color-50pct: hsla(145, 72%, 31%, 0.5);
|
|
918
|
-
--lumo-success-color-10pct: hsla(145, 72%, 31%, 0.1);
|
|
919
|
-
--lumo-success-text-color: hsl(145, 85%, 25%);
|
|
920
|
-
--lumo-success-contrast-color: #fff;
|
|
921
|
-
|
|
922
|
-
/* Warning */
|
|
923
|
-
--lumo-warning-color: hsl(48, 100%, 50%);
|
|
924
|
-
--lumo-warning-color-10pct: hsla(48, 100%, 50%, 0.25);
|
|
925
|
-
--lumo-warning-text-color: hsl(32, 100%, 30%);
|
|
926
|
-
--lumo-warning-contrast-color: var(--lumo-shade-90pct);
|
|
927
|
-
}
|
|
928
|
-
|
|
929
|
-
/* forced-colors mode adjustments */
|
|
930
|
-
@media (forced-colors: active) {
|
|
931
|
-
html {
|
|
932
|
-
--lumo-disabled-text-color: GrayText;
|
|
933
|
-
}
|
|
934
|
-
}
|
|
935
|
-
`),Wt("",y`
|
|
936
|
-
[theme~='dark'] {
|
|
937
|
-
/* Base (background) */
|
|
938
|
-
--lumo-base-color: hsl(214, 35%, 21%);
|
|
939
|
-
|
|
940
|
-
/* Tint */
|
|
941
|
-
--lumo-tint-5pct: hsla(214, 65%, 85%, 0.06);
|
|
942
|
-
--lumo-tint-10pct: hsla(214, 60%, 80%, 0.14);
|
|
943
|
-
--lumo-tint-20pct: hsla(214, 64%, 82%, 0.23);
|
|
944
|
-
--lumo-tint-30pct: hsla(214, 69%, 84%, 0.32);
|
|
945
|
-
--lumo-tint-40pct: hsla(214, 73%, 86%, 0.41);
|
|
946
|
-
--lumo-tint-50pct: hsla(214, 78%, 88%, 0.5);
|
|
947
|
-
--lumo-tint-60pct: hsla(214, 82%, 90%, 0.58);
|
|
948
|
-
--lumo-tint-70pct: hsla(214, 87%, 92%, 0.69);
|
|
949
|
-
--lumo-tint-80pct: hsla(214, 91%, 94%, 0.8);
|
|
950
|
-
--lumo-tint-90pct: hsla(214, 96%, 96%, 0.9);
|
|
951
|
-
--lumo-tint: hsl(214, 100%, 98%);
|
|
952
|
-
|
|
953
|
-
/* Shade */
|
|
954
|
-
--lumo-shade-5pct: hsla(214, 0%, 0%, 0.07);
|
|
955
|
-
--lumo-shade-10pct: hsla(214, 4%, 2%, 0.15);
|
|
956
|
-
--lumo-shade-20pct: hsla(214, 8%, 4%, 0.23);
|
|
957
|
-
--lumo-shade-30pct: hsla(214, 12%, 6%, 0.32);
|
|
958
|
-
--lumo-shade-40pct: hsla(214, 16%, 8%, 0.41);
|
|
959
|
-
--lumo-shade-50pct: hsla(214, 20%, 10%, 0.5);
|
|
960
|
-
--lumo-shade-60pct: hsla(214, 24%, 12%, 0.6);
|
|
961
|
-
--lumo-shade-70pct: hsla(214, 28%, 13%, 0.7);
|
|
962
|
-
--lumo-shade-80pct: hsla(214, 32%, 13%, 0.8);
|
|
963
|
-
--lumo-shade-90pct: hsla(214, 33%, 13%, 0.9);
|
|
964
|
-
--lumo-shade: hsl(214, 33%, 13%);
|
|
965
|
-
|
|
966
|
-
/* Contrast */
|
|
967
|
-
--lumo-contrast-5pct: var(--lumo-tint-5pct);
|
|
968
|
-
--lumo-contrast-10pct: var(--lumo-tint-10pct);
|
|
969
|
-
--lumo-contrast-20pct: var(--lumo-tint-20pct);
|
|
970
|
-
--lumo-contrast-30pct: var(--lumo-tint-30pct);
|
|
971
|
-
--lumo-contrast-40pct: var(--lumo-tint-40pct);
|
|
972
|
-
--lumo-contrast-50pct: var(--lumo-tint-50pct);
|
|
973
|
-
--lumo-contrast-60pct: var(--lumo-tint-60pct);
|
|
974
|
-
--lumo-contrast-70pct: var(--lumo-tint-70pct);
|
|
975
|
-
--lumo-contrast-80pct: var(--lumo-tint-80pct);
|
|
976
|
-
--lumo-contrast-90pct: var(--lumo-tint-90pct);
|
|
977
|
-
--lumo-contrast: var(--lumo-tint);
|
|
978
|
-
|
|
979
|
-
/* Text */
|
|
980
|
-
--lumo-header-text-color: var(--lumo-contrast);
|
|
981
|
-
--lumo-body-text-color: var(--lumo-contrast-90pct);
|
|
982
|
-
--lumo-secondary-text-color: var(--lumo-contrast-70pct);
|
|
983
|
-
--lumo-tertiary-text-color: var(--lumo-contrast-50pct);
|
|
984
|
-
--lumo-disabled-text-color: var(--lumo-contrast-30pct);
|
|
985
|
-
|
|
986
|
-
/* Primary */
|
|
987
|
-
--lumo-primary-color: hsl(214, 90%, 48%);
|
|
988
|
-
--lumo-primary-color-50pct: hsla(214, 90%, 70%, 0.69);
|
|
989
|
-
--lumo-primary-color-10pct: hsla(214, 90%, 55%, 0.13);
|
|
990
|
-
--lumo-primary-text-color: hsl(214, 90%, 77%);
|
|
991
|
-
--lumo-primary-contrast-color: #fff;
|
|
992
|
-
|
|
993
|
-
/* Error */
|
|
994
|
-
--lumo-error-color: hsl(3, 79%, 49%);
|
|
995
|
-
--lumo-error-color-50pct: hsla(3, 75%, 62%, 0.5);
|
|
996
|
-
--lumo-error-color-10pct: hsla(3, 75%, 62%, 0.14);
|
|
997
|
-
--lumo-error-text-color: hsl(3, 100%, 80%);
|
|
998
|
-
|
|
999
|
-
/* Success */
|
|
1000
|
-
--lumo-success-color: hsl(145, 72%, 30%);
|
|
1001
|
-
--lumo-success-color-50pct: hsla(145, 92%, 51%, 0.5);
|
|
1002
|
-
--lumo-success-color-10pct: hsla(145, 92%, 51%, 0.1);
|
|
1003
|
-
--lumo-success-text-color: hsl(145, 85%, 46%);
|
|
1004
|
-
|
|
1005
|
-
/* Warning */
|
|
1006
|
-
--lumo-warning-color: hsl(43, 100%, 48%);
|
|
1007
|
-
--lumo-warning-color-10pct: hsla(40, 100%, 50%, 0.2);
|
|
1008
|
-
--lumo-warning-text-color: hsl(45, 100%, 60%);
|
|
1009
|
-
--lumo-warning-contrast-color: var(--lumo-shade-90pct);
|
|
1010
|
-
}
|
|
1011
|
-
|
|
1012
|
-
html {
|
|
1013
|
-
color: var(--lumo-body-text-color);
|
|
1014
|
-
background-color: var(--lumo-base-color);
|
|
1015
|
-
color-scheme: light;
|
|
1016
|
-
}
|
|
1017
|
-
|
|
1018
|
-
[theme~='dark'] {
|
|
1019
|
-
color: var(--lumo-body-text-color);
|
|
1020
|
-
background-color: var(--lumo-base-color);
|
|
1021
|
-
color-scheme: dark;
|
|
1022
|
-
}
|
|
1023
|
-
|
|
1024
|
-
h1,
|
|
1025
|
-
h2,
|
|
1026
|
-
h3,
|
|
1027
|
-
h4,
|
|
1028
|
-
h5,
|
|
1029
|
-
h6 {
|
|
1030
|
-
color: var(--lumo-header-text-color);
|
|
1031
|
-
}
|
|
1032
|
-
|
|
1033
|
-
a:where(:any-link) {
|
|
1034
|
-
color: var(--lumo-primary-text-color);
|
|
1035
|
-
}
|
|
1036
|
-
|
|
1037
|
-
a:not(:any-link) {
|
|
1038
|
-
color: var(--lumo-disabled-text-color);
|
|
1039
|
-
}
|
|
1040
|
-
|
|
1041
|
-
blockquote {
|
|
1042
|
-
color: var(--lumo-secondary-text-color);
|
|
1043
|
-
}
|
|
1044
|
-
|
|
1045
|
-
code,
|
|
1046
|
-
pre {
|
|
1047
|
-
background-color: var(--lumo-contrast-10pct);
|
|
1048
|
-
border-radius: var(--lumo-border-radius-m);
|
|
1049
|
-
}
|
|
1050
|
-
pre code {
|
|
1051
|
-
background: transparent;
|
|
1052
|
-
}
|
|
1053
|
-
`,{moduleId:"lumo-color"}),Ut("spacing-props",y`
|
|
1054
|
-
:host {
|
|
1055
|
-
/* Square */
|
|
1056
|
-
--lumo-space-xs: 0.25rem;
|
|
1057
|
-
--lumo-space-s: 0.5rem;
|
|
1058
|
-
--lumo-space-m: 1rem;
|
|
1059
|
-
--lumo-space-l: 1.5rem;
|
|
1060
|
-
--lumo-space-xl: 2.5rem;
|
|
1061
|
-
|
|
1062
|
-
/* Wide */
|
|
1063
|
-
--lumo-space-wide-xs: calc(var(--lumo-space-xs) / 2) var(--lumo-space-xs);
|
|
1064
|
-
--lumo-space-wide-s: calc(var(--lumo-space-s) / 2) var(--lumo-space-s);
|
|
1065
|
-
--lumo-space-wide-m: calc(var(--lumo-space-m) / 2) var(--lumo-space-m);
|
|
1066
|
-
--lumo-space-wide-l: calc(var(--lumo-space-l) / 2) var(--lumo-space-l);
|
|
1067
|
-
--lumo-space-wide-xl: calc(var(--lumo-space-xl) / 2) var(--lumo-space-xl);
|
|
1068
|
-
|
|
1069
|
-
/* Tall */
|
|
1070
|
-
--lumo-space-tall-xs: var(--lumo-space-xs) calc(var(--lumo-space-xs) / 2);
|
|
1071
|
-
--lumo-space-tall-s: var(--lumo-space-s) calc(var(--lumo-space-s) / 2);
|
|
1072
|
-
--lumo-space-tall-m: var(--lumo-space-m) calc(var(--lumo-space-m) / 2);
|
|
1073
|
-
--lumo-space-tall-l: var(--lumo-space-l) calc(var(--lumo-space-l) / 2);
|
|
1074
|
-
--lumo-space-tall-xl: var(--lumo-space-xl) calc(var(--lumo-space-xl) / 2);
|
|
1075
|
-
}
|
|
1076
|
-
`),y`
|
|
1077
|
-
html {
|
|
1078
|
-
/* Button */
|
|
1079
|
-
--vaadin-button-background: var(--lumo-contrast-5pct);
|
|
1080
|
-
--vaadin-button-border: none;
|
|
1081
|
-
--vaadin-button-border-radius: var(--lumo-border-radius-m);
|
|
1082
|
-
--vaadin-button-font-size: var(--lumo-font-size-m);
|
|
1083
|
-
--vaadin-button-font-weight: 500;
|
|
1084
|
-
--vaadin-button-height: var(--lumo-size-m);
|
|
1085
|
-
--vaadin-button-margin: var(--lumo-space-xs) 0;
|
|
1086
|
-
--vaadin-button-min-width: calc(var(--vaadin-button-height) * 2);
|
|
1087
|
-
--vaadin-button-padding: 0 calc(var(--vaadin-button-height) / 3 + var(--lumo-border-radius-m) / 2);
|
|
1088
|
-
--vaadin-button-text-color: var(--lumo-primary-text-color);
|
|
1089
|
-
--vaadin-button-primary-background: var(--lumo-primary-color);
|
|
1090
|
-
--vaadin-button-primary-border: none;
|
|
1091
|
-
--vaadin-button-primary-font-weight: 600;
|
|
1092
|
-
--vaadin-button-primary-text-color: var(--lumo-primary-contrast-color);
|
|
1093
|
-
--vaadin-button-tertiary-background: transparent !important;
|
|
1094
|
-
--vaadin-button-tertiary-text-color: var(--lumo-primary-text-color);
|
|
1095
|
-
--vaadin-button-tertiary-font-weight: 500;
|
|
1096
|
-
--vaadin-button-tertiary-padding: 0 calc(var(--vaadin-button-height) / 6);
|
|
1097
|
-
/* Checkbox */
|
|
1098
|
-
--vaadin-checkbox-background: var(--lumo-contrast-20pct);
|
|
1099
|
-
--vaadin-checkbox-background-hover: var(--lumo-contrast-30pct);
|
|
1100
|
-
--vaadin-checkbox-border-radius: var(--lumo-border-radius-s);
|
|
1101
|
-
--vaadin-checkbox-checkmark-char: var(--lumo-icons-checkmark);
|
|
1102
|
-
--vaadin-checkbox-checkmark-char-indeterminate: '';
|
|
1103
|
-
--vaadin-checkbox-checkmark-color: var(--lumo-primary-contrast-color);
|
|
1104
|
-
--vaadin-checkbox-checkmark-size: calc(var(--vaadin-checkbox-size) + 2px);
|
|
1105
|
-
--vaadin-checkbox-label-color: var(--lumo-body-text-color);
|
|
1106
|
-
--vaadin-checkbox-label-font-size: var(--lumo-font-size-m);
|
|
1107
|
-
--vaadin-checkbox-label-padding: var(--lumo-space-xs) var(--lumo-space-s) var(--lumo-space-xs) var(--lumo-space-xs);
|
|
1108
|
-
--vaadin-checkbox-size: calc(var(--lumo-size-m) / 2);
|
|
1109
|
-
--vaadin-checkbox-disabled-checkmark-color: var(--lumo-contrast-30pct);
|
|
1110
|
-
--vaadin-checkbox-disabled-background: var(--lumo-contrast-10pct);
|
|
1111
|
-
/* Radio button */
|
|
1112
|
-
--vaadin-radio-button-background: var(--lumo-contrast-20pct);
|
|
1113
|
-
--vaadin-radio-button-background-hover: var(--lumo-contrast-30pct);
|
|
1114
|
-
--vaadin-radio-button-dot-color: var(--lumo-primary-contrast-color);
|
|
1115
|
-
--vaadin-radio-button-dot-size: 3px;
|
|
1116
|
-
--vaadin-radio-button-label-color: var(--lumo-body-text-color);
|
|
1117
|
-
--vaadin-radio-button-label-font-size: var(--lumo-font-size-m);
|
|
1118
|
-
--vaadin-radio-button-label-padding: var(--lumo-space-xs) var(--lumo-space-s) var(--lumo-space-xs)
|
|
1119
|
-
var(--lumo-space-xs);
|
|
1120
|
-
--vaadin-radio-button-size: calc(var(--lumo-size-m) / 2);
|
|
1121
|
-
--vaadin-radio-button-disabled-background: var(--lumo-contrast-10pct);
|
|
1122
|
-
--vaadin-radio-button-disabled-dot-color: var(--lumo-contrast-30pct);
|
|
1123
|
-
--vaadin-selection-color: var(--lumo-primary-color);
|
|
1124
|
-
--vaadin-selection-color-text: var(--lumo-primary-text-color);
|
|
1125
|
-
--vaadin-input-field-border-radius: var(--lumo-border-radius-m);
|
|
1126
|
-
--vaadin-focus-ring-color: var(--lumo-primary-color-50pct);
|
|
1127
|
-
--vaadin-focus-ring-width: 2px;
|
|
1128
|
-
/* Label */
|
|
1129
|
-
--vaadin-input-field-label-color: var(--lumo-secondary-text-color);
|
|
1130
|
-
--vaadin-input-field-focused-label-color: var(--lumo-primary-text-color);
|
|
1131
|
-
--vaadin-input-field-hovered-label-color: var(--lumo-body-text-color);
|
|
1132
|
-
--vaadin-input-field-label-font-size: var(--lumo-font-size-s);
|
|
1133
|
-
--vaadin-input-field-label-font-weight: 500;
|
|
1134
|
-
/* Helper */
|
|
1135
|
-
--vaadin-input-field-helper-color: var(--lumo-secondary-text-color);
|
|
1136
|
-
--vaadin-input-field-helper-font-size: var(--lumo-font-size-xs);
|
|
1137
|
-
--vaadin-input-field-helper-font-weight: 400;
|
|
1138
|
-
--vaadin-input-field-helper-spacing: 0.4em;
|
|
1139
|
-
/* Error message */
|
|
1140
|
-
--vaadin-input-field-error-color: var(--lumo-error-text-color);
|
|
1141
|
-
--vaadin-input-field-error-font-size: var(--lumo-font-size-xs);
|
|
1142
|
-
--vaadin-input-field-error-font-weight: 400;
|
|
1143
|
-
/* Input field */
|
|
1144
|
-
--vaadin-input-field-background: var(--lumo-contrast-10pct);
|
|
1145
|
-
--vaadin-input-field-icon-color: var(--lumo-contrast-60pct);
|
|
1146
|
-
--vaadin-input-field-icon-size: var(--lumo-icon-size-m);
|
|
1147
|
-
--vaadin-input-field-invalid-background: var(--lumo-error-color-10pct);
|
|
1148
|
-
--vaadin-input-field-invalid-hover-highlight: var(--lumo-error-color-50pct);
|
|
1149
|
-
--vaadin-input-field-disabled-background: var(--lumo-contrast-5pct);
|
|
1150
|
-
--vaadin-input-field-disabled-value-color: var(--lumo-disabled-text-color);
|
|
1151
|
-
--vaadin-input-field-height: var(--lumo-size-m);
|
|
1152
|
-
--vaadin-input-field-hover-highlight: var(--lumo-contrast-50pct);
|
|
1153
|
-
--vaadin-input-field-placeholder-color: var(--lumo-secondary-text-color);
|
|
1154
|
-
--vaadin-input-field-readonly-border: 1px dashed var(--lumo-contrast-30pct);
|
|
1155
|
-
--vaadin-input-field-value-color: var(--lumo-body-text-color);
|
|
1156
|
-
--vaadin-input-field-value-font-size: var(--lumo-font-size-m);
|
|
1157
|
-
--vaadin-input-field-value-font-weight: 500;
|
|
1158
|
-
}
|
|
1159
|
-
`,Ut("style-props",y`
|
|
1160
|
-
:host {
|
|
1161
|
-
/* Border radius */
|
|
1162
|
-
--lumo-border-radius-s: 0.25em; /* Checkbox, badge, date-picker year indicator, etc */
|
|
1163
|
-
--lumo-border-radius-m: var(--lumo-border-radius, 0.25em); /* Button, text field, menu overlay, etc */
|
|
1164
|
-
--lumo-border-radius-l: 0.5em; /* Dialog, notification, etc */
|
|
1165
|
-
|
|
1166
|
-
/* Shadow */
|
|
1167
|
-
--lumo-box-shadow-xs: 0 1px 4px -1px var(--lumo-shade-50pct);
|
|
1168
|
-
--lumo-box-shadow-s: 0 2px 4px -1px var(--lumo-shade-20pct), 0 3px 12px -1px var(--lumo-shade-30pct);
|
|
1169
|
-
--lumo-box-shadow-m: 0 2px 6px -1px var(--lumo-shade-20pct), 0 8px 24px -4px var(--lumo-shade-40pct);
|
|
1170
|
-
--lumo-box-shadow-l: 0 3px 18px -2px var(--lumo-shade-20pct), 0 12px 48px -6px var(--lumo-shade-40pct);
|
|
1171
|
-
--lumo-box-shadow-xl: 0 4px 24px -3px var(--lumo-shade-20pct), 0 18px 64px -8px var(--lumo-shade-40pct);
|
|
1172
|
-
|
|
1173
|
-
/* Clickable element cursor */
|
|
1174
|
-
--lumo-clickable-cursor: default;
|
|
1175
|
-
}
|
|
1176
|
-
`);const qt=y`
|
|
827
|
+
`;zt("vaadin-item",Dt,{moduleId:"lumo-item"});const jt=y`
|
|
1177
828
|
:host {
|
|
1178
829
|
-webkit-tap-highlight-color: transparent;
|
|
1179
830
|
--_lumo-item-selected-icon-display: var(--_lumo-list-box-item-selected-icon-display, block);
|
|
@@ -1187,13 +838,13 @@ const Rt=new Set,Lt=new Set;const Ht="vaadin-themable-mixin-style";function Gt(t
|
|
|
1187
838
|
margin: var(--lumo-space-s) var(--lumo-border-radius-m);
|
|
1188
839
|
background-color: var(--lumo-contrast-10pct);
|
|
1189
840
|
}
|
|
1190
|
-
`;
|
|
841
|
+
`;zt("vaadin-list-box",jt,{moduleId:"lumo-list-box"});
|
|
1191
842
|
/**
|
|
1192
843
|
* @license
|
|
1193
844
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
1194
845
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1195
846
|
*/
|
|
1196
|
-
const
|
|
847
|
+
const Ft=y`
|
|
1197
848
|
[part$='button'] {
|
|
1198
849
|
flex: none;
|
|
1199
850
|
width: 1em;
|
|
@@ -1220,13 +871,13 @@ const $t=y`
|
|
|
1220
871
|
font-family: 'lumo-icons';
|
|
1221
872
|
display: block;
|
|
1222
873
|
}
|
|
1223
|
-
`;zt(""
|
|
874
|
+
`;zt("",Ft,{moduleId:"lumo-field-button"});
|
|
1224
875
|
/**
|
|
1225
876
|
* @license
|
|
1226
877
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
1227
878
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1228
879
|
*/
|
|
1229
|
-
const
|
|
880
|
+
const Lt=y`
|
|
1230
881
|
:host {
|
|
1231
882
|
--_helper-spacing: var(--vaadin-input-field-helper-spacing, 0.4em);
|
|
1232
883
|
}
|
|
@@ -1287,7 +938,7 @@ const Vt=y`
|
|
|
1287
938
|
* @license
|
|
1288
939
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
1289
940
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1290
|
-
*/,
|
|
941
|
+
*/,Rt=y`
|
|
1291
942
|
[part='label'] {
|
|
1292
943
|
align-self: flex-start;
|
|
1293
944
|
color: var(--vaadin-input-field-label-color, var(--lumo-secondary-text-color));
|
|
@@ -1399,13 +1050,13 @@ const Vt=y`
|
|
|
1399
1050
|
margin-left: 0;
|
|
1400
1051
|
margin-right: calc(var(--lumo-border-radius-m) / 4);
|
|
1401
1052
|
}
|
|
1402
|
-
`;zt("",
|
|
1053
|
+
`;zt("",Rt,{moduleId:"lumo-required-field"});
|
|
1403
1054
|
/**
|
|
1404
1055
|
* @license
|
|
1405
1056
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
1406
1057
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1407
1058
|
*/
|
|
1408
|
-
const
|
|
1059
|
+
const Ht=[Rt,Ft,Lt,y`
|
|
1409
1060
|
:host {
|
|
1410
1061
|
--lumo-text-field-size: var(--lumo-size-m);
|
|
1411
1062
|
color: var(--vaadin-input-field-value-color, var(--lumo-body-text-color));
|
|
@@ -1536,13 +1187,13 @@ const Yt=[Jt,$t,Vt,y`
|
|
|
1536
1187
|
[part='clear-button']::before {
|
|
1537
1188
|
content: var(--lumo-icons-cross);
|
|
1538
1189
|
}
|
|
1539
|
-
`];zt("",
|
|
1190
|
+
`];zt("",Ht,{moduleId:"lumo-input-field-shared-styles"});
|
|
1540
1191
|
/**
|
|
1541
1192
|
* @license
|
|
1542
1193
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
1543
1194
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1544
1195
|
*/
|
|
1545
|
-
const
|
|
1196
|
+
const Wt=y`
|
|
1546
1197
|
:host {
|
|
1547
1198
|
top: var(--lumo-space-m);
|
|
1548
1199
|
right: var(--lumo-space-m);
|
|
@@ -1607,13 +1258,13 @@ const Kt=y`
|
|
|
1607
1258
|
opacity: 1;
|
|
1608
1259
|
}
|
|
1609
1260
|
}
|
|
1610
|
-
`;zt("",
|
|
1261
|
+
`;zt("",Wt,{moduleId:"lumo-overlay"});
|
|
1611
1262
|
/**
|
|
1612
1263
|
* @license
|
|
1613
1264
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
1614
1265
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1615
1266
|
*/
|
|
1616
|
-
const
|
|
1267
|
+
const Gt=y`
|
|
1617
1268
|
:host([opening]),
|
|
1618
1269
|
:host([closing]) {
|
|
1619
1270
|
animation: 0.14s lumo-overlay-dummy-animation;
|
|
@@ -1643,7 +1294,7 @@ const Zt=y`
|
|
|
1643
1294
|
opacity: 0;
|
|
1644
1295
|
}
|
|
1645
1296
|
}
|
|
1646
|
-
`;zt("",
|
|
1297
|
+
`;zt("",Gt,{moduleId:"lumo-menu-overlay-core"});const Ut=[Wt,Gt,y`
|
|
1647
1298
|
/* Small viewport (bottom sheet) styles */
|
|
1648
1299
|
/* Use direct media queries instead of the state attributes ([phone] and [fullscreen]) provided by the elements */
|
|
1649
1300
|
@media (max-width: 450px), (max-height: 450px) {
|
|
@@ -1705,13 +1356,13 @@ const Zt=y`
|
|
|
1705
1356
|
transform: translateY(150%);
|
|
1706
1357
|
}
|
|
1707
1358
|
}
|
|
1708
|
-
`];zt("",
|
|
1359
|
+
`];zt("",Ut,{moduleId:"lumo-menu-overlay"}),
|
|
1709
1360
|
/**
|
|
1710
1361
|
* @license
|
|
1711
1362
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
1712
1363
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1713
1364
|
*/
|
|
1714
|
-
zt("vaadin-select-item",Dt,{moduleId:"lumo-select-item"}),zt("vaadin-select-list-box",
|
|
1365
|
+
zt("vaadin-select-item",Dt,{moduleId:"lumo-select-item"}),zt("vaadin-select-list-box",jt,{moduleId:"lumo-select-list-box"}),zt("vaadin-select",[Ht,y`
|
|
1715
1366
|
:host(:not([theme*='align'])) ::slotted([slot='value']) {
|
|
1716
1367
|
text-align: start;
|
|
1717
1368
|
}
|
|
@@ -1773,7 +1424,7 @@ zt("vaadin-select-item",Dt,{moduleId:"lumo-select-item"}),zt("vaadin-select-list
|
|
|
1773
1424
|
::slotted(*:hover) {
|
|
1774
1425
|
background-color: transparent;
|
|
1775
1426
|
}
|
|
1776
|
-
`,{moduleId:"lumo-select-value-button"}),zt("vaadin-select-overlay",[
|
|
1427
|
+
`,{moduleId:"lumo-select-value-button"}),zt("vaadin-select-overlay",[Ut,y`
|
|
1777
1428
|
:host {
|
|
1778
1429
|
--_lumo-item-selected-icon-display: block;
|
|
1779
1430
|
}
|
|
@@ -1829,7 +1480,7 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
|
|
|
1829
1480
|
Code distributed by Google as part of the polymer project is also
|
|
1830
1481
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1831
1482
|
*/
|
|
1832
|
-
let
|
|
1483
|
+
let qt,Jt,Vt=/(url\()([^)]*)(\))/g,Yt=/(^\/[^\/])|(^#)|(^[\w-\d]*:)/;function $t(t,e){if(t&&Yt.test(t))return t;if("//"===t)return t;if(void 0===qt){qt=!1;try{const t=new URL("b","http://a");t.pathname="c%20d",qt="http://a/c%20d"===t.href}catch(t){}}if(e||(e=document.baseURI||window.location.href),qt)try{return new URL(t,e).href}catch(e){return t}return Jt||(Jt=document.implementation.createHTMLDocument("temp"),Jt.base=Jt.createElement("base"),Jt.head.appendChild(Jt.base),Jt.anchor=Jt.createElement("a"),Jt.body.appendChild(Jt.anchor)),Jt.base.href=e,Jt.anchor.href=t,Jt.anchor.href||t}function Zt(t,e){return t.replace(Vt,(function(t,i,s,o){return i+"'"+$t(s.replace(/["']/g,""),e)+"'"+o}))}function Kt(t){return t.substring(0,t.lastIndexOf("/")+1)}
|
|
1833
1484
|
/**
|
|
1834
1485
|
@license
|
|
1835
1486
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -1838,7 +1489,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
1838
1489
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1839
1490
|
Code distributed by Google as part of the polymer project is also
|
|
1840
1491
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1841
|
-
*/const
|
|
1492
|
+
*/const Xt=(!window.ShadyDOM||!window.ShadyDOM.inUse)&&"adoptedStyleSheets"in Document.prototype&&"replaceSync"in CSSStyleSheet.prototype&&(()=>{try{const t=new CSSStyleSheet;t.replaceSync("");const e=document.createElement("div");return e.attachShadow({mode:"open"}),e.shadowRoot.adoptedStyleSheets=[t],e.shadowRoot.adoptedStyleSheets[0]===t}catch(t){return!1}})();let Qt=window.Polymer&&window.Polymer.rootPath||Kt(document.baseURI||window.location.href),te=window.Polymer&&window.Polymer.sanitizeDOMValue||void 0,ee=window.Polymer&&window.Polymer.strictTemplatePolicy||!1,ie=window.Polymer&&window.Polymer.allowTemplateFromDomModule||!1,se=window.Polymer&&window.Polymer.legacyOptimizations||!1,oe=window.Polymer&&window.Polymer.legacyWarnings||!1,re=window.Polymer&&window.Polymer.syncInitialRender||!1,ne=window.Polymer&&window.Polymer.legacyUndefined||!1,ae=window.Polymer&&window.Polymer.orderedComputed||!1,le=window.Polymer&&window.Polymer.removeNestedTemplates||!1,he=window.Polymer&&window.Polymer.fastDomIf||!1,ce=window.Polymer&&window.Polymer.useAdoptedStyleSheetsWithBuiltCSS||!1,de=0;const ue=function(t){let e=t.__mixinApplications;e||(e=new WeakMap,t.__mixinApplications=e);let i=de++;return function(s){let o=s.__mixinSet;if(o&&o[i])return s;let r=e,n=r.get(s);if(!n){n=t(s),r.set(s,n);let e=Object.create(n.__mixinSet||o||null);e[i]=!0,n.__mixinSet=e}return n}};
|
|
1842
1493
|
/**
|
|
1843
1494
|
@license
|
|
1844
1495
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -1847,7 +1498,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
1847
1498
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1848
1499
|
Code distributed by Google as part of the polymer project is also
|
|
1849
1500
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1850
|
-
*/let
|
|
1501
|
+
*/let pe={},me={};function fe(t,e){pe[t]=me[t.toLowerCase()]=e}function ve(t){return pe[t]||me[t.toLowerCase()]}class be extends HTMLElement{static get observedAttributes(){return["id"]}static import(t,e){if(t){let i=ve(t);return i&&e?i.querySelector(e):i}return null}attributeChangedCallback(t,e,i,s){e!==i&&this.register()}get assetpath(){if(!this.__assetpath){const t=window.HTMLImports&&HTMLImports.importForElement?HTMLImports.importForElement(this)||document:this.ownerDocument,e=$t(this.getAttribute("assetpath")||"",t.baseURI);this.__assetpath=Kt(e)}return this.__assetpath}register(t){if(t=t||this.id){if(ee&&void 0!==ve(t))throw fe(t,null),new Error(`strictTemplatePolicy: dom-module ${t} re-registered`);this.id=t,fe(t,this),(e=this).querySelector("style")&&console.warn("dom-module %s has style outside template",e.id)}var e}}be.prototype.modules=pe,customElements.define("dom-module",be);
|
|
1851
1502
|
/**
|
|
1852
1503
|
@license
|
|
1853
1504
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -1857,7 +1508,7 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
|
|
|
1857
1508
|
Code distributed by Google as part of the polymer project is also
|
|
1858
1509
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1859
1510
|
*/
|
|
1860
|
-
const
|
|
1511
|
+
const ge="link[rel=import][type~=css]",ye="include",we="shady-unscoped";function xe(t){return be.import(t)}function ke(t){const e=Zt((t.body?t.body:t).textContent,t.baseURI),i=document.createElement("style");return i.textContent=e,i}function _e(t){const e=t.trim().split(/\s+/),i=[];for(let t=0;t<e.length;t++)i.push(...Ae(e[t]));return i}function Ae(t){const e=xe(t);if(!e)return console.warn("Could not find style data in module named",t),[];if(void 0===e._styles){const t=[];t.push(...Ce(e));const i=e.querySelector("template");i&&t.push(...Se(i,e.assetpath)),e._styles=t}return e._styles}function Se(t,e){if(!t._styles){const i=[],s=t.content.querySelectorAll("style");for(let t=0;t<s.length;t++){let o=s[t],r=o.getAttribute(ye);r&&i.push(..._e(r).filter((function(t,e,i){return i.indexOf(t)===e}))),e&&(o.textContent=Zt(o.textContent,e)),i.push(o)}t._styles=i}return t._styles}function Ce(t){const e=[],i=t.querySelectorAll(ge);for(let t=0;t<i.length;t++){let s=i[t];if(s.import){const t=s.import,i=s.hasAttribute(we);if(i&&!t._unscopedStyle){const e=ke(t);e.setAttribute(we,""),t._unscopedStyle=e}else t._style||(t._style=ke(t));e.push(i?t._unscopedStyle:t._style)}}return e}
|
|
1861
1512
|
/**
|
|
1862
1513
|
@license
|
|
1863
1514
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -1866,7 +1517,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
1866
1517
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1867
1518
|
Code distributed by Google as part of the polymer project is also
|
|
1868
1519
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1869
|
-
*/const
|
|
1520
|
+
*/const Te=window.ShadyDOM&&window.ShadyDOM.noPatch&&window.ShadyDOM.wrap?window.ShadyDOM.wrap:window.ShadyDOM?t=>ShadyDOM.patch(t):t=>t;
|
|
1870
1521
|
/**
|
|
1871
1522
|
@license
|
|
1872
1523
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -1875,7 +1526,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
1875
1526
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1876
1527
|
Code distributed by Google as part of the polymer project is also
|
|
1877
1528
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1878
|
-
*/function
|
|
1529
|
+
*/function ze(t){return t.indexOf(".")>=0}function Ne(t){let e=t.indexOf(".");return-1===e?t:t.slice(0,e)}function Ee(t,e){return 0===e.indexOf(t+".")}function Oe(t,e,i){return e+i.slice(t.length)}function Ie(t){if(Array.isArray(t)){let e=[];for(let i=0;i<t.length;i++){let s=t[i].toString().split(".");for(let t=0;t<s.length;t++)e.push(s[t])}return e.join(".")}return t}function Pe(t){return Array.isArray(t)?Ie(t).split("."):t.toString().split(".")}function Be(t,e,i){let s=t,o=Pe(e);for(let t=0;t<o.length;t++){if(!s)return;s=s[o[t]]}return i&&(i.path=o.join(".")),s}function Me(t,e,i){let s=t,o=Pe(e),r=o[o.length-1];if(o.length>1){for(let t=0;t<o.length-1;t++)if(s=s[o[t]],!s)return;s[r]=i}else s[e]=i;return o.join(".")}
|
|
1879
1530
|
/**
|
|
1880
1531
|
@license
|
|
1881
1532
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -1884,7 +1535,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
1884
1535
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1885
1536
|
Code distributed by Google as part of the polymer project is also
|
|
1886
1537
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1887
|
-
*/const
|
|
1538
|
+
*/const De={},je=/-[a-z]/g,Fe=/([A-Z])/g;function Le(t){return De[t]||(De[t]=t.indexOf("-")<0?t:t.replace(je,(t=>t[1].toUpperCase())))}function Re(t){return De[t]||(De[t]=t.replace(Fe,"-$1").toLowerCase())}
|
|
1888
1539
|
/**
|
|
1889
1540
|
@license
|
|
1890
1541
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -1893,7 +1544,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
1893
1544
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1894
1545
|
Code distributed by Google as part of the polymer project is also
|
|
1895
1546
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1896
|
-
*/let
|
|
1547
|
+
*/let He=0,We=0,Ge=[],Ue=0,qe=!1,Je=document.createTextNode("");new window.MutationObserver((function(){qe=!1;const t=Ge.length;for(let e=0;e<t;e++){let t=Ge[e];if(t)try{t()}catch(t){setTimeout((()=>{throw t}))}}Ge.splice(0,t),We+=t})).observe(Je,{characterData:!0});const Ve={run:t=>(qe||(qe=!0,Je.textContent=Ue++),Ge.push(t),He++),cancel(t){const e=t-We;if(e>=0){if(!Ge[e])throw new Error("invalid async handle: "+t);Ge[e]=null}}},Ye=ue((t=>class extends t{static createProperties(t){const e=this.prototype;for(let i in t)i in e||e._createPropertyAccessor(i)}static attributeNameForProperty(t){return t.toLowerCase()}static typeForProperty(t){}_createPropertyAccessor(t,e){this._addPropertyToAttributeMap(t),this.hasOwnProperty(JSCompiler_renameProperty("__dataHasAccessor",this))||(this.__dataHasAccessor=Object.assign({},this.__dataHasAccessor)),this.__dataHasAccessor[t]||(this.__dataHasAccessor[t]=!0,this._definePropertyAccessor(t,e))}_addPropertyToAttributeMap(t){this.hasOwnProperty(JSCompiler_renameProperty("__dataAttributes",this))||(this.__dataAttributes=Object.assign({},this.__dataAttributes));let e=this.__dataAttributes[t];return e||(e=this.constructor.attributeNameForProperty(t),this.__dataAttributes[e]=t),e}_definePropertyAccessor(t,e){Object.defineProperty(this,t,{get(){return this.__data[t]},set:e?function(){}:function(e){this._setPendingProperty(t,e,!0)&&this._invalidateProperties()}})}constructor(){super(),this.__dataEnabled=!1,this.__dataReady=!1,this.__dataInvalid=!1,this.__data={},this.__dataPending=null,this.__dataOld=null,this.__dataInstanceProps=null,this.__dataCounter=0,this.__serializing=!1,this._initializeProperties()}ready(){this.__dataReady=!0,this._flushProperties()}_initializeProperties(){for(let t in this.__dataHasAccessor)this.hasOwnProperty(t)&&(this.__dataInstanceProps=this.__dataInstanceProps||{},this.__dataInstanceProps[t]=this[t],delete this[t])}_initializeInstanceProperties(t){Object.assign(this,t)}_setProperty(t,e){this._setPendingProperty(t,e)&&this._invalidateProperties()}_getProperty(t){return this.__data[t]}_setPendingProperty(t,e,i){let s=this.__data[t],o=this._shouldPropertyChange(t,e,s);return o&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),this.__dataOld&&!(t in this.__dataOld)&&(this.__dataOld[t]=s),this.__data[t]=e,this.__dataPending[t]=e),o}_isPropertyPending(t){return!(!this.__dataPending||!this.__dataPending.hasOwnProperty(t))}_invalidateProperties(){!this.__dataInvalid&&this.__dataReady&&(this.__dataInvalid=!0,Ve.run((()=>{this.__dataInvalid&&(this.__dataInvalid=!1,this._flushProperties())})))}_enableProperties(){this.__dataEnabled||(this.__dataEnabled=!0,this.__dataInstanceProps&&(this._initializeInstanceProperties(this.__dataInstanceProps),this.__dataInstanceProps=null),this.ready())}_flushProperties(){this.__dataCounter++;const t=this.__data,e=this.__dataPending,i=this.__dataOld;this._shouldPropertiesChange(t,e,i)&&(this.__dataPending=null,this.__dataOld=null,this._propertiesChanged(t,e,i)),this.__dataCounter--}_shouldPropertiesChange(t,e,i){return Boolean(e)}_propertiesChanged(t,e,i){}_shouldPropertyChange(t,e,i){return i!==e&&(i==i||e==e)}attributeChangedCallback(t,e,i,s){e!==i&&this._attributeToProperty(t,i),super.attributeChangedCallback&&super.attributeChangedCallback(t,e,i,s)}_attributeToProperty(t,e,i){if(!this.__serializing){const s=this.__dataAttributes,o=s&&s[t]||t;this[o]=this._deserializeValue(e,i||this.constructor.typeForProperty(o))}}_propertyToAttribute(t,e,i){this.__serializing=!0,this._valueToNodeAttribute(this,i=arguments.length<3?this[t]:i,e||this.constructor.attributeNameForProperty(t)),this.__serializing=!1}_valueToNodeAttribute(t,e,i){const s=this._serializeValue(e);"class"!==i&&"name"!==i&&"slot"!==i||(t=Te(t)),void 0===s?t.removeAttribute(i):t.setAttribute(i,""===s&&window.trustedTypes?window.trustedTypes.emptyScript:s)}_serializeValue(t){return"boolean"==typeof t?t?"":void 0:null!=t?t.toString():void 0}_deserializeValue(t,e){switch(e){case Boolean:return null!==t;case Number:return Number(t);default:return t}}})),$e={};
|
|
1897
1548
|
/**
|
|
1898
1549
|
@license
|
|
1899
1550
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -1902,7 +1553,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
1902
1553
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1903
1554
|
Code distributed by Google as part of the polymer project is also
|
|
1904
1555
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1905
|
-
*/let
|
|
1556
|
+
*/let Ze=HTMLElement.prototype;for(;Ze;){let t=Object.getOwnPropertyNames(Ze);for(let e=0;e<t.length;e++)$e[t[e]]=!0;Ze=Object.getPrototypeOf(Ze)}const Ke=window.trustedTypes?t=>trustedTypes.isHTML(t)||trustedTypes.isScript(t)||trustedTypes.isScriptURL(t):()=>!1,Xe=ue((t=>{const e=Ye(t);return class extends e{static createPropertiesForAttributes(){let t=this.observedAttributes;for(let e=0;e<t.length;e++)this.prototype._createPropertyAccessor(Le(t[e]))}static attributeNameForProperty(t){return Re(t)}_initializeProperties(){this.__dataProto&&(this._initializeProtoProperties(this.__dataProto),this.__dataProto=null),super._initializeProperties()}_initializeProtoProperties(t){for(let e in t)this._setProperty(e,t[e])}_ensureAttribute(t,e){this.hasAttribute(t)||this._valueToNodeAttribute(this,e,t)}_serializeValue(t){if("object"==typeof t){if(t instanceof Date)return t.toString();if(t){if(Ke(t))return t;try{return JSON.stringify(t)}catch(t){return""}}}return super._serializeValue(t)}_deserializeValue(t,e){let i;switch(e){case Object:try{i=JSON.parse(t)}catch(e){i=t}break;case Array:try{i=JSON.parse(t)}catch(e){i=null,console.warn(`Polymer::Attributes: couldn't decode Array as JSON: ${t}`)}break;case Date:i=isNaN(t)?String(t):Number(t),i=new Date(i);break;default:i=super._deserializeValue(t,e)}return i}_definePropertyAccessor(t,e){!function(t,e){if(!$e[e]){let i=t[e];void 0!==i&&(t.__data?t._setPendingProperty(e,i):(t.__dataProto?t.hasOwnProperty(JSCompiler_renameProperty("__dataProto",t))||(t.__dataProto=Object.create(t.__dataProto)):t.__dataProto={},t.__dataProto[e]=i))}}(this,t),super._definePropertyAccessor(t,e)}_hasAccessor(t){return this.__dataHasAccessor&&this.__dataHasAccessor[t]}_isPropertyPending(t){return Boolean(this.__dataPending&&t in this.__dataPending)}}})),Qe={"dom-if":!0,"dom-repeat":!0};let ti=!1,ei=!1;const ii=(()=>{const t=window.trustedTypes&&window.trustedTypes.createPolicy("polymer-template-event-attribute-policy",{createScript:t=>t});return(e,i,s)=>{const o=i.getAttribute(s);t&&s.startsWith("on-")?e.setAttribute(s,t.createScript(o,s)):e.setAttribute(s,o)}})();function si(t){let e=t.getAttribute("is");if(e&&Qe[e]){let i=t;for(i.removeAttribute("is"),t=i.ownerDocument.createElement(e),i.parentNode.replaceChild(t,i),t.appendChild(i);i.attributes.length;){const{name:e}=i.attributes[0];ii(t,i,e),i.removeAttribute(e)}}return t}function oi(t,e){let i=e.parentInfo&&oi(t,e.parentInfo);if(!i)return t;for(let t=i.firstChild,s=0;t;t=t.nextSibling)if(e.parentIndex===s++)return t}function ri(t,e,i,s){s.id&&(e[s.id]=i)}function ni(t,e,i){if(i.events&&i.events.length)for(let s,o=0,r=i.events;o<r.length&&(s=r[o]);o++)t._addMethodEventListenerToNode(e,s.name,s.value,t)}function ai(t,e,i,s){i.templateInfo&&(e._templateInfo=i.templateInfo,e._parentTemplateInfo=s)}const li=ue((t=>class extends t{static _parseTemplate(t,e){if(!t._templateInfo){let i=t._templateInfo={};i.nodeInfoList=[],i.nestedTemplate=Boolean(e),i.stripWhiteSpace=e&&e.stripWhiteSpace||t.hasAttribute&&t.hasAttribute("strip-whitespace"),this._parseTemplateContent(t,i,{parent:null})}return t._templateInfo}static _parseTemplateContent(t,e,i){return this._parseTemplateNode(t.content,e,i)}static _parseTemplateNode(t,e,i){let s=!1,o=t;return"template"!=o.localName||o.hasAttribute("preserve-content")?"slot"===o.localName&&(e.hasInsertionPoint=!0):s=this._parseTemplateNestedTemplate(o,e,i)||s,function(t){(function(){if(!ti){ti=!0;const t=document.createElement("textarea");t.placeholder="a",ei=t.placeholder===t.textContent}return ei})()&&"textarea"===t.localName&&t.placeholder&&t.placeholder===t.textContent&&(t.textContent=null)}(o),o.firstChild&&this._parseTemplateChildNodes(o,e,i),o.hasAttributes&&o.hasAttributes()&&(s=this._parseTemplateNodeAttributes(o,e,i)||s),s||i.noted}static _parseTemplateChildNodes(t,e,i){if("script"!==t.localName&&"style"!==t.localName)for(let s,o=t.firstChild,r=0;o;o=s){if("template"==o.localName&&(o=si(o)),s=o.nextSibling,o.nodeType===Node.TEXT_NODE){let i=s;for(;i&&i.nodeType===Node.TEXT_NODE;)o.textContent+=i.textContent,s=i.nextSibling,t.removeChild(i),i=s;if(e.stripWhiteSpace&&!o.textContent.trim()){t.removeChild(o);continue}}let n={parentIndex:r,parentInfo:i};this._parseTemplateNode(o,e,n)&&(n.infoIndex=e.nodeInfoList.push(n)-1),o.parentNode&&r++}}static _parseTemplateNestedTemplate(t,e,i){let s=t,o=this._parseTemplate(s,e);return(o.content=s.content.ownerDocument.createDocumentFragment()).appendChild(s.content),i.templateInfo=o,!0}static _parseTemplateNodeAttributes(t,e,i){let s=!1,o=Array.from(t.attributes);for(let r,n=o.length-1;r=o[n];n--)s=this._parseTemplateNodeAttribute(t,e,i,r.name,r.value)||s;return s}static _parseTemplateNodeAttribute(t,e,i,s,o){return"on-"===s.slice(0,3)?(t.removeAttribute(s),i.events=i.events||[],i.events.push({name:s.slice(3),value:o}),!0):"id"===s&&(i.id=o,!0)}static _contentForTemplate(t){let e=t._templateInfo;return e&&e.content||t.content}_stampTemplate(t,e){t&&!t.content&&window.HTMLTemplateElement&&HTMLTemplateElement.decorate&&HTMLTemplateElement.decorate(t);let i=(e=e||this.constructor._parseTemplate(t)).nodeInfoList,s=document.importNode(e.content||t.content,!0);s.__noInsertionPoint=!e.hasInsertionPoint;let o=s.nodeList=new Array(i.length);s.$={};for(let t,r=0,n=i.length;r<n&&(t=i[r]);r++){let i=o[r]=oi(s,t);ri(0,s.$,i,t),ai(0,i,t,e),ni(this,i,t)}return s}_addMethodEventListenerToNode(t,e,i,s){let o=function(t,e,i){return t=t._methodHost||t,function(e){t[i]?t[i](e,e.detail):console.warn("listener method `"+i+"` not defined")}}(s=s||t,0,i);return this._addEventListenerToNode(t,e,o),o}_addEventListenerToNode(t,e,i){t.addEventListener(e,i)}_removeEventListenerFromNode(t,e,i){t.removeEventListener(e,i)}}));
|
|
1906
1557
|
/**
|
|
1907
1558
|
* @fileoverview
|
|
1908
1559
|
* @suppress {checkPrototypalTypes}
|
|
@@ -1913,7 +1564,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
1913
1564
|
* be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by
|
|
1914
1565
|
* Google as part of the polymer project is also subject to an additional IP
|
|
1915
1566
|
* rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1916
|
-
*/let bi=0;const gi=[],yi={COMPUTE:"__computeEffects",REFLECT:"__reflectEffects",NOTIFY:"__notifyEffects",PROPAGATE:"__propagateEffects",OBSERVE:"__observeEffects",READ_ONLY:"__readOnly"},wi="__computeInfo",xi=/[A-Z]/;function ki(t,e,i){let o=t[e];if(o){if(!t.hasOwnProperty(e)&&(o=t[e]=Object.create(t[e]),i))for(let t in o){let e=o[t],i=o[t]=Array(e.length);for(let t=0;t<e.length;t++)i[t]=e[t]}}else o=t[e]={};return o}function _i(t,e,i,o,s,r){if(e){let n=!1;const a=bi++;for(let l in i){let c=e[s?je(l):l];if(c)for(let e,h=0,u=c.length;h<u&&(e=c[h]);h++)e.info&&e.info.lastRun===a||s&&!Si(l,e.trigger)||(e.info&&(e.info.lastRun=a),e.fn(t,l,i,o,e.info,s,r),n=!0)}return n}return!1}function Ai(t,e,i,o,s,r,n,a){let l=!1,c=e[n?je(o):o];if(c)for(let e,h=0,u=c.length;h<u&&(e=c[h]);h++)e.info&&e.info.lastRun===i||n&&!Si(o,e.trigger)||(e.info&&(e.info.lastRun=i),e.fn(t,o,s,r,e.info,n,a),l=!0);return l}function Si(t,e){if(e){let i=e.name;return i==t||!(!e.structured||!function(t,e){return 0===t.indexOf(e+".")}(i,t))||!(!e.wildcard||!Fe(i,t))}return!0}function Ci(t,e,i,o,s){let r="string"==typeof s.method?t[s.method]:s.method,n=s.property;r?r.call(t,t.__data[n],o[n]):s.dynamicFn||console.warn("observer method `"+s.method+"` not defined")}function Ti(t,e,i){let o=je(e);return o!==e&&(zi(t,Je(o)+"-changed",i[e],e),!0)}function zi(t,e,i,o){let s={value:i,queueProperty:!0};o&&(s.path=o),Me(t).dispatchEvent(new CustomEvent(e,{detail:s}))}function Ni(t,e,i,o,s,r){let n=(r?je(e):e)!=e?e:null,a=n?Ge(t,n):t.__data[e];n&&void 0===a&&(a=i[e]),zi(t,s.eventName,a,n)}function Ei(t,e,i,o,s){let r=t.__data[e];le&&(r=le(r,s.attrName,"attribute",t)),t._propertyToAttribute(e,s.attrName,r)}const Oi=(t,e,i)=>{let o=0,s=e.length-1,r=-1;for(;o<=s;){const n=o+s>>1,a=i.get(e[n].methodInfo)-i.get(t.methodInfo);if(a<0)o=n+1;else{if(!(a>0)){r=n;break}s=n-1}}r<0&&(r=s+1),e.splice(r,0,t)},Ii=(t,e,i,o,s)=>{const r=e[s?je(t):t];if(r)for(let e=0;e<r.length;e++){const n=r[e];n.info.lastRun===bi||s&&!Si(t,n.trigger)||(n.info.lastRun=bi,Oi(n.info,i,o))}};function Bi(t,e,i,o,s){let r=Li(t,e,i,0,s);if(r===gi)return!1;let n=s.methodInfo;return t.__dataHasAccessor&&t.__dataHasAccessor[n]?t._setPendingProperty(n,r,!0):(t[n]=r,!1)}function Pi(t,e,i,o,s,r,n){i.bindings=i.bindings||[];let a={kind:o,target:s,parts:r,literal:n,isCompound:1!==r.length};if(i.bindings.push(a),function(t){return Boolean(t.target)&&"attribute"!=t.kind&&"text"!=t.kind&&!t.isCompound&&"{"===t.parts[0].mode}(a)){let{event:t,negate:e}=a.parts[0];a.listenerEvent=t||Je(s)+"-changed",a.listenerNegate=e}let l=e.nodeInfoList.length;for(let i=0;i<a.parts.length;i++){let o=a.parts[i];o.compoundIndex=i,Mi(t,e,a,o,l)}}function Mi(t,e,i,o,s){if(!o.literal)if("attribute"===i.kind&&"-"===i.target[0])console.warn("Cannot set attribute "+i.target+' because "-" is not a valid attribute starting character');else{let r=o.dependencies,n={index:s,binding:i,part:o,evaluator:t};for(let i=0;i<r.length;i++){let o=r[i];"string"==typeof o&&(o=Vi(o),o.wildcard=!0),t._addTemplatePropertyEffect(e,o.rootProperty,{fn:Di,info:n,trigger:o})}}}function Di(t,e,i,o,s,r,n){let a=n[s.index],l=s.binding,c=s.part;if(r&&c.source&&e.length>c.source.length&&"property"==l.kind&&!l.isCompound&&a.__isPropertyEffectsClient&&a.__dataHasAccessor&&a.__dataHasAccessor[l.target]){let o=i[e];e=Re(c.source,l.target,e),a._setPendingPropertyOrPath(e,o,!1,!0)&&t._enqueueClient(a)}else{let n=s.evaluator._evaluateBinding(t,c,e,i,o,r);n!==gi&&function(t,e,i,o,s){if(s=function(t,e,i,o){if(i.isCompound){let s=t.__dataCompoundStorage[i.target];s[o.compoundIndex]=e,e=s.join("")}return"attribute"!==i.kind&&("textContent"!==i.target&&("value"!==i.target||"input"!==t.localName&&"textarea"!==t.localName)||(e=null==e?"":e)),e}(e,s,i,o),le&&(s=le(s,i.target,i.kind,e)),"attribute"==i.kind)t._valueToNodeAttribute(e,s,i.target);else{let o=i.target;e.__isPropertyEffectsClient&&e.__dataHasAccessor&&e.__dataHasAccessor[o]?e[yi.READ_ONLY]&&e[yi.READ_ONLY][o]||e._setPendingProperty(o,s)&&t._enqueueClient(e):t._setUnmanagedPropertyToNode(e,o,s)}}(t,a,l,c,n)}}function ji(t,e){if(e.isCompound){let i=t.__dataCompoundStorage||(t.__dataCompoundStorage={}),o=e.parts,s=new Array(o.length);for(let t=0;t<o.length;t++)s[t]=o[t].literal;let r=e.target;i[r]=s,e.literal&&"property"==e.kind&&("className"===r&&(t=Me(t)),t[r]=e.literal)}}function Fi(t,e,i){if(i.listenerEvent){let o=i.parts[0];t.addEventListener(i.listenerEvent,(function(t){!function(t,e,i,o,s){let r,n=t.detail,a=n&&n.path;a?(o=Re(i,o,a),r=n&&n.value):r=t.currentTarget[i],r=s?!r:r,e[yi.READ_ONLY]&&e[yi.READ_ONLY][o]||!e._setPendingPropertyOrPath(o,r,!0,Boolean(a))||n&&n.queueProperty||e._invalidateProperties()}(t,e,i.target,o.source,o.negate)}))}}function Ri(t,e,i,o,s,r){let n={methodName:e.methodName,args:e.args,methodInfo:s,dynamicFn:r=e.static||r&&("object"!=typeof r||r[e.methodName])};for(let s,r=0;r<e.args.length&&(s=e.args[r]);r++)s.literal||t._addPropertyEffect(s.rootProperty,i,{fn:o,info:n,trigger:s});return r&&t._addPropertyEffect(e.methodName,i,{fn:o,info:n}),n}function Li(t,e,i,o,s){let r=t._methodHost||t,n=r[s.methodName];if(n){let o=t._marshalArgs(s.args,e,i);return o===gi?gi:n.apply(r,o)}s.dynamicFn||console.warn("method `"+s.methodName+"` not defined")}const Hi=[],Gi="(?:[a-zA-Z_$][\\w.:$\\-*]*)",Wi="(?:("+Gi+"|(?:[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?)|(?:(?:'(?:[^'\\\\]|\\\\.)*')|(?:\"(?:[^\"\\\\]|\\\\.)*\")))\\s*)",Ui=new RegExp("(\\[\\[|{{)\\s*(?:(!)\\s*)?("+Gi+"\\s*(?:\\(\\s*(?:(?:"+Wi+"(?:,\\s*"+Wi+")*)?)\\)\\s*)?)(?:]]|}})","g");function qi(t){let e="";for(let i=0;i<t.length;i++)e+=t[i].literal||"";return e}function $i(t){let e=t.match(/([^\s]+?)\(([\s\S]*)\)/);if(e){let t={methodName:e[1],static:!0,args:Hi};return e[2].trim()?function(t,e){return e.args=t.map((function(t){let i=Vi(t);return i.literal||(e.static=!1),i}),this),e}(e[2].replace(/\\,/g,",").split(","),t):t}return null}function Vi(t){let e=t.trim().replace(/,/g,",").replace(/\\(.)/g,"$1"),i={name:e,value:"",literal:!1},o=e[0];switch("-"===o&&(o=e[1]),o>="0"&&o<="9"&&(o="#"),o){case"'":case'"':i.value=e.slice(1,-1),i.literal=!0;break;case"#":i.value=Number(e),i.literal=!0}return i.literal||(i.rootProperty=je(e),i.structured=De(e),i.structured&&(i.wildcard=".*"==e.slice(-2),i.wildcard&&(i.name=e.slice(0,-2)))),i}function Ji(t,e,i){let o=Ge(t,i);return void 0===o&&(o=e[i]),o}function Yi(t,e,i,o){const s={indexSplices:o};me&&!t._overrideLegacyUndefined&&(e.splices=s),t.notifyPath(i+".splices",s),t.notifyPath(i+".length",e.length),me&&!t._overrideLegacyUndefined&&(s.indexSplices=[])}function Ki(t,e,i,o,s,r){Yi(t,e,i,[{index:o,addedCount:s,removed:r,object:e,type:"splice"}])}const Zi=we((t=>{const e=vi(ni(t));return class extends e{constructor(){super(),this.__isPropertyEffectsClient=!0}get PROPERTY_EFFECT_TYPES(){return yi}_initializeProperties(){super._initializeProperties(),this._registerHost(),this.__dataClientsReady=!1,this.__dataPendingClients=null,this.__dataToNotify=null,this.__dataLinkedPaths=null,this.__dataHasPaths=!1,this.__dataCompoundStorage=this.__dataCompoundStorage||null,this.__dataHost=this.__dataHost||null,this.__dataTemp={},this.__dataClientsInitialized=!1}_registerHost(){if(Xi.length){let t=Xi[Xi.length-1];t._enqueueClient(this),this.__dataHost=t}}_initializeProtoProperties(t){this.__data=Object.create(t),this.__dataPending=Object.create(t),this.__dataOld={}}_initializeInstanceProperties(t){let e=this[yi.READ_ONLY];for(let i in t)e&&e[i]||(this.__dataPending=this.__dataPending||{},this.__dataOld=this.__dataOld||{},this.__data[i]=this.__dataPending[i]=t[i])}_addPropertyEffect(t,e,i){this._createPropertyAccessor(t,e==yi.READ_ONLY);let o=ki(this,e,!0)[t];o||(o=this[e][t]=[]),o.push(i)}_removePropertyEffect(t,e,i){let o=ki(this,e,!0)[t],s=o.indexOf(i);s>=0&&o.splice(s,1)}_hasPropertyEffect(t,e){let i=this[e];return Boolean(i&&i[t])}_hasReadOnlyEffect(t){return this._hasPropertyEffect(t,yi.READ_ONLY)}_hasNotifyEffect(t){return this._hasPropertyEffect(t,yi.NOTIFY)}_hasReflectEffect(t){return this._hasPropertyEffect(t,yi.REFLECT)}_hasComputedEffect(t){return this._hasPropertyEffect(t,yi.COMPUTE)}_setPendingPropertyOrPath(t,e,i,o){if(o||je(Array.isArray(t)?t[0]:t)!==t){if(!o){let i=Ge(this,t);if(!(t=We(this,t,e))||!super._shouldPropertyChange(t,e,i))return!1}if(this.__dataHasPaths=!0,this._setPendingProperty(t,e,i))return function(t,e,i){let o=t.__dataLinkedPaths;if(o){let s;for(let r in o){let n=o[r];Fe(r,e)?(s=Re(r,n,e),t._setPendingPropertyOrPath(s,i,!0,!0)):Fe(n,e)&&(s=Re(n,r,e),t._setPendingPropertyOrPath(s,i,!0,!0))}}}(this,t,e),!0}else{if(this.__dataHasAccessor&&this.__dataHasAccessor[t])return this._setPendingProperty(t,e,i);this[t]=e}return!1}_setUnmanagedPropertyToNode(t,e,i){i===t[e]&&"object"!=typeof i||("className"===e&&(t=Me(t)),t[e]=i)}_setPendingProperty(t,e,i){let o=this.__dataHasPaths&&De(t);return!!this._shouldPropertyChange(t,e,(o?this.__dataTemp:this.__data)[t])&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),t in this.__dataOld||(this.__dataOld[t]=this.__data[t]),o?this.__dataTemp[t]=e:this.__data[t]=e,this.__dataPending[t]=e,(o||this[yi.NOTIFY]&&this[yi.NOTIFY][t])&&(this.__dataToNotify=this.__dataToNotify||{},this.__dataToNotify[t]=i),!0)}_setProperty(t,e){this._setPendingProperty(t,e,!0)&&this._invalidateProperties()}_invalidateProperties(){this.__dataReady&&this._flushProperties()}_enqueueClient(t){this.__dataPendingClients=this.__dataPendingClients||[],t!==this&&this.__dataPendingClients.push(t)}_flushClients(){this.__dataClientsReady?this.__enableOrFlushClients():(this.__dataClientsReady=!0,this._readyClients(),this.__dataReady=!0)}__enableOrFlushClients(){let t=this.__dataPendingClients;if(t){this.__dataPendingClients=null;for(let e=0;e<t.length;e++){let i=t[e];i.__dataEnabled?i.__dataPending&&i._flushProperties():i._enableProperties()}}}_readyClients(){this.__enableOrFlushClients()}setProperties(t,e){for(let i in t)!e&&this[yi.READ_ONLY]&&this[yi.READ_ONLY][i]||this._setPendingPropertyOrPath(i,t[i],!0);this._invalidateProperties()}ready(){this._flushProperties(),this.__dataClientsReady||this._flushClients(),this.__dataPending&&this._flushProperties()}_propertiesChanged(t,e,i){let o,s=this.__dataHasPaths;this.__dataHasPaths=!1,function(t,e,i,o){let s=t[yi.COMPUTE];if(s)if(fe){bi++;const r=function(t){let e=t.constructor.__orderedComputedDeps;if(!e){e=new Map;const i=t[yi.COMPUTE];let o,{counts:s,ready:r,total:n}=function(t){const e=t[wi],i={},o=t[yi.COMPUTE],s=[];let r=0;for(let t in e){const o=e[t];r+=i[t]=o.args.filter((t=>!t.literal)).length+(o.dynamicFn?1:0)}for(let t in o)e[t]||s.push(t);return{counts:i,ready:s,total:r}}(t);for(;o=r.shift();){e.set(o,e.size);const t=i[o];t&&t.forEach((t=>{const e=t.info.methodInfo;--n,0==--s[e]&&r.push(e)}))}0!==n&&console.warn(`Computed graph for ${t.localName} incomplete; circular?`),t.constructor.__orderedComputedDeps=e}return e}(t),n=[];for(let t in e)Ii(t,s,n,r,o);let a;for(;a=n.shift();)Bi(t,"",e,0,a)&&Ii(a.methodInfo,s,n,r,o);Object.assign(i,t.__dataOld),Object.assign(e,t.__dataPending),t.__dataPending=null}else{let r=e;for(;_i(t,s,r,i,o);)Object.assign(i,t.__dataOld),Object.assign(e,t.__dataPending),r=t.__dataPending,t.__dataPending=null}}(this,e,i,s),o=this.__dataToNotify,this.__dataToNotify=null,this._propagatePropertyChanges(e,i,s),this._flushClients(),_i(this,this[yi.REFLECT],e,i,s),_i(this,this[yi.OBSERVE],e,i,s),o&&function(t,e,i,o,s){let r,n,a=t[yi.NOTIFY],l=bi++;for(let n in e)e[n]&&(a&&Ai(t,a,l,n,i,o,s)||s&&Ti(t,n,i))&&(r=!0);r&&(n=t.__dataHost)&&n._invalidateProperties&&n._invalidateProperties()}(this,o,e,i,s),1==this.__dataCounter&&(this.__dataTemp={})}_propagatePropertyChanges(t,e,i){this[yi.PROPAGATE]&&_i(this,this[yi.PROPAGATE],t,e,i),this.__templateInfo&&this._runEffectsForTemplate(this.__templateInfo,t,e,i)}_runEffectsForTemplate(t,e,i,o){const s=(e,o)=>{_i(this,t.propertyEffects,e,i,o,t.nodeList);for(let s=t.firstChild;s;s=s.nextSibling)this._runEffectsForTemplate(s,e,i,o)};t.runEffects?t.runEffects(s,e,o):s(e,o)}linkPaths(t,e){t=Le(t),e=Le(e),this.__dataLinkedPaths=this.__dataLinkedPaths||{},this.__dataLinkedPaths[t]=e}unlinkPaths(t){t=Le(t),this.__dataLinkedPaths&&delete this.__dataLinkedPaths[t]}notifySplices(t,e){let i={path:""};Yi(this,Ge(this,t,i),i.path,e)}get(t,e){return Ge(e||this,t)}set(t,e,i){i?We(i,t,e):this[yi.READ_ONLY]&&this[yi.READ_ONLY][t]||this._setPendingPropertyOrPath(t,e,!0)&&this._invalidateProperties()}push(t,...e){let i={path:""},o=Ge(this,t,i),s=o.length,r=o.push(...e);return e.length&&Ki(this,o,i.path,s,e.length,[]),r}pop(t){let e={path:""},i=Ge(this,t,e),o=Boolean(i.length),s=i.pop();return o&&Ki(this,i,e.path,i.length,0,[s]),s}splice(t,e,i,...o){let s,r={path:""},n=Ge(this,t,r);return e<0?e=n.length-Math.floor(-e):e&&(e=Math.floor(e)),s=2===arguments.length?n.splice(e):n.splice(e,i,...o),(o.length||s.length)&&Ki(this,n,r.path,e,o.length,s),s}shift(t){let e={path:""},i=Ge(this,t,e),o=Boolean(i.length),s=i.shift();return o&&Ki(this,i,e.path,0,0,[s]),s}unshift(t,...e){let i={path:""},o=Ge(this,t,i),s=o.unshift(...e);return e.length&&Ki(this,o,i.path,0,e.length,[]),s}notifyPath(t,e){let i;if(1==arguments.length){let o={path:""};e=Ge(this,t,o),i=o.path}else i=Array.isArray(t)?Le(t):t;this._setPendingPropertyOrPath(i,e,!0,!0)&&this._invalidateProperties()}_createReadOnlyProperty(t,e){var i;this._addPropertyEffect(t,yi.READ_ONLY),e&&(this["_set"+(i=t,i[0].toUpperCase()+i.substring(1))]=function(e){this._setProperty(t,e)})}_createPropertyObserver(t,e,i){let o={property:t,method:e,dynamicFn:Boolean(i)};this._addPropertyEffect(t,yi.OBSERVE,{fn:Ci,info:o,trigger:{name:t}}),i&&this._addPropertyEffect(e,yi.OBSERVE,{fn:Ci,info:o,trigger:{name:e}})}_createMethodObserver(t,e){let i=$i(t);if(!i)throw new Error("Malformed observer expression '"+t+"'");Ri(this,i,yi.OBSERVE,Li,null,e)}_createNotifyingProperty(t){this._addPropertyEffect(t,yi.NOTIFY,{fn:Ni,info:{eventName:Je(t)+"-changed",property:t}})}_createReflectedProperty(t){let e=this.constructor.attributeNameForProperty(t);"-"===e[0]?console.warn("Property "+t+" cannot be reflected to attribute "+e+' because "-" is not a valid starting attribute name. Use a lowercase first letter for the property instead.'):this._addPropertyEffect(t,yi.REFLECT,{fn:Ei,info:{attrName:e}})}_createComputedProperty(t,e,i){let o=$i(e);if(!o)throw new Error("Malformed computed expression '"+e+"'");const s=Ri(this,o,yi.COMPUTE,Bi,t,i);ki(this,wi)[t]=s}_marshalArgs(t,e,i){const o=this.__data,s=[];for(let r=0,n=t.length;r<n;r++){let{name:n,structured:a,wildcard:l,value:c,literal:h}=t[r];if(!h)if(l){const t=Fe(n,e),s=Ji(o,i,t?e:n);c={path:t?e:n,value:s,base:t?Ge(o,n):s}}else c=a?Ji(o,i,n):o[n];if(me&&!this._overrideLegacyUndefined&&void 0===c&&t.length>1)return gi;s[r]=c}return s}static addPropertyEffect(t,e,i){this.prototype._addPropertyEffect(t,e,i)}static createPropertyObserver(t,e,i){this.prototype._createPropertyObserver(t,e,i)}static createMethodObserver(t,e){this.prototype._createMethodObserver(t,e)}static createNotifyingProperty(t){this.prototype._createNotifyingProperty(t)}static createReadOnlyProperty(t,e){this.prototype._createReadOnlyProperty(t,e)}static createReflectedProperty(t){this.prototype._createReflectedProperty(t)}static createComputedProperty(t,e,i){this.prototype._createComputedProperty(t,e,i)}static bindTemplate(t){return this.prototype._bindTemplate(t)}_bindTemplate(t,e){let i=this.constructor._parseTemplate(t),o=this.__preBoundTemplateInfo==i;if(!o)for(let t in i.propertyEffects)this._createPropertyAccessor(t);if(e)if(i=Object.create(i),i.wasPreBound=o,this.__templateInfo){const e=t._parentTemplateInfo||this.__templateInfo,o=e.lastChild;i.parent=e,e.lastChild=i,i.previousSibling=o,o?o.nextSibling=i:e.firstChild=i}else this.__templateInfo=i;else this.__preBoundTemplateInfo=i;return i}static _addTemplatePropertyEffect(t,e,i){(t.hostProps=t.hostProps||{})[e]=!0;let o=t.propertyEffects=t.propertyEffects||{};(o[e]=o[e]||[]).push(i)}_stampTemplate(t,e){e=e||this._bindTemplate(t,!0),Xi.push(this);let i=super._stampTemplate(t,e);if(Xi.pop(),e.nodeList=i.nodeList,!e.wasPreBound){let t=e.childNodes=[];for(let e=i.firstChild;e;e=e.nextSibling)t.push(e)}return i.templateInfo=e,function(t,e){let{nodeList:i,nodeInfoList:o}=e;if(o.length)for(let e=0;e<o.length;e++){let s=i[e],r=o[e].bindings;if(r)for(let e=0;e<r.length;e++){let i=r[e];ji(s,i),Fi(s,t,i)}s.__dataHost=t}}(this,e),this.__dataClientsReady&&(this._runEffectsForTemplate(e,this.__data,null,!1),this._flushClients()),i}_removeBoundDom(t){const e=t.templateInfo,{previousSibling:i,nextSibling:o,parent:s}=e;i?i.nextSibling=o:s&&(s.firstChild=o),o?o.previousSibling=i:s&&(s.lastChild=i),e.nextSibling=e.previousSibling=null;let r=e.childNodes;for(let t=0;t<r.length;t++){let e=r[t];Me(Me(e).parentNode).removeChild(e)}}static _parseTemplateNode(t,i,o){let s=e._parseTemplateNode.call(this,t,i,o);if(t.nodeType===Node.TEXT_NODE){let e=this._parseBindings(t.textContent,i);e&&(t.textContent=qi(e)||" ",Pi(this,i,o,"text","textContent",e),s=!0)}return s}static _parseTemplateNodeAttribute(t,i,o,s,r){let n=this._parseBindings(r,i);if(n){let e=s,r="property";xi.test(s)?r="attribute":"$"==s[s.length-1]&&(s=s.slice(0,-1),r="attribute");let a=qi(n);return a&&"attribute"==r&&("class"==s&&t.hasAttribute("class")&&(a+=" "+t.getAttribute(s)),t.setAttribute(s,a)),"attribute"==r&&"disable-upgrade$"==e&&t.setAttribute(s,""),"input"===t.localName&&"value"===e&&t.setAttribute(e,""),t.removeAttribute(e),"property"===r&&(s=Ve(s)),Pi(this,i,o,r,s,n,a),!0}return e._parseTemplateNodeAttribute.call(this,t,i,o,s,r)}static _parseTemplateNestedTemplate(t,i,o){let s=e._parseTemplateNestedTemplate.call(this,t,i,o);const r=t.parentNode,n=o.templateInfo,a="dom-if"===r.localName;ve&&(a||"dom-repeat"===r.localName)&&(r.removeChild(t),(o=o.parentInfo).templateInfo=n,o.noted=!0,s=!1);let l=n.hostProps;if(be&&a)l&&(i.hostProps=Object.assign(i.hostProps||{},l),ve||(o.parentInfo.noted=!0));else{let t="{";for(let e in l)Pi(this,i,o,"property","_host_"+e,[{mode:t,source:e,dependencies:[e],hostProp:!0}])}return s}static _parseBindings(t,e){let i,o=[],s=0;for(;null!==(i=Ui.exec(t));){i.index>s&&o.push({literal:t.slice(s,i.index)});let r=i[1][0],n=Boolean(i[2]),a=i[3].trim(),l=!1,c="",h=-1;"{"==r&&(h=a.indexOf("::"))>0&&(c=a.substring(h+2),a=a.substring(0,h),l=!0);let u=$i(a),d=[];if(u){let{args:t,methodName:i}=u;for(let e=0;e<t.length;e++){let i=t[e];i.literal||d.push(i)}let o=e.dynamicFns;(o&&o[i]||u.static)&&(d.push(i),u.dynamicFn=!0)}else d.push(a);o.push({source:a,mode:r,negate:n,customEvent:l,signature:u,dependencies:d,event:c}),s=Ui.lastIndex}if(s&&s<t.length){let e=t.substring(s);e&&o.push({literal:e})}return o.length?o:null}static _evaluateBinding(t,e,i,o,s,r){let n;return n=e.signature?Li(t,i,o,0,e.signature):i!=e.source?Ge(t,e.source):r&&De(i)?Ge(t,i):t.__data[i],e.negate&&(n=!n),n}}})),Xi=[],Qi=we((t=>{const e=ii(t);function i(t){const e=Object.getPrototypeOf(t);return e.prototype instanceof s?e:null}function o(t){if(!t.hasOwnProperty(JSCompiler_renameProperty("__ownProperties",t))){let e=null;if(t.hasOwnProperty(JSCompiler_renameProperty("properties",t))){const i=t.properties;i&&(e=
|
|
1567
|
+
*/let hi=0;const ci=[],di={COMPUTE:"__computeEffects",REFLECT:"__reflectEffects",NOTIFY:"__notifyEffects",PROPAGATE:"__propagateEffects",OBSERVE:"__observeEffects",READ_ONLY:"__readOnly"},ui="__computeInfo",pi=/[A-Z]/;function mi(t,e,i){let s=t[e];if(s){if(!t.hasOwnProperty(e)&&(s=t[e]=Object.create(t[e]),i))for(let t in s){let e=s[t],i=s[t]=Array(e.length);for(let t=0;t<e.length;t++)i[t]=e[t]}}else s=t[e]={};return s}function fi(t,e,i,s,o,r){if(e){let n=!1;const a=hi++;for(let l in i){let h=e[o?Ne(l):l];if(h)for(let e,c=0,d=h.length;c<d&&(e=h[c]);c++)e.info&&e.info.lastRun===a||o&&!bi(l,e.trigger)||(e.info&&(e.info.lastRun=a),e.fn(t,l,i,s,e.info,o,r),n=!0)}return n}return!1}function vi(t,e,i,s,o,r,n,a){let l=!1,h=e[n?Ne(s):s];if(h)for(let e,c=0,d=h.length;c<d&&(e=h[c]);c++)e.info&&e.info.lastRun===i||n&&!bi(s,e.trigger)||(e.info&&(e.info.lastRun=i),e.fn(t,s,o,r,e.info,n,a),l=!0);return l}function bi(t,e){if(e){let i=e.name;return i==t||!(!e.structured||!function(t,e){return 0===t.indexOf(e+".")}(i,t))||!(!e.wildcard||!Ee(i,t))}return!0}function gi(t,e,i,s,o){let r="string"==typeof o.method?t[o.method]:o.method,n=o.property;r?r.call(t,t.__data[n],s[n]):o.dynamicFn||console.warn("observer method `"+o.method+"` not defined")}function yi(t,e,i){let s=Ne(e);return s!==e&&(wi(t,Re(s)+"-changed",i[e],e),!0)}function wi(t,e,i,s){let o={value:i,queueProperty:!0};s&&(o.path=s),Te(t).dispatchEvent(new CustomEvent(e,{detail:o}))}function xi(t,e,i,s,o,r){let n=(r?Ne(e):e)!=e?e:null,a=n?Be(t,n):t.__data[e];n&&void 0===a&&(a=i[e]),wi(t,o.eventName,a,n)}function ki(t,e,i,s,o){let r=t.__data[e];te&&(r=te(r,o.attrName,"attribute",t)),t._propertyToAttribute(e,o.attrName,r)}const _i=(t,e,i)=>{let s=0,o=e.length-1,r=-1;for(;s<=o;){const n=s+o>>1,a=i.get(e[n].methodInfo)-i.get(t.methodInfo);if(a<0)s=n+1;else{if(!(a>0)){r=n;break}o=n-1}}r<0&&(r=o+1),e.splice(r,0,t)},Ai=(t,e,i,s,o)=>{const r=e[o?Ne(t):t];if(r)for(let e=0;e<r.length;e++){const n=r[e];n.info.lastRun===hi||o&&!bi(t,n.trigger)||(n.info.lastRun=hi,_i(n.info,i,s))}};function Si(t,e,i,s,o){let r=Ii(t,e,i,0,o);if(r===ci)return!1;let n=o.methodInfo;return t.__dataHasAccessor&&t.__dataHasAccessor[n]?t._setPendingProperty(n,r,!0):(t[n]=r,!1)}function Ci(t,e,i,s,o,r,n){i.bindings=i.bindings||[];let a={kind:s,target:o,parts:r,literal:n,isCompound:1!==r.length};if(i.bindings.push(a),function(t){return Boolean(t.target)&&"attribute"!=t.kind&&"text"!=t.kind&&!t.isCompound&&"{"===t.parts[0].mode}(a)){let{event:t,negate:e}=a.parts[0];a.listenerEvent=t||Re(o)+"-changed",a.listenerNegate=e}let l=e.nodeInfoList.length;for(let i=0;i<a.parts.length;i++){let s=a.parts[i];s.compoundIndex=i,Ti(t,e,a,s,l)}}function Ti(t,e,i,s,o){if(!s.literal)if("attribute"===i.kind&&"-"===i.target[0])console.warn("Cannot set attribute "+i.target+' because "-" is not a valid attribute starting character');else{let r=s.dependencies,n={index:o,binding:i,part:s,evaluator:t};for(let i=0;i<r.length;i++){let s=r[i];"string"==typeof s&&(s=Li(s),s.wildcard=!0),t._addTemplatePropertyEffect(e,s.rootProperty,{fn:zi,info:n,trigger:s})}}}function zi(t,e,i,s,o,r,n){let a=n[o.index],l=o.binding,h=o.part;if(r&&h.source&&e.length>h.source.length&&"property"==l.kind&&!l.isCompound&&a.__isPropertyEffectsClient&&a.__dataHasAccessor&&a.__dataHasAccessor[l.target]){let s=i[e];e=Oe(h.source,l.target,e),a._setPendingPropertyOrPath(e,s,!1,!0)&&t._enqueueClient(a)}else{let n=o.evaluator._evaluateBinding(t,h,e,i,s,r);n!==ci&&function(t,e,i,s,o){if(o=function(t,e,i,s){if(i.isCompound){let o=t.__dataCompoundStorage[i.target];o[s.compoundIndex]=e,e=o.join("")}return"attribute"!==i.kind&&("textContent"!==i.target&&("value"!==i.target||"input"!==t.localName&&"textarea"!==t.localName)||(e=null==e?"":e)),e}(e,o,i,s),te&&(o=te(o,i.target,i.kind,e)),"attribute"==i.kind)t._valueToNodeAttribute(e,o,i.target);else{let s=i.target;e.__isPropertyEffectsClient&&e.__dataHasAccessor&&e.__dataHasAccessor[s]?e[di.READ_ONLY]&&e[di.READ_ONLY][s]||e._setPendingProperty(s,o)&&t._enqueueClient(e):t._setUnmanagedPropertyToNode(e,s,o)}}(t,a,l,h,n)}}function Ni(t,e){if(e.isCompound){let i=t.__dataCompoundStorage||(t.__dataCompoundStorage={}),s=e.parts,o=new Array(s.length);for(let t=0;t<s.length;t++)o[t]=s[t].literal;let r=e.target;i[r]=o,e.literal&&"property"==e.kind&&("className"===r&&(t=Te(t)),t[r]=e.literal)}}function Ei(t,e,i){if(i.listenerEvent){let s=i.parts[0];t.addEventListener(i.listenerEvent,(function(t){!function(t,e,i,s,o){let r,n=t.detail,a=n&&n.path;a?(s=Oe(i,s,a),r=n&&n.value):r=t.currentTarget[i],r=o?!r:r,e[di.READ_ONLY]&&e[di.READ_ONLY][s]||!e._setPendingPropertyOrPath(s,r,!0,Boolean(a))||n&&n.queueProperty||e._invalidateProperties()}(t,e,i.target,s.source,s.negate)}))}}function Oi(t,e,i,s,o,r){let n={methodName:e.methodName,args:e.args,methodInfo:o,dynamicFn:r=e.static||r&&("object"!=typeof r||r[e.methodName])};for(let o,r=0;r<e.args.length&&(o=e.args[r]);r++)o.literal||t._addPropertyEffect(o.rootProperty,i,{fn:s,info:n,trigger:o});return r&&t._addPropertyEffect(e.methodName,i,{fn:s,info:n}),n}function Ii(t,e,i,s,o){let r=t._methodHost||t,n=r[o.methodName];if(n){let s=t._marshalArgs(o.args,e,i);return s===ci?ci:n.apply(r,s)}o.dynamicFn||console.warn("method `"+o.methodName+"` not defined")}const Pi=[],Bi="(?:[a-zA-Z_$][\\w.:$\\-*]*)",Mi="(?:("+Bi+"|(?:[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?)|(?:(?:'(?:[^'\\\\]|\\\\.)*')|(?:\"(?:[^\"\\\\]|\\\\.)*\")))\\s*)",Di=new RegExp("(\\[\\[|{{)\\s*(?:(!)\\s*)?("+Bi+"\\s*(?:\\(\\s*(?:(?:"+Mi+"(?:,\\s*"+Mi+")*)?)\\)\\s*)?)(?:]]|}})","g");function ji(t){let e="";for(let i=0;i<t.length;i++)e+=t[i].literal||"";return e}function Fi(t){let e=t.match(/([^\s]+?)\(([\s\S]*)\)/);if(e){let t={methodName:e[1],static:!0,args:Pi};return e[2].trim()?function(t,e){return e.args=t.map((function(t){let i=Li(t);return i.literal||(e.static=!1),i}),this),e}(e[2].replace(/\\,/g,",").split(","),t):t}return null}function Li(t){let e=t.trim().replace(/,/g,",").replace(/\\(.)/g,"$1"),i={name:e,value:"",literal:!1},s=e[0];switch("-"===s&&(s=e[1]),s>="0"&&s<="9"&&(s="#"),s){case"'":case'"':i.value=e.slice(1,-1),i.literal=!0;break;case"#":i.value=Number(e),i.literal=!0}return i.literal||(i.rootProperty=Ne(e),i.structured=ze(e),i.structured&&(i.wildcard=".*"==e.slice(-2),i.wildcard&&(i.name=e.slice(0,-2)))),i}function Ri(t,e,i){let s=Be(t,i);return void 0===s&&(s=e[i]),s}function Hi(t,e,i,s){const o={indexSplices:s};ne&&!t._overrideLegacyUndefined&&(e.splices=o),t.notifyPath(i+".splices",o),t.notifyPath(i+".length",e.length),ne&&!t._overrideLegacyUndefined&&(o.indexSplices=[])}function Wi(t,e,i,s,o,r){Hi(t,e,i,[{index:s,addedCount:o,removed:r,object:e,type:"splice"}])}const Gi=ue((t=>{const e=li(Xe(t));return class extends e{constructor(){super(),this.__isPropertyEffectsClient=!0}get PROPERTY_EFFECT_TYPES(){return di}_initializeProperties(){super._initializeProperties(),this._registerHost(),this.__dataClientsReady=!1,this.__dataPendingClients=null,this.__dataToNotify=null,this.__dataLinkedPaths=null,this.__dataHasPaths=!1,this.__dataCompoundStorage=this.__dataCompoundStorage||null,this.__dataHost=this.__dataHost||null,this.__dataTemp={},this.__dataClientsInitialized=!1}_registerHost(){if(Ui.length){let t=Ui[Ui.length-1];t._enqueueClient(this),this.__dataHost=t}}_initializeProtoProperties(t){this.__data=Object.create(t),this.__dataPending=Object.create(t),this.__dataOld={}}_initializeInstanceProperties(t){let e=this[di.READ_ONLY];for(let i in t)e&&e[i]||(this.__dataPending=this.__dataPending||{},this.__dataOld=this.__dataOld||{},this.__data[i]=this.__dataPending[i]=t[i])}_addPropertyEffect(t,e,i){this._createPropertyAccessor(t,e==di.READ_ONLY);let s=mi(this,e,!0)[t];s||(s=this[e][t]=[]),s.push(i)}_removePropertyEffect(t,e,i){let s=mi(this,e,!0)[t],o=s.indexOf(i);o>=0&&s.splice(o,1)}_hasPropertyEffect(t,e){let i=this[e];return Boolean(i&&i[t])}_hasReadOnlyEffect(t){return this._hasPropertyEffect(t,di.READ_ONLY)}_hasNotifyEffect(t){return this._hasPropertyEffect(t,di.NOTIFY)}_hasReflectEffect(t){return this._hasPropertyEffect(t,di.REFLECT)}_hasComputedEffect(t){return this._hasPropertyEffect(t,di.COMPUTE)}_setPendingPropertyOrPath(t,e,i,s){if(s||Ne(Array.isArray(t)?t[0]:t)!==t){if(!s){let i=Be(this,t);if(!(t=Me(this,t,e))||!super._shouldPropertyChange(t,e,i))return!1}if(this.__dataHasPaths=!0,this._setPendingProperty(t,e,i))return function(t,e,i){let s=t.__dataLinkedPaths;if(s){let o;for(let r in s){let n=s[r];Ee(r,e)?(o=Oe(r,n,e),t._setPendingPropertyOrPath(o,i,!0,!0)):Ee(n,e)&&(o=Oe(n,r,e),t._setPendingPropertyOrPath(o,i,!0,!0))}}}(this,t,e),!0}else{if(this.__dataHasAccessor&&this.__dataHasAccessor[t])return this._setPendingProperty(t,e,i);this[t]=e}return!1}_setUnmanagedPropertyToNode(t,e,i){i===t[e]&&"object"!=typeof i||("className"===e&&(t=Te(t)),t[e]=i)}_setPendingProperty(t,e,i){let s=this.__dataHasPaths&&ze(t);return!!this._shouldPropertyChange(t,e,(s?this.__dataTemp:this.__data)[t])&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),t in this.__dataOld||(this.__dataOld[t]=this.__data[t]),s?this.__dataTemp[t]=e:this.__data[t]=e,this.__dataPending[t]=e,(s||this[di.NOTIFY]&&this[di.NOTIFY][t])&&(this.__dataToNotify=this.__dataToNotify||{},this.__dataToNotify[t]=i),!0)}_setProperty(t,e){this._setPendingProperty(t,e,!0)&&this._invalidateProperties()}_invalidateProperties(){this.__dataReady&&this._flushProperties()}_enqueueClient(t){this.__dataPendingClients=this.__dataPendingClients||[],t!==this&&this.__dataPendingClients.push(t)}_flushClients(){this.__dataClientsReady?this.__enableOrFlushClients():(this.__dataClientsReady=!0,this._readyClients(),this.__dataReady=!0)}__enableOrFlushClients(){let t=this.__dataPendingClients;if(t){this.__dataPendingClients=null;for(let e=0;e<t.length;e++){let i=t[e];i.__dataEnabled?i.__dataPending&&i._flushProperties():i._enableProperties()}}}_readyClients(){this.__enableOrFlushClients()}setProperties(t,e){for(let i in t)!e&&this[di.READ_ONLY]&&this[di.READ_ONLY][i]||this._setPendingPropertyOrPath(i,t[i],!0);this._invalidateProperties()}ready(){this._flushProperties(),this.__dataClientsReady||this._flushClients(),this.__dataPending&&this._flushProperties()}_propertiesChanged(t,e,i){let s,o=this.__dataHasPaths;this.__dataHasPaths=!1,function(t,e,i,s){let o=t[di.COMPUTE];if(o)if(ae){hi++;const r=function(t){let e=t.constructor.__orderedComputedDeps;if(!e){e=new Map;const i=t[di.COMPUTE];let s,{counts:o,ready:r,total:n}=function(t){const e=t[ui],i={},s=t[di.COMPUTE],o=[];let r=0;for(let t in e){const s=e[t];r+=i[t]=s.args.filter((t=>!t.literal)).length+(s.dynamicFn?1:0)}for(let t in s)e[t]||o.push(t);return{counts:i,ready:o,total:r}}(t);for(;s=r.shift();){e.set(s,e.size);const t=i[s];t&&t.forEach((t=>{const e=t.info.methodInfo;--n,0==--o[e]&&r.push(e)}))}0!==n&&console.warn(`Computed graph for ${t.localName} incomplete; circular?`),t.constructor.__orderedComputedDeps=e}return e}(t),n=[];for(let t in e)Ai(t,o,n,r,s);let a;for(;a=n.shift();)Si(t,"",e,0,a)&&Ai(a.methodInfo,o,n,r,s);Object.assign(i,t.__dataOld),Object.assign(e,t.__dataPending),t.__dataPending=null}else{let r=e;for(;fi(t,o,r,i,s);)Object.assign(i,t.__dataOld),Object.assign(e,t.__dataPending),r=t.__dataPending,t.__dataPending=null}}(this,e,i,o),s=this.__dataToNotify,this.__dataToNotify=null,this._propagatePropertyChanges(e,i,o),this._flushClients(),fi(this,this[di.REFLECT],e,i,o),fi(this,this[di.OBSERVE],e,i,o),s&&function(t,e,i,s,o){let r,n,a=t[di.NOTIFY],l=hi++;for(let n in e)e[n]&&(a&&vi(t,a,l,n,i,s,o)||o&&yi(t,n,i))&&(r=!0);r&&(n=t.__dataHost)&&n._invalidateProperties&&n._invalidateProperties()}(this,s,e,i,o),1==this.__dataCounter&&(this.__dataTemp={})}_propagatePropertyChanges(t,e,i){this[di.PROPAGATE]&&fi(this,this[di.PROPAGATE],t,e,i),this.__templateInfo&&this._runEffectsForTemplate(this.__templateInfo,t,e,i)}_runEffectsForTemplate(t,e,i,s){const o=(e,s)=>{fi(this,t.propertyEffects,e,i,s,t.nodeList);for(let o=t.firstChild;o;o=o.nextSibling)this._runEffectsForTemplate(o,e,i,s)};t.runEffects?t.runEffects(o,e,s):o(e,s)}linkPaths(t,e){t=Ie(t),e=Ie(e),this.__dataLinkedPaths=this.__dataLinkedPaths||{},this.__dataLinkedPaths[t]=e}unlinkPaths(t){t=Ie(t),this.__dataLinkedPaths&&delete this.__dataLinkedPaths[t]}notifySplices(t,e){let i={path:""};Hi(this,Be(this,t,i),i.path,e)}get(t,e){return Be(e||this,t)}set(t,e,i){i?Me(i,t,e):this[di.READ_ONLY]&&this[di.READ_ONLY][t]||this._setPendingPropertyOrPath(t,e,!0)&&this._invalidateProperties()}push(t,...e){let i={path:""},s=Be(this,t,i),o=s.length,r=s.push(...e);return e.length&&Wi(this,s,i.path,o,e.length,[]),r}pop(t){let e={path:""},i=Be(this,t,e),s=Boolean(i.length),o=i.pop();return s&&Wi(this,i,e.path,i.length,0,[o]),o}splice(t,e,i,...s){let o,r={path:""},n=Be(this,t,r);return e<0?e=n.length-Math.floor(-e):e&&(e=Math.floor(e)),o=2===arguments.length?n.splice(e):n.splice(e,i,...s),(s.length||o.length)&&Wi(this,n,r.path,e,s.length,o),o}shift(t){let e={path:""},i=Be(this,t,e),s=Boolean(i.length),o=i.shift();return s&&Wi(this,i,e.path,0,0,[o]),o}unshift(t,...e){let i={path:""},s=Be(this,t,i),o=s.unshift(...e);return e.length&&Wi(this,s,i.path,0,e.length,[]),o}notifyPath(t,e){let i;if(1==arguments.length){let s={path:""};e=Be(this,t,s),i=s.path}else i=Array.isArray(t)?Ie(t):t;this._setPendingPropertyOrPath(i,e,!0,!0)&&this._invalidateProperties()}_createReadOnlyProperty(t,e){var i;this._addPropertyEffect(t,di.READ_ONLY),e&&(this["_set"+(i=t,i[0].toUpperCase()+i.substring(1))]=function(e){this._setProperty(t,e)})}_createPropertyObserver(t,e,i){let s={property:t,method:e,dynamicFn:Boolean(i)};this._addPropertyEffect(t,di.OBSERVE,{fn:gi,info:s,trigger:{name:t}}),i&&this._addPropertyEffect(e,di.OBSERVE,{fn:gi,info:s,trigger:{name:e}})}_createMethodObserver(t,e){let i=Fi(t);if(!i)throw new Error("Malformed observer expression '"+t+"'");Oi(this,i,di.OBSERVE,Ii,null,e)}_createNotifyingProperty(t){this._addPropertyEffect(t,di.NOTIFY,{fn:xi,info:{eventName:Re(t)+"-changed",property:t}})}_createReflectedProperty(t){let e=this.constructor.attributeNameForProperty(t);"-"===e[0]?console.warn("Property "+t+" cannot be reflected to attribute "+e+' because "-" is not a valid starting attribute name. Use a lowercase first letter for the property instead.'):this._addPropertyEffect(t,di.REFLECT,{fn:ki,info:{attrName:e}})}_createComputedProperty(t,e,i){let s=Fi(e);if(!s)throw new Error("Malformed computed expression '"+e+"'");const o=Oi(this,s,di.COMPUTE,Si,t,i);mi(this,ui)[t]=o}_marshalArgs(t,e,i){const s=this.__data,o=[];for(let r=0,n=t.length;r<n;r++){let{name:n,structured:a,wildcard:l,value:h,literal:c}=t[r];if(!c)if(l){const t=Ee(n,e),o=Ri(s,i,t?e:n);h={path:t?e:n,value:o,base:t?Be(s,n):o}}else h=a?Ri(s,i,n):s[n];if(ne&&!this._overrideLegacyUndefined&&void 0===h&&t.length>1)return ci;o[r]=h}return o}static addPropertyEffect(t,e,i){this.prototype._addPropertyEffect(t,e,i)}static createPropertyObserver(t,e,i){this.prototype._createPropertyObserver(t,e,i)}static createMethodObserver(t,e){this.prototype._createMethodObserver(t,e)}static createNotifyingProperty(t){this.prototype._createNotifyingProperty(t)}static createReadOnlyProperty(t,e){this.prototype._createReadOnlyProperty(t,e)}static createReflectedProperty(t){this.prototype._createReflectedProperty(t)}static createComputedProperty(t,e,i){this.prototype._createComputedProperty(t,e,i)}static bindTemplate(t){return this.prototype._bindTemplate(t)}_bindTemplate(t,e){let i=this.constructor._parseTemplate(t),s=this.__preBoundTemplateInfo==i;if(!s)for(let t in i.propertyEffects)this._createPropertyAccessor(t);if(e)if(i=Object.create(i),i.wasPreBound=s,this.__templateInfo){const e=t._parentTemplateInfo||this.__templateInfo,s=e.lastChild;i.parent=e,e.lastChild=i,i.previousSibling=s,s?s.nextSibling=i:e.firstChild=i}else this.__templateInfo=i;else this.__preBoundTemplateInfo=i;return i}static _addTemplatePropertyEffect(t,e,i){(t.hostProps=t.hostProps||{})[e]=!0;let s=t.propertyEffects=t.propertyEffects||{};(s[e]=s[e]||[]).push(i)}_stampTemplate(t,e){e=e||this._bindTemplate(t,!0),Ui.push(this);let i=super._stampTemplate(t,e);if(Ui.pop(),e.nodeList=i.nodeList,!e.wasPreBound){let t=e.childNodes=[];for(let e=i.firstChild;e;e=e.nextSibling)t.push(e)}return i.templateInfo=e,function(t,e){let{nodeList:i,nodeInfoList:s}=e;if(s.length)for(let e=0;e<s.length;e++){let o=i[e],r=s[e].bindings;if(r)for(let e=0;e<r.length;e++){let i=r[e];Ni(o,i),Ei(o,t,i)}o.__dataHost=t}}(this,e),this.__dataClientsReady&&(this._runEffectsForTemplate(e,this.__data,null,!1),this._flushClients()),i}_removeBoundDom(t){const e=t.templateInfo,{previousSibling:i,nextSibling:s,parent:o}=e;i?i.nextSibling=s:o&&(o.firstChild=s),s?s.previousSibling=i:o&&(o.lastChild=i),e.nextSibling=e.previousSibling=null;let r=e.childNodes;for(let t=0;t<r.length;t++){let e=r[t];Te(Te(e).parentNode).removeChild(e)}}static _parseTemplateNode(t,i,s){let o=e._parseTemplateNode.call(this,t,i,s);if(t.nodeType===Node.TEXT_NODE){let e=this._parseBindings(t.textContent,i);e&&(t.textContent=ji(e)||" ",Ci(this,i,s,"text","textContent",e),o=!0)}return o}static _parseTemplateNodeAttribute(t,i,s,o,r){let n=this._parseBindings(r,i);if(n){let e=o,r="property";pi.test(o)?r="attribute":"$"==o[o.length-1]&&(o=o.slice(0,-1),r="attribute");let a=ji(n);return a&&"attribute"==r&&("class"==o&&t.hasAttribute("class")&&(a+=" "+t.getAttribute(o)),t.setAttribute(o,a)),"attribute"==r&&"disable-upgrade$"==e&&t.setAttribute(o,""),"input"===t.localName&&"value"===e&&t.setAttribute(e,""),t.removeAttribute(e),"property"===r&&(o=Le(o)),Ci(this,i,s,r,o,n,a),!0}return e._parseTemplateNodeAttribute.call(this,t,i,s,o,r)}static _parseTemplateNestedTemplate(t,i,s){let o=e._parseTemplateNestedTemplate.call(this,t,i,s);const r=t.parentNode,n=s.templateInfo,a="dom-if"===r.localName;le&&(a||"dom-repeat"===r.localName)&&(r.removeChild(t),(s=s.parentInfo).templateInfo=n,s.noted=!0,o=!1);let l=n.hostProps;if(he&&a)l&&(i.hostProps=Object.assign(i.hostProps||{},l),le||(s.parentInfo.noted=!0));else{let t="{";for(let e in l)Ci(this,i,s,"property","_host_"+e,[{mode:t,source:e,dependencies:[e],hostProp:!0}])}return o}static _parseBindings(t,e){let i,s=[],o=0;for(;null!==(i=Di.exec(t));){i.index>o&&s.push({literal:t.slice(o,i.index)});let r=i[1][0],n=Boolean(i[2]),a=i[3].trim(),l=!1,h="",c=-1;"{"==r&&(c=a.indexOf("::"))>0&&(h=a.substring(c+2),a=a.substring(0,c),l=!0);let d=Fi(a),u=[];if(d){let{args:t,methodName:i}=d;for(let e=0;e<t.length;e++){let i=t[e];i.literal||u.push(i)}let s=e.dynamicFns;(s&&s[i]||d.static)&&(u.push(i),d.dynamicFn=!0)}else u.push(a);s.push({source:a,mode:r,negate:n,customEvent:l,signature:d,dependencies:u,event:h}),o=Di.lastIndex}if(o&&o<t.length){let e=t.substring(o);e&&s.push({literal:e})}return s.length?s:null}static _evaluateBinding(t,e,i,s,o,r){let n;return n=e.signature?Ii(t,i,s,0,e.signature):i!=e.source?Be(t,e.source):r&&ze(i)?Be(t,i):t.__data[i],e.negate&&(n=!n),n}}})),Ui=[],qi=ue((t=>{const e=Ye(t);function i(t){const e=Object.getPrototypeOf(t);return e.prototype instanceof o?e:null}function s(t){if(!t.hasOwnProperty(JSCompiler_renameProperty("__ownProperties",t))){let e=null;if(t.hasOwnProperty(JSCompiler_renameProperty("properties",t))){const i=t.properties;i&&(e=
|
|
1917
1568
|
/**
|
|
1918
1569
|
@license
|
|
1919
1570
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -1923,12 +1574,12 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
|
|
|
1923
1574
|
Code distributed by Google as part of the polymer project is also
|
|
1924
1575
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1925
1576
|
*/
|
|
1926
|
-
function(t){const e={};for(let i in t){const
|
|
1577
|
+
function(t){const e={};for(let i in t){const s=t[i];e[i]="function"==typeof s?{type:s}:s}return e}(i))}t.__ownProperties=e}return t.__ownProperties}class o extends e{static get observedAttributes(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__observedAttributes",this))){const t=this._properties;this.__observedAttributes=t?Object.keys(t).map((t=>this.prototype._addPropertyToAttributeMap(t))):[]}return this.__observedAttributes}static finalize(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__finalized",this))){const t=i(this);t&&t.finalize(),this.__finalized=!0,this._finalizeClass()}}static _finalizeClass(){const t=s(this);t&&this.createProperties(t)}static get _properties(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__properties",this))){const t=i(this);this.__properties=Object.assign({},t&&t._properties,s(this))}return this.__properties}static typeForProperty(t){const e=this._properties[t];return e&&e.type}_initializeProperties(){this.constructor.finalize(),super._initializeProperties()}connectedCallback(){super.connectedCallback&&super.connectedCallback(),this._enableProperties()}disconnectedCallback(){super.disconnectedCallback&&super.disconnectedCallback()}}return o})),Ji=window.ShadyCSS&&window.ShadyCSS.cssBuild,Vi=ue((t=>{const e=qi(Gi(t));function i(t,e,i,s){i.computed&&(i.readOnly=!0),i.computed&&(t._hasReadOnlyEffect(e)?console.warn(`Cannot redefine computed property '${e}'.`):t._createComputedProperty(e,i.computed,s)),i.readOnly&&!t._hasReadOnlyEffect(e)?t._createReadOnlyProperty(e,!i.computed):!1===i.readOnly&&t._hasReadOnlyEffect(e)&&console.warn(`Cannot make readOnly property '${e}' non-readOnly.`),i.reflectToAttribute&&!t._hasReflectEffect(e)?t._createReflectedProperty(e):!1===i.reflectToAttribute&&t._hasReflectEffect(e)&&console.warn(`Cannot make reflected property '${e}' non-reflected.`),i.notify&&!t._hasNotifyEffect(e)?t._createNotifyingProperty(e):!1===i.notify&&t._hasNotifyEffect(e)&&console.warn(`Cannot make notify property '${e}' non-notify.`),i.observer&&t._createPropertyObserver(e,i.observer,s[i.observer]),t._addPropertyToAttributeMap(e)}return class extends e{static get polymerElementVersion(){return"3.5.2"}static _finalizeClass(){e._finalizeClass.call(this);const t=((i=this).hasOwnProperty(JSCompiler_renameProperty("__ownObservers",i))||(i.__ownObservers=i.hasOwnProperty(JSCompiler_renameProperty("observers",i))?i.observers:null),i.__ownObservers);var i;t&&this.createObservers(t,this._properties),this._prepareTemplate()}static _prepareTemplate(){let t=this.template;t&&("string"==typeof t?(console.error("template getter must return HTMLTemplateElement"),t=null):se||(t=t.cloneNode(!0))),this.prototype._template=t}static createProperties(t){for(let e in t)i(this.prototype,e,t[e],t)}static createObservers(t,e){const i=this.prototype;for(let s=0;s<t.length;s++)i._createMethodObserver(t[s],e)}static get template(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_template",this))){let t=this.prototype.hasOwnProperty(JSCompiler_renameProperty("_template",this.prototype))?this.prototype._template:void 0;"function"==typeof t&&(t=t()),this._template=void 0!==t?t:this.hasOwnProperty(JSCompiler_renameProperty("is",this))&&function(t){let e=null;if(t&&(!ee||ie)&&(e=be.import(t,"template"),ee&&!e))throw new Error(`strictTemplatePolicy: expecting dom-module or null template for ${t}`);return e}(this.is)||Object.getPrototypeOf(this.prototype).constructor.template}return this._template}static set template(t){this._template=t}static get importPath(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_importPath",this))){const t=this.importMeta;if(t)this._importPath=Kt(t.url);else{const t=be.import(this.is);this._importPath=t&&t.assetpath||Object.getPrototypeOf(this.prototype).constructor.importPath}}return this._importPath}constructor(){super()}_initializeProperties(){this.constructor.finalize(),this.constructor._finalizeTemplate(this.localName),super._initializeProperties(),this.rootPath=Qt,this.importPath=this.constructor.importPath;let t=function(t){if(!t.hasOwnProperty(JSCompiler_renameProperty("__propertyDefaults",t))){t.__propertyDefaults=null;let e=t._properties;for(let i in e){let s=e[i];"value"in s&&(t.__propertyDefaults=t.__propertyDefaults||{},t.__propertyDefaults[i]=s)}}return t.__propertyDefaults}(this.constructor);if(t)for(let e in t){let i=t[e];if(this._canApplyPropertyDefault(e)){let t="function"==typeof i.value?i.value.call(this):i.value;this._hasAccessor(e)?this._setPendingProperty(e,t,!0):this[e]=t}}}_canApplyPropertyDefault(t){return!this.hasOwnProperty(t)}static _processStyleText(t,e){return Zt(t,e)}static _finalizeTemplate(t){const e=this.prototype._template;if(e&&!e.__polymerFinalized){e.__polymerFinalized=!0;const i=this.importPath;(function(t,e,i,s){if(!Ji){const o=e.content.querySelectorAll("style"),r=Se(e),n=function(t){let e=xe(t);return e?Ce(e):[]}(i),a=e.content.firstElementChild;for(let i=0;i<n.length;i++){let o=n[i];o.textContent=t._processStyleText(o.textContent,s),e.content.insertBefore(o,a)}let l=0;for(let e=0;e<r.length;e++){let i=r[e],n=o[l];n!==i?(i=i.cloneNode(!0),n.parentNode.insertBefore(i,n)):l++,i.textContent=t._processStyleText(i.textContent,s)}}if(window.ShadyCSS&&window.ShadyCSS.prepareTemplate(e,i),ce&&Ji&&Xt){const i=e.content.querySelectorAll("style");if(i){let e="";Array.from(i).forEach((t=>{e+=t.textContent,t.parentNode.removeChild(t)})),t._styleSheet=new CSSStyleSheet,t._styleSheet.replaceSync(e)}}})(this,e,t,i?$t(i):""),this.prototype._bindTemplate(e)}}connectedCallback(){window.ShadyCSS&&this._template&&window.ShadyCSS.styleElement(this),super.connectedCallback()}ready(){this._template&&(this.root=this._stampTemplate(this._template),this.$=this.root.$),super.ready()}_readyClients(){this._template&&(this.root=this._attachDom(this.root)),super._readyClients()}_attachDom(t){const e=Te(this);if(e.attachShadow)return t?(e.shadowRoot||(e.attachShadow({mode:"open",shadyUpgradeFragment:t}),e.shadowRoot.appendChild(t),this.constructor._styleSheet&&(e.shadowRoot.adoptedStyleSheets=[this.constructor._styleSheet])),re&&window.ShadyDOM&&window.ShadyDOM.flushInitial(e.shadowRoot),e.shadowRoot):null;throw new Error("ShadowDOM not available. PolymerElement can create dom as children instead of in ShadowDOM by setting `this.root = this;` before `ready`.")}updateStyles(t){window.ShadyCSS&&window.ShadyCSS.styleSubtree(this,t)}resolveUrl(t,e){return!e&&this.importPath&&(e=$t(this.importPath)),$t(t,e)}static _parseTemplateContent(t,i,s){return i.dynamicFns=i.dynamicFns||this._properties,e._parseTemplateContent.call(this,t,i,s)}static _addTemplatePropertyEffect(t,i,s){return!oe||i in this._properties||s.info.part.signature&&s.info.part.signature.static||s.info.part.hostProp||t.nestedTemplate||console.warn(`Property '${i}' used in template but not declared in 'properties'; attribute will not be observed.`),e._addTemplatePropertyEffect.call(this,t,i,s)}}})),Yi=window.trustedTypes&&trustedTypes.createPolicy("polymer-html-literal",{createHTML:t=>t});class $i{constructor(t,e){Xi(t,e);const i=e.reduce(((e,i,s)=>e+Zi(i)+t[s+1]),t[0]);this.value=i.toString()}toString(){return this.value}}function Zi(t){if(t instanceof $i)return t.value;throw new Error(`non-literal value passed to Polymer's htmlLiteral function: ${t}`)}const Ki=function(t,...e){Xi(t,e);const i=document.createElement("template");let s=e.reduce(((e,i,s)=>e+function(t){if(t instanceof HTMLTemplateElement)return t.innerHTML;if(t instanceof $i)return Zi(t);throw new Error(`non-template value passed to Polymer's html function: ${t}`)}(i)+t[s+1]),t[0]);return Yi&&(s=Yi.createHTML(s)),i.innerHTML=s,i},Xi=(t,e)=>{if(!Array.isArray(t)||!Array.isArray(t.raw)||e.length!==t.length-1)throw new TypeError("Invalid call to the html template tag")},Qi=Vi(HTMLElement),ts=[];function es(t,e,i=t.getAttribute("dir")){e?t.setAttribute("dir",e):null!=i&&t.removeAttribute("dir")}function is(){return document.documentElement.getAttribute("dir")}new MutationObserver((function(){const t=is();ts.forEach((e=>{es(e,t)}))})).observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]});const ss=t=>class extends t{static get properties(){return{dir:{type:String,value:"",reflectToAttribute:!0,converter:{fromAttribute:t=>t||"",toAttribute:t=>""===t?null:t}}}}get __isRTL(){return"rtl"===this.getAttribute("dir")}connectedCallback(){super.connectedCallback(),this.hasAttribute("dir")&&!this.__restoreSubscription||(this.__subscribe(),es(this,is(),null))}attributeChangedCallback(t,e,i){if(super.attributeChangedCallback(t,e,i),"dir"!==t)return;const s=is(),o=i===s&&-1===ts.indexOf(this),r=!i&&e&&-1===ts.indexOf(this),n=i!==s&&e===s;o||r?(this.__subscribe(),es(this,s,i)):n&&this.__unsubscribe()}disconnectedCallback(){super.disconnectedCallback(),this.__restoreSubscription=ts.includes(this),this.__unsubscribe()}_valueToNodeAttribute(t,e,i){("dir"!==i||""!==e||t.hasAttribute("dir"))&&super._valueToNodeAttribute(t,e,i)}_attributeToProperty(t,e,i){"dir"!==t||e?super._attributeToProperty(t,e,i):this.dir=""}__subscribe(){ts.includes(this)||ts.push(this)}__unsubscribe(){ts.includes(this)&&ts.splice(ts.indexOf(this),1)}}
|
|
1927
1578
|
/**
|
|
1928
1579
|
* @license
|
|
1929
1580
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1930
1581
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1931
|
-
*/,
|
|
1582
|
+
*/,os=t=>class extends t{static get properties(){return{disabled:{type:Boolean,reflectToAttribute:!0},readonly:{type:Boolean,reflectToAttribute:!0},invalid:{type:Boolean,reflectToAttribute:!0}}}ready(){super.ready(),this.addEventListener("pointerdown",(t=>{t.target===this&&t.preventDefault()})),this.addEventListener("click",(t=>{t.target===this&&this.shadowRoot.querySelector("slot:not([name])").assignedNodes({flatten:!0}).forEach((t=>t.focus&&t.focus()))}))}}
|
|
1932
1583
|
/**
|
|
1933
1584
|
* @license
|
|
1934
1585
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
@@ -2004,11 +1655,11 @@ zt("vaadin-input-container",y`
|
|
|
2004
1655
|
/* Override default opacity in Firefox */
|
|
2005
1656
|
opacity: 1;
|
|
2006
1657
|
}
|
|
2007
|
-
`,{moduleId:"vaadin-input-container-styles"});class
|
|
1658
|
+
`,{moduleId:"vaadin-input-container-styles"});class rs extends(os(Pt(ss(Qi)))){static get is(){return"vaadin-input-container"}static get template(){return Ki`
|
|
2008
1659
|
<slot name="prefix"></slot>
|
|
2009
1660
|
<slot></slot>
|
|
2010
1661
|
<slot name="suffix"></slot>
|
|
2011
|
-
`}}
|
|
1662
|
+
`}}u(rs);
|
|
2012
1663
|
/**
|
|
2013
1664
|
* @license
|
|
2014
1665
|
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -2018,12 +1669,12 @@ zt("vaadin-input-container",y`
|
|
|
2018
1669
|
* Code distributed by Google as part of the polymer project is also
|
|
2019
1670
|
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
2020
1671
|
*/
|
|
2021
|
-
let
|
|
1672
|
+
let ns=0,as=0;const ls=[];let hs=!1;const cs={after:t=>({run:e=>window.setTimeout(e,t),cancel(t){window.clearTimeout(t)}}),run:(t,e)=>window.setTimeout(t,e),cancel(t){window.clearTimeout(t)}},ds={run:t=>window.requestAnimationFrame(t),cancel(t){window.cancelAnimationFrame(t)}},us={run:t=>window.requestIdleCallback?window.requestIdleCallback(t):window.setTimeout(t,16),cancel(t){window.cancelIdleCallback?window.cancelIdleCallback(t):window.clearTimeout(t)}},ps={run(t){hs||(hs=!0,queueMicrotask((()=>function(){hs=!1;const t=ls.length;for(let e=0;e<t;e++){const t=ls[e];if(t)try{t()}catch(t){setTimeout((()=>{throw t}))}}ls.splice(0,t),as+=t}()))),ls.push(t);const e=ns;return ns+=1,e},cancel(t){const e=t-as;if(e>=0){if(!ls[e])throw new Error(`invalid async handle: ${t}`);ls[e]=null}}},ms=!1,fs=t=>t,vs="string"==typeof document.head.style.touchAction,bs="__polymerGestures",gs="__polymerGesturesHandled",ys="__polymerGesturesTouchAction",ws=["mousedown","mousemove","mouseup","click"],xs=[0,1,4,2],ks=function(){try{return 1===new MouseEvent("test",{buttons:1}).buttons}catch(t){return!1}}();function _s(t){return ws.indexOf(t)>-1}let As=!1;function Ss(t){if(!_s(t)&&"touchend"!==t)return vs&&As&&ms?{passive:!0}:void 0}!function(){try{const t=Object.defineProperty({},"passive",{get(){As=!0}});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(t){}}();const Cs=navigator.userAgent.match(/iP(?:[oa]d|hone)|Android/u),Ts={button:!0,command:!0,fieldset:!0,input:!0,keygen:!0,optgroup:!0,option:!0,select:!0,textarea:!0};function zs(t){const e=t.type;if(!_s(e))return!1;if("mousemove"===e){let e=void 0===t.buttons?1:t.buttons;return t instanceof window.MouseEvent&&!ks&&(e=xs[t.which]||0),Boolean(1&e)}return 0===(void 0===t.button?0:t.button)}const Ns={mouse:{target:null,mouseIgnoreJob:null},touch:{x:0,y:0,id:-1,scrollDecided:!1}};function Es(t,e,i){t.movefn=e,t.upfn=i,document.addEventListener("mousemove",e),document.addEventListener("mouseup",i)}function Os(t){document.removeEventListener("mousemove",t.movefn),document.removeEventListener("mouseup",t.upfn),t.movefn=null,t.upfn=null}const Is=window.ShadyDOM&&window.ShadyDOM.noPatch?window.ShadyDOM.composedPath:t=>t.composedPath&&t.composedPath()||[],Ps={},Bs=[];function Ms(t){const e=Is(t);return e.length>0?e[0]:t.target}function Ds(t){const e=t.type,i=t.currentTarget[bs];if(!i)return;const s=i[e];if(!s)return;if(!t[gs]&&(t[gs]={},e.startsWith("touch"))){const i=t.changedTouches[0];if("touchstart"===e&&1===t.touches.length&&(Ns.touch.id=i.identifier),Ns.touch.id!==i.identifier)return;vs||"touchstart"!==e&&"touchmove"!==e||function(t){const e=t.changedTouches[0],i=t.type;if("touchstart"===i)Ns.touch.x=e.clientX,Ns.touch.y=e.clientY,Ns.touch.scrollDecided=!1;else if("touchmove"===i){if(Ns.touch.scrollDecided)return;Ns.touch.scrollDecided=!0;const i=function(t){let e="auto";const i=Is(t);for(let t,s=0;s<i.length;s++)if(t=i[s],t[ys]){e=t[ys];break}return e}(t);let s=!1;const o=Math.abs(Ns.touch.x-e.clientX),r=Math.abs(Ns.touch.y-e.clientY);t.cancelable&&("none"===i?s=!0:"pan-x"===i?s=r>o:"pan-y"===i&&(s=o>r)),s?t.preventDefault():Rs("track")}}(t)}const o=t[gs];if(!o.skip){for(let e,i=0;i<Bs.length;i++)e=Bs[i],s[e.name]&&!o[e.name]&&e.flow&&e.flow.start.indexOf(t.type)>-1&&e.reset&&e.reset();for(let i,r=0;r<Bs.length;r++)i=Bs[r],s[i.name]&&!o[i.name]&&(o[i.name]=!0,i[e](t))}}function js(t,e,i){return!!Ps[e]&&(function(t,e,i){const s=Ps[e],o=s.deps,r=s.name;let n=t[bs];n||(t[bs]=n={});for(let e,i,s=0;s<o.length;s++)e=o[s],Cs&&_s(e)&&"click"!==e||(i=n[e],i||(n[e]=i={_count:0}),0===i._count&&t.addEventListener(e,Ds,Ss(e)),i[r]=(i[r]||0)+1,i._count=(i._count||0)+1);t.addEventListener(e,i),s.touchAction&&function(t,e){vs&&t instanceof HTMLElement&&ps.run((()=>{t.style.touchAction=e})),t[ys]=e}(t,s.touchAction)}(t,e,i),!0)}function Fs(t){Bs.push(t),t.emits.forEach((e=>{Ps[e]=t}))}function Ls(t,e,i){const s=new Event(e,{bubbles:!0,cancelable:!0,composed:!0});if(s.detail=i,fs(t).dispatchEvent(s),s.defaultPrevented){const t=i.preventer||i.sourceEvent;t&&t.preventDefault&&t.preventDefault()}}function Rs(t){const e=function(t){for(let e,i=0;i<Bs.length;i++){e=Bs[i];for(let i,s=0;s<e.emits.length;s++)if(i=e.emits[s],i===t)return e}return null}(t);e.info&&(e.info.prevent=!0)}function Hs(t,e,i,s){e&&Ls(e,t,{x:i.clientX,y:i.clientY,sourceEvent:i,preventer:s,prevent:t=>Rs(t)})}function Ws(t,e,i){if(t.prevent)return!1;if(t.started)return!0;const s=Math.abs(t.x-e),o=Math.abs(t.y-i);return s>=5||o>=5}function Gs(t,e,i){if(!e)return;const s=t.moves[t.moves.length-2],o=t.moves[t.moves.length-1];let r,n=0;s&&(r=o.x-s.x,n=o.y-s.y),Ls(e,"track",{state:t.state,x:i.clientX,y:i.clientY,dx:o.x-t.x,dy:o.y-t.y,ddx:r,ddy:n,sourceEvent:i,hover:()=>function(t,e){let i=document.elementFromPoint(t,e),s=i;for(;s&&s.shadowRoot&&!window.ShadyDOM;){const o=s;if(s=s.shadowRoot.elementFromPoint(t,e),o===s)break;s&&(i=s)}return i}(i.clientX,i.clientY)})}function Us(t,e,i){const s=Math.abs(e.clientX-t.x),o=Math.abs(e.clientY-t.y),r=Ms(i||e);!r||Ts[r.localName]&&r.hasAttribute("disabled")||(isNaN(s)||isNaN(o)||s<=25&&o<=25||function(t){if("click"===t.type){if(0===t.detail)return!0;const e=Ms(t);if(!e.nodeType||e.nodeType!==Node.ELEMENT_NODE)return!0;const i=e.getBoundingClientRect(),s=t.pageX,o=t.pageY;return!(s>=i.left&&s<=i.right&&o>=i.top&&o<=i.bottom)}return!1}(e))&&(t.prevent||Ls(r,"tap",{x:e.clientX,y:e.clientY,sourceEvent:e,preventer:i}))}
|
|
2022
1673
|
/**
|
|
2023
1674
|
* @license
|
|
2024
1675
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2025
1676
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2026
|
-
*/
|
|
1677
|
+
*/Fs({name:"downup",deps:["mousedown","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["down","up"],info:{movefn:null,upfn:null},reset(){Os(this.info)},mousedown(t){if(!zs(t))return;const e=Ms(t),i=this;Es(this.info,(t=>{zs(t)||(Hs("up",e,t),Os(i.info))}),(t=>{zs(t)&&Hs("up",e,t),Os(i.info)})),Hs("down",e,t)},touchstart(t){Hs("down",Ms(t),t.changedTouches[0],t)},touchend(t){Hs("up",Ms(t),t.changedTouches[0],t)}}),Fs({name:"track",touchAction:"none",deps:["mousedown","touchstart","touchmove","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["track"],info:{x:0,y:0,state:"start",started:!1,moves:[],addMove(t){this.moves.length>2&&this.moves.shift(),this.moves.push(t)},movefn:null,upfn:null,prevent:!1},reset(){this.info.state="start",this.info.started=!1,this.info.moves=[],this.info.x=0,this.info.y=0,this.info.prevent=!1,Os(this.info)},mousedown(t){if(!zs(t))return;const e=Ms(t),i=this,s=t=>{const s=t.clientX,o=t.clientY;Ws(i.info,s,o)&&(i.info.state=i.info.started?"mouseup"===t.type?"end":"track":"start","start"===i.info.state&&Rs("tap"),i.info.addMove({x:s,y:o}),zs(t)||(i.info.state="end",Os(i.info)),e&&Gs(i.info,e,t),i.info.started=!0)};Es(this.info,s,(t=>{i.info.started&&s(t),Os(i.info)})),this.info.x=t.clientX,this.info.y=t.clientY},touchstart(t){const e=t.changedTouches[0];this.info.x=e.clientX,this.info.y=e.clientY},touchmove(t){const e=Ms(t),i=t.changedTouches[0],s=i.clientX,o=i.clientY;Ws(this.info,s,o)&&("start"===this.info.state&&Rs("tap"),this.info.addMove({x:s,y:o}),Gs(this.info,e,i),this.info.state="track",this.info.started=!0)},touchend(t){const e=Ms(t),i=t.changedTouches[0];this.info.started&&(this.info.state="end",this.info.addMove({x:i.clientX,y:i.clientY}),Gs(this.info,e,i))}}),Fs({name:"tap",deps:["mousedown","click","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["click","touchend"]},emits:["tap"],info:{x:NaN,y:NaN,prevent:!1},reset(){this.info.x=NaN,this.info.y=NaN,this.info.prevent=!1},mousedown(t){zs(t)&&(this.info.x=t.clientX,this.info.y=t.clientY)},click(t){zs(t)&&Us(this.info,t)},touchstart(t){const e=t.changedTouches[0];this.info.x=e.clientX,this.info.y=e.clientY},touchend(t){Us(this.info,t.changedTouches[0],t)}});const qs=ue((t=>class extends t{static get properties(){return{disabled:{type:Boolean,value:!1,observer:"_disabledChanged",reflectToAttribute:!0,sync:!0}}}_disabledChanged(t){this._setAriaDisabled(t)}_setAriaDisabled(t){t?this.setAttribute("aria-disabled","true"):this.removeAttribute("aria-disabled")}click(){this.disabled||super.click()}})),Js=ue((t=>class extends t{ready(){super.ready(),this.addEventListener("keydown",(t=>{this._onKeyDown(t)})),this.addEventListener("keyup",(t=>{this._onKeyUp(t)}))}_onKeyDown(t){switch(t.key){case"Enter":this._onEnter(t);break;case"Escape":this._onEscape(t)}}_onKeyUp(t){}_onEnter(t){}_onEscape(t){}})),Vs=t=>class extends(qs(Js(t))){get _activeKeys(){return[" "]}ready(){super.ready(),js(this,"down",(t=>{this._shouldSetActive(t)&&this._setActive(!0)})),js(this,"up",(()=>{this._setActive(!1)}))}disconnectedCallback(){super.disconnectedCallback(),this._setActive(!1)}_shouldSetActive(t){return!this.disabled}_onKeyDown(t){super._onKeyDown(t),this._shouldSetActive(t)&&this._activeKeys.includes(t.key)&&(this._setActive(!0),document.addEventListener("keyup",(t=>{this._activeKeys.includes(t.key)&&this._setActive(!1)}),{once:!0}))}_setActive(t){this.toggleAttribute("active",t)}}
|
|
2027
1678
|
/**
|
|
2028
1679
|
* @license
|
|
2029
1680
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
@@ -2033,13 +1684,13 @@ let fo=0,vo=0;const bo=[];let go=!1;const yo={after:t=>({run:e=>window.setTimeou
|
|
|
2033
1684
|
* @license
|
|
2034
1685
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2035
1686
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2036
|
-
*/let
|
|
1687
|
+
*/let Ys=!1;function $s(){let t=document.activeElement||document.body;for(;t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;return t}function Zs(){return Ys}function Ks(t){const e=t.style;if("hidden"===e.visibility||"none"===e.display)return!0;const i=window.getComputedStyle(t);return"hidden"===i.visibility||"none"===i.display}function Xs(t,e){const i=Math.max(t.tabIndex,0),s=Math.max(e.tabIndex,0);return 0===i||0===s?s>i:i>s}function Qs(t){const e=t.length;if(e<2)return t;const i=Math.ceil(e/2);return function(t,e){const i=[];for(;t.length>0&&e.length>0;)Xs(t[0],e[0])?i.push(e.shift()):i.push(t.shift());return i.concat(t,e)}(Qs(t.slice(0,i)),Qs(t.slice(i)))}function to(t){return null===t.offsetParent&&0===t.clientWidth&&0===t.clientHeight||Ks(t)}function eo(t){return t.getRootNode().activeElement===t}function io(t,e){if(t.nodeType!==Node.ELEMENT_NODE||Ks(t))return!1;const i=t,s=function(t){if(!function(t){return!t.matches('[tabindex="-1"]')&&(t.matches("input, select, textarea, button, object")?t.matches(":not([disabled])"):t.matches("a[href], area[href], iframe, [tabindex], [contentEditable]"))}(t))return-1;const e=t.getAttribute("tabindex")||0;return Number(e)}(i);let o=s>0;s>=0&&e.push(i);let r=[];return r="slot"===i.localName?i.assignedNodes({flatten:!0}):(i.shadowRoot||i).children,[...r].forEach((t=>{o=io(t,e)||o})),o}window.addEventListener("keydown",(()=>{Ys=!0}),{capture:!0}),window.addEventListener("mousedown",(()=>{Ys=!1}),{capture:!0});
|
|
2037
1688
|
/**
|
|
2038
1689
|
* @license
|
|
2039
1690
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2040
1691
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2041
1692
|
*/
|
|
2042
|
-
const
|
|
1693
|
+
const so=ue((t=>class extends t{get _keyboardActive(){return Zs()}ready(){this.addEventListener("focusin",(t=>{this._shouldSetFocus(t)&&this._setFocused(!0)})),this.addEventListener("focusout",(t=>{this._shouldRemoveFocus(t)&&this._setFocused(!1)})),super.ready()}disconnectedCallback(){super.disconnectedCallback(),this.hasAttribute("focused")&&this._setFocused(!1)}_setFocused(t){this.toggleAttribute("focused",t),this.toggleAttribute("focus-ring",t&&this._keyboardActive)}_shouldSetFocus(t){return!0}_shouldRemoveFocus(t){return!0}})),oo=t=>class extends(Vs(so(t))){static get properties(){return{_hasVaadinItemMixin:{value:!0},selected:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_selectedChanged"},_value:String}}get _activeKeys(){return["Enter"," "]}get value(){return void 0!==this._value?this._value:this.textContent.trim()}set value(t){this._value=t}ready(){super.ready();const t=this.getAttribute("value");null!==t&&(this.value=t)}focus(){this.disabled||(super.focus(),this._setFocused(!0))}_shouldSetActive(t){return!(this.disabled||"keydown"===t.type&&t.defaultPrevented)}_selectedChanged(t){this.setAttribute("aria-selected",t)}_disabledChanged(t){super._disabledChanged(t),t&&(this.selected=!1,this.blur())}_onKeyDown(t){super._onKeyDown(t),this._activeKeys.includes(t.key)&&!t.defaultPrevented&&(t.preventDefault(),this.click())}}
|
|
2043
1694
|
/**
|
|
2044
1695
|
* @license
|
|
2045
1696
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
@@ -2049,7 +1700,7 @@ const ds=we((t=>class extends t{get _keyboardActive(){return rs()}ready(){this.a
|
|
|
2049
1700
|
* @license
|
|
2050
1701
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
2051
1702
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2052
|
-
*/class
|
|
1703
|
+
*/class ro extends(oo(Pt(ss(Qi)))){static get is(){return"vaadin-select-item"}static get template(){return Ki`
|
|
2053
1704
|
<style>
|
|
2054
1705
|
:host {
|
|
2055
1706
|
display: inline-block;
|
|
@@ -2063,7 +1714,7 @@ const ds=we((t=>class extends t{get _keyboardActive(){return rs()}ready(){this.a
|
|
|
2063
1714
|
<div part="content">
|
|
2064
1715
|
<slot></slot>
|
|
2065
1716
|
</div>
|
|
2066
|
-
`}ready(){super.ready(),this.setAttribute("role","option")}}
|
|
1717
|
+
`}ready(){super.ready(),this.setAttribute("role","option")}}u(ro);
|
|
2067
1718
|
/**
|
|
2068
1719
|
@license
|
|
2069
1720
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -2073,23 +1724,23 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
|
|
|
2073
1724
|
Code distributed by Google as part of the polymer project is also
|
|
2074
1725
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
2075
1726
|
*/
|
|
2076
|
-
const
|
|
1727
|
+
const no=new Set;class ao{static debounce(t,e,i){return t instanceof ao?t._cancelAsync():t=new ao,t.setConfig(e,i),t}constructor(){this._asyncModule=null,this._callback=null,this._timer=null}setConfig(t,e){this._asyncModule=t,this._callback=e,this._timer=this._asyncModule.run((()=>{this._timer=null,no.delete(this),this._callback()}))}cancel(){this.isActive()&&(this._cancelAsync(),no.delete(this))}_cancelAsync(){this.isActive()&&(this._asyncModule.cancel(this._timer),this._timer=null)}flush(){this.isActive()&&(this.cancel(),this._callback())}isActive(){return null!=this._timer}}function lo(t){const e=[];let i;return"slot"===t.localName?i=t.assignedElements():(e.push(t),i=[...t.children]),i.forEach((t=>e.push(...lo(t)))),e}function ho(t){return t?new Set(t.split(" ")):new Set}function co(t){return t?[...t].join(" "):""}function uo(t,e,i){const s=ho(t.getAttribute(e));s.add(i),t.setAttribute(e,co(s))}
|
|
2077
1728
|
/**
|
|
2078
1729
|
* @license
|
|
2079
1730
|
* Copyright (c) 2023 - 2024 Vaadin Ltd.
|
|
2080
1731
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2081
1732
|
*/
|
|
2082
|
-
class
|
|
1733
|
+
class po{constructor(t,e){this.slot=t,this.callback=e,this._storedNodes=[],this._connected=!1,this._scheduled=!1,this._boundSchedule=()=>{this._schedule()},this.connect(),this._schedule()}connect(){this.slot.addEventListener("slotchange",this._boundSchedule),this._connected=!0}disconnect(){this.slot.removeEventListener("slotchange",this._boundSchedule),this._connected=!1}_schedule(){this._scheduled||(this._scheduled=!0,queueMicrotask((()=>{this.flush()})))}flush(){this._connected&&(this._scheduled=!1,this._processNodes())}_processNodes(){const t=this.slot.assignedNodes({flatten:!0});let e=[];const i=[],s=[];t.length&&(e=t.filter((t=>!this._storedNodes.includes(t)))),this._storedNodes.length&&this._storedNodes.forEach(((e,o)=>{const r=t.indexOf(e);-1===r?i.push(e):r!==o&&s.push(e)})),(e.length||i.length||s.length)&&this.callback({addedNodes:e,currentNodes:t,movedNodes:s,removedNodes:i}),this._storedNodes=t}}
|
|
2083
1734
|
/**
|
|
2084
1735
|
* @license
|
|
2085
1736
|
* Copyright (c) 2022 - 2024 Vaadin Ltd.
|
|
2086
1737
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2087
|
-
*/const
|
|
1738
|
+
*/const mo=t=>class extends(Js(t)){get focused(){return(this._getItems()||[]).find(eo)}get _vertical(){return!0}focus(){const t=this._getItems();if(Array.isArray(t)){const e=this._getAvailableIndex(t,0,null,(t=>!to(t)));e>=0&&this._focus(e)}}_getItems(){return Array.from(this.children)}_onKeyDown(t){if(super._onKeyDown(t),t.metaKey||t.ctrlKey)return;const{key:e}=t,i=this._getItems()||[],s=i.indexOf(this.focused);let o,r;const n=this._vertical||"rtl"!==this.getAttribute("dir")?1:-1;this.__isPrevKey(e)?(r=-n,o=s-n):this.__isNextKey(e)?(r=n,o=s+n):"Home"===e?(r=1,o=0):"End"===e&&(r=-1,o=i.length-1),o=this._getAvailableIndex(i,o,r,(t=>!to(t))),o>=0&&(t.preventDefault(),this._focus(o,!0))}__isPrevKey(t){return this._vertical?"ArrowUp"===t:"ArrowLeft"===t}__isNextKey(t){return this._vertical?"ArrowDown"===t:"ArrowRight"===t}_focus(t,e=!1){const i=this._getItems();this._focusItem(i[t],e)}_focusItem(t){t&&(t.focus(),t.setAttribute("focus-ring",""))}_getAvailableIndex(t,e,i,s){const o=t.length;let r=e;for(let e=0;"number"==typeof r&&e<o;e+=1,r+=i||1){r<0?r=o-1:r>=o&&(r=0);const e=t[r];if(!e.hasAttribute("disabled")&&this.__isMatchingItem(e,s))return r}return-1}__isMatchingItem(t,e){return"function"!=typeof e||e(t)}}
|
|
2088
1739
|
/**
|
|
2089
1740
|
* @license
|
|
2090
1741
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
2091
1742
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2092
|
-
*/,
|
|
1743
|
+
*/,fo=t=>class extends(mo(t)){static get properties(){return{disabled:{type:Boolean,value:!1,reflectToAttribute:!0},selected:{type:Number,reflectToAttribute:!0,notify:!0},orientation:{type:String,reflectToAttribute:!0,value:""},items:{type:Array,readOnly:!0,notify:!0},_searchBuf:{type:String,value:""}}}static get observers(){return["_enhanceItems(items, orientation, selected, disabled)"]}get _isRTL(){return!this._vertical&&"rtl"===this.getAttribute("dir")}get _scrollerElement(){return console.warn(`Please implement the '_scrollerElement' property in <${this.localName}>`),this}get _vertical(){return"horizontal"!==this.orientation}focus(){this._observer&&this._observer.flush();const t=Array.isArray(this.items)?this.items:[],e=this._getAvailableIndex(t,0,null,(t=>0===t.tabIndex&&!to(t)));e>=0?this._focus(e):super.focus()}ready(){super.ready(),this.addEventListener("click",(t=>this._onClick(t)));const t=this.shadowRoot.querySelector("slot:not([name])");this._observer=new po(t,(()=>{this._setItems(this._filterItems(lo(this)))}))}_getItems(){return this.items}_enhanceItems(t,e,i,s){if(!s&&t){this.setAttribute("aria-orientation",e||"vertical"),t.forEach((t=>{e?t.setAttribute("orientation",e):t.removeAttribute("orientation")})),this._setFocusable(i<0||!i?0:i);const s=t[i];t.forEach((t=>{t.selected=t===s})),s&&!s.disabled&&this._scrollToItem(i)}}_filterItems(t){return t.filter((t=>t._hasVaadinItemMixin))}_onClick(t){if(t.metaKey||t.shiftKey||t.ctrlKey||t.defaultPrevented)return;const e=this._filterItems(t.composedPath())[0];let i;e&&!e.disabled&&(i=this.items.indexOf(e))>=0&&(this.selected=i)}_searchKey(t,e){return this._searchReset=ao.debounce(this._searchReset,cs.after(500),(()=>{this._searchBuf=""})),this._searchBuf+=e.toLowerCase(),this.items.some((t=>this.__isMatchingKey(t)))||(this._searchBuf=e.toLowerCase()),this._getAvailableIndex(this.items,1===this._searchBuf.length?t+1:t,1,(t=>this.__isMatchingKey(t)&&"none"!==getComputedStyle(t).display))}__isMatchingKey(t){return t.textContent.replace(/[^\p{L}\p{Nd}]/gu,"").toLowerCase().startsWith(this._searchBuf)}_onKeyDown(t){if(t.metaKey||t.ctrlKey)return;const e=t.key,i=this.items.indexOf(this.focused);if(/[\p{L}\p{Nd}]/u.test(e)&&1===e.length){const t=this._searchKey(i,e);t>=0&&this._focus(t)}else super._onKeyDown(t)}_isItemHidden(t){return"none"===getComputedStyle(t).display}_setFocusable(t){t=this._getAvailableIndex(this.items,t,1);const e=this.items[t];this.items.forEach((t=>{t.tabIndex=t===e?0:-1}))}_focus(t){this.items.forEach(((e,i)=>{e.focused=i===t})),this._setFocusable(t),this._scrollToItem(t),super._focus(t)}_scrollToItem(t){const e=this.items[t];if(!e)return;const i=this._vertical?["top","bottom"]:this._isRTL?["right","left"]:["left","right"],s=this._scrollerElement.getBoundingClientRect(),o=(this.items[t+1]||e).getBoundingClientRect(),r=(this.items[t-1]||e).getBoundingClientRect();let n=0;!this._isRTL&&o[i[1]]>=s[i[1]]||this._isRTL&&o[i[1]]<=s[i[1]]?n=o[i[1]]-s[i[1]]:(!this._isRTL&&r[i[0]]<=s[i[0]]||this._isRTL&&r[i[0]]>=s[i[0]])&&(n=r[i[0]]-s[i[0]]),this._scroll(n)}_scroll(t){if(this._vertical)this._scrollerElement.scrollTop+=t;else{const e=this.getAttribute("dir")||"ltr",i=
|
|
2093
1744
|
/**
|
|
2094
1745
|
* @license
|
|
2095
1746
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
@@ -2105,13 +1756,13 @@ function(t,e){const{scrollLeft:i}=t;return"rtl"!==e?i:t.scrollWidth-t.clientWidt
|
|
|
2105
1756
|
* @license
|
|
2106
1757
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2107
1758
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2108
|
-
*/,
|
|
1759
|
+
*/,vo=ue((t=>"function"==typeof t.prototype.addController?t:class extends t{constructor(){super(),this.__controllers=new Set}connectedCallback(){super.connectedCallback(),this.__controllers.forEach((t=>{t.hostConnected&&t.hostConnected()}))}disconnectedCallback(){super.disconnectedCallback(),this.__controllers.forEach((t=>{t.hostDisconnected&&t.hostDisconnected()}))}addController(t){this.__controllers.add(t),void 0!==this.$&&this.isConnected&&t.hostConnected&&t.hostConnected()}removeController(t){this.__controllers.delete(t)}}));
|
|
2109
1760
|
/**
|
|
2110
1761
|
* @license
|
|
2111
1762
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
2112
1763
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2113
1764
|
*/
|
|
2114
|
-
class
|
|
1765
|
+
class bo extends(fo(Pt(ss(vo(Qi))))){static get is(){return"vaadin-select-list-box"}static get template(){return Ki`
|
|
2115
1766
|
<style>
|
|
2116
1767
|
:host {
|
|
2117
1768
|
display: flex;
|
|
@@ -2131,13 +1782,13 @@ class Ss extends(_s(Bt(uo(As(ao))))){static get is(){return"vaadin-select-list-b
|
|
|
2131
1782
|
<div part="items">
|
|
2132
1783
|
<slot></slot>
|
|
2133
1784
|
</div>
|
|
2134
|
-
`}static get properties(){return{orientation:{readOnly:!0}}}get _scrollerElement(){return this.shadowRoot.querySelector('[part="items"]')}ready(){super.ready(),this.setAttribute("role","listbox")}}
|
|
1785
|
+
`}static get properties(){return{orientation:{readOnly:!0}}}get _scrollerElement(){return this.shadowRoot.querySelector('[part="items"]')}ready(){super.ready(),this.setAttribute("role","listbox")}}u(bo);
|
|
2135
1786
|
/**
|
|
2136
1787
|
* @license
|
|
2137
1788
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
2138
1789
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2139
1790
|
*/
|
|
2140
|
-
const
|
|
1791
|
+
const go=y`
|
|
2141
1792
|
:host {
|
|
2142
1793
|
z-index: 200;
|
|
2143
1794
|
position: fixed;
|
|
@@ -2205,70 +1856,70 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
2205
1856
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
2206
1857
|
Code distributed by Google as part of the polymer project is also
|
|
2207
1858
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
2208
|
-
*/;let
|
|
1859
|
+
*/;let yo=!1,wo=[],xo=[];function ko(t){const e=t[0],i=t[1],s=t[2];try{i.apply(e,s)}catch(t){setTimeout((()=>{throw t}))}}
|
|
2209
1860
|
/**
|
|
2210
1861
|
* @license
|
|
2211
1862
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2212
1863
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2213
1864
|
*/
|
|
2214
|
-
const
|
|
1865
|
+
const _o=t=>t.test(navigator.userAgent),Ao=t=>t.test(navigator.platform);_o(/Android/u),_o(/Chrome/u)&&/Google Inc/u.test(navigator.vendor),_o(/Firefox/u);const So=Ao(/^iPad/u)||Ao(/^Mac/u)&&navigator.maxTouchPoints>1,Co=Ao(/^iPhone/u)||So;_o(/^((?!chrome|android).)*safari/iu),(()=>{try{return document.createEvent("TouchEvent"),!0}catch(t){return!1}})();
|
|
2215
1866
|
/**
|
|
2216
1867
|
* @license
|
|
2217
1868
|
* Copyright (c) 2017 Anton Korzunov
|
|
2218
1869
|
* SPDX-License-Identifier: MIT
|
|
2219
1870
|
*/
|
|
2220
|
-
let
|
|
1871
|
+
let To=new WeakMap,zo=new WeakMap,No={},Eo=0;const Oo=t=>t&&t.nodeType===Node.ELEMENT_NODE,Io=(...t)=>{console.error(`Error: ${t.join(" ")}. Skip setting aria-hidden.`)};
|
|
2221
1872
|
/**
|
|
2222
1873
|
* @license
|
|
2223
1874
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2224
1875
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2225
1876
|
*/
|
|
2226
|
-
class
|
|
1877
|
+
class Po{constructor(t,e){this.host=t,this.callback="function"==typeof e?e:()=>t}showModal(){const t=this.callback();this.__showOthers=((t,e=document.body,i="data-aria-hidden")=>{const s=Array.from(Array.isArray(t)?t:[t]);return e&&s.push(...Array.from(e.querySelectorAll("[aria-live]"))),((t,e,i,s)=>{const o=((t,e)=>Oo(t)?e.map((e=>{if(!Oo(e))return Io(e,"is not a valid element"),null;let i=e;for(;i&&i!==t;){if(t.contains(i))return e;i=i.getRootNode().host}return Io(e,"is not contained inside",t),null})).filter((t=>Boolean(t))):(Io(t,"is not a valid element"),[]))(e,Array.isArray(t)?t:[t]);No[i]||(No[i]=new WeakMap);const r=No[i],n=[],a=new Set,l=new Set(o),h=t=>{if(!t||a.has(t))return;a.add(t);const e=t.assignedSlot;e&&h(e),h(t.parentNode||t.host)};o.forEach(h);const c=t=>{if(!t||l.has(t))return;const e=t.shadowRoot;(e?[...t.children,...e.children]:[...t.children]).forEach((t=>{if(!["template","script","style"].includes(t.localName))if(a.has(t))c(t);else{const e=t.getAttribute(s),o=null!==e&&"false"!==e,a=(To.get(t)||0)+1,l=(r.get(t)||0)+1;To.set(t,a),r.set(t,l),n.push(t),1===a&&o&&zo.set(t,!0),1===l&&t.setAttribute(i,"true"),o||t.setAttribute(s,"true")}}))};return c(e),a.clear(),Eo+=1,()=>{n.forEach((t=>{const e=To.get(t)-1,o=r.get(t)-1;To.set(t,e),r.set(t,o),e||(zo.has(t)?zo.delete(t):t.removeAttribute(s)),o||t.removeAttribute(i)})),Eo-=1,Eo||(To=new WeakMap,To=new WeakMap,zo=new WeakMap,No={})}})(s,e,i,"aria-hidden")})(t)}close(){this.__showOthers&&(this.__showOthers(),this.__showOthers=null)}}
|
|
2227
1878
|
/**
|
|
2228
1879
|
* @license
|
|
2229
1880
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2230
1881
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2231
|
-
*/class
|
|
1882
|
+
*/class Bo{saveFocus(t){this.focusNode=t||$s()}restoreFocus(t){const e=this.focusNode;if(!e)return;const i=!!t&&t.preventScroll;$s()===document.body?setTimeout((()=>e.focus({preventScroll:i}))):e.focus({preventScroll:i}),this.focusNode=null}}
|
|
2232
1883
|
/**
|
|
2233
1884
|
* @license
|
|
2234
1885
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2235
1886
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2236
|
-
*/const
|
|
1887
|
+
*/const Mo=[];class Do{constructor(t){this.host=t,this.__trapNode=null,this.__onKeyDown=this.__onKeyDown.bind(this)}get __focusableElements(){return function(t){const e=[];return io(t,e)?Qs(e):e}(this.__trapNode)}get __focusedElementIndex(){const t=this.__focusableElements;return t.indexOf(t.filter(eo).pop())}hostConnected(){document.addEventListener("keydown",this.__onKeyDown)}hostDisconnected(){document.removeEventListener("keydown",this.__onKeyDown)}trapFocus(t){if(this.__trapNode=t,0===this.__focusableElements.length)throw this.__trapNode=null,new Error("The trap node should have at least one focusable descendant or be focusable itself.");Mo.push(this),-1===this.__focusedElementIndex&&this.__focusableElements[0].focus()}releaseFocus(){this.__trapNode=null,Mo.pop()}__onKeyDown(t){this.__trapNode&&this===Array.from(Mo).pop()&&"Tab"===t.key&&(t.preventDefault(),this.__focusNextElement(t.shiftKey))}__focusNextElement(t=!1){const e=this.__focusableElements,i=e[(e.length+this.__focusedElementIndex+(t?-1:1))%e.length];i.focus(),"input"===i.localName&&i.select()}}
|
|
2237
1888
|
/**
|
|
2238
1889
|
* @license
|
|
2239
1890
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
2240
1891
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2241
|
-
*/const
|
|
1892
|
+
*/const jo=t=>class extends(vo(t)){static get properties(){return{focusTrap:{type:Boolean,value:!1},restoreFocusOnClose:{type:Boolean,value:!1},restoreFocusNode:{type:HTMLElement}}}constructor(){super(),this.__ariaModalController=new Po(this),this.__focusTrapController=new Do(this),this.__focusRestorationController=new Bo}ready(){super.ready(),this.addController(this.__ariaModalController),this.addController(this.__focusTrapController),this.addController(this.__focusRestorationController)}_resetFocus(){if(this.focusTrap&&(this.__ariaModalController.close(),this.__focusTrapController.releaseFocus()),this.restoreFocusOnClose&&this._shouldRestoreFocus()){const t=!Zs();this.__focusRestorationController.restoreFocus({preventScroll:t})}}_saveFocus(){this.restoreFocusOnClose&&this.__focusRestorationController.saveFocus(this.restoreFocusNode)}_trapFocus(){this.focusTrap&&(this.__ariaModalController.showModal(),this.__focusTrapController.trapFocus(this.$.overlay))}_shouldRestoreFocus(){const t=$s();return t===document.body||this._deepContains(t)}_deepContains(t){if(this.contains(t))return!0;let e=t;const i=t.ownerDocument;for(;e&&e!==i&&e!==this;)e=e.parentNode||e.host;return e===this}}
|
|
2242
1893
|
/**
|
|
2243
1894
|
* @license
|
|
2244
1895
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
2245
1896
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2246
|
-
|
|
1897
|
+
*/,Fo=()=>Array.from(document.body.children).filter((t=>t instanceof HTMLElement&&t._hasOverlayStackMixin&&!t.hasAttribute("closing"))).sort(((t,e)=>t.__zIndex-e.__zIndex||0)),Lo=()=>Fo().filter((t=>t.$.overlay)),Ro=t=>class extends t{constructor(){super(),this._hasOverlayStackMixin=!0}get _last(){return(()=>this===Lo().pop())()}bringToFront(){let t="";const e=Fo().filter((t=>t!==this)).pop();e&&(t=e.__zIndex+1),this.style.zIndex=t,this.__zIndex=t||parseFloat(getComputedStyle(this).zIndex)}_enterModalState(){"none"!==document.body.style.pointerEvents&&(this._previousDocumentPointerEvents=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),Lo().forEach((t=>{t!==this&&(t.$.overlay.style.pointerEvents="none")}))}_exitModalState(){void 0!==this._previousDocumentPointerEvents&&(document.body.style.pointerEvents=this._previousDocumentPointerEvents,delete this._previousDocumentPointerEvents);const t=Lo();let e;for(;(e=t.pop())&&(e===this||(e.$.overlay.style.removeProperty("pointer-events"),e.modeless)););}}
|
|
2247
1898
|
/**
|
|
2248
1899
|
* @license
|
|
2249
1900
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
2250
1901
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2251
|
-
*/,
|
|
1902
|
+
*/,Ho=t=>class extends(jo(Ro(t))){static get properties(){return{opened:{type:Boolean,notify:!0,observer:"_openedChanged",reflectToAttribute:!0,sync:!0},owner:{type:Object,sync:!0},model:{type:Object,sync:!0},renderer:{type:Object,sync:!0},modeless:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_modelessChanged",sync:!0},hidden:{type:Boolean,reflectToAttribute:!0,observer:"_hiddenChanged",sync:!0},withBackdrop:{type:Boolean,value:!1,reflectToAttribute:!0,sync:!0}}}static get observers(){return["_rendererOrDataChanged(renderer, owner, model, opened)"]}constructor(){super(),this._boundMouseDownListener=this._mouseDownListener.bind(this),this._boundMouseUpListener=this._mouseUpListener.bind(this),this._boundOutsideClickListener=this._outsideClickListener.bind(this),this._boundKeydownListener=this._keydownListener.bind(this),Co&&(this._boundIosResizeListener=()=>this._detectIosNavbar())}ready(){super.ready(),this.addEventListener("click",(()=>{})),this.$.backdrop.addEventListener("click",(()=>{})),this.addEventListener("mouseup",(()=>{document.activeElement===document.body&&"0"===this.$.overlay.getAttribute("tabindex")&&this.$.overlay.focus()}))}connectedCallback(){super.connectedCallback(),this._boundIosResizeListener&&(this._detectIosNavbar(),window.addEventListener("resize",this._boundIosResizeListener))}disconnectedCallback(){super.disconnectedCallback(),this._boundIosResizeListener&&window.removeEventListener("resize",this._boundIosResizeListener)}requestContentUpdate(){this.renderer&&this.renderer.call(this.owner,this,this.owner,this.model)}close(t){const e=new CustomEvent("vaadin-overlay-close",{bubbles:!0,cancelable:!0,detail:{sourceEvent:t}});this.dispatchEvent(e),e.defaultPrevented||(this.opened=!1)}_detectIosNavbar(){if(!this.opened)return;const t=window.innerHeight,e=window.innerWidth,i=document.documentElement.clientHeight;this.style.setProperty("--vaadin-overlay-viewport-bottom",e>t&&i>t?i-t+"px":"0")}_addGlobalListeners(){document.addEventListener("mousedown",this._boundMouseDownListener),document.addEventListener("mouseup",this._boundMouseUpListener),document.documentElement.addEventListener("click",this._boundOutsideClickListener,!0)}_removeGlobalListeners(){document.removeEventListener("mousedown",this._boundMouseDownListener),document.removeEventListener("mouseup",this._boundMouseUpListener),document.documentElement.removeEventListener("click",this._boundOutsideClickListener,!0)}_rendererOrDataChanged(t,e,i,s){const o=this._oldOwner!==e||this._oldModel!==i;this._oldModel=i,this._oldOwner=e;const r=this._oldRenderer!==t,n=void 0!==this._oldRenderer;this._oldRenderer=t;const a=this._oldOpened!==s;this._oldOpened=s,r&&n&&(this.innerHTML="",delete this._$litPart$),s&&t&&(r||a||o)&&this.requestContentUpdate()}_modelessChanged(t){t?(this._removeGlobalListeners(),this._exitModalState()):this.opened&&(this._addGlobalListeners(),this._enterModalState())}_openedChanged(t,e){var i;t?(this._saveFocus(),this._animatedOpening(),i=()=>{this._trapFocus();const t=new CustomEvent("vaadin-overlay-open",{bubbles:!0});this.dispatchEvent(t)},yo||(yo=!0,requestAnimationFrame((function(){yo=!1,function(t){for(;t.length;)ko(t.shift())}(wo),setTimeout((function(){!function(t){for(let e=0,i=t.length;e<i;e++)ko(t.shift())}(xo)}))}))),xo.push([this,i,undefined]),document.addEventListener("keydown",this._boundKeydownListener),this.modeless||this._addGlobalListeners()):e&&(this._resetFocus(),this._animatedClosing(),document.removeEventListener("keydown",this._boundKeydownListener),this.modeless||this._removeGlobalListeners())}_hiddenChanged(t){t&&this.hasAttribute("closing")&&this._flushAnimation("closing")}_shouldAnimate(){const t=getComputedStyle(this),e=t.getPropertyValue("animation-name");return!("none"===t.getPropertyValue("display"))&&e&&"none"!==e}_enqueueAnimation(t,e){const i=`__${t}Handler`,s=t=>{t&&t.target!==this||(e(),this.removeEventListener("animationend",s),delete this[i])};this[i]=s,this.addEventListener("animationend",s)}_flushAnimation(t){const e=`__${t}Handler`;"function"==typeof this[e]&&this[e]()}_animatedOpening(){this.parentNode===document.body&&this.hasAttribute("closing")&&this._flushAnimation("closing"),this._attachOverlay(),this.modeless||this._enterModalState(),this.setAttribute("opening",""),this._shouldAnimate()?this._enqueueAnimation("opening",(()=>{this._finishOpening()})):this._finishOpening()}_attachOverlay(){this._placeholder=document.createComment("vaadin-overlay-placeholder"),this.parentNode.insertBefore(this._placeholder,this),document.body.appendChild(this),this.bringToFront()}_finishOpening(){this.removeAttribute("opening")}_finishClosing(){this._detachOverlay(),this.$.overlay.style.removeProperty("pointer-events"),this.removeAttribute("closing"),this.dispatchEvent(new CustomEvent("vaadin-overlay-closed"))}_animatedClosing(){this.hasAttribute("opening")&&this._flushAnimation("opening"),this._placeholder&&(this._exitModalState(),this.setAttribute("closing",""),this.dispatchEvent(new CustomEvent("vaadin-overlay-closing")),this._shouldAnimate()?this._enqueueAnimation("closing",(()=>{this._finishClosing()})):this._finishClosing())}_detachOverlay(){this._placeholder.parentNode.insertBefore(this,this._placeholder),this._placeholder.parentNode.removeChild(this._placeholder)}_mouseDownListener(t){this._mouseDownInside=t.composedPath().indexOf(this.$.overlay)>=0}_mouseUpListener(t){this._mouseUpInside=t.composedPath().indexOf(this.$.overlay)>=0}_shouldCloseOnOutsideClick(t){return this._last}_outsideClickListener(t){if(t.composedPath().includes(this.$.overlay)||this._mouseDownInside||this._mouseUpInside)return this._mouseDownInside=!1,void(this._mouseUpInside=!1);if(!this._shouldCloseOnOutsideClick(t))return;const e=new CustomEvent("vaadin-overlay-outside-click",{bubbles:!0,cancelable:!0,detail:{sourceEvent:t}});this.dispatchEvent(e),this.opened&&!e.defaultPrevented&&this.close(t)}_keydownListener(t){if(this._last&&(!this.modeless||t.composedPath().includes(this.$.overlay))&&"Escape"===t.key){const e=new CustomEvent("vaadin-overlay-escape-press",{bubbles:!0,cancelable:!0,detail:{sourceEvent:t}});this.dispatchEvent(e),this.opened&&!e.defaultPrevented&&this.close(t)}}}
|
|
2252
1903
|
/**
|
|
2253
1904
|
* @license
|
|
2254
1905
|
* Copyright (c) 2024 Vaadin Ltd.
|
|
2255
1906
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2256
|
-
*/,
|
|
1907
|
+
*/,Wo={start:"top",end:"bottom"},Go={start:"left",end:"right"},Uo=new ResizeObserver((t=>{setTimeout((()=>{t.forEach((t=>{t.target.__overlay&&t.target.__overlay._updatePosition()}))}))})),qo=t=>class extends t{static get properties(){return{positionTarget:{type:Object,value:null,sync:!0},horizontalAlign:{type:String,value:"start",sync:!0},verticalAlign:{type:String,value:"top",sync:!0},noHorizontalOverlap:{type:Boolean,value:!1,sync:!0},noVerticalOverlap:{type:Boolean,value:!1,sync:!0},requiredVerticalSpace:{type:Number,value:0,sync:!0}}}static get observers(){return["__positionSettingsChanged(horizontalAlign, verticalAlign, noHorizontalOverlap, noVerticalOverlap, requiredVerticalSpace)","__overlayOpenedChanged(opened, positionTarget)"]}constructor(){super(),this.__onScroll=this.__onScroll.bind(this),this._updatePosition=this._updatePosition.bind(this)}connectedCallback(){super.connectedCallback(),this.opened&&this.__addUpdatePositionEventListeners()}disconnectedCallback(){super.disconnectedCallback(),this.__removeUpdatePositionEventListeners()}__addUpdatePositionEventListeners(){window.visualViewport.addEventListener("resize",this._updatePosition),window.visualViewport.addEventListener("scroll",this.__onScroll,!0),this.__positionTargetAncestorRootNodes=function(t){const e=[];for(;t;){if(t.nodeType===Node.DOCUMENT_NODE){e.push(t);break}t.nodeType!==Node.DOCUMENT_FRAGMENT_NODE?t=t.assignedSlot?t.assignedSlot:t.parentNode:(e.push(t),t=t.host)}return e}(this.positionTarget),this.__positionTargetAncestorRootNodes.forEach((t=>{t.addEventListener("scroll",this.__onScroll,!0)})),this.positionTarget&&(this.__observePositionTargetMove=function(t,e){let i=null;const s=document.documentElement;function o(){i&&i.disconnect(),i=null}return function r(n=!1,a=1){o();const{left:l,top:h,width:c,height:d}=t.getBoundingClientRect();if(n||e(),!c||!d)return;const u={rootMargin:`${-Math.floor(h)}px ${-Math.floor(s.clientWidth-(l+c))}px ${-Math.floor(s.clientHeight-(h+d))}px ${-Math.floor(l)}px`,threshold:Math.max(0,Math.min(1,a))||1};let p=!0;i=new IntersectionObserver((function(t){let e=t[0].intersectionRatio;if(e!==a){if(!p)return r();0===e&&(e=1e-7),r(!1,e)}p=!1}),u),i.observe(t)}(!0),o}
|
|
2257
1908
|
/**
|
|
2258
1909
|
* @license
|
|
2259
1910
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
2260
1911
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2261
|
-
*/(this.positionTarget,(()=>{this._updatePosition()})))}__removeUpdatePositionEventListeners(){window.visualViewport.removeEventListener("resize",this._updatePosition),window.visualViewport.removeEventListener("scroll",this.__onScroll,!0),this.__positionTargetAncestorRootNodes&&(this.__positionTargetAncestorRootNodes.forEach((t=>{t.removeEventListener("scroll",this.__onScroll,!0)})),this.__positionTargetAncestorRootNodes=null),this.__observePositionTargetMove&&(this.__observePositionTargetMove(),this.__observePositionTargetMove=null)}__overlayOpenedChanged(t,e){if(this.__removeUpdatePositionEventListeners(),e&&(e.__overlay=null,
|
|
1912
|
+
*/(this.positionTarget,(()=>{this._updatePosition()})))}__removeUpdatePositionEventListeners(){window.visualViewport.removeEventListener("resize",this._updatePosition),window.visualViewport.removeEventListener("scroll",this.__onScroll,!0),this.__positionTargetAncestorRootNodes&&(this.__positionTargetAncestorRootNodes.forEach((t=>{t.removeEventListener("scroll",this.__onScroll,!0)})),this.__positionTargetAncestorRootNodes=null),this.__observePositionTargetMove&&(this.__observePositionTargetMove(),this.__observePositionTargetMove=null)}__overlayOpenedChanged(t,e){if(this.__removeUpdatePositionEventListeners(),e&&(e.__overlay=null,Uo.unobserve(e),t&&(this.__addUpdatePositionEventListeners(),e.__overlay=this,Uo.observe(e))),t){const t=getComputedStyle(this);this.__margins||(this.__margins={},["top","bottom","left","right"].forEach((e=>{this.__margins[e]=parseInt(t[e],10)}))),this._updatePosition(),requestAnimationFrame((()=>this._updatePosition()))}}__positionSettingsChanged(){this._updatePosition()}__onScroll(t){t.target instanceof Node&&this.contains(t.target)||this._updatePosition()}_updatePosition(){if(!this.positionTarget||!this.opened||!this.__margins)return;const t=this.positionTarget.getBoundingClientRect();if(0===t.width&&0===t.height&&this.opened)return void(this.opened=!1);const e=this.__shouldAlignStartVertically(t);this.style.justifyContent=e?"flex-start":"flex-end";const i=this.__isRTL,s=this.__shouldAlignStartHorizontally(t,i),o=!i&&s||i&&!s;this.style.alignItems=o?"flex-start":"flex-end";const r=this.getBoundingClientRect(),n=this.__calculatePositionInOneDimension(t,r,this.noVerticalOverlap,Wo,this,e),a=this.__calculatePositionInOneDimension(t,r,this.noHorizontalOverlap,Go,this,s);Object.assign(this.style,n,a),this.toggleAttribute("bottom-aligned",!e),this.toggleAttribute("top-aligned",e),this.toggleAttribute("end-aligned",!o),this.toggleAttribute("start-aligned",o)}__shouldAlignStartHorizontally(t,e){const i=Math.max(this.__oldContentWidth||0,this.$.overlay.offsetWidth);this.__oldContentWidth=this.$.overlay.offsetWidth;const s=Math.min(window.innerWidth,document.documentElement.clientWidth);return this.__shouldAlignStart(t,i,s,this.__margins,!e&&"start"===this.horizontalAlign||e&&"end"===this.horizontalAlign,this.noHorizontalOverlap,Go)}__shouldAlignStartVertically(t){const e=this.requiredVerticalSpace||Math.max(this.__oldContentHeight||0,this.$.overlay.offsetHeight);this.__oldContentHeight=this.$.overlay.offsetHeight;const i=Math.min(window.innerHeight,document.documentElement.clientHeight);return this.__shouldAlignStart(t,e,i,this.__margins,"top"===this.verticalAlign,this.noVerticalOverlap,Wo)}__shouldAlignStart(t,e,i,s,o,r,n){const a=i-t[r?n.end:n.start]-s[n.end],l=t[r?n.start:n.end]-s[n.start],h=o?a:l;return o===(h>(o?l:a)||h>e)}__adjustBottomProperty(t,e,i){let s;if(t===e.end){if(e.end===Wo.end){const t=Math.min(window.innerHeight,document.documentElement.clientHeight);i>t&&this.__oldViewportHeight&&(s=i-(this.__oldViewportHeight-t)),this.__oldViewportHeight=t}if(e.end===Go.end){const t=Math.min(window.innerWidth,document.documentElement.clientWidth);i>t&&this.__oldViewportWidth&&(s=i-(this.__oldViewportWidth-t)),this.__oldViewportWidth=t}}return s}__calculatePositionInOneDimension(t,e,i,s,o,r){const n=r?s.start:s.end,a=r?s.end:s.start,l=parseFloat(o.style[n]||getComputedStyle(o)[n]),h=this.__adjustBottomProperty(n,s,l),c=h?`${h}px`:`${l+(e[r?s.start:s.end]-t[i===r?s.end:s.start])*(r?-1:1)}px`;return{[n]:c,[a]:""}}}
|
|
2262
1913
|
/**
|
|
2263
1914
|
* @license
|
|
2264
1915
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
2265
1916
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2266
|
-
*/,
|
|
1917
|
+
*/,Jo=t=>class extends(qo(Ho(ss(t)))){static get observers(){return["_updateOverlayWidth(opened, owner)"]}ready(){super.ready(),this.restoreFocusOnClose=!0}_getMenuElement(){return Array.from(this.children).find((t=>"style"!==t.localName))}_updateOverlayWidth(t,e){if(t&&e){const t="--vaadin-select-overlay-width",i=getComputedStyle(e).getPropertyValue(t);""===i?this.style.removeProperty(t):this.style.setProperty(t,i)}}}
|
|
2267
1918
|
/**
|
|
2268
1919
|
* @license
|
|
2269
1920
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
2270
1921
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2271
|
-
*/;zt("vaadin-select-overlay",[
|
|
1922
|
+
*/;zt("vaadin-select-overlay",[go,y`
|
|
2272
1923
|
:host {
|
|
2273
1924
|
align-items: flex-start;
|
|
2274
1925
|
justify-content: flex-start;
|
|
@@ -2283,69 +1934,30 @@ class Hs{constructor(t,e){this.host=t,this.callback="function"==typeof e?e:()=>t
|
|
|
2283
1934
|
outline: 3px solid;
|
|
2284
1935
|
}
|
|
2285
1936
|
}
|
|
2286
|
-
`],{moduleId:"vaadin-select-overlay-styles"});class
|
|
1937
|
+
`],{moduleId:"vaadin-select-overlay-styles"});class Vo extends(Jo(Pt(Qi))){static get is(){return"vaadin-select-overlay"}static get template(){return Ki`
|
|
2287
1938
|
<div id="backdrop" part="backdrop" hidden$="[[!withBackdrop]]"></div>
|
|
2288
1939
|
<div part="overlay" id="overlay" tabindex="0">
|
|
2289
1940
|
<div part="content" id="content">
|
|
2290
1941
|
<slot></slot>
|
|
2291
1942
|
</div>
|
|
2292
1943
|
</div>
|
|
2293
|
-
`}ready(){super.ready(),this.owner=this.__dataHost,this.owner._overlayElement=this}requestContentUpdate(){if(super.requestContentUpdate(),this.owner){const t=this._getMenuElement();this.owner._assignMenuElement(t)}}}
|
|
2294
|
-
/**
|
|
2295
|
-
* @license
|
|
2296
|
-
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
2297
|
-
* This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
2298
|
-
* The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
2299
|
-
* The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
2300
|
-
* Code distributed by Google as part of the polymer project is also
|
|
2301
|
-
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
2302
|
-
*/
|
|
2303
|
-
let ir=0,or=0;const sr=[];let rr=!1;const nr={run(t){rr||(rr=!0,queueMicrotask((()=>function(){rr=!1;const t=sr.length;for(let e=0;e<t;e++){const t=sr[e];if(t)try{t()}catch(t){setTimeout((()=>{throw t}))}}sr.splice(0,t),or+=t}()))),sr.push(t);const e=ir;return ir+=1,e},cancel(t){const e=t-or;if(e>=0){if(!sr[e])throw new Error(`invalid async handle: ${t}`);sr[e]=null}}},ar=!1,lr=t=>t,cr="string"==typeof document.head.style.touchAction,hr="__polymerGestures",ur="__polymerGesturesHandled",dr="__polymerGesturesTouchAction",pr=["mousedown","mousemove","mouseup","click"],mr=[0,1,4,2],fr=function(){try{return 1===new MouseEvent("test",{buttons:1}).buttons}catch(t){return!1}}();
|
|
2304
|
-
/**
|
|
2305
|
-
@license
|
|
2306
|
-
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
2307
|
-
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
2308
|
-
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
2309
|
-
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
2310
|
-
Code distributed by Google as part of the polymer project is also
|
|
2311
|
-
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
2312
|
-
*/function vr(t){return pr.indexOf(t)>-1}let br=!1;function gr(t){if(!vr(t)&&"touchend"!==t)return cr&&br&&ar?{passive:!0}:void 0}!function(){try{const t=Object.defineProperty({},"passive",{get(){br=!0}});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(t){}}();const yr=navigator.userAgent.match(/iP(?:[oa]d|hone)|Android/u),wr={button:!0,command:!0,fieldset:!0,input:!0,keygen:!0,optgroup:!0,option:!0,select:!0,textarea:!0};function xr(t){const e=t.type;if(!vr(e))return!1;if("mousemove"===e){let e=void 0===t.buttons?1:t.buttons;return t instanceof window.MouseEvent&&!fr&&(e=mr[t.which]||0),Boolean(1&e)}return 0===(void 0===t.button?0:t.button)}const kr={mouse:{target:null,mouseIgnoreJob:null},touch:{x:0,y:0,id:-1,scrollDecided:!1}};function _r(t,e,i){t.movefn=e,t.upfn=i,document.addEventListener("mousemove",e),document.addEventListener("mouseup",i)}function Ar(t){document.removeEventListener("mousemove",t.movefn),document.removeEventListener("mouseup",t.upfn),t.movefn=null,t.upfn=null}const Sr=window.ShadyDOM&&window.ShadyDOM.noPatch?window.ShadyDOM.composedPath:t=>t.composedPath&&t.composedPath()||[],Cr={},Tr=[];function zr(t){const e=Sr(t);return e.length>0?e[0]:t.target}function Nr(t){const e=t.type,i=t.currentTarget[hr];if(!i)return;const o=i[e];if(!o)return;if(!t[ur]&&(t[ur]={},e.startsWith("touch"))){const i=t.changedTouches[0];if("touchstart"===e&&1===t.touches.length&&(kr.touch.id=i.identifier),kr.touch.id!==i.identifier)return;cr||"touchstart"!==e&&"touchmove"!==e||function(t){const e=t.changedTouches[0],i=t.type;if("touchstart"===i)kr.touch.x=e.clientX,kr.touch.y=e.clientY,kr.touch.scrollDecided=!1;else if("touchmove"===i){if(kr.touch.scrollDecided)return;kr.touch.scrollDecided=!0;const i=function(t){let e="auto";const i=Sr(t);for(let t,o=0;o<i.length;o++)if(t=i[o],t[dr]){e=t[dr];break}return e}(t);let o=!1;const s=Math.abs(kr.touch.x-e.clientX),r=Math.abs(kr.touch.y-e.clientY);t.cancelable&&("none"===i?o=!0:"pan-x"===i?o=r>s:"pan-y"===i&&(o=s>r)),o?t.preventDefault():Br("track")}}(t)}const s=t[ur];if(!s.skip){for(let e,i=0;i<Tr.length;i++)e=Tr[i],o[e.name]&&!s[e.name]&&e.flow&&e.flow.start.indexOf(t.type)>-1&&e.reset&&e.reset();for(let i,r=0;r<Tr.length;r++)i=Tr[r],o[i.name]&&!s[i.name]&&(s[i.name]=!0,i[e](t))}}function Er(t,e,i){return!!Cr[e]&&(function(t,e,i){const o=Cr[e],s=o.deps,r=o.name;let n=t[hr];n||(t[hr]=n={});for(let e,i,o=0;o<s.length;o++)e=s[o],yr&&vr(e)&&"click"!==e||(i=n[e],i||(n[e]=i={_count:0}),0===i._count&&t.addEventListener(e,Nr,gr(e)),i[r]=(i[r]||0)+1,i._count=(i._count||0)+1);t.addEventListener(e,i),o.touchAction&&function(t,e){cr&&t instanceof HTMLElement&&nr.run((()=>{t.style.touchAction=e})),t[dr]=e}(t,o.touchAction)}(t,e,i),!0)}function Or(t){Tr.push(t),t.emits.forEach((e=>{Cr[e]=t}))}function Ir(t,e,i){const o=new Event(e,{bubbles:!0,cancelable:!0,composed:!0});if(o.detail=i,lr(t).dispatchEvent(o),o.defaultPrevented){const t=i.preventer||i.sourceEvent;t&&t.preventDefault&&t.preventDefault()}}function Br(t){const e=function(t){for(let e,i=0;i<Tr.length;i++){e=Tr[i];for(let i,o=0;o<e.emits.length;o++)if(i=e.emits[o],i===t)return e}return null}(t);e.info&&(e.info.prevent=!0)}function Pr(t,e,i,o){e&&Ir(e,t,{x:i.clientX,y:i.clientY,sourceEvent:i,preventer:o,prevent:t=>Br(t)})}function Mr(t,e,i){if(t.prevent)return!1;if(t.started)return!0;const o=Math.abs(t.x-e),s=Math.abs(t.y-i);return o>=5||s>=5}function Dr(t,e,i){if(!e)return;const o=t.moves[t.moves.length-2],s=t.moves[t.moves.length-1];let r,n=0;o&&(r=s.x-o.x,n=s.y-o.y),Ir(e,"track",{state:t.state,x:i.clientX,y:i.clientY,dx:s.x-t.x,dy:s.y-t.y,ddx:r,ddy:n,sourceEvent:i,hover:()=>function(t,e){let i=document.elementFromPoint(t,e),o=i;for(;o&&o.shadowRoot&&!window.ShadyDOM;){const s=o;if(o=o.shadowRoot.elementFromPoint(t,e),s===o)break;o&&(i=o)}return i}(i.clientX,i.clientY)})}function jr(t,e,i){const o=Math.abs(e.clientX-t.x),s=Math.abs(e.clientY-t.y),r=zr(i||e);!r||wr[r.localName]&&r.hasAttribute("disabled")||(isNaN(o)||isNaN(s)||o<=25&&s<=25||function(t){if("click"===t.type){if(0===t.detail)return!0;const e=zr(t);if(!e.nodeType||e.nodeType!==Node.ELEMENT_NODE)return!0;const i=e.getBoundingClientRect(),o=t.pageX,s=t.pageY;return!(o>=i.left&&o<=i.right&&s>=i.top&&s<=i.bottom)}return!1}(e))&&(t.prevent||Ir(r,"tap",{x:e.clientX,y:e.clientY,sourceEvent:e,preventer:i}))}
|
|
2313
|
-
/**
|
|
2314
|
-
* @license
|
|
2315
|
-
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2316
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2317
|
-
*/Or({name:"downup",deps:["mousedown","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["down","up"],info:{movefn:null,upfn:null},reset(){Ar(this.info)},mousedown(t){if(!xr(t))return;const e=zr(t),i=this;_r(this.info,(t=>{xr(t)||(Pr("up",e,t),Ar(i.info))}),(t=>{xr(t)&&Pr("up",e,t),Ar(i.info)})),Pr("down",e,t)},touchstart(t){Pr("down",zr(t),t.changedTouches[0],t)},touchend(t){Pr("up",zr(t),t.changedTouches[0],t)}}),Or({name:"track",touchAction:"none",deps:["mousedown","touchstart","touchmove","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["track"],info:{x:0,y:0,state:"start",started:!1,moves:[],addMove(t){this.moves.length>2&&this.moves.shift(),this.moves.push(t)},movefn:null,upfn:null,prevent:!1},reset(){this.info.state="start",this.info.started=!1,this.info.moves=[],this.info.x=0,this.info.y=0,this.info.prevent=!1,Ar(this.info)},mousedown(t){if(!xr(t))return;const e=zr(t),i=this,o=t=>{const o=t.clientX,s=t.clientY;Mr(i.info,o,s)&&(i.info.state=i.info.started?"mouseup"===t.type?"end":"track":"start","start"===i.info.state&&Br("tap"),i.info.addMove({x:o,y:s}),xr(t)||(i.info.state="end",Ar(i.info)),e&&Dr(i.info,e,t),i.info.started=!0)};_r(this.info,o,(t=>{i.info.started&&o(t),Ar(i.info)})),this.info.x=t.clientX,this.info.y=t.clientY},touchstart(t){const e=t.changedTouches[0];this.info.x=e.clientX,this.info.y=e.clientY},touchmove(t){const e=zr(t),i=t.changedTouches[0],o=i.clientX,s=i.clientY;Mr(this.info,o,s)&&("start"===this.info.state&&Br("tap"),this.info.addMove({x:o,y:s}),Dr(this.info,e,i),this.info.state="track",this.info.started=!0)},touchend(t){const e=zr(t),i=t.changedTouches[0];this.info.started&&(this.info.state="end",this.info.addMove({x:i.clientX,y:i.clientY}),Dr(this.info,e,i))}}),Or({name:"tap",deps:["mousedown","click","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["click","touchend"]},emits:["tap"],info:{x:NaN,y:NaN,prevent:!1},reset(){this.info.x=NaN,this.info.y=NaN,this.info.prevent=!1},mousedown(t){xr(t)&&(this.info.x=t.clientX,this.info.y=t.clientY)},click(t){xr(t)&&jr(this.info,t)},touchstart(t){const e=t.changedTouches[0];this.info.x=e.clientX,this.info.y=e.clientY},touchend(t){jr(this.info,t.changedTouches[0],t)}});const Fr=we((t=>class extends t{static get properties(){return{disabled:{type:Boolean,value:!1,observer:"_disabledChanged",reflectToAttribute:!0,sync:!0}}}_disabledChanged(t){this._setAriaDisabled(t)}_setAriaDisabled(t){t?this.setAttribute("aria-disabled","true"):this.removeAttribute("aria-disabled")}click(){this.disabled||super.click()}})),Rr=we((t=>class extends t{ready(){super.ready(),this.addEventListener("keydown",(t=>{this._onKeyDown(t)})),this.addEventListener("keyup",(t=>{this._onKeyUp(t)}))}_onKeyDown(t){switch(t.key){case"Enter":this._onEnter(t);break;case"Escape":this._onEscape(t)}}_onKeyUp(t){}_onEnter(t){}_onEscape(t){}})),Lr=t=>class extends(Fr(Rr(t))){get _activeKeys(){return[" "]}ready(){super.ready(),Er(this,"down",(t=>{this._shouldSetActive(t)&&this._setActive(!0)})),Er(this,"up",(()=>{this._setActive(!1)}))}disconnectedCallback(){super.disconnectedCallback(),this._setActive(!1)}_shouldSetActive(t){return!this.disabled}_onKeyDown(t){super._onKeyDown(t),this._shouldSetActive(t)&&this._activeKeys.includes(t.key)&&(this._setActive(!0),document.addEventListener("keyup",(t=>{this._activeKeys.includes(t.key)&&this._setActive(!1)}),{once:!0}))}_setActive(t){this.toggleAttribute("active",t)}}
|
|
2318
|
-
/**
|
|
2319
|
-
* @license
|
|
2320
|
-
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2321
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2322
|
-
*/;
|
|
2323
|
-
/**
|
|
2324
|
-
* @license
|
|
2325
|
-
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2326
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2327
|
-
*/let Hr=!1;window.addEventListener("keydown",(()=>{Hr=!0}),{capture:!0}),window.addEventListener("mousedown",(()=>{Hr=!1}),{capture:!0});
|
|
1944
|
+
`}ready(){super.ready(),this.owner=this.__dataHost,this.owner._overlayElement=this}requestContentUpdate(){if(super.requestContentUpdate(),this.owner){const t=this._getMenuElement();this.owner._assignMenuElement(t)}}}u(Vo);
|
|
2328
1945
|
/**
|
|
2329
1946
|
* @license
|
|
2330
1947
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2331
1948
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2332
1949
|
*/
|
|
2333
|
-
const
|
|
1950
|
+
const Yo=t=>class extends(qs(t)){static get properties(){return{tabindex:{type:Number,reflectToAttribute:!0,observer:"_tabindexChanged"},_lastTabIndex:{type:Number}}}_disabledChanged(t,e){super._disabledChanged(t,e),t?(void 0!==this.tabindex&&(this._lastTabIndex=this.tabindex),this.tabindex=-1):e&&(this.tabindex=this._lastTabIndex)}_tabindexChanged(t){this.disabled&&-1!==t&&(this._lastTabIndex=t,this.tabindex=-1)}}
|
|
2334
1951
|
/**
|
|
2335
1952
|
* @license
|
|
2336
1953
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
2337
1954
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2338
|
-
|
|
1955
|
+
*/,$o=t=>class extends(Vs(Yo(so(t)))){static get properties(){return{tabindex:{type:Number,value:0,reflectToAttribute:!0}}}get _activeKeys(){return["Enter"," "]}ready(){super.ready(),this.hasAttribute("role")||this.setAttribute("role","button")}_onKeyDown(t){super._onKeyDown(t),t.altKey||t.shiftKey||t.ctrlKey||t.metaKey||this._activeKeys.includes(t.key)&&(t.preventDefault(),this.click())}}
|
|
2339
1956
|
/**
|
|
2340
1957
|
* @license
|
|
2341
1958
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
2342
1959
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2343
1960
|
*/;
|
|
2344
|
-
/**
|
|
2345
|
-
* @license
|
|
2346
|
-
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2347
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2348
|
-
*/
|
|
2349
1961
|
/**
|
|
2350
1962
|
* @license
|
|
2351
1963
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
@@ -2393,19 +2005,19 @@ zt("vaadin-select-value-button",y`
|
|
|
2393
2005
|
width: 100%;
|
|
2394
2006
|
line-height: inherit;
|
|
2395
2007
|
}
|
|
2396
|
-
`,{moduleId:"vaadin-select-value-button-styles"});class
|
|
2008
|
+
`,{moduleId:"vaadin-select-value-button-styles"});class Zo extends($o(Pt(Qi))){static get is(){return"vaadin-select-value-button"}static get template(){return Ki`
|
|
2397
2009
|
<div class="vaadin-button-container">
|
|
2398
2010
|
<span part="label">
|
|
2399
2011
|
<slot></slot>
|
|
2400
2012
|
</span>
|
|
2401
2013
|
</div>
|
|
2402
|
-
`}}
|
|
2014
|
+
`}}u(Zo);
|
|
2403
2015
|
/**
|
|
2404
2016
|
* @license
|
|
2405
2017
|
* Copyright (c) 2021 - 2024 Vaadin Ltd..
|
|
2406
2018
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2407
2019
|
*/
|
|
2408
|
-
const
|
|
2020
|
+
const Ko=y`
|
|
2409
2021
|
.sr-only {
|
|
2410
2022
|
border: 0 !important;
|
|
2411
2023
|
clip: rect(1px, 1px, 1px, 1px) !important;
|
|
@@ -2419,7 +2031,7 @@ const $r=y`
|
|
|
2419
2031
|
width: 1px !important;
|
|
2420
2032
|
white-space: nowrap !important;
|
|
2421
2033
|
}
|
|
2422
|
-
`,
|
|
2034
|
+
`,Xo=/\/\*[\*!]\s+vaadin-dev-mode:start([\s\S]*)vaadin-dev-mode:end\s+\*\*\//i,Qo=window.Vaadin&&window.Vaadin.Flow&&window.Vaadin.Flow.clients;function tr(t,e){if("function"!=typeof t)return;const i=Xo.exec(t.toString());if(i)try{t=new Function(i[1])}catch(t){console.log("vaadin-development-mode-detector: uncommentAndRun() failed",t)}return t(e)}window.Vaadin=window.Vaadin||{};function er(){
|
|
2423
2035
|
/*! vaadin-dev-mode:start
|
|
2424
2036
|
(function () {
|
|
2425
2037
|
'use strict';
|
|
@@ -2898,18 +2510,18 @@ try {
|
|
|
2898
2510
|
|
|
2899
2511
|
}());
|
|
2900
2512
|
|
|
2901
|
-
vaadin-dev-mode:end **/}let
|
|
2513
|
+
vaadin-dev-mode:end **/}let ir;void 0===window.Vaadin.developmentMode&&(window.Vaadin.developmentMode=function(){try{return!!localStorage.getItem("vaadin.developmentmode.force")||["localhost","127.0.0.1"].indexOf(window.location.hostname)>=0&&(Qo?!(Qo&&Object.keys(Qo).map((t=>Qo[t])).filter((t=>t.productionMode)).length>0):!tr((function(){return!0})))}catch(t){return!1}}()),
|
|
2902
2514
|
/**
|
|
2903
2515
|
* @license
|
|
2904
2516
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2905
2517
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2906
2518
|
*/
|
|
2907
|
-
window.Vaadin||(window.Vaadin={}),window.Vaadin.registrations||(window.Vaadin.registrations=[]),window.Vaadin.developmentModeCallback||(window.Vaadin.developmentModeCallback={}),window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]=function(){!function(t,e){if(window.Vaadin.developmentMode)
|
|
2519
|
+
window.Vaadin||(window.Vaadin={}),window.Vaadin.registrations||(window.Vaadin.registrations=[]),window.Vaadin.developmentModeCallback||(window.Vaadin.developmentModeCallback={}),window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]=function(){!function(t,e){if(window.Vaadin.developmentMode)tr(t,e)}(er)};const sr=new Set,or=t=>class extends(ss(t)){static finalize(){super.finalize();const{is:t}=this;t&&!sr.has(t)&&(window.Vaadin.registrations.push(this),sr.add(t),window.Vaadin.developmentModeCallback&&(ir=ao.debounce(ir,us,(()=>{window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]()})),no.add(ir)))}constructor(){super(),null===document.doctype&&console.warn('Vaadin components require the "standards mode" declaration. Please add <!DOCTYPE html> to the HTML document.')}}
|
|
2908
2520
|
/**
|
|
2909
2521
|
* @license
|
|
2910
2522
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2911
2523
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2912
|
-
*/,
|
|
2524
|
+
*/,rr=y`
|
|
2913
2525
|
:host {
|
|
2914
2526
|
display: inline-flex;
|
|
2915
2527
|
outline: none;
|
|
@@ -2948,7 +2560,7 @@ window.Vaadin||(window.Vaadin={}),window.Vaadin.registrations||(window.Vaadin.re
|
|
|
2948
2560
|
* @license
|
|
2949
2561
|
* Copyright (c) 2021 - 2024 Vaadin Ltd..
|
|
2950
2562
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2951
|
-
*/,
|
|
2563
|
+
*/,nr=y`
|
|
2952
2564
|
[class$='container'] {
|
|
2953
2565
|
display: flex;
|
|
2954
2566
|
flex-direction: column;
|
|
@@ -2961,80 +2573,80 @@ window.Vaadin||(window.Vaadin={}),window.Vaadin.registrations||(window.Vaadin.re
|
|
|
2961
2573
|
* @license
|
|
2962
2574
|
* Copyright (c) 2023 - 2024 Vaadin Ltd.
|
|
2963
2575
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2964
|
-
*/,
|
|
2576
|
+
*/,ar=new Map;function lr(t){return ar.has(t)||ar.set(t,new WeakMap),ar.get(t)}function hr(t,e){t&&t.removeAttribute(e)}function cr(t,e){if(!t||!e)return;const i=lr(e);if(i.has(t))return;const s=ho(t.getAttribute(e));i.set(t,new Set(s))}function dr(t,e,i={newId:null,oldId:null,fromUser:!1}){if(!t||!e)return;const{newId:s,oldId:o,fromUser:r}=i,n=lr(e),a=n.get(t);if(!r&&a)return o&&a.delete(o),void(s&&a.add(s));r&&(a?s||n.delete(t):cr(t,e),hr(t,e)),function(t,e,i){const s=ho(t.getAttribute(e));s.delete(i),0!==s.size?t.setAttribute(e,co(s)):t.removeAttribute(e)}(t,e,o);const l=s||co(a);l&&uo(t,e,l)}
|
|
2965
2577
|
/**
|
|
2966
2578
|
* @license
|
|
2967
2579
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2968
2580
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2969
2581
|
*/
|
|
2970
|
-
const
|
|
2582
|
+
const ur=ue((t=>class extends(so(Yo(t))){static get properties(){return{autofocus:{type:Boolean},focusElement:{type:Object,readOnly:!0,observer:"_focusElementChanged"},_lastTabIndex:{value:0}}}constructor(){super(),this._boundOnBlur=this._onBlur.bind(this),this._boundOnFocus=this._onFocus.bind(this)}ready(){super.ready(),this.autofocus&&!this.disabled&&requestAnimationFrame((()=>{this.focus(),this.setAttribute("focus-ring","")}))}focus(){this.focusElement&&!this.disabled&&this.focusElement.focus()}blur(){this.focusElement&&this.focusElement.blur()}click(){this.focusElement&&!this.disabled&&this.focusElement.click()}_focusElementChanged(t,e){t?(t.disabled=this.disabled,this._addFocusListeners(t),this.__forwardTabIndex(this.tabindex)):e&&this._removeFocusListeners(e)}_addFocusListeners(t){t.addEventListener("blur",this._boundOnBlur),t.addEventListener("focus",this._boundOnFocus)}_removeFocusListeners(t){t.removeEventListener("blur",this._boundOnBlur),t.removeEventListener("focus",this._boundOnFocus)}_onFocus(t){t.stopPropagation(),this.dispatchEvent(new Event("focus"))}_onBlur(t){t.stopPropagation(),this.dispatchEvent(new Event("blur"))}_shouldSetFocus(t){return t.target===this.focusElement}_shouldRemoveFocus(t){return t.target===this.focusElement}_disabledChanged(t,e){super._disabledChanged(t,e),this.focusElement&&(this.focusElement.disabled=t),t&&this.blur()}_tabindexChanged(t){this.__forwardTabIndex(t)}__forwardTabIndex(t){void 0!==t&&this.focusElement&&(this.focusElement.tabIndex=t,-1!==t&&(this.tabindex=void 0)),this.disabled&&t&&(-1!==t&&(this._lastTabIndex=t),this.tabindex=void 0)}})),pr=ue((t=>class extends t{static get properties(){return{stateTarget:{type:Object,observer:"_stateTargetChanged"}}}static get delegateAttrs(){return[]}static get delegateProps(){return[]}ready(){super.ready(),this._createDelegateAttrsObserver(),this._createDelegatePropsObserver()}_stateTargetChanged(t){t&&(this._ensureAttrsDelegated(),this._ensurePropsDelegated())}_createDelegateAttrsObserver(){this._createMethodObserver(`_delegateAttrsChanged(${this.constructor.delegateAttrs.join(", ")})`)}_createDelegatePropsObserver(){this._createMethodObserver(`_delegatePropsChanged(${this.constructor.delegateProps.join(", ")})`)}_ensureAttrsDelegated(){this.constructor.delegateAttrs.forEach((t=>{this._delegateAttribute(t,this[t])}))}_ensurePropsDelegated(){this.constructor.delegateProps.forEach((t=>{this._delegateProperty(t,this[t])}))}_delegateAttrsChanged(...t){this.constructor.delegateAttrs.forEach(((e,i)=>{this._delegateAttribute(e,t[i])}))}_delegatePropsChanged(...t){this.constructor.delegateProps.forEach(((e,i)=>{this._delegateProperty(e,t[i])}))}_delegateAttribute(t,e){this.stateTarget&&("invalid"===t&&this._delegateAttribute("aria-invalid",!!e&&"true"),"boolean"==typeof e?this.stateTarget.toggleAttribute(t,e):e?this.stateTarget.setAttribute(t,e):this.stateTarget.removeAttribute(t))}_delegateProperty(t,e){this.stateTarget&&(this.stateTarget[t]=e)}}));
|
|
2971
2583
|
/**
|
|
2972
2584
|
* @license
|
|
2973
2585
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2974
2586
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2975
|
-
|
|
2587
|
+
*/
|
|
2976
2588
|
/**
|
|
2977
2589
|
* @license
|
|
2978
2590
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2979
2591
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2980
2592
|
*/
|
|
2981
|
-
class
|
|
2593
|
+
class mr{constructor(t,e){this.query=t,this.callback=e,this._boundQueryHandler=this._queryHandler.bind(this)}hostConnected(){this._removeListener(),this._mediaQuery=window.matchMedia(this.query),this._addListener(),this._queryHandler(this._mediaQuery)}hostDisconnected(){this._removeListener()}_addListener(){this._mediaQuery&&this._mediaQuery.addListener(this._boundQueryHandler)}_removeListener(){this._mediaQuery&&this._mediaQuery.removeListener(this._boundQueryHandler),this._mediaQuery=null}_queryHandler(t){"function"==typeof this.callback&&this.callback(t.matches)}}
|
|
2982
2594
|
/**
|
|
2983
2595
|
* @license
|
|
2984
2596
|
* Copyright (c) 2023 - 2024 Vaadin Ltd.
|
|
2985
2597
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2986
|
-
*/const
|
|
2598
|
+
*/const fr=t=>class extends t{static get properties(){return{overlayClass:{type:String},_overlayElement:{type:Object}}}static get observers(){return["__updateOverlayClassNames(overlayClass, _overlayElement)"]}__updateOverlayClassNames(t,e){if(!e)return;if(void 0===t)return;const{classList:i}=e;if(this.__initialClasses||(this.__initialClasses=new Set(i)),Array.isArray(this.__previousClasses)){const t=this.__previousClasses.filter((t=>!this.__initialClasses.has(t)));t.length>0&&i.remove(...t)}const s="string"==typeof t?t.split(" ").filter(Boolean):[];s.length>0&&i.add(...s),this.__previousClasses=s}}
|
|
2987
2599
|
/**
|
|
2988
2600
|
* @license
|
|
2989
2601
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2990
2602
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2991
|
-
*/;let
|
|
2603
|
+
*/;let vr=0;function br(){return vr++}
|
|
2992
2604
|
/**
|
|
2993
2605
|
* @license
|
|
2994
2606
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2995
2607
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2996
|
-
*/class
|
|
2608
|
+
*/class gr extends EventTarget{static generateId(t,e="default"){return`${e}-${t.localName}-${br()}`}constructor(t,e,i,s={}){super();const{initializer:o,multiple:r,observe:n,useUniqueId:a,uniqueIdPrefix:l}=s;this.host=t,this.slotName=e,this.tagName=i,this.observe="boolean"!=typeof n||n,this.multiple="boolean"==typeof r&&r,this.slotInitializer=o,r&&(this.nodes=[]),a&&(this.defaultId=this.constructor.generateId(t,l||e))}hostConnected(){this.initialized||(this.multiple?this.initMultiple():this.initSingle(),this.observe&&this.observeSlot(),this.initialized=!0)}initSingle(){let t=this.getSlotChild();t?(this.node=t,this.initAddedNode(t)):(t=this.attachDefaultNode(),this.initNode(t))}initMultiple(){const t=this.getSlotChildren();if(0===t.length){const t=this.attachDefaultNode();t&&(this.nodes=[t],this.initNode(t))}else this.nodes=t,t.forEach((t=>{this.initAddedNode(t)}))}attachDefaultNode(){const{host:t,slotName:e,tagName:i}=this;let s=this.defaultNode;return!s&&i&&(s=document.createElement(i),s instanceof Element&&(""!==e&&s.setAttribute("slot",e),this.defaultNode=s)),s&&(this.node=s,t.appendChild(s)),s}getSlotChildren(){const{slotName:t}=this;return Array.from(this.host.childNodes).filter((e=>e.nodeType===Node.ELEMENT_NODE&&e.slot===t||e.nodeType===Node.TEXT_NODE&&e.textContent.trim()&&""===t))}getSlotChild(){return this.getSlotChildren()[0]}initNode(t){const{slotInitializer:e}=this;e&&e(t,this.host)}initCustomNode(t){}teardownNode(t){}initAddedNode(t){t!==this.defaultNode&&(this.initCustomNode(t),this.initNode(t))}observeSlot(){const{slotName:t}=this,e=this.host.shadowRoot.querySelector(""===t?"slot:not([name])":`slot[name=${t}]`);this.__slotObserver=new po(e,(({addedNodes:t,removedNodes:e})=>{const i=this.multiple?this.nodes:[this.node],s=t.filter((t=>!function(t){return t.nodeType===Node.TEXT_NODE&&""===t.textContent.trim()}(t)&&!i.includes(t)));e.length&&(this.nodes=i.filter((t=>!e.includes(t))),e.forEach((t=>{this.teardownNode(t)}))),s&&s.length>0&&(this.multiple?(this.defaultNode&&this.defaultNode.remove(),this.nodes=[...i,...s].filter((t=>t!==this.defaultNode)),s.forEach((t=>{this.initAddedNode(t)}))):(this.node&&this.node.remove(),this.node=s[0],this.initAddedNode(this.node)))}))}}
|
|
2997
2609
|
/**
|
|
2998
2610
|
* @license
|
|
2999
2611
|
* Copyright (c) 2022 - 2024 Vaadin Ltd.
|
|
3000
2612
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3001
|
-
*/class
|
|
2613
|
+
*/class yr extends gr{constructor(t){super(t,"tooltip"),this.setTarget(t)}initCustomNode(t){t.target=this.target,void 0!==this.ariaTarget&&(t.ariaTarget=this.ariaTarget),void 0!==this.context&&(t.context=this.context),void 0!==this.manual&&(t.manual=this.manual),void 0!==this.opened&&(t.opened=this.opened),void 0!==this.position&&(t._position=this.position),void 0!==this.shouldShow&&(t.shouldShow=this.shouldShow),this.__notifyChange()}teardownNode(){this.__notifyChange()}setAriaTarget(t){this.ariaTarget=t;const e=this.node;e&&(e.ariaTarget=t)}setContext(t){this.context=t;const e=this.node;e&&(e.context=t)}setManual(t){this.manual=t;const e=this.node;e&&(e.manual=t)}setOpened(t){this.opened=t;const e=this.node;e&&(e.opened=t)}setPosition(t){this.position=t;const e=this.node;e&&(e._position=t)}setShouldShow(t){this.shouldShow=t;const e=this.node;e&&(e.shouldShow=t)}setTarget(t){this.target=t;const e=this.node;e&&(e.target=t)}__notifyChange(){this.dispatchEvent(new CustomEvent("tooltip-changed",{detail:{node:this.node}}))}}
|
|
3002
2614
|
/**
|
|
3003
2615
|
* @license
|
|
3004
2616
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
3005
2617
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3006
|
-
*/class
|
|
2618
|
+
*/class wr{constructor(t){this.host=t,this.__required=!1}setTarget(t){this.__target=t,this.__setAriaRequiredAttribute(this.__required),this.__setLabelIdToAriaAttribute(this.__labelId,this.__labelId),null!=this.__labelIdFromUser&&this.__setLabelIdToAriaAttribute(this.__labelIdFromUser,this.__labelIdFromUser,!0),this.__setErrorIdToAriaAttribute(this.__errorId),this.__setHelperIdToAriaAttribute(this.__helperId),this.setAriaLabel(this.__label)}setRequired(t){this.__setAriaRequiredAttribute(t),this.__required=t}setAriaLabel(t){this.__setAriaLabelToAttribute(t),this.__label=t}setLabelId(t,e=!1){this.__setLabelIdToAriaAttribute(t,e?this.__labelIdFromUser:this.__labelId,e),e?this.__labelIdFromUser=t:this.__labelId=t}setErrorId(t){this.__setErrorIdToAriaAttribute(t,this.__errorId),this.__errorId=t}setHelperId(t){this.__setHelperIdToAriaAttribute(t,this.__helperId),this.__helperId=t}__setAriaLabelToAttribute(t){var e;this.__target&&(t?(cr(e=this.__target,"aria-labelledby"),hr(e,"aria-labelledby"),this.__target.setAttribute("aria-label",t)):this.__label&&(function(t,e){if(!t)return;const i=lr(e),s=i.get(t);s&&0!==s.size?uo(t,e,co(s)):t.removeAttribute(e),i.delete(t)}(this.__target,"aria-labelledby"),this.__target.removeAttribute("aria-label")))}__setLabelIdToAriaAttribute(t,e,i){dr(this.__target,"aria-labelledby",{newId:t,oldId:e,fromUser:i})}__setErrorIdToAriaAttribute(t,e){dr(this.__target,"aria-describedby",{newId:t,oldId:e,fromUser:!1})}__setHelperIdToAriaAttribute(t,e){dr(this.__target,"aria-describedby",{newId:t,oldId:e,fromUser:!1})}__setAriaRequiredAttribute(t){this.__target&&(["input","textarea"].includes(this.__target.localName)||(t?this.__target.setAttribute("aria-required","true"):this.__target.removeAttribute("aria-required")))}}
|
|
3007
2619
|
/**
|
|
3008
2620
|
* @license
|
|
3009
2621
|
* Copyright (c) 2022 - 2024 Vaadin Ltd.
|
|
3010
2622
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3011
|
-
*/const
|
|
2623
|
+
*/const xr=document.createElement("div");let kr;xr.style.position="fixed",xr.style.clip="rect(0px, 0px, 0px, 0px)",xr.setAttribute("aria-live","polite"),document.body.appendChild(xr);
|
|
3012
2624
|
/**
|
|
3013
2625
|
* @license
|
|
3014
2626
|
* Copyright (c) 2022 - 2024 Vaadin Ltd.
|
|
3015
2627
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3016
2628
|
*/
|
|
3017
|
-
class
|
|
2629
|
+
class _r extends gr{constructor(t,e,i,s={}){super(t,e,i,{...s,useUniqueId:!0})}initCustomNode(t){this.__updateNodeId(t),this.__notifyChange(t)}teardownNode(t){const e=this.getSlotChild();e&&e!==this.defaultNode?this.__notifyChange(e):(this.restoreDefaultNode(),this.updateDefaultNode(this.node))}attachDefaultNode(){const t=super.attachDefaultNode();return t&&this.__updateNodeId(t),t}restoreDefaultNode(){}updateDefaultNode(t){this.__notifyChange(t)}observeNode(t){this.__nodeObserver&&this.__nodeObserver.disconnect(),this.__nodeObserver=new MutationObserver((t=>{t.forEach((t=>{const e=t.target,i=e===this.node;"attributes"===t.type?i&&this.__updateNodeId(e):(i||e.parentElement===this.node)&&this.__notifyChange(this.node)}))})),this.__nodeObserver.observe(t,{attributes:!0,attributeFilter:["id"],childList:!0,subtree:!0,characterData:!0})}__hasContent(t){return!!t&&(t.nodeType===Node.ELEMENT_NODE&&(customElements.get(t.localName)||t.children.length>0)||t.textContent&&""!==t.textContent.trim())}__notifyChange(t){this.dispatchEvent(new CustomEvent("slot-content-changed",{detail:{hasContent:this.__hasContent(t),node:t}}))}__updateNodeId(t){t.nodeType!==Node.ELEMENT_NODE||this.multiple&&this.nodes&&t!==this.nodes[0]||t.id||(t.id=this.defaultId)}}
|
|
3018
2630
|
/**
|
|
3019
2631
|
* @license
|
|
3020
2632
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
3021
2633
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3022
|
-
*/class
|
|
2634
|
+
*/class Ar extends _r{constructor(t){super(t,"error-message","div")}setErrorMessage(t){this.errorMessage=t,this.updateDefaultNode(this.node)}setInvalid(t){this.invalid=t,this.updateDefaultNode(this.node)}initAddedNode(t){t!==this.defaultNode&&this.initCustomNode(t)}initNode(t){this.updateDefaultNode(t)}initCustomNode(t){t.textContent&&!this.errorMessage&&(this.errorMessage=t.textContent.trim()),super.initCustomNode(t)}restoreDefaultNode(){this.attachDefaultNode()}updateDefaultNode(t){const{errorMessage:e,invalid:i}=this,s=Boolean(i&&e&&""!==e.trim());t&&(t.textContent=s?e:"",t.hidden=!s,s&&function(t,e={}){const i=e.mode||"polite",s=void 0===e.timeout?150:e.timeout;"alert"===i?(xr.removeAttribute("aria-live"),xr.removeAttribute("role"),kr=ao.debounce(kr,ds,(()=>{xr.setAttribute("role","alert")}))):(kr&&kr.cancel(),xr.removeAttribute("role"),xr.setAttribute("aria-live",i)),xr.textContent="",setTimeout((()=>{xr.textContent=t}),s)}(e,{mode:"assertive"})),super.updateDefaultNode(t)}}
|
|
3023
2635
|
/**
|
|
3024
2636
|
* @license
|
|
3025
2637
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
3026
2638
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3027
|
-
*/class
|
|
2639
|
+
*/class Sr extends _r{constructor(t){super(t,"helper",null)}setHelperText(t){this.helperText=t,this.getSlotChild()||this.restoreDefaultNode(),this.node===this.defaultNode&&this.updateDefaultNode(this.node)}restoreDefaultNode(){const{helperText:t}=this;if(t&&""!==t.trim()){this.tagName="div";const t=this.attachDefaultNode();this.observeNode(t)}}updateDefaultNode(t){t&&(t.textContent=this.helperText),super.updateDefaultNode(t)}initCustomNode(t){super.initCustomNode(t),this.observeNode(t)}}
|
|
3028
2640
|
/**
|
|
3029
2641
|
* @license
|
|
3030
2642
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
3031
2643
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3032
|
-
*/class
|
|
2644
|
+
*/class Cr extends _r{constructor(t){super(t,"label","label")}setLabel(t){this.label=t,this.getSlotChild()||this.restoreDefaultNode(),this.node===this.defaultNode&&this.updateDefaultNode(this.node)}restoreDefaultNode(){const{label:t}=this;if(t&&""!==t.trim()){const t=this.attachDefaultNode();this.observeNode(t)}}updateDefaultNode(t){t&&(t.textContent=this.label),super.updateDefaultNode(t)}initCustomNode(t){super.initCustomNode(t),this.observeNode(t)}}
|
|
3033
2645
|
/**
|
|
3034
2646
|
* @license
|
|
3035
2647
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
3036
2648
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3037
|
-
*/const
|
|
2649
|
+
*/const Tr=ue((t=>class extends(vo(t)){static get properties(){return{label:{type:String,observer:"_labelChanged"}}}constructor(){super(),this._labelController=new Cr(this),this._labelController.addEventListener("slot-content-changed",(t=>{this.toggleAttribute("has-label",t.detail.hasContent)}))}get _labelId(){const t=this._labelNode;return t&&t.id}get _labelNode(){return this._labelController.node}ready(){super.ready(),this.addController(this._labelController)}_labelChanged(t){this._labelController.setLabel(t)}})),zr=ue((t=>class extends t{static get properties(){return{invalid:{type:Boolean,reflectToAttribute:!0,notify:!0,value:!1},manualValidation:{type:Boolean,value:!1},required:{type:Boolean,reflectToAttribute:!0}}}validate(){const t=this.checkValidity();return this._setInvalid(!t),this.dispatchEvent(new CustomEvent("validated",{detail:{valid:t}})),t}checkValidity(){return!this.required||!!this.value}_setInvalid(t){this._shouldSetInvalid(t)&&(this.invalid=t)}_shouldSetInvalid(t){return!0}_requestValidation(){this.manualValidation||this.validate()}})),Nr=t=>class extends(zr(Tr(vo(t)))){static get properties(){return{ariaTarget:{type:Object,observer:"_ariaTargetChanged"},errorMessage:{type:String,observer:"_errorMessageChanged"},helperText:{type:String,observer:"_helperTextChanged"},accessibleName:{type:String,observer:"_accessibleNameChanged"},accessibleNameRef:{type:String,observer:"_accessibleNameRefChanged"}}}static get observers(){return["_invalidChanged(invalid)","_requiredChanged(required)"]}constructor(){super(),this._fieldAriaController=new wr(this),this._helperController=new Sr(this),this._errorController=new Ar(this),this._errorController.addEventListener("slot-content-changed",(t=>{this.toggleAttribute("has-error-message",t.detail.hasContent)})),this._labelController.addEventListener("slot-content-changed",(t=>{const{hasContent:e,node:i}=t.detail;this.__labelChanged(e,i)})),this._helperController.addEventListener("slot-content-changed",(t=>{const{hasContent:e,node:i}=t.detail;this.toggleAttribute("has-helper",e),this.__helperChanged(e,i)}))}get _errorNode(){return this._errorController.node}get _helperNode(){return this._helperController.node}ready(){super.ready(),this.addController(this._fieldAriaController),this.addController(this._helperController),this.addController(this._errorController)}__helperChanged(t,e){this._fieldAriaController.setHelperId(t?e.id:null)}_accessibleNameChanged(t){this._fieldAriaController.setAriaLabel(t)}_accessibleNameRefChanged(t){this._fieldAriaController.setLabelId(t,!0)}__labelChanged(t,e){this._fieldAriaController.setLabelId(t?e.id:null)}_errorMessageChanged(t){this._errorController.setErrorMessage(t)}_helperTextChanged(t){this._helperController.setHelperText(t)}_ariaTargetChanged(t){t&&this._fieldAriaController.setTarget(t)}_requiredChanged(t){this._fieldAriaController.setRequired(t)}_invalidChanged(t){this._errorController.setInvalid(t),setTimeout((()=>{if(t){const t=this._errorNode;this._fieldAriaController.setErrorId(t&&t.id)}else this._fieldAriaController.setErrorId(null)}))}}
|
|
3038
2650
|
/**
|
|
3039
2651
|
* @license
|
|
3040
2652
|
* Copyright (c) 2023 - 2024 Vaadin Ltd.
|
|
@@ -3044,17 +2656,17 @@ class wn extends fn{constructor(t,e,i,o={}){super(t,e,i,{...o,useUniqueId:!0})}i
|
|
|
3044
2656
|
* @license
|
|
3045
2657
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
3046
2658
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3047
|
-
*/class
|
|
2659
|
+
*/class Er extends gr{constructor(t){super(t,"value","vaadin-select-value-button",{initializer:(t,e)=>{e._setFocusElement(t),e.ariaTarget=t,e.stateTarget=t,t.setAttribute("aria-haspopup","listbox")}})}}
|
|
3048
2660
|
/**
|
|
3049
2661
|
* @license
|
|
3050
2662
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
3051
2663
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3052
|
-
*/const
|
|
2664
|
+
*/const Or=t=>class extends(fr(ur(pr(Js(Nr(t)))))){static get properties(){return{items:{type:Array,observer:"__itemsChanged"},opened:{type:Boolean,value:!1,notify:!0,reflectToAttribute:!0,sync:!0},renderer:{type:Object},value:{type:String,value:"",notify:!0,observer:"_valueChanged"},name:{type:String},placeholder:{type:String},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},noVerticalOverlap:{type:Boolean,value:!1},_phone:Boolean,_phoneMediaQuery:{value:"(max-width: 450px), (max-height: 450px)"},_inputContainer:Object,_items:Object}}static get delegateAttrs(){return[...super.delegateAttrs,"invalid"]}static get observers(){return["_updateAriaExpanded(opened, focusElement)","_updateSelectedItem(value, _items, placeholder)","_openedChanged(opened, _overlayElement, _inputContainer)"]}constructor(){super(),this._itemId=`value-${this.localName}-${br()}`,this._srLabelController=new Cr(this),this._srLabelController.slotName="sr-label"}disconnectedCallback(){super.disconnectedCallback(),this.opened=!1}ready(){super.ready(),this._inputContainer=this.shadowRoot.querySelector('[part~="input-field"]'),this._valueButtonController=new Er(this),this.addController(this._valueButtonController),this.addController(this._srLabelController),this.addController(new mr(this._phoneMediaQuery,(t=>{this._phone=t}))),this._tooltipController=new yr(this),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.focusElement),this.addController(this._tooltipController)}requestContentUpdate(){this._overlayElement&&(this._overlayElement.requestContentUpdate(),this._menuElement&&this._menuElement.items&&this._updateSelectedItem(this.value,this._menuElement.items))}_requiredChanged(t){super._requiredChanged(t),!1===t&&this._requestValidation()}__itemsChanged(t,e){(t||e)&&this.requestContentUpdate()}_assignMenuElement(t){t&&t!==this.__lastMenuElement&&(this._menuElement=t,this.__initMenuItems(t),t.addEventListener("items-changed",(()=>{this.__initMenuItems(t)})),t.addEventListener("selected-changed",(()=>this.__updateValueButton())),t.addEventListener("keydown",(t=>this._onKeyDownInside(t)),!0),t.addEventListener("click",(t=>{const e=t.composedPath().find((t=>t._hasVaadinItemMixin));this.__dispatchChangePending=Boolean(e&&void 0!==e.value&&e.value!==this.value),this.opened=!1}),!0),this.__lastMenuElement=t)}__initMenuItems(t){t.items&&(this._items=t.items)}_valueChanged(t,e){this.toggleAttribute("has-value",Boolean(t)),void 0===e||this.__dispatchChangePending||this._requestValidation()}_onClick(t){this.disabled||(t.preventDefault(),this.opened=!this.readonly)}_onToggleMouseDown(t){t.preventDefault()}_onKeyDown(t){if(t.target===this.focusElement&&!this.readonly&&!this.disabled&&!this.opened)if(/^(Enter|SpaceBar|\s|ArrowDown|Down|ArrowUp|Up)$/u.test(t.key))t.preventDefault(),this.opened=!0;else if(/[\p{L}\p{Nd}]/u.test(t.key)&&1===t.key.length){const e=this._menuElement.selected,i=this._menuElement._searchKey(void 0!==e?e:-1,t.key);i>=0&&(this.__dispatchChangePending=!0,this._updateAriaLive(!0),this._menuElement.selected=i)}}_onKeyDownInside(t){/^(Tab)$/u.test(t.key)&&(this.opened=!1)}_openedChanged(t,e,i){if(e&&i){if(t){if(this.disabled||this.readonly)return void(this.opened=!1);this._updateAriaLive(!1),e.style.setProperty("--vaadin-select-text-field-width",`${i.offsetWidth}px`);const t=this.hasAttribute("focus-ring");this._openedWithFocusRing=t,t&&this.removeAttribute("focus-ring")}else this.__oldOpened&&(this._openedWithFocusRing&&this.setAttribute("focus-ring",""),this.__dispatchChangePending||this._keyboardActive||this._requestValidation());this.__oldOpened=t}}_updateAriaExpanded(t,e){e&&e.setAttribute("aria-expanded",t?"true":"false")}_updateAriaLive(t){this.focusElement&&(t?this.focusElement.setAttribute("aria-live","polite"):this.focusElement.removeAttribute("aria-live"))}__attachSelectedItem(t){let e;const i=t.getAttribute("label");e=i?this.__createItemElement({label:i}):t.cloneNode(!0),e._sourceItem=t,this.__appendValueItemElement(e,this.focusElement),e.selected=!0}__createItemElement(t){const e=document.createElement(t.component||"vaadin-select-item");return t.label&&(e.textContent=t.label),t.value&&(e.value=t.value),t.disabled&&(e.disabled=t.disabled),t.className&&(e.className=t.className),e}__appendValueItemElement(t,e){e.appendChild(t),t.performUpdate&&t.performUpdate(),t.removeAttribute("tabindex"),t.removeAttribute("aria-selected"),t.removeAttribute("role"),t.removeAttribute("focused"),t.removeAttribute("focus-ring"),t.removeAttribute("active"),t.setAttribute("id",this._itemId)}_accessibleNameChanged(t){this._srLabelController.setLabel(t),this._setCustomAriaLabelledBy(t?this._srLabelController.defaultId:null)}_accessibleNameRefChanged(t){this._setCustomAriaLabelledBy(t)}_setCustomAriaLabelledBy(t){const e=this._getLabelIdWithItemId(t);this._fieldAriaController.setLabelId(e,!0)}_getLabelIdWithItemId(t){return t?`${t} ${this._items&&this._items[this._menuElement.selected]||this.placeholder?this._itemId:""}`.trim():null}__updateValueButton(){const t=this.focusElement;if(!t)return;t.innerHTML="";const e=this._items[this._menuElement.selected];if(t.removeAttribute("placeholder"),this._hasContent(e))this.__attachSelectedItem(e);else if(this.placeholder){const e=this.__createItemElement({label:this.placeholder});this.__appendValueItemElement(e,t),t.setAttribute("placeholder","")}!this._valueChanging&&e&&(this._selectedChanging=!0,this.value=e.value||"",this.__dispatchChangePending&&this.__dispatchChange(),delete this._selectedChanging),dr(t,"aria-labelledby",e||this.placeholder?{newId:this._itemId}:{oldId:this._itemId}),(this.accessibleName||this.accessibleNameRef)&&this._setCustomAriaLabelledBy(this.accessibleNameRef||this._srLabelController.defaultId)}_hasContent(t){return!!t&&(Boolean(t.hasAttribute("label")?t.getAttribute("label"):t.textContent.trim())||t.childElementCount>0)}_updateSelectedItem(t,e){if(e){const i=null==t?t:t.toString();this._menuElement.selected=e.reduce(((t,e,s)=>void 0===t&&e.value===i?s:t),void 0),this._selectedChanging||(this._valueChanging=!0,this.__updateValueButton(),delete this._valueChanging)}}_shouldRemoveFocus(){return!this.opened}_setFocused(t){super._setFocused(t),!t&&document.hasFocus()&&this._requestValidation()}checkValidity(){return!this.required||this.readonly||!!this.value}__defaultRenderer(t,e){if(!this.items||0===this.items.length)return void(t.textContent="");let i=t.firstElementChild;i||(i=document.createElement("vaadin-select-list-box"),t.appendChild(i)),i.textContent="",this.items.forEach((t=>{i.appendChild(this.__createItemElement(t))}))}async __dispatchChange(){this.updateComplete&&await this.updateComplete,this._requestValidation(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0})),this.__dispatchChangePending=!1}}
|
|
3053
2665
|
/**
|
|
3054
2666
|
* @license
|
|
3055
2667
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
3056
2668
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3057
|
-
*/;zt("vaadin-select",[
|
|
2669
|
+
*/;zt("vaadin-select",[rr,nr,Ko],{moduleId:"vaadin-select-styles"});class Ir extends(Or(or(Pt(Qi)))){static get is(){return"vaadin-select"}static get template(){return Ki`
|
|
3058
2670
|
<style>
|
|
3059
2671
|
:host {
|
|
3060
2672
|
position: relative;
|
|
@@ -3112,4 +2724,4 @@ class wn extends fn{constructor(t,e,i,o={}){super(t,e,i,{...o,useUniqueId:!0})}i
|
|
|
3112
2724
|
* @license
|
|
3113
2725
|
* Copyright (c) 2021 - 2024 Vaadin Ltd..
|
|
3114
2726
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3115
|
-
*/super.ready(),t=this,window.Vaadin&&window.Vaadin.templateRendererCallback?window.Vaadin.templateRendererCallback(t):t.querySelector("template")&&console.warn(`WARNING: <template> inside <${t.localName}> is no longer supported. Import @vaadin/polymer-legacy-adapter/template-renderer.js to enable compatibility.`)}_rendererChanged(t,e){e&&(e.renderer=t||this.__defaultRenderer,this.requestContentUpdate())}_onOverlayOpen(){this._menuElement&&this._menuElement.focus()}}d(Nn);const En=class{constructor(i){t(this,i),this.ticketCompleted=e(this,"ticketCompleted",7),this.autoSelection=e(this,"autoSelection",7),this.resetSelection=e(this,"resetSelection",7),this.stakeChange=e(this,"stakeChange",7),this.multiplierChange=e(this,"multiplierChange",7),this.drawMultiplierChange=e(this,"drawMultiplierChange",7),this.lineMultiplierChange=e(this,"lineMultiplierChange",7),this.betTypeChange=e(this,"betTypeChange",7),this.numberOfGrids=1,this.multipleDraws=!0,this.resetButton=!1,this.autoPick=!1,this.language="en",this.clientStyling="",this.clientStylingUrlContent="",this.isLoading=!0,this.hasErrors=!1,this.ticketDone=[],this.isCustomSelect=!1,this.amountInfo={},this.limitStylingAppends=!1,this.stakeMultiplier="1",this.lineMultiplier=0,this.isCustomSelectStake=!1,this.isCustomSelectDraw=!1,this.isCustomSelectLine=!1,this.drawMultiplier=1,this.secondarySelectionAllowed=!1,this.partialQuickpickAvailable=!1,this.boardsAllowed=[],this.tabIndex=0,this.groupType=[],this.playType=[],this.selectedPlayTypeId="",this.maximumAllowed=6,this.numberRange=[],this.secondaryNumberRange=[],this.secondaryMaximumAllowed=1,this.minimumAllowed=6,this.secondaryMinimumAllowed=1,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)}}handleLineMultiplierChange(t){this.grids=Array.from({length:t},((t,e)=>e+1)),this.ticketDone=Array.from({length:t},(()=>!1)),this.grids.forEach(((t,e)=>{this.resetSelection.emit({ticketId:this.ticketId,index:e})}))}handleTabIndexChange(t){this.grids.forEach(((t,e)=>{this.toggleResetSelection(e)})),this.setDrawMultiplier(1),this.setStakeMultiplier("1"),this.amountInfo=this.gameData.rules.stakes[0],this.setWagerPerDraw(this.amountInfo),this.playType=this.groupType[t].betType.map((t=>Object.assign(Object.assign({},t),{label:t.name||t.id,value:t.id}))),this.boardsAllowed=this.playType[0].boardsAllowed,this.setLineMultiplier(this.boardsAllowed[0]),this.selectedPlayTypeId=this.playType[0].value,this.numberRange=this.playType[0].selectionRules.map((t=>t.selectionCount)),this.maximumAllowed=Math.max(...this.numberRange),this.minimumAllowed=Math.min(...this.numberRange),this.secondaryNumberRange=this.playType[0].secondarySelectionRules.map((t=>t.selectionCount)),this.secondaryMaximumAllowed=Math.max(...this.secondaryNumberRange),this.secondaryMinimumAllowed=Math.min(...this.secondaryNumberRange),this.betTypeChange.emit({ticketId:this.ticketId,betType:this.playType[0]})}checkForClickOutside(t){this.selectRef&&!this.selectRef.contains(t.composedPath()[0])&&(this.isCustomSelect=!1),this.selectStakeRef&&!this.selectStakeRef.contains(t.composedPath()[0])&&(this.isCustomSelectStake=!1),this.selectDrawRef&&!this.selectDrawRef.contains(t.composedPath()[0])&&(this.isCustomSelectDraw=!1),this.selectLineRef&&!this.selectLineRef.contains(t.composedPath()[0])&&(this.isCustomSelectLine=!1)}connectedCallback(){let t=new URL(`${this.endpoint}/games/${this.gameId}`);fetch(t.href).then((t=>{if(t.ok)return t.json();this.hasErrors=!0})).then((t=>{var e;this.isLoading=!1,this.gameData=t,this.amountInfo=this.gameData.rules.stakes[0],this.secondarySelectionAllowed="INPUT"===this.gameData.rules.secondarySelectionAllowed;const i=this.gameData.rules.betTypes.reduce(((t,e)=>(e.group?(t.groups[e.group]||(t.groups[e.group]=[]),t.groups[e.group].push(e)):t.noGroup.push({groupName:e.name||e.id,betType:[Object.assign({},e)]}),t)),{groups:{},noGroup:[]}),o=Object.entries(i.groups).map((([t,e])=>({groupName:t,betType:e})));this.groupType=[...i.noGroup,...o],this.playType=this.groupType[0].betType.map((t=>Object.assign(Object.assign({},t),{label:t.name||t.id,value:t.id}))),this.partialQuickpickAvailable=this.gameData.rules.partialQuickpickAvailable,this.boardsAllowed=null===(e=this.gameData.rules.betTypes)||void 0===e?void 0:e.filter((t=>"Prima"===t.id))[0].boardsAllowed,this.lineMultiplier=this.boardsAllowed[0];let s=this.gameData.rules.betTypes[0].secondarySelectionRules;this.numberRange=this.gameData.rules.betTypes[0].selectionRules.map((t=>t.selectionCount)),this.maximumAllowed=Math.max(...this.numberRange),this.minimumAllowed=Math.min(...this.numberRange),this.secondaryNumberRange=s.map((t=>t.selectionCount)),this.secondaryMaximumAllowed=Math.max(...this.secondaryNumberRange),this.secondaryMinimumAllowed=Math.min(...this.secondaryNumberRange)})).catch((t=>{this.isLoading=!1,this.hasErrors=!0,console.error("Error!",t)}))}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}gridFilledHandler(t){this.ticket=Object.assign(Object.assign({},t.detail),{drawCount:this.drawMultiplier,multiplierNum:Number(this.stakeMultiplier),multiplier:this.gameData.rules.stakeMultiplierAvailable}),this.ticketDone=[...this.ticketDone.slice(0,t.detail.index),!0,...this.ticketDone.slice(t.detail.index+1)],this.ticketCompleted.emit(this.ticket)}handleGridClearAllEvent(t){let e=t.detail;this.ticketDone=[...this.ticketDone.slice(0,e),!1,...this.ticketDone.slice(e+1)]}toggleAutoSelection(t){this.ticketDone=[...this.ticketDone.slice(0,t),!0,...this.ticketDone.slice(t+1)],this.autoSelection.emit({ticketId:this.ticketId,index:t})}toggleResetSelection(t){this.ticketDone=[...this.ticketDone.slice(0,t),!1,...this.ticketDone.slice(t+1)],this.resetSelection.emit({ticketId:this.ticketId,index:t})}changeStake(t,e){this.stakeChange.emit({ticketId:t,stake:e})}toggleClass(){this.isCustomSelect=!this.isCustomSelect}toggleSelection(){this.isCustomSelectStake=!this.isCustomSelectStake}toggleLineSelection(){this.isCustomSelectLine=!this.isCustomSelectLine}toggleDrawSelection(){this.isCustomSelectDraw=!this.isCustomSelectDraw}setWagerPerDraw(t){this.amountInfo={value:t.value,currency:t.currency},this.isCustomSelect=!1,this.changeStake(this.ticketId,t.value)}setStakeMultiplier(t){this.stakeMultiplier=t,this.isCustomSelectStake=!1,this.multiplierChange.emit({ticketId:this.ticketId,multiplierNum:Number(t),multiplier:this.gameData.rules.stakeMultiplierAvailable})}setLineMultiplier(t){this.lineMultiplier=t,this.isCustomSelectLine=!1,this.lineMultiplierChange.emit({ticketId:this.ticketId,lineNum:t})}setDrawMultiplier(t){this.drawMultiplier=t,this.isCustomSelectDraw=!1,this.drawMultiplierChange.emit({ticketId:this.ticketId,drawCount:t})}handlePlayTypeChange(t){this.selectedPlayTypeId=t;let e=this.playType.filter((e=>e.id===t))[0];this.boardsAllowed=e.boardsAllowed,this.numberRange=e.selectionRules.map((t=>t.selectionCount)),this.maximumAllowed=Math.max(...this.numberRange),this.minimumAllowed=Math.min(...this.numberRange),this.secondaryNumberRange=e.secondarySelectionRules.map((t=>t.selectionCount)),this.secondaryMaximumAllowed=Math.max(...this.secondaryNumberRange),this.secondaryMinimumAllowed=Math.min(...this.secondaryNumberRange);for(let t=0;t<this.lineMultiplier;t++)this.toggleResetSelection(t);this.betTypeChange.emit({ticketId:this.ticketId,betType:e})}render(){if(this.isLoading)return i("div",null,i("p",null,h("loading",this.language)));if(this.hasErrors)return i("div",null,i("p",null,h("error",this.language)));{const{rules:t}=this.gameData;return i("div",{class:"TicketContainer",ref:t=>this.stylingContainer=t},i("p",{class:"TicketTitle"},this.gameData.name),i("div",{class:"TicketTabs"},this.groupType.map(((t,e)=>i("div",{class:"TabButton"+(this.tabIndex==e?" Active":""),onClick:()=>this.tabIndex=e},t.groupName)))),this.playType.length>1&&i("div",null,i("label",{class:"Label"},h("playType",this.language),": "),i("vaadin-select",{style:{width:"160px"},items:this.playType,value:this.selectedPlayTypeId,"on-value-changed":t=>this.handlePlayTypeChange(t.detail.value)})),this.boardsAllowed.length>1&&i("div",null,i("label",{class:"Label"},h("lines",this.language),": "),i("div",{class:"WagerInput"},i("div",{ref:t=>this.selectLineRef=t,class:this.isCustomSelectLine?"SelectWrapper SelectActive":"SelectWrapper"},i("div",{class:"SelectButton",onClick:()=>this.toggleLineSelection()},i("span",null,this.lineMultiplier),i("span",{class:"SelectExpand"},"▼")),i("div",{class:"SelectContent"},i("ul",{class:"SelectOptions"},this.boardsAllowed.map((t=>i("li",{class:this.lineMultiplier==t?"SelectedValue":"",value:t,onClick:()=>this.setLineMultiplier(t)},t)))))))),this.grids.map(((e,o)=>i("div",null,i("div",{class:"TicketGridHeader"},i("div",null,h("lineName",this.language),o+1),this.resetButton&&this.ticketDone[o]&&i("div",{class:"ButtonContainer"},i("a",{class:"ResetButton",onClick:()=>this.toggleResetSelection(o)},h("resetButton",this.language))),this.autoPick&&!this.ticketDone[o]&&i("div",{class:"ButtonContainer"},i("a",{class:"AutoButton",onClick:()=>this.toggleAutoSelection(o)},h("autoButton",this.language)))),i("div",{class:"TicketGridBullets"},i("p",{class:"TicketGridTitle"},t.boards[0].selectionName),i("lottery-grid",{"grid-index":o,"maximum-allowed":this.maximumAllowed,"minimum-allowed":this.minimumAllowed,"number-range":JSON.stringify(this.numberRange),"high-number":t.boards[0].highNumber,"low-number":t.boards[0].lowNumber,"total-numbers":t.boards[0].highNumber-t.boards[0].lowNumber+1,selectable:!0,"reset-button":!0,"auto-pick":!0,"game-id":this.gameId,"ticket-id":this.ticketId,"partial-quickpick-available":this.partialQuickpickAvailable,language:this.language,"selection-type":"mainSelection","client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent})),this.secondarySelectionAllowed&&i("div",{class:"SecondarySelectionWrapper"},i("div",{class:"TicketGridBullets"},i("p",{class:"TicketGridTitle"},t.boards[0].secondarySelectionName),i("lottery-grid",{"grid-index":o,"maximum-allowed":this.secondaryMaximumAllowed,"minimum-allowed":this.secondaryMinimumAllowed,"number-range":JSON.stringify(this.secondaryNumberRange),"high-number":t.boards[0].secondaryHighNumber,"low-number":t.boards[0].secondaryLowNumber,"total-numbers":t.boards[0].secondaryHighNumber-t.boards[0].secondaryLowNumber+1,selectable:!0,"reset-button":!0,"auto-pick":!0,"game-id":this.gameId,"ticket-id":this.ticketId,"partial-quickpick-available":this.partialQuickpickAvailable,language:this.language,"selection-type":"secondarySelection","client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent})))))),t.stakeMultiplierAvailable&&i("div",null,i("label",{class:"Label"},h("multiplier",this.language),": "),i("div",{class:"WagerInput"},t.stakeMultipliers.length>1?i("div",{ref:t=>this.selectStakeRef=t,class:this.isCustomSelectStake?"SelectWrapper SelectActive":"SelectWrapper"},i("div",{class:"SelectButton",onClick:()=>this.toggleSelection()},i("span",null,this.stakeMultiplier),i("span",{class:"SelectExpand"},"▼")),i("div",{class:"SelectContent"},i("ul",{class:"SelectOptions"},t.stakeMultipliers.map((t=>i("li",{class:this.stakeMultiplier==t?"SelectedValue":"",value:t,onClick:()=>this.setStakeMultiplier(t)},t)))))):i("div",null,i("input",{min:"1",value:t.stakeMultipliers[0]||1,type:"number",disabled:!0})))),t.drawMultiplierAvailable&&i("div",null,i("label",{class:"Label"},h("numberOfDraws",this.language),": "),i("div",{class:"WagerInput"},t.durations.length>1?i("div",{ref:t=>this.selectDrawRef=t,class:this.isCustomSelectDraw?"SelectWrapper SelectActive":"SelectWrapper"},i("div",{class:"SelectButton",onClick:()=>this.toggleDrawSelection()},i("span",null,this.drawMultiplier),i("span",{class:"SelectExpand"},"▼")),i("div",{class:"SelectContent"},i("ul",{class:"SelectOptions"},t.durations.map((t=>i("li",{class:this.drawMultiplier==t?"SelectedValue":"",value:t,onClick:()=>this.setDrawMultiplier(t)},t)))))):i("div",null,i("input",{min:"1",value:t.durations[0]||1,type:"number",disabled:!0})))),i("div",null,i("label",{class:"Label"},h("wagerPerDraw",this.language),": "),i("div",{class:"WagerInput"},t.stakes.length>1?i("div",{ref:t=>this.selectRef=t,class:this.isCustomSelect?"SelectWrapper SelectActive":"SelectWrapper"},i("div",{class:"SelectButton",onClick:()=>this.toggleClass()},i("span",null,this.amountInfo.value," ",this.amountInfo.currency),i("span",{class:"SelectExpand"},"▼")),i("div",{class:"SelectContent"},i("ul",{class:"SelectOptions"},t.stakes.map((t=>i("li",{class:this.amountInfo.value==t.value?"SelectedValue":"",value:t.value,onClick:()=>this.setWagerPerDraw(t)},t.value," ",t.currency)))))):i("div",null,i("input",{min:"1",value:t.stakes[0].value,type:"number",disabled:!0}),i("span",{class:"WagerInputTitle"},t.stakes[0].currency)))))}}static get watchers(){return{lineMultiplier:["handleLineMultiplierChange"],tabIndex:["handleTabIndexChange"]}}};En.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.TicketTitle{font-size:16px;font-weight:bold}.TicketTabs{display:flex;overflow:auto}.TicketTabs .TabButton{color:var(--emw--color-typography, #009993);margin:0 40px 10px 0;cursor:pointer}.TicketTabs .Active{border-bottom:1px solid var(--emw--color-typography, #009993)}.ButtonContainer{display:flex;justify-content:flex-end}.SecondarySelectionWrapper{margin-top:20px}.Label{margin-right:5px;position:relative;top:2px;font-size:14px;font-weight:lighter;color:var(--emw--button-text-color, #000)}input[type=number]{-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none}.NumberInput,.WagerInput{margin-top:10px;display:inline-flex;align-items:center}.NumberInput,.NumberInput *{box-sizing:border-box}.NumberInput button{cursor:pointer;outline:none;-webkit-appearance:none;border:none;align-items:center;justify-content:center;height:20px;position:relative}.NumberInput button:after{display:inline-block;position:absolute;transform:translate(-50%, -50%) rotate(180deg);align-items:center;text-align:center}.NumberInput button.Plus:after{transform:translate(-50%, -50%) rotate(0deg);width:30px;display:inline-flex;align-items:center;text-align:center}.NumberInput input[type=number],.WagerInput input[type=number]{max-width:50px;display:inline-flex;align-items:center;padding:4px 10px;text-align:center}.NumberInput input[type=number] .WagerInputTitle,.WagerInput input[type=number] .WagerInputTitle{font-size:14px;color:var(--emw--button-text-color, #000);padding:10px;margin-left:8px}.AutoButton{cursor:pointer;display:inline-block;border-radius:var(--emw--button-border-radius, 4px);padding:8px 20px;width:max-content;margin:5px 0;border:1px solid var(--emw--button-border-color, #00958f);background:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));color:var(--emw--button-text-color, #000);font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0}.AutoButton:active{background:var(--emw--button-background-color, #00958f);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255))}.ResetButton{cursor:pointer;display:inline-block;border-radius:var(--emw--button-border-radius, 4px);padding:8px 20px;width:max-content;margin:5px 0;color:var(--emw--button-text-color, #000);font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0;background:var(--emw--color-error, #FF3D00);border:1px solid var(--emw--color-error, #FF3D00);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255))}.ResetButton:hover{background:var(--emw--color-secondary, #FF6536);border:1px solid var(--emw--color-error, #FF3D00)}.TicketGridHeader{display:flex;justify-content:space-between;align-items:center;font-weight:bold;margin-top:10px}.TicketGridBullets{background:var(--emw--color-gray-50, #F1F1F1);border-radius:4px;padding:20px;margin-top:5px;margin-bottom:10px}.TicketGridBullets .TicketGridTitle{margin-top:0px}.Minus{border-radius:4px;width:30px;height:24px !important;margin-right:10px;color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));background:var(--emw--color-background, #009993)}.Plus{border-radius:4px;width:30px;height:24px !important;margin-left:10px;color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));background:var(--emw--color-background, #009993)}.SelectWrapper{width:auto;padding:5px;margin:0 auto;border:1px solid var(--emw--color-gray-transparency-80, #ccc);border-radius:5px;position:relative}.SelectButton,.SelectOptions li{display:flex;align-items:center;cursor:pointer}.SelectButton{display:flex;padding:0 5px;border-radius:7px;align-items:center;justify-content:space-between;font-size:14px}.SelectButton span:first-child{padding-right:10px}.SelectExpand{transition:transform 0.3s linear;font-size:12px}.SelectActive .SelectExpand{transform:rotate(180deg)}.SelectContent{display:none;padding:5px;border-radius:7px}.SelectWrapper.SelectActive .SelectContent{width:100%;display:block;position:absolute;left:0;top:32px;padding:0;border:1px solid var(--emw--color-gray-transparency-80, #ccc);overflow:hidden;background:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));z-index:20}.SelectContent .SelectOptions{max-height:100px;margin:0;overflow-y:auto;padding:0}.SelectContent .SelectOptions .SelectedValue{background-color:var(--emw--color-background, #009993);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255))}.SelectOptions::-webkit-scrollbar{width:7px}.SelectOptions::-webkit-scrollbar-track{background:var(--emw--color-gray-50, #F1F1F1);border-radius:25px}.SelectOptions::-webkit-scrollbar-thumb{background:var(--emw--color-gray-transparency-80, #ccc);border-radius:25px}.SelectOptions li{height:20px;padding:0 13px;font-size:14px}.SelectOptions li:hover{background:var(--emw--color-gray-150, #f2f2f2)}';const On=["ro","en","fr","ar","hr"],In={en:{ticket:"Ticket"},ro:{ticket:"Bilet"},fr:{ticket:"Billet"},ar:{ticket:"تذكرة"},hr:{ticket:"Listić"}},Bn=(t,e)=>{const i=e;return In[void 0!==i&&On.includes(i)?i:"en"][t]},Pn=class{constructor(i){t(this,i),this.deleteTicketEvent=e(this,"deleteTicket",7),this.endpoint="",this.ticketId=1,this.postMessage=!1,this.eventName="deleteTicketAction",this.collapsed=!0,this.numberOfGrids=1,this.last=!1,this.language="en",this.autoPick=!1,this.resetButton=!1,this.totalControllers=1,this.clientStyling="",this.clientStylingUrlContent="",this.limitStylingAppends=!1,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)}}helperAccordionActionHandler(){this.postMessage&&window.postMessage({type:this.eventName},window.location.href),this.deleteTicketEvent.emit({ticketId:this.ticketId})}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}render(){return i("div",{key:"4d590432063c3eb6ebc21d0c529d861d60f0af3c",class:"LotteryTicketControllerContainer",ref:t=>this.stylingContainer=t},i("helper-accordion",{key:"afdc0f2938b173a41966fa93d2d0d92551058dc5","header-title":`${Bn("ticket",this.language)} ${this.ticketId}`,"header-subtitle":this.ticketDescription,footer:!0,"delete-tab":1!==this.totalControllers,collapsed:!this.last||this.collapsed,language:this.language,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent},i("div",{key:"9f01d3ffcb6fa2342394de10efc666cbc5c7f042",slot:"accordionContent"},i("lottery-ticket",{key:"bdf5ea12c603665b6d9f9133de9d5206344677f1",endpoint:this.endpoint,"game-id":this.gameId,"ticket-id":this.ticketId,"number-of-grids":this.numberOfGrids,language:this.language,"reset-button":this.resetButton,"auto-pick":this.autoPick,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent}))))}};Pn.style=':host{font-family:"Roboto", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";font-size:0.8rem}*,*::before,*::after{margin:0;padding:0;list-style:none;outline:none;box-sizing:border-box}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}';export{r as helper_accordion,n as lottery_bullet,a as lottery_grid,En as lottery_ticket,Pn as lottery_ticket_controller}
|
|
2727
|
+
*/super.ready(),t=this,window.Vaadin&&window.Vaadin.templateRendererCallback?window.Vaadin.templateRendererCallback(t):t.querySelector("template")&&console.warn(`WARNING: <template> inside <${t.localName}> is no longer supported. Import @vaadin/polymer-legacy-adapter/template-renderer.js to enable compatibility.`)}_rendererChanged(t,e){e&&(e.renderer=t||this.__defaultRenderer,this.requestContentUpdate())}_onOverlayOpen(){this._menuElement&&this._menuElement.focus()}}u(Ir);const Pr=class{constructor(i){t(this,i),this.ticketCompleted=e(this,"ticketCompleted",7),this.autoSelection=e(this,"autoSelection",7),this.resetSelection=e(this,"resetSelection",7),this.stakeChange=e(this,"stakeChange",7),this.multiplierChange=e(this,"multiplierChange",7),this.drawMultiplierChange=e(this,"drawMultiplierChange",7),this.lineMultiplierChange=e(this,"lineMultiplierChange",7),this.betTypeChange=e(this,"betTypeChange",7),this.numberOfGrids=1,this.multipleDraws=!0,this.resetButton=!1,this.autoPick=!1,this.language="en",this.clientStyling="",this.clientStylingUrlContent="",this.isLoading=!0,this.hasErrors=!1,this.ticketDone=[],this.isCustomSelect=!1,this.amountInfo={},this.limitStylingAppends=!1,this.stakeMultiplier="1",this.lineMultiplier=0,this.isCustomSelectStake=!1,this.isCustomSelectDraw=!1,this.isCustomSelectLine=!1,this.drawMultiplier=1,this.secondarySelectionAllowed=!1,this.partialQuickpickAvailable=!1,this.boardsAllowed=[],this.tabIndex=0,this.groupType=[],this.playType=[],this.selectedPlayTypeId="",this.maximumAllowed=6,this.numberRange=[],this.secondaryNumberRange=[],this.secondaryMaximumAllowed=1,this.minimumAllowed=6,this.secondaryMinimumAllowed=1,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)}}handleLineMultiplierChange(t){this.grids=Array.from({length:t},((t,e)=>e+1)),this.ticketDone=Array.from({length:t},(()=>!1)),this.grids.forEach(((t,e)=>{this.resetSelection.emit({ticketId:this.ticketId,index:e})}))}handleTabIndexChange(t){this.grids.forEach(((t,e)=>{this.toggleResetSelection(e)})),this.setDrawMultiplier(1),this.setStakeMultiplier("1"),this.amountInfo=this.gameData.rules.stakes[0],this.setWagerPerDraw(this.amountInfo),this.playType=this.groupType[t].betType.map((t=>Object.assign(Object.assign({},t),{label:t.name||t.id,value:t.id}))),this.boardsAllowed=this.playType[0].boardsAllowed,this.setLineMultiplier(this.boardsAllowed[0]),this.selectedPlayTypeId=this.playType[0].value,this.numberRange=this.playType[0].selectionRules.map((t=>t.selectionCount)),this.maximumAllowed=Math.max(...this.numberRange),this.minimumAllowed=Math.min(...this.numberRange),this.secondaryNumberRange=this.playType[0].secondarySelectionRules.map((t=>t.selectionCount)),this.secondaryMaximumAllowed=Math.max(...this.secondaryNumberRange),this.secondaryMinimumAllowed=Math.min(...this.secondaryNumberRange),this.betTypeChange.emit({ticketId:this.ticketId,betType:this.playType[0]})}checkForClickOutside(t){this.selectRef&&!this.selectRef.contains(t.composedPath()[0])&&(this.isCustomSelect=!1),this.selectStakeRef&&!this.selectStakeRef.contains(t.composedPath()[0])&&(this.isCustomSelectStake=!1),this.selectDrawRef&&!this.selectDrawRef.contains(t.composedPath()[0])&&(this.isCustomSelectDraw=!1),this.selectLineRef&&!this.selectLineRef.contains(t.composedPath()[0])&&(this.isCustomSelectLine=!1)}connectedCallback(){let t=new URL(`${this.endpoint}/games/${this.gameId}`);fetch(t.href).then((t=>{if(t.ok)return t.json();this.hasErrors=!0})).then((t=>{var e;this.isLoading=!1,this.gameData=t,this.amountInfo=this.gameData.rules.stakes[0],this.secondarySelectionAllowed="INPUT"===this.gameData.rules.secondarySelectionAllowed;const i=this.gameData.rules.betTypes.reduce(((t,e)=>(e.group?(t.groups[e.group]||(t.groups[e.group]=[]),t.groups[e.group].push(e)):t.noGroup.push({groupName:e.name||e.id,betType:[Object.assign({},e)]}),t)),{groups:{},noGroup:[]}),s=Object.entries(i.groups).map((([t,e])=>({groupName:t,betType:e})));this.groupType=[...i.noGroup,...s],this.playType=this.groupType[0].betType.map((t=>Object.assign(Object.assign({},t),{label:t.name||t.id,value:t.id}))),this.partialQuickpickAvailable=this.gameData.rules.partialQuickpickAvailable,this.boardsAllowed=null===(e=this.gameData.rules.betTypes)||void 0===e?void 0:e.filter((t=>"Prima"===t.id))[0].boardsAllowed,this.lineMultiplier=this.boardsAllowed[0];let o=this.gameData.rules.betTypes[0].secondarySelectionRules;this.numberRange=this.gameData.rules.betTypes[0].selectionRules.map((t=>t.selectionCount)),this.maximumAllowed=Math.max(...this.numberRange),this.minimumAllowed=Math.min(...this.numberRange),this.secondaryNumberRange=o.map((t=>t.selectionCount)),this.secondaryMaximumAllowed=Math.max(...this.secondaryNumberRange),this.secondaryMinimumAllowed=Math.min(...this.secondaryNumberRange)})).catch((t=>{this.isLoading=!1,this.hasErrors=!0,console.error("Error!",t)}))}componentWillLoad(){var t;this.translationUrl&&(t=JSON.parse(this.translationUrl),Object.keys(t).forEach((e=>{for(let i in t[e])h[e][i]=t[e][i]})))}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}gridFilledHandler(t){this.ticket=Object.assign(Object.assign({},t.detail),{drawCount:this.drawMultiplier,multiplierNum:Number(this.stakeMultiplier),multiplier:this.gameData.rules.stakeMultiplierAvailable}),this.ticketDone=[...this.ticketDone.slice(0,t.detail.index),!0,...this.ticketDone.slice(t.detail.index+1)],this.ticketCompleted.emit(this.ticket)}handleGridClearAllEvent(t){let e=t.detail;this.ticketDone=[...this.ticketDone.slice(0,e),!1,...this.ticketDone.slice(e+1)]}toggleAutoSelection(t){this.ticketDone=[...this.ticketDone.slice(0,t),!0,...this.ticketDone.slice(t+1)],this.autoSelection.emit({ticketId:this.ticketId,index:t})}toggleResetSelection(t){this.ticketDone=[...this.ticketDone.slice(0,t),!1,...this.ticketDone.slice(t+1)],this.resetSelection.emit({ticketId:this.ticketId,index:t})}changeStake(t,e){this.stakeChange.emit({ticketId:t,stake:e})}toggleClass(){this.isCustomSelect=!this.isCustomSelect}toggleSelection(){this.isCustomSelectStake=!this.isCustomSelectStake}toggleLineSelection(){this.isCustomSelectLine=!this.isCustomSelectLine}toggleDrawSelection(){this.isCustomSelectDraw=!this.isCustomSelectDraw}setWagerPerDraw(t){this.amountInfo={value:t.value,currency:t.currency},this.isCustomSelect=!1,this.changeStake(this.ticketId,t.value)}setStakeMultiplier(t){this.stakeMultiplier=t,this.isCustomSelectStake=!1,this.multiplierChange.emit({ticketId:this.ticketId,multiplierNum:Number(t),multiplier:this.gameData.rules.stakeMultiplierAvailable})}setLineMultiplier(t){this.lineMultiplier=t,this.isCustomSelectLine=!1,this.lineMultiplierChange.emit({ticketId:this.ticketId,lineNum:t})}setDrawMultiplier(t){this.drawMultiplier=t,this.isCustomSelectDraw=!1,this.drawMultiplierChange.emit({ticketId:this.ticketId,drawCount:t})}handlePlayTypeChange(t){this.selectedPlayTypeId=t;let e=this.playType.filter((e=>e.id===t))[0];this.boardsAllowed=e.boardsAllowed,this.numberRange=e.selectionRules.map((t=>t.selectionCount)),this.maximumAllowed=Math.max(...this.numberRange),this.minimumAllowed=Math.min(...this.numberRange),this.secondaryNumberRange=e.secondarySelectionRules.map((t=>t.selectionCount)),this.secondaryMaximumAllowed=Math.max(...this.secondaryNumberRange),this.secondaryMinimumAllowed=Math.min(...this.secondaryNumberRange);for(let t=0;t<this.lineMultiplier;t++)this.toggleResetSelection(t);this.betTypeChange.emit({ticketId:this.ticketId,betType:e})}render(){if(this.isLoading)return i("div",null,i("p",null,c("loading",this.language)));if(this.hasErrors)return i("div",null,i("p",null,c("error",this.language)));{const{rules:t}=this.gameData;return i("div",{class:"TicketContainer",ref:t=>this.stylingContainer=t},i("p",{class:"TicketTitle"},this.gameData.name),i("div",{class:"TicketTabs"},this.groupType.map(((t,e)=>i("div",{class:"TabButton"+(this.tabIndex==e?" Active":""),onClick:()=>this.tabIndex=e},t.groupName)))),this.playType.length>1&&i("div",null,i("label",{class:"Label"},c("playType",this.language),": "),i("vaadin-select",{style:{width:"160px"},items:this.playType,value:this.selectedPlayTypeId,"on-value-changed":t=>this.handlePlayTypeChange(t.detail.value)})),this.boardsAllowed.length>1&&i("div",null,i("label",{class:"Label"},c("lines",this.language),": "),i("div",{class:"WagerInput"},i("div",{ref:t=>this.selectLineRef=t,class:this.isCustomSelectLine?"SelectWrapper SelectActive":"SelectWrapper"},i("div",{class:"SelectButton",onClick:()=>this.toggleLineSelection()},i("span",null,this.lineMultiplier),i("span",{class:"SelectExpand"},"▼")),i("div",{class:"SelectContent"},i("ul",{class:"SelectOptions"},this.boardsAllowed.map((t=>i("li",{class:this.lineMultiplier==t?"SelectedValue":"",value:t,onClick:()=>this.setLineMultiplier(t)},t)))))))),this.grids.map(((e,s)=>i("div",null,i("div",{class:"TicketGridHeader"},i("div",null,c("lineName",this.language),s+1),this.resetButton&&this.ticketDone[s]&&i("div",{class:"ButtonContainer"},i("a",{class:"ResetButton",onClick:()=>this.toggleResetSelection(s)},c("resetButton",this.language))),this.autoPick&&!this.ticketDone[s]&&i("div",{class:"ButtonContainer"},i("a",{class:"AutoButton",onClick:()=>this.toggleAutoSelection(s)},c("autoButton",this.language)))),i("div",{class:"TicketGridBullets"},i("p",{class:"TicketGridTitle"},t.boards[0].selectionName),i("lottery-grid",{"grid-index":s,"maximum-allowed":this.maximumAllowed,"minimum-allowed":this.minimumAllowed,"number-range":JSON.stringify(this.numberRange),"high-number":t.boards[0].highNumber,"low-number":t.boards[0].lowNumber,"total-numbers":t.boards[0].highNumber-t.boards[0].lowNumber+1,selectable:!0,"reset-button":!0,"auto-pick":!0,"game-id":this.gameId,"ticket-id":this.ticketId,"partial-quickpick-available":this.partialQuickpickAvailable,language:this.language,"translation-url":this.translationUrl,"selection-type":"mainSelection","client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent})),this.secondarySelectionAllowed&&i("div",{class:"SecondarySelectionWrapper"},i("div",{class:"TicketGridBullets"},i("p",{class:"TicketGridTitle"},t.boards[0].secondarySelectionName),i("lottery-grid",{"grid-index":s,"maximum-allowed":this.secondaryMaximumAllowed,"minimum-allowed":this.secondaryMinimumAllowed,"number-range":JSON.stringify(this.secondaryNumberRange),"high-number":t.boards[0].secondaryHighNumber,"low-number":t.boards[0].secondaryLowNumber,"total-numbers":t.boards[0].secondaryHighNumber-t.boards[0].secondaryLowNumber+1,selectable:!0,"reset-button":!0,"auto-pick":!0,"game-id":this.gameId,"ticket-id":this.ticketId,"partial-quickpick-available":this.partialQuickpickAvailable,language:this.language,"translation-url":this.translationUrl,"selection-type":"secondarySelection","client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent})))))),t.stakeMultiplierAvailable&&i("div",null,i("label",{class:"Label"},c("multiplier",this.language),": "),i("div",{class:"WagerInput"},t.stakeMultipliers.length>1?i("div",{ref:t=>this.selectStakeRef=t,class:this.isCustomSelectStake?"SelectWrapper SelectActive":"SelectWrapper"},i("div",{class:"SelectButton",onClick:()=>this.toggleSelection()},i("span",null,this.stakeMultiplier),i("span",{class:"SelectExpand"},"▼")),i("div",{class:"SelectContent"},i("ul",{class:"SelectOptions"},t.stakeMultipliers.map((t=>i("li",{class:this.stakeMultiplier==t?"SelectedValue":"",value:t,onClick:()=>this.setStakeMultiplier(t)},t)))))):i("div",null,i("input",{min:"1",value:t.stakeMultipliers[0]||1,type:"number",disabled:!0})))),t.drawMultiplierAvailable&&i("div",null,i("label",{class:"Label"},c("numberOfDraws",this.language),": "),i("div",{class:"WagerInput"},t.durations.length>1?i("div",{ref:t=>this.selectDrawRef=t,class:this.isCustomSelectDraw?"SelectWrapper SelectActive":"SelectWrapper"},i("div",{class:"SelectButton",onClick:()=>this.toggleDrawSelection()},i("span",null,this.drawMultiplier),i("span",{class:"SelectExpand"},"▼")),i("div",{class:"SelectContent"},i("ul",{class:"SelectOptions"},t.durations.map((t=>i("li",{class:this.drawMultiplier==t?"SelectedValue":"",value:t,onClick:()=>this.setDrawMultiplier(t)},t)))))):i("div",null,i("input",{min:"1",value:t.durations[0]||1,type:"number",disabled:!0})))),i("div",null,i("label",{class:"Label"},c("wagerPerDraw",this.language),": "),i("div",{class:"WagerInput"},t.stakes.length>1?i("div",{ref:t=>this.selectRef=t,class:this.isCustomSelect?"SelectWrapper SelectActive":"SelectWrapper"},i("div",{class:"SelectButton",onClick:()=>this.toggleClass()},i("span",null,this.amountInfo.value," ",this.amountInfo.currency),i("span",{class:"SelectExpand"},"▼")),i("div",{class:"SelectContent"},i("ul",{class:"SelectOptions"},t.stakes.map((t=>i("li",{class:this.amountInfo.value==t.value?"SelectedValue":"",value:t.value,onClick:()=>this.setWagerPerDraw(t)},t.value," ",t.currency)))))):i("div",null,i("input",{min:"1",value:t.stakes[0].value,type:"number",disabled:!0}),i("span",{class:"WagerInputTitle"},t.stakes[0].currency)))))}}static get watchers(){return{lineMultiplier:["handleLineMultiplierChange"],tabIndex:["handleTabIndexChange"]}}};Pr.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.TicketTitle{font-size:16px;font-weight:bold}.TicketTabs{display:flex;overflow:auto}.TicketTabs .TabButton{color:var(--emw--color-typography, #009993);margin:0 40px 10px 0;cursor:pointer}.TicketTabs .Active{border-bottom:1px solid var(--emw--color-typography, #009993)}.ButtonContainer{display:flex;justify-content:flex-end}.SecondarySelectionWrapper{margin-top:20px}.Label{margin-right:5px;position:relative;top:2px;font-size:14px;font-weight:lighter;color:var(--emw--button-text-color, #000)}input[type=number]{-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none}.NumberInput,.WagerInput{margin-top:10px;display:inline-flex;align-items:center}.NumberInput,.NumberInput *{box-sizing:border-box}.NumberInput button{cursor:pointer;outline:none;-webkit-appearance:none;border:none;align-items:center;justify-content:center;height:20px;position:relative}.NumberInput button:after{display:inline-block;position:absolute;transform:translate(-50%, -50%) rotate(180deg);align-items:center;text-align:center}.NumberInput button.Plus:after{transform:translate(-50%, -50%) rotate(0deg);width:30px;display:inline-flex;align-items:center;text-align:center}.NumberInput input[type=number],.WagerInput input[type=number]{max-width:50px;display:inline-flex;align-items:center;padding:4px 10px;text-align:center}.NumberInput input[type=number] .WagerInputTitle,.WagerInput input[type=number] .WagerInputTitle{font-size:14px;color:var(--emw--button-text-color, #000);padding:10px;margin-left:8px}.AutoButton{cursor:pointer;display:inline-block;border-radius:var(--emw--button-border-radius, 4px);padding:8px 20px;width:max-content;margin:5px 0;border:1px solid var(--emw--button-border-color, #00958f);background:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));color:var(--emw--button-text-color, #000);font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0}.AutoButton:active{background:var(--emw--button-background-color, #00958f);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255))}.ResetButton{cursor:pointer;display:inline-block;border-radius:var(--emw--button-border-radius, 4px);padding:8px 20px;width:max-content;margin:5px 0;color:var(--emw--button-text-color, #000);font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0;background:var(--emw--color-error, #FF3D00);border:1px solid var(--emw--color-error, #FF3D00);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255))}.ResetButton:hover{background:var(--emw--color-secondary, #FF6536);border:1px solid var(--emw--color-error, #FF3D00)}.TicketGridHeader{display:flex;justify-content:space-between;align-items:center;font-weight:bold;margin-top:10px}.TicketGridBullets{background:var(--emw--color-gray-50, #F1F1F1);border-radius:4px;padding:20px;margin-top:5px;margin-bottom:10px}.TicketGridBullets .TicketGridTitle{margin-top:0px}.Minus{border-radius:4px;width:30px;height:24px !important;margin-right:10px;color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));background:var(--emw--color-background, #009993)}.Plus{border-radius:4px;width:30px;height:24px !important;margin-left:10px;color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));background:var(--emw--color-background, #009993)}.SelectWrapper{width:auto;padding:5px;margin:0 auto;border:1px solid var(--emw--color-gray-transparency-80, #ccc);border-radius:5px;position:relative}.SelectButton,.SelectOptions li{display:flex;align-items:center;cursor:pointer}.SelectButton{display:flex;padding:0 5px;border-radius:7px;align-items:center;justify-content:space-between;font-size:14px}.SelectButton span:first-child{padding-right:10px}.SelectExpand{transition:transform 0.3s linear;font-size:12px}.SelectActive .SelectExpand{transform:rotate(180deg)}.SelectContent{display:none;padding:5px;border-radius:7px}.SelectWrapper.SelectActive .SelectContent{width:100%;display:block;position:absolute;left:0;top:32px;padding:0;border:1px solid var(--emw--color-gray-transparency-80, #ccc);overflow:hidden;background:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));z-index:20}.SelectContent .SelectOptions{max-height:100px;margin:0;overflow-y:auto;padding:0}.SelectContent .SelectOptions .SelectedValue{background-color:var(--emw--color-background, #009993);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255))}.SelectOptions::-webkit-scrollbar{width:7px}.SelectOptions::-webkit-scrollbar-track{background:var(--emw--color-gray-50, #F1F1F1);border-radius:25px}.SelectOptions::-webkit-scrollbar-thumb{background:var(--emw--color-gray-transparency-80, #ccc);border-radius:25px}.SelectOptions li{height:20px;padding:0 13px;font-size:14px}.SelectOptions li:hover{background:var(--emw--color-gray-150, #f2f2f2)}';const Br=["ro","en","fr","ar","hr"],Mr={en:{ticket:"Ticket"},ro:{ticket:"Bilet"},fr:{ticket:"Billet"},ar:{ticket:"تذكرة"},hr:{ticket:"Listić"}},Dr=(t,e)=>{const i=e;return Mr[void 0!==i&&Br.includes(i)?i:"en"][t]},jr=class{constructor(i){t(this,i),this.deleteTicketEvent=e(this,"deleteTicket",7),this.endpoint="",this.ticketId=1,this.postMessage=!1,this.eventName="deleteTicketAction",this.collapsed=!0,this.numberOfGrids=1,this.last=!1,this.language="en",this.autoPick=!1,this.resetButton=!1,this.totalControllers=1,this.clientStyling="",this.clientStylingUrlContent="",this.limitStylingAppends=!1,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)}}helperAccordionActionHandler(){this.postMessage&&window.postMessage({type:this.eventName},window.location.href),this.deleteTicketEvent.emit({ticketId:this.ticketId})}componentWillLoad(){var t;this.translationUrl&&(t=JSON.parse(this.translationUrl),Object.keys(t).forEach((e=>{for(let i in t[e])Mr[e][i]=t[e][i]})))}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}render(){return i("div",{key:"581989035aa42a397cd39a4cdd929ea91190494c",class:"LotteryTicketControllerContainer",ref:t=>this.stylingContainer=t},i("helper-accordion",{key:"724d50d1532510344ed7acd57c3c5faef17aef8c","header-title":`${Dr("ticket",this.language)} ${this.ticketId}`,"header-subtitle":this.ticketDescription,footer:!0,"delete-tab":1!==this.totalControllers,collapsed:!this.last||this.collapsed,language:this.language,"translation-url":this.translationUrl,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent},i("div",{key:"ba851ea2792641971a5552a94558fe8d28068187",slot:"accordionContent"},i("lottery-ticket",{key:"199abc15160d60499d7d1d1d14084f64a6314c53",endpoint:this.endpoint,"game-id":this.gameId,"ticket-id":this.ticketId,"number-of-grids":this.numberOfGrids,language:this.language,"translation-url":this.translationUrl,"reset-button":this.resetButton,"auto-pick":this.autoPick,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent}))))}};jr.style=':host{font-family:"Roboto", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";font-size:0.8rem}*,*::before,*::after{margin:0;padding:0;list-style:none;outline:none;box-sizing:border-box}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}';export{r as helper_accordion,n as lottery_bullet,a as lottery_grid,Pr as lottery_ticket,jr as lottery_ticket_controller}
|