@qaecy/cue-ui 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +254 -0
- package/document-viewer/130.js +1 -0
- package/document-viewer/160.js +1 -0
- package/document-viewer/241.js +1 -0
- package/document-viewer/266.js +1 -0
- package/document-viewer/315.js +1 -0
- package/document-viewer/344.js +1 -0
- package/document-viewer/376.js +1 -0
- package/document-viewer/3rdpartylicenses.txt +2153 -0
- package/document-viewer/523.js +1 -0
- package/document-viewer/560.js +1 -0
- package/document-viewer/734.js +1 -0
- package/document-viewer/829.js +1 -0
- package/document-viewer/83.js +1 -0
- package/document-viewer/843.js +1 -0
- package/document-viewer/888.js +1 -0
- package/document-viewer/common.js +1 -0
- package/document-viewer/index.html +54 -0
- package/document-viewer/main.js +1 -0
- package/document-viewer/polyfills.js +1 -0
- package/document-viewer/poppins-latin-400-normal.woff +0 -0
- package/document-viewer/poppins-latin-400-normal.woff2 +0 -0
- package/document-viewer/poppins-latin-ext-400-normal.woff +0 -0
- package/document-viewer/poppins-latin-ext-400-normal.woff2 +0 -0
- package/document-viewer/runtime.js +1 -0
- package/document-viewer/styles.css +1 -0
- package/id-builder/3rdpartylicenses.txt +505 -0
- package/id-builder/index.html +13 -0
- package/id-builder/main.js +1 -0
- package/id-builder/polyfills.js +1 -0
- package/id-builder/poppins-latin-400-normal.woff +0 -0
- package/id-builder/poppins-latin-400-normal.woff2 +0 -0
- package/id-builder/poppins-latin-ext-400-normal.woff +0 -0
- package/id-builder/poppins-latin-ext-400-normal.woff2 +0 -0
- package/id-builder/runtime.js +1 -0
- package/id-builder/styles.css +1 -0
- package/logo/3rdpartylicenses.txt +346 -0
- package/logo/index.html +13 -0
- package/logo/main.js +1 -0
- package/logo/polyfills.js +1 -0
- package/logo/runtime.js +1 -0
- package/package.json +35 -0
- package/project-documents/3rdpartylicenses.txt +830 -0
- package/project-documents/index.html +88 -0
- package/project-documents/main.js +1 -0
- package/project-documents/polyfills.js +1 -0
- package/project-documents/poppins-latin-400-normal.woff +0 -0
- package/project-documents/poppins-latin-400-normal.woff2 +0 -0
- package/project-documents/poppins-latin-ext-400-normal.woff +0 -0
- package/project-documents/poppins-latin-ext-400-normal.woff2 +0 -0
- package/project-documents/runtime.js +1 -0
- package/project-documents/styles.css +1 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[241],{6279(v,m,a){a.d(m,{D:()=>i});var c=a(7705),h=a(2271),e=a(2245),s=a(7089),o=a(5547);const n=[[["","before",""]],"*",[["","after",""]]],d=["[before]","*","[after]"];let i=(()=>{class l{selected=(0,c.hFB)(!1);disabled=(0,c.hFB)(!1);size=(0,c.hFB)("s");tooltip=(0,c.hFB)("");getClass=(0,h.EW)(()=>this.selected()?"selected":"");getTabindex=(0,h.EW)(()=>this.disabled()||this.selected()?"-1":"0");getStyles=(0,h.EW)(()=>`min-width: var(--cue-menu-item-${this.size()}-min-width);\n width: 100%;`);static \u0275fac=function(r){return new(r||l)};static \u0275cmp=o.VBU({type:l,selectors:[["cue-menu-item"]],inputs:{selected:[1,"selected"],disabled:[1,"disabled"],size:[1,"size"],tooltip:[1,"tooltip"]},ngContentSelectors:d,decls:6,vars:8,consts:[["tooltipPlacement","right",3,"disabled","cueTooltip"],[3,"noWrap"],[1,"flexer"]],template:function(r,g){1&r&&(o.NAR(n),o.j41(0,"button",0),o.SdG(1),o.j41(2,"cue-typography",1),o.SdG(3,1),o.k0s(),o.nrm(4,"div",2),o.SdG(5,2),o.k0s()),2&r&&(o.Aen(g.getStyles()),o.HbH(g.getClass()),o.Y8G("disabled",g.disabled())("cueTooltip",g.tooltip()),o.BMQ("tabIndex",g.getTabindex()),o.R7$(2),o.Y8G("noWrap",!0))},dependencies:[e.o,s.d],styles:["[_nghost-%COMP%]{display:contents}button[_ngcontent-%COMP%]{appearance:none;font:inherit;display:flex;border:0;align-items:center;justify-content:start;background:transparent;height:var(--cue-menu-item-height);border-radius:var(--cue-menu-item-border-radius);padding:0 var(--cue-menu-item-padding-x);gap:0 var(--cue-menu-item-gap);--cue-icon-width: var(--cue-menu-item-icon-size);background:var(--cue-menu-item-background-color)}button[_ngcontent-%COMP%]:focus{outline:none}button[_ngcontent-%COMP%]:hover:not(:disabled), button[_ngcontent-%COMP%]:focus:not(:disabled){background:var(--cue-menu-item-focus-background-color)}button.selected[_ngcontent-%COMP%]{background:var(--cue-menu-item-selected-background-color)!important}button[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:default!important;background:var(--cue-menu-item-background-color)!important}button[_ngcontent-%COMP%]:hover{cursor:pointer}button[_ngcontent-%COMP%]:disabled:hover{cursor:not-allowed}.flexer[_ngcontent-%COMP%]{flex:1}"]})}return l})()},356(v,m,a){a.d(m,{M:()=>o});var c=a(7705),h=a(2271),e=a(5547);const s=["*"];let o=(()=>{class n{maxHeight=(0,c.hFB)(void 0);maxHeightStyle=(0,h.EW)(()=>{const i=this.maxHeight();if(void 0!==i)return"number"==typeof i?`${i}px`:i});static \u0275fac=function(l){return new(l||n)};static \u0275cmp=e.VBU({type:n,selectors:[["cue-menu-wrap"]],hostVars:2,hostBindings:function(l,t){2&l&&e.xc7("max-height",t.maxHeightStyle())},inputs:{maxHeight:[1,"maxHeight"]},ngContentSelectors:s,decls:2,vars:0,consts:[[1,"cue-menu-wrap-inner"]],template:function(l,t){1&l&&(e.NAR(),e.rj2(0,"div",0),e.SdG(1),e.eux())},styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:var(--cue-menu-gap);padding:var(--cue-menu-padding-y) var(--cue-menu-padding-x);border-radius:var(--cue-menu-border-radius);border:1px solid var(--cue-menu-border-color);background:var(--cue-menu-background-color);color:var(--cue-menu-foreground-color);max-height:var(--cue-menu-max-height);overflow-y:auto}.cue-menu-wrap-inner[_ngcontent-%COMP%]{--cue-input-value-color: var(--cue-menu-foreground-color);width:100%;height:100%;display:flex;flex-direction:column;gap:var(--cue-menu-gap)}"]})}return n})()},7023(v,m,a){a.d(m,{Q:()=>d});var c=a(7705),h=a(5802),e=a(5547),s=a(9769),o=a(9595);let n=(()=>{class i{template=c.hFB.required();context=(0,c.hFB)({});positioning=(0,c.hFB)("bottomright");menuClick=(0,c.CGW)();positioningClass=()=>this.positioning();static \u0275fac=function(u){return new(u||i)};static \u0275cmp=e.VBU({type:i,selectors:[["cue-context-menu-container"]],hostAttrs:[1,"clickoutside-ignore"],inputs:{template:[1,"template"],context:[1,"context"],positioning:[1,"positioning"]},outputs:{menuClick:"menuClick"},decls:2,vars:4,consts:[[1,"context-menu-wrapper","clickoutside-ignore",3,"click"],[3,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(u,r){1&u&&(e.j41(0,"div",0),e.bIt("click",function(){return r.menuClick.emit()}),e.eu8(1,1),e.k0s()),2&u&&(e.HbH(r.positioningClass()),e.R7$(),e.Y8G("ngTemplateOutlet",r.template())("ngTemplateOutletContext",r.context()))},dependencies:[s.MD,s.T3],styles:["[_nghost-%COMP%]{position:fixed;pointer-events:auto;z-index:10000;min-width:10px;min-height:10px}.context-menu-wrapper[_ngcontent-%COMP%]{pointer-events:auto;min-width:150px;min-height:10px}.context-menu-wrapper.topleft[_ngcontent-%COMP%]{transform:translate(-100%,-100%)}.context-menu-wrapper.topright[_ngcontent-%COMP%]{transform:translateY(-100%)}.context-menu-wrapper.bottomleft[_ngcontent-%COMP%]{transform:translate(-100%)}.context-menu-wrapper.bottomright[_ngcontent-%COMP%], .context-menu-wrapper.rightstart[_ngcontent-%COMP%]{transform:translate(0)}.context-menu-wrapper.rightend[_ngcontent-%COMP%]{transform:translateY(-100%)}.context-menu-wrapper.leftstart[_ngcontent-%COMP%]{transform:translate(-100%)}.context-menu-wrapper.leftend[_ngcontent-%COMP%]{transform:translate(-100%,-100%)}"]})}return i})(),d=(()=>{class i{elementRef=(0,h.WQX)(e.aKT);applicationRef=(0,h.WQX)(e.o8S);environmentInjector=(0,h.WQX)(h.uvJ);mousePressHandler=o.B.getInstance();static openMenus=[];cueContextMenu=c.hFB.required();contextMenuData=(0,c.hFB)();cueContextEnabled=(0,c.hFB)(!0);trigger=(0,c.hFB)("rightclick");positioning=(0,c.hFB)(void 0);positionAtCursor=(0,c.hFB)(!1);contextMenuOpen=(0,c.CGW)();contextMenuClose=(0,c.CGW)();contextMenuRef=null;documentClickHandlerAttached=!1;documentClickHandler=this.onDocumentClick.bind(this);documentScrollHandler=this.onDocumentScroll.bind(this);hoverTimeout=null;closeTimeout=null;hoverDelay=150;menuMouseEnterHandler=null;menuMouseLeaveHandler=null;boundOnShortRightPress=this.onShortRightPress.bind(this);boundOnShortLeftPress=this.onShortLeftPress.bind(this);boundOnLongRightPress=this.onLongRightPress.bind(this);boundOnLongLeftPress=this.onLongLeftPress.bind(this);constructor(){(0,h.QZP)(()=>{!this.cueContextEnabled()&&this.contextMenuRef&&setTimeout(()=>{this.contextMenuRef&&this.closeContextMenu()},0)})}ngOnInit(){const t=document.querySelectorAll("cue-context-menu-container");if(t.length>0){const u=new Set(i.openMenus.filter(r=>r.contextMenuRef).map(r=>r.contextMenuRef.location.nativeElement));t.forEach(r=>{r.parentNode&&!u.has(r)&&r.parentNode.removeChild(r)})}("rightclick"===this.trigger()||"both"===this.trigger()||"longpress"===this.trigger())&&this.mousePressHandler.setSuppressNativeContextMenu(!0),this.mousePressHandler.events.addListener("shortPressedRight",this.boundOnShortRightPress),this.mousePressHandler.events.addListener("shortPressedLeft",this.boundOnShortLeftPress),"longpress"===this.trigger()&&(this.mousePressHandler.events.addListener("longPressedRight",this.boundOnLongRightPress),this.mousePressHandler.events.addListener("longPressedLeft",this.boundOnLongLeftPress)),"hover"===this.trigger()&&(this.elementRef.nativeElement.addEventListener("mouseenter",this.onMouseEnter.bind(this)),this.elementRef.nativeElement.addEventListener("mouseleave",this.onMouseLeave.bind(this)))}onShortRightPress(t){if(this.isEventOnThisElement(t)&&("rightclick"===this.trigger()||"both"===this.trigger())){if(this.contextMenuRef)return t.preventDefault(),t.stopPropagation(),void this.closeContextMenu();if(!this.cueContextEnabled?.())return;t.preventDefault(),t.stopPropagation(),this.showContextMenu(t)}}onShortLeftPress(t){if(this.isEventOnThisElement(t)&&("leftclick"===this.trigger()||"both"===this.trigger())){if(this.contextMenuRef)return t.preventDefault(),t.stopPropagation(),void this.closeContextMenu();if(!this.cueContextEnabled?.())return;t.preventDefault(),t.stopPropagation(),this.showContextMenu(t)}}onLongRightPress(t){this.cueContextEnabled?.()&&this.isEventOnThisElement(t)&&("longpress"===this.trigger()||"rightclick"===this.trigger()||"both"===this.trigger())&&(t.preventDefault(),t.stopPropagation(),this.showContextMenu(t))}onLongLeftPress(t){this.cueContextEnabled?.()&&this.isEventOnThisElement(t)&&("longpress"===this.trigger()||"leftclick"===this.trigger()||"both"===this.trigger())&&(t.preventDefault(),t.stopPropagation(),this.showContextMenu(t))}isEventOnThisElement(t){return this.elementRef.nativeElement.contains(t.target)}onMouseEnter(t){!this.cueContextEnabled?.()||"hover"!==this.trigger()||(this.hoverTimeout&&(clearTimeout(this.hoverTimeout),this.hoverTimeout=null),this.closeTimeout&&(clearTimeout(this.closeTimeout),this.closeTimeout=null),this.contextMenuRef||(this.hoverTimeout=setTimeout(()=>{this.showContextMenu(t)},this.hoverDelay)))}onMouseLeave(t){!this.cueContextEnabled?.()||"hover"!==this.trigger()||(this.hoverTimeout&&(clearTimeout(this.hoverTimeout),this.hoverTimeout=null),this.closeTimeout&&(clearTimeout(this.closeTimeout),this.closeTimeout=null),this.closeTimeout=setTimeout(()=>{this.contextMenuRef&&this.closeContextMenu()},this.hoverDelay))}onDocumentClick(t){if(this.contextMenuRef)return this.contextMenuRef.location.nativeElement.contains(t.target)?null!==t.target?.closest("cue-menu-item button")?void setTimeout(()=>{this.contextMenuRef&&this.closeContextMenu()},0):void 0:void this.closeContextMenu()}onDocumentScroll(t){this.contextMenuRef&&(this.contextMenuRef.location.nativeElement.contains(t.target)||this.closeContextMenu())}showContextMenu(t){const u=this.elementRef.nativeElement.getBoundingClientRect();i.openMenus.forEach(p=>{p!==this&&(p.contextMenuRef?.location.nativeElement?.contains(this.elementRef.nativeElement)||p.closeContextMenu())}),this.closeContextMenu();const r=this.calculatePositioning(t,u),g=this.cueContextMenu();if(!(g&&g instanceof e.C4Q))return void console.error("Invalid template provided to context menu");this.contextMenuRef=(0,c.a0P)(n,{environmentInjector:this.environmentInjector}),this.contextMenuRef.setInput("template",g),this.contextMenuRef.setInput("context",{$implicit:this.contextMenuData(),event:t}),this.contextMenuRef.setInput("positioning",r);const M=this.contextMenuRef.instance.menuClick.subscribe(()=>{this.closeContextMenu()}),f=this.contextMenuRef.location.nativeElement;"hover"!==this.trigger()||this.positionAtCursor()?(f.style.left=`${t.clientX}px`,f.style.top=`${t.clientY}px`):this.positionSubmenu(f,r,u),this.applicationRef.attachView(this.contextMenuRef.hostView),(this.elementRef.nativeElement.closest("dialog")||document.body).appendChild(f),this.contextMenuRef._menuClickSubscription=M,"hover"===this.trigger()&&(this.menuMouseEnterHandler=()=>{this.closeTimeout&&(clearTimeout(this.closeTimeout),this.closeTimeout=null)},this.menuMouseLeaveHandler=()=>{this.closeTimeout&&(clearTimeout(this.closeTimeout),this.closeTimeout=null),this.closeTimeout=setTimeout(()=>{this.contextMenuRef&&this.closeContextMenu()},this.hoverDelay)},f.addEventListener("mouseenter",this.menuMouseEnterHandler),f.addEventListener("mouseleave",this.menuMouseLeaveHandler)),setTimeout(()=>{this.contextMenuRef&&!this.documentClickHandlerAttached&&(document.addEventListener("click",this.documentClickHandler,!0),document.addEventListener("contextmenu",this.documentClickHandler,!0),document.addEventListener("scroll",this.documentScrollHandler,!0),this.documentClickHandlerAttached=!0)},0),i.openMenus.includes(this)||i.openMenus.push(this),this.contextMenuOpen.emit({event:t,data:this.contextMenuData(),suggestedPositioning:r})}calculatePositioning(t,u){const r=this.positioning();if(r)return r;if("hover"===this.trigger()&&!this.positionAtCursor())return this.calculateSubmenuPositioning(u);const g=window.innerWidth,M=window.innerHeight,_=t.clientX>g-200,p=t.clientY>M-200;return _&&p?"topleft":_?"bottomleft":p?"topright":"bottomright"}calculateSubmenuPositioning(t){const u=window.innerWidth,r=window.innerHeight,x=u-t.right>=300,E=r-t.bottom>=150;return x&&E?"rightstart":x&&!E?"rightend":!x&&E?"leftstart":"leftend"}positionSubmenu(t,u,r){switch(u){case"rightstart":default:t.style.left=`${r.right}px`,t.style.top=`${r.top}px`;break;case"rightend":t.style.left=`${r.right}px`,t.style.top=`${r.bottom}px`;break;case"leftstart":t.style.left=`${r.left}px`,t.style.top=`${r.top}px`;break;case"leftend":t.style.left=`${r.left}px`,t.style.top=`${r.bottom}px`}}closeContextMenu(){if(this.contextMenuRef){const u=this.contextMenuRef.location.nativeElement;this.menuMouseEnterHandler&&(u.removeEventListener("mouseenter",this.menuMouseEnterHandler),this.menuMouseEnterHandler=null),this.menuMouseLeaveHandler&&(u.removeEventListener("mouseleave",this.menuMouseLeaveHandler),this.menuMouseLeaveHandler=null),this.documentClickHandlerAttached&&(document.removeEventListener("click",this.documentClickHandler,!0),document.removeEventListener("contextmenu",this.documentClickHandler,!0),document.removeEventListener("scroll",this.documentScrollHandler,!0),this.documentClickHandlerAttached=!1);const r=this.contextMenuRef._menuClickSubscription;r&&r.unsubscribe(),this.closeTimeout&&(clearTimeout(this.closeTimeout),this.closeTimeout=null);try{u.parentNode?u.parentNode.removeChild(u):document.body.contains(u)&&document.body.removeChild(u)}catch{try{u.remove&&u.remove()}catch{}}this.applicationRef.detachView(this.contextMenuRef.hostView),this.contextMenuRef.destroy(),this.contextMenuRef=null,this.contextMenuClose.emit()}const t=i.openMenus.indexOf(this);t>-1&&i.openMenus.splice(t,1)}ngOnDestroy(){this.mousePressHandler.setSuppressNativeContextMenu(!1),this.mousePressHandler.events.removeListener("shortPressedRight",this.boundOnShortRightPress),this.mousePressHandler.events.removeListener("shortPressedLeft",this.boundOnShortLeftPress),this.mousePressHandler.events.removeListener("longPressedRight",this.boundOnLongRightPress),this.mousePressHandler.events.removeListener("longPressedLeft",this.boundOnLongLeftPress),"hover"===this.trigger()&&(this.elementRef.nativeElement.removeEventListener("mouseenter",this.onMouseEnter),this.elementRef.nativeElement.removeEventListener("mouseleave",this.onMouseLeave)),this.hoverTimeout&&clearTimeout(this.hoverTimeout),this.closeTimeout&&clearTimeout(this.closeTimeout),this.closeContextMenu()}static \u0275fac=function(u){return new(u||i)};static \u0275dir=e.FsC({type:i,selectors:[["","cueContextMenu",""]],inputs:{cueContextMenu:[1,"cueContextMenu"],contextMenuData:[1,"contextMenuData"],cueContextEnabled:[1,"cueContextEnabled"],trigger:[1,"trigger"],positioning:[1,"positioning"],positionAtCursor:[1,"positionAtCursor"]},outputs:{contextMenuOpen:"contextMenuOpen",contextMenuClose:"contextMenuClose"}})}return i})()},5970(v,m,a){a.d(m,{C:()=>o});var c=a(7705),h=a(5802),e=a(5547);class s{newRect;oldRect;isFirst;element;constructor(d,i,l){this.newRect=d,this.oldRect=i,this.isFirst=null==i,this.element=l}}let o=(()=>{class n{element;zone;observer;oldRect;resized=(0,c.CGW)();windowResized=(0,c.CGW)();constructor(i,l){this.element=i,this.zone=l,this.observer=new ResizeObserver(t=>this.zone.run(()=>this.observe(t)))}ngOnInit(){this.observer.observe(this.element.nativeElement)}ngOnDestroy(){this.observer.disconnect()}onWindowResize(){this.zone.run(()=>{const i=this.getWindowRect(),l=new s(i,void 0,window.document.documentElement);this.windowResized.emit(l)})}observe(i){const l=i[0],t=new s(l.contentRect,this.oldRect,l.target);this.oldRect=l.contentRect,this.resized.emit(t)}getWindowRect(){return{x:0,y:0,width:window.innerWidth,height:window.innerHeight,top:0,left:0,right:window.innerWidth,bottom:window.innerHeight,toJSON:()=>({})}}static \u0275fac=function(l){return new(l||n)(e.rXU(e.aKT),e.rXU(h.SKi))};static \u0275dir=e.FsC({type:n,selectors:[["","cueResized",""]],hostBindings:function(l,t){1&l&&e.bIt("resize",function(){return t.onWindowResize()},e.tSv)},outputs:{resized:"resized",windowResized:"windowResized"}})}return n})()},9595(v,m,a){a.d(m,{B:()=>e});var c=a(1339);let h=(()=>{class s{static _instance;_pressTimer;_shortPressDuration=300;_longPressDuration=1e3;_pressTime;_emittedLongPress=!1;events=new c.EventEmitter;constructor(){document.addEventListener("keydown",n=>{void 0===this._pressTime&&(this._pressTime=(new Date).getTime(),this._pressTimer=setTimeout(()=>{this._handleLongPress(n.key),this._emittedLongPress=!0,clearTimeout(this._pressTimer)},this._longPressDuration),this.events.emit("holdingKey",n.key))}),document.addEventListener("keyup",n=>{void 0!==this._pressTime&&(clearTimeout(this._pressTimer),this._pressTime-(new Date).getTime()<this._shortPressDuration&&!this._emittedLongPress&&this._handleShortPress(n.key),this._reset(),this.events.emit("releasedKey",n.key))})}static getInstance(){return this._instance||(this._instance=new s),this._instance}_handleShortPress(n){"Escape"===n&&this.events.emit("shortPressedEsc"),this.events.emit("shortPressedKey",n)}_handleLongPress(n){"Escape"===n&&this.events.emit("longPressedEsc"),this.events.emit("longPressedKey",n)}_reset(){this._pressTime=void 0,this._emittedLongPress=!1}}return s})(),e=(()=>{class s{static _instance;_pressTimer;_shortPressDuration=200;_pressTime;_emittedLongPress=!1;_holdingControl=!1;_keyPressHandler=h.getInstance();_suppressNativeContextMenu=!1;events=new c.EventEmitter;constructor(){this._keyPressHandler.events.addListener("holdingKey",n=>{this._holdingControl="Control"===n}),this._keyPressHandler.events.addListener("releasedKey",n=>{"Control"===n&&(this._holdingControl=!1)}),document.addEventListener("mousedown",n=>{void 0===this._pressTime&&(this._pressTime=(new Date).getTime(),this._pressTimer=setTimeout(()=>{this._handlePress(n,"long"),this._emittedLongPress=!0,clearTimeout(this._pressTimer)},this._shortPressDuration))}),document.addEventListener("mouseup",n=>{void 0!==this._pressTime&&(clearTimeout(this._pressTimer),this._pressTime-(new Date).getTime()<this._shortPressDuration&&!this._emittedLongPress&&this._handlePress(n,"short"),this._reset())}),document.addEventListener("contextmenu",n=>{this._suppressNativeContextMenu&&(n.preventDefault(),n.stopPropagation())})}static getInstance(){return this._instance||(this._instance=new s),this._instance}setSuppressNativeContextMenu(n){this._suppressNativeContextMenu=n}get suppressNativeContextMenu(){return this._suppressNativeContextMenu}_handlePress(n,d){0===n.button&&!this._holdingControl&&this.events.emit(`${d}PressedLeft`,n),0===n.button&&this._holdingControl&&this.events.emit(`${d}PressedRight`,n),2===n.button&&this.events.emit(`${d}PressedRight`,n)}_reset(){this._pressTime=void 0,this._emittedLongPress=!1}}return s})()},2001(v,m){var a=this&&this.__spreadArrays||function(){for(var h=0,e=0,s=arguments.length;e<s;e++)h+=arguments[e].length;var o=Array(h),n=0;for(e=0;e<s;e++)for(var d=arguments[e],i=0,l=d.length;i<l;i++,n++)o[n]=d[i];return o};Object.defineProperty(m,"__esModule",{value:!0});var c=function(){return function h(){var e=this;this.events={},this.maxListeners=1/0,this.emit=function(s){for(var o=[],n=1;n<arguments.length;n++)o[n-1]=arguments[n];if(e.events[s]){for(var d=e.events[s].length,l=0,t=Array.from(e.events[s]);l<t.length;l++)t[l].apply(void 0,o);return!!d}return!1},this.on=function(s,o){return e.addListener(s,o),e},this.once=function(s,o){var n=function(){for(var d=[],i=0;i<arguments.length;i++)d[i]=arguments[i];o.apply(void 0,d),e.removeListener(s,n)};return e.addListener(s,n),e},this.addListener=function(s,o){return s in e.events?e.events[s].push(o):e.events[s]=[o],e.maxListeners!==1/0&&e.maxListeners<=e.events[s].length&&console.warn('Maximum event listeners for "'+s+'" event!'),e},this.removeListener=function(s,o){if(s in e.events){var n=e.events[s].indexOf(o);-1!==n&&e.events[s].splice(n,1)}return e},this.hasListeners=function(s){return e.events[s]&&!!e.events[s].length},this.prependListener=function(s,o){return s in e.events?e.events[s].unshift(o):e.events[s]=[o],e},this.prependOnceListener=function(s,o){var n=function(){for(var d=[],i=0;i<arguments.length;i++)d[i]=arguments[i];o.apply(void 0,d),e.removeListener(s,n)};return e.prependListener(s,n),e},this.off=function(s,o){return e.removeListener(s,o)},this.removeAllListeners=function(s){return delete e.events[s],e},this.setMaxListeners=function(s){return e.maxListeners=s,e},this.getMaxListeners=function(){return e.maxListeners},this.listeners=function(s){return a(e.events[s])},this.rawListeners=function(s){return e.events[s]},this.eventNames=function(){return Object.keys(e.events)},this.listenerCount=function(s){return e.events[s]&&e.events[s].length||0}}}();m.EventEmitter=c},1339(v,m,a){function c(h){for(var e in h)m.hasOwnProperty(e)||(m[e]=h[e])}Object.defineProperty(m,"__esModule",{value:!0}),c(a(9146)),c(a(2001))},9146(v,m){Object.defineProperty(m,"__esModule",{value:!0}),m.asTypedEventEmitter=function a(c){return c}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[266],{5964(Dt,q,h){h.d(q,{p:()=>s});var ye=h(9974),ve=h(4360);function s(i,_){return(0,ye.N)((c,b)=>{let K=0;c.subscribe((0,ve._)(b,O=>i.call(_,O,K++)&&b.next(O)))})}},9417(Dt,q,h){h.d(q,{YN:()=>xn,kq:()=>f});var s=h(5802),i=h(5547);h(7705),h(2271),h(6494),h(1413),h(7468),h(6648),h(6354);const f=new s.nKC(""),A=new s.nKC("",{factory:()=>P}),P="always";Promise.resolve(),Promise.resolve();let Nn=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=i.$C({type:t});static \u0275inj=s.G2t({})}return t})(),xn=(()=>{class t{static withConfig(e){return{ngModule:t,providers:[{provide:A,useValue:e.callSetDisabledState??P}]}}static \u0275fac=function(r){return new(r||t)};static \u0275mod=i.$C({type:t});static \u0275inj=s.G2t({imports:[Nn]})}return t})()}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[315],{3315(ye,Pt,g){g.d(Pt,{y:()=>be});var _=g(7705),h=g(5547),c=g(5802),u=g(1413),X=g(4226),M=g(7786),y=g(8359);g(3236),g(1584),g(536);var Ct=g(4412),S=g(9867),Tt=g(3293),N=g(6535),b=g(7384),k=g(6977),Ot=g(6354),Lt=g(6697),Mt=g(8141),Nt=g(5558),At=g(6365),U=g(9326),Bt=g(6648);function K(...n){return function Ft(){return(0,At.U)(1)}()((0,Bt.H)(n,(0,U.lI)(n)))}var Ht=g(9974);var $=g(9752);function A(n){const e=n.cloneNode(!0),t=e.querySelectorAll("[id]"),i=n.nodeName.toLowerCase();e.removeAttribute("id");for(let s=0;s<t.length;s++)t[s].removeAttribute("id");return"canvas"===i?J(n,e):("input"===i||"select"===i||"textarea"===i)&&Y(n,e),j("canvas",n,e,J),j("input, textarea, select",n,e,Y),e}function j(n,e,t,i){const s=e.querySelectorAll(n);if(s.length){const r=t.querySelectorAll(n);for(let o=0;o<s.length;o++)i(s[o],r[o])}}g(3531),g(7523);let Vt=0;function Y(n,e){"file"!==e.type&&(e.value=n.value),"radio"===e.type&&e.name&&(e.name=`mat-clone-${e.name}-${Vt++}`)}function J(n,e){const t=e.getContext("2d");if(t)try{t.drawImage(n,0,0)}catch{}}function F(n){const e=n.getBoundingClientRect();return{top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.width,height:e.height,x:e.x,y:e.y}}function R(n,e,t){n.top+=e,n.bottom=n.top+n.height,n.left+=t,n.right=n.left+n.width}class tt{_document;positions=new Map;constructor(e){this._document=e}clear(){this.positions.clear()}cache(e){this.clear(),this.positions.set(this._document,{scrollPosition:this.getViewportScrollPosition()}),e.forEach(t=>{this.positions.set(t,{scrollPosition:{top:t.scrollTop,left:t.scrollLeft},clientRect:F(t)})})}handleScroll(e){const t=(0,S.Fb)(e),i=this.positions.get(t);if(!i)return null;const s=i.scrollPosition;let r,o;if(t===this._document){const d=this.getViewportScrollPosition();r=d.top,o=d.left}else r=t.scrollTop,o=t.scrollLeft;const a=s.top-r,l=s.left-o;return this.positions.forEach((d,p)=>{d.clientRect&&t!==p&&t.contains(p)&&R(d.clientRect,a,l)}),s.top=r,s.left=o,{top:a,left:l}}getViewportScrollPosition(){return{top:window.scrollY,left:window.scrollX}}}function et(n,e){const t=n.rootNodes;if(1===t.length&&t[0].nodeType===e.ELEMENT_NODE)return t[0];const i=e.createElement("div");return t.forEach(s=>i.appendChild(s)),i}function H(n,e,t){for(let i in e)if(e.hasOwnProperty(i)){const s=e[i];s?n.setProperty(i,s,t?.has(i)?"important":""):n.removeProperty(i)}return n}function P(n,e){const t=e?"":"none";H(n.style,{"touch-action":e?"":"none","-webkit-user-drag":e?"":"none","-webkit-tap-highlight-color":e?"":"transparent","user-select":t,"-ms-user-select":t,"-webkit-user-select":t,"-moz-user-select":t})}function it(n,e,t){H(n.style,{position:e?"":"fixed",top:e?"":"0",opacity:e?"":"0",left:e?"":"-999em"},t)}function O(n,e){return e&&"none"!=e?n+" "+e:n}function st(n,e){n.style.width=`${e.width}px`,n.style.height=`${e.height}px`,n.style.transform=E(e.left,e.top)}function E(n,e){return`translate3d(${Math.round(n)}px, ${Math.round(e)}px, 0)`}const I={capture:!0},W={passive:!1,capture:!0};let Qt=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275cmp=h.VBU({type:n,selectors:[["ng-component"]],hostAttrs:["cdk-drag-resets-container",""],decls:0,vars:0,template:function(i,s){},styles:["@layer cdk-resets{.cdk-drag-preview{background:none;border:none;padding:0;color:inherit;inset:auto}}.cdk-drag-placeholder *,.cdk-drag-preview *{pointer-events:none !important}\n"],encapsulation:2,changeDetection:0})}return n})(),L=(()=>{class n{_ngZone=(0,c.WQX)(c.SKi);_document=(0,c.WQX)(c.qQL);_styleLoader=(0,c.WQX)(Tt.l);_renderer=(0,c.WQX)(h._9s).createRenderer(null,null);_cleanupDocumentTouchmove;_scroll=new u.B;_dropInstances=new Set;_dragInstances=new Set;_activeDragInstances=(0,c.vPA)([]);_globalListeners;_draggingPredicate=t=>t.isDragging();_domNodesToDirectives=null;pointerMove=new u.B;pointerUp=new u.B;constructor(){}registerDropContainer(t){this._dropInstances.has(t)||this._dropInstances.add(t)}registerDragItem(t){this._dragInstances.add(t),1===this._dragInstances.size&&this._ngZone.runOutsideAngular(()=>{this._cleanupDocumentTouchmove?.(),this._cleanupDocumentTouchmove=this._renderer.listen(this._document,"touchmove",this._persistentTouchmoveListener,W)})}removeDropContainer(t){this._dropInstances.delete(t)}removeDragItem(t){this._dragInstances.delete(t),this.stopDragging(t),0===this._dragInstances.size&&this._cleanupDocumentTouchmove?.()}startDragging(t,i){if(!(this._activeDragInstances().indexOf(t)>-1)&&(this._styleLoader.load(Qt),this._activeDragInstances.update(s=>[...s,t]),1===this._activeDragInstances().length)){const s=i.type.startsWith("touch"),r=a=>this.pointerUp.next(a),o=[["scroll",a=>this._scroll.next(a),I],["selectstart",this._preventDefaultWhileDragging,W]];s?o.push(["touchend",r,I],["touchcancel",r,I]):o.push(["mouseup",r,I]),s||o.push(["mousemove",a=>this.pointerMove.next(a),W]),this._ngZone.runOutsideAngular(()=>{this._globalListeners=o.map(([a,l,d])=>this._renderer.listen(this._document,a,l,d))})}}stopDragging(t){this._activeDragInstances.update(i=>{const s=i.indexOf(t);return s>-1?(i.splice(s,1),[...i]):i}),0===this._activeDragInstances().length&&this._clearGlobalListeners()}isDragging(t){return this._activeDragInstances().indexOf(t)>-1}scrolled(t){const i=[this._scroll];return t&&t!==this._document&&i.push(new X.c(s=>this._ngZone.runOutsideAngular(()=>{const r=this._renderer.listen(t,"scroll",o=>{this._activeDragInstances().length&&s.next(o)},I);return()=>{r()}}))),(0,M.h)(...i)}registerDirectiveNode(t,i){this._domNodesToDirectives??=new WeakMap,this._domNodesToDirectives.set(t,i)}removeDirectiveNode(t){this._domNodesToDirectives?.delete(t)}getDragDirectiveForNode(t){return this._domNodesToDirectives?.get(t)||null}ngOnDestroy(){this._dragInstances.forEach(t=>this.removeDragItem(t)),this._dropInstances.forEach(t=>this.removeDropContainer(t)),this._domNodesToDirectives=null,this._clearGlobalListeners(),this.pointerMove.complete(),this.pointerUp.complete()}_preventDefaultWhileDragging=t=>{this._activeDragInstances().length>0&&t.preventDefault()};_persistentTouchmoveListener=t=>{this._activeDragInstances().length>0&&(this._activeDragInstances().some(this._draggingPredicate)&&t.preventDefault(),this.pointerMove.next(t))};_clearGlobalListeners(){this._globalListeners?.forEach(t=>t()),this._globalListeners=void 0}static \u0275fac=function(i){return new(i||n)};static \u0275prov=c.jDH({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function nt(n){const e=n.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(n)*e}function z(n,e){return n.getPropertyValue(e).split(",").map(i=>i.trim())}const Ut=new Set(["position"]);class Kt{_document;_rootElement;_direction;_initialDomRect;_previewTemplate;_previewClass;_pickupPositionOnPage;_initialTransform;_zIndex;_renderer;_previewEmbeddedView=null;_preview;get element(){return this._preview}constructor(e,t,i,s,r,o,a,l,d,p){this._document=e,this._rootElement=t,this._direction=i,this._initialDomRect=s,this._previewTemplate=r,this._previewClass=o,this._pickupPositionOnPage=a,this._initialTransform=l,this._zIndex=d,this._renderer=p}attach(e){this._preview=this._createPreview(),e.appendChild(this._preview),rt(this._preview)&&this._preview.showPopover()}destroy(){this._preview.remove(),this._previewEmbeddedView?.destroy(),this._preview=this._previewEmbeddedView=null}setTransform(e){this._preview.style.transform=e}getBoundingClientRect(){return this._preview.getBoundingClientRect()}addClass(e){this._preview.classList.add(e)}getTransitionDuration(){return function Xt(n){const e=getComputedStyle(n),t=z(e,"transition-property"),i=t.find(a=>"transform"===a||"all"===a);if(!i)return 0;const s=t.indexOf(i),r=z(e,"transition-duration"),o=z(e,"transition-delay");return nt(r[s])+nt(o[s])}(this._preview)}addEventListener(e,t){return this._renderer.listen(this._preview,e,t)}_createPreview(){const e=this._previewTemplate,t=this._previewClass,i=e?e.template:null;let s;if(i&&e){const r=e.matchSize?this._initialDomRect:null,o=e.viewContainer.createEmbeddedView(i,e.context);o.detectChanges(),s=et(o,this._document),this._previewEmbeddedView=o,e.matchSize?st(s,r):s.style.transform=E(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else s=A(this._rootElement),st(s,this._initialDomRect),this._initialTransform&&(s.style.transform=this._initialTransform);return H(s.style,{"pointer-events":"none",margin:rt(s)?"0 auto 0 0":"0",position:"fixed",top:"0",left:"0","z-index":this._zIndex+""},Ut),P(s,!1),s.classList.add("cdk-drag-preview"),s.setAttribute("popover","manual"),s.setAttribute("dir",this._direction),t&&(Array.isArray(t)?t.forEach(r=>s.classList.add(r)):s.classList.add(t)),s}}function rt(n){return"showPopover"in n}const Zt={passive:!0},ot={passive:!1},$t={passive:!1,capture:!0},at="cdk-drag-placeholder",lt=new Set(["position"]);class Jt{_config;_document;_ngZone;_viewportRuler;_dragDropRegistry;_renderer;_rootElementCleanups;_cleanupShadowRootSelectStart;_preview=null;_previewContainer;_placeholderRef=null;_placeholder;_pickupPositionInElement;_pickupPositionOnPage;_marker;_anchor=null;_passiveTransform={x:0,y:0};_activeTransform={x:0,y:0};_initialTransform;_hasStartedDragging=(0,c.vPA)(!1);_hasMoved=!1;_initialContainer;_initialIndex;_parentPositions;_moveEvents=new u.B;_pointerDirectionDelta;_pointerPositionAtLastDirectionChange;_lastKnownPointerPosition;_rootElement;_ownerSVGElement=null;_rootElementTapHighlight;_pointerMoveSubscription=y.yU.EMPTY;_pointerUpSubscription=y.yU.EMPTY;_scrollSubscription=y.yU.EMPTY;_resizeSubscription=y.yU.EMPTY;_lastTouchEventTime;_dragStartTime;_boundaryElement=null;_nativeInteractionsEnabled=!0;_initialDomRect;_previewRect;_boundaryRect;_previewTemplate;_placeholderTemplate;_handles=[];_disabledHandles=new Set;_dropContainer;_direction="ltr";_parentDragRef=null;_cachedShadowRoot;lockAxis=null;dragStartDelay=0;previewClass;scale=1;get disabled(){return this._disabled||!(!this._dropContainer||!this._dropContainer.disabled)}set disabled(e){e!==this._disabled&&(this._disabled=e,this._toggleNativeDragInteractions(),this._handles.forEach(t=>P(t,e)))}_disabled=!1;beforeStarted=new u.B;started=new u.B;released=new u.B;ended=new u.B;entered=new u.B;exited=new u.B;dropped=new u.B;moved=this._moveEvents;data;constrainPosition;constructor(e,t,i,s,r,o,a){this._config=t,this._document=i,this._ngZone=s,this._viewportRuler=r,this._dragDropRegistry=o,this._renderer=a,this.withRootElement(e).withParent(t.parentDragRef||null),this._parentPositions=new tt(i),o.registerDragItem(this)}getPlaceholderElement(){return this._placeholder}getRootElement(){return this._rootElement}getVisibleElement(){return this.isDragging()?this.getPlaceholderElement():this.getRootElement()}withHandles(e){this._handles=e.map(i=>(0,b.i8)(i)),this._handles.forEach(i=>P(i,this.disabled)),this._toggleNativeDragInteractions();const t=new Set;return this._disabledHandles.forEach(i=>{this._handles.indexOf(i)>-1&&t.add(i)}),this._disabledHandles=t,this}withPreviewTemplate(e){return this._previewTemplate=e,this}withPlaceholderTemplate(e){return this._placeholderTemplate=e,this}withRootElement(e){const t=(0,b.i8)(e);if(t!==this._rootElement){this._removeRootElementListeners();const i=this._renderer;this._rootElementCleanups=this._ngZone.runOutsideAngular(()=>[i.listen(t,"mousedown",this._pointerDown,ot),i.listen(t,"touchstart",this._pointerDown,Zt),i.listen(t,"dragstart",this._nativeDragStart,ot)]),this._initialTransform=void 0,this._rootElement=t}return typeof SVGElement<"u"&&this._rootElement instanceof SVGElement&&(this._ownerSVGElement=this._rootElement.ownerSVGElement),this}withBoundaryElement(e){return this._boundaryElement=e?(0,b.i8)(e):null,this._resizeSubscription.unsubscribe(),e&&(this._resizeSubscription=this._viewportRuler.change(10).subscribe(()=>this._containInsideBoundaryOnResize())),this}withParent(e){return this._parentDragRef=e,this}dispose(){this._removeRootElementListeners(),this.isDragging()&&this._rootElement?.remove(),this._marker?.remove(),this._destroyPreview(),this._destroyPlaceholder(),this._dragDropRegistry.removeDragItem(this),this._removeListeners(),this.beforeStarted.complete(),this.started.complete(),this.released.complete(),this.ended.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this._moveEvents.complete(),this._handles=[],this._disabledHandles.clear(),this._dropContainer=void 0,this._resizeSubscription.unsubscribe(),this._parentPositions.clear(),this._boundaryElement=this._rootElement=this._ownerSVGElement=this._placeholderTemplate=this._previewTemplate=this._marker=this._parentDragRef=null}isDragging(){return this._hasStartedDragging()&&this._dragDropRegistry.isDragging(this)}reset(){this._rootElement.style.transform=this._initialTransform||"",this._activeTransform={x:0,y:0},this._passiveTransform={x:0,y:0}}resetToBoundary(){if(this._boundaryElement&&this._rootElement&&function Gt(n,e){return e.left<n.left||e.left+e.width>n.right||e.top<n.top||e.top+e.height>n.bottom}(this._boundaryElement.getBoundingClientRect(),this._rootElement.getBoundingClientRect())){const e=this._boundaryElement.getBoundingClientRect(),t=this._rootElement.getBoundingClientRect();let i=0,s=0;t.left<e.left?i=e.left-t.left:t.right>e.right&&(i=e.right-t.right),t.top<e.top?s=e.top-t.top:t.bottom>e.bottom&&(s=e.bottom-t.bottom);let a=this._activeTransform.x+i,l=this._activeTransform.y+s;this._rootElement.style.transform=E(a,l),this._activeTransform={x:a,y:l},this._passiveTransform={x:a,y:l}}}disableHandle(e){!this._disabledHandles.has(e)&&this._handles.indexOf(e)>-1&&(this._disabledHandles.add(e),P(e,!0))}enableHandle(e){this._disabledHandles.has(e)&&(this._disabledHandles.delete(e),P(e,this.disabled))}withDirection(e){return this._direction=e,this}_withDropContainer(e){this._dropContainer=e}getFreeDragPosition(){const e=this.isDragging()?this._activeTransform:this._passiveTransform;return{x:e.x,y:e.y}}setFreeDragPosition(e){return this._activeTransform={x:0,y:0},this._passiveTransform.x=e.x,this._passiveTransform.y=e.y,this._dropContainer||this._applyRootElementTransform(e.x,e.y),this}withPreviewContainer(e){return this._previewContainer=e,this}_sortFromLastPointerPosition(){const e=this._lastKnownPointerPosition;e&&this._dropContainer&&this._updateActiveDropContainer(this._getConstrainedPointerPosition(e),e)}_removeListeners(){this._pointerMoveSubscription.unsubscribe(),this._pointerUpSubscription.unsubscribe(),this._scrollSubscription.unsubscribe(),this._cleanupShadowRootSelectStart?.(),this._cleanupShadowRootSelectStart=void 0}_destroyPreview(){this._preview?.destroy(),this._preview=null}_destroyPlaceholder(){this._anchor?.remove(),this._placeholder?.remove(),this._placeholderRef?.destroy(),this._placeholder=this._anchor=this._placeholderRef=null}_pointerDown=e=>{if(this.beforeStarted.next(),this._handles.length){const t=this._getTargetHandle(e);t&&!this._disabledHandles.has(t)&&!this.disabled&&this._initializeDragSequence(t,e)}else this.disabled||this._initializeDragSequence(this._rootElement,e)};_pointerMove=e=>{const t=this._getPointerPositionOnPage(e);if(!this._hasStartedDragging()){if(Math.abs(t.x-this._pickupPositionOnPage.x)+Math.abs(t.y-this._pickupPositionOnPage.y)>=this._config.dragStartThreshold){const a=Date.now()>=this._dragStartTime+this._getDragStartDelay(e),l=this._dropContainer;if(!a)return void this._endDragSequence(e);(!l||!l.isDragging()&&!l.isReceiving())&&(e.cancelable&&e.preventDefault(),this._hasStartedDragging.set(!0),this._ngZone.run(()=>this._startDragSequence(e)))}return}e.cancelable&&e.preventDefault();const i=this._getConstrainedPointerPosition(t);if(this._hasMoved=!0,this._lastKnownPointerPosition=t,this._updatePointerDirectionDelta(i),this._dropContainer)this._updateActiveDropContainer(i,t);else{const s=this.constrainPosition?this._initialDomRect:this._pickupPositionOnPage,r=this._activeTransform;r.x=i.x-s.x+this._passiveTransform.x,r.y=i.y-s.y+this._passiveTransform.y,this._applyRootElementTransform(r.x,r.y)}this._moveEvents.observers.length&&this._ngZone.run(()=>{this._moveEvents.next({source:this,pointerPosition:i,event:e,distance:this._getDragDistance(i),delta:this._pointerDirectionDelta})})};_pointerUp=e=>{this._endDragSequence(e)};_endDragSequence(e){if(this._dragDropRegistry.isDragging(this)&&(this._removeListeners(),this._dragDropRegistry.stopDragging(this),this._toggleNativeDragInteractions(),this._handles&&(this._rootElement.style.webkitTapHighlightColor=this._rootElementTapHighlight),this._hasStartedDragging()))if(this.released.next({source:this,event:e}),this._dropContainer)this._dropContainer._stopScrolling(),this._animatePreviewToPlaceholder().then(()=>{this._cleanupDragArtifacts(e),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)});else{this._passiveTransform.x=this._activeTransform.x;const t=this._getPointerPositionOnPage(e);this._passiveTransform.y=this._activeTransform.y,this._ngZone.run(()=>{this.ended.next({source:this,distance:this._getDragDistance(t),dropPoint:t,event:e})}),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)}}_startDragSequence(e){C(e)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();const t=this._getShadowRoot(),i=this._dropContainer;if(t&&this._ngZone.runOutsideAngular(()=>{this._cleanupShadowRootSelectStart=this._renderer.listen(t,"selectstart",qt,$t)}),i){const s=this._rootElement,r=s.parentNode,o=this._placeholder=this._createPlaceholderElement(),a=this._marker=this._marker||this._document.createComment("");r.insertBefore(a,s),this._initialTransform=s.style.transform||"",this._preview=new Kt(this._document,this._rootElement,this._direction,this._initialDomRect,this._previewTemplate||null,this.previewClass||null,this._pickupPositionOnPage,this._initialTransform,this._config.zIndex||1e3,this._renderer),this._preview.attach(this._getPreviewInsertionPoint(r,t)),it(s,!1,lt),this._document.body.appendChild(r.replaceChild(o,s)),this.started.next({source:this,event:e}),i.start(),this._initialContainer=i,this._initialIndex=i.getItemIndex(this)}else this.started.next({source:this,event:e}),this._initialContainer=this._initialIndex=void 0;this._parentPositions.cache(i?i.getScrollableParents():[])}_initializeDragSequence(e,t){this._parentDragRef&&t.stopPropagation();const i=this.isDragging(),s=C(t),r=!s&&0!==t.button,o=this._rootElement,a=(0,S.Fb)(t),l=!s&&this._lastTouchEventTime&&this._lastTouchEventTime+800>Date.now(),d=s?function kt(n){const e=n.touches&&n.touches[0]||n.changedTouches&&n.changedTouches[0];return!(!e||-1!==e.identifier||null!=e.radiusX&&1!==e.radiusX||null!=e.radiusY&&1!==e.radiusY)}(t):function xt(n){return 0===n.buttons||0===n.detail}(t);if(a&&a.draggable&&"mousedown"===t.type&&t.preventDefault(),i||r||l||d)return;if(this._handles.length){const w=o.style;this._rootElementTapHighlight=w.webkitTapHighlightColor||"",w.webkitTapHighlightColor="transparent"}this._hasMoved=!1,this._hasStartedDragging.set(this._hasMoved),this._removeListeners(),this._initialDomRect=this._rootElement.getBoundingClientRect(),this._pointerMoveSubscription=this._dragDropRegistry.pointerMove.subscribe(this._pointerMove),this._pointerUpSubscription=this._dragDropRegistry.pointerUp.subscribe(this._pointerUp),this._scrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(w=>this._updateOnScroll(w)),this._boundaryElement&&(this._boundaryRect=F(this._boundaryElement));const p=this._previewTemplate;this._pickupPositionInElement=p&&p.template&&!p.matchSize?{x:0,y:0}:this._getPointerPositionInElement(this._initialDomRect,e,t);const m=this._pickupPositionOnPage=this._lastKnownPointerPosition=this._getPointerPositionOnPage(t);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:m.x,y:m.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,t)}_cleanupDragArtifacts(e){it(this._rootElement,!0,lt),this._marker.parentNode.replaceChild(this._rootElement,this._marker),this._destroyPreview(),this._destroyPlaceholder(),this._initialDomRect=this._boundaryRect=this._previewRect=this._initialTransform=void 0,this._ngZone.run(()=>{const t=this._dropContainer,i=t.getItemIndex(this),s=this._getPointerPositionOnPage(e),r=this._getDragDistance(s),o=t._isOverContainer(s.x,s.y);this.ended.next({source:this,distance:r,dropPoint:s,event:e}),this.dropped.next({item:this,currentIndex:i,previousIndex:this._initialIndex,container:t,previousContainer:this._initialContainer,isPointerOverContainer:o,distance:r,dropPoint:s,event:e}),t.drop(this,i,this._initialIndex,this._initialContainer,o,r,s,e),this._dropContainer=this._initialContainer})}_updateActiveDropContainer({x:e,y:t},{x:i,y:s}){let r=this._initialContainer._getSiblingContainerFromPosition(this,e,t);!r&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(e,t)&&(r=this._initialContainer),r&&r!==this._dropContainer&&this._ngZone.run(()=>{const o=this._dropContainer.getItemIndex(this),a=this._dropContainer.getItemAtIndex(o+1)?.getVisibleElement()||null;this.exited.next({item:this,container:this._dropContainer}),this._dropContainer.exit(this),this._conditionallyInsertAnchor(r,this._dropContainer,a),this._dropContainer=r,this._dropContainer.enter(this,e,t,r===this._initialContainer&&r.sortingDisabled?this._initialIndex:void 0),this.entered.next({item:this,container:r,currentIndex:r.getItemIndex(this)})}),this.isDragging()&&(this._dropContainer._startScrollingIfNecessary(i,s),this._dropContainer._sortItem(this,e,t,this._pointerDirectionDelta),this.constrainPosition?this._applyPreviewTransform(e,t):this._applyPreviewTransform(e-this._pickupPositionInElement.x,t-this._pickupPositionInElement.y))}_animatePreviewToPlaceholder(){if(!this._hasMoved)return Promise.resolve();const e=this._placeholder.getBoundingClientRect();this._preview.addClass("cdk-drag-animating"),this._applyPreviewTransform(e.left,e.top);const t=this._preview.getTransitionDuration();return 0===t?Promise.resolve():this._ngZone.runOutsideAngular(()=>new Promise(i=>{const s=a=>{(!a||this._preview&&(0,S.Fb)(a)===this._preview.element&&"transform"===a.propertyName)&&(o(),i(),clearTimeout(r))},r=setTimeout(s,1.5*t),o=this._preview.addEventListener("transitionend",s)}))}_createPlaceholderElement(){const e=this._placeholderTemplate,t=e?e.template:null;let i;return t?(this._placeholderRef=e.viewContainer.createEmbeddedView(t,e.context),this._placeholderRef.detectChanges(),i=et(this._placeholderRef,this._document)):i=A(this._rootElement),i.style.pointerEvents="none",i.classList.add(at),i}_getPointerPositionInElement(e,t,i){const s=t===this._rootElement?null:t,r=s?s.getBoundingClientRect():e,o=C(i)?i.targetTouches[0]:i,a=this._getViewportScrollPosition();return{x:r.left-e.left+(o.pageX-r.left-a.left),y:r.top-e.top+(o.pageY-r.top-a.top)}}_getPointerPositionOnPage(e){const t=this._getViewportScrollPosition(),i=C(e)?e.touches[0]||e.changedTouches[0]||{pageX:0,pageY:0}:e,s=i.pageX-t.left,r=i.pageY-t.top;if(this._ownerSVGElement){const o=this._ownerSVGElement.getScreenCTM();if(o){const a=this._ownerSVGElement.createSVGPoint();return a.x=s,a.y=r,a.matrixTransform(o.inverse())}}return{x:s,y:r}}_getConstrainedPointerPosition(e){const t=this._dropContainer?this._dropContainer.lockAxis:null;let{x:i,y:s}=this.constrainPosition?this.constrainPosition(e,this,this._initialDomRect,this._pickupPositionInElement):e;if("x"===this.lockAxis||"x"===t?s=this._pickupPositionOnPage.y-(this.constrainPosition?this._pickupPositionInElement.y:0):("y"===this.lockAxis||"y"===t)&&(i=this._pickupPositionOnPage.x-(this.constrainPosition?this._pickupPositionInElement.x:0)),this._boundaryRect){const{x:r,y:o}=this.constrainPosition?{x:0,y:0}:this._pickupPositionInElement,a=this._boundaryRect,{width:l,height:d}=this._getPreviewRect(),p=a.top+o,m=a.bottom-(d-o);i=ct(i,a.left+r,a.right-(l-r)),s=ct(s,p,m)}return{x:i,y:s}}_updatePointerDirectionDelta(e){const{x:t,y:i}=e,s=this._pointerDirectionDelta,r=this._pointerPositionAtLastDirectionChange,o=Math.abs(t-r.x),a=Math.abs(i-r.y);return o>this._config.pointerDirectionChangeThreshold&&(s.x=t>r.x?1:-1,r.x=t),a>this._config.pointerDirectionChangeThreshold&&(s.y=i>r.y?1:-1,r.y=i),s}_toggleNativeDragInteractions(){if(!this._rootElement||!this._handles)return;const e=this._handles.length>0||!this.isDragging();e!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=e,P(this._rootElement,e))}_removeRootElementListeners(){this._rootElementCleanups?.forEach(e=>e()),this._rootElementCleanups=void 0}_applyRootElementTransform(e,t){const i=1/this.scale,s=E(e*i,t*i),r=this._rootElement.style;null==this._initialTransform&&(this._initialTransform=r.transform&&"none"!=r.transform?r.transform:""),r.transform=O(s,this._initialTransform)}_applyPreviewTransform(e,t){const i=this._previewTemplate?.template?void 0:this._initialTransform,s=E(e,t);this._preview.setTransform(O(s,i))}_getDragDistance(e){const t=this._pickupPositionOnPage;return t?{x:e.x-t.x,y:e.y-t.y}:{x:0,y:0}}_cleanupCachedDimensions(){this._boundaryRect=this._previewRect=void 0,this._parentPositions.clear()}_containInsideBoundaryOnResize(){let{x:e,y:t}=this._passiveTransform;if(0===e&&0===t||this.isDragging()||!this._boundaryElement)return;const i=this._rootElement.getBoundingClientRect(),s=this._boundaryElement.getBoundingClientRect();if(0===s.width&&0===s.height||0===i.width&&0===i.height)return;const r=s.left-i.left,o=i.right-s.right,a=s.top-i.top,l=i.bottom-s.bottom;s.width>i.width?(r>0&&(e+=r),o>0&&(e-=o)):e=0,s.height>i.height?(a>0&&(t+=a),l>0&&(t-=l)):t=0,(e!==this._passiveTransform.x||t!==this._passiveTransform.y)&&this.setFreeDragPosition({y:t,x:e})}_getDragStartDelay(e){const t=this.dragStartDelay;return"number"==typeof t?t:C(e)?t.touch:t?t.mouse:0}_updateOnScroll(e){const t=this._parentPositions.handleScroll(e);if(t){const i=(0,S.Fb)(e);this._boundaryRect&&i!==this._boundaryElement&&i.contains(this._boundaryElement)&&R(this._boundaryRect,t.top,t.left),this._pickupPositionOnPage.x+=t.left,this._pickupPositionOnPage.y+=t.top,this._dropContainer||(this._activeTransform.x-=t.left,this._activeTransform.y-=t.top,this._applyRootElementTransform(this._activeTransform.x,this._activeTransform.y))}}_getViewportScrollPosition(){return this._parentPositions.positions.get(this._document)?.scrollPosition||this._parentPositions.getViewportScrollPosition()}_getShadowRoot(){return void 0===this._cachedShadowRoot&&(this._cachedShadowRoot=(0,S.KT)(this._rootElement)),this._cachedShadowRoot}_getPreviewInsertionPoint(e,t){const i=this._previewContainer||"global";if("parent"===i)return e;if("global"===i){const s=this._document;return t||s.fullscreenElement||s.webkitFullscreenElement||s.mozFullScreenElement||s.msFullscreenElement||s.body}return(0,b.i8)(i)}_getPreviewRect(){return(!this._previewRect||!this._previewRect.width&&!this._previewRect.height)&&(this._previewRect=this._preview?this._preview.getBoundingClientRect():this._initialDomRect),this._previewRect}_nativeDragStart=e=>{if(this._handles.length){const t=this._getTargetHandle(e);t&&!this._disabledHandles.has(t)&&!this.disabled&&e.preventDefault()}else this.disabled||e.preventDefault()};_getTargetHandle(e){return this._handles.find(t=>e.target&&(e.target===t||t.contains(e.target)))}_conditionallyInsertAnchor(e,t,i){if(e===this._initialContainer)this._anchor?.remove(),this._anchor=null;else if(t===this._initialContainer&&t.hasAnchor){const s=this._anchor??=A(this._placeholder);s.classList.remove(at),s.classList.add("cdk-drag-anchor"),s.style.transform="",i?i.before(s):(0,b.i8)(t.element).appendChild(s)}}}function ct(n,e,t){return Math.max(e,Math.min(t,n))}function C(n){return"t"===n.type[0]}function qt(n){n.preventDefault()}const x=new c.nKC("CDK_DRAG_PARENT"),ft=new c.nKC("CdkDragHandle"),mt=new c.nKC("CDK_DRAG_CONFIG"),vt=new c.nKC("CdkDropList");let Dt=(()=>{class n{element=(0,c.WQX)(h.aKT);dropContainer=(0,c.WQX)(vt,{optional:!0,skipSelf:!0});_ngZone=(0,c.WQX)(c.SKi);_viewContainerRef=(0,c.WQX)(h.c1b);_dir=(0,c.WQX)($.dS,{optional:!0});_changeDetectorRef=(0,c.WQX)(_.gRc);_selfHandle=(0,c.WQX)(ft,{optional:!0,self:!0});_parentDrag=(0,c.WQX)(x,{optional:!0,skipSelf:!0});_dragDropRegistry=(0,c.WQX)(L);_destroyed=new u.B;_handles=new Ct.t([]);_previewTemplate=null;_placeholderTemplate=null;_dragRef;data;lockAxis=null;rootElementSelector;boundaryElement;dragStartDelay;freeDragPosition;get disabled(){return this._disabled||!(!this.dropContainer||!this.dropContainer.disabled)}set disabled(t){this._disabled=t,this._dragRef.disabled=this._disabled}_disabled=!1;constrainPosition;previewClass;previewContainer;scale=1;started=new c.bkB;released=new c.bkB;ended=new c.bkB;entered=new c.bkB;exited=new c.bkB;dropped=new c.bkB;moved=new X.c(t=>{const i=this._dragRef.moved.pipe((0,Ot.T)(s=>({source:this,pointerPosition:s.pointerPosition,event:s.event,delta:s.delta,distance:s.distance}))).subscribe(t);return()=>{i.unsubscribe()}});_injector=(0,c.WQX)(c.zZn);constructor(){const t=this.dropContainer,i=(0,c.WQX)(mt,{optional:!0});this._dragRef=function Yt(n,e,t={dragStartThreshold:5,pointerDirectionChangeThreshold:5}){const i=n.get(h.sFG,null,{optional:!0})||n.get(h._9s).createRenderer(null,null);return new Jt(e,t,n.get(c.qQL),n.get(c.SKi),n.get(N.Xj),n.get(L),i)}(this._injector,this.element,{dragStartThreshold:i&&null!=i.dragStartThreshold?i.dragStartThreshold:5,pointerDirectionChangeThreshold:i&&null!=i.pointerDirectionChangeThreshold?i.pointerDirectionChangeThreshold:5,zIndex:i?.zIndex}),this._dragRef.data=this,this._dragDropRegistry.registerDirectiveNode(this.element.nativeElement,this),i&&this._assignDefaults(i),t&&(t.addItem(this),t._dropListRef.beforeStarted.pipe((0,k.Q)(this._destroyed)).subscribe(()=>{this._dragRef.scale=this.scale})),this._syncInputs(this._dragRef),this._handleEvents(this._dragRef)}getPlaceholderElement(){return this._dragRef.getPlaceholderElement()}getRootElement(){return this._dragRef.getRootElement()}reset(){this._dragRef.reset()}resetToBoundary(){this._dragRef.resetToBoundary()}getFreeDragPosition(){return this._dragRef.getFreeDragPosition()}setFreeDragPosition(t){this._dragRef.setFreeDragPosition(t)}ngAfterViewInit(){(0,h.mal)(()=>{this._updateRootElement(),this._setupHandlesListener(),this._dragRef.scale=this.scale,this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)},{injector:this._injector})}ngOnChanges(t){const i=t.rootElementSelector,s=t.freeDragPosition;i&&!i.firstChange&&this._updateRootElement(),this._dragRef.scale=this.scale,s&&!s.firstChange&&this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)}ngOnDestroy(){this.dropContainer&&this.dropContainer.removeItem(this),this._dragDropRegistry.removeDirectiveNode(this.element.nativeElement),this._ngZone.runOutsideAngular(()=>{this._handles.complete(),this._destroyed.next(),this._destroyed.complete(),this._dragRef.dispose()})}_addHandle(t){const i=this._handles.getValue();i.push(t),this._handles.next(i)}_removeHandle(t){const i=this._handles.getValue(),s=i.indexOf(t);s>-1&&(i.splice(s,1),this._handles.next(i))}_setPreviewTemplate(t){this._previewTemplate=t}_resetPreviewTemplate(t){t===this._previewTemplate&&(this._previewTemplate=null)}_setPlaceholderTemplate(t){this._placeholderTemplate=t}_resetPlaceholderTemplate(t){t===this._placeholderTemplate&&(this._placeholderTemplate=null)}_updateRootElement(){const t=this.element.nativeElement;let i=t;this.rootElementSelector&&(i=void 0!==t.closest?t.closest(this.rootElementSelector):t.parentElement?.closest(this.rootElementSelector)),this._dragRef.withRootElement(i||t)}_getBoundaryElement(){const t=this.boundaryElement;return t?"string"==typeof t?this.element.nativeElement.closest(t):(0,b.i8)(t):null}_syncInputs(t){t.beforeStarted.subscribe(()=>{if(!t.isDragging()){const i=this._dir,s=this.dragStartDelay,r=this._placeholderTemplate?{template:this._placeholderTemplate.templateRef,context:this._placeholderTemplate.data,viewContainer:this._viewContainerRef}:null,o=this._previewTemplate?{template:this._previewTemplate.templateRef,context:this._previewTemplate.data,matchSize:this._previewTemplate.matchSize,viewContainer:this._viewContainerRef}:null;t.disabled=this.disabled,t.lockAxis=this.lockAxis,t.scale=this.scale,t.dragStartDelay="object"==typeof s&&s?s:(0,b.OE)(s),t.constrainPosition=this.constrainPosition,t.previewClass=this.previewClass,t.withBoundaryElement(this._getBoundaryElement()).withPlaceholderTemplate(r).withPreviewTemplate(o).withPreviewContainer(this.previewContainer||"global"),i&&t.withDirection(i.value)}}),t.beforeStarted.pipe((0,Lt.s)(1)).subscribe(()=>{if(this._parentDrag)return void t.withParent(this._parentDrag._dragRef);let i=this.element.nativeElement.parentElement;for(;i;){const s=this._dragDropRegistry.getDragDirectiveForNode(i);if(s){t.withParent(s._dragRef);break}i=i.parentElement}})}_handleEvents(t){t.started.subscribe(i=>{this.started.emit({source:this,event:i.event}),this._changeDetectorRef.markForCheck()}),t.released.subscribe(i=>{this.released.emit({source:this,event:i.event})}),t.ended.subscribe(i=>{this.ended.emit({source:this,distance:i.distance,dropPoint:i.dropPoint,event:i.event}),this._changeDetectorRef.markForCheck()}),t.entered.subscribe(i=>{this.entered.emit({container:i.container.data,item:this,currentIndex:i.currentIndex})}),t.exited.subscribe(i=>{this.exited.emit({container:i.container.data,item:this})}),t.dropped.subscribe(i=>{this.dropped.emit({previousIndex:i.previousIndex,currentIndex:i.currentIndex,previousContainer:i.previousContainer.data,container:i.container.data,isPointerOverContainer:i.isPointerOverContainer,item:this,distance:i.distance,dropPoint:i.dropPoint,event:i.event})})}_assignDefaults(t){const{lockAxis:i,dragStartDelay:s,constrainPosition:r,previewClass:o,boundaryElement:a,draggingDisabled:l,rootElementSelector:d,previewContainer:p}=t;this.disabled=l??!1,this.dragStartDelay=s||0,this.lockAxis=i||null,r&&(this.constrainPosition=r),o&&(this.previewClass=o),a&&(this.boundaryElement=a),d&&(this.rootElementSelector=d),p&&(this.previewContainer=p)}_setupHandlesListener(){this._handles.pipe((0,Mt.M)(t=>{const i=t.map(s=>s.element);this._selfHandle&&this.rootElementSelector&&i.push(this.element),this._dragRef.withHandles(i)}),(0,Nt.n)(t=>(0,M.h)(...t.map(i=>i._stateChanges.pipe(function Z(...n){const e=(0,U.lI)(n);return(0,Ht.N)((t,i)=>{(e?K(n,t,e):K(n,t)).subscribe(i)})}(i))))),(0,k.Q)(this._destroyed)).subscribe(t=>{const i=this._dragRef,s=t.element.nativeElement;t.disabled?i.disableHandle(s):i.enableHandle(s)})}static \u0275fac=function(i){return new(i||n)};static \u0275dir=h.FsC({type:n,selectors:[["","cdkDrag",""]],hostAttrs:[1,"cdk-drag"],hostVars:4,hostBindings:function(i,s){2&i&&h.AVh("cdk-drag-disabled",s.disabled)("cdk-drag-dragging",s._dragRef.isDragging())},inputs:{data:[0,"cdkDragData","data"],lockAxis:[0,"cdkDragLockAxis","lockAxis"],rootElementSelector:[0,"cdkDragRootElement","rootElementSelector"],boundaryElement:[0,"cdkDragBoundary","boundaryElement"],dragStartDelay:[0,"cdkDragStartDelay","dragStartDelay"],freeDragPosition:[0,"cdkDragFreeDragPosition","freeDragPosition"],disabled:[2,"cdkDragDisabled","disabled",_.L39],constrainPosition:[0,"cdkDragConstrainPosition","constrainPosition"],previewClass:[0,"cdkDragPreviewClass","previewClass"],previewContainer:[0,"cdkDragPreviewContainer","previewContainer"],scale:[2,"cdkDragScale","scale",_.Udg]},outputs:{started:"cdkDragStarted",released:"cdkDragReleased",ended:"cdkDragEnded",entered:"cdkDragEntered",exited:"cdkDragExited",dropped:"cdkDragDropped",moved:"cdkDragMoved"},exportAs:["cdkDrag"],features:[h.Jv_([{provide:x,useExisting:n}]),h.OA$]})}return n})();var he=g(9769),de=g(5187),ge=g(2271);const pe=["*"];let _e=(()=>{class n{style=(0,_.hFB)("");gap=(0,_.hFB)("m");columns=(0,_.hFB)(1);getStyles=(0,ge.EW)(()=>`\n grid-template-columns: repeat(${this.columns()}, minmax(0, 1fr));\n gap: var(--cue-grid-gap-${this.gap()});\n ${this.style()}\n `);static \u0275fac=function(i){return new(i||n)};static \u0275cmp=h.VBU({type:n,selectors:[["cue-grid"]],hostVars:2,hostBindings:function(i,s){2&i&&h.Aen(s.getStyles())},inputs:{style:[1,"style"],gap:[1,"gap"],columns:[1,"columns"]},ngContentSelectors:pe,decls:1,vars:0,template:function(i,s){1&i&&(h.NAR(),h.SdG(0))},styles:["[_nghost-%COMP%]{display:grid}"]})}return n})();var ue=g(2245),fe=g(5381),me=g(29);const ve=["*"];function De(n,e){if(1&n&&(h.j41(0,"cue-typography",2),h.EFF(1),h.k0s()),2&n){const t=h.XpG();h.R7$(),h.SpI(" ",t.label()," ")}}let be=(()=>{class n{label=(0,_.hFB)("");variant=(0,_.hFB)("default");shadow=(0,_.hFB)(!1);padded=(0,_.hFB)(!0);showCloseBtn=(0,_.hFB)(!0);position=(0,_.hFB)("top-left");clickedClose=(0,_.CGW)();margin=(0,_.hFB)("0.5rem");close(t){t.stopPropagation(),t.stopImmediatePropagation(),this.clickedClose.emit()}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=h.VBU({type:n,selectors:[["cue-draggable-card"]],inputs:{label:[1,"label"],variant:[1,"variant"],shadow:[1,"shadow"],padded:[1,"padded"],showCloseBtn:[1,"showCloseBtn"],position:[1,"position"],margin:[1,"margin"]},outputs:{clickedClose:"clickedClose"},ngContentSelectors:ve,decls:8,vars:14,consts:[["cdkDrag","",1,"panel",3,"variant","shadow","padded"],["justify","end"],["size","l"],[2,"width","100%"],["name","close",2,"cursor","pointer",3,"click"]],template:function(i,s){1&i&&(h.NAR(),h.j41(0,"cue-card",0)(1,"cue-typography")(2,"cue-grid")(3,"cue-flexcontainer",1),h.nVh(4,De,2,1,"cue-typography",2),h.nrm(5,"span",3),h.j41(6,"cue-svg-icon",4),h.bIt("click",function(o){return s.close(o)}),h.k0s()(),h.SdG(7),h.k0s()()()),2&i&&(h.xc7("top","top-left"===s.position()||"top-right"===s.position()?s.margin():"null")("bottom","bottom-left"===s.position()||"bottom-right"===s.position()?s.margin():"null")("left","top-left"===s.position()||"bottom-left"===s.position()?s.margin():"null")("right","top-right"===s.position()||"bottom-right"===s.position()?s.margin():"null"),h.Y8G("variant",s.variant())("shadow",s.shadow())("padded",s.padded()),h.R7$(3),h.xc7("padding",s.padded()?"0":"10px"),h.R7$(),h.vxM(s.label()&&"undefined"!==s.label()?4:-1))},dependencies:[he.MD,de.Z,_e,ue.o,fe.n,me.A,Dt],styles:[".panel[_ngcontent-%COMP%]{position:absolute;width:fit-content}"]})}return n})()}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[344],{9344(at,me,$){$.d(me,{MarkdownViewer:()=>it});var we=$(467),ye=$(7705),J=$(5802);var v={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function K(r){v=r}var S={exec:()=>null};function p(r,e=""){let t="string"==typeof r?r:r.source;const s={replace:(n,i)=>{let l="string"==typeof i?i:i.source;return l=l.replace(d.caret,"$1"),t=t.replace(n,l),s},getRegex:()=>new RegExp(t,e)};return s}var d={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:r=>new RegExp(`^( {0,3}${r})((?:[\t ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),hrRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}#`),htmlBeginRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}<(?:[a-z].*>|!--)`,"i")},z=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Z=/(?:[*+-]|\d{1,9}[.)])/,ee=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,te=p(ee).replace(/bull/g,Z).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Se=p(ee).replace(/bull/g,Z).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),G=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,N=/(?!\s*\])(?:\\.|[^\[\]\\])+/,Ae=p(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",N).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),_e=p(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Z).getRegex(),P="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",O=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Le=p("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",O).replace("tag",P).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ne=p(G).replace("hr",z).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",P).getRegex(),H={blockquote:p(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",ne).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:Ae,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:z,html:Le,lheading:te,list:_e,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:ne,table:S,text:/^[^\n]+/},re=p("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",z).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",P).getRegex(),Ce={...H,lheading:Se,table:re,paragraph:p(G).replace("hr",z).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",re).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",P).getRegex()},Ie={...H,html:p("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",O).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:S,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:p(G).replace("hr",z).replace("heading"," *#{1,6} *[^\n]").replace("lheading",te).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},se=/^( {2,}|\\)\n(?!\s*$)/,C=/[\p{P}\p{S}]/u,j=/[\s\p{P}\p{S}]/u,ie=/[^\s\p{P}\p{S}]/u,De=p(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,j).getRegex(),le=/(?!~)[\p{P}\p{S}]/u,ae=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Ne=p(ae,"u").replace(/punct/g,C).getRegex(),Oe=p(ae,"u").replace(/punct/g,le).getRegex(),oe="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",He=p(oe,"gu").replace(/notPunctSpace/g,ie).replace(/punctSpace/g,j).replace(/punct/g,C).getRegex(),je=p(oe,"gu").replace(/notPunctSpace/g,/(?:[^\s\p{P}\p{S}]|~)/u).replace(/punctSpace/g,/(?!~)[\s\p{P}\p{S}]/u).replace(/punct/g,le).getRegex(),Qe=p("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,ie).replace(/punctSpace/g,j).replace(/punct/g,C).getRegex(),Ue=p(/\\(punct)/,"gu").replace(/punct/g,C).getRegex(),Fe=p(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Ve=p(O).replace("(?:--\x3e|$)","--\x3e").getRegex(),Xe=p("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Ve).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),I=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,We=p(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",I).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),ce=p(/^!?\[(label)\]\[(ref)\]/).replace("label",I).replace("ref",N).getRegex(),he=p(/^!?\[(ref)\](?:\[\])?/).replace("ref",N).getRegex(),Q={_backpedal:S,anyPunctuation:Ue,autolink:Fe,blockSkip:/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,br:se,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:S,emStrongLDelim:Ne,emStrongRDelimAst:He,emStrongRDelimUnd:Qe,escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,link:We,nolink:he,punctuation:De,reflink:ce,reflinkSearch:p("reflink|nolink(?!\\()","g").replace("reflink",ce).replace("nolink",he).getRegex(),tag:Xe,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:S},Je={...Q,link:p(/^!?\[(label)\]\((.*?)\)/).replace("label",I).getRegex(),reflink:p(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",I).getRegex()},U={...Q,emStrongRDelimAst:je,emStrongLDelim:Oe,url:p(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},Ke={...U,br:p(se).replace("{2,}","*").getRegex(),text:p(U.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},B={normal:H,gfm:Ce,pedantic:Ie},A={normal:Q,gfm:U,breaks:Ke,pedantic:Je},et={"&":"&","<":"<",">":">",'"':""","'":"'"},pe=r=>et[r];function m(r,e){if(e){if(d.escapeTest.test(r))return r.replace(d.escapeReplace,pe)}else if(d.escapeTestNoEncode.test(r))return r.replace(d.escapeReplaceNoEncode,pe);return r}function ue(r){try{r=encodeURI(r).replace(d.percentDecode,"%")}catch{return null}return r}function ge(r,e){const s=r.replace(d.findPipe,(i,l,a)=>{let c=!1,o=l;for(;--o>=0&&"\\"===a[o];)c=!c;return c?"|":" |"}).split(d.splitPipe);let n=0;if(s[0].trim()||s.shift(),s.length>0&&!s.at(-1)?.trim()&&s.pop(),e)if(s.length>e)s.splice(e);else for(;s.length<e;)s.push("");for(;n<s.length;n++)s[n]=s[n].trim().replace(d.slashPipe,"|");return s}function _(r,e,t){const s=r.length;if(0===s)return"";let n=0;for(;n<s;){const i=r.charAt(s-n-1);if(i!==e||t){if(i===e||!t)break;n++}else n++}return r.slice(0,s-n)}function fe(r,e,t,s,n){const i=e.href,l=e.title||null,a=r[1].replace(n.other.outputLinkReplace,"$1");s.state.inLink=!0;const c={type:"!"===r[0].charAt(0)?"image":"link",raw:t,href:i,title:l,text:a,tokens:s.inlineTokens(a)};return s.state.inLink=!1,c}var E=class{options;rules;lexer;constructor(r){this.options=r||v}space(r){const e=this.rules.block.newline.exec(r);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(r){const e=this.rules.block.code.exec(r);if(e){const t=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?t:_(t,"\n")}}}fences(r){const e=this.rules.block.fences.exec(r);if(e){const t=e[0],s=function nt(r,e,t){const s=r.match(t.other.indentCodeCompensation);if(null===s)return e;const n=s[1];return e.split("\n").map(i=>{const l=i.match(t.other.beginningSpace);if(null===l)return i;const[a]=l;return a.length>=n.length?i.slice(n.length):i}).join("\n")}(t,e[3]||"",this.rules);return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:s}}}heading(r){const e=this.rules.block.heading.exec(r);if(e){let t=e[2].trim();if(this.rules.other.endingHash.test(t)){const s=_(t,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(t=s.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(r){const e=this.rules.block.hr.exec(r);if(e)return{type:"hr",raw:_(e[0],"\n")}}blockquote(r){const e=this.rules.block.blockquote.exec(r);if(e){let t=_(e[0],"\n").split("\n"),s="",n="";const i=[];for(;t.length>0;){let l=!1;const a=[];let c;for(c=0;c<t.length;c++)if(this.rules.other.blockquoteStart.test(t[c]))a.push(t[c]),l=!0;else{if(l)break;a.push(t[c])}t=t.slice(c);const o=a.join("\n"),h=o.replace(this.rules.other.blockquoteSetextReplace,"\n $1").replace(this.rules.other.blockquoteSetextReplace2,"");s=s?`${s}\n${o}`:o,n=n?`${n}\n${h}`:h;const k=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(h,i,!0),this.lexer.state.top=k,0===t.length)break;const u=i.at(-1);if("code"===u?.type)break;if("blockquote"===u?.type){const x=u,f=x.raw+"\n"+t.join("\n"),b=this.blockquote(f);i[i.length-1]=b,s=s.substring(0,s.length-x.raw.length)+b.raw,n=n.substring(0,n.length-x.text.length)+b.text;break}if("list"===u?.type){const x=u,f=x.raw+"\n"+t.join("\n"),b=this.list(f);i[i.length-1]=b,s=s.substring(0,s.length-u.raw.length)+b.raw,n=n.substring(0,n.length-x.raw.length)+b.raw,t=f.substring(i.at(-1).raw.length).split("\n");continue}}return{type:"blockquote",raw:s,tokens:i,text:n}}}list(r){let e=this.rules.block.list.exec(r);if(e){let t=e[1].trim();const s=t.length>1,n={type:"list",raw:"",ordered:s,start:s?+t.slice(0,-1):"",loose:!1,items:[]};t=s?`\\d{1,9}\\${t.slice(-1)}`:`\\${t}`,this.options.pedantic&&(t=s?t:"[*+-]");const i=this.rules.other.listItemRegex(t);let l=!1;for(;r;){let c=!1,o="",h="";if(!(e=i.exec(r))||this.rules.block.hr.test(r))break;o=e[0],r=r.substring(o.length);let k=e[2].split("\n",1)[0].replace(this.rules.other.listReplaceTabs,V=>" ".repeat(3*V.length)),u=r.split("\n",1)[0],x=!k.trim(),f=0;if(this.options.pedantic?(f=2,h=k.trimStart()):x?f=e[1].length+1:(f=e[2].search(this.rules.other.nonSpaceChar),f=f>4?1:f,h=k.slice(f),f+=e[1].length),x&&this.rules.other.blankLine.test(u)&&(o+=u+"\n",r=r.substring(u.length+1),c=!0),!c){const V=this.rules.other.nextBulletRegex(f),de=this.rules.other.hrRegex(f),xe=this.rules.other.fencesBeginRegex(f),be=this.rules.other.headingBeginRegex(f),lt=this.rules.other.htmlBeginRegex(f);for(;r;){const X=r.split("\n",1)[0];let L;if(u=X,this.options.pedantic?(u=u.replace(this.rules.other.listReplaceNesting," "),L=u):L=u.replace(this.rules.other.tabCharGlobal," "),xe.test(u)||be.test(u)||lt.test(u)||V.test(u)||de.test(u))break;if(L.search(this.rules.other.nonSpaceChar)>=f||!u.trim())h+="\n"+L.slice(f);else{if(x||k.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||xe.test(k)||be.test(k)||de.test(k))break;h+="\n"+u}!x&&!u.trim()&&(x=!0),o+=X+"\n",r=r.substring(X.length+1),k=L.slice(f)}}n.loose||(l?n.loose=!0:this.rules.other.doubleBlankLine.test(o)&&(l=!0));let ke,b=null;this.options.gfm&&(b=this.rules.other.listIsTask.exec(h),b&&(ke="[ ] "!==b[0],h=h.replace(this.rules.other.listReplaceTask,""))),n.items.push({type:"list_item",raw:o,task:!!b,checked:ke,loose:!1,text:h,tokens:[]}),n.raw+=o}const a=n.items.at(-1);if(!a)return;a.raw=a.raw.trimEnd(),a.text=a.text.trimEnd(),n.raw=n.raw.trimEnd();for(let c=0;c<n.items.length;c++)if(this.lexer.state.top=!1,n.items[c].tokens=this.lexer.blockTokens(n.items[c].text,[]),!n.loose){const o=n.items[c].tokens.filter(k=>"space"===k.type),h=o.length>0&&o.some(k=>this.rules.other.anyLine.test(k.raw));n.loose=h}if(n.loose)for(let c=0;c<n.items.length;c++)n.items[c].loose=!0;return n}}html(r){const e=this.rules.block.html.exec(r);if(e)return{type:"html",block:!0,raw:e[0],pre:"pre"===e[1]||"script"===e[1]||"style"===e[1],text:e[0]}}def(r){const e=this.rules.block.def.exec(r);if(e){const t=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),s=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",n=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:t,raw:e[0],href:s,title:n}}}table(r){const e=this.rules.block.table.exec(r);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;const t=ge(e[1]),s=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),n=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split("\n"):[],i={type:"table",raw:e[0],header:[],align:[],rows:[]};if(t.length===s.length){for(const l of s)this.rules.other.tableAlignRight.test(l)?i.align.push("right"):this.rules.other.tableAlignCenter.test(l)?i.align.push("center"):this.rules.other.tableAlignLeft.test(l)?i.align.push("left"):i.align.push(null);for(let l=0;l<t.length;l++)i.header.push({text:t[l],tokens:this.lexer.inline(t[l]),header:!0,align:i.align[l]});for(const l of n)i.rows.push(ge(l,i.header.length).map((a,c)=>({text:a,tokens:this.lexer.inline(a),header:!1,align:i.align[c]})));return i}}lheading(r){const e=this.rules.block.lheading.exec(r);if(e)return{type:"heading",raw:e[0],depth:"="===e[2].charAt(0)?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(r){const e=this.rules.block.paragraph.exec(r);if(e){const t="\n"===e[1].charAt(e[1].length-1)?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(r){const e=this.rules.block.text.exec(r);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(r){const e=this.rules.inline.escape.exec(r);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(r){const e=this.rules.inline.tag.exec(r);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(r){const e=this.rules.inline.link.exec(r);if(e){const t=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(t)){if(!this.rules.other.endAngleBracket.test(t))return;const i=_(t.slice(0,-1),"\\");if((t.length-i.length)%2==0)return}else{const i=function tt(r,e){if(-1===r.indexOf(e[1]))return-1;let t=0;for(let s=0;s<r.length;s++)if("\\"===r[s])s++;else if(r[s]===e[0])t++;else if(r[s]===e[1]&&(t--,t<0))return s;return t>0?-2:-1}(e[2],"()");if(-2===i)return;if(i>-1){const a=(0===e[0].indexOf("!")?5:4)+e[1].length+i;e[2]=e[2].substring(0,i),e[0]=e[0].substring(0,a).trim(),e[3]=""}}let s=e[2],n="";if(this.options.pedantic){const i=this.rules.other.pedanticHrefTitle.exec(s);i&&(s=i[1],n=i[3])}else n=e[3]?e[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(s=this.options.pedantic&&!this.rules.other.endAngleBracket.test(t)?s.slice(1):s.slice(1,-1)),fe(e,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:n&&n.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(r,e){let t;if((t=this.rules.inline.reflink.exec(r))||(t=this.rules.inline.nolink.exec(r))){const n=e[(t[2]||t[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!n){const i=t[0].charAt(0);return{type:"text",raw:i,text:i}}return fe(t,n,t[0],this.lexer,this.rules)}}emStrong(r,e,t=""){let s=this.rules.inline.emStrongLDelim.exec(r);if(!(!s||s[3]&&t.match(this.rules.other.unicodeAlphaNumeric))&&(!s[1]&&!s[2]||!t||this.rules.inline.punctuation.exec(t))){const i=[...s[0]].length-1;let l,a,c=i,o=0;const h="*"===s[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,e=e.slice(-1*r.length+i);null!=(s=h.exec(e));){if(l=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!l)continue;if(a=[...l].length,s[3]||s[4]){c+=a;continue}if((s[5]||s[6])&&i%3&&!((i+a)%3)){o+=a;continue}if(c-=a,c>0)continue;a=Math.min(a,a+c+o);const k=[...s[0]][0].length,u=r.slice(0,i+s.index+k+a);if(Math.min(i,a)%2){const f=u.slice(1,-1);return{type:"em",raw:u,text:f,tokens:this.lexer.inlineTokens(f)}}const x=u.slice(2,-2);return{type:"strong",raw:u,text:x,tokens:this.lexer.inlineTokens(x)}}}}codespan(r){const e=this.rules.inline.code.exec(r);if(e){let t=e[2].replace(this.rules.other.newLineCharGlobal," ");const s=this.rules.other.nonSpaceChar.test(t),n=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return s&&n&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:e[0],text:t}}}br(r){const e=this.rules.inline.br.exec(r);if(e)return{type:"br",raw:e[0]}}del(r){const e=this.rules.inline.del.exec(r);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(r){const e=this.rules.inline.autolink.exec(r);if(e){let t,s;return"@"===e[2]?(t=e[1],s="mailto:"+t):(t=e[1],s=t),{type:"link",raw:e[0],text:t,href:s,tokens:[{type:"text",raw:t,text:t}]}}}url(r){let e;if(e=this.rules.inline.url.exec(r)){let t,s;if("@"===e[2])t=e[0],s="mailto:"+t;else{let n;do{n=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??""}while(n!==e[0]);t=e[0],s="www."===e[1]?"http://"+e[0]:e[0]}return{type:"link",raw:e[0],text:t,href:s,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(r){const e=this.rules.inline.text.exec(r);if(e)return{type:"text",raw:e[0],text:e[0],escaped:this.lexer.state.inRawBlock}}},w=class W{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||v,this.options.tokenizer=this.options.tokenizer||new E,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const t={other:d,block:B.normal,inline:A.normal};this.options.pedantic?(t.block=B.pedantic,t.inline=A.pedantic):this.options.gfm&&(t.block=B.gfm,t.inline=this.options.breaks?A.breaks:A.gfm),this.tokenizer.rules=t}static get rules(){return{block:B,inline:A}}static lex(e,t){return new W(t).lex(e)}static lexInline(e,t){return new W(t).inlineTokens(e)}lex(e){e=e.replace(d.carriageReturn,"\n"),this.blockTokens(e,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){const s=this.inlineQueue[t];this.inlineTokens(s.src,s.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],s=!1){for(this.options.pedantic&&(e=e.replace(d.tabCharGlobal," ").replace(d.spaceLine,""));e;){let n;if(this.options.extensions?.block?.some(l=>!!(n=l.call({lexer:this},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0)))continue;if(n=this.tokenizer.space(e)){e=e.substring(n.raw.length);const l=t.at(-1);1===n.raw.length&&void 0!==l?l.raw+="\n":t.push(n);continue}if(n=this.tokenizer.code(e)){e=e.substring(n.raw.length);const l=t.at(-1);"paragraph"===l?.type||"text"===l?.type?(l.raw+="\n"+n.raw,l.text+="\n"+n.text,this.inlineQueue.at(-1).src=l.text):t.push(n);continue}if(n=this.tokenizer.fences(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.heading(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.hr(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.blockquote(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.list(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.html(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.def(e)){e=e.substring(n.raw.length);const l=t.at(-1);"paragraph"===l?.type||"text"===l?.type?(l.raw+="\n"+n.raw,l.text+="\n"+n.raw,this.inlineQueue.at(-1).src=l.text):this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title});continue}if(n=this.tokenizer.table(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.lheading(e)){e=e.substring(n.raw.length),t.push(n);continue}let i=e;if(this.options.extensions?.startBlock){let l=1/0;const a=e.slice(1);let c;this.options.extensions.startBlock.forEach(o=>{c=o.call({lexer:this},a),"number"==typeof c&&c>=0&&(l=Math.min(l,c))}),l<1/0&&l>=0&&(i=e.substring(0,l+1))}if(this.state.top&&(n=this.tokenizer.paragraph(i))){const l=t.at(-1);s&&"paragraph"===l?.type?(l.raw+="\n"+n.raw,l.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):t.push(n),s=i.length!==e.length,e=e.substring(n.raw.length);continue}if(n=this.tokenizer.text(e)){e=e.substring(n.raw.length);const l=t.at(-1);"text"===l?.type?(l.raw+="\n"+n.raw,l.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):t.push(n);continue}if(e){const l="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(l);break}throw new Error(l)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let s=e,n=null;if(this.tokens.links){const a=Object.keys(this.tokens.links);if(a.length>0)for(;null!=(n=this.tokenizer.rules.inline.reflinkSearch.exec(s));)a.includes(n[0].slice(n[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(n=this.tokenizer.rules.inline.anyPunctuation.exec(s));)s=s.slice(0,n.index)+"++"+s.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;null!=(n=this.tokenizer.rules.inline.blockSkip.exec(s));)s=s.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let i=!1,l="";for(;e;){let a;if(i||(l=""),i=!1,this.options.extensions?.inline?.some(o=>!!(a=o.call({lexer:this},e,t))&&(e=e.substring(a.raw.length),t.push(a),!0)))continue;if(a=this.tokenizer.escape(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.tag(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.link(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(a.raw.length);const o=t.at(-1);"text"===a.type&&"text"===o?.type?(o.raw+=a.raw,o.text+=a.text):t.push(a);continue}if(a=this.tokenizer.emStrong(e,s,l)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.codespan(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.br(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.del(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.autolink(e)){e=e.substring(a.raw.length),t.push(a);continue}if(!this.state.inLink&&(a=this.tokenizer.url(e))){e=e.substring(a.raw.length),t.push(a);continue}let c=e;if(this.options.extensions?.startInline){let o=1/0;const h=e.slice(1);let k;this.options.extensions.startInline.forEach(u=>{k=u.call({lexer:this},h),"number"==typeof k&&k>=0&&(o=Math.min(o,k))}),o<1/0&&o>=0&&(c=e.substring(0,o+1))}if(a=this.tokenizer.inlineText(c)){e=e.substring(a.raw.length),"_"!==a.raw.slice(-1)&&(l=a.raw.slice(-1)),i=!0;const o=t.at(-1);"text"===o?.type?(o.raw+=a.raw,o.text+=a.text):t.push(a);continue}if(e){const o="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(o);break}throw new Error(o)}}return t}},q=class{options;parser;constructor(r){this.options=r||v}space(r){return""}code({text:r,lang:e,escaped:t}){const s=(e||"").match(d.notSpaceStart)?.[0],n=r.replace(d.endingNewline,"")+"\n";return s?'<pre><code class="language-'+m(s)+'">'+(t?n:m(n,!0))+"</code></pre>\n":"<pre><code>"+(t?n:m(n,!0))+"</code></pre>\n"}blockquote({tokens:r}){return`<blockquote>\n${this.parser.parse(r)}</blockquote>\n`}html({text:r}){return r}heading({tokens:r,depth:e}){return`<h${e}>${this.parser.parseInline(r)}</h${e}>\n`}hr(r){return"<hr>\n"}list(r){const e=r.ordered,t=r.start;let s="";for(let l=0;l<r.items.length;l++)s+=this.listitem(r.items[l]);const n=e?"ol":"ul";return"<"+n+(e&&1!==t?' start="'+t+'"':"")+">\n"+s+"</"+n+">\n"}listitem(r){let e="";if(r.task){const t=this.checkbox({checked:!!r.checked});r.loose?"paragraph"===r.tokens[0]?.type?(r.tokens[0].text=t+" "+r.tokens[0].text,r.tokens[0].tokens&&r.tokens[0].tokens.length>0&&"text"===r.tokens[0].tokens[0].type&&(r.tokens[0].tokens[0].text=t+" "+m(r.tokens[0].tokens[0].text),r.tokens[0].tokens[0].escaped=!0)):r.tokens.unshift({type:"text",raw:t+" ",text:t+" ",escaped:!0}):e+=t+" "}return e+=this.parser.parse(r.tokens,!!r.loose),`<li>${e}</li>\n`}checkbox({checked:r}){return"<input "+(r?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:r}){return`<p>${this.parser.parseInline(r)}</p>\n`}table(r){let e="",t="";for(let n=0;n<r.header.length;n++)t+=this.tablecell(r.header[n]);e+=this.tablerow({text:t});let s="";for(let n=0;n<r.rows.length;n++){const i=r.rows[n];t="";for(let l=0;l<i.length;l++)t+=this.tablecell(i[l]);s+=this.tablerow({text:t})}return s&&(s=`<tbody>${s}</tbody>`),"<table>\n<thead>\n"+e+"</thead>\n"+s+"</table>\n"}tablerow({text:r}){return`<tr>\n${r}</tr>\n`}tablecell(r){const e=this.parser.parseInline(r.tokens),t=r.header?"th":"td";return(r.align?`<${t} align="${r.align}">`:`<${t}>`)+e+`</${t}>\n`}strong({tokens:r}){return`<strong>${this.parser.parseInline(r)}</strong>`}em({tokens:r}){return`<em>${this.parser.parseInline(r)}</em>`}codespan({text:r}){return`<code>${m(r,!0)}</code>`}br(r){return"<br>"}del({tokens:r}){return`<del>${this.parser.parseInline(r)}</del>`}link({href:r,title:e,tokens:t}){const s=this.parser.parseInline(t),n=ue(r);if(null===n)return s;let i='<a href="'+(r=n)+'"';return e&&(i+=' title="'+m(e)+'"'),i+=">"+s+"</a>",i}image({href:r,title:e,text:t,tokens:s}){s&&(t=this.parser.parseInline(s,this.parser.textRenderer));const n=ue(r);if(null===n)return m(t);let i=`<img src="${r=n}" alt="${t}"`;return e&&(i+=` title="${m(e)}"`),i+=">",i}text(r){return"tokens"in r&&r.tokens?this.parser.parseInline(r.tokens):"escaped"in r&&r.escaped?r.text:m(r.text)}},F=class{strong({text:r}){return r}em({text:r}){return r}codespan({text:r}){return r}del({text:r}){return r}html({text:r}){return r}text({text:r}){return r}link({text:r}){return""+r}image({text:r}){return""+r}br(){return""}},y=class Y{options;renderer;textRenderer;constructor(e){this.options=e||v,this.options.renderer=this.options.renderer||new q,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new F}static parse(e,t){return new Y(t).parse(e)}static parseInline(e,t){return new Y(t).parseInline(e)}parse(e,t=!0){let s="";for(let n=0;n<e.length;n++){const i=e[n];if(this.options.extensions?.renderers?.[i.type]){const a=i,c=this.options.extensions.renderers[a.type].call({parser:this},a);if(!1!==c||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(a.type)){s+=c||"";continue}}const l=i;switch(l.type){case"space":s+=this.renderer.space(l);continue;case"hr":s+=this.renderer.hr(l);continue;case"heading":s+=this.renderer.heading(l);continue;case"code":s+=this.renderer.code(l);continue;case"table":s+=this.renderer.table(l);continue;case"blockquote":s+=this.renderer.blockquote(l);continue;case"list":s+=this.renderer.list(l);continue;case"html":s+=this.renderer.html(l);continue;case"paragraph":s+=this.renderer.paragraph(l);continue;case"text":{let a=l,c=this.renderer.text(a);for(;n+1<e.length&&"text"===e[n+1].type;)a=e[++n],c+="\n"+this.renderer.text(a);s+=t?this.renderer.paragraph({type:"paragraph",raw:c,text:c,tokens:[{type:"text",raw:c,text:c,escaped:!0}]}):c;continue}default:{const a='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return s}parseInline(e,t=this.renderer){let s="";for(let n=0;n<e.length;n++){const i=e[n];if(this.options.extensions?.renderers?.[i.type]){const a=this.options.extensions.renderers[i.type].call({parser:this},i);if(!1!==a||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(i.type)){s+=a||"";continue}}const l=i;switch(l.type){case"escape":case"text":s+=t.text(l);break;case"html":s+=t.html(l);break;case"link":s+=t.link(l);break;case"image":s+=t.image(l);break;case"strong":s+=t.strong(l);break;case"em":s+=t.em(l);break;case"codespan":s+=t.codespan(l);break;case"br":s+=t.br(l);break;case"del":s+=t.del(l);break;default:{const a='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return s}},D=class{options;block;constructor(e){this.options=e||v}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}provideLexer(){return this.block?w.lex:w.lexInline}provideParser(){return this.block?y.parse:y.parseInline}},R=new class{defaults={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=y;Renderer=q;TextRenderer=F;Lexer=w;Tokenizer=E;Hooks=D;constructor(...r){this.use(...r)}walkTokens(r,e){let t=[];for(const s of r)switch(t=t.concat(e.call(this,s)),s.type){case"table":{const n=s;for(const i of n.header)t=t.concat(this.walkTokens(i.tokens,e));for(const i of n.rows)for(const l of i)t=t.concat(this.walkTokens(l.tokens,e));break}case"list":t=t.concat(this.walkTokens(s.items,e));break;default:{const n=s;this.defaults.extensions?.childTokens?.[n.type]?this.defaults.extensions.childTokens[n.type].forEach(i=>{const l=n[i].flat(1/0);t=t.concat(this.walkTokens(l,e))}):n.tokens&&(t=t.concat(this.walkTokens(n.tokens,e)))}}return t}use(...r){const e=this.defaults.extensions||{renderers:{},childTokens:{}};return r.forEach(t=>{const s={...t};if(s.async=this.defaults.async||s.async||!1,t.extensions&&(t.extensions.forEach(n=>{if(!n.name)throw new Error("extension name required");if("renderer"in n){const i=e.renderers[n.name];e.renderers[n.name]=i?function(...l){let a=n.renderer.apply(this,l);return!1===a&&(a=i.apply(this,l)),a}:n.renderer}if("tokenizer"in n){if(!n.level||"block"!==n.level&&"inline"!==n.level)throw new Error("extension level must be 'block' or 'inline'");const i=e[n.level];i?i.unshift(n.tokenizer):e[n.level]=[n.tokenizer],n.start&&("block"===n.level?e.startBlock?e.startBlock.push(n.start):e.startBlock=[n.start]:"inline"===n.level&&(e.startInline?e.startInline.push(n.start):e.startInline=[n.start]))}"childTokens"in n&&n.childTokens&&(e.childTokens[n.name]=n.childTokens)}),s.extensions=e),t.renderer){const n=this.defaults.renderer||new q(this.defaults);for(const i in t.renderer){if(!(i in n))throw new Error(`renderer '${i}' does not exist`);if(["options","parser"].includes(i))continue;const a=t.renderer[i],c=n[i];n[i]=(...o)=>{let h=a.apply(n,o);return!1===h&&(h=c.apply(n,o)),h||""}}s.renderer=n}if(t.tokenizer){const n=this.defaults.tokenizer||new E(this.defaults);for(const i in t.tokenizer){if(!(i in n))throw new Error(`tokenizer '${i}' does not exist`);if(["options","rules","lexer"].includes(i))continue;const a=t.tokenizer[i],c=n[i];n[i]=(...o)=>{let h=a.apply(n,o);return!1===h&&(h=c.apply(n,o)),h}}s.tokenizer=n}if(t.hooks){const n=this.defaults.hooks||new D;for(const i in t.hooks){if(!(i in n))throw new Error(`hook '${i}' does not exist`);if(["options","block"].includes(i))continue;const a=t.hooks[i],c=n[i];n[i]=D.passThroughHooks.has(i)?o=>{if(this.defaults.async)return Promise.resolve(a.call(n,o)).then(k=>c.call(n,k));const h=a.call(n,o);return c.call(n,h)}:(...o)=>{let h=a.apply(n,o);return!1===h&&(h=c.apply(n,o)),h}}s.hooks=n}if(t.walkTokens){const n=this.defaults.walkTokens,i=t.walkTokens;s.walkTokens=function(l){let a=[];return a.push(i.call(this,l)),n&&(a=a.concat(n.call(this,l))),a}}this.defaults={...this.defaults,...s}}),this}setOptions(r){return this.defaults={...this.defaults,...r},this}lexer(r,e){return w.lex(r,e??this.defaults)}parser(r,e){return y.parse(r,e??this.defaults)}parseMarkdown(r){return(t,s)=>{const n={...s},i={...this.defaults,...n},l=this.onError(!!i.silent,!!i.async);if(!0===this.defaults.async&&!1===n.async)return l(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof t>"u"||null===t)return l(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof t)return l(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));i.hooks&&(i.hooks.options=i,i.hooks.block=r);const a=i.hooks?i.hooks.provideLexer():r?w.lex:w.lexInline,c=i.hooks?i.hooks.provideParser():r?y.parse:y.parseInline;if(i.async)return Promise.resolve(i.hooks?i.hooks.preprocess(t):t).then(o=>a(o,i)).then(o=>i.hooks?i.hooks.processAllTokens(o):o).then(o=>i.walkTokens?Promise.all(this.walkTokens(o,i.walkTokens)).then(()=>o):o).then(o=>c(o,i)).then(o=>i.hooks?i.hooks.postprocess(o):o).catch(l);try{i.hooks&&(t=i.hooks.preprocess(t));let o=a(t,i);i.hooks&&(o=i.hooks.processAllTokens(o)),i.walkTokens&&this.walkTokens(o,i.walkTokens);let h=c(o,i);return i.hooks&&(h=i.hooks.postprocess(h)),h}catch(o){return l(o)}}}onError(r,e){return t=>{if(t.message+="\nPlease report this to https://github.com/markedjs/marked.",r){const s="<p>An error occurred:</p><pre>"+m(t.message+"",!0)+"</pre>";return e?Promise.resolve(s):s}if(e)return Promise.reject(t);throw t}}};function g(r,e){return R.parse(r,e)}g.options=g.setOptions=function(r){return R.setOptions(r),K(g.defaults=R.defaults),g},g.getDefaults=function M(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}},g.defaults=v,g.use=function(...r){return R.use(...r),K(g.defaults=R.defaults),g},g.walkTokens=function(r,e){return R.walkTokens(r,e)},g.parseInline=R.parseInline,g.Parser=y,g.parser=y.parse,g.Renderer=q,g.TextRenderer=F,g.Lexer=w,g.lexer=w.lex,g.Tokenizer=E,g.Hooks=D,g.parse=g;var st=$(2245),T=$(5547);let it=(()=>{class r{fileURL=ye.hFB.required();html=(0,J.vPA)("");onFile=(0,J.QZP)((()=>{var t=this;return(0,we.A)(function*(){const n=yield(yield fetch(t.fileURL())).text(),i=yield g(n);t.html.set(i)})})());static \u0275fac=function(s){return new(s||r)};static \u0275cmp=T.VBU({type:r,selectors:[["cue-md-viewer"]],inputs:{fileURL:[1,"fileURL"]},decls:2,vars:1,consts:[[1,"page"],[3,"innerHTML"]],template:function(s,n){1&s&&(T.j41(0,"div",0),T.nrm(1,"cue-typography",1),T.k0s()),2&s&&(T.R7$(),T.Y8G("innerHTML",n.html(),T.npT))},dependencies:[st.o],styles:[".page[_ngcontent-%COMP%]{overflow-y:auto;height:100%}"],changeDetection:0})}return r})()}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[376],{6376(k,g,b){function d(s,e){let t=function m(s,e){let r=0;return s.color?r=s.color:e.tables&&e.tables.layer&&e.tables.layer.layers[s.layer]&&(r=e.tables.layer.layers[s.layer].color),(null==r||16777215===r)&&(r=0),r}(s,e).toString(16);for(;t.length<6;)t="0"+t;return"#"+t}function A(s){if(s=function T(s){let e=s.replace(/\\P/g,"\n");return e=e.replace(/\\X/g,"\n"),e}(s),!s.includes(";"))return{text:w(s)};let e=s;const r={};["f","A","Q","H","W","T"].forEach(i=>{r[i]=function $(s,e,r){const t=new RegExp(`(?<=${e})(.*?)(?=${r})`,"s"),i=s.match(t);return i?i[1].trim():void 0}(s,`\\\\${i}`,";"),void 0!==r[i]&&(e=e.replace(`\\${i}${r[i]};`,""))});const t=s.lastIndexOf(";");return s=w(s.substring(t+1)),e=e.replace(s,""),{text:s,formatting:r}}function w(s){return(s=(s=(s=(s=s.replace(/\\{/g,"\0LBRACE")).replace(/\\}/g,"\0RBRACE")).replace(/[{}]/g,"")).replace(/__LBRACE__/g,"{")).replace(/__RBRACE__/g,"}")}b.r(g),b.d(g,{DrawEntitySVG:()=>x});const f="http://www.w3.org/2000/svg";class x{_svg;_currentGroup;entityMap=new Map;_idCounter=0;constructor(){this._svg=document.createElementNS(f,"svg"),this._svg.setAttribute("xmlns",f)}fromEntity(e,r,t=!0){t||this._resetSVG(),Array.isArray(e)?e.forEach(i=>this.fromEntity(i,r,!0)):"ARC"===e.type?this._drawArc(e,r):"CIRCLE"===e.type?this._drawCircle(e,r):"INSERT"===e.type?this._drawBlock(e,r):"LINE"===e.type?this._drawLine(e,r):"LWPOLYLINE"===e.type||"POLYLINE"===e.type?this._drawPath(e,r):"POINT"===e.type?this._drawPoint(e,r):"SPLINE"===e.type?this._drawSpline(e,r):"SOLID"===e.type?this._drawSolid(e,r):"ELLIPSE"===e.type?this._drawEllipse(e,r):"TEXT"===e.type?this._drawText(e,r):"MTEXT"===e.type?this._drawMtext(e,r):"DIMENSION"===e.type&&!(7&e.dimensionType)&&this._drawDimension(e,r)}asString(){return this._svg.outerHTML}asElement(){return this._svg}_resetSVG(){this._svg=document.createElementNS(f,"svg"),this._svg.setAttribute("xmlns",f),this.entityMap.clear(),this._idCounter=0}_drawBlock(e,r){const t=r.blocks[e.name];if(!t||!t.entities)return;const i=this._appendElementOfType("g",e);this._currentGroup=i;const n=this._buildGroupTransformation(e);""!==n&&i.setAttribute("transform",n),t.entities.forEach(o=>{this.fromEntity(o,r)}),this._currentGroup=void 0}_drawLine(e,r){const t=this._appendElementOfType("line",e);t.setAttribute("x1",e.vertices[0].x.toString()),t.setAttribute("y1",e.vertices[0].y.toString()),t.setAttribute("x2",e.vertices[1].x.toString()),t.setAttribute("y2",e.vertices[1].y.toString()),this._setStrokeFill(e,r,t)}_drawPath(e,r){const t=e.vertices.some(c=>void 0!==c.bulge&&Math.abs(c.bulge)>1e-4);if(2===e.vertices.length&&!t)return this._drawLine(e,r);const i=this._appendElementOfType("path",e);let n=!0===e.shape||!0===e.closed,o=e.vertices;if(!n&&o.length>3){const c=o[0],a=o[o.length-1];Math.abs(c.x-a.x)<.001&&Math.abs(c.y-a.y)<.001&&(n=!0,o=o.slice(0,-1))}const u=this._verticeArrayToPath(o,n,e.extrusion);i.setAttribute("d",u),this._setStrokeFill(e,r,i)}_drawArc(e,r){const t=this._appendElementOfType("path",e),i=this._arcPath(e.center,e.radius,e.startAngle,e.endAngle,e.extrusion);t.setAttribute("d",i),this._setStrokeFill(e,r,t)}_drawCircle(e,r){const t=this._appendElementOfType("circle",e);t.setAttribute("cx",e.center.x.toString()),t.setAttribute("cy",e.center.y.toString()),t.setAttribute("r",e.radius.toString()),this._setStrokeFill(e,r,t)}_drawText(e,r){const t=this._appendElementOfType("text",e);t.setAttribute("x",e.startPoint.x.toString()),t.setAttribute("y",e.startPoint.y.toString());const i=A(e.text);t.innerHTML=i.text,this._setTextAppearance(e,r,t)}_drawPoint(e,r){const t=this._appendElementOfType("circle",e);t.setAttribute("cx",e.position.x.toString()),t.setAttribute("cy",e.position.y.toString()),t.setAttribute("r","0.0001"),t.setAttribute("stroke",d(e,r)),t.setAttribute("fill","none"),t.setAttribute("vector-effect","non-scaling-stroke"),t.setAttribute("stroke-width","2"),t.classList.add("dxf-path")}_drawDimension(e,r){const t=r.blocks[e.block];if(!t||!t.entities)return;const i=this._appendElementOfType("g",e);this._currentGroup=i,t.entities.forEach(n=>{this.fromEntity(n,r)}),this._currentGroup=void 0}_drawEllipse(e,r){}_drawSpline(e,r){}_drawSolid(e,r){}_drawMtext(e,r){const t=this._appendElementOfType("text",e);t.setAttribute("x",e.position.x.toString()),t.setAttribute("y",e.position.y.toString());const i=A(e.text);t.innerHTML=i.text,this._setMTextAppearance(e,r,t)}_setStrokeFill(e,r,t){t.setAttribute("stroke",d(e,r)),t.setAttribute("fill","none"),t.setAttribute("stroke-width",((void 0!==e.lineweight&&e.lineweight>0?e.lineweight:25)/1e5).toString()),t.setAttribute("vector-effect","non-scaling-stroke"),t.classList.add("dxf-path")}_setTextAppearance(e,r,t){t.setAttribute("fill",d(e,r)),t.setAttribute("font-size",(e.textHeight/1e3).toString()),e.rotation&&t.setAttribute("transform",`rotate(${e.rotation})`)}_setMTextAppearance(e,r,t){t.setAttribute("fill",d(e,r)),t.setAttribute("font-size",(e.height/1e3).toString()),e.rotation&&t.setAttribute("transform",`rotate(${e.rotation})`)}_buildGroupTransformation(e){let r="";return void 0!==e.position&&(r+=` translate(${e.position.x} ${e.position.y})`),void 0!==e.xScale&&void 0!==e.yScale&&(r+=` scale(${e.xScale} ${e.yScale})`),void 0!==e.rotation&&(r+=` rotate(${e.rotation})`),r.trim()}_appendElementOfType(e,r){const t=document.createElementNS(f,e);if(r){const i="dxf-entity-"+this._idCounter++;t.setAttribute("data-dxf-id",i),this.entityMap.set(i,r)}return void 0!==this._currentGroup?this._currentGroup.appendChild(t):this._svg.appendChild(t),t}_arcPath(e,r,t,i,n){const o=e.x+r*Math.cos(t),u=e.y+r*Math.sin(t),c=e.x+r*Math.cos(i),a=e.y+r*Math.sin(i),h=n&&n.z<0;let l=i-t;for(;l<0;)l+=2*Math.PI;for(;l>2*Math.PI;)l-=2*Math.PI;return l<1e-4?`M ${o} ${u}`:`M ${o} ${u} A ${r} ${r} 0 ${l>Math.PI?1:0} ${h?0:1} ${c} ${a}`}_verticeArrayToPath(e,r=!1,t){let i="";const n=r?e.length:e.length-1;for(let o=0;o<n;o++){const{x:u,y:c,bulge:a}=e[o],{x:h,y:l}=e[(o+1)%e.length];if(void 0!==a&&Math.abs(a)>1e-4){const _=Math.sqrt((u-h)**2+(c-l)**2),p=Math.abs(a),S=_/2*(1+p*p)/(2*p),E=t&&t.z<0;0===o&&(i+=`M ${u} ${c} `),i+=`A ${S} ${S} 0 ${p>1?1:0} ${a>0?E?0:1:E?1:0} ${h} ${l} `}else 0===o&&(i+=`M ${u} ${c} `),i+=`L ${h} ${l} `}return r&&(i+=" Z"),i.trim()}}}}]);
|