@qaecy/cue-ui 0.0.57 → 0.0.59
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/1051.js +1 -1
- package/1138.js +1 -1
- package/1153.js +1 -1
- package/1338.js +1 -1
- package/1520.js +1 -0
- package/1701.js +1 -0
- package/1837.js +1 -1
- package/1985.js +1 -1
- package/2014.js +1 -0
- package/2245.js +1 -1
- package/2283.js +1 -0
- package/2317.js +1 -1
- package/2775.js +1 -1
- package/2839.js +1 -1
- package/29.js +1 -1
- package/3036.js +1 -1
- package/3039.js +1 -1
- package/3202.js +1 -0
- package/3213.js +1 -0
- package/3288.js +1 -1
- package/3319.js +1 -0
- package/3577.js +1 -1
- package/3614.js +1 -1
- package/3842.js +1 -0
- package/3869.js +1 -0
- package/4098.js +1 -0
- package/4283.js +1 -1
- package/4311.js +1 -1
- package/4791.js +1 -0
- package/5381.js +1 -0
- package/5448.js +1 -0
- package/5559.js +1 -1
- package/5649.js +1 -1
- package/5738.js +1 -1
- package/5872.js +1 -1
- package/5971.js +1 -0
- package/6027.js +1 -0
- package/617.js +1 -1
- package/6233.js +1 -1
- package/63.js +1 -1
- package/6419.js +1 -1
- package/6423.js +1 -1
- package/650.js +1 -1
- package/6947.js +1 -1
- package/7089.js +1 -0
- package/7154.js +1 -0
- package/7313.js +1 -0
- package/7441.js +1 -1
- package/7719.js +1 -1
- package/7727.js +1 -0
- package/7802.js +1 -0
- package/7851.js +1 -0
- package/804.js +1 -1
- package/8194.js +1 -0
- package/8560.js +1 -1
- package/8659.js +1 -0
- package/8957.js +1 -1
- package/928.js +1 -1
- package/9396.js +1 -1
- package/9707.js +1 -0
- package/992.js +1 -0
- package/common.js +1 -1
- package/index.js +1 -1
- package/main.js +1 -1
- package/package.json +1 -1
- package/2021.js +0 -1
- package/2081.js +0 -1
- package/2399.js +0 -1
- package/2516.js +0 -1
- package/4687.js +0 -1
- package/4879.js +0 -1
- package/5041.js +0 -1
- package/5071.js +0 -1
- package/5137.js +0 -1
- package/7056.js +0 -1
- package/8336.js +0 -1
- package/8791.js +0 -1
- package/8855.js +0 -1
- package/9376.js +0 -1
package/650.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[650],{5794(j,M,s){s.d(M,{L:()=>U});var _=s(7705),l=s(5802),m=s(2271),b=s(4853),V=s(9495),o=s(467),v=s(9352),y=s(5745),f=s(5381),x=s(5971),h=s(2245),E=s(9421),D=s(8957),R=s(5448),C=s(63),r=s(617),p=s(9695),u=s(1985),g=s(3039),e=s(5547);const N=["*"],F=()=>[],G=()=>({});function I(t,d){if(1&t&&(e.j41(0,"cue-typography"),e.EFF(1),e.k0s()),2&t){const n=e.XpG(2);e.R7$(),e.JRh(n.config().message)}}function k(t,d){if(1&t&&(e.nrm(0,"cue-key-val",4),e.nI1(1,"transloco")),2&t){const n=e.XpG(2);e.Y8G("key",e.mNQ(e.bMT(1,3,"components.modals.rdfEdit.labelExistingValue")))("val",n.existingValue())}}function B(t,d){if(1&t){const n=e.RV6();e.j41(0,"cue-input",15),e.nI1(1,"transloco"),e.mxI("valueChange",function(i){l.eBV(n);const c=e.XpG(2);return e.DH7(c.newValue,i)||(c.newValue=i),l.Njj(i)}),e.k0s()}if(2&t){const n=e.XpG(2);e.Y8G("label",e.mNQ(e.bMT(1,4,"components.modals.rdfEdit.labelNewValue"))),e.R50("value",n.newValue),e.Y8G("error",n.valueError())}}function P(t,d){if(1&t){const n=e.RV6();e.j41(0,"cue-input",16),e.nI1(1,"transloco"),e.mxI("valueChange",function(i){l.eBV(n);const c=e.XpG(2);return e.DH7(c.newValue,i)||(c.newValue=i),l.Njj(i)}),e.k0s()}if(2&t){const n=e.XpG(2);e.Y8G("label",e.mNQ(e.bMT(1,4,"components.modals.rdfEdit.labelNewValue"))),e.R50("value",n.newValue),e.Y8G("error",n.valueError())}}function w(t,d){if(1&t){const n=e.RV6();e.j41(0,"cue-input-date",17),e.nI1(1,"transloco"),e.mxI("valueChange",function(i){l.eBV(n);const c=e.XpG(2);return e.DH7(c.newValue,i)||(c.newValue=i),l.Njj(i)}),e.k0s()}if(2&t){const n=e.XpG(2);e.Y8G("label",e.mNQ(e.bMT(1,4,"components.modals.rdfEdit.labelNewValue"))),e.R50("value",n.newValue),e.Y8G("error",n.valueError())}}function O(t,d){if(1&t){const n=e.RV6();e.j41(0,"cue-flexcontainer",8)(1,"cue-typography"),e.EFF(2),e.nI1(3,"transloco"),e.k0s(),e.j41(4,"cue-input-switch",18),e.bIt("checkedChange",function(i){l.eBV(n);const c=e.XpG(2);return l.Njj(c.onBooleanChange(i))}),e.k0s()()}if(2&t){const n=e.XpG(2);e.R7$(2),e.JRh(e.bMT(3,2,"components.modals.rdfEdit.labelSetNewValue")),e.R7$(2),e.Y8G("checked","true"===n.newValue())}}function X(t,d){if(1&t){const n=e.RV6();e.j41(0,"cue-select",19),e.nI1(1,"transloco"),e.mxI("valueChange",function(i){l.eBV(n);const c=e.XpG(2);return e.DH7(c.newValue,i)||(c.newValue=i),l.Njj(i)}),e.k0s()}if(2&t){const n=e.XpG(2);e.Y8G("label",e.mNQ(e.bMT(1,7,"components.modals.rdfEdit.labelNewValue"))),e.R50("value",n.newValue),e.Y8G("options",n.config().options||e.lJ4(9,F))("labelMap",n.config().optionLabelMap||e.lJ4(10,G))("showFilter",n.optionsCount()>5)("error",n.valueError())}}function Y(t,d){if(1&t){const n=e.RV6();e.j41(0,"cue-multi-select",19),e.nI1(1,"transloco"),e.mxI("valueChange",function(i){l.eBV(n);const c=e.XpG(2);return e.DH7(c.newValue,i)||(c.newValue=i),l.Njj(i)}),e.k0s()}if(2&t){const n=e.XpG(2);e.Y8G("label",e.mNQ(e.bMT(1,7,"components.modals.rdfEdit.labelNewValue"))),e.R50("value",n.newValue),e.Y8G("options",n.config().options||e.lJ4(9,F))("labelMap",n.config().optionLabelMap||e.lJ4(10,G))("showFilter",n.optionsCount()>5)("error",n.valueError())}}function $(t,d){if(1&t){const n=e.RV6();e.j41(0,"cue-input-multiline",20),e.nI1(1,"transloco"),e.mxI("valueChange",function(i){l.eBV(n);const c=e.XpG(2);return e.DH7(c.comment,i)||(c.comment=i),l.Njj(i)}),e.k0s()}if(2&t){const n=e.XpG(2);e.Y8G("label",e.mNQ(e.bMT(1,3,"components.modals.rdfEdit.labelComment"))),e.R50("value",n.comment)}}function z(t,d){if(1&t&&(e.j41(0,"cue-typography",11),e.EFF(1),e.k0s()),2&t){const n=e.XpG(2);e.R7$(),e.JRh(n.error())}}function K(t,d){if(1&t){const n=e.RV6();e.j41(0,"cue-modal",1),e.bIt("close",function(){l.eBV(n);const i=e.XpG();return l.Njj(i.onClose())}),e.j41(1,"cue-flexcontainer",2),e.SdG(2),e.nVh(3,I,2,1,"cue-typography"),e.j41(4,"cue-flexcontainer",3),e.nVh(5,k,2,5,"cue-key-val",4),e.nVh(6,B,2,6,"cue-input",5),e.nVh(7,P,2,6,"cue-input",6),e.nVh(8,w,2,6,"cue-input-date",7),e.nVh(9,O,5,4,"cue-flexcontainer",8),e.nVh(10,X,2,11,"cue-select",9),e.nVh(11,Y,2,11,"cue-multi-select",9),e.k0s(),e.nVh(12,$,2,5,"cue-input-multiline",10),e.nVh(13,z,2,1,"cue-typography",11),e.j41(14,"cue-flexcontainer",12)(15,"cue-button",13),e.bIt("click",function(){l.eBV(n);const i=e.XpG();return l.Njj(i.onClose())}),e.j41(16,"cue-button-label"),e.EFF(17),e.nI1(18,"transloco"),e.k0s()(),e.j41(19,"cue-button",14),e.bIt("click",function(){l.eBV(n);const i=e.XpG();return l.Njj(i.onSave())}),e.j41(20,"cue-button-label"),e.EFF(21),e.nI1(22,"transloco"),e.k0s()()()()()}if(2&t){const n=e.XpG();e.Y8G("displayCloseBtn",!1)("closeOnBackgroundClick",!1),e.R7$(3),e.vxM(n.config().message?3:-1),e.R7$(2),e.vxM("boolean"!==n.config().dataType?5:-1),e.R7$(),e.vxM("string"===n.config().dataType?6:-1),e.R7$(),e.vxM("number"===n.config().dataType?7:-1),e.R7$(),e.vxM("date"===n.config().dataType?8:-1),e.R7$(),e.vxM("boolean"===n.config().dataType?9:-1),e.R7$(),e.vxM("select"===n.config().dataType?10:-1),e.R7$(),e.vxM("multiselect"===n.config().dataType?11:-1),e.R7$(),e.vxM(n.identical()?-1:12),e.R7$(),e.vxM(n.error()?13:-1),e.R7$(2),e.Y8G("disabled",n.saving()),e.R7$(2),e.JRh(e.bMT(18,17,"components.modals.rdfEdit.buttonCancel")),e.R7$(2),e.Y8G("disabled",n.saving()||n.identical())("loading",n.saving()),e.R7$(2),e.JRh(e.bMT(22,19,"components.modals.rdfEdit.buttonSave"))}}let S=(()=>{class t{visible=(0,_.geq)(!0);config=_.hFB.required();close=(0,_.CGW)();existingValue=(0,m.EW)(()=>{let n="";return n=Array.isArray(this.config().existingValue)?this.config().existingValue.map(i=>this._getLabel(i)).join(", "):this._getLabel(this.config().existingValue),n});newValue=(0,m.uu)(()=>this.config().existingValue);comment=(0,l.vPA)("");errorID=(0,_.geq)("");error=(0,v.Xx)(this.errorID);saving=(0,l.vPA)(!1);pristine=(0,l.vPA)(!0);identical=(0,m.EW)(()=>!this.config().hasExternalChanges&&this.newValue()===this.config().existingValue);valueErrorID=(0,m.EW)(()=>this.pristine()?"":this.identical()?"components.modals.rdfEdit.errorIdenticalValue":"");valueError=(0,v.Xx)(this.valueErrorID);optionsCount=(0,m.EW)(()=>this.config().options?.length||0);constructor(){(0,l.QZP)(()=>{this.pristine()&&this.newValue()!==this.config().existingValue&&this.pristine.set(!1)})}onSave(){var n=this;return(0,o.A)(function*(){n.saving.set(!0),n.errorID.set("");try{const a=n.config();yield a.requestSave({newValue:n.newValue(),comment:n.comment(),previousValue:a.existingValue}),n.visible.set(!1),n.close.emit(n.newValue())}catch(a){console.error("Error saving RDF edit:",a),n.errorID.set("components.modals.rdfEdit.errorSaving")}n.saving.set(!1)})()}onClose(){this.visible.set(!1),this.close.emit(null)}onBooleanChange(n){this.newValue.set(n?"true":"false")}_getLabel(n){const a=this.config().optionLabelMap;return void 0!==a&&a[n]||n}static \u0275fac=function(a){return new(a||t)};static \u0275cmp=e.VBU({type:t,selectors:[["cue-modal-rdf-edit"]],inputs:{visible:[1,"visible"],config:[1,"config"],errorID:[1,"errorID"]},outputs:{visible:"visibleChange",close:"close",errorID:"errorIDChange"},ngContentSelectors:N,decls:1,vars:1,consts:[[3,"displayCloseBtn","closeOnBackgroundClick"],[3,"close","displayCloseBtn","closeOnBackgroundClick"],["direction","column","align","center"],["direction","column","gap","m"],[3,"key","val"],["type","text",3,"label","value","error"],["type","number",3,"label","value","error"],[3,"label","value","error"],["direction","row","align","center","justify","space-between","gap","l"],[3,"value","options","labelMap","label","showFilter","error"],[2,"width","100%",3,"label","value"],[2,"color","var(--cue-error)"],["direction","row","justify","center",2,"width","100%"],[3,"click","disabled"],["variant","secondary",3,"click","disabled","loading"],["type","text",3,"valueChange","label","value","error"],["type","number",3,"valueChange","label","value","error"],[3,"valueChange","label","value","error"],[3,"checkedChange","checked"],[3,"valueChange","value","options","labelMap","label","showFilter","error"],[2,"width","100%",3,"valueChange","label","value"]],template:function(a,i){1&a&&(e.NAR(),e.nVh(0,K,23,21,"cue-modal",0)),2&a&&e.vxM(i.visible()?0:-1)},dependencies:[y.a,f.n,x.$,h.Typography,E.F,D.Input,R.L,C.Select,g.MultiSelect,r.InputDate,p.Switch,u.InputMultiline,v.Kj],styles:[".col[_ngcontent-%COMP%]{flex:1;min-width:0;height:100%}"]})}return t})();var T=s(7335);function A(t,d){1&t&&(e.j41(0,"span",7),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&t&&(e.R7$(),e.SpI("(",e.bMT(2,1,"components.keyVal.edited"),")"))}function W(t,d){if(1&t){const n=e.RV6();e.j41(0,"span",5),e.bIt("click",function(){l.eBV(n);const i=e.XpG();return l.Njj(i.onReadClick())}),e.j41(1,"span",6),e.EFF(2),e.k0s(),e.nVh(3,A,3,3,"span",7),e.k0s()}if(2&t){const n=e.XpG();e.AVh("interactive",!n.editDisabled()),e.Y8G("menuItems",n.hoverMenu()),e.R7$(2),e.Lme("",n.valueFormatted()," ",n.suffix()),e.R7$(),e.vxM(n.isDirty()?3:-1)}}function L(t,d){if(1&t){const n=e.RV6();e.j41(0,"cue-select",10),e.bIt("valueChange",function(i){l.eBV(n);const c=e.XpG(2);return l.Njj(c.selectionChange(i))}),e.k0s()}if(2&t){const n=e.XpG(2);e.Y8G("value",n.newValue())("options",n.options())}}function H(t,d){if(1&t){const n=e.RV6();e.j41(0,"cue-inline-input",11),e.bIt("valueChange",function(i){l.eBV(n);const c=e.XpG(2);return l.Njj(c.inputChange(i))}),e.k0s(),e.EFF(1)}if(2&t){const n=e.XpG(2);e.Y8G("value",n.valueFormatted()),e.R7$(),e.SpI(" ",n.suffix()," ")}}function J(t,d){if(1&t&&(e.j41(0,"cue-flexcontainer",3),e.nVh(1,L,1,2,"cue-select",8)(2,H,2,2),e.nrm(3,"cue-entity-menu",9),e.k0s()),2&t){const n=e.XpG();e.R7$(),e.vxM(void 0!==n.options()&&n.options().length?1:2),e.R7$(2),e.Y8G("items",n.saveCancelMenu())}}function Q(t,d){if(1&t){const n=e.RV6();e.j41(0,"cue-modal-rdf-edit",12),e.mxI("visibleChange",function(i){l.eBV(n);const c=e.XpG();return e.DH7(c.rdfModalVisible,i)||(c.rdfModalVisible=i),l.Njj(i)}),e.bIt("close",function(i){l.eBV(n);const c=e.XpG();return l.Njj(c.onRdfModalClose(i))}),e.k0s()}if(2&t){const n=e.XpG();e.Y8G("config",d),e.R50("visible",n.rdfModalVisible)}}let U=(()=>{class t{entityMenuDirective;size=(0,_.hFB)("m");key=_.hFB.required();val=_.geq.required();originalValue=(0,_.hFB)(void 0);options=(0,_.hFB)([]);suffix=(0,_.hFB)("");rdfConfig=(0,_.hFB)();editDisabled=(0,_.hFB)(!1);valueChange=(0,_.CGW)();editModeEnabled=(0,l.vPA)(!1);isDirty=(0,m.EW)(()=>{const n=this.originalValue();return void 0!==n&&this.val()!==n});valueChanged=(0,m.EW)(()=>this.val()!==this.newValue());newValue=(0,m.uu)(()=>this.val());rdfModalVisible=(0,l.vPA)(!1);valueFormatted=(0,m.EW)(()=>this._idToString(this.val()));hoverMenu=(0,m.EW)(()=>{if(this.editModeEnabled()||this.editDisabled())return[];const n=[{icon:"edit",label:"Edit",action:()=>this.onReadClick()}];return this.isDirty()&&n.push({icon:"close",label:"Revert to original",action:()=>this._revert()}),n});onReadClick(){this.editDisabled()||(this.rdfConfig()?this.rdfModalVisible.set(!0):this.editModeEnabled.set(!0),this.entityMenuDirective?.removeOverlayMenu())}labelSize=(0,m.EW)(()=>{switch(this.size()){case"s":return"xs";case"m":return"s";case"l":return"m";case"xl":return"l"}});onKeyPress(n){this.editModeEnabled()&&("Escape"===n.key?(this._reset(),n.stopPropagation()):"Enter"===n.key&&this._emitChange())}saveCancelMenu=(0,m.EW)(()=>{const n=[{icon:"close",label:"Cancel",action:()=>this._reset()}];return this.valueChanged()&&n.push({icon:"save",label:"Save",action:()=>this._emitChange()}),n});selectionChange(n){this.newValue.set(n?.toString()??"")}inputChange(n){this.newValue.set(n)}_emitChange(){this.valueChange.emit(this.newValue()),this.val.set(this.newValue()),this.editModeEnabled.set(!1)}_reset(){this.newValue.set(this.val()),this.editModeEnabled.set(!1)}_revert(){const n=this.originalValue();void 0!==n&&(this.val.set(n),this.newValue.set(n),this.valueChange.emit(n),this.entityMenuDirective?.removeOverlayMenu())}_idToString(n){const a=this.rdfConfig()?.optionLabelMap;return a?a[n]??n:n}onRdfModalClose(n){if(this.rdfModalVisible.set(!1),null===n)return;const a=Array.isArray(n)?n.join(", "):n;this.val.set(a)}static \u0275fac=function(a){return new(a||t)};static \u0275cmp=e.VBU({type:t,selectors:[["cue-key-val-editable"]],viewQuery:function(a,i){if(1&a&&e.GBs(T.e,5),2&a){let c;e.mGM(c=e.lsd())&&(i.entityMenuDirective=c.first)}},hostBindings:function(a,i){1&a&&e.bIt("keydown",function(Z){return i.onKeyPress(Z)},e.EBC)},inputs:{size:[1,"size"],key:[1,"key"],val:[1,"val"],originalValue:[1,"originalValue"],options:[1,"options"],suffix:[1,"suffix"],rdfConfig:[1,"rdfConfig"],editDisabled:[1,"editDisabled"]},outputs:{val:"valChange",valueChange:"valueChange"},decls:9,vars:5,consts:[[1,"key-val-container"],[3,"size"],["cueEntityMenu","",1,"read-mode-container",3,"interactive","menuItems"],["direction","row","align","center"],[3,"config","visible"],["cueEntityMenu","",1,"read-mode-container",3,"click","menuItems"],[1,"value-content"],[1,"dirty-indicator"],[3,"value","options"],[3,"items"],[3,"valueChange","value","options"],[3,"valueChange","value"],[3,"visibleChange","close","config","visible"]],template:function(a,i){if(1&a&&(e.j41(0,"dl",0)(1,"dt")(2,"cue-typography",1),e.EFF(3),e.k0s()(),e.j41(4,"dd")(5,"cue-typography",1),e.nVh(6,W,4,6,"span",2)(7,J,4,2,"cue-flexcontainer",3),e.k0s()()(),e.nVh(8,Q,1,2,"cue-modal-rdf-edit",4)),2&a){let c;e.R7$(2),e.Y8G("size",i.labelSize()),e.R7$(),e.JRh(i.key()),e.R7$(2),e.Y8G("size",i.size()),e.R7$(),e.vxM(i.editModeEnabled()?i.rdfConfig()?-1:7:6),e.R7$(2),e.vxM((c=i.rdfConfig())?8:-1,c)}},dependencies:[h.Typography,T.e,C.Select,b.H,f.n,V.InlineInput,S,v.Kj],styles:[".key-val-container[_ngcontent-%COMP%]{margin:0;display:flex;flex-direction:column;gap:var(--cue-grid-gap-s, 8px)}dt[_ngcontent-%COMP%], dd[_ngcontent-%COMP%]{margin:0}.read-mode-container[_ngcontent-%COMP%]{display:inline-flex;align-items:center;width:100%;position:relative}.read-mode-container.interactive[_ngcontent-%COMP%]:hover{cursor:pointer}.value-content[_ngcontent-%COMP%]{flex:1}[_nghost-%COMP%]{color:var(--cue-typography-text-color, inherit)}dt[_ngcontent-%COMP%] cue-typography[_ngcontent-%COMP%], dd[_ngcontent-%COMP%] cue-typography[_ngcontent-%COMP%], .value-content[_ngcontent-%COMP%]{color:var(--cue-typography-text-color, inherit)!important}dt[_ngcontent-%COMP%] cue-typography[_ngcontent-%COMP%] div[_ngcontent-%COMP%], dd[_ngcontent-%COMP%] cue-typography[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{color:var(--cue-typography-text-color, inherit)!important}[_ngcontent-%COMP%]:deep(cue-svg-icon), [_ngcontent-%COMP%]:deep(cue-entity-menu cue-svg-icon){color:var(--cue-icon-color, inherit)!important}.dirty-indicator[_ngcontent-%COMP%]{opacity:.8;margin-left:4px;color:var(--cue-typography-text-color, inherit)!important;font-weight:700;font-size:.4em;transform:translateY(-1em)}"]})}return t})()},8547(j,M,s){s.d(M,{T:()=>C});var _=s(7705),l=s(29),m=s(6117),b=s(6279),V=s(356),o=s(5547),v=s(5802);const y=(r,p)=>p.label;function f(r,p){if(1&r&&o.nrm(0,"cue-svg-icon",4),2&r){const u=o.XpG(2).$implicit;o.Y8G("name",u.icon)}}function x(r,p){if(1&r&&o.nrm(0,"cue-menu-nested",6),2&r){const u=o.XpG(2).$implicit,g=o.XpG();o.Y8G("items",u.children)("size",g.size())}}function h(r,p){if(1&r&&(o.j41(0,"cue-menu",1)(1,"cue-menu-item",3),o.nVh(2,f,1,1,"cue-svg-icon",4),o.EFF(3),o.nrm(4,"cue-svg-icon",5),o.k0s(),o.nVh(5,x,1,2,"cue-menu-nested",6),o.k0s()),2&r){const u=o.XpG().$implicit,g=o.XpG();o.Y8G("size",g.size()),o.R7$(),o.Y8G("title",u.tooltip),o.R7$(),o.vxM(u.icon?2:-1),o.R7$(),o.SpI(" ",u.label," "),o.R7$(2),o.vxM(u.children?5:-1)}}function E(r,p){if(1&r&&o.nrm(0,"cue-svg-icon",4),2&r){const u=o.XpG(2).$implicit;o.Y8G("name",u.icon)}}function D(r,p){if(1&r){const u=o.RV6();o.j41(0,"cue-menu-item",7),o.bIt("click",function(){v.eBV(u);const e=o.XpG().$implicit;return v.Njj(null==e.action?null:e.action())}),o.nVh(1,E,1,1,"cue-svg-icon",4),o.EFF(2),o.k0s()}if(2&r){const u=o.XpG().$implicit;o.Y8G("title",u.tooltip),o.R7$(),o.vxM(u.icon?1:-1),o.R7$(),o.SpI(" ",u.label," ")}}function R(r,p){if(1&r&&o.nVh(0,h,6,5,"cue-menu",1)(1,D,3,3,"cue-menu-item",2),2&r){const u=p.$implicit;o.vxM(null!=u.children&&u.children.length?0:1)}}let C=(()=>{class r{items=_.hFB.required();size=(0,_.hFB)("m");static \u0275fac=function(g){return new(g||r)};static \u0275cmp=o.VBU({type:r,selectors:[["cue-menu-nested"]],inputs:{items:[1,"items"],size:[1,"size"]},decls:3,vars:1,consts:[[3,"size"],["trigger","hover",3,"size"],[3,"title"],["trigger","",3,"title"],["before","",3,"name"],["after","","name","paginator-next"],["menu","",3,"items","size"],[3,"click","title"]],template:function(g,e){1&g&&(o.j41(0,"cue-menu-wrap",0),o.Z7z(1,R,2,1,null,null,y),o.k0s()),2&g&&(o.Y8G("size",e.size()),o.R7$(),o.Dyx(e.items()))},dependencies:[r,m.W,b.D,V.M,l.A],encapsulation:2})}return r})()}}]);
|
|
1
|
+
"use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[650],{5794(j,M,s){s.d(M,{L:()=>U});var _=s(7705),l=s(5802),m=s(2271),b=s(4853),V=s(9495),o=s(467),v=s(9352),y=s(5745),f=s(5381),x=s(5971),h=s(2245),E=s(9421),D=s(8957),R=s(5448),C=s(63),r=s(617),p=s(9695),u=s(1985),g=s(3039),e=s(5547);const N=["*"],F=()=>[],G=()=>({});function I(t,d){if(1&t&&(e.j41(0,"cue-typography"),e.EFF(1),e.k0s()),2&t){const n=e.XpG(2);e.R7$(),e.JRh(n.config().message)}}function k(t,d){if(1&t&&(e.nrm(0,"cue-key-val",4),e.nI1(1,"transloco")),2&t){const n=e.XpG(2);e.Y8G("key",e.mNQ(e.bMT(1,3,"components.modals.rdfEdit.labelExistingValue")))("val",n.existingValue())}}function B(t,d){if(1&t){const n=e.RV6();e.j41(0,"cue-input",15),e.nI1(1,"transloco"),e.mxI("valueChange",function(i){l.eBV(n);const c=e.XpG(2);return e.DH7(c.newValue,i)||(c.newValue=i),l.Njj(i)}),e.k0s()}if(2&t){const n=e.XpG(2);e.Y8G("label",e.mNQ(e.bMT(1,4,"components.modals.rdfEdit.labelNewValue"))),e.R50("value",n.newValue),e.Y8G("error",n.valueError())}}function P(t,d){if(1&t){const n=e.RV6();e.j41(0,"cue-input",16),e.nI1(1,"transloco"),e.mxI("valueChange",function(i){l.eBV(n);const c=e.XpG(2);return e.DH7(c.newValue,i)||(c.newValue=i),l.Njj(i)}),e.k0s()}if(2&t){const n=e.XpG(2);e.Y8G("label",e.mNQ(e.bMT(1,4,"components.modals.rdfEdit.labelNewValue"))),e.R50("value",n.newValue),e.Y8G("error",n.valueError())}}function w(t,d){if(1&t){const n=e.RV6();e.j41(0,"cue-input-date",17),e.nI1(1,"transloco"),e.mxI("valueChange",function(i){l.eBV(n);const c=e.XpG(2);return e.DH7(c.newValue,i)||(c.newValue=i),l.Njj(i)}),e.k0s()}if(2&t){const n=e.XpG(2);e.Y8G("label",e.mNQ(e.bMT(1,4,"components.modals.rdfEdit.labelNewValue"))),e.R50("value",n.newValue),e.Y8G("error",n.valueError())}}function O(t,d){if(1&t){const n=e.RV6();e.j41(0,"cue-flexcontainer",8)(1,"cue-typography"),e.EFF(2),e.nI1(3,"transloco"),e.k0s(),e.j41(4,"cue-input-switch",18),e.bIt("checkedChange",function(i){l.eBV(n);const c=e.XpG(2);return l.Njj(c.onBooleanChange(i))}),e.k0s()()}if(2&t){const n=e.XpG(2);e.R7$(2),e.JRh(e.bMT(3,2,"components.modals.rdfEdit.labelSetNewValue")),e.R7$(2),e.Y8G("checked","true"===n.newValue())}}function X(t,d){if(1&t){const n=e.RV6();e.j41(0,"cue-select",19),e.nI1(1,"transloco"),e.mxI("valueChange",function(i){l.eBV(n);const c=e.XpG(2);return e.DH7(c.newValue,i)||(c.newValue=i),l.Njj(i)}),e.k0s()}if(2&t){const n=e.XpG(2);e.Y8G("label",e.mNQ(e.bMT(1,7,"components.modals.rdfEdit.labelNewValue"))),e.R50("value",n.newValue),e.Y8G("options",n.config().options||e.lJ4(9,F))("labelMap",n.config().optionLabelMap||e.lJ4(10,G))("showFilter",n.optionsCount()>5)("error",n.valueError())}}function Y(t,d){if(1&t){const n=e.RV6();e.j41(0,"cue-multi-select",19),e.nI1(1,"transloco"),e.mxI("valueChange",function(i){l.eBV(n);const c=e.XpG(2);return e.DH7(c.newValue,i)||(c.newValue=i),l.Njj(i)}),e.k0s()}if(2&t){const n=e.XpG(2);e.Y8G("label",e.mNQ(e.bMT(1,7,"components.modals.rdfEdit.labelNewValue"))),e.R50("value",n.newValue),e.Y8G("options",n.config().options||e.lJ4(9,F))("labelMap",n.config().optionLabelMap||e.lJ4(10,G))("showFilter",n.optionsCount()>5)("error",n.valueError())}}function $(t,d){if(1&t){const n=e.RV6();e.j41(0,"cue-input-multiline",20),e.nI1(1,"transloco"),e.mxI("valueChange",function(i){l.eBV(n);const c=e.XpG(2);return e.DH7(c.comment,i)||(c.comment=i),l.Njj(i)}),e.k0s()}if(2&t){const n=e.XpG(2);e.Y8G("label",e.mNQ(e.bMT(1,3,"components.modals.rdfEdit.labelComment"))),e.R50("value",n.comment)}}function z(t,d){if(1&t&&(e.j41(0,"cue-typography",11),e.EFF(1),e.k0s()),2&t){const n=e.XpG(2);e.R7$(),e.JRh(n.error())}}function K(t,d){if(1&t){const n=e.RV6();e.j41(0,"cue-modal",1),e.bIt("close",function(){l.eBV(n);const i=e.XpG();return l.Njj(i.onClose())}),e.j41(1,"cue-flexcontainer",2),e.SdG(2),e.nVh(3,I,2,1,"cue-typography"),e.j41(4,"cue-flexcontainer",3),e.nVh(5,k,2,5,"cue-key-val",4),e.nVh(6,B,2,6,"cue-input",5),e.nVh(7,P,2,6,"cue-input",6),e.nVh(8,w,2,6,"cue-input-date",7),e.nVh(9,O,5,4,"cue-flexcontainer",8),e.nVh(10,X,2,11,"cue-select",9),e.nVh(11,Y,2,11,"cue-multi-select",9),e.k0s(),e.nVh(12,$,2,5,"cue-input-multiline",10),e.nVh(13,z,2,1,"cue-typography",11),e.j41(14,"cue-flexcontainer",12)(15,"cue-button",13),e.bIt("click",function(){l.eBV(n);const i=e.XpG();return l.Njj(i.onClose())}),e.j41(16,"cue-button-label"),e.EFF(17),e.nI1(18,"transloco"),e.k0s()(),e.j41(19,"cue-button",14),e.bIt("click",function(){l.eBV(n);const i=e.XpG();return l.Njj(i.onSave())}),e.j41(20,"cue-button-label"),e.EFF(21),e.nI1(22,"transloco"),e.k0s()()()()()}if(2&t){const n=e.XpG();e.Y8G("displayCloseBtn",!1)("closeOnBackgroundClick",!1),e.R7$(3),e.vxM(n.config().message?3:-1),e.R7$(2),e.vxM("boolean"!==n.config().dataType?5:-1),e.R7$(),e.vxM("string"===n.config().dataType?6:-1),e.R7$(),e.vxM("number"===n.config().dataType?7:-1),e.R7$(),e.vxM("date"===n.config().dataType?8:-1),e.R7$(),e.vxM("boolean"===n.config().dataType?9:-1),e.R7$(),e.vxM("select"===n.config().dataType?10:-1),e.R7$(),e.vxM("multiselect"===n.config().dataType?11:-1),e.R7$(),e.vxM(n.identical()?-1:12),e.R7$(),e.vxM(n.error()?13:-1),e.R7$(2),e.Y8G("disabled",n.saving()),e.R7$(2),e.JRh(e.bMT(18,17,"components.modals.rdfEdit.buttonCancel")),e.R7$(2),e.Y8G("disabled",n.saving()||n.identical())("loading",n.saving()),e.R7$(2),e.JRh(e.bMT(22,19,"components.modals.rdfEdit.buttonSave"))}}let S=(()=>{class t{visible=(0,_.geq)(!0);config=_.hFB.required();close=(0,_.CGW)();existingValue=(0,m.EW)(()=>{let n="";return n=Array.isArray(this.config().existingValue)?this.config().existingValue.map(i=>this._getLabel(i)).join(", "):this._getLabel(this.config().existingValue),n});newValue=(0,m.uu)(()=>this.config().existingValue);comment=(0,l.vPA)("");errorID=(0,_.geq)("");error=(0,v.Xx)(this.errorID);saving=(0,l.vPA)(!1);pristine=(0,l.vPA)(!0);identical=(0,m.EW)(()=>!this.config().hasExternalChanges&&this.newValue()===this.config().existingValue);valueErrorID=(0,m.EW)(()=>this.pristine()?"":this.identical()?"components.modals.rdfEdit.errorIdenticalValue":"");valueError=(0,v.Xx)(this.valueErrorID);optionsCount=(0,m.EW)(()=>this.config().options?.length||0);constructor(){(0,l.QZP)(()=>{this.pristine()&&this.newValue()!==this.config().existingValue&&this.pristine.set(!1)})}onSave(){var n=this;return(0,o.A)(function*(){n.saving.set(!0),n.errorID.set("");try{const a=n.config();yield a.requestSave({newValue:n.newValue(),comment:n.comment(),previousValue:a.existingValue}),n.visible.set(!1),n.close.emit(n.newValue())}catch(a){console.error("Error saving RDF edit:",a),n.errorID.set("components.modals.rdfEdit.errorSaving")}n.saving.set(!1)})()}onClose(){this.visible.set(!1),this.close.emit(null)}onBooleanChange(n){this.newValue.set(n?"true":"false")}_getLabel(n){const a=this.config().optionLabelMap;return void 0!==a&&a[n]||n}static \u0275fac=function(a){return new(a||t)};static \u0275cmp=e.VBU({type:t,selectors:[["cue-modal-rdf-edit"]],inputs:{visible:[1,"visible"],config:[1,"config"],errorID:[1,"errorID"]},outputs:{visible:"visibleChange",close:"close",errorID:"errorIDChange"},ngContentSelectors:N,decls:1,vars:1,consts:[[3,"displayCloseBtn","closeOnBackgroundClick"],[3,"close","displayCloseBtn","closeOnBackgroundClick"],["direction","column","align","center"],["direction","column","gap","m"],[3,"key","val"],["type","text",3,"label","value","error"],["type","number",3,"label","value","error"],[3,"label","value","error"],["direction","row","align","center","justify","space-between","gap","l"],[3,"value","options","labelMap","label","showFilter","error"],[2,"width","100%",3,"label","value"],[2,"color","var(--cue-error)"],["direction","row","justify","center",2,"width","100%"],[3,"click","disabled"],["variant","secondary",3,"click","disabled","loading"],["type","text",3,"valueChange","label","value","error"],["type","number",3,"valueChange","label","value","error"],[3,"valueChange","label","value","error"],[3,"checkedChange","checked"],[3,"valueChange","value","options","labelMap","label","showFilter","error"],[2,"width","100%",3,"valueChange","label","value"]],template:function(a,i){1&a&&(e.NAR(),e.nVh(0,K,23,21,"cue-modal",0)),2&a&&e.vxM(i.visible()?0:-1)},dependencies:[y.a,f.FlexContainer,x.Button,h.Typography,E.F,D.Input,R.ButtonLabel,C.Select,g.MultiSelect,r.InputDate,p.Switch,u.InputMultiline,v.Kj],styles:[".col[_ngcontent-%COMP%]{flex:1;min-width:0;height:100%}"]})}return t})();var T=s(7335);function A(t,d){1&t&&(e.j41(0,"span",7),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&t&&(e.R7$(),e.SpI("(",e.bMT(2,1,"components.keyVal.edited"),")"))}function W(t,d){if(1&t){const n=e.RV6();e.j41(0,"span",5),e.bIt("click",function(){l.eBV(n);const i=e.XpG();return l.Njj(i.onReadClick())}),e.j41(1,"span",6),e.EFF(2),e.k0s(),e.nVh(3,A,3,3,"span",7),e.k0s()}if(2&t){const n=e.XpG();e.AVh("interactive",!n.editDisabled()),e.Y8G("menuItems",n.hoverMenu()),e.R7$(2),e.Lme("",n.valueFormatted()," ",n.suffix()),e.R7$(),e.vxM(n.isDirty()?3:-1)}}function L(t,d){if(1&t){const n=e.RV6();e.j41(0,"cue-select",10),e.bIt("valueChange",function(i){l.eBV(n);const c=e.XpG(2);return l.Njj(c.selectionChange(i))}),e.k0s()}if(2&t){const n=e.XpG(2);e.Y8G("value",n.newValue())("options",n.options())}}function H(t,d){if(1&t){const n=e.RV6();e.j41(0,"cue-inline-input",11),e.bIt("valueChange",function(i){l.eBV(n);const c=e.XpG(2);return l.Njj(c.inputChange(i))}),e.k0s(),e.EFF(1)}if(2&t){const n=e.XpG(2);e.Y8G("value",n.valueFormatted()),e.R7$(),e.SpI(" ",n.suffix()," ")}}function J(t,d){if(1&t&&(e.j41(0,"cue-flexcontainer",3),e.nVh(1,L,1,2,"cue-select",8)(2,H,2,2),e.nrm(3,"cue-entity-menu",9),e.k0s()),2&t){const n=e.XpG();e.R7$(),e.vxM(void 0!==n.options()&&n.options().length?1:2),e.R7$(2),e.Y8G("items",n.saveCancelMenu())}}function Q(t,d){if(1&t){const n=e.RV6();e.j41(0,"cue-modal-rdf-edit",12),e.mxI("visibleChange",function(i){l.eBV(n);const c=e.XpG();return e.DH7(c.rdfModalVisible,i)||(c.rdfModalVisible=i),l.Njj(i)}),e.bIt("close",function(i){l.eBV(n);const c=e.XpG();return l.Njj(c.onRdfModalClose(i))}),e.k0s()}if(2&t){const n=e.XpG();e.Y8G("config",d),e.R50("visible",n.rdfModalVisible)}}let U=(()=>{class t{entityMenuDirective;size=(0,_.hFB)("m");key=_.hFB.required();val=_.geq.required();originalValue=(0,_.hFB)(void 0);options=(0,_.hFB)([]);suffix=(0,_.hFB)("");rdfConfig=(0,_.hFB)();editDisabled=(0,_.hFB)(!1);valueChange=(0,_.CGW)();editModeEnabled=(0,l.vPA)(!1);isDirty=(0,m.EW)(()=>{const n=this.originalValue();return void 0!==n&&this.val()!==n});valueChanged=(0,m.EW)(()=>this.val()!==this.newValue());newValue=(0,m.uu)(()=>this.val());rdfModalVisible=(0,l.vPA)(!1);valueFormatted=(0,m.EW)(()=>this._idToString(this.val()));hoverMenu=(0,m.EW)(()=>{if(this.editModeEnabled()||this.editDisabled())return[];const n=[{icon:"edit",label:"Edit",action:()=>this.onReadClick()}];return this.isDirty()&&n.push({icon:"close",label:"Revert to original",action:()=>this._revert()}),n});onReadClick(){this.editDisabled()||(this.rdfConfig()?this.rdfModalVisible.set(!0):this.editModeEnabled.set(!0),this.entityMenuDirective?.removeOverlayMenu())}labelSize=(0,m.EW)(()=>{switch(this.size()){case"s":return"xs";case"m":return"s";case"l":return"m";case"xl":return"l"}});onKeyPress(n){this.editModeEnabled()&&("Escape"===n.key?(this._reset(),n.stopPropagation()):"Enter"===n.key&&this._emitChange())}saveCancelMenu=(0,m.EW)(()=>{const n=[{icon:"close",label:"Cancel",action:()=>this._reset()}];return this.valueChanged()&&n.push({icon:"save",label:"Save",action:()=>this._emitChange()}),n});selectionChange(n){this.newValue.set(n?.toString()??"")}inputChange(n){this.newValue.set(n)}_emitChange(){this.valueChange.emit(this.newValue()),this.val.set(this.newValue()),this.editModeEnabled.set(!1)}_reset(){this.newValue.set(this.val()),this.editModeEnabled.set(!1)}_revert(){const n=this.originalValue();void 0!==n&&(this.val.set(n),this.newValue.set(n),this.valueChange.emit(n),this.entityMenuDirective?.removeOverlayMenu())}_idToString(n){const a=this.rdfConfig()?.optionLabelMap;return a?a[n]??n:n}onRdfModalClose(n){if(this.rdfModalVisible.set(!1),null===n)return;const a=Array.isArray(n)?n.join(", "):n;this.val.set(a)}static \u0275fac=function(a){return new(a||t)};static \u0275cmp=e.VBU({type:t,selectors:[["cue-key-val-editable"]],viewQuery:function(a,i){if(1&a&&e.GBs(T.e,5),2&a){let c;e.mGM(c=e.lsd())&&(i.entityMenuDirective=c.first)}},hostBindings:function(a,i){1&a&&e.bIt("keydown",function(Z){return i.onKeyPress(Z)},e.EBC)},inputs:{size:[1,"size"],key:[1,"key"],val:[1,"val"],originalValue:[1,"originalValue"],options:[1,"options"],suffix:[1,"suffix"],rdfConfig:[1,"rdfConfig"],editDisabled:[1,"editDisabled"]},outputs:{val:"valChange",valueChange:"valueChange"},decls:9,vars:5,consts:[[1,"key-val-container"],[3,"size"],["cueEntityMenu","",1,"read-mode-container",3,"interactive","menuItems"],["direction","row","align","center"],[3,"config","visible"],["cueEntityMenu","",1,"read-mode-container",3,"click","menuItems"],[1,"value-content"],[1,"dirty-indicator"],[3,"value","options"],[3,"items"],[3,"valueChange","value","options"],[3,"valueChange","value"],[3,"visibleChange","close","config","visible"]],template:function(a,i){if(1&a&&(e.j41(0,"dl",0)(1,"dt")(2,"cue-typography",1),e.EFF(3),e.k0s()(),e.j41(4,"dd")(5,"cue-typography",1),e.nVh(6,W,4,6,"span",2)(7,J,4,2,"cue-flexcontainer",3),e.k0s()()(),e.nVh(8,Q,1,2,"cue-modal-rdf-edit",4)),2&a){let c;e.R7$(2),e.Y8G("size",i.labelSize()),e.R7$(),e.JRh(i.key()),e.R7$(2),e.Y8G("size",i.size()),e.R7$(),e.vxM(i.editModeEnabled()?i.rdfConfig()?-1:7:6),e.R7$(2),e.vxM((c=i.rdfConfig())?8:-1,c)}},dependencies:[h.Typography,T.e,C.Select,b.H,f.FlexContainer,V.InlineInput,S,v.Kj],styles:[".key-val-container[_ngcontent-%COMP%]{margin:0;display:flex;flex-direction:column;gap:var(--cue-grid-gap-s, 8px)}dt[_ngcontent-%COMP%], dd[_ngcontent-%COMP%]{margin:0}.read-mode-container[_ngcontent-%COMP%]{display:inline-flex;align-items:center;width:100%;position:relative}.read-mode-container.interactive[_ngcontent-%COMP%]:hover{cursor:pointer}.value-content[_ngcontent-%COMP%]{flex:1}[_nghost-%COMP%]{color:var(--cue-typography-text-color, inherit)}dt[_ngcontent-%COMP%] cue-typography[_ngcontent-%COMP%], dd[_ngcontent-%COMP%] cue-typography[_ngcontent-%COMP%], .value-content[_ngcontent-%COMP%]{color:var(--cue-typography-text-color, inherit)!important}dt[_ngcontent-%COMP%] cue-typography[_ngcontent-%COMP%] div[_ngcontent-%COMP%], dd[_ngcontent-%COMP%] cue-typography[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{color:var(--cue-typography-text-color, inherit)!important}[_ngcontent-%COMP%]:deep(cue-svg-icon), [_ngcontent-%COMP%]:deep(cue-entity-menu cue-svg-icon){color:var(--cue-icon-color, inherit)!important}.dirty-indicator[_ngcontent-%COMP%]{opacity:.8;margin-left:4px;color:var(--cue-typography-text-color, inherit)!important;font-weight:700;font-size:.4em;transform:translateY(-1em)}"]})}return t})()},8547(j,M,s){s.d(M,{T:()=>C});var _=s(7705),l=s(29),m=s(6117),b=s(6279),V=s(356),o=s(5547),v=s(5802);const y=(r,p)=>p.label;function f(r,p){if(1&r&&o.nrm(0,"cue-svg-icon",4),2&r){const u=o.XpG(2).$implicit;o.Y8G("name",u.icon)}}function x(r,p){if(1&r&&o.nrm(0,"cue-menu-nested",6),2&r){const u=o.XpG(2).$implicit,g=o.XpG();o.Y8G("items",u.children)("size",g.size())}}function h(r,p){if(1&r&&(o.j41(0,"cue-menu",1)(1,"cue-menu-item",3),o.nVh(2,f,1,1,"cue-svg-icon",4),o.EFF(3),o.nrm(4,"cue-svg-icon",5),o.k0s(),o.nVh(5,x,1,2,"cue-menu-nested",6),o.k0s()),2&r){const u=o.XpG().$implicit,g=o.XpG();o.Y8G("size",g.size()),o.R7$(),o.Y8G("title",u.tooltip),o.R7$(),o.vxM(u.icon?2:-1),o.R7$(),o.SpI(" ",u.label," "),o.R7$(2),o.vxM(u.children?5:-1)}}function E(r,p){if(1&r&&o.nrm(0,"cue-svg-icon",4),2&r){const u=o.XpG(2).$implicit;o.Y8G("name",u.icon)}}function D(r,p){if(1&r){const u=o.RV6();o.j41(0,"cue-menu-item",7),o.bIt("click",function(){v.eBV(u);const e=o.XpG().$implicit;return v.Njj(null==e.action?null:e.action())}),o.nVh(1,E,1,1,"cue-svg-icon",4),o.EFF(2),o.k0s()}if(2&r){const u=o.XpG().$implicit;o.Y8G("title",u.tooltip),o.R7$(),o.vxM(u.icon?1:-1),o.R7$(),o.SpI(" ",u.label," ")}}function R(r,p){if(1&r&&o.nVh(0,h,6,5,"cue-menu",1)(1,D,3,3,"cue-menu-item",2),2&r){const u=p.$implicit;o.vxM(null!=u.children&&u.children.length?0:1)}}let C=(()=>{class r{items=_.hFB.required();size=(0,_.hFB)("m");static \u0275fac=function(g){return new(g||r)};static \u0275cmp=o.VBU({type:r,selectors:[["cue-menu-nested"]],inputs:{items:[1,"items"],size:[1,"size"]},decls:3,vars:1,consts:[[3,"size"],["trigger","hover",3,"size"],[3,"title"],["trigger","",3,"title"],["before","",3,"name"],["after","","name","paginator-next"],["menu","",3,"items","size"],[3,"click","title"]],template:function(g,e){1&g&&(o.j41(0,"cue-menu-wrap",0),o.Z7z(1,R,2,1,null,null,y),o.k0s()),2&g&&(o.Y8G("size",e.size()),o.R7$(),o.Dyx(e.items()))},dependencies:[r,m.W,b.D,V.M,l.A],encapsulation:2})}return r})()}}]);
|
package/6947.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[6947],{6947(E,p,r){r.d(p,{CueDocumentFilter:()=>b});var u=r(467),_=r(7705),g=r(2271),m=r(
|
|
1
|
+
"use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[6947],{6947(E,p,r){r.d(p,{CueDocumentFilter:()=>b});var u=r(467),_=r(7705),g=r(2271),m=r(8645),f=r(9822),i=r(5547);let b=(()=>{class o{projectId=_.hFB.required();sdkState=_.hFB.required();filtersChange=(0,_.CGW)();_handlers=(0,g.EW)(()=>{var n=this;const t=this.sdkState(),e=this.projectId(),a=new m.NV(t.cue.api,e,t.graphType);let l=null;const C=()=>(l||(l=this._loadSchemaLabels(t,e)),l);return{requestAvailableFilters:(d=(0,u.A)(function*(s){const[c,h]=yield Promise.all([a.availableFilters(s),C()]);return n._withSchemaLabels(c,h)}),function(c){return d.apply(this,arguments)}),requestAvailableEntities:function(){var d=(0,u.A)(function*(s,c){return yield a.availableEntities(s,c)});return function(c,h){return d.apply(this,arguments)}}()};var d});_loadSchemaLabels(n,t){return(0,u.A)(function*(){try{const e=new m.Ug(n.cue.api,t,n.cue.api.language,n.graphType);return yield e.ready,{content:new Map(e.availableContentCategories.get().map(a=>[a.iri,a.label])),entity:new Map(e.availableEntityCategories.get().map(a=>[a.iri,a.label]))}}catch(e){return console.error("[document-filter] Failed to load schema labels",e),{content:new Map,entity:new Map}}})()}_withSchemaLabels(n,t){return{mimes:n.mimes.map(e=>({iri:e.iri,label:e.label.replace(/FileContent$/,"")})),contents:n.contents.map(e=>({iri:e.iri,label:t.content.get(e.iri)??e.label})),entityCategories:n.entityCategories.map(e=>({iri:e.iri,label:t.entity.get(e.iri)??e.label}))}}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=i.VBU({type:o,selectors:[["cue-document-filter"]],inputs:{projectId:[1,"projectId"],sdkState:[1,"sdkState"]},outputs:{filtersChange:"filtersChange"},decls:1,vars:1,consts:[[3,"filtersChange","handlers"]],template:function(t,e){1&t&&(i.j41(0,"cue-doc-filter",0),i.bIt("filtersChange",function(l){return e.filtersChange.emit(l)}),i.k0s()),2&t&&i.Y8G("handlers",e._handlers())},dependencies:[f.y],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}return o})()}}]);
|
package/7089.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[7089],{7089(di,Cr,Xe){Xe.d(Cr,{d:()=>ai});var Lt=Xe(5802),Rt=Xe(5547),Me=Xe(7705);function U(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function de(e){return e instanceof U(e).Element||e instanceof Element}function X(e){return e instanceof U(e).HTMLElement||e instanceof HTMLElement}function lt(e){return!(typeof ShadowRoot>"u")&&(e instanceof U(e).ShadowRoot||e instanceof ShadowRoot)}var ve=Math.max,Ye=Math.min,we=Math.round;function dt(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function jt(){return!/^((?!chrome|android).)*safari/i.test(dt())}function Oe(e,t,r){void 0===t&&(t=!1),void 0===r&&(r=!1);var i=e.getBoundingClientRect(),o=1,a=1;t&&X(e)&&(o=e.offsetWidth>0&&we(i.width)/e.offsetWidth||1,a=e.offsetHeight>0&&we(i.height)/e.offsetHeight||1);var u=(de(e)?U(e):window).visualViewport,f=!jt()&&r,l=(i.left+(f&&u?u.offsetLeft:0))/o,c=(i.top+(f&&u?u.offsetTop:0))/a,E=i.width/o,O=i.height/a;return{width:E,height:O,top:c,right:l+E,bottom:c+O,left:l,x:l,y:c}}function vt(e){var t=U(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function K(e){return e?(e.nodeName||"").toLowerCase():null}function se(e){return((de(e)?e.ownerDocument:e.document)||window.document).documentElement}function mt(e){return Oe(se(e)).left+vt(e).scrollLeft}function re(e){return U(e).getComputedStyle(e)}function ht(e){var t=re(e);return/auto|scroll|overlay|hidden/.test(t.overflow+t.overflowY+t.overflowX)}function Sr(e,t,r){void 0===r&&(r=!1);var i=X(t),o=X(t)&&function Pr(e){var t=e.getBoundingClientRect(),r=we(t.width)/e.offsetWidth||1,i=we(t.height)/e.offsetHeight||1;return 1!==r||1!==i}(t),a=se(t),s=Oe(e,o,r),u={scrollLeft:0,scrollTop:0},f={x:0,y:0};return(i||!i&&!r)&&(("body"!==K(t)||ht(a))&&(u=function Dr(e){return e!==U(e)&&X(e)?function Ar(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}(e):vt(e)}(t)),X(t)?((f=Oe(t,!0)).x+=t.clientLeft,f.y+=t.clientTop):a&&(f.x=mt(a))),{x:s.left+u.scrollLeft-f.x,y:s.top+u.scrollTop-f.y,width:s.width,height:s.height}}function gt(e){var t=Oe(e),r=e.offsetWidth,i=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-i)<=1&&(i=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:i}}function ze(e){return"html"===K(e)?e:e.assignedSlot||e.parentNode||(lt(e)?e.host:null)||se(e)}function Bt(e){return["html","body","#document"].indexOf(K(e))>=0?e.ownerDocument.body:X(e)&&ht(e)?e:Bt(ze(e))}function Le(e,t){var r;void 0===t&&(t=[]);var i=Bt(e),o=i===(null==(r=e.ownerDocument)?void 0:r.body),a=U(i),s=o?[a].concat(a.visualViewport||[],ht(i)?i:[]):i,u=t.concat(s);return o?u:u.concat(Le(ze(s)))}function Mr(e){return["table","td","th"].indexOf(K(e))>=0}function kt(e){return X(e)&&"fixed"!==re(e).position?e.offsetParent:null}function Re(e){for(var t=U(e),r=kt(e);r&&Mr(r)&&"static"===re(r).position;)r=kt(r);return r&&("html"===K(r)||"body"===K(r)&&"static"===re(r).position)?t:r||function Lr(e){var t=/firefox/i.test(dt());if(/Trident/i.test(dt())&&X(e)&&"fixed"===re(e).position)return null;var o=ze(e);for(lt(o)&&(o=o.host);X(o)&&["html","body"].indexOf(K(o))<0;){var a=re(o);if("none"!==a.transform||"none"!==a.perspective||"paint"===a.contain||-1!==["transform","perspective"].indexOf(a.willChange)||t&&"filter"===a.willChange||t&&a.filter&&"none"!==a.filter)return o;o=o.parentNode}return null}(e)||t}var H="top",Y="bottom",z="right",W="left",yt="auto",je=[H,Y,z,W],xe="start",Be="end",It="viewport",ke="popper",Vt=je.reduce(function(e,t){return e.concat([t+"-"+xe,t+"-"+Be])},[]),Nt=[].concat(je,[yt]).reduce(function(e,t){return e.concat([t,t+"-"+xe,t+"-"+Be])},[]),Ur=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function _r(e){var t=new Map,r=new Set,i=[];function o(a){r.add(a.name),[].concat(a.requires||[],a.requiresIfExists||[]).forEach(function(u){if(!r.has(u)){var f=t.get(u);f&&o(f)}}),i.push(a)}return e.forEach(function(a){t.set(a.name,a)}),e.forEach(function(a){r.has(a.name)||o(a)}),i}function Yr(e){var t;return function(){return t||(t=new Promise(function(r){Promise.resolve().then(function(){t=void 0,r(e())})})),t}}var Ft={placement:"bottom",modifiers:[],strategy:"absolute"};function Ht(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return!t.some(function(i){return!(i&&"function"==typeof i.getBoundingClientRect)})}function qr(e){void 0===e&&(e={});var r=e.defaultModifiers,i=void 0===r?[]:r,o=e.defaultOptions,a=void 0===o?Ft:o;return function(u,f,l){void 0===l&&(l=a);var c={placement:"bottom",orderedModifiers:[],options:Object.assign({},Ft,a),modifiersData:{},elements:{reference:u,popper:f},attributes:{},styles:{}},E=[],O=!1,y={state:c,setOptions:function(d){var x="function"==typeof d?d(c.options):d;h(),c.options=Object.assign({},a,c.options,x),c.scrollParents={reference:de(u)?Le(u):u.contextElement?Le(u.contextElement):[],popper:Le(f)};var C=function Xr(e){var t=_r(e);return Ur.reduce(function(r,i){return r.concat(t.filter(function(o){return o.phase===i}))},[])}(function zr(e){var t=e.reduce(function(r,i){var o=r[i.name];return r[i.name]=o?Object.assign({},o,i,{options:Object.assign({},o.options,i.options),data:Object.assign({},o.data,i.data)}):i,r},{});return Object.keys(t).map(function(r){return t[r]})}([].concat(i,c.options.modifiers)));return c.orderedModifiers=C.filter(function(n){return n.enabled}),function w(){c.orderedModifiers.forEach(function(m){var x=m.options,n=m.effect;if("function"==typeof n){var g=n({state:c,name:m.name,instance:y,options:void 0===x?{}:x});E.push(g||function(){})}})}(),y.update()},forceUpdate:function(){if(!O){var d=c.elements,x=d.reference,C=d.popper;if(Ht(x,C)){c.rects={reference:Sr(x,Re(C),"fixed"===c.options.strategy),popper:gt(C)},c.reset=!1,c.placement=c.options.placement,c.orderedModifiers.forEach(function(L){return c.modifiersData[L.name]=Object.assign({},L.data)});for(var n=0;n<c.orderedModifiers.length;n++)if(!0!==c.reset){var g=c.orderedModifiers[n],v=g.fn,A=g.options;"function"==typeof v&&(c=v({state:c,options:void 0===A?{}:A,name:g.name,instance:y})||c)}else c.reset=!1,n=-1}}},update:Yr(function(){return new Promise(function(m){y.forceUpdate(),m(c)})}),destroy:function(){h(),O=!0}};if(!Ht(u,f))return y;function h(){E.forEach(function(m){return m()}),E=[]}return y.setOptions(l).then(function(m){!O&&l.onFirstUpdate&&l.onFirstUpdate(m)}),y}}var qe={passive:!0};function Q(e){return e.split("-")[0]}function Ee(e){return e.split("-")[1]}function bt(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Wt(e){var f,t=e.reference,r=e.element,i=e.placement,o=i?Q(i):null,a=i?Ee(i):null,s=t.x+t.width/2-r.width/2,u=t.y+t.height/2-r.height/2;switch(o){case H:f={x:s,y:t.y-r.height};break;case Y:f={x:s,y:t.y+t.height};break;case z:f={x:t.x+t.width,y:u};break;case W:f={x:t.x-r.width,y:u};break;default:f={x:t.x,y:t.y}}var l=o?bt(o):null;if(null!=l){var c="y"===l?"height":"width";switch(a){case xe:f[l]=f[l]-(t[c]/2-r[c]/2);break;case Be:f[l]=f[l]+(t[c]/2-r[c]/2)}}return f}var Zr={top:"auto",right:"auto",bottom:"auto",left:"auto"};function $t(e){var t,r=e.popper,i=e.popperRect,o=e.placement,a=e.variation,s=e.offsets,u=e.position,f=e.gpuAcceleration,l=e.adaptive,c=e.roundOffsets,E=e.isFixed,O=s.x,y=void 0===O?0:O,w=s.y,h=void 0===w?0:w,m="function"==typeof c?c({x:y,y:h}):{x:y,y:h};y=m.x,h=m.y;var d=s.hasOwnProperty("x"),x=s.hasOwnProperty("y"),C=W,n=H,g=window;if(l){var v=Re(r),A="clientHeight",P="clientWidth";v===U(r)&&"static"!==re(v=se(r)).position&&"absolute"===u&&(A="scrollHeight",P="scrollWidth"),(o===H||(o===W||o===z)&&a===Be)&&(n=Y,h-=(E&&v===g&&g.visualViewport?g.visualViewport.height:v[A])-i.height,h*=f?1:-1),o!==W&&(o!==H&&o!==Y||a!==Be)||(C=z,y-=(E&&v===g&&g.visualViewport?g.visualViewport.width:v[P])-i.width,y*=f?1:-1)}var R,B=Object.assign({position:u},l&&Zr),j=!0===c?function en(e,t){var i=e.y,o=t.devicePixelRatio||1;return{x:we(e.x*o)/o||0,y:we(i*o)/o||0}}({x:y,y:h},U(r)):{x:y,y:h};return y=j.x,h=j.y,Object.assign({},B,f?((R={})[n]=x?"0":"",R[C]=d?"0":"",R.transform=(g.devicePixelRatio||1)<=1?"translate("+y+"px, "+h+"px)":"translate3d("+y+"px, "+h+"px, 0)",R):((t={})[n]=x?h+"px":"",t[C]=d?y+"px":"",t.transform="",t))}const Ut={name:"applyStyles",enabled:!0,phase:"write",fn:function nn(e){var t=e.state;Object.keys(t.elements).forEach(function(r){var i=t.styles[r]||{},o=t.attributes[r]||{},a=t.elements[r];!X(a)||!K(a)||(Object.assign(a.style,i),Object.keys(o).forEach(function(s){var u=o[s];!1===u?a.removeAttribute(s):a.setAttribute(s,!0===u?"":u)}))})},effect:function on(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach(function(i){var o=t.elements[i],a=t.attributes[i]||{},u=Object.keys(t.styles.hasOwnProperty(i)?t.styles[i]:r[i]).reduce(function(f,l){return f[l]="",f},{});!X(o)||!K(o)||(Object.assign(o.style,u),Object.keys(a).forEach(function(f){o.removeAttribute(f)}))})}},requires:["computeStyles"]};var fn={left:"right",right:"left",bottom:"top",top:"bottom"};function Ge(e){return e.replace(/left|right|bottom|top/g,function(t){return fn[t]})}var pn={start:"end",end:"start"};function _t(e){return e.replace(/start|end/g,function(t){return pn[t]})}function Xt(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&<(r)){var i=t;do{if(i&&e.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function wt(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Yt(e,t,r){return t===It?wt(function cn(e,t){var r=U(e),i=se(e),o=r.visualViewport,a=i.clientWidth,s=i.clientHeight,u=0,f=0;if(o){a=o.width,s=o.height;var l=jt();(l||!l&&"fixed"===t)&&(u=o.offsetLeft,f=o.offsetTop)}return{width:a,height:s,x:u+mt(e),y:f}}(e,r)):de(t)?function dn(e,t){var r=Oe(e,!1,"fixed"===t);return r.top=r.top+e.clientTop,r.left=r.left+e.clientLeft,r.bottom=r.top+e.clientHeight,r.right=r.left+e.clientWidth,r.width=e.clientWidth,r.height=e.clientHeight,r.x=r.left,r.y=r.top,r}(t,r):wt(function ln(e){var t,r=se(e),i=vt(e),o=null==(t=e.ownerDocument)?void 0:t.body,a=ve(r.scrollWidth,r.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),s=ve(r.scrollHeight,r.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),u=-i.scrollLeft+mt(e),f=-i.scrollTop;return"rtl"===re(o||r).direction&&(u+=ve(r.clientWidth,o?o.clientWidth:0)-a),{width:a,height:s,x:u,y:f}}(se(e)))}function qt(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function Gt(e,t){return t.reduce(function(r,i){return r[i]=e,r},{})}function Ie(e,t){void 0===t&&(t={});var i=t.placement,o=void 0===i?e.placement:i,a=t.strategy,s=void 0===a?e.strategy:a,u=t.boundary,f=void 0===u?"clippingParents":u,l=t.rootBoundary,c=void 0===l?It:l,E=t.elementContext,O=void 0===E?ke:E,y=t.altBoundary,w=void 0!==y&&y,h=t.padding,m=void 0===h?0:h,d=qt("number"!=typeof m?m:Gt(m,je)),C=e.rects.popper,n=e.elements[w?O===ke?"reference":ke:O],g=function mn(e,t,r,i){var o="clippingParents"===t?function vn(e){var t=Le(ze(e)),i=["absolute","fixed"].indexOf(re(e).position)>=0&&X(e)?Re(e):e;return de(i)?t.filter(function(o){return de(o)&&Xt(o,i)&&"body"!==K(o)}):[]}(e):[].concat(t),a=[].concat(o,[r]),u=a.reduce(function(f,l){var c=Yt(e,l,i);return f.top=ve(c.top,f.top),f.right=Ye(c.right,f.right),f.bottom=Ye(c.bottom,f.bottom),f.left=ve(c.left,f.left),f},Yt(e,a[0],i));return u.width=u.right-u.left,u.height=u.bottom-u.top,u.x=u.left,u.y=u.top,u}(de(n)?n:n.contextElement||se(e.elements.popper),f,c,s),v=Oe(e.elements.reference),A=Wt({reference:v,element:C,strategy:"absolute",placement:o}),P=wt(Object.assign({},C,A)),M=O===ke?P:v,L={top:g.top-M.top+d.top,bottom:M.bottom-g.bottom+d.bottom,left:g.left-M.left+d.left,right:M.right-g.right+d.right},B=e.modifiersData.offset;if(O===ke&&B){var j=B[o];Object.keys(L).forEach(function(R){var I=[z,Y].indexOf(R)>=0?1:-1,_=[H,Y].indexOf(R)>=0?"y":"x";L[R]+=j[_]*I})}return L}function Ve(e,t,r){return ve(e,Ye(t,r))}function Kt(e,t,r){return void 0===r&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function Qt(e){return[H,z,Y,W].some(function(t){return e[t]>=0})}var Mn=qr({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function Gr(e){var t=e.state,r=e.instance,i=e.options,o=i.scroll,a=void 0===o||o,s=i.resize,u=void 0===s||s,f=U(t.elements.popper),l=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&l.forEach(function(c){c.addEventListener("scroll",r.update,qe)}),u&&f.addEventListener("resize",r.update,qe),function(){a&&l.forEach(function(c){c.removeEventListener("scroll",r.update,qe)}),u&&f.removeEventListener("resize",r.update,qe)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function Qr(e){var t=e.state;t.modifiersData[e.name]=Wt({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function tn(e){var t=e.state,r=e.options,i=r.gpuAcceleration,o=void 0===i||i,a=r.adaptive,s=void 0===a||a,u=r.roundOffsets,f=void 0===u||u,l={placement:Q(t.placement),variation:Ee(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,$t(Object.assign({},l,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:f})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,$t(Object.assign({},l,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:f})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},Ut,{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function sn(e){var t=e.state,i=e.name,o=e.options.offset,a=void 0===o?[0,0]:o,s=Nt.reduce(function(c,E){return c[E]=function an(e,t,r){var i=Q(e),o=[W,H].indexOf(i)>=0?-1:1,a="function"==typeof r?r(Object.assign({},t,{placement:e})):r,s=a[0],u=a[1];return s=s||0,u=(u||0)*o,[W,z].indexOf(i)>=0?{x:u,y:s}:{x:s,y:u}}(E,t.rects,a),c},{}),u=s[t.placement],l=u.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=u.x,t.modifiersData.popperOffsets.y+=l),t.modifiersData[i]=s}},{name:"flip",enabled:!0,phase:"main",fn:function yn(e){var t=e.state,r=e.options,i=e.name;if(!t.modifiersData[i]._skip){for(var o=r.mainAxis,a=void 0===o||o,s=r.altAxis,u=void 0===s||s,f=r.fallbackPlacements,l=r.padding,c=r.boundary,E=r.rootBoundary,O=r.altBoundary,y=r.flipVariations,w=void 0===y||y,h=r.allowedAutoPlacements,m=t.options.placement,d=Q(m),C=f||(d!==m&&w?function gn(e){if(Q(e)===yt)return[];var t=Ge(e);return[_t(e),t,_t(t)]}(m):[Ge(m)]),n=[m].concat(C).reduce(function(ne,G){return ne.concat(Q(G)===yt?function hn(e,t){void 0===t&&(t={});var o=t.boundary,a=t.rootBoundary,s=t.padding,u=t.flipVariations,f=t.allowedAutoPlacements,l=void 0===f?Nt:f,c=Ee(t.placement),E=c?u?Vt:Vt.filter(function(w){return Ee(w)===c}):je,O=E.filter(function(w){return l.indexOf(w)>=0});0===O.length&&(O=E);var y=O.reduce(function(w,h){return w[h]=Ie(e,{placement:h,boundary:o,rootBoundary:a,padding:s})[Q(h)],w},{});return Object.keys(y).sort(function(w,h){return y[w]-y[h]})}(t,{placement:G,boundary:c,rootBoundary:E,padding:l,flipVariations:w,allowedAutoPlacements:h}):G)},[]),g=t.rects.reference,v=t.rects.popper,A=new Map,P=!0,M=n[0],L=0;L<n.length;L++){var B=n[L],j=Q(B),R=Ee(B)===xe,I=[H,Y].indexOf(j)>=0,_=I?"width":"height",V=Ie(t,{placement:B,boundary:c,rootBoundary:E,altBoundary:O,padding:l}),N=I?R?z:W:R?Y:H;g[_]>v[_]&&(N=Ge(N));var k=Ge(N),Z=[];if(a&&Z.push(V[j]<=0),u&&Z.push(V[N]<=0,V[k]<=0),Z.every(function(ne){return ne})){M=B,P=!1;break}A.set(B,Z)}if(P)for(var he=function(G){var ie=n.find(function(Ce){var oe=A.get(Ce);if(oe)return oe.slice(0,G).every(function(Ae){return Ae})});if(ie)return M=ie,"break"},te=w?3:1;te>0&&"break"!==he(te);te--);t.placement!==M&&(t.modifiersData[i]._skip=!0,t.placement=M,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function xn(e){var t=e.state,r=e.options,i=e.name,o=r.mainAxis,a=void 0===o||o,s=r.altAxis,u=void 0!==s&&s,O=r.tether,y=void 0===O||O,w=r.tetherOffset,h=void 0===w?0:w,m=Ie(t,{boundary:r.boundary,rootBoundary:r.rootBoundary,padding:r.padding,altBoundary:r.altBoundary}),d=Q(t.placement),x=Ee(t.placement),C=!x,n=bt(d),g=function wn(e){return"x"===e?"y":"x"}(n),v=t.modifiersData.popperOffsets,A=t.rects.reference,P=t.rects.popper,M="function"==typeof h?h(Object.assign({},t.rects,{placement:t.placement})):h,L="number"==typeof M?{mainAxis:M,altAxis:M}:Object.assign({mainAxis:0,altAxis:0},M),B=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,j={x:0,y:0};if(v){if(a){var R,I="y"===n?H:W,_="y"===n?Y:z,V="y"===n?"height":"width",N=v[n],k=N+m[I],Z=N-m[_],ee=y?-P[V]/2:0,he=x===xe?A[V]:P[V],te=x===xe?-P[V]:-A[V],ge=t.elements.arrow,ne=y&&ge?gt(ge):{width:0,height:0},G=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},ie=G[I],Ce=G[_],oe=Ve(0,A[V],ne[V]),Ae=C?A[V]/2-ee-oe-ie-L.mainAxis:he-oe-ie-L.mainAxis,ce=C?-A[V]/2+ee+oe+Ce+L.mainAxis:te+oe+Ce+L.mainAxis,De=t.elements.arrow&&Re(t.elements.arrow),tt=De?"y"===n?De.clientTop||0:De.clientLeft||0:0,He=null!=(R=B?.[n])?R:0,nt=N+ce-He,We=Ve(y?Ye(k,N+Ae-He-tt):k,N,y?ve(Z,nt):Z);v[n]=We,j[n]=We-N}if(u){var $e,ae=v[g],le="y"===g?"height":"width",Ue=ae+m["x"===n?H:W],ye=ae-m["x"===n?Y:z],_e=-1!==[H,W].indexOf(d),at=null!=($e=B?.[g])?$e:0,st=_e?Ue:ae-A[le]-P[le]-at+L.altAxis,ut=_e?ae+A[le]+P[le]-at-L.altAxis:ye,ft=y&&_e?function On(e,t,r){var i=Ve(e,t,r);return i>r?r:i}(st,ae,ut):Ve(y?st:Ue,ae,y?ut:ye);v[g]=ft,j[g]=ft-ae}t.modifiersData[i]=j}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function Cn(e){var t,r=e.state,i=e.name,o=e.options,a=r.elements.arrow,s=r.modifiersData.popperOffsets,u=Q(r.placement),f=bt(u),c=[W,z].indexOf(u)>=0?"height":"width";if(a&&s){var E=function(t,r){return qt("number"!=typeof(t="function"==typeof t?t(Object.assign({},r.rects,{placement:r.placement})):t)?t:Gt(t,je))}(o.padding,r),O=gt(a),y="y"===f?H:W,w="y"===f?Y:z,h=r.rects.reference[c]+r.rects.reference[f]-s[f]-r.rects.popper[c],m=s[f]-r.rects.reference[f],d=Re(a),x=d?"y"===f?d.clientHeight||0:d.clientWidth||0:0,v=x/2-O[c]/2+(h/2-m/2),A=Ve(E[y],v,x-O[c]-E[w]);r.modifiersData[i]=((t={})[f]=A,t.centerOffset=A-v,t)}},effect:function An(e){var t=e.state,i=e.options.element,o=void 0===i?"[data-popper-arrow]":i;null!=o&&("string"==typeof o&&!(o=t.elements.popper.querySelector(o))||Xt(t.elements.popper,o)&&(t.elements.arrow=o))},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function Pn(e){var t=e.state,r=e.name,i=t.rects.reference,o=t.rects.popper,a=t.modifiersData.preventOverflow,s=Ie(t,{elementContext:"reference"}),u=Ie(t,{altBoundary:!0}),f=Kt(s,i),l=Kt(u,o,a),c=Qt(f),E=Qt(l);t.modifiersData[r]={referenceClippingOffsets:f,popperEscapeOffsets:l,isReferenceHidden:c,hasPopperEscaped:E},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":E})}}]}),Jt="tippy-content",er="tippy-arrow",tr="tippy-svg-arrow",ue={passive:!0,capture:!0},rr=function(){return document.body};function Ot(e,t,r){return Array.isArray(e)?e[t]??(Array.isArray(r)?r[t]:r):e}function xt(e,t){var r={}.toString.call(e);return 0===r.indexOf("[object")&&r.indexOf(t+"]")>-1}function nr(e,t){return"function"==typeof e?e.apply(void 0,t):e}function ir(e,t){return 0===t?e:function(i){clearTimeout(r),r=setTimeout(function(){e(i)},t)};var r}function fe(e){return[].concat(e)}function or(e,t){-1===e.indexOf(t)&&e.push(t)}function Te(e){return[].slice.call(e)}function sr(e){return Object.keys(e).reduce(function(t,r){return void 0!==e[r]&&(t[r]=e[r]),t},{})}function me(){return document.createElement("div")}function Ke(e){return["Element","Fragment"].some(function(t){return xt(e,t)})}function Ct(e,t){e.forEach(function(r){r&&(r.style.transitionDuration=t+"ms")})}function Ne(e,t){e.forEach(function(r){r&&r.setAttribute("data-state",t)})}function At(e,t,r){var i=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(o){e[i](o,r)})}function pr(e,t){for(var r=t;r;){var i;if(e.contains(r))return!0;r=null==r.getRootNode||null==(i=r.getRootNode())?void 0:i.host}return!1}var J={isTouch:!1},cr=0;function Nn(){J.isTouch||(J.isTouch=!0,window.performance&&document.addEventListener("mousemove",lr))}function lr(){var e=performance.now();e-cr<20&&(J.isTouch=!1,document.removeEventListener("mousemove",lr)),cr=e}function Fn(){var e=document.activeElement;(function ur(e){return!(!e||!e._tippy||e._tippy.reference!==e)})(e)&&e.blur&&!e._tippy.state.isVisible&&e.blur()}var $n=!!(typeof window<"u"&&typeof document<"u")&&!!window.msCrypto,$=Object.assign({appendTo:rr,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},{animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),Yn=Object.keys($);function gr(e){var r=(e.plugins||[]).reduce(function(i,o){var u,a=o.name;return a&&(i[a]=void 0!==e[a]?e[a]:null!=(u=$[a])?u:o.defaultValue),i},{});return Object.assign({},e,r)}function yr(e,t){var r=Object.assign({},t,{content:nr(t.content,[e])},t.ignoreAttributes?{}:function qn(e,t){return(t?Object.keys(gr(Object.assign({},$,{plugins:t}))):Yn).reduce(function(o,a){var s=(e.getAttribute("data-tippy-"+a)||"").trim();if(!s)return o;if("content"===a)o[a]=s;else try{o[a]=JSON.parse(s)}catch{o[a]=s}return o},{})}(e,t.plugins));return r.aria=Object.assign({},$.aria,r.aria),r.aria={expanded:"auto"===r.aria.expanded?t.interactive:r.aria.expanded,content:"auto"===r.aria.content?t.interactive?null:"describedby":r.aria.content},r}function Dt(e,t){e.innerHTML=t}function br(e){var t=me();return!0===e?t.className=er:(t.className=tr,Ke(e)?t.appendChild(e):Dt(t,e)),t}function wr(e,t){Ke(t.content)?(Dt(e,""),e.appendChild(t.content)):"function"!=typeof t.content&&(t.allowHTML?Dt(e,t.content):e.textContent=t.content)}function Qe(e){var t=e.firstElementChild,r=Te(t.children);return{box:t,content:r.find(function(i){return i.classList.contains(Jt)}),arrow:r.find(function(i){return i.classList.contains(er)||i.classList.contains(tr)}),backdrop:r.find(function(i){return i.classList.contains("tippy-backdrop")})}}function Or(e){var t=me(),r=me();r.className="tippy-box",r.setAttribute("data-state","hidden"),r.setAttribute("tabindex","-1");var i=me();function o(a,s){var u=Qe(t),f=u.box,l=u.content,c=u.arrow;s.theme?f.setAttribute("data-theme",s.theme):f.removeAttribute("data-theme"),"string"==typeof s.animation?f.setAttribute("data-animation",s.animation):f.removeAttribute("data-animation"),s.inertia?f.setAttribute("data-inertia",""):f.removeAttribute("data-inertia"),f.style.maxWidth="number"==typeof s.maxWidth?s.maxWidth+"px":s.maxWidth,s.role?f.setAttribute("role",s.role):f.removeAttribute("role"),(a.content!==s.content||a.allowHTML!==s.allowHTML)&&wr(l,e.props),s.arrow?c?a.arrow!==s.arrow&&(f.removeChild(c),f.appendChild(br(s.arrow))):f.appendChild(br(s.arrow)):c&&f.removeChild(c)}return i.className=Jt,i.setAttribute("data-state","hidden"),wr(i,e.props),t.appendChild(r),r.appendChild(i),o(e.props,e.props),{popper:t,onUpdate:o}}Or.$$tippy=!0;var Kn=1,Je=[],Ze=[];function Qn(e,t){var i,o,a,c,E,O,h,r=yr(e,Object.assign({},$,gr(sr(t)))),s=!1,u=!1,f=!1,l=!1,y=[],w=ir(rt,r.interactiveDebounce),m=Kn++,x=function Bn(e){return e.filter(function(t,r){return e.indexOf(t)===r})}(r.plugins),n={id:m,reference:e,popper:me(),popperInstance:null,props:r,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:x,clearDelayTimeouts:function st(){clearTimeout(i),clearTimeout(o),cancelAnimationFrame(a)},setProps:function ut(p){if(!n.state.isDestroyed){k("onBeforeUpdate",[n,p]),tt();var b=n.props,T=yr(e,Object.assign({},b,sr(p),{ignoreAttributes:!0}));n.props=T,De(),b.interactiveDebounce!==T.interactiveDebounce&&(he(),w=ir(rt,T.interactiveDebounce)),b.triggerTarget&&!T.triggerTarget?fe(b.triggerTarget).forEach(function(S){S.removeAttribute("aria-expanded")}):T.triggerTarget&&e.removeAttribute("aria-expanded"),ee(),N(),A&&A(b,T),n.popperInstance&&(it(),le().forEach(function(S){requestAnimationFrame(S._tippy.popperInstance.forceUpdate)})),k("onAfterUpdate",[n,p])}},setContent:function ft(p){n.setProps({content:p})},show:function si(){var p=n.state.isVisible,b=n.state.isDestroyed,T=!n.state.isEnabled,S=J.isTouch&&!n.props.touch,D=Ot(n.props.duration,0,$.duration);if(!(p||b||T||S||R().hasAttribute("disabled")||(k("onShow",[n],!1),!1===n.props.onShow(n)))){if(n.state.isVisible=!0,j()&&(v.style.visibility="visible"),N(),G(),n.state.isMounted||(v.style.transition="none"),j()){var F=_();Ct([F.box,F.content],0)}O=function(){var be;if(n.state.isVisible&&!l){if(l=!0,v.style.transition=n.props.moveTransition,j()&&n.props.animation){var St=_(),pt=St.box,Se=St.content;Ct([pt,Se],D),Ne([pt,Se],"visible")}Z(),ee(),or(Ze,n),null==(be=n.popperInstance)||be.forceUpdate(),k("onMount",[n]),n.props.animation&&j()&&function oe(p,b){Ae(p,b)}(D,function(){n.state.isShown=!0,k("onShown",[n])})}},function ae(){var b,p=n.props.appendTo,T=R();(b=n.props.interactive&&p===rr||"parent"===p?T.parentNode:nr(p,[T])).contains(v)||b.appendChild(v),n.state.isMounted=!0,it()}()}},hide:function ui(){var p=!n.state.isVisible,b=n.state.isDestroyed,T=!n.state.isEnabled,S=Ot(n.props.duration,1,$.duration);if(!(p||b||T)&&(k("onHide",[n],!1),!1!==n.props.onHide(n))){if(n.state.isVisible=!1,n.state.isShown=!1,l=!1,s=!1,j()&&(v.style.visibility="hidden"),he(),ie(),N(!0),j()){var D=_(),F=D.box,q=D.content;n.props.animation&&(Ct([F,q],S),Ne([F,q],"hidden"))}Z(),ee(),n.props.animation?j()&&function Ce(p,b){Ae(p,function(){!n.state.isVisible&&v.parentNode&&v.parentNode.contains(v)&&b()})}(S,n.unmount):n.unmount()}},hideWithInteractivity:function fi(p){I().addEventListener("mousemove",w),or(Je,w),w(p)},enable:function _e(){n.state.isEnabled=!0},disable:function at(){n.hide(),n.state.isEnabled=!1},unmount:function pi(){n.state.isVisible&&n.hide(),n.state.isMounted&&(ot(),le().forEach(function(p){p._tippy.unmount()}),v.parentNode&&v.parentNode.removeChild(v),Ze=Ze.filter(function(p){return p!==n}),n.state.isMounted=!1,k("onHidden",[n]))},destroy:function ci(){n.state.isDestroyed||(n.clearDelayTimeouts(),n.unmount(),tt(),delete e._tippy,n.state.isDestroyed=!0,k("onDestroy",[n]))}};if(!r.render)return n;var g=r.render(n),v=g.popper,A=g.onUpdate;v.setAttribute("data-tippy-root",""),v.id="tippy-"+n.id,n.popper=v,e._tippy=n,v._tippy=n;var P=x.map(function(p){return p.fn(n)}),M=e.hasAttribute("aria-expanded");return De(),ee(),N(),k("onCreate",[n]),r.showOnCreate&&Ue(),v.addEventListener("mouseenter",function(){n.props.interactive&&n.state.isVisible&&n.clearDelayTimeouts()}),v.addEventListener("mouseleave",function(){n.props.interactive&&n.props.trigger.indexOf("mouseenter")>=0&&I().addEventListener("mousemove",w)}),n;function L(){var p=n.props.touch;return Array.isArray(p)?p:[p,0]}function B(){return"hold"===L()[0]}function j(){var p;return!(null==(p=n.props.render)||!p.$$tippy)}function R(){return h||e}function I(){var p=R().parentNode;return p?function fr(e){var t,i=fe(e)[0];return null!=i&&null!=(t=i.ownerDocument)&&t.body?i.ownerDocument:document}(p):document}function _(){return Qe(v)}function V(p){return n.state.isMounted&&!n.state.isVisible||J.isTouch||c&&"focus"===c.type?0:Ot(n.props.delay,p?0:1,$.delay)}function N(p){void 0===p&&(p=!1),v.style.pointerEvents=n.props.interactive&&!p?"":"none",v.style.zIndex=""+n.props.zIndex}function k(p,b,T){var S;void 0===T&&(T=!0),P.forEach(function(D){D[p]&&D[p].apply(D,b)}),T&&(S=n.props)[p].apply(S,b)}function Z(){var p=n.props.aria;if(p.content){var b="aria-"+p.content,T=v.id;fe(n.props.triggerTarget||e).forEach(function(D){var F=D.getAttribute(b);if(n.state.isVisible)D.setAttribute(b,F?F+" "+T:T);else{var q=F&&F.replace(T,"").trim();q?D.setAttribute(b,q):D.removeAttribute(b)}})}}function ee(){!M&&n.props.aria.expanded&&fe(n.props.triggerTarget||e).forEach(function(b){n.props.interactive?b.setAttribute("aria-expanded",n.state.isVisible&&b===R()?"true":"false"):b.removeAttribute("aria-expanded")})}function he(){I().removeEventListener("mousemove",w),Je=Je.filter(function(p){return p!==w})}function te(p){if(!J.isTouch||!f&&"mousedown"!==p.type){var b=p.composedPath&&p.composedPath()[0]||p.target;if(!n.props.interactive||!pr(v,b)){if(fe(n.props.triggerTarget||e).some(function(T){return pr(T,b)})){if(J.isTouch||n.state.isVisible&&n.props.trigger.indexOf("click")>=0)return}else k("onClickOutside",[n,p]);!0===n.props.hideOnClick&&(n.clearDelayTimeouts(),n.hide(),u=!0,setTimeout(function(){u=!1}),n.state.isMounted||ie())}}}function ge(){f=!0}function ne(){f=!1}function G(){var p=I();p.addEventListener("mousedown",te,!0),p.addEventListener("touchend",te,ue),p.addEventListener("touchstart",ne,ue),p.addEventListener("touchmove",ge,ue)}function ie(){var p=I();p.removeEventListener("mousedown",te,!0),p.removeEventListener("touchend",te,ue),p.removeEventListener("touchstart",ne,ue),p.removeEventListener("touchmove",ge,ue)}function Ae(p,b){var T=_().box;function S(D){D.target===T&&(At(T,"remove",S),b())}if(0===p)return b();At(T,"remove",E),At(T,"add",S),E=S}function ce(p,b,T){void 0===T&&(T=!1),fe(n.props.triggerTarget||e).forEach(function(D){D.addEventListener(p,b,T),y.push({node:D,eventType:p,handler:b,options:T})})}function De(){B()&&(ce("touchstart",He,{passive:!0}),ce("touchend",nt,{passive:!0})),function jn(e){return e.split(/\s+/).filter(Boolean)}(n.props.trigger).forEach(function(p){if("manual"!==p)switch(ce(p,He),p){case"mouseenter":ce("mouseleave",nt);break;case"focus":ce($n?"focusout":"blur",We);break;case"focusin":ce("focusout",We)}})}function tt(){y.forEach(function(p){p.node.removeEventListener(p.eventType,p.handler,p.options)}),y=[]}function He(p){var b,T=!1;if(n.state.isEnabled&&!$e(p)&&!u){var S="focus"===(null==(b=c)?void 0:b.type);c=p,h=p.currentTarget,ee(),!n.state.isVisible&&function Tt(e){return xt(e,"MouseEvent")}(p)&&Je.forEach(function(D){return D(p)}),"click"===p.type&&(n.props.trigger.indexOf("mouseenter")<0||s)&&!1!==n.props.hideOnClick&&n.state.isVisible?T=!0:Ue(p),"click"===p.type&&(s=!T),T&&!S&&ye(p)}}function rt(p){var b=p.target,T=R().contains(b)||v.contains(b);"mousemove"===p.type&&T||function Vn(e,t){var r=t.clientX,i=t.clientY;return e.every(function(o){var a=o.popperRect,s=o.popperState,f=o.props.interactiveBorder,l=function ar(e){return e.split("-")[0]}(s.placement),c=s.modifiersData.offset;return!c||a.top-i+("bottom"===l?c.top.y:0)>f||i-a.bottom-("top"===l?c.bottom.y:0)>f||a.left-r+("right"===l?c.left.x:0)>f||r-a.right-("left"===l?c.right.x:0)>f})}(le().concat(v).map(function(D){var F,Pe=null==(F=D._tippy.popperInstance)?void 0:F.state;return Pe?{popperRect:D.getBoundingClientRect(),popperState:Pe,props:r}:null}).filter(Boolean),p)&&(he(),ye(p))}function nt(p){if(!($e(p)||n.props.trigger.indexOf("click")>=0&&s)){if(n.props.interactive)return void n.hideWithInteractivity(p);ye(p)}}function We(p){n.props.trigger.indexOf("focusin")<0&&p.target!==R()||n.props.interactive&&p.relatedTarget&&v.contains(p.relatedTarget)||ye(p)}function $e(p){return!!J.isTouch&&B()!==p.type.indexOf("touch")>=0}function it(){ot();var p=n.props,b=p.popperOptions,T=p.placement,S=p.offset,D=p.getReferenceClientRect,F=p.moveTransition,q=j()?Qe(v).arrow:null,Pe=D?{getBoundingClientRect:D,contextElement:D.contextElement||R()}:e,be=[{name:"offset",options:{offset:S}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!F}},{name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(pt){var Se=pt.state;if(j()){var Mt=_().box;["placement","reference-hidden","escaped"].forEach(function(ct){"placement"===ct?Mt.setAttribute("data-placement",Se.placement):Se.attributes.popper["data-popper-"+ct]?Mt.setAttribute("data-"+ct,""):Mt.removeAttribute("data-"+ct)}),Se.attributes.popper={}}}}];j()&&q&&be.push({name:"arrow",options:{element:q,padding:3}}),be.push.apply(be,b?.modifiers||[]),n.popperInstance=Mn(Pe,v,Object.assign({},b,{placement:T,onFirstUpdate:O,modifiers:be}))}function ot(){n.popperInstance&&(n.popperInstance.destroy(),n.popperInstance=null)}function le(){return Te(v.querySelectorAll("[data-tippy-root]"))}function Ue(p){n.clearDelayTimeouts(),p&&k("onTrigger",[n,p]),G();var b=V(!0),T=L(),D=T[1];J.isTouch&&"hold"===T[0]&&D&&(b=D),b?i=setTimeout(function(){n.show()},b):n.show()}function ye(p){if(n.clearDelayTimeouts(),k("onUntrigger",[n,p]),n.state.isVisible){if(!(n.props.trigger.indexOf("mouseenter")>=0&&n.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(p.type)>=0&&s)){var b=V(!1);b?o=setTimeout(function(){n.state.isVisible&&n.hide()},b):a=requestAnimationFrame(function(){n.hide()})}}else ie()}}function pe(e,t){void 0===t&&(t={});var r=$.plugins.concat(t.plugins||[]);!function Hn(){document.addEventListener("touchstart",Nn,ue),window.addEventListener("blur",Fn)}();var i=Object.assign({},t,{plugins:r}),u=function In(e){return Ke(e)?[e]:function kn(e){return xt(e,"NodeList")}(e)?Te(e):Array.isArray(e)?e:Te(document.querySelectorAll(e))}(e).reduce(function(f,l){var c=l&&Qn(l,i);return c&&f.push(c),f},[]);return Ke(e)?u[0]:u}pe.defaultProps=$,pe.setDefaultProps=function(t){Object.keys(t).forEach(function(i){$[i]=t[i]})},pe.currentInput=J,Object.assign({},Ut,{effect:function(t){var r=t.state,i={popper:{position:r.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(r.elements.popper.style,i.popper),r.styles=i,r.elements.arrow&&Object.assign(r.elements.arrow.style,i.arrow)}}),pe.setDefaultProps({render:Or});const oi=pe;let ai=(()=>{class e{_el=(0,Lt.WQX)(Rt.aKT);cueTooltip=Me.hFB.required();tooltipPlacement=(0,Me.hFB)(void 0);tooltipFlip=(0,Me.hFB)(!0);tooltipColor=(0,Me.hFB)("primary");tooltipSize=(0,Me.hFB)("medium");static _styleAppended=!1;_tippyInstance;constructor(){(0,Lt.QZP)(()=>{const r=this.cueTooltip(),i=this.tooltipPlacement(),o=this.tooltipFlip();this._tippyInstance&&(this._tippyInstance.destroy(),this._tippyInstance=void 0),r&&(this._tippyInstance=oi(this._el.nativeElement,{content:r,placement:i,animation:"shift-away",theme:"cue",appendTo:()=>this._el.nativeElement.closest("dialog")||document.body,popperOptions:o?{}:{modifiers:[{name:"flip",enabled:!1}]}}))})}ngOnDestroy(){this._tippyInstance&&this._tippyInstance.destroy()}static \u0275fac=function(i){return new(i||e)};static \u0275dir=Rt.FsC({type:e,selectors:[["","cueTooltip",""]],inputs:{cueTooltip:[1,"cueTooltip"],tooltipPlacement:[1,"tooltipPlacement"],tooltipFlip:[1,"tooltipFlip"],tooltipColor:[1,"tooltipColor"],tooltipSize:[1,"tooltipSize"]}})}return e})()}}]);
|
package/7154.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[2014,7154],{5448(I,x,r){r.d(x,{ButtonLabel:()=>e});var u=r(7705),c=r(2245),o=r(5547);const b=["*"];let e=(()=>{class l{fontSize=(0,u.hFB)("m");italic=(0,u.hFB)(!1);noWrap=(0,u.hFB)(!0);static \u0275fac=function(y){return new(y||l)};static \u0275cmp=o.VBU({type:l,selectors:[["cue-button-label"]],inputs:{fontSize:[1,"fontSize"],italic:[1,"italic"],noWrap:[1,"noWrap"]},ngContentSelectors:b,decls:3,vars:3,consts:[[3,"size","italic","noWrap"]],template:function(y,R){1&y&&(o.NAR(),o.j41(0,"div")(1,"cue-typography",0),o.SdG(2),o.k0s()()),2&y&&(o.R7$(),o.Y8G("size",R.fontSize())("italic",R.italic())("noWrap",R.noWrap()))},dependencies:[c.Typography],styles:["div[_ngcontent-%COMP%]{transform:translateY(.05em)}"]})}return l})()},2014(I,x,r){r.d(x,{ButtonPadder:()=>e});var u=r(7705),c=r(2271),o=r(5547);const b=["*"];let e=(()=>{class l{justify=(0,u.hFB)("start");size=(0,u.hFB)("l");widthStyle=(0,c.EW)(()=>`var(--cue-button-label-padding-${this.size()}-x)`);static \u0275fac=function(y){return new(y||l)};static \u0275cmp=o.VBU({type:l,selectors:[["cue-button-padder"]],inputs:{justify:[1,"justify"],size:[1,"size"]},ngContentSelectors:b,decls:2,vars:4,template:function(y,R){1&y&&(o.NAR(),o.rj2(0,"div"),o.SdG(1),o.eux()),2&y&&o.xc7("justify-content",R.justify())("min-width",R.widthStyle())},styles:["div[_ngcontent-%COMP%]{display:flex;align-items:center;min-height:1px}"]})}return l})()},7517(I,x,r){r.d(x,{P:()=>T});var u=r(7705),c=r(2271),o=r(2245),b=r(1359),e=r(5381),l=r(5547),s=r(5802);const _=(v,f)=>f.category;function y(v,f){if(1&v){const d=l.RV6();l.j41(0,"cue-flexcontainer",1)(1,"cue-checkbox",2),l.bIt("checkedChange",function(){s.eBV(d);const h=l.XpG();return s.Njj(h.toggleAll())}),l.k0s()()}if(2&v){const d=l.XpG();l.R7$(),l.Y8G("checked",d.allVisible())}}function R(v,f){if(1&v&&(l.j41(0,"cue-typography",3),l.EFF(1),l.k0s()),2&v){const d=l.XpG().$implicit;l.R7$(),l.JRh(d.category)}}function V(v,f){if(1&v){const d=l.RV6();l.j41(0,"cue-flexcontainer",1)(1,"cue-checkbox",4),l.bIt("checkedChange",function(){const h=s.eBV(d).$implicit,C=l.XpG(2);return s.Njj(C.toggleSingle(h))}),l.k0s(),l.j41(2,"cue-typography",5),l.bIt("click",function(){const h=s.eBV(d).$implicit,C=l.XpG(2);return s.Njj(C.toggleSingle(h))}),l.EFF(3),l.k0s()()}if(2&v){const d=f.$implicit;l.R7$(),l.Y8G("checked",d.visible)("color",d.color),l.R7$(2),l.JRh(d.label)}}function M(v,f){if(1&v&&(l.nVh(0,R,2,1,"cue-typography",3),l.Z7z(1,V,4,3,"cue-flexcontainer",1,l.Vm6)),2&v){const d=f.$implicit;l.vxM(d.category?0:-1),l.R7$(),l.Dyx(d.items)}}let T=(()=>{class v{layers=(0,u.geq)([]);visibilityChange=(0,u.CGW)();layerChange=(0,u.CGW)();visibilityAll=(0,u.CGW)();showCheckAll=(0,c.EW)(()=>this.layers().length>1);allVisible=(0,c.EW)(()=>this.layers().every(d=>d.visible));groupedLayers=(0,c.EW)(()=>{const d=[];for(const m of this.layers()){const h=m.category,C=d.find(E=>E.category===h);C?C.items.push(m):d.push({category:h,items:[m]})}return d});toggleAll(){const d=this.allVisible(),m=this.layers().map(h=>(h.visible=!d,h));this.layers.update(()=>[...m]),this.visibilityAll.emit(d),this.emitChange()}toggleSingle(d){d.visible=!d.visible,this.layerChange.emit(d),this.layers.update(()=>[...this.layers()]),this.emitChange()}emitChange(){this.visibilityChange.emit(this.layers())}static \u0275fac=function(m){return new(m||v)};static \u0275cmp=l.VBU({type:v,selectors:[["cue-layer-legend"]],inputs:{layers:[1,"layers"]},outputs:{layers:"layersChange",visibilityChange:"visibilityChange",layerChange:"layerChange",visibilityAll:"visibilityAll"},decls:4,vars:1,consts:[["direction","column"],["align","center","justify","start",2,"width","100%"],["size","s",3,"checkedChange","checked"],["variant","label",2,"margin-top","4px","opacity","0.6"],["size","s",3,"checkedChange","checked","color"],[2,"cursor","pointer",3,"click"]],template:function(m,h){1&m&&(l.j41(0,"cue-flexcontainer",0),l.nVh(1,y,2,1,"cue-flexcontainer",1),l.Z7z(2,M,3,1,null,null,_),l.k0s()),2&m&&(l.R7$(),l.vxM(h.showCheckAll()?1:-1),l.R7$(),l.Dyx(h.groupedLayers()))},dependencies:[e.FlexContainer,o.Typography,b.Checkbox],encapsulation:2,changeDetection:0})}return v})()},8334(I,x,r){r.d(x,{o:()=>b});var u=r(7705),c=r(5547);const o=["*"];let b=(()=>{class e{label=u.hFB.required();active=(0,u.geq)(!1);static \u0275fac=function(_){return new(_||e)};static \u0275cmp=c.VBU({type:e,selectors:[["cue-tab"]],hostVars:1,hostBindings:function(_,y){2&_&&c.Avn("hidden",!y.active())},inputs:{label:[1,"label"],active:[1,"active"]},outputs:{active:"activeChange"},ngContentSelectors:o,decls:1,vars:0,template:function(_,y){1&_&&(c.NAR(),c.SdG(0))},styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;flex:1;min-height:0}[hidden][_nghost-%COMP%]{display:none!important}"]})}return e})()},6455(I,x,r){r.d(x,{t:()=>v});var u=r(7705),c=r(5802),o=r(2271),b=r(8334),e=r(5187),l=r(9769),s=r(5547);const _=["*"],y=(f,d)=>d.label();function R(f,d){if(1&f&&(s.j41(0,"cue-card",1),s.eu8(1,2),s.k0s()),2&f){const m=s.XpG(),h=s.sdS(3);s.Y8G("variant",m._cardVariant())("padded",!1),s.R7$(),s.Y8G("ngTemplateOutlet",h)}}function V(f,d){if(1&f&&s.eu8(0,2),2&f){s.XpG();const m=s.sdS(3);s.Y8G("ngTemplateOutlet",m)}}function M(f,d){if(1&f){const m=s.RV6();s.j41(0,"button",6),s.bIt("click",function(){const C=c.eBV(m).$index,E=s.XpG(2);return c.Njj(E.setActive(C))}),s.EFF(1),s.k0s()}if(2&f){const m=d.$implicit,h=d.$index,C=s.XpG(2);s.AVh("active",C.activeIndex()===h),s.R7$(),s.SpI(" ",m.label()," ")}}function T(f,d){if(1&f&&(s.j41(0,"div",3),s.Z7z(1,M,2,3,"button",4,y),s.k0s(),s.j41(3,"div",5),s.SdG(4),s.k0s()),2&f){const m=s.XpG();s.R7$(),s.Dyx(m.tabs())}}let v=(()=>{class f{tabs=(0,u.tEk)(b.o);activeIndex=(0,c.vPA)(0);variant=(0,u.hFB)("none");_cardVariant=(0,o.EW)(()=>"none"===this.variant()?"default":this.variant());constructor(){(0,c.QZP)(()=>{const m=this.tabs(),h=this.activeIndex();m.forEach((C,E)=>C.active.set(E===h))})}setActive(m){this.activeIndex.set(m)}static \u0275fac=function(h){return new(h||f)};static \u0275cmp=s.VBU({type:f,selectors:[["cue-tabs"]],contentQueries:function(h,C,E){1&h&&s.C6U(E,C.tabs,b.o,4),2&h&&s.NyB()},inputs:{variant:[1,"variant"]},ngContentSelectors:_,decls:4,vars:1,consts:[["inner",""],[2,"height","100%","width","100%","display","flex","flex-direction","column","overflow","hidden",3,"variant","padded"],[3,"ngTemplateOutlet"],[1,"tabs-header"],[1,"tab-button",3,"active"],[1,"tabs-content"],[1,"tab-button",3,"click"]],template:function(h,C){1&h&&(s.NAR(),s.nVh(0,R,2,3,"cue-card",1)(1,V,1,1,"ng-container",2),s.DNE(2,T,5,0,"ng-template",null,0,s.C5r)),2&h&&s.vxM("none"!==C.variant()?0:1)},dependencies:[e.Card,l.T3],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;box-sizing:border-box;border-radius:var(--cue-card-border-radius);border:1px solid var(--cue-card-border-color);background-color:var(--cue-default);color:var(--cue-defaultContrast);overflow:hidden}.tabs-header[_ngcontent-%COMP%]{display:flex;border-bottom:1px solid var(--cue-card-border-color);background-color:var(--background-color, var(--cue-default))}.tab-button[_ngcontent-%COMP%]{padding:10px 16px;background:none;border:none;border-bottom:2px solid transparent;cursor:pointer;color:inherit;font-family:var(--cue-font-family);font-size:var(--cue-font-s-size);line-height:var(--cue-font-s-line-height);opacity:.6;transition:opacity .15s,border-bottom-color .15s}.tab-button[_ngcontent-%COMP%]:hover{opacity:.9}.tab-button.active[_ngcontent-%COMP%]{border-bottom-color:currentColor;opacity:1;font-weight:500}.tabs-content[_ngcontent-%COMP%]{padding:var(--cue-card-padding-y) var(--cue-card-padding-x);flex:1;min-height:0;box-sizing:border-box;display:flex;flex-direction:column}"]})}return f})()},6463(I,x,r){r.d(x,{CueSparqlClientSdk:()=>Fe});var u=r(7705),c=r(2271),o=r(5802),b=r(467),e=r(5547),l=r(6019),s=r(7089),_=r(7717),y=r(5661),R=r(1096),V=r(9937),M=r(6117),T=r(356),v=r(6279),f=r(992);let d=(()=>{class n{value=(0,o.vPA)("");agInit(t){const a=t.colDef?.cellRendererParams?.prefixes??{};this.value.set(this._prefixIRI(t?.value||"",a))}refresh(t){return this.value.set(t?.value||""),!0}_prefixIRI(t,a){if("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"===t)return"a";if(void 0===a)return t;const i=Object.keys(a).find(g=>t.includes(a[g]));return void 0!==i?`${i}:${t.split(a[i])[1]}`:t}static \u0275fac=function(a){return new(a||n)};static \u0275cmp=e.VBU({type:n,selectors:[["cue-iri-cell-renderer"]],decls:1,vars:1,template:function(a,i){1&a&&e.EFF(0),2&a&&e.JRh(i.value())},encapsulation:2,changeDetection:0})}return n})();var m=r(2245),h=r(2530),C=r(5381),E=r(5971),B=r(5448),S=r(2014),w=r(2611),F=r(3319),j=r(29),G=r(9695);const A=(n,p)=>p.label;function q(n,p){if(1&n){const t=e.RV6();e.j41(0,"cue-flexcontainer",10)(1,"cue-input-switch",11),e.mxI("checkedChange",function(i){o.eBV(t);const g=e.XpG();return e.DH7(g.collapseClasses,i)||(g.collapseClasses=i),o.Njj(i)}),e.k0s(),e.j41(2,"cue-typography",12),e.EFF(3,"Collapse classes"),e.k0s()(),e.j41(4,"cue-flexcontainer",10)(5,"cue-input-switch",11),e.mxI("checkedChange",function(i){o.eBV(t);const g=e.XpG();return e.DH7(g.collapseAttributes,i)||(g.collapseAttributes=i),o.Njj(i)}),e.k0s(),e.j41(6,"cue-typography",12),e.EFF(7,"Collapse properties"),e.k0s()()}if(2&n){const t=e.XpG();e.R7$(),e.R50("checked",t.collapseClasses),e.R7$(4),e.R50("checked",t.collapseAttributes)}}function L(n,p){if(1&n&&e.nrm(0,"cue-svg-icon",17),2&n){const t=e.XpG().$implicit;e.Y8G("name",t.icon)}}function O(n,p){if(1&n){const t=e.RV6();e.j41(0,"cue-menu-item",16),e.bIt("click",function(){const i=o.eBV(t).$implicit;return o.Njj(i.action())}),e.nVh(1,L,1,1,"cue-svg-icon",17),e.EFF(2),e.k0s()}if(2&n){const t=p.$implicit;e.R7$(),e.vxM(t.icon?1:-1),e.R7$(),e.SpI(" ",t.label)}}function $(n,p){if(1&n&&(e.j41(0,"cue-menu",5)(1,"cue-button",13,0),e.nrm(3,"cue-button-icon",14),e.k0s(),e.j41(4,"cue-menu-wrap",15),e.Z7z(5,O,3,2,"cue-menu-item",null,A),e.k0s()()),2&n){const t=e.XpG();e.R7$(5),e.Dyx(t.moreMenuContent())}}function W(n,p){if(1&n){const t=e.RV6();e.j41(0,"cue-button",18),e.bIt("click",function(){o.eBV(t);const i=e.XpG();return o.Njj(i.showColumnSettings.set(!1))}),e.nrm(1,"cue-button-icon",19),e.k0s()}}function U(n,p){if(1&n&&(e.j41(0,"cue-typography"),e.EFF(1),e.k0s()),2&n){const t=e.XpG(2);e.R7$(),e.SpI("Result: ",t.askQueryResults().boolean)}}function X(n,p){if(1&n&&e.nrm(0,"cue-code-editor",20),2&n){const t=e.XpG(2);e.Y8G("content",t.askQueryResults())("variant",t.variant())}}function z(n,p){if(1&n&&(e.nVh(0,U,2,1,"cue-typography"),e.nVh(1,X,1,2,"cue-code-editor",20)),2&n){const t=e.XpG();e.vxM("formatted"===t.selectedView()?0:-1),e.R7$(),e.vxM("raw"===t.selectedView()?1:-1)}}function H(n,p){if(1&n&&e.nrm(0,"cue-ag-grid",21),2&n){const t=e.XpG(3);e.Y8G("rowData",t.tableData())("columnDefs",t.columnDefs())}}function Y(n,p){if(1&n){const t=e.RV6();e.j41(0,"cue-ag-grid-column-select",23),e.mxI("columnDefsChange",function(i){o.eBV(t);const g=e.XpG(3);return e.DH7(g.columnDefs,i)||(g.columnDefs=i),o.Njj(i)}),e.k0s()}if(2&n){const t=e.XpG(3);e.R50("columnDefs",t.columnDefs),e.Y8G("columnDefsGross",t.columnDefsGross())("settings",t.columnSelectSettings())}}function K(n,p){if(1&n&&e.nVh(0,H,1,2,"cue-ag-grid",21)(1,Y,1,3,"cue-ag-grid-column-select",22),2&n){const t=e.XpG(2);e.vxM(t.showColumnSettings()?1:0)}}function J(n,p){if(1&n&&e.nrm(0,"cue-code-editor",20),2&n){const t=e.XpG(2);e.Y8G("content",t.selectQueryResults())("variant",t.variant())}}function Z(n,p){if(1&n&&(e.nVh(0,K,2,1),e.nVh(1,J,1,2,"cue-code-editor",20)),2&n){const t=e.XpG();e.vxM("formatted"===t.selectedView()?0:-1),e.R7$(),e.vxM("raw"===t.selectedView()?1:-1)}}function ee(n,p){if(1&n&&e.nrm(0,"cue-rdf-graph",25),2&n){const t=e.XpG(2);e.xc7("min-height",t.minGraphHeight()),e.Y8G("doc",t.rdfResult())("collapseAttributes",t.collapseAttributes())("collapseClasses",t.collapseClasses())}}function te(n,p){}function ne(n,p){if(1&n&&e.nrm(0,"cue-code-editor",26),2&n){const t=e.XpG(3);e.Y8G("content",t.rdfResult())("variant",t.variant())}}function ie(n,p){if(1&n&&e.nVh(0,te,0,0)(1,ne,1,2,"cue-code-editor",26),2&n){const t=e.XpG(2);e.vxM(t.isJSON()?0:1)}}function ae(n,p){if(1&n&&(e.nVh(0,ee,1,5,"cue-rdf-graph",24),e.nVh(1,ie,2,1)),2&n){const t=e.XpG();e.vxM("formatted"===t.selectedView()&&t.isJSON()?0:-1),e.R7$(),e.vxM("raw"===t.selectedView()?1:-1)}}let oe=(()=>{class n{_tableService=(0,o.WQX)(f.a);queryResults=(0,u.hFB)();queryDetails=(0,u.hFB)(void 0);variant=(0,u.hFB)("accent");minGraphHeight=(0,u.hFB)("300px");responseMimeType=(0,u.hFB)(void 0);clickedClose=(0,u.CGW)();totalHeight=(0,o.vPA)(0);selectedView=(0,c.uu)(()=>this.isJSON()?"formatted":"raw");isJSON=(0,c.EW)(()=>{const t=this.responseMimeType();return void 0===t||t.includes("json")});collapseClasses=(0,o.vPA)(!0);collapseAttributes=(0,o.vPA)(!0);moreMenuContent=(0,c.EW)(()=>this.selectQueryResults()&&!this.showColumnSettings()?[{label:"Show column settings",icon:"settings",action:()=>this.showColumnSettings.set(!0)},{label:"Download CSV",icon:"download",action:()=>this._downloadCSV()}]:[]);showContextMenu=(0,o.vPA)(!1);showColumnSettings=(0,o.vPA)(!1);askQueryResults=(0,c.EW)(()=>{if("ASK"===this.queryDetails()?.queryType)return this.queryResults()});selectQueryResults=(0,c.EW)(()=>{const t=this.queryDetails();if(console.log(t),"SELECT"===t?.queryType)return this.queryResults()});rdfResult=(0,c.EW)(()=>{const t=this.queryDetails();if("CONSTRUCT"===t?.queryType||"DESCRIBE"===t?.queryType)return this.queryResults()});columnDefs=(0,c.uu)(()=>this._buildAgGridColumnDefs());columnDefsGross=(0,c.EW)(()=>this._buildAgGridColumnDefs());queryVariables=(0,c.EW)(()=>{const t=this._getQueryVariables();return console.log(t),t.includes("*")?this.selectQueryResults()?.head.vars??[]:t});tableData=(0,c.EW)(()=>{const t=this.selectQueryResults();if(void 0===t)return[];const a=this.queryVariables();return t?.results.bindings.map(i=>{const g={};return a.forEach(D=>{g[D]=i[D]?.value??"-"}),g})});columnSelectSettings=(0,c.EW)(()=>{const t=new R.e;return t.allowToggleEditable=!1,t});_buildAgGridColumnDefs(){return this.queryVariables().map(a=>{const i={field:a,headerName:a,sortable:!0,filter:!0,flex:1};return this._isIRICol(a)&&(i.cellRenderer=d,i.cellRendererParams={prefixes:this.queryDetails()?.prefixes}),i})}_isIRICol(t){const a=this.selectQueryResults()?.results.bindings.find(i=>void 0!==i[t]);return void 0!==a&&"uri"===a[t].type}_downloadCSV(){this._tableService.downloadCSV()}_getQueryVariables(){const t=new Set;return this.queryDetails()?.variables.map(a=>{const i=a;t.add(void 0!==i?.value?i.value:void 0!==i?.variable?i.variable.value:"*")}),Array.from(t)}static \u0275fac=function(a){return new(a||n)};static \u0275cmp=e.VBU({type:n,selectors:[["cue-query-results"]],inputs:{queryResults:[1,"queryResults"],queryDetails:[1,"queryDetails"],variant:[1,"variant"],minGraphHeight:[1,"minGraphHeight"],responseMimeType:[1,"responseMimeType"]},outputs:{clickedClose:"clickedClose"},decls:20,vars:10,consts:[["trigger",""],["direction","column","gap","m",2,"height","100%"],["direction","row","gap","s"],["size","s",3,"click","disabled","variant"],[2,"flex","1"],["positioning","bottomright"],["variant","tertiary","size","s"],["size","s","cueTooltip","Back to query",3,"click"],["icon","arrow-back"],["direction","column",1,"result-container",2,"flex","1 1 0%","min-height","0","width","100%"],["align","center","gap","s"],["size","s",3,"checkedChange","checked"],["size","s"],["trigger","","variant","tertiary","size","s"],["icon","more-vert"],["menu",""],[3,"click"],["before","",3,"name"],["variant","tertiary","size","s",3,"click"],["icon","save"],["type","json",1,"result",3,"content","variant"],[1,"result",2,"flex","1 1 0%","min-height","0","overflow","auto",3,"rowData","columnDefs"],[2,"width","100%",3,"columnDefs","columnDefsGross","settings"],[2,"width","100%",3,"columnDefsChange","columnDefs","columnDefsGross","settings"],[1,"result",3,"doc","collapseAttributes","collapseClasses","min-height"],[1,"result",3,"doc","collapseAttributes","collapseClasses"],["type","ttl",1,"result",3,"content","variant"]],template:function(a,i){1&a&&(e.j41(0,"cue-flexcontainer",1)(1,"cue-flexcontainer",2)(2,"cue-button",3),e.bIt("click",function(){return i.selectedView.set("raw")}),e.j41(3,"cue-button-padder")(4,"cue-button-label"),e.EFF(5,"Raw"),e.k0s()()(),e.j41(6,"cue-button",3),e.bIt("click",function(){return i.selectedView.set("formatted")}),e.j41(7,"cue-button-padder")(8,"cue-button-label"),e.EFF(9,"Formatted"),e.k0s()()(),e.nVh(10,q,8,2),e.nrm(11,"cue-flexcontainer",4),e.nVh(12,$,7,0,"cue-menu",5),e.nVh(13,W,2,0,"cue-button",6),e.j41(14,"cue-button",7),e.bIt("click",function(){return i.clickedClose.emit()}),e.nrm(15,"cue-button-icon",8),e.k0s()(),e.j41(16,"cue-flexcontainer",9),e.nVh(17,z,2,2),e.nVh(18,Z,2,2),e.nVh(19,ae,2,2),e.k0s()()),2&a&&(e.R7$(2),e.Y8G("disabled","raw"===i.selectedView())("variant","raw"===i.selectedView()?"primary":"secondary"),e.R7$(4),e.Y8G("disabled","formatted"===i.selectedView())("variant","formatted"===i.selectedView()?"primary":"secondary"),e.R7$(4),e.vxM(i.rdfResult()&&"formatted"===i.selectedView()?10:-1),e.R7$(2),e.vxM(i.moreMenuContent().length?12:-1),e.R7$(),e.vxM(i.showColumnSettings()?13:-1),e.R7$(4),e.vxM(i.askQueryResults()?17:-1),e.R7$(),e.vxM(i.selectQueryResults()?18:-1),e.R7$(),e.vxM(i.rdfResult()?19:-1))},dependencies:[m.Typography,h.B,C.FlexContainer,E.Button,B.ButtonLabel,S.ButtonPadder,w.R,V.t,F.ButtonIcon,M.W,T.M,v.D,y.pL,j.A,G.Switch],styles:["[_nghost-%COMP%]{display:block;height:100%}.result-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex:1 1 0%;min-height:0;width:100%}.result[_ngcontent-%COMP%]{flex:1 1 0%;width:100%;box-sizing:border-box;overflow:auto;min-height:0}"],changeDetection:0})}return n})(),se=(()=>{class n{vcr;componentRef=null;setViewContainerRef(t){this.componentRef&&(this.componentRef.destroy(),this.componentRef=null),void 0!==this.vcr&&this.vcr?.clear(),this.vcr=t}static \u0275fac=function(a){return new(a||n)};static \u0275prov=o.jDH({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var re=r(5745),le=r(8957);const ce=["*"];function ue(n,p){if(1&n&&(e.j41(0,"cue-typography"),e.EFF(1),e.k0s()),2&n){const t=e.XpG(2);e.R7$(),e.JRh(t.message())}}function de(n,p){if(1&n){const t=e.RV6();e.j41(0,"cue-modal",1),e.bIt("close",function(){o.eBV(t);const i=e.XpG();return o.Njj(i.onClose())}),e.j41(1,"cue-flexcontainer",2),e.SdG(2),e.nVh(3,ue,2,1,"cue-typography"),e.j41(4,"cue-input",3),e.mxI("valueChange",function(i){o.eBV(t);const g=e.XpG();return e.DH7(g.inputValue,i)||(g.inputValue=i),o.Njj(i)}),e.k0s(),e.j41(5,"cue-typography")(6,"cue-flexcontainer",4)(7,"cue-button",5),e.bIt("click",function(){o.eBV(t);const i=e.XpG();return o.Njj(i.onConfirmed())}),e.EFF(8),e.k0s(),e.j41(9,"cue-button",6),e.bIt("click",function(){o.eBV(t);const i=e.XpG();return o.Njj(i.onClose())}),e.EFF(10),e.k0s()()()()()}if(2&n){const t=e.XpG();e.Y8G("displayCloseBtn",!1)("closeOnBackgroundClick",!1),e.R7$(3),e.vxM(t.message()?3:-1),e.R7$(),e.R50("value",t.inputValue),e.Y8G("label",t.inputLabel()),e.R7$(4),e.JRh(t.confirmText()),e.R7$(2),e.JRh(t.rejectText())}}let pe=(()=>{class n{visible=(0,u.geq)(!0);message=(0,u.hFB)("");inputLabel=(0,u.hFB)("");inputValue=(0,u.geq)("");confirmText=(0,u.hFB)("Update");rejectText=(0,u.hFB)("Cancel");valueChange=(0,u.CGW)();onConfirmed(){this.visible.set(!1),this.valueChange.emit(this.inputValue())}onClose(){this.visible.set(!1)}static \u0275fac=function(a){return new(a||n)};static \u0275cmp=e.VBU({type:n,selectors:[["cue-modal-input"]],inputs:{visible:[1,"visible"],message:[1,"message"],inputLabel:[1,"inputLabel"],inputValue:[1,"inputValue"],confirmText:[1,"confirmText"],rejectText:[1,"rejectText"]},outputs:{visible:"visibleChange",inputValue:"inputValueChange",valueChange:"valueChange"},ngContentSelectors:ce,decls:1,vars:1,consts:[[2,"font-family","var(--cue-font-family)",3,"displayCloseBtn","closeOnBackgroundClick"],[2,"font-family","var(--cue-font-family)",3,"close","displayCloseBtn","closeOnBackgroundClick"],["direction","column"],[3,"valueChange","value","label"],["direction","row"],["variant","secondary",3,"click"],[3,"click"]],template:function(a,i){1&a&&(e.NAR(),e.nVh(0,de,11,7,"cue-modal",0)),2&a&&e.vxM(i.visible()?0:-1)},dependencies:[re.a,C.FlexContainer,E.Button,m.Typography,le.Input],encapsulation:2})}return n})(),ge=(()=>{class n extends se{requestInput(t){if(!this.vcr)throw new Error("No ViewContainerRef!");const a=this.vcr.createComponent(pe);return this.componentRef=a,t.message&&a.setInput("message",t.message),t.inputLabel&&a.setInput("inputLabel",t.inputLabel),t.inputValue&&a.setInput("inputValue",t.inputValue),t.confirmText&&a.setInput("confirmText",t.confirmText),t.rejectText&&a.setInput("rejectText",t.rejectText),new Promise(i=>{const g=a.instance.valueChange.subscribe(D=>{i(D),g.unsubscribe(),a.destroy()})})}static \u0275fac=(()=>{let t;return function(i){return(t||(t=e.xGo(n)))(i||n)}})();static \u0275prov=o.jDH({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var Q=r(9352),_e=r(5187),me=r(4906);const he=["panel"];let ye=(()=>{class n{content=(0,u.geq)("");variant=(0,u.hFB)("default");contextPatterns=(0,u.hFB)([]);contentChanged=(0,u.CGW)();invalid=(0,u.CGW)();error=(0,u.CGW)();panel;_editor;_editorValue=(0,o.vPA)("");onVariantChange=(0,o.QZP)(()=>{const t=this.variant();this._editor&&(this._editor.theme=t)});onContentChange=(0,o.QZP)(()=>{const t=this.content();t!==this._editorValue()&&this._editor&&(this._editor.content=t)});onContextPatternsChange=(0,o.QZP)(()=>{const t=this.contextPatterns();this._editor&&(this._editor.contextPatterns=t)});ngAfterViewInit(){this._editor=new me.j(this.panel.nativeElement,this.variant()),this._editor.contextPatterns=this.contextPatterns();const t=this.content();t&&(this._editor.content=t),this._editor.events.addListener("contentChanged",a=>{this._editorValue.set(a),this.content()!==a&&this.content.set(a),this.contentChanged.emit(a)}),this._editor.events.addListener("contentValid",a=>{this.invalid.emit(!a)}),this._editor.events.addListener("error",a=>{this.error.emit(a)})}ngOnDestroy(){this._editor?.dispose()}static \u0275fac=function(a){return new(a||n)};static \u0275cmp=e.VBU({type:n,selectors:[["cue-sparql-editor"]],viewQuery:function(a,i){if(1&a&&e.GBs(he,5),2&a){let g;e.mGM(g=e.lsd())&&(i.panel=g.first)}},inputs:{content:[1,"content"],variant:[1,"variant"],contextPatterns:[1,"contextPatterns"]},outputs:{content:"contentChange",contentChanged:"contentChanged",invalid:"invalid",error:"error"},decls:2,vars:0,consts:[["panel",""],[1,"panel"]],template:function(a,i){1&a&&e.Hgh(0,"div",1,0)},styles:["[_nghost-%COMP%]{display:contents}.panel[_ngcontent-%COMP%]{overflow-y:auto;height:100%;width:100%;border:1px solid var(--borderColor-default)}"]})}return n})();var P=r(7573),fe=r(4284);const ve=["modalContainer"],Ce=(n,p)=>p.label;function be(n,p){if(1&n){const t=e.RV6();e.j41(0,"cue-flexcontainer",7)(1,"cue-button",19),e.nI1(2,"transloco"),e.bIt("click",function(){o.eBV(t);const i=e.XpG();return o.Njj(i.showResults.set(!0))}),e.nrm(3,"cue-button-icon",20),e.k0s()()}2&n&&(e.R7$(),e.Y8G("cueTooltip",e.bMT(2,1,"components.sparqlClient.tooltipViewResults")))}function Re(n,p){if(1&n&&(e.j41(0,"div",10),e.EFF(1),e.k0s()),2&n){const t=e.XpG();e.R7$(),e.JRh(t.queryError())}}function xe(n,p){1&n&&(e.j41(0,"cue-typography"),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&n&&(e.R7$(),e.JRh(e.bMT(2,1,"components.sparqlClient.infoQueryInProgress")))}function Me(n,p){if(1&n&&e.nrm(0,"cue-svg-icon",21),2&n){const t=e.XpG().$implicit;e.Y8G("name",t.icon)}}function De(n,p){if(1&n){const t=e.RV6();e.j41(0,"cue-menu-item",16),e.bIt("click",function(){const i=o.eBV(t).$implicit;return o.Njj(null==i?null:i.action())}),e.nVh(1,Me,1,1,"cue-svg-icon",21),e.EFF(2),e.k0s()}if(2&n){const t=p.$implicit;e.R7$(),e.vxM(t.icon?1:-1),e.R7$(),e.SpI(" ",t.label)}}function Te(n,p){if(1&n){const t=e.RV6();e.j41(0,"cue-button",22),e.bIt("click",function(){o.eBV(t);const i=e.XpG();return o.Njj(i.resetQuery())}),e.j41(1,"cue-button-label"),e.EFF(2),e.nI1(3,"transloco"),e.k0s()()}2&n&&(e.R7$(2),e.JRh(e.bMT(3,1,"components.sparqlClient.buttonReset")))}function Ee(n,p){1&n&&(e.j41(0,"cue-typography"),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&n&&(e.R7$(),e.JRh(e.bMT(2,1,"components.sparqlClient.infoQueryInProgress")))}function Ve(n,p){if(1&n){const t=e.RV6();e.j41(0,"cue-query-results",23),e.bIt("clickedClose",function(){o.eBV(t);const i=e.XpG();return o.Njj(i.showResults.set(!1))}),e.k0s()}if(2&n){const t=e.XpG();e.Y8G("queryDetails",t.queryDetails())("queryResults",t.resultsRaw())("responseMimeType",t.responseMimeType())("variant",t.cardVariantBack())("minGraphHeight",t.minCardHeight())}}const Pe=[{label:"File Content",iri:`${P.E.qcy}FileContent`},{label:"File Location",iri:`${P.E.qcy}Location`},{label:"Entity Mention",iri:`${P.E.qcy}EntityMention`},{label:"Canonical Entity",iri:`${P.E.qcy}CanonicalEntity`},{label:"Selector",iri:`${P.E.qcy}Selector`}].sort((n,p)=>n.label.localeCompare(p.label)),Ie=[{label:"has entity category",iri:`${P.E.qcy}hasEntityCategory`},{label:"has content category",iri:`${P.E.qcy}hasContentCategory`},{label:"value",iri:`${P.E.qcy}value`},{label:"a",iri:`${fe.B.rdf}type`}].sort((n,p)=>n.label.localeCompare(p.label));let N=(()=>{class n{_inputModal=(0,o.WQX)(ge);modalContainer;handlers=(0,u.hFB)();query=u.geq.required();cardVariant=(0,u.hFB)("default");cardVariantBack=(0,u.hFB)("accent");showResultsImmidiately=(0,u.hFB)(!0);showResults=(0,u.geq)(!1);flipForResults=(0,u.hFB)(!0);minCardHeight=(0,u.hFB)("300px");availableEntityCategories=(0,u.hFB)([]);availableContentCategories=(0,u.hFB)([]);availableTypes=(0,u.hFB)(Pe);availablePredicates=(0,u.hFB)(Ie);contextPatterns=(0,c.EW)(()=>{const t=[],a=this.availableEntityCategories();a?.length>0&&t.push({predicate:"qcy:hasEntityCategory",options:a});const i=this.availableContentCategories();i?.length>0&&t.push({predicate:"qcy:hasContentCategory",options:i});const g=this.availableTypes();g?.length>0&&t.push({predicate:"a",options:g});const D=this.availablePredicates();return D?.length>0&&t.push({options:D}),t});editorQuery=(0,c.uu)(()=>this.query());userQuery=(0,o.vPA)(void 0);userHasDefinedQuery=(0,c.EW)(()=>void 0!==this.userQuery()&&this.userQuery()!==this.query());currentQuery=(0,c.EW)(()=>this.userQuery()??this.query());queryInProgress=(0,o.vPA)(!1);responseMimeType=(0,o.vPA)(void 0);queryDetails=(0,c.EW)(()=>{const t=this.userQuery()??this.query();try{return(0,l.t)(t)}catch{return}});resultsRaw=(0,o.vPA)(void 0);queryError=(0,o.vPA)(void 0);executedQuery=(0,o.vPA)(void 0);resultsStillValid=(0,c.EW)(()=>this.executedQuery()===JSON.stringify(this.queryDetails()));labelSetResponseMime=(0,Q.Xx)("components.sparqlClient.buttonSetResponseMime");menuItems=(0,c.EW)(()=>{var a,t=this;return[{label:this.labelSetResponseMime(),action:(a=(0,b.A)(function*(){t._inputModal.setViewContainerRef(t.modalContainer);const i=yield t._inputModal.requestInput({inputLabel:"Response Mime Type",inputValue:"",confirmText:"Set",rejectText:"Cancel"});t.responseMimeType.set(i??void 0)}),function(){return a.apply(this,arguments)})}]});onQuery=(0,o.QZP)(()=>{this.query(),this.showResults.set(!1),this.queryError.set(void 0),this.userQuery.set(void 0)});executeQuery(){var t=this;return(0,b.A)(function*(){t.queryInProgress.set(!0),t.queryError.set(void 0),t._reset();try{const a=t.userQuery()??t.query(),i=yield t.handlers()?.queryHandler(a,t.queryDetails(),t.responseMimeType());t.resultsRaw.set(i),t.executedQuery.set(JSON.stringify(t.queryDetails())),t.showResultsImmidiately()&&t.showResults.set(!0)}catch(a){t.queryError.set(a?.message??a?.error??String(a))}finally{t.queryInProgress.set(!1)}})()}resetQuery(){this.editorQuery.update(()=>this.query()+" "),setTimeout(()=>{this.editorQuery.update(()=>this.query()),this.userQuery.set(void 0)})}_reset(){this.resultsRaw.set(void 0),this.executedQuery.set(void 0)}static \u0275fac=function(a){return new(a||n)};static \u0275cmp=e.VBU({type:n,selectors:[["cue-sparql-client"]],viewQuery:function(a,i){if(1&a&&e.GBs(ve,7,e.c1b),2&a){let g;e.mGM(g=e.lsd())&&(i.modalContainer=g.first)}},inputs:{handlers:[1,"handlers"],query:[1,"query"],cardVariant:[1,"cardVariant"],cardVariantBack:[1,"cardVariantBack"],showResultsImmidiately:[1,"showResultsImmidiately"],showResults:[1,"showResults"],flipForResults:[1,"flipForResults"],minCardHeight:[1,"minCardHeight"],availableEntityCategories:[1,"availableEntityCategories"],availableContentCategories:[1,"availableContentCategories"],availableTypes:[1,"availableTypes"],availablePredicates:[1,"availablePredicates"]},outputs:{query:"queryChange",showResults:"showResultsChange"},decls:29,vars:17,consts:[["modalContainer",""],["trigger",""],[2,"height","100%","width","100%","flex","1 1"],[1,"flip-card",3,"cueFlipChange","cueFlip"],[1,"flip-content"],[1,"card-face","front",2,"height","100%","flex","1 1",3,"variant","scrollable"],["direction","column",2,"height","calc(100% - 4px)","margin","2px"],["direction","row","justify","end","align","center","gap","m"],[2,"overflow-y","auto",3,"contentChanged","content","variant","contextPatterns"],[2,"flex","1"],[2,"background","#fef2f2","border","1px solid #fecaca","border-radius","6px","padding","8px 12px","font-size","12px","color","#b91c1c","word-break","break-word","white-space","pre-wrap","max-height","120px","overflow-y","auto","margin","4px 0"],["positioning","topright"],["trigger","","variant","tertiary"],["icon","more-vert"],["menu",""],["variant","secondary"],[3,"click"],[1,"card-face","back",2,"height","100%",3,"variant"],[2,"height","100%",3,"queryDetails","queryResults","responseMimeType","variant","minGraphHeight"],["size","s",3,"click","cueTooltip"],["icon","view-active"],["before","",3,"name"],["variant","secondary",3,"click"],[2,"height","100%",3,"clickedClose","queryDetails","queryResults","responseMimeType","variant","minGraphHeight"]],template:function(a,i){if(1&a){const g=e.RV6();e.eu8(0,null,0),e.j41(2,"cue-flexcontainer",2)(3,"div",3),e.mxI("cueFlipChange",function(k){return o.eBV(g),e.DH7(i.showResults,k)||(i.showResults=k),o.Njj(k)}),e.j41(4,"div",4)(5,"cue-card",5)(6,"cue-flexcontainer",6),e.nVh(7,be,4,3,"cue-flexcontainer",7),e.j41(8,"cue-sparql-editor",8),e.bIt("contentChanged",function(k){return i.userQuery.set(k)}),e.k0s(),e.nrm(9,"cue-flexcontainer",9),e.nVh(10,Re,2,1,"div",10),e.j41(11,"cue-flexcontainer",7),e.nVh(12,xe,3,3,"cue-typography"),e.j41(13,"cue-menu",11)(14,"cue-button",12,1),e.nrm(16,"cue-button-icon",13),e.k0s(),e.j41(17,"cue-menu-wrap",14),e.Z7z(18,De,3,2,"cue-menu-item",null,Ce),e.k0s()(),e.nVh(20,Te,4,3,"cue-button",15),e.j41(21,"cue-button",16),e.bIt("click",function(){return i.executeQuery()}),e.j41(22,"cue-button-label"),e.EFF(23),e.nI1(24,"transloco"),e.k0s()()()()(),e.j41(25,"cue-card",17),e.nrm(26,"cue-flexcontainer",7),e.nVh(27,Ee,3,3,"cue-typography")(28,Ve,1,5,"cue-query-results",18),e.k0s()()()()}2&a&&(e.R7$(3),e.R50("cueFlip",i.showResults),e.R7$(2),e.Y8G("variant",i.cardVariant())("scrollable",!0),e.R7$(2),e.vxM(i.resultsRaw()&&i.resultsStillValid()?7:-1),e.R7$(),e.Y8G("content",i.editorQuery())("variant",i.cardVariant())("contextPatterns",i.contextPatterns()),e.R7$(2),e.vxM(i.queryError()?10:-1),e.R7$(2),e.vxM(i.queryInProgress()?12:-1),e.R7$(6),e.Dyx(i.menuItems()),e.R7$(2),e.vxM(i.userHasDefinedQuery()?20:-1),e.R7$(3),e.JRh(e.bMT(24,15,"components.sparqlClient.buttonExecute")),e.R7$(2),e.xc7("min-height",i.minCardHeight()),e.Y8G("variant",i.cardVariantBack()),e.R7$(2),e.vxM(i.queryInProgress()?27:28))},dependencies:[_e.Card,C.FlexContainer,E.Button,B.ButtonLabel,ye,m.Typography,F.ButtonIcon,s.d,oe,_.R,M.W,T.M,v.D,j.A,Q.Kj],styles:["[_nghost-%COMP%]{display:contents}.wrapper[_ngcontent-%COMP%]{display:flex;width:100%}.flip-content[_ngcontent-%COMP%]{height:100%}.flip-card[_ngcontent-%COMP%]{height:100%;width:100%;flex:1 1}"],changeDetection:0})}return n})();function ke(n,p){if(1&n){const t=e.RV6();e.j41(0,"cue-sparql-client",2),e.mxI("queryChange",function(i){o.eBV(t);const g=e.XpG();return e.DH7(g.query,i)||(g.query=i),o.Njj(i)}),e.k0s()}if(2&n){const t=e.XpG();e.R50("query",t.query),e.Y8G("handlers",p)("showResultsImmidiately",!0)}}function Ne(n,p){1&n&&(e.j41(0,"cue-flexcontainer",1)(1,"cue-typography",3),e.EFF(2," No project connected. Pass a sdkState with cue and projectId. "),e.k0s()())}const Be=`PREFIX qcy: <${P.E.qcy}>\n\nSELECT DISTINCT ?doc ?contentCat\nWHERE {\n ?doc a qcy:FileContent .\n FILTER NOT EXISTS { ?_alt qcy:alternativeRepresentation ?doc }\n OPTIONAL { ?doc qcy:hasContentCategory ?contentCat }\n}\nLIMIT 20`;let Fe=(()=>{class n{sdkState=(0,u.hFB)(void 0);query=(0,u.geq)(Be);currentQueryChange=(0,u.CGW)();_client=(0,u.ebz)(N);_handlers=(0,c.EW)(()=>{const t=this.sdkState();if(!t)return;const{cue:a,projectId:i,graphType:g}=t;return{queryHandler:D=>a.api.sparql(D,i,g)}});_onCurrentQueryChange=(0,o.QZP)(()=>{const t=this._client();t&&this.currentQueryChange.emit(t.currentQuery())});static \u0275fac=function(a){return new(a||n)};static \u0275cmp=e.VBU({type:n,selectors:[["cue-sparql-client-sdk"]],viewQuery:function(a,i){1&a&&e.wEZ(i._client,N,5),2&a&&e.NyB()},inputs:{sdkState:[1,"sdkState"],query:[1,"query"]},outputs:{query:"queryChange",currentQueryChange:"currentQueryChange"},decls:2,vars:1,consts:[["cardVariant","primary","cardVariantBack","default",2,"height","100%","display","block",3,"query","handlers","showResultsImmidiately"],["direction","column","align","center","justify","center",2,"height","100%","width","100%","padding","8px"],["cardVariant","primary","cardVariantBack","default",2,"height","100%","display","block",3,"queryChange","query","handlers","showResultsImmidiately"],[2,"color","#9ca3af","font-size","13px"]],template:function(a,i){if(1&a&&e.nVh(0,ke,1,3,"cue-sparql-client",0)(1,Ne,3,0,"cue-flexcontainer",1),2&a){let g;e.vxM((g=i._handlers())?0:1,g)}},dependencies:[N,C.FlexContainer,m.Typography],styles:["[_nghost-%COMP%]{display:block;width:100%;height:100%}"],changeDetection:0})}return n})()},5332(I,x,r){r.d(x,{k:()=>b});for(var c=[],o=0;o<256;++o)c.push((o+256).toString(16).slice(1));function b(s,_=0){return(c[s[_+0]]+c[s[_+1]]+c[s[_+2]]+c[s[_+3]]+"-"+c[s[_+4]]+c[s[_+5]]+"-"+c[s[_+6]]+c[s[_+7]]+"-"+c[s[_+8]]+c[s[_+9]]+"-"+c[s[_+10]]+c[s[_+11]]+c[s[_+12]]+c[s[_+13]]+c[s[_+14]]+c[s[_+15]]).toLowerCase()}},8402(I,x,r){r.d(x,{A:()=>_});const c={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};var o,b=new Uint8Array(16);function e(){if(!o&&!(o=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return o(b)}var l=r(5332);const _=function s(y,R,V){if(c.randomUUID&&!R&&!y)return c.randomUUID();var M=(y=y||{}).random||(y.rng||e)();if(M[6]=15&M[6]|64,M[8]=63&M[8]|128,R){V=V||0;for(var T=0;T<16;++T)R[V+T]=M[T];return R}return(0,l.k)(M)}}}]);
|
package/7313.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[3319,5971,7313],{3319(D,C,i){i.d(C,{ButtonIcon:()=>m});var o=i(7705),a=i(29),d=i(5547);let m=(()=>{class h{icon=(0,o.hFB)(void 0);slot=(0,o.hFB)("before");static \u0275fac=function(f){return new(f||h)};static \u0275cmp=d.VBU({type:h,selectors:[["cue-button-icon"]],inputs:{icon:[1,"icon"],slot:[1,"slot"]},decls:1,vars:2,consts:[[3,"slot","name"]],template:function(f,u){1&f&&d.nrm(0,"cue-svg-icon",0),2&f&&d.Y8G("slot",u.slot())("name",u.icon())},dependencies:[a.A],encapsulation:2})}return h})()},5971(D,C,i){i.d(C,{Button:()=>u});var o=i(9769),a=i(7705),d=i(2271),m=i(7089),h=i(2403),r=i(5547);const v=["buttonElement"],f=["*"];let u=(()=>{class e{variant=(0,a.hFB)("primary");size=(0,a.hFB)("m");tooltip=(0,a.hFB)("");disabled=(0,a.hFB)(!1);selected=(0,a.geq)(!1);toggleButton=(0,a.hFB)(!1);loading=(0,a.hFB)(!1);fitParentWidth=(0,a.hFB)(!1);noWrap=(0,a.hFB)(!0);buttonElement=a.ebz.required("buttonElement");getStyles=(0,d.EW)(()=>[`\n padding: 0 var(--cue-button-${this.size()}-padding-x);\n\n --focus-color: var(--cue-button-${this.variant()}-focus-color);\n --cue-button-border-color: var(--cue-button-${this.variant()}-border-color);\n color: var(--cue-button-${this.variant()}-foreground);\n --background-color: var(--cue-button-${this.variant()}-background);\n\n --cue-icon-width: var(--cue-button-${this.size()}-icon-width);\n --button-height: var(--cue-button-${this.size()}-height);\n --cue-button-border-radius: var(--cue-button-border-radius, 9999px);\n --button-label-padding-x: var(--cue-button-${this.size()}-label-padding-x);\n `,this.disabled()?`\n color: var(--cue-button-${this.variant()}-disabled-foreground);\n --cue-button-border-color: var(--cue-button-${this.variant()}-disabled-border-color);\n --background-color: var(--cue-button-${this.variant()}-disabled-background);\n `:""].join(""));handleClick(_){_.detail>0&&this.buttonElement().nativeElement.blur(),this.toggleButton()&&(_.stopPropagation(),this.selected.set(!this.selected()))}static \u0275fac=function(g){return new(g||e)};static \u0275cmp=r.VBU({type:e,selectors:[["cue-button"]],viewQuery:function(g,R){1&g&&r.wEZ(R.buttonElement,v,5),2&g&&r.NyB()},inputs:{variant:[1,"variant"],size:[1,"size"],tooltip:[1,"tooltip"],disabled:[1,"disabled"],selected:[1,"selected"],toggleButton:[1,"toggleButton"],loading:[1,"loading"],fitParentWidth:[1,"fitParentWidth"],noWrap:[1,"noWrap"]},outputs:{selected:"selectedChange"},ngContentSelectors:f,decls:3,vars:18,consts:[["buttonElement",""],["tooltipSize","small",3,"click","disabled","cueTooltip","tooltipPlacement","cuePulse"]],template:function(g,R){1&g&&(r.NAR(),r.j41(0,"button",1,0),r.bIt("click",function(P){return R.handleClick(P)}),r.SdG(2),r.k0s()),2&g&&(r.Aen(R.getStyles()),r.xc7("white-space",R.noWrap()?"nowrap":"normal")("flex-basis",R.noWrap()?null:"auto")("min-width",R.noWrap()?null:"fit-content"),r.AVh("selected",R.selected())("ghost","ghost"===R.variant())("fit-parent-width",R.fitParentWidth()),r.Y8G("disabled",R.disabled())("cueTooltip",R.tooltip())("tooltipPlacement","top")("cuePulse",R.loading()))},dependencies:[o.MD,m.d,h.V],styles:['[_nghost-%COMP%]:has(.fit-parent-width){display:contents}@keyframes _ngcontent-%COMP%_pulse-border{0%{box-shadow:0 0 0 0 var(--focus-color)}50%{box-shadow:0 0 0 8px transparent}to{box-shadow:0 0 0 0 transparent}}button[_ngcontent-%COMP%]{min-width:0;pulse-border-radius:var(--cue-button-border-radius);appearance:none;padding:0;font:inherit;border:var(--cue-button-border-width) var(--cue-button-border-style) var(--cue-button-border-color);display:flex;justify-content:space-between;align-items:center;gap:var(--cue-button-gap);min-height:var(--button-height);height:auto;background-color:var(--background-color);border-radius:var(--cue-button-border-radius, 9999px);margin:3px;position:relative}button[style*="white-space: normal"][_ngcontent-%COMP%]{border-radius:30px!important;padding:10px!important}button.fit-parent-width[_ngcontent-%COMP%]{width:100%;min-width:0;margin-inline:0}button[_ngcontent-%COMP%]:not(.fit-parent-width){min-width:fit-content;width:auto}button[_ngcontent-%COMP%]:focus{outline:none}button[_ngcontent-%COMP%]:hover:not(:disabled), button[_ngcontent-%COMP%]:focus-within:not(:disabled){outline:1px solid var(--focus-color);outline-offset:2px;cursor:pointer}button.selected[_ngcontent-%COMP%]{outline:1px solid currentColor!important;outline-offset:2px;margin:3px}button.ghost[_ngcontent-%COMP%]:not(.selected){border:none}']})}return e})()},5821(D,C,i){i.d(C,{m:()=>P});var o=i(7705),a=i(5802),d=i(2271),m=i(9352),h=i(5381),r=i(2245),v=i(5971),f=i(3319),u=i(63),e=i(5547);const S=(y,T,p)=>({startIndex:y,endIndex:T,totalItems:p});function _(y,T){if(1&y){const p=e.RV6();e.j41(0,"cue-flexcontainer",3)(1,"cue-typography",4),e.EFF(2),e.nI1(3,"transloco"),e.k0s(),e.j41(4,"cue-select",5),e.mxI("valueChange",function(w){a.eBV(p);const k=e.XpG(2);return e.DH7(k.pageSize,w)||(k.pageSize=w),a.Njj(w)}),e.k0s()(),e.nrm(5,"span",6)}if(2&y){const p=e.XpG(2);e.R7$(),e.Y8G("noWrap",!0),e.R7$(),e.JRh(e.bMT(3,5,"components.paginator.itemsPerPage")),e.R7$(2),e.R50("value",p.pageSize),e.Y8G("options",p.pageSizeOptions())("underline",!1)}}function g(y,T){if(1&y&&e.nVh(0,_,6,7),2&y){const p=e.XpG();e.vxM(p.pageSizeOptions().length>1?0:-1)}}function R(y,T){if(1&y){const p=e.RV6();e.j41(0,"cue-button",7),e.bIt("click",function(){a.eBV(p);const w=e.XpG();return a.Njj(w.first())}),e.nrm(1,"cue-button-icon",8),e.k0s(),e.j41(2,"cue-button",7),e.bIt("click",function(){a.eBV(p);const w=e.XpG();return a.Njj(w.back())}),e.nrm(3,"cue-button-icon",9),e.k0s()}}function z(y,T){if(1&y){const p=e.RV6();e.j41(0,"cue-button",7),e.bIt("click",function(){a.eBV(p);const w=e.XpG();return a.Njj(w.next())}),e.nrm(1,"cue-button-icon",10),e.k0s(),e.j41(2,"cue-button",7),e.bIt("click",function(){a.eBV(p);const w=e.XpG();return a.Njj(w.last())}),e.nrm(3,"cue-button-icon",11),e.k0s()}}let P=(()=>{class y{pageSizeOptions=(0,o.hFB)([5,10,25,100]);size=(0,o.hFB)(111);pageSize=(0,o.geq)(10);menuPosition=(0,o.hFB)("topright");autoAdjust=(0,o.hFB)(!0);currentPage=(0,o.CGW)();_startIndex=(0,a.vPA)(0);_endIndex=(0,a.vPA)(0);anythingToPaginate=(0,d.EW)(()=>{const p=this.adjustedPageSizeOptions()[this.adjustedPageSizeOptions().length-1];return this.size()>p});startIndex=(0,d.EW)(()=>this._startIndex()+1);endIndex=(0,d.EW)(()=>Math.min(this._endIndex(),this.size()));isFirstPage=(0,d.EW)(()=>0===this._startIndex());isLastPage=(0,d.EW)(()=>this._endIndex()>=this.size());adjustedPageSizeOptions=(0,d.EW)(()=>{let p=this.pageSizeOptions();if(!this.autoAdjust())return p;const x=p[p.length-1],w=this.size();return w<x&&(p=p.filter(k=>k<=w),p.length||(p=[w])),p});constructor(){(0,a.QZP)(()=>{this._resetPagination()}),(0,a.QZP)(()=>{this.currentPage.emit({startIndex:this._startIndex(),endIndex:this._endIndex(),pageSize:this.pageSize()})})}setSize(p){this.pageSize.set(p),this._resetPagination()}next(){const p=this._endIndex();this._startIndex.set(p),this._endIndex.set(p+this.pageSize())}back(){const p=Math.max(0,this._startIndex()-this.pageSize());this._startIndex.set(p),this._endIndex.set(p+this.pageSize())}first(){this._startIndex.set(0),this._endIndex.set(this.pageSize())}last(){const p=Math.max(0,this.size()-(this.size()%this.pageSize()||this.pageSize()));this._startIndex.set(p),this._endIndex.set(this.size())}_resetPagination(){this._startIndex.set(0),this._endIndex.set(Math.min(this.pageSize(),this.size()))}static \u0275fac=function(x){return new(x||y)};static \u0275cmp=e.VBU({type:y,selectors:[["cue-paginator"]],inputs:{pageSizeOptions:[1,"pageSizeOptions"],size:[1,"size"],pageSize:[1,"pageSize"],menuPosition:[1,"menuPosition"],autoAdjust:[1,"autoAdjust"]},outputs:{pageSize:"pageSizeChange",currentPage:"currentPage"},decls:8,vars:11,consts:[["direction","row","justify","end","align","center",1,"paginator",2,"width","calc(100% - 4px)","padding","0 2px"],["size","s"],["direction","row","gap","s"],["direction","row","gap","s","align","center"],["size","s",3,"noWrap"],["size","xs","menuPosition","topright",3,"valueChange","value","options","underline"],[2,"flex","1"],["size","xs","variant","tertiary",3,"click"],["icon","paginator-first"],["icon","paginator-back"],["icon","paginator-next"],["icon","paginator-last"]],template:function(x,w){1&x&&(e.j41(0,"cue-flexcontainer",0),e.nVh(1,g,1,1),e.j41(2,"cue-typography",1),e.EFF(3),e.nI1(4,"transloco"),e.k0s(),e.j41(5,"cue-flexcontainer",2),e.nVh(6,R,4,0),e.nVh(7,z,4,0),e.k0s()()),2&x&&(e.R7$(),e.vxM(!w.autoAdjust()||w.anythingToPaginate()?1:-1),e.R7$(2),e.JRh(e.i5U(4,4,"components.paginator.currentDisplay",e.sMw(7,S,w.startIndex(),w.endIndex(),w.size()))),e.R7$(3),e.vxM(w.isFirstPage()?-1:6),e.R7$(),e.vxM(w.isLastPage()?-1:7))},dependencies:[h.FlexContainer,r.Typography,v.Button,f.ButtonIcon,u.Select,m.Kj],styles:[".paginator[_ngcontent-%COMP%]{color:var(--cue-paginator-text-color);padding-top:3px;padding-bottom:3px}"],changeDetection:0})}return y})()},2403(D,C,i){i.d(C,{V:()=>m});var o=i(7705),a=i(5547),d=i(5802);let m=(()=>{class h{el=(0,d.WQX)(a.aKT);renderer=(0,d.WQX)(a.sFG);cuePulse=(0,o.hFB)(!1);cuePulseColor=(0,o.hFB)("");cuePulseMode=(0,o.hFB)("border");activeClass="";constructor(){this.ensureGlobalStyles()}onPulseChanged=(0,d.QZP)(()=>{const v=this.cuePulse(),f=this.cuePulseColor(),u=this.cuePulseMode(),e=this.el.nativeElement;if(this.activeClass&&(this.renderer.removeClass(e,this.activeClass),this.activeClass=""),this.renderer.removeStyle(e,"--cue-pulse-color"),this.renderer.removeStyle(e,"border-radius"),v){const S="text"===u?"cue-pulse-text":"cue-pulse-border";this.renderer.addClass(e,S),this.activeClass=S,f&&this.renderer.setStyle(e,"--cue-pulse-color",f),"border"===u&&setTimeout(()=>{const _=e.firstElementChild;if(_){const g=getComputedStyle(_).borderRadius;g&&"0px"!==g&&this.renderer.setStyle(e,"border-radius",g)}})}});ngOnDestroy(){const v=this.el.nativeElement;this.activeClass&&this.renderer.removeClass(v,this.activeClass),this.renderer.removeStyle(v,"border-radius")}ensureGlobalStyles(){const v="cue-pulse-global-styles";if(document.getElementById(v))return;const f=document.createElement("style");f.id=v,f.textContent="\n @keyframes cue-pulse-border-anim {\n 0% {\n box-shadow: 0 0 0 0 var(--cue-pulse-color, currentColor);\n }\n 70% {\n box-shadow: 0 0 0 8px transparent;\n }\n 100% {\n box-shadow: 0 0 0 0 transparent;\n }\n }\n\n @keyframes cue-pulse-text-anim {\n 0%, 100% {\n opacity: 1;\n }\n 50% {\n opacity: 0.4;\n }\n }\n\n .cue-pulse-border {\n animation: cue-pulse-border-anim 1.5s infinite ease-in-out;\n }\n\n .cue-pulse-text {\n animation: cue-pulse-text-anim 1.5s infinite ease-in-out;\n }\n ",document.head.appendChild(f)}static \u0275fac=function(f){return new(f||h)};static \u0275dir=a.FsC({type:h,selectors:[["","cuePulse",""]],inputs:{cuePulse:[1,"cuePulse"],cuePulseColor:[1,"cuePulseColor"],cuePulseMode:[1,"cuePulseMode"]}})}return h})()},3798(D,C,i){i.d(C,{Z:()=>v});var o=i(3236),a=i(9974),d=i(8750),m=i(4360),r=i(1584);function v(f,u=o.E){return function h(f){return(0,a.N)((u,e)=>{let S=!1,_=null,g=null,R=!1;const z=()=>{if(g?.unsubscribe(),g=null,S){S=!1;const y=_;_=null,e.next(y)}R&&e.complete()},P=()=>{g=null,R&&e.complete()};u.subscribe((0,m._)(e,y=>{S=!0,_=y,g||(0,d.Tg)(f(y)).subscribe(g=(0,m._)(e,z,P))},()=>{R=!0,(!S||!g||g.closed)&&e.complete()}))})}(()=>(0,r.O)(f,u))}},5964(D,C,i){i.d(C,{p:()=>d});var o=i(9974),a=i(4360);function d(m,h){return(0,o.N)((r,v)=>{let f=0;r.subscribe((0,a._)(v,u=>m.call(h,u,f++)&&v.next(u)))})}},536(D,C,i){i.d(C,{X:()=>v});var o=i(6780),a=i(8359);const d={schedule(u){let e=requestAnimationFrame,S=cancelAnimationFrame;const{delegate:_}=d;_&&(e=_.requestAnimationFrame,S=_.cancelAnimationFrame);const g=e(R=>{S=void 0,u(R)});return new a.yU(()=>S?.(g))},requestAnimationFrame(...u){const{delegate:e}=d;return(e?.requestAnimationFrame||requestAnimationFrame)(...u)},cancelAnimationFrame(...u){const{delegate:e}=d;return(e?.cancelAnimationFrame||cancelAnimationFrame)(...u)},delegate:void 0};var h=i(9687);const v=new class r extends h.q{flush(e){let S;this._active=!0,e?S=e.id:(S=this._scheduled,this._scheduled=void 0);const{actions:_}=this;let g;e=e||_.shift();do{if(g=e.execute(e.state,e.delay))break}while((e=_[0])&&e.id===S&&_.shift());if(this._active=!1,g){for(;(e=_[0])&&e.id===S&&_.shift();)e.unsubscribe();throw g}}}(class m extends o.R{constructor(e,S){super(e,S),this.scheduler=e,this.work=S}requestAsyncId(e,S,_=0){return null!==_&&_>0?super.requestAsyncId(e,S,_):(e.actions.push(this),e._scheduled||(e._scheduled=d.requestAnimationFrame(()=>e.flush(void 0))))}recycleAsyncId(e,S,_=0){var g;if(null!=_?_>0:this.delay>0)return super.recycleAsyncId(e,S,_);const{actions:R}=e;null!=S&&S===e._scheduled&&(null===(g=R[R.length-1])||void 0===g?void 0:g.id)!==S&&(d.cancelAnimationFrame(S),e._scheduled=void 0)}})},7523(D,C,i){function o(a){return Array.isArray(a)?a:[a]}i.d(C,{F:()=>o})},9752(D,C,i){i.d(C,{dS:()=>h});var o=i(5802);const a=new o.nKC("cdk-dir-doc",{providedIn:"root",factory:()=>(0,o.WQX)(o.qQL)}),d=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;let h=(()=>{class r{get value(){return this.valueSignal()}valueSignal=(0,o.vPA)("ltr");change=new o.bkB;constructor(){const f=(0,o.WQX)(a,{optional:!0});f&&this.valueSignal.set(function m(r){const v=r?.toLowerCase()||"";return"auto"===v&&typeof navigator<"u"&&navigator?.language?d.test(navigator.language)?"rtl":"ltr":"rtl"===v?"rtl":"ltr"}((f.body?f.body.dir:null)||(f.documentElement?f.documentElement.dir:null)||"ltr"))}ngOnDestroy(){this.change.complete()}static \u0275fac=function(u){return new(u||r)};static \u0275prov=o.jDH({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})()},7384(D,C,i){i.d(C,{OE:()=>a,i8:()=>m});var o=i(5547);function a(h,r=0){return function d(h){return!isNaN(parseFloat(h))&&!isNaN(Number(h))}(h)?Number(h):2===arguments.length?r:0}function m(h){return h instanceof o.aKT?h.nativeElement:h}},3531(D,C,i){i.d(C,{g:()=>m});var o=i(5802),a=i(5547);const d={};class m{_appId=(0,o.WQX)(a.sZ2);static _infix=`a${Math.floor(1e5*Math.random()).toString()}`;getId(r,v=!1){return"ng"!==this._appId&&(r+=this._appId),d.hasOwnProperty(r)||(d[r]=0),`${r}${v?m._infix+"-":""}${d[r]++}`}static \u0275fac=function(v){return new(v||m)};static \u0275prov=o.jDH({token:m,factory:m.\u0275fac,providedIn:"root"})}},7421(D,C,i){i.d(C,{O:()=>h});var o=i(5802),a=i(5547),d=i(177);let m;try{m=typeof Intl<"u"&&Intl.v8BreakIterator}catch{m=!1}let h=(()=>{class r{_platformId=(0,o.WQX)(a.Agw);isBrowser=this._platformId?(0,d.UE)(this._platformId):"object"==typeof document&&!!document;EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent);TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent);BLINK=this.isBrowser&&!(!window.chrome&&!m)&&typeof CSS<"u"&&!this.EDGE&&!this.TRIDENT;WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT;IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window);FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent);ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT;SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT;constructor(){}static \u0275fac=function(u){return new(u||r)};static \u0275prov=o.jDH({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})()},9867(D,C,i){let o;function d(r){if(function a(){if(null==o){const r=typeof document<"u"?document.head:null;o=!(!r||!r.createShadowRoot&&!r.attachShadow)}return o}()){const v=r.getRootNode?r.getRootNode():null;if(typeof ShadowRoot<"u"&&ShadowRoot&&v instanceof ShadowRoot)return v}return null}function h(r){return r.composedPath?r.composedPath()[0]:r.target}i.d(C,{Fb:()=>h,KT:()=>d})},3293(D,C,i){i.d(C,{l:()=>h});var o=i(5802),a=i(7705),d=i(5547);const m=new WeakMap;let h=(()=>{class r{_appRef;_injector=(0,o.WQX)(o.zZn);_environmentInjector=(0,o.WQX)(o.uvJ);load(f){const u=this._appRef=this._appRef||this._injector.get(d.o8S);let e=m.get(u);e||(e={loaders:new Set,refs:[]},m.set(u,e),u.onDestroy(()=>{m.get(u)?.refs.forEach(S=>S.destroy()),m.delete(u)})),e.loaders.has(f)||(e.loaders.add(f),e.refs.push((0,a.a0P)(f,{environmentInjector:this._environmentInjector})))}static \u0275fac=function(u){return new(u||r)};static \u0275prov=o.jDH({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})()},8203(D,C,i){i.d(C,{jI:()=>u});var r=i(5547),v=i(5802);let u=(()=>{class e{static \u0275fac=function(g){return new(g||e)};static \u0275mod=r.$C({type:e});static \u0275inj=v.G2t({})}return e})()},5272(D,C,i){i.d(C,{R:()=>U,E9:()=>H,Xj:()=>G});var o=i(5802),a=i(5547),d=i(1413),m=i(7673),h=i(4226),v=(i(536),i(6780));let u,f=1;const e={};function S(c){return c in e&&(delete e[c],!0)}const _={setImmediate(c){const s=f++;return e[s]=!0,u||(u=Promise.resolve()),u.then(()=>S(s)&&c()),s},clearImmediate(c){S(c)}},{setImmediate:R,clearImmediate:z}=_,P={setImmediate(...c){const{delegate:s}=P;return(s?.setImmediate||R)(...c)},clearImmediate(c){const{delegate:s}=P;return(s?.clearImmediate||z)(c)},delegate:void 0};var T=i(9687);new class p extends T.q{flush(s){this._active=!0;const t=this._scheduled;this._scheduled=void 0;const{actions:n}=this;let l;s=s||n.shift();do{if(l=s.execute(s.state,s.delay))break}while((s=n[0])&&s.id===t&&n.shift());if(this._active=!1,l){for(;(s=n[0])&&s.id===t&&n.shift();)s.unsubscribe();throw l}}}(class y extends v.R{constructor(s,t){super(s,t),this.scheduler=s,this.work=t}requestAsyncId(s,t,n=0){return null!==n&&n>0?super.requestAsyncId(s,t,n):(s.actions.push(this),s._scheduled||(s._scheduled=P.setImmediate(s.flush.bind(s,void 0))))}recycleAsyncId(s,t,n=0){var l;if(null!=n?n>0:this.delay>0)return super.recycleAsyncId(s,t,n);const{actions:b}=s;null!=t&&(null===(l=b[b.length-1])||void 0===l?void 0:l.id)!==t&&(P.clearImmediate(t),s._scheduled===t&&(s._scheduled=void 0))}});var k=i(3798),F=i(5964),A=i(7421),L=i(7384),V=i(8203);let U=(()=>{class c{_ngZone=(0,o.WQX)(o.SKi);_platform=(0,o.WQX)(A.O);_renderer=(0,o.WQX)(a._9s).createRenderer(null,null);_cleanupGlobalListener;constructor(){}_scrolled=new d.B;_scrolledCount=0;scrollContainers=new Map;register(t){this.scrollContainers.has(t)||this.scrollContainers.set(t,t.elementScrolled().subscribe(()=>this._scrolled.next(t)))}deregister(t){const n=this.scrollContainers.get(t);n&&(n.unsubscribe(),this.scrollContainers.delete(t))}scrolled(t=20){return this._platform.isBrowser?new h.c(n=>{this._cleanupGlobalListener||(this._cleanupGlobalListener=this._ngZone.runOutsideAngular(()=>this._renderer.listen("document","scroll",()=>this._scrolled.next())));const l=t>0?this._scrolled.pipe((0,k.Z)(t)).subscribe(n):this._scrolled.subscribe(n);return this._scrolledCount++,()=>{l.unsubscribe(),this._scrolledCount--,this._scrolledCount||(this._cleanupGlobalListener?.(),this._cleanupGlobalListener=void 0)}}):(0,m.of)()}ngOnDestroy(){this._cleanupGlobalListener?.(),this._cleanupGlobalListener=void 0,this.scrollContainers.forEach((t,n)=>this.deregister(n)),this._scrolled.complete()}ancestorScrolled(t,n){const l=this.getAncestorScrollContainers(t);return this.scrolled(n).pipe((0,F.p)(b=>!b||l.indexOf(b)>-1))}getAncestorScrollContainers(t){const n=[];return this.scrollContainers.forEach((l,b)=>{this._scrollableContainsElement(b,t)&&n.push(b)}),n}_scrollableContainsElement(t,n){let l=(0,L.i8)(n),b=t.getElementRef().nativeElement;do{if(l==b)return!0}while(l=l.parentElement);return!1}static \u0275fac=function(n){return new(n||c)};static \u0275prov=o.jDH({token:c,factory:c.\u0275fac,providedIn:"root"})}return c})(),G=(()=>{class c{_platform=(0,o.WQX)(A.O);_listeners;_viewportSize=null;_change=new d.B;_document=(0,o.WQX)(o.qQL);constructor(){const t=(0,o.WQX)(o.SKi),n=(0,o.WQX)(a._9s).createRenderer(null,null);t.runOutsideAngular(()=>{if(this._platform.isBrowser){const l=b=>this._change.next(b);this._listeners=[n.listen("window","resize",l),n.listen("window","orientationchange",l)]}this.change().subscribe(()=>this._viewportSize=null)})}ngOnDestroy(){this._listeners?.forEach(t=>t()),this._change.complete()}getViewportSize(){this._viewportSize||this._updateViewportSize();const t={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),t}getViewportRect(){const t=this.getViewportScrollPosition(),{width:n,height:l}=this.getViewportSize();return{top:t.top,left:t.left,bottom:t.top+l,right:t.left+n,height:l,width:n}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};const t=this._document,n=this._getWindow(),l=t.documentElement,b=l.getBoundingClientRect();return{top:-b.top||t.body?.scrollTop||n.scrollY||l.scrollTop||0,left:-b.left||t.body?.scrollLeft||n.scrollX||l.scrollLeft||0}}change(t=20){return t>0?this._change.pipe((0,k.Z)(t)):this._change}_getWindow(){return this._document.defaultView||window}_updateViewportSize(){const t=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:t.innerWidth,height:t.innerHeight}:{width:0,height:0}}static \u0275fac=function(n){return new(n||c)};static \u0275prov=o.jDH({token:c,factory:c.\u0275fac,providedIn:"root"})}return c})(),B=(()=>{class c{static \u0275fac=function(n){return new(n||c)};static \u0275mod=a.$C({type:c});static \u0275inj=o.G2t({})}return c})(),H=(()=>{class c{static \u0275fac=function(n){return new(n||c)};static \u0275mod=a.$C({type:c});static \u0275inj=o.G2t({imports:[V.jI,B,V.jI,B]})}return c})()}}]);
|
package/7441.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[7441],{3319(D,v,o){o.d(v,{a:()=>c});var r=o(7705),u=o(29),i=o(5547);let c=(()=>{class _{icon=(0,r.hFB)(void 0);slot=(0,r.hFB)("before");static \u0275fac=function(m){return new(m||_)};static \u0275cmp=i.VBU({type:_,selectors:[["cue-button-icon"]],inputs:{icon:[1,"icon"],slot:[1,"slot"]},decls:1,vars:2,consts:[[3,"slot","name"]],template:function(m,g){1&m&&i.nrm(0,"cue-svg-icon",0),2&m&&i.Y8G("slot",g.slot())("name",g.icon())},dependencies:[u.A],encapsulation:2})}return _})()},5448(D,v,o){o.d(v,{L:()=>_});var r=o(7705),u=o(2245),i=o(5547);const c=["*"];let _=(()=>{class a{fontSize=(0,r.hFB)("m");italic=(0,r.hFB)(!1);noWrap=(0,r.hFB)(!0);static \u0275fac=function(g){return new(g||a)};static \u0275cmp=i.VBU({type:a,selectors:[["cue-button-label"]],inputs:{fontSize:[1,"fontSize"],italic:[1,"italic"],noWrap:[1,"noWrap"]},ngContentSelectors:c,decls:3,vars:3,consts:[[3,"size","italic","noWrap"]],template:function(g,p){1&g&&(i.NAR(),i.j41(0,"div")(1,"cue-typography",0),i.SdG(2),i.k0s()()),2&g&&(i.R7$(),i.Y8G("size",p.fontSize())("italic",p.italic())("noWrap",p.noWrap()))},dependencies:[u.Typography],styles:["div[_ngcontent-%COMP%]{transform:translateY(.05em)}"]})}return a})()},2014(D,v,o){o.d(v,{z:()=>_});var r=o(7705),u=o(2271),i=o(5547);const c=["*"];let _=(()=>{class a{justify=(0,r.hFB)("start");size=(0,r.hFB)("l");widthStyle=(0,u.EW)(()=>`var(--cue-button-label-padding-${this.size()}-x)`);static \u0275fac=function(g){return new(g||a)};static \u0275cmp=i.VBU({type:a,selectors:[["cue-button-padder"]],inputs:{justify:[1,"justify"],size:[1,"size"]},ngContentSelectors:c,decls:2,vars:4,template:function(g,p){1&g&&(i.NAR(),i.rj2(0,"div"),i.SdG(1),i.eux()),2&g&&i.xc7("justify-content",p.justify())("min-width",p.widthStyle())},styles:["div[_ngcontent-%COMP%]{display:flex;align-items:center;min-height:1px}"]})}return a})()},5971(D,v,o){o.d(v,{$:()=>g});var r=o(9769),u=o(7705),i=o(2271),c=o(7089),_=o(2403),a=o(5547);const b=["buttonElement"],m=["*"];let g=(()=>{class p{variant=(0,u.hFB)("primary");size=(0,u.hFB)("m");tooltip=(0,u.hFB)("");disabled=(0,u.hFB)(!1);selected=(0,u.geq)(!1);toggleButton=(0,u.hFB)(!1);loading=(0,u.hFB)(!1);fitParentWidth=(0,u.hFB)(!1);noWrap=(0,u.hFB)(!0);buttonElement=u.ebz.required("buttonElement");getStyles=(0,i.EW)(()=>[`\n padding: 0 var(--cue-button-${this.size()}-padding-x);\n\n --focus-color: var(--cue-button-${this.variant()}-focus-color);\n --cue-button-border-color: var(--cue-button-${this.variant()}-border-color);\n color: var(--cue-button-${this.variant()}-foreground);\n --background-color: var(--cue-button-${this.variant()}-background);\n\n --cue-icon-width: var(--cue-button-${this.size()}-icon-width);\n --button-height: var(--cue-button-${this.size()}-height);\n --cue-button-border-radius: var(--cue-button-border-radius, 9999px);\n --button-label-padding-x: var(--cue-button-${this.size()}-label-padding-x);\n `,this.disabled()?`\n color: var(--cue-button-${this.variant()}-disabled-foreground);\n --cue-button-border-color: var(--cue-button-${this.variant()}-disabled-border-color);\n --background-color: var(--cue-button-${this.variant()}-disabled-background);\n `:""].join(""));handleClick(C){C.detail>0&&this.buttonElement().nativeElement.blur(),this.toggleButton()&&(C.stopPropagation(),this.selected.set(!this.selected()))}static \u0275fac=function(h){return new(h||p)};static \u0275cmp=a.VBU({type:p,selectors:[["cue-button"]],viewQuery:function(h,e){1&h&&a.wEZ(e.buttonElement,b,5),2&h&&a.NyB()},inputs:{variant:[1,"variant"],size:[1,"size"],tooltip:[1,"tooltip"],disabled:[1,"disabled"],selected:[1,"selected"],toggleButton:[1,"toggleButton"],loading:[1,"loading"],fitParentWidth:[1,"fitParentWidth"],noWrap:[1,"noWrap"]},outputs:{selected:"selectedChange"},ngContentSelectors:m,decls:3,vars:18,consts:[["buttonElement",""],["tooltipSize","small",3,"click","disabled","cueTooltip","tooltipPlacement","cuePulse"]],template:function(h,e){1&h&&(a.NAR(),a.j41(0,"button",1,0),a.bIt("click",function(P){return e.handleClick(P)}),a.SdG(2),a.k0s()),2&h&&(a.Aen(e.getStyles()),a.xc7("white-space",e.noWrap()?"nowrap":"normal")("flex-basis",e.noWrap()?null:"auto")("min-width",e.noWrap()?null:"fit-content"),a.AVh("selected",e.selected())("ghost","ghost"===e.variant())("fit-parent-width",e.fitParentWidth()),a.Y8G("disabled",e.disabled())("cueTooltip",e.tooltip())("tooltipPlacement","top")("cuePulse",e.loading()))},dependencies:[r.MD,c.d,_.V],styles:['[_nghost-%COMP%]:has(.fit-parent-width){display:contents}@keyframes _ngcontent-%COMP%_pulse-border{0%{box-shadow:0 0 0 0 var(--focus-color)}50%{box-shadow:0 0 0 8px transparent}to{box-shadow:0 0 0 0 transparent}}button[_ngcontent-%COMP%]{min-width:0;pulse-border-radius:var(--cue-button-border-radius);appearance:none;padding:0;font:inherit;border:var(--cue-button-border-width) var(--cue-button-border-style) var(--cue-button-border-color);display:flex;justify-content:space-between;align-items:center;gap:var(--cue-button-gap);min-height:var(--button-height);height:auto;background-color:var(--background-color);border-radius:var(--cue-button-border-radius, 9999px);margin:3px;position:relative}button[style*="white-space: normal"][_ngcontent-%COMP%]{border-radius:30px!important;padding:10px!important}button.fit-parent-width[_ngcontent-%COMP%]{width:100%;min-width:0;margin-inline:0}button[_ngcontent-%COMP%]:not(.fit-parent-width){min-width:fit-content;width:auto}button[_ngcontent-%COMP%]:focus{outline:none}button[_ngcontent-%COMP%]:hover:not(:disabled), button[_ngcontent-%COMP%]:focus-within:not(:disabled){outline:1px solid var(--focus-color);outline-offset:2px;cursor:pointer}button.selected[_ngcontent-%COMP%]{outline:1px solid currentColor!important;outline-offset:2px;margin:3px}button.ghost[_ngcontent-%COMP%]:not(.selected){border:none}']})}return p})()},2339(D,v,o){o.d(v,{v:()=>p});var r=o(7705),u=o(5971),i=o(2014),c=o(5448),_=o(29),a=o(5547),b=o(5802);const m=["*"];function g(f,C){if(1&f){const h=a.RV6();a.j41(0,"span",2),a.bIt("click",function(y){b.eBV(h);const P=a.XpG();return b.Njj(P.onRemove(y))}),a.nrm(1,"cue-svg-icon",3),a.k0s()}if(2&f){const h=a.XpG();a.AVh("disabled",h.disabled()),a.BMQ("title",h.removeLabel())("aria-label",h.removeLabel())}}let p=(()=>{class f{size=(0,r.hFB)("s");selected=(0,r.geq)(!1);disabled=(0,r.geq)(!1);passive=(0,r.hFB)(!1);variant=(0,r.hFB)("primary");removable=(0,r.hFB)(!1);removeLabel=(0,r.hFB)("Remove");removed=(0,r.CGW)();toggleSelect(){this.passive()||this.selected.set(!this.selected())}onRemove(h){h.stopPropagation(),!this.disabled()&&this.removed.emit()}static \u0275fac=function(e){return new(e||f)};static \u0275cmp=a.VBU({type:f,selectors:[["cue-chip"]],inputs:{size:[1,"size"],selected:[1,"selected"],disabled:[1,"disabled"],passive:[1,"passive"],variant:[1,"variant"],removable:[1,"removable"],removeLabel:[1,"removeLabel"]},outputs:{selected:"selectedChange",disabled:"disabledChange",removed:"removed"},ngContentSelectors:m,decls:6,vars:4,consts:[[1,"is-chip",3,"click","size","disabled","variant"],[1,"chip-remove",3,"disabled"],[1,"chip-remove",3,"click"],["name","close"]],template:function(e,y){1&e&&(a.NAR(),a.j41(0,"cue-button",0),a.bIt("click",function(){return y.toggleSelect()}),a.nrm(1,"cue-button-padder"),a.j41(2,"cue-button-label"),a.SdG(3),a.k0s(),a.nrm(4,"cue-button-padder"),a.nVh(5,g,2,4,"span",1),a.k0s()),2&e&&(a.Y8G("size",y.size())("disabled",y.disabled())("variant",y.selected()?y.variant():"secondary"),a.R7$(5),a.vxM(y.removable()?5:-1))},dependencies:[u.$,i.z,c.L,_.A],styles:["cue-button.is-chip[_ngcontent-%COMP%]{--cue-button-s-padding-x: 8px;--cue-button-m-padding-x: 12px;--cue-button-l-padding-x: 16px}.chip-remove[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;--cue-icon-width: .9em;margin-inline-start:4px;margin-inline-end:-2px;border-radius:50%;cursor:pointer;opacity:.6;transition:opacity .1s ease,background-color .1s ease}.chip-remove[_ngcontent-%COMP%]:hover{opacity:1;background-color:color-mix(in srgb,currentColor 18%,transparent)}.chip-remove.disabled[_ngcontent-%COMP%]{pointer-events:none;opacity:.3}"],changeDetection:0})}return f})()},9822(D,v,o){o.d(v,{y:()=>$});var r=o(467),u=o(7705),i=o(5802),c=o(2271),_=o(9352),a=o(2339),b=o(5971),m=o(5448),g=o(3319),p=o(2014),f=o(63),C=o(5381),h=o(2245),e=o(5547);function y(l,M){1&l&&(e.j41(0,"cue-flexcontainer",0)(1,"cue-typography",2),e.EFF(2),e.nI1(3,"transloco"),e.k0s()()),2&l&&(e.R7$(2),e.JRh(e.bMT(3,1,"components.documentFilter.loading")))}function P(l,M){if(1&l){const t=e.RV6();e.j41(0,"cue-chip",7),e.nI1(1,"transloco"),e.bIt("removed",function(){const s=i.eBV(t).$index,d=e.XpG(2);return i.Njj(d._remove(s))}),e.j41(2,"span",8),e.EFF(3),e.k0s(),e.EFF(4),e.k0s()}if(2&l){const t=M.$implicit,n=e.XpG(2);e.Y8G("selected",!0)("passive",!0)("removable",!0)("removeLabel",e.bMT(1,6,"components.documentFilter.removeFilter")),e.R7$(3),e.SpI("",n._chipDim(t),":"),e.R7$(),e.SpI("",t.label," ")}}function B(l,M){if(1&l){const t=e.RV6();e.j41(0,"div",9)(1,"cue-select",13),e.nI1(2,"transloco"),e.bIt("valueChange",function(s){i.eBV(t);const d=e.XpG(3);return i.Njj(d._onValueSelect("mime",s))}),e.k0s()()}if(2&l){const t=e.XpG(3);e.R7$(),e.Y8G("placeholder",e.bMT(2,5,"components.documentFilter.selectMimePlaceholder"))("underline",!1)("showFilter",t._mimeOptions().length>8)("options",t._mimeOptions())("labelMap",t._mimeLabels())}}function L(l,M){if(1&l){const t=e.RV6();e.j41(0,"div",9)(1,"cue-select",13),e.nI1(2,"transloco"),e.bIt("valueChange",function(s){i.eBV(t);const d=e.XpG(3);return i.Njj(d._onValueSelect("content",s))}),e.k0s()()}if(2&l){const t=e.XpG(3);e.R7$(),e.Y8G("placeholder",e.bMT(2,5,"components.documentFilter.selectContentPlaceholder"))("underline",!1)("showFilter",t._contentOptions().length>8)("options",t._contentOptions())("labelMap",t._contentLabels())}}function T(l,M){if(1&l){const t=e.RV6();e.j41(0,"div",15)(1,"cue-select",16),e.nI1(2,"transloco"),e.bIt("valueChange",function(s){i.eBV(t);const d=e.XpG(4);return i.Njj(d._onEntityValueSelect(s))}),e.k0s()()}if(2&l){const t=e.XpG(4);e.R7$(),e.Y8G("placeholder",e.bMT(2,6,"components.documentFilter.selectEntityPlaceholder"))("underline",!1)("loading",t._entityLoading())("showFilter",!0)("options",t._entityValueOptions())("labelMap",t._entityValueLabels())}}function I(l,M){if(1&l){const t=e.RV6();e.j41(0,"div",9)(1,"cue-select",14),e.nI1(2,"transloco"),e.bIt("valueChange",function(s){i.eBV(t);const d=e.XpG(3);return i.Njj(d._onEntityCatSelect(s))}),e.k0s()(),e.nVh(3,T,3,8,"div",15)}if(2&l){let t;const n=e.XpG(3);e.R7$(),e.Y8G("placeholder",e.bMT(2,7,"components.documentFilter.selectEntityTypePlaceholder"))("underline",!1)("showFilter",n._entityCatOptions().length>8)("options",n._entityCatOptions())("labelMap",n._entityCatLabels())("value",(null==(t=n._draftEntityCat())?null:t.iri)??""),e.R7$(2),e.vxM(n._draftEntityCat()?3:-1)}}function R(l,M){if(1&l){const t=e.RV6();e.j41(0,"div",4)(1,"div",9)(2,"cue-select",10),e.nI1(3,"transloco"),e.bIt("valueChange",function(s){i.eBV(t);const d=e.XpG(2);return i.Njj(d._onDimSelect(s))}),e.k0s()(),e.nVh(4,B,3,7,"div",9),e.nVh(5,L,3,7,"div",9),e.nVh(6,I,4,9),e.j41(7,"cue-button",11),e.bIt("click",function(){i.eBV(t);const s=e.XpG(2);return i.Njj(s._cancelAdd())}),e.j41(8,"cue-button-label",12),e.EFF(9),e.nI1(10,"transloco"),e.k0s()()()}if(2&l){const t=e.XpG(2);e.R7$(2),e.Y8G("placeholder",e.bMT(3,9,"components.documentFilter.filterByPlaceholder"))("underline",!1)("options",t._dimOptions())("labelMap",t._dimLabels())("value",t._draftDim()??""),e.R7$(2),e.vxM("mime"===t._draftDim()?4:-1),e.R7$(),e.vxM("content"===t._draftDim()?5:-1),e.R7$(),e.vxM("entity"===t._draftDim()?6:-1),e.R7$(3),e.JRh(e.bMT(10,11,"components.documentFilter.cancel"))}}function A(l,M){if(1&l){const t=e.RV6();e.j41(0,"cue-button",17),e.bIt("click",function(){i.eBV(t);const s=e.XpG(2);return i.Njj(s._startAdd())}),e.j41(1,"cue-button-padder"),e.nrm(2,"cue-button-icon",18),e.k0s(),e.j41(3,"cue-button-label",12),e.EFF(4),e.nI1(5,"transloco"),e.k0s()()}if(2&l){const t=e.XpG(2);e.Y8G("disabled",t._refreshing()||!t._hasAnyOption()),e.R7$(4),e.JRh(e.bMT(5,2,"components.documentFilter.addFilter"))}}function W(l,M){if(1&l){const t=e.RV6();e.j41(0,"cue-button",19),e.bIt("click",function(){i.eBV(t);const s=e.XpG(2);return i.Njj(s._clearAll())}),e.j41(1,"cue-button-label",12),e.EFF(2),e.nI1(3,"transloco"),e.k0s()()}2&l&&(e.R7$(2),e.JRh(e.bMT(3,1,"components.documentFilter.clear")))}function N(l,M){1&l&&(e.j41(0,"cue-typography",2),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&l&&(e.R7$(),e.JRh(e.bMT(2,1,"components.documentFilter.updating")))}function V(l,M){if(1&l&&(e.j41(0,"cue-flexcontainer",1),e.Z7z(1,P,5,8,"cue-chip",3,e.Vm6),e.nVh(3,R,11,13,"div",4)(4,A,6,4,"cue-button",5),e.nVh(5,W,4,3,"cue-button",6),e.nVh(6,N,3,3,"cue-typography",2),e.k0s()),2&l){const t=e.XpG();e.R7$(),e.Dyx(t._committed()),e.R7$(2),e.vxM(t._adding()?3:4),e.R7$(2),e.vxM(t._committed().length>0&&!t._adding()?5:-1),e.R7$(),e.vxM(t._refreshing()?6:-1)}}const F={mimes:[],contents:[],entityCategories:[]},j={mimes:[],contents:[],entityCategories:[],entities:[]},x="__ANY__",E="components.documentFilter";let $=(()=>{class l{handlers=u.hFB.required();filtersChange=(0,u.CGW)();ANY=x;_dimMimeLabel=(0,_.Xx)(`${E}.dimMime`);_dimContentLabel=(0,_.Xx)(`${E}.dimContent`);_dimEntityLabel=(0,_.Xx)(`${E}.dimEntity`);_chipMimeLabel=(0,_.Xx)(`${E}.chipMime`);_chipContentLabel=(0,_.Xx)(`${E}.chipContent`);_anyLabel=(0,_.Xx)(`${E}.any`);_anyOfCategoryParams=(0,c.EW)(()=>({category:this._draftEntityCat()?.label??""}));_anyOfCategoryLabel=(0,_.Xx)(`${E}.anyOfCategory`,this._anyOfCategoryParams);_dimLabels=(0,c.EW)(()=>({mime:this._dimMimeLabel(),content:this._dimContentLabel(),entity:this._dimEntityLabel()}));_opts=(0,i.vPA)(F);_committed=(0,i.vPA)([]);_loading=(0,i.vPA)(!1);_refreshing=(0,i.vPA)(!1);_adding=(0,i.vPA)(!1);_draftDim=(0,i.vPA)(null);_draftEntityCat=(0,i.vPA)(null);_entityValues=(0,i.vPA)([]);_entityLoading=(0,i.vPA)(!1);_mimeChoices=(0,c.EW)(()=>this._available("mime",this._opts().mimes));_contentChoices=(0,c.EW)(()=>this._available("content",this._opts().contents));_entityCatChoices=(0,c.EW)(()=>this._opts().entityCategories);_hasAnyOption=(0,c.EW)(()=>this._mimeChoices().length>0||this._contentChoices().length>0||this._entityCatChoices().length>0);_dimOptions=(0,c.EW)(()=>{const t=[];return this._mimeChoices().length&&t.push("mime"),this._contentChoices().length&&t.push("content"),this._entityCatChoices().length&&t.push("entity"),t});_mimeOptions=(0,c.EW)(()=>this._mimeChoices().map(t=>t.iri));_mimeLabels=(0,c.EW)(()=>this._toLabelMap(this._mimeChoices()));_contentOptions=(0,c.EW)(()=>this._contentChoices().map(t=>t.iri));_contentLabels=(0,c.EW)(()=>this._toLabelMap(this._contentChoices()));_entityCatOptions=(0,c.EW)(()=>this._entityCatChoices().map(t=>t.iri));_entityCatLabels=(0,c.EW)(()=>this._toLabelMap(this._entityCatChoices()));_entityValueOptions=(0,c.EW)(()=>[x,...this._entityValues().map(t=>t.iri)]);_entityValueLabels=(0,c.EW)(()=>{const t=this._draftEntityCat(),n={[x]:t?this._anyOfCategoryLabel():this._anyLabel()};for(const s of this._entityValues())n[s.iri]=s.label;return n});constructor(){(0,i.QZP)(()=>{const t=this.handlers();this._reset(t)})}_startAdd(){this._resetDraft(),this._adding.set(!0)}_cancelAdd(){this._adding.set(!1),this._resetDraft()}_onDimSelect(t){this._draftEntityCat.set(null),this._entityValues.set([]),this._draftDim.set(t||null)}_onValueSelect(t,n){var s=this;return(0,r.A)(function*(){if(!n)return;const O=("mime"===t?s._opts().mimes:s._opts().contents).find(z=>z.iri===n)?.label??n;yield s._commit({dim:t,valueIri:n,label:O,isEntityInstance:!1})})()}_onEntityCatSelect(t){var n=this;return(0,r.A)(function*(){if(n._entityValues.set([]),!t)return void n._draftEntityCat.set(null);const s=n._opts().entityCategories.find(d=>d.iri===t)??{iri:t,label:t};n._draftEntityCat.set(s),n._entityLoading.set(!0);try{const d=yield n.handlers().requestAvailableEntities(t,n._applied());n._entityValues.set(d)}catch(d){console.error("[document-filter] Failed to load entities",d),n._entityValues.set([])}finally{n._entityLoading.set(!1)}})()}_onEntityValueSelect(t){var n=this;return(0,r.A)(function*(){if(!t)return;const s=n._draftEntityCat();if(s)if(t===x)yield n._commit({dim:"entity",valueIri:s.iri,label:n._anyLabel(),isEntityInstance:!1,categoryIri:s.iri,categoryLabel:s.label});else{const d=n._entityValues().find(O=>O.iri===t);yield n._commit({dim:"entity",valueIri:t,label:d?.label??t,isEntityInstance:!0,categoryIri:s.iri,categoryLabel:s.label})}})()}_remove(t){var n=this;return(0,r.A)(function*(){n._committed.update(s=>s.filter((d,O)=>O!==t)),yield n._refreshOptions(),n._emitFilters()})()}_clearAll(){var t=this;return(0,r.A)(function*(){t._committed.set([]),t._adding.set(!1),t._resetDraft(),yield t._refreshOptions(),t._emitFilters()})()}_chipDim(t){return"mime"===t.dim?this._chipMimeLabel():"content"===t.dim?this._chipContentLabel():t.categoryLabel??this._dimEntityLabel()}_commit(t){var n=this;return(0,r.A)(function*(){n._committed.update(s=>[...s,t]),n._adding.set(!1),n._resetDraft(),yield n._refreshOptions(),n._emitFilters()})()}_resetDraft(){this._draftDim.set(null),this._draftEntityCat.set(null),this._entityValues.set([]),this._entityLoading.set(!1)}_toLabelMap(t){const n={};for(const s of t)n[s.iri]=s.label;return n}_available(t,n){const s=new Set(this._committed().filter(d=>d.dim===t).map(d=>d.valueIri));return n.filter(d=>!s.has(d.iri))}_applied(){const t=this._committed();return{mimes:t.filter(n=>"mime"===n.dim).map(n=>n.valueIri),contents:t.filter(n=>"content"===n.dim).map(n=>n.valueIri),entityCategories:t.filter(n=>"entity"===n.dim&&!n.isEntityInstance).map(n=>n.valueIri),entities:t.filter(n=>"entity"===n.dim&&n.isEntityInstance).map(n=>n.valueIri)}}_reset(t){var n=this;return(0,r.A)(function*(){n._committed.set([]),n._opts.set(F),n._adding.set(!1),n._resetDraft(),n._loading.set(!0);try{n._opts.set(yield t.requestAvailableFilters(j))}catch(s){console.error("[document-filter] Failed to load available filters",s)}finally{n._loading.set(!1)}})()}_refreshOptions(){var t=this;return(0,r.A)(function*(){t._refreshing.set(!0);try{t._opts.set(yield t.handlers().requestAvailableFilters(t._applied()))}catch(n){console.error("[document-filter] Adaptive refresh failed",n)}finally{t._refreshing.set(!1)}})()}_emitFilters(){const t=this._committed().map(n=>({type:"mime"===n.dim?"mime":"content"===n.dim?"content":n.isEntityInstance?"entityInstance":"entity",included:[n.valueIri],excluded:[]}));this.filtersChange.emit(t)}static \u0275fac=function(n){return new(n||l)};static \u0275cmp=e.VBU({type:l,selectors:[["cue-doc-filter"]],inputs:{handlers:[1,"handlers"]},outputs:{filtersChange:"filtersChange"},decls:2,vars:1,consts:[["align","center","gap","s"],["align","center","gap","s","wrap","wrap"],["size","s",1,"muted"],["size","xs","variant","primary",3,"selected","passive","removable","removeLabel"],[1,"draft"],["size","xs","variant","tertiary",3,"disabled"],["size","xs","variant","danger"],["size","xs","variant","primary",3,"removed","selected","passive","removable","removeLabel"],[1,"chip-dim"],[1,"filter-select"],["size","xs",3,"valueChange","placeholder","underline","options","labelMap","value"],["size","xs","variant","ghost",3,"click"],["fontSize","s"],["size","xs",3,"valueChange","placeholder","underline","showFilter","options","labelMap"],["size","xs",3,"valueChange","placeholder","underline","showFilter","options","labelMap","value"],[1,"filter-select","entity-value"],["size","xs",3,"valueChange","placeholder","underline","loading","showFilter","options","labelMap"],["size","xs","variant","tertiary",3,"click","disabled"],["icon","add"],["size","xs","variant","danger",3,"click"]],template:function(n,s){1&n&&e.nVh(0,y,4,3,"cue-flexcontainer",0)(1,V,7,3,"cue-flexcontainer",1),2&n&&e.vxM(s._loading()?0:1)},dependencies:[a.v,b.$,m.L,g.a,p.z,f.Select,C.n,h.Typography,_.Kj],styles:["[_nghost-%COMP%]{display:block}.filter-select[_ngcontent-%COMP%]{width:170px}.filter-select.entity-value[_ngcontent-%COMP%]{width:200px}.draft[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:8px;padding:2px 6px 2px 10px;border:1px dashed var(--cue-border-color);border-radius:10px}.chip-dim[_ngcontent-%COMP%]{font-weight:600;opacity:.72;margin-inline-end:4px}.muted[_ngcontent-%COMP%]{color:var(--cue-color-darkmidgray)}"],changeDetection:0})}return l})()},2403(D,v,o){o.d(v,{V:()=>c});var r=o(7705),u=o(5547),i=o(5802);let c=(()=>{class _{el=(0,i.WQX)(u.aKT);renderer=(0,i.WQX)(u.sFG);cuePulse=(0,r.hFB)(!1);cuePulseColor=(0,r.hFB)("");cuePulseMode=(0,r.hFB)("border");activeClass="";constructor(){this.ensureGlobalStyles()}onPulseChanged=(0,i.QZP)(()=>{const b=this.cuePulse(),m=this.cuePulseColor(),g=this.cuePulseMode(),p=this.el.nativeElement;if(this.activeClass&&(this.renderer.removeClass(p,this.activeClass),this.activeClass=""),this.renderer.removeStyle(p,"--cue-pulse-color"),this.renderer.removeStyle(p,"border-radius"),b){const f="text"===g?"cue-pulse-text":"cue-pulse-border";this.renderer.addClass(p,f),this.activeClass=f,m&&this.renderer.setStyle(p,"--cue-pulse-color",m),"border"===g&&setTimeout(()=>{const C=p.firstElementChild;if(C){const h=getComputedStyle(C).borderRadius;h&&"0px"!==h&&this.renderer.setStyle(p,"border-radius",h)}})}});ngOnDestroy(){const b=this.el.nativeElement;this.activeClass&&this.renderer.removeClass(b,this.activeClass),this.renderer.removeStyle(b,"border-radius")}ensureGlobalStyles(){const b="cue-pulse-global-styles";if(document.getElementById(b))return;const m=document.createElement("style");m.id=b,m.textContent="\n @keyframes cue-pulse-border-anim {\n 0% {\n box-shadow: 0 0 0 0 var(--cue-pulse-color, currentColor);\n }\n 70% {\n box-shadow: 0 0 0 8px transparent;\n }\n 100% {\n box-shadow: 0 0 0 0 transparent;\n }\n }\n\n @keyframes cue-pulse-text-anim {\n 0%, 100% {\n opacity: 1;\n }\n 50% {\n opacity: 0.4;\n }\n }\n\n .cue-pulse-border {\n animation: cue-pulse-border-anim 1.5s infinite ease-in-out;\n }\n\n .cue-pulse-text {\n animation: cue-pulse-text-anim 1.5s infinite ease-in-out;\n }\n ",document.head.appendChild(m)}static \u0275fac=function(m){return new(m||_)};static \u0275dir=u.FsC({type:_,selectors:[["","cuePulse",""]],inputs:{cuePulse:[1,"cuePulse"],cuePulseColor:[1,"cuePulseColor"],cuePulseMode:[1,"cuePulseMode"]}})}return _})()}}]);
|
|
1
|
+
"use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[2014,3319,5971,7441],{3319(P,f,i){i.d(f,{ButtonIcon:()=>d});var r=i(7705),u=i(29),o=i(5547);let d=(()=>{class _{icon=(0,r.hFB)(void 0);slot=(0,r.hFB)("before");static \u0275fac=function(p){return new(p||_)};static \u0275cmp=o.VBU({type:_,selectors:[["cue-button-icon"]],inputs:{icon:[1,"icon"],slot:[1,"slot"]},decls:1,vars:2,consts:[[3,"slot","name"]],template:function(p,b){1&p&&o.nrm(0,"cue-svg-icon",0),2&p&&o.Y8G("slot",b.slot())("name",b.icon())},dependencies:[u.A],encapsulation:2})}return _})()},2014(P,f,i){i.d(f,{ButtonPadder:()=>_});var r=i(7705),u=i(2271),o=i(5547);const d=["*"];let _=(()=>{class s{justify=(0,r.hFB)("start");size=(0,r.hFB)("l");widthStyle=(0,u.EW)(()=>`var(--cue-button-label-padding-${this.size()}-x)`);static \u0275fac=function(b){return new(b||s)};static \u0275cmp=o.VBU({type:s,selectors:[["cue-button-padder"]],inputs:{justify:[1,"justify"],size:[1,"size"]},ngContentSelectors:d,decls:2,vars:4,template:function(b,h){1&b&&(o.NAR(),o.rj2(0,"div"),o.SdG(1),o.eux()),2&b&&o.xc7("justify-content",h.justify())("min-width",h.widthStyle())},styles:["div[_ngcontent-%COMP%]{display:flex;align-items:center;min-height:1px}"]})}return s})()},5971(P,f,i){i.d(f,{Button:()=>b});var r=i(9769),u=i(7705),o=i(2271),d=i(7089),_=i(2403),s=i(5547);const g=["buttonElement"],p=["*"];let b=(()=>{class h{variant=(0,u.hFB)("primary");size=(0,u.hFB)("m");tooltip=(0,u.hFB)("");disabled=(0,u.hFB)(!1);selected=(0,u.geq)(!1);toggleButton=(0,u.hFB)(!1);loading=(0,u.hFB)(!1);fitParentWidth=(0,u.hFB)(!1);noWrap=(0,u.hFB)(!0);buttonElement=u.ebz.required("buttonElement");getStyles=(0,o.EW)(()=>[`\n padding: 0 var(--cue-button-${this.size()}-padding-x);\n\n --focus-color: var(--cue-button-${this.variant()}-focus-color);\n --cue-button-border-color: var(--cue-button-${this.variant()}-border-color);\n color: var(--cue-button-${this.variant()}-foreground);\n --background-color: var(--cue-button-${this.variant()}-background);\n\n --cue-icon-width: var(--cue-button-${this.size()}-icon-width);\n --button-height: var(--cue-button-${this.size()}-height);\n --cue-button-border-radius: var(--cue-button-border-radius, 9999px);\n --button-label-padding-x: var(--cue-button-${this.size()}-label-padding-x);\n `,this.disabled()?`\n color: var(--cue-button-${this.variant()}-disabled-foreground);\n --cue-button-border-color: var(--cue-button-${this.variant()}-disabled-border-color);\n --background-color: var(--cue-button-${this.variant()}-disabled-background);\n `:""].join(""));handleClick(C){C.detail>0&&this.buttonElement().nativeElement.blur(),this.toggleButton()&&(C.stopPropagation(),this.selected.set(!this.selected()))}static \u0275fac=function(m){return new(m||h)};static \u0275cmp=s.VBU({type:h,selectors:[["cue-button"]],viewQuery:function(m,e){1&m&&s.wEZ(e.buttonElement,g,5),2&m&&s.NyB()},inputs:{variant:[1,"variant"],size:[1,"size"],tooltip:[1,"tooltip"],disabled:[1,"disabled"],selected:[1,"selected"],toggleButton:[1,"toggleButton"],loading:[1,"loading"],fitParentWidth:[1,"fitParentWidth"],noWrap:[1,"noWrap"]},outputs:{selected:"selectedChange"},ngContentSelectors:p,decls:3,vars:18,consts:[["buttonElement",""],["tooltipSize","small",3,"click","disabled","cueTooltip","tooltipPlacement","cuePulse"]],template:function(m,e){1&m&&(s.NAR(),s.j41(0,"button",1,0),s.bIt("click",function(D){return e.handleClick(D)}),s.SdG(2),s.k0s()),2&m&&(s.Aen(e.getStyles()),s.xc7("white-space",e.noWrap()?"nowrap":"normal")("flex-basis",e.noWrap()?null:"auto")("min-width",e.noWrap()?null:"fit-content"),s.AVh("selected",e.selected())("ghost","ghost"===e.variant())("fit-parent-width",e.fitParentWidth()),s.Y8G("disabled",e.disabled())("cueTooltip",e.tooltip())("tooltipPlacement","top")("cuePulse",e.loading()))},dependencies:[r.MD,d.d,_.V],styles:['[_nghost-%COMP%]:has(.fit-parent-width){display:contents}@keyframes _ngcontent-%COMP%_pulse-border{0%{box-shadow:0 0 0 0 var(--focus-color)}50%{box-shadow:0 0 0 8px transparent}to{box-shadow:0 0 0 0 transparent}}button[_ngcontent-%COMP%]{min-width:0;pulse-border-radius:var(--cue-button-border-radius);appearance:none;padding:0;font:inherit;border:var(--cue-button-border-width) var(--cue-button-border-style) var(--cue-button-border-color);display:flex;justify-content:space-between;align-items:center;gap:var(--cue-button-gap);min-height:var(--button-height);height:auto;background-color:var(--background-color);border-radius:var(--cue-button-border-radius, 9999px);margin:3px;position:relative}button[style*="white-space: normal"][_ngcontent-%COMP%]{border-radius:30px!important;padding:10px!important}button.fit-parent-width[_ngcontent-%COMP%]{width:100%;min-width:0;margin-inline:0}button[_ngcontent-%COMP%]:not(.fit-parent-width){min-width:fit-content;width:auto}button[_ngcontent-%COMP%]:focus{outline:none}button[_ngcontent-%COMP%]:hover:not(:disabled), button[_ngcontent-%COMP%]:focus-within:not(:disabled){outline:1px solid var(--focus-color);outline-offset:2px;cursor:pointer}button.selected[_ngcontent-%COMP%]{outline:1px solid currentColor!important;outline-offset:2px;margin:3px}button.ghost[_ngcontent-%COMP%]:not(.selected){border:none}']})}return h})()},2339(P,f,i){i.d(f,{v:()=>h});var r=i(7705),u=i(5971),o=i(2014),d=i(5448),_=i(29),s=i(5547),g=i(5802);const p=["*"];function b(v,C){if(1&v){const m=s.RV6();s.j41(0,"span",2),s.bIt("click",function(y){g.eBV(m);const D=s.XpG();return g.Njj(D.onRemove(y))}),s.nrm(1,"cue-svg-icon",3),s.k0s()}if(2&v){const m=s.XpG();s.AVh("disabled",m.disabled()),s.BMQ("title",m.removeLabel())("aria-label",m.removeLabel())}}let h=(()=>{class v{size=(0,r.hFB)("s");selected=(0,r.geq)(!1);disabled=(0,r.geq)(!1);passive=(0,r.hFB)(!1);variant=(0,r.hFB)("primary");removable=(0,r.hFB)(!1);removeLabel=(0,r.hFB)("Remove");removed=(0,r.CGW)();toggleSelect(){this.passive()||this.selected.set(!this.selected())}onRemove(m){m.stopPropagation(),!this.disabled()&&this.removed.emit()}static \u0275fac=function(e){return new(e||v)};static \u0275cmp=s.VBU({type:v,selectors:[["cue-chip"]],inputs:{size:[1,"size"],selected:[1,"selected"],disabled:[1,"disabled"],passive:[1,"passive"],variant:[1,"variant"],removable:[1,"removable"],removeLabel:[1,"removeLabel"]},outputs:{selected:"selectedChange",disabled:"disabledChange",removed:"removed"},ngContentSelectors:p,decls:6,vars:4,consts:[[1,"is-chip",3,"click","size","disabled","variant"],[1,"chip-remove",3,"disabled"],[1,"chip-remove",3,"click"],["name","close"]],template:function(e,y){1&e&&(s.NAR(),s.j41(0,"cue-button",0),s.bIt("click",function(){return y.toggleSelect()}),s.nrm(1,"cue-button-padder"),s.j41(2,"cue-button-label"),s.SdG(3),s.k0s(),s.nrm(4,"cue-button-padder"),s.nVh(5,b,2,4,"span",1),s.k0s()),2&e&&(s.Y8G("size",y.size())("disabled",y.disabled())("variant",y.selected()?y.variant():"secondary"),s.R7$(5),s.vxM(y.removable()?5:-1))},dependencies:[u.Button,o.ButtonPadder,d.ButtonLabel,_.A],styles:["cue-button.is-chip[_ngcontent-%COMP%]{--cue-button-s-padding-x: 8px;--cue-button-m-padding-x: 12px;--cue-button-l-padding-x: 16px}.chip-remove[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;--cue-icon-width: .9em;margin-inline-start:4px;margin-inline-end:-2px;border-radius:50%;cursor:pointer;opacity:.6;transition:opacity .1s ease,background-color .1s ease}.chip-remove[_ngcontent-%COMP%]:hover{opacity:1;background-color:color-mix(in srgb,currentColor 18%,transparent)}.chip-remove.disabled[_ngcontent-%COMP%]{pointer-events:none;opacity:.3}"],changeDetection:0})}return v})()},9822(P,f,i){i.d(f,{y:()=>$});var r=i(467),u=i(7705),o=i(5802),d=i(2271),_=i(9352),s=i(2339),g=i(5971),p=i(5448),b=i(3319),h=i(2014),v=i(63),C=i(5381),m=i(2245),e=i(5547);function y(l,M){1&l&&(e.j41(0,"cue-flexcontainer",0)(1,"cue-typography",2),e.EFF(2),e.nI1(3,"transloco"),e.k0s()()),2&l&&(e.R7$(2),e.JRh(e.bMT(3,1,"components.documentFilter.loading")))}function D(l,M){if(1&l){const t=e.RV6();e.j41(0,"cue-chip",7),e.nI1(1,"transloco"),e.bIt("removed",function(){const a=o.eBV(t).$index,c=e.XpG(2);return o.Njj(c._remove(a))}),e.j41(2,"span",8),e.EFF(3),e.k0s(),e.EFF(4),e.k0s()}if(2&l){const t=M.$implicit,n=e.XpG(2);e.Y8G("selected",!0)("passive",!0)("removable",!0)("removeLabel",e.bMT(1,6,"components.documentFilter.removeFilter")),e.R7$(3),e.SpI("",n._chipDim(t),":"),e.R7$(),e.SpI("",t.label," ")}}function F(l,M){if(1&l){const t=e.RV6();e.j41(0,"div",9)(1,"cue-select",13),e.nI1(2,"transloco"),e.bIt("valueChange",function(a){o.eBV(t);const c=e.XpG(3);return o.Njj(c._onValueSelect("mime",a))}),e.k0s()()}if(2&l){const t=e.XpG(3);e.R7$(),e.Y8G("placeholder",e.bMT(2,5,"components.documentFilter.selectMimePlaceholder"))("underline",!1)("showFilter",t._mimeOptions().length>8)("options",t._mimeOptions())("labelMap",t._mimeLabels())}}function L(l,M){if(1&l){const t=e.RV6();e.j41(0,"div",9)(1,"cue-select",13),e.nI1(2,"transloco"),e.bIt("valueChange",function(a){o.eBV(t);const c=e.XpG(3);return o.Njj(c._onValueSelect("content",a))}),e.k0s()()}if(2&l){const t=e.XpG(3);e.R7$(),e.Y8G("placeholder",e.bMT(2,5,"components.documentFilter.selectContentPlaceholder"))("underline",!1)("showFilter",t._contentOptions().length>8)("options",t._contentOptions())("labelMap",t._contentLabels())}}function I(l,M){if(1&l){const t=e.RV6();e.j41(0,"div",15)(1,"cue-select",16),e.nI1(2,"transloco"),e.bIt("valueChange",function(a){o.eBV(t);const c=e.XpG(4);return o.Njj(c._onEntityValueSelect(a))}),e.k0s()()}if(2&l){const t=e.XpG(4);e.R7$(),e.Y8G("placeholder",e.bMT(2,6,"components.documentFilter.selectEntityPlaceholder"))("underline",!1)("loading",t._entityLoading())("showFilter",!0)("options",t._entityValueOptions())("labelMap",t._entityValueLabels())}}function T(l,M){if(1&l){const t=e.RV6();e.j41(0,"div",9)(1,"cue-select",14),e.nI1(2,"transloco"),e.bIt("valueChange",function(a){o.eBV(t);const c=e.XpG(3);return o.Njj(c._onEntityCatSelect(a))}),e.k0s()(),e.nVh(3,I,3,8,"div",15)}if(2&l){let t;const n=e.XpG(3);e.R7$(),e.Y8G("placeholder",e.bMT(2,7,"components.documentFilter.selectEntityTypePlaceholder"))("underline",!1)("showFilter",n._entityCatOptions().length>8)("options",n._entityCatOptions())("labelMap",n._entityCatLabels())("value",(null==(t=n._draftEntityCat())?null:t.iri)??""),e.R7$(2),e.vxM(n._draftEntityCat()?3:-1)}}function A(l,M){if(1&l){const t=e.RV6();e.j41(0,"div",4)(1,"div",9)(2,"cue-select",10),e.nI1(3,"transloco"),e.bIt("valueChange",function(a){o.eBV(t);const c=e.XpG(2);return o.Njj(c._onDimSelect(a))}),e.k0s()(),e.nVh(4,F,3,7,"div",9),e.nVh(5,L,3,7,"div",9),e.nVh(6,T,4,9),e.j41(7,"cue-button",11),e.bIt("click",function(){o.eBV(t);const a=e.XpG(2);return o.Njj(a._cancelAdd())}),e.j41(8,"cue-button-label",12),e.EFF(9),e.nI1(10,"transloco"),e.k0s()()()}if(2&l){const t=e.XpG(2);e.R7$(2),e.Y8G("placeholder",e.bMT(3,9,"components.documentFilter.filterByPlaceholder"))("underline",!1)("options",t._dimOptions())("labelMap",t._dimLabels())("value",t._draftDim()??""),e.R7$(2),e.vxM("mime"===t._draftDim()?4:-1),e.R7$(),e.vxM("content"===t._draftDim()?5:-1),e.R7$(),e.vxM("entity"===t._draftDim()?6:-1),e.R7$(3),e.JRh(e.bMT(10,11,"components.documentFilter.cancel"))}}function R(l,M){if(1&l){const t=e.RV6();e.j41(0,"cue-button",17),e.bIt("click",function(){o.eBV(t);const a=e.XpG(2);return o.Njj(a._startAdd())}),e.j41(1,"cue-button-padder"),e.nrm(2,"cue-button-icon",18),e.k0s(),e.j41(3,"cue-button-label",12),e.EFF(4),e.nI1(5,"transloco"),e.k0s()()}if(2&l){const t=e.XpG(2);e.Y8G("disabled",t._refreshing()||!t._hasAnyOption()),e.R7$(4),e.JRh(e.bMT(5,2,"components.documentFilter.addFilter"))}}function N(l,M){if(1&l){const t=e.RV6();e.j41(0,"cue-button",19),e.bIt("click",function(){o.eBV(t);const a=e.XpG(2);return o.Njj(a._clearAll())}),e.j41(1,"cue-button-label",12),e.EFF(2),e.nI1(3,"transloco"),e.k0s()()}2&l&&(e.R7$(2),e.JRh(e.bMT(3,1,"components.documentFilter.clear")))}function W(l,M){1&l&&(e.j41(0,"cue-typography",2),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&l&&(e.R7$(),e.JRh(e.bMT(2,1,"components.documentFilter.updating")))}function V(l,M){if(1&l&&(e.j41(0,"cue-flexcontainer",1),e.Z7z(1,D,5,8,"cue-chip",3,e.Vm6),e.nVh(3,A,11,13,"div",4)(4,R,6,4,"cue-button",5),e.nVh(5,N,4,3,"cue-button",6),e.nVh(6,W,3,3,"cue-typography",2),e.k0s()),2&l){const t=e.XpG();e.R7$(),e.Dyx(t._committed()),e.R7$(2),e.vxM(t._adding()?3:4),e.R7$(2),e.vxM(t._committed().length>0&&!t._adding()?5:-1),e.R7$(),e.vxM(t._refreshing()?6:-1)}}const B={mimes:[],contents:[],entityCategories:[]},j={mimes:[],contents:[],entityCategories:[],entities:[]},x="__ANY__",E="components.documentFilter";let $=(()=>{class l{handlers=u.hFB.required();filtersChange=(0,u.CGW)();ANY=x;_dimMimeLabel=(0,_.Xx)(`${E}.dimMime`);_dimContentLabel=(0,_.Xx)(`${E}.dimContent`);_dimEntityLabel=(0,_.Xx)(`${E}.dimEntity`);_chipMimeLabel=(0,_.Xx)(`${E}.chipMime`);_chipContentLabel=(0,_.Xx)(`${E}.chipContent`);_anyLabel=(0,_.Xx)(`${E}.any`);_anyOfCategoryParams=(0,d.EW)(()=>({category:this._draftEntityCat()?.label??""}));_anyOfCategoryLabel=(0,_.Xx)(`${E}.anyOfCategory`,this._anyOfCategoryParams);_dimLabels=(0,d.EW)(()=>({mime:this._dimMimeLabel(),content:this._dimContentLabel(),entity:this._dimEntityLabel()}));_opts=(0,o.vPA)(B);_committed=(0,o.vPA)([]);_loading=(0,o.vPA)(!1);_refreshing=(0,o.vPA)(!1);_adding=(0,o.vPA)(!1);_draftDim=(0,o.vPA)(null);_draftEntityCat=(0,o.vPA)(null);_entityValues=(0,o.vPA)([]);_entityLoading=(0,o.vPA)(!1);_mimeChoices=(0,d.EW)(()=>this._available("mime",this._opts().mimes));_contentChoices=(0,d.EW)(()=>this._available("content",this._opts().contents));_entityCatChoices=(0,d.EW)(()=>this._opts().entityCategories);_hasAnyOption=(0,d.EW)(()=>this._mimeChoices().length>0||this._contentChoices().length>0||this._entityCatChoices().length>0);_dimOptions=(0,d.EW)(()=>{const t=[];return this._mimeChoices().length&&t.push("mime"),this._contentChoices().length&&t.push("content"),this._entityCatChoices().length&&t.push("entity"),t});_mimeOptions=(0,d.EW)(()=>this._mimeChoices().map(t=>t.iri));_mimeLabels=(0,d.EW)(()=>this._toLabelMap(this._mimeChoices()));_contentOptions=(0,d.EW)(()=>this._contentChoices().map(t=>t.iri));_contentLabels=(0,d.EW)(()=>this._toLabelMap(this._contentChoices()));_entityCatOptions=(0,d.EW)(()=>this._entityCatChoices().map(t=>t.iri));_entityCatLabels=(0,d.EW)(()=>this._toLabelMap(this._entityCatChoices()));_entityValueOptions=(0,d.EW)(()=>[x,...this._entityValues().map(t=>t.iri)]);_entityValueLabels=(0,d.EW)(()=>{const t=this._draftEntityCat(),n={[x]:t?this._anyOfCategoryLabel():this._anyLabel()};for(const a of this._entityValues())n[a.iri]=a.label;return n});constructor(){(0,o.QZP)(()=>{const t=this.handlers();this._reset(t)})}_startAdd(){this._resetDraft(),this._adding.set(!0)}_cancelAdd(){this._adding.set(!1),this._resetDraft()}_onDimSelect(t){this._draftEntityCat.set(null),this._entityValues.set([]),this._draftDim.set(t||null)}_onValueSelect(t,n){var a=this;return(0,r.A)(function*(){if(!n)return;const O=("mime"===t?a._opts().mimes:a._opts().contents).find(U=>U.iri===n)?.label??n;yield a._commit({dim:t,valueIri:n,label:O,isEntityInstance:!1})})()}_onEntityCatSelect(t){var n=this;return(0,r.A)(function*(){if(n._entityValues.set([]),!t)return void n._draftEntityCat.set(null);const a=n._opts().entityCategories.find(c=>c.iri===t)??{iri:t,label:t};n._draftEntityCat.set(a),n._entityLoading.set(!0);try{const c=yield n.handlers().requestAvailableEntities(t,n._applied());n._entityValues.set(c)}catch(c){console.error("[document-filter] Failed to load entities",c),n._entityValues.set([])}finally{n._entityLoading.set(!1)}})()}_onEntityValueSelect(t){var n=this;return(0,r.A)(function*(){if(!t)return;const a=n._draftEntityCat();if(a)if(t===x)yield n._commit({dim:"entity",valueIri:a.iri,label:n._anyLabel(),isEntityInstance:!1,categoryIri:a.iri,categoryLabel:a.label});else{const c=n._entityValues().find(O=>O.iri===t);yield n._commit({dim:"entity",valueIri:t,label:c?.label??t,isEntityInstance:!0,categoryIri:a.iri,categoryLabel:a.label})}})()}_remove(t){var n=this;return(0,r.A)(function*(){n._committed.update(a=>a.filter((c,O)=>O!==t)),yield n._refreshOptions(),n._emitFilters()})()}_clearAll(){var t=this;return(0,r.A)(function*(){t._committed.set([]),t._adding.set(!1),t._resetDraft(),yield t._refreshOptions(),t._emitFilters()})()}_chipDim(t){return"mime"===t.dim?this._chipMimeLabel():"content"===t.dim?this._chipContentLabel():t.categoryLabel??this._dimEntityLabel()}_commit(t){var n=this;return(0,r.A)(function*(){n._committed.update(a=>[...a,t]),n._adding.set(!1),n._resetDraft(),yield n._refreshOptions(),n._emitFilters()})()}_resetDraft(){this._draftDim.set(null),this._draftEntityCat.set(null),this._entityValues.set([]),this._entityLoading.set(!1)}_toLabelMap(t){const n={};for(const a of t)n[a.iri]=a.label;return n}_available(t,n){const a=new Set(this._committed().filter(c=>c.dim===t).map(c=>c.valueIri));return n.filter(c=>!a.has(c.iri))}_applied(){const t=this._committed();return{mimes:t.filter(n=>"mime"===n.dim).map(n=>n.valueIri),contents:t.filter(n=>"content"===n.dim).map(n=>n.valueIri),entityCategories:t.filter(n=>"entity"===n.dim&&!n.isEntityInstance).map(n=>n.valueIri),entities:t.filter(n=>"entity"===n.dim&&n.isEntityInstance).map(n=>n.valueIri)}}_reset(t){var n=this;return(0,r.A)(function*(){n._committed.set([]),n._opts.set(B),n._adding.set(!1),n._resetDraft(),n._loading.set(!0);try{n._opts.set(yield t.requestAvailableFilters(j))}catch(a){console.error("[document-filter] Failed to load available filters",a)}finally{n._loading.set(!1)}})()}_refreshOptions(){var t=this;return(0,r.A)(function*(){t._refreshing.set(!0);try{t._opts.set(yield t.handlers().requestAvailableFilters(t._applied()))}catch(n){console.error("[document-filter] Adaptive refresh failed",n)}finally{t._refreshing.set(!1)}})()}_emitFilters(){const t=this._committed().map(n=>({type:"mime"===n.dim?"mime":"content"===n.dim?"content":n.isEntityInstance?"entityInstance":"entity",included:[n.valueIri],excluded:[]}));this.filtersChange.emit(t)}static \u0275fac=function(n){return new(n||l)};static \u0275cmp=e.VBU({type:l,selectors:[["cue-doc-filter"]],inputs:{handlers:[1,"handlers"]},outputs:{filtersChange:"filtersChange"},decls:2,vars:1,consts:[["align","center","gap","s"],["align","center","gap","s","wrap","wrap"],["size","s",1,"muted"],["size","xs","variant","primary",3,"selected","passive","removable","removeLabel"],[1,"draft"],["size","xs","variant","tertiary",3,"disabled"],["size","xs","variant","danger"],["size","xs","variant","primary",3,"removed","selected","passive","removable","removeLabel"],[1,"chip-dim"],[1,"filter-select"],["size","xs",3,"valueChange","placeholder","underline","options","labelMap","value"],["size","xs","variant","ghost",3,"click"],["fontSize","s"],["size","xs",3,"valueChange","placeholder","underline","showFilter","options","labelMap"],["size","xs",3,"valueChange","placeholder","underline","showFilter","options","labelMap","value"],[1,"filter-select","entity-value"],["size","xs",3,"valueChange","placeholder","underline","loading","showFilter","options","labelMap"],["size","xs","variant","tertiary",3,"click","disabled"],["icon","add"],["size","xs","variant","danger",3,"click"]],template:function(n,a){1&n&&e.nVh(0,y,4,3,"cue-flexcontainer",0)(1,V,7,3,"cue-flexcontainer",1),2&n&&e.vxM(a._loading()?0:1)},dependencies:[s.v,g.Button,p.ButtonLabel,b.ButtonIcon,h.ButtonPadder,v.Select,C.FlexContainer,m.Typography,_.Kj],styles:["[_nghost-%COMP%]{display:block}.filter-select[_ngcontent-%COMP%]{width:170px}.filter-select.entity-value[_ngcontent-%COMP%]{width:200px}.draft[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:8px;padding:2px 6px 2px 10px;border:1px dashed var(--cue-border-color);border-radius:10px}.chip-dim[_ngcontent-%COMP%]{font-weight:600;opacity:.72;margin-inline-end:4px}.muted[_ngcontent-%COMP%]{color:var(--cue-color-darkmidgray)}"],changeDetection:0})}return l})()},2403(P,f,i){i.d(f,{V:()=>d});var r=i(7705),u=i(5547),o=i(5802);let d=(()=>{class _{el=(0,o.WQX)(u.aKT);renderer=(0,o.WQX)(u.sFG);cuePulse=(0,r.hFB)(!1);cuePulseColor=(0,r.hFB)("");cuePulseMode=(0,r.hFB)("border");activeClass="";constructor(){this.ensureGlobalStyles()}onPulseChanged=(0,o.QZP)(()=>{const g=this.cuePulse(),p=this.cuePulseColor(),b=this.cuePulseMode(),h=this.el.nativeElement;if(this.activeClass&&(this.renderer.removeClass(h,this.activeClass),this.activeClass=""),this.renderer.removeStyle(h,"--cue-pulse-color"),this.renderer.removeStyle(h,"border-radius"),g){const v="text"===b?"cue-pulse-text":"cue-pulse-border";this.renderer.addClass(h,v),this.activeClass=v,p&&this.renderer.setStyle(h,"--cue-pulse-color",p),"border"===b&&setTimeout(()=>{const C=h.firstElementChild;if(C){const m=getComputedStyle(C).borderRadius;m&&"0px"!==m&&this.renderer.setStyle(h,"border-radius",m)}})}});ngOnDestroy(){const g=this.el.nativeElement;this.activeClass&&this.renderer.removeClass(g,this.activeClass),this.renderer.removeStyle(g,"border-radius")}ensureGlobalStyles(){const g="cue-pulse-global-styles";if(document.getElementById(g))return;const p=document.createElement("style");p.id=g,p.textContent="\n @keyframes cue-pulse-border-anim {\n 0% {\n box-shadow: 0 0 0 0 var(--cue-pulse-color, currentColor);\n }\n 70% {\n box-shadow: 0 0 0 8px transparent;\n }\n 100% {\n box-shadow: 0 0 0 0 transparent;\n }\n }\n\n @keyframes cue-pulse-text-anim {\n 0%, 100% {\n opacity: 1;\n }\n 50% {\n opacity: 0.4;\n }\n }\n\n .cue-pulse-border {\n animation: cue-pulse-border-anim 1.5s infinite ease-in-out;\n }\n\n .cue-pulse-text {\n animation: cue-pulse-text-anim 1.5s infinite ease-in-out;\n }\n ",document.head.appendChild(p)}static \u0275fac=function(p){return new(p||_)};static \u0275dir=u.FsC({type:_,selectors:[["","cuePulse",""]],inputs:{cuePulse:[1,"cuePulse"],cuePulseColor:[1,"cuePulseColor"],cuePulseMode:[1,"cuePulseMode"]}})}return _})()}}]);
|