@tylertech/forge 2.24.4 → 2.24.6
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/custom-elements.json +53 -29
- package/dist/esm/accordion/index.js +1 -1
- package/dist/esm/app-bar/help-button/index.js +1 -1
- package/dist/esm/app-bar/index.js +1 -1
- package/dist/esm/app-bar/menu-button/index.js +1 -1
- package/dist/esm/app-bar/notification-button/index.js +1 -1
- package/dist/esm/app-bar/profile-button/index.js +1 -1
- package/dist/esm/app-bar/search/index.js +1 -1
- package/dist/esm/autocomplete/index.js +1 -1
- package/dist/esm/banner/index.js +1 -1
- package/dist/esm/bottom-sheet/index.js +1 -1
- package/dist/esm/button-area/index.js +1 -1
- package/dist/esm/calendar/calendar-dropdown/index.js +1 -1
- package/dist/esm/calendar/calendar-menu/index.js +1 -1
- package/dist/esm/calendar/index.js +1 -1
- package/dist/esm/checkbox/index.js +1 -1
- package/dist/esm/chip-field/index.js +1 -1
- package/dist/esm/chips/chip/index.js +1 -1
- package/dist/esm/chips/chip-set/index.js +1 -1
- package/dist/esm/chips/index.js +1 -1
- package/dist/esm/chunks/{chunk.KGMCBPGV.js → chunk.22XYSOBK.js} +2 -2
- package/dist/esm/chunks/chunk.3HRCB7FN.js +7 -0
- package/dist/esm/chunks/chunk.3HRCB7FN.js.map +7 -0
- package/dist/esm/chunks/{chunk.IY43YPCQ.js → chunk.3VO4CCLE.js} +2 -2
- package/dist/esm/chunks/{chunk.JFAOCIGZ.js → chunk.4TAJ2ISD.js} +2 -2
- package/dist/esm/chunks/chunk.64BPRKXV.js +7 -0
- package/dist/esm/chunks/chunk.64BPRKXV.js.map +7 -0
- package/dist/esm/chunks/chunk.6VXZW2KP.js +12 -0
- package/dist/esm/chunks/chunk.6ZUV5N66.js +7 -0
- package/dist/esm/chunks/chunk.6ZUV5N66.js.map +7 -0
- package/dist/esm/chunks/{chunk.SXQ22MNR.js → chunk.ABB66VV2.js} +2 -2
- package/dist/esm/chunks/{chunk.WHQZNZHW.js → chunk.B5TEOESG.js} +2 -2
- package/dist/esm/chunks/{chunk.47EUT2BJ.js → chunk.B72LQPTW.js} +2 -2
- package/dist/esm/chunks/{chunk.C3G25JFG.js → chunk.BVMEPQRH.js} +2 -2
- package/dist/esm/chunks/{chunk.QBKSRXQK.js → chunk.CGT6H4RE.js} +2 -2
- package/dist/esm/chunks/{chunk.CL4FTBLR.js → chunk.DKP3U76M.js} +2 -2
- package/dist/esm/chunks/{chunk.TMEYQXRR.js → chunk.DT4G43BK.js} +2 -2
- package/dist/esm/chunks/chunk.DXA626CF.js +7 -0
- package/dist/esm/chunks/chunk.DXA626CF.js.map +7 -0
- package/dist/esm/chunks/{chunk.N6MAUMFI.js → chunk.HMJ3REU5.js} +2 -2
- package/dist/esm/chunks/chunk.J3YNMJ7K.js +7 -0
- package/dist/esm/chunks/chunk.J3YNMJ7K.js.map +7 -0
- package/dist/esm/chunks/{chunk.E3K6KM57.js → chunk.LAM6EDW3.js} +2 -2
- package/dist/esm/chunks/{chunk.FEU4FTVQ.js → chunk.LEOEVEFJ.js} +2 -2
- package/dist/esm/chunks/{chunk.EQEMCHMB.js → chunk.LKL5KWVY.js} +2 -2
- package/dist/esm/chunks/{chunk.TVWUZYVG.js → chunk.LQAXFDOO.js} +2 -2
- package/dist/esm/chunks/{chunk.6DVJ22IK.js → chunk.LQEVGZKN.js} +2 -2
- package/dist/esm/chunks/{chunk.6ENND42M.js → chunk.MSBAFZ54.js} +2 -2
- package/dist/esm/chunks/{chunk.ZVPPLZUU.js → chunk.P7AU3S6P.js} +2 -2
- package/dist/esm/chunks/{chunk.QPWP24VW.js → chunk.PLORKGHA.js} +2 -2
- package/dist/esm/chunks/{chunk.LFBYFJTX.js → chunk.PRD35UWX.js} +2 -2
- package/dist/esm/chunks/chunk.PTOAOW4U.js +7 -0
- package/dist/esm/chunks/chunk.PTOAOW4U.js.map +7 -0
- package/dist/esm/chunks/{chunk.MBJGQYCF.js → chunk.RZMTIEVK.js} +2 -2
- package/dist/esm/chunks/{chunk.XINI6PNZ.js → chunk.SCLNLPNS.js} +2 -2
- package/dist/esm/chunks/{chunk.5OLZHLY4.js → chunk.SLK5TNHE.js} +2 -2
- package/dist/esm/chunks/{chunk.5OLZHLY4.js.map → chunk.SLK5TNHE.js.map} +1 -1
- package/dist/esm/chunks/{chunk.CHVDZAGE.js → chunk.SMIOTQJL.js} +2 -2
- package/dist/esm/chunks/{chunk.W3DFKTAX.js → chunk.TJHXZ6PA.js} +2 -2
- package/dist/esm/chunks/{chunk.L5OECKS5.js → chunk.UOYOPTMC.js} +2 -2
- package/dist/esm/chunks/{chunk.3MMDUUTN.js → chunk.V6C2AEKZ.js} +2 -2
- package/dist/esm/chunks/{chunk.MA573DEE.js → chunk.VWLMQCC2.js} +2 -2
- package/dist/esm/chunks/{chunk.OBBYRQCY.js → chunk.XNUJPZIK.js} +2 -2
- package/dist/esm/chunks/{chunk.6NARYF7U.js → chunk.XRYKUVE3.js} +2 -2
- package/dist/esm/chunks/{chunk.WF24FWAT.js → chunk.XT4IC25K.js} +2 -2
- package/dist/esm/chunks/{chunk.MKHU4IPO.js → chunk.XTQO35SU.js} +2 -2
- package/dist/esm/chunks/{chunk.TLXWXBQO.js → chunk.YBEKNPIH.js} +2 -2
- package/dist/esm/chunks/{chunk.LEINPSKL.js → chunk.YKZ36ELA.js} +2 -2
- package/dist/esm/chunks/chunk.ZCJNWF7K.js +7 -0
- package/dist/esm/chunks/chunk.ZCJNWF7K.js.map +7 -0
- package/dist/esm/chunks/{chunk.4KKMVMPN.js → chunk.ZFVGFJUF.js} +2 -2
- package/dist/esm/color-picker/index.js +1 -1
- package/dist/esm/core/index.js +1 -1
- package/dist/esm/core/utils/index.js +1 -1
- package/dist/esm/date-picker/index.js +1 -1
- package/dist/esm/date-range-picker/index.js +1 -1
- package/dist/esm/expansion-panel/index.js +1 -1
- package/dist/esm/file-picker/index.js +1 -1
- package/dist/esm/icon/index.js +1 -1
- package/dist/esm/icon-button/index.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/list/index.js +1 -1
- package/dist/esm/list/list/index.js +1 -1
- package/dist/esm/list/list-item/index.js +1 -1
- package/dist/esm/list-dropdown/index.js +1 -1
- package/dist/esm/menu/index.js +1 -1
- package/dist/esm/open-icon/index.js +1 -1
- package/dist/esm/paginator/index.js +1 -1
- package/dist/esm/profile-card/index.js +1 -1
- package/dist/esm/quantity-field/index.js +1 -1
- package/dist/esm/radio/index.js +1 -1
- package/dist/esm/select/core/index.js +1 -1
- package/dist/esm/select/index.js +1 -1
- package/dist/esm/select/select/index.js +1 -1
- package/dist/esm/select/select-dropdown/index.js +1 -1
- package/dist/esm/slider/index.js +1 -1
- package/dist/esm/split-view/index.js +1 -1
- package/dist/esm/split-view/split-view/index.js +1 -1
- package/dist/esm/split-view/split-view-panel/index.js +1 -1
- package/dist/esm/stepper/index.js +1 -1
- package/dist/esm/stepper/step/index.js +1 -1
- package/dist/esm/stepper/stepper/index.js +1 -1
- package/dist/esm/switch/index.js +1 -1
- package/dist/esm/table/index.js +1 -1
- package/dist/esm/tabs/index.js +1 -1
- package/dist/esm/tabs/tab-bar/index.js +1 -1
- package/dist/esm/text-field/index.js +1 -1
- package/dist/esm/time-picker/index.js +1 -1
- package/dist/esm/toast/index.js +1 -1
- package/esm/app-bar/notification-button/app-bar-notification-button-foundation.js +5 -2
- package/esm/chip-field/chip-field-adapter.js +2 -2
- package/esm/core/utils/date-utils.js +1 -1
- package/esm/date-picker/date-picker-foundation.d.ts +1 -0
- package/esm/date-picker/date-picker-foundation.js +9 -1
- package/esm/date-range-picker/date-range-picker-foundation.d.ts +1 -0
- package/esm/date-range-picker/date-range-picker-foundation.js +15 -0
- package/esm/field/field-adapter.d.ts +3 -3
- package/esm/field/field-adapter.js +3 -3
- package/esm/field/field-foundation.js +1 -1
- package/esm/split-view/split-view-panel/split-view-panel.js +1 -1
- package/esm/text-field/text-field-adapter.js +2 -2
- package/package.json +1 -1
- package/dist/esm/chunks/chunk.AH4YGLZ4.js +0 -7
- package/dist/esm/chunks/chunk.AH4YGLZ4.js.map +0 -7
- package/dist/esm/chunks/chunk.DK6EGV4J.js +0 -7
- package/dist/esm/chunks/chunk.DK6EGV4J.js.map +0 -7
- package/dist/esm/chunks/chunk.MESFNTBS.js +0 -12
- package/dist/esm/chunks/chunk.OJ54J4L3.js +0 -7
- package/dist/esm/chunks/chunk.OJ54J4L3.js.map +0 -7
- package/dist/esm/chunks/chunk.OZPV5ZJC.js +0 -7
- package/dist/esm/chunks/chunk.OZPV5ZJC.js.map +0 -7
- package/dist/esm/chunks/chunk.QIGNMZRL.js +0 -7
- package/dist/esm/chunks/chunk.QIGNMZRL.js.map +0 -7
- package/dist/esm/chunks/chunk.U6WGJELL.js +0 -7
- package/dist/esm/chunks/chunk.U6WGJELL.js.map +0 -7
- package/dist/esm/chunks/chunk.VDF5MWGC.js +0 -7
- package/dist/esm/chunks/chunk.VDF5MWGC.js.map +0 -7
- /package/dist/esm/chunks/{chunk.KGMCBPGV.js.map → chunk.22XYSOBK.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.IY43YPCQ.js.map → chunk.3VO4CCLE.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.JFAOCIGZ.js.map → chunk.4TAJ2ISD.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.MESFNTBS.js.map → chunk.6VXZW2KP.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.SXQ22MNR.js.map → chunk.ABB66VV2.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.WHQZNZHW.js.map → chunk.B5TEOESG.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.47EUT2BJ.js.map → chunk.B72LQPTW.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.C3G25JFG.js.map → chunk.BVMEPQRH.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.QBKSRXQK.js.map → chunk.CGT6H4RE.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.CL4FTBLR.js.map → chunk.DKP3U76M.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.TMEYQXRR.js.map → chunk.DT4G43BK.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.N6MAUMFI.js.map → chunk.HMJ3REU5.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.E3K6KM57.js.map → chunk.LAM6EDW3.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.FEU4FTVQ.js.map → chunk.LEOEVEFJ.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.EQEMCHMB.js.map → chunk.LKL5KWVY.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.TVWUZYVG.js.map → chunk.LQAXFDOO.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.6DVJ22IK.js.map → chunk.LQEVGZKN.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.6ENND42M.js.map → chunk.MSBAFZ54.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.ZVPPLZUU.js.map → chunk.P7AU3S6P.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.QPWP24VW.js.map → chunk.PLORKGHA.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.LFBYFJTX.js.map → chunk.PRD35UWX.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.MBJGQYCF.js.map → chunk.RZMTIEVK.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.XINI6PNZ.js.map → chunk.SCLNLPNS.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.CHVDZAGE.js.map → chunk.SMIOTQJL.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.W3DFKTAX.js.map → chunk.TJHXZ6PA.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.L5OECKS5.js.map → chunk.UOYOPTMC.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.3MMDUUTN.js.map → chunk.V6C2AEKZ.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.MA573DEE.js.map → chunk.VWLMQCC2.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.OBBYRQCY.js.map → chunk.XNUJPZIK.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.6NARYF7U.js.map → chunk.XRYKUVE3.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.WF24FWAT.js.map → chunk.XT4IC25K.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.MKHU4IPO.js.map → chunk.XTQO35SU.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.TLXWXBQO.js.map → chunk.YBEKNPIH.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.LEINPSKL.js.map → chunk.YKZ36ELA.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.4KKMVMPN.js.map → chunk.ZFVGFJUF.js.map} +0 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
|
+
* License: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import{g}from"./chunk.J2M2MXP2.js";var b=/^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24\:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$/,A=/a-z/i,h=10;function T(t){if(t=t.replace(/_|\s/g,""),b.test(t)){let f=new Date(t);if(A.test(t)||f.setMinutes(f.getMinutes()+f.getTimezoneOffset()),g(f))return f}let e=[];t.indexOf("/")!==-1?e=t.split("/"):t.indexOf("-")!==-1?e=t.split("-"):(t.length===6||t.length===8)&&!isNaN(+t)&&(e=[t.substring(0,2),t.substring(2,4),t.substring(4)]);let o=e.length===3,[n,s,r]=e;if(n==="0"&&(n="1"),s==="0"&&(s="1"),typeof r=="string"&&r.length===3&&(r=r.padStart(4,"0")),o){let f=n.length===1||n.length===2,l=s.length===1||s.length===2,c=r.length===2||r.length===4;if(!f||!l||!c)return null}else return null;if(r.length===2){let f=new Date().getFullYear()-(100-h),l=new Date().getFullYear()+h,c=String(f).slice(0,2),D=String(l).slice(0,2),M=+String(l).slice(2);r=+r<=M?`${D}${r}`:`${c}${r}`}let a=+n,i=+s,u=+r;a>12&&(a=12);let m=new Date(u,a,0).getDate();i>m&&(i=m);let d=new Date(u,a-1,i,0,0,0,0);return g(d)?d:null}function w(t){let e=String(t.getMonth()+1).padStart(2,"0"),o=String(t.getDate()).padStart(2,"0"),n=String(t.getFullYear()).padStart(4,"0");return[e,o,n].join("/")}function y(t,e){return!t&&!e?!0:!t||!e||!g(t)||!g(e)?!1:new Date(t).setHours(0,0,0,0)===new Date(e).setHours(0,0,0,0)}function _(t,e){return new Date(e!=null?e:1970,t+1,0)}function C(t,e){return _(t,e).getDate()}function O(t,e){let o=document.createElement("div");o.innerHTML=t;for(let s=o.childNodes.length-1;s>=0;s--)o.childNodes[s].nodeName.toLowerCase()!=="svg"&&o.removeChild(o.childNodes[s]);let n=o.firstElementChild;return n&&n.nodeName.toLowerCase()==="svg"&&p(n)?(e&&n.setAttribute("viewBox",e),!n.hasAttribute("viewBox")&&e&&n.setAttribute("viewBox",e),n.removeAttribute("height"),n.removeAttribute("width"),n):null}function p(t){if(t.nodeType!==1)return!0;if(t.nodeName.toLowerCase()==="script")return!1;let e=Array.from(t.attributes);for(let n of e)if(typeof n.name=="string"&&n.name.toLowerCase().startsWith("on"))return!1;let o=Array.from(t.childNodes);for(let n of o)if(!p(n))return!1;return!0}var E=/^(0?[0-9]|1\d|2[0-3]):([0-5]\d)(:([0-5]\d))?$/,x=/^(0?[1-9]|1[0-2]):([0-5]\d)(:([0-5]\d))?\s*([AaPp][Mm])?$/,N=/^(\d?\d?):?(\d?\d?)(:?(\d?\d?))?\s*([AaPp][Mm]?)?$/,S=/[AaPp][Mm]?/;function $(t){let e=t.match(E)||[null,0,0,null,0],o=e[1],n=e[2],s=e[4];return{hours:o,minutes:n,seconds:s}}function I(t){let e=t.match(x)||[null,0,0,null,0,"AM"],o=e[1],n=e[2],s=e[4],r=e[5];return{hours:o,minutes:n,seconds:s,meridiem:r}}function G(t){return E.test(t)||x.test(t)}function F(t,e,o){if(t=t&&typeof t=="string"?t.replace(/_|\s/g,""):"",/^\s*$/.test(t)||/^:+$/.test(t))return"";let n=t.match(N);if(!n)return"";let s=n[1],r=n[2],a=n[4],i=n[5],u=t.match(S);u&&(i=u[0],t=t.replace(i,""),i.length===1&&(i+="m")),t.length===3&&!t.includes(":")&&(s=t[0],r=t.substring(1)),e?i="":S.test(i)?i=i.toUpperCase():/^[AaPp]/.test(i)?i.toLowerCase().startsWith("a")?i="AM":i.toLowerCase().startsWith("p")&&(i="PM"):i="";let m=+s||0,d=+r||0,f=!i||e?23:12;if(m>=f?s=String(f):m<0&&(s="00"),s=s.padStart(2,"0"),r!==void 0&&(d>59?r="59":d<0?r="00":r=r.padStart(2,"0")),a!==void 0){let c=+a||0;c>59?a="59":c<0?a="00":a=a.padStart(2,"0")}let l=s;return r!==void 0&&(l+=`:${r}`,a===void 0&&o&&(a="00")),a!==void 0&&(l+=`:${a}`),i&&(l+=` ${i}`),l}export{b as a,A as b,T as c,w as d,y as e,_ as f,C as g,O as h,p as i,E as j,x as k,N as l,S as m,$ as n,I as o,G as p,F as q};
|
|
7
|
+
//# sourceMappingURL=chunk.J3YNMJ7K.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/core/utils/date-utils.ts", "../../src/core/utils/svg-utils.ts", "../../src/core/utils/time-utils.ts"],
|
|
4
|
+
"sourcesContent": ["import { isValidDate } from '@tylertech/forge-core';\n\nexport const ISO_8601_REGEX = /^([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24\\:?00)([\\.,]\\d+(?!:))?)?(\\17[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$/;\nexport const ISO_TIMEZONE_REGEX = /a-z/i;\nconst FUTURE_YEAR_COERCION = 10; // The number of years in the future to coerce two-digit years into current century\n\n/**\n * Parses a date string value to a `Date` object in local time.\n * @param str The date string value.\n */\nexport function parseDateString(value: string): Date | null {\n value = value.replace(/_|\\s/g, ''); // Remove potential extraneous characters\n\n // We first check if this is a valid date in ISO 8601 format and return it if so\n if (ISO_8601_REGEX.test(value)) {\n const iso8601Date = new Date(value);\n\n // This is an ISO string, but does it have a timezone? If not, we add current timezone offset\n if (!ISO_TIMEZONE_REGEX.test(value)) {\n iso8601Date.setMinutes(iso8601Date.getMinutes() + iso8601Date.getTimezoneOffset());\n }\n\n if (isValidDate(iso8601Date)) {\n return iso8601Date;\n }\n }\n\n let values: string[] = [];\n\n // We accept dates with a \"/\" or \"-\" separator and in the format of MM/DD/YYYY\n if (value.indexOf('/') !== -1) {\n values = value.split('/');\n } else if (value.indexOf('-') !== -1) {\n values = value.split('-');\n } else if ((value.length === 6 || value.length === 8) && !isNaN(+value)) {\n values = [value.substring(0, 2), value.substring(2, 4), value.substring(4)];\n }\n\n const hasMonthDayYear = values.length === 3;\n let [month, day, year] = values;\n\n // Ensure are month and year values are coerced from 0 to 1 in case of incomplete entry\n if (month === '0') {\n month = '1';\n }\n if (day === '0') {\n day = '1';\n }\n\n // Trap for the case where only 3 digit years are entered\n if (typeof year === 'string' && year.length === 3) {\n year = year.padStart(4, '0');\n }\n \n if (hasMonthDayYear) {\n const isValidMonthLength = month.length === 1 || month.length === 2;\n const isValidDayLength = day.length === 1 || day.length === 2;\n const isValidYearLength = year.length === 2 || year.length === 4;\n\n if (!isValidMonthLength || !isValidDayLength || !isValidYearLength) {\n return null;\n }\n } else {\n return null;\n }\n\n // Check if we need to coerce two-digit years to the four-digit equivalent\n if (year.length === 2) {\n const minYear = new Date().getFullYear() - (100 - FUTURE_YEAR_COERCION);\n const maxYear = new Date().getFullYear() + FUTURE_YEAR_COERCION;\n const minYearCentury = String(minYear).slice(0, 2);\n const maxYearCentury = String(maxYear).slice(0, 2);\n const normalizedMaxYear = +String(maxYear).slice(2);\n year = +year <= normalizedMaxYear ? `${maxYearCentury}${year}` : `${minYearCentury}${year}`;\n }\n\n let numMonth = +month;\n let numDay = +day;\n const numYear = +year;\n\n if (numMonth > 12) {\n numMonth = 12;\n }\n\n const maxDaysInMonth = new Date(numYear, numMonth, 0).getDate();\n\n if (numDay > maxDaysInMonth) {\n numDay = maxDaysInMonth;\n }\n\n const parsedDate = new Date(numYear, numMonth - 1, numDay, 0, 0, 0, 0);\n return isValidDate(parsedDate) ? parsedDate : null;\n}\n\n/**\n * Formats a `Date` to a specified format.\n * @param str The date string value.\n */\nexport function formatDate(date: Date): string {\n const month = String(date.getMonth() + 1).padStart(2, '0');\n const day = String(date.getDate()).padStart(2, '0');\n const year = String(date.getFullYear()).padStart(4, '0');\n return [month, day, year].join('/');\n}\n\n/**\n * Determines if two date objects are equal.\n * \n * Note: Time values are ignored.\n * @param first The date to compare.\n * @param second The date to compare the first date to. \n * @returns A boolean whether the two dates are equivalent.\n */\nexport function isSameDate(first?: Date | null, second?: Date | null): boolean {\n if (!first && !second) {\n return true;\n } else if (!first || !second) {\n return false;\n } else if (!isValidDate(first) || !isValidDate(second)) {\n return false;\n }\n return new Date(first).setHours(0, 0, 0, 0) === new Date(second).setHours(0, 0, 0, 0);\n}\n\n/** \n * Returns the last date on a month.\n * \n * @param month The month.\n * @param year The year of the month, needed for February otherwise optional.\n * @returns The last date of the given month.\n */\nexport function getLastDateOfMonth(month: number, year?: number): Date {\n return new Date(year ?? 1970, month + 1, 0);\n}\n\n/**\n * Returns the number of days in a month.\n * \n * @param month The month to find the length of.\n * @param year The year to check within, needed for February otherwise optional.\n * @returns The number of days in the month.\n */\nexport function getMonthLength(month: number, year?: number): number {\n return getLastDateOfMonth(month, year).getDate();\n}\n", "/**\n * Creates an SVG element from a string.\n */\nexport function createSvgFromString(svgContent: string, defaultViewBox?: string): SVGSVGElement | null {\n const div = document.createElement('div');\n div.innerHTML = svgContent;\n\n // Remove all non-svg child nodes\n for (let i = div.childNodes.length - 1; i >= 0; i--) {\n if (div.childNodes[i].nodeName.toLowerCase() !== 'svg') {\n div.removeChild(div.childNodes[i]);\n }\n }\n\n const svgElm = div.firstElementChild as SVGSVGElement;\n if (svgElm && svgElm.nodeName.toLowerCase() === 'svg' && isSafeSvg(svgElm)) {\n // Check if a custom viewbox value was provided and use that if so\n if (defaultViewBox) {\n svgElm.setAttribute('viewBox', defaultViewBox);\n }\n\n // Force a default viewBox if one doesn't exist (this ensures our icon is scalable)\n if (!svgElm.hasAttribute('viewBox') && defaultViewBox) {\n svgElm.setAttribute('viewBox', defaultViewBox);\n }\n\n // Remove any height and width attributes to ensure that the icon is properly scalable\n svgElm.removeAttribute('height');\n svgElm.removeAttribute('width');\n\n return svgElm;\n }\n\n return null;\n}\n\n/**\n * Determines if the provided element is a safe SVG to use.\n * @param el The element reference to test.\n */\nexport function isSafeSvg(el: Element): boolean {\n if (el.nodeType !== 1) {\n return true;\n }\n\n // Validate no <script> tags exist\n if (el.nodeName.toLowerCase() === 'script') {\n return false;\n }\n\n // Ensure there are no inline listeners\n const attributes = Array.from(el.attributes);\n for (const attr of attributes) {\n if (typeof attr.name === 'string' && attr.name.toLowerCase().startsWith('on')) {\n return false;\n }\n }\n\n // Ensure all child nodes are valid\n const childNodes = Array.from(el.childNodes) as Element[];\n for (const node of childNodes) {\n if (!isSafeSvg(node)) {\n return false;\n }\n }\n\n return true;\n}\n", "export const TWENTY_FOUR_HOUR_TIME_REGEX = /^(0?[0-9]|1\\d|2[0-3]):([0-5]\\d)(:([0-5]\\d))?$/;\nexport const TWELVE_HOUR_TIME_REGEX = /^(0?[1-9]|1[0-2]):([0-5]\\d)(:([0-5]\\d))?\\s*([AaPp][Mm])?$/;\nexport const PARSEABLE_TIME_FORMAT = /^(\\d?\\d?):?(\\d?\\d?)(:?(\\d?\\d?))?\\s*([AaPp][Mm]?)?$/;\nexport const HAS_MERIDIEM_REGEX = /[AaPp][Mm]?/;\n\nexport function tokenize24HourTimeString(value: string): { hours: string; minutes: string; seconds: string } {\n const matches = value.match(TWENTY_FOUR_HOUR_TIME_REGEX) as RegExpMatchArray || [null, 0, 0, null, 0];\n const hours = matches[1];\n const minutes = matches[2];\n const seconds = matches[4];\n return { hours, minutes, seconds };\n}\n\nexport function tokenize12HourTimeString(value: string): { hours: string; minutes: string; seconds: string; meridiem: string } {\n const matches = value.match(TWELVE_HOUR_TIME_REGEX) as RegExpMatchArray || [null, 0, 0, null, 0, 'AM'];\n const hours = matches[1];\n const minutes = matches[2];\n const seconds = matches[4];\n const meridiem = matches[5];\n return { hours, minutes, seconds, meridiem };\n}\n\nexport function isSupportedTimeFormat(value: string): boolean {\n return TWENTY_FOUR_HOUR_TIME_REGEX.test(value) ||\n TWELVE_HOUR_TIME_REGEX.test(value);\n}\n\nexport function tryCoerceTimeString(str: string, use24HourTime: boolean, allowSeconds: boolean): string {\n str = str && typeof str === 'string' ? str.replace(/_|\\s/g, '') : '';\n if (/^\\s*$/.test(str) || /^:+$/.test(str)) {\n return '';\n }\n\n const matches = str.match(PARSEABLE_TIME_FORMAT);\n if (!matches) {\n return '';\n }\n\n let hoursStr = matches[1];\n let minutesStr = matches[2];\n let secondsStr = matches[4];\n let meridiem = matches[5];\n\n // Special case detection for meridiem\n const meridiemMatches = str.match(HAS_MERIDIEM_REGEX);\n if (meridiemMatches) {\n meridiem = meridiemMatches[0];\n str = str.replace(meridiem, ''); // Remove the meridiem from the input string our next special case\n\n // We allow for entering an \"a\" or \"p\" shorthand so let's coerce it to the proper value\n if (meridiem.length === 1) {\n meridiem += 'm';\n }\n }\n\n // Special case handling for 3-digit \"shorthand\" time values (ex. \"130\" => \"1:30 AM\")\n if (str.length === 3 && !str.includes(':')) {\n hoursStr = str[0];\n minutesStr = str.substring(1);\n }\n\n // Normalize the meridiem string\n if (use24HourTime) {\n meridiem = '';\n } else if (HAS_MERIDIEM_REGEX.test(meridiem)) {\n meridiem = meridiem.toUpperCase();\n } else {\n if (/^[AaPp]/.test(meridiem)) {\n if (meridiem.toLowerCase().startsWith('a')) {\n meridiem = 'AM';\n } else if (meridiem.toLowerCase().startsWith('p')) {\n meridiem = 'PM';\n }\n } else {\n meridiem = '';\n }\n }\n\n const hoursNum = +hoursStr || 0;\n const minutesNum = +minutesStr || 0;\n\n // Clamp and normalize hours\n const maxHours = !meridiem || use24HourTime ? 23 : 12;\n if (hoursNum >= maxHours) {\n hoursStr = String(maxHours);\n } else if (hoursNum < 0) {\n hoursStr = '00';\n }\n\n hoursStr = hoursStr.padStart(2, '0');\n\n // Clamp and normalize minutes\n if (minutesStr !== undefined) {\n if (minutesNum > 59) {\n minutesStr = '59';\n } else if (minutesNum < 0) {\n minutesStr = '00';\n } else {\n minutesStr = minutesStr.padStart(2, '0');\n }\n }\n\n // Clamp and normalize seconds (if applicable)\n if (secondsStr !== undefined) {\n const secondsNum = +secondsStr || 0;\n if (secondsNum > 59) {\n secondsStr = '59';\n } else if (secondsNum < 0) {\n secondsStr = '00';\n } else {\n secondsStr = secondsStr.padStart(2, '0');\n }\n }\n\n // Build resulting time string\n let timeStr = hoursStr;\n if (minutesStr !== undefined) {\n timeStr += `:${minutesStr}`;\n if (secondsStr === undefined && allowSeconds) {\n secondsStr = '00';\n }\n }\n if (secondsStr !== undefined) {\n timeStr += `:${secondsStr}`;\n }\n if (meridiem) {\n timeStr += ` ${meridiem}`;\n }\n\n return timeStr;\n}\n"],
|
|
5
|
+
"mappings": "mCAEO,IAAMA,EAAiB,8RACjBC,EAAqB,OAC5BC,EAAuB,GAMtB,SAASC,EAAgBC,EAA4B,CAI1D,GAHAA,EAAQA,EAAM,QAAQ,QAAS,EAAE,EAG7BJ,EAAe,KAAKI,CAAK,EAAG,CAC9B,IAAMC,EAAc,IAAI,KAAKD,CAAK,EAOlC,GAJKH,EAAmB,KAAKG,CAAK,GAChCC,EAAY,WAAWA,EAAY,WAAW,EAAIA,EAAY,kBAAkB,CAAC,EAG/EC,EAAYD,CAAW,EACzB,OAAOA,CAEX,CAEA,IAAIE,EAAmB,CAAC,EAGpBH,EAAM,QAAQ,GAAG,IAAM,GACzBG,EAASH,EAAM,MAAM,GAAG,EACfA,EAAM,QAAQ,GAAG,IAAM,GAChCG,EAASH,EAAM,MAAM,GAAG,GACdA,EAAM,SAAW,GAAKA,EAAM,SAAW,IAAM,CAAC,MAAM,CAACA,CAAK,IACpEG,EAAS,CAACH,EAAM,UAAU,EAAG,CAAC,EAAGA,EAAM,UAAU,EAAG,CAAC,EAAGA,EAAM,UAAU,CAAC,CAAC,GAG5E,IAAMI,EAAkBD,EAAO,SAAW,EACtC,CAACE,EAAOC,EAAKC,CAAI,EAAIJ,EAezB,GAZIE,IAAU,MACZA,EAAQ,KAENC,IAAQ,MACVA,EAAM,KAIJ,OAAOC,GAAS,UAAYA,EAAK,SAAW,IAC9CA,EAAOA,EAAK,SAAS,EAAG,GAAG,GAGzBH,EAAiB,CACnB,IAAMI,EAAqBH,EAAM,SAAW,GAAKA,EAAM,SAAW,EAC5DI,EAAmBH,EAAI,SAAW,GAAKA,EAAI,SAAW,EACtDI,EAAoBH,EAAK,SAAW,GAAKA,EAAK,SAAW,EAE/D,GAAI,CAACC,GAAsB,CAACC,GAAoB,CAACC,EAC/C,OAAO,IAEX,KACE,QAAO,KAIT,GAAIH,EAAK,SAAW,EAAG,CACrB,IAAMI,EAAU,IAAI,KAAK,EAAE,YAAY,GAAK,IAAMb,GAC5Cc,EAAU,IAAI,KAAK,EAAE,YAAY,EAAId,EACrCe,EAAiB,OAAOF,CAAO,EAAE,MAAM,EAAG,CAAC,EAC3CG,EAAiB,OAAOF,CAAO,EAAE,MAAM,EAAG,CAAC,EAC3CG,EAAoB,CAAC,OAAOH,CAAO,EAAE,MAAM,CAAC,EAClDL,EAAO,CAACA,GAAQQ,EAAoB,GAAGD,IAAiBP,IAAS,GAAGM,IAAiBN,GACvF,CAEA,IAAIS,EAAW,CAACX,EACZY,EAAS,CAACX,EACRY,EAAU,CAACX,EAEbS,EAAW,KACbA,EAAW,IAGb,IAAMG,EAAiB,IAAI,KAAKD,EAASF,EAAU,CAAC,EAAE,QAAQ,EAE1DC,EAASE,IACXF,EAASE,GAGX,IAAMC,EAAa,IAAI,KAAKF,EAASF,EAAW,EAAGC,EAAQ,EAAG,EAAG,EAAG,CAAC,EACrE,OAAOf,EAAYkB,CAAU,EAAIA,EAAa,IAChD,CAMO,SAASC,EAAWC,EAAoB,CAC7C,IAAMjB,EAAQ,OAAOiB,EAAK,SAAS,EAAI,CAAC,EAAE,SAAS,EAAG,GAAG,EACnDhB,EAAM,OAAOgB,EAAK,QAAQ,CAAC,EAAE,SAAS,EAAG,GAAG,EAC5Cf,EAAO,OAAOe,EAAK,YAAY,CAAC,EAAE,SAAS,EAAG,GAAG,EACvD,MAAO,CAACjB,EAAOC,EAAKC,CAAI,EAAE,KAAK,GAAG,CACpC,CAUO,SAASgB,EAAWC,EAAqBC,EAA+B,CAC7E,MAAI,CAACD,GAAS,CAACC,EACN,GACE,CAACD,GAAS,CAACC,GAEX,CAACvB,EAAYsB,CAAK,GAAK,CAACtB,EAAYuB,CAAM,EAD5C,GAIF,IAAI,KAAKD,CAAK,EAAE,SAAS,EAAG,EAAG,EAAG,CAAC,IAAM,IAAI,KAAKC,CAAM,EAAE,SAAS,EAAG,EAAG,EAAG,CAAC,CACtF,CASO,SAASC,EAAmBrB,EAAeE,EAAqB,CACrE,OAAO,IAAI,KAAKA,GAAA,KAAAA,EAAQ,KAAMF,EAAQ,EAAG,CAAC,CAC5C,CASO,SAASsB,EAAetB,EAAeE,EAAuB,CACnE,OAAOmB,EAAmBrB,EAAOE,CAAI,EAAE,QAAQ,CACjD,CC7IO,SAASqB,EAAoBC,EAAoBC,EAA+C,CACrG,IAAMC,EAAM,SAAS,cAAc,KAAK,EACxCA,EAAI,UAAYF,EAGhB,QAASG,EAAID,EAAI,WAAW,OAAS,EAAGC,GAAK,EAAGA,IAC1CD,EAAI,WAAWC,GAAG,SAAS,YAAY,IAAM,OAC/CD,EAAI,YAAYA,EAAI,WAAWC,EAAE,EAIrC,IAAMC,EAASF,EAAI,kBACnB,OAAIE,GAAUA,EAAO,SAAS,YAAY,IAAM,OAASC,EAAUD,CAAM,GAEnEH,GACFG,EAAO,aAAa,UAAWH,CAAc,EAI3C,CAACG,EAAO,aAAa,SAAS,GAAKH,GACrCG,EAAO,aAAa,UAAWH,CAAc,EAI/CG,EAAO,gBAAgB,QAAQ,EAC/BA,EAAO,gBAAgB,OAAO,EAEvBA,GAGF,IACT,CAMO,SAASC,EAAUC,EAAsB,CAC9C,GAAIA,EAAG,WAAa,EAClB,MAAO,GAIT,GAAIA,EAAG,SAAS,YAAY,IAAM,SAChC,MAAO,GAIT,IAAMC,EAAa,MAAM,KAAKD,EAAG,UAAU,EAC3C,QAAWE,KAAQD,EACjB,GAAI,OAAOC,EAAK,MAAS,UAAYA,EAAK,KAAK,YAAY,EAAE,WAAW,IAAI,EAC1E,MAAO,GAKX,IAAMC,EAAa,MAAM,KAAKH,EAAG,UAAU,EAC3C,QAAWI,KAAQD,EACjB,GAAI,CAACJ,EAAUK,CAAI,EACjB,MAAO,GAIX,MAAO,EACT,CCnEO,IAAMC,EAA8B,gDAC9BC,EAAyB,4DACzBC,EAAwB,qDACxBC,EAAqB,cAE3B,SAASC,EAAyBC,EAAoE,CAC3G,IAAMC,EAAUD,EAAM,MAAML,CAA2B,GAAyB,CAAC,KAAM,EAAG,EAAG,KAAM,CAAC,EAC9FO,EAAQD,EAAQ,GAChBE,EAAUF,EAAQ,GAClBG,EAAUH,EAAQ,GACxB,MAAO,CAAE,MAAAC,EAAO,QAAAC,EAAS,QAAAC,CAAQ,CACnC,CAEO,SAASC,EAAyBL,EAAsF,CAC7H,IAAMC,EAAUD,EAAM,MAAMJ,CAAsB,GAAyB,CAAC,KAAM,EAAG,EAAG,KAAM,EAAG,IAAI,EAC/FM,EAAQD,EAAQ,GAChBE,EAAUF,EAAQ,GAClBG,EAAUH,EAAQ,GAClBK,EAAWL,EAAQ,GACzB,MAAO,CAAE,MAAAC,EAAO,QAAAC,EAAS,QAAAC,EAAS,SAAAE,CAAS,CAC7C,CAEO,SAASC,EAAsBP,EAAwB,CAC5D,OAAOL,EAA4B,KAAKK,CAAK,GACtCJ,EAAuB,KAAKI,CAAK,CAC1C,CAEO,SAASQ,EAAoBC,EAAaC,EAAwBC,EAA+B,CAEtG,GADAF,EAAMA,GAAO,OAAOA,GAAQ,SAAWA,EAAI,QAAQ,QAAS,EAAE,EAAI,GAC9D,QAAQ,KAAKA,CAAG,GAAK,OAAO,KAAKA,CAAG,EACtC,MAAO,GAGT,IAAMR,EAAUQ,EAAI,MAAMZ,CAAqB,EAC/C,GAAI,CAACI,EACH,MAAO,GAGT,IAAIW,EAAWX,EAAQ,GACnBY,EAAaZ,EAAQ,GACrBa,EAAab,EAAQ,GACrBK,EAAWL,EAAQ,GAGjBc,EAAkBN,EAAI,MAAMX,CAAkB,EAChDiB,IACFT,EAAWS,EAAgB,GAC3BN,EAAMA,EAAI,QAAQH,EAAU,EAAE,EAG1BA,EAAS,SAAW,IACtBA,GAAY,MAKZG,EAAI,SAAW,GAAK,CAACA,EAAI,SAAS,GAAG,IACvCG,EAAWH,EAAI,GACfI,EAAaJ,EAAI,UAAU,CAAC,GAI1BC,EACFJ,EAAW,GACFR,EAAmB,KAAKQ,CAAQ,EACzCA,EAAWA,EAAS,YAAY,EAE5B,UAAU,KAAKA,CAAQ,EACrBA,EAAS,YAAY,EAAE,WAAW,GAAG,EACvCA,EAAW,KACFA,EAAS,YAAY,EAAE,WAAW,GAAG,IAC9CA,EAAW,MAGbA,EAAW,GAIf,IAAMU,EAAW,CAACJ,GAAY,EACxBK,EAAa,CAACJ,GAAc,EAG5BK,EAAW,CAACZ,GAAYI,EAAgB,GAAK,GAqBnD,GApBIM,GAAYE,EACdN,EAAW,OAAOM,CAAQ,EACjBF,EAAW,IACpBJ,EAAW,MAGbA,EAAWA,EAAS,SAAS,EAAG,GAAG,EAG/BC,IAAe,SACbI,EAAa,GACfJ,EAAa,KACJI,EAAa,EACtBJ,EAAa,KAEbA,EAAaA,EAAW,SAAS,EAAG,GAAG,GAKvCC,IAAe,OAAW,CAC5B,IAAMK,EAAa,CAACL,GAAc,EAC9BK,EAAa,GACfL,EAAa,KACJK,EAAa,EACtBL,EAAa,KAEbA,EAAaA,EAAW,SAAS,EAAG,GAAG,CAE3C,CAGA,IAAIM,EAAUR,EACd,OAAIC,IAAe,SACjBO,GAAW,IAAIP,IACXC,IAAe,QAAaH,IAC9BG,EAAa,OAGbA,IAAe,SACjBM,GAAW,IAAIN,KAEbR,IACFc,GAAW,IAAId,KAGVc,CACT",
|
|
6
|
+
"names": ["ISO_8601_REGEX", "ISO_TIMEZONE_REGEX", "FUTURE_YEAR_COERCION", "parseDateString", "value", "iso8601Date", "isValidDate", "values", "hasMonthDayYear", "month", "day", "year", "isValidMonthLength", "isValidDayLength", "isValidYearLength", "minYear", "maxYear", "minYearCentury", "maxYearCentury", "normalizedMaxYear", "numMonth", "numDay", "numYear", "maxDaysInMonth", "parsedDate", "formatDate", "date", "isSameDate", "first", "second", "getLastDateOfMonth", "getMonthLength", "createSvgFromString", "svgContent", "defaultViewBox", "div", "i", "svgElm", "isSafeSvg", "el", "attributes", "attr", "childNodes", "node", "TWENTY_FOUR_HOUR_TIME_REGEX", "TWELVE_HOUR_TIME_REGEX", "PARSEABLE_TIME_FORMAT", "HAS_MERIDIEM_REGEX", "tokenize24HourTimeString", "value", "matches", "hours", "minutes", "seconds", "tokenize12HourTimeString", "meridiem", "isSupportedTimeFormat", "tryCoerceTimeString", "str", "use24HourTime", "allowSeconds", "hoursStr", "minutesStr", "secondsStr", "meridiemMatches", "hoursNum", "minutesNum", "maxHours", "secondsNum", "timeStr"]
|
|
7
|
+
}
|
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
4
|
* License: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import{a as e}from"./chunk.MV327MYK.js";import{b as E}from"./chunk.EC5JFSHR.js";import{a as g}from"./chunk.
|
|
7
|
-
//# sourceMappingURL=chunk.
|
|
6
|
+
import{a as e}from"./chunk.MV327MYK.js";import{b as E}from"./chunk.EC5JFSHR.js";import{a as g}from"./chunk.B5TEOESG.js";import{c as f}from"./chunk.KYH5GKVI.js";import{a as b}from"./chunk.BESB4RGK.js";import{a as d,d as h}from"./chunk.DL7NX432.js";import{a as u,i as _,l as m}from"./chunk.LJLEPTLU.js";import{f as r,m as c,t as p}from"./chunk.4LA6HEA7.js";import{k as s,l as a}from"./chunk.J2M2MXP2.js";import{f as l}from"./chunk.MCIQXNKY.js";var o=class extends m{constructor(){super();this._toggle=!1;this._isOn=!1;this._dense=!1;this._densityLevel=5}static get observedAttributes(){return[e.attributes.IS_ON,e.attributes.DENSE,e.attributes.DENSITY_LEVEL,e.attributes.TOGGLE]}connectedCallback(){this.querySelector(e.selectors.BUTTON)?this._initialize():c(this,e.selectors.BUTTON).then(()=>this._initialize())}disconnectedCallback(){typeof this._destroyUserInteractionListener=="function"&&(this._destroyUserInteractionListener(),this._destroyUserInteractionListener=void 0),this._buttonAttrMutationObserver&&this._buttonAttrMutationObserver.disconnect(),this._rippleInstance&&this._rippleInstance.destroy()}attributeChangedCallback(t,n,i){switch(t){case e.attributes.IS_ON:this.isOn=s(i);break;case e.attributes.DENSE:this.dense=s(i);break;case e.attributes.DENSITY_LEVEL:this.densityLevel=a(i);break;case e.attributes.TOGGLE:this.toggle=s(i);break}}get toggle(){return this._toggle}set toggle(t){this._toggle=t,this._toggle?this._initializeToggle():this._destroyToggle()}get isOn(){return this._isOn}set isOn(t){this._isOn!==t&&(this._isOn=t,this._applyToggle())}get dense(){return this._dense}set dense(t){this._dense!==t&&(this._dense=t,this._applyDensity())}get densityLevel(){return this._densityLevel}set densityLevel(t){this._densityLevel!==t&&(this._densityLevel=t,this._densityLevel<=0?this._densityLevel=1:this._densityLevel>6?this._densityLevel=6:typeof this._densityLevel!="number"&&(this._densityLevel=5),this._applyDensity())}_initialize(){this._buttonElement=this.querySelector(e.selectors.BUTTON),this._buttonElement&&(this._buttonElement.classList.add(e.classes.BUTTON),this._applyToggle(),this._applyDensity(),this._toggleHandler=()=>{this._toggleValue(),_(this,e.events.CHANGE,this._isOn,!0)},this._buttonAttrMutationObserver=new MutationObserver(t=>{var n;t.some(i=>i.attributeName==="disabled")&&this._buttonElement.hasAttribute("disabled")&&((n=this._rippleInstance)==null||n.handleBlur())}),this._buttonAttrMutationObserver.observe(this._buttonElement,{attributes:!0,attributeFilter:["disabled"]}),this._toggle&&this._initializeToggle(),this._deferRippleInitialization())}async _deferRippleInitialization(){typeof this._destroyUserInteractionListener=="function"&&this._destroyUserInteractionListener();let{userInteraction:t,destroy:n}=f(this._buttonElement);this._destroyUserInteractionListener=n;let{type:i}=await t;this._destroyUserInteractionListener=void 0,this.isConnected&&(this._rippleInstance=this._createRipple(),i==="focusin"&&this._rippleInstance.handleFocus())}_createRipple(){this._rippleInstance&&this._rippleInstance.destroy();let t=new E(this._buttonElement);return t.unbounded=!0,t}_toggleValue(){this._isOn=!this._isOn,this._applyToggle()}_applyToggle(){!this._buttonElement||(p(this._buttonElement,this._isOn,e.classes.BUTTON_ON),this._toggle&&this._buttonElement.setAttribute("aria-pressed",`${this._isOn}`))}_applyDensity(){if(!!this._buttonElement){if(e.classes.DENSITY.forEach(t=>this._buttonElement.classList.remove(t)),this._dense){if(this.setAttribute(e.attributes.DENSE,""),this._buttonElement.classList.add(e.classes.BUTTON_DENSE),this._densityLevel<7&&this._densityLevel>0&&this.densityLevel!==5){let t=e.classes.DENSITY[this._densityLevel-1];this._buttonElement.classList.add(t),this.setAttribute(e.attributes.DENSITY_LEVEL,this._densityLevel.toString())}}else this.removeAttribute(e.attributes.DENSE),this._buttonElement.classList.remove(e.classes.BUTTON_DENSE);this._rippleInstance&&this._rippleInstance.layout()}}_initializeToggle(){if(!this._buttonElement)return;let t=Array.from(this._buttonElement.querySelectorAll(e.selectors.ICON));if(t.length!==2){console.error('You must specify two icons, one for "on" and one for "off".');return}if(t.forEach(n=>n.classList.add(e.classes.ICON)),!t.some(n=>n.classList.contains(e.classes.ICON_ON))){let n=t.find(i=>i.hasAttribute(e.attributes.ICON_ON));n?n.classList.add(e.classes.ICON_ON):t[0].classList.add(e.classes.ICON_ON)}this._buttonElement.addEventListener("click",this._toggleHandler),window.requestAnimationFrame(()=>{this._isOn&&(this._buttonElement.classList.add(e.classes.BUTTON_ON),this._buttonElement.setAttribute("aria-pressed",`${this._isOn}`))})}_destroyToggle(){!this._buttonElement||this._buttonElement.removeEventListener("click",this._toggleHandler)}layout(){this._rippleInstance&&this._rippleInstance.layout()}};o=l([d({name:e.elementName})],o);var v=class extends b{constructor(t){super(t)}_build(){var n;let t=document.createElement(e.elementName);if(this._buttonElement=document.createElement("button"),this._buttonElement.type="button",t.appendChild(this._buttonElement),(n=this._config.options)!=null&&n.tooltip){let i=document.createElement("forge-tooltip");i.textContent=this._config.options.tooltip,this._config.options.tooltipPosition&&(i.position=this._config.options.tooltipPosition),t.appendChild(i)}return t}get iconElement(){return this._iconElement}get disabled(){return!!this._buttonElement.disabled}set disabled(t){this._buttonElement.disabled=t}get butttonElement(){return this._buttonElement}get buttonElement(){return this._buttonElement}_configure(){this._configureIcon()}_configureIcon(){var n,i;if(!((n=this._config.options)!=null&&n.iconName))return;switch(((i=this._config.options)==null?void 0:i.iconType)||"component"){case"font":let C=Array.isArray(this._config.options.iconClass)?this._config.options.iconClass:[h];r(C,this._buttonElement),this._buttonElement.textContent=this._config.options.iconName;break;case"component":this._iconElement=document.createElement(g.elementName),this._iconElement.name=this._config.options.iconName,this._config.options.iconExternal!==void 0&&(this._iconElement.external=!!this._config.options.iconExternal),this._config.options.iconExternalType&&(this._iconElement.externalType=this._config.options.iconExternalType),this._config.options.iconClass&&r(this._config.options.iconClass,this._iconElement),this._buttonElement.appendChild(this._iconElement);break}}onClick(t){this._buttonElement.addEventListener("click",t)}onFocus(t){this._buttonElement.addEventListener("focus",n=>t(n))}onBlur(t){this._buttonElement.addEventListener("blur",n=>t(n))}};function w(){u(o)}export{o as a,v as b,w as c};
|
|
7
|
+
//# sourceMappingURL=chunk.LAM6EDW3.js.map
|
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
4
|
* License: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import{b as O}from"./chunk.EOZITZSP.js";import{d as w}from"./chunk.6D5ERZ3Y.js";import{c as k}from"./chunk.RHXQ2GMV.js";import{m as T}from"./chunk.WHQZNZHW.js";import{a as x}from"./chunk.UWYANU5D.js";import{a}from"./chunk.KTGSZEAG.js";import{a as v,b as y}from"./chunk.DL7NX432.js";import{a as m,e as _,g as n,l as h}from"./chunk.LJLEPTLU.js";import{d as c}from"./chunk.4LA6HEA7.js";import{k as d,l as g}from"./chunk.J2M2MXP2.js";import{f as i}from"./chunk.MCIQXNKY.js";var u=`${y}profile-card`,A={FULL_NAME:"full-name",EMAIL:"email",SIGN_OUT:"sign-out",PROFILE:"profile",SIGN_OUT_TEXT:"sign-out-text",PROFILE_TEXT:"profile-text",AVATAR_TEXT:"avatar-text",AVATAR_ICON:"avatar-icon",AVATAR_IMAGE_URL:"avatar-image-url",AVATAR_LETTER_COUNT:"avatar-letter-count"},E={FULL_NAME:".forge-profile-card__full-name",EMAIL:".forge-profile-card__email",AVATAR:".forge-profile-card__info-avatar > forge-avatar",ACTION_TOOLBAR:"#action-toolbar",PROFILE_BUTTON:"#profile-button",SIGN_OUT_BUTTON:"#sign-out-button"},I={SHOW_SIGN_OUT_BUTTON:!0,SHOW_PROFILE_BUTTON:!1,SIGN_OUT_BUTTON_TEXT:"Sign out",PROFILE_BUTTON_TEXT:"Profile"},B={SIGN_OUT:`${u}-sign-out`,PROFILE:`${u}-profile`},e={elementName:u,attributes:A,selectors:E,defaults:I,events:B};var l=class extends x{constructor(t){super(t);this._fullNameElement=n(t,e.selectors.FULL_NAME),this._emailElement=n(t,e.selectors.EMAIL),this._avatarElement=n(t,e.selectors.AVATAR),this._actionToolbar=n(t,e.selectors.ACTION_TOOLBAR),this._profileButton=n(t,e.selectors.PROFILE_BUTTON),this._signOutButton=n(t,e.selectors.SIGN_OUT_BUTTON)}setFullName(t){this._component.setAttribute(e.attributes.FULL_NAME,t),this._fullNameElement.textContent=t}setEmail(t){this._component.setAttribute(e.attributes.EMAIL,t),this._emailElement.textContent=t}setAvatarText(t){this._component.setAttribute(e.attributes.AVATAR_TEXT,t),this._avatarElement.text=t,c(this._avatarElement)}setAvatarIcon(t){if(t){let b=new T({props:{name:t}});this._avatarElement.replaceChildren(b.element)}else c(this._avatarElement)}setAvatarImageUrl(t){this._component.setAttribute(e.attributes.AVATAR_IMAGE_URL,t),this._avatarElement.imageUrl=t}setAvatarLetterCount(t){this._component.setAttribute(e.attributes.AVATAR_LETTER_COUNT,String(t)),this._avatarElement.letterCount=t}setActionToolbarVisibility(t){t?this._actionToolbar.style.removeProperty("display"):this._actionToolbar.style.display="none"}setProfileButtonVisibility(t){t?this._profileButton.style.removeProperty("display"):this._profileButton.style.display="none"}setSignOutButtonVisibility(t){t?this._signOutButton.style.removeProperty("display"):this._signOutButton.style.display="none"}setSignOutButtonText(t){this._signOutButton.textContent=t}setProfileButtonText(t){this._profileButton.textContent=t}setProfileButtonListener(t){this._profileButton.addEventListener("click",t)}setSignOutButtonListener(t){this._signOutButton.addEventListener("click",t)}removeProfileButtonListener(t){this._profileButton.removeEventListener("click",t)}removeSignOutButtonListener(t){this._signOutButton.removeEventListener("click",t)}requestProfileButtonFocus(){window.requestAnimationFrame(()=>this._profileButton.focus())}requestSignOutButtonFocus(){window.requestAnimationFrame(()=>this._signOutButton.focus())}};var s=class{constructor(r){this._adapter=r;this._showSignOutButton=e.defaults.SHOW_SIGN_OUT_BUTTON;this._showProfileButton=e.defaults.SHOW_PROFILE_BUTTON;this._signOutButtonText=e.defaults.SIGN_OUT_BUTTON_TEXT;this._profileButtonText=e.defaults.PROFILE_BUTTON_TEXT;this._profileListener=t=>this._onProfileButtonClick(t),this._signOutListener=t=>this._onSignOutButtonClick(t)}initialize(){this._adapter.setProfileButtonListener(this._profileListener),this._adapter.setSignOutButtonListener(this._signOutListener),(this._showSignOutButton||this._showProfileButton)&&this._requestInitialFocus(),this._setActionVisibility(),this._adapter.setSignOutButtonText(this._signOutButtonText),this._adapter.setProfileButtonText(this._profileButtonText)}_requestInitialFocus(){this._showSignOutButton?this._adapter.requestSignOutButtonFocus():this._showProfileButton&&this._adapter.requestProfileButtonFocus()}_setActionVisibility(){let r=this._showSignOutButton||this._showProfileButton;this._adapter.setActionToolbarVisibility(r),this._adapter.setSignOutButtonVisibility(this._showSignOutButton),this._adapter.setProfileButtonVisibility(this._showProfileButton)}_onProfileButtonClick(r){r.stopPropagation(),this._adapter.emitHostEvent(e.events.PROFILE)}_onSignOutButtonClick(r){r.stopPropagation(),this._adapter.emitHostEvent(e.events.SIGN_OUT)}get fullName(){return this._fullName}set fullName(r){this._fullName!==r&&(this._fullName=r,this._adapter.setFullName(this._fullName))}get email(){return this._email}set email(r){this._email!==r&&(this._email=r,this._adapter.setEmail(this._email))}get avatarText(){return this._avatarText}set avatarText(r){this._avatarText!==r&&(this._avatarText=r,this._adapter.setAvatarText(this._avatarText))}get avatarIcon(){return this._avatarIcon}set avatarIcon(r){this._avatarIcon!==r&&(this._avatarIcon=r,this._adapter.setAvatarIcon(this._avatarIcon))}get avatarImageUrl(){return this._avatarImageUrl}set avatarImageUrl(r){this._avatarImageUrl!==r&&(this._avatarImageUrl=r,this._adapter.setAvatarImageUrl(this._avatarImageUrl))}get avatarLetterCount(){return this._avatarLetterCount}set avatarLetterCount(r){this._avatarLetterCount!==r&&(this._avatarLetterCount=r,this._adapter.setAvatarLetterCount(this._avatarLetterCount))}get signOut(){return this._showSignOutButton}set signOut(r){this._showSignOutButton!==r&&(this._showSignOutButton=r,this._setActionVisibility())}get profile(){return this._showProfileButton}set profile(r){this._showProfileButton!==r&&(this._showProfileButton=r,this._setActionVisibility())}get signOutText(){return this._signOutButtonText}set signOutText(r){this._signOutButtonText!==r&&(this._signOutButtonText=r||e.defaults.SIGN_OUT_BUTTON_TEXT,this._adapter.setSignOutButtonText(this._signOutButtonText))}get profileText(){return this._profileButtonText}set profileText(r){this._profileButtonText!==r&&(this._profileButtonText=r||e.defaults.PROFILE_BUTTON_TEXT,this._adapter.setProfileButtonText(this._profileButtonText))}};var L='<template><div class="forge-profile-card" part="root"><div class="forge-profile-card__info" part="info-container"><div class="forge-profile-card__info-avatar" part="avatar-container"><forge-avatar part="avatar"></forge-avatar></div><div class="forge-profile-card__info-text" part="info-text"><div class="forge-profile-card__full-name" part="name"></div><div class="forge-profile-card__email" part="email"></div></div></div><slot></slot><forge-toolbar inverted id="action-toolbar" part="footer"><forge-button type="outlined" slot="end" style="margin-right: 8px;" part="profile-button"><button type="button" id="profile-button" aria-label="View profile" part="profile-button-element">Profile</button></forge-button><forge-button slot="end" part="sign-out-button"><button type="button" id="sign-out-button" aria-label="Sign out" part="sign-out-button-element">Sign out</button></forge-button></forge-toolbar></div></template>',N='@-webkit-keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@-webkit-keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@-webkit-keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}@keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-ripple-surface{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:transparent;will-change:transform,opacity;position:relative;outline:0;overflow:hidden}.mdc-ripple-surface::after,.mdc-ripple-surface::before{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-ripple-surface::before{-webkit-transition:opacity 15ms linear,background-color 15ms linear;transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.mdc-ripple-surface::after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.mdc-ripple-surface.mdc-ripple-upgraded::before{-webkit-transform:scale(var(--mdc-ripple-fg-scale,1));transform:scale(var(--mdc-ripple-fg-scale,1))}.mdc-ripple-surface.mdc-ripple-upgraded::after{top:0;left:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:center center;transform-origin:center center}.mdc-ripple-surface.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top,0);left:var(--mdc-ripple-left,0)}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-activation::after{-webkit-animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards;animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-deactivation::after{-webkit-animation:mdc-ripple-fg-opacity-out 150ms;animation:mdc-ripple-fg-opacity-out 150ms;-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.mdc-ripple-surface::after,.mdc-ripple-surface::before{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-ripple-surface.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded],.mdc-ripple-upgraded--unbounded{overflow:visible}.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::after,.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::before,.mdc-ripple-upgraded--unbounded::after,.mdc-ripple-upgraded--unbounded::before{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::before,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::before{top:var(--mdc-ripple-top,calc(50% - 50%));left:var(--mdc-ripple-left,calc(50% - 50%));width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface::after,.mdc-ripple-surface::before{background-color:#000;background-color:var(--mdc-ripple-color,#000)}.mdc-ripple-surface.mdc-ripple-surface--hover::before,.mdc-ripple-surface:hover::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.mdc-ripple-surface.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface:not(.mdc-ripple-upgraded):focus::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.mdc-ripple-surface:not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.mdc-ripple-surface:not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.mdc-ripple-surface.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface::after,.mdc-ripple-surface::before{--mdc-ripple-color:var(--mdc-theme-on-surface)}.mdc-elevation-overlay{position:absolute;border-radius:inherit;pointer-events:none;opacity:0;opacity:var(--mdc-elevation-overlay-opacity, 0);-webkit-transition:opacity 280ms cubic-bezier(.4, 0, .2, 1);transition:opacity 280ms cubic-bezier(.4, 0, .2, 1);background-color:#fff;background-color:var(--mdc-elevation-overlay-color,#fff)}.forge-button{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-button-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.875rem;font-size:var(--mdc-typography-button-font-size, .875rem);line-height:2.25rem;line-height:var(--mdc-typography-button-line-height, 2.25rem);font-weight:500;font-weight:var(--mdc-typography-button-font-weight,500);letter-spacing:.0892857143em;letter-spacing:var(--mdc-typography-button-letter-spacing, .0892857143em);text-decoration:none;-webkit-text-decoration:var(--mdc-typography-button-text-decoration,none);text-decoration:var(--mdc-typography-button-text-decoration,none);text-transform:uppercase;text-transform:var(--mdc-typography-button-text-transform,uppercase);position:relative;display:-webkit-inline-box;display:inline-flex;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center;-webkit-box-sizing:border-box;box-sizing:border-box;min-width:64px;border:none;outline:0;line-height:inherit;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-appearance:none;overflow:visible;vertical-align:middle}.forge-button .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}.forge-button::-moz-focus-inner{padding:0;border:0}.forge-button:active{outline:0}.forge-button:hover{cursor:pointer}.forge-button:disabled{cursor:default;pointer-events:none}.forge-button .forge-button__icon{margin-left:0;margin-right:8px;display:inline-block;font-size:1.125rem;height:1.125rem;vertical-align:top;width:1.125rem}.forge-button .forge-button__icon[dir=rtl],[dir=rtl] .forge-button .forge-button__icon{margin-left:8px;margin-right:0}.forge-button__label~.forge-button__icon{margin-left:8px;margin-right:0}.forge-button__label~.forge-button__icon[dir=rtl],[dir=rtl] .forge-button__label~.forge-button__icon{margin-left:0;margin-right:8px}svg.forge-button__icon{fill:currentColor}.forge-button--outlined .forge-button__icon,.forge-button--raised .forge-button__icon,.forge-button--unelevated .forge-button__icon{margin-left:-4px;margin-right:8px}.forge-button--outlined .forge-button__icon[dir=rtl],.forge-button--raised .forge-button__icon[dir=rtl],.forge-button--unelevated .forge-button__icon[dir=rtl],[dir=rtl] .forge-button--outlined .forge-button__icon,[dir=rtl] .forge-button--raised .forge-button__icon,[dir=rtl] .forge-button--unelevated .forge-button__icon{margin-left:8px;margin-right:-4px}.forge-button--outlined .forge-button__label~.forge-button__icon,.forge-button--raised .forge-button__label~.forge-button__icon,.forge-button--unelevated .forge-button__label~.forge-button__icon{margin-left:8px;margin-right:-4px}.forge-button--outlined .forge-button__label~.forge-button__icon[dir=rtl],.forge-button--raised .forge-button__label~.forge-button__icon[dir=rtl],.forge-button--unelevated .forge-button__label~.forge-button__icon[dir=rtl],[dir=rtl] .forge-button--outlined .forge-button__label~.forge-button__icon,[dir=rtl] .forge-button--raised .forge-button__label~.forge-button__icon,[dir=rtl] .forge-button--unelevated .forge-button__label~.forge-button__icon{margin-left:-4px;margin-right:8px}.forge-button{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:transparent;will-change:transform,opacity}.forge-button .forge-button__ripple::after,.forge-button .forge-button__ripple::before{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.forge-button .forge-button__ripple::before{-webkit-transition:opacity 15ms linear,background-color 15ms linear;transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.forge-button .forge-button__ripple::after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.forge-button.mdc-ripple-upgraded .forge-button__ripple::before{-webkit-transform:scale(var(--mdc-ripple-fg-scale,1));transform:scale(var(--mdc-ripple-fg-scale,1))}.forge-button.mdc-ripple-upgraded .forge-button__ripple::after{top:0;left:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:center center;transform-origin:center center}.forge-button.mdc-ripple-upgraded--unbounded .forge-button__ripple::after{top:var(--mdc-ripple-top,0);left:var(--mdc-ripple-left,0)}.forge-button.mdc-ripple-upgraded--foreground-activation .forge-button__ripple::after{-webkit-animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards;animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.forge-button.mdc-ripple-upgraded--foreground-deactivation .forge-button__ripple::after{-webkit-animation:mdc-ripple-fg-opacity-out 150ms;animation:mdc-ripple-fg-opacity-out 150ms;-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.forge-button .forge-button__ripple::after,.forge-button .forge-button__ripple::before{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.forge-button.mdc-ripple-upgraded .forge-button__ripple::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.forge-button .forge-button__ripple{position:absolute;-webkit-box-sizing:content-box;box-sizing:content-box;width:100%;height:100%;overflow:hidden}.forge-button:not(.forge-button--outlined) .forge-button__ripple{top:0;left:0}.forge-button--raised{-webkit-box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12);box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12);-webkit-transition:-webkit-box-shadow 280ms cubic-bezier(.4, 0, .2, 1);transition:-webkit-box-shadow 280ms cubic-bezier(.4, 0, .2, 1);transition:box-shadow 280ms cubic-bezier(.4, 0, .2, 1);transition:box-shadow 280ms cubic-bezier(.4, 0, .2, 1),-webkit-box-shadow 280ms cubic-bezier(.4, 0, .2, 1)}.forge-button--raised:focus,.forge-button--raised:hover{-webkit-box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12);box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12)}.forge-button--raised:active{-webkit-box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.forge-button--raised:disabled{-webkit-box-shadow:0 0 0 0 rgba(0,0,0,.2),0 0 0 0 rgba(0,0,0,.14),0 0 0 0 rgba(0,0,0,.12);box-shadow:0 0 0 0 rgba(0,0,0,.2),0 0 0 0 rgba(0,0,0,.14),0 0 0 0 rgba(0,0,0,.12)}.forge-button--outlined{border-style:solid}.forge-button{height:36px;border-radius:4px;border-radius:var(--mdc-shape-small,4px);padding:0 8px 0 8px}.forge-button:not(:disabled){background-color:transparent}.forge-button:disabled{background-color:transparent}.forge-button:not(:disabled){color:#3f51b5;color:var(--mdc-theme-primary,#3f51b5)}.forge-button:disabled{color:rgba(0,0,0,.38);color:var(--mdc-theme-text-disabled-on-light,rgba(0,0,0,.38))}.forge-button .forge-button__ripple::after,.forge-button .forge-button__ripple::before{background-color:#3f51b5;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#3f51b5))}.forge-button.mdc-ripple-surface--hover .forge-button__ripple::before,.forge-button:hover .forge-button__ripple::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.forge-button.mdc-ripple-upgraded--background-focused .forge-button__ripple::before,.forge-button:not(.mdc-ripple-upgraded):focus .forge-button__ripple::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.forge-button:not(.mdc-ripple-upgraded) .forge-button__ripple::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-button:not(.mdc-ripple-upgraded):active .forge-button__ripple::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.forge-button.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.forge-button .forge-button__ripple{border-radius:4px;border-radius:var(--mdc-shape-small,4px)}.forge-button--unelevated{padding:0 16px 0 16px;height:36px;border-radius:4px;border-radius:var(--mdc-shape-small,4px)}.forge-button--unelevated:not(:disabled){background-color:#3f51b5;background-color:var(--mdc-theme-primary,#3f51b5)}.forge-button--unelevated:disabled{background-color:rgba(0,0,0,.12);background-color:var(--mdc-theme-text-disabled-on-background,rgba(0,0,0,.12))}.forge-button--unelevated:not(:disabled){color:#fff;color:var(--mdc-theme-on-primary,#fff)}.forge-button--unelevated:disabled{color:rgba(0,0,0,.38);color:var(--mdc-theme-text-disabled-on-light,rgba(0,0,0,.38))}.forge-button--unelevated .forge-button__ripple::after,.forge-button--unelevated .forge-button__ripple::before{background-color:#fff;background-color:var(--mdc-ripple-color,var(--mdc-theme-on-primary,#fff))}.forge-button--unelevated.mdc-ripple-surface--hover .forge-button__ripple::before,.forge-button--unelevated:hover .forge-button__ripple::before{opacity:.08;opacity:var(--mdc-ripple-hover-opacity, .08)}.forge-button--unelevated.mdc-ripple-upgraded--background-focused .forge-button__ripple::before,.forge-button--unelevated:not(.mdc-ripple-upgraded):focus .forge-button__ripple::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.24;opacity:var(--mdc-ripple-focus-opacity, .24)}.forge-button--unelevated:not(.mdc-ripple-upgraded) .forge-button__ripple::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-button--unelevated:not(.mdc-ripple-upgraded):active .forge-button__ripple::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.24;opacity:var(--mdc-ripple-press-opacity, .24)}.forge-button--unelevated.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.24)}.forge-button--unelevated .forge-button__ripple{border-radius:4px;border-radius:var(--mdc-shape-small,4px)}.forge-button--raised{padding:0 16px 0 16px;height:36px;border-radius:4px;border-radius:var(--mdc-shape-small,4px)}.forge-button--raised:not(:disabled){background-color:#3f51b5;background-color:var(--mdc-theme-primary,#3f51b5)}.forge-button--raised:disabled{background-color:rgba(0,0,0,.12);background-color:var(--mdc-theme-text-disabled-on-background,rgba(0,0,0,.12))}.forge-button--raised:not(:disabled){color:#fff;color:var(--mdc-theme-on-primary,#fff)}.forge-button--raised:disabled{color:rgba(0,0,0,.38);color:var(--mdc-theme-text-disabled-on-light,rgba(0,0,0,.38))}.forge-button--raised .forge-button__ripple::after,.forge-button--raised .forge-button__ripple::before{background-color:#fff;background-color:var(--mdc-ripple-color,var(--mdc-theme-on-primary,#fff))}.forge-button--raised.mdc-ripple-surface--hover .forge-button__ripple::before,.forge-button--raised:hover .forge-button__ripple::before{opacity:.08;opacity:var(--mdc-ripple-hover-opacity, .08)}.forge-button--raised.mdc-ripple-upgraded--background-focused .forge-button__ripple::before,.forge-button--raised:not(.mdc-ripple-upgraded):focus .forge-button__ripple::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.24;opacity:var(--mdc-ripple-focus-opacity, .24)}.forge-button--raised:not(.mdc-ripple-upgraded) .forge-button__ripple::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-button--raised:not(.mdc-ripple-upgraded):active .forge-button__ripple::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.24;opacity:var(--mdc-ripple-press-opacity, .24)}.forge-button--raised.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.24)}.forge-button--raised .forge-button__ripple{border-radius:4px;border-radius:var(--mdc-shape-small,4px)}.forge-button--outlined{height:36px;border-radius:4px;border-radius:var(--mdc-shape-small,4px);padding:0 15px 0 15px;border-width:1px}.forge-button--outlined:not(:disabled){background-color:transparent}.forge-button--outlined:disabled{background-color:transparent}.forge-button--outlined:not(:disabled){color:#3f51b5;color:var(--mdc-theme-primary,#3f51b5)}.forge-button--outlined:disabled{color:rgba(0,0,0,.38);color:var(--mdc-theme-text-disabled-on-light,rgba(0,0,0,.38))}.forge-button--outlined .forge-button__ripple::after,.forge-button--outlined .forge-button__ripple::before{background-color:#3f51b5;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#3f51b5))}.forge-button--outlined.mdc-ripple-surface--hover .forge-button__ripple::before,.forge-button--outlined:hover .forge-button__ripple::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.forge-button--outlined.mdc-ripple-upgraded--background-focused .forge-button__ripple::before,.forge-button--outlined:not(.mdc-ripple-upgraded):focus .forge-button__ripple::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.forge-button--outlined:not(.mdc-ripple-upgraded) .forge-button__ripple::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-button--outlined:not(.mdc-ripple-upgraded):active .forge-button__ripple::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.forge-button--outlined.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.forge-button--outlined .forge-button__ripple{border-radius:4px;border-radius:var(--mdc-shape-small,4px)}.forge-button--outlined:not(:disabled){border-color:#3f51b5;border-color:var(--mdc-theme-primary,#3f51b5)}.forge-button--outlined:disabled{border-color:rgba(0,0,0,.12);border-color:var(--mdc-theme-text-disabled-on-background,rgba(0,0,0,.12))}.forge-button--outlined .forge-button__ripple{top:-1px;left:-1px;border:1px solid transparent}.forge-button--dense{height:24px;margin-top:0;margin-bottom:0;height:1.5rem}forge-button{display:inline-block}forge-button[hidden]{display:none}forge-button[disabled]{cursor:not-allowed}a.forge-hyperlink{color:#3f51b5;color:var(--mdc-theme-primary,#3f51b5);text-decoration:underline;cursor:pointer}a.forge-hyperlink:visited{color:#3f51b5;color:var(--mdc-theme-primary,#3f51b5)}a.forge-hyperlink[disabled]{pointer-events:none;cursor:default}button.forge-hyperlink{color:#3f51b5;color:var(--mdc-theme-primary,#3f51b5);cursor:pointer;border:none;background-color:transparent;font-size:inherit;padding:0;outline:0;text-align:left}button.forge-hyperlink[disabled]{pointer-events:none;cursor:default}button.forge-hyperlink:hover:not([disabled]){text-decoration:underline}.forge-profile-card{min-width:360px;border-radius:4px}@media (max-width:399px){.forge-profile-card{width:100vw;min-width:unset;overflow:auto}}.forge-profile-card__info{padding:8px 16px;display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center}.forge-profile-card__info-avatar{display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;padding:8px;margin-right:16px;--forge-avatar-size:56px}.forge-profile-card__info-text{display:-webkit-box;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;-webkit-box-align:start;align-items:flex-start}.forge-profile-card__full-name{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-size:1rem;font-size:var(--forge-typography-subtitle1-secondary-font-size, 1rem);line-height:1.75rem;line-height:var(--forge-typography-subtitle1-secondary-line-height, 1.75rem);font-weight:500;font-weight:var(--forge-typography-subtitle1-secondary-font-weight,500);letter-spacing:.01em;letter-spacing:var(--forge-typography-subtitle1-secondary-letter-spacing, .01em);text-decoration:inherit;-webkit-text-decoration:var(--forge-typography-subtitle1-secondary-text-decoration,inherit);text-decoration:var(--forge-typography-subtitle1-secondary-text-decoration,inherit);text-transform:inherit;text-transform:var(--forge-typography-subtitle1-secondary-text-transform,inherit);line-height:1.25rem}.forge-profile-card__email{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-subtitle2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.875rem;font-size:var(--mdc-typography-subtitle2-font-size, .875rem);line-height:1.375rem;line-height:var(--mdc-typography-subtitle2-line-height, 1.375rem);font-weight:500;font-weight:var(--mdc-typography-subtitle2-font-weight,500);letter-spacing:.0071428571em;letter-spacing:var(--mdc-typography-subtitle2-letter-spacing, .0071428571em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-subtitle2-text-decoration,inherit);text-decoration:var(--mdc-typography-subtitle2-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle2-text-transform,inherit);color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54))}forge-toolbar#action-toolbar::part(root){border-bottom-left-radius:4px;border-bottom-right-radius:4px}:host{display:inline}:host([hidden]){display:none}forge-toolbar{--mdc-theme-surface:var(--forge-theme-elevated-surface)}',o=class extends h{constructor(){super();_(this,L,N),this._foundation=new s(new l(this))}static get observedAttributes(){return[e.attributes.FULL_NAME,e.attributes.EMAIL,e.attributes.SIGN_OUT,e.attributes.PROFILE,e.attributes.SIGN_OUT_TEXT,e.attributes.PROFILE_TEXT,e.attributes.AVATAR_TEXT,e.attributes.AVATAR_ICON,e.attributes.AVATAR_IMAGE_URL,e.attributes.AVATAR_LETTER_COUNT]}connectedCallback(){this._foundation.initialize()}attributeChangedCallback(t,b,p){switch(t){case e.attributes.FULL_NAME:this.fullName=p;break;case e.attributes.EMAIL:this.email=p;break;case e.attributes.SIGN_OUT:this.signOut=d(e.attributes.SIGN_OUT);break;case e.attributes.PROFILE:this.profile=d(e.attributes.PROFILE);break;case e.attributes.SIGN_OUT_TEXT:this.signOutText=e.attributes.SIGN_OUT_TEXT;break;case e.attributes.PROFILE_TEXT:this.profileText=e.attributes.PROFILE_TEXT;break;case e.attributes.AVATAR_TEXT:this.avatarText=p;break;case e.attributes.AVATAR_ICON:this.avatarIcon=p;break;case e.attributes.AVATAR_IMAGE_URL:this.avatarImageUrl=p;break;case e.attributes.AVATAR_LETTER_COUNT:this.avatarLetterCount=g(p);break}}};i([a()],o.prototype,"fullName",2),i([a()],o.prototype,"email",2),i([a()],o.prototype,"signOut",2),i([a()],o.prototype,"profile",2),i([a()],o.prototype,"signOutText",2),i([a()],o.prototype,"profileText",2),i([a()],o.prototype,"avatarText",2),i([a()],o.prototype,"avatarIcon",2),i([a()],o.prototype,"avatarImageUrl",2),i([a()],o.prototype,"avatarLetterCount",2),o=i([v({name:e.elementName,dependencies:[O,k,w]})],o);function tt(){m(o)}export{e as a,l as b,s as c,o as d,tt as e};
|
|
7
|
-
//# sourceMappingURL=chunk.
|
|
6
|
+
import{b as O}from"./chunk.EOZITZSP.js";import{d as w}from"./chunk.6D5ERZ3Y.js";import{c as k}from"./chunk.RHXQ2GMV.js";import{m as T}from"./chunk.B5TEOESG.js";import{a as x}from"./chunk.UWYANU5D.js";import{a}from"./chunk.KTGSZEAG.js";import{a as v,b as y}from"./chunk.DL7NX432.js";import{a as m,e as _,g as n,l as h}from"./chunk.LJLEPTLU.js";import{d as c}from"./chunk.4LA6HEA7.js";import{k as d,l as g}from"./chunk.J2M2MXP2.js";import{f as i}from"./chunk.MCIQXNKY.js";var u=`${y}profile-card`,A={FULL_NAME:"full-name",EMAIL:"email",SIGN_OUT:"sign-out",PROFILE:"profile",SIGN_OUT_TEXT:"sign-out-text",PROFILE_TEXT:"profile-text",AVATAR_TEXT:"avatar-text",AVATAR_ICON:"avatar-icon",AVATAR_IMAGE_URL:"avatar-image-url",AVATAR_LETTER_COUNT:"avatar-letter-count"},E={FULL_NAME:".forge-profile-card__full-name",EMAIL:".forge-profile-card__email",AVATAR:".forge-profile-card__info-avatar > forge-avatar",ACTION_TOOLBAR:"#action-toolbar",PROFILE_BUTTON:"#profile-button",SIGN_OUT_BUTTON:"#sign-out-button"},I={SHOW_SIGN_OUT_BUTTON:!0,SHOW_PROFILE_BUTTON:!1,SIGN_OUT_BUTTON_TEXT:"Sign out",PROFILE_BUTTON_TEXT:"Profile"},B={SIGN_OUT:`${u}-sign-out`,PROFILE:`${u}-profile`},e={elementName:u,attributes:A,selectors:E,defaults:I,events:B};var l=class extends x{constructor(t){super(t);this._fullNameElement=n(t,e.selectors.FULL_NAME),this._emailElement=n(t,e.selectors.EMAIL),this._avatarElement=n(t,e.selectors.AVATAR),this._actionToolbar=n(t,e.selectors.ACTION_TOOLBAR),this._profileButton=n(t,e.selectors.PROFILE_BUTTON),this._signOutButton=n(t,e.selectors.SIGN_OUT_BUTTON)}setFullName(t){this._component.setAttribute(e.attributes.FULL_NAME,t),this._fullNameElement.textContent=t}setEmail(t){this._component.setAttribute(e.attributes.EMAIL,t),this._emailElement.textContent=t}setAvatarText(t){this._component.setAttribute(e.attributes.AVATAR_TEXT,t),this._avatarElement.text=t,c(this._avatarElement)}setAvatarIcon(t){if(t){let b=new T({props:{name:t}});this._avatarElement.replaceChildren(b.element)}else c(this._avatarElement)}setAvatarImageUrl(t){this._component.setAttribute(e.attributes.AVATAR_IMAGE_URL,t),this._avatarElement.imageUrl=t}setAvatarLetterCount(t){this._component.setAttribute(e.attributes.AVATAR_LETTER_COUNT,String(t)),this._avatarElement.letterCount=t}setActionToolbarVisibility(t){t?this._actionToolbar.style.removeProperty("display"):this._actionToolbar.style.display="none"}setProfileButtonVisibility(t){t?this._profileButton.style.removeProperty("display"):this._profileButton.style.display="none"}setSignOutButtonVisibility(t){t?this._signOutButton.style.removeProperty("display"):this._signOutButton.style.display="none"}setSignOutButtonText(t){this._signOutButton.textContent=t}setProfileButtonText(t){this._profileButton.textContent=t}setProfileButtonListener(t){this._profileButton.addEventListener("click",t)}setSignOutButtonListener(t){this._signOutButton.addEventListener("click",t)}removeProfileButtonListener(t){this._profileButton.removeEventListener("click",t)}removeSignOutButtonListener(t){this._signOutButton.removeEventListener("click",t)}requestProfileButtonFocus(){window.requestAnimationFrame(()=>this._profileButton.focus())}requestSignOutButtonFocus(){window.requestAnimationFrame(()=>this._signOutButton.focus())}};var s=class{constructor(r){this._adapter=r;this._showSignOutButton=e.defaults.SHOW_SIGN_OUT_BUTTON;this._showProfileButton=e.defaults.SHOW_PROFILE_BUTTON;this._signOutButtonText=e.defaults.SIGN_OUT_BUTTON_TEXT;this._profileButtonText=e.defaults.PROFILE_BUTTON_TEXT;this._profileListener=t=>this._onProfileButtonClick(t),this._signOutListener=t=>this._onSignOutButtonClick(t)}initialize(){this._adapter.setProfileButtonListener(this._profileListener),this._adapter.setSignOutButtonListener(this._signOutListener),(this._showSignOutButton||this._showProfileButton)&&this._requestInitialFocus(),this._setActionVisibility(),this._adapter.setSignOutButtonText(this._signOutButtonText),this._adapter.setProfileButtonText(this._profileButtonText)}_requestInitialFocus(){this._showSignOutButton?this._adapter.requestSignOutButtonFocus():this._showProfileButton&&this._adapter.requestProfileButtonFocus()}_setActionVisibility(){let r=this._showSignOutButton||this._showProfileButton;this._adapter.setActionToolbarVisibility(r),this._adapter.setSignOutButtonVisibility(this._showSignOutButton),this._adapter.setProfileButtonVisibility(this._showProfileButton)}_onProfileButtonClick(r){r.stopPropagation(),this._adapter.emitHostEvent(e.events.PROFILE)}_onSignOutButtonClick(r){r.stopPropagation(),this._adapter.emitHostEvent(e.events.SIGN_OUT)}get fullName(){return this._fullName}set fullName(r){this._fullName!==r&&(this._fullName=r,this._adapter.setFullName(this._fullName))}get email(){return this._email}set email(r){this._email!==r&&(this._email=r,this._adapter.setEmail(this._email))}get avatarText(){return this._avatarText}set avatarText(r){this._avatarText!==r&&(this._avatarText=r,this._adapter.setAvatarText(this._avatarText))}get avatarIcon(){return this._avatarIcon}set avatarIcon(r){this._avatarIcon!==r&&(this._avatarIcon=r,this._adapter.setAvatarIcon(this._avatarIcon))}get avatarImageUrl(){return this._avatarImageUrl}set avatarImageUrl(r){this._avatarImageUrl!==r&&(this._avatarImageUrl=r,this._adapter.setAvatarImageUrl(this._avatarImageUrl))}get avatarLetterCount(){return this._avatarLetterCount}set avatarLetterCount(r){this._avatarLetterCount!==r&&(this._avatarLetterCount=r,this._adapter.setAvatarLetterCount(this._avatarLetterCount))}get signOut(){return this._showSignOutButton}set signOut(r){this._showSignOutButton!==r&&(this._showSignOutButton=r,this._setActionVisibility())}get profile(){return this._showProfileButton}set profile(r){this._showProfileButton!==r&&(this._showProfileButton=r,this._setActionVisibility())}get signOutText(){return this._signOutButtonText}set signOutText(r){this._signOutButtonText!==r&&(this._signOutButtonText=r||e.defaults.SIGN_OUT_BUTTON_TEXT,this._adapter.setSignOutButtonText(this._signOutButtonText))}get profileText(){return this._profileButtonText}set profileText(r){this._profileButtonText!==r&&(this._profileButtonText=r||e.defaults.PROFILE_BUTTON_TEXT,this._adapter.setProfileButtonText(this._profileButtonText))}};var L='<template><div class="forge-profile-card" part="root"><div class="forge-profile-card__info" part="info-container"><div class="forge-profile-card__info-avatar" part="avatar-container"><forge-avatar part="avatar"></forge-avatar></div><div class="forge-profile-card__info-text" part="info-text"><div class="forge-profile-card__full-name" part="name"></div><div class="forge-profile-card__email" part="email"></div></div></div><slot></slot><forge-toolbar inverted id="action-toolbar" part="footer"><forge-button type="outlined" slot="end" style="margin-right: 8px;" part="profile-button"><button type="button" id="profile-button" aria-label="View profile" part="profile-button-element">Profile</button></forge-button><forge-button slot="end" part="sign-out-button"><button type="button" id="sign-out-button" aria-label="Sign out" part="sign-out-button-element">Sign out</button></forge-button></forge-toolbar></div></template>',N='@-webkit-keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@-webkit-keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@-webkit-keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}@keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-ripple-surface{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:transparent;will-change:transform,opacity;position:relative;outline:0;overflow:hidden}.mdc-ripple-surface::after,.mdc-ripple-surface::before{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-ripple-surface::before{-webkit-transition:opacity 15ms linear,background-color 15ms linear;transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.mdc-ripple-surface::after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.mdc-ripple-surface.mdc-ripple-upgraded::before{-webkit-transform:scale(var(--mdc-ripple-fg-scale,1));transform:scale(var(--mdc-ripple-fg-scale,1))}.mdc-ripple-surface.mdc-ripple-upgraded::after{top:0;left:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:center center;transform-origin:center center}.mdc-ripple-surface.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top,0);left:var(--mdc-ripple-left,0)}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-activation::after{-webkit-animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards;animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-deactivation::after{-webkit-animation:mdc-ripple-fg-opacity-out 150ms;animation:mdc-ripple-fg-opacity-out 150ms;-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.mdc-ripple-surface::after,.mdc-ripple-surface::before{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-ripple-surface.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded],.mdc-ripple-upgraded--unbounded{overflow:visible}.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::after,.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::before,.mdc-ripple-upgraded--unbounded::after,.mdc-ripple-upgraded--unbounded::before{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::before,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::before{top:var(--mdc-ripple-top,calc(50% - 50%));left:var(--mdc-ripple-left,calc(50% - 50%));width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface::after,.mdc-ripple-surface::before{background-color:#000;background-color:var(--mdc-ripple-color,#000)}.mdc-ripple-surface.mdc-ripple-surface--hover::before,.mdc-ripple-surface:hover::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.mdc-ripple-surface.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface:not(.mdc-ripple-upgraded):focus::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.mdc-ripple-surface:not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.mdc-ripple-surface:not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.mdc-ripple-surface.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface::after,.mdc-ripple-surface::before{--mdc-ripple-color:var(--mdc-theme-on-surface)}.mdc-elevation-overlay{position:absolute;border-radius:inherit;pointer-events:none;opacity:0;opacity:var(--mdc-elevation-overlay-opacity, 0);-webkit-transition:opacity 280ms cubic-bezier(.4, 0, .2, 1);transition:opacity 280ms cubic-bezier(.4, 0, .2, 1);background-color:#fff;background-color:var(--mdc-elevation-overlay-color,#fff)}.forge-button{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-button-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.875rem;font-size:var(--mdc-typography-button-font-size, .875rem);line-height:2.25rem;line-height:var(--mdc-typography-button-line-height, 2.25rem);font-weight:500;font-weight:var(--mdc-typography-button-font-weight,500);letter-spacing:.0892857143em;letter-spacing:var(--mdc-typography-button-letter-spacing, .0892857143em);text-decoration:none;-webkit-text-decoration:var(--mdc-typography-button-text-decoration,none);text-decoration:var(--mdc-typography-button-text-decoration,none);text-transform:uppercase;text-transform:var(--mdc-typography-button-text-transform,uppercase);position:relative;display:-webkit-inline-box;display:inline-flex;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center;-webkit-box-sizing:border-box;box-sizing:border-box;min-width:64px;border:none;outline:0;line-height:inherit;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-appearance:none;overflow:visible;vertical-align:middle}.forge-button .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}.forge-button::-moz-focus-inner{padding:0;border:0}.forge-button:active{outline:0}.forge-button:hover{cursor:pointer}.forge-button:disabled{cursor:default;pointer-events:none}.forge-button .forge-button__icon{margin-left:0;margin-right:8px;display:inline-block;font-size:1.125rem;height:1.125rem;vertical-align:top;width:1.125rem}.forge-button .forge-button__icon[dir=rtl],[dir=rtl] .forge-button .forge-button__icon{margin-left:8px;margin-right:0}.forge-button__label~.forge-button__icon{margin-left:8px;margin-right:0}.forge-button__label~.forge-button__icon[dir=rtl],[dir=rtl] .forge-button__label~.forge-button__icon{margin-left:0;margin-right:8px}svg.forge-button__icon{fill:currentColor}.forge-button--outlined .forge-button__icon,.forge-button--raised .forge-button__icon,.forge-button--unelevated .forge-button__icon{margin-left:-4px;margin-right:8px}.forge-button--outlined .forge-button__icon[dir=rtl],.forge-button--raised .forge-button__icon[dir=rtl],.forge-button--unelevated .forge-button__icon[dir=rtl],[dir=rtl] .forge-button--outlined .forge-button__icon,[dir=rtl] .forge-button--raised .forge-button__icon,[dir=rtl] .forge-button--unelevated .forge-button__icon{margin-left:8px;margin-right:-4px}.forge-button--outlined .forge-button__label~.forge-button__icon,.forge-button--raised .forge-button__label~.forge-button__icon,.forge-button--unelevated .forge-button__label~.forge-button__icon{margin-left:8px;margin-right:-4px}.forge-button--outlined .forge-button__label~.forge-button__icon[dir=rtl],.forge-button--raised .forge-button__label~.forge-button__icon[dir=rtl],.forge-button--unelevated .forge-button__label~.forge-button__icon[dir=rtl],[dir=rtl] .forge-button--outlined .forge-button__label~.forge-button__icon,[dir=rtl] .forge-button--raised .forge-button__label~.forge-button__icon,[dir=rtl] .forge-button--unelevated .forge-button__label~.forge-button__icon{margin-left:-4px;margin-right:8px}.forge-button{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:transparent;will-change:transform,opacity}.forge-button .forge-button__ripple::after,.forge-button .forge-button__ripple::before{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.forge-button .forge-button__ripple::before{-webkit-transition:opacity 15ms linear,background-color 15ms linear;transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.forge-button .forge-button__ripple::after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.forge-button.mdc-ripple-upgraded .forge-button__ripple::before{-webkit-transform:scale(var(--mdc-ripple-fg-scale,1));transform:scale(var(--mdc-ripple-fg-scale,1))}.forge-button.mdc-ripple-upgraded .forge-button__ripple::after{top:0;left:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:center center;transform-origin:center center}.forge-button.mdc-ripple-upgraded--unbounded .forge-button__ripple::after{top:var(--mdc-ripple-top,0);left:var(--mdc-ripple-left,0)}.forge-button.mdc-ripple-upgraded--foreground-activation .forge-button__ripple::after{-webkit-animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards;animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.forge-button.mdc-ripple-upgraded--foreground-deactivation .forge-button__ripple::after{-webkit-animation:mdc-ripple-fg-opacity-out 150ms;animation:mdc-ripple-fg-opacity-out 150ms;-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.forge-button .forge-button__ripple::after,.forge-button .forge-button__ripple::before{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.forge-button.mdc-ripple-upgraded .forge-button__ripple::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.forge-button .forge-button__ripple{position:absolute;-webkit-box-sizing:content-box;box-sizing:content-box;width:100%;height:100%;overflow:hidden}.forge-button:not(.forge-button--outlined) .forge-button__ripple{top:0;left:0}.forge-button--raised{-webkit-box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12);box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12);-webkit-transition:-webkit-box-shadow 280ms cubic-bezier(.4, 0, .2, 1);transition:-webkit-box-shadow 280ms cubic-bezier(.4, 0, .2, 1);transition:box-shadow 280ms cubic-bezier(.4, 0, .2, 1);transition:box-shadow 280ms cubic-bezier(.4, 0, .2, 1),-webkit-box-shadow 280ms cubic-bezier(.4, 0, .2, 1)}.forge-button--raised:focus,.forge-button--raised:hover{-webkit-box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12);box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12)}.forge-button--raised:active{-webkit-box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.forge-button--raised:disabled{-webkit-box-shadow:0 0 0 0 rgba(0,0,0,.2),0 0 0 0 rgba(0,0,0,.14),0 0 0 0 rgba(0,0,0,.12);box-shadow:0 0 0 0 rgba(0,0,0,.2),0 0 0 0 rgba(0,0,0,.14),0 0 0 0 rgba(0,0,0,.12)}.forge-button--outlined{border-style:solid}.forge-button{height:36px;border-radius:4px;border-radius:var(--mdc-shape-small,4px);padding:0 8px 0 8px}.forge-button:not(:disabled){background-color:transparent}.forge-button:disabled{background-color:transparent}.forge-button:not(:disabled){color:#3f51b5;color:var(--mdc-theme-primary,#3f51b5)}.forge-button:disabled{color:rgba(0,0,0,.38);color:var(--mdc-theme-text-disabled-on-light,rgba(0,0,0,.38))}.forge-button .forge-button__ripple::after,.forge-button .forge-button__ripple::before{background-color:#3f51b5;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#3f51b5))}.forge-button.mdc-ripple-surface--hover .forge-button__ripple::before,.forge-button:hover .forge-button__ripple::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.forge-button.mdc-ripple-upgraded--background-focused .forge-button__ripple::before,.forge-button:not(.mdc-ripple-upgraded):focus .forge-button__ripple::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.forge-button:not(.mdc-ripple-upgraded) .forge-button__ripple::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-button:not(.mdc-ripple-upgraded):active .forge-button__ripple::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.forge-button.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.forge-button .forge-button__ripple{border-radius:4px;border-radius:var(--mdc-shape-small,4px)}.forge-button--unelevated{padding:0 16px 0 16px;height:36px;border-radius:4px;border-radius:var(--mdc-shape-small,4px)}.forge-button--unelevated:not(:disabled){background-color:#3f51b5;background-color:var(--mdc-theme-primary,#3f51b5)}.forge-button--unelevated:disabled{background-color:rgba(0,0,0,.12);background-color:var(--mdc-theme-text-disabled-on-background,rgba(0,0,0,.12))}.forge-button--unelevated:not(:disabled){color:#fff;color:var(--mdc-theme-on-primary,#fff)}.forge-button--unelevated:disabled{color:rgba(0,0,0,.38);color:var(--mdc-theme-text-disabled-on-light,rgba(0,0,0,.38))}.forge-button--unelevated .forge-button__ripple::after,.forge-button--unelevated .forge-button__ripple::before{background-color:#fff;background-color:var(--mdc-ripple-color,var(--mdc-theme-on-primary,#fff))}.forge-button--unelevated.mdc-ripple-surface--hover .forge-button__ripple::before,.forge-button--unelevated:hover .forge-button__ripple::before{opacity:.08;opacity:var(--mdc-ripple-hover-opacity, .08)}.forge-button--unelevated.mdc-ripple-upgraded--background-focused .forge-button__ripple::before,.forge-button--unelevated:not(.mdc-ripple-upgraded):focus .forge-button__ripple::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.24;opacity:var(--mdc-ripple-focus-opacity, .24)}.forge-button--unelevated:not(.mdc-ripple-upgraded) .forge-button__ripple::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-button--unelevated:not(.mdc-ripple-upgraded):active .forge-button__ripple::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.24;opacity:var(--mdc-ripple-press-opacity, .24)}.forge-button--unelevated.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.24)}.forge-button--unelevated .forge-button__ripple{border-radius:4px;border-radius:var(--mdc-shape-small,4px)}.forge-button--raised{padding:0 16px 0 16px;height:36px;border-radius:4px;border-radius:var(--mdc-shape-small,4px)}.forge-button--raised:not(:disabled){background-color:#3f51b5;background-color:var(--mdc-theme-primary,#3f51b5)}.forge-button--raised:disabled{background-color:rgba(0,0,0,.12);background-color:var(--mdc-theme-text-disabled-on-background,rgba(0,0,0,.12))}.forge-button--raised:not(:disabled){color:#fff;color:var(--mdc-theme-on-primary,#fff)}.forge-button--raised:disabled{color:rgba(0,0,0,.38);color:var(--mdc-theme-text-disabled-on-light,rgba(0,0,0,.38))}.forge-button--raised .forge-button__ripple::after,.forge-button--raised .forge-button__ripple::before{background-color:#fff;background-color:var(--mdc-ripple-color,var(--mdc-theme-on-primary,#fff))}.forge-button--raised.mdc-ripple-surface--hover .forge-button__ripple::before,.forge-button--raised:hover .forge-button__ripple::before{opacity:.08;opacity:var(--mdc-ripple-hover-opacity, .08)}.forge-button--raised.mdc-ripple-upgraded--background-focused .forge-button__ripple::before,.forge-button--raised:not(.mdc-ripple-upgraded):focus .forge-button__ripple::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.24;opacity:var(--mdc-ripple-focus-opacity, .24)}.forge-button--raised:not(.mdc-ripple-upgraded) .forge-button__ripple::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-button--raised:not(.mdc-ripple-upgraded):active .forge-button__ripple::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.24;opacity:var(--mdc-ripple-press-opacity, .24)}.forge-button--raised.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.24)}.forge-button--raised .forge-button__ripple{border-radius:4px;border-radius:var(--mdc-shape-small,4px)}.forge-button--outlined{height:36px;border-radius:4px;border-radius:var(--mdc-shape-small,4px);padding:0 15px 0 15px;border-width:1px}.forge-button--outlined:not(:disabled){background-color:transparent}.forge-button--outlined:disabled{background-color:transparent}.forge-button--outlined:not(:disabled){color:#3f51b5;color:var(--mdc-theme-primary,#3f51b5)}.forge-button--outlined:disabled{color:rgba(0,0,0,.38);color:var(--mdc-theme-text-disabled-on-light,rgba(0,0,0,.38))}.forge-button--outlined .forge-button__ripple::after,.forge-button--outlined .forge-button__ripple::before{background-color:#3f51b5;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#3f51b5))}.forge-button--outlined.mdc-ripple-surface--hover .forge-button__ripple::before,.forge-button--outlined:hover .forge-button__ripple::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.forge-button--outlined.mdc-ripple-upgraded--background-focused .forge-button__ripple::before,.forge-button--outlined:not(.mdc-ripple-upgraded):focus .forge-button__ripple::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.forge-button--outlined:not(.mdc-ripple-upgraded) .forge-button__ripple::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-button--outlined:not(.mdc-ripple-upgraded):active .forge-button__ripple::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.forge-button--outlined.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.forge-button--outlined .forge-button__ripple{border-radius:4px;border-radius:var(--mdc-shape-small,4px)}.forge-button--outlined:not(:disabled){border-color:#3f51b5;border-color:var(--mdc-theme-primary,#3f51b5)}.forge-button--outlined:disabled{border-color:rgba(0,0,0,.12);border-color:var(--mdc-theme-text-disabled-on-background,rgba(0,0,0,.12))}.forge-button--outlined .forge-button__ripple{top:-1px;left:-1px;border:1px solid transparent}.forge-button--dense{height:24px;margin-top:0;margin-bottom:0;height:1.5rem}forge-button{display:inline-block}forge-button[hidden]{display:none}forge-button[disabled]{cursor:not-allowed}a.forge-hyperlink{color:#3f51b5;color:var(--mdc-theme-primary,#3f51b5);text-decoration:underline;cursor:pointer}a.forge-hyperlink:visited{color:#3f51b5;color:var(--mdc-theme-primary,#3f51b5)}a.forge-hyperlink[disabled]{pointer-events:none;cursor:default}button.forge-hyperlink{color:#3f51b5;color:var(--mdc-theme-primary,#3f51b5);cursor:pointer;border:none;background-color:transparent;font-size:inherit;padding:0;outline:0;text-align:left}button.forge-hyperlink[disabled]{pointer-events:none;cursor:default}button.forge-hyperlink:hover:not([disabled]){text-decoration:underline}.forge-profile-card{min-width:360px;border-radius:4px}@media (max-width:399px){.forge-profile-card{width:100vw;min-width:unset;overflow:auto}}.forge-profile-card__info{padding:8px 16px;display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center}.forge-profile-card__info-avatar{display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;padding:8px;margin-right:16px;--forge-avatar-size:56px}.forge-profile-card__info-text{display:-webkit-box;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;-webkit-box-align:start;align-items:flex-start}.forge-profile-card__full-name{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-size:1rem;font-size:var(--forge-typography-subtitle1-secondary-font-size, 1rem);line-height:1.75rem;line-height:var(--forge-typography-subtitle1-secondary-line-height, 1.75rem);font-weight:500;font-weight:var(--forge-typography-subtitle1-secondary-font-weight,500);letter-spacing:.01em;letter-spacing:var(--forge-typography-subtitle1-secondary-letter-spacing, .01em);text-decoration:inherit;-webkit-text-decoration:var(--forge-typography-subtitle1-secondary-text-decoration,inherit);text-decoration:var(--forge-typography-subtitle1-secondary-text-decoration,inherit);text-transform:inherit;text-transform:var(--forge-typography-subtitle1-secondary-text-transform,inherit);line-height:1.25rem}.forge-profile-card__email{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-subtitle2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.875rem;font-size:var(--mdc-typography-subtitle2-font-size, .875rem);line-height:1.375rem;line-height:var(--mdc-typography-subtitle2-line-height, 1.375rem);font-weight:500;font-weight:var(--mdc-typography-subtitle2-font-weight,500);letter-spacing:.0071428571em;letter-spacing:var(--mdc-typography-subtitle2-letter-spacing, .0071428571em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-subtitle2-text-decoration,inherit);text-decoration:var(--mdc-typography-subtitle2-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle2-text-transform,inherit);color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54))}forge-toolbar#action-toolbar::part(root){border-bottom-left-radius:4px;border-bottom-right-radius:4px}:host{display:inline}:host([hidden]){display:none}forge-toolbar{--mdc-theme-surface:var(--forge-theme-elevated-surface)}',o=class extends h{constructor(){super();_(this,L,N),this._foundation=new s(new l(this))}static get observedAttributes(){return[e.attributes.FULL_NAME,e.attributes.EMAIL,e.attributes.SIGN_OUT,e.attributes.PROFILE,e.attributes.SIGN_OUT_TEXT,e.attributes.PROFILE_TEXT,e.attributes.AVATAR_TEXT,e.attributes.AVATAR_ICON,e.attributes.AVATAR_IMAGE_URL,e.attributes.AVATAR_LETTER_COUNT]}connectedCallback(){this._foundation.initialize()}attributeChangedCallback(t,b,p){switch(t){case e.attributes.FULL_NAME:this.fullName=p;break;case e.attributes.EMAIL:this.email=p;break;case e.attributes.SIGN_OUT:this.signOut=d(e.attributes.SIGN_OUT);break;case e.attributes.PROFILE:this.profile=d(e.attributes.PROFILE);break;case e.attributes.SIGN_OUT_TEXT:this.signOutText=e.attributes.SIGN_OUT_TEXT;break;case e.attributes.PROFILE_TEXT:this.profileText=e.attributes.PROFILE_TEXT;break;case e.attributes.AVATAR_TEXT:this.avatarText=p;break;case e.attributes.AVATAR_ICON:this.avatarIcon=p;break;case e.attributes.AVATAR_IMAGE_URL:this.avatarImageUrl=p;break;case e.attributes.AVATAR_LETTER_COUNT:this.avatarLetterCount=g(p);break}}};i([a()],o.prototype,"fullName",2),i([a()],o.prototype,"email",2),i([a()],o.prototype,"signOut",2),i([a()],o.prototype,"profile",2),i([a()],o.prototype,"signOutText",2),i([a()],o.prototype,"profileText",2),i([a()],o.prototype,"avatarText",2),i([a()],o.prototype,"avatarIcon",2),i([a()],o.prototype,"avatarImageUrl",2),i([a()],o.prototype,"avatarLetterCount",2),o=i([v({name:e.elementName,dependencies:[O,k,w]})],o);function tt(){m(o)}export{e as a,l as b,s as c,o as d,tt as e};
|
|
7
|
+
//# sourceMappingURL=chunk.LEOEVEFJ.js.map
|
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
4
|
* License: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import{a as t}from"./chunk.
|
|
7
|
-
//# sourceMappingURL=chunk.
|
|
6
|
+
import{a as t}from"./chunk.YKZ36ELA.js";import{a as r}from"./chunk.KTGSZEAG.js";import{l}from"./chunk.LJLEPTLU.js";import{k as p,l as s}from"./chunk.J2M2MXP2.js";import{f as o}from"./chunk.MCIQXNKY.js";var e=class extends l{constructor(){super()}attributeChangedCallback(a,u,i){switch(a){case t.attributes.POPUP_CLASSES:this.popupClasses=i;break;case t.attributes.OPTION_LIMIT:this.optionLimit=s(i);break;case t.attributes.OBSERVE_SCROLL:this.observeScroll=p(i);break;case t.attributes.OBSERVE_SCROLL_THRESHOLD:this.observeScrollThreshold=s(i);break;case t.attributes.SYNC_POPUP_WIDTH:this.syncPopupWidth=p(i);break;case t.attributes.CONSTRAIN_POPUP_WIDTH:this.constrainPopupWidth=p(i);break;case t.attributes.WRAP_OPTION_TEXT:this.wrapOptionText=p(i);break}}};o([r()],e.prototype,"popupClasses",2),o([r()],e.prototype,"popupHeaderBuilder",2),o([r()],e.prototype,"popupFooterBuilder",2),o([r()],e.prototype,"syncPopupWidth",2),o([r()],e.prototype,"optionLimit",2),o([r()],e.prototype,"observeScroll",2),o([r()],e.prototype,"observeScrollThreshold",2),o([r()],e.prototype,"constrainPopupWidth",2),o([r()],e.prototype,"wrapOptionText",2);export{e as a};
|
|
7
|
+
//# sourceMappingURL=chunk.LKL5KWVY.js.map
|
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
4
|
* License: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import{a as o}from"./chunk.
|
|
7
|
-
//# sourceMappingURL=chunk.
|
|
6
|
+
import{a as o}from"./chunk.XTQO35SU.js";import{a as n}from"./chunk.2KXSGD3S.js";var l=class extends n{constructor(e){super(e)}_build(){return document.createElement(o.elementName)}_configure(){var e;typeof((e=this._config.options)==null?void 0:e.helperText)=="string"&&this.setHelperText(this._config.options.helperText)}get value(){return this._element.value}set value(e){this._element.value=e}get disabled(){return this._element.disabled}set disabled(e){this._element.disabled=e}get invalid(){return this._element.invalid||!1}set invalid(e){this._element.invalid=e}onChange(e){this._element.addEventListener("change",t=>e(t.detail))}onFocus(e){this._element.addEventListener("focus",t=>e(t))}onBlur(e){this._element.addEventListener("blur",t=>e(t))}setHelperText(e){e?(this._helperTextElement||(this._helperTextElement=document.createElement("span"),this._helperTextElement.slot="helper-text",this._element.appendChild(this._helperTextElement)),this._helperTextElement.textContent=e):this._helperTextElement&&this._helperTextElement.isConnected&&(this._element.removeChild(this._helperTextElement),this._helperTextElement=void 0)}};export{l as a};
|
|
7
|
+
//# sourceMappingURL=chunk.LQAXFDOO.js.map
|
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
4
|
* License: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import{a as C,d as h}from"./chunk.
|
|
7
|
-
//# sourceMappingURL=chunk.
|
|
6
|
+
import{a as C,d as h}from"./chunk.DT4G43BK.js";import{a as A}from"./chunk.LAM6EDW3.js";import{o as B}from"./chunk.MZLPUI6R.js";import{d as M}from"./chunk.TEHQWMFI.js";import{d as _,l as b}from"./chunk.B5TEOESG.js";import{a as f}from"./chunk.UWYANU5D.js";import{a as d}from"./chunk.KTGSZEAG.js";import{a as u,b as I}from"./chunk.DL7NX432.js";import{a,d as s,h as l,l as c}from"./chunk.LJLEPTLU.js";import{a as m,f as p}from"./chunk.MCIQXNKY.js";var n=class extends f{constructor(o){super(o)}initialize(){this._menuElement=l(this._component,C.elementName)}setMenuOptions(o){this._menuElement.options=o}};var i=class{constructor(e){this._adapter=e;this._options=[];this._isInitialized=!1}initialize(){this._adapter.initialize(),this._adapter.setMenuOptions(this._options),this._isInitialized=!0}disconnect(){this._isInitialized=!1}get options(){return this._options}set options(e){this._options=e.map(o=>m({},o)),this._isInitialized&&this._adapter.setMenuOptions(e)}};var g=`${I}app-bar-help-button`,O={elementName:g};var x='<template><forge-icon-button><forge-menu placement="bottom-end"><button type="button" aria-label="Open help menu"><forge-icon name="help"></forge-icon></button></forge-menu><forge-tooltip delay="500" position="bottom">Help</forge-tooltip></forge-icon-button></template>',t=class extends c{constructor(){super();_.define(B),this._foundation=new i(new n(this))}initializedCallback(){s(this,x)}connectedCallback(){this._foundation.initialize()}disconnectedCallback(){this._foundation.disconnect()}};p([d()],t.prototype,"options",2),t=p([u({name:O.elementName,dependencies:[h,A,M,b]})],t);function W(){a(t)}export{n as a,i as b,O as c,t as d,W as e};
|
|
7
|
+
//# sourceMappingURL=chunk.LQEVGZKN.js.map
|
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
4
|
* License: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import{a as p}from"./chunk.KTEM7SW7.js";import{a as I}from"./chunk.EYGSUZWX.js";import{a as E}from"./chunk.MV327MYK.js";import{a as g}from"./chunk.YI4JTY4T.js";import{a as y}from"./chunk.FVRSGKJD.js";import{c as f,d as k}from"./chunk.U6WGJELL.js";import{a as C}from"./chunk.UWYANU5D.js";import{a as l}from"./chunk.KTGSZEAG.js";import{g as v,l as m}from"./chunk.LJLEPTLU.js";import{m as D}from"./chunk.4LA6HEA7.js";import{a as _,g as h,k as d,m as b}from"./chunk.J2M2MXP2.js";import{f as r}from"./chunk.MCIQXNKY.js";var P={MIN:"min",MAX:"max",OPEN:"open",DISABLED:"disabled",POPUP_CLASSES:"popup-classes",MASKED:"masked",MASK_FORMAT:"mask-format",SHOW_MASK_FORMAT:"show-mask-format",VALUE_MODE:"value-mode",ALLOW_INVALID_DATE:"allow-invalid-date",SHOW_TODAY:"show-today",SHOW_CLEAR:"show-clear",DISABLED_DAYS_OF_WEEK:"disabled-days-of-week",YEAR_RANGE:"year-range",LOCALE:"locale"},O={TOGGLE:"forge-date-picker-toggle"},F={INPUT:"input",TOGGLE:"[forge-date-picker-toggle],[data-forge-date-picker-toggle]"},s={observedAttributes:P,attributes:O,selectors:F};var n=class extends m{constructor(){super()}async connectedCallback(){this.querySelector(s.selectors.INPUT)?this._foundation.initialize():(await D(this,s.selectors.INPUT),this._foundation.initialize())}disconnectedCallback(){this._foundation.disconnect()}attributeChangedCallback(t,a,i){switch(t){case s.observedAttributes.MIN:this.min=i;break;case s.observedAttributes.MAX:this.max=i;break;case s.observedAttributes.OPEN:this.open=d(i);break;case s.observedAttributes.POPUP_CLASSES:this.popupClasses=i;break;case s.observedAttributes.DISABLED:this.disabled=d(i);break;case s.observedAttributes.MASKED:this.masked=d(i);break;case s.observedAttributes.SHOW_MASK_FORMAT:this.showMaskFormat=d(i);break;case s.observedAttributes.MASK_FORMAT:this.maskFormat=i;break;case s.observedAttributes.VALUE_MODE:this.valueMode=i;break;case s.observedAttributes.ALLOW_INVALID_DATE:this.allowInvalidDate=d(i);break;case s.observedAttributes.SHOW_TODAY:this.showToday=d(i);break;case s.observedAttributes.SHOW_CLEAR:this.showClear=d(i);break;case s.observedAttributes.DISABLED_DAYS_OF_WEEK:this.disabledDaysOfWeek=b(i);break;case s.observedAttributes.YEAR_RANGE:this.yearRange=i;break;case s.observedAttributes.LOCALE:this.locale=i;break}}};r([l()],n.prototype,"value",2),r([l()],n.prototype,"min",2),r([l()],n.prototype,"max",2),r([l()],n.prototype,"disabledDates",2),r([l()],n.prototype,"open",2),r([l()],n.prototype,"popupClasses",2),r([l()],n.prototype,"disabled",2),r([l()],n.prototype,"masked",2),r([l()],n.prototype,"maskFormat",2),r([l()],n.prototype,"showMaskFormat",2),r([l()],n.prototype,"valueMode",2),r([l()],n.prototype,"notifyInputValueChanges",2),r([l()],n.prototype,"allowInvalidDate",2),r([l()],n.prototype,"showToday",2),r([l()],n.prototype,"showClear",2),r([l()],n.prototype,"parseCallback",2),r([l()],n.prototype,"formatCallback",2),r([l()],n.prototype,"prepareMaskCallback",2),r([l()],n.prototype,"disabledDaysOfWeek",2),r([l()],n.prototype,"disableDayCallback",2),r([l()],n.prototype,"yearRange",2),r([l()],n.prototype,"locale",2);function M(c){let e=document.createElement("forge-icon-button");e.slot="trailing",e.dense=!0,e.densityLevel=3,e.style.marginRight="4px";let t=document.createElement("button");t.type="button",t.tabIndex=-1,t.setAttribute("aria-label","Toggle calendar"),e.appendChild(t);let a=document.createElement("forge-icon");return a.name=c,t.appendChild(a),e}var L=class extends C{constructor(t){super(t);this._valueChangeListeners=[];this._identifier=_()}initialize(){this._initializeInput()}destroy(){var t;(t=this._calendarDropdown)==null||t.destroy(),this.destroyValueChangeListener()}destroyValueChangeListener(){this._valueChangeListeners.forEach(t=>t())}addToggleListener(t,a){var i;(i=this._toggleElement)==null||i.addEventListener(t,a)}removeToggleListener(t,a){var i;(i=this._toggleElement)==null||i.removeEventListener(t,a)}attachCalendar(t,a){var i,o,u;if((i=this._calendarDropdown)==null||i.destroy(),this._initializeCalendarDropdown(),!this._calendarDropdown)throw new Error("CalendarDropdown was not initialized.");a&&Object.assign(this._calendarDropdown,a),this._calendarDropdown.open(t),(o=this._calendarDropdown.dropdownElement)==null||o.style.setProperty("--forge-calendar-width","320px"),(u=this._calendarDropdown.calendar)==null||u.style.setProperty("margin","8px")}detachCalendar(){this._calendarDropdown&&this._calendarDropdown.isOpen&&this._calendarDropdown.close()}goToCalendarDate(t){var a,i;(i=(a=this._calendarDropdown)==null?void 0:a.calendar)==null||i.goToDate(t,!0)}addCalendarListener(t,a){var i,o;(o=(i=this._calendarDropdown)==null?void 0:i.calendar)==null||o.addEventListener(t,a)}removeCalendarListener(t,a){var i,o;(o=(i=this._calendarDropdown)==null?void 0:i.calendar)==null||o.removeEventListener(t,a)}setCalendarValue(t){var a;(a=this._calendarDropdown)!=null&&a.calendar&&(this._calendarDropdown.calendar.value=t)}setCalendarMinDate(t){var a;(a=this._calendarDropdown)!=null&&a.calendar&&(this._calendarDropdown.calendar.min=t)}setCalendarMaxDate(t){var a;(a=this._calendarDropdown)!=null&&a.calendar&&(this._calendarDropdown.calendar.max=t)}setCalendarDisabledDates(t){var a;(a=this._calendarDropdown)!=null&&a.calendar&&(this._calendarDropdown.calendar.disabledDates=t)}setCalendarDisabledDaysOfWeek(t){var a;(a=this._calendarDropdown)!=null&&a.calendar&&(this._calendarDropdown.calendar.disabledDaysOfWeek=t)}setCalendarDisableDayCallback(t){var a;(a=this._calendarDropdown)!=null&&a.calendar&&(this._calendarDropdown.calendar.disabledDateBuilder=t)}setCalendarActiveDate(t){var a,i;(i=(a=this._calendarDropdown)==null?void 0:a.calendar)==null||i.setActiveDate(t)}getCalendarActiveDate(){var t,a;return(a=(t=this._calendarDropdown)==null?void 0:t.calendar)==null?void 0:a.activeDate}setCalendarYearRange(t){var a,i;(i=(a=this._calendarDropdown)==null?void 0:a.calendar)!=null&&i.yearRange&&(this._calendarDropdown.calendar.yearRange=t)}setCalendarLocale(t){var a;(a=this._calendarDropdown)!=null&&a.calendar&&(this._calendarDropdown.locale=t)}propagateCalendarKey(t){var a,i;(i=(a=this._calendarDropdown)==null?void 0:a.calendar)==null||i.handleKey(t)}tryCreateToggle(){let t=this._component.querySelector("forge-text-field"),a=this._component.querySelector(s.selectors.TOGGLE);if(t){let i=t.querySelector(`${E.elementName}[slot=trailing]`);if(i||a){this._toggleElement=i||a;return}let o=this._createToggleElement();t.appendChild(o),this._toggleElement=o}else a&&(this._toggleElement=a)}_createToggleElement(){return M("insert_invitation")}_getDefaultTargetElement(){let t=this._component.querySelector("forge-text-field");if(t&&t.shadowRoot){let a=v(t,I.selectors.ROOT);if(a)return a}return this._component.querySelector("input")||this._component}};var w=class{constructor(e){this._adapter=e;this._value=null;this._min=null;this._max=null;this._disabledDates=null;this._open=!1;this._disabled=!1;this._masked=!0;this._maskFormat=y;this._showMaskFormat=!1;this._valueMode="object";this._notifyInputValueChanges=!0;this._allowInvalidDate=!1;this._showToday=!1;this._showClear=!1;this._yearRange="-50:+50";this._isInitialized=!1;this._inputListener=t=>this._onInput(t),this._inputKeydownListener=t=>this._onInputKeydown(t),this._inputFocusListener=t=>this._onInputFocus(t),this._inputBlurListener=t=>this._onInputBlur(t),this._inputValueChangedListener=t=>this._onInputValueChanged(t),this._dropdownCloseListener=()=>this._onDropdownClose(),this._toggleMousedownListener=t=>this._onToggleMousedown(t),this._dateSelectListener=t=>this._onDateSelected(t.detail),this._monthChangeListener=t=>this._onMonthChanged(t),this._activeChangeListener=t=>this._onActiveDescendantChanged(t),this._todayListener=()=>this._onToday(),this._clearListener=()=>this._onClear()}initialize(){var e;if(this._adapter.initialize(),this._adapter.initializeAccessibility(),!this._adapter.hasInputElement())throw new Error("Unable to locate child <input> element.");(e=this._initializeState)==null||e.call(this),this._adapter.tryCreateToggle(),this._masked||this._setInputChangeListeners(),this._initializeListeners(),this._setFormattedInputValue(!0),this._applyDisabled(),this._applyMask(),this._initializeValueChangedListeners(),this._isInitialized=!0}disconnect(){this._isInitialized=!1,this._destroyListeners(),this._masked&&this._adapter.destroyMask(),this._closeCalendar(),this._adapter.destroy()}_initializeListeners(){this._adapter.addToggleListener("mousedown",this._toggleMousedownListener),this._adapter.addInputListener("keydown",this._inputKeydownListener,!0),this._adapter.addInputListener("focus",this._inputFocusListener),this._adapter.addInputListener("blur",this._inputBlurListener)}_initializeValueChangedListeners(){this._adapter.setInputValueChangedListener(this,this._inputValueChangedListener)}_setInputChangeListeners(){this._adapter.addInputListener("input",this._inputListener)}_removeInputChangeListeners(){this._adapter.removeInputListener("input",this._inputListener)}_destroyListeners(){this._adapter.removeToggleListener("mousedown",this._toggleMousedownListener),this._adapter.removeInputListener("keydown",this._inputKeydownListener,!0),this._adapter.removeInputListener("focus",this._inputFocusListener),this._adapter.removeInputListener("blur",this._inputBlurListener),this._removeInputChangeListeners()}_onInput(e){this._handleInput(this._adapter.getInputValue())}_onInputFocus(e){this.masked&&this.showMaskFormat&&this._applyMask(),this._adapter.selectInputText()}_onInputBlur(e){this.masked&&this.showMaskFormat&&this._applyMask(),this._formatInputValue(),this._open&&!this._adapter.isInputFocused()&&this._closeCalendar(!0)}_openCalendar(e=!1){this._formatInputValue();let t={mode:this._mode,value:this._getCurrentValue(),min:this._min,max:this._max,disabledDates:this._disabledDates,yearRange:this._yearRange,todayButton:this._showToday,clearButton:this._showClear,todayCallback:this._todayListener,clearCallback:this._clearListener,disabledDateBuilder:this._disableDayCallback,disabledDaysOfWeek:this._disabledDaysOfWeek,preventFocus:!0,menuAnimation:"fade",fixedHeight:!0,selectionFollowsMonth:!0,locale:this._locale},a={popupClasses:this._popupClasses,closeCallback:this._dropdownCloseListener,activeChangeCallback:this._activeChangeListener},i=new Date().getTime();this._min&&this._max&&this._max.getTime()<i&&(t.year=this._min.getFullYear(),t.month=this._min.getMonth()),this._adapter.attachCalendar(t,a),this._adapter.addCalendarListener(p.events.DATE_SELECT,this._dateSelectListener),this._adapter.addCalendarListener(p.events.MONTH_CHANGE,this._monthChangeListener),this._open=!0,this._adapter.setHostAttribute(s.observedAttributes.OPEN),e&&this._emitOpenEvent()}_closeCalendar(e=!1){this._open=!1,this._adapter.removeHostAttribute(s.observedAttributes.OPEN),this._adapter.removeCalendarListener(p.events.DATE_SELECT,this._dateSelectListener),this._adapter.removeCalendarListener(p.events.MONTH_CHANGE,this._monthChangeListener),this._adapter.detachCalendar(),e&&this._emitCloseEvent()}_onInputKeydown(e){if(e.shiftKey)switch(e.key){case"Delete":case"Backspace":e.preventDefault(),this._onClear(),this._open&&this._closeCalendar(!0);return;case"ArrowLeft":case"ArrowRight":case"m":case"M":case"y":case"Y":case"d":case"D":if(this._open){e.preventDefault(),this._adapter.propagateCalendarKey(e);return}break}switch(e.key){case"Escape":this._open&&(e.preventDefault(),e.stopPropagation(),this._closeCalendar(!0));break;case"ArrowDown":e.preventDefault(),this._open?this._adapter.propagateCalendarKey(e):(this._adapter.selectInputText(),this._openCalendar(!0));break;case"ArrowUp":this._open&&(e.preventDefault(),this._adapter.propagateCalendarKey(e));break;case"ArrowLeft":case"ArrowRight":case"Enter":case"Home":case"End":if(this._open){e.key==="Enter"&&e.stopPropagation(),e.preventDefault();let t=["ArrowLeft","ArrowRight"].includes(e.key);this._masked&&t&&e.stopImmediatePropagation(),this._adapter.propagateCalendarKey(e)}break;case"n":case"t":e.preventDefault(),this._onToday(),this._open&&this._closeCalendar(!0);break;case"PageUp":case"PageDown":this._open&&(e.preventDefault(),this._adapter.propagateCalendarKey(e));break;case"Tab":if(this._open){let t=this._adapter.getCalendarActiveDate();t&&this._onDateSelected({date:t,selected:!0,type:"date"})}break}}_getSanitizedDateString(e){return e.replace(/_|[a-z]|[A-Z]/g,"").replace(/\/$|\/\/$/,"")}_onToggleMousedown(e){this._disabled||(e.stopPropagation(),!this._adapter.isInputDisabled()&&(e.preventDefault(),this._open?this._closeCalendar(!0):(g.isMobile?this._adapter.tryBlurInput():this._adapter.tryFocusInput(),this._openCalendar(!0))))}_onDropdownClose(){this._closeCalendar(!0)}_onMonthChanged(e){this._adapter.redispatchEvent(e)}_onActiveDescendantChanged(e){this._adapter.setActiveDescendant(e)}_formatInputValue(){let e=this._adapter.getInputValue();if(e){let t=this._parseDateString(e);if(h(t)&&this._isDateValueAcceptable(t)){let a=this._formatDate(t);a&&a!==e&&this._adapter.setInputValue(a,this._notifyInputValueChanges)}else this._allowInvalidDate||this._adapter.setInputValue("",this._notifyInputValueChanges)}}_formatDate(e){return h(e)?typeof this._formatCallback=="function"?this._formatCallback(e):k(e):""}_parseDateString(e){if(e=e.replace(/_|\s/g,""),!e||!e.length)return null;let t=typeof this._parseCallback=="function"?this._parseCallback(e):f(e);return h(t)?t:null}_coerceDateValue(e){return typeof e=="string"?this._parseDateString(e):e}_getTypedValue(e){switch(this._valueMode){case"object":return e;case"string":return this._formatDate(e);case"iso-string":return e&&e.setHours(0,0,0,0),e?e.toISOString():null;default:return e}}_isDateValueAcceptable(e){if(!e||this._allowInvalidDate)return!0;let t=()=>this._min&&!this._allowInvalidDate?this._min.getTime()<=e.getTime():!0,a=()=>this._max&&!this._allowInvalidDate?this._max.getTime()>=e.getTime():!0,i=()=>Array.isArray(this._disabledDates)?this._disabledDates:this._disabledDates?[this._disabledDates]:[],o=()=>!i().some(A=>A.getTime()===e.getTime()),u=()=>!(this._disabledDaysOfWeek&&this._disabledDaysOfWeek.includes(e.getDay())),T=()=>typeof this._disableDayCallback!="function"||!this._disableDayCallback(e);return t()&&a()&&o()&&u()&&T()}_initializeMask(){let e={showMaskFormat:this._showMaskFormat&&this._adapter.isInputFocused(),pattern:this._maskFormat,onChange:t=>this._handleInput(t)};this._prepareMaskCallback&&(e.prepareCallback=(t,a,i,o)=>this._prepareMaskCallback.call(null,t,a,i,o)),this._adapter.initializeMask(e)}_applyMask(){this._masked?this._initializeMask():(this._adapter.destroyMask(),this._formatInputValue())}_applyMin(){this._isInitialized&&this._adapter.setCalendarMinDate(this._min)}_applyMax(){this._isInitialized&&this._adapter.setCalendarMaxDate(this._max)}_applyDisableDayCallback(){this._adapter.setCalendarDisableDayCallback(this._disableDayCallback)}_applyDisabled(){this._adapter.setDisabled(this._disabled)}get valueMode(){return this._valueMode}set valueMode(e){if(this._valueMode!==e){if(!["object","string","iso-string"].includes(e))return;this._valueMode=e,this._emitChangeEvent(this._value),this._adapter.setHostAttribute(s.observedAttributes.VALUE_MODE,this._valueMode)}}get min(){return this._min?new Date(this._min.getTime()):null}set min(e){if(this._min!==e){let t=this._coerceDateValue(e);this._min=t?new Date(t.getTime()):null,this._applyMin(),this._isInitialized&&this._open&&this._adapter.setCalendarMinDate(this._min)}}get max(){return this._max?new Date(this._max.getTime()):null}set max(e){this._max!==e&&(this._max=this._coerceDateValue(e),this._applyMax(),this._isInitialized&&this._open&&this._adapter.setCalendarMaxDate(this._max))}get open(){return this._open}set open(e){this._open!==e&&this._isInitialized&&(this._open=e,this._open?this._openCalendar():this._closeCalendar())}get disabled(){return this._disabled}set disabled(e){this._disabled!==e&&(this._disabled=e,this._isInitialized&&this._applyDisabled())}get disabledDates(){return this._disabledDates?Array.isArray(this._disabledDates)?this._disabledDates.map(e=>new Date(e.getTime())):new Date(this._disabledDates.getTime()):null}set disabledDates(e){e?Array.isArray(e)?this._disabledDates=e.map(t=>new Date(t.getTime())):this._disabledDates=new Date(e.getTime()):this._disabledDates=null,this._isInitialized&&this._open&&this._adapter.setCalendarDisabledDates(this._disabledDates),this._applyDisabledDates()}get popupClasses(){return Array.isArray(this._popupClasses)?[...this._popupClasses]:this._popupClasses}set popupClasses(e){Array.isArray(e)?this._popupClasses=[...e]:this._popupClasses=e}get masked(){return this._masked}set masked(e){this._masked!==e&&(this._masked=e,this._isInitialized&&(this._masked?(this._removeInputChangeListeners(),this._applyMask()):(this._adapter.destroyMask(),this._setInputChangeListeners(),this._formatInputValue())))}get maskFormat(){return this._maskFormat}set maskFormat(e){this._maskFormat!==e&&(this._maskFormat=e,this._isInitialized&&this._applyMask())}get showMaskFormat(){return this._showMaskFormat}set showMaskFormat(e){this._showMaskFormat!==e&&(this._showMaskFormat=e)}get notifyInputValueChanges(){return this._notifyInputValueChanges}set notifyInputValueChanges(e){this._notifyInputValueChanges=e}get allowInvalidDate(){return this._allowInvalidDate}set allowInvalidDate(e){this._allowInvalidDate!==e&&(this._allowInvalidDate=e,this._adapter.toggleHostAttribute(s.observedAttributes.ALLOW_INVALID_DATE,this._allowInvalidDate))}get disabledDaysOfWeek(){return this._disabledDaysOfWeek}set disabledDaysOfWeek(e){this._disabledDaysOfWeek!==e&&(this._disabledDaysOfWeek=e,this._isInitialized&&this._open&&this._adapter.setCalendarDisabledDaysOfWeek(this._disabledDaysOfWeek),this._applyDisabledDaysOfWeek())}get disableDayCallback(){return this._disableDayCallback}set disableDayCallback(e){e!==this._disableDayCallback&&(this._disableDayCallback=e,this._applyDisableDayCallback())}get parseCallback(){return this._parseCallback}set parseCallback(e){this._parseCallback=e,this._isInitialized&&this._applyMask()}get formatCallback(){return this._formatCallback}set formatCallback(e){this._formatCallback=e,this._isInitialized&&this._applyMask()}get prepareMaskCallback(){return this._prepareMaskCallback}set prepareMaskCallback(e){this._prepareMaskCallback=e,this._isInitialized&&this._applyMask()}get showToday(){return this._showToday}set showToday(e){this._showToday=e}get showClear(){return this._showClear}set showClear(e){this._showClear=e}get yearRange(){return this._yearRange}set yearRange(e){this._yearRange!==e&&(this._yearRange=e,this._isInitialized&&this._open&&this._adapter.setCalendarYearRange(this._yearRange))}get locale(){return this._locale}set locale(e){this._locale!==e&&(this._locale=e,this._isInitialized&&this._open&&this._adapter.setCalendarLocale(this._locale))}};export{s as a,n as b,M as c,L as d,w as e};
|
|
7
|
-
//# sourceMappingURL=chunk.
|
|
6
|
+
import{a as p}from"./chunk.KTEM7SW7.js";import{a as I}from"./chunk.EYGSUZWX.js";import{a as E}from"./chunk.MV327MYK.js";import{a as g}from"./chunk.YI4JTY4T.js";import{a as y}from"./chunk.FVRSGKJD.js";import{c as f,d as k}from"./chunk.J3YNMJ7K.js";import{a as C}from"./chunk.UWYANU5D.js";import{a as l}from"./chunk.KTGSZEAG.js";import{g as v,l as m}from"./chunk.LJLEPTLU.js";import{m as D}from"./chunk.4LA6HEA7.js";import{a as _,g as h,k as d,m as b}from"./chunk.J2M2MXP2.js";import{f as r}from"./chunk.MCIQXNKY.js";var P={MIN:"min",MAX:"max",OPEN:"open",DISABLED:"disabled",POPUP_CLASSES:"popup-classes",MASKED:"masked",MASK_FORMAT:"mask-format",SHOW_MASK_FORMAT:"show-mask-format",VALUE_MODE:"value-mode",ALLOW_INVALID_DATE:"allow-invalid-date",SHOW_TODAY:"show-today",SHOW_CLEAR:"show-clear",DISABLED_DAYS_OF_WEEK:"disabled-days-of-week",YEAR_RANGE:"year-range",LOCALE:"locale"},O={TOGGLE:"forge-date-picker-toggle"},F={INPUT:"input",TOGGLE:"[forge-date-picker-toggle],[data-forge-date-picker-toggle]"},s={observedAttributes:P,attributes:O,selectors:F};var n=class extends m{constructor(){super()}async connectedCallback(){this.querySelector(s.selectors.INPUT)?this._foundation.initialize():(await D(this,s.selectors.INPUT),this._foundation.initialize())}disconnectedCallback(){this._foundation.disconnect()}attributeChangedCallback(t,a,i){switch(t){case s.observedAttributes.MIN:this.min=i;break;case s.observedAttributes.MAX:this.max=i;break;case s.observedAttributes.OPEN:this.open=d(i);break;case s.observedAttributes.POPUP_CLASSES:this.popupClasses=i;break;case s.observedAttributes.DISABLED:this.disabled=d(i);break;case s.observedAttributes.MASKED:this.masked=d(i);break;case s.observedAttributes.SHOW_MASK_FORMAT:this.showMaskFormat=d(i);break;case s.observedAttributes.MASK_FORMAT:this.maskFormat=i;break;case s.observedAttributes.VALUE_MODE:this.valueMode=i;break;case s.observedAttributes.ALLOW_INVALID_DATE:this.allowInvalidDate=d(i);break;case s.observedAttributes.SHOW_TODAY:this.showToday=d(i);break;case s.observedAttributes.SHOW_CLEAR:this.showClear=d(i);break;case s.observedAttributes.DISABLED_DAYS_OF_WEEK:this.disabledDaysOfWeek=b(i);break;case s.observedAttributes.YEAR_RANGE:this.yearRange=i;break;case s.observedAttributes.LOCALE:this.locale=i;break}}};r([l()],n.prototype,"value",2),r([l()],n.prototype,"min",2),r([l()],n.prototype,"max",2),r([l()],n.prototype,"disabledDates",2),r([l()],n.prototype,"open",2),r([l()],n.prototype,"popupClasses",2),r([l()],n.prototype,"disabled",2),r([l()],n.prototype,"masked",2),r([l()],n.prototype,"maskFormat",2),r([l()],n.prototype,"showMaskFormat",2),r([l()],n.prototype,"valueMode",2),r([l()],n.prototype,"notifyInputValueChanges",2),r([l()],n.prototype,"allowInvalidDate",2),r([l()],n.prototype,"showToday",2),r([l()],n.prototype,"showClear",2),r([l()],n.prototype,"parseCallback",2),r([l()],n.prototype,"formatCallback",2),r([l()],n.prototype,"prepareMaskCallback",2),r([l()],n.prototype,"disabledDaysOfWeek",2),r([l()],n.prototype,"disableDayCallback",2),r([l()],n.prototype,"yearRange",2),r([l()],n.prototype,"locale",2);function M(c){let e=document.createElement("forge-icon-button");e.slot="trailing",e.dense=!0,e.densityLevel=3,e.style.marginRight="4px";let t=document.createElement("button");t.type="button",t.tabIndex=-1,t.setAttribute("aria-label","Toggle calendar"),e.appendChild(t);let a=document.createElement("forge-icon");return a.name=c,t.appendChild(a),e}var L=class extends C{constructor(t){super(t);this._valueChangeListeners=[];this._identifier=_()}initialize(){this._initializeInput()}destroy(){var t;(t=this._calendarDropdown)==null||t.destroy(),this.destroyValueChangeListener()}destroyValueChangeListener(){this._valueChangeListeners.forEach(t=>t())}addToggleListener(t,a){var i;(i=this._toggleElement)==null||i.addEventListener(t,a)}removeToggleListener(t,a){var i;(i=this._toggleElement)==null||i.removeEventListener(t,a)}attachCalendar(t,a){var i,o,u;if((i=this._calendarDropdown)==null||i.destroy(),this._initializeCalendarDropdown(),!this._calendarDropdown)throw new Error("CalendarDropdown was not initialized.");a&&Object.assign(this._calendarDropdown,a),this._calendarDropdown.open(t),(o=this._calendarDropdown.dropdownElement)==null||o.style.setProperty("--forge-calendar-width","320px"),(u=this._calendarDropdown.calendar)==null||u.style.setProperty("margin","8px")}detachCalendar(){this._calendarDropdown&&this._calendarDropdown.isOpen&&this._calendarDropdown.close()}goToCalendarDate(t){var a,i;(i=(a=this._calendarDropdown)==null?void 0:a.calendar)==null||i.goToDate(t,!0)}addCalendarListener(t,a){var i,o;(o=(i=this._calendarDropdown)==null?void 0:i.calendar)==null||o.addEventListener(t,a)}removeCalendarListener(t,a){var i,o;(o=(i=this._calendarDropdown)==null?void 0:i.calendar)==null||o.removeEventListener(t,a)}setCalendarValue(t){var a;(a=this._calendarDropdown)!=null&&a.calendar&&(this._calendarDropdown.calendar.value=t)}setCalendarMinDate(t){var a;(a=this._calendarDropdown)!=null&&a.calendar&&(this._calendarDropdown.calendar.min=t)}setCalendarMaxDate(t){var a;(a=this._calendarDropdown)!=null&&a.calendar&&(this._calendarDropdown.calendar.max=t)}setCalendarDisabledDates(t){var a;(a=this._calendarDropdown)!=null&&a.calendar&&(this._calendarDropdown.calendar.disabledDates=t)}setCalendarDisabledDaysOfWeek(t){var a;(a=this._calendarDropdown)!=null&&a.calendar&&(this._calendarDropdown.calendar.disabledDaysOfWeek=t)}setCalendarDisableDayCallback(t){var a;(a=this._calendarDropdown)!=null&&a.calendar&&(this._calendarDropdown.calendar.disabledDateBuilder=t)}setCalendarActiveDate(t){var a,i;(i=(a=this._calendarDropdown)==null?void 0:a.calendar)==null||i.setActiveDate(t)}getCalendarActiveDate(){var t,a;return(a=(t=this._calendarDropdown)==null?void 0:t.calendar)==null?void 0:a.activeDate}setCalendarYearRange(t){var a,i;(i=(a=this._calendarDropdown)==null?void 0:a.calendar)!=null&&i.yearRange&&(this._calendarDropdown.calendar.yearRange=t)}setCalendarLocale(t){var a;(a=this._calendarDropdown)!=null&&a.calendar&&(this._calendarDropdown.locale=t)}propagateCalendarKey(t){var a,i;(i=(a=this._calendarDropdown)==null?void 0:a.calendar)==null||i.handleKey(t)}tryCreateToggle(){let t=this._component.querySelector("forge-text-field"),a=this._component.querySelector(s.selectors.TOGGLE);if(t){let i=t.querySelector(`${E.elementName}[slot=trailing]`);if(i||a){this._toggleElement=i||a;return}let o=this._createToggleElement();t.appendChild(o),this._toggleElement=o}else a&&(this._toggleElement=a)}_createToggleElement(){return M("insert_invitation")}_getDefaultTargetElement(){let t=this._component.querySelector("forge-text-field");if(t&&t.shadowRoot){let a=v(t,I.selectors.ROOT);if(a)return a}return this._component.querySelector("input")||this._component}};var w=class{constructor(e){this._adapter=e;this._value=null;this._min=null;this._max=null;this._disabledDates=null;this._open=!1;this._disabled=!1;this._masked=!0;this._maskFormat=y;this._showMaskFormat=!1;this._valueMode="object";this._notifyInputValueChanges=!0;this._allowInvalidDate=!1;this._showToday=!1;this._showClear=!1;this._yearRange="-50:+50";this._isInitialized=!1;this._inputListener=t=>this._onInput(t),this._inputKeydownListener=t=>this._onInputKeydown(t),this._inputFocusListener=t=>this._onInputFocus(t),this._inputBlurListener=t=>this._onInputBlur(t),this._inputValueChangedListener=t=>this._onInputValueChanged(t),this._dropdownCloseListener=()=>this._onDropdownClose(),this._toggleMousedownListener=t=>this._onToggleMousedown(t),this._dateSelectListener=t=>this._onDateSelected(t.detail),this._monthChangeListener=t=>this._onMonthChanged(t),this._activeChangeListener=t=>this._onActiveDescendantChanged(t),this._todayListener=()=>this._onToday(),this._clearListener=()=>this._onClear()}initialize(){var e;if(this._adapter.initialize(),this._adapter.initializeAccessibility(),!this._adapter.hasInputElement())throw new Error("Unable to locate child <input> element.");(e=this._initializeState)==null||e.call(this),this._adapter.tryCreateToggle(),this._masked||this._setInputChangeListeners(),this._initializeListeners(),this._setFormattedInputValue(!0),this._applyDisabled(),this._applyMask(),this._initializeValueChangedListeners(),this._isInitialized=!0}disconnect(){this._isInitialized=!1,this._destroyListeners(),this._masked&&this._adapter.destroyMask(),this._closeCalendar(),this._adapter.destroy()}_initializeListeners(){this._adapter.addToggleListener("mousedown",this._toggleMousedownListener),this._adapter.addInputListener("keydown",this._inputKeydownListener,!0),this._adapter.addInputListener("focus",this._inputFocusListener),this._adapter.addInputListener("blur",this._inputBlurListener)}_initializeValueChangedListeners(){this._adapter.setInputValueChangedListener(this,this._inputValueChangedListener)}_setInputChangeListeners(){this._adapter.addInputListener("input",this._inputListener)}_removeInputChangeListeners(){this._adapter.removeInputListener("input",this._inputListener)}_destroyListeners(){this._adapter.removeToggleListener("mousedown",this._toggleMousedownListener),this._adapter.removeInputListener("keydown",this._inputKeydownListener,!0),this._adapter.removeInputListener("focus",this._inputFocusListener),this._adapter.removeInputListener("blur",this._inputBlurListener),this._removeInputChangeListeners()}_onInput(e){this._handleInput(this._adapter.getInputValue())}_onInputFocus(e){this.masked&&this.showMaskFormat&&this._applyMask(),this._adapter.selectInputText()}_onInputBlur(e){this.masked&&this.showMaskFormat&&this._applyMask(),this._formatInputValue(),this._open&&!this._adapter.isInputFocused()&&this._closeCalendar(!0)}_openCalendar(e=!1){this._formatInputValue();let t={mode:this._mode,value:this._getCurrentValue(),min:this._min,max:this._max,disabledDates:this._disabledDates,yearRange:this._yearRange,todayButton:this._showToday,clearButton:this._showClear,todayCallback:this._todayListener,clearCallback:this._clearListener,disabledDateBuilder:this._disableDayCallback,disabledDaysOfWeek:this._disabledDaysOfWeek,preventFocus:!0,menuAnimation:"fade",fixedHeight:!0,selectionFollowsMonth:!0,locale:this._locale},a={popupClasses:this._popupClasses,closeCallback:this._dropdownCloseListener,activeChangeCallback:this._activeChangeListener},i=new Date().getTime();this._min&&this._max&&this._max.getTime()<i&&(t.year=this._min.getFullYear(),t.month=this._min.getMonth()),this._adapter.attachCalendar(t,a),this._adapter.addCalendarListener(p.events.DATE_SELECT,this._dateSelectListener),this._adapter.addCalendarListener(p.events.MONTH_CHANGE,this._monthChangeListener),this._open=!0,this._adapter.setHostAttribute(s.observedAttributes.OPEN),e&&this._emitOpenEvent()}_closeCalendar(e=!1){this._open=!1,this._adapter.removeHostAttribute(s.observedAttributes.OPEN),this._adapter.removeCalendarListener(p.events.DATE_SELECT,this._dateSelectListener),this._adapter.removeCalendarListener(p.events.MONTH_CHANGE,this._monthChangeListener),this._adapter.detachCalendar(),e&&this._emitCloseEvent()}_onInputKeydown(e){if(e.shiftKey)switch(e.key){case"Delete":case"Backspace":e.preventDefault(),this._onClear(),this._open&&this._closeCalendar(!0);return;case"ArrowLeft":case"ArrowRight":case"m":case"M":case"y":case"Y":case"d":case"D":if(this._open){e.preventDefault(),this._adapter.propagateCalendarKey(e);return}break}switch(e.key){case"Escape":this._open&&(e.preventDefault(),e.stopPropagation(),this._closeCalendar(!0));break;case"ArrowDown":e.preventDefault(),this._open?this._adapter.propagateCalendarKey(e):(this._adapter.selectInputText(),this._openCalendar(!0));break;case"ArrowUp":this._open&&(e.preventDefault(),this._adapter.propagateCalendarKey(e));break;case"ArrowLeft":case"ArrowRight":case"Enter":case"Home":case"End":if(this._open){e.key==="Enter"&&e.stopPropagation(),e.preventDefault();let t=["ArrowLeft","ArrowRight"].includes(e.key);this._masked&&t&&e.stopImmediatePropagation(),this._adapter.propagateCalendarKey(e)}break;case"n":case"t":e.preventDefault(),this._onToday(),this._open&&this._closeCalendar(!0);break;case"PageUp":case"PageDown":this._open&&(e.preventDefault(),this._adapter.propagateCalendarKey(e));break;case"Tab":if(this._open){let t=this._adapter.getCalendarActiveDate();t&&this._onDateSelected({date:t,selected:!0,type:"date"})}break}}_getSanitizedDateString(e){return e.replace(/_|[a-z]|[A-Z]/g,"").replace(/\/$|\/\/$/,"")}_onToggleMousedown(e){this._disabled||(e.stopPropagation(),!this._adapter.isInputDisabled()&&(e.preventDefault(),this._open?this._closeCalendar(!0):(g.isMobile?this._adapter.tryBlurInput():this._adapter.tryFocusInput(),this._openCalendar(!0))))}_onDropdownClose(){this._closeCalendar(!0)}_onMonthChanged(e){this._adapter.redispatchEvent(e)}_onActiveDescendantChanged(e){this._adapter.setActiveDescendant(e)}_formatInputValue(){let e=this._adapter.getInputValue();if(e){let t=this._parseDateString(e);if(h(t)&&this._isDateValueAcceptable(t)){let a=this._formatDate(t);a&&a!==e&&this._adapter.setInputValue(a,this._notifyInputValueChanges)}else this._allowInvalidDate||this._adapter.setInputValue("",this._notifyInputValueChanges)}}_formatDate(e){return h(e)?typeof this._formatCallback=="function"?this._formatCallback(e):k(e):""}_parseDateString(e){if(e=e.replace(/_|\s/g,""),!e||!e.length)return null;let t=typeof this._parseCallback=="function"?this._parseCallback(e):f(e);return h(t)?t:null}_coerceDateValue(e){return typeof e=="string"?this._parseDateString(e):e}_getTypedValue(e){switch(this._valueMode){case"object":return e;case"string":return this._formatDate(e);case"iso-string":return e&&e.setHours(0,0,0,0),e?e.toISOString():null;default:return e}}_isDateValueAcceptable(e){if(!e||this._allowInvalidDate)return!0;let t=()=>this._min&&!this._allowInvalidDate?this._min.getTime()<=e.getTime():!0,a=()=>this._max&&!this._allowInvalidDate?this._max.getTime()>=e.getTime():!0,i=()=>Array.isArray(this._disabledDates)?this._disabledDates:this._disabledDates?[this._disabledDates]:[],o=()=>!i().some(A=>A.getTime()===e.getTime()),u=()=>!(this._disabledDaysOfWeek&&this._disabledDaysOfWeek.includes(e.getDay())),T=()=>typeof this._disableDayCallback!="function"||!this._disableDayCallback(e);return t()&&a()&&o()&&u()&&T()}_initializeMask(){let e={showMaskFormat:this._showMaskFormat&&this._adapter.isInputFocused(),pattern:this._maskFormat,onChange:t=>this._handleInput(t)};this._prepareMaskCallback&&(e.prepareCallback=(t,a,i,o)=>this._prepareMaskCallback.call(null,t,a,i,o)),this._adapter.initializeMask(e)}_applyMask(){this._masked?this._initializeMask():(this._adapter.destroyMask(),this._formatInputValue())}_applyMin(){this._isInitialized&&this._adapter.setCalendarMinDate(this._min)}_applyMax(){this._isInitialized&&this._adapter.setCalendarMaxDate(this._max)}_applyDisableDayCallback(){this._adapter.setCalendarDisableDayCallback(this._disableDayCallback)}_applyDisabled(){this._adapter.setDisabled(this._disabled)}get valueMode(){return this._valueMode}set valueMode(e){if(this._valueMode!==e){if(!["object","string","iso-string"].includes(e))return;this._valueMode=e,this._emitChangeEvent(this._value),this._adapter.setHostAttribute(s.observedAttributes.VALUE_MODE,this._valueMode)}}get min(){return this._min?new Date(this._min.getTime()):null}set min(e){if(this._min!==e){let t=this._coerceDateValue(e);this._min=t?new Date(t.getTime()):null,this._applyMin(),this._isInitialized&&this._open&&this._adapter.setCalendarMinDate(this._min)}}get max(){return this._max?new Date(this._max.getTime()):null}set max(e){this._max!==e&&(this._max=this._coerceDateValue(e),this._applyMax(),this._isInitialized&&this._open&&this._adapter.setCalendarMaxDate(this._max))}get open(){return this._open}set open(e){this._open!==e&&this._isInitialized&&(this._open=e,this._open?this._openCalendar():this._closeCalendar())}get disabled(){return this._disabled}set disabled(e){this._disabled!==e&&(this._disabled=e,this._isInitialized&&this._applyDisabled())}get disabledDates(){return this._disabledDates?Array.isArray(this._disabledDates)?this._disabledDates.map(e=>new Date(e.getTime())):new Date(this._disabledDates.getTime()):null}set disabledDates(e){e?Array.isArray(e)?this._disabledDates=e.map(t=>new Date(t.getTime())):this._disabledDates=new Date(e.getTime()):this._disabledDates=null,this._isInitialized&&this._open&&this._adapter.setCalendarDisabledDates(this._disabledDates),this._applyDisabledDates()}get popupClasses(){return Array.isArray(this._popupClasses)?[...this._popupClasses]:this._popupClasses}set popupClasses(e){Array.isArray(e)?this._popupClasses=[...e]:this._popupClasses=e}get masked(){return this._masked}set masked(e){this._masked!==e&&(this._masked=e,this._isInitialized&&(this._masked?(this._removeInputChangeListeners(),this._applyMask()):(this._adapter.destroyMask(),this._setInputChangeListeners(),this._formatInputValue())))}get maskFormat(){return this._maskFormat}set maskFormat(e){this._maskFormat!==e&&(this._maskFormat=e,this._isInitialized&&this._applyMask())}get showMaskFormat(){return this._showMaskFormat}set showMaskFormat(e){this._showMaskFormat!==e&&(this._showMaskFormat=e)}get notifyInputValueChanges(){return this._notifyInputValueChanges}set notifyInputValueChanges(e){this._notifyInputValueChanges=e}get allowInvalidDate(){return this._allowInvalidDate}set allowInvalidDate(e){this._allowInvalidDate!==e&&(this._allowInvalidDate=e,this._adapter.toggleHostAttribute(s.observedAttributes.ALLOW_INVALID_DATE,this._allowInvalidDate))}get disabledDaysOfWeek(){return this._disabledDaysOfWeek}set disabledDaysOfWeek(e){this._disabledDaysOfWeek!==e&&(this._disabledDaysOfWeek=e,this._isInitialized&&this._open&&this._adapter.setCalendarDisabledDaysOfWeek(this._disabledDaysOfWeek),this._applyDisabledDaysOfWeek())}get disableDayCallback(){return this._disableDayCallback}set disableDayCallback(e){e!==this._disableDayCallback&&(this._disableDayCallback=e,this._applyDisableDayCallback())}get parseCallback(){return this._parseCallback}set parseCallback(e){this._parseCallback=e,this._isInitialized&&this._applyMask()}get formatCallback(){return this._formatCallback}set formatCallback(e){this._formatCallback=e,this._isInitialized&&this._applyMask()}get prepareMaskCallback(){return this._prepareMaskCallback}set prepareMaskCallback(e){this._prepareMaskCallback=e,this._isInitialized&&this._applyMask()}get showToday(){return this._showToday}set showToday(e){this._showToday=e}get showClear(){return this._showClear}set showClear(e){this._showClear=e}get yearRange(){return this._yearRange}set yearRange(e){this._yearRange!==e&&(this._yearRange=e,this._isInitialized&&this._open&&this._adapter.setCalendarYearRange(this._yearRange))}get locale(){return this._locale}set locale(e){this._locale!==e&&(this._locale=e,this._isInitialized&&this._open&&this._adapter.setCalendarLocale(this._locale))}};export{s as a,n as b,M as c,L as d,w as e};
|
|
7
|
+
//# sourceMappingURL=chunk.MSBAFZ54.js.map
|
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
4
|
* License: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import{A as T,c as L,t as w}from"./chunk.MZLPUI6R.js";import{d as B}from"./chunk.TEHQWMFI.js";import{d as N,l as S}from"./chunk.WHQZNZHW.js";import{a as k}from"./chunk.UWYANU5D.js";import{a}from"./chunk.KTGSZEAG.js";import{a as C,b as A}from"./chunk.DL7NX432.js";import{a as I,e as y,g as c,j as h,l as O}from"./chunk.LJLEPTLU.js";import{f as g,g as _,l as f,r as v,t as x,u as E}from"./chunk.4LA6HEA7.js";import{b as m,k as l}from"./chunk.J2M2MXP2.js";import{a as d,f as r}from"./chunk.MCIQXNKY.js";var D=`${A}app-bar-search`,R={FOCUSED:"forge-app-bar-search--focused",DISABLED:"forge-app-bar-search--disabled"},z={ROOT:".forge-app-bar-search",INPUT:"input",GLOBAL_ICON_CONTAINER:".forge-app-bar-search__global-icon-container",CONTEXT_CONTAINER:".forge-app-bar-search__context"},H={DISABLED:"disabled",VALUE:"value",PLACEHOLDER:"placeholder",COMBINED:"combined",GLOBAL:"global"},M={INPUT:`${D}-input`},P={DEFAULT_CONTEXT:"global"},o={elementName:D,classes:R,selectors:z,attributes:H,events:M,strings:P},G=[{label:"in this application",value:"local"},{label:"in all products",value:P.DEFAULT_CONTEXT}];var p=class{constructor(t){this._adapter=t;this._disabled=!1;this._combined=!1;this._combinedContext=o.strings.DEFAULT_CONTEXT;this._combinedOptions=[];this._global=!1;this._keydownListener=e=>this._onKeyDown(e),this._focusListener=e=>this._onFocus(e),this._blurListener=e=>this._onBlur(e)}initialize(){if(this._adapter.initialize(),!this._adapter.hasInputElement())throw new Error("An input element is required as a child of the app-bar-search component.");this._adapter.setGlobalIconVisibility(this._global),this._adapter.setContextVisibility(this._combined),this._adapter.addSearchInputEventListener("keydown",this._keydownListener),this._adapter.addSearchInputEventListener("focus",this._focusListener),this._adapter.addSearchInputEventListener("blur",this._blurListener)}_onKeyDown(t){if(t.key==="Enter"||t.keyCode===13){let e={value:t.target.value,combined:this._combined,context:this._combinedContext};this._adapter.emitHostEvent(o.events.INPUT,e,!0)}}_onFocus(t){this._adapter.addRootClass(o.classes.FOCUSED)}_onBlur(t){this._adapter.removeRootClass(o.classes.FOCUSED)}disconnect(){this._adapter.removeSearchInputEventListener("keydown",this._keydownListener),this._adapter.removeSearchInputEventListener("focus",this._focusListener),this._adapter.removeSearchInputEventListener("blur",this._blurListener)}get disabled(){return this._disabled}set disabled(t){t!==this._disabled&&(this._disabled=t,this._adapter.setDisabled(this._disabled),this._adapter.toggleHostAttribute(o.attributes.DISABLED,this._disabled))}get value(){return this._adapter.getInputValue()}set value(t){this._adapter.setInputValue(t)}set placeholder(t){this._adapter.setInputPlaceholder(t)}get combined(){return this._combined}set combined(t){this._combined!==t&&(this._combined=t,this._adapter.setContextVisibility(this._combined))}get combinedOptions(){return this._combinedOptions?this._combinedOptions.map(t=>d({},t)):[]}set combinedOptions(t){t||(this._combinedOptions=[]),this._combinedOptions=t.map(e=>d({},e))}get selectedCombinedOption(){return this._selectedCombinedOption}set selectedCombinedOption(t){this._selectedCombinedOption!==t&&(this._selectedCombinedOption=t)}get global(){return this._global}set global(t){this._global!==t&&(this._global=t,this._adapter.setGlobalIconVisibility(this._global))}};var b=class extends k{constructor(e){super(e);this._rootElement=c(e,o.selectors.ROOT),this._globalIconContainer=c(e,o.selectors.GLOBAL_ICON_CONTAINER),this._contextContainerElement=c(e,o.selectors.CONTEXT_CONTAINER)}initialize(){let e=v(this._component,o.selectors.INPUT,!1);e.length&&(this._inputElement=e[0])}hasInputElement(){return m(this._inputElement)}addRootClass(e){g(e,this._rootElement)}removeRootClass(e){_(e,this._rootElement)}addSearchInputEventListener(e,s){this._inputElement.addEventListener(e,s)}removeSearchInputEventListener(e,s){this._inputElement.removeEventListener(e,s)}setDisabled(e){x(this._rootElement,e,o.classes.DISABLED),E(this._inputElement,e,o.attributes.DISABLED)}getInputValue(){return this._inputElement.value}setInputValue(e){this._inputElement.value=e}setInputPlaceholder(e){this._inputElement.placeholder=e}setGlobalIconVisibility(e){this._globalIconPlaceholder=h(this._component,e,o.elementName,o.selectors.GLOBAL_ICON_CONTAINER,this._globalIconContainer,this._globalIconPlaceholder)}setContextVisibility(e){this._contextContainerPlaceholder=h(this._component,e,o.elementName,o.selectors.CONTEXT_CONTAINER,this._contextContainerElement,this._contextContainerPlaceholder)}};var F='<template><div class="forge-app-bar-search" part="root"><div class="forge-app-bar-search__container" part="container"><div class="forge-app-bar-search__search-icon-container" part="icon-container"><forge-icon name="search" class="forge-app-bar-search__icon" part="icon"></forge-icon></div><slot></slot><div class="forge-app-bar-search__context" part="context"><div class="forge-app-bar-search__vertical-divider" part="context-divider"></div><button type="button" class="forge-app-bar-search__context-button" part="context-button"><span class="forge-app-bar-search__context-button-text" part="context-button-text">in this application</span><forge-icon name="arrow_drop_down" class="forge-app-bar-search__context-button-icon" part="context-button-icon"></forge-icon></button></div><div class="forge-app-bar-search__global-icon-container" part="global-icon-container"><forge-icon slot="trailing" name="language" id="app-bar-global-context" part="global-icon"></forge-icon><forge-tooltip delay="500" position="bottom" target="#app-bar-global-context">Global search</forge-tooltip></div></div><div class="forge-app-bar-search__actions" part="actions-container"><slot name="action"></slot></div></div></template>',V='::slotted([slot=action]){margin-left:8px}.forge-app-bar-search{display:-webkit-box;display:flex;height:2.25rem}.forge-app-bar-search__container{background-color:rgba(255,255,255,.08);background-color:var(--forge-app-bar-search-theme-background,rgba(255,255,255,.08));width:100%;-webkit-box-flex:1;flex:1 1 auto;margin:0;display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;position:relative}.forge-app-bar-search__container::before{border-color:#fff;border-color:var(--mdc-theme-on-primary,#fff);content:"";position:absolute;top:0;right:0;bottom:0;left:0;border-radius:2px;border-width:1px;border-style:solid;z-index:-1;opacity:.54;-webkit-transition-property:border-color,opacity;transition-property:border-color,opacity;-webkit-transition-duration:150ms;transition-duration:150ms;-webkit-transition-timing-function:cubic-bezier(0.55,0,0.55,0.2);transition-timing-function:cubic-bezier(0.55,0,0.55,0.2);will-change:border-color,border-width,opacity,top,left,bottom,right}.forge-app-bar-search__container:hover::before{opacity:.87;opacity:var(--forge-app-bar-search-theme-hover-opacity, .87)}.forge-app-bar-search__container ::slotted(input){color:#fff;color:var(--mdc-theme-on-primary,#fff);display:block;overflow:hidden;background:0 0;border:none;font-size:1rem;-webkit-box-flex:1;flex:1 1 auto;margin:0;margin-left:-8px;outline:0;pointer-events:auto;-webkit-transition-property:color;transition-property:color;-webkit-transition-duration:150ms;transition-duration:150ms;-webkit-transition-timing-function:cubic-bezier(0.55,0,0.55,0.2);transition-timing-function:cubic-bezier(0.55,0,0.55,0.2)}.forge-app-bar-search__container ::slotted(input)::-webkit-input-placeholder{color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54));font-size:1rem;opacity:1}.forge-app-bar-search__container ::slotted(input)::-moz-placeholder{color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54));font-size:1rem;opacity:1}.forge-app-bar-search__container ::slotted(input):-ms-input-placeholder{color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54));font-size:1rem;opacity:1}.forge-app-bar-search__container ::slotted(input)::-ms-input-placeholder{color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54));font-size:1rem;opacity:1}.forge-app-bar-search__container ::slotted(input)::placeholder{color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54));font-size:1rem;opacity:1}.forge-app-bar-search__global-icon-container{display:-webkit-box;display:flex;-webkit-box-pack:center;justify-content:center;-webkit-box-align:center;align-items:center;margin:0 16px}.forge-app-bar-search__search-icon-container{width:56px;height:36px;display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center;-webkit-box-flex:0;flex:none}.forge-app-bar-search__icon{color:#fff;color:var(--mdc-theme-on-primary,#fff)}.forge-app-bar-search__actions{display:-webkit-box;display:flex;-webkit-box-pack:center;justify-content:center;-webkit-box-align:center;align-items:center}.forge-app-bar-search__context{height:100%;display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;margin-left:8px}.forge-app-bar-search__context-button{color:#000;color:var(--mdc-theme-on-surface,#000);outline:0;border:none;background:0 0;min-width:100px;display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;height:70%;margin-left:8px;margin-right:4px;border-radius:4px;background-color:transparent;-webkit-transition:background-color .2s ease-out;transition:background-color .2s ease-out;will-change:background-color;padding:0;padding-left:8px}.forge-app-bar-search__context-button:hover{background-color:rgba(255,255,255,.12)}.forge-app-bar-search__context-button:focus{background-color:rgba(255,255,255,.2)}.forge-app-bar-search__context-button-text{-webkit-box-flex:1;flex:1;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.forge-app-bar-search__vertical-divider{border-left-color:#fff;border-left-color:var(--mdc-theme-on-primary,#fff);display:inline-block;position:absolute;top:8px;bottom:8px;border-left-width:1px;border-left-style:solid}.forge-app-bar-search--focused .forge-app-bar-search__container{background-color:rgba(255,255,255,.12);background-color:var(--forge-app-bar-search-theme-background-focused,rgba(255,255,255,.12))}.forge-app-bar-search--focused .forge-app-bar-search__container::before{opacity:.87;border-width:2px;top:-1px;right:-1px;bottom:-1px;left:-1px}.forge-app-bar-search--disabled{opacity:.26;opacity:var(--forge-app-bar-search-theme-disabled-opacity, .26);cursor:not-allowed}.forge-app-bar-search--disabled .forge-app-bar-search__container:hover::before{opacity:54%}.forge-app-bar-search--disabled ::slotted(input){cursor:not-allowed}:host{display:block;width:100%;contain:layout style}:host([hidden]){display:none}',i=class extends O{constructor(){super();N.define([T,L,w]),y(this,F,V),this._foundation=new p(new b(this))}static get observedAttributes(){return[o.attributes.DISABLED,o.attributes.VALUE,o.attributes.PLACEHOLDER,o.attributes.COMBINED,o.attributes.GLOBAL]}connectedCallback(){this.children.length?this._initialize():f(this).then(()=>this._initialize())}_initialize(){this._foundation.initialize()}disconnectedCallback(){this._foundation.disconnect()}attributeChangedCallback(e,s,n){switch(e){case o.attributes.DISABLED:this.disabled=l(n);break;case o.attributes.VALUE:this.value=n;break;case o.attributes.PLACEHOLDER:this.placeholder=n;break;case o.attributes.COMBINED:this.combined=l(n);break;case o.attributes.GLOBAL:this.global=l(n);break}}set placeholder(e){this._foundation.placeholder=e}};r([a()],i.prototype,"value",2),r([a()],i.prototype,"disabled",2),r([a()],i.prototype,"combined",2),r([a()],i.prototype,"combinedOptions",2),r([a()],i.prototype,"selectedCombinedOption",2),r([a()],i.prototype,"global",2),i=r([C({name:o.elementName,dependencies:[B,S]})],i);function de(){I(i)}export{o as a,G as b,p as c,b as d,i as e,de as f};
|
|
7
|
-
//# sourceMappingURL=chunk.
|
|
6
|
+
import{A as T,c as L,t as w}from"./chunk.MZLPUI6R.js";import{d as B}from"./chunk.TEHQWMFI.js";import{d as N,l as S}from"./chunk.B5TEOESG.js";import{a as k}from"./chunk.UWYANU5D.js";import{a}from"./chunk.KTGSZEAG.js";import{a as C,b as A}from"./chunk.DL7NX432.js";import{a as I,e as y,g as c,j as h,l as O}from"./chunk.LJLEPTLU.js";import{f as g,g as _,l as f,r as v,t as x,u as E}from"./chunk.4LA6HEA7.js";import{b as m,k as l}from"./chunk.J2M2MXP2.js";import{a as d,f as r}from"./chunk.MCIQXNKY.js";var D=`${A}app-bar-search`,R={FOCUSED:"forge-app-bar-search--focused",DISABLED:"forge-app-bar-search--disabled"},z={ROOT:".forge-app-bar-search",INPUT:"input",GLOBAL_ICON_CONTAINER:".forge-app-bar-search__global-icon-container",CONTEXT_CONTAINER:".forge-app-bar-search__context"},H={DISABLED:"disabled",VALUE:"value",PLACEHOLDER:"placeholder",COMBINED:"combined",GLOBAL:"global"},M={INPUT:`${D}-input`},P={DEFAULT_CONTEXT:"global"},o={elementName:D,classes:R,selectors:z,attributes:H,events:M,strings:P},G=[{label:"in this application",value:"local"},{label:"in all products",value:P.DEFAULT_CONTEXT}];var p=class{constructor(t){this._adapter=t;this._disabled=!1;this._combined=!1;this._combinedContext=o.strings.DEFAULT_CONTEXT;this._combinedOptions=[];this._global=!1;this._keydownListener=e=>this._onKeyDown(e),this._focusListener=e=>this._onFocus(e),this._blurListener=e=>this._onBlur(e)}initialize(){if(this._adapter.initialize(),!this._adapter.hasInputElement())throw new Error("An input element is required as a child of the app-bar-search component.");this._adapter.setGlobalIconVisibility(this._global),this._adapter.setContextVisibility(this._combined),this._adapter.addSearchInputEventListener("keydown",this._keydownListener),this._adapter.addSearchInputEventListener("focus",this._focusListener),this._adapter.addSearchInputEventListener("blur",this._blurListener)}_onKeyDown(t){if(t.key==="Enter"||t.keyCode===13){let e={value:t.target.value,combined:this._combined,context:this._combinedContext};this._adapter.emitHostEvent(o.events.INPUT,e,!0)}}_onFocus(t){this._adapter.addRootClass(o.classes.FOCUSED)}_onBlur(t){this._adapter.removeRootClass(o.classes.FOCUSED)}disconnect(){this._adapter.removeSearchInputEventListener("keydown",this._keydownListener),this._adapter.removeSearchInputEventListener("focus",this._focusListener),this._adapter.removeSearchInputEventListener("blur",this._blurListener)}get disabled(){return this._disabled}set disabled(t){t!==this._disabled&&(this._disabled=t,this._adapter.setDisabled(this._disabled),this._adapter.toggleHostAttribute(o.attributes.DISABLED,this._disabled))}get value(){return this._adapter.getInputValue()}set value(t){this._adapter.setInputValue(t)}set placeholder(t){this._adapter.setInputPlaceholder(t)}get combined(){return this._combined}set combined(t){this._combined!==t&&(this._combined=t,this._adapter.setContextVisibility(this._combined))}get combinedOptions(){return this._combinedOptions?this._combinedOptions.map(t=>d({},t)):[]}set combinedOptions(t){t||(this._combinedOptions=[]),this._combinedOptions=t.map(e=>d({},e))}get selectedCombinedOption(){return this._selectedCombinedOption}set selectedCombinedOption(t){this._selectedCombinedOption!==t&&(this._selectedCombinedOption=t)}get global(){return this._global}set global(t){this._global!==t&&(this._global=t,this._adapter.setGlobalIconVisibility(this._global))}};var b=class extends k{constructor(e){super(e);this._rootElement=c(e,o.selectors.ROOT),this._globalIconContainer=c(e,o.selectors.GLOBAL_ICON_CONTAINER),this._contextContainerElement=c(e,o.selectors.CONTEXT_CONTAINER)}initialize(){let e=v(this._component,o.selectors.INPUT,!1);e.length&&(this._inputElement=e[0])}hasInputElement(){return m(this._inputElement)}addRootClass(e){g(e,this._rootElement)}removeRootClass(e){_(e,this._rootElement)}addSearchInputEventListener(e,s){this._inputElement.addEventListener(e,s)}removeSearchInputEventListener(e,s){this._inputElement.removeEventListener(e,s)}setDisabled(e){x(this._rootElement,e,o.classes.DISABLED),E(this._inputElement,e,o.attributes.DISABLED)}getInputValue(){return this._inputElement.value}setInputValue(e){this._inputElement.value=e}setInputPlaceholder(e){this._inputElement.placeholder=e}setGlobalIconVisibility(e){this._globalIconPlaceholder=h(this._component,e,o.elementName,o.selectors.GLOBAL_ICON_CONTAINER,this._globalIconContainer,this._globalIconPlaceholder)}setContextVisibility(e){this._contextContainerPlaceholder=h(this._component,e,o.elementName,o.selectors.CONTEXT_CONTAINER,this._contextContainerElement,this._contextContainerPlaceholder)}};var F='<template><div class="forge-app-bar-search" part="root"><div class="forge-app-bar-search__container" part="container"><div class="forge-app-bar-search__search-icon-container" part="icon-container"><forge-icon name="search" class="forge-app-bar-search__icon" part="icon"></forge-icon></div><slot></slot><div class="forge-app-bar-search__context" part="context"><div class="forge-app-bar-search__vertical-divider" part="context-divider"></div><button type="button" class="forge-app-bar-search__context-button" part="context-button"><span class="forge-app-bar-search__context-button-text" part="context-button-text">in this application</span><forge-icon name="arrow_drop_down" class="forge-app-bar-search__context-button-icon" part="context-button-icon"></forge-icon></button></div><div class="forge-app-bar-search__global-icon-container" part="global-icon-container"><forge-icon slot="trailing" name="language" id="app-bar-global-context" part="global-icon"></forge-icon><forge-tooltip delay="500" position="bottom" target="#app-bar-global-context">Global search</forge-tooltip></div></div><div class="forge-app-bar-search__actions" part="actions-container"><slot name="action"></slot></div></div></template>',V='::slotted([slot=action]){margin-left:8px}.forge-app-bar-search{display:-webkit-box;display:flex;height:2.25rem}.forge-app-bar-search__container{background-color:rgba(255,255,255,.08);background-color:var(--forge-app-bar-search-theme-background,rgba(255,255,255,.08));width:100%;-webkit-box-flex:1;flex:1 1 auto;margin:0;display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;position:relative}.forge-app-bar-search__container::before{border-color:#fff;border-color:var(--mdc-theme-on-primary,#fff);content:"";position:absolute;top:0;right:0;bottom:0;left:0;border-radius:2px;border-width:1px;border-style:solid;z-index:-1;opacity:.54;-webkit-transition-property:border-color,opacity;transition-property:border-color,opacity;-webkit-transition-duration:150ms;transition-duration:150ms;-webkit-transition-timing-function:cubic-bezier(0.55,0,0.55,0.2);transition-timing-function:cubic-bezier(0.55,0,0.55,0.2);will-change:border-color,border-width,opacity,top,left,bottom,right}.forge-app-bar-search__container:hover::before{opacity:.87;opacity:var(--forge-app-bar-search-theme-hover-opacity, .87)}.forge-app-bar-search__container ::slotted(input){color:#fff;color:var(--mdc-theme-on-primary,#fff);display:block;overflow:hidden;background:0 0;border:none;font-size:1rem;-webkit-box-flex:1;flex:1 1 auto;margin:0;margin-left:-8px;outline:0;pointer-events:auto;-webkit-transition-property:color;transition-property:color;-webkit-transition-duration:150ms;transition-duration:150ms;-webkit-transition-timing-function:cubic-bezier(0.55,0,0.55,0.2);transition-timing-function:cubic-bezier(0.55,0,0.55,0.2)}.forge-app-bar-search__container ::slotted(input)::-webkit-input-placeholder{color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54));font-size:1rem;opacity:1}.forge-app-bar-search__container ::slotted(input)::-moz-placeholder{color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54));font-size:1rem;opacity:1}.forge-app-bar-search__container ::slotted(input):-ms-input-placeholder{color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54));font-size:1rem;opacity:1}.forge-app-bar-search__container ::slotted(input)::-ms-input-placeholder{color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54));font-size:1rem;opacity:1}.forge-app-bar-search__container ::slotted(input)::placeholder{color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54));font-size:1rem;opacity:1}.forge-app-bar-search__global-icon-container{display:-webkit-box;display:flex;-webkit-box-pack:center;justify-content:center;-webkit-box-align:center;align-items:center;margin:0 16px}.forge-app-bar-search__search-icon-container{width:56px;height:36px;display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center;-webkit-box-flex:0;flex:none}.forge-app-bar-search__icon{color:#fff;color:var(--mdc-theme-on-primary,#fff)}.forge-app-bar-search__actions{display:-webkit-box;display:flex;-webkit-box-pack:center;justify-content:center;-webkit-box-align:center;align-items:center}.forge-app-bar-search__context{height:100%;display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;margin-left:8px}.forge-app-bar-search__context-button{color:#000;color:var(--mdc-theme-on-surface,#000);outline:0;border:none;background:0 0;min-width:100px;display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;height:70%;margin-left:8px;margin-right:4px;border-radius:4px;background-color:transparent;-webkit-transition:background-color .2s ease-out;transition:background-color .2s ease-out;will-change:background-color;padding:0;padding-left:8px}.forge-app-bar-search__context-button:hover{background-color:rgba(255,255,255,.12)}.forge-app-bar-search__context-button:focus{background-color:rgba(255,255,255,.2)}.forge-app-bar-search__context-button-text{-webkit-box-flex:1;flex:1;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.forge-app-bar-search__vertical-divider{border-left-color:#fff;border-left-color:var(--mdc-theme-on-primary,#fff);display:inline-block;position:absolute;top:8px;bottom:8px;border-left-width:1px;border-left-style:solid}.forge-app-bar-search--focused .forge-app-bar-search__container{background-color:rgba(255,255,255,.12);background-color:var(--forge-app-bar-search-theme-background-focused,rgba(255,255,255,.12))}.forge-app-bar-search--focused .forge-app-bar-search__container::before{opacity:.87;border-width:2px;top:-1px;right:-1px;bottom:-1px;left:-1px}.forge-app-bar-search--disabled{opacity:.26;opacity:var(--forge-app-bar-search-theme-disabled-opacity, .26);cursor:not-allowed}.forge-app-bar-search--disabled .forge-app-bar-search__container:hover::before{opacity:54%}.forge-app-bar-search--disabled ::slotted(input){cursor:not-allowed}:host{display:block;width:100%;contain:layout style}:host([hidden]){display:none}',i=class extends O{constructor(){super();N.define([T,L,w]),y(this,F,V),this._foundation=new p(new b(this))}static get observedAttributes(){return[o.attributes.DISABLED,o.attributes.VALUE,o.attributes.PLACEHOLDER,o.attributes.COMBINED,o.attributes.GLOBAL]}connectedCallback(){this.children.length?this._initialize():f(this).then(()=>this._initialize())}_initialize(){this._foundation.initialize()}disconnectedCallback(){this._foundation.disconnect()}attributeChangedCallback(e,s,n){switch(e){case o.attributes.DISABLED:this.disabled=l(n);break;case o.attributes.VALUE:this.value=n;break;case o.attributes.PLACEHOLDER:this.placeholder=n;break;case o.attributes.COMBINED:this.combined=l(n);break;case o.attributes.GLOBAL:this.global=l(n);break}}set placeholder(e){this._foundation.placeholder=e}};r([a()],i.prototype,"value",2),r([a()],i.prototype,"disabled",2),r([a()],i.prototype,"combined",2),r([a()],i.prototype,"combinedOptions",2),r([a()],i.prototype,"selectedCombinedOption",2),r([a()],i.prototype,"global",2),i=r([C({name:o.elementName,dependencies:[B,S]})],i);function de(){I(i)}export{o as a,G as b,p as c,b as d,i as e,de as f};
|
|
7
|
+
//# sourceMappingURL=chunk.P7AU3S6P.js.map
|
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
4
|
* License: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import{a as h,v as i,x as k}from"./chunk.5OLZHLY4.js";import{a as L}from"./chunk.UWYANU5D.js";import{a as c}from"./chunk.KTGSZEAG.js";import{a as O}from"./chunk.DL7NX432.js";import{a as C,e as y,g as I,l as E}from"./chunk.LJLEPTLU.js";import{k as b,l as S,p as w}from"./chunk.J2M2MXP2.js";import{f as d}from"./chunk.MCIQXNKY.js";var r=class{static observe(t,e,l){var a,o;r._targets.has(t)&&((a=r._observer)===null||a===void 0||a.unobserve(t)),r._targets.set(t,e),r._countTargets(),(o=r._observer)===null||o===void 0||o.observe(t,l)}static unobserve(t){var e;r._targets.delete(t),(e=r._observer)===null||e===void 0||e.unobserve(t),r._countTargets()}static _countTargets(){r._observer?r._targets.size<1&&(r._observer=void 0):r._targets.size&&(r._observer=new ResizeObserver(r._handleResize))}};r._targets=new Map;r._handleResize=f=>{f.forEach(t=>{var e;(e=r._targets.get(t.target))===null||e===void 0||e(t)})};var v=class extends L{constructor(e){super(e);this._root=I(e,i.selectors.ROOT)}registerSlotListener(e){this._root.addEventListener("slotchange",e)}registerDidOpenListener(e){this._root.addEventListener(h.events.DID_OPEN,e)}registerDidCloseListener(e){this._root.addEventListener(h.events.DID_CLOSE,e)}observeResize(e){r.observe(this._root,e)}unobserveResize(){r.unobserve(this._root)}getSlottedPanels(){let e=this._component.querySelectorAll(i.selectors.PANEL);return Array.from(e).filter(o=>o.parentElement===this._component)}refitSlottedPanels(e){let l=e==="horizontal"?this._root.clientWidth:this._root.clientHeight,a=this.getSlottedPanels(),o=a.map(p=>{var m;let n=(m=p.shadowRoot)==null?void 0:m.querySelector(h.selectors.ROOT),u=e==="horizontal"?n==null?void 0:n.clientWidth:n==null?void 0:n.clientHeight;return u!=null?u:0}).reduce((p,n)=>p+n,0);if(o<=l)return;let _=o-l;a.slice().reverse().forEach(p=>{if(_<=0)return;let n=p.getContentSize(),u=p.getCollapsibleSize(),m=Math.min(_,u),T=n-m;p.setContentSize(T),_-=m})}};var g=class{constructor(t){this._adapter=t;this._orientation="horizontal";this._disabled=!1;this._allowClose=!1;this._autoClose=!1;this._autoCloseThreshold=0;this._isInitialized=!1;this._slotListener=e=>this._onSlotChange(e),this._didOpenListener=()=>this._onDidOpen(),this._didCloseListener=()=>this._onDidClose(),this._resizeObserverCallback=w(e=>this._onResize(e),i.numbers.RESIZE_THROTTLE_THRESHOLD)}initialize(){this._adapter.registerSlotListener(this._slotListener),this._adapter.registerDidOpenListener(this._didOpenListener),this._adapter.registerDidCloseListener(this._didCloseListener),this._adapter.observeResize(this._resizeObserverCallback),this._applyOrientation(),this._isInitialized=!0}disconnect(){this._adapter.unobserveResize()}_onSlotChange(t){this._layoutSlottedPanels(),this.update({accessibility:!0,cursor:!0,orientation:this._orientation})}_onDidOpen(){this._adapter.refitSlottedPanels(this._orientation),this.update({accessibility:!0,cursor:!0,size:!0})}_onDidClose(){this._adapter.refitSlottedPanels(this._orientation),this.update({accessibility:!0,cursor:!0,size:!0})}_onResize(t){this.update({accessibility:!0,cursor:!0,size:!0})}_layoutSlottedPanels(){let t=this._adapter.getSlottedPanels();t.length<2||t.some(e=>e.resizable!=="off")||t.slice(1).forEach(e=>e.resizable="start")}get orientation(){return this._orientation}set orientation(t){this._orientation!==t&&(this._orientation=t,this._applyOrientation())}_applyOrientation(){this._adapter.setHostAttribute(i.attributes.ORIENTATION,this._orientation),this.update({orientation:this._orientation}),this._isInitialized&&this._adapter.refitSlottedPanels(this._orientation),this.update({accessibility:!0,cursor:!0})}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=t,this._applyDisabled())}_applyDisabled(){this._adapter.toggleHostAttribute(i.attributes.DISABLED,this._disabled),this.update({properties:{disabled:this._disabled}})}get allowClose(){return this._allowClose}set allowClose(t){this._allowClose!==t&&(this._allowClose=t,this._applyAllowClose())}_applyAllowClose(){this._adapter.toggleHostAttribute(i.attributes.ALLOW_CLOSE,this._allowClose),this.update({properties:{allowClose:this._allowClose}})}get autoClose(){return this._autoClose}set autoClose(t){this._autoClose!==t&&(this._autoClose=t,this._applyAutoClose())}_applyAutoClose(){this._adapter.toggleHostAttribute(i.attributes.AUTO_CLOSE,this._autoClose),this.update({properties:{autoClose:this._autoClose}})}get autoCloseThreshold(){return this._autoCloseThreshold}set autoCloseThreshold(t){this._autoCloseThreshold!==t&&(this._autoCloseThreshold=t,this._applyAutoCloseThreshold())}_applyAutoCloseThreshold(){this._adapter.setHostAttribute(i.attributes.AUTO_CLOSE_THRESHOLD,this._autoCloseThreshold.toString()),this.update({properties:{autoCloseThreshold:this._autoCloseThreshold}})}layerSlottedPanels(t){let e=this._adapter.getSlottedPanels(),l=t.resizable==="start"?1:-1,a=t.resizable==="start"?1:3;e.forEach(o=>{(o===t||a===2)&&(a+=l),o.style.setProperty(i.customCssProperties.ANIMATING_LAYER,a.toString())})}unlayerSlottedPanels(){this._adapter.getSlottedPanels().forEach(e=>{e.style.removeProperty(i.customCssProperties.ANIMATING_LAYER)})}update(t){this._adapter.getSlottedPanels().forEach(l=>{l.update(t)})}refitSlottedPanels(){this._adapter.refitSlottedPanels(this._orientation)}};var P='<template><div class="forge-split-view" id="root" part="root"><slot></slot></div></template>',A='@-webkit-keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@-webkit-keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@-webkit-keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}@keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-ripple-surface{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:transparent;will-change:transform,opacity;position:relative;outline:0;overflow:hidden}.mdc-ripple-surface::after,.mdc-ripple-surface::before{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-ripple-surface::before{-webkit-transition:opacity 15ms linear,background-color 15ms linear;transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.mdc-ripple-surface::after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.mdc-ripple-surface.mdc-ripple-upgraded::before{-webkit-transform:scale(var(--mdc-ripple-fg-scale,1));transform:scale(var(--mdc-ripple-fg-scale,1))}.mdc-ripple-surface.mdc-ripple-upgraded::after{top:0;left:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:center center;transform-origin:center center}.mdc-ripple-surface.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top,0);left:var(--mdc-ripple-left,0)}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-activation::after{-webkit-animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards;animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-deactivation::after{-webkit-animation:mdc-ripple-fg-opacity-out 150ms;animation:mdc-ripple-fg-opacity-out 150ms;-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.mdc-ripple-surface::after,.mdc-ripple-surface::before{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-ripple-surface.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded],.mdc-ripple-upgraded--unbounded{overflow:visible}.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::after,.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::before,.mdc-ripple-upgraded--unbounded::after,.mdc-ripple-upgraded--unbounded::before{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::before,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::before{top:var(--mdc-ripple-top,calc(50% - 50%));left:var(--mdc-ripple-left,calc(50% - 50%));width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface::after,.mdc-ripple-surface::before{background-color:#000;background-color:var(--mdc-ripple-color,#000)}.mdc-ripple-surface.mdc-ripple-surface--hover::before,.mdc-ripple-surface:hover::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.mdc-ripple-surface.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface:not(.mdc-ripple-upgraded):focus::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.mdc-ripple-surface:not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.mdc-ripple-surface:not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.mdc-ripple-surface.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface::after,.mdc-ripple-surface::before{--mdc-ripple-color:var(--mdc-theme-on-surface)}.forge-split-view{display:-webkit-box;display:flex;width:100%;height:100%}:host{--forge-split-view-handle-width:8px;display:block;height:100%;width:100%;overflow:hidden;contain:paint size}:host([hidden]){display:none}:host([orientation=horizontal]) .forge-split-view{-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row}:host([orientation=vertical]) .forge-split-view{-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column}',s=class extends E{constructor(){super();y(this,P,A),this._foundation=new g(new v(this))}static get observedAttributes(){return[i.attributes.ORIENTATION,i.attributes.DISABLED,i.attributes.ALLOW_CLOSE,i.attributes.AUTO_CLOSE,i.attributes.AUTO_CLOSE_THRESHOLD]}connectedCallback(){this._foundation.initialize()}disconnectedCallback(){this._foundation.disconnect()}attributeChangedCallback(e,l,a){switch(e){case i.attributes.ORIENTATION:this.orientation=a;break;case i.attributes.DISABLED:this.disabled=b(a);break;case i.attributes.ALLOW_CLOSE:this.allowClose=b(a);break;case i.attributes.AUTO_CLOSE:this.autoClose=b(a);break;case i.attributes.AUTO_CLOSE_THRESHOLD:this.autoCloseThreshold=S(a);break}}layerSlottedPanels(e){this._foundation.layerSlottedPanels(e)}unlayerSlottedPanels(){this._foundation.unlayerSlottedPanels()}update(e){this._foundation.update(e)}refit(){this._foundation.refitSlottedPanels()}};d([c()],s.prototype,"orientation",2),d([c()],s.prototype,"disabled",2),d([c()],s.prototype,"allowClose",2),d([c()],s.prototype,"autoClose",2),d([c()],s.prototype,"autoCloseThreshold",2),s=d([O({name:i.elementName,dependencies:[k]})],s);function de(){C(s)}export{v as a,g as b,s as c,de as d};
|
|
7
|
-
//# sourceMappingURL=chunk.
|
|
6
|
+
import{a as h,v as i,x as k}from"./chunk.SLK5TNHE.js";import{a as L}from"./chunk.UWYANU5D.js";import{a as c}from"./chunk.KTGSZEAG.js";import{a as O}from"./chunk.DL7NX432.js";import{a as C,e as y,g as I,l as E}from"./chunk.LJLEPTLU.js";import{k as b,l as S,p as w}from"./chunk.J2M2MXP2.js";import{f as d}from"./chunk.MCIQXNKY.js";var r=class{static observe(t,e,l){var a,o;r._targets.has(t)&&((a=r._observer)===null||a===void 0||a.unobserve(t)),r._targets.set(t,e),r._countTargets(),(o=r._observer)===null||o===void 0||o.observe(t,l)}static unobserve(t){var e;r._targets.delete(t),(e=r._observer)===null||e===void 0||e.unobserve(t),r._countTargets()}static _countTargets(){r._observer?r._targets.size<1&&(r._observer=void 0):r._targets.size&&(r._observer=new ResizeObserver(r._handleResize))}};r._targets=new Map;r._handleResize=f=>{f.forEach(t=>{var e;(e=r._targets.get(t.target))===null||e===void 0||e(t)})};var v=class extends L{constructor(e){super(e);this._root=I(e,i.selectors.ROOT)}registerSlotListener(e){this._root.addEventListener("slotchange",e)}registerDidOpenListener(e){this._root.addEventListener(h.events.DID_OPEN,e)}registerDidCloseListener(e){this._root.addEventListener(h.events.DID_CLOSE,e)}observeResize(e){r.observe(this._root,e)}unobserveResize(){r.unobserve(this._root)}getSlottedPanels(){let e=this._component.querySelectorAll(i.selectors.PANEL);return Array.from(e).filter(o=>o.parentElement===this._component)}refitSlottedPanels(e){let l=e==="horizontal"?this._root.clientWidth:this._root.clientHeight,a=this.getSlottedPanels(),o=a.map(p=>{var m;let n=(m=p.shadowRoot)==null?void 0:m.querySelector(h.selectors.ROOT),u=e==="horizontal"?n==null?void 0:n.clientWidth:n==null?void 0:n.clientHeight;return u!=null?u:0}).reduce((p,n)=>p+n,0);if(o<=l)return;let _=o-l;a.slice().reverse().forEach(p=>{if(_<=0)return;let n=p.getContentSize(),u=p.getCollapsibleSize(),m=Math.min(_,u),T=n-m;p.setContentSize(T),_-=m})}};var g=class{constructor(t){this._adapter=t;this._orientation="horizontal";this._disabled=!1;this._allowClose=!1;this._autoClose=!1;this._autoCloseThreshold=0;this._isInitialized=!1;this._slotListener=e=>this._onSlotChange(e),this._didOpenListener=()=>this._onDidOpen(),this._didCloseListener=()=>this._onDidClose(),this._resizeObserverCallback=w(e=>this._onResize(e),i.numbers.RESIZE_THROTTLE_THRESHOLD)}initialize(){this._adapter.registerSlotListener(this._slotListener),this._adapter.registerDidOpenListener(this._didOpenListener),this._adapter.registerDidCloseListener(this._didCloseListener),this._adapter.observeResize(this._resizeObserverCallback),this._applyOrientation(),this._isInitialized=!0}disconnect(){this._adapter.unobserveResize()}_onSlotChange(t){this._layoutSlottedPanels(),this.update({accessibility:!0,cursor:!0,orientation:this._orientation})}_onDidOpen(){this._adapter.refitSlottedPanels(this._orientation),this.update({accessibility:!0,cursor:!0,size:!0})}_onDidClose(){this._adapter.refitSlottedPanels(this._orientation),this.update({accessibility:!0,cursor:!0,size:!0})}_onResize(t){this.update({accessibility:!0,cursor:!0,size:!0})}_layoutSlottedPanels(){let t=this._adapter.getSlottedPanels();t.length<2||t.some(e=>e.resizable!=="off")||t.slice(1).forEach(e=>e.resizable="start")}get orientation(){return this._orientation}set orientation(t){this._orientation!==t&&(this._orientation=t,this._applyOrientation())}_applyOrientation(){this._adapter.setHostAttribute(i.attributes.ORIENTATION,this._orientation),this.update({orientation:this._orientation}),this._isInitialized&&this._adapter.refitSlottedPanels(this._orientation),this.update({accessibility:!0,cursor:!0})}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=t,this._applyDisabled())}_applyDisabled(){this._adapter.toggleHostAttribute(i.attributes.DISABLED,this._disabled),this.update({properties:{disabled:this._disabled}})}get allowClose(){return this._allowClose}set allowClose(t){this._allowClose!==t&&(this._allowClose=t,this._applyAllowClose())}_applyAllowClose(){this._adapter.toggleHostAttribute(i.attributes.ALLOW_CLOSE,this._allowClose),this.update({properties:{allowClose:this._allowClose}})}get autoClose(){return this._autoClose}set autoClose(t){this._autoClose!==t&&(this._autoClose=t,this._applyAutoClose())}_applyAutoClose(){this._adapter.toggleHostAttribute(i.attributes.AUTO_CLOSE,this._autoClose),this.update({properties:{autoClose:this._autoClose}})}get autoCloseThreshold(){return this._autoCloseThreshold}set autoCloseThreshold(t){this._autoCloseThreshold!==t&&(this._autoCloseThreshold=t,this._applyAutoCloseThreshold())}_applyAutoCloseThreshold(){this._adapter.setHostAttribute(i.attributes.AUTO_CLOSE_THRESHOLD,this._autoCloseThreshold.toString()),this.update({properties:{autoCloseThreshold:this._autoCloseThreshold}})}layerSlottedPanels(t){let e=this._adapter.getSlottedPanels(),l=t.resizable==="start"?1:-1,a=t.resizable==="start"?1:3;e.forEach(o=>{(o===t||a===2)&&(a+=l),o.style.setProperty(i.customCssProperties.ANIMATING_LAYER,a.toString())})}unlayerSlottedPanels(){this._adapter.getSlottedPanels().forEach(e=>{e.style.removeProperty(i.customCssProperties.ANIMATING_LAYER)})}update(t){this._adapter.getSlottedPanels().forEach(l=>{l.update(t)})}refitSlottedPanels(){this._adapter.refitSlottedPanels(this._orientation)}};var P='<template><div class="forge-split-view" id="root" part="root"><slot></slot></div></template>',A='@-webkit-keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@-webkit-keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@-webkit-keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}@keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-ripple-surface{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:transparent;will-change:transform,opacity;position:relative;outline:0;overflow:hidden}.mdc-ripple-surface::after,.mdc-ripple-surface::before{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-ripple-surface::before{-webkit-transition:opacity 15ms linear,background-color 15ms linear;transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.mdc-ripple-surface::after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.mdc-ripple-surface.mdc-ripple-upgraded::before{-webkit-transform:scale(var(--mdc-ripple-fg-scale,1));transform:scale(var(--mdc-ripple-fg-scale,1))}.mdc-ripple-surface.mdc-ripple-upgraded::after{top:0;left:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:center center;transform-origin:center center}.mdc-ripple-surface.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top,0);left:var(--mdc-ripple-left,0)}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-activation::after{-webkit-animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards;animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-deactivation::after{-webkit-animation:mdc-ripple-fg-opacity-out 150ms;animation:mdc-ripple-fg-opacity-out 150ms;-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.mdc-ripple-surface::after,.mdc-ripple-surface::before{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-ripple-surface.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded],.mdc-ripple-upgraded--unbounded{overflow:visible}.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::after,.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::before,.mdc-ripple-upgraded--unbounded::after,.mdc-ripple-upgraded--unbounded::before{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::before,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::before{top:var(--mdc-ripple-top,calc(50% - 50%));left:var(--mdc-ripple-left,calc(50% - 50%));width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface::after,.mdc-ripple-surface::before{background-color:#000;background-color:var(--mdc-ripple-color,#000)}.mdc-ripple-surface.mdc-ripple-surface--hover::before,.mdc-ripple-surface:hover::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.mdc-ripple-surface.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface:not(.mdc-ripple-upgraded):focus::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.mdc-ripple-surface:not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.mdc-ripple-surface:not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.mdc-ripple-surface.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface::after,.mdc-ripple-surface::before{--mdc-ripple-color:var(--mdc-theme-on-surface)}.forge-split-view{display:-webkit-box;display:flex;width:100%;height:100%}:host{--forge-split-view-handle-width:8px;display:block;height:100%;width:100%;overflow:hidden;contain:paint size}:host([hidden]){display:none}:host([orientation=horizontal]) .forge-split-view{-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row}:host([orientation=vertical]) .forge-split-view{-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column}',s=class extends E{constructor(){super();y(this,P,A),this._foundation=new g(new v(this))}static get observedAttributes(){return[i.attributes.ORIENTATION,i.attributes.DISABLED,i.attributes.ALLOW_CLOSE,i.attributes.AUTO_CLOSE,i.attributes.AUTO_CLOSE_THRESHOLD]}connectedCallback(){this._foundation.initialize()}disconnectedCallback(){this._foundation.disconnect()}attributeChangedCallback(e,l,a){switch(e){case i.attributes.ORIENTATION:this.orientation=a;break;case i.attributes.DISABLED:this.disabled=b(a);break;case i.attributes.ALLOW_CLOSE:this.allowClose=b(a);break;case i.attributes.AUTO_CLOSE:this.autoClose=b(a);break;case i.attributes.AUTO_CLOSE_THRESHOLD:this.autoCloseThreshold=S(a);break}}layerSlottedPanels(e){this._foundation.layerSlottedPanels(e)}unlayerSlottedPanels(){this._foundation.unlayerSlottedPanels()}update(e){this._foundation.update(e)}refit(){this._foundation.refitSlottedPanels()}};d([c()],s.prototype,"orientation",2),d([c()],s.prototype,"disabled",2),d([c()],s.prototype,"allowClose",2),d([c()],s.prototype,"autoClose",2),d([c()],s.prototype,"autoCloseThreshold",2),s=d([O({name:i.elementName,dependencies:[k]})],s);function de(){C(s)}export{v as a,g as b,s as c,de as d};
|
|
7
|
+
//# sourceMappingURL=chunk.PLORKGHA.js.map
|