diff --git a/src/Masa.Blazor.JS/src/interop.ts b/src/Masa.Blazor.JS/src/interop.ts
index d764786163..4c1ff5ede0 100644
--- a/src/Masa.Blazor.JS/src/interop.ts
+++ b/src/Masa.Blazor.JS/src/interop.ts
@@ -4,7 +4,7 @@ import throttle from "just-throttle";
import { parseDragEvent, parseTouchEvent, touchEvents } from "./events/EventType";
import { registerExtraEvents } from "./events/index";
import registerRippleObserver from "./ripple";
-import { canUseDom, getBlazorId, getDom, getElementSelector } from "./utils/helper";
+import { canUseDom, getBlazorId, getDom, getElementSelector, IN_BROWSER } from "./utils/helper";
window.onload = function () {
registerExtraEvents();
@@ -1638,4 +1638,19 @@ export function isScrollNearBottom(element: HTMLElement, threshold: number = 200
return false;
}
return element.scrollHeight - (element.scrollTop + element.clientHeight) < threshold;
-}
\ No newline at end of file
+}
+
+export function matchesSelector (el: Element | undefined, selector: string): boolean | null {
+ const supportsSelector = IN_BROWSER &&
+ typeof CSS !== 'undefined' &&
+ typeof CSS.supports !== 'undefined' &&
+ CSS.supports(`selector(${selector})`)
+
+ if (!supportsSelector) return false;
+
+ try {
+ return !!el && el.matches(selector)
+ } catch (err) {
+ return false;
+ }
+}
diff --git a/src/Masa.Blazor.JS/src/utils/helper.ts b/src/Masa.Blazor.JS/src/utils/helper.ts
index d2cf77aef2..f108d9087e 100644
--- a/src/Masa.Blazor.JS/src/utils/helper.ts
+++ b/src/Masa.Blazor.JS/src/utils/helper.ts
@@ -1,3 +1,5 @@
+export const IN_BROWSER = typeof window !== 'undefined'
+
export function addOnceEventListener (
el: EventTarget,
eventName: string,
@@ -14,7 +16,7 @@ export function addOnceEventListener (
let passiveSupported = false
try {
- if (typeof window !== 'undefined') {
+ if (IN_BROWSER) {
const testListenerOpts = Object.defineProperty({}, 'passive', {
get: () => {
passiveSupported = true
@@ -183,7 +185,7 @@ export function getDom(elOrString: Element | string | undefined) {
}
export const canUseDom = !!(
- typeof window !== 'undefined' &&
+ IN_BROWSER &&
typeof document !== 'undefined' &&
window.document &&
window.document.createElement
diff --git a/src/Masa.Blazor/Components/Switch/MSwitch.razor b/src/Masa.Blazor/Components/Switch/MSwitch.razor
index baa3f0c9a4..9bb5b70c0a 100644
--- a/src/Masa.Blazor/Components/Switch/MSwitch.razor
+++ b/src/Masa.Blazor/Components/Switch/MSwitch.razor
@@ -15,12 +15,12 @@
{
var trackStyle = GetStyleBuilder().AddBackgroundColor(ComputedTrackColor).Build();
-
+
-
+
@GenSelection()
diff --git a/src/Masa.Blazor/Components/Switch/MSwitch.razor.cs b/src/Masa.Blazor/Components/Switch/MSwitch.razor.cs
index 165342d725..ed31077dca 100644
--- a/src/Masa.Blazor/Components/Switch/MSwitch.razor.cs
+++ b/src/Masa.Blazor/Components/Switch/MSwitch.razor.cs
@@ -26,7 +26,7 @@ public partial class MSwitch
: MSelectable where TValue : notnul
public string? TrackColor { get; set; }
public override bool HasColor => IsActive || HasText;
-
+
public string? ComputedTrackColor => HasText ? TrackColor ?? ValidationState : null;
// according to spec, should still show
@@ -70,7 +70,6 @@ protected override void OnInternalValueChange(TValue val)
private ModifierBuilder _modifierBuilder = _block.CreateModifierBuilder();
private static ModifierBuilder _trackModifierBuilder = _block.Element("track").CreateModifierBuilder();
private static ModifierBuilder _thumbModifierBuilder = _block.Element("thumb").CreateModifierBuilder();
-
protected override IEnumerable BuildComponentClass()
{
@@ -84,5 +83,13 @@ protected override IEnumerable BuildComponentClass()
}
);
}
+
+ protected override async Task HandleOnKeyDown(KeyboardEventArgs args)
+ {
+ if ((args.Key == "ArrowLeft" && IsActive) || (args.Key == "ArrowRight" && !IsActive))
+ {
+ await HandleOnChange();
+ }
+ }
}
}
\ No newline at end of file
diff --git a/src/Masa.Blazor/JSInterop/JsInteropConstants.cs b/src/Masa.Blazor/JSInterop/JsInteropConstants.cs
index 88f816a242..d1bab4e7cc 100644
--- a/src/Masa.Blazor/JSInterop/JsInteropConstants.cs
+++ b/src/Masa.Blazor/JSInterop/JsInteropConstants.cs
@@ -175,4 +175,6 @@ public static class JsInteropConstants
/// Arguments: element, threshold
///
public static string IsScrollNearBottom => $"{JsInteropFuncNamePrefix}isScrollNearBottom";
+
+ public static string MatchesSelector => $"{JsInteropFuncNamePrefix}matchesSelector";
}
\ No newline at end of file
diff --git a/src/Masa.Blazor/Mixins/Selectable/MSelectable.razor b/src/Masa.Blazor/Mixins/Selectable/MSelectable.razor
index 55173e6708..6eb72958b0 100644
--- a/src/Masa.Blazor/Mixins/Selectable/MSelectable.razor
+++ b/src/Masa.Blazor/Mixins/Selectable/MSelectable.razor
@@ -6,11 +6,9 @@
@code {
- private string? RippleState => !IsDisabled && !string.IsNullOrWhiteSpace(ValidationState) ? ValidationState : null;
-
protected override RenderFragment GenDefaultSlot() => __builder =>
{
-
+
@GenSelection()
@GenLabel(false, true)
@@ -31,7 +29,8 @@
@onchange="@HandleOnChange"
@onfocus="@HandleOnFocus"
@onkeydown="@HandleOnKeyDown"
- @attributes="@Attributes"/>
+ @attributes="@Attributes"
+ @ref="@InputElement"/>
};
}
\ No newline at end of file
diff --git a/src/Masa.Blazor/Mixins/Selectable/MSelectable.razor.cs b/src/Masa.Blazor/Mixins/Selectable/MSelectable.razor.cs
index fd8257ccef..ec4632a9fe 100644
--- a/src/Masa.Blazor/Mixins/Selectable/MSelectable.razor.cs
+++ b/src/Masa.Blazor/Mixins/Selectable/MSelectable.razor.cs
@@ -16,9 +16,11 @@ public partial class MSelectable
: MInput where TValue : notnull
[Parameter] public TValue FalseValue { get; set; } = default!;
+ private bool _focusVisible;
+
public override bool HasColor => IsActive;
- public override string? ComputedColor => Color ?? (IsDark && !AppIsDark ? "white" : "primary");
+ public override string? ComputedColor => Color;
private bool IsCustomValue => IsDirtyParameter(nameof(TrueValue)) && IsDirtyParameter(nameof(FalseValue));
@@ -80,6 +82,7 @@ public async Task HandleOnChange()
public async Task HandleOnBlur(FocusEventArgs args)
{
IsFocused = false;
+ _focusVisible = false;
await Task.CompletedTask;
}
@@ -87,31 +90,35 @@ public async Task HandleOnBlur(FocusEventArgs args)
public async Task HandleOnFocus(FocusEventArgs args)
{
IsFocused = true;
-
- await Task.CompletedTask;
+ _focusVisible = await Js.InvokeAsync(JsInteropConstants.MatchesSelector, InputElement, ":focus-visible");
}
- public Task HandleOnKeyDown(KeyboardEventArgs args)
+ protected virtual Task HandleOnKeyDown(KeyboardEventArgs args)
{
return Task.CompletedTask;
}
#if NET8_0_OR_GREATER
- protected override void OnParametersSet()
- {
- base.OnParametersSet();
+ protected override void OnParametersSet()
+ {
+ base.OnParametersSet();
- if (MasaBlazor.IsSsr && !IndependentTheme)
- {
- CascadingIsDark = MasaBlazor.Theme.Dark;
- }
+ if (MasaBlazor.IsSsr && !IndependentTheme)
+ {
+ CascadingIsDark = MasaBlazor.Theme.Dark;
}
+ }
#endif
protected static Block ControlBlock => new("m-input--selection-controls");
+ protected static BemIt.Element ControlWrapper => ControlBlock.Element("wrapper");
+
+ private ModifierBuilder _controlInputModifierBuilder = ControlBlock.Element("input").CreateModifierBuilder();
+
+ protected string ControlInputClasses => _controlInputModifierBuilder.Add(_focusVisible).Build();
protected override IEnumerable BuildComponentClass()
{
- return base.BuildComponentClass().Concat(new[] { ControlBlock.Name });
+ return base.BuildComponentClass().Concat([ControlBlock.Name]);
}
}
\ No newline at end of file
diff --git a/src/Masa.Blazor/wwwroot/css/masa-blazor.extend.css b/src/Masa.Blazor/wwwroot/css/masa-blazor.extend.css
index 109ef91697..f4c77fc9d9 100644
--- a/src/Masa.Blazor/wwwroot/css/masa-blazor.extend.css
+++ b/src/Masa.Blazor/wwwroot/css/masa-blazor.extend.css
@@ -1582,9 +1582,9 @@ html.m-overlay-scroll-blocked {
cursor: pointer;
}
-/* switch */
+/* switch/checkbox */
-.m-input--is-focused .m-input--selection-controls__input::before {
+.m-input--is-focused .m-input--selection-controls__input--focus-visible::before {
opacity: 0.12;
}
@@ -1708,8 +1708,12 @@ html.m-overlay-scroll-blocked {
margin-inline-end: 2px;
}
-/* slider */
+.m-select-list .m-list-item__action > .m-simple-checkbox .m-input--selection-controls__input {
+ height: auto;
+ width: auto;
+}
+/* slider */
.m-slider__track-background {
opacity: 0.38;
}
diff --git a/src/Masa.Blazor/wwwroot/js/masa-blazor.js b/src/Masa.Blazor/wwwroot/js/masa-blazor.js
index 518e96fa39..c83098b2ef 100644
--- a/src/Masa.Blazor/wwwroot/js/masa-blazor.js
+++ b/src/Masa.Blazor/wwwroot/js/masa-blazor.js
@@ -1,2 +1,2 @@
-!function(){"use strict";function e(e,t,n,o){return new(n||(n=Promise))((function(r,i){function l(e){try{a(o.next(e))}catch(e){i(e)}}function s(e){try{a(o.throw(e))}catch(e){i(e)}}function a(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(l,s)}a((o=o.apply(e,t||[])).next())}))}let t=!1;try{if("undefined"!=typeof window){const e=Object.defineProperty({},"passive",{get:()=>{t=!0}});window.addEventListener("testListener",e,e),window.removeEventListener("testListener",e,e)}}catch(e){console.warn(e)}const n=Object.freeze({enter:13,tab:9,delete:46,esc:27,space:32,up:38,down:40,left:37,right:39,end:35,home:36,del:46,backspace:8,insert:45,pageup:33,pagedown:34,shift:16});function o(e){if(!e)return null;let t=e.getAttributeNames().find((e=>e.startsWith("_bl_")));return t&&(t=t.substring(4)),t}function r(e){if(e instanceof Element){for(var t=[];e.nodeType===Node.ELEMENT_NODE;){var n=e.nodeName.toLowerCase();if(e.id){n="#"+e.id,t.unshift(n);break}for(var o=e,r=1;o=o.previousElementSibling;)o.nodeName.toLowerCase()==n&&r++;1!=r&&(n+=":nth-of-type("+r+")"),t.unshift(n),e=e.parentNode}return t.join(" > ")}}function i(e){let t;try{if(e)if("string"==typeof e)if("document"===e)t=document.documentElement;else if(e.indexOf("__.__")>0){let n=e.split("__.__"),o=0,r=document.querySelector(n[o++]);if(r)for(;n[o];)r=r[n[o]],o++;r instanceof HTMLElement&&(t=r)}else t=document.querySelector(e);else t=e;else t=document.body}catch(e){console.error(e)}return t}const l=!("undefined"==typeof window||"undefined"==typeof document||!window.document||!window.document.createElement),s=["touchcancel","touchend","touchmove","touchenter","touchleave","touchstart"];function a(e){return{detail:e.detail,screenX:e.screenX,screenY:e.screenY,clientX:e.clientX,clientY:e.clientY,offsetX:e.offsetX,offsetY:e.offsetY,pageX:e.pageX,pageY:e.pageY,button:e.button,buttons:e.buttons,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,altKey:e.altKey,metaKey:e.metaKey,type:e.type}}function c(e){return{detail:e.detail,touches:u(e.touches),targetTouches:u(e.targetTouches),changedTouches:u(e.changedTouches),ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,altKey:e.altKey,metaKey:e.metaKey,type:e.type}}function u(e){const t=[];for(let n=0;np("mouse",e)})}function f(e,t){Blazor&&Blazor.registerCustomEventType(e,{browserEventName:t,createEventArgs:e=>{const t=(n=e,Object.assign(Object.assign({},a(n)),{dataTransfer:n.dataTransfer?{dropEffect:n.dataTransfer.dropEffect,effectAllowed:n.dataTransfer.effectAllowed,files:Array.from(n.dataTransfer.files).map((e=>e.name)),items:Array.from(n.dataTransfer.items).map((e=>({kind:e.kind,type:e.type}))),types:n.dataTransfer.types}:null}));var n;const o=e.dataTransfer.getData("data-value"),r=e.dataTransfer.getData("offsetX"),i=e.dataTransfer.getData("offsetY");return t.dataTransfer.data={value:o,offsetX:Number(r),offsetY:Number(i)},t}})}function p(e,t){let n={target:{}};return"mouse"===e?n=Object.assign(Object.assign({},n),a(t)):"touch"===e&&(n=Object.assign(Object.assign({},n),c(t))),n.target=function(e){const t=e,n={},o=t.getAttributeNames().find((e=>e.startsWith("_bl_")));return o?(n.elementReferenceId=o,n.selector=`[${o}]`):n.selector=r(t),n.class=t.getAttribute("class"),n}(t.target),n}let m=0;const h={};var v=Object.freeze({__proto__:null,registerSliderEvents:function(n,o){h[m]=s;const r=document.querySelector("[data-app]"),i=!t||{passive:!0,capture:!0},l=!!t&&{passive:!0};return n.addEventListener("mousedown",s),n.addEventListener("touchstart",s),m++;function s(t){return e(this,void 0,void 0,(function*(){const e="touches"in t;c(t),r.addEventListener(e?"touchmove":"mousemove",c,l),function(e,t,n,o=!1){const r=i=>{n(i),e.removeEventListener(t,r,o)};e.addEventListener(t,r,o)}(r,e?"touchend":"mouseup",a,i),e?yield o.invokeMethodAsync("OnTouchStartInternal",p("touch",t)):yield o.invokeMethodAsync("OnMouseDownInternal",p("mouse",t))}))}function a(t){return e(this,void 0,void 0,(function*(){t.stopPropagation(),r.removeEventListener("touchmove",c,l),r.removeEventListener("mousemove",c,l),yield o.invokeMethodAsync("OnMouseUpInternal")}))}function c(t){return e(this,void 0,void 0,(function*(){const e="touches"in t,n={type:t.type,clientX:e?t.touches[0].clientX:t.clientX,clientY:e?t.touches[0].clientY:t.clientY};yield o.invokeMethodAsync("OnMouseMoveInternal",n)}))}},unregisterSliderEvents:function(e,t){if(e){const n=h[t];e.removeEventListener("mousedown",n),e.removeEventListener("touchstart",n),delete h[t]}}});let g=0;const y={};function w(e,t,n){e.style.height="0";const o=e.scrollHeight,r=parseInt(t,10)*parseFloat(n);e.style.height=Math.max(o,r)+"px"}var b=Object.freeze({__proto__:null,registerTextareaAutoGrowEvent:function(e){const t=e=>{const t=e.target;if(void 0===t.getAttribute("data-auto-grow"))return;const n=t.getAttribute("rows"),o=t.getAttribute("data-row-height");w(t,n,o)};return y[g]=t,e.addEventListener("input",t),g++},unregisterTextareaAutoGrowEvent:function(e,t){if(!e)return;const n=y[t];n&&e.removeEventListener("input",n)},calculateTextareaHeight:w}),E=function(e,t,n){var o=null,r=null,i=function(){o&&(clearTimeout(o),r=null,o=null)},l=function(){if(!t)return e.apply(this,arguments);var l=this,s=arguments,a=n&&!o;return i(),r=function(){e.apply(l,s)},o=setTimeout((function(){if(o=null,!a){var e=r;return r=null,e()}}),t),a?r():void 0};return l.cancel=i,l.flush=function(){var e=r;i(),e&&e()},l};var T=function(e,t,n){var o=null,r=null,i=n&&n.leading,l=n&&n.trailing;null==i&&(i=!0);null==l&&(l=!i);1==i&&(l=!1);var s=function(){o&&(clearTimeout(o),o=null)},a=function(){var n=i&&!o,s=this,a=arguments;if(r=function(){return e.apply(s,a)},o||(o=setTimeout((function(){if(o=null,l)return r()}),t)),n)return n=!1,r()};return a.cancel=s,a.flush=function(){var e=r;s(),e&&e()},a};function L(){var e,t;d("exmousedown","mousedown"),d("exmouseup","mouseup"),d("exclick","click"),d("exmouseleave","mouseleave"),d("exmouseenter","mouseenter"),d("exmousemove","mousemove"),e="extouchstart",t="touchstart",Blazor&&Blazor.registerCustomEventType(e,{browserEventName:t,createEventArgs:e=>p("touch",e)}),function(e,t){Blazor&&Blazor.registerCustomEventType(e,{browserEventName:t})}("transitionend","transitionend"),f("exdrop","drop"),Blazor&&Blazor.registerCustomEventType("auxclick",{browserEventName:"auxclick",createEventArgs:a})}const _=80;function C(e,t){e.style.transform=t,e.style.webkitTransform=t}function x(e){return"TouchEvent"===e.constructor.name}function S(e){return"KeyboardEvent"===e.constructor.name}const M={show(e,t,n={}){if(!t._ripple||!t._ripple.enabled)return;const o=document.createElement("span"),r=document.createElement("span");o.appendChild(r),o.className="m-ripple__container",n.class&&(o.className+=` ${n.class}`);const{radius:i,scale:l,x:s,y:a,centerX:c,centerY:u}=((e,t,n={})=>{let o=0,r=0;if(!S(e)){const n=t.getBoundingClientRect(),i=x(e)?e.touches[e.touches.length-1]:e;o=i.clientX-n.left,r=i.clientY-n.top}let i=0,l=.3;t._ripple&&t._ripple.circle?(l=.15,i=t.clientWidth/2,i=n.center?i:i+Math.sqrt((o-i)**2+(r-i)**2)/4):i=Math.sqrt(t.clientWidth**2+t.clientHeight**2)/2;const s=(t.clientWidth-2*i)/2+"px",a=(t.clientHeight-2*i)/2+"px";return{radius:i,scale:l,x:n.center?s:o-i+"px",y:n.center?a:r-i+"px",centerX:s,centerY:a}})(e,t,n),d=2*i+"px";r.className="m-ripple__animation",r.style.width=d,r.style.height=d,t.appendChild(o);const f=window.getComputedStyle(t);f&&"static"===f.position&&(t.style.position="relative",t.dataset.previousPosition="static"),r.classList.add("m-ripple__animation--enter"),r.classList.add("m-ripple__animation--visible"),C(r,`translate(${s}, ${a}) scale3d(${l},${l},${l})`),r.dataset.activated=String(performance.now()),setTimeout((()=>{r.classList.remove("m-ripple__animation--enter"),r.classList.add("m-ripple__animation--in"),C(r,`translate(${c}, ${u}) scale3d(1,1,1)`)}),0)},hide(e){if(!e||!e._ripple||!e._ripple.enabled)return;const t=e.getElementsByClassName("m-ripple__animation");if(0===t.length)return;const n=t[t.length-1];if(n.dataset.isHiding)return;n.dataset.isHiding="true";const o=performance.now()-Number(n.dataset.activated),r=Math.max(250-o,0);setTimeout((()=>{n.classList.remove("m-ripple__animation--in"),n.classList.add("m-ripple__animation--out"),setTimeout((()=>{var t;1===e.getElementsByClassName("m-ripple__animation").length&&e.dataset.previousPosition&&(e.style.position=e.dataset.previousPosition,delete e.dataset.previousPosition),(null===(t=n.parentNode)||void 0===t?void 0:t.parentNode)===e&&e.removeChild(n.parentNode)}),300)}),r)}};function k(e){const t={},n=e.currentTarget;if(n&&n._ripple&&!n._ripple.touched&&!e.rippleStop){if(e.rippleStop=!0,x(e))n._ripple.touched=!0,n._ripple.isTouch=!0;else if(n._ripple.isTouch)return;if(t.center=n._ripple.centered||S(e),n._ripple.class&&(t.class=n._ripple.class),x(e)){if(n._ripple.showTimerCommit)return;n._ripple.showTimerCommit=()=>{M.show(e,n,t)},n._ripple.showTimer=window.setTimeout((()=>{n&&n._ripple&&n._ripple.showTimerCommit&&(n._ripple.showTimerCommit(),n._ripple.showTimerCommit=null)}),_)}else M.show(e,n,t)}}function A(e){const t=e.currentTarget;if(t&&t._ripple)if(window.clearTimeout(t._ripple.showTimer),"touchend"===e.type&&t._ripple.showTimerCommit){t._ripple.showTimerCommit(),t._ripple.showTimerCommit=null;t._ripple.showTimer=setTimeout((()=>A(e)))}else window.setTimeout((()=>{t._ripple&&(t._ripple.touched=!1)})),M.hide(t)}function O(e){const t=e.currentTarget;t&&t._ripple&&(t._ripple.showTimerCommit&&(t._ripple.showTimerCommit=null),window.clearTimeout(t._ripple.showTimer))}function N(e){const t=e.currentTarget;t.keyboardRipple||e.keyCode!==n.enter&&e.keyCode!==n.space||(t.keyboardRipple=!0,k(e))}function H(e){e.currentTarget.keyboardRipple=!1,A(e)}function B(e){const t=e.currentTarget;!0===t.keyboardRipple&&(t.keyboardRipple=!1,A(e))}function I(e,t,n){let o=!1;t?o=!0:M.hide(e);const r=t||{};e._ripple=e._ripple||{},e._ripple.enabled=o,e._ripple=Object.assign(Object.assign({},e._ripple),{centered:r.center,class:r.class,circle:r.circle}),o&&!n?(e.addEventListener("touchstart",k,{passive:!0}),e.addEventListener("touchend",A,{passive:!0}),e.addEventListener("touchmove",O,{passive:!0}),e.addEventListener("touchcancel",A),e.addEventListener("mousedown",k),e.addEventListener("mouseup",A),e.addEventListener("mouseleave",A),e.addEventListener("keydown",N),e.addEventListener("keyup",H),e.addEventListener("blur",B),e.addEventListener("dragstart",A,{passive:!0})):!o&&n&&Y(e)}function Y(e){e.removeEventListener("mousedown",k),e.removeEventListener("touchstart",k),e.removeEventListener("touchend",A),e.removeEventListener("touchmove",O),e.removeEventListener("touchcancel",A),e.removeEventListener("mouseup",A),e.removeEventListener("mouseleave",A),e.removeEventListener("keydown",N),e.removeEventListener("keyup",H),e.removeEventListener("dragstart",A),e.removeEventListener("blur",B),e._ripple.enabled=!1}function P(e){if(!e||e.nodeType!==Node.ELEMENT_NODE)return 0;const t=+window.getComputedStyle(e).getPropertyValue("z-index");return t||P(e.parentNode)}function W(e){var t={};t.offsetTop=e.offsetTop||0,t.offsetLeft=e.offsetLeft||0,t.scrollHeight=e.scrollHeight||0,t.scrollWidth=e.scrollWidth||0,t.scrollLeft=e.scrollLeft||0,t.scrollTop=e.scrollTop||0,t.clientTop=e.clientTop||0,t.clientLeft=e.clientLeft||0,t.clientHeight=e.clientHeight||0,t.clientWidth=e.clientWidth||0;var n=function(e){var t=new Object;if(t.x=0,t.y=0,null!==e&&e.getBoundingClientRect){var n=document.documentElement,o=e.getBoundingClientRect(),r=n.scrollLeft,i=n.scrollTop;t.offsetWidth=o.width,t.offsetHeight=o.height,t.relativeTop=o.top,t.relativeBottom=o.bottom,t.relativeLeft=o.left,t.relativeRight=o.right,t.absoluteLeft=o.left+r,t.absoluteTop=o.top+i}return t}(e);return t.offsetWidth=Math.round(n.offsetWidth)||0,t.offsetHeight=Math.round(n.offsetHeight)||0,t.relativeTop=Math.round(n.relativeTop)||0,t.relativeBottom=Math.round(n.relativeBottom)||0,t.relativeLeft=Math.round(n.relativeLeft)||0,t.relativeRight=Math.round(n.relativeRight)||0,t.absoluteLeft=Math.round(n.absoluteLeft)||0,t.absoluteTop=Math.round(n.absoluteTop)||0,t}window.onload=function(){var e;L(),e="pastewithdata",Blazor&&Blazor.registerCustomEventType(e,{browserEventName:"paste",createEventArgs:e=>({type:e.type,pastedData:e.clipboardData.getData("text")})}),function(){const e=new MutationObserver(((e,n)=>{for(const n of e){if("childList"===n.type&&n.addedNodes.length>0)for(const e of n.addedNodes)e instanceof HTMLElement&&e.nodeType===Node.ELEMENT_NODE&&e.hasAttribute("ripple")&&!e._ripple&&I(e,t(e),!1);if("attributes"===n.type){const e=n.target;e.hasAttribute("ripple")&&!e._ripple&&("ripple"===n.attributeName?I(e,t(e),!1):!e.hasAttribute("ripple")&&e._ripple&&(Y(e),delete e._ripple))}if("attributes"===n.type&&"ripple"===n.attributeName){const e=n.target;e._ripple&&I(e,t(e),e._ripple.enabled)}if("childList"===n.type&&n.removedNodes.length>0)for(const e of n.removedNodes)e instanceof HTMLElement&&e.nodeType===Node.ELEMENT_NODE&&e._ripple&&(Y(e),delete e._ripple)}}));function t(e){const t=e.getAttribute("ripple");if("string"!=typeof t&&!t||"false"===t)return null;const n={};return t.split("&").forEach((e=>{"center"===e?n.center=!0:"circle"===e?n.circle=!0:n.class=e.trim()})),n}const n=document.querySelectorAll("[ripple]");for(const e of n)I(e,t(e),!1);e.observe(document,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["ripple"],attributeOldValue:!1})}()};var D={};function X(){return document.activeElement.getAttribute("id")||""}function q(e=[],t=[]){const n={};return e&&(e.forEach((e=>n[e]=window[e])),n.pageYOffset=F()),t&&t.forEach((e=>n[e]=document.documentElement[e])),n}function z(e){return"HTML"!==e.tagName&&"BODY"!==e.tagName&&1==e.nodeType}function $(e=[],t){const n=[P(i(t))],o=[...document.getElementsByClassName("m-menu__content--active"),...document.getElementsByClassName("m-dialog__content--active")];for(let t=0;t{if(o){if(o.offsetParent){const t=j(o.offsetParent);s.relativeYOffset=F()+t.top,e?(s.activator.top-=s.relativeYOffset,s.activator.left-=window.pageXOffset+t.left):s.offsetParentLeft=t.left}s.content=K(o,n),s.content.offsetLeft=o.offsetLeft,s.content.offsetTop=o.offsetTop}}),o),s}function F(){let e=window.pageYOffset;const t=parseInt(document.documentElement.style.getPropertyValue("--m-body-scroll-y"));return t&&(e+=Math.abs(t)),e}function K(e,t){if(!e)return{};const n=j(e);if(!t){const t=window.getComputedStyle(e);n.left=parseInt(t.marginLeft),n.top=parseInt(t.marginTop)}return n}function j(e){if(!e||!e.nodeType)return null;const t=e.getBoundingClientRect();return{top:Math.round(t.top),left:Math.round(t.left),bottom:Math.round(t.bottom),right:Math.round(t.right),width:Math.round(t.width),height:Math.round(t.height)}}function V(e,t,n,o){e.preventDefault();const r=e.key;if("ArrowLeft"===r||"Backspace"===r){if("Backspace"===r){const e={type:r,index:t,value:""};o&&o.invokeMethodAsync("Invoke",e)}U(t-1,n)}else"ArrowRight"===r&&U(t+1,n)}function U(e,t){if(e<0)U(0,t);else if(e>=t.length)U(t.length-1,t);else if(document.activeElement!==t[e]){i(t[e]).focus()}}function G(e,t,n){const o=i(n[t]);o&&document.activeElement===o&&o.select()}function Z(e,t,n,o){const r=e.target.value;if(r&&""!==r&&(U(t+1,n),o)){const e={type:"Input",index:t,value:r};o.invokeMethodAsync("Invoke",e)}}function J(){var e,t,n="weird_get_top_level_domain=cookie",o=document.location.hostname.split(".");for(e=o.length-1;e>=0;e--)if(t=o.slice(e).join("."),document.cookie=n+";domain=."+t+";",document.cookie.indexOf(n)>-1)return document.cookie=n.split("=")[0]+"=;domain=."+t+";expires=Thu, 01 Jan 1970 00:00:01 GMT;",t}function Q(e){e.stopPropagation()}var ee=Object.freeze({__proto__:null,getZIndex:P,getDomInfo:function(e,t="body"){var n={},o=i(e);if(o)if(o.style&&"none"===o.style.display){var r=o.cloneNode(!0);r.style.display="inline-block",r.style["z-index"]=-1e3,o.parentElement.appendChild(r),n=W(r),o.parentElement.removeChild(r)}else n=W(o);return n},getParentClientWidthOrWindowInnerWidth:function(e){return e.parentElement?e.parentElement.clientWidth:window.innerWidth},triggerEvent:function(e,t,n,o){var r=i(e),l=document.createEvent(t);return l.initEvent(n),o&&l.stopPropagation(),r.dispatchEvent(l)},setProperty:function(e,t,n){i(e)[t]=n},getBoundingClientRect:function(e,t="body"){var n,o;let r=i(e);var l={};if(r&&r.getBoundingClientRect)if(r.style&&"none"===r.style.display){var s=r.cloneNode(!0);s.style.display="inline-block",s.style["z-index"]=-1e3,null===(n=document.querySelector(t))||void 0===n||n.appendChild(s),l=s.getBoundingClientRect(),null===(o=document.querySelector(t))||void 0===o||o.removeChild(s)}else l=r.getBoundingClientRect();return l},addHtmlElementEventListener:function(e,t,n,o,i){let l;if(l="window"==e?window:"document"==e?document.documentElement:document.querySelector(e),!l)return!1;var a=(null==i?void 0:i.key)||`${e}:${t}`;const u={};var d=e=>{var t;if((null==i?void 0:i.stopPropagation)&&e.stopPropagation(),("boolean"!=typeof e.cancelable||e.cancelable)&&(null==i?void 0:i.preventDefault)&&e.preventDefault(),(null==i?void 0:i.relatedTarget)&&(null===(t=document.querySelector(i.relatedTarget))||void 0===t?void 0:t.contains(e.relatedTarget)))return;let o={};if(s.includes(e.type))o=c(e);else for(var l in e)"string"!=typeof e[l]&&"number"!=typeof e[l]||(o[l]=e[l]);if(e.target&&e.target!==window&&e.target!==document){o.target={};const t=e.target,n=t.getAttributeNames().find((e=>e.startsWith("_bl_")));n?(o.target.elementReferenceId=n,o.target.selector=`[${n}]`):o.target.selector=r(t),o.target.class=t.getAttribute("class")}n.invokeMethodAsync("Invoke",o)};return(null==i?void 0:i.debounce)&&i.debounce>0?u.listener=E(d,i.debounce):(null==i?void 0:i.throttle)&&i.throttle>0?u.listener=T(d,i.throttle,{trailing:!0}):u.listener=d,u.options=o,u.handle=n,D[a]?D[a].push(u):D[a]=[u],l.addEventListener(t,u.listener,u.options),!0},removeHtmlElementEventListener:function(e,t,n){let o;o="window"==e?window:"document"==e?document.documentElement:document.querySelector(e);var r=D[n=n||`${e}:${t}`];r&&(r.forEach((e=>{e.handle.dispose(),null==o||o.removeEventListener(t,e.listener,e.options)})),D[n]=[])},addMouseleaveEventListener:function(e){var t=document.querySelector(e);t&&t.addEventListener()},contains:function(e,t){const n=i(e);return!(!n||!n.contains)&&n.contains(i(t))},equalsOrContains:function(e,t){const n=i(e),o=i(t);return!!n&&n.contains&&!!o&&(n==o||n.contains(o))},copy:function(e){navigator.clipboard?navigator.clipboard.writeText(e).then((function(){console.log("Async: Copying to clipboard was successful!")}),(function(e){console.error("Async: Could not copy text: ",e)})):function(e){var t=document.createElement("textarea");t.value=e,t.style.top="0",t.style.left="0",t.style.position="fixed",document.body.appendChild(t),t.focus(),t.select();try{var n=document.execCommand("copy")?"successful":"unsuccessful";console.log("Fallback: Copying text command was "+n)}catch(e){console.error("Fallback: Oops, unable to copy",e)}document.body.removeChild(t)}(e)},focus:function(e,t=!1){let n=i(e);n instanceof HTMLElement?n.focus({preventScroll:t}):console.error("Unable to focus an invalid element")},select:function(e){let t=i(e);if(!(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement))throw new Error("Unable to select an invalid element");t.select()},hasFocus:function(e){let t=i(e);return document.activeElement===t},blur:function(e){i(e).blur()},log:function(e){console.log(e)},scrollIntoView:function(e,t){let n=i(e);n instanceof HTMLElement&&(null===t||null==t?n.scrollIntoView():"boolean"==typeof t?n.scrollIntoView(t):n.scrollIntoView({block:null==t.block?void 0:t.block,inline:null==t.inline?void 0:t.inline,behavior:t.behavior}))},scrollIntoParentView:function(e,t=!1,n=!1,o=1,r="smooth"){const l=i(e);if(l instanceof HTMLElement){let e=l;for(;o>0;)if(e=e.parentElement,o--,!e)return;const i={behavior:r};if(t)if(n)i.left=l.offsetLeft;else{const t=l.offsetLeft-e.offsetLeft;t-e.scrollLeft<0?i.left=t:t+l.offsetWidth-e.scrollLeft>e.offsetWidth&&(i.left=t+l.offsetWidth-e.offsetWidth)}else if(n)i.top=l.offsetTop;else{const t=l.offsetTop-e.offsetTop;t-e.scrollTop<0?i.top=t:t+l.offsetHeight-e.scrollTop>e.offsetHeight&&(i.top=t+l.offsetHeight-e.offsetHeight)}(i.left||i.top)&&e.scrollTo(i)}},scrollTo:function(e,t){let n=i(e);if(n instanceof HTMLElement){const e={left:null===t.left?void 0:t.left,top:null===t.top?void 0:t.top,behavior:t.behavior};n.scrollTo(e)}},scrollToTarget:function(e,t=null,n=0){const o=document.querySelector(e);if(o){let e;e=t?o.offsetTop:o.getBoundingClientRect().top+window.scrollY;(t?document.querySelector(t):document.documentElement).scrollTo({top:e-n,behavior:"smooth"})}},scrollToElement:function(e,t,n){const o=i(e);if(!o)return;const r=o.getBoundingClientRect().top+window.pageYOffset-t;window.scrollTo({top:r,behavior:n})},scrollToActiveElement:function(e,t=".active",n="center",o=!1){let r,l=i(e);if("string"==typeof t&&(r=e.querySelector(t)),!l||!r)return;const s="center"===n?r.offsetTop-l.offsetHeight/2+r.offsetHeight/2:r.offsetTop-n;l.scrollTo({top:s,behavior:o?"smooth":"auto"})},addClsToFirstChild:function(e,t){var n=i(e);n.firstElementChild&&n.firstElementChild.classList.add(t)},removeClsFromFirstChild:function(e,t){var n=i(e);n.firstElementChild&&n.firstElementChild.classList.remove(t)},getAbsoluteTop:function e(t){var n=t.offsetTop;return null!=t.offsetParent&&(n+=e(t.offsetParent)),n},getAbsoluteLeft:function e(t){var n=t.offsetLeft;return null!=t.offsetParent&&(n+=e(t.offsetParent)),n},addElementToBody:function(e){document.body.appendChild(e)},delElementFromBody:function(e){document.body.removeChild(e)},addElementTo:function(e,t){let n=i(t);n&&e&&n.appendChild(e)},delElementFrom:function(e,t){let n=i(t);n&&e&&n.removeChild(e)},getActiveElement:X,focusDialog:function e(t,n=0){let o=document.querySelector(t);o&&!o.hasAttribute("disabled")&&setTimeout((()=>{o.focus(),"#"+X()!==t&&n<10&&e(t,n+1)}),10)},getWindow:function(){return{innerWidth:window.innerWidth,innerHeight:window.innerHeight,pageXOffset:window.pageXOffset,pageYOffset:window.pageYOffset,isTop:0==window.scrollY,isBottom:window.scrollY+window.innerHeight==document.body.clientHeight}},getWindowAndDocumentProps:q,css:function(e,t,n=null){var o=i(e);if("string"==typeof t)o.style[t]=n;else for(let e in t)t.hasOwnProperty(e)&&(o.style[e]=t[e])},addCls:function(e,t){let n=i(e);"string"==typeof t?n.classList.add(t):n.classList.add(...t)},removeCls:function(e,t){let n=i(e);"string"==typeof t?n.classList.remove(t):n.classList.remove(...t)},elementScrollIntoView:function(e){let t=i(e);t&&t.scrollIntoView({behavior:"smooth",block:"nearest",inline:"start"})},getScroll:function(){return{x:window.pageXOffset,y:window.pageYOffset}},getScrollParent:function(e,t=undefined){null!=t||(t=l?window:void 0);let n=e;for(;n&&n!==t&&z(n);){const{overflowY:e}=window.getComputedStyle(n);if(/scroll|auto|overlay/i.test(e))return n;n=n.parentNode}return t},getScrollTop:function(e){const t="scrollTop"in e?e.scrollTop:e.pageYOffset;return Math.max(t,0)},getInnerText:function(e){return i(e).innerText},getMenuOrDialogMaxZIndex:$,getMaxZIndex:function(){return[...document.all].reduce(((e,t)=>Math.max(e,+window.getComputedStyle(t).zIndex||0)),0)},getStyle:function(e,t){return(e=i(e)).currentStyle?e.currentStyle[t]:window.getComputedStyle?document.defaultView.getComputedStyle(e,null).getPropertyValue(t):void 0},getTextAreaInfo:function(e){var t={},n=i(e);return t.scrollHeight=n.scrollHeight||0,e.currentStyle?(t.lineHeight=parseFloat(e.currentStyle["line-height"]),t.paddingTop=parseFloat(e.currentStyle["padding-top"]),t.paddingBottom=parseFloat(e.currentStyle["padding-bottom"]),t.borderBottom=parseFloat(e.currentStyle["border-bottom"]),t.borderTop=parseFloat(e.currentStyle["border-top"])):window.getComputedStyle&&(t.lineHeight=parseFloat(document.defaultView.getComputedStyle(e,null).getPropertyValue("line-height")),t.paddingTop=parseFloat(document.defaultView.getComputedStyle(e,null).getPropertyValue("padding-top")),t.paddingBottom=parseFloat(document.defaultView.getComputedStyle(e,null).getPropertyValue("padding-bottom")),t.borderBottom=parseFloat(document.defaultView.getComputedStyle(e,null).getPropertyValue("border-bottom")),t.borderTop=parseFloat(document.defaultView.getComputedStyle(e,null).getPropertyValue("border-top"))),Object.is(NaN,t.borderTop)&&(t.borderTop=1),Object.is(NaN,t.borderBottom)&&(t.borderBottom=1),t},disposeObj:function(e){},upsertThemeStyle:function(e,t){const n=document.getElementById(e);n&&document.head.removeChild(n);const o=document.createElement("style");o.id=e,o.type="text/css",o.innerHTML=t,document.head.insertAdjacentElement("beforeend",o)},getImageDimensions:function(e){return new Promise((function(t,n){var o=new Image;o.src=e,o.onload=function(){t({width:o.width,height:o.height,hasError:!1})},o.onerror=function(){t({width:0,height:0,hasError:!0})}}))},enablePreventDefaultForEvent:function(e,t,n){const o=i(e);o&&("keydown"===t?o.addEventListener(t,(e=>{Array.isArray(n)?n.includes(e.code)&&e.preventDefault():e.preventDefault()})):o.addEventListener(t,(e=>{e.preventDefault&&e.preventDefault()})))},getBoundingClientRects:function(e){for(var t=document.querySelectorAll(e),n=[],o=0;o{if(e.target!==i(t)&&(e.preventDefault(),e.stopPropagation()),n){const t={Detail:e.detail,ScreenX:e.screenX,ScreenY:e.screenY,ClientX:e.clientX,ClientY:e.clientY,OffsetX:e.offsetX,OffsetY:e.offsetY,PageX:e.pageX,PageY:e.pageY,Button:e.button,Buttons:e.buttons,CtrlKey:e.ctrlKey,ShiftKey:e.shiftKey,AltKey:e.altKey,MetaKey:e.metaKey,Type:e.type};n.invokeMethodAsync("Invoke",t)}};e.addEventListener("mousedown",r);const l={listener:r,handle:n},s=`registerTextFieldOnMouseDown_${o(e)}`;D[s]=[l]},unregisterTextFieldOnMouseDown:function(e){const t=`registerTextFieldOnMouseDown_${o(e)}`,n=D[t];n&&n.length&&n.forEach((t=>{t.handle.dispose(),e&&e.removeEventListener("mousedown",t.listener)}))},containsActiveElement:function(e){var t=i(e);return t&&t.contains?t.contains(document.activeElement):null},copyChild:function(e){"string"==typeof e&&(e=document.querySelector(e)),e&&(e.setAttribute("contenteditable","true"),e.focus(),document.execCommand("selectAll",!1,null),document.execCommand("copy"),document.execCommand("unselect"),e.blur(),e.removeAttribute("contenteditable"))},copyText:function(e){if(navigator.clipboard)navigator.clipboard.writeText(e).then((function(){console.log("Async: Copying to clipboard was successful!")}),(function(e){console.error("Async: Could not copy text: ",e)}));else{var t=document.createElement("textarea");t.value=e,t.readOnly=!0,t.style.top="0",t.style.left="0",t.style.position="fixed",document.body.appendChild(t),t.focus(),t.select();try{var n=document.execCommand("copy")?"successful":"unsuccessful";console.log("Fallback: Copying text command was "+n)}catch(e){console.error("Fallback: Oops, unable to copy",e)}document.body.removeChild(t)}},getMenuableDimensions:R,invokeMultipleMethod:function(e,t,n,o,r,i,l,s,a){var c={windowAndDocument:null,dimensions:null,zIndex:0};return c.windowAndDocument=q(e,t),c.dimensions=R(n,o,r,i,l,s),c.zIndex=$([i],a),c},registerOTPInputOnInputEvent:function(e,t){for(let n=0;nZ(o,n,e,t),r=t=>G(t,n,e),i=o=>V(o,n,e,t);e[n].addEventListener("input",o),e[n].addEventListener("focus",r),e[n].addEventListener("keyup",i),e[n]._optInput={inputListener:o,focusListener:r,keyupListener:i}}},unregisterOTPInputOnInputEvent:function(e){for(let t=0;ti.offsetTop-8?l.scrollTo({top:i.offsetTop-i.clientHeight,behavior:"smooth"}):s+a=r-n},get_top_domain:J,setCookie:function(e,t){if(null!=t){var n=J();n?isNaN(n[0])&&(n=`.${n}`):n="";var o=new Date;o.setTime(o.getTime()+2592e6),document.cookie=`${e}=${escape(null==t?void 0:t.toString())};path=/;expires=${o.toUTCString()};domain=${n}`}},getCookie:function(e){const t=new RegExp(`(^| )${e}=([^;]*)(;|$)`),n=document.cookie.match(t);return n?unescape(n[2]):null},registerDragEvent:function(e,t){if(e){const n=o(e),r=e=>{if(t){const n=e.target.getAttribute(t);e.dataTransfer.setData(t,n),e.dataTransfer.setData("offsetX",e.offsetX.toString()),e.dataTransfer.setData("offsetY",e.offsetY.toString())}};D[`${n}:dragstart`]=[{listener:r}],e.addEventListener("dragstart",r)}},unregisterDragEvent:function(e){const t=o(e);if(t){const n=`${t}:dragstart`;D[n]&&D[n].forEach((t=>{e.removeEventListener("dragstart",t.listener)}))}},resizableDataTable:function(e){const t=e.querySelector("table"),n=t.querySelector(".m-data-table-header").getElementsByTagName("tr")[0],o=n?n.children:[];if(!o)return;t.style.overflow="hidden";const r=t.offsetHeight;for(var i=0;ie.stopPropagation())),n.addEventListener("mousedown",(function(e){i=e.target.parentElement,l=i.nextElementSibling,r=e.pageX,u=t.offsetWidth;var n=function(e){if("border-box"==s(e,"box-sizing"))return 0;var t=s(e,"padding-left"),n=s(e,"padding-right");return parseInt(t)+parseInt(n)}(i);a=i.offsetWidth-n,l&&(c=l.offsetWidth-n)})),document.addEventListener("mousemove",(function(n){if(i){let o=n.pageX-r;e.classList.contains("m-data-table--rtl")&&(o=0-o);let s=a+o;i.style.width=s+"px";if(e.classList.contains("m-data-table--resizable-overflow"))return void(t.style.width=u+o+"px");if(e.classList.contains("m-data-table--resizable-independent")){let e=c-o;const t=a+c;o>0?l&&e{const t=e.scrollWidth,n=e.clientWidth,o=e.scrollLeft,r=e.parentElement.classList.contains("m-data-table--rtl");Math.abs(t-((r?-o:o)+n))<1?(e.classList.remove("scrolling"),e.classList.remove("scrolled-to-left"),e.classList.add("scrolled-to-right")):Math.abs(o-(r?t-n:0))<1?(e.classList.remove("scrolling"),e.classList.remove("scrolled-to-right"),e.classList.add("scrolled-to-left")):(e.classList.remove("scrolled-to-right"),e.classList.remove("scrolled-to-left"),e.classList.add("scrolling"))};t(),e.addEventListener("scroll",t),e._m_table_scroll_event=t},unregisterTableScrollEvent:function(e){const t=e._m_table_scroll_event;t&&(e.removeEventListener("scroll",t),delete e._m_table_scroll_event)},updateTabSlider:function(e,t,n,o,r){if(!e)return void console.warn("[MTab] the element of slider wrapper is not found");if(!t)return void console.warn("[MTab] the element of tab to be activated is not found");const i=o?t.scrollHeight:n,l=o?0:t.offsetLeft,s=o?0:t.offsetLeft+t.offsetWidth,a=t.offsetTop,c=o?n:t.clientWidth;e.style.width=`${c}px`,e.style.height=`${i}px`,r||(e.style.left=`${l}px`),r&&(e.style.right=`${s}px`),o&&(e.style.top=`${a}px`)},isScrollNearBottom:function(e,t=200){return!!e&&e.scrollHeight-(e.scrollTop+e.clientHeight){n=!0}});window.addEventListener("testListener",e,e),window.removeEventListener("testListener",e,e)}}catch(e){console.warn(e)}const o=Object.freeze({enter:13,tab:9,delete:46,esc:27,space:32,up:38,down:40,left:37,right:39,end:35,home:36,del:46,backspace:8,insert:45,pageup:33,pagedown:34,shift:16});function r(e){if(!e)return null;let t=e.getAttributeNames().find((e=>e.startsWith("_bl_")));return t&&(t=t.substring(4)),t}function i(e){if(e instanceof Element){for(var t=[];e.nodeType===Node.ELEMENT_NODE;){var n=e.nodeName.toLowerCase();if(e.id){n="#"+e.id,t.unshift(n);break}for(var o=e,r=1;o=o.previousElementSibling;)o.nodeName.toLowerCase()==n&&r++;1!=r&&(n+=":nth-of-type("+r+")"),t.unshift(n),e=e.parentNode}return t.join(" > ")}}function l(e){let t;try{if(e)if("string"==typeof e)if("document"===e)t=document.documentElement;else if(e.indexOf("__.__")>0){let n=e.split("__.__"),o=0,r=document.querySelector(n[o++]);if(r)for(;n[o];)r=r[n[o]],o++;r instanceof HTMLElement&&(t=r)}else t=document.querySelector(e);else t=e;else t=document.body}catch(e){console.error(e)}return t}const s=!!(t&&"undefined"!=typeof document&&window.document&&window.document.createElement),a=["touchcancel","touchend","touchmove","touchenter","touchleave","touchstart"];function c(e){return{detail:e.detail,screenX:e.screenX,screenY:e.screenY,clientX:e.clientX,clientY:e.clientY,offsetX:e.offsetX,offsetY:e.offsetY,pageX:e.pageX,pageY:e.pageY,button:e.button,buttons:e.buttons,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,altKey:e.altKey,metaKey:e.metaKey,type:e.type}}function u(e){return{detail:e.detail,touches:d(e.touches),targetTouches:d(e.targetTouches),changedTouches:d(e.changedTouches),ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,altKey:e.altKey,metaKey:e.metaKey,type:e.type}}function d(e){const t=[];for(let n=0;nm("mouse",e)})}function p(e,t){Blazor&&Blazor.registerCustomEventType(e,{browserEventName:t,createEventArgs:e=>{const t=(n=e,Object.assign(Object.assign({},c(n)),{dataTransfer:n.dataTransfer?{dropEffect:n.dataTransfer.dropEffect,effectAllowed:n.dataTransfer.effectAllowed,files:Array.from(n.dataTransfer.files).map((e=>e.name)),items:Array.from(n.dataTransfer.items).map((e=>({kind:e.kind,type:e.type}))),types:n.dataTransfer.types}:null}));var n;const o=e.dataTransfer.getData("data-value"),r=e.dataTransfer.getData("offsetX"),i=e.dataTransfer.getData("offsetY");return t.dataTransfer.data={value:o,offsetX:Number(r),offsetY:Number(i)},t}})}function m(e,t){let n={target:{}};return"mouse"===e?n=Object.assign(Object.assign({},n),c(t)):"touch"===e&&(n=Object.assign(Object.assign({},n),u(t))),n.target=function(e){const t=e,n={},o=t.getAttributeNames().find((e=>e.startsWith("_bl_")));return o?(n.elementReferenceId=o,n.selector=`[${o}]`):n.selector=i(t),n.class=t.getAttribute("class"),n}(t.target),n}let h=0;const v={};var g=Object.freeze({__proto__:null,registerSliderEvents:function(t,o){v[h]=s;const r=document.querySelector("[data-app]"),i=!n||{passive:!0,capture:!0},l=!!n&&{passive:!0};return t.addEventListener("mousedown",s),t.addEventListener("touchstart",s),h++;function s(t){return e(this,void 0,void 0,(function*(){const e="touches"in t;c(t),r.addEventListener(e?"touchmove":"mousemove",c,l),function(e,t,n,o=!1){const r=i=>{n(i),e.removeEventListener(t,r,o)};e.addEventListener(t,r,o)}(r,e?"touchend":"mouseup",a,i),e?yield o.invokeMethodAsync("OnTouchStartInternal",m("touch",t)):yield o.invokeMethodAsync("OnMouseDownInternal",m("mouse",t))}))}function a(t){return e(this,void 0,void 0,(function*(){t.stopPropagation(),r.removeEventListener("touchmove",c,l),r.removeEventListener("mousemove",c,l),yield o.invokeMethodAsync("OnMouseUpInternal")}))}function c(t){return e(this,void 0,void 0,(function*(){const e="touches"in t,n={type:t.type,clientX:e?t.touches[0].clientX:t.clientX,clientY:e?t.touches[0].clientY:t.clientY};yield o.invokeMethodAsync("OnMouseMoveInternal",n)}))}},unregisterSliderEvents:function(e,t){if(e){const n=v[t];e.removeEventListener("mousedown",n),e.removeEventListener("touchstart",n),delete v[t]}}});let y=0;const w={};function b(e,t,n){e.style.height="0";const o=e.scrollHeight,r=parseInt(t,10)*parseFloat(n);e.style.height=Math.max(o,r)+"px"}var E=Object.freeze({__proto__:null,registerTextareaAutoGrowEvent:function(e){const t=e=>{const t=e.target;if(void 0===t.getAttribute("data-auto-grow"))return;const n=t.getAttribute("rows"),o=t.getAttribute("data-row-height");b(t,n,o)};return w[y]=t,e.addEventListener("input",t),y++},unregisterTextareaAutoGrowEvent:function(e,t){if(!e)return;const n=w[t];n&&e.removeEventListener("input",n)},calculateTextareaHeight:b}),T=function(e,t,n){var o=null,r=null,i=function(){o&&(clearTimeout(o),r=null,o=null)},l=function(){if(!t)return e.apply(this,arguments);var l=this,s=arguments,a=n&&!o;return i(),r=function(){e.apply(l,s)},o=setTimeout((function(){if(o=null,!a){var e=r;return r=null,e()}}),t),a?r():void 0};return l.cancel=i,l.flush=function(){var e=r;i(),e&&e()},l};var L=function(e,t,n){var o=null,r=null,i=n&&n.leading,l=n&&n.trailing;null==i&&(i=!0);null==l&&(l=!i);1==i&&(l=!1);var s=function(){o&&(clearTimeout(o),o=null)},a=function(){var n=i&&!o,s=this,a=arguments;if(r=function(){return e.apply(s,a)},o||(o=setTimeout((function(){if(o=null,l)return r()}),t)),n)return n=!1,r()};return a.cancel=s,a.flush=function(){var e=r;s(),e&&e()},a};function _(){var e,t;f("exmousedown","mousedown"),f("exmouseup","mouseup"),f("exclick","click"),f("exmouseleave","mouseleave"),f("exmouseenter","mouseenter"),f("exmousemove","mousemove"),e="extouchstart",t="touchstart",Blazor&&Blazor.registerCustomEventType(e,{browserEventName:t,createEventArgs:e=>m("touch",e)}),function(e,t){Blazor&&Blazor.registerCustomEventType(e,{browserEventName:t})}("transitionend","transitionend"),p("exdrop","drop"),Blazor&&Blazor.registerCustomEventType("auxclick",{browserEventName:"auxclick",createEventArgs:c})}const C=80;function x(e,t){e.style.transform=t,e.style.webkitTransform=t}function S(e){return"TouchEvent"===e.constructor.name}function M(e){return"KeyboardEvent"===e.constructor.name}const k={show(e,t,n={}){if(!t._ripple||!t._ripple.enabled)return;const o=document.createElement("span"),r=document.createElement("span");o.appendChild(r),o.className="m-ripple__container",n.class&&(o.className+=` ${n.class}`);const{radius:i,scale:l,x:s,y:a,centerX:c,centerY:u}=((e,t,n={})=>{let o=0,r=0;if(!M(e)){const n=t.getBoundingClientRect(),i=S(e)?e.touches[e.touches.length-1]:e;o=i.clientX-n.left,r=i.clientY-n.top}let i=0,l=.3;t._ripple&&t._ripple.circle?(l=.15,i=t.clientWidth/2,i=n.center?i:i+Math.sqrt((o-i)**2+(r-i)**2)/4):i=Math.sqrt(t.clientWidth**2+t.clientHeight**2)/2;const s=(t.clientWidth-2*i)/2+"px",a=(t.clientHeight-2*i)/2+"px";return{radius:i,scale:l,x:n.center?s:o-i+"px",y:n.center?a:r-i+"px",centerX:s,centerY:a}})(e,t,n),d=2*i+"px";r.className="m-ripple__animation",r.style.width=d,r.style.height=d,t.appendChild(o);const f=window.getComputedStyle(t);f&&"static"===f.position&&(t.style.position="relative",t.dataset.previousPosition="static"),r.classList.add("m-ripple__animation--enter"),r.classList.add("m-ripple__animation--visible"),x(r,`translate(${s}, ${a}) scale3d(${l},${l},${l})`),r.dataset.activated=String(performance.now()),setTimeout((()=>{r.classList.remove("m-ripple__animation--enter"),r.classList.add("m-ripple__animation--in"),x(r,`translate(${c}, ${u}) scale3d(1,1,1)`)}),0)},hide(e){if(!e||!e._ripple||!e._ripple.enabled)return;const t=e.getElementsByClassName("m-ripple__animation");if(0===t.length)return;const n=t[t.length-1];if(n.dataset.isHiding)return;n.dataset.isHiding="true";const o=performance.now()-Number(n.dataset.activated),r=Math.max(250-o,0);setTimeout((()=>{n.classList.remove("m-ripple__animation--in"),n.classList.add("m-ripple__animation--out"),setTimeout((()=>{var t;1===e.getElementsByClassName("m-ripple__animation").length&&e.dataset.previousPosition&&(e.style.position=e.dataset.previousPosition,delete e.dataset.previousPosition),(null===(t=n.parentNode)||void 0===t?void 0:t.parentNode)===e&&e.removeChild(n.parentNode)}),300)}),r)}};function A(e){const t={},n=e.currentTarget;if(n&&n._ripple&&!n._ripple.touched&&!e.rippleStop){if(e.rippleStop=!0,S(e))n._ripple.touched=!0,n._ripple.isTouch=!0;else if(n._ripple.isTouch)return;if(t.center=n._ripple.centered||M(e),n._ripple.class&&(t.class=n._ripple.class),S(e)){if(n._ripple.showTimerCommit)return;n._ripple.showTimerCommit=()=>{k.show(e,n,t)},n._ripple.showTimer=window.setTimeout((()=>{n&&n._ripple&&n._ripple.showTimerCommit&&(n._ripple.showTimerCommit(),n._ripple.showTimerCommit=null)}),C)}else k.show(e,n,t)}}function O(e){const t=e.currentTarget;if(t&&t._ripple)if(window.clearTimeout(t._ripple.showTimer),"touchend"===e.type&&t._ripple.showTimerCommit){t._ripple.showTimerCommit(),t._ripple.showTimerCommit=null;t._ripple.showTimer=setTimeout((()=>O(e)))}else window.setTimeout((()=>{t._ripple&&(t._ripple.touched=!1)})),k.hide(t)}function N(e){const t=e.currentTarget;t&&t._ripple&&(t._ripple.showTimerCommit&&(t._ripple.showTimerCommit=null),window.clearTimeout(t._ripple.showTimer))}function H(e){const t=e.currentTarget;t.keyboardRipple||e.keyCode!==o.enter&&e.keyCode!==o.space||(t.keyboardRipple=!0,A(e))}function B(e){e.currentTarget.keyboardRipple=!1,O(e)}function I(e){const t=e.currentTarget;!0===t.keyboardRipple&&(t.keyboardRipple=!1,O(e))}function Y(e,t,n){let o=!1;t?o=!0:k.hide(e);const r=t||{};e._ripple=e._ripple||{},e._ripple.enabled=o,e._ripple=Object.assign(Object.assign({},e._ripple),{centered:r.center,class:r.class,circle:r.circle}),o&&!n?(e.addEventListener("touchstart",A,{passive:!0}),e.addEventListener("touchend",O,{passive:!0}),e.addEventListener("touchmove",N,{passive:!0}),e.addEventListener("touchcancel",O),e.addEventListener("mousedown",A),e.addEventListener("mouseup",O),e.addEventListener("mouseleave",O),e.addEventListener("keydown",H),e.addEventListener("keyup",B),e.addEventListener("blur",I),e.addEventListener("dragstart",O,{passive:!0})):!o&&n&&P(e)}function P(e){e.removeEventListener("mousedown",A),e.removeEventListener("touchstart",A),e.removeEventListener("touchend",O),e.removeEventListener("touchmove",N),e.removeEventListener("touchcancel",O),e.removeEventListener("mouseup",O),e.removeEventListener("mouseleave",O),e.removeEventListener("keydown",H),e.removeEventListener("keyup",B),e.removeEventListener("dragstart",O),e.removeEventListener("blur",I),e._ripple.enabled=!1}function W(e){if(!e||e.nodeType!==Node.ELEMENT_NODE)return 0;const t=+window.getComputedStyle(e).getPropertyValue("z-index");return t||W(e.parentNode)}function D(e){var t={};t.offsetTop=e.offsetTop||0,t.offsetLeft=e.offsetLeft||0,t.scrollHeight=e.scrollHeight||0,t.scrollWidth=e.scrollWidth||0,t.scrollLeft=e.scrollLeft||0,t.scrollTop=e.scrollTop||0,t.clientTop=e.clientTop||0,t.clientLeft=e.clientLeft||0,t.clientHeight=e.clientHeight||0,t.clientWidth=e.clientWidth||0;var n=function(e){var t=new Object;if(t.x=0,t.y=0,null!==e&&e.getBoundingClientRect){var n=document.documentElement,o=e.getBoundingClientRect(),r=n.scrollLeft,i=n.scrollTop;t.offsetWidth=o.width,t.offsetHeight=o.height,t.relativeTop=o.top,t.relativeBottom=o.bottom,t.relativeLeft=o.left,t.relativeRight=o.right,t.absoluteLeft=o.left+r,t.absoluteTop=o.top+i}return t}(e);return t.offsetWidth=Math.round(n.offsetWidth)||0,t.offsetHeight=Math.round(n.offsetHeight)||0,t.relativeTop=Math.round(n.relativeTop)||0,t.relativeBottom=Math.round(n.relativeBottom)||0,t.relativeLeft=Math.round(n.relativeLeft)||0,t.relativeRight=Math.round(n.relativeRight)||0,t.absoluteLeft=Math.round(n.absoluteLeft)||0,t.absoluteTop=Math.round(n.absoluteTop)||0,t}window.onload=function(){var e;_(),e="pastewithdata",Blazor&&Blazor.registerCustomEventType(e,{browserEventName:"paste",createEventArgs:e=>({type:e.type,pastedData:e.clipboardData.getData("text")})}),function(){const e=new MutationObserver(((e,n)=>{for(const n of e){if("childList"===n.type&&n.addedNodes.length>0)for(const e of n.addedNodes)e instanceof HTMLElement&&e.nodeType===Node.ELEMENT_NODE&&e.hasAttribute("ripple")&&!e._ripple&&Y(e,t(e),!1);if("attributes"===n.type){const e=n.target;e.hasAttribute("ripple")&&!e._ripple&&("ripple"===n.attributeName?Y(e,t(e),!1):!e.hasAttribute("ripple")&&e._ripple&&(P(e),delete e._ripple))}if("attributes"===n.type&&"ripple"===n.attributeName){const e=n.target;e._ripple&&Y(e,t(e),e._ripple.enabled)}if("childList"===n.type&&n.removedNodes.length>0)for(const e of n.removedNodes)e instanceof HTMLElement&&e.nodeType===Node.ELEMENT_NODE&&e._ripple&&(P(e),delete e._ripple)}}));function t(e){const t=e.getAttribute("ripple");if("string"!=typeof t&&!t||"false"===t)return null;const n={};return t.split("&").forEach((e=>{"center"===e?n.center=!0:"circle"===e?n.circle=!0:n.class=e.trim()})),n}const n=document.querySelectorAll("[ripple]");for(const e of n)Y(e,t(e),!1);e.observe(document,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["ripple"],attributeOldValue:!1})}()};var X={};function q(){return document.activeElement.getAttribute("id")||""}function z(e=[],t=[]){const n={};return e&&(e.forEach((e=>n[e]=window[e])),n.pageYOffset=K()),t&&t.forEach((e=>n[e]=document.documentElement[e])),n}function $(e){return"HTML"!==e.tagName&&"BODY"!==e.tagName&&1==e.nodeType}function R(e=[],t){const n=[W(l(t))],o=[...document.getElementsByClassName("m-menu__content--active"),...document.getElementsByClassName("m-dialog__content--active")];for(let t=0;t{if(o){if(o.offsetParent){const t=V(o.offsetParent);s.relativeYOffset=K()+t.top,e?(s.activator.top-=s.relativeYOffset,s.activator.left-=window.pageXOffset+t.left):s.offsetParentLeft=t.left}s.content=j(o,n),s.content.offsetLeft=o.offsetLeft,s.content.offsetTop=o.offsetTop}}),o),s}function K(){let e=window.pageYOffset;const t=parseInt(document.documentElement.style.getPropertyValue("--m-body-scroll-y"));return t&&(e+=Math.abs(t)),e}function j(e,t){if(!e)return{};const n=V(e);if(!t){const t=window.getComputedStyle(e);n.left=parseInt(t.marginLeft),n.top=parseInt(t.marginTop)}return n}function V(e){if(!e||!e.nodeType)return null;const t=e.getBoundingClientRect();return{top:Math.round(t.top),left:Math.round(t.left),bottom:Math.round(t.bottom),right:Math.round(t.right),width:Math.round(t.width),height:Math.round(t.height)}}function U(e,t,n,o){e.preventDefault();const r=e.key;if("ArrowLeft"===r||"Backspace"===r){if("Backspace"===r){const e={type:r,index:t,value:""};o&&o.invokeMethodAsync("Invoke",e)}G(t-1,n)}else"ArrowRight"===r&&G(t+1,n)}function G(e,t){if(e<0)G(0,t);else if(e>=t.length)G(t.length-1,t);else if(document.activeElement!==t[e]){l(t[e]).focus()}}function Z(e,t,n){const o=l(n[t]);o&&document.activeElement===o&&o.select()}function J(e,t,n,o){const r=e.target.value;if(r&&""!==r&&(G(t+1,n),o)){const e={type:"Input",index:t,value:r};o.invokeMethodAsync("Invoke",e)}}function Q(){var e,t,n="weird_get_top_level_domain=cookie",o=document.location.hostname.split(".");for(e=o.length-1;e>=0;e--)if(t=o.slice(e).join("."),document.cookie=n+";domain=."+t+";",document.cookie.indexOf(n)>-1)return document.cookie=n.split("=")[0]+"=;domain=."+t+";expires=Thu, 01 Jan 1970 00:00:01 GMT;",t}function ee(e){e.stopPropagation()}var te=Object.freeze({__proto__:null,getZIndex:W,getDomInfo:function(e,t="body"){var n={},o=l(e);if(o)if(o.style&&"none"===o.style.display){var r=o.cloneNode(!0);r.style.display="inline-block",r.style["z-index"]=-1e3,o.parentElement.appendChild(r),n=D(r),o.parentElement.removeChild(r)}else n=D(o);return n},getParentClientWidthOrWindowInnerWidth:function(e){return e.parentElement?e.parentElement.clientWidth:window.innerWidth},triggerEvent:function(e,t,n,o){var r=l(e),i=document.createEvent(t);return i.initEvent(n),o&&i.stopPropagation(),r.dispatchEvent(i)},setProperty:function(e,t,n){l(e)[t]=n},getBoundingClientRect:function(e,t="body"){var n,o;let r=l(e);var i={};if(r&&r.getBoundingClientRect)if(r.style&&"none"===r.style.display){var s=r.cloneNode(!0);s.style.display="inline-block",s.style["z-index"]=-1e3,null===(n=document.querySelector(t))||void 0===n||n.appendChild(s),i=s.getBoundingClientRect(),null===(o=document.querySelector(t))||void 0===o||o.removeChild(s)}else i=r.getBoundingClientRect();return i},addHtmlElementEventListener:function(e,t,n,o,r){let l;if(l="window"==e?window:"document"==e?document.documentElement:document.querySelector(e),!l)return!1;var s=(null==r?void 0:r.key)||`${e}:${t}`;const c={};var d=e=>{var t;if((null==r?void 0:r.stopPropagation)&&e.stopPropagation(),("boolean"!=typeof e.cancelable||e.cancelable)&&(null==r?void 0:r.preventDefault)&&e.preventDefault(),(null==r?void 0:r.relatedTarget)&&(null===(t=document.querySelector(r.relatedTarget))||void 0===t?void 0:t.contains(e.relatedTarget)))return;let o={};if(a.includes(e.type))o=u(e);else for(var l in e)"string"!=typeof e[l]&&"number"!=typeof e[l]||(o[l]=e[l]);if(e.target&&e.target!==window&&e.target!==document){o.target={};const t=e.target,n=t.getAttributeNames().find((e=>e.startsWith("_bl_")));n?(o.target.elementReferenceId=n,o.target.selector=`[${n}]`):o.target.selector=i(t),o.target.class=t.getAttribute("class")}n.invokeMethodAsync("Invoke",o)};return(null==r?void 0:r.debounce)&&r.debounce>0?c.listener=T(d,r.debounce):(null==r?void 0:r.throttle)&&r.throttle>0?c.listener=L(d,r.throttle,{trailing:!0}):c.listener=d,c.options=o,c.handle=n,X[s]?X[s].push(c):X[s]=[c],l.addEventListener(t,c.listener,c.options),!0},removeHtmlElementEventListener:function(e,t,n){let o;o="window"==e?window:"document"==e?document.documentElement:document.querySelector(e);var r=X[n=n||`${e}:${t}`];r&&(r.forEach((e=>{e.handle.dispose(),null==o||o.removeEventListener(t,e.listener,e.options)})),X[n]=[])},addMouseleaveEventListener:function(e){var t=document.querySelector(e);t&&t.addEventListener()},contains:function(e,t){const n=l(e);return!(!n||!n.contains)&&n.contains(l(t))},equalsOrContains:function(e,t){const n=l(e),o=l(t);return!!n&&n.contains&&!!o&&(n==o||n.contains(o))},copy:function(e){navigator.clipboard?navigator.clipboard.writeText(e).then((function(){console.log("Async: Copying to clipboard was successful!")}),(function(e){console.error("Async: Could not copy text: ",e)})):function(e){var t=document.createElement("textarea");t.value=e,t.style.top="0",t.style.left="0",t.style.position="fixed",document.body.appendChild(t),t.focus(),t.select();try{var n=document.execCommand("copy")?"successful":"unsuccessful";console.log("Fallback: Copying text command was "+n)}catch(e){console.error("Fallback: Oops, unable to copy",e)}document.body.removeChild(t)}(e)},focus:function(e,t=!1){let n=l(e);n instanceof HTMLElement?n.focus({preventScroll:t}):console.error("Unable to focus an invalid element")},select:function(e){let t=l(e);if(!(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement))throw new Error("Unable to select an invalid element");t.select()},hasFocus:function(e){let t=l(e);return document.activeElement===t},blur:function(e){l(e).blur()},log:function(e){console.log(e)},scrollIntoView:function(e,t){let n=l(e);n instanceof HTMLElement&&(null===t||null==t?n.scrollIntoView():"boolean"==typeof t?n.scrollIntoView(t):n.scrollIntoView({block:null==t.block?void 0:t.block,inline:null==t.inline?void 0:t.inline,behavior:t.behavior}))},scrollIntoParentView:function(e,t=!1,n=!1,o=1,r="smooth"){const i=l(e);if(i instanceof HTMLElement){let e=i;for(;o>0;)if(e=e.parentElement,o--,!e)return;const l={behavior:r};if(t)if(n)l.left=i.offsetLeft;else{const t=i.offsetLeft-e.offsetLeft;t-e.scrollLeft<0?l.left=t:t+i.offsetWidth-e.scrollLeft>e.offsetWidth&&(l.left=t+i.offsetWidth-e.offsetWidth)}else if(n)l.top=i.offsetTop;else{const t=i.offsetTop-e.offsetTop;t-e.scrollTop<0?l.top=t:t+i.offsetHeight-e.scrollTop>e.offsetHeight&&(l.top=t+i.offsetHeight-e.offsetHeight)}(l.left||l.top)&&e.scrollTo(l)}},scrollTo:function(e,t){let n=l(e);if(n instanceof HTMLElement){const e={left:null===t.left?void 0:t.left,top:null===t.top?void 0:t.top,behavior:t.behavior};n.scrollTo(e)}},scrollToTarget:function(e,t=null,n=0){const o=document.querySelector(e);if(o){let e;e=t?o.offsetTop:o.getBoundingClientRect().top+window.scrollY;(t?document.querySelector(t):document.documentElement).scrollTo({top:e-n,behavior:"smooth"})}},scrollToElement:function(e,t,n){const o=l(e);if(!o)return;const r=o.getBoundingClientRect().top+window.pageYOffset-t;window.scrollTo({top:r,behavior:n})},scrollToActiveElement:function(e,t=".active",n="center",o=!1){let r,i=l(e);if("string"==typeof t&&(r=e.querySelector(t)),!i||!r)return;const s="center"===n?r.offsetTop-i.offsetHeight/2+r.offsetHeight/2:r.offsetTop-n;i.scrollTo({top:s,behavior:o?"smooth":"auto"})},addClsToFirstChild:function(e,t){var n=l(e);n.firstElementChild&&n.firstElementChild.classList.add(t)},removeClsFromFirstChild:function(e,t){var n=l(e);n.firstElementChild&&n.firstElementChild.classList.remove(t)},getAbsoluteTop:function e(t){var n=t.offsetTop;return null!=t.offsetParent&&(n+=e(t.offsetParent)),n},getAbsoluteLeft:function e(t){var n=t.offsetLeft;return null!=t.offsetParent&&(n+=e(t.offsetParent)),n},addElementToBody:function(e){document.body.appendChild(e)},delElementFromBody:function(e){document.body.removeChild(e)},addElementTo:function(e,t){let n=l(t);n&&e&&n.appendChild(e)},delElementFrom:function(e,t){let n=l(t);n&&e&&n.removeChild(e)},getActiveElement:q,focusDialog:function e(t,n=0){let o=document.querySelector(t);o&&!o.hasAttribute("disabled")&&setTimeout((()=>{o.focus(),"#"+q()!==t&&n<10&&e(t,n+1)}),10)},getWindow:function(){return{innerWidth:window.innerWidth,innerHeight:window.innerHeight,pageXOffset:window.pageXOffset,pageYOffset:window.pageYOffset,isTop:0==window.scrollY,isBottom:window.scrollY+window.innerHeight==document.body.clientHeight}},getWindowAndDocumentProps:z,css:function(e,t,n=null){var o=l(e);if("string"==typeof t)o.style[t]=n;else for(let e in t)t.hasOwnProperty(e)&&(o.style[e]=t[e])},addCls:function(e,t){let n=l(e);"string"==typeof t?n.classList.add(t):n.classList.add(...t)},removeCls:function(e,t){let n=l(e);"string"==typeof t?n.classList.remove(t):n.classList.remove(...t)},elementScrollIntoView:function(e){let t=l(e);t&&t.scrollIntoView({behavior:"smooth",block:"nearest",inline:"start"})},getScroll:function(){return{x:window.pageXOffset,y:window.pageYOffset}},getScrollParent:function(e,t=undefined){null!=t||(t=s?window:void 0);let n=e;for(;n&&n!==t&&$(n);){const{overflowY:e}=window.getComputedStyle(n);if(/scroll|auto|overlay/i.test(e))return n;n=n.parentNode}return t},getScrollTop:function(e){const t="scrollTop"in e?e.scrollTop:e.pageYOffset;return Math.max(t,0)},getInnerText:function(e){return l(e).innerText},getMenuOrDialogMaxZIndex:R,getMaxZIndex:function(){return[...document.all].reduce(((e,t)=>Math.max(e,+window.getComputedStyle(t).zIndex||0)),0)},getStyle:function(e,t){return(e=l(e)).currentStyle?e.currentStyle[t]:window.getComputedStyle?document.defaultView.getComputedStyle(e,null).getPropertyValue(t):void 0},getTextAreaInfo:function(e){var t={},n=l(e);return t.scrollHeight=n.scrollHeight||0,e.currentStyle?(t.lineHeight=parseFloat(e.currentStyle["line-height"]),t.paddingTop=parseFloat(e.currentStyle["padding-top"]),t.paddingBottom=parseFloat(e.currentStyle["padding-bottom"]),t.borderBottom=parseFloat(e.currentStyle["border-bottom"]),t.borderTop=parseFloat(e.currentStyle["border-top"])):window.getComputedStyle&&(t.lineHeight=parseFloat(document.defaultView.getComputedStyle(e,null).getPropertyValue("line-height")),t.paddingTop=parseFloat(document.defaultView.getComputedStyle(e,null).getPropertyValue("padding-top")),t.paddingBottom=parseFloat(document.defaultView.getComputedStyle(e,null).getPropertyValue("padding-bottom")),t.borderBottom=parseFloat(document.defaultView.getComputedStyle(e,null).getPropertyValue("border-bottom")),t.borderTop=parseFloat(document.defaultView.getComputedStyle(e,null).getPropertyValue("border-top"))),Object.is(NaN,t.borderTop)&&(t.borderTop=1),Object.is(NaN,t.borderBottom)&&(t.borderBottom=1),t},disposeObj:function(e){},upsertThemeStyle:function(e,t){const n=document.getElementById(e);n&&document.head.removeChild(n);const o=document.createElement("style");o.id=e,o.type="text/css",o.innerHTML=t,document.head.insertAdjacentElement("beforeend",o)},getImageDimensions:function(e){return new Promise((function(t,n){var o=new Image;o.src=e,o.onload=function(){t({width:o.width,height:o.height,hasError:!1})},o.onerror=function(){t({width:0,height:0,hasError:!0})}}))},enablePreventDefaultForEvent:function(e,t,n){const o=l(e);o&&("keydown"===t?o.addEventListener(t,(e=>{Array.isArray(n)?n.includes(e.code)&&e.preventDefault():e.preventDefault()})):o.addEventListener(t,(e=>{e.preventDefault&&e.preventDefault()})))},getBoundingClientRects:function(e){for(var t=document.querySelectorAll(e),n=[],o=0;o{if(e.target!==l(t)&&(e.preventDefault(),e.stopPropagation()),n){const t={Detail:e.detail,ScreenX:e.screenX,ScreenY:e.screenY,ClientX:e.clientX,ClientY:e.clientY,OffsetX:e.offsetX,OffsetY:e.offsetY,PageX:e.pageX,PageY:e.pageY,Button:e.button,Buttons:e.buttons,CtrlKey:e.ctrlKey,ShiftKey:e.shiftKey,AltKey:e.altKey,MetaKey:e.metaKey,Type:e.type};n.invokeMethodAsync("Invoke",t)}};e.addEventListener("mousedown",o);const i={listener:o,handle:n},s=`registerTextFieldOnMouseDown_${r(e)}`;X[s]=[i]},unregisterTextFieldOnMouseDown:function(e){const t=`registerTextFieldOnMouseDown_${r(e)}`,n=X[t];n&&n.length&&n.forEach((t=>{t.handle.dispose(),e&&e.removeEventListener("mousedown",t.listener)}))},containsActiveElement:function(e){var t=l(e);return t&&t.contains?t.contains(document.activeElement):null},copyChild:function(e){"string"==typeof e&&(e=document.querySelector(e)),e&&(e.setAttribute("contenteditable","true"),e.focus(),document.execCommand("selectAll",!1,null),document.execCommand("copy"),document.execCommand("unselect"),e.blur(),e.removeAttribute("contenteditable"))},copyText:function(e){if(navigator.clipboard)navigator.clipboard.writeText(e).then((function(){console.log("Async: Copying to clipboard was successful!")}),(function(e){console.error("Async: Could not copy text: ",e)}));else{var t=document.createElement("textarea");t.value=e,t.readOnly=!0,t.style.top="0",t.style.left="0",t.style.position="fixed",document.body.appendChild(t),t.focus(),t.select();try{var n=document.execCommand("copy")?"successful":"unsuccessful";console.log("Fallback: Copying text command was "+n)}catch(e){console.error("Fallback: Oops, unable to copy",e)}document.body.removeChild(t)}},getMenuableDimensions:F,invokeMultipleMethod:function(e,t,n,o,r,i,l,s,a){var c={windowAndDocument:null,dimensions:null,zIndex:0};return c.windowAndDocument=z(e,t),c.dimensions=F(n,o,r,i,l,s),c.zIndex=R([i],a),c},registerOTPInputOnInputEvent:function(e,t){for(let n=0;nJ(o,n,e,t),r=t=>Z(t,n,e),i=o=>U(o,n,e,t);e[n].addEventListener("input",o),e[n].addEventListener("focus",r),e[n].addEventListener("keyup",i),e[n]._optInput={inputListener:o,focusListener:r,keyupListener:i}}},unregisterOTPInputOnInputEvent:function(e){for(let t=0;ti.offsetTop-8?l.scrollTo({top:i.offsetTop-i.clientHeight,behavior:"smooth"}):s+a=r-n},get_top_domain:Q,setCookie:function(e,t){if(null!=t){var n=Q();n?isNaN(n[0])&&(n=`.${n}`):n="";var o=new Date;o.setTime(o.getTime()+2592e6),document.cookie=`${e}=${escape(null==t?void 0:t.toString())};path=/;expires=${o.toUTCString()};domain=${n}`}},getCookie:function(e){const t=new RegExp(`(^| )${e}=([^;]*)(;|$)`),n=document.cookie.match(t);return n?unescape(n[2]):null},registerDragEvent:function(e,t){if(e){const n=r(e),o=e=>{if(t){const n=e.target.getAttribute(t);e.dataTransfer.setData(t,n),e.dataTransfer.setData("offsetX",e.offsetX.toString()),e.dataTransfer.setData("offsetY",e.offsetY.toString())}};X[`${n}:dragstart`]=[{listener:o}],e.addEventListener("dragstart",o)}},unregisterDragEvent:function(e){const t=r(e);if(t){const n=`${t}:dragstart`;X[n]&&X[n].forEach((t=>{e.removeEventListener("dragstart",t.listener)}))}},resizableDataTable:function(e){const t=e.querySelector("table"),n=t.querySelector(".m-data-table-header").getElementsByTagName("tr")[0],o=n?n.children:[];if(!o)return;t.style.overflow="hidden";const r=t.offsetHeight;for(var i=0;ie.stopPropagation())),n.addEventListener("mousedown",(function(e){i=e.target.parentElement,l=i.nextElementSibling,r=e.pageX,u=t.offsetWidth;var n=function(e){if("border-box"==s(e,"box-sizing"))return 0;var t=s(e,"padding-left"),n=s(e,"padding-right");return parseInt(t)+parseInt(n)}(i);a=i.offsetWidth-n,l&&(c=l.offsetWidth-n)})),document.addEventListener("mousemove",(function(n){if(i){let o=n.pageX-r;e.classList.contains("m-data-table--rtl")&&(o=0-o);let s=a+o;i.style.width=s+"px";if(e.classList.contains("m-data-table--resizable-overflow"))return void(t.style.width=u+o+"px");if(e.classList.contains("m-data-table--resizable-independent")){let e=c-o;const t=a+c;o>0?l&&e{const t=e.scrollWidth,n=e.clientWidth,o=e.scrollLeft,r=e.parentElement.classList.contains("m-data-table--rtl");Math.abs(t-((r?-o:o)+n))<1?(e.classList.remove("scrolling"),e.classList.remove("scrolled-to-left"),e.classList.add("scrolled-to-right")):Math.abs(o-(r?t-n:0))<1?(e.classList.remove("scrolling"),e.classList.remove("scrolled-to-right"),e.classList.add("scrolled-to-left")):(e.classList.remove("scrolled-to-right"),e.classList.remove("scrolled-to-left"),e.classList.add("scrolling"))};t(),e.addEventListener("scroll",t),e._m_table_scroll_event=t},unregisterTableScrollEvent:function(e){const t=e._m_table_scroll_event;t&&(e.removeEventListener("scroll",t),delete e._m_table_scroll_event)},updateTabSlider:function(e,t,n,o,r){if(!e)return void console.warn("[MTab] the element of slider wrapper is not found");if(!t)return void console.warn("[MTab] the element of tab to be activated is not found");const i=o?t.scrollHeight:n,l=o?0:t.offsetLeft,s=o?0:t.offsetLeft+t.offsetWidth,a=t.offsetTop,c=o?n:t.clientWidth;e.style.width=`${c}px`,e.style.height=`${i}px`,r||(e.style.left=`${l}px`),r&&(e.style.right=`${s}px`),o&&(e.style.top=`${a}px`)},isScrollNearBottom:function(e,t=200){return!!e&&e.scrollHeight-(e.scrollTop+e.clientHeight){console.log(e.matches(n))}),1e3);try{return!!e&&e.matches(n)}catch(e){return!1}}});window.MasaBlazor={interop:Object.assign(Object.assign(Object.assign({},te),g),E),xgplayerPlugins:[]}}();
//# sourceMappingURL=masa-blazor.js.map
diff --git a/src/Masa.Blazor/wwwroot/js/masa-blazor.js.map b/src/Masa.Blazor/wwwroot/js/masa-blazor.js.map
index 1dc670c8b8..3523739e05 100644
--- a/src/Masa.Blazor/wwwroot/js/masa-blazor.js.map
+++ b/src/Masa.Blazor/wwwroot/js/masa-blazor.js.map
@@ -1 +1 @@
-{"version":3,"file":"masa-blazor.js","sources":["../../../Masa.Blazor.JS/node_modules/tslib/tslib.es6.js","../../../Masa.Blazor.JS/src/utils/helper.ts","../../../Masa.Blazor.JS/src/events/EventType.ts","../../../Masa.Blazor.JS/src/events/extra.ts","../../../Masa.Blazor.JS/src/components/slider/index.ts","../../../Masa.Blazor.JS/src/components/textarea/index.ts","../../../Masa.Blazor.JS/node_modules/just-debounce-it/index.mjs","../../../Masa.Blazor.JS/node_modules/just-throttle/index.mjs","../../../Masa.Blazor.JS/src/events/index.ts","../../../Masa.Blazor.JS/src/ripple/ripple.ts","../../../Masa.Blazor.JS/src/interop.ts","../../../Masa.Blazor.JS/src/ripple/index.ts","../../../Masa.Blazor.JS/src/main.ts"],"sourcesContent":["/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.push(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.push(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n};\r\n\r\nexport function __runInitializers(thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n};\r\n\r\nexport function __propKey(x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n};\r\n\r\nexport function __setFunctionName(f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n};\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n","export function addOnceEventListener (\r\n el: EventTarget,\r\n eventName: string,\r\n cb: (event: Event) => void,\r\n options: boolean | AddEventListenerOptions = false\r\n): void {\r\n const once = (event: Event) => {\r\n cb(event)\r\n el.removeEventListener(eventName, once, options)\r\n }\r\n\r\n el.addEventListener(eventName, once, options)\r\n}\r\n\r\nlet passiveSupported = false\r\ntry {\r\n if (typeof window !== 'undefined') {\r\n const testListenerOpts = Object.defineProperty({}, 'passive', {\r\n get: () => {\r\n passiveSupported = true\r\n },\r\n })\r\n\r\n window.addEventListener('testListener' as any, testListenerOpts as any, testListenerOpts)\r\n window.removeEventListener('testListener' as any, testListenerOpts as any, testListenerOpts)\r\n }\r\n} catch (e) { console.warn(e) } /* eslint-disable-line no-console */\r\nexport { passiveSupported }\r\n\r\nexport function addPassiveEventListener (\r\n el: EventTarget,\r\n event: string,\r\n cb: ((e: any) => void),\r\n options: {}\r\n): void {\r\n el.addEventListener(event, cb, passiveSupported ? options : false)\r\n}\r\n\r\nexport function getZIndex (el?: Element | null): number {\r\n if (!el || el.nodeType !== Node.ELEMENT_NODE) return 0\r\n\r\n const index = +window.getComputedStyle(el).getPropertyValue('z-index')\r\n\r\n if (!index) return getZIndex(el.parentNode as Element)\r\n return index\r\n}\r\n\r\n// KeyboardEvent.keyCode aliases\r\nexport const keyCodes = Object.freeze({\r\n enter: 13,\r\n tab: 9,\r\n delete: 46,\r\n esc: 27,\r\n space: 32,\r\n up: 38,\r\n down: 40,\r\n left: 37,\r\n right: 39,\r\n end: 35,\r\n home: 36,\r\n del: 46,\r\n backspace: 8,\r\n insert: 45,\r\n pageup: 33,\r\n pagedown: 34,\r\n shift: 16,\r\n})\r\n\r\n/** Polyfill for Event.prototype.composedPath */\r\nexport function composedPath (e: Event): EventTarget[] {\r\n if (e.composedPath) return e.composedPath()\r\n\r\n const path = []\r\n let el = e.target as Element\r\n\r\n while (el) {\r\n path.push(el)\r\n\r\n if (el.tagName === 'HTML') {\r\n path.push(document)\r\n path.push(window)\r\n\r\n return path\r\n }\r\n\r\n el = el.parentElement!\r\n }\r\n return path\r\n}\r\n\r\nexport function getBlazorId(el) {\r\n if (!el) {\r\n return null;\r\n }\r\n let _bl_ = el.getAttributeNames().find(a => a.startsWith('_bl_'))\r\n if (_bl_) {\r\n _bl_ = _bl_.substring(4);\r\n }\r\n\r\n return _bl_;\r\n}\r\n\r\nexport function getElementSelector(el) {\r\n if (!(el instanceof Element))\r\n return;\r\n var path = [];\r\n while (el.nodeType === Node.ELEMENT_NODE) {\r\n var selector = el.nodeName.toLowerCase();\r\n if (el.id) {\r\n selector = '#' + el.id;\r\n path.unshift(selector);\r\n break;\r\n } else {\r\n var sib = el, nth = 1;\r\n while (sib = sib.previousElementSibling) {\r\n if (sib.nodeName.toLowerCase() == selector)\r\n nth++;\r\n }\r\n if (nth != 1)\r\n selector += \":nth-of-type(\" + nth + \")\";\r\n }\r\n path.unshift(selector);\r\n el = el.parentNode;\r\n }\r\n return path.join(\" > \");\r\n}\r\n\r\nexport function getEventTarget(target: HTMLElement | EventTarget) {\r\n const el = target as HTMLElement;\r\n const eventTarget: MbEventTarget = {};\r\n const elementReferenceId = el\r\n .getAttributeNames()\r\n .find((a) => a.startsWith(\"_bl_\"));\r\n if (elementReferenceId) {\r\n eventTarget.elementReferenceId = elementReferenceId;\r\n eventTarget.selector = `[${elementReferenceId}]`;\r\n } else {\r\n eventTarget.selector = getElementSelector(el);\r\n }\r\n\r\n eventTarget.class = el.getAttribute(\"class\");\r\n\r\n return eventTarget;\r\n}\r\n\r\nexport function getDom(elOrString: Element | string | undefined) {\r\n let element: HTMLElement;\r\n\r\n try {\r\n if (!elOrString) {\r\n element = document.body;\r\n } else if (typeof elOrString === \"string\") {\r\n if (elOrString === \"document\") {\r\n element = document.documentElement;\r\n } else if (elOrString.indexOf(\"__.__\") > 0) {\r\n // for example: el__.__parentElement\r\n let array = elOrString.split(\"__.__\");\r\n let i = 0;\r\n let el = document.querySelector(array[i++]);\r\n\r\n if (el) {\r\n while (array[i]) {\r\n el = el[array[i]];\r\n i++;\r\n }\r\n }\r\n\r\n if (el instanceof HTMLElement) {\r\n element = el;\r\n }\r\n } else {\r\n element = document.querySelector(elOrString);\r\n }\r\n } else {\r\n element = elOrString as HTMLElement;\r\n }\r\n\r\n } catch (error) {\r\n console.error(error)\r\n }\r\n\r\n return element;\r\n}\r\n\r\nexport const canUseDom = !!(\r\n typeof window !== 'undefined' &&\r\n typeof document !== 'undefined' &&\r\n window.document &&\r\n window.document.createElement\r\n)\r\n\r\nexport function convertToUnit (str: number, unit?: string): string\r\nexport function convertToUnit (str: string | number | null | undefined, unit?: string): string | undefined\r\nexport function convertToUnit (str: string | number | null | undefined, unit = 'px'): string | undefined {\r\n if (str == null || str === '') {\r\n return undefined\r\n } else if (isNaN(+str!)) {\r\n return String(str)\r\n } else if (!isFinite(+str!)) {\r\n return undefined\r\n } else {\r\n return `${Number(str)}${unit}`\r\n }\r\n}","// see https://github.com/dotnet/aspnetcore/blob/main/src/Components/Web.JS/src/Rendering/Events/EventTypes.ts\r\n// updated at 2022/08/31\r\n\r\nexport const touchEvents = [\r\n \"touchcancel\",\r\n \"touchend\",\r\n \"touchmove\",\r\n \"touchenter\",\r\n \"touchleave\",\r\n \"touchstart\",\r\n];\r\n\r\nexport function parseMouseEvent(event: MouseEvent): Blazor.MouseEventArgs {\r\n return {\r\n detail: event.detail,\r\n screenX: event.screenX,\r\n screenY: event.screenY,\r\n clientX: event.clientX,\r\n clientY: event.clientY,\r\n offsetX: event.offsetX,\r\n offsetY: event.offsetY,\r\n pageX: event.pageX,\r\n pageY: event.pageY,\r\n button: event.button,\r\n buttons: event.buttons,\r\n ctrlKey: event.ctrlKey,\r\n shiftKey: event.shiftKey,\r\n altKey: event.altKey,\r\n metaKey: event.metaKey,\r\n type: event.type,\r\n } as Blazor.MouseEventArgs;\r\n}\r\n\r\nexport function parseTouchEvent(event: TouchEvent): Blazor.TouchEventArgs {\r\n return {\r\n detail: event.detail,\r\n touches: parseTouch(event.touches),\r\n targetTouches: parseTouch(event.targetTouches),\r\n changedTouches: parseTouch(event.changedTouches),\r\n ctrlKey: event.ctrlKey,\r\n shiftKey: event.shiftKey,\r\n altKey: event.altKey,\r\n metaKey: event.metaKey,\r\n type: event.type,\r\n };\r\n}\r\n\r\nfunction parseTouch(touchList: TouchList): Blazor.TouchPoint[] {\r\n const touches: Blazor.TouchPoint[] = [];\r\n\r\n for (let i = 0; i < touchList.length; i++) {\r\n const touch = touchList[i];\r\n touches.push({\r\n identifier: touch.identifier,\r\n clientX: touch.clientX,\r\n clientY: touch.clientY,\r\n screenX: touch.screenX,\r\n screenY: touch.screenY,\r\n pageX: touch.pageX,\r\n pageY: touch.pageY,\r\n });\r\n }\r\n return touches;\r\n}\r\n\r\nexport function parseChangeEvent(event: Event): Blazor.ChangeEventArgs {\r\n const element = event.target as Element;\r\n if (isTimeBasedInput(element)) {\r\n const normalizedValue = normalizeTimeBasedValue(element);\r\n return { value: normalizedValue };\r\n } else if (isMultipleSelectInput(element)) {\r\n const selectElement = element as HTMLSelectElement;\r\n const selectedValues = Array.from(selectElement.options)\r\n .filter((option) => option.selected)\r\n .map((option) => option.value);\r\n return { value: selectedValues };\r\n } else {\r\n const targetIsCheckbox = isCheckbox(element);\r\n const newValue = targetIsCheckbox ? !!element[\"checked\"] : element[\"value\"];\r\n return { value: newValue };\r\n }\r\n}\r\n\r\nexport function parseDragEvent(event: DragEvent): Blazor.DragEventArgs {\r\n return {\r\n ...parseMouseEvent(event),\r\n dataTransfer: event.dataTransfer ? {\r\n dropEffect: event.dataTransfer.dropEffect,\r\n effectAllowed: event.dataTransfer.effectAllowed,\r\n files: Array.from(event.dataTransfer.files).map(f => f.name),\r\n items: Array.from(event.dataTransfer.items).map(i => ({ kind: i.kind, type: i.type })),\r\n types: event.dataTransfer.types\r\n } : null,\r\n };\r\n}\r\n\r\nfunction isTimeBasedInput(element: Element): element is HTMLInputElement {\r\n return timeBasedInputs.indexOf(element.getAttribute(\"type\")!) !== -1;\r\n}\r\n\r\nconst timeBasedInputs = [\"date\", \"datetime-local\", \"month\", \"time\", \"week\"];\r\n\r\nfunction normalizeTimeBasedValue(element: HTMLInputElement): string {\r\n const value = element.value;\r\n const type = element.type;\r\n switch (type) {\r\n case \"date\":\r\n case \"month\":\r\n return value;\r\n case \"datetime-local\":\r\n return value.length === 16 ? value + \":00\" : value; // Convert yyyy-MM-ddTHH:mm to yyyy-MM-ddTHH:mm:00\r\n case \"time\":\r\n return value.length === 5 ? value + \":00\" : value; // Convert hh:mm to hh:mm:00\r\n case \"week\":\r\n // For now we are not going to normalize input type week as it is not trivial\r\n return value;\r\n }\r\n\r\n throw new Error(`Invalid element type '${type}'.`);\r\n}\r\n\r\nfunction isMultipleSelectInput(element: Element): element is HTMLSelectElement {\r\n return (\r\n element instanceof HTMLSelectElement && element.type === \"select-multiple\"\r\n );\r\n}\r\n\r\nfunction isCheckbox(element: Element | null): boolean {\r\n return (\r\n !!element &&\r\n element.tagName === \"INPUT\" &&\r\n element.getAttribute(\"type\") === \"checkbox\"\r\n );\r\n}\r\n","import { getEventTarget } from \"../utils/helper\";\r\nimport { parseDragEvent, parseMouseEvent, parseTouchEvent } from \"./EventType\";\r\n\r\nexport function registerExtraMouseEvent(eventType: string, eventName: string) {\r\n if (Blazor) {\r\n Blazor.registerCustomEventType(eventType, {\r\n browserEventName: eventName,\r\n createEventArgs: e => createSharedEventArgs(\"mouse\", e)\r\n })\r\n }\r\n}\r\n\r\nexport function registerExtraTouchEvent(eventType: string, eventName: string) {\r\n if (Blazor) {\r\n Blazor.registerCustomEventType(eventType, {\r\n browserEventName: eventName,\r\n createEventArgs: e => createSharedEventArgs(\"touch\", e)\r\n })\r\n }\r\n}\r\n\r\nexport function registerExtraDropEvent(eventType: string, eventName: string) {\r\n if (Blazor) {\r\n Blazor.registerCustomEventType(eventType, {\r\n browserEventName: eventName,\r\n createEventArgs: (e: DragEvent) => {\r\n const eventArgs = parseDragEvent(e);\r\n const value = e.dataTransfer.getData('data-value');\r\n const offsetX = e.dataTransfer.getData('offsetX');\r\n const offsetY = e.dataTransfer.getData('offsetY');\r\n\r\n eventArgs.dataTransfer['data'] = {\r\n value,\r\n offsetX: Number(offsetX),\r\n offsetY: Number(offsetY)\r\n }\r\n\r\n return eventArgs;\r\n }\r\n })\r\n }\r\n}\r\n\r\nexport function createSharedEventArgs(type: \"mouse\" | \"touch\", e: Event,) {\r\n let args = { target: {} }\r\n if (type === 'mouse') {\r\n args = {\r\n ...args,\r\n ...parseMouseEvent(e as MouseEvent)\r\n }\r\n } else if (type === 'touch') {\r\n args = {\r\n ...args,\r\n ...parseTouchEvent(e as TouchEvent)\r\n }\r\n }\r\n\r\n args.target = getEventTarget(e.target);\r\n\r\n return args;\r\n}","import { createSharedEventArgs } from \"events/extra\";\r\nimport { addOnceEventListener, passiveSupported } from \"utils/helper\";\r\n\r\nlet sliderHandleId = 0;\r\nconst sliderHandlesById = {};\r\n\r\nexport function registerSliderEvents(\r\n el: HTMLElement,\r\n dotnetHelper: DotNet.DotNetObject\r\n) {\r\n sliderHandlesById[sliderHandleId] = onSliderMouseDown;\r\n\r\n const app = document.querySelector(\"[data-app]\");\r\n\r\n const mouseUpOptions = passiveSupported\r\n ? { passive: true, capture: true }\r\n : true;\r\n\r\n const mouseMoveOptions = passiveSupported ? { passive: true } : false;\r\n\r\n el.addEventListener(\"mousedown\", onSliderMouseDown);\r\n el.addEventListener(\"touchstart\", onSliderMouseDown);\r\n\r\n return sliderHandleId++;\r\n\r\n async function onSliderMouseDown(e: MouseEvent | TouchEvent) {\r\n const isTouchEvent = \"touches\" in e;\r\n\r\n onMouseMove(e);\r\n\r\n app.addEventListener(\r\n isTouchEvent ? \"touchmove\" : \"mousemove\",\r\n onMouseMove,\r\n mouseMoveOptions\r\n );\r\n addOnceEventListener(\r\n app,\r\n isTouchEvent ? \"touchend\" : \"mouseup\",\r\n onSliderMouseUp,\r\n mouseUpOptions\r\n );\r\n\r\n if (isTouchEvent) {\r\n await dotnetHelper.invokeMethodAsync(\r\n \"OnTouchStartInternal\",\r\n createSharedEventArgs(\"touch\", e)\r\n );\r\n } else {\r\n await dotnetHelper.invokeMethodAsync(\r\n \"OnMouseDownInternal\",\r\n createSharedEventArgs(\"mouse\", e)\r\n );\r\n }\r\n }\r\n\r\n async function onSliderMouseUp(e: Event) {\r\n e.stopPropagation();\r\n\r\n app.removeEventListener(\"touchmove\", onMouseMove, mouseMoveOptions as any);\r\n app.removeEventListener(\"mousemove\", onMouseMove, mouseMoveOptions as any);\r\n\r\n await dotnetHelper.invokeMethodAsync(\"OnMouseUpInternal\");\r\n }\r\n\r\n async function onMouseMove(e: MouseEvent | TouchEvent) {\r\n const isTouchEvent = \"touches\" in e;\r\n const payload = {\r\n type: e.type,\r\n clientX: isTouchEvent ? e.touches[0].clientX : e.clientX,\r\n clientY: isTouchEvent ? e.touches[0].clientY : e.clientY,\r\n };\r\n\r\n await dotnetHelper.invokeMethodAsync(\"OnMouseMoveInternal\", payload);\r\n }\r\n}\r\n\r\nexport function unregisterSliderEvents(el: HTMLElement, id: number) {\r\n if (el) {\r\n const onSliderMouseDown = sliderHandlesById[id];\r\n el.removeEventListener(\"mousedown\", onSliderMouseDown);\r\n el.removeEventListener(\"touchstart\", onSliderMouseDown);\r\n\r\n delete sliderHandlesById[id];\r\n }\r\n}\r\n","\r\nlet textareaAutoGrowNextId = 0;\r\nconst textareaAutoGrowMap: {\r\n [prop: string]: (e: HTMLElementEventMap['input']) => void;\r\n} = {}\r\n\r\nexport function registerTextareaAutoGrowEvent(input: HTMLElement) {\r\n const id = textareaAutoGrowNextId;\r\n const inputCallback = (e: HTMLElementEventMap['input']) => {\r\n const target = e.target as HTMLTextAreaElement;\r\n const autoGrow = target.getAttribute('data-auto-grow');\r\n if (autoGrow === undefined) {\r\n return;\r\n }\r\n const rows = target.getAttribute('rows');\r\n const rowHeight = target.getAttribute('data-row-height');\r\n calculateTextareaHeight(target, rows, rowHeight)\r\n };\r\n\r\n textareaAutoGrowMap[id] = inputCallback;\r\n\r\n input.addEventListener('input', inputCallback)\r\n\r\n return textareaAutoGrowNextId++;\r\n}\r\n\r\nexport function unregisterTextareaAutoGrowEvent(input: HTMLElement, textareaAutoGrowNextId: number) {\r\n if (!input) return;\r\n const inputCallback = textareaAutoGrowMap[textareaAutoGrowNextId];\r\n if (inputCallback) {\r\n input.removeEventListener('input', inputCallback);\r\n }\r\n}\r\n\r\nexport function calculateTextareaHeight(textarea: HTMLTextAreaElement, rows: string, rowHeight: string) {\r\n textarea.style.height = '0'\r\n const height = textarea.scrollHeight;\r\n const minHeight = parseInt(rows, 10) * parseFloat(rowHeight);\r\n textarea.style.height = Math.max(height, minHeight) + 'px';\r\n}","var functionDebounce = debounce;\n\nfunction debounce(fn, wait, callFirst) {\n var timeout = null;\n var debouncedFn = null;\n\n var clear = function() {\n if (timeout) {\n clearTimeout(timeout);\n\n debouncedFn = null;\n timeout = null;\n }\n };\n\n var flush = function() {\n var call = debouncedFn;\n clear();\n\n if (call) {\n call();\n }\n };\n\n var debounceWrapper = function() {\n if (!wait) {\n return fn.apply(this, arguments);\n }\n\n var context = this;\n var args = arguments;\n var callNow = callFirst && !timeout;\n clear();\n\n debouncedFn = function() {\n fn.apply(context, args);\n };\n\n timeout = setTimeout(function() {\n timeout = null;\n\n if (!callNow) {\n var call = debouncedFn;\n debouncedFn = null;\n\n return call();\n }\n }, wait);\n\n if (callNow) {\n return debouncedFn();\n }\n };\n\n debounceWrapper.cancel = clear;\n debounceWrapper.flush = flush;\n\n return debounceWrapper;\n}\n\nexport {functionDebounce as default};\n","var functionThrottle = throttle;\n\nfunction throttle(fn, interval, options) {\n var timeoutId = null;\n var throttledFn = null;\n var leading = (options && options.leading);\n var trailing = (options && options.trailing);\n\n if (leading == null) {\n leading = true; // default\n }\n\n if (trailing == null) {\n trailing = !leading; //default\n }\n\n if (leading == true) {\n trailing = false; // forced because there should be invocation per call\n }\n\n var cancel = function() {\n if (timeoutId) {\n clearTimeout(timeoutId);\n timeoutId = null;\n }\n };\n\n var flush = function() {\n var call = throttledFn;\n cancel();\n\n if (call) {\n call();\n }\n };\n\n var throttleWrapper = function() {\n var callNow = leading && !timeoutId;\n var context = this;\n var args = arguments;\n\n throttledFn = function() {\n return fn.apply(context, args);\n };\n\n if (!timeoutId) {\n timeoutId = setTimeout(function() {\n timeoutId = null;\n\n if (trailing) {\n return throttledFn();\n }\n }, interval);\n }\n\n if (callNow) {\n callNow = false;\n return throttledFn();\n }\n };\n\n throttleWrapper.cancel = cancel;\n throttleWrapper.flush = flush;\n\n return throttleWrapper;\n}\n\nexport {functionThrottle as default};\n","import { parseMouseEvent } from \"./EventType\";\r\nimport { registerExtraDropEvent, registerExtraMouseEvent, registerExtraTouchEvent } from \"./extra\";\r\n\r\nexport function registerExtraEvents() {\r\n registerExtraMouseEvent(\"exmousedown\", \"mousedown\");\r\n registerExtraMouseEvent(\"exmouseup\", \"mouseup\");\r\n registerExtraMouseEvent(\"exclick\", \"click\");\r\n registerExtraMouseEvent(\"exmouseleave\", \"mouseleave\");\r\n registerExtraMouseEvent(\"exmouseenter\", \"mouseenter\");\r\n registerExtraMouseEvent(\"exmousemove\", \"mousemove\");\r\n registerExtraTouchEvent(\"extouchstart\", \"touchstart\");\r\n registerEvent(\"transitionend\", \"transitionend\");\r\n registerExtraDropEvent(\"exdrop\", \"drop\");\r\n registerAuxclickEvent();\r\n}\r\n\r\nfunction registerEvent(eventType: string, eventName: string) {\r\n if (Blazor) {\r\n Blazor.registerCustomEventType(eventType, {\r\n browserEventName: eventName,\r\n });\r\n }\r\n}\r\n\r\nfunction registerAuxclickEvent() {\r\n if (Blazor) {\r\n Blazor.registerCustomEventType(\"auxclick\", {\r\n browserEventName: \"auxclick\",\r\n createEventArgs: parseMouseEvent\r\n });\r\n }\r\n}\r\n","import { keyCodes } from \"utils/helper\";\r\n\r\ntype RippleEvent = (MouseEvent | TouchEvent | KeyboardEvent) & {\r\n rippleStop?: boolean;\r\n};\r\n\r\nconst DELAY_RIPPLE = 80;\r\n\r\nfunction transform(el: HTMLElement, value: string) {\r\n el.style.transform = value;\r\n el.style.webkitTransform = value;\r\n}\r\n\r\nexport interface RippleOptions {\r\n class?: string;\r\n center?: boolean;\r\n circle?: boolean;\r\n}\r\n\r\nfunction isTouchEvent(e: RippleEvent): e is TouchEvent {\r\n return e.constructor.name === \"TouchEvent\";\r\n}\r\n\r\nfunction isKeyboardEvent(e: RippleEvent): e is KeyboardEvent {\r\n return e.constructor.name === \"KeyboardEvent\";\r\n}\r\n\r\nconst calculate = (\r\n e: RippleEvent,\r\n el: HTMLElement,\r\n value: RippleOptions = {}\r\n) => {\r\n let localX = 0;\r\n let localY = 0;\r\n\r\n if (!isKeyboardEvent(e)) {\r\n const offset = el.getBoundingClientRect();\r\n const target = isTouchEvent(e) ? e.touches[e.touches.length - 1] : e;\r\n\r\n localX = target.clientX - offset.left;\r\n localY = target.clientY - offset.top;\r\n }\r\n\r\n let radius = 0;\r\n let scale = 0.3;\r\n if (el._ripple && el._ripple.circle) {\r\n scale = 0.15;\r\n radius = el.clientWidth / 2;\r\n radius = value.center\r\n ? radius\r\n : radius + Math.sqrt((localX - radius) ** 2 + (localY - radius) ** 2) / 4;\r\n } else {\r\n radius = Math.sqrt(el.clientWidth ** 2 + el.clientHeight ** 2) / 2;\r\n }\r\n\r\n const centerX = `${(el.clientWidth - radius * 2) / 2}px`;\r\n const centerY = `${(el.clientHeight - radius * 2) / 2}px`;\r\n\r\n const x = value.center ? centerX : `${localX - radius}px`;\r\n const y = value.center ? centerY : `${localY - radius}px`;\r\n\r\n return { radius, scale, x, y, centerX, centerY };\r\n};\r\n\r\nconst ripples = {\r\n /* eslint-disable max-statements */\r\n show(e: RippleEvent, el: HTMLElement, value: RippleOptions = {}) {\r\n if (!el._ripple || !el._ripple.enabled) {\r\n return;\r\n }\r\n\r\n const container = document.createElement(\"span\");\r\n const animation = document.createElement(\"span\");\r\n\r\n container.appendChild(animation);\r\n container.className = \"m-ripple__container\";\r\n\r\n if (value.class) {\r\n container.className += ` ${value.class}`;\r\n }\r\n\r\n const { radius, scale, x, y, centerX, centerY } = calculate(e, el, value);\r\n\r\n const size = `${radius * 2}px`;\r\n animation.className = \"m-ripple__animation\";\r\n animation.style.width = size;\r\n animation.style.height = size;\r\n\r\n el.appendChild(container);\r\n\r\n const computed = window.getComputedStyle(el);\r\n if (computed && computed.position === \"static\") {\r\n el.style.position = \"relative\";\r\n el.dataset.previousPosition = \"static\";\r\n }\r\n\r\n animation.classList.add(\"m-ripple__animation--enter\");\r\n animation.classList.add(\"m-ripple__animation--visible\");\r\n transform(\r\n animation,\r\n `translate(${x}, ${y}) scale3d(${scale},${scale},${scale})`\r\n );\r\n animation.dataset.activated = String(performance.now());\r\n\r\n setTimeout(() => {\r\n animation.classList.remove(\"m-ripple__animation--enter\");\r\n animation.classList.add(\"m-ripple__animation--in\");\r\n transform(animation, `translate(${centerX}, ${centerY}) scale3d(1,1,1)`);\r\n }, 0);\r\n },\r\n\r\n hide(el: HTMLElement | null) {\r\n if (!el || !el._ripple || !el._ripple.enabled) return;\r\n\r\n const ripples = el.getElementsByClassName(\"m-ripple__animation\");\r\n\r\n if (ripples.length === 0) return;\r\n const animation = ripples[ripples.length - 1];\r\n\r\n if (animation.dataset.isHiding) return;\r\n else animation.dataset.isHiding = \"true\";\r\n\r\n const diff = performance.now() - Number(animation.dataset.activated);\r\n const delay = Math.max(250 - diff, 0);\r\n\r\n setTimeout(() => {\r\n animation.classList.remove(\"m-ripple__animation--in\");\r\n animation.classList.add(\"m-ripple__animation--out\");\r\n\r\n setTimeout(() => {\r\n const ripples = el.getElementsByClassName(\"m-ripple__animation\");\r\n if (ripples.length === 1 && el.dataset.previousPosition) {\r\n el.style.position = el.dataset.previousPosition;\r\n delete el.dataset.previousPosition;\r\n }\r\n\r\n if (animation.parentNode?.parentNode === el)\r\n el.removeChild(animation.parentNode);\r\n }, 300);\r\n }, delay);\r\n },\r\n};\r\n\r\nfunction rippleShow(e: RippleEvent) {\r\n const value: RippleOptions = {};\r\n const element = e.currentTarget as HTMLElement;\r\n\r\n if (!element || !element._ripple || element._ripple.touched || e.rippleStop)\r\n return;\r\n\r\n // Don't allow the event to trigger ripples on any other elements\r\n e.rippleStop = true;\r\n\r\n if (isTouchEvent(e)) {\r\n element._ripple.touched = true;\r\n element._ripple.isTouch = true;\r\n } else {\r\n // It's possible for touch events to fire\r\n // as mouse events on Android/iOS, this\r\n // will skip the event call if it has\r\n // already been registered as touch\r\n if (element._ripple.isTouch) return;\r\n }\r\n value.center = element._ripple.centered || isKeyboardEvent(e);\r\n if (element._ripple.class) {\r\n value.class = element._ripple.class;\r\n }\r\n\r\n if (isTouchEvent(e)) {\r\n // already queued that shows or hides the ripple\r\n if (element._ripple.showTimerCommit) return;\r\n\r\n element._ripple.showTimerCommit = () => {\r\n ripples.show(e, element, value);\r\n };\r\n element._ripple.showTimer = window.setTimeout(() => {\r\n if (element && element._ripple && element._ripple.showTimerCommit) {\r\n element._ripple.showTimerCommit();\r\n element._ripple.showTimerCommit = null;\r\n }\r\n }, DELAY_RIPPLE);\r\n } else {\r\n ripples.show(e, element, value);\r\n }\r\n}\r\n\r\nfunction rippleHide(e: Event) {\r\n const element = e.currentTarget as HTMLElement | null;\r\n if (!element || !element._ripple) return;\r\n\r\n window.clearTimeout(element._ripple.showTimer);\r\n\r\n // The touch interaction occurs before the show timer is triggered.\r\n // We still want to show ripple effect.\r\n if (e.type === \"touchend\" && element._ripple.showTimerCommit) {\r\n element._ripple.showTimerCommit();\r\n element._ripple.showTimerCommit = null;\r\n\r\n // re-queue ripple hiding\r\n var timerHandler: TimerHandler = () => rippleHide(e);\r\n element._ripple.showTimer = setTimeout(timerHandler);\r\n return;\r\n }\r\n\r\n window.setTimeout(() => {\r\n if (element._ripple) {\r\n element._ripple.touched = false;\r\n }\r\n });\r\n ripples.hide(element);\r\n}\r\n\r\nfunction rippleCancelShow(e: MouseEvent | TouchEvent) {\r\n const element = e.currentTarget as HTMLElement | undefined;\r\n\r\n if (!element || !element._ripple) return;\r\n\r\n if (element._ripple.showTimerCommit) {\r\n element._ripple.showTimerCommit = null;\r\n }\r\n\r\n window.clearTimeout(element._ripple.showTimer);\r\n}\r\n\r\nfunction keyboardRippleShow(e: KeyboardEvent) {\r\n const target = e.currentTarget as HTMLElement;\r\n if (\r\n !target[\"keyboardRipple\"] &&\r\n (e.keyCode === keyCodes.enter || e.keyCode === keyCodes.space)\r\n ) {\r\n target[\"keyboardRipple\"] = true;\r\n rippleShow(e);\r\n }\r\n}\r\n\r\nfunction keyboardRippleHide(e: KeyboardEvent) {\r\n const target = e.currentTarget as HTMLElement;\r\n target[\"keyboardRipple\"] = false;\r\n rippleHide(e);\r\n}\r\n\r\nfunction focusRippleHide(e: FocusEvent) {\r\n const target = e.currentTarget as HTMLElement;\r\n if (target[\"keyboardRipple\"] === true) {\r\n target[\"keyboardRipple\"] = false;\r\n rippleHide(e);\r\n }\r\n}\r\nexport function updateRipple(\r\n el: HTMLElement,\r\n options: RippleOptions | null,\r\n wasEnabled: boolean\r\n) {\r\n let enabled = false;\r\n if (options) {\r\n enabled = true;\r\n } else {\r\n ripples.hide(el);\r\n }\r\n\r\n const value = options || {};\r\n el._ripple = el._ripple || {};\r\n el._ripple.enabled = enabled;\r\n el._ripple = {\r\n ...el._ripple,\r\n centered: value.center,\r\n class: value.class,\r\n circle: value.circle,\r\n };\r\n\r\n if (enabled && !wasEnabled) {\r\n el.addEventListener(\"touchstart\", rippleShow, { passive: true });\r\n el.addEventListener(\"touchend\", rippleHide, { passive: true });\r\n el.addEventListener(\"touchmove\", rippleCancelShow, { passive: true });\r\n el.addEventListener(\"touchcancel\", rippleHide);\r\n\r\n el.addEventListener(\"mousedown\", rippleShow);\r\n el.addEventListener(\"mouseup\", rippleHide);\r\n el.addEventListener(\"mouseleave\", rippleHide);\r\n\r\n el.addEventListener(\"keydown\", keyboardRippleShow);\r\n el.addEventListener(\"keyup\", keyboardRippleHide);\r\n\r\n el.addEventListener(\"blur\", focusRippleHide);\r\n\r\n // Anchor tags can be dragged, causes other hides to fail - #1537\r\n el.addEventListener(\"dragstart\", rippleHide, { passive: true });\r\n } else if (!enabled && wasEnabled) {\r\n removeListeners(el);\r\n }\r\n}\r\n\r\nexport function removeListeners(el: HTMLElement) {\r\n el.removeEventListener(\"mousedown\", rippleShow);\r\n el.removeEventListener(\"touchstart\", rippleShow);\r\n el.removeEventListener(\"touchend\", rippleHide);\r\n el.removeEventListener(\"touchmove\", rippleCancelShow);\r\n el.removeEventListener(\"touchcancel\", rippleHide);\r\n el.removeEventListener(\"mouseup\", rippleHide);\r\n el.removeEventListener(\"mouseleave\", rippleHide);\r\n el.removeEventListener(\"keydown\", keyboardRippleShow);\r\n el.removeEventListener(\"keyup\", keyboardRippleHide);\r\n el.removeEventListener(\"dragstart\", rippleHide);\r\n el.removeEventListener(\"blur\", focusRippleHide);\r\n el._ripple.enabled = false;\r\n}\r\n","import debounceIt from \"just-debounce-it\";\r\nimport throttle from \"just-throttle\";\r\n\r\nimport { parseDragEvent, parseTouchEvent, touchEvents } from \"./events/EventType\";\r\nimport { registerExtraEvents } from \"./events/index\";\r\nimport registerRippleObserver from \"./ripple\";\r\nimport { canUseDom, getBlazorId, getDom, getElementSelector } from \"./utils/helper\";\r\n\r\nwindow.onload = function () {\r\n registerExtraEvents();\r\n registerPasteWithData(\"pastewithdata\")\r\n registerRippleObserver();\r\n}\r\n\r\nexport function getZIndex(el?: Element | null): number {\r\n if (!el || el.nodeType !== Node.ELEMENT_NODE) return 0\r\n\r\n const index = +window.getComputedStyle(el).getPropertyValue('z-index')\r\n\r\n if (!index) return getZIndex(el.parentNode as Element)\r\n return index\r\n}\r\n\r\nexport function getDomInfo(element, selector = \"body\") {\r\n var result = {};\r\n\r\n var dom = getDom(element);\r\n\r\n if (dom) {\r\n if (dom.style && dom.style[\"display\"] === \"none\") {\r\n // clone and set display not none because\r\n // element with display:none can not get the dom info\r\n var cloned = dom.cloneNode(true) as HTMLElement;\r\n cloned.style[\"display\"] = \"inline-block\";\r\n cloned.style[\"z-index\"] = -1000;\r\n dom.parentElement.appendChild(cloned);\r\n\r\n result = getDomInfoObj(cloned);\r\n\r\n dom.parentElement.removeChild(cloned);\r\n } else {\r\n result = getDomInfoObj(dom);\r\n }\r\n }\r\n\r\n return result;\r\n}\r\n\r\nfunction getDomInfoObj(dom: HTMLElement) {\r\n var result = {};\r\n result[\"offsetTop\"] = dom.offsetTop || 0;\r\n result[\"offsetLeft\"] = dom.offsetLeft || 0;\r\n result[\"scrollHeight\"] = dom.scrollHeight || 0;\r\n result[\"scrollWidth\"] = dom.scrollWidth || 0;\r\n result[\"scrollLeft\"] = dom.scrollLeft || 0;\r\n result[\"scrollTop\"] = dom.scrollTop || 0;\r\n result[\"clientTop\"] = dom.clientTop || 0;\r\n result[\"clientLeft\"] = dom.clientLeft || 0;\r\n result[\"clientHeight\"] = dom.clientHeight || 0;\r\n result[\"clientWidth\"] = dom.clientWidth || 0;\r\n var position = getElementPos(dom);\r\n result[\"offsetWidth\"] = Math.round(position.offsetWidth) || 0;\r\n result[\"offsetHeight\"] = Math.round(position.offsetHeight) || 0;\r\n result[\"relativeTop\"] = Math.round(position.relativeTop) || 0;\r\n result[\"relativeBottom\"] = Math.round(position.relativeBottom) || 0;\r\n result[\"relativeLeft\"] = Math.round(position.relativeLeft) || 0;\r\n result[\"relativeRight\"] = Math.round(position.relativeRight) || 0;\r\n result[\"absoluteLeft\"] = Math.round(position.absoluteLeft) || 0;\r\n result[\"absoluteTop\"] = Math.round(position.absoluteTop) || 0;\r\n return result;\r\n}\r\n\r\nfunction getElementPos(element) {\r\n var res: any = new Object();\r\n res.x = 0;\r\n res.y = 0;\r\n if (element !== null) {\r\n if (element.getBoundingClientRect) {\r\n var viewportElement = document.documentElement;\r\n var box = element.getBoundingClientRect();\r\n var scrollLeft = viewportElement.scrollLeft;\r\n var scrollTop = viewportElement.scrollTop;\r\n\r\n res.offsetWidth = box.width;\r\n res.offsetHeight = box.height;\r\n res.relativeTop = box.top;\r\n res.relativeBottom = box.bottom;\r\n res.relativeLeft = box.left;\r\n res.relativeRight = box.right;\r\n res.absoluteLeft = box.left + scrollLeft;\r\n res.absoluteTop = box.top + scrollTop;\r\n }\r\n }\r\n return res;\r\n}\r\n\r\nexport function getParentClientWidthOrWindowInnerWidth(element: HTMLElement) {\r\n return element.parentElement ? element.parentElement.clientWidth : window.innerWidth;\r\n}\r\n\r\nexport function triggerEvent(elOrString, eventName: string, eventType: string, stopPropagation: boolean) {\r\n var dom = getDom(elOrString);\r\n var evt = document.createEvent(eventName);\r\n evt.initEvent(eventType);\r\n\r\n if (stopPropagation) {\r\n evt.stopPropagation();\r\n }\r\n\r\n return dom.dispatchEvent(evt);\r\n}\r\n\r\nexport function setProperty(elOrString, name, value) {\r\n var dom = getDom(elOrString);\r\n dom[name] = value;\r\n}\r\n\r\nexport function getBoundingClientRect(elOrString, attach = \"body\") {\r\n let dom = getDom(elOrString);\r\n\r\n var result = {};\r\n\r\n if (dom && dom.getBoundingClientRect) {\r\n if (dom.style && dom.style[\"display\"] === \"none\") {\r\n var cloned = dom.cloneNode(true) as HTMLElement;\r\n cloned.style[\"display\"] = \"inline-block\";\r\n cloned.style[\"z-index\"] = -1000;\r\n document.querySelector(attach)?.appendChild(cloned);\r\n\r\n result = cloned.getBoundingClientRect();\r\n\r\n document.querySelector(attach)?.removeChild(cloned);\r\n } else {\r\n result = dom.getBoundingClientRect();\r\n }\r\n }\r\n\r\n return result;\r\n}\r\n\r\nvar htmlElementEventListenerConfigs: { [prop: string]: HtmlElementEventListenerConfig[] } = {}\r\n\r\ntype HtmlElementEventListenerConfig = {\r\n listener?: (args: any) => void;\r\n options?: any;\r\n handle?: DotNet.DotNetObject;\r\n}\r\n\r\nexport function addHtmlElementEventListener(\r\n selector: \"window\" | \"document\" | K,\r\n type: string,\r\n invoker: DotNet.DotNetObject,\r\n options?: boolean | AddEventListenerOptions,\r\n extras?: Partial> & { relatedTarget?: string, throttle?: number, debounce?: number, key?: string }) {\r\n let htmlElement: HTMLElement | Window\r\n\r\n if (selector == \"window\") {\r\n htmlElement = window;\r\n } else if (selector == \"document\") {\r\n htmlElement = document.documentElement;\r\n } else {\r\n htmlElement = document.querySelector(selector);\r\n }\r\n\r\n if (!htmlElement) {\r\n // throw new Error(\"Unable to find the element.\");\r\n return false;\r\n }\r\n\r\n var key = extras?.key || `${selector}:${type}`;\r\n\r\n //save for remove\r\n const config: HtmlElementEventListenerConfig = {};\r\n\r\n var listener = (e: any): void => {\r\n if (extras?.stopPropagation) {\r\n e.stopPropagation();\r\n }\r\n\r\n if ((typeof e.cancelable !== \"boolean\" || e.cancelable) && extras?.preventDefault) {\r\n e.preventDefault();\r\n }\r\n\r\n // mouseleave relatedTarget\r\n if (extras?.relatedTarget && document.querySelector(extras.relatedTarget)?.contains(e.relatedTarget)) {\r\n return;\r\n }\r\n\r\n let obj: any = {}\r\n\r\n if (touchEvents.includes(e.type)) {\r\n obj = parseTouchEvent(e)\r\n } else {\r\n for (var k in e) {\r\n if (typeof e[k] == 'string' || typeof e[k] == 'number') {\r\n obj[k] = e[k];\r\n }\r\n }\r\n }\r\n\r\n if (e.target && e.target !== window && e.target !== document) {\r\n obj.target = {}\r\n const target = e.target as HTMLElement;\r\n const elementReferenceId = target.getAttributeNames().find(a => a.startsWith('_bl_'));\r\n if (elementReferenceId) {\r\n obj.target['elementReferenceId'] = elementReferenceId\r\n obj.target['selector'] = `[${elementReferenceId}]`\r\n } else {\r\n obj.target['selector'] = getElementSelector(target)\r\n }\r\n\r\n obj.target['class'] = target.getAttribute('class')\r\n }\r\n\r\n invoker.invokeMethodAsync('Invoke', obj);\r\n };\r\n\r\n if (extras?.debounce && extras.debounce > 0) {\r\n config.listener = debounceIt(listener, extras.debounce)\r\n } else if (extras?.throttle && extras.throttle > 0) {\r\n config.listener = throttle(listener, extras.throttle, { trailing: true })\r\n } else {\r\n config.listener = listener;\r\n }\r\n\r\n config.options = options;\r\n config.handle = invoker\r\n\r\n if (htmlElementEventListenerConfigs[key]) {\r\n htmlElementEventListenerConfigs[key].push(config);\r\n } else {\r\n htmlElementEventListenerConfigs[key] = [config]\r\n }\r\n\r\n htmlElement.addEventListener(type, config.listener, config.options);\r\n\r\n return true;\r\n}\r\n\r\nexport function removeHtmlElementEventListener(selector, type, k?: string) {\r\n let htmlElement: any\r\n\r\n if (selector == \"window\") {\r\n htmlElement = window;\r\n } else if (selector == \"document\") {\r\n htmlElement = document.documentElement;\r\n } else {\r\n htmlElement = document.querySelector(selector);\r\n }\r\n\r\n var k = k || `${selector}:${type}`;\r\n\r\n var configs = htmlElementEventListenerConfigs[k];\r\n\r\n if (configs) {\r\n configs.forEach(item => {\r\n item.handle.dispose();\r\n htmlElement?.removeEventListener(type, item.listener, item.options);\r\n });\r\n\r\n htmlElementEventListenerConfigs[k] = []\r\n }\r\n}\r\n\r\nexport function addMouseleaveEventListener(selector) {\r\n var htmlElement = document.querySelector(selector);\r\n if (htmlElement) {\r\n htmlElement.addEventListener()\r\n }\r\n}\r\n\r\nexport function contains(e1, e2) {\r\n const dom1 = getDom(e1);\r\n if (dom1 && dom1.contains) {\r\n return dom1.contains(getDom(e2));\r\n }\r\n return false;\r\n}\r\n\r\nexport function equalsOrContains(e1: any, e2: any) {\r\n const dom1 = getDom(e1);\r\n const dom2 = getDom(e2);\r\n return !!dom1 && dom1.contains && !!dom2 && (dom1 == dom2 || dom1.contains(dom2));\r\n}\r\n\r\nfunction fallbackCopyTextToClipboard(text) {\r\n var textArea = document.createElement(\"textarea\");\r\n textArea.value = text;\r\n\r\n // Avoid scrolling to bottom\r\n textArea.style.top = \"0\";\r\n textArea.style.left = \"0\";\r\n textArea.style.position = \"fixed\";\r\n\r\n document.body.appendChild(textArea);\r\n textArea.focus();\r\n textArea.select();\r\n\r\n try {\r\n var successful = document.execCommand('copy');\r\n var msg = successful ? 'successful' : 'unsuccessful';\r\n console.log('Fallback: Copying text command was ' + msg);\r\n } catch (err) {\r\n console.error('Fallback: Oops, unable to copy', err);\r\n }\r\n\r\n document.body.removeChild(textArea);\r\n}\r\n\r\nexport function copy(text) {\r\n if (!navigator.clipboard) {\r\n fallbackCopyTextToClipboard(text);\r\n return;\r\n }\r\n navigator.clipboard.writeText(text).then(function () {\r\n console.log('Async: Copying to clipboard was successful!');\r\n }, function (err) {\r\n console.error('Async: Could not copy text: ', err);\r\n });\r\n}\r\n\r\nexport function focus(elOrString, preventScroll: boolean = false) {\r\n let dom = getDom(elOrString);\r\n if (!(dom instanceof HTMLElement)) {\r\n console.error(\"Unable to focus an invalid element\");\r\n } else {\r\n dom.focus({ preventScroll });\r\n }\r\n}\r\n\r\nexport function select(elOrString) {\r\n let dom = getDom(elOrString);\r\n if (!(dom instanceof HTMLInputElement || dom instanceof HTMLTextAreaElement))\r\n throw new Error(\"Unable to select an invalid element\")\r\n dom.select()\r\n}\r\n\r\nexport function hasFocus(selector) {\r\n let dom = getDom(selector);\r\n return (document.activeElement === dom);\r\n}\r\n\r\nexport function blur(selector) {\r\n let dom = getDom(selector);\r\n dom.blur();\r\n}\r\n\r\nexport function log(text) {\r\n console.log(text);\r\n}\r\n\r\nexport function scrollIntoView(target, arg?: boolean | ScrollIntoViewOptions) {\r\n let dom = getDom(target);\r\n if (dom instanceof HTMLElement) {\r\n if (arg === null || arg == undefined) {\r\n dom.scrollIntoView();\r\n } else if (typeof arg === 'boolean') {\r\n dom.scrollIntoView(arg);\r\n } else {\r\n dom.scrollIntoView({\r\n block: arg.block == null ? undefined : arg.block,\r\n inline: arg.inline == null ? undefined : arg.inline,\r\n behavior: arg.behavior\r\n })\r\n }\r\n }\r\n}\r\n\r\nexport function scrollIntoParentView(\r\n target,\r\n inline = false,\r\n start = false,\r\n level = 1,\r\n behavior: ScrollBehavior = \"smooth\",\r\n) {\r\n const dom = getDom(target);\r\n if (dom instanceof HTMLElement) {\r\n let parent: HTMLElement = dom;\r\n while (level > 0) {\r\n parent = parent.parentElement;\r\n level--;\r\n if (!parent) {\r\n return;\r\n }\r\n }\r\n\r\n const options: ScrollToOptions = {\r\n behavior,\r\n };\r\n\r\n if (inline) {\r\n if (start) {\r\n options.left = dom.offsetLeft\r\n } else {\r\n const to = dom.offsetLeft - parent.offsetLeft;\r\n if (to - parent.scrollLeft < 0) {\r\n options.left = to;\r\n } else if (\r\n to + dom.offsetWidth - parent.scrollLeft >\r\n parent.offsetWidth\r\n ) {\r\n options.left = to + dom.offsetWidth - parent.offsetWidth;\r\n }\r\n }\r\n } else {\r\n if (start) {\r\n options.top = dom.offsetTop;\r\n } else {\r\n const to = dom.offsetTop - parent.offsetTop;\r\n if (to - parent.scrollTop < 0) {\r\n options.top = to;\r\n } else if (\r\n to + dom.offsetHeight - parent.scrollTop >\r\n parent.offsetHeight\r\n ) {\r\n options.top = to + dom.offsetHeight - parent.offsetHeight;\r\n }\r\n }\r\n }\r\n\r\n if (options.left || options.top) {\r\n parent.scrollTo(options);\r\n }\r\n }\r\n}\r\n\r\nexport function scrollTo(target, options: ScrollToOptions) {\r\n let dom = getDom(target);\r\n if (dom instanceof HTMLElement) {\r\n const o = {\r\n left: options.left === null ? undefined : options.left,\r\n top: options.top === null ? undefined : options.top,\r\n behavior: options.behavior\r\n }\r\n dom.scrollTo(o)\r\n }\r\n}\r\n\r\nexport function scrollToTarget(\r\n target: string,\r\n container: string = null,\r\n offset: number = 0\r\n) {\r\n const targetEl: HTMLElement = document.querySelector(target);\r\n if (targetEl) {\r\n let top ;\r\n if (container) {\r\n top = targetEl.offsetTop;\r\n } else {\r\n top = targetEl.getBoundingClientRect().top + window.scrollY;\r\n }\r\n const containerEl = container\r\n ? document.querySelector(container)\r\n : document.documentElement\r\n containerEl.scrollTo({\r\n top: top - offset,\r\n behavior: \"smooth\",\r\n });\r\n }\r\n}\r\n\r\nexport function scrollToElement(target, offset: number, behavior?: ScrollBehavior) {\r\n const dom = getDom(target)\r\n if (!dom) return;\r\n const domPosition = dom.getBoundingClientRect().top;\r\n const offsetPosition = domPosition + window.pageYOffset - offset;\r\n window.scrollTo({\r\n top: offsetPosition,\r\n behavior: behavior\r\n })\r\n}\r\n\r\nexport function scrollToActiveElement(\r\n container,\r\n element = \".active\",\r\n position: \"center\" | number = \"center\",\r\n smooth: boolean = false\r\n) {\r\n let containerEl: HTMLElement = getDom(container);\r\n\r\n let activeEl: HTMLElement\r\n if (typeof element === 'string') {\r\n activeEl = container.querySelector(element)\r\n }\r\n\r\n if (!containerEl || !activeEl) {\r\n return;\r\n }\r\n\r\n const top: number = position === 'center' ? activeEl.offsetTop - containerEl.offsetHeight / 2 + activeEl.offsetHeight / 2 : activeEl.offsetTop - position;\r\n\r\n containerEl.scrollTo({ top, behavior: smooth ? 'smooth' : 'auto' });\r\n}\r\n\r\nexport function addClsToFirstChild(element, className) {\r\n var dom = getDom(element);\r\n if (dom.firstElementChild) {\r\n dom.firstElementChild.classList.add(className);\r\n }\r\n}\r\n\r\nexport function removeClsFromFirstChild(element, className) {\r\n var dom = getDom(element);\r\n if (dom.firstElementChild) {\r\n dom.firstElementChild.classList.remove(className);\r\n }\r\n}\r\n\r\nexport function getAbsoluteTop(e) {\r\n var offset = e.offsetTop;\r\n if (e.offsetParent != null) {\r\n offset += getAbsoluteTop(e.offsetParent);\r\n }\r\n return offset;\r\n}\r\n\r\nexport function getAbsoluteLeft(e) {\r\n var offset = e.offsetLeft;\r\n if (e.offsetParent != null) {\r\n offset += getAbsoluteLeft(e.offsetParent);\r\n }\r\n return offset;\r\n}\r\n\r\nexport function addElementToBody(element) {\r\n document.body.appendChild(element);\r\n}\r\n\r\nexport function delElementFromBody(element) {\r\n document.body.removeChild(element);\r\n}\r\n\r\nexport function addElementTo(addElement, elementSelector) {\r\n let parent = getDom(elementSelector);\r\n if (parent && addElement) {\r\n parent.appendChild(addElement);\r\n }\r\n}\r\n\r\nexport function delElementFrom(delElement, elementSelector) {\r\n let parent = getDom(elementSelector);\r\n if (parent && delElement) {\r\n parent.removeChild(delElement);\r\n }\r\n}\r\n\r\nexport function getActiveElement() {\r\n let element = document.activeElement;\r\n let id = element.getAttribute(\"id\") || \"\";\r\n return id;\r\n}\r\n\r\nexport function focusDialog(selector: string, count: number = 0) {\r\n let ele = document.querySelector(selector);\r\n if (ele && !ele.hasAttribute(\"disabled\")) {\r\n setTimeout(() => {\r\n ele.focus();\r\n let curId = \"#\" + getActiveElement();\r\n if (curId !== selector) {\r\n if (count < 10) {\r\n focusDialog(selector, count + 1);\r\n }\r\n }\r\n }, 10);\r\n }\r\n}\r\n\r\nexport function getWindow() {\r\n return {\r\n innerWidth: window.innerWidth,\r\n innerHeight: window.innerHeight,\r\n pageXOffset: window.pageXOffset,\r\n pageYOffset: window.pageYOffset,\r\n isTop: window.scrollY == 0,\r\n isBottom: (window.scrollY + window.innerHeight) == document.body.clientHeight\r\n };\r\n}\r\n\r\nexport function getWindowAndDocumentProps(windowProps: string[] = [], documentProps: string[] = []) {\r\n const obj = {}\r\n\r\n if (windowProps) {\r\n windowProps.forEach(prop => obj[prop] = window[prop]);\r\n obj['pageYOffset'] = getPageYOffset();\r\n }\r\n\r\n if (documentProps) {\r\n documentProps.forEach(prop => obj[prop] = document.documentElement[prop]);\r\n }\r\n\r\n return obj\r\n}\r\n\r\nfunction debounce(func, wait, immediate) {\r\n var timeout;\r\n return () => {\r\n const context = this, args = arguments;\r\n const later = () => {\r\n timeout = null;\r\n if (!immediate) func.apply(this, args);\r\n };\r\n const callNow = immediate && !timeout;\r\n clearTimeout(timeout);\r\n timeout = setTimeout(later, wait);\r\n if (callNow) func.apply(context, args);\r\n };\r\n};\r\n\r\nexport function css(element: any, name: string | object, value: string | null = null) {\r\n var dom = getDom(element);\r\n if (typeof name === 'string') {\r\n dom.style[name] = value;\r\n } else {\r\n for (let key in name) {\r\n if (name.hasOwnProperty(key)) {\r\n dom.style[key] = name[key];\r\n }\r\n }\r\n }\r\n}\r\n\r\nexport function addCls(selector: Element | string, clsName: string | Array) {\r\n let element = getDom(selector);\r\n\r\n if (typeof clsName === \"string\") {\r\n element.classList.add(clsName);\r\n } else {\r\n element.classList.add(...clsName);\r\n }\r\n}\r\n\r\nexport function removeCls(selector: Element | string, clsName: string | Array) {\r\n let element = getDom(selector);\r\n\r\n if (typeof clsName === \"string\") {\r\n element.classList.remove(clsName);\r\n } else {\r\n element.classList.remove(...clsName);\r\n }\r\n}\r\n\r\nexport function elementScrollIntoView(selector: Element | string) {\r\n let element = getDom(selector);\r\n\r\n if (!element)\r\n return;\r\n\r\n element.scrollIntoView({ behavior: 'smooth', block: 'nearest', inline: 'start' });\r\n}\r\n\r\nconst hasScrollbar = () => {\r\n let overflow = document.body.style.overflow;\r\n if (overflow && overflow === \"hidden\") return false;\r\n return document.body.scrollHeight > (window.innerHeight || document.documentElement.clientHeight);\r\n}\r\n\r\nexport function getScroll() {\r\n return { x: window.pageXOffset, y: window.pageYOffset };\r\n}\r\n\r\nfunction isElement(node: Element) {\r\n const ELEMENT_NODE_TYPE = 1;\r\n return (\r\n node.tagName !== \"HTML\" &&\r\n node.tagName !== \"BODY\" &&\r\n node.nodeType == ELEMENT_NODE_TYPE\r\n )\r\n}\r\n\r\nexport function getScrollParent(el: Element | undefined, root: HTMLElement | Window | undefined = undefined) {\r\n root ??= canUseDom ? window : undefined;\r\n\r\n let node = el;\r\n while (node && node !== root && isElement(node)) {\r\n const { overflowY } = window.getComputedStyle(node);\r\n if (/scroll|auto|overlay/i.test(overflowY)) {\r\n return node;\r\n }\r\n\r\n node = node.parentNode as Element;\r\n }\r\n\r\n return root;\r\n}\r\n\r\nexport function getScrollTop(el: HTMLElement | Window): number {\r\n const top = 'scrollTop' in el ? el.scrollTop : el.pageYOffset;\r\n\r\n // iOS scroll bounce cause minus scrollTop\r\n return Math.max(top, 0);\r\n}\r\n\r\nexport function getInnerText(element) {\r\n let dom = getDom(element);\r\n return dom.innerText;\r\n}\r\n\r\nexport function getMenuOrDialogMaxZIndex(exclude: Element[] = [], element: Element) {\r\n const base = getDom(element);\r\n // Start with lowest allowed z-index or z-index of\r\n // base component's element, whichever is greater\r\n const zis = [getZIndex(base)]\r\n\r\n const activeElements = [\r\n ...document.getElementsByClassName('m-menu__content--active'),\r\n ...document.getElementsByClassName('m-dialog__content--active'),\r\n ]\r\n\r\n // Get z-index for all active dialogs\r\n for (let index = 0; index < activeElements.length; index++) {\r\n if (!exclude.includes(activeElements[index])) {\r\n zis.push(getZIndex(activeElements[index]))\r\n }\r\n }\r\n\r\n return Math.max(...zis)\r\n}\r\n\r\nexport function getMaxZIndex() {\r\n return [...document.all].reduce((r, e) => Math.max(r, +window.getComputedStyle(e).zIndex || 0), 0)\r\n}\r\n\r\nexport function getStyle(element, styleProp) {\r\n element = getDom(element);\r\n\r\n if (element.currentStyle) {\r\n return element.currentStyle[styleProp];\r\n } else if (window.getComputedStyle) {\r\n return document.defaultView.getComputedStyle(element, null).getPropertyValue(styleProp);\r\n }\r\n}\r\n\r\nexport function getTextAreaInfo(element) {\r\n var result = {};\r\n var dom = getDom(element);\r\n result[\"scrollHeight\"] = dom.scrollHeight || 0;\r\n\r\n if (element.currentStyle) {\r\n result[\"lineHeight\"] = parseFloat(element.currentStyle[\"line-height\"]);\r\n result[\"paddingTop\"] = parseFloat(element.currentStyle[\"padding-top\"]);\r\n result[\"paddingBottom\"] = parseFloat(element.currentStyle[\"padding-bottom\"]);\r\n result[\"borderBottom\"] = parseFloat(element.currentStyle[\"border-bottom\"]);\r\n result[\"borderTop\"] = parseFloat(element.currentStyle[\"border-top\"]);\r\n } else if (window.getComputedStyle) {\r\n result[\"lineHeight\"] = parseFloat(document.defaultView.getComputedStyle(element, null).getPropertyValue(\"line-height\"));\r\n result[\"paddingTop\"] = parseFloat(document.defaultView.getComputedStyle(element, null).getPropertyValue(\"padding-top\"));\r\n result[\"paddingBottom\"] = parseFloat(document.defaultView.getComputedStyle(element, null).getPropertyValue(\"padding-bottom\"));\r\n result[\"borderBottom\"] = parseFloat(document.defaultView.getComputedStyle(element, null).getPropertyValue(\"border-bottom\"));\r\n result[\"borderTop\"] = parseFloat(document.defaultView.getComputedStyle(element, null).getPropertyValue(\"border-top\"));\r\n }\r\n //Firefox can return this as NaN, so it has to be handled here like that.\r\n if (Object.is(NaN, result[\"borderTop\"]))\r\n result[\"borderTop\"] = 1;\r\n if (Object.is(NaN, result[\"borderBottom\"]))\r\n result[\"borderBottom\"] = 1;\r\n return result;\r\n}\r\n\r\nconst objReferenceDict = {};\r\n\r\nexport function disposeObj(objReferenceName) {\r\n delete objReferenceDict[objReferenceName];\r\n}\r\n\r\nexport function upsertThemeStyle(id: string, style: string) {\r\n const d = document.getElementById(id);\r\n if (d) {\r\n document.head.removeChild(d);\r\n }\r\n\r\n const d_style = document.createElement('style')\r\n d_style.id = id;\r\n d_style.type = \"text/css\";\r\n d_style.innerHTML = style;\r\n\r\n document.head.insertAdjacentElement('beforeend', d_style)\r\n}\r\n\r\nexport function getImageDimensions(src: string) {\r\n return new Promise(function (resolve, reject) {\r\n var img = new Image()\r\n img.src = src\r\n img.onload = function () {\r\n resolve({\r\n width: img.width,\r\n height: img.height,\r\n hasError: false\r\n })\r\n }\r\n img.onerror = function () {\r\n resolve({\r\n width: 0,\r\n height: 0,\r\n hasError: true\r\n })\r\n }\r\n })\r\n}\r\n\r\nexport function enablePreventDefaultForEvent(element: any, event: string, condition?: any) {\r\n const dom = getDom(element);\r\n if (!dom) return;\r\n if (event === 'keydown') {\r\n dom.addEventListener(event, (e: KeyboardEvent) => {\r\n if (Array.isArray(condition)) {\r\n var codes = condition as string[];\r\n if (codes.includes(e.code)) {\r\n e.preventDefault();\r\n }\r\n } else {\r\n e.preventDefault();\r\n }\r\n })\r\n } else {\r\n dom.addEventListener(event, e => {\r\n if (e.preventDefault) {\r\n e.preventDefault();\r\n }\r\n })\r\n }\r\n}\r\n\r\nexport function getBoundingClientRects(selector) {\r\n var elements = document.querySelectorAll(selector);\r\n\r\n var result = [];\r\n\r\n for (var i = 0; i < elements.length; i++) {\r\n var e: Element = elements[i];\r\n var dom = {\r\n id: e.id,\r\n rect: e.getBoundingClientRect()\r\n };\r\n result.push(dom);\r\n }\r\n\r\n return result;\r\n}\r\n\r\nexport function getSize(selectors, sizeProp) {\r\n var el = getDom(selectors);\r\n\r\n var display = el.style.display;\r\n var overflow = el.style.overflow;\r\n\r\n el.style.display = \"\";\r\n el.style.overflow = \"hidden\";\r\n\r\n var size = el[\"offset\" + sizeProp.charAt(0).toUpperCase() + sizeProp.slice(1)] || 0;\r\n\r\n el.style.display = display;\r\n el.style.overflow = overflow;\r\n\r\n return size;\r\n}\r\n\r\nexport function getProp(elOrString, name) {\r\n if (elOrString === 'window') {\r\n return window[name];\r\n }\r\n\r\n var el = getDom(elOrString);\r\n if (!el) {\r\n return null;\r\n }\r\n\r\n return el[name];\r\n}\r\n\r\nexport function updateWindowTransition(selectors, isActive, item) {\r\n var el: HTMLElement = getDom(selectors);\r\n var container: HTMLElement = el.querySelector('.m-window__container');\r\n\r\n if (item) {\r\n var itemEl: HTMLElement = getDom(item);\r\n container.style.height = itemEl.clientHeight + 'px';\r\n return;\r\n }\r\n\r\n if (isActive) {\r\n container.classList.add('m-window__container--is-active');\r\n container.style.height = el.clientHeight + 'px';\r\n } else {\r\n container.style.height = '';\r\n container.classList.remove('m-window__container--is-active');\r\n }\r\n}\r\n\r\nexport function getScrollHeightWithoutHeight(elOrString) {\r\n var el: HTMLElement = getDom(elOrString);\r\n if (!el) {\r\n return 0;\r\n }\r\n\r\n var height = el.style.height;\r\n el.style.height = '0'\r\n var scrollHeight = el.scrollHeight;\r\n el.style.height = height;\r\n\r\n return scrollHeight;\r\n}\r\n\r\nfunction registerPasteWithData(customEventName) {\r\n if (Blazor) {\r\n Blazor.registerCustomEventType(customEventName, {\r\n browserEventName: 'paste',\r\n createEventArgs: (event: ClipboardEvent) => {\r\n return {\r\n type: event.type,\r\n pastedData: event.clipboardData.getData('text')\r\n };\r\n }\r\n });\r\n }\r\n}\r\n\r\nexport function registerTextFieldOnMouseDown(element, inputElement, callback) {\r\n if (!element || !inputElement) return\r\n\r\n const listener = (e: MouseEvent) => {\r\n const target = e.target;\r\n const inputDom = getDom(inputElement);\r\n if (target !== inputDom) {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n }\r\n\r\n if (callback) {\r\n const mouseEventArgs = {\r\n Detail: e.detail,\r\n ScreenX: e.screenX,\r\n ScreenY: e.screenY,\r\n ClientX: e.clientX,\r\n ClientY: e.clientY,\r\n OffsetX: e.offsetX,\r\n OffsetY: e.offsetY,\r\n PageX: e.pageX,\r\n PageY: e.pageY,\r\n Button: e.button,\r\n Buttons: e.buttons,\r\n CtrlKey: e.ctrlKey,\r\n ShiftKey: e.shiftKey,\r\n AltKey: e.altKey,\r\n MetaKey: e.metaKey,\r\n Type: e.type\r\n }\r\n\r\n callback.invokeMethodAsync('Invoke', mouseEventArgs);\r\n }\r\n };\r\n\r\n element.addEventListener('mousedown', listener)\r\n\r\n const config: HtmlElementEventListenerConfig = {\r\n listener,\r\n handle: callback\r\n };\r\n\r\n const key =`registerTextFieldOnMouseDown_${getBlazorId(element)}`;\r\n htmlElementEventListenerConfigs[key] = [config]\r\n}\r\n\r\nexport function unregisterTextFieldOnMouseDown(element: HTMLElement) {\r\n const key =`registerTextFieldOnMouseDown_${getBlazorId(element)}`;\r\n const configs = htmlElementEventListenerConfigs[key]\r\n if (configs && configs.length) {\r\n configs.forEach(item => {\r\n item.handle.dispose();\r\n if (element) {\r\n element.removeEventListener(\"mousedown\", item.listener);\r\n }\r\n })\r\n }\r\n}\r\n\r\nexport function containsActiveElement(selector) {\r\n var el = getDom(selector);\r\n if (el && el.contains) {\r\n return el.contains(document.activeElement);\r\n }\r\n\r\n return null;\r\n}\r\n\r\nexport function copyChild(el) {\r\n if (typeof el === 'string') {\r\n el = document.querySelector(el);\r\n }\r\n\r\n if (!el) return;\r\n\r\n el.setAttribute('contenteditable', 'true');\r\n el.focus();\r\n document.execCommand('selectAll', false, null);\r\n document.execCommand('copy');\r\n document.execCommand('unselect');\r\n el.blur();\r\n el.removeAttribute('contenteditable');\r\n}\r\n\r\nexport function copyText(text) {\r\n if (!navigator.clipboard) {\r\n var textArea = document.createElement(\"textarea\");\r\n textArea.value = text;\r\n textArea.readOnly = true;\r\n\r\n // Avoid scrolling to bottom\r\n textArea.style.top = \"0\";\r\n textArea.style.left = \"0\";\r\n textArea.style.position = \"fixed\";\r\n\r\n document.body.appendChild(textArea);\r\n textArea.focus();\r\n textArea.select();\r\n\r\n try {\r\n var successful = document.execCommand('copy');\r\n var msg = successful ? 'successful' : 'unsuccessful';\r\n console.log('Fallback: Copying text command was ' + msg);\r\n } catch (err) {\r\n console.error('Fallback: Oops, unable to copy', err);\r\n }\r\n\r\n document.body.removeChild(textArea);\r\n return;\r\n }\r\n\r\n navigator.clipboard.writeText(text).then(function () {\r\n console.log('Async: Copying to clipboard was successful!');\r\n }, function (err) {\r\n console.error('Async: Could not copy text: ', err);\r\n });\r\n}\r\n\r\nexport function getMenuableDimensions(hasActivator, activatorSelector, isDefaultAttach, contentElement, attached, attachSelector) {\r\n if (!attached) {\r\n var container = document.querySelector(attachSelector);\r\n if (contentElement.nodeType) {\r\n container.appendChild(contentElement);\r\n }\r\n }\r\n\r\n var dimensions = {\r\n activator: {} as any,\r\n content: {} as any,\r\n relativeYOffset: 0,\r\n offsetParentLeft: 0\r\n };\r\n\r\n if (hasActivator) {\r\n var activator = document.querySelector(activatorSelector);\r\n dimensions.activator = measure(activator, isDefaultAttach)\r\n dimensions.activator.offsetLeft = activator.offsetLeft\r\n if (!isDefaultAttach) {\r\n // account for css padding causing things to not line up\r\n // this is mostly for v-autocomplete, hopefully it won't break anything\r\n dimensions.activator.offsetTop = activator.offsetTop\r\n } else {\r\n dimensions.activator.offsetTop = 0\r\n }\r\n }\r\n\r\n sneakPeek(() => {\r\n if (contentElement) {\r\n if (contentElement.offsetParent) {\r\n const offsetRect = getRoundedBoundedClientRect(contentElement.offsetParent)\r\n dimensions.relativeYOffset = getPageYOffset() + offsetRect.top\r\n\r\n if (hasActivator) {\r\n dimensions.activator.top -= dimensions.relativeYOffset\r\n dimensions.activator.left -= window.pageXOffset + offsetRect.left\r\n } else {\r\n dimensions.offsetParentLeft = offsetRect.left\r\n }\r\n }\r\n\r\n dimensions.content = measure(contentElement, isDefaultAttach)\r\n dimensions.content.offsetLeft = contentElement.offsetLeft\r\n dimensions.content.offsetTop = contentElement.offsetTop\r\n }\r\n }, contentElement);\r\n\r\n return dimensions;\r\n}\r\n\r\nfunction getPageYOffset() {\r\n let pageYOffset = window.pageYOffset\r\n const blockedScrollY = parseInt(document.documentElement.style.getPropertyValue('--m-body-scroll-y'))\r\n if (blockedScrollY) {\r\n pageYOffset += Math.abs(blockedScrollY);\r\n }\r\n return pageYOffset\r\n}\r\n\r\nfunction measure(el: HTMLElement, isDefaultAttach) {\r\n if (!el) return {}\r\n\r\n const rect = getRoundedBoundedClientRect(el)\r\n\r\n // Account for activator margin\r\n if (!isDefaultAttach) {\r\n const style = window.getComputedStyle(el)\r\n\r\n rect.left = parseInt(style.marginLeft!)\r\n rect.top = parseInt(style.marginTop!)\r\n }\r\n\r\n return rect\r\n}\r\n\r\nfunction getRoundedBoundedClientRect(el: Element) {\r\n if (!el || !el.nodeType) {\r\n return null\r\n }\r\n\r\n const rect = el.getBoundingClientRect()\r\n return {\r\n top: Math.round(rect.top),\r\n left: Math.round(rect.left),\r\n bottom: Math.round(rect.bottom),\r\n right: Math.round(rect.right),\r\n width: Math.round(rect.width),\r\n height: Math.round(rect.height),\r\n }\r\n}\r\n\r\nfunction sneakPeek(cb: () => void, el) {\r\n if (!el || !el.style || el.style.display !== 'none') {\r\n cb()\r\n return\r\n }\r\n\r\n el.style.display = 'inline-block'\r\n cb()\r\n el.style.display = 'none'\r\n}\r\n\r\nexport function invokeMultipleMethod(windowProps, documentProps, hasActivator, activatorSelector, attach, contentElement, attached, attachSelector, element) {\r\n var multipleResult = {\r\n windowAndDocument: null,\r\n dimensions: null,\r\n zIndex: 0\r\n };\r\n\r\n multipleResult.windowAndDocument = getWindowAndDocumentProps(windowProps, documentProps);\r\n multipleResult.dimensions = getMenuableDimensions(hasActivator, activatorSelector, attach, contentElement, attached, attachSelector);\r\n multipleResult.zIndex = getMenuOrDialogMaxZIndex([contentElement], element);\r\n\r\n return multipleResult;\r\n}\r\n\r\nexport function registerOTPInputOnInputEvent(elementList, callback) {\r\n for (let i = 0; i < elementList.length; i++) {\r\n const inputListener = (e: Event) => otpInputOnInputEvent(e, i, elementList, callback);\r\n const focusListener = (e: Event) => otpInputFocusEvent(e, i, elementList);\r\n const keyupListener =(e: KeyboardEvent) => otpInputKeyupEvent(e, i, elementList, callback);\r\n\r\n elementList[i].addEventListener('input', inputListener);\r\n elementList[i].addEventListener('focus', focusListener);\r\n elementList[i].addEventListener('keyup', keyupListener);\r\n\r\n elementList[i]._optInput = {\r\n inputListener,\r\n focusListener,\r\n keyupListener\r\n }\r\n }\r\n}\r\n\r\nfunction otpInputKeyupEvent(e: KeyboardEvent, otpIdx: number, elementList, callback) {\r\n e.preventDefault();\r\n const eventKey = e.key;\r\n if (eventKey === 'ArrowLeft' || eventKey === 'Backspace') {\r\n if (eventKey === 'Backspace') {\r\n const obj = {\r\n type: eventKey,\r\n index: otpIdx,\r\n value: ''\r\n }\r\n if (callback) {\r\n callback.invokeMethodAsync('Invoke', obj);\r\n }\r\n }\r\n otpInputFocus(otpIdx - 1, elementList);\r\n }\r\n else if (eventKey === 'ArrowRight') {\r\n otpInputFocus(otpIdx + 1, elementList);\r\n }\r\n}\r\n\r\nfunction otpInputFocus(focusIndex: number, elementList) {\r\n if (focusIndex < 0) {\r\n otpInputFocus(0, elementList);\r\n }\r\n else if (focusIndex >= elementList.length) {\r\n otpInputFocus(elementList.length - 1, elementList);\r\n }\r\n else {\r\n if (document.activeElement !== elementList[focusIndex]) {\r\n const element = getDom(elementList[focusIndex])\r\n element.focus();\r\n }\r\n }\r\n}\r\n\r\nfunction otpInputFocusEvent(e: Event, otpIdx: number, elementList) {\r\n const element = getDom(elementList[otpIdx]) as HTMLInputElement;\r\n if (element && document.activeElement === element) {\r\n element.select();\r\n }\r\n}\r\n\r\nfunction otpInputOnInputEvent(e: Event, otpIdx: number, elementList, callback) {\r\n const target = e.target as HTMLInputElement;\r\n const value = target.value;\r\n\r\n if (value && value !== '') {\r\n otpInputFocus(otpIdx + 1, elementList);\r\n\r\n if (callback) {\r\n const obj = {\r\n type: 'Input',\r\n index: otpIdx,\r\n value: value\r\n }\r\n callback.invokeMethodAsync('Invoke', obj);\r\n }\r\n }\r\n}\r\n\r\nexport function unregisterOTPInputOnInputEvent(elementList) {\r\n for (let i = 0; i < elementList.length; i++) {\r\n const el = elementList[i]\r\n if(el && el._optInput) {\r\n el.removeEventListener('input', el._optInput.inputListener)\r\n el.removeEventListener('focus', el._optInput.focusListener)\r\n el.removeEventListener('keyup', el._optInput.keyupListener)\r\n }\r\n }\r\n}\r\n\r\nexport function getListIndexWhereAttributeExists(selector: string, attribute:string, value: string) {\r\n const tiles = document.querySelectorAll(selector);\r\n if (!tiles) {\r\n return -1;\r\n }\r\n\r\n let index = -1;\r\n for (let i = 0; i < tiles.length; i++) {\r\n if (tiles[i].getAttribute(attribute) === value) {\r\n index = i;\r\n break;\r\n }\r\n }\r\n\r\n return index;\r\n}\r\n\r\nexport function scrollToTile(contentSelector: string, tilesSelector: string, index: number, keyCode: string) {\r\n var tiles = document.querySelectorAll(tilesSelector)\r\n if (!tiles) return;\r\n\r\n let tile = tiles[index] as HTMLElement;\r\n\r\n if (!tile) return;\r\n\r\n const content = document.querySelector(contentSelector);\r\n if (!content) return;\r\n\r\n const scrollTop = content.scrollTop;\r\n const contentHeight = content.clientHeight;\r\n\r\n if (scrollTop > tile.offsetTop - 8) {\r\n content.scrollTo({ top: tile.offsetTop - tile.clientHeight, behavior: \"smooth\" })\r\n } else if (scrollTop + contentHeight < tile.offsetTop + tile.clientHeight + 8) {\r\n content.scrollTo({ top: tile.offsetTop - contentHeight + tile.clientHeight * 2, behavior: \"smooth\" })\r\n }\r\n}\r\n\r\nexport function getElementTranslateY(element) {\r\n const style = window.getComputedStyle(element);\r\n const transform = style.transform || style.webkitTransform;\r\n const translateY = transform.slice(7, transform.length - 1).split(', ')[5];\r\n\r\n return Number(translateY);\r\n}\r\n\r\nfunction isWindow(element: any | Window): element is Window {\r\n return element === window\r\n}\r\n\r\nexport function checkIfThresholdIsExceededWhenScrolling(el: Element, parent: any, threshold: number) {\r\n if (!el || !parent) return\r\n\r\n let parentElement: HTMLElement | Window\r\n\r\n if (parent == \"window\") {\r\n parentElement = window;\r\n } else if (parent == \"document\") {\r\n parentElement = document.documentElement;\r\n } else {\r\n parentElement = document.querySelector(parent);\r\n }\r\n\r\n if (!parentElement) {\r\n console.warn('[MInfiniteScroll] failed to get parent element with selector:', parent);\r\n return;\r\n }\r\n\r\n const rect = el.getBoundingClientRect();\r\n const elementTop = rect.top;\r\n const current = isWindow(parentElement)\r\n ? window.innerHeight\r\n : parentElement.getBoundingClientRect().bottom\r\n\r\n return (current >= elementTop - threshold)\r\n}\r\n\r\nexport function get_top_domain() {\r\n var i, h,\r\n weird_cookie = 'weird_get_top_level_domain=cookie',\r\n hostname = document.location.hostname.split('.');\r\n for (i = hostname.length - 1; i >= 0; i--) {\r\n h = hostname.slice(i).join('.');\r\n document.cookie = weird_cookie + ';domain=.' + h + ';';\r\n if (document.cookie.indexOf(weird_cookie) > -1) {\r\n // We were able to store a cookie! This must be it\r\n document.cookie = weird_cookie.split('=')[0] + '=;domain=.' + h + ';expires=Thu, 01 Jan 1970 00:00:01 GMT;';\r\n return h;\r\n }\r\n }\r\n}\r\n\r\nexport function setCookie(name, value) {\r\n if (value === null || value === undefined) {\r\n return;\r\n }\r\n\r\n var domain = get_top_domain();\r\n if (!domain) {\r\n domain = '';\r\n }else if (isNaN(domain[0])) {\r\n domain = `.${domain}`;\r\n }\r\n var Days = 30;\r\n var exp = new Date();\r\n exp.setTime(exp.getTime() + Days * 24 * 60 * 60 * 1000);\r\n document.cookie = `${name}=${escape(value?.toString())};path=/;expires=${exp.toUTCString()};domain=${domain}`;\r\n}\r\n\r\nexport function getCookie(name) {\r\n const reg = new RegExp(`(^| )${name}=([^;]*)(;|$)`);\r\n const arr = document.cookie.match(reg);\r\n if (arr) {\r\n return unescape(arr[2]);\r\n }\r\n return null;\r\n}\r\n\r\nexport function registerDragEvent(el: HTMLElement, dataKey?: string) {\r\n if (el) {\r\n const blazorId = getBlazorId(el);\r\n const listener = (e: DragEvent) => {\r\n if (dataKey) {\r\n const dataValue = (e.target as HTMLElement).getAttribute(dataKey);\r\n e.dataTransfer.setData(dataKey, dataValue);\r\n e.dataTransfer.setData('offsetX', e.offsetX.toString())\r\n e.dataTransfer.setData('offsetY', e.offsetY.toString())\r\n }\r\n };\r\n const key = `${blazorId}:dragstart`;\r\n htmlElementEventListenerConfigs[key] = [{\r\n listener\r\n }];\r\n el.addEventListener(\"dragstart\", listener);\r\n }\r\n}\r\n\r\nexport function unregisterDragEvent(el: HTMLElement) {\r\n const blazorId = getBlazorId(el);\r\n if (blazorId) {\r\n const key = `${blazorId}:dragstart`;\r\n if (htmlElementEventListenerConfigs[key]) {\r\n htmlElementEventListenerConfigs[key].forEach((config) => {\r\n el.removeEventListener(\"dragstart\", config.listener);\r\n });\r\n }\r\n }\r\n}\r\n\r\nexport function resizableDataTable(dataTable: HTMLElement) {\r\n const table = dataTable.querySelector('table')\r\n const row = table.querySelector('.m-data-table-header').getElementsByTagName('tr')[0];\r\n const cols = row ? row.children : [];\r\n if (!cols) return;\r\n\r\n table.style.overflow = 'hidden';\r\n\r\n const tableHeight = table.offsetHeight;\r\n\r\n for (var i = 0; i < cols.length; i++) {\r\n const col: any = cols[i];\r\n const colResizeDiv: HTMLDivElement = col.querySelector(\".m-data-table-header__col-resize\");\r\n if (!colResizeDiv) continue\r\n colResizeDiv.style.height = tableHeight + \"px\"\r\n\r\n let minWidth = (col.firstElementChild as HTMLElement).offsetWidth; // width of span\r\n minWidth = minWidth + 32 + 18 + 1 + 1; // 32:padding 18:sort\r\n if(!col.style.minWidth){\r\n col.minWidth = minWidth;\r\n col.style.minWidth = minWidth + \"px\";\r\n }\r\n\r\n setListeners(colResizeDiv);\r\n }\r\n\r\n function setListeners(div: HTMLDivElement) {\r\n let pageX:number\r\n let curCol: HTMLElement;\r\n let nxtCol: HTMLElement;\r\n let curColWidth: number;\r\n let nxtColWidth: number;\r\n let tableWidth: number;\r\n\r\n div.addEventListener('click', e => e.stopPropagation());\r\n\r\n div.addEventListener('mousedown', function (e) {\r\n curCol = (e.target as HTMLElement).parentElement;\r\n nxtCol = curCol.nextElementSibling as HTMLElement;\r\n pageX = e.pageX;\r\n\r\n tableWidth = table.offsetWidth;\r\n\r\n var padding = paddingDiff(curCol);\r\n\r\n curColWidth = curCol.offsetWidth - padding;\r\n if (nxtCol)\r\n nxtColWidth = nxtCol.offsetWidth - padding;\r\n });\r\n\r\n document.addEventListener(\"mousemove\", function (e) {\r\n if (curCol) {\r\n let diffX = e.pageX - pageX;\r\n\r\n const isRtl = dataTable.classList.contains(\"m-data-table--rtl\")\r\n if (isRtl) {\r\n diffX = 0 - diffX;\r\n }\r\n\r\n let newCurColWidth = curColWidth + diffX;\r\n\r\n curCol.style.width = newCurColWidth + \"px\";\r\n\r\n const isOverflow = dataTable.classList.contains(\r\n \"m-data-table--resizable-overflow\"\r\n );\r\n if (isOverflow) {\r\n table.style.width = tableWidth + diffX + \"px\";\r\n return;\r\n }\r\n\r\n const isIndependent = dataTable.classList.contains(\r\n \"m-data-table--resizable-independent\"\r\n );\r\n if (isIndependent) {\r\n let newNextColWidth = nxtColWidth - diffX;\r\n const twoColWidth = curColWidth + nxtColWidth;\r\n\r\n if (diffX > 0) {\r\n if (nxtCol) {\r\n if (newNextColWidth < nxtCol[\"minWidth\"]) {\r\n newNextColWidth = nxtCol[\"minWidth\"];\r\n newCurColWidth = twoColWidth - newNextColWidth;\r\n }\r\n }\r\n } else {\r\n if (newCurColWidth < curCol[\"minWidth\"]) {\r\n newCurColWidth = curCol[\"minWidth\"];\r\n newNextColWidth = twoColWidth - newCurColWidth;\r\n }\r\n }\r\n\r\n curCol.style.width = newCurColWidth + \"px\";\r\n\r\n if (nxtCol) {\r\n nxtCol.style.width = newNextColWidth + \"px\";\r\n }\r\n }\r\n }\r\n });\r\n\r\n document.addEventListener('mouseup', function (e) {\r\n if (curCol) {\r\n for (let i = 0; i < cols.length; i++) {\r\n const col:any = cols[i];\r\n col.style.width = col['offsetWidth'] + \"px\"\r\n }\r\n }\r\n curCol = undefined;\r\n nxtCol = undefined;\r\n pageX = undefined;\r\n nxtColWidth = undefined;\r\n curColWidth = undefined;\r\n tableWidth = undefined;\r\n });\r\n }\r\n\r\n function paddingDiff(col) {\r\n if (getStyleVal(col, 'box-sizing') == 'border-box') {\r\n return 0;\r\n }\r\n\r\n var padLeft = getStyleVal(col, 'padding-left');\r\n var padRight = getStyleVal(col, 'padding-right');\r\n return (parseInt(padLeft) + parseInt(padRight));\r\n }\r\n\r\n function getStyleVal(elm, css) {\r\n return (window.getComputedStyle(elm, null).getPropertyValue(css))\r\n }\r\n}\r\n\r\nexport function updateDataTableResizeHeight(dataTable: HTMLElement) {\r\n const table = dataTable.querySelector('table')\r\n const row = table.querySelector('.m-data-table-header').getElementsByTagName('tr')[0];\r\n const cols = row ? row.children : [];\r\n if (!cols) return;\r\n\r\n const tableHeight = table.offsetHeight;\r\n\r\n for (var i = 0; i < cols.length; i++) {\r\n const col: any = cols[i];\r\n const colResizeDiv: HTMLDivElement = col.querySelector(\".m-data-table-header__col-resize\");\r\n colResizeDiv.style.height = tableHeight + \"px\"\r\n }\r\n}\r\n\r\nfunction stopPropagation(e) {\r\n e.stopPropagation();\r\n}\r\n\r\nexport function addStopPropagationEvent(el: any, type: keyof HTMLElementEventMap) {\r\n const dom = getDom(el);\r\n dom.addEventListener(type, stopPropagation);\r\n}\r\n\r\nexport function removeStopPropagationEvent(el: any, type: keyof HTMLElementEventMap) {\r\n const dom = getDom(el);\r\n dom.removeEventListener(type, stopPropagation);\r\n}\r\n\r\nexport function historyBack() {\r\n history.back();\r\n}\r\n\r\nexport function historyGo(delta: number) {\r\n history.go(delta);\r\n}\r\n\r\nexport function historyReplace(href) {\r\n history.replaceState(null, /*ignore title*/ '', href);\r\n}\r\n\r\nexport function registerTableScrollEvent(wrapper: HTMLElement) {\r\n const listener = () => {\r\n const scrollWidth = wrapper.scrollWidth;\r\n const clientWidth = wrapper.clientWidth;\r\n const scrollLeft = wrapper.scrollLeft;\r\n\r\n const rtl = wrapper.parentElement.classList.contains('m-data-table--rtl');\r\n\r\n if (Math.abs(scrollWidth -((rtl ? -scrollLeft : scrollLeft) + clientWidth)) < 1) {\r\n wrapper.classList.remove('scrolling')\r\n wrapper.classList.remove('scrolled-to-left')\r\n wrapper.classList.add('scrolled-to-right');\r\n } else if (Math.abs(scrollLeft - (rtl ? scrollWidth - clientWidth : 0)) < 1) {\r\n wrapper.classList.remove('scrolling')\r\n wrapper.classList.remove('scrolled-to-right')\r\n wrapper.classList.add('scrolled-to-left');\r\n } else {\r\n wrapper.classList.remove('scrolled-to-right');\r\n wrapper.classList.remove('scrolled-to-left');\r\n wrapper.classList.add('scrolling');\r\n }\r\n }\r\n\r\n listener();\r\n\r\n wrapper.addEventListener('scroll', listener)\r\n wrapper[\"_m_table_scroll_event\"] = listener\r\n}\r\n\r\nexport function unregisterTableScrollEvent(wrapper: HTMLElement) {\r\n const listener = wrapper[\"_m_table_scroll_event\"]\r\n if (listener) {\r\n wrapper.removeEventListener('scroll', listener)\r\n delete wrapper[\"_m_table_scroll_event\"]\r\n }\r\n}\r\n\r\nexport function updateTabSlider(\r\n sliderWrapper: HTMLElement,\r\n tab: HTMLElement,\r\n sliderSize: number,\r\n vertical: boolean,\r\n isReversed: boolean\r\n) {\r\n if (!sliderWrapper) {\r\n console.warn('[MTab] the element of slider wrapper is not found')\r\n return;\r\n }\r\n\r\n if (!tab) {\r\n console.warn('[MTab] the element of tab to be activated is not found')\r\n return;\r\n }\r\n\r\n const height = !vertical ? sliderSize : tab.scrollHeight;\r\n const left = vertical ? 0 : tab.offsetLeft;\r\n const right = vertical ? 0 : tab.offsetLeft + tab.offsetWidth;\r\n const top = tab.offsetTop;\r\n const width = vertical ? sliderSize : tab.clientWidth;\r\n sliderWrapper.style.width = `${width}px`;\r\n sliderWrapper.style.height = `${height}px`;\r\n if (!isReversed) {\r\n sliderWrapper.style.left = `${left}px`;\r\n }\r\n if (isReversed) {\r\n sliderWrapper.style.right = `${right}px`;\r\n }\r\n if (vertical) {\r\n sliderWrapper.style.top = `${top}px`;\r\n }\r\n}\r\n\r\nexport function isScrollNearBottom(element: HTMLElement, threshold: number = 200) {\r\n if (!element) {\r\n return false;\r\n }\r\n return element.scrollHeight - (element.scrollTop + element.clientHeight) < threshold;\r\n}","import { removeListeners, RippleOptions, updateRipple } from \"./ripple\";\r\n\r\nexport default function registerRippleObserver() {\r\n const observer = new MutationObserver((mutationsList, observer) => {\r\n for (const mutation of mutationsList) {\r\n if (mutation.type === \"childList\" && mutation.addedNodes.length > 0) {\r\n for (const node of mutation.addedNodes) {\r\n if (node instanceof HTMLElement) {\r\n if (\r\n node.nodeType === Node.ELEMENT_NODE &&\r\n node.hasAttribute(\"ripple\") &&\r\n !node._ripple\r\n ) {\r\n updateRipple(node, convertRippleAttributeToOptions(node), false);\r\n }\r\n }\r\n }\r\n }\r\n\r\n // 处理属性变动\r\n if (mutation.type === \"attributes\") {\r\n const target = mutation.target as HTMLElement;\r\n if (target.hasAttribute(\"ripple\") && !target._ripple) {\r\n if (mutation.attributeName === \"ripple\") {\r\n updateRipple(\r\n target,\r\n convertRippleAttributeToOptions(target),\r\n false\r\n );\r\n } else if (!target.hasAttribute(\"ripple\") && target._ripple) {\r\n removeListeners(target);\r\n delete target._ripple;\r\n }\r\n }\r\n }\r\n\r\n if (\r\n mutation.type === \"attributes\" &&\r\n mutation.attributeName === \"ripple\"\r\n ) {\r\n const target = mutation.target as HTMLElement;\r\n if (target._ripple) {\r\n updateRipple(\r\n target,\r\n convertRippleAttributeToOptions(target),\r\n target._ripple.enabled\r\n );\r\n }\r\n }\r\n\r\n if (mutation.type === \"childList\" && mutation.removedNodes.length > 0) {\r\n for (const node of mutation.removedNodes) {\r\n if (node instanceof HTMLElement) {\r\n if (node.nodeType === Node.ELEMENT_NODE && node._ripple) {\r\n removeListeners(node);\r\n delete node._ripple;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n });\r\n\r\n // ripple=\"false\",\r\n // ripple=\"\",\r\n // ripple=\"true\",\r\n // ripple=\"center\",\r\n // ripple=\"circle\",\r\n // ripple=\"circle¢er\"\r\n // ripple=\"center&custom-css\",\r\n // ripple=\"circle&custom-css\",\r\n // ripple=\"custom-css\"\r\n function convertRippleAttributeToOptions(\r\n target: HTMLElement\r\n ): RippleOptions | null {\r\n const value = target.getAttribute(\"ripple\");\r\n if ((typeof value !== \"string\" && !value) || value === \"false\") {\r\n return null;\r\n }\r\n\r\n const options: RippleOptions = {};\r\n\r\n const props = value.split(\"&\");\r\n props.forEach((prop) => {\r\n if (prop === \"center\") {\r\n options.center = true;\r\n } else if (prop === \"circle\") {\r\n options.circle = true;\r\n } else {\r\n options.class = prop.trim();\r\n }\r\n });\r\n\r\n return options;\r\n }\r\n\r\n const initialElements = document.querySelectorAll(\"[ripple]\");\r\n\r\n for (const element of initialElements) {\r\n updateRipple(element, convertRippleAttributeToOptions(element), false);\r\n }\r\n\r\n observer.observe(document, {\r\n childList: true,\r\n subtree: true,\r\n attributes: true,\r\n attributeFilter: [\"ripple\"],\r\n attributeOldValue: false,\r\n });\r\n}\r\n","import * as slider from \"./components/slider\";\r\nimport * as textarea from \"./components/textarea\";\r\nimport * as interop from \"./interop\";\r\nimport { MarkdownParser } from \"./proxies/markdown-it\";\r\n\r\ndeclare global {\r\n interface Window {\r\n MasaBlazor: {\r\n interop: {};\r\n extendMarkdownIt?: (parser: MarkdownParser) => void;\r\n xgplayerPlugins: any[];\r\n xgplayerPluginOptions?: { [prop: string]: any };\r\n };\r\n }\r\n}\r\n\r\nwindow.MasaBlazor = {\r\n interop: {\r\n ...interop,\r\n ...slider,\r\n ...textarea\r\n },\r\n xgplayerPlugins: [],\r\n};\r\n"],"names":["__awaiter","thisArg","_arguments","P","generator","Promise","resolve","reject","fulfilled","value","step","next","e","rejected","result","done","then","apply","passiveSupported","window","testListenerOpts","Object","defineProperty","get","addEventListener","removeEventListener","console","warn","keyCodes","freeze","enter","tab","delete","esc","space","up","down","left","right","end","home","del","backspace","insert","pageup","pagedown","shift","getBlazorId","el","_bl_","getAttributeNames","find","a","startsWith","substring","getElementSelector","Element","path","nodeType","Node","ELEMENT_NODE","selector","nodeName","toLowerCase","id","unshift","sib","nth","previousElementSibling","parentNode","join","getDom","elOrString","element","document","documentElement","indexOf","array","split","i","querySelector","HTMLElement","body","error","canUseDom","createElement","touchEvents","parseMouseEvent","event","detail","screenX","screenY","clientX","clientY","offsetX","offsetY","pageX","pageY","button","buttons","ctrlKey","shiftKey","altKey","metaKey","type","parseTouchEvent","touches","parseTouch","targetTouches","changedTouches","touchList","length","touch","push","identifier","registerExtraMouseEvent","eventType","eventName","Blazor","registerCustomEventType","browserEventName","createEventArgs","createSharedEventArgs","registerExtraDropEvent","eventArgs","assign","dataTransfer","dropEffect","effectAllowed","files","Array","from","map","f","name","items","kind","types","getData","Number","args","target","eventTarget","elementReferenceId","class","getAttribute","getEventTarget","sliderHandleId","sliderHandlesById","dotnetHelper","onSliderMouseDown","app","mouseUpOptions","passive","capture","mouseMoveOptions","isTouchEvent","onMouseMove","cb","options","once","addOnceEventListener","onSliderMouseUp","invokeMethodAsync","stopPropagation","payload","textareaAutoGrowNextId","textareaAutoGrowMap","calculateTextareaHeight","textarea","rows","rowHeight","style","height","scrollHeight","minHeight","parseInt","parseFloat","Math","max","input","inputCallback","undefined","functionDebounce","fn","wait","callFirst","timeout","debouncedFn","clear","clearTimeout","debounceWrapper","this","arguments","context","callNow","setTimeout","call","cancel","flush","functionThrottle","interval","timeoutId","throttledFn","leading","trailing","throttleWrapper","registerExtraEvents","registerEvent","DELAY_RIPPLE","transform","webkitTransform","constructor","isKeyboardEvent","ripples","show","_ripple","enabled","container","animation","appendChild","className","radius","scale","x","y","centerX","centerY","localX","localY","offset","getBoundingClientRect","top","circle","clientWidth","center","sqrt","clientHeight","calculate","size","width","computed","getComputedStyle","position","dataset","previousPosition","classList","add","activated","String","performance","now","remove","hide","getElementsByClassName","isHiding","diff","delay","_a","removeChild","rippleShow","currentTarget","touched","rippleStop","isTouch","centered","showTimerCommit","showTimer","rippleHide","rippleCancelShow","keyboardRippleShow","keyCode","keyboardRippleHide","focusRippleHide","updateRipple","wasEnabled","removeListeners","getZIndex","index","getPropertyValue","getDomInfoObj","dom","offsetTop","offsetLeft","scrollWidth","scrollLeft","scrollTop","clientTop","clientLeft","res","viewportElement","box","offsetWidth","offsetHeight","relativeTop","relativeBottom","bottom","relativeLeft","relativeRight","absoluteLeft","absoluteTop","getElementPos","round","onload","customEventName","pastedData","clipboardData","observer","MutationObserver","mutationsList","mutation","addedNodes","node","hasAttribute","convertRippleAttributeToOptions","attributeName","removedNodes","forEach","prop","trim","initialElements","querySelectorAll","observe","childList","subtree","attributes","attributeFilter","attributeOldValue","registerRippleObserver","htmlElementEventListenerConfigs","getActiveElement","activeElement","getWindowAndDocumentProps","windowProps","documentProps","obj","getPageYOffset","isElement","tagName","getMenuOrDialogMaxZIndex","exclude","zis","activeElements","includes","getMenuableDimensions","hasActivator","activatorSelector","isDefaultAttach","contentElement","attached","attachSelector","dimensions","activator","content","relativeYOffset","offsetParentLeft","measure","display","sneakPeek","offsetParent","offsetRect","getRoundedBoundedClientRect","pageXOffset","pageYOffset","blockedScrollY","abs","rect","marginLeft","marginTop","otpInputKeyupEvent","otpIdx","elementList","callback","preventDefault","eventKey","key","otpInputFocus","focusIndex","focus","otpInputFocusEvent","select","otpInputOnInputEvent","get_top_domain","h","weird_cookie","hostname","location","slice","cookie","cloned","cloneNode","parentElement","innerWidth","evt","createEvent","initEvent","dispatchEvent","attach","_b","invoker","extras","htmlElement","config","listener","cancelable","relatedTarget","contains","k","debounce","debounceIt","throttle","handle","configs","item","dispose","e1","e2","dom1","dom2","text","navigator","clipboard","writeText","log","err","textArea","msg","execCommand","fallbackCopyTextToClipboard","preventScroll","HTMLInputElement","HTMLTextAreaElement","Error","blur","arg","scrollIntoView","block","inline","behavior","start","level","parent","to","scrollTo","o","targetEl","scrollY","offsetPosition","smooth","activeEl","containerEl","firstElementChild","getAbsoluteTop","getAbsoluteLeft","addElement","elementSelector","delElement","focusDialog","count","ele","innerHeight","isTop","isBottom","hasOwnProperty","clsName","root","overflowY","test","innerText","all","reduce","r","zIndex","styleProp","currentStyle","defaultView","is","NaN","objReferenceName","d","getElementById","head","d_style","innerHTML","insertAdjacentElement","src","img","Image","hasError","onerror","condition","isArray","code","elements","selectors","sizeProp","overflow","charAt","toUpperCase","isActive","itemEl","inputElement","mouseEventArgs","Detail","ScreenX","ScreenY","ClientX","ClientY","OffsetX","OffsetY","PageX","PageY","Button","Buttons","CtrlKey","ShiftKey","AltKey","MetaKey","Type","setAttribute","removeAttribute","readOnly","multipleResult","windowAndDocument","inputListener","focusListener","keyupListener","_optInput","attribute","tiles","contentSelector","tilesSelector","tile","contentHeight","translateY","threshold","elementTop","domain","isNaN","exp","Date","setTime","getTime","Days","escape","toString","toUTCString","reg","RegExp","arr","match","unescape","dataKey","blazorId","dataValue","setData","dataTable","table","row","getElementsByTagName","cols","children","tableHeight","col","colResizeDiv","minWidth","setListeners","div","curCol","nxtCol","curColWidth","nxtColWidth","tableWidth","nextElementSibling","padding","getStyleVal","padLeft","padRight","paddingDiff","diffX","newCurColWidth","newNextColWidth","twoColWidth","elm","css","history","back","delta","go","href","replaceState","wrapper","rtl","sliderWrapper","sliderSize","vertical","isReversed","MasaBlazor","interop","slider","xgplayerPlugins"],"mappings":"yBAkHO,SAASA,EAAUC,EAASC,EAAYC,EAAGC,GAE9C,OAAO,IAAKD,IAAMA,EAAIE,WAAU,SAAUC,EAASC,GAC/C,SAASC,E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AQqG,cAAgBrG,EAAQqN,UAAYrN,EAAQoK,cAAgB0S,CAC7E,IExlDApgB,OAAOkkB,WAAa,CAClBC,qDACKA,IACAC,GACA9a,GAEL+a,gBAAiB"}
\ No newline at end of file
+{"version":3,"file":"masa-blazor.js","sources":["../../../Masa.Blazor.JS/node_modules/tslib/tslib.es6.js","../../../Masa.Blazor.JS/src/utils/helper.ts","../../../Masa.Blazor.JS/src/events/EventType.ts","../../../Masa.Blazor.JS/src/events/extra.ts","../../../Masa.Blazor.JS/src/components/slider/index.ts","../../../Masa.Blazor.JS/src/components/textarea/index.ts","../../../Masa.Blazor.JS/node_modules/just-debounce-it/index.mjs","../../../Masa.Blazor.JS/node_modules/just-throttle/index.mjs","../../../Masa.Blazor.JS/src/events/index.ts","../../../Masa.Blazor.JS/src/ripple/ripple.ts","../../../Masa.Blazor.JS/src/interop.ts","../../../Masa.Blazor.JS/src/ripple/index.ts","../../../Masa.Blazor.JS/src/main.ts"],"sourcesContent":["/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.push(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.push(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n};\r\n\r\nexport function __runInitializers(thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n};\r\n\r\nexport function __propKey(x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n};\r\n\r\nexport function __setFunctionName(f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n};\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n","export const IN_BROWSER = typeof window !== 'undefined'\r\n\r\nexport function addOnceEventListener (\r\n el: EventTarget,\r\n eventName: string,\r\n cb: (event: Event) => void,\r\n options: boolean | AddEventListenerOptions = false\r\n): void {\r\n const once = (event: Event) => {\r\n cb(event)\r\n el.removeEventListener(eventName, once, options)\r\n }\r\n\r\n el.addEventListener(eventName, once, options)\r\n}\r\n\r\nlet passiveSupported = false\r\ntry {\r\n if (IN_BROWSER) {\r\n const testListenerOpts = Object.defineProperty({}, 'passive', {\r\n get: () => {\r\n passiveSupported = true\r\n },\r\n })\r\n\r\n window.addEventListener('testListener' as any, testListenerOpts as any, testListenerOpts)\r\n window.removeEventListener('testListener' as any, testListenerOpts as any, testListenerOpts)\r\n }\r\n} catch (e) { console.warn(e) } /* eslint-disable-line no-console */\r\nexport { passiveSupported }\r\n\r\nexport function addPassiveEventListener (\r\n el: EventTarget,\r\n event: string,\r\n cb: ((e: any) => void),\r\n options: {}\r\n): void {\r\n el.addEventListener(event, cb, passiveSupported ? options : false)\r\n}\r\n\r\nexport function getZIndex (el?: Element | null): number {\r\n if (!el || el.nodeType !== Node.ELEMENT_NODE) return 0\r\n\r\n const index = +window.getComputedStyle(el).getPropertyValue('z-index')\r\n\r\n if (!index) return getZIndex(el.parentNode as Element)\r\n return index\r\n}\r\n\r\n// KeyboardEvent.keyCode aliases\r\nexport const keyCodes = Object.freeze({\r\n enter: 13,\r\n tab: 9,\r\n delete: 46,\r\n esc: 27,\r\n space: 32,\r\n up: 38,\r\n down: 40,\r\n left: 37,\r\n right: 39,\r\n end: 35,\r\n home: 36,\r\n del: 46,\r\n backspace: 8,\r\n insert: 45,\r\n pageup: 33,\r\n pagedown: 34,\r\n shift: 16,\r\n})\r\n\r\n/** Polyfill for Event.prototype.composedPath */\r\nexport function composedPath (e: Event): EventTarget[] {\r\n if (e.composedPath) return e.composedPath()\r\n\r\n const path = []\r\n let el = e.target as Element\r\n\r\n while (el) {\r\n path.push(el)\r\n\r\n if (el.tagName === 'HTML') {\r\n path.push(document)\r\n path.push(window)\r\n\r\n return path\r\n }\r\n\r\n el = el.parentElement!\r\n }\r\n return path\r\n}\r\n\r\nexport function getBlazorId(el) {\r\n if (!el) {\r\n return null;\r\n }\r\n let _bl_ = el.getAttributeNames().find(a => a.startsWith('_bl_'))\r\n if (_bl_) {\r\n _bl_ = _bl_.substring(4);\r\n }\r\n\r\n return _bl_;\r\n}\r\n\r\nexport function getElementSelector(el) {\r\n if (!(el instanceof Element))\r\n return;\r\n var path = [];\r\n while (el.nodeType === Node.ELEMENT_NODE) {\r\n var selector = el.nodeName.toLowerCase();\r\n if (el.id) {\r\n selector = '#' + el.id;\r\n path.unshift(selector);\r\n break;\r\n } else {\r\n var sib = el, nth = 1;\r\n while (sib = sib.previousElementSibling) {\r\n if (sib.nodeName.toLowerCase() == selector)\r\n nth++;\r\n }\r\n if (nth != 1)\r\n selector += \":nth-of-type(\" + nth + \")\";\r\n }\r\n path.unshift(selector);\r\n el = el.parentNode;\r\n }\r\n return path.join(\" > \");\r\n}\r\n\r\nexport function getEventTarget(target: HTMLElement | EventTarget) {\r\n const el = target as HTMLElement;\r\n const eventTarget: MbEventTarget = {};\r\n const elementReferenceId = el\r\n .getAttributeNames()\r\n .find((a) => a.startsWith(\"_bl_\"));\r\n if (elementReferenceId) {\r\n eventTarget.elementReferenceId = elementReferenceId;\r\n eventTarget.selector = `[${elementReferenceId}]`;\r\n } else {\r\n eventTarget.selector = getElementSelector(el);\r\n }\r\n\r\n eventTarget.class = el.getAttribute(\"class\");\r\n\r\n return eventTarget;\r\n}\r\n\r\nexport function getDom(elOrString: Element | string | undefined) {\r\n let element: HTMLElement;\r\n\r\n try {\r\n if (!elOrString) {\r\n element = document.body;\r\n } else if (typeof elOrString === \"string\") {\r\n if (elOrString === \"document\") {\r\n element = document.documentElement;\r\n } else if (elOrString.indexOf(\"__.__\") > 0) {\r\n // for example: el__.__parentElement\r\n let array = elOrString.split(\"__.__\");\r\n let i = 0;\r\n let el = document.querySelector(array[i++]);\r\n\r\n if (el) {\r\n while (array[i]) {\r\n el = el[array[i]];\r\n i++;\r\n }\r\n }\r\n\r\n if (el instanceof HTMLElement) {\r\n element = el;\r\n }\r\n } else {\r\n element = document.querySelector(elOrString);\r\n }\r\n } else {\r\n element = elOrString as HTMLElement;\r\n }\r\n\r\n } catch (error) {\r\n console.error(error)\r\n }\r\n\r\n return element;\r\n}\r\n\r\nexport const canUseDom = !!(\r\n IN_BROWSER &&\r\n typeof document !== 'undefined' &&\r\n window.document &&\r\n window.document.createElement\r\n)\r\n\r\nexport function convertToUnit (str: number, unit?: string): string\r\nexport function convertToUnit (str: string | number | null | undefined, unit?: string): string | undefined\r\nexport function convertToUnit (str: string | number | null | undefined, unit = 'px'): string | undefined {\r\n if (str == null || str === '') {\r\n return undefined\r\n } else if (isNaN(+str!)) {\r\n return String(str)\r\n } else if (!isFinite(+str!)) {\r\n return undefined\r\n } else {\r\n return `${Number(str)}${unit}`\r\n }\r\n}","// see https://github.com/dotnet/aspnetcore/blob/main/src/Components/Web.JS/src/Rendering/Events/EventTypes.ts\r\n// updated at 2022/08/31\r\n\r\nexport const touchEvents = [\r\n \"touchcancel\",\r\n \"touchend\",\r\n \"touchmove\",\r\n \"touchenter\",\r\n \"touchleave\",\r\n \"touchstart\",\r\n];\r\n\r\nexport function parseMouseEvent(event: MouseEvent): Blazor.MouseEventArgs {\r\n return {\r\n detail: event.detail,\r\n screenX: event.screenX,\r\n screenY: event.screenY,\r\n clientX: event.clientX,\r\n clientY: event.clientY,\r\n offsetX: event.offsetX,\r\n offsetY: event.offsetY,\r\n pageX: event.pageX,\r\n pageY: event.pageY,\r\n button: event.button,\r\n buttons: event.buttons,\r\n ctrlKey: event.ctrlKey,\r\n shiftKey: event.shiftKey,\r\n altKey: event.altKey,\r\n metaKey: event.metaKey,\r\n type: event.type,\r\n } as Blazor.MouseEventArgs;\r\n}\r\n\r\nexport function parseTouchEvent(event: TouchEvent): Blazor.TouchEventArgs {\r\n return {\r\n detail: event.detail,\r\n touches: parseTouch(event.touches),\r\n targetTouches: parseTouch(event.targetTouches),\r\n changedTouches: parseTouch(event.changedTouches),\r\n ctrlKey: event.ctrlKey,\r\n shiftKey: event.shiftKey,\r\n altKey: event.altKey,\r\n metaKey: event.metaKey,\r\n type: event.type,\r\n };\r\n}\r\n\r\nfunction parseTouch(touchList: TouchList): Blazor.TouchPoint[] {\r\n const touches: Blazor.TouchPoint[] = [];\r\n\r\n for (let i = 0; i < touchList.length; i++) {\r\n const touch = touchList[i];\r\n touches.push({\r\n identifier: touch.identifier,\r\n clientX: touch.clientX,\r\n clientY: touch.clientY,\r\n screenX: touch.screenX,\r\n screenY: touch.screenY,\r\n pageX: touch.pageX,\r\n pageY: touch.pageY,\r\n });\r\n }\r\n return touches;\r\n}\r\n\r\nexport function parseChangeEvent(event: Event): Blazor.ChangeEventArgs {\r\n const element = event.target as Element;\r\n if (isTimeBasedInput(element)) {\r\n const normalizedValue = normalizeTimeBasedValue(element);\r\n return { value: normalizedValue };\r\n } else if (isMultipleSelectInput(element)) {\r\n const selectElement = element as HTMLSelectElement;\r\n const selectedValues = Array.from(selectElement.options)\r\n .filter((option) => option.selected)\r\n .map((option) => option.value);\r\n return { value: selectedValues };\r\n } else {\r\n const targetIsCheckbox = isCheckbox(element);\r\n const newValue = targetIsCheckbox ? !!element[\"checked\"] : element[\"value\"];\r\n return { value: newValue };\r\n }\r\n}\r\n\r\nexport function parseDragEvent(event: DragEvent): Blazor.DragEventArgs {\r\n return {\r\n ...parseMouseEvent(event),\r\n dataTransfer: event.dataTransfer ? {\r\n dropEffect: event.dataTransfer.dropEffect,\r\n effectAllowed: event.dataTransfer.effectAllowed,\r\n files: Array.from(event.dataTransfer.files).map(f => f.name),\r\n items: Array.from(event.dataTransfer.items).map(i => ({ kind: i.kind, type: i.type })),\r\n types: event.dataTransfer.types\r\n } : null,\r\n };\r\n}\r\n\r\nfunction isTimeBasedInput(element: Element): element is HTMLInputElement {\r\n return timeBasedInputs.indexOf(element.getAttribute(\"type\")!) !== -1;\r\n}\r\n\r\nconst timeBasedInputs = [\"date\", \"datetime-local\", \"month\", \"time\", \"week\"];\r\n\r\nfunction normalizeTimeBasedValue(element: HTMLInputElement): string {\r\n const value = element.value;\r\n const type = element.type;\r\n switch (type) {\r\n case \"date\":\r\n case \"month\":\r\n return value;\r\n case \"datetime-local\":\r\n return value.length === 16 ? value + \":00\" : value; // Convert yyyy-MM-ddTHH:mm to yyyy-MM-ddTHH:mm:00\r\n case \"time\":\r\n return value.length === 5 ? value + \":00\" : value; // Convert hh:mm to hh:mm:00\r\n case \"week\":\r\n // For now we are not going to normalize input type week as it is not trivial\r\n return value;\r\n }\r\n\r\n throw new Error(`Invalid element type '${type}'.`);\r\n}\r\n\r\nfunction isMultipleSelectInput(element: Element): element is HTMLSelectElement {\r\n return (\r\n element instanceof HTMLSelectElement && element.type === \"select-multiple\"\r\n );\r\n}\r\n\r\nfunction isCheckbox(element: Element | null): boolean {\r\n return (\r\n !!element &&\r\n element.tagName === \"INPUT\" &&\r\n element.getAttribute(\"type\") === \"checkbox\"\r\n );\r\n}\r\n","import { getEventTarget } from \"../utils/helper\";\r\nimport { parseDragEvent, parseMouseEvent, parseTouchEvent } from \"./EventType\";\r\n\r\nexport function registerExtraMouseEvent(eventType: string, eventName: string) {\r\n if (Blazor) {\r\n Blazor.registerCustomEventType(eventType, {\r\n browserEventName: eventName,\r\n createEventArgs: e => createSharedEventArgs(\"mouse\", e)\r\n })\r\n }\r\n}\r\n\r\nexport function registerExtraTouchEvent(eventType: string, eventName: string) {\r\n if (Blazor) {\r\n Blazor.registerCustomEventType(eventType, {\r\n browserEventName: eventName,\r\n createEventArgs: e => createSharedEventArgs(\"touch\", e)\r\n })\r\n }\r\n}\r\n\r\nexport function registerExtraDropEvent(eventType: string, eventName: string) {\r\n if (Blazor) {\r\n Blazor.registerCustomEventType(eventType, {\r\n browserEventName: eventName,\r\n createEventArgs: (e: DragEvent) => {\r\n const eventArgs = parseDragEvent(e);\r\n const value = e.dataTransfer.getData('data-value');\r\n const offsetX = e.dataTransfer.getData('offsetX');\r\n const offsetY = e.dataTransfer.getData('offsetY');\r\n\r\n eventArgs.dataTransfer['data'] = {\r\n value,\r\n offsetX: Number(offsetX),\r\n offsetY: Number(offsetY)\r\n }\r\n\r\n return eventArgs;\r\n }\r\n })\r\n }\r\n}\r\n\r\nexport function createSharedEventArgs(type: \"mouse\" | \"touch\", e: Event,) {\r\n let args = { target: {} }\r\n if (type === 'mouse') {\r\n args = {\r\n ...args,\r\n ...parseMouseEvent(e as MouseEvent)\r\n }\r\n } else if (type === 'touch') {\r\n args = {\r\n ...args,\r\n ...parseTouchEvent(e as TouchEvent)\r\n }\r\n }\r\n\r\n args.target = getEventTarget(e.target);\r\n\r\n return args;\r\n}","import { createSharedEventArgs } from \"events/extra\";\r\nimport { addOnceEventListener, passiveSupported } from \"utils/helper\";\r\n\r\nlet sliderHandleId = 0;\r\nconst sliderHandlesById = {};\r\n\r\nexport function registerSliderEvents(\r\n el: HTMLElement,\r\n dotnetHelper: DotNet.DotNetObject\r\n) {\r\n sliderHandlesById[sliderHandleId] = onSliderMouseDown;\r\n\r\n const app = document.querySelector(\"[data-app]\");\r\n\r\n const mouseUpOptions = passiveSupported\r\n ? { passive: true, capture: true }\r\n : true;\r\n\r\n const mouseMoveOptions = passiveSupported ? { passive: true } : false;\r\n\r\n el.addEventListener(\"mousedown\", onSliderMouseDown);\r\n el.addEventListener(\"touchstart\", onSliderMouseDown);\r\n\r\n return sliderHandleId++;\r\n\r\n async function onSliderMouseDown(e: MouseEvent | TouchEvent) {\r\n const isTouchEvent = \"touches\" in e;\r\n\r\n onMouseMove(e);\r\n\r\n app.addEventListener(\r\n isTouchEvent ? \"touchmove\" : \"mousemove\",\r\n onMouseMove,\r\n mouseMoveOptions\r\n );\r\n addOnceEventListener(\r\n app,\r\n isTouchEvent ? \"touchend\" : \"mouseup\",\r\n onSliderMouseUp,\r\n mouseUpOptions\r\n );\r\n\r\n if (isTouchEvent) {\r\n await dotnetHelper.invokeMethodAsync(\r\n \"OnTouchStartInternal\",\r\n createSharedEventArgs(\"touch\", e)\r\n );\r\n } else {\r\n await dotnetHelper.invokeMethodAsync(\r\n \"OnMouseDownInternal\",\r\n createSharedEventArgs(\"mouse\", e)\r\n );\r\n }\r\n }\r\n\r\n async function onSliderMouseUp(e: Event) {\r\n e.stopPropagation();\r\n\r\n app.removeEventListener(\"touchmove\", onMouseMove, mouseMoveOptions as any);\r\n app.removeEventListener(\"mousemove\", onMouseMove, mouseMoveOptions as any);\r\n\r\n await dotnetHelper.invokeMethodAsync(\"OnMouseUpInternal\");\r\n }\r\n\r\n async function onMouseMove(e: MouseEvent | TouchEvent) {\r\n const isTouchEvent = \"touches\" in e;\r\n const payload = {\r\n type: e.type,\r\n clientX: isTouchEvent ? e.touches[0].clientX : e.clientX,\r\n clientY: isTouchEvent ? e.touches[0].clientY : e.clientY,\r\n };\r\n\r\n await dotnetHelper.invokeMethodAsync(\"OnMouseMoveInternal\", payload);\r\n }\r\n}\r\n\r\nexport function unregisterSliderEvents(el: HTMLElement, id: number) {\r\n if (el) {\r\n const onSliderMouseDown = sliderHandlesById[id];\r\n el.removeEventListener(\"mousedown\", onSliderMouseDown);\r\n el.removeEventListener(\"touchstart\", onSliderMouseDown);\r\n\r\n delete sliderHandlesById[id];\r\n }\r\n}\r\n","\r\nlet textareaAutoGrowNextId = 0;\r\nconst textareaAutoGrowMap: {\r\n [prop: string]: (e: HTMLElementEventMap['input']) => void;\r\n} = {}\r\n\r\nexport function registerTextareaAutoGrowEvent(input: HTMLElement) {\r\n const id = textareaAutoGrowNextId;\r\n const inputCallback = (e: HTMLElementEventMap['input']) => {\r\n const target = e.target as HTMLTextAreaElement;\r\n const autoGrow = target.getAttribute('data-auto-grow');\r\n if (autoGrow === undefined) {\r\n return;\r\n }\r\n const rows = target.getAttribute('rows');\r\n const rowHeight = target.getAttribute('data-row-height');\r\n calculateTextareaHeight(target, rows, rowHeight)\r\n };\r\n\r\n textareaAutoGrowMap[id] = inputCallback;\r\n\r\n input.addEventListener('input', inputCallback)\r\n\r\n return textareaAutoGrowNextId++;\r\n}\r\n\r\nexport function unregisterTextareaAutoGrowEvent(input: HTMLElement, textareaAutoGrowNextId: number) {\r\n if (!input) return;\r\n const inputCallback = textareaAutoGrowMap[textareaAutoGrowNextId];\r\n if (inputCallback) {\r\n input.removeEventListener('input', inputCallback);\r\n }\r\n}\r\n\r\nexport function calculateTextareaHeight(textarea: HTMLTextAreaElement, rows: string, rowHeight: string) {\r\n textarea.style.height = '0'\r\n const height = textarea.scrollHeight;\r\n const minHeight = parseInt(rows, 10) * parseFloat(rowHeight);\r\n textarea.style.height = Math.max(height, minHeight) + 'px';\r\n}","var functionDebounce = debounce;\n\nfunction debounce(fn, wait, callFirst) {\n var timeout = null;\n var debouncedFn = null;\n\n var clear = function() {\n if (timeout) {\n clearTimeout(timeout);\n\n debouncedFn = null;\n timeout = null;\n }\n };\n\n var flush = function() {\n var call = debouncedFn;\n clear();\n\n if (call) {\n call();\n }\n };\n\n var debounceWrapper = function() {\n if (!wait) {\n return fn.apply(this, arguments);\n }\n\n var context = this;\n var args = arguments;\n var callNow = callFirst && !timeout;\n clear();\n\n debouncedFn = function() {\n fn.apply(context, args);\n };\n\n timeout = setTimeout(function() {\n timeout = null;\n\n if (!callNow) {\n var call = debouncedFn;\n debouncedFn = null;\n\n return call();\n }\n }, wait);\n\n if (callNow) {\n return debouncedFn();\n }\n };\n\n debounceWrapper.cancel = clear;\n debounceWrapper.flush = flush;\n\n return debounceWrapper;\n}\n\nexport {functionDebounce as default};\n","var functionThrottle = throttle;\n\nfunction throttle(fn, interval, options) {\n var timeoutId = null;\n var throttledFn = null;\n var leading = (options && options.leading);\n var trailing = (options && options.trailing);\n\n if (leading == null) {\n leading = true; // default\n }\n\n if (trailing == null) {\n trailing = !leading; //default\n }\n\n if (leading == true) {\n trailing = false; // forced because there should be invocation per call\n }\n\n var cancel = function() {\n if (timeoutId) {\n clearTimeout(timeoutId);\n timeoutId = null;\n }\n };\n\n var flush = function() {\n var call = throttledFn;\n cancel();\n\n if (call) {\n call();\n }\n };\n\n var throttleWrapper = function() {\n var callNow = leading && !timeoutId;\n var context = this;\n var args = arguments;\n\n throttledFn = function() {\n return fn.apply(context, args);\n };\n\n if (!timeoutId) {\n timeoutId = setTimeout(function() {\n timeoutId = null;\n\n if (trailing) {\n return throttledFn();\n }\n }, interval);\n }\n\n if (callNow) {\n callNow = false;\n return throttledFn();\n }\n };\n\n throttleWrapper.cancel = cancel;\n throttleWrapper.flush = flush;\n\n return throttleWrapper;\n}\n\nexport {functionThrottle as default};\n","import { parseMouseEvent } from \"./EventType\";\r\nimport { registerExtraDropEvent, registerExtraMouseEvent, registerExtraTouchEvent } from \"./extra\";\r\n\r\nexport function registerExtraEvents() {\r\n registerExtraMouseEvent(\"exmousedown\", \"mousedown\");\r\n registerExtraMouseEvent(\"exmouseup\", \"mouseup\");\r\n registerExtraMouseEvent(\"exclick\", \"click\");\r\n registerExtraMouseEvent(\"exmouseleave\", \"mouseleave\");\r\n registerExtraMouseEvent(\"exmouseenter\", \"mouseenter\");\r\n registerExtraMouseEvent(\"exmousemove\", \"mousemove\");\r\n registerExtraTouchEvent(\"extouchstart\", \"touchstart\");\r\n registerEvent(\"transitionend\", \"transitionend\");\r\n registerExtraDropEvent(\"exdrop\", \"drop\");\r\n registerAuxclickEvent();\r\n}\r\n\r\nfunction registerEvent(eventType: string, eventName: string) {\r\n if (Blazor) {\r\n Blazor.registerCustomEventType(eventType, {\r\n browserEventName: eventName,\r\n });\r\n }\r\n}\r\n\r\nfunction registerAuxclickEvent() {\r\n if (Blazor) {\r\n Blazor.registerCustomEventType(\"auxclick\", {\r\n browserEventName: \"auxclick\",\r\n createEventArgs: parseMouseEvent\r\n });\r\n }\r\n}\r\n","import { keyCodes } from \"utils/helper\";\r\n\r\ntype RippleEvent = (MouseEvent | TouchEvent | KeyboardEvent) & {\r\n rippleStop?: boolean;\r\n};\r\n\r\nconst DELAY_RIPPLE = 80;\r\n\r\nfunction transform(el: HTMLElement, value: string) {\r\n el.style.transform = value;\r\n el.style.webkitTransform = value;\r\n}\r\n\r\nexport interface RippleOptions {\r\n class?: string;\r\n center?: boolean;\r\n circle?: boolean;\r\n}\r\n\r\nfunction isTouchEvent(e: RippleEvent): e is TouchEvent {\r\n return e.constructor.name === \"TouchEvent\";\r\n}\r\n\r\nfunction isKeyboardEvent(e: RippleEvent): e is KeyboardEvent {\r\n return e.constructor.name === \"KeyboardEvent\";\r\n}\r\n\r\nconst calculate = (\r\n e: RippleEvent,\r\n el: HTMLElement,\r\n value: RippleOptions = {}\r\n) => {\r\n let localX = 0;\r\n let localY = 0;\r\n\r\n if (!isKeyboardEvent(e)) {\r\n const offset = el.getBoundingClientRect();\r\n const target = isTouchEvent(e) ? e.touches[e.touches.length - 1] : e;\r\n\r\n localX = target.clientX - offset.left;\r\n localY = target.clientY - offset.top;\r\n }\r\n\r\n let radius = 0;\r\n let scale = 0.3;\r\n if (el._ripple && el._ripple.circle) {\r\n scale = 0.15;\r\n radius = el.clientWidth / 2;\r\n radius = value.center\r\n ? radius\r\n : radius + Math.sqrt((localX - radius) ** 2 + (localY - radius) ** 2) / 4;\r\n } else {\r\n radius = Math.sqrt(el.clientWidth ** 2 + el.clientHeight ** 2) / 2;\r\n }\r\n\r\n const centerX = `${(el.clientWidth - radius * 2) / 2}px`;\r\n const centerY = `${(el.clientHeight - radius * 2) / 2}px`;\r\n\r\n const x = value.center ? centerX : `${localX - radius}px`;\r\n const y = value.center ? centerY : `${localY - radius}px`;\r\n\r\n return { radius, scale, x, y, centerX, centerY };\r\n};\r\n\r\nconst ripples = {\r\n /* eslint-disable max-statements */\r\n show(e: RippleEvent, el: HTMLElement, value: RippleOptions = {}) {\r\n if (!el._ripple || !el._ripple.enabled) {\r\n return;\r\n }\r\n\r\n const container = document.createElement(\"span\");\r\n const animation = document.createElement(\"span\");\r\n\r\n container.appendChild(animation);\r\n container.className = \"m-ripple__container\";\r\n\r\n if (value.class) {\r\n container.className += ` ${value.class}`;\r\n }\r\n\r\n const { radius, scale, x, y, centerX, centerY } = calculate(e, el, value);\r\n\r\n const size = `${radius * 2}px`;\r\n animation.className = \"m-ripple__animation\";\r\n animation.style.width = size;\r\n animation.style.height = size;\r\n\r\n el.appendChild(container);\r\n\r\n const computed = window.getComputedStyle(el);\r\n if (computed && computed.position === \"static\") {\r\n el.style.position = \"relative\";\r\n el.dataset.previousPosition = \"static\";\r\n }\r\n\r\n animation.classList.add(\"m-ripple__animation--enter\");\r\n animation.classList.add(\"m-ripple__animation--visible\");\r\n transform(\r\n animation,\r\n `translate(${x}, ${y}) scale3d(${scale},${scale},${scale})`\r\n );\r\n animation.dataset.activated = String(performance.now());\r\n\r\n setTimeout(() => {\r\n animation.classList.remove(\"m-ripple__animation--enter\");\r\n animation.classList.add(\"m-ripple__animation--in\");\r\n transform(animation, `translate(${centerX}, ${centerY}) scale3d(1,1,1)`);\r\n }, 0);\r\n },\r\n\r\n hide(el: HTMLElement | null) {\r\n if (!el || !el._ripple || !el._ripple.enabled) return;\r\n\r\n const ripples = el.getElementsByClassName(\"m-ripple__animation\");\r\n\r\n if (ripples.length === 0) return;\r\n const animation = ripples[ripples.length - 1];\r\n\r\n if (animation.dataset.isHiding) return;\r\n else animation.dataset.isHiding = \"true\";\r\n\r\n const diff = performance.now() - Number(animation.dataset.activated);\r\n const delay = Math.max(250 - diff, 0);\r\n\r\n setTimeout(() => {\r\n animation.classList.remove(\"m-ripple__animation--in\");\r\n animation.classList.add(\"m-ripple__animation--out\");\r\n\r\n setTimeout(() => {\r\n const ripples = el.getElementsByClassName(\"m-ripple__animation\");\r\n if (ripples.length === 1 && el.dataset.previousPosition) {\r\n el.style.position = el.dataset.previousPosition;\r\n delete el.dataset.previousPosition;\r\n }\r\n\r\n if (animation.parentNode?.parentNode === el)\r\n el.removeChild(animation.parentNode);\r\n }, 300);\r\n }, delay);\r\n },\r\n};\r\n\r\nfunction rippleShow(e: RippleEvent) {\r\n const value: RippleOptions = {};\r\n const element = e.currentTarget as HTMLElement;\r\n\r\n if (!element || !element._ripple || element._ripple.touched || e.rippleStop)\r\n return;\r\n\r\n // Don't allow the event to trigger ripples on any other elements\r\n e.rippleStop = true;\r\n\r\n if (isTouchEvent(e)) {\r\n element._ripple.touched = true;\r\n element._ripple.isTouch = true;\r\n } else {\r\n // It's possible for touch events to fire\r\n // as mouse events on Android/iOS, this\r\n // will skip the event call if it has\r\n // already been registered as touch\r\n if (element._ripple.isTouch) return;\r\n }\r\n value.center = element._ripple.centered || isKeyboardEvent(e);\r\n if (element._ripple.class) {\r\n value.class = element._ripple.class;\r\n }\r\n\r\n if (isTouchEvent(e)) {\r\n // already queued that shows or hides the ripple\r\n if (element._ripple.showTimerCommit) return;\r\n\r\n element._ripple.showTimerCommit = () => {\r\n ripples.show(e, element, value);\r\n };\r\n element._ripple.showTimer = window.setTimeout(() => {\r\n if (element && element._ripple && element._ripple.showTimerCommit) {\r\n element._ripple.showTimerCommit();\r\n element._ripple.showTimerCommit = null;\r\n }\r\n }, DELAY_RIPPLE);\r\n } else {\r\n ripples.show(e, element, value);\r\n }\r\n}\r\n\r\nfunction rippleHide(e: Event) {\r\n const element = e.currentTarget as HTMLElement | null;\r\n if (!element || !element._ripple) return;\r\n\r\n window.clearTimeout(element._ripple.showTimer);\r\n\r\n // The touch interaction occurs before the show timer is triggered.\r\n // We still want to show ripple effect.\r\n if (e.type === \"touchend\" && element._ripple.showTimerCommit) {\r\n element._ripple.showTimerCommit();\r\n element._ripple.showTimerCommit = null;\r\n\r\n // re-queue ripple hiding\r\n var timerHandler: TimerHandler = () => rippleHide(e);\r\n element._ripple.showTimer = setTimeout(timerHandler);\r\n return;\r\n }\r\n\r\n window.setTimeout(() => {\r\n if (element._ripple) {\r\n element._ripple.touched = false;\r\n }\r\n });\r\n ripples.hide(element);\r\n}\r\n\r\nfunction rippleCancelShow(e: MouseEvent | TouchEvent) {\r\n const element = e.currentTarget as HTMLElement | undefined;\r\n\r\n if (!element || !element._ripple) return;\r\n\r\n if (element._ripple.showTimerCommit) {\r\n element._ripple.showTimerCommit = null;\r\n }\r\n\r\n window.clearTimeout(element._ripple.showTimer);\r\n}\r\n\r\nfunction keyboardRippleShow(e: KeyboardEvent) {\r\n const target = e.currentTarget as HTMLElement;\r\n if (\r\n !target[\"keyboardRipple\"] &&\r\n (e.keyCode === keyCodes.enter || e.keyCode === keyCodes.space)\r\n ) {\r\n target[\"keyboardRipple\"] = true;\r\n rippleShow(e);\r\n }\r\n}\r\n\r\nfunction keyboardRippleHide(e: KeyboardEvent) {\r\n const target = e.currentTarget as HTMLElement;\r\n target[\"keyboardRipple\"] = false;\r\n rippleHide(e);\r\n}\r\n\r\nfunction focusRippleHide(e: FocusEvent) {\r\n const target = e.currentTarget as HTMLElement;\r\n if (target[\"keyboardRipple\"] === true) {\r\n target[\"keyboardRipple\"] = false;\r\n rippleHide(e);\r\n }\r\n}\r\nexport function updateRipple(\r\n el: HTMLElement,\r\n options: RippleOptions | null,\r\n wasEnabled: boolean\r\n) {\r\n let enabled = false;\r\n if (options) {\r\n enabled = true;\r\n } else {\r\n ripples.hide(el);\r\n }\r\n\r\n const value = options || {};\r\n el._ripple = el._ripple || {};\r\n el._ripple.enabled = enabled;\r\n el._ripple = {\r\n ...el._ripple,\r\n centered: value.center,\r\n class: value.class,\r\n circle: value.circle,\r\n };\r\n\r\n if (enabled && !wasEnabled) {\r\n el.addEventListener(\"touchstart\", rippleShow, { passive: true });\r\n el.addEventListener(\"touchend\", rippleHide, { passive: true });\r\n el.addEventListener(\"touchmove\", rippleCancelShow, { passive: true });\r\n el.addEventListener(\"touchcancel\", rippleHide);\r\n\r\n el.addEventListener(\"mousedown\", rippleShow);\r\n el.addEventListener(\"mouseup\", rippleHide);\r\n el.addEventListener(\"mouseleave\", rippleHide);\r\n\r\n el.addEventListener(\"keydown\", keyboardRippleShow);\r\n el.addEventListener(\"keyup\", keyboardRippleHide);\r\n\r\n el.addEventListener(\"blur\", focusRippleHide);\r\n\r\n // Anchor tags can be dragged, causes other hides to fail - #1537\r\n el.addEventListener(\"dragstart\", rippleHide, { passive: true });\r\n } else if (!enabled && wasEnabled) {\r\n removeListeners(el);\r\n }\r\n}\r\n\r\nexport function removeListeners(el: HTMLElement) {\r\n el.removeEventListener(\"mousedown\", rippleShow);\r\n el.removeEventListener(\"touchstart\", rippleShow);\r\n el.removeEventListener(\"touchend\", rippleHide);\r\n el.removeEventListener(\"touchmove\", rippleCancelShow);\r\n el.removeEventListener(\"touchcancel\", rippleHide);\r\n el.removeEventListener(\"mouseup\", rippleHide);\r\n el.removeEventListener(\"mouseleave\", rippleHide);\r\n el.removeEventListener(\"keydown\", keyboardRippleShow);\r\n el.removeEventListener(\"keyup\", keyboardRippleHide);\r\n el.removeEventListener(\"dragstart\", rippleHide);\r\n el.removeEventListener(\"blur\", focusRippleHide);\r\n el._ripple.enabled = false;\r\n}\r\n","import debounceIt from \"just-debounce-it\";\r\nimport throttle from \"just-throttle\";\r\n\r\nimport { parseDragEvent, parseTouchEvent, touchEvents } from \"./events/EventType\";\r\nimport { registerExtraEvents } from \"./events/index\";\r\nimport registerRippleObserver from \"./ripple\";\r\nimport { canUseDom, getBlazorId, getDom, getElementSelector, IN_BROWSER } from \"./utils/helper\";\r\n\r\nwindow.onload = function () {\r\n registerExtraEvents();\r\n registerPasteWithData(\"pastewithdata\")\r\n registerRippleObserver();\r\n}\r\n\r\nexport function getZIndex(el?: Element | null): number {\r\n if (!el || el.nodeType !== Node.ELEMENT_NODE) return 0\r\n\r\n const index = +window.getComputedStyle(el).getPropertyValue('z-index')\r\n\r\n if (!index) return getZIndex(el.parentNode as Element)\r\n return index\r\n}\r\n\r\nexport function getDomInfo(element, selector = \"body\") {\r\n var result = {};\r\n\r\n var dom = getDom(element);\r\n\r\n if (dom) {\r\n if (dom.style && dom.style[\"display\"] === \"none\") {\r\n // clone and set display not none because\r\n // element with display:none can not get the dom info\r\n var cloned = dom.cloneNode(true) as HTMLElement;\r\n cloned.style[\"display\"] = \"inline-block\";\r\n cloned.style[\"z-index\"] = -1000;\r\n dom.parentElement.appendChild(cloned);\r\n\r\n result = getDomInfoObj(cloned);\r\n\r\n dom.parentElement.removeChild(cloned);\r\n } else {\r\n result = getDomInfoObj(dom);\r\n }\r\n }\r\n\r\n return result;\r\n}\r\n\r\nfunction getDomInfoObj(dom: HTMLElement) {\r\n var result = {};\r\n result[\"offsetTop\"] = dom.offsetTop || 0;\r\n result[\"offsetLeft\"] = dom.offsetLeft || 0;\r\n result[\"scrollHeight\"] = dom.scrollHeight || 0;\r\n result[\"scrollWidth\"] = dom.scrollWidth || 0;\r\n result[\"scrollLeft\"] = dom.scrollLeft || 0;\r\n result[\"scrollTop\"] = dom.scrollTop || 0;\r\n result[\"clientTop\"] = dom.clientTop || 0;\r\n result[\"clientLeft\"] = dom.clientLeft || 0;\r\n result[\"clientHeight\"] = dom.clientHeight || 0;\r\n result[\"clientWidth\"] = dom.clientWidth || 0;\r\n var position = getElementPos(dom);\r\n result[\"offsetWidth\"] = Math.round(position.offsetWidth) || 0;\r\n result[\"offsetHeight\"] = Math.round(position.offsetHeight) || 0;\r\n result[\"relativeTop\"] = Math.round(position.relativeTop) || 0;\r\n result[\"relativeBottom\"] = Math.round(position.relativeBottom) || 0;\r\n result[\"relativeLeft\"] = Math.round(position.relativeLeft) || 0;\r\n result[\"relativeRight\"] = Math.round(position.relativeRight) || 0;\r\n result[\"absoluteLeft\"] = Math.round(position.absoluteLeft) || 0;\r\n result[\"absoluteTop\"] = Math.round(position.absoluteTop) || 0;\r\n return result;\r\n}\r\n\r\nfunction getElementPos(element) {\r\n var res: any = new Object();\r\n res.x = 0;\r\n res.y = 0;\r\n if (element !== null) {\r\n if (element.getBoundingClientRect) {\r\n var viewportElement = document.documentElement;\r\n var box = element.getBoundingClientRect();\r\n var scrollLeft = viewportElement.scrollLeft;\r\n var scrollTop = viewportElement.scrollTop;\r\n\r\n res.offsetWidth = box.width;\r\n res.offsetHeight = box.height;\r\n res.relativeTop = box.top;\r\n res.relativeBottom = box.bottom;\r\n res.relativeLeft = box.left;\r\n res.relativeRight = box.right;\r\n res.absoluteLeft = box.left + scrollLeft;\r\n res.absoluteTop = box.top + scrollTop;\r\n }\r\n }\r\n return res;\r\n}\r\n\r\nexport function getParentClientWidthOrWindowInnerWidth(element: HTMLElement) {\r\n return element.parentElement ? element.parentElement.clientWidth : window.innerWidth;\r\n}\r\n\r\nexport function triggerEvent(elOrString, eventName: string, eventType: string, stopPropagation: boolean) {\r\n var dom = getDom(elOrString);\r\n var evt = document.createEvent(eventName);\r\n evt.initEvent(eventType);\r\n\r\n if (stopPropagation) {\r\n evt.stopPropagation();\r\n }\r\n\r\n return dom.dispatchEvent(evt);\r\n}\r\n\r\nexport function setProperty(elOrString, name, value) {\r\n var dom = getDom(elOrString);\r\n dom[name] = value;\r\n}\r\n\r\nexport function getBoundingClientRect(elOrString, attach = \"body\") {\r\n let dom = getDom(elOrString);\r\n\r\n var result = {};\r\n\r\n if (dom && dom.getBoundingClientRect) {\r\n if (dom.style && dom.style[\"display\"] === \"none\") {\r\n var cloned = dom.cloneNode(true) as HTMLElement;\r\n cloned.style[\"display\"] = \"inline-block\";\r\n cloned.style[\"z-index\"] = -1000;\r\n document.querySelector(attach)?.appendChild(cloned);\r\n\r\n result = cloned.getBoundingClientRect();\r\n\r\n document.querySelector(attach)?.removeChild(cloned);\r\n } else {\r\n result = dom.getBoundingClientRect();\r\n }\r\n }\r\n\r\n return result;\r\n}\r\n\r\nvar htmlElementEventListenerConfigs: { [prop: string]: HtmlElementEventListenerConfig[] } = {}\r\n\r\ntype HtmlElementEventListenerConfig = {\r\n listener?: (args: any) => void;\r\n options?: any;\r\n handle?: DotNet.DotNetObject;\r\n}\r\n\r\nexport function addHtmlElementEventListener(\r\n selector: \"window\" | \"document\" | K,\r\n type: string,\r\n invoker: DotNet.DotNetObject,\r\n options?: boolean | AddEventListenerOptions,\r\n extras?: Partial> & { relatedTarget?: string, throttle?: number, debounce?: number, key?: string }) {\r\n let htmlElement: HTMLElement | Window\r\n\r\n if (selector == \"window\") {\r\n htmlElement = window;\r\n } else if (selector == \"document\") {\r\n htmlElement = document.documentElement;\r\n } else {\r\n htmlElement = document.querySelector(selector);\r\n }\r\n\r\n if (!htmlElement) {\r\n // throw new Error(\"Unable to find the element.\");\r\n return false;\r\n }\r\n\r\n var key = extras?.key || `${selector}:${type}`;\r\n\r\n //save for remove\r\n const config: HtmlElementEventListenerConfig = {};\r\n\r\n var listener = (e: any): void => {\r\n if (extras?.stopPropagation) {\r\n e.stopPropagation();\r\n }\r\n\r\n if ((typeof e.cancelable !== \"boolean\" || e.cancelable) && extras?.preventDefault) {\r\n e.preventDefault();\r\n }\r\n\r\n // mouseleave relatedTarget\r\n if (extras?.relatedTarget && document.querySelector(extras.relatedTarget)?.contains(e.relatedTarget)) {\r\n return;\r\n }\r\n\r\n let obj: any = {}\r\n\r\n if (touchEvents.includes(e.type)) {\r\n obj = parseTouchEvent(e)\r\n } else {\r\n for (var k in e) {\r\n if (typeof e[k] == 'string' || typeof e[k] == 'number') {\r\n obj[k] = e[k];\r\n }\r\n }\r\n }\r\n\r\n if (e.target && e.target !== window && e.target !== document) {\r\n obj.target = {}\r\n const target = e.target as HTMLElement;\r\n const elementReferenceId = target.getAttributeNames().find(a => a.startsWith('_bl_'));\r\n if (elementReferenceId) {\r\n obj.target['elementReferenceId'] = elementReferenceId\r\n obj.target['selector'] = `[${elementReferenceId}]`\r\n } else {\r\n obj.target['selector'] = getElementSelector(target)\r\n }\r\n\r\n obj.target['class'] = target.getAttribute('class')\r\n }\r\n\r\n invoker.invokeMethodAsync('Invoke', obj);\r\n };\r\n\r\n if (extras?.debounce && extras.debounce > 0) {\r\n config.listener = debounceIt(listener, extras.debounce)\r\n } else if (extras?.throttle && extras.throttle > 0) {\r\n config.listener = throttle(listener, extras.throttle, { trailing: true })\r\n } else {\r\n config.listener = listener;\r\n }\r\n\r\n config.options = options;\r\n config.handle = invoker\r\n\r\n if (htmlElementEventListenerConfigs[key]) {\r\n htmlElementEventListenerConfigs[key].push(config);\r\n } else {\r\n htmlElementEventListenerConfigs[key] = [config]\r\n }\r\n\r\n htmlElement.addEventListener(type, config.listener, config.options);\r\n\r\n return true;\r\n}\r\n\r\nexport function removeHtmlElementEventListener(selector, type, k?: string) {\r\n let htmlElement: any\r\n\r\n if (selector == \"window\") {\r\n htmlElement = window;\r\n } else if (selector == \"document\") {\r\n htmlElement = document.documentElement;\r\n } else {\r\n htmlElement = document.querySelector(selector);\r\n }\r\n\r\n var k = k || `${selector}:${type}`;\r\n\r\n var configs = htmlElementEventListenerConfigs[k];\r\n\r\n if (configs) {\r\n configs.forEach(item => {\r\n item.handle.dispose();\r\n htmlElement?.removeEventListener(type, item.listener, item.options);\r\n });\r\n\r\n htmlElementEventListenerConfigs[k] = []\r\n }\r\n}\r\n\r\nexport function addMouseleaveEventListener(selector) {\r\n var htmlElement = document.querySelector(selector);\r\n if (htmlElement) {\r\n htmlElement.addEventListener()\r\n }\r\n}\r\n\r\nexport function contains(e1, e2) {\r\n const dom1 = getDom(e1);\r\n if (dom1 && dom1.contains) {\r\n return dom1.contains(getDom(e2));\r\n }\r\n return false;\r\n}\r\n\r\nexport function equalsOrContains(e1: any, e2: any) {\r\n const dom1 = getDom(e1);\r\n const dom2 = getDom(e2);\r\n return !!dom1 && dom1.contains && !!dom2 && (dom1 == dom2 || dom1.contains(dom2));\r\n}\r\n\r\nfunction fallbackCopyTextToClipboard(text) {\r\n var textArea = document.createElement(\"textarea\");\r\n textArea.value = text;\r\n\r\n // Avoid scrolling to bottom\r\n textArea.style.top = \"0\";\r\n textArea.style.left = \"0\";\r\n textArea.style.position = \"fixed\";\r\n\r\n document.body.appendChild(textArea);\r\n textArea.focus();\r\n textArea.select();\r\n\r\n try {\r\n var successful = document.execCommand('copy');\r\n var msg = successful ? 'successful' : 'unsuccessful';\r\n console.log('Fallback: Copying text command was ' + msg);\r\n } catch (err) {\r\n console.error('Fallback: Oops, unable to copy', err);\r\n }\r\n\r\n document.body.removeChild(textArea);\r\n}\r\n\r\nexport function copy(text) {\r\n if (!navigator.clipboard) {\r\n fallbackCopyTextToClipboard(text);\r\n return;\r\n }\r\n navigator.clipboard.writeText(text).then(function () {\r\n console.log('Async: Copying to clipboard was successful!');\r\n }, function (err) {\r\n console.error('Async: Could not copy text: ', err);\r\n });\r\n}\r\n\r\nexport function focus(elOrString, preventScroll: boolean = false) {\r\n let dom = getDom(elOrString);\r\n if (!(dom instanceof HTMLElement)) {\r\n console.error(\"Unable to focus an invalid element\");\r\n } else {\r\n dom.focus({ preventScroll });\r\n }\r\n}\r\n\r\nexport function select(elOrString) {\r\n let dom = getDom(elOrString);\r\n if (!(dom instanceof HTMLInputElement || dom instanceof HTMLTextAreaElement))\r\n throw new Error(\"Unable to select an invalid element\")\r\n dom.select()\r\n}\r\n\r\nexport function hasFocus(selector) {\r\n let dom = getDom(selector);\r\n return (document.activeElement === dom);\r\n}\r\n\r\nexport function blur(selector) {\r\n let dom = getDom(selector);\r\n dom.blur();\r\n}\r\n\r\nexport function log(text) {\r\n console.log(text);\r\n}\r\n\r\nexport function scrollIntoView(target, arg?: boolean | ScrollIntoViewOptions) {\r\n let dom = getDom(target);\r\n if (dom instanceof HTMLElement) {\r\n if (arg === null || arg == undefined) {\r\n dom.scrollIntoView();\r\n } else if (typeof arg === 'boolean') {\r\n dom.scrollIntoView(arg);\r\n } else {\r\n dom.scrollIntoView({\r\n block: arg.block == null ? undefined : arg.block,\r\n inline: arg.inline == null ? undefined : arg.inline,\r\n behavior: arg.behavior\r\n })\r\n }\r\n }\r\n}\r\n\r\nexport function scrollIntoParentView(\r\n target,\r\n inline = false,\r\n start = false,\r\n level = 1,\r\n behavior: ScrollBehavior = \"smooth\",\r\n) {\r\n const dom = getDom(target);\r\n if (dom instanceof HTMLElement) {\r\n let parent: HTMLElement = dom;\r\n while (level > 0) {\r\n parent = parent.parentElement;\r\n level--;\r\n if (!parent) {\r\n return;\r\n }\r\n }\r\n\r\n const options: ScrollToOptions = {\r\n behavior,\r\n };\r\n\r\n if (inline) {\r\n if (start) {\r\n options.left = dom.offsetLeft\r\n } else {\r\n const to = dom.offsetLeft - parent.offsetLeft;\r\n if (to - parent.scrollLeft < 0) {\r\n options.left = to;\r\n } else if (\r\n to + dom.offsetWidth - parent.scrollLeft >\r\n parent.offsetWidth\r\n ) {\r\n options.left = to + dom.offsetWidth - parent.offsetWidth;\r\n }\r\n }\r\n } else {\r\n if (start) {\r\n options.top = dom.offsetTop;\r\n } else {\r\n const to = dom.offsetTop - parent.offsetTop;\r\n if (to - parent.scrollTop < 0) {\r\n options.top = to;\r\n } else if (\r\n to + dom.offsetHeight - parent.scrollTop >\r\n parent.offsetHeight\r\n ) {\r\n options.top = to + dom.offsetHeight - parent.offsetHeight;\r\n }\r\n }\r\n }\r\n\r\n if (options.left || options.top) {\r\n parent.scrollTo(options);\r\n }\r\n }\r\n}\r\n\r\nexport function scrollTo(target, options: ScrollToOptions) {\r\n let dom = getDom(target);\r\n if (dom instanceof HTMLElement) {\r\n const o = {\r\n left: options.left === null ? undefined : options.left,\r\n top: options.top === null ? undefined : options.top,\r\n behavior: options.behavior\r\n }\r\n dom.scrollTo(o)\r\n }\r\n}\r\n\r\nexport function scrollToTarget(\r\n target: string,\r\n container: string = null,\r\n offset: number = 0\r\n) {\r\n const targetEl: HTMLElement = document.querySelector(target);\r\n if (targetEl) {\r\n let top ;\r\n if (container) {\r\n top = targetEl.offsetTop;\r\n } else {\r\n top = targetEl.getBoundingClientRect().top + window.scrollY;\r\n }\r\n const containerEl = container\r\n ? document.querySelector(container)\r\n : document.documentElement\r\n containerEl.scrollTo({\r\n top: top - offset,\r\n behavior: \"smooth\",\r\n });\r\n }\r\n}\r\n\r\nexport function scrollToElement(target, offset: number, behavior?: ScrollBehavior) {\r\n const dom = getDom(target)\r\n if (!dom) return;\r\n const domPosition = dom.getBoundingClientRect().top;\r\n const offsetPosition = domPosition + window.pageYOffset - offset;\r\n window.scrollTo({\r\n top: offsetPosition,\r\n behavior: behavior\r\n })\r\n}\r\n\r\nexport function scrollToActiveElement(\r\n container,\r\n element = \".active\",\r\n position: \"center\" | number = \"center\",\r\n smooth: boolean = false\r\n) {\r\n let containerEl: HTMLElement = getDom(container);\r\n\r\n let activeEl: HTMLElement\r\n if (typeof element === 'string') {\r\n activeEl = container.querySelector(element)\r\n }\r\n\r\n if (!containerEl || !activeEl) {\r\n return;\r\n }\r\n\r\n const top: number = position === 'center' ? activeEl.offsetTop - containerEl.offsetHeight / 2 + activeEl.offsetHeight / 2 : activeEl.offsetTop - position;\r\n\r\n containerEl.scrollTo({ top, behavior: smooth ? 'smooth' : 'auto' });\r\n}\r\n\r\nexport function addClsToFirstChild(element, className) {\r\n var dom = getDom(element);\r\n if (dom.firstElementChild) {\r\n dom.firstElementChild.classList.add(className);\r\n }\r\n}\r\n\r\nexport function removeClsFromFirstChild(element, className) {\r\n var dom = getDom(element);\r\n if (dom.firstElementChild) {\r\n dom.firstElementChild.classList.remove(className);\r\n }\r\n}\r\n\r\nexport function getAbsoluteTop(e) {\r\n var offset = e.offsetTop;\r\n if (e.offsetParent != null) {\r\n offset += getAbsoluteTop(e.offsetParent);\r\n }\r\n return offset;\r\n}\r\n\r\nexport function getAbsoluteLeft(e) {\r\n var offset = e.offsetLeft;\r\n if (e.offsetParent != null) {\r\n offset += getAbsoluteLeft(e.offsetParent);\r\n }\r\n return offset;\r\n}\r\n\r\nexport function addElementToBody(element) {\r\n document.body.appendChild(element);\r\n}\r\n\r\nexport function delElementFromBody(element) {\r\n document.body.removeChild(element);\r\n}\r\n\r\nexport function addElementTo(addElement, elementSelector) {\r\n let parent = getDom(elementSelector);\r\n if (parent && addElement) {\r\n parent.appendChild(addElement);\r\n }\r\n}\r\n\r\nexport function delElementFrom(delElement, elementSelector) {\r\n let parent = getDom(elementSelector);\r\n if (parent && delElement) {\r\n parent.removeChild(delElement);\r\n }\r\n}\r\n\r\nexport function getActiveElement() {\r\n let element = document.activeElement;\r\n let id = element.getAttribute(\"id\") || \"\";\r\n return id;\r\n}\r\n\r\nexport function focusDialog(selector: string, count: number = 0) {\r\n let ele = document.querySelector(selector);\r\n if (ele && !ele.hasAttribute(\"disabled\")) {\r\n setTimeout(() => {\r\n ele.focus();\r\n let curId = \"#\" + getActiveElement();\r\n if (curId !== selector) {\r\n if (count < 10) {\r\n focusDialog(selector, count + 1);\r\n }\r\n }\r\n }, 10);\r\n }\r\n}\r\n\r\nexport function getWindow() {\r\n return {\r\n innerWidth: window.innerWidth,\r\n innerHeight: window.innerHeight,\r\n pageXOffset: window.pageXOffset,\r\n pageYOffset: window.pageYOffset,\r\n isTop: window.scrollY == 0,\r\n isBottom: (window.scrollY + window.innerHeight) == document.body.clientHeight\r\n };\r\n}\r\n\r\nexport function getWindowAndDocumentProps(windowProps: string[] = [], documentProps: string[] = []) {\r\n const obj = {}\r\n\r\n if (windowProps) {\r\n windowProps.forEach(prop => obj[prop] = window[prop]);\r\n obj['pageYOffset'] = getPageYOffset();\r\n }\r\n\r\n if (documentProps) {\r\n documentProps.forEach(prop => obj[prop] = document.documentElement[prop]);\r\n }\r\n\r\n return obj\r\n}\r\n\r\nfunction debounce(func, wait, immediate) {\r\n var timeout;\r\n return () => {\r\n const context = this, args = arguments;\r\n const later = () => {\r\n timeout = null;\r\n if (!immediate) func.apply(this, args);\r\n };\r\n const callNow = immediate && !timeout;\r\n clearTimeout(timeout);\r\n timeout = setTimeout(later, wait);\r\n if (callNow) func.apply(context, args);\r\n };\r\n};\r\n\r\nexport function css(element: any, name: string | object, value: string | null = null) {\r\n var dom = getDom(element);\r\n if (typeof name === 'string') {\r\n dom.style[name] = value;\r\n } else {\r\n for (let key in name) {\r\n if (name.hasOwnProperty(key)) {\r\n dom.style[key] = name[key];\r\n }\r\n }\r\n }\r\n}\r\n\r\nexport function addCls(selector: Element | string, clsName: string | Array) {\r\n let element = getDom(selector);\r\n\r\n if (typeof clsName === \"string\") {\r\n element.classList.add(clsName);\r\n } else {\r\n element.classList.add(...clsName);\r\n }\r\n}\r\n\r\nexport function removeCls(selector: Element | string, clsName: string | Array) {\r\n let element = getDom(selector);\r\n\r\n if (typeof clsName === \"string\") {\r\n element.classList.remove(clsName);\r\n } else {\r\n element.classList.remove(...clsName);\r\n }\r\n}\r\n\r\nexport function elementScrollIntoView(selector: Element | string) {\r\n let element = getDom(selector);\r\n\r\n if (!element)\r\n return;\r\n\r\n element.scrollIntoView({ behavior: 'smooth', block: 'nearest', inline: 'start' });\r\n}\r\n\r\nconst hasScrollbar = () => {\r\n let overflow = document.body.style.overflow;\r\n if (overflow && overflow === \"hidden\") return false;\r\n return document.body.scrollHeight > (window.innerHeight || document.documentElement.clientHeight);\r\n}\r\n\r\nexport function getScroll() {\r\n return { x: window.pageXOffset, y: window.pageYOffset };\r\n}\r\n\r\nfunction isElement(node: Element) {\r\n const ELEMENT_NODE_TYPE = 1;\r\n return (\r\n node.tagName !== \"HTML\" &&\r\n node.tagName !== \"BODY\" &&\r\n node.nodeType == ELEMENT_NODE_TYPE\r\n )\r\n}\r\n\r\nexport function getScrollParent(el: Element | undefined, root: HTMLElement | Window | undefined = undefined) {\r\n root ??= canUseDom ? window : undefined;\r\n\r\n let node = el;\r\n while (node && node !== root && isElement(node)) {\r\n const { overflowY } = window.getComputedStyle(node);\r\n if (/scroll|auto|overlay/i.test(overflowY)) {\r\n return node;\r\n }\r\n\r\n node = node.parentNode as Element;\r\n }\r\n\r\n return root;\r\n}\r\n\r\nexport function getScrollTop(el: HTMLElement | Window): number {\r\n const top = 'scrollTop' in el ? el.scrollTop : el.pageYOffset;\r\n\r\n // iOS scroll bounce cause minus scrollTop\r\n return Math.max(top, 0);\r\n}\r\n\r\nexport function getInnerText(element) {\r\n let dom = getDom(element);\r\n return dom.innerText;\r\n}\r\n\r\nexport function getMenuOrDialogMaxZIndex(exclude: Element[] = [], element: Element) {\r\n const base = getDom(element);\r\n // Start with lowest allowed z-index or z-index of\r\n // base component's element, whichever is greater\r\n const zis = [getZIndex(base)]\r\n\r\n const activeElements = [\r\n ...document.getElementsByClassName('m-menu__content--active'),\r\n ...document.getElementsByClassName('m-dialog__content--active'),\r\n ]\r\n\r\n // Get z-index for all active dialogs\r\n for (let index = 0; index < activeElements.length; index++) {\r\n if (!exclude.includes(activeElements[index])) {\r\n zis.push(getZIndex(activeElements[index]))\r\n }\r\n }\r\n\r\n return Math.max(...zis)\r\n}\r\n\r\nexport function getMaxZIndex() {\r\n return [...document.all].reduce((r, e) => Math.max(r, +window.getComputedStyle(e).zIndex || 0), 0)\r\n}\r\n\r\nexport function getStyle(element, styleProp) {\r\n element = getDom(element);\r\n\r\n if (element.currentStyle) {\r\n return element.currentStyle[styleProp];\r\n } else if (window.getComputedStyle) {\r\n return document.defaultView.getComputedStyle(element, null).getPropertyValue(styleProp);\r\n }\r\n}\r\n\r\nexport function getTextAreaInfo(element) {\r\n var result = {};\r\n var dom = getDom(element);\r\n result[\"scrollHeight\"] = dom.scrollHeight || 0;\r\n\r\n if (element.currentStyle) {\r\n result[\"lineHeight\"] = parseFloat(element.currentStyle[\"line-height\"]);\r\n result[\"paddingTop\"] = parseFloat(element.currentStyle[\"padding-top\"]);\r\n result[\"paddingBottom\"] = parseFloat(element.currentStyle[\"padding-bottom\"]);\r\n result[\"borderBottom\"] = parseFloat(element.currentStyle[\"border-bottom\"]);\r\n result[\"borderTop\"] = parseFloat(element.currentStyle[\"border-top\"]);\r\n } else if (window.getComputedStyle) {\r\n result[\"lineHeight\"] = parseFloat(document.defaultView.getComputedStyle(element, null).getPropertyValue(\"line-height\"));\r\n result[\"paddingTop\"] = parseFloat(document.defaultView.getComputedStyle(element, null).getPropertyValue(\"padding-top\"));\r\n result[\"paddingBottom\"] = parseFloat(document.defaultView.getComputedStyle(element, null).getPropertyValue(\"padding-bottom\"));\r\n result[\"borderBottom\"] = parseFloat(document.defaultView.getComputedStyle(element, null).getPropertyValue(\"border-bottom\"));\r\n result[\"borderTop\"] = parseFloat(document.defaultView.getComputedStyle(element, null).getPropertyValue(\"border-top\"));\r\n }\r\n //Firefox can return this as NaN, so it has to be handled here like that.\r\n if (Object.is(NaN, result[\"borderTop\"]))\r\n result[\"borderTop\"] = 1;\r\n if (Object.is(NaN, result[\"borderBottom\"]))\r\n result[\"borderBottom\"] = 1;\r\n return result;\r\n}\r\n\r\nconst objReferenceDict = {};\r\n\r\nexport function disposeObj(objReferenceName) {\r\n delete objReferenceDict[objReferenceName];\r\n}\r\n\r\nexport function upsertThemeStyle(id: string, style: string) {\r\n const d = document.getElementById(id);\r\n if (d) {\r\n document.head.removeChild(d);\r\n }\r\n\r\n const d_style = document.createElement('style')\r\n d_style.id = id;\r\n d_style.type = \"text/css\";\r\n d_style.innerHTML = style;\r\n\r\n document.head.insertAdjacentElement('beforeend', d_style)\r\n}\r\n\r\nexport function getImageDimensions(src: string) {\r\n return new Promise(function (resolve, reject) {\r\n var img = new Image()\r\n img.src = src\r\n img.onload = function () {\r\n resolve({\r\n width: img.width,\r\n height: img.height,\r\n hasError: false\r\n })\r\n }\r\n img.onerror = function () {\r\n resolve({\r\n width: 0,\r\n height: 0,\r\n hasError: true\r\n })\r\n }\r\n })\r\n}\r\n\r\nexport function enablePreventDefaultForEvent(element: any, event: string, condition?: any) {\r\n const dom = getDom(element);\r\n if (!dom) return;\r\n if (event === 'keydown') {\r\n dom.addEventListener(event, (e: KeyboardEvent) => {\r\n if (Array.isArray(condition)) {\r\n var codes = condition as string[];\r\n if (codes.includes(e.code)) {\r\n e.preventDefault();\r\n }\r\n } else {\r\n e.preventDefault();\r\n }\r\n })\r\n } else {\r\n dom.addEventListener(event, e => {\r\n if (e.preventDefault) {\r\n e.preventDefault();\r\n }\r\n })\r\n }\r\n}\r\n\r\nexport function getBoundingClientRects(selector) {\r\n var elements = document.querySelectorAll(selector);\r\n\r\n var result = [];\r\n\r\n for (var i = 0; i < elements.length; i++) {\r\n var e: Element = elements[i];\r\n var dom = {\r\n id: e.id,\r\n rect: e.getBoundingClientRect()\r\n };\r\n result.push(dom);\r\n }\r\n\r\n return result;\r\n}\r\n\r\nexport function getSize(selectors, sizeProp) {\r\n var el = getDom(selectors);\r\n\r\n var display = el.style.display;\r\n var overflow = el.style.overflow;\r\n\r\n el.style.display = \"\";\r\n el.style.overflow = \"hidden\";\r\n\r\n var size = el[\"offset\" + sizeProp.charAt(0).toUpperCase() + sizeProp.slice(1)] || 0;\r\n\r\n el.style.display = display;\r\n el.style.overflow = overflow;\r\n\r\n return size;\r\n}\r\n\r\nexport function getProp(elOrString, name) {\r\n if (elOrString === 'window') {\r\n return window[name];\r\n }\r\n\r\n var el = getDom(elOrString);\r\n if (!el) {\r\n return null;\r\n }\r\n\r\n return el[name];\r\n}\r\n\r\nexport function updateWindowTransition(selectors, isActive, item) {\r\n var el: HTMLElement = getDom(selectors);\r\n var container: HTMLElement = el.querySelector('.m-window__container');\r\n\r\n if (item) {\r\n var itemEl: HTMLElement = getDom(item);\r\n container.style.height = itemEl.clientHeight + 'px';\r\n return;\r\n }\r\n\r\n if (isActive) {\r\n container.classList.add('m-window__container--is-active');\r\n container.style.height = el.clientHeight + 'px';\r\n } else {\r\n container.style.height = '';\r\n container.classList.remove('m-window__container--is-active');\r\n }\r\n}\r\n\r\nexport function getScrollHeightWithoutHeight(elOrString) {\r\n var el: HTMLElement = getDom(elOrString);\r\n if (!el) {\r\n return 0;\r\n }\r\n\r\n var height = el.style.height;\r\n el.style.height = '0'\r\n var scrollHeight = el.scrollHeight;\r\n el.style.height = height;\r\n\r\n return scrollHeight;\r\n}\r\n\r\nfunction registerPasteWithData(customEventName) {\r\n if (Blazor) {\r\n Blazor.registerCustomEventType(customEventName, {\r\n browserEventName: 'paste',\r\n createEventArgs: (event: ClipboardEvent) => {\r\n return {\r\n type: event.type,\r\n pastedData: event.clipboardData.getData('text')\r\n };\r\n }\r\n });\r\n }\r\n}\r\n\r\nexport function registerTextFieldOnMouseDown(element, inputElement, callback) {\r\n if (!element || !inputElement) return\r\n\r\n const listener = (e: MouseEvent) => {\r\n const target = e.target;\r\n const inputDom = getDom(inputElement);\r\n if (target !== inputDom) {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n }\r\n\r\n if (callback) {\r\n const mouseEventArgs = {\r\n Detail: e.detail,\r\n ScreenX: e.screenX,\r\n ScreenY: e.screenY,\r\n ClientX: e.clientX,\r\n ClientY: e.clientY,\r\n OffsetX: e.offsetX,\r\n OffsetY: e.offsetY,\r\n PageX: e.pageX,\r\n PageY: e.pageY,\r\n Button: e.button,\r\n Buttons: e.buttons,\r\n CtrlKey: e.ctrlKey,\r\n ShiftKey: e.shiftKey,\r\n AltKey: e.altKey,\r\n MetaKey: e.metaKey,\r\n Type: e.type\r\n }\r\n\r\n callback.invokeMethodAsync('Invoke', mouseEventArgs);\r\n }\r\n };\r\n\r\n element.addEventListener('mousedown', listener)\r\n\r\n const config: HtmlElementEventListenerConfig = {\r\n listener,\r\n handle: callback\r\n };\r\n\r\n const key =`registerTextFieldOnMouseDown_${getBlazorId(element)}`;\r\n htmlElementEventListenerConfigs[key] = [config]\r\n}\r\n\r\nexport function unregisterTextFieldOnMouseDown(element: HTMLElement) {\r\n const key =`registerTextFieldOnMouseDown_${getBlazorId(element)}`;\r\n const configs = htmlElementEventListenerConfigs[key]\r\n if (configs && configs.length) {\r\n configs.forEach(item => {\r\n item.handle.dispose();\r\n if (element) {\r\n element.removeEventListener(\"mousedown\", item.listener);\r\n }\r\n })\r\n }\r\n}\r\n\r\nexport function containsActiveElement(selector) {\r\n var el = getDom(selector);\r\n if (el && el.contains) {\r\n return el.contains(document.activeElement);\r\n }\r\n\r\n return null;\r\n}\r\n\r\nexport function copyChild(el) {\r\n if (typeof el === 'string') {\r\n el = document.querySelector(el);\r\n }\r\n\r\n if (!el) return;\r\n\r\n el.setAttribute('contenteditable', 'true');\r\n el.focus();\r\n document.execCommand('selectAll', false, null);\r\n document.execCommand('copy');\r\n document.execCommand('unselect');\r\n el.blur();\r\n el.removeAttribute('contenteditable');\r\n}\r\n\r\nexport function copyText(text) {\r\n if (!navigator.clipboard) {\r\n var textArea = document.createElement(\"textarea\");\r\n textArea.value = text;\r\n textArea.readOnly = true;\r\n\r\n // Avoid scrolling to bottom\r\n textArea.style.top = \"0\";\r\n textArea.style.left = \"0\";\r\n textArea.style.position = \"fixed\";\r\n\r\n document.body.appendChild(textArea);\r\n textArea.focus();\r\n textArea.select();\r\n\r\n try {\r\n var successful = document.execCommand('copy');\r\n var msg = successful ? 'successful' : 'unsuccessful';\r\n console.log('Fallback: Copying text command was ' + msg);\r\n } catch (err) {\r\n console.error('Fallback: Oops, unable to copy', err);\r\n }\r\n\r\n document.body.removeChild(textArea);\r\n return;\r\n }\r\n\r\n navigator.clipboard.writeText(text).then(function () {\r\n console.log('Async: Copying to clipboard was successful!');\r\n }, function (err) {\r\n console.error('Async: Could not copy text: ', err);\r\n });\r\n}\r\n\r\nexport function getMenuableDimensions(hasActivator, activatorSelector, isDefaultAttach, contentElement, attached, attachSelector) {\r\n if (!attached) {\r\n var container = document.querySelector(attachSelector);\r\n if (contentElement.nodeType) {\r\n container.appendChild(contentElement);\r\n }\r\n }\r\n\r\n var dimensions = {\r\n activator: {} as any,\r\n content: {} as any,\r\n relativeYOffset: 0,\r\n offsetParentLeft: 0\r\n };\r\n\r\n if (hasActivator) {\r\n var activator = document.querySelector(activatorSelector);\r\n dimensions.activator = measure(activator, isDefaultAttach)\r\n dimensions.activator.offsetLeft = activator.offsetLeft\r\n if (!isDefaultAttach) {\r\n // account for css padding causing things to not line up\r\n // this is mostly for v-autocomplete, hopefully it won't break anything\r\n dimensions.activator.offsetTop = activator.offsetTop\r\n } else {\r\n dimensions.activator.offsetTop = 0\r\n }\r\n }\r\n\r\n sneakPeek(() => {\r\n if (contentElement) {\r\n if (contentElement.offsetParent) {\r\n const offsetRect = getRoundedBoundedClientRect(contentElement.offsetParent)\r\n dimensions.relativeYOffset = getPageYOffset() + offsetRect.top\r\n\r\n if (hasActivator) {\r\n dimensions.activator.top -= dimensions.relativeYOffset\r\n dimensions.activator.left -= window.pageXOffset + offsetRect.left\r\n } else {\r\n dimensions.offsetParentLeft = offsetRect.left\r\n }\r\n }\r\n\r\n dimensions.content = measure(contentElement, isDefaultAttach)\r\n dimensions.content.offsetLeft = contentElement.offsetLeft\r\n dimensions.content.offsetTop = contentElement.offsetTop\r\n }\r\n }, contentElement);\r\n\r\n return dimensions;\r\n}\r\n\r\nfunction getPageYOffset() {\r\n let pageYOffset = window.pageYOffset\r\n const blockedScrollY = parseInt(document.documentElement.style.getPropertyValue('--m-body-scroll-y'))\r\n if (blockedScrollY) {\r\n pageYOffset += Math.abs(blockedScrollY);\r\n }\r\n return pageYOffset\r\n}\r\n\r\nfunction measure(el: HTMLElement, isDefaultAttach) {\r\n if (!el) return {}\r\n\r\n const rect = getRoundedBoundedClientRect(el)\r\n\r\n // Account for activator margin\r\n if (!isDefaultAttach) {\r\n const style = window.getComputedStyle(el)\r\n\r\n rect.left = parseInt(style.marginLeft!)\r\n rect.top = parseInt(style.marginTop!)\r\n }\r\n\r\n return rect\r\n}\r\n\r\nfunction getRoundedBoundedClientRect(el: Element) {\r\n if (!el || !el.nodeType) {\r\n return null\r\n }\r\n\r\n const rect = el.getBoundingClientRect()\r\n return {\r\n top: Math.round(rect.top),\r\n left: Math.round(rect.left),\r\n bottom: Math.round(rect.bottom),\r\n right: Math.round(rect.right),\r\n width: Math.round(rect.width),\r\n height: Math.round(rect.height),\r\n }\r\n}\r\n\r\nfunction sneakPeek(cb: () => void, el) {\r\n if (!el || !el.style || el.style.display !== 'none') {\r\n cb()\r\n return\r\n }\r\n\r\n el.style.display = 'inline-block'\r\n cb()\r\n el.style.display = 'none'\r\n}\r\n\r\nexport function invokeMultipleMethod(windowProps, documentProps, hasActivator, activatorSelector, attach, contentElement, attached, attachSelector, element) {\r\n var multipleResult = {\r\n windowAndDocument: null,\r\n dimensions: null,\r\n zIndex: 0\r\n };\r\n\r\n multipleResult.windowAndDocument = getWindowAndDocumentProps(windowProps, documentProps);\r\n multipleResult.dimensions = getMenuableDimensions(hasActivator, activatorSelector, attach, contentElement, attached, attachSelector);\r\n multipleResult.zIndex = getMenuOrDialogMaxZIndex([contentElement], element);\r\n\r\n return multipleResult;\r\n}\r\n\r\nexport function registerOTPInputOnInputEvent(elementList, callback) {\r\n for (let i = 0; i < elementList.length; i++) {\r\n const inputListener = (e: Event) => otpInputOnInputEvent(e, i, elementList, callback);\r\n const focusListener = (e: Event) => otpInputFocusEvent(e, i, elementList);\r\n const keyupListener =(e: KeyboardEvent) => otpInputKeyupEvent(e, i, elementList, callback);\r\n\r\n elementList[i].addEventListener('input', inputListener);\r\n elementList[i].addEventListener('focus', focusListener);\r\n elementList[i].addEventListener('keyup', keyupListener);\r\n\r\n elementList[i]._optInput = {\r\n inputListener,\r\n focusListener,\r\n keyupListener\r\n }\r\n }\r\n}\r\n\r\nfunction otpInputKeyupEvent(e: KeyboardEvent, otpIdx: number, elementList, callback) {\r\n e.preventDefault();\r\n const eventKey = e.key;\r\n if (eventKey === 'ArrowLeft' || eventKey === 'Backspace') {\r\n if (eventKey === 'Backspace') {\r\n const obj = {\r\n type: eventKey,\r\n index: otpIdx,\r\n value: ''\r\n }\r\n if (callback) {\r\n callback.invokeMethodAsync('Invoke', obj);\r\n }\r\n }\r\n otpInputFocus(otpIdx - 1, elementList);\r\n }\r\n else if (eventKey === 'ArrowRight') {\r\n otpInputFocus(otpIdx + 1, elementList);\r\n }\r\n}\r\n\r\nfunction otpInputFocus(focusIndex: number, elementList) {\r\n if (focusIndex < 0) {\r\n otpInputFocus(0, elementList);\r\n }\r\n else if (focusIndex >= elementList.length) {\r\n otpInputFocus(elementList.length - 1, elementList);\r\n }\r\n else {\r\n if (document.activeElement !== elementList[focusIndex]) {\r\n const element = getDom(elementList[focusIndex])\r\n element.focus();\r\n }\r\n }\r\n}\r\n\r\nfunction otpInputFocusEvent(e: Event, otpIdx: number, elementList) {\r\n const element = getDom(elementList[otpIdx]) as HTMLInputElement;\r\n if (element && document.activeElement === element) {\r\n element.select();\r\n }\r\n}\r\n\r\nfunction otpInputOnInputEvent(e: Event, otpIdx: number, elementList, callback) {\r\n const target = e.target as HTMLInputElement;\r\n const value = target.value;\r\n\r\n if (value && value !== '') {\r\n otpInputFocus(otpIdx + 1, elementList);\r\n\r\n if (callback) {\r\n const obj = {\r\n type: 'Input',\r\n index: otpIdx,\r\n value: value\r\n }\r\n callback.invokeMethodAsync('Invoke', obj);\r\n }\r\n }\r\n}\r\n\r\nexport function unregisterOTPInputOnInputEvent(elementList) {\r\n for (let i = 0; i < elementList.length; i++) {\r\n const el = elementList[i]\r\n if(el && el._optInput) {\r\n el.removeEventListener('input', el._optInput.inputListener)\r\n el.removeEventListener('focus', el._optInput.focusListener)\r\n el.removeEventListener('keyup', el._optInput.keyupListener)\r\n }\r\n }\r\n}\r\n\r\nexport function getListIndexWhereAttributeExists(selector: string, attribute:string, value: string) {\r\n const tiles = document.querySelectorAll(selector);\r\n if (!tiles) {\r\n return -1;\r\n }\r\n\r\n let index = -1;\r\n for (let i = 0; i < tiles.length; i++) {\r\n if (tiles[i].getAttribute(attribute) === value) {\r\n index = i;\r\n break;\r\n }\r\n }\r\n\r\n return index;\r\n}\r\n\r\nexport function scrollToTile(contentSelector: string, tilesSelector: string, index: number, keyCode: string) {\r\n var tiles = document.querySelectorAll(tilesSelector)\r\n if (!tiles) return;\r\n\r\n let tile = tiles[index] as HTMLElement;\r\n\r\n if (!tile) return;\r\n\r\n const content = document.querySelector(contentSelector);\r\n if (!content) return;\r\n\r\n const scrollTop = content.scrollTop;\r\n const contentHeight = content.clientHeight;\r\n\r\n if (scrollTop > tile.offsetTop - 8) {\r\n content.scrollTo({ top: tile.offsetTop - tile.clientHeight, behavior: \"smooth\" })\r\n } else if (scrollTop + contentHeight < tile.offsetTop + tile.clientHeight + 8) {\r\n content.scrollTo({ top: tile.offsetTop - contentHeight + tile.clientHeight * 2, behavior: \"smooth\" })\r\n }\r\n}\r\n\r\nexport function getElementTranslateY(element) {\r\n const style = window.getComputedStyle(element);\r\n const transform = style.transform || style.webkitTransform;\r\n const translateY = transform.slice(7, transform.length - 1).split(', ')[5];\r\n\r\n return Number(translateY);\r\n}\r\n\r\nfunction isWindow(element: any | Window): element is Window {\r\n return element === window\r\n}\r\n\r\nexport function checkIfThresholdIsExceededWhenScrolling(el: Element, parent: any, threshold: number) {\r\n if (!el || !parent) return\r\n\r\n let parentElement: HTMLElement | Window\r\n\r\n if (parent == \"window\") {\r\n parentElement = window;\r\n } else if (parent == \"document\") {\r\n parentElement = document.documentElement;\r\n } else {\r\n parentElement = document.querySelector(parent);\r\n }\r\n\r\n if (!parentElement) {\r\n console.warn('[MInfiniteScroll] failed to get parent element with selector:', parent);\r\n return;\r\n }\r\n\r\n const rect = el.getBoundingClientRect();\r\n const elementTop = rect.top;\r\n const current = isWindow(parentElement)\r\n ? window.innerHeight\r\n : parentElement.getBoundingClientRect().bottom\r\n\r\n return (current >= elementTop - threshold)\r\n}\r\n\r\nexport function get_top_domain() {\r\n var i, h,\r\n weird_cookie = 'weird_get_top_level_domain=cookie',\r\n hostname = document.location.hostname.split('.');\r\n for (i = hostname.length - 1; i >= 0; i--) {\r\n h = hostname.slice(i).join('.');\r\n document.cookie = weird_cookie + ';domain=.' + h + ';';\r\n if (document.cookie.indexOf(weird_cookie) > -1) {\r\n // We were able to store a cookie! This must be it\r\n document.cookie = weird_cookie.split('=')[0] + '=;domain=.' + h + ';expires=Thu, 01 Jan 1970 00:00:01 GMT;';\r\n return h;\r\n }\r\n }\r\n}\r\n\r\nexport function setCookie(name, value) {\r\n if (value === null || value === undefined) {\r\n return;\r\n }\r\n\r\n var domain = get_top_domain();\r\n if (!domain) {\r\n domain = '';\r\n }else if (isNaN(domain[0])) {\r\n domain = `.${domain}`;\r\n }\r\n var Days = 30;\r\n var exp = new Date();\r\n exp.setTime(exp.getTime() + Days * 24 * 60 * 60 * 1000);\r\n document.cookie = `${name}=${escape(value?.toString())};path=/;expires=${exp.toUTCString()};domain=${domain}`;\r\n}\r\n\r\nexport function getCookie(name) {\r\n const reg = new RegExp(`(^| )${name}=([^;]*)(;|$)`);\r\n const arr = document.cookie.match(reg);\r\n if (arr) {\r\n return unescape(arr[2]);\r\n }\r\n return null;\r\n}\r\n\r\nexport function registerDragEvent(el: HTMLElement, dataKey?: string) {\r\n if (el) {\r\n const blazorId = getBlazorId(el);\r\n const listener = (e: DragEvent) => {\r\n if (dataKey) {\r\n const dataValue = (e.target as HTMLElement).getAttribute(dataKey);\r\n e.dataTransfer.setData(dataKey, dataValue);\r\n e.dataTransfer.setData('offsetX', e.offsetX.toString())\r\n e.dataTransfer.setData('offsetY', e.offsetY.toString())\r\n }\r\n };\r\n const key = `${blazorId}:dragstart`;\r\n htmlElementEventListenerConfigs[key] = [{\r\n listener\r\n }];\r\n el.addEventListener(\"dragstart\", listener);\r\n }\r\n}\r\n\r\nexport function unregisterDragEvent(el: HTMLElement) {\r\n const blazorId = getBlazorId(el);\r\n if (blazorId) {\r\n const key = `${blazorId}:dragstart`;\r\n if (htmlElementEventListenerConfigs[key]) {\r\n htmlElementEventListenerConfigs[key].forEach((config) => {\r\n el.removeEventListener(\"dragstart\", config.listener);\r\n });\r\n }\r\n }\r\n}\r\n\r\nexport function resizableDataTable(dataTable: HTMLElement) {\r\n const table = dataTable.querySelector('table')\r\n const row = table.querySelector('.m-data-table-header').getElementsByTagName('tr')[0];\r\n const cols = row ? row.children : [];\r\n if (!cols) return;\r\n\r\n table.style.overflow = 'hidden';\r\n\r\n const tableHeight = table.offsetHeight;\r\n\r\n for (var i = 0; i < cols.length; i++) {\r\n const col: any = cols[i];\r\n const colResizeDiv: HTMLDivElement = col.querySelector(\".m-data-table-header__col-resize\");\r\n if (!colResizeDiv) continue\r\n colResizeDiv.style.height = tableHeight + \"px\"\r\n\r\n let minWidth = (col.firstElementChild as HTMLElement).offsetWidth; // width of span\r\n minWidth = minWidth + 32 + 18 + 1 + 1; // 32:padding 18:sort\r\n if(!col.style.minWidth){\r\n col.minWidth = minWidth;\r\n col.style.minWidth = minWidth + \"px\";\r\n }\r\n\r\n setListeners(colResizeDiv);\r\n }\r\n\r\n function setListeners(div: HTMLDivElement) {\r\n let pageX:number\r\n let curCol: HTMLElement;\r\n let nxtCol: HTMLElement;\r\n let curColWidth: number;\r\n let nxtColWidth: number;\r\n let tableWidth: number;\r\n\r\n div.addEventListener('click', e => e.stopPropagation());\r\n\r\n div.addEventListener('mousedown', function (e) {\r\n curCol = (e.target as HTMLElement).parentElement;\r\n nxtCol = curCol.nextElementSibling as HTMLElement;\r\n pageX = e.pageX;\r\n\r\n tableWidth = table.offsetWidth;\r\n\r\n var padding = paddingDiff(curCol);\r\n\r\n curColWidth = curCol.offsetWidth - padding;\r\n if (nxtCol)\r\n nxtColWidth = nxtCol.offsetWidth - padding;\r\n });\r\n\r\n document.addEventListener(\"mousemove\", function (e) {\r\n if (curCol) {\r\n let diffX = e.pageX - pageX;\r\n\r\n const isRtl = dataTable.classList.contains(\"m-data-table--rtl\")\r\n if (isRtl) {\r\n diffX = 0 - diffX;\r\n }\r\n\r\n let newCurColWidth = curColWidth + diffX;\r\n\r\n curCol.style.width = newCurColWidth + \"px\";\r\n\r\n const isOverflow = dataTable.classList.contains(\r\n \"m-data-table--resizable-overflow\"\r\n );\r\n if (isOverflow) {\r\n table.style.width = tableWidth + diffX + \"px\";\r\n return;\r\n }\r\n\r\n const isIndependent = dataTable.classList.contains(\r\n \"m-data-table--resizable-independent\"\r\n );\r\n if (isIndependent) {\r\n let newNextColWidth = nxtColWidth - diffX;\r\n const twoColWidth = curColWidth + nxtColWidth;\r\n\r\n if (diffX > 0) {\r\n if (nxtCol) {\r\n if (newNextColWidth < nxtCol[\"minWidth\"]) {\r\n newNextColWidth = nxtCol[\"minWidth\"];\r\n newCurColWidth = twoColWidth - newNextColWidth;\r\n }\r\n }\r\n } else {\r\n if (newCurColWidth < curCol[\"minWidth\"]) {\r\n newCurColWidth = curCol[\"minWidth\"];\r\n newNextColWidth = twoColWidth - newCurColWidth;\r\n }\r\n }\r\n\r\n curCol.style.width = newCurColWidth + \"px\";\r\n\r\n if (nxtCol) {\r\n nxtCol.style.width = newNextColWidth + \"px\";\r\n }\r\n }\r\n }\r\n });\r\n\r\n document.addEventListener('mouseup', function (e) {\r\n if (curCol) {\r\n for (let i = 0; i < cols.length; i++) {\r\n const col:any = cols[i];\r\n col.style.width = col['offsetWidth'] + \"px\"\r\n }\r\n }\r\n curCol = undefined;\r\n nxtCol = undefined;\r\n pageX = undefined;\r\n nxtColWidth = undefined;\r\n curColWidth = undefined;\r\n tableWidth = undefined;\r\n });\r\n }\r\n\r\n function paddingDiff(col) {\r\n if (getStyleVal(col, 'box-sizing') == 'border-box') {\r\n return 0;\r\n }\r\n\r\n var padLeft = getStyleVal(col, 'padding-left');\r\n var padRight = getStyleVal(col, 'padding-right');\r\n return (parseInt(padLeft) + parseInt(padRight));\r\n }\r\n\r\n function getStyleVal(elm, css) {\r\n return (window.getComputedStyle(elm, null).getPropertyValue(css))\r\n }\r\n}\r\n\r\nexport function updateDataTableResizeHeight(dataTable: HTMLElement) {\r\n const table = dataTable.querySelector('table')\r\n const row = table.querySelector('.m-data-table-header').getElementsByTagName('tr')[0];\r\n const cols = row ? row.children : [];\r\n if (!cols) return;\r\n\r\n const tableHeight = table.offsetHeight;\r\n\r\n for (var i = 0; i < cols.length; i++) {\r\n const col: any = cols[i];\r\n const colResizeDiv: HTMLDivElement = col.querySelector(\".m-data-table-header__col-resize\");\r\n colResizeDiv.style.height = tableHeight + \"px\"\r\n }\r\n}\r\n\r\nfunction stopPropagation(e) {\r\n e.stopPropagation();\r\n}\r\n\r\nexport function addStopPropagationEvent(el: any, type: keyof HTMLElementEventMap) {\r\n const dom = getDom(el);\r\n dom.addEventListener(type, stopPropagation);\r\n}\r\n\r\nexport function removeStopPropagationEvent(el: any, type: keyof HTMLElementEventMap) {\r\n const dom = getDom(el);\r\n dom.removeEventListener(type, stopPropagation);\r\n}\r\n\r\nexport function historyBack() {\r\n history.back();\r\n}\r\n\r\nexport function historyGo(delta: number) {\r\n history.go(delta);\r\n}\r\n\r\nexport function historyReplace(href) {\r\n history.replaceState(null, /*ignore title*/ '', href);\r\n}\r\n\r\nexport function registerTableScrollEvent(wrapper: HTMLElement) {\r\n const listener = () => {\r\n const scrollWidth = wrapper.scrollWidth;\r\n const clientWidth = wrapper.clientWidth;\r\n const scrollLeft = wrapper.scrollLeft;\r\n\r\n const rtl = wrapper.parentElement.classList.contains('m-data-table--rtl');\r\n\r\n if (Math.abs(scrollWidth -((rtl ? -scrollLeft : scrollLeft) + clientWidth)) < 1) {\r\n wrapper.classList.remove('scrolling')\r\n wrapper.classList.remove('scrolled-to-left')\r\n wrapper.classList.add('scrolled-to-right');\r\n } else if (Math.abs(scrollLeft - (rtl ? scrollWidth - clientWidth : 0)) < 1) {\r\n wrapper.classList.remove('scrolling')\r\n wrapper.classList.remove('scrolled-to-right')\r\n wrapper.classList.add('scrolled-to-left');\r\n } else {\r\n wrapper.classList.remove('scrolled-to-right');\r\n wrapper.classList.remove('scrolled-to-left');\r\n wrapper.classList.add('scrolling');\r\n }\r\n }\r\n\r\n listener();\r\n\r\n wrapper.addEventListener('scroll', listener)\r\n wrapper[\"_m_table_scroll_event\"] = listener\r\n}\r\n\r\nexport function unregisterTableScrollEvent(wrapper: HTMLElement) {\r\n const listener = wrapper[\"_m_table_scroll_event\"]\r\n if (listener) {\r\n wrapper.removeEventListener('scroll', listener)\r\n delete wrapper[\"_m_table_scroll_event\"]\r\n }\r\n}\r\n\r\nexport function updateTabSlider(\r\n sliderWrapper: HTMLElement,\r\n tab: HTMLElement,\r\n sliderSize: number,\r\n vertical: boolean,\r\n isReversed: boolean\r\n) {\r\n if (!sliderWrapper) {\r\n console.warn('[MTab] the element of slider wrapper is not found')\r\n return;\r\n }\r\n\r\n if (!tab) {\r\n console.warn('[MTab] the element of tab to be activated is not found')\r\n return;\r\n }\r\n\r\n const height = !vertical ? sliderSize : tab.scrollHeight;\r\n const left = vertical ? 0 : tab.offsetLeft;\r\n const right = vertical ? 0 : tab.offsetLeft + tab.offsetWidth;\r\n const top = tab.offsetTop;\r\n const width = vertical ? sliderSize : tab.clientWidth;\r\n sliderWrapper.style.width = `${width}px`;\r\n sliderWrapper.style.height = `${height}px`;\r\n if (!isReversed) {\r\n sliderWrapper.style.left = `${left}px`;\r\n }\r\n if (isReversed) {\r\n sliderWrapper.style.right = `${right}px`;\r\n }\r\n if (vertical) {\r\n sliderWrapper.style.top = `${top}px`;\r\n }\r\n}\r\n\r\nexport function isScrollNearBottom(element: HTMLElement, threshold: number = 200) {\r\n if (!element) {\r\n return false;\r\n }\r\n return element.scrollHeight - (element.scrollTop + element.clientHeight) < threshold;\r\n}\r\n\r\nexport function matchesSelector (el: Element | undefined, selector: string): boolean | null {\r\n console.log('el', el, 'selector', selector)\r\n const supportsSelector = IN_BROWSER &&\r\n typeof CSS !== 'undefined' &&\r\n typeof CSS.supports !== 'undefined' &&\r\n CSS.supports(`selector(${selector})`)\r\n\r\n console.log('supportsSelector', supportsSelector)\r\n\r\n if (!supportsSelector) return false;\r\n\r\n setTimeout(() => {\r\n console.log(el.matches(selector))\r\n\r\n }, 1000);\r\n\r\n try {\r\n return !!el && el.matches(selector)\r\n } catch (err) {\r\n return false;\r\n }\r\n}\r\n","import { removeListeners, RippleOptions, updateRipple } from \"./ripple\";\r\n\r\nexport default function registerRippleObserver() {\r\n const observer = new MutationObserver((mutationsList, observer) => {\r\n for (const mutation of mutationsList) {\r\n if (mutation.type === \"childList\" && mutation.addedNodes.length > 0) {\r\n for (const node of mutation.addedNodes) {\r\n if (node instanceof HTMLElement) {\r\n if (\r\n node.nodeType === Node.ELEMENT_NODE &&\r\n node.hasAttribute(\"ripple\") &&\r\n !node._ripple\r\n ) {\r\n updateRipple(node, convertRippleAttributeToOptions(node), false);\r\n }\r\n }\r\n }\r\n }\r\n\r\n // 处理属性变动\r\n if (mutation.type === \"attributes\") {\r\n const target = mutation.target as HTMLElement;\r\n if (target.hasAttribute(\"ripple\") && !target._ripple) {\r\n if (mutation.attributeName === \"ripple\") {\r\n updateRipple(\r\n target,\r\n convertRippleAttributeToOptions(target),\r\n false\r\n );\r\n } else if (!target.hasAttribute(\"ripple\") && target._ripple) {\r\n removeListeners(target);\r\n delete target._ripple;\r\n }\r\n }\r\n }\r\n\r\n if (\r\n mutation.type === \"attributes\" &&\r\n mutation.attributeName === \"ripple\"\r\n ) {\r\n const target = mutation.target as HTMLElement;\r\n if (target._ripple) {\r\n updateRipple(\r\n target,\r\n convertRippleAttributeToOptions(target),\r\n target._ripple.enabled\r\n );\r\n }\r\n }\r\n\r\n if (mutation.type === \"childList\" && mutation.removedNodes.length > 0) {\r\n for (const node of mutation.removedNodes) {\r\n if (node instanceof HTMLElement) {\r\n if (node.nodeType === Node.ELEMENT_NODE && node._ripple) {\r\n removeListeners(node);\r\n delete node._ripple;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n });\r\n\r\n // ripple=\"false\",\r\n // ripple=\"\",\r\n // ripple=\"true\",\r\n // ripple=\"center\",\r\n // ripple=\"circle\",\r\n // ripple=\"circle¢er\"\r\n // ripple=\"center&custom-css\",\r\n // ripple=\"circle&custom-css\",\r\n // ripple=\"custom-css\"\r\n function convertRippleAttributeToOptions(\r\n target: HTMLElement\r\n ): RippleOptions | null {\r\n const value = target.getAttribute(\"ripple\");\r\n if ((typeof value !== \"string\" && !value) || value === \"false\") {\r\n return null;\r\n }\r\n\r\n const options: RippleOptions = {};\r\n\r\n const props = value.split(\"&\");\r\n props.forEach((prop) => {\r\n if (prop === \"center\") {\r\n options.center = true;\r\n } else if (prop === \"circle\") {\r\n options.circle = true;\r\n } else {\r\n options.class = prop.trim();\r\n }\r\n });\r\n\r\n return options;\r\n }\r\n\r\n const initialElements = document.querySelectorAll(\"[ripple]\");\r\n\r\n for (const element of initialElements) {\r\n updateRipple(element, convertRippleAttributeToOptions(element), false);\r\n }\r\n\r\n observer.observe(document, {\r\n childList: true,\r\n subtree: true,\r\n attributes: true,\r\n attributeFilter: [\"ripple\"],\r\n attributeOldValue: false,\r\n });\r\n}\r\n","import * as slider from \"./components/slider\";\r\nimport * as textarea from \"./components/textarea\";\r\nimport * as interop from \"./interop\";\r\nimport { MarkdownParser } from \"./proxies/markdown-it\";\r\n\r\ndeclare global {\r\n interface Window {\r\n MasaBlazor: {\r\n interop: {};\r\n extendMarkdownIt?: (parser: MarkdownParser) => void;\r\n xgplayerPlugins: any[];\r\n xgplayerPluginOptions?: { [prop: string]: any };\r\n };\r\n }\r\n}\r\n\r\nwindow.MasaBlazor = {\r\n interop: {\r\n ...interop,\r\n ...slider,\r\n ...textarea\r\n },\r\n xgplayerPlugins: [],\r\n};\r\n"],"names":["__awaiter","thisArg","_arguments","P","generator","Promise","resolve","reject","fulfilled","value","step","next","e","rejected","result","done","then","apply","IN_BROWSER","window","passiveSupported","testListenerOpts","Object","defineProperty","get","addEventListener","removeEventListener","console","warn","keyCodes","freeze","enter","tab","delete","esc","space","up","down","left","right","end","home","del","backspace","insert","pageup","pagedown","shift","getBlazorId","el","_bl_","getAttributeNames","find","a","startsWith","substring","getElementSelector","Element","path","nodeType","Node","ELEMENT_NODE","selector","nodeName","toLowerCase","id","unshift","sib","nth","previousElementSibling","parentNode","join","getDom","elOrString","element","document","documentElement","indexOf","array","split","i","querySelector","HTMLElement","body","error","canUseDom","createElement","touchEvents","parseMouseEvent","event","detail","screenX","screenY","clientX","clientY","offsetX","offsetY","pageX","pageY","button","buttons","ctrlKey","shiftKey","altKey","metaKey","type","parseTouchEvent","touches","parseTouch","targetTouches","changedTouches","touchList","length","touch","push","identifier","registerExtraMouseEvent","eventType","eventName","Blazor","registerCustomEventType","browserEventName","createEventArgs","createSharedEventArgs","registerExtraDropEvent","eventArgs","assign","dataTransfer","dropEffect","effectAllowed","files","Array","from","map","f","name","items","kind","types","getData","Number","args","target","eventTarget","elementReferenceId","class","getAttribute","getEventTarget","sliderHandleId","sliderHandlesById","dotnetHelper","onSliderMouseDown","app","mouseUpOptions","passive","capture","mouseMoveOptions","isTouchEvent","onMouseMove","cb","options","once","addOnceEventListener","onSliderMouseUp","invokeMethodAsync","stopPropagation","payload","textareaAutoGrowNextId","textareaAutoGrowMap","calculateTextareaHeight","textarea","rows","rowHeight","style","height","scrollHeight","minHeight","parseInt","parseFloat","Math","max","input","inputCallback","undefined","functionDebounce","fn","wait","callFirst","timeout","debouncedFn","clear","clearTimeout","debounceWrapper","this","arguments","context","callNow","setTimeout","call","cancel","flush","functionThrottle","interval","timeoutId","throttledFn","leading","trailing","throttleWrapper","registerExtraEvents","registerEvent","DELAY_RIPPLE","transform","webkitTransform","constructor","isKeyboardEvent","ripples","show","_ripple","enabled","container","animation","appendChild","className","radius","scale","x","y","centerX","centerY","localX","localY","offset","getBoundingClientRect","top","circle","clientWidth","center","sqrt","clientHeight","calculate","size","width","computed","getComputedStyle","position","dataset","previousPosition","classList","add","activated","String","performance","now","remove","hide","getElementsByClassName","isHiding","diff","delay","_a","removeChild","rippleShow","currentTarget","touched","rippleStop","isTouch","centered","showTimerCommit","showTimer","rippleHide","rippleCancelShow","keyboardRippleShow","keyCode","keyboardRippleHide","focusRippleHide","updateRipple","wasEnabled","removeListeners","getZIndex","index","getPropertyValue","getDomInfoObj","dom","offsetTop","offsetLeft","scrollWidth","scrollLeft","scrollTop","clientTop","clientLeft","res","viewportElement","box","offsetWidth","offsetHeight","relativeTop","relativeBottom","bottom","relativeLeft","relativeRight","absoluteLeft","absoluteTop","getElementPos","round","onload","customEventName","pastedData","clipboardData","observer","MutationObserver","mutationsList","mutation","addedNodes","node","hasAttribute","convertRippleAttributeToOptions","attributeName","removedNodes","forEach","prop","trim","initialElements","querySelectorAll","observe","childList","subtree","attributes","attributeFilter","attributeOldValue","registerRippleObserver","htmlElementEventListenerConfigs","getActiveElement","activeElement","getWindowAndDocumentProps","windowProps","documentProps","obj","getPageYOffset","isElement","tagName","getMenuOrDialogMaxZIndex","exclude","zis","activeElements","includes","getMenuableDimensions","hasActivator","activatorSelector","isDefaultAttach","contentElement","attached","attachSelector","dimensions","activator","content","relativeYOffset","offsetParentLeft","measure","display","sneakPeek","offsetParent","offsetRect","getRoundedBoundedClientRect","pageXOffset","pageYOffset","blockedScrollY","abs","rect","marginLeft","marginTop","otpInputKeyupEvent","otpIdx","elementList","callback","preventDefault","eventKey","key","otpInputFocus","focusIndex","focus","otpInputFocusEvent","select","otpInputOnInputEvent","get_top_domain","h","weird_cookie","hostname","location","slice","cookie","cloned","cloneNode","parentElement","innerWidth","evt","createEvent","initEvent","dispatchEvent","attach","_b","invoker","extras","htmlElement","config","listener","cancelable","relatedTarget","contains","k","debounce","debounceIt","throttle","handle","configs","item","dispose","e1","e2","dom1","dom2","text","navigator","clipboard","writeText","log","err","textArea","msg","execCommand","fallbackCopyTextToClipboard","preventScroll","HTMLInputElement","HTMLTextAreaElement","Error","blur","arg","scrollIntoView","block","inline","behavior","start","level","parent","to","scrollTo","o","targetEl","scrollY","offsetPosition","smooth","activeEl","containerEl","firstElementChild","getAbsoluteTop","getAbsoluteLeft","addElement","elementSelector","delElement","focusDialog","count","ele","innerHeight","isTop","isBottom","hasOwnProperty","clsName","root","overflowY","test","innerText","all","reduce","r","zIndex","styleProp","currentStyle","defaultView","is","NaN","objReferenceName","d","getElementById","head","d_style","innerHTML","insertAdjacentElement","src","img","Image","hasError","onerror","condition","isArray","code","elements","selectors","sizeProp","overflow","charAt","toUpperCase","isActive","itemEl","inputElement","mouseEventArgs","Detail","ScreenX","ScreenY","ClientX","ClientY","OffsetX","OffsetY","PageX","PageY","Button","Buttons","CtrlKey","ShiftKey","AltKey","MetaKey","Type","setAttribute","removeAttribute","readOnly","multipleResult","windowAndDocument","inputListener","focusListener","keyupListener","_optInput","attribute","tiles","contentSelector","tilesSelector","tile","contentHeight","translateY","threshold","elementTop","domain","isNaN","exp","Date","setTime","getTime","Days","escape","toString","toUTCString","reg","RegExp","arr","match","unescape","dataKey","blazorId","dataValue","setData","dataTable","table","row","getElementsByTagName","cols","children","tableHeight","col","colResizeDiv","minWidth","setListeners","div","curCol","nxtCol","curColWidth","nxtColWidth","tableWidth","nextElementSibling","padding","getStyleVal","padLeft","padRight","paddingDiff","diffX","newCurColWidth","newNextColWidth","twoColWidth","elm","css","history","back","delta","go","href","replaceState","wrapper","rtl","sliderWrapper","sliderSize","vertical","isReversed","supportsSelector","CSS","supports","matches","MasaBlazor","interop","slider","xgplayerPlugins"],"mappings":"yBAkHO,SAASA,EAAUC,EAASC,EAAYC,EAAGC,GAE9C,OAAO,IAAKD,IAAMA,EAAIE,WAAU,SAAUC,EAASC,GAC/C,SAASC,EAAUC,GAAS,IAAMC,EAAKN,EAAUO,KAAKF,GAAQ,CAAG,MAAOG,GAAKL,EAAOK,GAAO,CAC3F,SAASC,EAASJ,GAAS,IAAMC,EAAKN,EAAiB,MAAEK,GAAU,CAAC,MAAOG,GAAKL,EAAOK,GAAO,CAC9F,SAASF,EAAKI,GAJlB,IAAeL,EAIaK,EAAOC,KAAOT,EAAQQ,EAAOL,QAJ1CA,EAIyDK,EAAOL,MAJhDA,aAAiBN,EAAIM,EAAQ,IAAIN,GAAE,SAAUG,GAAWA,EAAQG,EAAO,KAIhBO,KAAKR,EAAWK,EAAY,CAC9GH,GAAMN,EAAY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