From a54200c5e582e743a835d84b8427dd8d51d19283 Mon Sep 17 00:00:00 2001 From: lexx Date: Wed, 22 May 2024 17:05:56 +0300 Subject: [PATCH] build --- front/dist/assets/{main.7c3e8b7b.js => main.c1fd60c7.js} | 8 ++++---- front/dist/manifest.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) rename front/dist/assets/{main.7c3e8b7b.js => main.c1fd60c7.js} (95%) diff --git a/front/dist/assets/main.7c3e8b7b.js b/front/dist/assets/main.c1fd60c7.js similarity index 95% rename from front/dist/assets/main.7c3e8b7b.js rename to front/dist/assets/main.c1fd60c7.js index 06e4427..f7fb865 100644 --- a/front/dist/assets/main.7c3e8b7b.js +++ b/front/dist/assets/main.c1fd60c7.js @@ -37,7 +37,7 @@ function print() { __p += __j.call(arguments, '') } */var Gwe=Object.prototype.toString,jD=Array.isArray||function(e){return Gwe.call(e)==="[object Array]"};function rre(o){return typeof o=="function"}function Kwe(o){return jD(o)?"array":typeof o}function gne(o){return o.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function Rle(o,e){return o!=null&&typeof o=="object"&&e in o}function Jwe(o,e){return o!=null&&typeof o!="object"&&o.hasOwnProperty&&o.hasOwnProperty(e)}var e_e=RegExp.prototype.test;function t_e(o,e){return e_e.call(o,e)}var n_e=/\S/;function o_e(o){return!t_e(n_e,o)}var s_e={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};function r_e(o){return String(o).replace(/[&<>"'`=\/]/g,function(t){return s_e[t]})}var i_e=/\s*/,a_e=/\s+/,$le=/\s*=/,l_e=/\s*\}/,c_e=/#|\^|\/|>|\{|&|=|!/;function u_e(o,e){if(!o)return[];var t=!1,s=[],a=[],l=[],u=!1,d=!1,h="",b=0;function y(){if(u&&!d)for(;l.length;)delete a[l.pop()];else l=[];u=!1,d=!1}var C,E,R;function $(we){if(typeof we=="string"&&(we=we.split(a_e,2)),!jD(we)||we.length!==2)throw new Error("Invalid tags: "+we);C=new RegExp(gne(we[0])+"\\s*"),E=new RegExp("\\s*"+gne(we[1])),R=new RegExp("\\s*"+gne("}"+we[1]))}$(e||Zp.tags);for(var Q=new j6(o),F,U,K,L,te,ne;!Q.eos();){if(F=Q.pos,K=Q.scanUntil(C),K)for(var oe=0,G=K.length;oe"?te=[U,K,F,Q.pos,h,b,t]:te=[U,K,F,Q.pos],b++,a.push(te),U==="#"||U==="^")s.push(te);else if(U==="/"){if(ne=s.pop(),!ne)throw new Error('Unopened section "'+K+'" at '+F);if(ne[1]!==K)throw new Error('Unclosed section "'+ne[1]+'" at '+F)}else U==="name"||U==="{"||U==="&"?d=!0:U==="="&&$(K)}if(y(),ne=s.pop(),ne)throw new Error('Unclosed section "'+ne[1]+'" at '+Q.pos);return d_e(f_e(a))}function f_e(o){for(var e=[],t,s,a=0,l=o.length;a0?s[s.length-1][4]:e;break;default:t.push(a)}return e}function j6(o){this.string=o,this.tail=o,this.pos=0}j6.prototype.eos=function(){return this.tail===""};j6.prototype.scan=function(e){var t=this.tail.match(e);if(!t||t.index!==0)return"";var s=t[0];return this.tail=this.tail.substring(s.length),this.pos+=s.length,s};j6.prototype.scanUntil=function(e){var t=this.tail.search(e),s;switch(t){case-1:s=this.tail,this.tail="";break;case 0:s="";break;default:s=this.tail.substring(0,t),this.tail=this.tail.substring(t)}return this.pos+=s.length,s};function DD(o,e){this.view=o,this.cache={".":this.view},this.parent=e}DD.prototype.push=function(e){return new DD(e,this)};DD.prototype.lookup=function(e){var t=this.cache,s;if(t.hasOwnProperty(e))s=t[e];else{for(var a=this,l,u,d,h=!1;a;){if(e.indexOf(".")>0)for(l=a.view,u=e.split("."),d=0;l!=null&&d"?b=this.renderPartial(d,t,s,l):h==="&"?b=this.unescapedValue(d,t):h==="name"?b=this.escapedValue(d,t,l):h==="text"&&(b=this.rawValue(d)),b!==void 0&&(u+=b);return u};Qg.prototype.renderSection=function(e,t,s,a,l){var u=this,d="",h=t.lookup(e[1]);function b(E){return u.render(E,t,s,l)}if(!!h){if(jD(h))for(var y=0,C=h.length;y0||!s)&&(l[u]=a+l[u]);return l.join(` -`)};Qg.prototype.renderPartial=function(e,t,s,a){if(!!s){var l=this.getConfigTags(a),u=rre(s)?s(e[1]):s[e[1]];if(u!=null){var d=e[6],h=e[5],b=e[4],y=u;h==0&&b&&(y=this.indentPartial(u,b,d));var C=this.parse(y,l);return this.renderTokens(C,t,s,y,a)}}};Qg.prototype.unescapedValue=function(e,t){var s=t.lookup(e[1]);if(s!=null)return s};Qg.prototype.escapedValue=function(e,t,s){var a=this.getConfigEscape(s)||Zp.escape,l=t.lookup(e[1]);if(l!=null)return typeof l=="number"&&a===Zp.escape?String(l):a(l)};Qg.prototype.rawValue=function(e){return e[1]};Qg.prototype.getConfigTags=function(e){return jD(e)?e:e&&typeof e=="object"?e.tags:void 0};Qg.prototype.getConfigEscape=function(e){if(e&&typeof e=="object"&&!jD(e))return e.escape};var Zp={name:"mustache.js",version:"4.2.0",tags:["{{","}}"],clearCache:void 0,escape:void 0,parse:void 0,render:void 0,Scanner:void 0,Context:void 0,Writer:void 0,set templateCache(o){w6.templateCache=o},get templateCache(){return w6.templateCache}},w6=new Qg;Zp.clearCache=function(){return w6.clearCache()};Zp.parse=function(e,t){return w6.parse(e,t)};Zp.render=function(e,t,s,a){if(typeof e!="string")throw new TypeError('Invalid template! Template should be a "string" but "'+Kwe(e)+'" was given as the first argument for mustache#render(template, view, partials)');return w6.render(e,t,s,a)};Zp.escape=r_e;Zp.Scanner=j6;Zp.Context=DD;Zp.Writer=Qg;function nz(o){return nz=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},nz(o)}function hE(o){if(o===null||o===!0||o===!1)return NaN;var e=Number(o);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}function Sc(o,e){if(e.length1?"s":"")+" required, but only "+e.length+" present")}function cc(o){Sc(1,arguments);var e=Object.prototype.toString.call(o);return o instanceof Date||nz(o)==="object"&&e==="[object Date]"?new Date(o.getTime()):typeof o=="number"||e==="[object Number]"?new Date(o):((typeof o=="string"||e==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function h_e(o,e){Sc(2,arguments);var t=cc(o).getTime(),s=hE(e);return new Date(t+s)}var m_e={};function q6(){return m_e}function Noe(o){var e=new Date(Date.UTC(o.getFullYear(),o.getMonth(),o.getDate(),o.getHours(),o.getMinutes(),o.getSeconds(),o.getMilliseconds()));return e.setUTCFullYear(o.getFullYear()),o.getTime()-e.getTime()}function kH(o,e){Sc(2,arguments);var t=cc(o),s=cc(e),a=t.getTime()-s.getTime();return a<0?-1:a>0?1:a}function g_e(o){return Sc(1,arguments),o instanceof Date||nz(o)==="object"&&Object.prototype.toString.call(o)==="[object Date]"}function p_e(o){if(Sc(1,arguments),!g_e(o)&&typeof o!="number")return!1;var e=cc(o);return!isNaN(Number(e))}function b_e(o,e){Sc(2,arguments);var t=cc(o),s=cc(e),a=t.getFullYear()-s.getFullYear(),l=t.getMonth()-s.getMonth();return a*12+l}function v_e(o,e){return Sc(2,arguments),cc(o).getTime()-cc(e).getTime()}var Nle={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(e){return e<0?Math.ceil(e):Math.floor(e)}},O_e="trunc";function y_e(o){return o?Nle[o]:Nle[O_e]}function w_e(o){Sc(1,arguments);var e=cc(o);return e.setHours(23,59,59,999),e}function __e(o){Sc(1,arguments);var e=cc(o),t=e.getMonth();return e.setFullYear(e.getFullYear(),t+1,0),e.setHours(23,59,59,999),e}function S_e(o){Sc(1,arguments);var e=cc(o);return w_e(e).getTime()===__e(e).getTime()}function C_e(o,e){Sc(2,arguments);var t=cc(o),s=cc(e),a=kH(t,s),l=Math.abs(b_e(t,s)),u;if(l<1)u=0;else{t.getMonth()===1&&t.getDate()>27&&t.setDate(30),t.setMonth(t.getMonth()-a*l);var d=kH(t,s)===-a;S_e(cc(o))&&l===1&&kH(o,s)===1&&(d=!1),u=a*(l-Number(d))}return u===0?0:u}function k_e(o,e,t){Sc(2,arguments);var s=v_e(o,e)/1e3;return y_e(t==null?void 0:t.roundingMethod)(s)}function x_e(o,e){Sc(2,arguments);var t=hE(e);return h_e(o,-t)}var T_e=864e5;function E_e(o){Sc(1,arguments);var e=cc(o),t=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var s=e.getTime(),a=t-s;return Math.floor(a/T_e)+1}function oz(o){Sc(1,arguments);var e=1,t=cc(o),s=t.getUTCDay(),a=(s=a.getTime()?t+1:e.getTime()>=u.getTime()?t:t-1}function A_e(o){Sc(1,arguments);var e=Rpe(o),t=new Date(0);t.setUTCFullYear(e,0,4),t.setUTCHours(0,0,0,0);var s=oz(t);return s}var D_e=6048e5;function P_e(o){Sc(1,arguments);var e=cc(o),t=oz(e).getTime()-A_e(e).getTime();return Math.round(t/D_e)+1}function sz(o,e){var t,s,a,l,u,d,h,b;Sc(1,arguments);var y=q6(),C=hE((t=(s=(a=(l=e==null?void 0:e.weekStartsOn)!==null&&l!==void 0?l:e==null||(u=e.locale)===null||u===void 0||(d=u.options)===null||d===void 0?void 0:d.weekStartsOn)!==null&&a!==void 0?a:y.weekStartsOn)!==null&&s!==void 0?s:(h=y.locale)===null||h===void 0||(b=h.options)===null||b===void 0?void 0:b.weekStartsOn)!==null&&t!==void 0?t:0);if(!(C>=0&&C<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var E=cc(o),R=E.getUTCDay(),$=(R=1&&R<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var $=new Date(0);$.setUTCFullYear(C+1,0,R),$.setUTCHours(0,0,0,0);var Q=sz($,e),F=new Date(0);F.setUTCFullYear(C,0,R),F.setUTCHours(0,0,0,0);var U=sz(F,e);return y.getTime()>=Q.getTime()?C+1:y.getTime()>=U.getTime()?C:C-1}function M_e(o,e){var t,s,a,l,u,d,h,b;Sc(1,arguments);var y=q6(),C=hE((t=(s=(a=(l=e==null?void 0:e.firstWeekContainsDate)!==null&&l!==void 0?l:e==null||(u=e.locale)===null||u===void 0||(d=u.options)===null||d===void 0?void 0:d.firstWeekContainsDate)!==null&&a!==void 0?a:y.firstWeekContainsDate)!==null&&s!==void 0?s:(h=y.locale)===null||h===void 0||(b=h.options)===null||b===void 0?void 0:b.firstWeekContainsDate)!==null&&t!==void 0?t:1),E=$pe(o,e),R=new Date(0);R.setUTCFullYear(E,0,C),R.setUTCHours(0,0,0,0);var $=sz(R,e);return $}var R_e=6048e5;function $_e(o,e){Sc(1,arguments);var t=cc(o),s=sz(t,e).getTime()-M_e(t,e).getTime();return Math.round(s/R_e)+1}function Bl(o,e){for(var t=o<0?"-":"",s=Math.abs(o).toString();s.length0?s:1-s;return Bl(t==="yy"?a%100:a,t.length)},M:function(e,t){var s=e.getUTCMonth();return t==="M"?String(s+1):Bl(s+1,2)},d:function(e,t){return Bl(e.getUTCDate(),t.length)},a:function(e,t){var s=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return s.toUpperCase();case"aaa":return s;case"aaaaa":return s[0];case"aaaa":default:return s==="am"?"a.m.":"p.m."}},h:function(e,t){return Bl(e.getUTCHours()%12||12,t.length)},H:function(e,t){return Bl(e.getUTCHours(),t.length)},m:function(e,t){return Bl(e.getUTCMinutes(),t.length)},s:function(e,t){return Bl(e.getUTCSeconds(),t.length)},S:function(e,t){var s=t.length,a=e.getUTCMilliseconds(),l=Math.floor(a*Math.pow(10,s-3));return Bl(l,t.length)}};const mC=N_e;var J4={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},I_e={G:function(e,t,s){var a=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return s.era(a,{width:"abbreviated"});case"GGGGG":return s.era(a,{width:"narrow"});case"GGGG":default:return s.era(a,{width:"wide"})}},y:function(e,t,s){if(t==="yo"){var a=e.getUTCFullYear(),l=a>0?a:1-a;return s.ordinalNumber(l,{unit:"year"})}return mC.y(e,t)},Y:function(e,t,s,a){var l=$pe(e,a),u=l>0?l:1-l;if(t==="YY"){var d=u%100;return Bl(d,2)}return t==="Yo"?s.ordinalNumber(u,{unit:"year"}):Bl(u,t.length)},R:function(e,t){var s=Rpe(e);return Bl(s,t.length)},u:function(e,t){var s=e.getUTCFullYear();return Bl(s,t.length)},Q:function(e,t,s){var a=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(a);case"QQ":return Bl(a,2);case"Qo":return s.ordinalNumber(a,{unit:"quarter"});case"QQQ":return s.quarter(a,{width:"abbreviated",context:"formatting"});case"QQQQQ":return s.quarter(a,{width:"narrow",context:"formatting"});case"QQQQ":default:return s.quarter(a,{width:"wide",context:"formatting"})}},q:function(e,t,s){var a=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(a);case"qq":return Bl(a,2);case"qo":return s.ordinalNumber(a,{unit:"quarter"});case"qqq":return s.quarter(a,{width:"abbreviated",context:"standalone"});case"qqqqq":return s.quarter(a,{width:"narrow",context:"standalone"});case"qqqq":default:return s.quarter(a,{width:"wide",context:"standalone"})}},M:function(e,t,s){var a=e.getUTCMonth();switch(t){case"M":case"MM":return mC.M(e,t);case"Mo":return s.ordinalNumber(a+1,{unit:"month"});case"MMM":return s.month(a,{width:"abbreviated",context:"formatting"});case"MMMMM":return s.month(a,{width:"narrow",context:"formatting"});case"MMMM":default:return s.month(a,{width:"wide",context:"formatting"})}},L:function(e,t,s){var a=e.getUTCMonth();switch(t){case"L":return String(a+1);case"LL":return Bl(a+1,2);case"Lo":return s.ordinalNumber(a+1,{unit:"month"});case"LLL":return s.month(a,{width:"abbreviated",context:"standalone"});case"LLLLL":return s.month(a,{width:"narrow",context:"standalone"});case"LLLL":default:return s.month(a,{width:"wide",context:"standalone"})}},w:function(e,t,s,a){var l=$_e(e,a);return t==="wo"?s.ordinalNumber(l,{unit:"week"}):Bl(l,t.length)},I:function(e,t,s){var a=P_e(e);return t==="Io"?s.ordinalNumber(a,{unit:"week"}):Bl(a,t.length)},d:function(e,t,s){return t==="do"?s.ordinalNumber(e.getUTCDate(),{unit:"date"}):mC.d(e,t)},D:function(e,t,s){var a=E_e(e);return t==="Do"?s.ordinalNumber(a,{unit:"dayOfYear"}):Bl(a,t.length)},E:function(e,t,s){var a=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return s.day(a,{width:"abbreviated",context:"formatting"});case"EEEEE":return s.day(a,{width:"narrow",context:"formatting"});case"EEEEEE":return s.day(a,{width:"short",context:"formatting"});case"EEEE":default:return s.day(a,{width:"wide",context:"formatting"})}},e:function(e,t,s,a){var l=e.getUTCDay(),u=(l-a.weekStartsOn+8)%7||7;switch(t){case"e":return String(u);case"ee":return Bl(u,2);case"eo":return s.ordinalNumber(u,{unit:"day"});case"eee":return s.day(l,{width:"abbreviated",context:"formatting"});case"eeeee":return s.day(l,{width:"narrow",context:"formatting"});case"eeeeee":return s.day(l,{width:"short",context:"formatting"});case"eeee":default:return s.day(l,{width:"wide",context:"formatting"})}},c:function(e,t,s,a){var l=e.getUTCDay(),u=(l-a.weekStartsOn+8)%7||7;switch(t){case"c":return String(u);case"cc":return Bl(u,t.length);case"co":return s.ordinalNumber(u,{unit:"day"});case"ccc":return s.day(l,{width:"abbreviated",context:"standalone"});case"ccccc":return s.day(l,{width:"narrow",context:"standalone"});case"cccccc":return s.day(l,{width:"short",context:"standalone"});case"cccc":default:return s.day(l,{width:"wide",context:"standalone"})}},i:function(e,t,s){var a=e.getUTCDay(),l=a===0?7:a;switch(t){case"i":return String(l);case"ii":return Bl(l,t.length);case"io":return s.ordinalNumber(l,{unit:"day"});case"iii":return s.day(a,{width:"abbreviated",context:"formatting"});case"iiiii":return s.day(a,{width:"narrow",context:"formatting"});case"iiiiii":return s.day(a,{width:"short",context:"formatting"});case"iiii":default:return s.day(a,{width:"wide",context:"formatting"})}},a:function(e,t,s){var a=e.getUTCHours(),l=a/12>=1?"pm":"am";switch(t){case"a":case"aa":return s.dayPeriod(l,{width:"abbreviated",context:"formatting"});case"aaa":return s.dayPeriod(l,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return s.dayPeriod(l,{width:"narrow",context:"formatting"});case"aaaa":default:return s.dayPeriod(l,{width:"wide",context:"formatting"})}},b:function(e,t,s){var a=e.getUTCHours(),l;switch(a===12?l=J4.noon:a===0?l=J4.midnight:l=a/12>=1?"pm":"am",t){case"b":case"bb":return s.dayPeriod(l,{width:"abbreviated",context:"formatting"});case"bbb":return s.dayPeriod(l,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return s.dayPeriod(l,{width:"narrow",context:"formatting"});case"bbbb":default:return s.dayPeriod(l,{width:"wide",context:"formatting"})}},B:function(e,t,s){var a=e.getUTCHours(),l;switch(a>=17?l=J4.evening:a>=12?l=J4.afternoon:a>=4?l=J4.morning:l=J4.night,t){case"B":case"BB":case"BBB":return s.dayPeriod(l,{width:"abbreviated",context:"formatting"});case"BBBBB":return s.dayPeriod(l,{width:"narrow",context:"formatting"});case"BBBB":default:return s.dayPeriod(l,{width:"wide",context:"formatting"})}},h:function(e,t,s){if(t==="ho"){var a=e.getUTCHours()%12;return a===0&&(a=12),s.ordinalNumber(a,{unit:"hour"})}return mC.h(e,t)},H:function(e,t,s){return t==="Ho"?s.ordinalNumber(e.getUTCHours(),{unit:"hour"}):mC.H(e,t)},K:function(e,t,s){var a=e.getUTCHours()%12;return t==="Ko"?s.ordinalNumber(a,{unit:"hour"}):Bl(a,t.length)},k:function(e,t,s){var a=e.getUTCHours();return a===0&&(a=24),t==="ko"?s.ordinalNumber(a,{unit:"hour"}):Bl(a,t.length)},m:function(e,t,s){return t==="mo"?s.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):mC.m(e,t)},s:function(e,t,s){return t==="so"?s.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):mC.s(e,t)},S:function(e,t){return mC.S(e,t)},X:function(e,t,s,a){var l=a._originalDate||e,u=l.getTimezoneOffset();if(u===0)return"Z";switch(t){case"X":return Ble(u);case"XXXX":case"XX":return eE(u);case"XXXXX":case"XXX":default:return eE(u,":")}},x:function(e,t,s,a){var l=a._originalDate||e,u=l.getTimezoneOffset();switch(t){case"x":return Ble(u);case"xxxx":case"xx":return eE(u);case"xxxxx":case"xxx":default:return eE(u,":")}},O:function(e,t,s,a){var l=a._originalDate||e,u=l.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Ile(u,":");case"OOOO":default:return"GMT"+eE(u,":")}},z:function(e,t,s,a){var l=a._originalDate||e,u=l.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Ile(u,":");case"zzzz":default:return"GMT"+eE(u,":")}},t:function(e,t,s,a){var l=a._originalDate||e,u=Math.floor(l.getTime()/1e3);return Bl(u,t.length)},T:function(e,t,s,a){var l=a._originalDate||e,u=l.getTime();return Bl(u,t.length)}};function Ile(o,e){var t=o>0?"-":"+",s=Math.abs(o),a=Math.floor(s/60),l=s%60;if(l===0)return t+String(a);var u=e||"";return t+String(a)+u+Bl(l,2)}function Ble(o,e){if(o%60===0){var t=o>0?"-":"+";return t+Bl(Math.abs(o)/60,2)}return eE(o,e)}function eE(o,e){var t=e||"",s=o>0?"-":"+",a=Math.abs(o),l=Bl(Math.floor(a/60),2),u=Bl(a%60,2);return s+l+t+u}const B_e=I_e;var Lle=function(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},Npe=function(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},L_e=function(e,t){var s=e.match(/(P+)(p+)?/)||[],a=s[1],l=s[2];if(!l)return Lle(e,t);var u;switch(a){case"P":u=t.dateTime({width:"short"});break;case"PP":u=t.dateTime({width:"medium"});break;case"PPP":u=t.dateTime({width:"long"});break;case"PPPP":default:u=t.dateTime({width:"full"});break}return u.replace("{{date}}",Lle(a,t)).replace("{{time}}",Npe(l,t))},F_e={p:Npe,P:L_e};const Q_e=F_e;var Z_e=["D","DD"],H_e=["YY","YYYY"];function z_e(o){return Z_e.indexOf(o)!==-1}function V_e(o){return H_e.indexOf(o)!==-1}function Fle(o,e,t){if(o==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(o==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(o==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(o==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var W_e={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},U_e=function(e,t,s){var a,l=W_e[e];return typeof l=="string"?a=l:t===1?a=l.one:a=l.other.replace("{{count}}",t.toString()),s!=null&&s.addSuffix?s.comparison&&s.comparison>0?"in "+a:a+" ago":a};const Y_e=U_e;function pne(o){return function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.width?String(e.width):o.defaultWidth,s=o.formats[t]||o.formats[o.defaultWidth];return s}}var X_e={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},j_e={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},q_e={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},G_e={date:pne({formats:X_e,defaultWidth:"full"}),time:pne({formats:j_e,defaultWidth:"full"}),dateTime:pne({formats:q_e,defaultWidth:"full"})};const K_e=G_e;var J_e={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},eSe=function(e,t,s,a){return J_e[e]};const tSe=eSe;function BN(o){return function(e,t){var s=t!=null&&t.context?String(t.context):"standalone",a;if(s==="formatting"&&o.formattingValues){var l=o.defaultFormattingWidth||o.defaultWidth,u=t!=null&&t.width?String(t.width):l;a=o.formattingValues[u]||o.formattingValues[l]}else{var d=o.defaultWidth,h=t!=null&&t.width?String(t.width):o.defaultWidth;a=o.values[h]||o.values[d]}var b=o.argumentCallback?o.argumentCallback(e):e;return a[b]}}var nSe={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},oSe={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},sSe={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},rSe={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},iSe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},aSe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},lSe=function(e,t){var s=Number(e),a=s%100;if(a>20||a<10)switch(a%10){case 1:return s+"st";case 2:return s+"nd";case 3:return s+"rd"}return s+"th"},cSe={ordinalNumber:lSe,era:BN({values:nSe,defaultWidth:"wide"}),quarter:BN({values:oSe,defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:BN({values:sSe,defaultWidth:"wide"}),day:BN({values:rSe,defaultWidth:"wide"}),dayPeriod:BN({values:iSe,defaultWidth:"wide",formattingValues:aSe,defaultFormattingWidth:"wide"})};const uSe=cSe;function LN(o){return function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=t.width,a=s&&o.matchPatterns[s]||o.matchPatterns[o.defaultMatchWidth],l=e.match(a);if(!l)return null;var u=l[0],d=s&&o.parsePatterns[s]||o.parsePatterns[o.defaultParseWidth],h=Array.isArray(d)?dSe(d,function(C){return C.test(u)}):fSe(d,function(C){return C.test(u)}),b;b=o.valueCallback?o.valueCallback(h):h,b=t.valueCallback?t.valueCallback(b):b;var y=e.slice(u.length);return{value:b,rest:y}}}function fSe(o,e){for(var t in o)if(o.hasOwnProperty(t)&&e(o[t]))return t}function dSe(o,e){for(var t=0;t1&&arguments[1]!==void 0?arguments[1]:{},s=e.match(o.matchPattern);if(!s)return null;var a=s[0],l=e.match(o.parsePattern);if(!l)return null;var u=o.valueCallback?o.valueCallback(l[0]):l[0];u=t.valueCallback?t.valueCallback(u):u;var d=e.slice(a.length);return{value:u,rest:d}}}var mSe=/^(\d+)(th|st|nd|rd)?/i,gSe=/\d+/i,pSe={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},bSe={any:[/^b/i,/^(a|c)/i]},vSe={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},OSe={any:[/1/i,/2/i,/3/i,/4/i]},ySe={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},wSe={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},_Se={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},SSe={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},CSe={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},kSe={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},xSe={ordinalNumber:hSe({matchPattern:mSe,parsePattern:gSe,valueCallback:function(e){return parseInt(e,10)}}),era:LN({matchPatterns:pSe,defaultMatchWidth:"wide",parsePatterns:bSe,defaultParseWidth:"any"}),quarter:LN({matchPatterns:vSe,defaultMatchWidth:"wide",parsePatterns:OSe,defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:LN({matchPatterns:ySe,defaultMatchWidth:"wide",parsePatterns:wSe,defaultParseWidth:"any"}),day:LN({matchPatterns:_Se,defaultMatchWidth:"wide",parsePatterns:SSe,defaultParseWidth:"any"}),dayPeriod:LN({matchPatterns:CSe,defaultMatchWidth:"any",parsePatterns:kSe,defaultParseWidth:"any"})};const TSe=xSe;var ESe={code:"en-US",formatDistance:Y_e,formatLong:K_e,formatRelative:tSe,localize:uSe,match:TSe,options:{weekStartsOn:0,firstWeekContainsDate:1}};const Ipe=ESe;var ASe=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,DSe=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,PSe=/^'([^]*?)'?$/,MSe=/''/g,RSe=/[a-zA-Z]/;function Bpe(o,e,t){var s,a,l,u,d,h,b,y,C,E,R,$,Q,F,U,K,L,te;Sc(2,arguments);var ne=String(e),oe=q6(),G=(s=(a=t==null?void 0:t.locale)!==null&&a!==void 0?a:oe.locale)!==null&&s!==void 0?s:Ipe,we=hE((l=(u=(d=(h=t==null?void 0:t.firstWeekContainsDate)!==null&&h!==void 0?h:t==null||(b=t.locale)===null||b===void 0||(y=b.options)===null||y===void 0?void 0:y.firstWeekContainsDate)!==null&&d!==void 0?d:oe.firstWeekContainsDate)!==null&&u!==void 0?u:(C=oe.locale)===null||C===void 0||(E=C.options)===null||E===void 0?void 0:E.firstWeekContainsDate)!==null&&l!==void 0?l:1);if(!(we>=1&&we<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var ve=hE((R=($=(Q=(F=t==null?void 0:t.weekStartsOn)!==null&&F!==void 0?F:t==null||(U=t.locale)===null||U===void 0||(K=U.options)===null||K===void 0?void 0:K.weekStartsOn)!==null&&Q!==void 0?Q:oe.weekStartsOn)!==null&&$!==void 0?$:(L=oe.locale)===null||L===void 0||(te=L.options)===null||te===void 0?void 0:te.weekStartsOn)!==null&&R!==void 0?R:0);if(!(ve>=0&&ve<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!G.localize)throw new RangeError("locale must contain localize property");if(!G.formatLong)throw new RangeError("locale must contain formatLong property");var Re=cc(o);if(!p_e(Re))throw new RangeError("Invalid time value");var Oe=Noe(Re),ce=x_e(Re,Oe),Xe={firstWeekContainsDate:we,weekStartsOn:ve,locale:G,_originalDate:Re},tt=ne.match(DSe).map(function(ot){var V=ot[0];if(V==="p"||V==="P"){var ut=Q_e[V];return ut(ot,G.formatLong)}return ot}).join("").match(ASe).map(function(ot){if(ot==="''")return"'";var V=ot[0];if(V==="'")return $Se(ot);var ut=B_e[V];if(ut)return!(t!=null&&t.useAdditionalWeekYearTokens)&&V_e(ot)&&Fle(ot,e,String(o)),!(t!=null&&t.useAdditionalDayOfYearTokens)&&z_e(ot)&&Fle(ot,e,String(o)),ut(ce,ot,G.localize,Xe);if(V.match(RSe))throw new RangeError("Format string contains an unescaped latin alphabet character `"+V+"`");return ot}).join("");return tt}function $Se(o){var e=o.match(PSe);return e?e[1].replace(MSe,"'"):o}function Lpe(o,e){if(o==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(o[t]=e[t]);return o}function NSe(o){return Lpe({},o)}var Qle=1440,ISe=2520,bne=43200,BSe=86400;function LSe(o,e,t){var s,a;Sc(2,arguments);var l=q6(),u=(s=(a=t==null?void 0:t.locale)!==null&&a!==void 0?a:l.locale)!==null&&s!==void 0?s:Ipe;if(!u.formatDistance)throw new RangeError("locale must contain formatDistance property");var d=kH(o,e);if(isNaN(d))throw new RangeError("Invalid time value");var h=Lpe(NSe(t),{addSuffix:Boolean(t==null?void 0:t.addSuffix),comparison:d}),b,y;d>0?(b=cc(e),y=cc(o)):(b=cc(o),y=cc(e));var C=k_e(y,b),E=(Noe(y)-Noe(b))/1e3,R=Math.round((C-E)/60),$;if(R<2)return t!=null&&t.includeSeconds?C<5?u.formatDistance("lessThanXSeconds",5,h):C<10?u.formatDistance("lessThanXSeconds",10,h):C<20?u.formatDistance("lessThanXSeconds",20,h):C<40?u.formatDistance("halfAMinute",0,h):C<60?u.formatDistance("lessThanXMinutes",1,h):u.formatDistance("xMinutes",1,h):R===0?u.formatDistance("lessThanXMinutes",1,h):u.formatDistance("xMinutes",R,h);if(R<45)return u.formatDistance("xMinutes",R,h);if(R<90)return u.formatDistance("aboutXHours",1,h);if(Rh.name===(e==null?void 0:e.schema));if(!(s!=null&&s.titleTemplate))return Vle(s,e);let a=e.data,u=Zp.parse(s.titleTemplate).filter(h=>h[0]==="name").map(h=>h[1]).filter(h=>{let b=s.fields.find(y=>y.name===h);return(b==null?void 0:b.info.name)==="reference"}).reduce((h,b)=>{let y=t.edges.find(E=>E.source===e.id&&E.field===b),C=t.records.find(E=>E.id===(y==null?void 0:y.target));return h[b]=qu(o,C,t),h},{});a={...a,...u};let d=Zp.render(s.titleTemplate,a);return!d||d===""?Vle(s,e):Qpe(d.slice(0,300))}function Vle(o,e){var s;if((o==null?void 0:o.type)==="files")return e._file.path;let t=Qpe(e==null?void 0:e.data[(s=o.fields.filter(a=>a.info.name==="text")[0])==null?void 0:s.name]).slice(0,300);return t==""?"Untitled":t}function Wle(o){let e,t,s;return{c(){e=re("a"),t=Ht(o[1]),Z(e,"href",s=o[3].lucentUrl+"/records/"+o[0].id),Z(e,"class","text-decoration-none rounded py-1 px-2 d-inline-block svelte-nbbgyi"),Z(e,"title",o[1]),rs(e,"border","2px solid "+(o[2].color?o[2].color:"#999"),1),rs(e,"white-space","nowrap")},m(a,l){Te(a,e,l),X(e,t)},p(a,l){l&2&&Fn(t,a[1]),l&1&&s!==(s=a[3].lucentUrl+"/records/"+a[0].id)&&Z(e,"href",s),l&2&&Z(e,"title",a[1]),l&4&&rs(e,"border","2px solid "+(a[2].color?a[2].color:"#999"),1)},d(a){a&&ke(e)}}}function FSe(o){var s;let e,t=((s=o[0])==null?void 0:s.data)&&Wle(o);return{c(){t&&t.c(),e=Rs()},m(a,l){t&&t.m(a,l),Te(a,e,l)},p(a,[l]){var u;(u=a[0])!=null&&u.data?t?t.p(a,l):(t=Wle(a),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},i:un,o:un,d(a){t&&t.d(a),a&&ke(e)}}}function QSe(o,e,t){let s,a;const l=Ur("channel");let{record:u}=e,{graph:d}=e;return o.$$set=h=>{"record"in h&&t(0,u=h.record),"graph"in h&&t(4,d=h.graph)},o.$$.update=()=>{o.$$.dirty&1&&t(2,s=l.schemas.find(h=>h.name===u.schema)),o.$$.dirty&17&&t(1,a=qu(l.schemas,u,d))},[u,a,s,l,d]}class G6 extends uo{constructor(e){super(),co(this,e,QSe,FSe,lo,{record:0,graph:4})}}function Ule(o,e,t){const s=o.slice();return s[2]=e[t],s[4]=t,s}function Yle(o){let e,t,s=o[0].reverse(),a=[];for(let u=0;uBe(a[u],1,1,()=>{a[u]=null});return{c(){e=re("div");for(let u=0;u0&&Yle(o);return{c(){s&&s.c(),e=Rs()},m(a,l){s&&s.m(a,l),Te(a,e,l),t=!0},p(a,[l]){a[0].length>0?s?(s.p(a,l),l&1&&xe(s,1)):(s=Yle(a),s.c(),xe(s,1),s.m(e.parentNode,e)):s&&(mo(),Be(s,1,1,()=>{s=null}),go())},i(a){t||(xe(s),t=!0)},o(a){Be(s),t=!1},d(a){s&&s.d(a),a&&ke(e)}}}function zSe(o,e,t){let{managerRecords:s}=e,{graph:a}=e;return o.$$set=l=>{"managerRecords"in l&&t(0,s=l.managerRecords),"graph"in l&&t(1,a=l.graph)},[s,a]}class VSe extends uo{constructor(e){super(),co(this,e,zSe,HSe,lo,{managerRecords:0,graph:1})}}function WSe(o){let e;return{c(){e=Ht("New Record")},m(t,s){Te(t,e,s)},p:un,d(t){t&&ke(e)}}}function USe(o){let e=qu(o[5].schemas,o[3],o[2])+"",t;return{c(){t=Ht(e)},m(s,a){Te(s,t,a)},p(s,a){a&12&&e!==(e=qu(s[5].schemas,s[3],s[2])+"")&&Fn(t,e)},d(s){s&&ke(t)}}}function jle(o){let e,t,s,a,l,u,d,h,b,y,C,E,R,$,Q,F,U;s=new Fa({props:{icon:"ellipsis"}});let K=!o[4]&&qle(o);return{c(){e=re("div"),t=re("button"),en(s.$$.fragment),a=Ze(),l=re("div"),u=re("h6"),u.textContent="Record Actions",d=Ze(),h=re("a"),b=Ht("Create new"),C=Ze(),K&&K.c(),E=Ze(),R=re("a"),$=Ht("Revisions"),Z(t,"class","btn btn-link btn-sm"),Z(t,"type","button"),Z(t,"data-bs-toggle","dropdown"),Z(t,"aria-expanded","false"),Z(u,"class","dropdown-header"),Z(h,"class","dropdown-item"),Z(h,"href",y=o[5].lucentUrl+"/records/new?schema="+o[1].name),Z(R,"class","dropdown-item"),Z(R,"href",o[5].lucentUrl),Z(l,"class","dropdown-menu"),Z(e,"class","dropdown d-inline-block")},m(L,te){Te(L,e,te),X(e,t),Kt(s,t,null),X(e,a),X(e,l),X(l,u),X(l,d),X(l,h),X(h,b),X(l,C),K&&K.m(l,null),X(l,E),X(l,R),X(R,$),Q=!0,F||(U=mn(R,"click",ku(o[7])),F=!0)},p(L,te){(!Q||te&2&&y!==(y=L[5].lucentUrl+"/records/new?schema="+L[1].name))&&Z(h,"href",y),L[4]?K&&(K.d(1),K=null):K?K.p(L,te):(K=qle(L),K.c(),K.m(l,E))},i(L){Q||(xe(s.$$.fragment,L),Q=!0)},o(L){Be(s.$$.fragment,L),Q=!1},d(L){L&&ke(e),Jt(s),K&&K.d(),F=!1,U()}}}function qle(o){let e,t,s,a;return{c(){e=re("a"),t=Ht("Clone"),Z(e,"class","dropdown-item"),Z(e,"href",o[5].lucentUrl)},m(l,u){Te(l,e,u),X(e,t),s||(a=mn(e,"click",o[6]),s=!0)},p:un,d(l){l&&ke(e),s=!1,a()}}}function YSe(o){let e,t,s=o[1].label.toUpperCase()+"",a,l,u,d,h,b;function y($,Q){return $[4]?WSe:USe}let C=y(o),E=C(o),R=!o[4]&&jle(o);return{c(){e=re("h3"),t=re("a"),a=Ht(s),u=Ze(),d=re("span"),E.c(),h=Ze(),R&&R.c(),Z(t,"class","text-muted d-block text-decoration-none fs-6 mb-1"),Z(t,"href",l=o[5].lucentUrl+"/content/"+o[1].name),Z(d,"class","text-dark d-block"),Z(e,"class","header-normal mt-5 mb-0")},m($,Q){Te($,e,Q),X(e,t),X(t,a),X(e,u),X(e,d),E.m(d,null),X(e,h),R&&R.m(e,null),b=!0},p($,[Q]){(!b||Q&2)&&s!==(s=$[1].label.toUpperCase()+"")&&Fn(a,s),(!b||Q&2&&l!==(l=$[5].lucentUrl+"/content/"+$[1].name))&&Z(t,"href",l),C===(C=y($))&&E?E.p($,Q):(E.d(1),E=C($),E&&(E.c(),E.m(d,null))),$[4]?R&&(mo(),Be(R,1,1,()=>{R=null}),go()):R?(R.p($,Q),Q&16&&xe(R,1)):(R=jle($),R.c(),xe(R,1),R.m(e,null))},i($){b||(xe(R),b=!0)},o($){Be(R),b=!1},d($){$&&ke(e),E.d(),R&&R.d()}}}function XSe(o,e,t){const s=Ur("channel");let{schema:a}=e,{graph:l}=e,{record:u}=e,{isCreateMode:d}=e,{activeContentTab:h}=e;function b(C){C.preventDefault(),axios.post(s.lucentUrl+"/records/clone/"+u.id).then(E=>{window.location=s.lucentUrl+"/records/"+E.data.id}).catch(E=>{})}const y=C=>t(0,h="_info");return o.$$set=C=>{"schema"in C&&t(1,a=C.schema),"graph"in C&&t(2,l=C.graph),"record"in C&&t(3,u=C.record),"isCreateMode"in C&&t(4,d=C.isCreateMode),"activeContentTab"in C&&t(0,h=C.activeContentTab)},[h,a,l,u,d,s,b,y]}class jSe extends uo{constructor(e){super(),co(this,e,XSe,YSe,lo,{schema:1,graph:2,record:3,isCreateMode:4,activeContentTab:0})}}function Zpe(o){return Hpe()[o]}function Hpe(){return{published:{value:"published",text:"Published",bg:"success",color:"white"},trashed:{value:"trashed",text:"Trashed",bg:"danger",color:"white"},draft:{value:"draft",text:"Draft",bg:"warning",color:"dark"}}}function Gle(o,e,t){const s=o.slice();return s[10]=e[t],s}function Kle(o){let e,t=o[10].text+"",s,a,l,u;function d(...h){return o[9](o[10],...h)}return{c(){e=re("button"),s=Ht(t),a=Ze(),Z(e,"type","button"),Z(e,"class","dropdown-item my-2 rounded w-100 bg-"+o[10].bg+" text-"+o[10].color)},m(h,b){Te(h,e,b),X(e,s),X(e,a),l||(u=mn(e,"click",d),l=!0)},p(h,b){o=h},d(h){h&&ke(e),l=!1,u()}}}function Jle(o){let e,t=o[10].value!==o[0]&&Kle(o);return{c(){t&&t.c(),e=Rs()},m(s,a){t&&t.m(s,a),Te(s,e,a)},p(s,a){s[10].value!==s[0]?t?t.p(s,a):(t=Kle(s),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},d(s){t&&t.d(s),s&&ke(e)}}}function qSe(o){let e,t,s;return{c(){e=re("a"),t=Ht("Preview"),Z(e,"href",s=o[5].previewTargetUrl+"?schema="+o[2].name+"&id="+o[1].id),Z(e,"target","_blank"),Z(e,"class","btn btn-info ms-3")},m(a,l){Te(a,e,l),X(e,t)},p(a,l){l&6&&s!==(s=a[5].previewTargetUrl+"?schema="+a[2].name+"&id="+a[1].id)&&Z(e,"href",s)},d(a){a&&ke(e)}}}function GSe(o){let e,t,s,a=o[4].text+"",l,u,d,h,b,y,C,E,R,$,Q,F=o[6],U=[];for(let L=0;L{h=R,t(3,h)})}const E=(R,$)=>y($,R.value);return o.$$set=R=>{"status"in R&&t(0,l=R.status),"record"in R&&t(1,u=R.record),"schema"in R&&t(2,d=R.schema)},o.$$.update=()=>{o.$$.dirty&1&&t(4,s=Zpe(l))},[l,u,d,h,s,a,b,y,C,E]}class zpe extends uo{constructor(e){super(),co(this,e,KSe,GSe,lo,{status:0,record:1,schema:2})}}function ece(o){return o._file.mime==="image/svg+xml"?Ioe(o):Ur("channel").filesUrl+`/thumbs/${o._file.path}`}function Ioe(o){return Ur("channel").filesUrl+`/${o._file.path}`}function tce(o){let e,t,s,a,l;const u=[eCe,JSe],d=[];function h(b,y){return y&1&&(e=null),e==null&&(e=!!b[0]._file.mime.startsWith("image")),e?0:1}return t=h(o,-1),s=d[t]=u[t](o),{c(){s.c(),a=Rs()},m(b,y){d[t].m(b,y),Te(b,a,y),l=!0},p(b,y){let C=t;t=h(b,y),t===C?d[t].p(b,y):(mo(),Be(d[C],1,1,()=>{d[C]=null}),go(),s=d[t],s?s.p(b,y):(s=d[t]=u[t](b),s.c()),xe(s,1),s.m(a.parentNode,a))},i(b){l||(xe(s),l=!0)},o(b){Be(s),l=!1},d(b){d[t].d(b),b&&ke(a)}}}function JSe(o){let e,t,s,a,l,u=o[0]._file.path.split(".").pop()+"",d,h,b,y;return t=new Fa({props:{icon:"file",width:o[3],height:o[3]}}),{c(){e=re("a"),en(t.$$.fragment),s=Ze(),a=re("span"),l=Ht("."),d=Ht(u),Z(a,"class","ms-2"),rs(a,"font-size",o[4]+"px"),Z(e,"href",h=o[5].lucentUrl+"/records/"+o[0].id),Z(e,"title",b=o[0]._file.path),Z(e,"class","btn btn-outline-primary btn-sm d-flex align-items-center justify-content-center"),rs(e,"width",o[2]+"px"),rs(e,"height",o[2]+"px")},m(C,E){Te(C,e,E),Kt(t,e,null),X(e,s),X(e,a),X(a,l),X(a,d),y=!0},p(C,E){const R={};E&8&&(R.width=C[3]),E&8&&(R.height=C[3]),t.$set(R),(!y||E&1)&&u!==(u=C[0]._file.path.split(".").pop()+"")&&Fn(d,u),(!y||E&16)&&rs(a,"font-size",C[4]+"px"),(!y||E&1&&h!==(h=C[5].lucentUrl+"/records/"+C[0].id))&&Z(e,"href",h),(!y||E&1&&b!==(b=C[0]._file.path))&&Z(e,"title",b),(!y||E&4)&&rs(e,"width",C[2]+"px"),(!y||E&4)&&rs(e,"height",C[2]+"px")},i(C){y||(xe(t.$$.fragment,C),y=!0)},o(C){Be(t.$$.fragment,C),y=!1},d(C){C&&ke(e),Jt(t)}}}function eCe(o){let e,t,s,a,l,u;return{c(){e=re("a"),t=re("img"),Z(t,"class","rounded w-100"),ple(t.src,s=ece(o[0]))||Z(t,"src",s),Z(t,"alt",a=o[0]._file.path),Z(e,"href",l=o[5].lucentUrl+"/records/"+o[0].id),Z(e,"title",u=o[0]._file.path),Z(e,"class","d-flex align-items-center justify-content-center "),rs(e,"width",o[2]+"px"),rs(e,"height",o[2]+"px")},m(d,h){Te(d,e,h),X(e,t)},p(d,h){h&1&&!ple(t.src,s=ece(d[0]))&&Z(t,"src",s),h&1&&a!==(a=d[0]._file.path)&&Z(t,"alt",a),h&1&&l!==(l=d[5].lucentUrl+"/records/"+d[0].id)&&Z(e,"href",l),h&1&&u!==(u=d[0]._file.path)&&Z(e,"title",u),h&4&&rs(e,"width",d[2]+"px"),h&4&&rs(e,"height",d[2]+"px")},i:un,o:un,d(d){d&&ke(e)}}}function nce(o){let e,t=o[0]._file.path+"",s,a,l;return{c(){e=re("a"),s=Ht(t),Z(e,"href",a=o[5].lucentUrl+"/records/"+o[0].id),Z(e,"title",l=o[0]._file.path),Z(e,"class","preview-file-filename lx-small-text text-decoration-none")},m(u,d){Te(u,e,d),X(e,s)},p(u,d){d&1&&t!==(t=u[0]._file.path+"")&&Fn(s,t),d&1&&a!==(a=u[5].lucentUrl+"/records/"+u[0].id)&&Z(e,"href",a),d&1&&l!==(l=u[0]._file.path)&&Z(e,"title",l)},d(u){u&&ke(e)}}}function tCe(o){let e,t,s,a=o[0]&&tce(o),l=o[1]&&nce(o);return{c(){a&&a.c(),e=Ze(),l&&l.c(),t=Rs()},m(u,d){a&&a.m(u,d),Te(u,e,d),l&&l.m(u,d),Te(u,t,d),s=!0},p(u,[d]){u[0]?a?(a.p(u,d),d&1&&xe(a,1)):(a=tce(u),a.c(),xe(a,1),a.m(e.parentNode,e)):a&&(mo(),Be(a,1,1,()=>{a=null}),go()),u[1]?l?l.p(u,d):(l=nce(u),l.c(),l.m(t.parentNode,t)):l&&(l.d(1),l=null)},i(u){s||(xe(a),s=!0)},o(u){Be(a),s=!1},d(u){a&&a.d(u),u&&ke(e),l&&l.d(u),u&&ke(t)}}}function nCe(o,e,t){let{record:s}=e;const a=Ur("channel");let{size:l="small"}=e,{showFilename:u=!1}=e,d,h,b;return l=="large"?(d=256,h=32,b="20"):l=="medium"?(d=128,h=12,b="17"):l=="small"?(d=64,h=12,b="15"):l=="tiny"&&(d=42,h=12,b="13"),o.$$set=y=>{"record"in y&&t(0,s=y.record),"size"in y&&t(6,l=y.size),"showFilename"in y&&t(1,u=y.showFilename)},[s,u,d,h,b,a,l]}class Xw extends uo{constructor(e){super(),co(this,e,nCe,tCe,lo,{record:0,size:6,showFilename:1})}}function oce(o){let e,t,s,a,l,u,d,h,b,y,C=o[0]._file.path+"",E,R,$,Q,F,U,K=o[0]._file.originalName+"",L,te,ne,oe,G,we,ve=o[0]._file.mime+"",Re,Oe,ce,Xe,tt,ot,V,ut=(o[0]._file.size/1024).toFixed(1)+"",Qe,Bt,Ct,He,st,rn,Et,Cn=o[0]._file.checksum+"",je,mt,he,Zo,Kn,so,Yo=o[0]._file.path+"",as,kt,jt;s=new Xw({props:{record:o[0],size:"large"}});let pt=o[0]._file.width&&sce(o);return{c(){e=re("div"),t=re("div"),en(s.$$.fragment),a=Ze(),l=re("div"),u=re("ul"),d=re("li"),h=re("span"),h.textContent="Filename",b=Ze(),y=re("span"),E=Ht(C),R=Ze(),$=re("li"),Q=re("span"),Q.textContent="Original name",F=Ze(),U=re("span"),L=Ht(K),te=Ze(),ne=re("li"),oe=re("span"),oe.textContent="Mime type",G=Ze(),we=re("span"),Re=Ht(ve),Oe=Ze(),pt&&pt.c(),ce=Ze(),Xe=re("li"),tt=re("span"),tt.textContent="File size",ot=Ze(),V=re("span"),Qe=Ht(ut),Bt=Ht("kB"),Ct=Ze(),He=re("li"),st=re("span"),st.textContent="Checksum",rn=Ze(),Et=re("span"),je=Ht(Cn),mt=Ze(),he=re("li"),Zo=re("span"),Zo.textContent="Download",Kn=Ze(),so=re("a"),as=Ht(Yo),Z(t,"class","col"),rs(t,"max-width","276px"),Z(h,"class","text-muted"),Z(d,"class","list-group-item border-primary"),Z(Q,"class","text-muted"),Z($,"class","list-group-item border-primary"),Z(oe,"class","text-muted"),Z(ne,"class","list-group-item border-primary"),Z(tt,"class","text-muted"),Z(Xe,"class","list-group-item border-primary"),Z(st,"class","text-muted"),Z(He,"class","list-group-item border-primary"),Z(Zo,"class","text-muted"),Z(so,"href",kt=Ioe(o[0])),Z(he,"class","list-group-item border-primary"),Z(u,"class","list-group svelte-1qb90xc"),Z(l,"class","col"),Z(e,"class","row mb-4")},m(Ne,Gt){Te(Ne,e,Gt),X(e,t),Kt(s,t,null),X(e,a),X(e,l),X(l,u),X(u,d),X(d,h),X(d,b),X(d,y),X(y,E),X(u,R),X(u,$),X($,Q),X($,F),X($,U),X(U,L),X(u,te),X(u,ne),X(ne,oe),X(ne,G),X(ne,we),X(we,Re),X(u,Oe),pt&&pt.m(u,null),X(u,ce),X(u,Xe),X(Xe,tt),X(Xe,ot),X(Xe,V),X(V,Qe),X(V,Bt),X(u,Ct),X(u,He),X(He,st),X(He,rn),X(He,Et),X(Et,je),X(u,mt),X(u,he),X(he,Zo),X(he,Kn),X(he,so),X(so,as),jt=!0},p(Ne,Gt){const bn={};Gt&1&&(bn.record=Ne[0]),s.$set(bn),(!jt||Gt&1)&&C!==(C=Ne[0]._file.path+"")&&Fn(E,C),(!jt||Gt&1)&&K!==(K=Ne[0]._file.originalName+"")&&Fn(L,K),(!jt||Gt&1)&&ve!==(ve=Ne[0]._file.mime+"")&&Fn(Re,ve),Ne[0]._file.width?pt?pt.p(Ne,Gt):(pt=sce(Ne),pt.c(),pt.m(u,ce)):pt&&(pt.d(1),pt=null),(!jt||Gt&1)&&ut!==(ut=(Ne[0]._file.size/1024).toFixed(1)+"")&&Fn(Qe,ut),(!jt||Gt&1)&&Cn!==(Cn=Ne[0]._file.checksum+"")&&Fn(je,Cn),(!jt||Gt&1)&&Yo!==(Yo=Ne[0]._file.path+"")&&Fn(as,Yo),(!jt||Gt&1&&kt!==(kt=Ioe(Ne[0])))&&Z(so,"href",kt)},i(Ne){jt||(xe(s.$$.fragment,Ne),jt=!0)},o(Ne){Be(s.$$.fragment,Ne),jt=!1},d(Ne){Ne&&ke(e),Jt(s),pt&&pt.d()}}}function sce(o){let e,t,s,a,l=o[0]._file.width+"",u,d,h=o[0]._file.height+"",b;return{c(){e=re("li"),t=re("span"),t.textContent="Dimensions",s=Ze(),a=re("span"),u=Ht(l),d=Ht("x"),b=Ht(h),Z(t,"class","text-muted"),Z(e,"class","list-group-item border-primary")},m(y,C){Te(y,e,C),X(e,t),X(e,s),X(e,a),X(a,u),X(a,d),X(a,b)},p(y,C){C&1&&l!==(l=y[0]._file.width+"")&&Fn(u,l),C&1&&h!==(h=y[0]._file.height+"")&&Fn(b,h)},d(y){y&&ke(e)}}}function oCe(o){let e,t,s=o[1].type==="files"&&oce(o);return{c(){s&&s.c(),e=Rs()},m(a,l){s&&s.m(a,l),Te(a,e,l),t=!0},p(a,[l]){a[1].type==="files"?s?(s.p(a,l),l&2&&xe(s,1)):(s=oce(a),s.c(),xe(s,1),s.m(e.parentNode,e)):s&&(mo(),Be(s,1,1,()=>{s=null}),go())},i(a){t||(xe(s),t=!0)},o(a){Be(s),t=!1},d(a){s&&s.d(a),a&&ke(e)}}}function sCe(o,e,t){let{record:s}=e,{schema:a}=e;return o.$$set=l=>{"record"in l&&t(0,s=l.record),"schema"in l&&t(1,a=l.schema)},[s,a]}class Vpe extends uo{constructor(e){super(),co(this,e,sCe,oCe,lo,{record:0,schema:1})}}function rce(o,e,t){const s=o.slice();return s[9]=e[t],s}function ice(o){let e,t=o[1],s=[];for(let a=0;a1&&ice(o);return{c(){t&&t.c(),e=Rs()},m(s,a){t&&t.m(s,a),Te(s,e,a)},p(s,[a]){s[1].length>1?t?t.p(s,a):(t=ice(s),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},i:un,o:un,d(s){t&&t.d(s),s&&ke(e)}}}function iCe(o,e,t){var E,R;let{schema:s}=e,{isCreateMode:a}=e,{active:l=""}=e,u=(R=(E=s.groups)==null?void 0:E.map($=>({label:$,name:$})))!=null?R:[],d={label:"Main",name:""},h={label:"Graph",name:"_graph"};a?u=[d,...u]:u=[d,...u,h];function b($){$.preventDefault(),t(0,l="_graph")}function y($,Q){$.preventDefault(),Q=="_graph"?b($):t(0,l=Q)}const C=($,Q)=>y(Q,$.name);return o.$$set=$=>{"schema"in $&&t(3,s=$.schema),"isCreateMode"in $&&t(4,a=$.isCreateMode),"active"in $&&t(0,l=$.active)},[l,u,y,s,a,C]}class Wpe extends uo{constructor(e){super(),co(this,e,iCe,rCe,lo,{schema:3,isCreateMode:4,active:0})}}function lce(o,e,t){const s=o.slice();return s[11]=e[t],s}function cce(o){let e=[],t=new Map,s,a=o[3];const l=d=>d[11].id;for(let d=0;d{axios.get("/records/suggestions",{params:{schema:l.optionsFrom,field:l.optionsField,value:d,ui:l.ui}}).then(Q=>{t(3,s=Q.data)}).catch(Q=>{console.log(Q)})},500);function b($,Q){$.preventDefault(),t(0,u=Q.data[l.optionsField]),t(1,d="")}const y=($,Q)=>b(Q,$),C=($,Q)=>b(Q,$),E=$=>{t(0,u=d),t(1,d="")},R=$=>{t(0,u=d),t(1,d="")};return o.$$set=$=>{"field"in $&&t(2,l=$.field),"value"in $&&t(0,u=$.value),"search"in $&&t(1,d=$.search)},t(3,s=[]),[u,d,l,s,a,b,h,y,C,E,R]}class eV extends uo{constructor(e){super(),co(this,e,uCe,cCe,lo,{field:2,value:0,search:1,update:6})}get update(){return this.$$.ctx[6]}}function dce(o,e,t){const s=o.slice();return s[11]=e[t][0],s[12]=e[t][1],s}function hce(o,e,t){const s=o.slice();return s[8]=e[t],s}function mce(o){let e,t;function s(u,d){return d&1&&(e=null),e==null&&(e=!!Array.isArray(u[0].selectOptions)),e?dCe:fCe}let a=s(o,-1),l=a(o);return{c(){l.c(),t=Rs()},m(u,d){l.m(u,d),Te(u,t,d)},p(u,d){a===(a=s(u,d))&&l?l.p(u,d):(l.d(1),l=a(u),l&&(l.c(),l.m(t.parentNode,t)))},d(u){l.d(u),u&&ke(t)}}}function fCe(o){let e=[],t=new Map,s,a=Object.entries(o[0].selectOptions);const l=u=>u[11];for(let u=0;uu[8];for(let u=0;uu(E,C),h=(C,E)=>u(E,C),b=(C,E)=>u(E,C),y=(C,E)=>u(E,C);return o.$$set=C=>{"field"in C&&t(0,s=C.field),"value"in C&&t(2,a=C.value),"search"in C&&t(3,l=C.search)},[s,u,a,l,d,h,b,y]}class gCe extends uo{constructor(e){super(),co(this,e,mCe,hCe,lo,{field:0,value:2,search:3})}}function Lm(o,e){return o&&o[e]?o[e].message:null}function pCe(o){let e,t,s,a;return{c(){e=re("input"),Z(e,"type","text"),Z(e,"id",o[3]),Z(e,"class","form-control"),Z(e,"autocomplete","off"),e.readOnly=t=o[1].readonly&&!o[2],Vo(e,"is-invalid",o[7])},m(l,u){Te(l,e,u),ar(e,o[0]),s||(a=mn(e,"input",o[18]),s=!0)},p(l,u){u&8&&Z(e,"id",l[3]),u&6&&t!==(t=l[1].readonly&&!l[2])&&(e.readOnly=t),u&1&&e.value!==l[0]&&ar(e,l[0]),u&128&&Vo(e,"is-invalid",l[7])},i:un,o:un,d(l){l&&ke(e),s=!1,a()}}}function bCe(o){let e,t,s,a,l,u,d,h,b,y,C,E,R;function $(K){o[15](K)}function Q(K){o[16](K)}let F={field:o[1]};o[0]!==void 0&&(F.value=o[0]),o[6]!==void 0&&(F.search=o[6]),u=new gCe({props:F}),Ro.push(()=>er(u,"value",$)),Ro.push(()=>er(u,"search",Q));let U=o[0]&&bce(o);return{c(){e=re("div"),t=re("input"),a=Ze(),l=re("div"),en(u.$$.fragment),b=Ze(),U&&U.c(),y=Rs(),Z(t,"type","search"),Z(t,"id",o[3]),Z(t,"class","form-control dropdown-toggle"),Z(t,"placeholder","Search for options"),Z(t,"data-bs-toggle","dropdown"),Z(t,"autocomplete","off"),t.readOnly=s=o[1].readonly&&!o[2],Vo(t,"is-invalid",o[7]),Z(l,"class","dropdown-menu w-100"),Z(e,"class","dropdown")},m(K,L){Te(K,e,L),X(e,t),ar(t,o[6]),X(e,a),X(e,l),Kt(u,l,null),Te(K,b,L),U&&U.m(K,L),Te(K,y,L),C=!0,E||(R=mn(t,"input",o[14]),E=!0)},p(K,L){(!C||L&8)&&Z(t,"id",K[3]),(!C||L&6&&s!==(s=K[1].readonly&&!K[2]))&&(t.readOnly=s),L&64&&t.value!==K[6]&&ar(t,K[6]),(!C||L&128)&&Vo(t,"is-invalid",K[7]);const te={};L&2&&(te.field=K[1]),!d&&L&1&&(d=!0,te.value=K[0],lr(()=>d=!1)),!h&&L&64&&(h=!0,te.search=K[6],lr(()=>h=!1)),u.$set(te),K[0]?U?U.p(K,L):(U=bce(K),U.c(),U.m(y.parentNode,y)):U&&(U.d(1),U=null)},i(K){C||(xe(u.$$.fragment,K),C=!0)},o(K){Be(u.$$.fragment,K),C=!1},d(K){K&&ke(e),Jt(u),K&&ke(b),U&&U.d(K),K&&ke(y),E=!1,R()}}}function vCe(o){let e,t,s,a,l,u,d,h,b,y,C=o[1].optionsFrom&&vce(o),E=o[0]&&Oce(o);return{c(){e=re("div"),t=re("input"),a=Ze(),l=re("div"),C&&C.c(),u=Ze(),E&&E.c(),d=Rs(),Z(t,"type","search"),Z(t,"id",o[3]),Z(t,"class","form-control dropdown-toggle"),Z(t,"placeholder","Search for options"),Z(t,"data-bs-toggle","dropdown"),Z(t,"autocomplete","off"),t.readOnly=s=o[1].readonly&&!o[2],Vo(t,"is-invalid",o[7]),Z(l,"class","dropdown-menu w-100"),Z(e,"class","dropdown")},m(R,$){Te(R,e,$),X(e,t),ar(t,o[6]),X(e,a),X(e,l),C&&C.m(l,null),Te(R,u,$),E&&E.m(R,$),Te(R,d,$),h=!0,b||(y=[mn(t,"keyup",function(){Ub(o[4].update)&&o[4].update.apply(this,arguments)}),mn(t,"focus",function(){Ub(o[4].update)&&o[4].update.apply(this,arguments)}),mn(t,"input",o[9])],b=!0)},p(R,$){o=R,(!h||$&8)&&Z(t,"id",o[3]),(!h||$&6&&s!==(s=o[1].readonly&&!o[2]))&&(t.readOnly=s),$&64&&t.value!==o[6]&&ar(t,o[6]),(!h||$&128)&&Vo(t,"is-invalid",o[7]),o[1].optionsFrom?C?(C.p(o,$),$&2&&xe(C,1)):(C=vce(o),C.c(),xe(C,1),C.m(l,null)):C&&(mo(),Be(C,1,1,()=>{C=null}),go()),o[0]?E?E.p(o,$):(E=Oce(o),E.c(),E.m(d.parentNode,d)):E&&(E.d(1),E=null)},i(R){h||(xe(C),h=!0)},o(R){Be(C),h=!1},d(R){R&&ke(e),C&&C.d(),R&&ke(u),E&&E.d(R),R&&ke(d),b=!1,vi(y)}}}function bce(o){let e,t,s,a,l,u,d;function h(C,E){return E&2&&(s=null),s==null&&(s=!!Array.isArray(C[1].selectOptions)),s?yCe:OCe}let b=h(o,-1),y=b(o);return{c(){e=re("span"),t=re("div"),y.c(),a=Ze(),l=re("button"),Z(l,"type","button"),Z(l,"class","btn-close btn-sm ms-1"),rs(l,"font-size","10px"),Z(l,"aria-label","Close"),Z(t,"class","d-flex align-items-center "),Z(e,"class","badge rounded-pill bg-light text-dark fs-6 mt-3")},m(C,E){Te(C,e,E),X(e,t),y.m(t,null),X(t,a),X(t,l),u||(d=mn(l,"click",ku(o[17])),u=!0)},p(C,E){b===(b=h(C,E))&&y?y.p(C,E):(y.d(1),y=b(C),y&&(y.c(),y.m(t,a)))},d(C){C&&ke(e),y.d(),u=!1,d()}}}function OCe(o){let e=o[1].selectOptions[o[0]]+"",t;return{c(){t=Ht(e)},m(s,a){Te(s,t,a)},p(s,a){a&3&&e!==(e=s[1].selectOptions[s[0]]+"")&&Fn(t,e)},d(s){s&&ke(t)}}}function yCe(o){let e;return{c(){e=Ht(o[0])},m(t,s){Te(t,e,s)},p(t,s){s&1&&Fn(e,t[0])},d(t){t&&ke(e)}}}function vce(o){let e,t,s,a;function l(h){o[11](h)}function u(h){o[12](h)}let d={field:o[1]};return o[0]!==void 0&&(d.value=o[0]),o[6]!==void 0&&(d.search=o[6]),e=new eV({props:d}),o[10](e),Ro.push(()=>er(e,"value",l)),Ro.push(()=>er(e,"search",u)),{c(){en(e.$$.fragment)},m(h,b){Kt(e,h,b),a=!0},p(h,b){const y={};b&2&&(y.field=h[1]),!t&&b&1&&(t=!0,y.value=h[0],lr(()=>t=!1)),!s&&b&64&&(s=!0,y.search=h[6],lr(()=>s=!1)),e.$set(y)},i(h){a||(xe(e.$$.fragment,h),a=!0)},o(h){Be(e.$$.fragment,h),a=!1},d(h){o[10](null),Jt(e,h)}}}function Oce(o){let e,t,s,a,l,u,d;return{c(){e=re("span"),t=re("div"),s=Ht(o[0]),a=Ze(),l=re("button"),Z(l,"type","button"),Z(l,"class","btn-close btn-sm ms-1"),rs(l,"font-size","10px"),Z(l,"aria-label","Close"),Z(t,"class","d-flex align-items-center "),Z(e,"class","badge rounded-pill bg-light text-dark fs-6 mt-3")},m(h,b){Te(h,e,b),X(e,t),X(t,s),X(t,a),X(t,l),u||(d=mn(l,"click",ku(o[13])),u=!0)},p(h,b){b&1&&Fn(s,h[0])},d(h){h&&ke(e),u=!1,d()}}}function yce(o){let e,t;return{c(){e=re("div"),t=Ht(o[7]),Z(e,"class","invalid-feedback d-block")},m(s,a){Te(s,e,a),X(e,t)},p(s,a){a&128&&Fn(t,s[7])},d(s){s&&ke(e)}}}function wCe(o){let e,t,s,a,l;const u=[vCe,bCe,pCe],d=[];function h(y,C){return y[5]?0:y[1].selectOptions?1:2}t=h(o),s=d[t]=u[t](o);let b=o[7]&&yce(o);return{c(){e=re("div"),s.c(),a=Ze(),b&&b.c(),Z(e,"class","mb-0")},m(y,C){Te(y,e,C),d[t].m(e,null),X(e,a),b&&b.m(e,null),l=!0},p(y,[C]){let E=t;t=h(y),t===E?d[t].p(y,C):(mo(),Be(d[E],1,1,()=>{d[E]=null}),go(),s=d[t],s?s.p(y,C):(s=d[t]=u[t](y),s.c()),xe(s,1),s.m(e,a)),y[7]?b?b.p(y,C):(b=yce(y),b.c(),b.m(e,null)):b&&(b.d(1),b=null)},i(y){l||(xe(s),l=!0)},o(y){Be(s),l=!1},d(y){y&&ke(e),d[t].d(),b&&b.d()}}}function _Ce(o,e,t){let s,a,l,{field:u}=e,{value:d}=e,{isCreateMode:h}=e,{validationErrors:b}=e,{id:y}=e,C;function E(){a=this.value,t(6,a)}function R(oe){Ro[oe?"unshift":"push"](()=>{C=oe,t(4,C)})}function $(oe){d=oe,t(0,d)}function Q(oe){a=oe,t(6,a)}const F=oe=>t(0,d="");function U(){a=this.value,t(6,a)}function K(oe){d=oe,t(0,d)}function L(oe){a=oe,t(6,a)}const te=oe=>t(0,d="");function ne(){d=this.value,t(0,d)}return o.$$set=oe=>{"field"in oe&&t(1,u=oe.field),"value"in oe&&t(0,d=oe.value),"isCreateMode"in oe&&t(2,h=oe.isCreateMode),"validationErrors"in oe&&t(8,b=oe.validationErrors),"id"in oe&&t(3,y=oe.id)},o.$$.update=()=>{o.$$.dirty&258&&t(7,s=Lm(b,u.name)),o.$$.dirty&6&&t(5,l=u.optionsFrom&&!(u.readonly&&!h))},t(6,a=""),[d,u,h,y,C,l,a,s,b,E,R,$,Q,F,U,K,L,te,ne]}class Upe extends uo{constructor(e){super(),co(this,e,_Ce,wCe,lo,{field:1,value:0,isCreateMode:2,validationErrors:8,id:3})}}function wce(o){let e,t;return{c(){e=re("div"),t=Ht(o[4]),Z(e,"class","invalid-feedback d-block")},m(s,a){Te(s,e,a),X(e,t)},p(s,a){a&16&&Fn(t,s[4])},d(s){s&&ke(e)}}}function SCe(o){let e,t,s,a,l,u,d=o[4]&&wce(o);return{c(){e=re("div"),t=re("input"),a=Ze(),d&&d.c(),Z(t,"type","text"),Z(t,"id",o[3]),Z(t,"class","form-control"),Z(t,"autocomplete","off"),t.readOnly=s=o[1].readonly&&!o[2],Vo(t,"is-invalid",o[4]),Z(e,"class","mb-0")},m(h,b){Te(h,e,b),X(e,t),ar(t,o[0]),X(e,a),d&&d.m(e,null),l||(u=mn(t,"input",o[6]),l=!0)},p(h,[b]){b&8&&Z(t,"id",h[3]),b&6&&s!==(s=h[1].readonly&&!h[2])&&(t.readOnly=s),b&1&&t.value!==h[0]&&ar(t,h[0]),b&16&&Vo(t,"is-invalid",h[4]),h[4]?d?d.p(h,b):(d=wce(h),d.c(),d.m(e,null)):d&&(d.d(1),d=null)},i:un,o:un,d(h){h&&ke(e),d&&d.d(),l=!1,u()}}}function CCe(o,e,t){let s,{field:a}=e,{value:l}=e,{isCreateMode:u}=e,{validationErrors:d}=e,{id:h}=e;function b(){l=this.value,t(0,l)}return o.$$set=y=>{"field"in y&&t(1,a=y.field),"value"in y&&t(0,l=y.value),"isCreateMode"in y&&t(2,u=y.isCreateMode),"validationErrors"in y&&t(5,d=y.validationErrors),"id"in y&&t(3,h=y.id)},o.$$.update=()=>{o.$$.dirty&34&&t(4,s=Lm(d,a.name))},[l,a,u,h,s,d,b]}class Ype extends uo{constructor(e){super(),co(this,e,CCe,SCe,lo,{field:1,value:0,isCreateMode:2,validationErrors:5,id:3})}}function K6(o,e,t,s,a=""){let l=t.map(d=>({target:d.id,source:e.id,sourceSchema:e.schema,targetSchema:d.schema,field:s,depth:1,rank:""})),u=o.edges;return a==="replace"&&(u=u.filter(d=>d.field!==field.name)),o.records=Lc.exports.uniqBy([...o.records,...t],d=>d.id),o.edges=Lc.exports.uniqBy([...u,...l],d=>d.source+d.target+d.field+d.depth),o}function kCe(o){let e,t=o[0].text+"",s;return{c(){e=re("span"),s=Ht(t),Z(e,"class","badge text-bg-"+o[0].bg),rs(e,"max-width","84px")},m(a,l){Te(a,e,l),X(e,s)},p:un,i:un,o:un,d(a){a&&ke(e)}}}function xCe(o,e,t){let{status:s}=e,a=Zpe(s);return o.$$set=l=>{"status"in l&&t(1,s=l.status)},[a,s]}class ire extends uo{constructor(e){super(),co(this,e,xCe,kCe,lo,{status:1})}}function TCe(o){let e,t,s;return t=new Xw({props:{record:o[0],size:"small"}}),{c(){e=re("div"),en(t.$$.fragment),rs(e,"max-width","94px"),rs(e,"margin-right","15px")},m(a,l){Te(a,e,l),Kt(t,e,null),s=!0},p(a,l){const u={};l&1&&(u.record=a[0]),t.$set(u)},i(a){s||(xe(t.$$.fragment,a),s=!0)},o(a){Be(t.$$.fragment,a),s=!1},d(a){a&&ke(e),Jt(t)}}}function _ce(o){let e,t;return e=new ire({props:{status:o[0].status}}),{c(){en(e.$$.fragment)},m(s,a){Kt(e,s,a),t=!0},p(s,a){const l={};a&1&&(l.status=s[0].status),e.$set(l)},i(s){t||(xe(e.$$.fragment,s),t=!0)},o(s){Be(e.$$.fragment,s),t=!1},d(s){Jt(e,s)}}}function Sce(o){let e,t,s,a,l,u;return s=new Fa({props:{icon:"trash-can"}}),{c(){e=re("div"),t=re("button"),en(s.$$.fragment),Z(t,"class","trash-button text-dark btn btn-sm btn-link svelte-dof9cm"),Z(e,"class","position-absolute end-0"),rs(e,"top","5px")},m(d,h){Te(d,e,h),X(e,t),Kt(s,t,null),a=!0,l||(u=mn(t,"click",o[6]),l=!0)},p:un,i(d){a||(xe(s.$$.fragment,d),a=!0)},o(d){Be(s.$$.fragment,d),a=!1},d(d){d&&ke(e),Jt(s),l=!1,u()}}}function ECe(o){let e,t,s,a,l,u,d,h,b,y,C,E,R,$,Q=o[4].type==="files"&&TCe(o),F=o[0].status==="draft"&&_ce(o),U=o[2]&&Sce(o);return{c(){var K;e=re("div"),t=re("div"),Q&&Q.c(),s=Ze(),a=re("div"),l=re("a"),u=Ht(o[5]),h=Ze(),b=re("small"),b.textContent=`${o[4].label}`,y=Ze(),C=re("small"),F&&F.c(),E=Ze(),U&&U.c(),Z(l,"class","title-link m-0 fs-5 text-decoration-none text-dark d-block svelte-dof9cm"),Z(l,"href",d=o[3].lucentUrl+"/records/"+o[0].id),Z(l,"title",o[5]),Z(b,"class","text-muted"),Z(C,"class","text-muted"),Z(a,"class","overflow-hidden"),Z(t,"class","card-body d-flex"),Z(e,"class",R="card mb-2 bg-light "+o[1]+" svelte-dof9cm"),rs(e,"border-color",(K=o[4].color)!=null?K:"#ccc"),rs(e,"border-width","1px")},m(K,L){Te(K,e,L),X(e,t),Q&&Q.m(t,null),X(t,s),X(t,a),X(a,l),X(l,u),X(a,h),X(a,b),X(a,y),X(a,C),F&&F.m(C,null),X(e,E),U&&U.m(e,null),$=!0},p(K,[L]){K[4].type==="files"&&Q.p(K,L),(!$||L&1&&d!==(d=K[3].lucentUrl+"/records/"+K[0].id))&&Z(l,"href",d),K[0].status==="draft"?F?(F.p(K,L),L&1&&xe(F,1)):(F=_ce(K),F.c(),xe(F,1),F.m(C,null)):F&&(mo(),Be(F,1,1,()=>{F=null}),go()),K[2]?U?(U.p(K,L),L&4&&xe(U,1)):(U=Sce(K),U.c(),xe(U,1),U.m(e,null)):U&&(mo(),Be(U,1,1,()=>{U=null}),go()),(!$||L&2&&R!==(R="card mb-2 bg-light "+K[1]+" svelte-dof9cm"))&&Z(e,"class",R)},i(K){$||(xe(Q),xe(F),xe(U),$=!0)},o(K){Be(Q),Be(F),Be(U),$=!1},d(K){K&&ke(e),Q&&Q.d(),F&&F.d(),U&&U.d()}}}function ACe(o,e,t){const s=Fg(),a=Ur("channel");let{graph:l}=e,{record:u}=e,{classes:d=""}=e,{hasDelete:h=!1}=e,b=a.schemas.find(E=>E.name===u.schema),y=qu(a.schemas,u,l);function C(E){E.preventDefault(),s("remove",u.id)}return o.$$set=E=>{"graph"in E&&t(7,l=E.graph),"record"in E&&t(0,u=E.record),"classes"in E&&t(1,d=E.classes),"hasDelete"in E&&t(2,h=E.hasDelete)},[u,d,h,a,b,y,C,l]}class J6 extends uo{constructor(e){super(),co(this,e,ACe,ECe,lo,{graph:7,record:0,classes:1,hasDelete:2})}}function qD(o,e,t,s){var u,d;if(o===e)return t;let a=(u=t==null?void 0:t.filter(h=>h.field===s&&h.depth===1))!=null?u:[],l=(d=t==null?void 0:t.filter(h=>!(h.field===s&&h.depth===1)))!=null?d:[];return a=DCe(a,o,e),[...l,...a]}function DCe(o,e,t){if(t>=o.length)for(var s=t-o.length+1;s--;)o.push(void 0);return o.splice(t,0,o.splice(e,1)[0]),o}function Cce(o,e,t){const s=o.slice();return s[23]=e[t],s}function kce(o){let e,t,s,a;function l(h){o[13](h)}function u(h){o[14](h)}let d={field:o[23],schema:o[2],record:o[0],validationErrors:o[4],isCreateMode:o[3]};return o[0].data!==void 0&&(d.data=o[0].data),o[1]!==void 0&&(d.graph=o[1]),e=new LOe({props:d}),Ro.push(()=>er(e,"data",l)),Ro.push(()=>er(e,"graph",u)),{c(){en(e.$$.fragment)},m(h,b){Kt(e,h,b),a=!0},p(h,b){const y={};b&4&&(y.schema=h[2]),b&1&&(y.record=h[0]),b&16&&(y.validationErrors=h[4]),b&8&&(y.isCreateMode=h[3]),!t&&b&1&&(t=!0,y.data=h[0].data,lr(()=>t=!1)),!s&&b&2&&(s=!0,y.graph=h[1],lr(()=>s=!1)),e.$set(y)},i(h){a||(xe(e.$$.fragment,h),a=!0)},o(h){Be(e.$$.fragment,h),a=!1},d(h){Jt(e,h)}}}function xce(o,e){let t,s,a,l=e[5]===e[23].group&&kce(e);return{key:o,first:null,c(){t=Rs(),l&&l.c(),s=Rs(),this.first=t},m(u,d){Te(u,t,d),l&&l.m(u,d),Te(u,s,d),a=!0},p(u,d){e=u,e[5]===e[23].group?l?(l.p(e,d),d&32&&xe(l,1)):(l=kce(e),l.c(),xe(l,1),l.m(s.parentNode,s)):l&&(mo(),Be(l,1,1,()=>{l=null}),go())},i(u){a||(xe(l),a=!0)},o(u){Be(l),a=!1},d(u){u&&ke(t),l&&l.d(u),u&&ke(s)}}}function Tce(o){let e,t,s;function a(u){o[15](u)}let l={schema:o[2]};return o[0].status!==void 0&&(l.status=o[0].status),e=new zpe({props:l}),Ro.push(()=>er(e,"status",a)),{c(){en(e.$$.fragment)},m(u,d){Kt(e,u,d),s=!0},p(u,d){const h={};d&4&&(h.schema=u[2]),!t&&d&1&&(t=!0,h.status=u[0].status,lr(()=>t=!1)),e.$set(h)},i(u){s||(xe(e.$$.fragment,u),s=!0)},o(u){Be(e.$$.fragment,u),s=!1},d(u){Jt(e,u)}}}function PCe(o){let e,t,s,a,l,u;return{c(){e=re("button"),t=re("span"),s=Ht(` +`)};Qg.prototype.renderPartial=function(e,t,s,a){if(!!s){var l=this.getConfigTags(a),u=rre(s)?s(e[1]):s[e[1]];if(u!=null){var d=e[6],h=e[5],b=e[4],y=u;h==0&&b&&(y=this.indentPartial(u,b,d));var C=this.parse(y,l);return this.renderTokens(C,t,s,y,a)}}};Qg.prototype.unescapedValue=function(e,t){var s=t.lookup(e[1]);if(s!=null)return s};Qg.prototype.escapedValue=function(e,t,s){var a=this.getConfigEscape(s)||Zp.escape,l=t.lookup(e[1]);if(l!=null)return typeof l=="number"&&a===Zp.escape?String(l):a(l)};Qg.prototype.rawValue=function(e){return e[1]};Qg.prototype.getConfigTags=function(e){return jD(e)?e:e&&typeof e=="object"?e.tags:void 0};Qg.prototype.getConfigEscape=function(e){if(e&&typeof e=="object"&&!jD(e))return e.escape};var Zp={name:"mustache.js",version:"4.2.0",tags:["{{","}}"],clearCache:void 0,escape:void 0,parse:void 0,render:void 0,Scanner:void 0,Context:void 0,Writer:void 0,set templateCache(o){w6.templateCache=o},get templateCache(){return w6.templateCache}},w6=new Qg;Zp.clearCache=function(){return w6.clearCache()};Zp.parse=function(e,t){return w6.parse(e,t)};Zp.render=function(e,t,s,a){if(typeof e!="string")throw new TypeError('Invalid template! Template should be a "string" but "'+Kwe(e)+'" was given as the first argument for mustache#render(template, view, partials)');return w6.render(e,t,s,a)};Zp.escape=r_e;Zp.Scanner=j6;Zp.Context=DD;Zp.Writer=Qg;function nz(o){return nz=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},nz(o)}function hE(o){if(o===null||o===!0||o===!1)return NaN;var e=Number(o);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}function Sc(o,e){if(e.length1?"s":"")+" required, but only "+e.length+" present")}function cc(o){Sc(1,arguments);var e=Object.prototype.toString.call(o);return o instanceof Date||nz(o)==="object"&&e==="[object Date]"?new Date(o.getTime()):typeof o=="number"||e==="[object Number]"?new Date(o):((typeof o=="string"||e==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function h_e(o,e){Sc(2,arguments);var t=cc(o).getTime(),s=hE(e);return new Date(t+s)}var m_e={};function q6(){return m_e}function Noe(o){var e=new Date(Date.UTC(o.getFullYear(),o.getMonth(),o.getDate(),o.getHours(),o.getMinutes(),o.getSeconds(),o.getMilliseconds()));return e.setUTCFullYear(o.getFullYear()),o.getTime()-e.getTime()}function kH(o,e){Sc(2,arguments);var t=cc(o),s=cc(e),a=t.getTime()-s.getTime();return a<0?-1:a>0?1:a}function g_e(o){return Sc(1,arguments),o instanceof Date||nz(o)==="object"&&Object.prototype.toString.call(o)==="[object Date]"}function p_e(o){if(Sc(1,arguments),!g_e(o)&&typeof o!="number")return!1;var e=cc(o);return!isNaN(Number(e))}function b_e(o,e){Sc(2,arguments);var t=cc(o),s=cc(e),a=t.getFullYear()-s.getFullYear(),l=t.getMonth()-s.getMonth();return a*12+l}function v_e(o,e){return Sc(2,arguments),cc(o).getTime()-cc(e).getTime()}var Nle={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(e){return e<0?Math.ceil(e):Math.floor(e)}},O_e="trunc";function y_e(o){return o?Nle[o]:Nle[O_e]}function w_e(o){Sc(1,arguments);var e=cc(o);return e.setHours(23,59,59,999),e}function __e(o){Sc(1,arguments);var e=cc(o),t=e.getMonth();return e.setFullYear(e.getFullYear(),t+1,0),e.setHours(23,59,59,999),e}function S_e(o){Sc(1,arguments);var e=cc(o);return w_e(e).getTime()===__e(e).getTime()}function C_e(o,e){Sc(2,arguments);var t=cc(o),s=cc(e),a=kH(t,s),l=Math.abs(b_e(t,s)),u;if(l<1)u=0;else{t.getMonth()===1&&t.getDate()>27&&t.setDate(30),t.setMonth(t.getMonth()-a*l);var d=kH(t,s)===-a;S_e(cc(o))&&l===1&&kH(o,s)===1&&(d=!1),u=a*(l-Number(d))}return u===0?0:u}function k_e(o,e,t){Sc(2,arguments);var s=v_e(o,e)/1e3;return y_e(t==null?void 0:t.roundingMethod)(s)}function x_e(o,e){Sc(2,arguments);var t=hE(e);return h_e(o,-t)}var T_e=864e5;function E_e(o){Sc(1,arguments);var e=cc(o),t=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var s=e.getTime(),a=t-s;return Math.floor(a/T_e)+1}function oz(o){Sc(1,arguments);var e=1,t=cc(o),s=t.getUTCDay(),a=(s=a.getTime()?t+1:e.getTime()>=u.getTime()?t:t-1}function A_e(o){Sc(1,arguments);var e=Rpe(o),t=new Date(0);t.setUTCFullYear(e,0,4),t.setUTCHours(0,0,0,0);var s=oz(t);return s}var D_e=6048e5;function P_e(o){Sc(1,arguments);var e=cc(o),t=oz(e).getTime()-A_e(e).getTime();return Math.round(t/D_e)+1}function sz(o,e){var t,s,a,l,u,d,h,b;Sc(1,arguments);var y=q6(),C=hE((t=(s=(a=(l=e==null?void 0:e.weekStartsOn)!==null&&l!==void 0?l:e==null||(u=e.locale)===null||u===void 0||(d=u.options)===null||d===void 0?void 0:d.weekStartsOn)!==null&&a!==void 0?a:y.weekStartsOn)!==null&&s!==void 0?s:(h=y.locale)===null||h===void 0||(b=h.options)===null||b===void 0?void 0:b.weekStartsOn)!==null&&t!==void 0?t:0);if(!(C>=0&&C<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var E=cc(o),R=E.getUTCDay(),$=(R=1&&R<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var $=new Date(0);$.setUTCFullYear(C+1,0,R),$.setUTCHours(0,0,0,0);var Q=sz($,e),F=new Date(0);F.setUTCFullYear(C,0,R),F.setUTCHours(0,0,0,0);var U=sz(F,e);return y.getTime()>=Q.getTime()?C+1:y.getTime()>=U.getTime()?C:C-1}function M_e(o,e){var t,s,a,l,u,d,h,b;Sc(1,arguments);var y=q6(),C=hE((t=(s=(a=(l=e==null?void 0:e.firstWeekContainsDate)!==null&&l!==void 0?l:e==null||(u=e.locale)===null||u===void 0||(d=u.options)===null||d===void 0?void 0:d.firstWeekContainsDate)!==null&&a!==void 0?a:y.firstWeekContainsDate)!==null&&s!==void 0?s:(h=y.locale)===null||h===void 0||(b=h.options)===null||b===void 0?void 0:b.firstWeekContainsDate)!==null&&t!==void 0?t:1),E=$pe(o,e),R=new Date(0);R.setUTCFullYear(E,0,C),R.setUTCHours(0,0,0,0);var $=sz(R,e);return $}var R_e=6048e5;function $_e(o,e){Sc(1,arguments);var t=cc(o),s=sz(t,e).getTime()-M_e(t,e).getTime();return Math.round(s/R_e)+1}function Bl(o,e){for(var t=o<0?"-":"",s=Math.abs(o).toString();s.length0?s:1-s;return Bl(t==="yy"?a%100:a,t.length)},M:function(e,t){var s=e.getUTCMonth();return t==="M"?String(s+1):Bl(s+1,2)},d:function(e,t){return Bl(e.getUTCDate(),t.length)},a:function(e,t){var s=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return s.toUpperCase();case"aaa":return s;case"aaaaa":return s[0];case"aaaa":default:return s==="am"?"a.m.":"p.m."}},h:function(e,t){return Bl(e.getUTCHours()%12||12,t.length)},H:function(e,t){return Bl(e.getUTCHours(),t.length)},m:function(e,t){return Bl(e.getUTCMinutes(),t.length)},s:function(e,t){return Bl(e.getUTCSeconds(),t.length)},S:function(e,t){var s=t.length,a=e.getUTCMilliseconds(),l=Math.floor(a*Math.pow(10,s-3));return Bl(l,t.length)}};const mC=N_e;var J4={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},I_e={G:function(e,t,s){var a=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return s.era(a,{width:"abbreviated"});case"GGGGG":return s.era(a,{width:"narrow"});case"GGGG":default:return s.era(a,{width:"wide"})}},y:function(e,t,s){if(t==="yo"){var a=e.getUTCFullYear(),l=a>0?a:1-a;return s.ordinalNumber(l,{unit:"year"})}return mC.y(e,t)},Y:function(e,t,s,a){var l=$pe(e,a),u=l>0?l:1-l;if(t==="YY"){var d=u%100;return Bl(d,2)}return t==="Yo"?s.ordinalNumber(u,{unit:"year"}):Bl(u,t.length)},R:function(e,t){var s=Rpe(e);return Bl(s,t.length)},u:function(e,t){var s=e.getUTCFullYear();return Bl(s,t.length)},Q:function(e,t,s){var a=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(a);case"QQ":return Bl(a,2);case"Qo":return s.ordinalNumber(a,{unit:"quarter"});case"QQQ":return s.quarter(a,{width:"abbreviated",context:"formatting"});case"QQQQQ":return s.quarter(a,{width:"narrow",context:"formatting"});case"QQQQ":default:return s.quarter(a,{width:"wide",context:"formatting"})}},q:function(e,t,s){var a=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(a);case"qq":return Bl(a,2);case"qo":return s.ordinalNumber(a,{unit:"quarter"});case"qqq":return s.quarter(a,{width:"abbreviated",context:"standalone"});case"qqqqq":return s.quarter(a,{width:"narrow",context:"standalone"});case"qqqq":default:return s.quarter(a,{width:"wide",context:"standalone"})}},M:function(e,t,s){var a=e.getUTCMonth();switch(t){case"M":case"MM":return mC.M(e,t);case"Mo":return s.ordinalNumber(a+1,{unit:"month"});case"MMM":return s.month(a,{width:"abbreviated",context:"formatting"});case"MMMMM":return s.month(a,{width:"narrow",context:"formatting"});case"MMMM":default:return s.month(a,{width:"wide",context:"formatting"})}},L:function(e,t,s){var a=e.getUTCMonth();switch(t){case"L":return String(a+1);case"LL":return Bl(a+1,2);case"Lo":return s.ordinalNumber(a+1,{unit:"month"});case"LLL":return s.month(a,{width:"abbreviated",context:"standalone"});case"LLLLL":return s.month(a,{width:"narrow",context:"standalone"});case"LLLL":default:return s.month(a,{width:"wide",context:"standalone"})}},w:function(e,t,s,a){var l=$_e(e,a);return t==="wo"?s.ordinalNumber(l,{unit:"week"}):Bl(l,t.length)},I:function(e,t,s){var a=P_e(e);return t==="Io"?s.ordinalNumber(a,{unit:"week"}):Bl(a,t.length)},d:function(e,t,s){return t==="do"?s.ordinalNumber(e.getUTCDate(),{unit:"date"}):mC.d(e,t)},D:function(e,t,s){var a=E_e(e);return t==="Do"?s.ordinalNumber(a,{unit:"dayOfYear"}):Bl(a,t.length)},E:function(e,t,s){var a=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return s.day(a,{width:"abbreviated",context:"formatting"});case"EEEEE":return s.day(a,{width:"narrow",context:"formatting"});case"EEEEEE":return s.day(a,{width:"short",context:"formatting"});case"EEEE":default:return s.day(a,{width:"wide",context:"formatting"})}},e:function(e,t,s,a){var l=e.getUTCDay(),u=(l-a.weekStartsOn+8)%7||7;switch(t){case"e":return String(u);case"ee":return Bl(u,2);case"eo":return s.ordinalNumber(u,{unit:"day"});case"eee":return s.day(l,{width:"abbreviated",context:"formatting"});case"eeeee":return s.day(l,{width:"narrow",context:"formatting"});case"eeeeee":return s.day(l,{width:"short",context:"formatting"});case"eeee":default:return s.day(l,{width:"wide",context:"formatting"})}},c:function(e,t,s,a){var l=e.getUTCDay(),u=(l-a.weekStartsOn+8)%7||7;switch(t){case"c":return String(u);case"cc":return Bl(u,t.length);case"co":return s.ordinalNumber(u,{unit:"day"});case"ccc":return s.day(l,{width:"abbreviated",context:"standalone"});case"ccccc":return s.day(l,{width:"narrow",context:"standalone"});case"cccccc":return s.day(l,{width:"short",context:"standalone"});case"cccc":default:return s.day(l,{width:"wide",context:"standalone"})}},i:function(e,t,s){var a=e.getUTCDay(),l=a===0?7:a;switch(t){case"i":return String(l);case"ii":return Bl(l,t.length);case"io":return s.ordinalNumber(l,{unit:"day"});case"iii":return s.day(a,{width:"abbreviated",context:"formatting"});case"iiiii":return s.day(a,{width:"narrow",context:"formatting"});case"iiiiii":return s.day(a,{width:"short",context:"formatting"});case"iiii":default:return s.day(a,{width:"wide",context:"formatting"})}},a:function(e,t,s){var a=e.getUTCHours(),l=a/12>=1?"pm":"am";switch(t){case"a":case"aa":return s.dayPeriod(l,{width:"abbreviated",context:"formatting"});case"aaa":return s.dayPeriod(l,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return s.dayPeriod(l,{width:"narrow",context:"formatting"});case"aaaa":default:return s.dayPeriod(l,{width:"wide",context:"formatting"})}},b:function(e,t,s){var a=e.getUTCHours(),l;switch(a===12?l=J4.noon:a===0?l=J4.midnight:l=a/12>=1?"pm":"am",t){case"b":case"bb":return s.dayPeriod(l,{width:"abbreviated",context:"formatting"});case"bbb":return s.dayPeriod(l,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return s.dayPeriod(l,{width:"narrow",context:"formatting"});case"bbbb":default:return s.dayPeriod(l,{width:"wide",context:"formatting"})}},B:function(e,t,s){var a=e.getUTCHours(),l;switch(a>=17?l=J4.evening:a>=12?l=J4.afternoon:a>=4?l=J4.morning:l=J4.night,t){case"B":case"BB":case"BBB":return s.dayPeriod(l,{width:"abbreviated",context:"formatting"});case"BBBBB":return s.dayPeriod(l,{width:"narrow",context:"formatting"});case"BBBB":default:return s.dayPeriod(l,{width:"wide",context:"formatting"})}},h:function(e,t,s){if(t==="ho"){var a=e.getUTCHours()%12;return a===0&&(a=12),s.ordinalNumber(a,{unit:"hour"})}return mC.h(e,t)},H:function(e,t,s){return t==="Ho"?s.ordinalNumber(e.getUTCHours(),{unit:"hour"}):mC.H(e,t)},K:function(e,t,s){var a=e.getUTCHours()%12;return t==="Ko"?s.ordinalNumber(a,{unit:"hour"}):Bl(a,t.length)},k:function(e,t,s){var a=e.getUTCHours();return a===0&&(a=24),t==="ko"?s.ordinalNumber(a,{unit:"hour"}):Bl(a,t.length)},m:function(e,t,s){return t==="mo"?s.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):mC.m(e,t)},s:function(e,t,s){return t==="so"?s.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):mC.s(e,t)},S:function(e,t){return mC.S(e,t)},X:function(e,t,s,a){var l=a._originalDate||e,u=l.getTimezoneOffset();if(u===0)return"Z";switch(t){case"X":return Ble(u);case"XXXX":case"XX":return eE(u);case"XXXXX":case"XXX":default:return eE(u,":")}},x:function(e,t,s,a){var l=a._originalDate||e,u=l.getTimezoneOffset();switch(t){case"x":return Ble(u);case"xxxx":case"xx":return eE(u);case"xxxxx":case"xxx":default:return eE(u,":")}},O:function(e,t,s,a){var l=a._originalDate||e,u=l.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Ile(u,":");case"OOOO":default:return"GMT"+eE(u,":")}},z:function(e,t,s,a){var l=a._originalDate||e,u=l.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Ile(u,":");case"zzzz":default:return"GMT"+eE(u,":")}},t:function(e,t,s,a){var l=a._originalDate||e,u=Math.floor(l.getTime()/1e3);return Bl(u,t.length)},T:function(e,t,s,a){var l=a._originalDate||e,u=l.getTime();return Bl(u,t.length)}};function Ile(o,e){var t=o>0?"-":"+",s=Math.abs(o),a=Math.floor(s/60),l=s%60;if(l===0)return t+String(a);var u=e||"";return t+String(a)+u+Bl(l,2)}function Ble(o,e){if(o%60===0){var t=o>0?"-":"+";return t+Bl(Math.abs(o)/60,2)}return eE(o,e)}function eE(o,e){var t=e||"",s=o>0?"-":"+",a=Math.abs(o),l=Bl(Math.floor(a/60),2),u=Bl(a%60,2);return s+l+t+u}const B_e=I_e;var Lle=function(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},Npe=function(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},L_e=function(e,t){var s=e.match(/(P+)(p+)?/)||[],a=s[1],l=s[2];if(!l)return Lle(e,t);var u;switch(a){case"P":u=t.dateTime({width:"short"});break;case"PP":u=t.dateTime({width:"medium"});break;case"PPP":u=t.dateTime({width:"long"});break;case"PPPP":default:u=t.dateTime({width:"full"});break}return u.replace("{{date}}",Lle(a,t)).replace("{{time}}",Npe(l,t))},F_e={p:Npe,P:L_e};const Q_e=F_e;var Z_e=["D","DD"],H_e=["YY","YYYY"];function z_e(o){return Z_e.indexOf(o)!==-1}function V_e(o){return H_e.indexOf(o)!==-1}function Fle(o,e,t){if(o==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(o==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(o==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(o==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var W_e={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},U_e=function(e,t,s){var a,l=W_e[e];return typeof l=="string"?a=l:t===1?a=l.one:a=l.other.replace("{{count}}",t.toString()),s!=null&&s.addSuffix?s.comparison&&s.comparison>0?"in "+a:a+" ago":a};const Y_e=U_e;function pne(o){return function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.width?String(e.width):o.defaultWidth,s=o.formats[t]||o.formats[o.defaultWidth];return s}}var X_e={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},j_e={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},q_e={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},G_e={date:pne({formats:X_e,defaultWidth:"full"}),time:pne({formats:j_e,defaultWidth:"full"}),dateTime:pne({formats:q_e,defaultWidth:"full"})};const K_e=G_e;var J_e={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},eSe=function(e,t,s,a){return J_e[e]};const tSe=eSe;function BN(o){return function(e,t){var s=t!=null&&t.context?String(t.context):"standalone",a;if(s==="formatting"&&o.formattingValues){var l=o.defaultFormattingWidth||o.defaultWidth,u=t!=null&&t.width?String(t.width):l;a=o.formattingValues[u]||o.formattingValues[l]}else{var d=o.defaultWidth,h=t!=null&&t.width?String(t.width):o.defaultWidth;a=o.values[h]||o.values[d]}var b=o.argumentCallback?o.argumentCallback(e):e;return a[b]}}var nSe={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},oSe={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},sSe={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},rSe={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},iSe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},aSe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},lSe=function(e,t){var s=Number(e),a=s%100;if(a>20||a<10)switch(a%10){case 1:return s+"st";case 2:return s+"nd";case 3:return s+"rd"}return s+"th"},cSe={ordinalNumber:lSe,era:BN({values:nSe,defaultWidth:"wide"}),quarter:BN({values:oSe,defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:BN({values:sSe,defaultWidth:"wide"}),day:BN({values:rSe,defaultWidth:"wide"}),dayPeriod:BN({values:iSe,defaultWidth:"wide",formattingValues:aSe,defaultFormattingWidth:"wide"})};const uSe=cSe;function LN(o){return function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=t.width,a=s&&o.matchPatterns[s]||o.matchPatterns[o.defaultMatchWidth],l=e.match(a);if(!l)return null;var u=l[0],d=s&&o.parsePatterns[s]||o.parsePatterns[o.defaultParseWidth],h=Array.isArray(d)?dSe(d,function(C){return C.test(u)}):fSe(d,function(C){return C.test(u)}),b;b=o.valueCallback?o.valueCallback(h):h,b=t.valueCallback?t.valueCallback(b):b;var y=e.slice(u.length);return{value:b,rest:y}}}function fSe(o,e){for(var t in o)if(o.hasOwnProperty(t)&&e(o[t]))return t}function dSe(o,e){for(var t=0;t1&&arguments[1]!==void 0?arguments[1]:{},s=e.match(o.matchPattern);if(!s)return null;var a=s[0],l=e.match(o.parsePattern);if(!l)return null;var u=o.valueCallback?o.valueCallback(l[0]):l[0];u=t.valueCallback?t.valueCallback(u):u;var d=e.slice(a.length);return{value:u,rest:d}}}var mSe=/^(\d+)(th|st|nd|rd)?/i,gSe=/\d+/i,pSe={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},bSe={any:[/^b/i,/^(a|c)/i]},vSe={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},OSe={any:[/1/i,/2/i,/3/i,/4/i]},ySe={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},wSe={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},_Se={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},SSe={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},CSe={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},kSe={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},xSe={ordinalNumber:hSe({matchPattern:mSe,parsePattern:gSe,valueCallback:function(e){return parseInt(e,10)}}),era:LN({matchPatterns:pSe,defaultMatchWidth:"wide",parsePatterns:bSe,defaultParseWidth:"any"}),quarter:LN({matchPatterns:vSe,defaultMatchWidth:"wide",parsePatterns:OSe,defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:LN({matchPatterns:ySe,defaultMatchWidth:"wide",parsePatterns:wSe,defaultParseWidth:"any"}),day:LN({matchPatterns:_Se,defaultMatchWidth:"wide",parsePatterns:SSe,defaultParseWidth:"any"}),dayPeriod:LN({matchPatterns:CSe,defaultMatchWidth:"any",parsePatterns:kSe,defaultParseWidth:"any"})};const TSe=xSe;var ESe={code:"en-US",formatDistance:Y_e,formatLong:K_e,formatRelative:tSe,localize:uSe,match:TSe,options:{weekStartsOn:0,firstWeekContainsDate:1}};const Ipe=ESe;var ASe=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,DSe=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,PSe=/^'([^]*?)'?$/,MSe=/''/g,RSe=/[a-zA-Z]/;function Bpe(o,e,t){var s,a,l,u,d,h,b,y,C,E,R,$,Q,F,U,K,L,te;Sc(2,arguments);var ne=String(e),oe=q6(),G=(s=(a=t==null?void 0:t.locale)!==null&&a!==void 0?a:oe.locale)!==null&&s!==void 0?s:Ipe,we=hE((l=(u=(d=(h=t==null?void 0:t.firstWeekContainsDate)!==null&&h!==void 0?h:t==null||(b=t.locale)===null||b===void 0||(y=b.options)===null||y===void 0?void 0:y.firstWeekContainsDate)!==null&&d!==void 0?d:oe.firstWeekContainsDate)!==null&&u!==void 0?u:(C=oe.locale)===null||C===void 0||(E=C.options)===null||E===void 0?void 0:E.firstWeekContainsDate)!==null&&l!==void 0?l:1);if(!(we>=1&&we<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var ve=hE((R=($=(Q=(F=t==null?void 0:t.weekStartsOn)!==null&&F!==void 0?F:t==null||(U=t.locale)===null||U===void 0||(K=U.options)===null||K===void 0?void 0:K.weekStartsOn)!==null&&Q!==void 0?Q:oe.weekStartsOn)!==null&&$!==void 0?$:(L=oe.locale)===null||L===void 0||(te=L.options)===null||te===void 0?void 0:te.weekStartsOn)!==null&&R!==void 0?R:0);if(!(ve>=0&&ve<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!G.localize)throw new RangeError("locale must contain localize property");if(!G.formatLong)throw new RangeError("locale must contain formatLong property");var Re=cc(o);if(!p_e(Re))throw new RangeError("Invalid time value");var Oe=Noe(Re),ce=x_e(Re,Oe),Xe={firstWeekContainsDate:we,weekStartsOn:ve,locale:G,_originalDate:Re},tt=ne.match(DSe).map(function(ot){var V=ot[0];if(V==="p"||V==="P"){var ut=Q_e[V];return ut(ot,G.formatLong)}return ot}).join("").match(ASe).map(function(ot){if(ot==="''")return"'";var V=ot[0];if(V==="'")return $Se(ot);var ut=B_e[V];if(ut)return!(t!=null&&t.useAdditionalWeekYearTokens)&&V_e(ot)&&Fle(ot,e,String(o)),!(t!=null&&t.useAdditionalDayOfYearTokens)&&z_e(ot)&&Fle(ot,e,String(o)),ut(ce,ot,G.localize,Xe);if(V.match(RSe))throw new RangeError("Format string contains an unescaped latin alphabet character `"+V+"`");return ot}).join("");return tt}function $Se(o){var e=o.match(PSe);return e?e[1].replace(MSe,"'"):o}function Lpe(o,e){if(o==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(o[t]=e[t]);return o}function NSe(o){return Lpe({},o)}var Qle=1440,ISe=2520,bne=43200,BSe=86400;function LSe(o,e,t){var s,a;Sc(2,arguments);var l=q6(),u=(s=(a=t==null?void 0:t.locale)!==null&&a!==void 0?a:l.locale)!==null&&s!==void 0?s:Ipe;if(!u.formatDistance)throw new RangeError("locale must contain formatDistance property");var d=kH(o,e);if(isNaN(d))throw new RangeError("Invalid time value");var h=Lpe(NSe(t),{addSuffix:Boolean(t==null?void 0:t.addSuffix),comparison:d}),b,y;d>0?(b=cc(e),y=cc(o)):(b=cc(o),y=cc(e));var C=k_e(y,b),E=(Noe(y)-Noe(b))/1e3,R=Math.round((C-E)/60),$;if(R<2)return t!=null&&t.includeSeconds?C<5?u.formatDistance("lessThanXSeconds",5,h):C<10?u.formatDistance("lessThanXSeconds",10,h):C<20?u.formatDistance("lessThanXSeconds",20,h):C<40?u.formatDistance("halfAMinute",0,h):C<60?u.formatDistance("lessThanXMinutes",1,h):u.formatDistance("xMinutes",1,h):R===0?u.formatDistance("lessThanXMinutes",1,h):u.formatDistance("xMinutes",R,h);if(R<45)return u.formatDistance("xMinutes",R,h);if(R<90)return u.formatDistance("aboutXHours",1,h);if(Rh.name===(e==null?void 0:e.schema));if(!(s!=null&&s.titleTemplate))return Vle(s,e);let a=e.data,u=Zp.parse(s.titleTemplate).filter(h=>h[0]==="name").map(h=>h[1]).filter(h=>{let b=s.fields.find(y=>y.name===h);return(b==null?void 0:b.info.name)==="reference"}).reduce((h,b)=>{let y=t.edges.find(E=>E.source===e.id&&E.field===b),C=t.records.find(E=>E.id===(y==null?void 0:y.target));return h[b]=qu(o,C,t),h},{});a={...a,...u};let d=Zp.render(s.titleTemplate,a);return!d||d===""?Vle(s,e):Qpe(d.slice(0,300))}function Vle(o,e){var s;if((o==null?void 0:o.type)==="files")return e._file.path;let t=Qpe(e==null?void 0:e.data[(s=o.fields.filter(a=>a.info.name==="text")[0])==null?void 0:s.name]).slice(0,300);return t==""?"Untitled":t}function Wle(o){let e,t,s;return{c(){e=re("a"),t=Ht(o[1]),Z(e,"href",s=o[3].lucentUrl+"/records/"+o[0].id),Z(e,"class","text-decoration-none rounded py-1 px-2 d-inline-block svelte-nbbgyi"),Z(e,"title",o[1]),rs(e,"border","2px solid "+(o[2].color?o[2].color:"#999"),1),rs(e,"white-space","nowrap")},m(a,l){Te(a,e,l),X(e,t)},p(a,l){l&2&&Fn(t,a[1]),l&1&&s!==(s=a[3].lucentUrl+"/records/"+a[0].id)&&Z(e,"href",s),l&2&&Z(e,"title",a[1]),l&4&&rs(e,"border","2px solid "+(a[2].color?a[2].color:"#999"),1)},d(a){a&&ke(e)}}}function FSe(o){var s;let e,t=((s=o[0])==null?void 0:s.data)&&Wle(o);return{c(){t&&t.c(),e=Rs()},m(a,l){t&&t.m(a,l),Te(a,e,l)},p(a,[l]){var u;(u=a[0])!=null&&u.data?t?t.p(a,l):(t=Wle(a),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},i:un,o:un,d(a){t&&t.d(a),a&&ke(e)}}}function QSe(o,e,t){let s,a;const l=Ur("channel");let{record:u}=e,{graph:d}=e;return o.$$set=h=>{"record"in h&&t(0,u=h.record),"graph"in h&&t(4,d=h.graph)},o.$$.update=()=>{o.$$.dirty&1&&t(2,s=l.schemas.find(h=>h.name===u.schema)),o.$$.dirty&17&&t(1,a=qu(l.schemas,u,d))},[u,a,s,l,d]}class G6 extends uo{constructor(e){super(),co(this,e,QSe,FSe,lo,{record:0,graph:4})}}function Ule(o,e,t){const s=o.slice();return s[2]=e[t],s[4]=t,s}function Yle(o){let e,t,s=o[0].reverse(),a=[];for(let u=0;uBe(a[u],1,1,()=>{a[u]=null});return{c(){e=re("div");for(let u=0;u0&&Yle(o);return{c(){s&&s.c(),e=Rs()},m(a,l){s&&s.m(a,l),Te(a,e,l),t=!0},p(a,[l]){a[0].length>0?s?(s.p(a,l),l&1&&xe(s,1)):(s=Yle(a),s.c(),xe(s,1),s.m(e.parentNode,e)):s&&(mo(),Be(s,1,1,()=>{s=null}),go())},i(a){t||(xe(s),t=!0)},o(a){Be(s),t=!1},d(a){s&&s.d(a),a&&ke(e)}}}function zSe(o,e,t){let{managerRecords:s}=e,{graph:a}=e;return o.$$set=l=>{"managerRecords"in l&&t(0,s=l.managerRecords),"graph"in l&&t(1,a=l.graph)},[s,a]}class VSe extends uo{constructor(e){super(),co(this,e,zSe,HSe,lo,{managerRecords:0,graph:1})}}function WSe(o){let e;return{c(){e=Ht("New Record")},m(t,s){Te(t,e,s)},p:un,d(t){t&&ke(e)}}}function USe(o){let e=qu(o[5].schemas,o[3],o[2])+"",t;return{c(){t=Ht(e)},m(s,a){Te(s,t,a)},p(s,a){a&12&&e!==(e=qu(s[5].schemas,s[3],s[2])+"")&&Fn(t,e)},d(s){s&&ke(t)}}}function jle(o){let e,t,s,a,l,u,d,h,b,y,C,E,R,$,Q,F,U;s=new Fa({props:{icon:"ellipsis"}});let K=!o[4]&&qle(o);return{c(){e=re("div"),t=re("button"),en(s.$$.fragment),a=Ze(),l=re("div"),u=re("h6"),u.textContent="Record Actions",d=Ze(),h=re("a"),b=Ht("Create new"),C=Ze(),K&&K.c(),E=Ze(),R=re("a"),$=Ht("Revisions"),Z(t,"class","btn btn-link btn-sm"),Z(t,"type","button"),Z(t,"data-bs-toggle","dropdown"),Z(t,"aria-expanded","false"),Z(u,"class","dropdown-header"),Z(h,"class","dropdown-item"),Z(h,"href",y=o[5].lucentUrl+"/records/new?schema="+o[1].name),Z(R,"class","dropdown-item"),Z(R,"href",o[5].lucentUrl),Z(l,"class","dropdown-menu"),Z(e,"class","dropdown d-inline-block")},m(L,te){Te(L,e,te),X(e,t),Kt(s,t,null),X(e,a),X(e,l),X(l,u),X(l,d),X(l,h),X(h,b),X(l,C),K&&K.m(l,null),X(l,E),X(l,R),X(R,$),Q=!0,F||(U=mn(R,"click",ku(o[7])),F=!0)},p(L,te){(!Q||te&2&&y!==(y=L[5].lucentUrl+"/records/new?schema="+L[1].name))&&Z(h,"href",y),L[4]?K&&(K.d(1),K=null):K?K.p(L,te):(K=qle(L),K.c(),K.m(l,E))},i(L){Q||(xe(s.$$.fragment,L),Q=!0)},o(L){Be(s.$$.fragment,L),Q=!1},d(L){L&&ke(e),Jt(s),K&&K.d(),F=!1,U()}}}function qle(o){let e,t,s,a;return{c(){e=re("a"),t=Ht("Clone"),Z(e,"class","dropdown-item"),Z(e,"href",o[5].lucentUrl)},m(l,u){Te(l,e,u),X(e,t),s||(a=mn(e,"click",o[6]),s=!0)},p:un,d(l){l&&ke(e),s=!1,a()}}}function YSe(o){let e,t,s=o[1].label.toUpperCase()+"",a,l,u,d,h,b;function y($,Q){return $[4]?WSe:USe}let C=y(o),E=C(o),R=!o[4]&&jle(o);return{c(){e=re("h3"),t=re("a"),a=Ht(s),u=Ze(),d=re("span"),E.c(),h=Ze(),R&&R.c(),Z(t,"class","text-muted d-block text-decoration-none fs-6 mb-1"),Z(t,"href",l=o[5].lucentUrl+"/content/"+o[1].name),Z(d,"class","text-dark d-block"),Z(e,"class","header-normal mt-5 mb-0")},m($,Q){Te($,e,Q),X(e,t),X(t,a),X(e,u),X(e,d),E.m(d,null),X(e,h),R&&R.m(e,null),b=!0},p($,[Q]){(!b||Q&2)&&s!==(s=$[1].label.toUpperCase()+"")&&Fn(a,s),(!b||Q&2&&l!==(l=$[5].lucentUrl+"/content/"+$[1].name))&&Z(t,"href",l),C===(C=y($))&&E?E.p($,Q):(E.d(1),E=C($),E&&(E.c(),E.m(d,null))),$[4]?R&&(mo(),Be(R,1,1,()=>{R=null}),go()):R?(R.p($,Q),Q&16&&xe(R,1)):(R=jle($),R.c(),xe(R,1),R.m(e,null))},i($){b||(xe(R),b=!0)},o($){Be(R),b=!1},d($){$&&ke(e),E.d(),R&&R.d()}}}function XSe(o,e,t){const s=Ur("channel");let{schema:a}=e,{graph:l}=e,{record:u}=e,{isCreateMode:d}=e,{activeContentTab:h}=e;function b(C){C.preventDefault(),axios.post(s.lucentUrl+"/records/clone/"+u.id).then(E=>{window.location=s.lucentUrl+"/records/"+E.data.id}).catch(E=>{})}const y=C=>t(0,h="_info");return o.$$set=C=>{"schema"in C&&t(1,a=C.schema),"graph"in C&&t(2,l=C.graph),"record"in C&&t(3,u=C.record),"isCreateMode"in C&&t(4,d=C.isCreateMode),"activeContentTab"in C&&t(0,h=C.activeContentTab)},[h,a,l,u,d,s,b,y]}class jSe extends uo{constructor(e){super(),co(this,e,XSe,YSe,lo,{schema:1,graph:2,record:3,isCreateMode:4,activeContentTab:0})}}function Zpe(o){return Hpe()[o]}function Hpe(){return{published:{value:"published",text:"Published",bg:"success",color:"white"},trashed:{value:"trashed",text:"Trashed",bg:"danger",color:"white"},draft:{value:"draft",text:"Draft",bg:"warning",color:"dark"}}}function Gle(o,e,t){const s=o.slice();return s[10]=e[t],s}function Kle(o){let e,t=o[10].text+"",s,a,l,u;function d(...h){return o[9](o[10],...h)}return{c(){e=re("button"),s=Ht(t),a=Ze(),Z(e,"type","button"),Z(e,"class","dropdown-item my-2 rounded w-100 bg-"+o[10].bg+" text-"+o[10].color)},m(h,b){Te(h,e,b),X(e,s),X(e,a),l||(u=mn(e,"click",d),l=!0)},p(h,b){o=h},d(h){h&&ke(e),l=!1,u()}}}function Jle(o){let e,t=o[10].value!==o[0]&&Kle(o);return{c(){t&&t.c(),e=Rs()},m(s,a){t&&t.m(s,a),Te(s,e,a)},p(s,a){s[10].value!==s[0]?t?t.p(s,a):(t=Kle(s),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},d(s){t&&t.d(s),s&&ke(e)}}}function qSe(o){let e,t,s;return{c(){e=re("a"),t=Ht("Preview"),Z(e,"href",s=o[5].previewTargetUrl+"?schema="+o[2].name+"&id="+o[1].id),Z(e,"target","_blank"),Z(e,"class","btn btn-info ms-3")},m(a,l){Te(a,e,l),X(e,t)},p(a,l){l&6&&s!==(s=a[5].previewTargetUrl+"?schema="+a[2].name+"&id="+a[1].id)&&Z(e,"href",s)},d(a){a&&ke(e)}}}function GSe(o){let e,t,s,a=o[4].text+"",l,u,d,h,b,y,C,E,R,$,Q,F=o[6],U=[];for(let L=0;L{h=R,t(3,h)})}const E=(R,$)=>y($,R.value);return o.$$set=R=>{"status"in R&&t(0,l=R.status),"record"in R&&t(1,u=R.record),"schema"in R&&t(2,d=R.schema)},o.$$.update=()=>{o.$$.dirty&1&&t(4,s=Zpe(l))},[l,u,d,h,s,a,b,y,C,E]}class zpe extends uo{constructor(e){super(),co(this,e,KSe,GSe,lo,{status:0,record:1,schema:2})}}function ece(o){return o._file.mime==="image/svg+xml"?Ioe(o):Ur("channel").filesUrl+`/thumbs/${o._file.path}`}function Ioe(o){return Ur("channel").filesUrl+`/${o._file.path}`}function tce(o){let e,t,s,a,l;const u=[eCe,JSe],d=[];function h(b,y){return y&1&&(e=null),e==null&&(e=!!b[0]._file.mime.startsWith("image")),e?0:1}return t=h(o,-1),s=d[t]=u[t](o),{c(){s.c(),a=Rs()},m(b,y){d[t].m(b,y),Te(b,a,y),l=!0},p(b,y){let C=t;t=h(b,y),t===C?d[t].p(b,y):(mo(),Be(d[C],1,1,()=>{d[C]=null}),go(),s=d[t],s?s.p(b,y):(s=d[t]=u[t](b),s.c()),xe(s,1),s.m(a.parentNode,a))},i(b){l||(xe(s),l=!0)},o(b){Be(s),l=!1},d(b){d[t].d(b),b&&ke(a)}}}function JSe(o){let e,t,s,a,l,u=o[0]._file.path.split(".").pop()+"",d,h,b,y;return t=new Fa({props:{icon:"file",width:o[3],height:o[3]}}),{c(){e=re("a"),en(t.$$.fragment),s=Ze(),a=re("span"),l=Ht("."),d=Ht(u),Z(a,"class","ms-2"),rs(a,"font-size",o[4]+"px"),Z(e,"href",h=o[5].lucentUrl+"/records/"+o[0].id),Z(e,"title",b=o[0]._file.path),Z(e,"class","btn btn-outline-primary btn-sm d-flex align-items-center justify-content-center"),rs(e,"width",o[2]+"px"),rs(e,"height",o[2]+"px")},m(C,E){Te(C,e,E),Kt(t,e,null),X(e,s),X(e,a),X(a,l),X(a,d),y=!0},p(C,E){const R={};E&8&&(R.width=C[3]),E&8&&(R.height=C[3]),t.$set(R),(!y||E&1)&&u!==(u=C[0]._file.path.split(".").pop()+"")&&Fn(d,u),(!y||E&16)&&rs(a,"font-size",C[4]+"px"),(!y||E&1&&h!==(h=C[5].lucentUrl+"/records/"+C[0].id))&&Z(e,"href",h),(!y||E&1&&b!==(b=C[0]._file.path))&&Z(e,"title",b),(!y||E&4)&&rs(e,"width",C[2]+"px"),(!y||E&4)&&rs(e,"height",C[2]+"px")},i(C){y||(xe(t.$$.fragment,C),y=!0)},o(C){Be(t.$$.fragment,C),y=!1},d(C){C&&ke(e),Jt(t)}}}function eCe(o){let e,t,s,a,l,u;return{c(){e=re("a"),t=re("img"),Z(t,"class","rounded w-100"),ple(t.src,s=ece(o[0]))||Z(t,"src",s),Z(t,"alt",a=o[0]._file.path),Z(e,"href",l=o[5].lucentUrl+"/records/"+o[0].id),Z(e,"title",u=o[0]._file.path),Z(e,"class","d-flex align-items-center justify-content-center "),rs(e,"width",o[2]+"px"),rs(e,"height",o[2]+"px")},m(d,h){Te(d,e,h),X(e,t)},p(d,h){h&1&&!ple(t.src,s=ece(d[0]))&&Z(t,"src",s),h&1&&a!==(a=d[0]._file.path)&&Z(t,"alt",a),h&1&&l!==(l=d[5].lucentUrl+"/records/"+d[0].id)&&Z(e,"href",l),h&1&&u!==(u=d[0]._file.path)&&Z(e,"title",u),h&4&&rs(e,"width",d[2]+"px"),h&4&&rs(e,"height",d[2]+"px")},i:un,o:un,d(d){d&&ke(e)}}}function nce(o){let e,t=o[0]._file.path+"",s,a,l;return{c(){e=re("a"),s=Ht(t),Z(e,"href",a=o[5].lucentUrl+"/records/"+o[0].id),Z(e,"title",l=o[0]._file.path),Z(e,"class","preview-file-filename lx-small-text text-decoration-none")},m(u,d){Te(u,e,d),X(e,s)},p(u,d){d&1&&t!==(t=u[0]._file.path+"")&&Fn(s,t),d&1&&a!==(a=u[5].lucentUrl+"/records/"+u[0].id)&&Z(e,"href",a),d&1&&l!==(l=u[0]._file.path)&&Z(e,"title",l)},d(u){u&&ke(e)}}}function tCe(o){let e,t,s,a=o[0]&&tce(o),l=o[1]&&nce(o);return{c(){a&&a.c(),e=Ze(),l&&l.c(),t=Rs()},m(u,d){a&&a.m(u,d),Te(u,e,d),l&&l.m(u,d),Te(u,t,d),s=!0},p(u,[d]){u[0]?a?(a.p(u,d),d&1&&xe(a,1)):(a=tce(u),a.c(),xe(a,1),a.m(e.parentNode,e)):a&&(mo(),Be(a,1,1,()=>{a=null}),go()),u[1]?l?l.p(u,d):(l=nce(u),l.c(),l.m(t.parentNode,t)):l&&(l.d(1),l=null)},i(u){s||(xe(a),s=!0)},o(u){Be(a),s=!1},d(u){a&&a.d(u),u&&ke(e),l&&l.d(u),u&&ke(t)}}}function nCe(o,e,t){let{record:s}=e;const a=Ur("channel");let{size:l="small"}=e,{showFilename:u=!1}=e,d,h,b;return l=="large"?(d=256,h=32,b="20"):l=="medium"?(d=128,h=12,b="17"):l=="small"?(d=64,h=12,b="15"):l=="tiny"&&(d=42,h=12,b="13"),o.$$set=y=>{"record"in y&&t(0,s=y.record),"size"in y&&t(6,l=y.size),"showFilename"in y&&t(1,u=y.showFilename)},[s,u,d,h,b,a,l]}class Xw extends uo{constructor(e){super(),co(this,e,nCe,tCe,lo,{record:0,size:6,showFilename:1})}}function oce(o){let e,t,s,a,l,u,d,h,b,y,C=o[0]._file.path+"",E,R,$,Q,F,U,K=o[0]._file.originalName+"",L,te,ne,oe,G,we,ve=o[0]._file.mime+"",Re,Oe,ce,Xe,tt,ot,V,ut=(o[0]._file.size/1024).toFixed(1)+"",Qe,Bt,Ct,He,st,rn,Et,Cn=o[0]._file.checksum+"",je,mt,he,Zo,Kn,so,Yo=o[0]._file.path+"",as,kt,jt;s=new Xw({props:{record:o[0],size:"large"}});let pt=o[0]._file.width&&sce(o);return{c(){e=re("div"),t=re("div"),en(s.$$.fragment),a=Ze(),l=re("div"),u=re("ul"),d=re("li"),h=re("span"),h.textContent="Filename",b=Ze(),y=re("span"),E=Ht(C),R=Ze(),$=re("li"),Q=re("span"),Q.textContent="Original name",F=Ze(),U=re("span"),L=Ht(K),te=Ze(),ne=re("li"),oe=re("span"),oe.textContent="Mime type",G=Ze(),we=re("span"),Re=Ht(ve),Oe=Ze(),pt&&pt.c(),ce=Ze(),Xe=re("li"),tt=re("span"),tt.textContent="File size",ot=Ze(),V=re("span"),Qe=Ht(ut),Bt=Ht("kB"),Ct=Ze(),He=re("li"),st=re("span"),st.textContent="Checksum",rn=Ze(),Et=re("span"),je=Ht(Cn),mt=Ze(),he=re("li"),Zo=re("span"),Zo.textContent="Download",Kn=Ze(),so=re("a"),as=Ht(Yo),Z(t,"class","col"),rs(t,"max-width","276px"),Z(h,"class","text-muted"),Z(d,"class","list-group-item border-primary"),Z(Q,"class","text-muted"),Z($,"class","list-group-item border-primary"),Z(oe,"class","text-muted"),Z(ne,"class","list-group-item border-primary"),Z(tt,"class","text-muted"),Z(Xe,"class","list-group-item border-primary"),Z(st,"class","text-muted"),Z(He,"class","list-group-item border-primary"),Z(Zo,"class","text-muted"),Z(so,"href",kt=Ioe(o[0])),Z(he,"class","list-group-item border-primary"),Z(u,"class","list-group svelte-1qb90xc"),Z(l,"class","col"),Z(e,"class","row mb-4")},m(Ne,Gt){Te(Ne,e,Gt),X(e,t),Kt(s,t,null),X(e,a),X(e,l),X(l,u),X(u,d),X(d,h),X(d,b),X(d,y),X(y,E),X(u,R),X(u,$),X($,Q),X($,F),X($,U),X(U,L),X(u,te),X(u,ne),X(ne,oe),X(ne,G),X(ne,we),X(we,Re),X(u,Oe),pt&&pt.m(u,null),X(u,ce),X(u,Xe),X(Xe,tt),X(Xe,ot),X(Xe,V),X(V,Qe),X(V,Bt),X(u,Ct),X(u,He),X(He,st),X(He,rn),X(He,Et),X(Et,je),X(u,mt),X(u,he),X(he,Zo),X(he,Kn),X(he,so),X(so,as),jt=!0},p(Ne,Gt){const bn={};Gt&1&&(bn.record=Ne[0]),s.$set(bn),(!jt||Gt&1)&&C!==(C=Ne[0]._file.path+"")&&Fn(E,C),(!jt||Gt&1)&&K!==(K=Ne[0]._file.originalName+"")&&Fn(L,K),(!jt||Gt&1)&&ve!==(ve=Ne[0]._file.mime+"")&&Fn(Re,ve),Ne[0]._file.width?pt?pt.p(Ne,Gt):(pt=sce(Ne),pt.c(),pt.m(u,ce)):pt&&(pt.d(1),pt=null),(!jt||Gt&1)&&ut!==(ut=(Ne[0]._file.size/1024).toFixed(1)+"")&&Fn(Qe,ut),(!jt||Gt&1)&&Cn!==(Cn=Ne[0]._file.checksum+"")&&Fn(je,Cn),(!jt||Gt&1)&&Yo!==(Yo=Ne[0]._file.path+"")&&Fn(as,Yo),(!jt||Gt&1&&kt!==(kt=Ioe(Ne[0])))&&Z(so,"href",kt)},i(Ne){jt||(xe(s.$$.fragment,Ne),jt=!0)},o(Ne){Be(s.$$.fragment,Ne),jt=!1},d(Ne){Ne&&ke(e),Jt(s),pt&&pt.d()}}}function sce(o){let e,t,s,a,l=o[0]._file.width+"",u,d,h=o[0]._file.height+"",b;return{c(){e=re("li"),t=re("span"),t.textContent="Dimensions",s=Ze(),a=re("span"),u=Ht(l),d=Ht("x"),b=Ht(h),Z(t,"class","text-muted"),Z(e,"class","list-group-item border-primary")},m(y,C){Te(y,e,C),X(e,t),X(e,s),X(e,a),X(a,u),X(a,d),X(a,b)},p(y,C){C&1&&l!==(l=y[0]._file.width+"")&&Fn(u,l),C&1&&h!==(h=y[0]._file.height+"")&&Fn(b,h)},d(y){y&&ke(e)}}}function oCe(o){let e,t,s=o[1].type==="files"&&oce(o);return{c(){s&&s.c(),e=Rs()},m(a,l){s&&s.m(a,l),Te(a,e,l),t=!0},p(a,[l]){a[1].type==="files"?s?(s.p(a,l),l&2&&xe(s,1)):(s=oce(a),s.c(),xe(s,1),s.m(e.parentNode,e)):s&&(mo(),Be(s,1,1,()=>{s=null}),go())},i(a){t||(xe(s),t=!0)},o(a){Be(s),t=!1},d(a){s&&s.d(a),a&&ke(e)}}}function sCe(o,e,t){let{record:s}=e,{schema:a}=e;return o.$$set=l=>{"record"in l&&t(0,s=l.record),"schema"in l&&t(1,a=l.schema)},[s,a]}class Vpe extends uo{constructor(e){super(),co(this,e,sCe,oCe,lo,{record:0,schema:1})}}function rce(o,e,t){const s=o.slice();return s[9]=e[t],s}function ice(o){let e,t=o[1],s=[];for(let a=0;a1&&ice(o);return{c(){t&&t.c(),e=Rs()},m(s,a){t&&t.m(s,a),Te(s,e,a)},p(s,[a]){s[1].length>1?t?t.p(s,a):(t=ice(s),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},i:un,o:un,d(s){t&&t.d(s),s&&ke(e)}}}function iCe(o,e,t){var E,R;let{schema:s}=e,{isCreateMode:a}=e,{active:l=""}=e,u=(R=(E=s.groups)==null?void 0:E.map($=>({label:$,name:$})))!=null?R:[],d={label:"Main",name:""},h={label:"Graph",name:"_graph"};a?u=[d,...u]:u=[d,...u,h];function b($){$.preventDefault(),t(0,l="_graph")}function y($,Q){$.preventDefault(),Q=="_graph"?b($):t(0,l=Q)}const C=($,Q)=>y(Q,$.name);return o.$$set=$=>{"schema"in $&&t(3,s=$.schema),"isCreateMode"in $&&t(4,a=$.isCreateMode),"active"in $&&t(0,l=$.active)},[l,u,y,s,a,C]}class Wpe extends uo{constructor(e){super(),co(this,e,iCe,rCe,lo,{schema:3,isCreateMode:4,active:0})}}function lce(o,e,t){const s=o.slice();return s[11]=e[t],s}function cce(o){let e=[],t=new Map,s,a=o[3];const l=d=>d[11].id;for(let d=0;d{axios.get("/records/suggestions",{params:{schema:l.optionsFrom,field:l.optionsField,value:d,ui:l.ui}}).then(Q=>{t(3,s=Q.data)}).catch(Q=>{console.log(Q)})},500);function b($,Q){$.preventDefault(),t(0,u=Q.data[l.optionsField]),t(1,d="")}const y=($,Q)=>b(Q,$),C=($,Q)=>b(Q,$),E=$=>{t(0,u=d),t(1,d="")},R=$=>{t(0,u=d),t(1,d="")};return o.$$set=$=>{"field"in $&&t(2,l=$.field),"value"in $&&t(0,u=$.value),"search"in $&&t(1,d=$.search)},t(3,s=[]),[u,d,l,s,a,b,h,y,C,E,R]}class eV extends uo{constructor(e){super(),co(this,e,uCe,cCe,lo,{field:2,value:0,search:1,update:6})}get update(){return this.$$.ctx[6]}}function dce(o,e,t){const s=o.slice();return s[11]=e[t][0],s[12]=e[t][1],s}function hce(o,e,t){const s=o.slice();return s[8]=e[t],s}function mce(o){let e,t;function s(u,d){return d&1&&(e=null),e==null&&(e=!!Array.isArray(u[0].selectOptions)),e?dCe:fCe}let a=s(o,-1),l=a(o);return{c(){l.c(),t=Rs()},m(u,d){l.m(u,d),Te(u,t,d)},p(u,d){a===(a=s(u,d))&&l?l.p(u,d):(l.d(1),l=a(u),l&&(l.c(),l.m(t.parentNode,t)))},d(u){l.d(u),u&&ke(t)}}}function fCe(o){let e=[],t=new Map,s,a=Object.entries(o[0].selectOptions);const l=u=>u[11];for(let u=0;uu[8];for(let u=0;uu(E,C),h=(C,E)=>u(E,C),b=(C,E)=>u(E,C),y=(C,E)=>u(E,C);return o.$$set=C=>{"field"in C&&t(0,s=C.field),"value"in C&&t(2,a=C.value),"search"in C&&t(3,l=C.search)},[s,u,a,l,d,h,b,y]}class gCe extends uo{constructor(e){super(),co(this,e,mCe,hCe,lo,{field:0,value:2,search:3})}}function Lm(o,e){return o&&o[e]?o[e].message:null}function pCe(o){let e,t,s,a;return{c(){e=re("input"),Z(e,"type","text"),Z(e,"id",o[3]),Z(e,"class","form-control"),Z(e,"autocomplete","off"),e.readOnly=t=o[1].readonly&&!o[2],Vo(e,"is-invalid",o[7])},m(l,u){Te(l,e,u),ar(e,o[0]),s||(a=mn(e,"input",o[18]),s=!0)},p(l,u){u&8&&Z(e,"id",l[3]),u&6&&t!==(t=l[1].readonly&&!l[2])&&(e.readOnly=t),u&1&&e.value!==l[0]&&ar(e,l[0]),u&128&&Vo(e,"is-invalid",l[7])},i:un,o:un,d(l){l&&ke(e),s=!1,a()}}}function bCe(o){let e,t,s,a,l,u,d,h,b,y,C,E,R;function $(K){o[15](K)}function Q(K){o[16](K)}let F={field:o[1]};o[0]!==void 0&&(F.value=o[0]),o[6]!==void 0&&(F.search=o[6]),u=new gCe({props:F}),Ro.push(()=>er(u,"value",$)),Ro.push(()=>er(u,"search",Q));let U=o[0]&&bce(o);return{c(){e=re("div"),t=re("input"),a=Ze(),l=re("div"),en(u.$$.fragment),b=Ze(),U&&U.c(),y=Rs(),Z(t,"type","search"),Z(t,"id",o[3]),Z(t,"class","form-control dropdown-toggle"),Z(t,"placeholder","Search for options"),Z(t,"data-bs-toggle","dropdown"),Z(t,"autocomplete","off"),t.readOnly=s=o[1].readonly&&!o[2],Vo(t,"is-invalid",o[7]),Z(l,"class","dropdown-menu w-100"),Z(e,"class","dropdown")},m(K,L){Te(K,e,L),X(e,t),ar(t,o[6]),X(e,a),X(e,l),Kt(u,l,null),Te(K,b,L),U&&U.m(K,L),Te(K,y,L),C=!0,E||(R=mn(t,"input",o[14]),E=!0)},p(K,L){(!C||L&8)&&Z(t,"id",K[3]),(!C||L&6&&s!==(s=K[1].readonly&&!K[2]))&&(t.readOnly=s),L&64&&t.value!==K[6]&&ar(t,K[6]),(!C||L&128)&&Vo(t,"is-invalid",K[7]);const te={};L&2&&(te.field=K[1]),!d&&L&1&&(d=!0,te.value=K[0],lr(()=>d=!1)),!h&&L&64&&(h=!0,te.search=K[6],lr(()=>h=!1)),u.$set(te),K[0]?U?U.p(K,L):(U=bce(K),U.c(),U.m(y.parentNode,y)):U&&(U.d(1),U=null)},i(K){C||(xe(u.$$.fragment,K),C=!0)},o(K){Be(u.$$.fragment,K),C=!1},d(K){K&&ke(e),Jt(u),K&&ke(b),U&&U.d(K),K&&ke(y),E=!1,R()}}}function vCe(o){let e,t,s,a,l,u,d,h,b,y,C=o[1].optionsFrom&&vce(o),E=o[0]&&Oce(o);return{c(){e=re("div"),t=re("input"),a=Ze(),l=re("div"),C&&C.c(),u=Ze(),E&&E.c(),d=Rs(),Z(t,"type","search"),Z(t,"id",o[3]),Z(t,"class","form-control dropdown-toggle"),Z(t,"placeholder","Search for options"),Z(t,"data-bs-toggle","dropdown"),Z(t,"autocomplete","off"),t.readOnly=s=o[1].readonly&&!o[2],Vo(t,"is-invalid",o[7]),Z(l,"class","dropdown-menu w-100"),Z(e,"class","dropdown")},m(R,$){Te(R,e,$),X(e,t),ar(t,o[6]),X(e,a),X(e,l),C&&C.m(l,null),Te(R,u,$),E&&E.m(R,$),Te(R,d,$),h=!0,b||(y=[mn(t,"keyup",function(){Ub(o[4].update)&&o[4].update.apply(this,arguments)}),mn(t,"focus",function(){Ub(o[4].update)&&o[4].update.apply(this,arguments)}),mn(t,"input",o[9])],b=!0)},p(R,$){o=R,(!h||$&8)&&Z(t,"id",o[3]),(!h||$&6&&s!==(s=o[1].readonly&&!o[2]))&&(t.readOnly=s),$&64&&t.value!==o[6]&&ar(t,o[6]),(!h||$&128)&&Vo(t,"is-invalid",o[7]),o[1].optionsFrom?C?(C.p(o,$),$&2&&xe(C,1)):(C=vce(o),C.c(),xe(C,1),C.m(l,null)):C&&(mo(),Be(C,1,1,()=>{C=null}),go()),o[0]?E?E.p(o,$):(E=Oce(o),E.c(),E.m(d.parentNode,d)):E&&(E.d(1),E=null)},i(R){h||(xe(C),h=!0)},o(R){Be(C),h=!1},d(R){R&&ke(e),C&&C.d(),R&&ke(u),E&&E.d(R),R&&ke(d),b=!1,vi(y)}}}function bce(o){let e,t,s,a,l,u,d;function h(C,E){return E&2&&(s=null),s==null&&(s=!!Array.isArray(C[1].selectOptions)),s?yCe:OCe}let b=h(o,-1),y=b(o);return{c(){e=re("span"),t=re("div"),y.c(),a=Ze(),l=re("button"),Z(l,"type","button"),Z(l,"class","btn-close btn-sm ms-1"),rs(l,"font-size","10px"),Z(l,"aria-label","Close"),Z(t,"class","d-flex align-items-center "),Z(e,"class","badge rounded-pill bg-light text-dark fs-6 mt-3")},m(C,E){Te(C,e,E),X(e,t),y.m(t,null),X(t,a),X(t,l),u||(d=mn(l,"click",ku(o[17])),u=!0)},p(C,E){b===(b=h(C,E))&&y?y.p(C,E):(y.d(1),y=b(C),y&&(y.c(),y.m(t,a)))},d(C){C&&ke(e),y.d(),u=!1,d()}}}function OCe(o){let e=o[1].selectOptions[o[0]]+"",t;return{c(){t=Ht(e)},m(s,a){Te(s,t,a)},p(s,a){a&3&&e!==(e=s[1].selectOptions[s[0]]+"")&&Fn(t,e)},d(s){s&&ke(t)}}}function yCe(o){let e;return{c(){e=Ht(o[0])},m(t,s){Te(t,e,s)},p(t,s){s&1&&Fn(e,t[0])},d(t){t&&ke(e)}}}function vce(o){let e,t,s,a;function l(h){o[11](h)}function u(h){o[12](h)}let d={field:o[1]};return o[0]!==void 0&&(d.value=o[0]),o[6]!==void 0&&(d.search=o[6]),e=new eV({props:d}),o[10](e),Ro.push(()=>er(e,"value",l)),Ro.push(()=>er(e,"search",u)),{c(){en(e.$$.fragment)},m(h,b){Kt(e,h,b),a=!0},p(h,b){const y={};b&2&&(y.field=h[1]),!t&&b&1&&(t=!0,y.value=h[0],lr(()=>t=!1)),!s&&b&64&&(s=!0,y.search=h[6],lr(()=>s=!1)),e.$set(y)},i(h){a||(xe(e.$$.fragment,h),a=!0)},o(h){Be(e.$$.fragment,h),a=!1},d(h){o[10](null),Jt(e,h)}}}function Oce(o){let e,t,s,a,l,u,d;return{c(){e=re("span"),t=re("div"),s=Ht(o[0]),a=Ze(),l=re("button"),Z(l,"type","button"),Z(l,"class","btn-close btn-sm ms-1"),rs(l,"font-size","10px"),Z(l,"aria-label","Close"),Z(t,"class","d-flex align-items-center "),Z(e,"class","badge rounded-pill bg-light text-dark fs-6 mt-3")},m(h,b){Te(h,e,b),X(e,t),X(t,s),X(t,a),X(t,l),u||(d=mn(l,"click",ku(o[13])),u=!0)},p(h,b){b&1&&Fn(s,h[0])},d(h){h&&ke(e),u=!1,d()}}}function yce(o){let e,t;return{c(){e=re("div"),t=Ht(o[7]),Z(e,"class","invalid-feedback d-block")},m(s,a){Te(s,e,a),X(e,t)},p(s,a){a&128&&Fn(t,s[7])},d(s){s&&ke(e)}}}function wCe(o){let e,t,s,a,l;const u=[vCe,bCe,pCe],d=[];function h(y,C){return y[5]?0:y[1].selectOptions?1:2}t=h(o),s=d[t]=u[t](o);let b=o[7]&&yce(o);return{c(){e=re("div"),s.c(),a=Ze(),b&&b.c(),Z(e,"class","mb-0")},m(y,C){Te(y,e,C),d[t].m(e,null),X(e,a),b&&b.m(e,null),l=!0},p(y,[C]){let E=t;t=h(y),t===E?d[t].p(y,C):(mo(),Be(d[E],1,1,()=>{d[E]=null}),go(),s=d[t],s?s.p(y,C):(s=d[t]=u[t](y),s.c()),xe(s,1),s.m(e,a)),y[7]?b?b.p(y,C):(b=yce(y),b.c(),b.m(e,null)):b&&(b.d(1),b=null)},i(y){l||(xe(s),l=!0)},o(y){Be(s),l=!1},d(y){y&&ke(e),d[t].d(),b&&b.d()}}}function _Ce(o,e,t){let s,a,l,{field:u}=e,{value:d}=e,{isCreateMode:h}=e,{validationErrors:b}=e,{id:y}=e,C;function E(){a=this.value,t(6,a)}function R(oe){Ro[oe?"unshift":"push"](()=>{C=oe,t(4,C)})}function $(oe){d=oe,t(0,d)}function Q(oe){a=oe,t(6,a)}const F=oe=>t(0,d="");function U(){a=this.value,t(6,a)}function K(oe){d=oe,t(0,d)}function L(oe){a=oe,t(6,a)}const te=oe=>t(0,d="");function ne(){d=this.value,t(0,d)}return o.$$set=oe=>{"field"in oe&&t(1,u=oe.field),"value"in oe&&t(0,d=oe.value),"isCreateMode"in oe&&t(2,h=oe.isCreateMode),"validationErrors"in oe&&t(8,b=oe.validationErrors),"id"in oe&&t(3,y=oe.id)},o.$$.update=()=>{o.$$.dirty&258&&t(7,s=Lm(b,u.name)),o.$$.dirty&6&&t(5,l=u.optionsFrom&&!(u.readonly&&!h))},t(6,a=""),[d,u,h,y,C,l,a,s,b,E,R,$,Q,F,U,K,L,te,ne]}class Upe extends uo{constructor(e){super(),co(this,e,_Ce,wCe,lo,{field:1,value:0,isCreateMode:2,validationErrors:8,id:3})}}function wce(o){let e,t;return{c(){e=re("div"),t=Ht(o[4]),Z(e,"class","invalid-feedback d-block")},m(s,a){Te(s,e,a),X(e,t)},p(s,a){a&16&&Fn(t,s[4])},d(s){s&&ke(e)}}}function SCe(o){let e,t,s,a,l,u,d=o[4]&&wce(o);return{c(){e=re("div"),t=re("input"),a=Ze(),d&&d.c(),Z(t,"type","text"),Z(t,"id",o[3]),Z(t,"class","form-control"),Z(t,"autocomplete","off"),t.readOnly=s=o[1].readonly&&!o[2],Vo(t,"is-invalid",o[4]),Z(e,"class","mb-0")},m(h,b){Te(h,e,b),X(e,t),ar(t,o[0]),X(e,a),d&&d.m(e,null),l||(u=mn(t,"input",o[6]),l=!0)},p(h,[b]){b&8&&Z(t,"id",h[3]),b&6&&s!==(s=h[1].readonly&&!h[2])&&(t.readOnly=s),b&1&&t.value!==h[0]&&ar(t,h[0]),b&16&&Vo(t,"is-invalid",h[4]),h[4]?d?d.p(h,b):(d=wce(h),d.c(),d.m(e,null)):d&&(d.d(1),d=null)},i:un,o:un,d(h){h&&ke(e),d&&d.d(),l=!1,u()}}}function CCe(o,e,t){let s,{field:a}=e,{value:l}=e,{isCreateMode:u}=e,{validationErrors:d}=e,{id:h}=e;function b(){l=this.value,t(0,l)}return o.$$set=y=>{"field"in y&&t(1,a=y.field),"value"in y&&t(0,l=y.value),"isCreateMode"in y&&t(2,u=y.isCreateMode),"validationErrors"in y&&t(5,d=y.validationErrors),"id"in y&&t(3,h=y.id)},o.$$.update=()=>{o.$$.dirty&34&&t(4,s=Lm(d,a.name))},[l,a,u,h,s,d,b]}class Ype extends uo{constructor(e){super(),co(this,e,CCe,SCe,lo,{field:1,value:0,isCreateMode:2,validationErrors:5,id:3})}}function K6(o,e,t,s,a=""){let l=t.map(d=>({target:d.id,source:e.id,sourceSchema:e.schema,targetSchema:d.schema,field:s,depth:1,rank:""})),u=o.edges;return a==="replace"&&(u=u.filter(d=>d.field!==field.name)),o.records=Lc.exports.uniqBy([...o.records,...t],d=>d.id),o.edges=Lc.exports.uniqBy([...u,...l],d=>d.source+d.target+d.field+d.depth),o}function kCe(o){let e,t=o[0].text+"",s;return{c(){e=re("span"),s=Ht(t),Z(e,"class","badge text-bg-"+o[0].bg),rs(e,"max-width","84px")},m(a,l){Te(a,e,l),X(e,s)},p:un,i:un,o:un,d(a){a&&ke(e)}}}function xCe(o,e,t){let{status:s}=e,a=Zpe(s);return o.$$set=l=>{"status"in l&&t(1,s=l.status)},[a,s]}class ire extends uo{constructor(e){super(),co(this,e,xCe,kCe,lo,{status:1})}}function TCe(o){let e,t,s;return t=new Xw({props:{record:o[0],size:"small"}}),{c(){e=re("div"),en(t.$$.fragment),rs(e,"max-width","94px"),rs(e,"margin-right","15px")},m(a,l){Te(a,e,l),Kt(t,e,null),s=!0},p(a,l){const u={};l&1&&(u.record=a[0]),t.$set(u)},i(a){s||(xe(t.$$.fragment,a),s=!0)},o(a){Be(t.$$.fragment,a),s=!1},d(a){a&&ke(e),Jt(t)}}}function _ce(o){let e,t;return e=new ire({props:{status:o[0].status}}),{c(){en(e.$$.fragment)},m(s,a){Kt(e,s,a),t=!0},p(s,a){const l={};a&1&&(l.status=s[0].status),e.$set(l)},i(s){t||(xe(e.$$.fragment,s),t=!0)},o(s){Be(e.$$.fragment,s),t=!1},d(s){Jt(e,s)}}}function Sce(o){let e,t,s,a,l,u;return s=new Fa({props:{icon:"trash-can"}}),{c(){e=re("div"),t=re("button"),en(s.$$.fragment),Z(t,"class","trash-button text-dark btn btn-sm btn-link svelte-dof9cm"),Z(e,"class","position-absolute end-0"),rs(e,"top","5px")},m(d,h){Te(d,e,h),X(e,t),Kt(s,t,null),a=!0,l||(u=mn(t,"click",o[6]),l=!0)},p:un,i(d){a||(xe(s.$$.fragment,d),a=!0)},o(d){Be(s.$$.fragment,d),a=!1},d(d){d&&ke(e),Jt(s),l=!1,u()}}}function ECe(o){let e,t,s,a,l,u,d,h,b,y,C,E,R,$,Q=o[4].type==="files"&&TCe(o),F=o[0].status==="draft"&&_ce(o),U=o[2]&&Sce(o);return{c(){var K;e=re("div"),t=re("div"),Q&&Q.c(),s=Ze(),a=re("div"),l=re("a"),u=Ht(o[5]),h=Ze(),b=re("small"),b.textContent=`${o[4].label}`,y=Ze(),C=re("small"),F&&F.c(),E=Ze(),U&&U.c(),Z(l,"class","title-link m-0 fs-5 text-decoration-none text-dark d-block svelte-dof9cm"),Z(l,"href",d=o[3].lucentUrl+"/records/"+o[0].id),Z(l,"title",o[5]),Z(b,"class","text-muted"),Z(C,"class","text-muted"),Z(a,"class","overflow-hidden"),Z(t,"class","card-body d-flex"),Z(e,"class",R="card mb-2 bg-light "+o[1]+" svelte-dof9cm"),rs(e,"border-color",(K=o[4].color)!=null?K:"#ccc"),rs(e,"border-width","1px")},m(K,L){Te(K,e,L),X(e,t),Q&&Q.m(t,null),X(t,s),X(t,a),X(a,l),X(l,u),X(a,h),X(a,b),X(a,y),X(a,C),F&&F.m(C,null),X(e,E),U&&U.m(e,null),$=!0},p(K,[L]){K[4].type==="files"&&Q.p(K,L),(!$||L&1&&d!==(d=K[3].lucentUrl+"/records/"+K[0].id))&&Z(l,"href",d),K[0].status==="draft"?F?(F.p(K,L),L&1&&xe(F,1)):(F=_ce(K),F.c(),xe(F,1),F.m(C,null)):F&&(mo(),Be(F,1,1,()=>{F=null}),go()),K[2]?U?(U.p(K,L),L&4&&xe(U,1)):(U=Sce(K),U.c(),xe(U,1),U.m(e,null)):U&&(mo(),Be(U,1,1,()=>{U=null}),go()),(!$||L&2&&R!==(R="card mb-2 bg-light "+K[1]+" svelte-dof9cm"))&&Z(e,"class",R)},i(K){$||(xe(Q),xe(F),xe(U),$=!0)},o(K){Be(Q),Be(F),Be(U),$=!1},d(K){K&&ke(e),Q&&Q.d(),F&&F.d(),U&&U.d()}}}function ACe(o,e,t){const s=Fg(),a=Ur("channel");let{graph:l}=e,{record:u}=e,{classes:d=""}=e,{hasDelete:h=!1}=e,b=a.schemas.find(E=>E.name===u.schema),y=qu(a.schemas,u,l);function C(E){E.preventDefault(),s("remove",u.id)}return o.$$set=E=>{"graph"in E&&t(7,l=E.graph),"record"in E&&t(0,u=E.record),"classes"in E&&t(1,d=E.classes),"hasDelete"in E&&t(2,h=E.hasDelete)},[u,d,h,a,b,y,C,l]}class J6 extends uo{constructor(e){super(),co(this,e,ACe,ECe,lo,{graph:7,record:0,classes:1,hasDelete:2})}}function qD(o,e,t,s,a){var h,b;if(o===e)return t;let l=a.map(y=>y.id),u=(h=t==null?void 0:t.filter(y=>y.field===s&&y.depth===1&&l.includes(y.target)))!=null?h:[],d=(b=t==null?void 0:t.filter(y=>!(y.field===s&&y.depth===1)))!=null?b:[];return u=DCe(u,o,e),[...d,...u]}function DCe(o,e,t){if(t>=o.length)for(var s=t-o.length+1;s--;)o.push(void 0);return o.splice(t,0,o.splice(e,1)[0]),o}function Cce(o,e,t){const s=o.slice();return s[23]=e[t],s}function kce(o){let e,t,s,a;function l(h){o[13](h)}function u(h){o[14](h)}let d={field:o[23],schema:o[2],record:o[0],validationErrors:o[4],isCreateMode:o[3]};return o[0].data!==void 0&&(d.data=o[0].data),o[1]!==void 0&&(d.graph=o[1]),e=new LOe({props:d}),Ro.push(()=>er(e,"data",l)),Ro.push(()=>er(e,"graph",u)),{c(){en(e.$$.fragment)},m(h,b){Kt(e,h,b),a=!0},p(h,b){const y={};b&4&&(y.schema=h[2]),b&1&&(y.record=h[0]),b&16&&(y.validationErrors=h[4]),b&8&&(y.isCreateMode=h[3]),!t&&b&1&&(t=!0,y.data=h[0].data,lr(()=>t=!1)),!s&&b&2&&(s=!0,y.graph=h[1],lr(()=>s=!1)),e.$set(y)},i(h){a||(xe(e.$$.fragment,h),a=!0)},o(h){Be(e.$$.fragment,h),a=!1},d(h){Jt(e,h)}}}function xce(o,e){let t,s,a,l=e[5]===e[23].group&&kce(e);return{key:o,first:null,c(){t=Rs(),l&&l.c(),s=Rs(),this.first=t},m(u,d){Te(u,t,d),l&&l.m(u,d),Te(u,s,d),a=!0},p(u,d){e=u,e[5]===e[23].group?l?(l.p(e,d),d&32&&xe(l,1)):(l=kce(e),l.c(),xe(l,1),l.m(s.parentNode,s)):l&&(mo(),Be(l,1,1,()=>{l=null}),go())},i(u){a||(xe(l),a=!0)},o(u){Be(l),a=!1},d(u){u&&ke(t),l&&l.d(u),u&&ke(s)}}}function Tce(o){let e,t,s;function a(u){o[15](u)}let l={schema:o[2]};return o[0].status!==void 0&&(l.status=o[0].status),e=new zpe({props:l}),Ro.push(()=>er(e,"status",a)),{c(){en(e.$$.fragment)},m(u,d){Kt(e,u,d),s=!0},p(u,d){const h={};d&4&&(h.schema=u[2]),!t&&d&1&&(t=!0,h.status=u[0].status,lr(()=>t=!1)),e.$set(h)},i(u){s||(xe(e.$$.fragment,u),s=!0)},o(u){Be(e.$$.fragment,u),s=!1},d(u){Jt(e,u)}}}function PCe(o){let e,t,s,a,l,u;return{c(){e=re("button"),t=re("span"),s=Ht(` Save`),Z(t,"class","spinner-border spinner-border-sm"),Z(t,"role","status"),Z(t,"aria-hidden","true"),e.disabled=a=!o[6],Z(e,"class","ms-2 btn btn-primary btn-spinner")},m(d,h){Te(d,e,h),X(e,t),X(e,s),l||(u=mn(e,"click",o[11]),l=!0)},p(d,h){h&64&&a!==(a=!d[6])&&(e.disabled=a)},d(d){d&&ke(e),l=!1,u()}}}function MCe(o){let e,t,s;return{c(){e=re("button"),e.innerHTML=` Add`,Z(e,"class","ms-2 btn btn-primary btn-spinner")},m(a,l){Te(a,e,l),t||(s=mn(e,"click",o[11]),t=!0)},p:un,d(a){a&&ke(e),t=!1,s()}}}function RCe(o){let e,t,s,a,l,u,d,h,b,y=[],C=new Map,E,R,$,Q,F,U,K,L,te;t=new X6({props:{message:o[7]}});function ne(Xe){o[12](Xe)}let oe={schema:o[2],isCreateMode:o[3],record:o[0]};o[5]!==void 0&&(oe.active=o[5]),l=new Wpe({props:oe}),Ro.push(()=>er(l,"active",ne)),h=new Vpe({props:{record:o[0],schema:o[2]}});let G=o[8];const we=Xe=>Xe[23].name;for(let Xe=0;Xeu=!1)),l.$set(V);const ut={};tt&1&&(ut.record=Xe[0]),tt&4&&(ut.schema=Xe[2]),h.$set(ut),tt&319&&(G=Xe[8],mo(),y=Jd(y,tt,we,1,Xe,G,C,a,xv,xce,null,Cce),go()),Xe[2].hasDrafts?ve?(ve.p(Xe,tt),tt&4&&xe(ve,1)):(ve=Tce(Xe),ve.c(),xe(ve,1),ve.m($,Q)):ve&&(mo(),Be(ve,1,1,()=>{ve=null}),go()),Oe===(Oe=Re(Xe))&&ce?ce.p(Xe,tt):(ce.d(1),ce=Oe(Xe),ce&&(ce.c(),ce.m($,F)))},i(Xe){if(!K){xe(t.$$.fragment,Xe),xe(l.$$.fragment,Xe),xe(h.$$.fragment,Xe);for(let tt=0;ttve.name!=="id"),Q="_default";d.fields.reduce((ve,Re)=>{var Oe;return Re.ui==="tab"?(Q=Re.name,ve):(ve[Q]=[...(Oe=ve[Q])!=null?Oe:[],Re.name],ve)},[]),W1(()=>{F()});function F(){C={data:JSON.parse(JSON.stringify(h.data)),schema:h.schema,status:h.status,_sys:JSON.parse(JSON.stringify(h._sys)),_file:JSON.parse(JSON.stringify(h._file)),edges:JSON.parse(JSON.stringify(b.edges))}}Epe(()=>{t(6,R=K())});function U(ve){return R?ve.returnValue="You have unsaved changes. Are you sure you want to exit?":(delete ve.returnValue,"...")}function K(){return y?!1:!Lc.exports.isEqual(C,{data:h.data,schema:h.schema,status:h.status,_sys:h._sys,_file:h._file,edges:b.edges})}function L(ve){ve.preventDefault(),u("cancel")}function te(ve){return ve.preventDefault(),console.log("SAVE: Attempt"),t(4,s=null),t(7,a=""),new Promise(function(Re,Oe){var ce,Xe;if(!R&&!y){Re(null);return}if(!h){Re(null);return}t(1,b.edges=(Xe=(ce=b.edges)==null?void 0:ce.filter(tt=>!tt._isTrashed&&tt.source===h.id))!=null?Xe:[],b),axios.post(l.lucentUrl+"/records",{record:h,edges:b.edges,isCreateMode:y}).then(function(tt){console.log("SAVE: SAVED INLINE"),t(0,h=tt.data.records[0]),t(1,b=tt.data),y||F(),u("inlinesaved",{records:[h]}),Re(null)}).catch(function(tt){tt.response&&(typeof tt.response.data.error=="string"?t(7,a=tt.response.data.error):t(4,s=tt.response.data.error)),Re(null)})})}function ne(ve){E=ve,t(5,E)}function oe(ve){o.$$.not_equal(h.data,ve)&&(h.data=ve,t(0,h))}function G(ve){b=ve,t(1,b)}function we(ve){o.$$.not_equal(h.status,ve)&&(h.status=ve,t(0,h))}return o.$$set=ve=>{"schema"in ve&&t(2,d=ve.schema),"record"in ve&&t(0,h=ve.record),"graph"in ve&&t(1,b=ve.graph),"isCreateMode"in ve&&t(3,y=ve.isCreateMode)},o.$$.update=()=>{o.$$.dirty&16&&t(7,a=s?`Record submission failed. ${Object.entries(s).length} error(s)`:null)},t(4,s=null),[h,b,d,y,s,E,R,a,$,U,L,te,ne,oe,G,we]}class Xpe extends uo{constructor(e){super(),co(this,e,$Ce,RCe,lo,{schema:2,record:0,graph:1,isCreateMode:3})}}function Ece(o,e,t){const s=o.slice();return s[11]=e[t],s}function Ace(o){let e=[],t=new Map,s,a=o[2];const l=d=>d[11].id;for(let d=0;d{axios.get(a.lucentUrl+"/records/suggestions",{params:{schema:d.collections[0],field:"search",value:h,ui:"search"}}).then(Q=>{t(2,s=Q.data)}).catch(Q=>{t(2,s=[]),console.log(Q)})},500);function y($,Q){$.preventDefault(),t(6,u=Q.id),l("addFilter"),t(6,u="")}function C(){h=this.value,t(1,h)}const E=($,Q)=>y(Q,$),R=($,Q)=>y(Q,$);return o.$$set=$=>{"value"in $&&t(6,u=$.value),"field"in $&&t(0,d=$.field)},t(2,s=[]),[d,h,s,a,b,y,u,C,E,R]}class BCe extends uo{constructor(e){super(),co(this,e,ICe,NCe,lo,{value:6,field:0})}}const LCe=o=>({}),Mce=o=>({});function FCe(o){let e;return{c(){e=Ht("Dropdown")},m(t,s){Te(t,e,s)},d(t){t&&ke(e)}}}function QCe(o){let e,t,s,a;const l=o[4].button,u=YH(l,o,o[3],Mce),d=u||FCe(),h=o[4].default,b=YH(h,o,o[3],null);return{c(){e=re("button"),d&&d.c(),t=Ze(),s=re("div"),b&&b.c(),Z(e,"class","btn btn-sm btn-outline-primary dropdown-toggle d-flex align-items-center"),Z(e,"type","button"),Z(e,"data-bs-toggle","dropdown"),Z(e,"data-bs-auto-close","outside"),Z(e,"aria-expanded","false"),Z(s,"class","dropdown-menu"),rs(s,"width",o[0]+"px")},m(y,C){Te(y,e,C),d&&d.m(e,null),Te(y,t,C),Te(y,s,C),b&&b.m(s,null),o[5](s),a=!0},p(y,[C]){u&&u.p&&(!a||C&8)&&jH(u,l,y,y[3],a?XH(l,y[3],C,LCe):qH(y[3]),Mce),b&&b.p&&(!a||C&8)&&jH(b,h,y,y[3],a?XH(h,y[3],C,null):qH(y[3]),null),(!a||C&1)&&rs(s,"width",y[0]+"px")},i(y){a||(xe(d,y),xe(b,y),a=!0)},o(y){Be(d,y),Be(b,y),a=!1},d(y){y&&ke(e),d&&d.d(y),y&&ke(t),y&&ke(s),b&&b.d(y),o[5](null)}}}function ZCe(o,e,t){let{$$slots:s={},$$scope:a}=e,{width:l="300"}=e,u;function d(){u.classList.remove("show")}function h(b){Ro[b?"unshift":"push"](()=>{u=b,t(1,u)})}return o.$$set=b=>{"width"in b&&t(0,l=b.width),"$$scope"in b&&t(3,a=b.$$scope)},[l,u,d,a,s,h]}class HCe extends uo{constructor(e){super(),co(this,e,ZCe,QCe,lo,{width:0,hide:2})}get hide(){return this.$$.ctx[2]}}function Rce(o,e,t){const s=o.slice();return s[22]=e[t],s}function $ce(o,e,t){const s=o.slice();return s[25]=e[t],s}function Nce(o){let e,t=o[25].label+"",s;return{c(){e=re("option"),s=Ht(t),e.__value=o[25],e.value=e.__value},m(a,l){Te(a,e,l),X(e,s)},p:un,d(a){a&&ke(e)}}}function Ice(o){let e,t=o[22].label+"",s,a;return{c(){e=re("option"),s=Ht(t),e.__value=a=o[22],e.value=e.__value},m(l,u){Te(l,e,u),X(e,s)},p(l,u){u&2&&t!==(t=l[22].label+"")&&Fn(s,t),u&2&&a!==(a=l[22])&&(e.__value=a,e.value=e.__value)},d(l){l&&ke(e)}}}function zCe(o){let e,t,s;return{c(){e=re("input"),Z(e,"type","text"),Z(e,"class","form-control")},m(a,l){Te(a,e,l),ar(e,o[4]),t||(s=mn(e,"input",o[17]),t=!0)},p(a,l){l&16&&e.value!==a[4]&&ar(e,a[4])},i:un,o:un,d(a){a&&ke(e),t=!1,s()}}}function VCe(o){let e,t,s;function a(u){o[16](u)}let l={field:o[0]};return o[4]!==void 0&&(l.value=o[4]),e=new BCe({props:l}),Ro.push(()=>er(e,"value",a)),e.$on("addFilter",o[7]),{c(){en(e.$$.fragment)},m(u,d){Kt(e,u,d),s=!0},p(u,d){const h={};d&1&&(h.field=u[0]),!t&&d&16&&(t=!0,h.value=u[4],lr(()=>t=!1)),e.$set(h)},i(u){s||(xe(e.$$.fragment,u),s=!0)},o(u){Be(e.$$.fragment,u),s=!1},d(u){Jt(e,u)}}}function WCe(o){let e,t,s,a,l,u,d,h,b,y,C,E,R,$,Q,F,U,K,L,te,ne,oe,G,we=o[6],ve=[];for(let ot=0;otAdvanced filters',U=Ze(),K=re("form"),L=re("div"),te=re("input"),Z(t,"class","form-select"),o[0]===void 0&&AC(()=>o[14].call(t)),Z(e,"class","px-3 py-1 d-flex align-items-center"),Z(l,"class","form-select"),o[5]===void 0&&AC(()=>o[15].call(l)),Z(a,"class","px-3 py-1 d-flex align-items-center"),Z(d,"class","px-3 py-1 d-flex align-items-center"),Z(E,"class","btn btn-outline-primary"),Z(E,"type","button"),Z(C,"class","px-3 py-1 d-flex align-items-center"),Z(te,"type","search"),Z(te,"class","form-control"),Z(te,"placeholder","Advanced filters"),te.required=!0,Z(L,"class","px-3 py-1 d-flex align-items-center")},m(ot,V){Te(ot,e,V),X(e,t);for(let ut=0;ut{Xe[ut]=null}),go(),b=Xe[h],b?b.p(ot,V):(b=Xe[h]=ce[h](ot),b.c()),xe(b,1),b.m(d,null)),V&8&&te.value!==ot[3]&&ar(te,ot[3])},i(ot){ne||(xe(b),ne=!0)},o(ot){Be(b),ne=!1},d(ot){ot&&ke(e),ia(ve,ot),ot&&ke(s),ot&&ke(a),ia(Oe,ot),ot&&ke(u),ot&&ke(d),Xe[h].d(),ot&&ke(y),ot&&ke(C),ot&&ke(R),ot&&ke($),ot&&ke(Q),ot&&ke(F),ot&&ke(U),ot&&ke(K),oe=!1,vi(G)}}}function UCe(o){let e,t,s,a,l;return t=new Fa({props:{icon:"filter"}}),{c(){e=re("div"),en(t.$$.fragment),s=Ze(),a=re("span"),a.textContent="Filter",Z(a,"class","ms-1"),Z(e,"slot","button")},m(u,d){Te(u,e,d),Kt(t,e,null),X(e,s),X(e,a),l=!0},p:un,i(u){l||(xe(t.$$.fragment,u),l=!0)},o(u){Be(t.$$.fragment,u),l=!1},d(u){u&&ke(e),Jt(t)}}}function YCe(o){let e,t,s,a={width:"300",$$slots:{button:[UCe],default:[WCe]},$$scope:{ctx:o}};return t=new HCe({props:a}),o[19](t),{c(){e=re("div"),en(t.$$.fragment),Z(e,"class","mx-2 d-flex align-items-center")},m(l,u){Te(l,e,u),Kt(t,e,null),s=!0},p(l,[u]){const d={};u&268435515&&(d.$$scope={dirty:u,ctx:l}),t.$set(d)},i(l){s||(xe(t.$$.fragment,l),s=!0)},o(l){Be(t.$$.fragment,l),s=!1},d(l){l&&ke(e),o[19](null),Jt(t)}}}function XCe(o,e,t){let s,a;const l=Fg();let{schema:u}=e,{systemFields:d=[]}=e,{operators:h}=e,{inModal:b}=e,{modalUrl:y}=e,C,E="",R=d;u.type=="collection"&&(R=d.filter(ve=>ve.files===!1));let $=[...u.fields,...R].filter(ve=>{var Re,Oe;return!["file","json"].includes((Oe=(Re=ve.info)==null?void 0:Re.name)!=null?Oe:ve.ui)}),Q,F="";function U(ve){ve.preventDefault();let Re="",Oe;u.fields.find(Xe=>Xe.name===Q.name)&&(Q.info.name=="reference"&&a.name=="eq"?(Re="children."+Q.name+".id",Oe=`filter[${Re}]`):(Re="data.",Oe=`filter[${Re+Q.name}_${a.name}]`));const ce=new URL(y!=null?y:window.location.href);ce.searchParams.set("skip","0"),ce.searchParams.set(Oe,F),b?(l("refresh",ce),C.hide()):window.location=ce}function K(ve){var tt,ot;ve.preventDefault();let Re=(tt=E.split("=")[0])!=null?tt:"";if(!Re)return;let Oe=`filter[${Re}]`,ce=(ot=E.split("=")[1])!=null?ot:"";if(!ce)return;const Xe=new URL(y!=null?y:window.location.href);Xe.searchParams.set("skip","0"),Xe.searchParams.set(Oe,ce),b?l("refresh",Xe):window.location.replace(Xe)}function L(){Q=vle(this),t(0,Q),t(6,$)}function te(){a=vle(this),t(5,a),t(1,s),t(11,h),t(0,Q),t(1,s),t(11,h),t(0,Q)}function ne(ve){F=ve,t(4,F)}function oe(){F=this.value,t(4,F)}function G(){E=this.value,t(3,E)}function we(ve){Ro[ve?"unshift":"push"](()=>{C=ve,t(2,C)})}return o.$$set=ve=>{"schema"in ve&&t(9,u=ve.schema),"systemFields"in ve&&t(10,d=ve.systemFields),"operators"in ve&&t(11,h=ve.operators),"inModal"in ve&&t(12,b=ve.inModal),"modalUrl"in ve&&t(13,y=ve.modalUrl)},o.$$.update=()=>{o.$$.dirty&2049&&t(1,s=h.filter(ve=>{var Re;return ve.uis.includes((Re=Q==null?void 0:Q.info)==null?void 0:Re.name)||ve.uis[0]=="*"})),o.$$.dirty&2&&t(5,a=s[0])},[Q,s,C,E,F,a,$,U,K,u,d,h,b,y,L,te,ne,oe,G,we]}class jCe extends uo{constructor(e){super(),co(this,e,XCe,YCe,lo,{schema:9,systemFields:10,operators:11,inModal:12,modalUrl:13})}}function qCe(o){let e,t,s,a,l,u,d,h;return{c(){e=re("fieldset"),t=re("label"),s=Ht(`Upload file `),a=re("span"),a.innerHTML='Loading...',l=Ze(),u=re("input"),Z(a,"class","spinner-border spinner-border-sm"),Z(a,"role","status"),Z(a,"aria-hidden","true"),Z(u,"class","form-control"),Z(u,"type","file"),Z(u,"id","formFile"),u.multiple=!0,Z(u,"accept",GCe),u.disabled=o[0],u.hidden=!0,Z(t,"class","btn btn-primary btn-sm btn-spinner "),e.disabled=o[0]},m(b,y){Te(b,e,y),X(e,t),X(t,s),X(t,a),X(t,l),X(t,u),d||(h=mn(u,"input",o[1]),d=!0)},p(b,[y]){y&1&&(u.disabled=b[0]),y&1&&(e.disabled=b[0])},i:un,o:un,d(b){b&&ke(e),d=!1,h()}}}let GCe="";function KCe(o,e,t){const s=Fg(),a=Ur("channel");let{schema:l}=e,u=[],d=!1;function h(b){t(0,d=!0),u=b.target.files?[...b.target.files]:[];let y=new FormData;y.append("schema",l.name),Array.from(u).forEach(function(C){y.append("files[]",C)}),s("beforeUpload",u),axios.post(a.lucentUrl+"/files/upload",y,{headers:{"Content-Type":"multipart/form-data"}}).then(C=>{C.data.error?s("uploadError",C.data.error):s("uploadComplete",C.data),t(0,d=!1)}).catch(C=>{t(0,d=!1),console.log(C.response.data)})}return o.$$set=b=>{"schema"in b&&t(2,l=b.schema)},[d,h,l]}class JCe extends uo{constructor(e){super(),co(this,e,KCe,qCe,lo,{schema:2})}}function Bce(o,e,t){const s=o.slice();return s[18]=e[t],s}function Lce(o,e,t){const s=o.slice();return s[18]=e[t],s}function eke(o){let e,t;return e=new Fa({props:{icon:"arrow-up-short-wide"}}),{c(){en(e.$$.fragment)},m(s,a){Kt(e,s,a),t=!0},i(s){t||(xe(e.$$.fragment,s),t=!0)},o(s){Be(e.$$.fragment,s),t=!1},d(s){Jt(e,s)}}}function tke(o){let e,t;return e=new Fa({props:{icon:"arrow-down-wide-short"}}),{c(){en(e.$$.fragment)},m(s,a){Kt(e,s,a),t=!0},i(s){t||(xe(e.$$.fragment,s),t=!0)},o(s){Be(e.$$.fragment,s),t=!1},d(s){Jt(e,s)}}}function Fce(o){let e,t,s,a,l,u,d,h,b,y,C,E=o[18].label+"",R,$,Q,F,U;a=new Fa({props:{icon:"arrow-up-short-wide"}});function K(...ne){return o[10](o[18],...ne)}h=new Fa({props:{icon:"arrow-down-wide-short"}});function L(...ne){return o[11](o[18],...ne)}function te(...ne){return o[12](o[18],...ne)}return{c(){e=re("div"),t=re("div"),s=re("button"),en(a.$$.fragment),u=Ze(),d=re("button"),en(h.$$.fragment),y=Ze(),C=re("button"),R=Ht(E),$=Ze(),Z(s,"title","Sort Ascending"),Z(s,"class",l="btn btn-sm "+(o[18].name==o[1].name&&!o[0].startsWith("-")?"btn-primary":"btn-outline-primary")),Z(d,"title","Sort Descending"),Z(d,"class",b="btn btn-sm "+(o[18].name==o[1].name&&o[0].startsWith("-")?"btn-primary":"btn-outline-primary")),Z(C,"title","Sort Ascending"),Z(C,"class","btn btn-sm btn-outline-primary w-100 text-nowrap"),rs(C,"overflow","hidden"),Z(t,"class","btn-group w-100"),Z(e,"class","col-4 px-3 py-1 d-flex align-items-center")},m(ne,oe){Te(ne,e,oe),X(e,t),X(t,s),Kt(a,s,null),X(t,u),X(t,d),Kt(h,d,null),X(t,y),X(t,C),X(C,R),X(e,$),Q=!0,F||(U=[mn(s,"click",K),mn(d,"click",L),mn(C,"click",te)],F=!0)},p(ne,oe){o=ne,(!Q||oe&11&&l!==(l="btn btn-sm "+(o[18].name==o[1].name&&!o[0].startsWith("-")?"btn-primary":"btn-outline-primary")))&&Z(s,"class",l),(!Q||oe&11&&b!==(b="btn btn-sm "+(o[18].name==o[1].name&&o[0].startsWith("-")?"btn-primary":"btn-outline-primary")))&&Z(d,"class",b),(!Q||oe&8)&&E!==(E=o[18].label+"")&&Fn(R,E)},i(ne){Q||(xe(a.$$.fragment,ne),xe(h.$$.fragment,ne),Q=!0)},o(ne){Be(a.$$.fragment,ne),Be(h.$$.fragment,ne),Q=!1},d(ne){ne&&ke(e),Jt(a),Jt(h),F=!1,vi(U)}}}function Qce(o){let e,t,s,a,l,u,d,h,b,y,C,E=o[18].label+"",R,$,Q,F,U;a=new Fa({props:{icon:"arrow-up-short-wide"}});function K(...ne){return o[13](o[18],...ne)}h=new Fa({props:{icon:"arrow-down-wide-short"}});function L(...ne){return o[14](o[18],...ne)}function te(...ne){return o[15](o[18],...ne)}return{c(){e=re("div"),t=re("div"),s=re("button"),en(a.$$.fragment),u=Ze(),d=re("button"),en(h.$$.fragment),y=Ze(),C=re("button"),R=Ht(E),$=Ze(),Z(s,"title","Sort Ascending"),Z(s,"class",l="btn btn-sm "+(o[18].name==o[0]?"btn-primary":"btn-outline-primary")),Z(d,"title","Sort Descending"),Z(d,"class",b="btn btn-sm "+("-"+o[18].name==o[0]?"btn-primary":"btn-outline-primary")),Z(C,"title","Sort Ascending"),Z(C,"class","btn btn-sm btn-outline-primary w-100 text-nowrap"),rs(C,"overflow","hidden"),Z(t,"class","btn-group w-100"),Z(e,"class","col-4 px-3 py-1 d-flex align-items-center")},m(ne,oe){Te(ne,e,oe),X(e,t),X(t,s),Kt(a,s,null),X(t,u),X(t,d),Kt(h,d,null),X(t,y),X(t,C),X(C,R),X(e,$),Q=!0,F||(U=[mn(s,"click",K),mn(d,"click",L),mn(C,"click",te)],F=!0)},p(ne,oe){o=ne,(!Q||oe&5&&l!==(l="btn btn-sm "+(o[18].name==o[0]?"btn-primary":"btn-outline-primary")))&&Z(s,"class",l),(!Q||oe&5&&b!==(b="btn btn-sm "+("-"+o[18].name==o[0]?"btn-primary":"btn-outline-primary")))&&Z(d,"class",b),(!Q||oe&4)&&E!==(E=o[18].label+"")&&Fn(R,E)},i(ne){Q||(xe(a.$$.fragment,ne),xe(h.$$.fragment,ne),Q=!0)},o(ne){Be(a.$$.fragment,ne),Be(h.$$.fragment,ne),Q=!1},d(ne){ne&&ke(e),Jt(a),Jt(h),F=!1,vi(U)}}}function nke(o){let e,t,s,a,l,u,d,h=o[1].label+"",b,y,C,E,R,$,Q,F,U;const K=[tke,eke],L=[];function te(Oe,ce){return ce&1&&(s=null),s==null&&(s=!!Oe[0].startsWith("-")),s?0:1}a=te(o,-1),l=L[a]=K[a](o);let ne=o[3],oe=[];for(let Oe=0;OeBe(oe[Oe],1,1,()=>{oe[Oe]=null});let we=o[2],ve=[];for(let Oe=0;OeBe(ve[Oe],1,1,()=>{ve[Oe]=null});return{c(){e=re("div"),t=re("button"),l.c(),u=Ze(),d=re("span"),b=Ht(h),y=Ze(),C=re("div"),E=re("div");for(let Oe=0;Oe{L[Xe]=null}),go(),l=L[a],l||(l=L[a]=K[a](Oe),l.c()),xe(l,1),l.m(t,u)),(!U||ce&2)&&h!==(h=Oe[1].label+"")&&Fn(b,h),ce&59){ne=Oe[3];let tt;for(tt=0;ttwe.name).includes(oe.name)?"":"data.";return E(G+oe.name)}function $(ne,oe){ne.preventDefault();let G=C.map(we=>we.name).includes(oe.name)?"":"data.";return E("-"+G+oe.name)}const Q=(ne,oe)=>R(oe,ne),F=(ne,oe)=>$(oe,ne),U=(ne,oe)=>R(oe,ne),K=(ne,oe)=>R(oe,ne),L=(ne,oe)=>$(oe,ne),te=(ne,oe)=>R(oe,ne);return o.$$set=ne=>{"schema"in ne&&t(6,u=ne.schema),"sortParam"in ne&&t(0,d=ne.sortParam),"sortField"in ne&&t(1,h=ne.sortField),"inModal"in ne&&t(7,b=ne.inModal),"modalUrl"in ne&&t(8,y=ne.modalUrl),"systemFields"in ne&&t(9,C=ne.systemFields)},o.$$.update=()=>{o.$$.dirty&64&&t(3,s=u.fields.filter(ne=>!["reference","file","json","id","rich","markdown","block"].includes(ne.info.name))),o.$$.dirty&512&&t(2,a=C),o.$$.dirty&576&&u.type==="collection"&&t(2,a=C.filter(ne=>ne.files===!1))},[d,h,a,s,R,$,u,b,y,C,Q,F,U,K,L,te]}class ske extends uo{constructor(e){super(),co(this,e,oke,nke,lo,{schema:6,sortParam:0,sortField:1,inModal:7,modalUrl:8,systemFields:9})}}function rke(o){var h,b;let e=o[3].label+"",t,s,a=((b=(h=o[0].find(o[11]))==null?void 0:h.symbol)!=null?b:"")+"",l,u,d;return{c(){t=Ht(e),s=Ze(),l=Ht(a),u=Ze(),d=Ht(o[2])},m(y,C){Te(y,t,C),Te(y,s,C),Te(y,l,C),Te(y,u,C),Te(y,d,C)},p(y,C){var E,R;C&8&&e!==(e=y[3].label+"")&&Fn(t,e),C&9&&a!==(a=((R=(E=y[0].find(y[11]))==null?void 0:E.symbol)!=null?R:"")+"")&&Fn(l,a),C&4&&Fn(d,y[2])},d(y){y&&ke(t),y&&ke(s),y&&ke(l),y&&ke(u),y&&ke(d)}}}function ike(o){let e=o[3].label+"",t,s,a=qu(o[4].schemas,o[5])+"",l;return{c(){t=Ht(e),s=Ht(" is "),l=Ht(a)},m(u,d){Te(u,t,d),Te(u,s,d),Te(u,l,d)},p(u,d){d&8&&e!==(e=u[3].label+"")&&Fn(t,e)},d(u){u&&ke(t),u&&ke(s),u&&ke(l)}}}function ake(o){let e,t,s,a,l,u;function d(y,C){return y[3].isReference&&y[5]?ike:rke}let h=d(o),b=h(o);return{c(){e=re("span"),t=re("div"),b.c(),s=Ze(),a=re("button"),Z(a,"type","button"),Z(a,"class","btn-close btn-close ms-1"),Z(a,"aria-label","Close"),Z(t,"class","d-flex align-items-center justify-content-center"),Z(e,"class","applied-filter d-inline-block border border-primary rounded lx-small-text me-1 px-2 py-1 svelte-1x4ff17")},m(y,C){Te(y,e,C),X(e,t),b.m(t,null),X(t,s),X(t,a),l||(u=mn(a,"click",ku(o[12])),l=!0)},p(y,[C]){h===(h=d(y))&&b?b.p(y,C):(b.d(1),b=h(y),b&&(b.c(),b.m(t,s)))},i:un,o:un,d(y){y&&ke(e),b.d(),l=!1,u()}}}function lke(o){return e=>{var s;if(e.isReference)return e.operator="eq",e;const t=o.split("_");return e.operator=(s=t[t.length-1])!=null?s:"eq",e}}function cke(o,e){return t=>{var l;let s="";t.isReference?s=e.split(".")[1]:s=e.replace("_"+t.operator,"");const a=o.fields.find(u=>u.name===s);return t.label=(l=a==null?void 0:a.label)!=null?l:s,t}}function uke(o,e,t){const s=Ur("channel"),a=Fg();let{schema:l}=e,{operators:u}=e,{key:d}=e,{value:h}=e,{inModal:b}=e,{modalUrl:y}=e,{graph:C}=e,E={label:"",operator:"",value:h,isReference:d.startsWith("children")};E=[lke(d),cke(l,d)].reduce((K,L)=>L(K),E);const R=$(C,h);function $(K,L){return E.isReference?K.records.find(te=>te.id===L):null}function Q(K){let L=`filter[${K}]`;const te=new URL(y!=null?y:window.location.href);te.searchParams.set("skip","0"),te.searchParams.delete(L),b?a("refresh",te):window.location.replace(te)}const F=K=>K.name===E.operator,U=()=>Q(d);return o.$$set=K=>{"schema"in K&&t(7,l=K.schema),"operators"in K&&t(0,u=K.operators),"key"in K&&t(1,d=K.key),"value"in K&&t(2,h=K.value),"inModal"in K&&t(8,b=K.inModal),"modalUrl"in K&&t(9,y=K.modalUrl),"graph"in K&&t(10,C=K.graph)},[u,d,h,E,s,R,Q,l,b,y,C,F,U]}class fke extends uo{constructor(e){super(),co(this,e,uke,ake,lo,{schema:7,operators:0,key:1,value:2,inModal:8,modalUrl:9,graph:10})}}function Zce(o,e,t){const s=o.slice();return s[21]=e[t][0],s[22]=e[t][1],s}function dke(o){let e,t,s;return t=new JCe({props:{schema:o[0]}}),t.$on("uploadComplete",o[13]),{c(){e=re("div"),en(t.$$.fragment),Z(e,"class","d-inline-block ms-1")},m(a,l){Te(a,e,l),Kt(t,e,null),s=!0},p(a,l){const u={};l&1&&(u.schema=a[0]),t.$set(u)},i(a){s||(xe(t.$$.fragment,a),s=!0)},o(a){Be(t.$$.fragment,a),s=!1},d(a){a&&ke(e),Jt(t)}}}function hke(o){let e,t=!o[5]&&o[7]&&Hce(o);return{c(){t&&t.c(),e=Rs()},m(s,a){t&&t.m(s,a),Te(s,e,a)},p(s,a){!s[5]&&s[7]?t?t.p(s,a):(t=Hce(s),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},i:un,o:un,d(s){t&&t.d(s),s&&ke(e)}}}function Hce(o){let e,t,s;return{c(){e=re("a"),t=Ht("New Record"),Z(e,"href",s=o[10].lucentUrl+"/records/new?schema="+o[0].name),Z(e,"class","btn btn-sm btn-primary")},m(a,l){Te(a,e,l),X(e,t)},p(a,l){l&1&&s!==(s=a[10].lucentUrl+"/records/new?schema="+a[0].name)&&Z(e,"href",s)},d(a){a&&ke(e)}}}function zce(o){let e,t,s,a,l,u;s=new Fa({props:{icon:"ellipsis-vertical"}});function d(y,C){return y[4].status_in==="trashed"?gke:mke}let h=d(o),b=h(o);return{c(){e=re("div"),t=re("button"),en(s.$$.fragment),a=Ze(),l=re("ul"),b.c(),Z(t,"class","btn btn-link btn-sm"),Z(t,"type","button"),Z(t,"data-bs-toggle","dropdown"),Z(t,"aria-expanded","false"),Z(l,"class","dropdown-menu"),Z(e,"class","dropdown d-inline-block")},m(y,C){Te(y,e,C),X(e,t),Kt(s,t,null),X(e,a),X(e,l),b.m(l,null),u=!0},p(y,C){h===(h=d(y))&&b?b.p(y,C):(b.d(1),b=h(y),b&&(b.c(),b.m(l,null)))},i(y){u||(xe(s.$$.fragment,y),u=!0)},o(y){Be(s.$$.fragment,y),u=!1},d(y){y&&ke(e),Jt(s),b.d()}}}function mke(o){let e,t,s,a,l,u,d,h;return{c(){e=re("li"),t=re("a"),s=Ht("Export to CSV"),a=Ze(),l=re("li"),u=re("a"),d=Ht("View trashed records"),Z(t,"class","dropdown-item"),Z(t,"href",o[11]),Z(u,"class","dropdown-item"),Z(u,"href",h=o[10].lucentUrl+"/content/"+o[0].name+"?filter[status_in]=trashed")},m(b,y){Te(b,e,y),X(e,t),X(t,s),Te(b,a,y),Te(b,l,y),X(l,u),X(u,d)},p(b,y){y&1&&h!==(h=b[10].lucentUrl+"/content/"+b[0].name+"?filter[status_in]=trashed")&&Z(u,"href",h)},d(b){b&&ke(e),b&&ke(a),b&&ke(l)}}}function gke(o){let e,t=o[7]&&Vce(o);return{c(){t&&t.c(),e=Rs()},m(s,a){t&&t.m(s,a),Te(s,e,a)},p(s,a){s[7]?t?t.p(s,a):(t=Vce(s),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},d(s){t&&t.d(s),s&&ke(e)}}}function Vce(o){let e,t,s,a;return{c(){e=re("li"),t=re("a"),s=Ht("Empty trash"),Z(t,"class","dropdown-item"),Z(t,"href",a=o[10].lucentUrl+"/content/"+o[0].name+"/emptyTrash")},m(l,u){Te(l,e,u),X(e,t),X(t,s)},p(l,u){u&1&&a!==(a=l[10].lucentUrl+"/content/"+l[0].name+"/emptyTrash")&&Z(t,"href",a)},d(l){l&&ke(e)}}}function Wce(o){let e,t,s=Object.entries(o[4]),a=[];for(let u=0;uBe(a[u],1,1,()=>{a[u]=null});return{c(){e=re("div");for(let u=0;u0,F,U,K,L;s=new ske({props:{schema:o[0],sortParam:o[1],sortField:o[2],systemFields:o[9],inModal:o[5],modalUrl:o[6]}}),s.$on("refresh",o[15]);function te(Oe){o[16](Oe)}let ne={systemFields:o[9],operators:o[3],filter:o[4],inModal:o[5],modalUrl:o[6]};o[0]!==void 0&&(ne.schema=o[0]),l=new jCe({props:ne}),Ro.push(()=>er(l,"schema",te)),l.$on("refresh",o[17]);const oe=[hke,dke],G=[];function we(Oe,ce){return Oe[0].type==="collection"?0:1}C=we(o),E=G[C]=oe[C](o);let ve=!o[5]&&zce(o),Re=Q&&Wce(o);return{c(){e=re("div"),t=re("div"),en(s.$$.fragment),a=Ze(),en(l.$$.fragment),d=Ze(),h=re("form"),h.innerHTML='',b=Ze(),y=re("div"),E.c(),R=Ze(),ve&&ve.c(),$=Ze(),Re&&Re.c(),F=Rs(),Z(h,"method","GET"),Z(t,"class","d-flex align-items-center"),Z(y,"class","d-flex align-items-center "),Z(e,"class","mb-3 d-flex align-items-center justify-content-between")},m(Oe,ce){Te(Oe,e,ce),X(e,t),Kt(s,t,null),X(t,a),Kt(l,t,null),X(t,d),X(t,h),X(e,b),X(e,y),G[C].m(y,null),X(y,R),ve&&ve.m(y,null),Te(Oe,$,ce),Re&&Re.m(Oe,ce),Te(Oe,F,ce),U=!0,K||(L=mn(h,"submit",o[12]),K=!0)},p(Oe,[ce]){const Xe={};ce&1&&(Xe.schema=Oe[0]),ce&2&&(Xe.sortParam=Oe[1]),ce&4&&(Xe.sortField=Oe[2]),ce&512&&(Xe.systemFields=Oe[9]),ce&32&&(Xe.inModal=Oe[5]),ce&64&&(Xe.modalUrl=Oe[6]),s.$set(Xe);const tt={};ce&512&&(tt.systemFields=Oe[9]),ce&8&&(tt.operators=Oe[3]),ce&16&&(tt.filter=Oe[4]),ce&32&&(tt.inModal=Oe[5]),ce&64&&(tt.modalUrl=Oe[6]),!u&&ce&1&&(u=!0,tt.schema=Oe[0],lr(()=>u=!1)),l.$set(tt);let ot=C;C=we(Oe),C===ot?G[C].p(Oe,ce):(mo(),Be(G[ot],1,1,()=>{G[ot]=null}),go(),E=G[C],E?E.p(Oe,ce):(E=G[C]=oe[C](Oe),E.c()),xe(E,1),E.m(y,R)),Oe[5]?ve&&(mo(),Be(ve,1,1,()=>{ve=null}),go()):ve?(ve.p(Oe,ce),ce&32&&xe(ve,1)):(ve=zce(Oe),ve.c(),xe(ve,1),ve.m(y,null)),ce&16&&(Q=Object.entries(Oe[4]).length>0),Q?Re?(Re.p(Oe,ce),ce&16&&xe(Re,1)):(Re=Wce(Oe),Re.c(),xe(Re,1),Re.m(F.parentNode,F)):Re&&(mo(),Be(Re,1,1,()=>{Re=null}),go())},i(Oe){U||(xe(s.$$.fragment,Oe),xe(l.$$.fragment,Oe),xe(E),xe(ve),xe(Re),U=!0)},o(Oe){Be(s.$$.fragment,Oe),Be(l.$$.fragment,Oe),Be(E),Be(ve),Be(Re),U=!1},d(Oe){Oe&&ke(e),Jt(s),Jt(l),G[C].d(),ve&&ve.d(),Oe&&ke($),Re&&Re.d(Oe),Oe&&ke(F),K=!1,L()}}}function bke(o,e,t){const s=Ur("channel"),a=Fg();let{sortParam:l}=e,{sortField:u}=e,{schema:d}=e,{operators:h}=e,{filter:b}=e,{inModal:y}=e,{modalUrl:C}=e,{isWritable:E}=e,{records:R}=e,{graph:$}=e,{systemFields:Q=[]}=e,F=new URL(window.location.href),U=F.pathname+"/csv?"+F.searchParams.toString();function K(we){we.preventDefault();const ve=new FormData(we.target);let Re=ve.keys().next().value,Oe=ve.values().next().value;const ce=new URL(C!=null?C:window.location.href);ce.searchParams.set("skip","0"),ce.searchParams.set(Re,Oe),y?a("refresh",ce):window.location=ce}function L(we){t(14,R=we.detail)}function te(we){SH.call(this,o,we)}function ne(we){d=we,t(0,d)}function oe(we){SH.call(this,o,we)}function G(we){SH.call(this,o,we)}return o.$$set=we=>{"sortParam"in we&&t(1,l=we.sortParam),"sortField"in we&&t(2,u=we.sortField),"schema"in we&&t(0,d=we.schema),"operators"in we&&t(3,h=we.operators),"filter"in we&&t(4,b=we.filter),"inModal"in we&&t(5,y=we.inModal),"modalUrl"in we&&t(6,C=we.modalUrl),"isWritable"in we&&t(7,E=we.isWritable),"records"in we&&t(14,R=we.records),"graph"in we&&t(8,$=we.graph),"systemFields"in we&&t(9,Q=we.systemFields)},[d,l,u,h,b,y,C,E,$,Q,s,U,K,L,R,te,ne,oe,G]}class vke extends uo{constructor(e){super(),co(this,e,bke,pke,lo,{sortParam:1,sortField:2,schema:0,operators:3,filter:4,inModal:5,modalUrl:6,isWritable:7,records:14,graph:8,systemFields:9})}}function Yce(o,e,t){const s=o.slice();return s[9]=e[t],s}function Oke(o){let e,t=o[9]+"",s,a,l,u;function d(...h){return o[7](o[9],...h)}return{c(){e=re("a"),s=Ht(t),Z(e,"class","page-link"),Z(e,"href",a=o[2](o[9]))},m(h,b){Te(h,e,b),X(e,s),l||(u=mn(e,"click",d),l=!0)},p(h,b){o=h,b&1&&t!==(t=o[9]+"")&&Fn(s,t),b&1&&a!==(a=o[2](o[9]))&&Z(e,"href",a)},d(h){h&&ke(e),l=!1,u()}}}function yke(o){let e,t=o[9]+"",s;return{c(){e=re("span"),s=Ht(t),Z(e,"class","page-link active")},m(a,l){Te(a,e,l),X(e,s)},p(a,l){l&1&&t!==(t=a[9]+"")&&Fn(s,t)},d(a){a&&ke(e)}}}function Xce(o){let e,t;function s(u,d){return u[1]==u[9]?yke:Oke}let a=s(o),l=a(o);return{c(){e=re("li"),l.c(),t=Ze(),Z(e,"class","page-item")},m(u,d){Te(u,e,d),l.m(e,null),X(e,t)},p(u,d){a===(a=s(u))&&l?l.p(u,d):(l.d(1),l=a(u),l&&(l.c(),l.m(e,t)))},d(u){u&&ke(e),l.d()}}}function wke(o){let e,t=o[0],s=[];for(let a=0;ay(R,E);return o.$$set=E=>{"pages"in E&&t(0,a=E.pages),"limit"in E&&t(4,l=E.limit),"currentPage"in E&&t(1,u=E.currentPage),"inModal"in E&&t(5,d=E.inModal),"modalUrl"in E&&t(6,h=E.modalUrl)},[a,u,b,y,l,d,h,C]}class Ske extends uo{constructor(e){super(),co(this,e,_ke,wke,lo,{pages:0,limit:4,currentPage:1,inModal:5,modalUrl:6})}}function jce(o){let e,t,s,a,l,u,d,h,b,y;return a=new Ske({props:{pages:o[7],currentPage:o[6],limit:o[2],inModal:o[0],modalUrl:o[1]}}),a.$on("refresh",o[10]),{c(){e=re("li"),t=re("a"),t.textContent="First",s=Ze(),en(a.$$.fragment),l=Ze(),u=re("li"),d=re("a"),d.textContent="Last",Z(t,"href","/"),Z(t,"class","page-link"),Z(e,"class","page-item disabled"),Vo(e,"disabled",o[6]===1),Z(d,"class","page-link"),Z(d,"href","/"),Vo(d,"disabled",o[6]===o[5]),Z(u,"class","page-item")},m(C,E){Te(C,e,E),X(e,t),Te(C,s,E),Kt(a,C,E),Te(C,l,E),Te(C,u,E),X(u,d),h=!0,b||(y=[mn(t,"click",o[9]),mn(d,"click",o[8])],b=!0)},p(C,E){(!h||E&64)&&Vo(e,"disabled",C[6]===1);const R={};E&128&&(R.pages=C[7]),E&64&&(R.currentPage=C[6]),E&4&&(R.limit=C[2]),E&1&&(R.inModal=C[0]),E&2&&(R.modalUrl=C[1]),a.$set(R),(!h||E&96)&&Vo(d,"disabled",C[6]===C[5])},i(C){h||(xe(a.$$.fragment,C),h=!0)},o(C){Be(a.$$.fragment,C),h=!1},d(C){C&&ke(e),C&&ke(s),Jt(a,C),C&&ke(l),C&&ke(u),b=!1,vi(y)}}}function Cke(o){let e,t,s,a,l,u,d=+o[3]+1+"",h,b,y,C=(+o[3]+o[2]>o[4]?o[4]:+o[3]+o[2])+"",E,R,$,Q,F,U,K=o[5]>1&&jce(o);return{c(){e=re("nav"),t=re("ul"),K&&K.c(),s=Ze(),a=re("p"),l=Ht(`Showing @@ -51,7 +51,7 @@ function print() { __p += __j.call(arguments, '') } * @author RubaXa * @author owenm * @license MIT - */function xue(o,e){var t=Object.keys(o);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(o);e&&(s=s.filter(function(a){return Object.getOwnPropertyDescriptor(o,a).enumerable})),t.push.apply(t,s)}return t}function Oy(o){for(var e=1;e=0)&&(t[a]=o[a]);return t}function $xe(o,e){if(o==null)return{};var t=Rxe(o,e),s,a;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(o);for(a=0;a=0)&&(!Object.prototype.propertyIsEnumerable.call(o,s)||(t[s]=o[s]))}return t}var Nxe="1.15.0";function Fw(o){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(o)}var jw=Fw(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),tI=Fw(/Edge/i),Tue=Fw(/firefox/i),i6=Fw(/safari/i)&&!Fw(/chrome/i)&&!Fw(/android/i),e1e=Fw(/iP(ad|od|hone)/i),t1e=Fw(/chrome/i)&&Fw(/android/i),n1e={capture:!1,passive:!1};function hl(o,e,t){o.addEventListener(e,t,!jw&&n1e)}function La(o,e,t){o.removeEventListener(e,t,!jw&&n1e)}function rz(o,e){if(!!e){if(e[0]===">"&&(e=e.substring(1)),o)try{if(o.matches)return o.matches(e);if(o.msMatchesSelector)return o.msMatchesSelector(e);if(o.webkitMatchesSelector)return o.webkitMatchesSelector(e)}catch{return!1}return!1}}function Ixe(o){return o.host&&o!==document&&o.host.nodeType?o.host:o.parentNode}function iy(o,e,t,s){if(o){t=t||document;do{if(e!=null&&(e[0]===">"?o.parentNode===t&&rz(o,e):rz(o,e))||s&&o===t)return o;if(o===t)break}while(o=Ixe(o))}return null}var Eue=/\s+/g;function $1(o,e,t){if(o&&e)if(o.classList)o.classList[t?"add":"remove"](e);else{var s=(" "+o.className+" ").replace(Eue," ").replace(" "+e+" "," ");o.className=(s+(t?" "+e:"")).replace(Eue," ")}}function Vr(o,e,t){var s=o&&o.style;if(s){if(t===void 0)return document.defaultView&&document.defaultView.getComputedStyle?t=document.defaultView.getComputedStyle(o,""):o.currentStyle&&(t=o.currentStyle),e===void 0?t:t[e];!(e in s)&&e.indexOf("webkit")===-1&&(e="-webkit-"+e),s[e]=t+(typeof t=="string"?"":"px")}}function OD(o,e){var t="";if(typeof o=="string")t=o;else do{var s=Vr(o,"transform");s&&s!=="none"&&(t=s+" "+t)}while(!e&&(o=o.parentNode));var a=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return a&&new a(t)}function o1e(o,e,t){if(o){var s=o.getElementsByTagName(e),a=0,l=s.length;if(t)for(;a=l:u=a<=l,!u)return s;if(s===hy())break;s=_C(s,!1)}return!1}function PD(o,e,t,s){for(var a=0,l=0,u=o.children;l2&&arguments[2]!==void 0?arguments[2]:{},a=s.evt,l=$xe(s,Vxe);nI.pluginEvent.bind(Wr)(e,t,Oy({dragEl:zo,parentEl:ju,ghostEl:Ai,rootEl:eu,nextEl:tE,lastDownEl:TH,cloneEl:Su,cloneHidden:yC,dragStarted:qN,putSortable:Vh,activeSortable:Wr.active,originalEvent:a,oldIndex:hD,oldDraggableIndex:l6,newIndex:I1,newDraggableIndex:bC,hideGhostForTarget:u1e,unhideGhostForTarget:f1e,cloneNowHidden:function(){yC=!0},cloneNowShown:function(){yC=!1},dispatchSortableEvent:function(d){Rg({sortable:t,name:d,originalEvent:a})}},l))};function Rg(o){zxe(Oy({putSortable:Vh,cloneEl:Su,targetEl:zo,rootEl:eu,oldIndex:hD,oldDraggableIndex:l6,newIndex:I1,newDraggableIndex:bC},o))}var zo,ju,Ai,eu,tE,TH,Su,yC,hD,I1,l6,bC,IZ,Vh,iD=!1,iz=!1,az=[],qT,wv,wne,_ne,Pue,Mue,qN,tD,c6,u6=!1,BZ=!1,EH,Rm,Sne=[],Boe=!1,lz=[],tV=typeof document<"u",LZ=e1e,Rue=tI||jw?"cssFloat":"float",Wxe=tV&&!t1e&&!e1e&&"draggable"in document.createElement("div"),a1e=function(){if(!!tV){if(jw)return!1;var o=document.createElement("x");return o.style.cssText="pointer-events:auto",o.style.pointerEvents==="auto"}}(),l1e=function(e,t){var s=Vr(e),a=parseInt(s.width)-parseInt(s.paddingLeft)-parseInt(s.paddingRight)-parseInt(s.borderLeftWidth)-parseInt(s.borderRightWidth),l=PD(e,0,t),u=PD(e,1,t),d=l&&Vr(l),h=u&&Vr(u),b=d&&parseInt(d.marginLeft)+parseInt(d.marginRight)+yd(l).width,y=h&&parseInt(h.marginLeft)+parseInt(h.marginRight)+yd(u).width;if(s.display==="flex")return s.flexDirection==="column"||s.flexDirection==="column-reverse"?"vertical":"horizontal";if(s.display==="grid")return s.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(l&&d.float&&d.float!=="none"){var C=d.float==="left"?"left":"right";return u&&(h.clear==="both"||h.clear===C)?"vertical":"horizontal"}return l&&(d.display==="block"||d.display==="flex"||d.display==="table"||d.display==="grid"||b>=a&&s[Rue]==="none"||u&&s[Rue]==="none"&&b+y>a)?"vertical":"horizontal"},Uxe=function(e,t,s){var a=s?e.left:e.top,l=s?e.right:e.bottom,u=s?e.width:e.height,d=s?t.left:t.top,h=s?t.right:t.bottom,b=s?t.width:t.height;return a===d||l===h||a+u/2===d+b/2},Yxe=function(e,t){var s;return az.some(function(a){var l=a[F1].options.emptyInsertThreshold;if(!(!l||lre(a))){var u=yd(a),d=e>=u.left-l&&e<=u.right+l,h=t>=u.top-l&&t<=u.bottom+l;if(d&&h)return s=a}}),s},c1e=function(e){function t(l,u){return function(d,h,b,y){var C=d.options.group.name&&h.options.group.name&&d.options.group.name===h.options.group.name;if(l==null&&(u||C))return!0;if(l==null||l===!1)return!1;if(u&&l==="clone")return l;if(typeof l=="function")return t(l(d,h,b,y),u)(d,h,b,y);var E=(u?d:h).options.group.name;return l===!0||typeof l=="string"&&l===E||l.join&&l.indexOf(E)>-1}}var s={},a=e.group;(!a||xH(a)!="object")&&(a={name:a}),s.name=a.name,s.checkPull=t(a.pull,!0),s.checkPut=t(a.put),s.revertClone=a.revertClone,e.group=s},u1e=function(){!a1e&&Ai&&Vr(Ai,"display","none")},f1e=function(){!a1e&&Ai&&Vr(Ai,"display","")};tV&&!t1e&&document.addEventListener("click",function(o){if(iz)return o.preventDefault(),o.stopPropagation&&o.stopPropagation(),o.stopImmediatePropagation&&o.stopImmediatePropagation(),iz=!1,!1},!0);var GT=function(e){if(zo){e=e.touches?e.touches[0]:e;var t=Yxe(e.clientX,e.clientY);if(t){var s={};for(var a in e)e.hasOwnProperty(a)&&(s[a]=e[a]);s.target=s.rootEl=t,s.preventDefault=void 0,s.stopPropagation=void 0,t[F1]._onDragOver(s)}}},Xxe=function(e){zo&&zo.parentNode[F1]._isOutsideThisEl(e.target)};function Wr(o,e){if(!(o&&o.nodeType&&o.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(o));this.el=o,this.options=e=zw({},e),o[F1]=this;var t={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(o.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return l1e(o,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(u,d){u.setData("Text",d.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:Wr.supportPointer!==!1&&"PointerEvent"in window&&!i6,emptyInsertThreshold:5};nI.initializePlugins(this,o,t);for(var s in t)!(s in e)&&(e[s]=t[s]);c1e(e);for(var a in this)a.charAt(0)==="_"&&typeof this[a]=="function"&&(this[a]=this[a].bind(this));this.nativeDraggable=e.forceFallback?!1:Wxe,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?hl(o,"pointerdown",this._onTapStart):(hl(o,"mousedown",this._onTapStart),hl(o,"touchstart",this._onTapStart)),this.nativeDraggable&&(hl(o,"dragover",this),hl(o,"dragenter",this)),az.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),zw(this,Qxe())}Wr.prototype={constructor:Wr,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(tD=null)},_getDirection:function(e,t){return typeof this.options.direction=="function"?this.options.direction.call(this,e,t,zo):this.options.direction},_onTapStart:function(e){if(!!e.cancelable){var t=this,s=this.el,a=this.options,l=a.preventOnFilter,u=e.type,d=e.touches&&e.touches[0]||e.pointerType&&e.pointerType==="touch"&&e,h=(d||e).target,b=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||h,y=a.filter;if(nTe(s),!zo&&!(/mousedown|pointerdown/.test(u)&&e.button!==0||a.disabled)&&!b.isContentEditable&&!(!this.nativeDraggable&&i6&&h&&h.tagName.toUpperCase()==="SELECT")&&(h=iy(h,a.draggable,s,!1),!(h&&h.animated)&&TH!==h)){if(hD=Lb(h),l6=Lb(h,a.draggable),typeof y=="function"){if(y.call(this,e,h,this)){Rg({sortable:t,rootEl:b,name:"filter",targetEl:h,toEl:s,fromEl:s}),Rp("filter",t,{evt:e}),l&&e.cancelable&&e.preventDefault();return}}else if(y&&(y=y.split(",").some(function(C){if(C=iy(b,C.trim(),s,!1),C)return Rg({sortable:t,rootEl:C,name:"filter",targetEl:h,fromEl:s,toEl:s}),Rp("filter",t,{evt:e}),!0}),y)){l&&e.cancelable&&e.preventDefault();return}a.handle&&!iy(b,a.handle,s,!1)||this._prepareDragStart(e,d,h)}}},_prepareDragStart:function(e,t,s){var a=this,l=a.el,u=a.options,d=l.ownerDocument,h;if(s&&!zo&&s.parentNode===l){var b=yd(s);if(eu=l,zo=s,ju=zo.parentNode,tE=zo.nextSibling,TH=s,IZ=u.group,Wr.dragged=zo,qT={target:zo,clientX:(t||e).clientX,clientY:(t||e).clientY},Pue=qT.clientX-b.left,Mue=qT.clientY-b.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,zo.style["will-change"]="all",h=function(){if(Rp("delayEnded",a,{evt:e}),Wr.eventCanceled){a._onDrop();return}a._disableDelayedDragEvents(),!Tue&&a.nativeDraggable&&(zo.draggable=!0),a._triggerDragStart(e,t),Rg({sortable:a,name:"choose",originalEvent:e}),$1(zo,u.chosenClass,!0)},u.ignore.split(",").forEach(function(y){o1e(zo,y.trim(),Cne)}),hl(d,"dragover",GT),hl(d,"mousemove",GT),hl(d,"touchmove",GT),hl(d,"mouseup",a._onDrop),hl(d,"touchend",a._onDrop),hl(d,"touchcancel",a._onDrop),Tue&&this.nativeDraggable&&(this.options.touchStartThreshold=4,zo.draggable=!0),Rp("delayStart",this,{evt:e}),u.delay&&(!u.delayOnTouchOnly||t)&&(!this.nativeDraggable||!(tI||jw))){if(Wr.eventCanceled){this._onDrop();return}hl(d,"mouseup",a._disableDelayedDrag),hl(d,"touchend",a._disableDelayedDrag),hl(d,"touchcancel",a._disableDelayedDrag),hl(d,"mousemove",a._delayedDragTouchMoveHandler),hl(d,"touchmove",a._delayedDragTouchMoveHandler),u.supportPointer&&hl(d,"pointermove",a._delayedDragTouchMoveHandler),a._dragStartTimer=setTimeout(h,u.delay)}else h()}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){zo&&Cne(zo),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;La(e,"mouseup",this._disableDelayedDrag),La(e,"touchend",this._disableDelayedDrag),La(e,"touchcancel",this._disableDelayedDrag),La(e,"mousemove",this._delayedDragTouchMoveHandler),La(e,"touchmove",this._delayedDragTouchMoveHandler),La(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||e.pointerType=="touch"&&e,!this.nativeDraggable||t?this.options.supportPointer?hl(document,"pointermove",this._onTouchMove):t?hl(document,"touchmove",this._onTouchMove):hl(document,"mousemove",this._onTouchMove):(hl(zo,"dragend",this),hl(eu,"dragstart",this._onDragStart));try{document.selection?AH(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(e,t){if(iD=!1,eu&&zo){Rp("dragStarted",this,{evt:t}),this.nativeDraggable&&hl(document,"dragover",Xxe);var s=this.options;!e&&$1(zo,s.dragClass,!1),$1(zo,s.ghostClass,!0),Wr.active=this,e&&this._appendGhost(),Rg({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(wv){this._lastX=wv.clientX,this._lastY=wv.clientY,u1e();for(var e=document.elementFromPoint(wv.clientX,wv.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(wv.clientX,wv.clientY),e!==t);)t=e;if(zo.parentNode[F1]._isOutsideThisEl(e),t)do{if(t[F1]){var s=void 0;if(s=t[F1]._onDragOver({clientX:wv.clientX,clientY:wv.clientY,target:e,rootEl:t}),s&&!this.options.dragoverBubble)break}e=t}while(t=t.parentNode);f1e()}},_onTouchMove:function(e){if(qT){var t=this.options,s=t.fallbackTolerance,a=t.fallbackOffset,l=e.touches?e.touches[0]:e,u=Ai&&OD(Ai,!0),d=Ai&&u&&u.a,h=Ai&&u&&u.d,b=LZ&&Rm&&Due(Rm),y=(l.clientX-qT.clientX+a.x)/(d||1)+(b?b[0]-Sne[0]:0)/(d||1),C=(l.clientY-qT.clientY+a.y)/(h||1)+(b?b[1]-Sne[1]:0)/(h||1);if(!Wr.active&&!iD){if(s&&Math.max(Math.abs(l.clientX-this._lastX),Math.abs(l.clientY-this._lastY))=0&&(Rg({rootEl:ju,name:"add",toEl:ju,fromEl:eu,originalEvent:e}),Rg({sortable:this,name:"remove",toEl:ju,originalEvent:e}),Rg({rootEl:ju,name:"sort",toEl:ju,fromEl:eu,originalEvent:e}),Rg({sortable:this,name:"sort",toEl:ju,originalEvent:e})),Vh&&Vh.save()):I1!==hD&&I1>=0&&(Rg({sortable:this,name:"update",toEl:ju,originalEvent:e}),Rg({sortable:this,name:"sort",toEl:ju,originalEvent:e})),Wr.active&&((I1==null||I1===-1)&&(I1=hD,bC=l6),Rg({sortable:this,name:"end",toEl:ju,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){Rp("nulling",this),eu=zo=ju=Ai=tE=Su=TH=yC=qT=wv=qN=I1=bC=hD=l6=tD=c6=Vh=IZ=Wr.dragged=Wr.ghost=Wr.clone=Wr.active=null,lz.forEach(function(e){e.checked=!0}),lz.length=wne=_ne=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":zo&&(this._onDragOver(e),jxe(e));break;case"selectstart":e.preventDefault();break}},toArray:function(){for(var e=[],t,s=this.el.children,a=0,l=s.length,u=this.options;as.right+a||o.clientX<=s.right&&o.clientY>s.bottom&&o.clientX>=s.left:o.clientX>s.right&&o.clientY>s.top||o.clientX<=s.right&&o.clientY>s.bottom+a}function Jxe(o,e,t,s,a,l,u,d){var h=s?o.clientY:o.clientX,b=s?t.height:t.width,y=s?t.top:t.left,C=s?t.bottom:t.right,E=!1;if(!u){if(d&&EHy+b*l/2:hC-EH)return-c6}else if(h>y+b*(1-a)/2&&hC-b*l/2)?h>y+b/2?1:-1:0}function eTe(o){return Lb(zo){u[y]=null}),go(),t=u[e],t?t.p(h,b):(t=u[e]=l[e](h),t.c()),xe(t,1),t.m(s.parentNode,s))},i(h){a||(xe(t),a=!0)},o(h){Be(t),a=!1},d(h){u[e].d(h),h&&ke(s)}}}function aTe(o,e,t){let{$$slots:s={},$$scope:a}=e,{sortableClass:l=""}=e,{isTable:u=!1}=e,{sortableInstance:d}=e;const h=Fg();let b;W1(()=>{let E={animation:150,easing:"cubic-bezier(1, 0, 0, 1)",onUpdate(R){console.log(R),h("update",{source:R.oldIndex,target:R.newIndex})},onMove(R){}};t(3,d=Wr.create(b,E))});function y(E){Ro[E?"unshift":"push"](()=>{b=E,t(2,b)})}function C(E){Ro[E?"unshift":"push"](()=>{b=E,t(2,b)})}return o.$$set=E=>{"sortableClass"in E&&t(0,l=E.sortableClass),"isTable"in E&&t(1,u=E.isTable),"sortableInstance"in E&&t(3,d=E.sortableInstance),"$$scope"in E&&t(4,a=E.$$scope)},[l,u,b,d,a,s,y,C]}class oI extends uo{constructor(e){super(),co(this,e,aTe,iTe,lo,{sortableClass:0,isTable:1,sortableInstance:3})}}function Nue(o,e,t){const s=o.slice();return s[11]=e[t],s}function Iue(o){let e,t;return{c(){e=re("div"),t=Ht(o[1]),Z(e,"class","invalid-feedback d-block mb-3")},m(s,a){Te(s,e,a),X(e,t)},p(s,a){a&2&&Fn(t,s[1])},d(s){s&&ke(e)}}}function Bue(o){let e,t;return e=new oI({props:{sortableClass:"row row-cols-3 mt-3",$$slots:{default:[lTe]},$$scope:{ctx:o}}}),e.$on("update",o[4]),{c(){en(e.$$.fragment)},m(s,a){Kt(e,s,a),t=!0},p(s,a){const l={};a&16385&&(l.$$scope={dirty:a,ctx:s}),e.$set(l)},i(s){t||(xe(e.$$.fragment,s),t=!0)},o(s){Be(e.$$.fragment,s),t=!1},d(s){Jt(e,s)}}}function Lue(o,e){let t,s,a,l;return s=new J6({props:{classes:"h-100",record:e[11],hasDelete:!0}}),s.$on("remove",e[3]),{key:o,first:null,c(){t=re("div"),en(s.$$.fragment),a=Ze(),Z(t,"class","col mb-3"),this.first=t},m(u,d){Te(u,t,d),Kt(s,t,null),X(t,a),l=!0},p(u,d){e=u;const h={};d&1&&(h.record=e[11]),s.$set(h)},i(u){l||(xe(s.$$.fragment,u),l=!0)},o(u){Be(s.$$.fragment,u),l=!1},d(u){u&&ke(t),Jt(s)}}}function lTe(o){let e=[],t=new Map,s,a,l=o[0];const u=d=>d[11].id;for(let d=0;d0&&Bue(o);return{c(){d&&d.c(),e=Ze(),t=re("div"),en(s.$$.fragment),a=Ze(),h&&h.c(),l=Rs(),Z(t,"class","inline-card-wrapper")},m(b,y){d&&d.m(b,y),Te(b,e,y),Te(b,t,y),Kt(s,t,null),Te(b,a,y),h&&h.m(b,y),Te(b,l,y),u=!0},p(b,[y]){b[1]?d?d.p(b,y):(d=Iue(b),d.c(),d.m(e.parentNode,e)):d&&(d.d(1),d=null),b[0].length>0?h?(h.p(b,y),y&1&&xe(h,1)):(h=Bue(b),h.c(),xe(h,1),h.m(l.parentNode,l)):h&&(mo(),Be(h,1,1,()=>{h=null}),go())},i(b){u||(xe(s.$$.fragment,b),xe(h),u=!0)},o(b){Be(s.$$.fragment,b),Be(h),u=!1},d(b){d&&d.d(b),b&&ke(e),b&&ke(t),Jt(s),b&&ke(a),h&&h.d(b),b&&ke(l)}}}function uTe(o,e,t){let s,a;const l=Ur("channel");let{record:u}=e,{field:d}=e,{graph:h}=e,{validationErrors:b}=e,y=l.schemas.filter($=>d.collections.includes($.name));function C($){$.preventDefault(),t(6,h.edges=h.edges.filter(Q=>!(Q.target===$.detail&&Q.field===d.name)),h)}function E($){t(6,h.edges=qD($.detail.source,$.detail.target,h.edges,d.name),h)}function R($){$.preventDefault(),t(6,h=K6(h,u,$.detail.records,d.name,$.detail.action))}return o.$$set=$=>{"record"in $&&t(7,u=$.record),"field"in $&&t(8,d=$.field),"graph"in $&&t(6,h=$.graph),"validationErrors"in $&&t(9,b=$.validationErrors)},o.$$.update=()=>{var $;o.$$.dirty&768&&t(1,s=Lm(b,d.name)),o.$$.dirty&448&&t(0,a=($=h.edges.filter(Q=>Q.field===d.name).map(Q=>h.records.find(F=>F.id===Q.target&&u.id===Q.source)).filter(Q=>!!(Q!=null&&Q.id)))!=null?$:[])},[a,s,y,C,E,R,h,u,d,b]}class fTe extends uo{constructor(e){super(),co(this,e,uTe,cTe,lo,{record:7,field:8,graph:6,validationErrors:9})}}function Fue(o,e,t){const s=o.slice();return s[21]=e[t],s}function dTe(o){let e,t,s,a,l,u,d,h,b,y,C,E,R,$,Q,F,U,K,L,te,ne,oe,G,we,ve,Re,Oe,ce,Xe,tt;u=new Fa({props:{icon:"pencil",width:12,height:12}});const ot=[pTe,gTe],V=[];function ut(Et,Cn){return Et[7]?0:1}b=ut(o),y=V[b]=ot[b](o),$=new Fa({props:{icon:"ellipsis"}});let Qe=!o[1]&&Que(o),Bt=!o[2]&&Zue(o),Ct=o[8].type==="files"&&bTe(o),He=o[8].fields.filter(zue),st=[];for(let Et=0;EtBe(st[Et],1,1,()=>{st[Et]=null});return{c(){e=re("div"),t=re("div"),s=re("small"),s.textContent=`${o[8].label}`,a=Ze(),l=re("button"),en(u.$$.fragment),d=Ze(),h=re("button"),y.c(),C=Ze(),E=re("div"),R=re("button"),en($.$$.fragment),Q=Ze(),F=re("div"),U=re("a"),K=Ht("Edit in new tab"),te=Ze(),ne=re("button"),ne.textContent="Remove",oe=Ze(),G=re("div"),Qe&&Qe.c(),we=Ze(),Bt&&Bt.c(),ve=Ze(),Re=re("div"),Ct&&Ct.c(),Oe=Ze();for(let Et=0;Et{V[je]=null}),go(),y=V[b],y||(y=V[b]=ot[b](Et),y.c()),xe(y,1),y.m(h,null)),(!ce||Cn&1&&L!==(L="/records/"+Et[0].id))&&Z(U,"href",L),Et[1]?Qe&&(mo(),Be(Qe,1,1,()=>{Qe=null}),go()):Qe?(Qe.p(Et,Cn),Cn&2&&xe(Qe,1)):(Qe=Que(Et),Qe.c(),xe(Qe,1),Qe.m(G,we)),Et[2]?Bt&&(mo(),Be(Bt,1,1,()=>{Bt=null}),go()):Bt?(Bt.p(Et,Cn),Cn&4&&xe(Bt,1)):(Bt=Zue(Et),Bt.c(),xe(Bt,1),Bt.m(G,null)),Et[8].type==="files"&&Ct.p(Et,Cn),Cn&257){He=Et[8].fields.filter(zue);let mt;for(mt=0;mt{u[y]=null}),go(),s=u[t],s?s.p(h,b):(s=u[t]=l[t](h),s.c()),xe(s,1),s.m(e,null))},i(h){a||(xe(s),a=!0)},o(h){Be(s),a=!1},d(h){h&&ke(e),u[t].d()}}}const zue=o=>!(o.trashed||["tab"].includes(o.ui)||["id"].includes(o.name));function _Te(o,e,t){let s,a;const l=Ur("channel"),u=Fg();let{isFirst:d}=e,{isLast:h}=e,{toDelete:b=!1}=e,{record:y}=e,C,E,R=l.schemas.find(we=>we.name===y.schema);function $(we){we.preventDefault(),axios.get(l.lucentUrl+"/records/editInline/"+y.id).then(ve=>{t(0,y=ve.data),t(4,C=ve.data.record),t(5,E=ve.data.graph),t(6,s=!0)}).catch(ve=>{console.log(ve)})}function Q(we){we.preventDefault(),u("moveup")}function F(we){we.preventDefault(),u("movedn")}function U(we){we.preventDefault(),u("inlinesaved",we.detail),t(6,s=!1)}function K(we){we.preventDefault(),u("remove",y.id)}function L(we){we.preventDefault(),u("trash",y.id)}function te(we){we.preventDefault(),u("undoremove",y.id)}function ne(we){we.preventDefault(),t(6,s=!1)}W1(()=>{t(6,s=!1)});function oe(we){we.preventDefault(),axios.post(l.lucentUrl+"/records/status/trashed",[y]).then(ve=>{u("remove",y.id)}).catch(ve=>{console.log(ve)})}const G=we=>t(7,a=!a);return o.$$set=we=>{"isFirst"in we&&t(1,d=we.isFirst),"isLast"in we&&t(2,h=we.isLast),"toDelete"in we&&t(3,b=we.toDelete),"record"in we&&t(0,y=we.record)},t(6,s=!1),t(7,a=!1),[y,d,h,b,C,E,s,a,R,$,Q,F,U,K,L,te,ne,oe,G]}class STe extends uo{constructor(e){super(),co(this,e,_Te,wTe,lo,{isFirst:1,isLast:2,toDelete:3,record:0})}}function h1e(o,{from:e,to:t},s={}){const a=getComputedStyle(o),l=a.transform==="none"?"":a.transform,[u,d]=a.transformOrigin.split(" ").map(parseFloat),h=e.left+e.width*u/t.width-(t.left+u),b=e.top+e.height*d/t.height-(t.top+d),{delay:y=0,duration:C=R=>Math.sqrt(R)*120,easing:E=Ppe}=s;return{delay:y,duration:Ub(C)?C(Math.sqrt(h*h+b*b)):C,easing:E,css:(R,$)=>{const Q=$*h,F=$*b,U=R+$*e.width/t.width,K=R+$*e.height/t.height;return`transform: ${l} translate(${Q}px, ${F}px) scale(${U}, ${K});`}}}function Vue(o,e,t){const s=o.slice();return s[18]=e[t],s[19]=e,s[20]=t,s}function Wue(o){let e,t;return{c(){e=re("div"),t=Ht(o[3]),Z(e,"class","invalid-feedback d-block mb-3")},m(s,a){Te(s,e,a),X(e,t)},p(s,a){a&8&&Fn(t,s[3])},d(s){s&&ke(e)}}}function Uue(o){let e=[],t=new Map,s,a,l=o[2];const u=d=>d[18].id;for(let d=0;der(s,"record",E)),s.$on("inlinesaved",e[5]),s.$on("moveup",R),s.$on("movedn",$),s.$on("remove",e[6]),s.$on("undoremove",e[8]),s.$on("trash",e[7]),u=new eI({props:{field:e[1],recordId:e[18].id,schemas:e[4]}}),u.$on("insert",e[9]),u.$on("save",e[9]),{key:o,first:null,c(){t=re("div"),en(s.$$.fragment),l=Ze(),en(u.$$.fragment),d=Ze(),Z(t,"class","inline-card-wrapper"),this.first=t},m(F,U){Te(F,t,U),Kt(s,t,null),X(t,l),Kt(u,t,null),X(t,d),y=!0},p(F,U){e=F;const K={};U&4&&(K.isFirst=e[20]===0),U&4&&(K.isLast=e[20]+1===e[2].length),U&7&&(K.toDelete=e[0].edges.find(C)._isTrashed),!a&&U&4&&(a=!0,K.record=e[18],lr(()=>a=!1)),s.$set(K);const L={};U&2&&(L.field=e[1]),U&4&&(L.recordId=e[18].id),u.$set(L)},r(){h=t.getBoundingClientRect()},f(){Tpe(t),b()},a(){b(),b=xpe(t,h,h1e,{delay:250,duration:250,easing:Mpe})},i(F){y||(xe(s.$$.fragment,F),xe(u.$$.fragment,F),y=!0)},o(F){Be(s.$$.fragment,F),Be(u.$$.fragment,F),y=!1},d(F){F&&ke(t),Jt(s),Jt(u)}}}function CTe(o){let e,t,s,a,l,u,d=o[3]&&Wue(o);s=new eI({props:{field:o[1],recordId:null,schemas:o[4]}}),s.$on("insert",o[9]),s.$on("save",o[9]);let h=o[2].length>0&&Uue(o);return{c(){d&&d.c(),e=Ze(),t=re("div"),en(s.$$.fragment),a=Ze(),h&&h.c(),l=Rs(),Z(t,"class","inline-card-wrapper")},m(b,y){d&&d.m(b,y),Te(b,e,y),Te(b,t,y),Kt(s,t,null),Te(b,a,y),h&&h.m(b,y),Te(b,l,y),u=!0},p(b,[y]){b[3]?d?d.p(b,y):(d=Wue(b),d.c(),d.m(e.parentNode,e)):d&&(d.d(1),d=null);const C={};y&2&&(C.field=b[1]),s.$set(C),b[2].length>0?h?(h.p(b,y),y&4&&xe(h,1)):(h=Uue(b),h.c(),xe(h,1),h.m(l.parentNode,l)):h&&(mo(),Be(h,1,1,()=>{h=null}),go())},i(b){u||(xe(s.$$.fragment,b),xe(h),u=!0)},o(b){Be(s.$$.fragment,b),Be(h),u=!1},d(b){d&&d.d(b),b&&ke(e),b&&ke(t),Jt(s),b&&ke(a),h&&h.d(b),b&&ke(l)}}}function kTe(o,e,t){let s,a;const l=Ur("channel");let{field:u}=e,{record:d}=e,{graph:h}=e,{validationErrors:b}=e,y=l.schemas.filter(ne=>u.collections.includes(ne.name));function C(ne){const oe=ne.detail.records[0];t(0,h.edges=h.edges.map(G=>G.source===oe.id?oe:G),h)}function E(ne){ne.preventDefault(),t(0,h.edges=h.edges.filter(oe=>!(oe.target===ne.detail&&oe.field===u.name)),h)}function R(ne){ne.preventDefault(),t(0,h.edges=h.edges.map(oe=>(oe.target===ne.detail&&oe.field===u.name&&(oe._isTrashed=!0),oe)),h)}function $(ne){ne.preventDefault(),t(0,h.edges=h.edges.map(oe=>(oe.target===ne.detail&&oe.field===u.name&&delete oe._isTrashed,oe)),h)}function Q(ne){var Oe;ne.preventDefault();const oe=ne.detail.records,G=(Oe=ne.detail.after)!=null?Oe:null,we=ne.detail.action;let ve=oe.map(ce=>({target:ce.id,source:d.id,sourceSchema:d.schema,targetSchema:ce.schema,field:u.name,rank:""})),Re=h.edges;if(we==="replace"&&(Re=Re.filter(ce=>ce.field!==u.name)),t(0,h.records=Lc.exports.uniqBy([...h.records,...oe],ce=>ce.id),h),t(0,h.edges=Lc.exports.uniqBy([...Re,...ve],ce=>ce.target+ce.field),h),!G)t(0,h.edges=Lc.exports.uniqBy([...ve,...Re],ce=>ce.target+ce.field),h);else{let ce=!1,Xe=Re.reduce((tt,ot)=>(ce?tt.after.push(ot):tt.before.push(ot),ce===!1&&ot.target===G&&(ce=!0),tt),{before:[],after:[]});t(0,h.edges=Lc.exports.uniqBy([...Xe.before,...ve,...Xe.after],tt=>tt.target+tt.field),h)}}function F(ne,oe,G){t(0,h.edges=qD(oe,G,h.edges,u.name),h)}const U=(ne,oe)=>oe.field===u.name&&oe.target===ne.id;function K(ne,oe,G,we){G[we]=ne,t(2,a),t(0,h),t(1,u),t(11,d)}const L=(ne,oe)=>F(oe,ne,ne-1),te=(ne,oe)=>F(oe,ne,ne+1);return o.$$set=ne=>{"field"in ne&&t(1,u=ne.field),"record"in ne&&t(11,d=ne.record),"graph"in ne&&t(0,h=ne.graph),"validationErrors"in ne&&t(12,b=ne.validationErrors)},o.$$.update=()=>{var ne;o.$$.dirty&4098&&t(3,s=Lm(b,u.name)),o.$$.dirty&2051&&t(2,a=(ne=h.edges.filter(oe=>oe.field===u.name).map(oe=>h.records.find(G=>G.id==oe.target&&d.id==oe.source)).filter(oe=>!!(oe!=null&&oe.id)))!=null?ne:[])},[h,u,a,s,y,C,E,R,$,Q,F,d,b,U,K,L,te]}class xTe extends uo{constructor(e){super(),co(this,e,kTe,CTe,lo,{field:1,record:11,graph:0,validationErrors:12})}}function m1e(o,e,t=null){return t?o.reduce((s,a)=>(s.push(a),a.id===t&&s.push({meta:e,id:zle(),value:null}),s),[]):[{meta:e,id:zle(),value:null},...o]}function Xue(o,e,t){const s=o.slice();return s[7]=e[t],s}function jue(o){let e,t=o[1].fields,s=[];for(let a=0;at(2,s=!s),b=(y,C)=>d(C,y);return o.$$set=y=>{"blockId"in y&&t(0,a=y.blockId),"blockData"in y&&t(4,l=y.blockData),"blockSchema"in y&&t(1,u=y.blockSchema)},t(2,s=!1),[a,u,s,d,l,h,b]}class ATe extends uo{constructor(e){super(),co(this,e,ETe,TTe,lo,{blockId:0,blockData:4,blockSchema:1})}}function DTe(o){let e,t,s,a,l;return{c(){e=re("div"),t=re("input"),Z(t,"type","text"),Z(t,"id",s=o[0].id),Z(t,"class","form-control"),Z(t,"autocomplete","off"),Z(e,"class","mb-0")},m(u,d){Te(u,e,d),X(e,t),ar(t,o[0].value),a||(l=mn(t,"input",o[1]),a=!0)},p(u,[d]){d&1&&s!==(s=u[0].id)&&Z(t,"id",s),d&1&&t.value!==u[0].value&&ar(t,u[0].value)},i:un,o:un,d(u){u&&ke(e),a=!1,l()}}}function PTe(o,e,t){let{block:s}=e;function a(){s.value=this.value,t(0,s)}return o.$$set=l=>{"block"in l&&t(0,s=l.block)},[s,a]}class MTe extends uo{constructor(e){super(),co(this,e,PTe,DTe,lo,{block:0})}}function RTe(o){let e,t,s,a,l;return{c(){e=re("div"),t=re("textarea"),Z(t,"id",s=o[0].id),Z(t,"class","form-control svelte-1er4ovm"),Z(t,"autocomplete","off"),Z(e,"class","mb-0")},m(u,d){Te(u,e,d),X(e,t),ar(t,o[0].value),o[3](t),a||(l=[mn(t,"input",o[2]),mn(t,"input",g1e)],a=!0)},p(u,[d]){d&1&&s!==(s=u[0].id)&&Z(t,"id",s),d&1&&ar(t,u[0].value)},i:un,o:un,d(u){u&&ke(e),o[3](null),a=!1,vi(l)}}}function g1e(o){let e;o.target?e=o.target:e=o,e.style.overflow="hidden",e.style.height="1px",e.style.height=+e.scrollHeight+"px"}function $Te(o,e,t){let{block:s}=e,a;W1(()=>{g1e(a)});function l(){s.value=this.value,t(0,s)}function u(d){Ro[d?"unshift":"push"](()=>{a=d,t(1,a)})}return o.$$set=d=>{"block"in d&&t(0,s=d.block)},[s,a,l,u]}class NTe extends uo{constructor(e){super(),co(this,e,$Te,RTe,lo,{block:0})}}var p1e={exports:{}};(function(o){(function(){var e=function(n){if(n===null)return"null";if(n===void 0)return"undefined";var i=typeof n;return i==="object"&&(Array.prototype.isPrototypeOf(n)||n.constructor&&n.constructor.name==="Array")?"array":i==="object"&&(String.prototype.isPrototypeOf(n)||n.constructor&&n.constructor.name==="String")?"string":i},t=function(n){return["undefined","boolean","number","string","function","xml","null"].indexOf(n)!==-1},s=function(n,i){var c=Array.prototype.slice.call(n);return c.sort(i)},a=function(n,i){return l(function(c,m){return n.eq(i(c),i(m))})},l=function(n){return{eq:n}},u=l(function(n,i){return n===i}),d=u,h=function(n){return l(function(i,c){if(i.length!==c.length)return!1;for(var m=i.length,p=0;p{var m;return c(n,i.prototype)?!0:((m=n.constructor)===null||m===void 0?void 0:m.name)===i.name},$=n=>{const i=typeof n;return n===null?"null":i==="object"&&Array.isArray(n)?"array":i==="object"&&R(n,String,(c,m)=>m.isPrototypeOf(c))?"string":i},Q=n=>i=>$(i)===n,F=n=>i=>typeof i===n,U=n=>i=>n===i,K=(n,i)=>te(n)&&R(n,i,(c,m)=>E(c)===m),L=Q("string"),te=Q("object"),ne=n=>K(n,Object),oe=Q("array"),G=U(null),we=F("boolean"),ve=U(void 0),Re=n=>n==null,Oe=n=>!Re(n),ce=F("function"),Xe=F("number"),tt=(n,i)=>{if(oe(n)){for(let c=0,m=n.length;c{},V=(n,i)=>(...c)=>n(i.apply(null,c)),ut=(n,i)=>c=>n(i(c)),Qe=n=>()=>n,Bt=n=>n,Ct=(n,i)=>n===i;function He(n,...i){return(...c)=>{const m=i.concat(c);return n.apply(null,m)}}const st=n=>i=>!n(i),rn=n=>()=>{throw new Error(n)},Et=n=>n(),Cn=n=>{n()},je=Qe(!1),mt=Qe(!0);class he{constructor(i,c){this.tag=i,this.value=c}static some(i){return new he(!0,i)}static none(){return he.singletonNone}fold(i,c){return this.tag?c(this.value):i()}isSome(){return this.tag}isNone(){return!this.tag}map(i){return this.tag?he.some(i(this.value)):he.none()}bind(i){return this.tag?i(this.value):he.none()}exists(i){return this.tag&&i(this.value)}forall(i){return!this.tag||i(this.value)}filter(i){return!this.tag||i(this.value)?this:he.none()}getOr(i){return this.tag?this.value:i}or(i){return this.tag?this:i}getOrThunk(i){return this.tag?this.value:i()}orThunk(i){return this.tag?this:i()}getOrDie(i){if(this.tag)return this.value;throw new Error(i!=null?i:"Called getOrDie on None")}static from(i){return Oe(i)?he.some(i):he.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(i){this.tag&&i(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}he.singletonNone=new he(!1);const Zo=Array.prototype.slice,Kn=Array.prototype.indexOf,so=Array.prototype.push,Yo=(n,i)=>Kn.call(n,i),as=(n,i)=>{const c=Yo(n,i);return c===-1?he.none():he.some(c)},kt=(n,i)=>Yo(n,i)>-1,jt=(n,i)=>{for(let c=0,m=n.length;c{const c=n.length,m=new Array(c);for(let p=0;p{for(let c=0,m=n.length;c{for(let c=n.length-1;c>=0;c--){const m=n[c];i(m,c)}},bn=(n,i)=>{const c=[],m=[];for(let p=0,w=n.length;p{const c=[];for(let m=0,p=n.length;m(Gt(n,(m,p)=>{c=i(c,m,p)}),c),zn=(n,i,c)=>(Ne(n,(m,p)=>{c=i(c,m,p)}),c),ps=(n,i,c)=>{for(let m=0,p=n.length;mps(n,i,je),Ss=(n,i)=>{for(let c=0,m=n.length;c{const i=[];for(let c=0,m=n.length;cMr(pt(n,i)),tr=(n,i)=>{for(let c=0,m=n.length;c{const i=Zo.call(n,0);return i.reverse(),i},wa=(n,i)=>At(n,c=>!kt(i,c)),dr=(n,i)=>{const c={};for(let m=0,p=n.length;m{const c=Zo.call(n,0);return c.sort(i),c},qr=(n,i)=>i>=0&&iqr(n,0),Po=n=>qr(n,n.length-1),Rr=ce(Array.from)?Array.from:n=>Zo.call(n),Ls=(n,i)=>{for(let c=0;c{const c=[],m=ce(i)?p=>jt(c,w=>i(w,p)):p=>kt(c,p);for(let p=0,w=n.length;p{const c=bs(n);for(let m=0,p=c.length;mQi(n,(c,m)=>({k:m,v:i(c,m)})),Qi=(n,i)=>{const c={};return ln(n,(m,p)=>{const w=i(m,p);c[w.k]=w.v}),c},ze=n=>(i,c)=>{n[c]=i},et=(n,i,c,m)=>{ln(n,(p,w)=>{(i(p,w)?c:m)(p,w)})},Tt=(n,i)=>{const c={},m={};return et(n,i,ze(c),ze(m)),{t:c,f:m}},Wt=(n,i)=>{const c={};return et(n,i,ze(c),ot),c},Yn=(n,i)=>{const c=[];return ln(n,(m,p)=>{c.push(i(m,p))}),c},po=n=>Yn(n,Bt),wo=(n,i)=>fn(n,i)?he.from(n[i]):he.none(),fn=(n,i)=>_a.call(n,i),os=(n,i)=>fn(n,i)&&n[i]!==void 0&&n[i]!==null,xo=(n,i,c=C)=>y(c).eq(n,i),fs=n=>{const i={};return Ne(n,c=>{i[c]={}}),bs(i)},kr=n=>n.length!==void 0,Lr=Array.isArray,Vs=n=>{if(Lr(n))return n;{const i=[];for(let c=0,m=n.length;c{if(!n)return!1;if(c=c||n,kr(n)){for(let m=0,p=n.length;m{const c=[];return Yr(n,(m,p)=>{c.push(i(m,p,n))}),c},Qa=(n,i)=>{const c=[];return Yr(n,(m,p)=>{(!i||i(m,p,n))&&c.push(m)}),c},Oi=(n,i)=>{if(n){for(let c=0,m=n.length;c{let p=ve(c)?n[0]:c;for(let w=0;w{for(let m=0,p=n.length;mn[n.length-1],Ut=n=>{let i=!1,c;return(...m)=>(i||(i=!0,c=n.apply(null,m)),c)},bo=(n,i,c,m)=>{const p=n.isiOS()&&/ipad/i.test(c)===!0,w=n.isiOS()&&!p,x=n.isiOS()||n.isAndroid(),M=x||m("(pointer:coarse)"),B=p||!w&&x&&m("(min-device-width:768px)"),q=w||x&&!B,ae=i.isSafari()&&n.isiOS()&&/safari/i.test(c)===!1,fe=!q&&!B&&!ae;return{isiPad:Qe(p),isiPhone:Qe(w),isTablet:Qe(B),isPhone:Qe(q),isTouch:Qe(M),isAndroid:n.isAndroid,isiOS:n.isiOS,isWebView:Qe(ae),isDesktop:Qe(fe)}},Lo=(n,i)=>{for(let c=0;c{const c=Lo(n,i);if(!c)return{major:0,minor:0};const m=p=>Number(i.replace(c,"$"+p));return Xo(m(1),m(2))},ei=(n,i)=>{const c=String(i).toLowerCase();return n.length===0?lt():Go(n,c)},lt=()=>Xo(0,0),Xo=(n,i)=>({major:n,minor:i}),Ni={nu:Xo,detect:ei,unknown:lt},la=(n,i)=>Ls(i.brands,c=>{const m=c.brand.toLowerCase();return oo(n,p=>{var w;return m===((w=p.brand)===null||w===void 0?void 0:w.toLowerCase())}).map(p=>({current:p.name,version:Ni.nu(parseInt(c.version,10),0)}))}),ma=(n,i)=>{const c=String(i).toLowerCase();return oo(n,m=>m.search(c))},gr=(n,i)=>ma(n,i).map(c=>{const m=Ni.detect(c.versionRegexes,i);return{current:c.name,version:m}}),Fc=(n,i)=>ma(n,i).map(c=>{const m=Ni.detect(c.versionRegexes,i);return{current:c.name,version:m}}),Cc=(n,i)=>n.substring(i),nl=(n,i,c)=>i===""||n.length>=i.length&&n.substr(c,c+i.length)===i,ga=(n,i)=>Ar(n,i)?Cc(n,i.length):n,nr=(n,i,c=0,m)=>{const p=n.indexOf(i,c);return p!==-1?ve(m)?!0:p+i.length<=m:!1},Ar=(n,i)=>nl(n,i,0),Ki=(n,i)=>nl(n,i,n.length-i.length),gl=n=>i=>i.replace(n,""),kc=gl(/^\s+|\s+$/g),nu=gl(/^\s+/g),xu=gl(/\s+$/g),yr=n=>n.length>0,ol=n=>!yr(n),Tu=(n,i)=>i<=0?"":new Array(i+1).join(n),ou=(n,i=10)=>{const c=parseInt(n,i);return isNaN(c)?he.none():he.some(c)},Yl=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,Aa=n=>i=>nr(i,n),Dr=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:n=>nr(n,"edge/")&&nr(n,"chrome")&&nr(n,"safari")&&nr(n,"applewebkit")},{name:"Chromium",brand:"Chromium",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,Yl],search:n=>nr(n,"chrome")&&!nr(n,"chromeframe")},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:n=>nr(n,"msie")||nr(n,"trident")},{name:"Opera",versionRegexes:[Yl,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:Aa("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:Aa("firefox")},{name:"Safari",versionRegexes:[Yl,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:n=>(nr(n,"safari")||nr(n,"mobile/"))&&nr(n,"applewebkit")}],Qm=[{name:"Windows",search:Aa("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:n=>nr(n,"iphone")||nr(n,"ipad"),versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:Aa("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"macOS",search:Aa("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:Aa("linux"),versionRegexes:[]},{name:"Solaris",search:Aa("sunos"),versionRegexes:[]},{name:"FreeBSD",search:Aa("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:Aa("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],xf={browsers:Qe(Dr),oses:Qe(Qm)},xr="Edge",Za="Chromium",ca="IE",Ji="Opera",Eu="Firefox",Qc="Safari",Ha=()=>Zc({current:void 0,version:Ni.unknown()}),Zc=n=>{const i=n.current,c=n.version,m=p=>()=>i===p;return{current:i,version:c,isEdge:m(xr),isChromium:m(Za),isIE:m(ca),isOpera:m(Ji),isFirefox:m(Eu),isSafari:m(Qc)}},xc={unknown:Ha,nu:Zc,edge:Qe(xr),chromium:Qe(Za),ie:Qe(ca),opera:Qe(Ji),firefox:Qe(Eu),safari:Qe(Qc)},Cd="Windows",Yf="iOS",Au="Android",Xl="Linux",Hc="macOS",Tf="Solaris",su="FreeBSD",kd="ChromeOS",De=()=>nt({current:void 0,version:Ni.unknown()}),nt=n=>{const i=n.current,c=n.version,m=p=>()=>i===p;return{current:i,version:c,isWindows:m(Cd),isiOS:m(Yf),isAndroid:m(Au),isMacOS:m(Hc),isLinux:m(Xl),isSolaris:m(Tf),isFreeBSD:m(su),isChromeOS:m(kd)}},bt={unknown:De,nu:nt,windows:Qe(Cd),ios:Qe(Yf),android:Qe(Au),linux:Qe(Xl),macos:Qe(Hc),solaris:Qe(Tf),freebsd:Qe(su),chromeos:Qe(kd)},On={detect:(n,i,c)=>{const m=xf.browsers(),p=xf.oses(),w=i.bind(B=>la(m,B)).orThunk(()=>gr(m,n)).fold(xc.unknown,xc.nu),x=Fc(p,n).fold(bt.unknown,bt.nu),M=bo(x,w,n,c);return{browser:w,os:x,deviceType:M}}},Mo=n=>window.matchMedia(n).matches;let $r=Ut(()=>On.detect(navigator.userAgent,he.from(navigator.userAgentData),Mo));const ys=()=>$r(),ls=navigator.userAgent,Di=ys(),js=Di.browser,Hi=Di.os,Du=Di.deviceType,xd=ls.indexOf("Windows Phone")!==-1,qn={transparentSrc:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",documentMode:js.isIE()?document.documentMode||7:10,cacheSuffix:null,container:null,canHaveCSP:!js.isIE(),windowsPhone:xd,browser:{current:js.current,version:js.version,isChromium:js.isChromium,isEdge:js.isEdge,isFirefox:js.isFirefox,isIE:js.isIE,isOpera:js.isOpera,isSafari:js.isSafari},os:{current:Hi.current,version:Hi.version,isAndroid:Hi.isAndroid,isChromeOS:Hi.isChromeOS,isFreeBSD:Hi.isFreeBSD,isiOS:Hi.isiOS,isLinux:Hi.isLinux,isMacOS:Hi.isMacOS,isSolaris:Hi.isSolaris,isWindows:Hi.isWindows},deviceType:{isDesktop:Du.isDesktop,isiPad:Du.isiPad,isiPhone:Du.isiPhone,isPhone:Du.isPhone,isTablet:Du.isTablet,isTouch:Du.isTouch,isWebView:Du.isWebView}},Zm=/^\s*|\s*$/g,zi=n=>Re(n)?"":(""+n).replace(Zm,""),me=(n,i)=>i?i==="array"&&Lr(n)?!0:typeof n===i:n!==void 0,$e=(n,i,c={})=>{const m=L(n)?n.split(i||","):n||[];let p=m.length;for(;p--;)c[m[p]]={};return c},Ue=fn,It=(n,...i)=>{for(let c=0;ci.call(m,p,w,c)===!1?!1:(Bn(p,i,c,m),!0)))},gn={trim:zi,isArray:Lr,is:me,toArray:Vs,makeMap:$e,each:Yr,map:Zi,grep:Qa,inArray:Oi,hasOwn:Ue,extend:It,walk:Bn,resolve:(n,i=window)=>{const c=n.split(".");for(let m=0,p=c.length;moe(n)?n:n===""?[]:Zi(n.split(i||","),zi),_addCacheSuffix:n=>{const i=qn.cacheSuffix;return i&&(n+=(n.indexOf("?")===-1?"?":"&")+i),n}},Gr=(n,i,c=Ct)=>n.exists(m=>c(m,i)),Ll=(n,i,c=Ct)=>ri(n,i,c).getOr(n.isNone()&&i.isNone()),ea=n=>{const i=[],c=m=>{i.push(m)};for(let m=0;mn.isSome()&&i.isSome()?he.some(c(n.getOrDie(),i.getOrDie())):he.none(),Ef=(n,i,c,m)=>n.isSome()&&i.isSome()&&c.isSome()?he.some(m(n.getOrDie(),i.getOrDie(),c.getOrDie())):he.none(),ks=(n,i)=>n?he.some(i):he.none(),ru=typeof window<"u"?window:Function("return this;")(),Pi=(n,i)=>{let c=i!=null?i:ru;for(let m=0;m{const c=n.split(".");return Pi(c,i)},Ii=(n,i)=>uc(n,i),Xf=(n,i)=>{const c=Ii(n,i);if(c==null)throw new Error(n+" not available on this browser");return c},pa=Object.getPrototypeOf,jf=n=>Xf("HTMLElement",n),pr=n=>{const i=uc("ownerDocument.defaultView",n);return te(n)&&(jf(i).prototype.isPrototypeOf(n)||/^HTML\w*Element$/.test(pa(n).constructor.name))},Gu=8,Ku=9,Tc=11,qf=1,eh=3,ti=n=>n.dom.nodeName.toLowerCase(),ta=n=>n.dom.nodeType,za=n=>i=>ta(i)===n,Kb=n=>ta(n)===Gu||ti(n)==="#comment",Mi=n=>kl(n)&&pr(n.dom),kl=za(qf),sl=za(eh),Zg=za(Ku),Gf=za(Tc),Ec=n=>i=>kl(i)&&ti(i)===n,Af=(n,i,c)=>{if(L(c)||we(c)||Xe(c))n.setAttribute(i,c+"");else throw console.error("Invalid call to Attribute.set. Key ",i,":: Value ",c,":: Element ",n),new Error("Attribute value was not simple")},Pr=(n,i,c)=>{Af(n.dom,i,c)},Ju=(n,i)=>{const c=n.dom;ln(i,(m,p)=>{Af(c,p,m)})},Fl=(n,i)=>{const c=n.dom.getAttribute(i);return c===null?void 0:c},Va=(n,i)=>he.from(Fl(n,i)),qi=(n,i)=>{const c=n.dom;return c&&c.hasAttribute?c.hasAttribute(i):!1},Vi=(n,i)=>{n.dom.removeAttribute(i)},fc=n=>{const i=n.dom.attributes;return i==null||i.length===0},Kf=n=>zn(n.dom.attributes,(i,c)=>(i[c.name]=c.value,i),{}),th=(n,i)=>{const c=Fl(n,i);return c===void 0||c===""?[]:c.split(" ")},Hg=(n,i,c)=>{const p=th(n,i).concat([c]);return Pr(n,i,p.join(" ")),!0},Hm=(n,i,c)=>{const m=At(th(n,i),p=>p!==c);return m.length>0?Pr(n,i,m.join(" ")):Vi(n,i),!1},Ql=n=>n.dom.classList!==void 0,zm=n=>th(n,"class"),rl=(n,i)=>Hg(n,"class",i),Df=(n,i)=>Hm(n,"class",i),jh=(n,i)=>kt(zm(n),i)?Df(n,i):rl(n,i),ef=(n,i)=>{Ql(n)?n.dom.classList.add(i):rl(n,i)},qh=n=>{(Ql(n)?n.dom.classList:zm(n)).length===0&&Vi(n,"class")},zc=(n,i)=>{Ql(n)?n.dom.classList.remove(i):Df(n,i),qh(n)},Gh=(n,i)=>{const c=Ql(n)?n.dom.classList.toggle(i):jh(n,i);return qh(n),c},Pf=(n,i)=>Ql(n)&&n.dom.classList.contains(i),zp=(n,i)=>{const m=(i||document).createElement("div");if(m.innerHTML=n,!m.hasChildNodes()||m.childNodes.length>1){const p="HTML does not have a single root node";throw console.error(p,n),new Error(p)}return jl(m.childNodes[0])},Vm=(n,i)=>{const m=(i||document).createElement(n);return jl(m)},Jf=(n,i)=>{const m=(i||document).createTextNode(n);return jl(m)},jl=n=>{if(n==null)throw new Error("Node cannot be null or undefined");return{dom:n}},Ke={fromHtml:zp,fromTag:Vm,fromText:Jf,fromDom:jl,fromPoint:(n,i,c)=>he.from(n.dom.elementFromPoint(i,c)).map(jl)},nh=(n,i)=>{const c=[],m=w=>(c.push(w),i(w));let p=i(n);do p=p.bind(m);while(p.isSome());return c},Pu=(n,i)=>{const c=n.dom;if(c.nodeType!==qf)return!1;{const m=c;if(m.matches!==void 0)return m.matches(i);if(m.msMatchesSelector!==void 0)return m.msMatchesSelector(i);if(m.webkitMatchesSelector!==void 0)return m.webkitMatchesSelector(i);if(m.mozMatchesSelector!==void 0)return m.mozMatchesSelector(i);throw new Error("Browser lacks native selectors")}},Vg=n=>n.nodeType!==qf&&n.nodeType!==Ku&&n.nodeType!==Tc||n.childElementCount===0,U1=(n,i)=>{const c=i===void 0?document:i.dom;return Vg(c)?[]:pt(c.querySelectorAll(n),Ke.fromDom)},Kh=(n,i)=>{const c=i===void 0?document:i.dom;return Vg(c)?he.none():he.from(c.querySelector(n)).map(Ke.fromDom)},vt=(n,i)=>n.dom===i.dom,cn=(n,i)=>{const c=n.dom,m=i.dom;return c===m?!1:c.contains(m)},an=n=>Ke.fromDom(n.dom.ownerDocument),Eo=n=>Zg(n)?n:an(n),or=n=>Ke.fromDom(Eo(n).dom.documentElement),Xr=n=>Ke.fromDom(Eo(n).dom.defaultView),fi=n=>he.from(n.dom.parentNode).map(Ke.fromDom),wi=n=>he.from(n.dom.parentElement).map(Ke.fromDom),oh=(n,i)=>{const c=ce(i)?i:je;let m=n.dom;const p=[];for(;m.parentNode!==null&&m.parentNode!==void 0;){const w=m.parentNode,x=Ke.fromDom(w);if(p.push(x),c(x)===!0)break;m=w}return p},Jb=n=>{const i=c=>At(c,m=>!vt(n,m));return fi(n).map(Da).map(i).getOr([])},Sa=n=>he.from(n.dom.previousSibling).map(Ke.fromDom),Td=n=>he.from(n.dom.nextSibling).map(Ke.fromDom),Wg=n=>Xs(nh(n,Sa)),il=n=>nh(n,Td),Da=n=>pt(n.dom.childNodes,Ke.fromDom),tf=(n,i)=>{const c=n.dom.childNodes;return he.from(c[i]).map(Ke.fromDom)},ii=n=>tf(n,0),Mu=n=>tf(n,n.dom.childNodes.length-1),dc=n=>n.dom.childNodes.length,Jh=n=>n.dom.hasChildNodes(),Y1=n=>{const i=n.dom.head;if(i==null)throw new Error("Head is not available yet");return Ke.fromDom(i)},sh=n=>Gf(n)&&Oe(n.dom.host),Ug=ce(Element.prototype.attachShadow)&&ce(Node.prototype.getRootNode),rh=Qe(Ug),ql=Ug?n=>Ke.fromDom(n.dom.getRootNode()):Eo,em=n=>sh(n)?n:Y1(Eo(n)),X1=n=>sh(n)?n:Ke.fromDom(Eo(n).dom.body),Wm=n=>{const i=ql(n);return sh(i)?he.some(i):he.none()},Yg=n=>Ke.fromDom(n.dom.host),tm=n=>{if(rh()&&Oe(n.target)){const i=Ke.fromDom(n.target);if(kl(i)&&ih(i)&&n.composed&&n.composedPath){const c=n.composedPath();if(c)return $o(c)}}return he.from(n.target)},ih=n=>Oe(n.dom.shadowRoot),Ed=n=>{const i=sl(n)?n.dom.parentNode:n.dom;if(i==null||i.ownerDocument===null)return!1;const c=i.ownerDocument;return Wm(Ke.fromDom(i)).fold(()=>c.body.contains(i),ut(Ed,Yg))};var ai=(n,i,c,m,p)=>n(c,m)?he.some(c):ce(p)&&p(c)?he.none():i(c,m,p);const di=(n,i,c)=>{let m=n.dom;const p=ce(c)?c:je;for(;m.parentNode;){m=m.parentNode;const w=Ke.fromDom(m);if(i(w))return he.some(w);if(p(w))break}return he.none()},Zl=(n,i,c)=>ai((p,w)=>w(p),di,n,i,c),Vp=(n,i)=>{const c=n.dom;return c.parentNode?ee(Ke.fromDom(c.parentNode),m=>!vt(n,m)&&i(m)):he.none()},ee=(n,i)=>{const c=p=>i(Ke.fromDom(p));return oo(n.dom.childNodes,c).map(Ke.fromDom)},ue=(n,i)=>{const c=m=>{for(let p=0;pdi(n,m=>Pu(m,i),c),Je=(n,i)=>Kh(i,n),at=(n,i,c)=>ai((p,w)=>Pu(p,w),Se,n,i,c),Dn=n=>at(n,"[contenteditable]"),wn=(n,i=!1)=>Ed(n)?n.dom.isContentEditable:Dn(n).fold(Qe(i),c=>Ko(c)==="true"),Ko=n=>n.dom.contentEditable,ss=n=>n.style!==void 0&&ce(n.style.getPropertyValue),vo=(n,i,c)=>{if(!L(c))throw console.error("Invalid call to CSS.set. Property ",i,":: Value ",c,":: Element ",n),new Error("CSS value must be a string: "+c);ss(n)&&n.style.setProperty(i,c)},Tr=(n,i)=>{ss(n)&&n.style.removeProperty(i)},Gl=(n,i,c)=>{const m=n.dom;vo(m,i,c)},ua=(n,i)=>{const c=n.dom;ln(i,(m,p)=>{vo(c,p,m)})},Bi=(n,i)=>{const c=n.dom,p=window.getComputedStyle(c).getPropertyValue(i);return p===""&&!Ed(n)?Ru(c,i):p},Ru=(n,i)=>ss(n)?n.style.getPropertyValue(i):"",Pa=(n,i)=>{const c=n.dom,m=Ru(c,i);return he.from(m).filter(p=>p.length>0)},nm=n=>{const i={},c=n.dom;if(ss(c))for(let m=0;m{const c=n.dom;Tr(c,i),Gr(Va(n,"style").map(kc),"")&&Vi(n,"style")},Wi=n=>n.dom.offsetWidth,Ca=(n,i)=>{fi(n).each(m=>{m.dom.insertBefore(i.dom,n.dom)})},iu=(n,i)=>{Td(n).fold(()=>{fi(n).each(p=>{na(p,i)})},m=>{Ca(m,i)})},ah=(n,i)=>{ii(n).fold(()=>{na(n,i)},m=>{n.dom.insertBefore(i.dom,m.dom)})},na=(n,i)=>{n.dom.appendChild(i.dom)},e0=(n,i)=>{Ca(n,i),na(i,n)},Dv=(n,i)=>{Ne(i,(c,m)=>{const p=m===0?n:i[m-1];iu(p,c)})},ni=(n,i)=>{Ne(i,c=>{na(n,c)})},Ad=n=>{n.dom.textContent="",Ne(Da(n),i=>{wr(i)})},wr=n=>{const i=n.dom;i.parentNode!==null&&i.parentNode.removeChild(i)},Kl=n=>{const i=Da(n);i.length>0&&Dv(n,i),wr(n)},ed=(n,i)=>{const m=(i||document).createElement("div");return m.innerHTML=n,Da(Ke.fromDom(m))},lh=n=>pt(n,Ke.fromDom),Ae=n=>n.dom.innerHTML,Mf=(n,i)=>{const m=an(n).dom,p=Ke.fromDom(m.createDocumentFragment()),w=ed(i,m);ni(p,w),Ad(n),na(n,p)},Xg=n=>{const i=Ke.fromTag("div"),c=Ke.fromDom(n.dom.cloneNode(!0));return na(i,c),Ae(i)},$u=(n,i,c,m,p,w,x)=>({target:n,x:i,y:c,stop:m,prevent:p,kill:w,raw:x}),hi=n=>{const i=Ke.fromDom(tm(n).getOr(n.target)),c=()=>n.stopPropagation(),m=()=>n.preventDefault(),p=V(m,c);return $u(i,n.clientX,n.clientY,c,m,p,n)},Pv=(n,i)=>c=>{n(c)&&i(hi(c))},j1=(n,i,c,m,p)=>{const w=Pv(c,m);return n.dom.addEventListener(i,w,p),{unbind:He(td,n,i,w,p)}},t0=(n,i,c,m)=>j1(n,i,c,m,!1),td=(n,i,c,m)=>{n.dom.removeEventListener(i,c,m)},Ym=(n,i)=>({left:n,top:i,translate:(m,p)=>Ym(n+m,i+p)}),jg=Ym,Mv=n=>{const i=n.getBoundingClientRect();return jg(i.left,i.top)},Rf=(n,i)=>n!==void 0?n:i!==void 0?i:0,xy=n=>{const i=n.dom.ownerDocument,c=i.body,m=i.defaultView,p=i.documentElement;if(c===n.dom)return jg(c.offsetLeft,c.offsetTop);const w=Rf(m==null?void 0:m.pageYOffset,p.scrollTop),x=Rf(m==null?void 0:m.pageXOffset,p.scrollLeft),M=Rf(p.clientTop,c.clientTop),B=Rf(p.clientLeft,c.clientLeft);return Nu(n).translate(x-B,w-M)},Nu=n=>{const i=n.dom,m=i.ownerDocument.body;return m===i?jg(m.offsetLeft,m.offsetTop):Ed(n)?Mv(i):jg(0,0)},nf=n=>{const i=n!==void 0?n.dom:document,c=i.body.scrollLeft||i.documentElement.scrollLeft,m=i.body.scrollTop||i.documentElement.scrollTop;return jg(c,m)},n0=(n,i,c)=>{const p=(c!==void 0?c.dom:document).defaultView;p&&p.scrollTo(n,i)},o0=(n,i)=>{ys().browser.isSafari()&&ce(n.dom.scrollIntoViewIfNeeded)?n.dom.scrollIntoViewIfNeeded(!1):n.dom.scrollIntoView(i)},s0=n=>{const i=n===void 0?window:n;return ys().browser.isFirefox()?he.none():he.from(i.visualViewport)},q1=(n,i,c,m)=>({x:n,y:i,width:c,height:m,right:n+c,bottom:i+m}),nd=n=>{const i=n===void 0?window:n,c=i.document,m=nf(Ke.fromDom(c));return s0(i).fold(()=>{const p=i.document.documentElement,w=p.clientWidth,x=p.clientHeight;return q1(m.left,m.top,w,x)},p=>q1(Math.max(p.pageLeft,m.left),Math.max(p.pageTop,m.top),p.width,p.height))},r0=(n,i)=>At(Da(n),i),i0=(n,i)=>{let c=[];return Ne(Da(n),m=>{i(m)&&(c=c.concat([m])),c=c.concat(i0(m,i))}),c},pl=(n,i)=>U1(i,n),Ty=(n,i,c)=>Se(n,i,c).isSome();class _i{constructor(i,c){this.node=i,this.rootNode=c,this.current=this.current.bind(this),this.next=this.next.bind(this),this.prev=this.prev.bind(this),this.prev2=this.prev2.bind(this)}current(){return this.node}next(i){return this.node=this.findSibling(this.node,"firstChild","nextSibling",i),this.node}prev(i){return this.node=this.findSibling(this.node,"lastChild","previousSibling",i),this.node}prev2(i){return this.node=this.findPreviousNode(this.node,i),this.node}findSibling(i,c,m,p){if(i){if(!p&&i[c])return i[c];if(i!==this.rootNode){let w=i[m];if(w)return w;for(let x=i.parentNode;x&&x!==this.rootNode;x=x.parentNode)if(w=x[m],w)return w}}}findPreviousNode(i,c){if(i){const m=i.previousSibling;if(this.rootNode&&m===this.rootNode)return;if(m){if(!c){for(let w=m.lastChild;w;w=w.lastChild)if(!w.lastChild)return w}return m}const p=i.parentNode;if(p&&p!==this.rootNode)return p}}}const fo=n=>i=>!!i&&i.nodeType===n,Dd=n=>!!n&&!Object.getPrototypeOf(n),Jn=fo(1),Ac=n=>{const i=n.toLowerCase();return c=>Oe(c)&&c.nodeName.toLowerCase()===i},$f=n=>{const i=n.map(c=>c.toLowerCase());return c=>{if(c&&c.nodeName){const m=c.nodeName.toLowerCase();return kt(i,m)}return!1}},ch=(n,i)=>{const c=i.toLowerCase().split(" ");return m=>{if(Jn(m)){const p=m.ownerDocument.defaultView;if(p)for(let w=0;wi=>Jn(i)&&i.hasAttribute(n),qg=(n,i)=>c=>Jn(c)&&c.getAttribute(n)===i,Pd=n=>Jn(n)&&n.hasAttribute("data-mce-bogus"),bl=n=>Jn(n)&&n.getAttribute("data-mce-bogus")==="all",Iu=n=>Jn(n)&&n.tagName==="TABLE",Wp=n=>i=>!!(Jn(i)&&(i.contentEditable===n||i.getAttribute("data-mce-contenteditable")===n)),G1=$f(["textarea","input"]),_n=fo(3),Xm=fo(4),Md=fo(7),uh=fo(8),of=fo(9),K1=fo(11),mi=Ac("br"),Ui=Ac("img"),ba=Wp("true"),Es=Wp("false"),Rd=$f(["td","th"]),xl=$f(["td","th","caption"]),sf=$f(["video","audio","object","embed"]),Wa=Ac("li"),ka=Ac("details"),Up=Ac("summary"),nn="\uFEFF",Kr="\xA0",a0=n=>n===nn,xa=n=>n.replace(/\uFEFF/g,""),Gg=((n,i)=>{const c=w=>{if(!n(w))throw new Error("Can only get "+i+" value of a "+i+" node");return m(w).getOr("")},m=w=>n(w)?he.from(w.dom.nodeValue):he.none();return{get:c,getOption:m,set:(w,x)=>{if(!n(w))throw new Error("Can only set raw "+i+" value of a "+i+" node");w.dom.nodeValue=x}}})(sl,"text"),Wc=n=>Gg.get(n),od=n=>Gg.getOption(n),sd=(n,i)=>Gg.set(n,i),Yp=["article","aside","details","div","dt","figcaption","footer","form","fieldset","header","hgroup","html","main","nav","section","summary","body","p","dl","multicol","dd","figure","address","center","blockquote","h1","h2","h3","h4","h5","h6","listing","xmp","pre","plaintext","menu","dir","ul","ol","li","hr","table","tbody","thead","tfoot","th","tr","td","caption"],Hl=["td","th"],Er=["thead","tbody","tfoot"],Ya=["h1","h2","h3","h4","h5","h6","p","div","address","pre","form","blockquote","center","dir","fieldset","header","footer","article","section","hgroup","aside","nav","figure"],fh=["h1","h2","h3","h4","h5","h6"],Jl=["li","dd","dt"],l0=["ul","ol","dl"],jm=["pre","script","textarea","style"],J1=["pre"].concat(fh),Xa=n=>{let i;return c=>(i=i||dr(n,mt),fn(i,ti(c)))},hc=Xa(Yp),xt=n=>ti(n)==="table",Dc=n=>kl(n)&&!hc(n),au=n=>kl(n)&&ti(n)==="br",mc=Xa(Ya),Bu=Xa(l0),ja=Xa(Jl),qa=Xa(Er),qm=Xa(Hl),lu=Xa(jm),c0=Xa(J1),Ho=n=>c0(n)||Dc(n),z=n=>{const i=[];let c=n.dom;for(;c;)i.push(Ke.fromDom(c)),c=c.lastChild;return i},j=n=>{const i=pl(n,"br"),c=At(z(n).slice(-1),au);i.length===c.length&&Ne(c,wr)},ye=()=>{const n=Ke.fromTag("br");return Pr(n,"data-mce-bogus","1"),n},Pe=n=>{Ad(n),na(n,ye())},ct=n=>{Mu(n).each(i=>{Sa(i).each(c=>{hc(n)&&au(i)&&hc(c)&&wr(i)})})},Ft=nn,Sn=a0,In=xa,Uo=Jn,ts=_n,Si=n=>(ts(n)&&(n=n.parentNode),Uo(n)&&n.hasAttribute("data-mce-caret")),sr=n=>ts(n)&&Sn(n.data),_r=n=>Si(n)||sr(n),Uc=n=>n.firstChild!==n.lastChild||!mi(n.firstChild),cu=(n,i)=>{var c;const p=((c=n.ownerDocument)!==null&&c!==void 0?c:document).createTextNode(Ft),w=n.parentNode;if(i){const x=n.previousSibling;if(ts(x)){if(_r(x))return x;if(hr(x))return x.splitText(x.data.length-1)}w==null||w.insertBefore(p,n)}else{const x=n.nextSibling;if(ts(x)){if(_r(x))return x;if(hh(x))return x.splitText(1),x}n.nextSibling?w==null||w.insertBefore(p,n.nextSibling):w==null||w.appendChild(p)}return p},rf=n=>{const i=n.container();return _n(i)?i.data.charAt(n.offset())===Ft||n.isAtStart()&&sr(i.previousSibling):!1},Nf=n=>{const i=n.container();return _n(i)?i.data.charAt(n.offset()-1)===Ft||n.isAtEnd()&&sr(i.nextSibling):!1},dh=(n,i,c)=>{var m;const w=((m=i.ownerDocument)!==null&&m!==void 0?m:document).createElement(n);w.setAttribute("data-mce-caret",c?"before":"after"),w.setAttribute("data-mce-bogus","all"),w.appendChild(ye().dom);const x=i.parentNode;return c?x==null||x.insertBefore(w,i):i.nextSibling?x==null||x.insertBefore(w,i.nextSibling):x==null||x.appendChild(w),w},hh=n=>ts(n)&&n.data[0]===Ft,hr=n=>ts(n)&&n.data[n.data.length-1]===Ft,Gm=n=>{var i;const c=n.getElementsByTagName("br"),m=c[c.length-1];Pd(m)&&((i=m.parentNode)===null||i===void 0||i.removeChild(m))},Km=n=>n&&n.hasAttribute("data-mce-caret")?(Gm(n),n.removeAttribute("data-mce-caret"),n.removeAttribute("data-mce-bogus"),n.removeAttribute("style"),n.removeAttribute("data-mce-style"),n.removeAttribute("_moz_abspos"),n):null,oa=n=>Si(n.startContainer),uu=ba,Xp=Es,Jm=mi,Ps=_n,Fr=$f(["script","style","textarea"]),Ma=$f(["img","input","textarea","hr","iframe","video","audio","object","embed"]),gc=$f(["table"]),eb=_r,Tl=n=>eb(n)?!1:Ps(n)?!Fr(n.parentNode):Ma(n)||Jm(n)||gc(n)||fu(n),Gi=n=>Jn(n)&&n.getAttribute("unselectable")==="true",fu=n=>!Gi(n)&&Xp(n),If=(n,i)=>{for(let c=n.parentNode;c&&c!==i;c=c.parentNode){if(fu(c))return!1;if(uu(c))return!0}return!0},Jw=n=>fu(n)?!zn(Rr(n.getElementsByTagName("*")),(i,c)=>i||uu(c),!1):!1,om=n=>Ma(n)||Jw(n),Kg=(n,i)=>Tl(n)&&If(n,i),sm=/^[ \t\r\n]*$/,eg=n=>sm.test(n),Jg=n=>{for(const i of n)if(!a0(i))return!1;return!0},u0=n=>" \f \v".indexOf(n)!==-1,rm=n=>n===` + */function xue(o,e){var t=Object.keys(o);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(o);e&&(s=s.filter(function(a){return Object.getOwnPropertyDescriptor(o,a).enumerable})),t.push.apply(t,s)}return t}function Oy(o){for(var e=1;e=0)&&(t[a]=o[a]);return t}function $xe(o,e){if(o==null)return{};var t=Rxe(o,e),s,a;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(o);for(a=0;a=0)&&(!Object.prototype.propertyIsEnumerable.call(o,s)||(t[s]=o[s]))}return t}var Nxe="1.15.0";function Fw(o){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(o)}var jw=Fw(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),tI=Fw(/Edge/i),Tue=Fw(/firefox/i),i6=Fw(/safari/i)&&!Fw(/chrome/i)&&!Fw(/android/i),e1e=Fw(/iP(ad|od|hone)/i),t1e=Fw(/chrome/i)&&Fw(/android/i),n1e={capture:!1,passive:!1};function hl(o,e,t){o.addEventListener(e,t,!jw&&n1e)}function La(o,e,t){o.removeEventListener(e,t,!jw&&n1e)}function rz(o,e){if(!!e){if(e[0]===">"&&(e=e.substring(1)),o)try{if(o.matches)return o.matches(e);if(o.msMatchesSelector)return o.msMatchesSelector(e);if(o.webkitMatchesSelector)return o.webkitMatchesSelector(e)}catch{return!1}return!1}}function Ixe(o){return o.host&&o!==document&&o.host.nodeType?o.host:o.parentNode}function iy(o,e,t,s){if(o){t=t||document;do{if(e!=null&&(e[0]===">"?o.parentNode===t&&rz(o,e):rz(o,e))||s&&o===t)return o;if(o===t)break}while(o=Ixe(o))}return null}var Eue=/\s+/g;function $1(o,e,t){if(o&&e)if(o.classList)o.classList[t?"add":"remove"](e);else{var s=(" "+o.className+" ").replace(Eue," ").replace(" "+e+" "," ");o.className=(s+(t?" "+e:"")).replace(Eue," ")}}function Vr(o,e,t){var s=o&&o.style;if(s){if(t===void 0)return document.defaultView&&document.defaultView.getComputedStyle?t=document.defaultView.getComputedStyle(o,""):o.currentStyle&&(t=o.currentStyle),e===void 0?t:t[e];!(e in s)&&e.indexOf("webkit")===-1&&(e="-webkit-"+e),s[e]=t+(typeof t=="string"?"":"px")}}function OD(o,e){var t="";if(typeof o=="string")t=o;else do{var s=Vr(o,"transform");s&&s!=="none"&&(t=s+" "+t)}while(!e&&(o=o.parentNode));var a=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return a&&new a(t)}function o1e(o,e,t){if(o){var s=o.getElementsByTagName(e),a=0,l=s.length;if(t)for(;a=l:u=a<=l,!u)return s;if(s===hy())break;s=_C(s,!1)}return!1}function PD(o,e,t,s){for(var a=0,l=0,u=o.children;l2&&arguments[2]!==void 0?arguments[2]:{},a=s.evt,l=$xe(s,Vxe);nI.pluginEvent.bind(Wr)(e,t,Oy({dragEl:zo,parentEl:ju,ghostEl:Ai,rootEl:eu,nextEl:tE,lastDownEl:TH,cloneEl:Su,cloneHidden:yC,dragStarted:qN,putSortable:Vh,activeSortable:Wr.active,originalEvent:a,oldIndex:hD,oldDraggableIndex:l6,newIndex:I1,newDraggableIndex:bC,hideGhostForTarget:u1e,unhideGhostForTarget:f1e,cloneNowHidden:function(){yC=!0},cloneNowShown:function(){yC=!1},dispatchSortableEvent:function(d){Rg({sortable:t,name:d,originalEvent:a})}},l))};function Rg(o){zxe(Oy({putSortable:Vh,cloneEl:Su,targetEl:zo,rootEl:eu,oldIndex:hD,oldDraggableIndex:l6,newIndex:I1,newDraggableIndex:bC},o))}var zo,ju,Ai,eu,tE,TH,Su,yC,hD,I1,l6,bC,IZ,Vh,iD=!1,iz=!1,az=[],qT,wv,wne,_ne,Pue,Mue,qN,tD,c6,u6=!1,BZ=!1,EH,Rm,Sne=[],Boe=!1,lz=[],tV=typeof document<"u",LZ=e1e,Rue=tI||jw?"cssFloat":"float",Wxe=tV&&!t1e&&!e1e&&"draggable"in document.createElement("div"),a1e=function(){if(!!tV){if(jw)return!1;var o=document.createElement("x");return o.style.cssText="pointer-events:auto",o.style.pointerEvents==="auto"}}(),l1e=function(e,t){var s=Vr(e),a=parseInt(s.width)-parseInt(s.paddingLeft)-parseInt(s.paddingRight)-parseInt(s.borderLeftWidth)-parseInt(s.borderRightWidth),l=PD(e,0,t),u=PD(e,1,t),d=l&&Vr(l),h=u&&Vr(u),b=d&&parseInt(d.marginLeft)+parseInt(d.marginRight)+yd(l).width,y=h&&parseInt(h.marginLeft)+parseInt(h.marginRight)+yd(u).width;if(s.display==="flex")return s.flexDirection==="column"||s.flexDirection==="column-reverse"?"vertical":"horizontal";if(s.display==="grid")return s.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(l&&d.float&&d.float!=="none"){var C=d.float==="left"?"left":"right";return u&&(h.clear==="both"||h.clear===C)?"vertical":"horizontal"}return l&&(d.display==="block"||d.display==="flex"||d.display==="table"||d.display==="grid"||b>=a&&s[Rue]==="none"||u&&s[Rue]==="none"&&b+y>a)?"vertical":"horizontal"},Uxe=function(e,t,s){var a=s?e.left:e.top,l=s?e.right:e.bottom,u=s?e.width:e.height,d=s?t.left:t.top,h=s?t.right:t.bottom,b=s?t.width:t.height;return a===d||l===h||a+u/2===d+b/2},Yxe=function(e,t){var s;return az.some(function(a){var l=a[F1].options.emptyInsertThreshold;if(!(!l||lre(a))){var u=yd(a),d=e>=u.left-l&&e<=u.right+l,h=t>=u.top-l&&t<=u.bottom+l;if(d&&h)return s=a}}),s},c1e=function(e){function t(l,u){return function(d,h,b,y){var C=d.options.group.name&&h.options.group.name&&d.options.group.name===h.options.group.name;if(l==null&&(u||C))return!0;if(l==null||l===!1)return!1;if(u&&l==="clone")return l;if(typeof l=="function")return t(l(d,h,b,y),u)(d,h,b,y);var E=(u?d:h).options.group.name;return l===!0||typeof l=="string"&&l===E||l.join&&l.indexOf(E)>-1}}var s={},a=e.group;(!a||xH(a)!="object")&&(a={name:a}),s.name=a.name,s.checkPull=t(a.pull,!0),s.checkPut=t(a.put),s.revertClone=a.revertClone,e.group=s},u1e=function(){!a1e&&Ai&&Vr(Ai,"display","none")},f1e=function(){!a1e&&Ai&&Vr(Ai,"display","")};tV&&!t1e&&document.addEventListener("click",function(o){if(iz)return o.preventDefault(),o.stopPropagation&&o.stopPropagation(),o.stopImmediatePropagation&&o.stopImmediatePropagation(),iz=!1,!1},!0);var GT=function(e){if(zo){e=e.touches?e.touches[0]:e;var t=Yxe(e.clientX,e.clientY);if(t){var s={};for(var a in e)e.hasOwnProperty(a)&&(s[a]=e[a]);s.target=s.rootEl=t,s.preventDefault=void 0,s.stopPropagation=void 0,t[F1]._onDragOver(s)}}},Xxe=function(e){zo&&zo.parentNode[F1]._isOutsideThisEl(e.target)};function Wr(o,e){if(!(o&&o.nodeType&&o.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(o));this.el=o,this.options=e=zw({},e),o[F1]=this;var t={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(o.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return l1e(o,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(u,d){u.setData("Text",d.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:Wr.supportPointer!==!1&&"PointerEvent"in window&&!i6,emptyInsertThreshold:5};nI.initializePlugins(this,o,t);for(var s in t)!(s in e)&&(e[s]=t[s]);c1e(e);for(var a in this)a.charAt(0)==="_"&&typeof this[a]=="function"&&(this[a]=this[a].bind(this));this.nativeDraggable=e.forceFallback?!1:Wxe,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?hl(o,"pointerdown",this._onTapStart):(hl(o,"mousedown",this._onTapStart),hl(o,"touchstart",this._onTapStart)),this.nativeDraggable&&(hl(o,"dragover",this),hl(o,"dragenter",this)),az.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),zw(this,Qxe())}Wr.prototype={constructor:Wr,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(tD=null)},_getDirection:function(e,t){return typeof this.options.direction=="function"?this.options.direction.call(this,e,t,zo):this.options.direction},_onTapStart:function(e){if(!!e.cancelable){var t=this,s=this.el,a=this.options,l=a.preventOnFilter,u=e.type,d=e.touches&&e.touches[0]||e.pointerType&&e.pointerType==="touch"&&e,h=(d||e).target,b=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||h,y=a.filter;if(nTe(s),!zo&&!(/mousedown|pointerdown/.test(u)&&e.button!==0||a.disabled)&&!b.isContentEditable&&!(!this.nativeDraggable&&i6&&h&&h.tagName.toUpperCase()==="SELECT")&&(h=iy(h,a.draggable,s,!1),!(h&&h.animated)&&TH!==h)){if(hD=Lb(h),l6=Lb(h,a.draggable),typeof y=="function"){if(y.call(this,e,h,this)){Rg({sortable:t,rootEl:b,name:"filter",targetEl:h,toEl:s,fromEl:s}),Rp("filter",t,{evt:e}),l&&e.cancelable&&e.preventDefault();return}}else if(y&&(y=y.split(",").some(function(C){if(C=iy(b,C.trim(),s,!1),C)return Rg({sortable:t,rootEl:C,name:"filter",targetEl:h,fromEl:s,toEl:s}),Rp("filter",t,{evt:e}),!0}),y)){l&&e.cancelable&&e.preventDefault();return}a.handle&&!iy(b,a.handle,s,!1)||this._prepareDragStart(e,d,h)}}},_prepareDragStart:function(e,t,s){var a=this,l=a.el,u=a.options,d=l.ownerDocument,h;if(s&&!zo&&s.parentNode===l){var b=yd(s);if(eu=l,zo=s,ju=zo.parentNode,tE=zo.nextSibling,TH=s,IZ=u.group,Wr.dragged=zo,qT={target:zo,clientX:(t||e).clientX,clientY:(t||e).clientY},Pue=qT.clientX-b.left,Mue=qT.clientY-b.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,zo.style["will-change"]="all",h=function(){if(Rp("delayEnded",a,{evt:e}),Wr.eventCanceled){a._onDrop();return}a._disableDelayedDragEvents(),!Tue&&a.nativeDraggable&&(zo.draggable=!0),a._triggerDragStart(e,t),Rg({sortable:a,name:"choose",originalEvent:e}),$1(zo,u.chosenClass,!0)},u.ignore.split(",").forEach(function(y){o1e(zo,y.trim(),Cne)}),hl(d,"dragover",GT),hl(d,"mousemove",GT),hl(d,"touchmove",GT),hl(d,"mouseup",a._onDrop),hl(d,"touchend",a._onDrop),hl(d,"touchcancel",a._onDrop),Tue&&this.nativeDraggable&&(this.options.touchStartThreshold=4,zo.draggable=!0),Rp("delayStart",this,{evt:e}),u.delay&&(!u.delayOnTouchOnly||t)&&(!this.nativeDraggable||!(tI||jw))){if(Wr.eventCanceled){this._onDrop();return}hl(d,"mouseup",a._disableDelayedDrag),hl(d,"touchend",a._disableDelayedDrag),hl(d,"touchcancel",a._disableDelayedDrag),hl(d,"mousemove",a._delayedDragTouchMoveHandler),hl(d,"touchmove",a._delayedDragTouchMoveHandler),u.supportPointer&&hl(d,"pointermove",a._delayedDragTouchMoveHandler),a._dragStartTimer=setTimeout(h,u.delay)}else h()}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){zo&&Cne(zo),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;La(e,"mouseup",this._disableDelayedDrag),La(e,"touchend",this._disableDelayedDrag),La(e,"touchcancel",this._disableDelayedDrag),La(e,"mousemove",this._delayedDragTouchMoveHandler),La(e,"touchmove",this._delayedDragTouchMoveHandler),La(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||e.pointerType=="touch"&&e,!this.nativeDraggable||t?this.options.supportPointer?hl(document,"pointermove",this._onTouchMove):t?hl(document,"touchmove",this._onTouchMove):hl(document,"mousemove",this._onTouchMove):(hl(zo,"dragend",this),hl(eu,"dragstart",this._onDragStart));try{document.selection?AH(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(e,t){if(iD=!1,eu&&zo){Rp("dragStarted",this,{evt:t}),this.nativeDraggable&&hl(document,"dragover",Xxe);var s=this.options;!e&&$1(zo,s.dragClass,!1),$1(zo,s.ghostClass,!0),Wr.active=this,e&&this._appendGhost(),Rg({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(wv){this._lastX=wv.clientX,this._lastY=wv.clientY,u1e();for(var e=document.elementFromPoint(wv.clientX,wv.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(wv.clientX,wv.clientY),e!==t);)t=e;if(zo.parentNode[F1]._isOutsideThisEl(e),t)do{if(t[F1]){var s=void 0;if(s=t[F1]._onDragOver({clientX:wv.clientX,clientY:wv.clientY,target:e,rootEl:t}),s&&!this.options.dragoverBubble)break}e=t}while(t=t.parentNode);f1e()}},_onTouchMove:function(e){if(qT){var t=this.options,s=t.fallbackTolerance,a=t.fallbackOffset,l=e.touches?e.touches[0]:e,u=Ai&&OD(Ai,!0),d=Ai&&u&&u.a,h=Ai&&u&&u.d,b=LZ&&Rm&&Due(Rm),y=(l.clientX-qT.clientX+a.x)/(d||1)+(b?b[0]-Sne[0]:0)/(d||1),C=(l.clientY-qT.clientY+a.y)/(h||1)+(b?b[1]-Sne[1]:0)/(h||1);if(!Wr.active&&!iD){if(s&&Math.max(Math.abs(l.clientX-this._lastX),Math.abs(l.clientY-this._lastY))=0&&(Rg({rootEl:ju,name:"add",toEl:ju,fromEl:eu,originalEvent:e}),Rg({sortable:this,name:"remove",toEl:ju,originalEvent:e}),Rg({rootEl:ju,name:"sort",toEl:ju,fromEl:eu,originalEvent:e}),Rg({sortable:this,name:"sort",toEl:ju,originalEvent:e})),Vh&&Vh.save()):I1!==hD&&I1>=0&&(Rg({sortable:this,name:"update",toEl:ju,originalEvent:e}),Rg({sortable:this,name:"sort",toEl:ju,originalEvent:e})),Wr.active&&((I1==null||I1===-1)&&(I1=hD,bC=l6),Rg({sortable:this,name:"end",toEl:ju,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){Rp("nulling",this),eu=zo=ju=Ai=tE=Su=TH=yC=qT=wv=qN=I1=bC=hD=l6=tD=c6=Vh=IZ=Wr.dragged=Wr.ghost=Wr.clone=Wr.active=null,lz.forEach(function(e){e.checked=!0}),lz.length=wne=_ne=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":zo&&(this._onDragOver(e),jxe(e));break;case"selectstart":e.preventDefault();break}},toArray:function(){for(var e=[],t,s=this.el.children,a=0,l=s.length,u=this.options;as.right+a||o.clientX<=s.right&&o.clientY>s.bottom&&o.clientX>=s.left:o.clientX>s.right&&o.clientY>s.top||o.clientX<=s.right&&o.clientY>s.bottom+a}function Jxe(o,e,t,s,a,l,u,d){var h=s?o.clientY:o.clientX,b=s?t.height:t.width,y=s?t.top:t.left,C=s?t.bottom:t.right,E=!1;if(!u){if(d&&EHy+b*l/2:hC-EH)return-c6}else if(h>y+b*(1-a)/2&&hC-b*l/2)?h>y+b/2?1:-1:0}function eTe(o){return Lb(zo){u[y]=null}),go(),t=u[e],t?t.p(h,b):(t=u[e]=l[e](h),t.c()),xe(t,1),t.m(s.parentNode,s))},i(h){a||(xe(t),a=!0)},o(h){Be(t),a=!1},d(h){u[e].d(h),h&&ke(s)}}}function aTe(o,e,t){let{$$slots:s={},$$scope:a}=e,{sortableClass:l=""}=e,{isTable:u=!1}=e,{sortableInstance:d}=e;const h=Fg();let b;W1(()=>{let E={animation:150,easing:"cubic-bezier(1, 0, 0, 1)",onUpdate(R){h("update",{source:R.oldIndex,target:R.newIndex})},onMove(R){}};t(3,d=Wr.create(b,E))});function y(E){Ro[E?"unshift":"push"](()=>{b=E,t(2,b)})}function C(E){Ro[E?"unshift":"push"](()=>{b=E,t(2,b)})}return o.$$set=E=>{"sortableClass"in E&&t(0,l=E.sortableClass),"isTable"in E&&t(1,u=E.isTable),"sortableInstance"in E&&t(3,d=E.sortableInstance),"$$scope"in E&&t(4,a=E.$$scope)},[l,u,b,d,a,s,y,C]}class oI extends uo{constructor(e){super(),co(this,e,aTe,iTe,lo,{sortableClass:0,isTable:1,sortableInstance:3})}}function Nue(o,e,t){const s=o.slice();return s[11]=e[t],s}function Iue(o){let e,t;return{c(){e=re("div"),t=Ht(o[1]),Z(e,"class","invalid-feedback d-block mb-3")},m(s,a){Te(s,e,a),X(e,t)},p(s,a){a&2&&Fn(t,s[1])},d(s){s&&ke(e)}}}function Bue(o){let e,t;return e=new oI({props:{sortableClass:"row row-cols-3 mt-3",$$slots:{default:[lTe]},$$scope:{ctx:o}}}),e.$on("update",o[4]),{c(){en(e.$$.fragment)},m(s,a){Kt(e,s,a),t=!0},p(s,a){const l={};a&16385&&(l.$$scope={dirty:a,ctx:s}),e.$set(l)},i(s){t||(xe(e.$$.fragment,s),t=!0)},o(s){Be(e.$$.fragment,s),t=!1},d(s){Jt(e,s)}}}function Lue(o,e){let t,s,a,l;return s=new J6({props:{classes:"h-100",record:e[11],hasDelete:!0}}),s.$on("remove",e[3]),{key:o,first:null,c(){t=re("div"),en(s.$$.fragment),a=Ze(),Z(t,"class","col mb-3"),this.first=t},m(u,d){Te(u,t,d),Kt(s,t,null),X(t,a),l=!0},p(u,d){e=u;const h={};d&1&&(h.record=e[11]),s.$set(h)},i(u){l||(xe(s.$$.fragment,u),l=!0)},o(u){Be(s.$$.fragment,u),l=!1},d(u){u&&ke(t),Jt(s)}}}function lTe(o){let e=[],t=new Map,s,a,l=o[0];const u=d=>d[11].id;for(let d=0;d0&&Bue(o);return{c(){d&&d.c(),e=Ze(),t=re("div"),en(s.$$.fragment),a=Ze(),h&&h.c(),l=Rs(),Z(t,"class","inline-card-wrapper")},m(b,y){d&&d.m(b,y),Te(b,e,y),Te(b,t,y),Kt(s,t,null),Te(b,a,y),h&&h.m(b,y),Te(b,l,y),u=!0},p(b,[y]){b[1]?d?d.p(b,y):(d=Iue(b),d.c(),d.m(e.parentNode,e)):d&&(d.d(1),d=null),b[0].length>0?h?(h.p(b,y),y&1&&xe(h,1)):(h=Bue(b),h.c(),xe(h,1),h.m(l.parentNode,l)):h&&(mo(),Be(h,1,1,()=>{h=null}),go())},i(b){u||(xe(s.$$.fragment,b),xe(h),u=!0)},o(b){Be(s.$$.fragment,b),Be(h),u=!1},d(b){d&&d.d(b),b&&ke(e),b&&ke(t),Jt(s),b&&ke(a),h&&h.d(b),b&&ke(l)}}}function uTe(o,e,t){let s,a;const l=Ur("channel");let{record:u}=e,{field:d}=e,{graph:h}=e,{validationErrors:b}=e,y=l.schemas.filter($=>d.collections.includes($.name));function C($){$.preventDefault(),t(6,h.edges=h.edges.filter(Q=>!(Q.target===$.detail&&Q.field===d.name)),h)}function E($){t(6,h.edges=qD($.detail.source,$.detail.target,h.edges,d.name,a),h)}function R($){$.preventDefault(),t(6,h=K6(h,u,$.detail.records,d.name,$.detail.action))}return o.$$set=$=>{"record"in $&&t(7,u=$.record),"field"in $&&t(8,d=$.field),"graph"in $&&t(6,h=$.graph),"validationErrors"in $&&t(9,b=$.validationErrors)},o.$$.update=()=>{var $;o.$$.dirty&768&&t(1,s=Lm(b,d.name)),o.$$.dirty&448&&t(0,a=($=h.edges.filter(Q=>Q.field===d.name).map(Q=>h.records.find(F=>F.id===Q.target&&u.id===Q.source)).filter(Q=>!!(Q!=null&&Q.id)))!=null?$:[])},[a,s,y,C,E,R,h,u,d,b]}class fTe extends uo{constructor(e){super(),co(this,e,uTe,cTe,lo,{record:7,field:8,graph:6,validationErrors:9})}}function Fue(o,e,t){const s=o.slice();return s[21]=e[t],s}function dTe(o){let e,t,s,a,l,u,d,h,b,y,C,E,R,$,Q,F,U,K,L,te,ne,oe,G,we,ve,Re,Oe,ce,Xe,tt;u=new Fa({props:{icon:"pencil",width:12,height:12}});const ot=[pTe,gTe],V=[];function ut(Et,Cn){return Et[7]?0:1}b=ut(o),y=V[b]=ot[b](o),$=new Fa({props:{icon:"ellipsis"}});let Qe=!o[1]&&Que(o),Bt=!o[2]&&Zue(o),Ct=o[8].type==="files"&&bTe(o),He=o[8].fields.filter(zue),st=[];for(let Et=0;EtBe(st[Et],1,1,()=>{st[Et]=null});return{c(){e=re("div"),t=re("div"),s=re("small"),s.textContent=`${o[8].label}`,a=Ze(),l=re("button"),en(u.$$.fragment),d=Ze(),h=re("button"),y.c(),C=Ze(),E=re("div"),R=re("button"),en($.$$.fragment),Q=Ze(),F=re("div"),U=re("a"),K=Ht("Edit in new tab"),te=Ze(),ne=re("button"),ne.textContent="Remove",oe=Ze(),G=re("div"),Qe&&Qe.c(),we=Ze(),Bt&&Bt.c(),ve=Ze(),Re=re("div"),Ct&&Ct.c(),Oe=Ze();for(let Et=0;Et{V[je]=null}),go(),y=V[b],y||(y=V[b]=ot[b](Et),y.c()),xe(y,1),y.m(h,null)),(!ce||Cn&1&&L!==(L="/records/"+Et[0].id))&&Z(U,"href",L),Et[1]?Qe&&(mo(),Be(Qe,1,1,()=>{Qe=null}),go()):Qe?(Qe.p(Et,Cn),Cn&2&&xe(Qe,1)):(Qe=Que(Et),Qe.c(),xe(Qe,1),Qe.m(G,we)),Et[2]?Bt&&(mo(),Be(Bt,1,1,()=>{Bt=null}),go()):Bt?(Bt.p(Et,Cn),Cn&4&&xe(Bt,1)):(Bt=Zue(Et),Bt.c(),xe(Bt,1),Bt.m(G,null)),Et[8].type==="files"&&Ct.p(Et,Cn),Cn&257){He=Et[8].fields.filter(zue);let mt;for(mt=0;mt{u[y]=null}),go(),s=u[t],s?s.p(h,b):(s=u[t]=l[t](h),s.c()),xe(s,1),s.m(e,null))},i(h){a||(xe(s),a=!0)},o(h){Be(s),a=!1},d(h){h&&ke(e),u[t].d()}}}const zue=o=>!(o.trashed||["tab"].includes(o.ui)||["id"].includes(o.name));function _Te(o,e,t){let s,a;const l=Ur("channel"),u=Fg();let{isFirst:d}=e,{isLast:h}=e,{toDelete:b=!1}=e,{record:y}=e,C,E,R=l.schemas.find(we=>we.name===y.schema);function $(we){we.preventDefault(),axios.get(l.lucentUrl+"/records/editInline/"+y.id).then(ve=>{t(0,y=ve.data),t(4,C=ve.data.record),t(5,E=ve.data.graph),t(6,s=!0)}).catch(ve=>{console.log(ve)})}function Q(we){we.preventDefault(),u("moveup")}function F(we){we.preventDefault(),u("movedn")}function U(we){we.preventDefault(),u("inlinesaved",we.detail),t(6,s=!1)}function K(we){we.preventDefault(),u("remove",y.id)}function L(we){we.preventDefault(),u("trash",y.id)}function te(we){we.preventDefault(),u("undoremove",y.id)}function ne(we){we.preventDefault(),t(6,s=!1)}W1(()=>{t(6,s=!1)});function oe(we){we.preventDefault(),axios.post(l.lucentUrl+"/records/status/trashed",[y]).then(ve=>{u("remove",y.id)}).catch(ve=>{console.log(ve)})}const G=we=>t(7,a=!a);return o.$$set=we=>{"isFirst"in we&&t(1,d=we.isFirst),"isLast"in we&&t(2,h=we.isLast),"toDelete"in we&&t(3,b=we.toDelete),"record"in we&&t(0,y=we.record)},t(6,s=!1),t(7,a=!1),[y,d,h,b,C,E,s,a,R,$,Q,F,U,K,L,te,ne,oe,G]}class STe extends uo{constructor(e){super(),co(this,e,_Te,wTe,lo,{isFirst:1,isLast:2,toDelete:3,record:0})}}function h1e(o,{from:e,to:t},s={}){const a=getComputedStyle(o),l=a.transform==="none"?"":a.transform,[u,d]=a.transformOrigin.split(" ").map(parseFloat),h=e.left+e.width*u/t.width-(t.left+u),b=e.top+e.height*d/t.height-(t.top+d),{delay:y=0,duration:C=R=>Math.sqrt(R)*120,easing:E=Ppe}=s;return{delay:y,duration:Ub(C)?C(Math.sqrt(h*h+b*b)):C,easing:E,css:(R,$)=>{const Q=$*h,F=$*b,U=R+$*e.width/t.width,K=R+$*e.height/t.height;return`transform: ${l} translate(${Q}px, ${F}px) scale(${U}, ${K});`}}}function Vue(o,e,t){const s=o.slice();return s[18]=e[t],s[19]=e,s[20]=t,s}function Wue(o){let e,t;return{c(){e=re("div"),t=Ht(o[3]),Z(e,"class","invalid-feedback d-block mb-3")},m(s,a){Te(s,e,a),X(e,t)},p(s,a){a&8&&Fn(t,s[3])},d(s){s&&ke(e)}}}function Uue(o){let e=[],t=new Map,s,a,l=o[2];const u=d=>d[18].id;for(let d=0;der(s,"record",E)),s.$on("inlinesaved",e[5]),s.$on("moveup",R),s.$on("movedn",$),s.$on("remove",e[6]),s.$on("undoremove",e[8]),s.$on("trash",e[7]),u=new eI({props:{field:e[1],recordId:e[18].id,schemas:e[4]}}),u.$on("insert",e[9]),u.$on("save",e[9]),{key:o,first:null,c(){t=re("div"),en(s.$$.fragment),l=Ze(),en(u.$$.fragment),d=Ze(),Z(t,"class","inline-card-wrapper"),this.first=t},m(F,U){Te(F,t,U),Kt(s,t,null),X(t,l),Kt(u,t,null),X(t,d),y=!0},p(F,U){e=F;const K={};U&4&&(K.isFirst=e[20]===0),U&4&&(K.isLast=e[20]+1===e[2].length),U&7&&(K.toDelete=e[0].edges.find(C)._isTrashed),!a&&U&4&&(a=!0,K.record=e[18],lr(()=>a=!1)),s.$set(K);const L={};U&2&&(L.field=e[1]),U&4&&(L.recordId=e[18].id),u.$set(L)},r(){h=t.getBoundingClientRect()},f(){Tpe(t),b()},a(){b(),b=xpe(t,h,h1e,{delay:250,duration:250,easing:Mpe})},i(F){y||(xe(s.$$.fragment,F),xe(u.$$.fragment,F),y=!0)},o(F){Be(s.$$.fragment,F),Be(u.$$.fragment,F),y=!1},d(F){F&&ke(t),Jt(s),Jt(u)}}}function CTe(o){let e,t,s,a,l,u,d=o[3]&&Wue(o);s=new eI({props:{field:o[1],recordId:null,schemas:o[4]}}),s.$on("insert",o[9]),s.$on("save",o[9]);let h=o[2].length>0&&Uue(o);return{c(){d&&d.c(),e=Ze(),t=re("div"),en(s.$$.fragment),a=Ze(),h&&h.c(),l=Rs(),Z(t,"class","inline-card-wrapper")},m(b,y){d&&d.m(b,y),Te(b,e,y),Te(b,t,y),Kt(s,t,null),Te(b,a,y),h&&h.m(b,y),Te(b,l,y),u=!0},p(b,[y]){b[3]?d?d.p(b,y):(d=Wue(b),d.c(),d.m(e.parentNode,e)):d&&(d.d(1),d=null);const C={};y&2&&(C.field=b[1]),s.$set(C),b[2].length>0?h?(h.p(b,y),y&4&&xe(h,1)):(h=Uue(b),h.c(),xe(h,1),h.m(l.parentNode,l)):h&&(mo(),Be(h,1,1,()=>{h=null}),go())},i(b){u||(xe(s.$$.fragment,b),xe(h),u=!0)},o(b){Be(s.$$.fragment,b),Be(h),u=!1},d(b){d&&d.d(b),b&&ke(e),b&&ke(t),Jt(s),b&&ke(a),h&&h.d(b),b&&ke(l)}}}function kTe(o,e,t){let s,a;const l=Ur("channel");let{field:u}=e,{record:d}=e,{graph:h}=e,{validationErrors:b}=e,y=l.schemas.filter(ne=>u.collections.includes(ne.name));function C(ne){const oe=ne.detail.records[0];t(0,h.edges=h.edges.map(G=>G.source===oe.id?oe:G),h)}function E(ne){ne.preventDefault(),t(0,h.edges=h.edges.filter(oe=>!(oe.target===ne.detail&&oe.field===u.name)),h)}function R(ne){ne.preventDefault(),t(0,h.edges=h.edges.map(oe=>(oe.target===ne.detail&&oe.field===u.name&&(oe._isTrashed=!0),oe)),h)}function $(ne){ne.preventDefault(),t(0,h.edges=h.edges.map(oe=>(oe.target===ne.detail&&oe.field===u.name&&delete oe._isTrashed,oe)),h)}function Q(ne){var Oe;ne.preventDefault();const oe=ne.detail.records,G=(Oe=ne.detail.after)!=null?Oe:null,we=ne.detail.action;let ve=oe.map(ce=>({target:ce.id,source:d.id,sourceSchema:d.schema,targetSchema:ce.schema,field:u.name,rank:""})),Re=h.edges;if(we==="replace"&&(Re=Re.filter(ce=>ce.field!==u.name)),t(0,h.records=Lc.exports.uniqBy([...h.records,...oe],ce=>ce.id),h),t(0,h.edges=Lc.exports.uniqBy([...Re,...ve],ce=>ce.target+ce.field),h),!G)t(0,h.edges=Lc.exports.uniqBy([...ve,...Re],ce=>ce.target+ce.field),h);else{let ce=!1,Xe=Re.reduce((tt,ot)=>(ce?tt.after.push(ot):tt.before.push(ot),ce===!1&&ot.target===G&&(ce=!0),tt),{before:[],after:[]});t(0,h.edges=Lc.exports.uniqBy([...Xe.before,...ve,...Xe.after],tt=>tt.target+tt.field),h)}}function F(ne,oe,G){t(0,h.edges=qD(oe,G,h.edges,u.name,a),h)}const U=(ne,oe)=>oe.field===u.name&&oe.target===ne.id;function K(ne,oe,G,we){G[we]=ne,t(2,a),t(0,h),t(1,u),t(11,d)}const L=(ne,oe)=>F(oe,ne,ne-1),te=(ne,oe)=>F(oe,ne,ne+1);return o.$$set=ne=>{"field"in ne&&t(1,u=ne.field),"record"in ne&&t(11,d=ne.record),"graph"in ne&&t(0,h=ne.graph),"validationErrors"in ne&&t(12,b=ne.validationErrors)},o.$$.update=()=>{var ne;o.$$.dirty&4098&&t(3,s=Lm(b,u.name)),o.$$.dirty&2051&&t(2,a=(ne=h.edges.filter(oe=>oe.field===u.name).map(oe=>h.records.find(G=>G.id==oe.target&&d.id==oe.source)).filter(oe=>!!(oe!=null&&oe.id)))!=null?ne:[])},[h,u,a,s,y,C,E,R,$,Q,F,d,b,U,K,L,te]}class xTe extends uo{constructor(e){super(),co(this,e,kTe,CTe,lo,{field:1,record:11,graph:0,validationErrors:12})}}function m1e(o,e,t=null){return t?o.reduce((s,a)=>(s.push(a),a.id===t&&s.push({meta:e,id:zle(),value:null}),s),[]):[{meta:e,id:zle(),value:null},...o]}function Xue(o,e,t){const s=o.slice();return s[7]=e[t],s}function jue(o){let e,t=o[1].fields,s=[];for(let a=0;at(2,s=!s),b=(y,C)=>d(C,y);return o.$$set=y=>{"blockId"in y&&t(0,a=y.blockId),"blockData"in y&&t(4,l=y.blockData),"blockSchema"in y&&t(1,u=y.blockSchema)},t(2,s=!1),[a,u,s,d,l,h,b]}class ATe extends uo{constructor(e){super(),co(this,e,ETe,TTe,lo,{blockId:0,blockData:4,blockSchema:1})}}function DTe(o){let e,t,s,a,l;return{c(){e=re("div"),t=re("input"),Z(t,"type","text"),Z(t,"id",s=o[0].id),Z(t,"class","form-control"),Z(t,"autocomplete","off"),Z(e,"class","mb-0")},m(u,d){Te(u,e,d),X(e,t),ar(t,o[0].value),a||(l=mn(t,"input",o[1]),a=!0)},p(u,[d]){d&1&&s!==(s=u[0].id)&&Z(t,"id",s),d&1&&t.value!==u[0].value&&ar(t,u[0].value)},i:un,o:un,d(u){u&&ke(e),a=!1,l()}}}function PTe(o,e,t){let{block:s}=e;function a(){s.value=this.value,t(0,s)}return o.$$set=l=>{"block"in l&&t(0,s=l.block)},[s,a]}class MTe extends uo{constructor(e){super(),co(this,e,PTe,DTe,lo,{block:0})}}function RTe(o){let e,t,s,a,l;return{c(){e=re("div"),t=re("textarea"),Z(t,"id",s=o[0].id),Z(t,"class","form-control svelte-1er4ovm"),Z(t,"autocomplete","off"),Z(e,"class","mb-0")},m(u,d){Te(u,e,d),X(e,t),ar(t,o[0].value),o[3](t),a||(l=[mn(t,"input",o[2]),mn(t,"input",g1e)],a=!0)},p(u,[d]){d&1&&s!==(s=u[0].id)&&Z(t,"id",s),d&1&&ar(t,u[0].value)},i:un,o:un,d(u){u&&ke(e),o[3](null),a=!1,vi(l)}}}function g1e(o){let e;o.target?e=o.target:e=o,e.style.overflow="hidden",e.style.height="1px",e.style.height=+e.scrollHeight+"px"}function $Te(o,e,t){let{block:s}=e,a;W1(()=>{g1e(a)});function l(){s.value=this.value,t(0,s)}function u(d){Ro[d?"unshift":"push"](()=>{a=d,t(1,a)})}return o.$$set=d=>{"block"in d&&t(0,s=d.block)},[s,a,l,u]}class NTe extends uo{constructor(e){super(),co(this,e,$Te,RTe,lo,{block:0})}}var p1e={exports:{}};(function(o){(function(){var e=function(n){if(n===null)return"null";if(n===void 0)return"undefined";var i=typeof n;return i==="object"&&(Array.prototype.isPrototypeOf(n)||n.constructor&&n.constructor.name==="Array")?"array":i==="object"&&(String.prototype.isPrototypeOf(n)||n.constructor&&n.constructor.name==="String")?"string":i},t=function(n){return["undefined","boolean","number","string","function","xml","null"].indexOf(n)!==-1},s=function(n,i){var c=Array.prototype.slice.call(n);return c.sort(i)},a=function(n,i){return l(function(c,m){return n.eq(i(c),i(m))})},l=function(n){return{eq:n}},u=l(function(n,i){return n===i}),d=u,h=function(n){return l(function(i,c){if(i.length!==c.length)return!1;for(var m=i.length,p=0;p{var m;return c(n,i.prototype)?!0:((m=n.constructor)===null||m===void 0?void 0:m.name)===i.name},$=n=>{const i=typeof n;return n===null?"null":i==="object"&&Array.isArray(n)?"array":i==="object"&&R(n,String,(c,m)=>m.isPrototypeOf(c))?"string":i},Q=n=>i=>$(i)===n,F=n=>i=>typeof i===n,U=n=>i=>n===i,K=(n,i)=>te(n)&&R(n,i,(c,m)=>E(c)===m),L=Q("string"),te=Q("object"),ne=n=>K(n,Object),oe=Q("array"),G=U(null),we=F("boolean"),ve=U(void 0),Re=n=>n==null,Oe=n=>!Re(n),ce=F("function"),Xe=F("number"),tt=(n,i)=>{if(oe(n)){for(let c=0,m=n.length;c{},V=(n,i)=>(...c)=>n(i.apply(null,c)),ut=(n,i)=>c=>n(i(c)),Qe=n=>()=>n,Bt=n=>n,Ct=(n,i)=>n===i;function He(n,...i){return(...c)=>{const m=i.concat(c);return n.apply(null,m)}}const st=n=>i=>!n(i),rn=n=>()=>{throw new Error(n)},Et=n=>n(),Cn=n=>{n()},je=Qe(!1),mt=Qe(!0);class he{constructor(i,c){this.tag=i,this.value=c}static some(i){return new he(!0,i)}static none(){return he.singletonNone}fold(i,c){return this.tag?c(this.value):i()}isSome(){return this.tag}isNone(){return!this.tag}map(i){return this.tag?he.some(i(this.value)):he.none()}bind(i){return this.tag?i(this.value):he.none()}exists(i){return this.tag&&i(this.value)}forall(i){return!this.tag||i(this.value)}filter(i){return!this.tag||i(this.value)?this:he.none()}getOr(i){return this.tag?this.value:i}or(i){return this.tag?this:i}getOrThunk(i){return this.tag?this.value:i()}orThunk(i){return this.tag?this:i()}getOrDie(i){if(this.tag)return this.value;throw new Error(i!=null?i:"Called getOrDie on None")}static from(i){return Oe(i)?he.some(i):he.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(i){this.tag&&i(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}he.singletonNone=new he(!1);const Zo=Array.prototype.slice,Kn=Array.prototype.indexOf,so=Array.prototype.push,Yo=(n,i)=>Kn.call(n,i),as=(n,i)=>{const c=Yo(n,i);return c===-1?he.none():he.some(c)},kt=(n,i)=>Yo(n,i)>-1,jt=(n,i)=>{for(let c=0,m=n.length;c{const c=n.length,m=new Array(c);for(let p=0;p{for(let c=0,m=n.length;c{for(let c=n.length-1;c>=0;c--){const m=n[c];i(m,c)}},bn=(n,i)=>{const c=[],m=[];for(let p=0,w=n.length;p{const c=[];for(let m=0,p=n.length;m(Gt(n,(m,p)=>{c=i(c,m,p)}),c),zn=(n,i,c)=>(Ne(n,(m,p)=>{c=i(c,m,p)}),c),ps=(n,i,c)=>{for(let m=0,p=n.length;mps(n,i,je),Ss=(n,i)=>{for(let c=0,m=n.length;c{const i=[];for(let c=0,m=n.length;cMr(pt(n,i)),tr=(n,i)=>{for(let c=0,m=n.length;c{const i=Zo.call(n,0);return i.reverse(),i},wa=(n,i)=>At(n,c=>!kt(i,c)),dr=(n,i)=>{const c={};for(let m=0,p=n.length;m{const c=Zo.call(n,0);return c.sort(i),c},qr=(n,i)=>i>=0&&iqr(n,0),Po=n=>qr(n,n.length-1),Rr=ce(Array.from)?Array.from:n=>Zo.call(n),Ls=(n,i)=>{for(let c=0;c{const c=[],m=ce(i)?p=>jt(c,w=>i(w,p)):p=>kt(c,p);for(let p=0,w=n.length;p{const c=bs(n);for(let m=0,p=c.length;mQi(n,(c,m)=>({k:m,v:i(c,m)})),Qi=(n,i)=>{const c={};return ln(n,(m,p)=>{const w=i(m,p);c[w.k]=w.v}),c},ze=n=>(i,c)=>{n[c]=i},et=(n,i,c,m)=>{ln(n,(p,w)=>{(i(p,w)?c:m)(p,w)})},Tt=(n,i)=>{const c={},m={};return et(n,i,ze(c),ze(m)),{t:c,f:m}},Wt=(n,i)=>{const c={};return et(n,i,ze(c),ot),c},Yn=(n,i)=>{const c=[];return ln(n,(m,p)=>{c.push(i(m,p))}),c},po=n=>Yn(n,Bt),wo=(n,i)=>fn(n,i)?he.from(n[i]):he.none(),fn=(n,i)=>_a.call(n,i),os=(n,i)=>fn(n,i)&&n[i]!==void 0&&n[i]!==null,xo=(n,i,c=C)=>y(c).eq(n,i),fs=n=>{const i={};return Ne(n,c=>{i[c]={}}),bs(i)},kr=n=>n.length!==void 0,Lr=Array.isArray,Vs=n=>{if(Lr(n))return n;{const i=[];for(let c=0,m=n.length;c{if(!n)return!1;if(c=c||n,kr(n)){for(let m=0,p=n.length;m{const c=[];return Yr(n,(m,p)=>{c.push(i(m,p,n))}),c},Qa=(n,i)=>{const c=[];return Yr(n,(m,p)=>{(!i||i(m,p,n))&&c.push(m)}),c},Oi=(n,i)=>{if(n){for(let c=0,m=n.length;c{let p=ve(c)?n[0]:c;for(let w=0;w{for(let m=0,p=n.length;mn[n.length-1],Ut=n=>{let i=!1,c;return(...m)=>(i||(i=!0,c=n.apply(null,m)),c)},bo=(n,i,c,m)=>{const p=n.isiOS()&&/ipad/i.test(c)===!0,w=n.isiOS()&&!p,x=n.isiOS()||n.isAndroid(),M=x||m("(pointer:coarse)"),B=p||!w&&x&&m("(min-device-width:768px)"),q=w||x&&!B,ae=i.isSafari()&&n.isiOS()&&/safari/i.test(c)===!1,fe=!q&&!B&&!ae;return{isiPad:Qe(p),isiPhone:Qe(w),isTablet:Qe(B),isPhone:Qe(q),isTouch:Qe(M),isAndroid:n.isAndroid,isiOS:n.isiOS,isWebView:Qe(ae),isDesktop:Qe(fe)}},Lo=(n,i)=>{for(let c=0;c{const c=Lo(n,i);if(!c)return{major:0,minor:0};const m=p=>Number(i.replace(c,"$"+p));return Xo(m(1),m(2))},ei=(n,i)=>{const c=String(i).toLowerCase();return n.length===0?lt():Go(n,c)},lt=()=>Xo(0,0),Xo=(n,i)=>({major:n,minor:i}),Ni={nu:Xo,detect:ei,unknown:lt},la=(n,i)=>Ls(i.brands,c=>{const m=c.brand.toLowerCase();return oo(n,p=>{var w;return m===((w=p.brand)===null||w===void 0?void 0:w.toLowerCase())}).map(p=>({current:p.name,version:Ni.nu(parseInt(c.version,10),0)}))}),ma=(n,i)=>{const c=String(i).toLowerCase();return oo(n,m=>m.search(c))},gr=(n,i)=>ma(n,i).map(c=>{const m=Ni.detect(c.versionRegexes,i);return{current:c.name,version:m}}),Fc=(n,i)=>ma(n,i).map(c=>{const m=Ni.detect(c.versionRegexes,i);return{current:c.name,version:m}}),Cc=(n,i)=>n.substring(i),nl=(n,i,c)=>i===""||n.length>=i.length&&n.substr(c,c+i.length)===i,ga=(n,i)=>Ar(n,i)?Cc(n,i.length):n,nr=(n,i,c=0,m)=>{const p=n.indexOf(i,c);return p!==-1?ve(m)?!0:p+i.length<=m:!1},Ar=(n,i)=>nl(n,i,0),Ki=(n,i)=>nl(n,i,n.length-i.length),gl=n=>i=>i.replace(n,""),kc=gl(/^\s+|\s+$/g),nu=gl(/^\s+/g),xu=gl(/\s+$/g),yr=n=>n.length>0,ol=n=>!yr(n),Tu=(n,i)=>i<=0?"":new Array(i+1).join(n),ou=(n,i=10)=>{const c=parseInt(n,i);return isNaN(c)?he.none():he.some(c)},Yl=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,Aa=n=>i=>nr(i,n),Dr=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:n=>nr(n,"edge/")&&nr(n,"chrome")&&nr(n,"safari")&&nr(n,"applewebkit")},{name:"Chromium",brand:"Chromium",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,Yl],search:n=>nr(n,"chrome")&&!nr(n,"chromeframe")},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:n=>nr(n,"msie")||nr(n,"trident")},{name:"Opera",versionRegexes:[Yl,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:Aa("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:Aa("firefox")},{name:"Safari",versionRegexes:[Yl,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:n=>(nr(n,"safari")||nr(n,"mobile/"))&&nr(n,"applewebkit")}],Qm=[{name:"Windows",search:Aa("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:n=>nr(n,"iphone")||nr(n,"ipad"),versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:Aa("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"macOS",search:Aa("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:Aa("linux"),versionRegexes:[]},{name:"Solaris",search:Aa("sunos"),versionRegexes:[]},{name:"FreeBSD",search:Aa("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:Aa("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],xf={browsers:Qe(Dr),oses:Qe(Qm)},xr="Edge",Za="Chromium",ca="IE",Ji="Opera",Eu="Firefox",Qc="Safari",Ha=()=>Zc({current:void 0,version:Ni.unknown()}),Zc=n=>{const i=n.current,c=n.version,m=p=>()=>i===p;return{current:i,version:c,isEdge:m(xr),isChromium:m(Za),isIE:m(ca),isOpera:m(Ji),isFirefox:m(Eu),isSafari:m(Qc)}},xc={unknown:Ha,nu:Zc,edge:Qe(xr),chromium:Qe(Za),ie:Qe(ca),opera:Qe(Ji),firefox:Qe(Eu),safari:Qe(Qc)},Cd="Windows",Yf="iOS",Au="Android",Xl="Linux",Hc="macOS",Tf="Solaris",su="FreeBSD",kd="ChromeOS",De=()=>nt({current:void 0,version:Ni.unknown()}),nt=n=>{const i=n.current,c=n.version,m=p=>()=>i===p;return{current:i,version:c,isWindows:m(Cd),isiOS:m(Yf),isAndroid:m(Au),isMacOS:m(Hc),isLinux:m(Xl),isSolaris:m(Tf),isFreeBSD:m(su),isChromeOS:m(kd)}},bt={unknown:De,nu:nt,windows:Qe(Cd),ios:Qe(Yf),android:Qe(Au),linux:Qe(Xl),macos:Qe(Hc),solaris:Qe(Tf),freebsd:Qe(su),chromeos:Qe(kd)},On={detect:(n,i,c)=>{const m=xf.browsers(),p=xf.oses(),w=i.bind(B=>la(m,B)).orThunk(()=>gr(m,n)).fold(xc.unknown,xc.nu),x=Fc(p,n).fold(bt.unknown,bt.nu),M=bo(x,w,n,c);return{browser:w,os:x,deviceType:M}}},Mo=n=>window.matchMedia(n).matches;let $r=Ut(()=>On.detect(navigator.userAgent,he.from(navigator.userAgentData),Mo));const ys=()=>$r(),ls=navigator.userAgent,Di=ys(),js=Di.browser,Hi=Di.os,Du=Di.deviceType,xd=ls.indexOf("Windows Phone")!==-1,qn={transparentSrc:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",documentMode:js.isIE()?document.documentMode||7:10,cacheSuffix:null,container:null,canHaveCSP:!js.isIE(),windowsPhone:xd,browser:{current:js.current,version:js.version,isChromium:js.isChromium,isEdge:js.isEdge,isFirefox:js.isFirefox,isIE:js.isIE,isOpera:js.isOpera,isSafari:js.isSafari},os:{current:Hi.current,version:Hi.version,isAndroid:Hi.isAndroid,isChromeOS:Hi.isChromeOS,isFreeBSD:Hi.isFreeBSD,isiOS:Hi.isiOS,isLinux:Hi.isLinux,isMacOS:Hi.isMacOS,isSolaris:Hi.isSolaris,isWindows:Hi.isWindows},deviceType:{isDesktop:Du.isDesktop,isiPad:Du.isiPad,isiPhone:Du.isiPhone,isPhone:Du.isPhone,isTablet:Du.isTablet,isTouch:Du.isTouch,isWebView:Du.isWebView}},Zm=/^\s*|\s*$/g,zi=n=>Re(n)?"":(""+n).replace(Zm,""),me=(n,i)=>i?i==="array"&&Lr(n)?!0:typeof n===i:n!==void 0,$e=(n,i,c={})=>{const m=L(n)?n.split(i||","):n||[];let p=m.length;for(;p--;)c[m[p]]={};return c},Ue=fn,It=(n,...i)=>{for(let c=0;ci.call(m,p,w,c)===!1?!1:(Bn(p,i,c,m),!0)))},gn={trim:zi,isArray:Lr,is:me,toArray:Vs,makeMap:$e,each:Yr,map:Zi,grep:Qa,inArray:Oi,hasOwn:Ue,extend:It,walk:Bn,resolve:(n,i=window)=>{const c=n.split(".");for(let m=0,p=c.length;moe(n)?n:n===""?[]:Zi(n.split(i||","),zi),_addCacheSuffix:n=>{const i=qn.cacheSuffix;return i&&(n+=(n.indexOf("?")===-1?"?":"&")+i),n}},Gr=(n,i,c=Ct)=>n.exists(m=>c(m,i)),Ll=(n,i,c=Ct)=>ri(n,i,c).getOr(n.isNone()&&i.isNone()),ea=n=>{const i=[],c=m=>{i.push(m)};for(let m=0;mn.isSome()&&i.isSome()?he.some(c(n.getOrDie(),i.getOrDie())):he.none(),Ef=(n,i,c,m)=>n.isSome()&&i.isSome()&&c.isSome()?he.some(m(n.getOrDie(),i.getOrDie(),c.getOrDie())):he.none(),ks=(n,i)=>n?he.some(i):he.none(),ru=typeof window<"u"?window:Function("return this;")(),Pi=(n,i)=>{let c=i!=null?i:ru;for(let m=0;m{const c=n.split(".");return Pi(c,i)},Ii=(n,i)=>uc(n,i),Xf=(n,i)=>{const c=Ii(n,i);if(c==null)throw new Error(n+" not available on this browser");return c},pa=Object.getPrototypeOf,jf=n=>Xf("HTMLElement",n),pr=n=>{const i=uc("ownerDocument.defaultView",n);return te(n)&&(jf(i).prototype.isPrototypeOf(n)||/^HTML\w*Element$/.test(pa(n).constructor.name))},Gu=8,Ku=9,Tc=11,qf=1,eh=3,ti=n=>n.dom.nodeName.toLowerCase(),ta=n=>n.dom.nodeType,za=n=>i=>ta(i)===n,Kb=n=>ta(n)===Gu||ti(n)==="#comment",Mi=n=>kl(n)&&pr(n.dom),kl=za(qf),sl=za(eh),Zg=za(Ku),Gf=za(Tc),Ec=n=>i=>kl(i)&&ti(i)===n,Af=(n,i,c)=>{if(L(c)||we(c)||Xe(c))n.setAttribute(i,c+"");else throw console.error("Invalid call to Attribute.set. Key ",i,":: Value ",c,":: Element ",n),new Error("Attribute value was not simple")},Pr=(n,i,c)=>{Af(n.dom,i,c)},Ju=(n,i)=>{const c=n.dom;ln(i,(m,p)=>{Af(c,p,m)})},Fl=(n,i)=>{const c=n.dom.getAttribute(i);return c===null?void 0:c},Va=(n,i)=>he.from(Fl(n,i)),qi=(n,i)=>{const c=n.dom;return c&&c.hasAttribute?c.hasAttribute(i):!1},Vi=(n,i)=>{n.dom.removeAttribute(i)},fc=n=>{const i=n.dom.attributes;return i==null||i.length===0},Kf=n=>zn(n.dom.attributes,(i,c)=>(i[c.name]=c.value,i),{}),th=(n,i)=>{const c=Fl(n,i);return c===void 0||c===""?[]:c.split(" ")},Hg=(n,i,c)=>{const p=th(n,i).concat([c]);return Pr(n,i,p.join(" ")),!0},Hm=(n,i,c)=>{const m=At(th(n,i),p=>p!==c);return m.length>0?Pr(n,i,m.join(" ")):Vi(n,i),!1},Ql=n=>n.dom.classList!==void 0,zm=n=>th(n,"class"),rl=(n,i)=>Hg(n,"class",i),Df=(n,i)=>Hm(n,"class",i),jh=(n,i)=>kt(zm(n),i)?Df(n,i):rl(n,i),ef=(n,i)=>{Ql(n)?n.dom.classList.add(i):rl(n,i)},qh=n=>{(Ql(n)?n.dom.classList:zm(n)).length===0&&Vi(n,"class")},zc=(n,i)=>{Ql(n)?n.dom.classList.remove(i):Df(n,i),qh(n)},Gh=(n,i)=>{const c=Ql(n)?n.dom.classList.toggle(i):jh(n,i);return qh(n),c},Pf=(n,i)=>Ql(n)&&n.dom.classList.contains(i),zp=(n,i)=>{const m=(i||document).createElement("div");if(m.innerHTML=n,!m.hasChildNodes()||m.childNodes.length>1){const p="HTML does not have a single root node";throw console.error(p,n),new Error(p)}return jl(m.childNodes[0])},Vm=(n,i)=>{const m=(i||document).createElement(n);return jl(m)},Jf=(n,i)=>{const m=(i||document).createTextNode(n);return jl(m)},jl=n=>{if(n==null)throw new Error("Node cannot be null or undefined");return{dom:n}},Ke={fromHtml:zp,fromTag:Vm,fromText:Jf,fromDom:jl,fromPoint:(n,i,c)=>he.from(n.dom.elementFromPoint(i,c)).map(jl)},nh=(n,i)=>{const c=[],m=w=>(c.push(w),i(w));let p=i(n);do p=p.bind(m);while(p.isSome());return c},Pu=(n,i)=>{const c=n.dom;if(c.nodeType!==qf)return!1;{const m=c;if(m.matches!==void 0)return m.matches(i);if(m.msMatchesSelector!==void 0)return m.msMatchesSelector(i);if(m.webkitMatchesSelector!==void 0)return m.webkitMatchesSelector(i);if(m.mozMatchesSelector!==void 0)return m.mozMatchesSelector(i);throw new Error("Browser lacks native selectors")}},Vg=n=>n.nodeType!==qf&&n.nodeType!==Ku&&n.nodeType!==Tc||n.childElementCount===0,U1=(n,i)=>{const c=i===void 0?document:i.dom;return Vg(c)?[]:pt(c.querySelectorAll(n),Ke.fromDom)},Kh=(n,i)=>{const c=i===void 0?document:i.dom;return Vg(c)?he.none():he.from(c.querySelector(n)).map(Ke.fromDom)},vt=(n,i)=>n.dom===i.dom,cn=(n,i)=>{const c=n.dom,m=i.dom;return c===m?!1:c.contains(m)},an=n=>Ke.fromDom(n.dom.ownerDocument),Eo=n=>Zg(n)?n:an(n),or=n=>Ke.fromDom(Eo(n).dom.documentElement),Xr=n=>Ke.fromDom(Eo(n).dom.defaultView),fi=n=>he.from(n.dom.parentNode).map(Ke.fromDom),wi=n=>he.from(n.dom.parentElement).map(Ke.fromDom),oh=(n,i)=>{const c=ce(i)?i:je;let m=n.dom;const p=[];for(;m.parentNode!==null&&m.parentNode!==void 0;){const w=m.parentNode,x=Ke.fromDom(w);if(p.push(x),c(x)===!0)break;m=w}return p},Jb=n=>{const i=c=>At(c,m=>!vt(n,m));return fi(n).map(Da).map(i).getOr([])},Sa=n=>he.from(n.dom.previousSibling).map(Ke.fromDom),Td=n=>he.from(n.dom.nextSibling).map(Ke.fromDom),Wg=n=>Xs(nh(n,Sa)),il=n=>nh(n,Td),Da=n=>pt(n.dom.childNodes,Ke.fromDom),tf=(n,i)=>{const c=n.dom.childNodes;return he.from(c[i]).map(Ke.fromDom)},ii=n=>tf(n,0),Mu=n=>tf(n,n.dom.childNodes.length-1),dc=n=>n.dom.childNodes.length,Jh=n=>n.dom.hasChildNodes(),Y1=n=>{const i=n.dom.head;if(i==null)throw new Error("Head is not available yet");return Ke.fromDom(i)},sh=n=>Gf(n)&&Oe(n.dom.host),Ug=ce(Element.prototype.attachShadow)&&ce(Node.prototype.getRootNode),rh=Qe(Ug),ql=Ug?n=>Ke.fromDom(n.dom.getRootNode()):Eo,em=n=>sh(n)?n:Y1(Eo(n)),X1=n=>sh(n)?n:Ke.fromDom(Eo(n).dom.body),Wm=n=>{const i=ql(n);return sh(i)?he.some(i):he.none()},Yg=n=>Ke.fromDom(n.dom.host),tm=n=>{if(rh()&&Oe(n.target)){const i=Ke.fromDom(n.target);if(kl(i)&&ih(i)&&n.composed&&n.composedPath){const c=n.composedPath();if(c)return $o(c)}}return he.from(n.target)},ih=n=>Oe(n.dom.shadowRoot),Ed=n=>{const i=sl(n)?n.dom.parentNode:n.dom;if(i==null||i.ownerDocument===null)return!1;const c=i.ownerDocument;return Wm(Ke.fromDom(i)).fold(()=>c.body.contains(i),ut(Ed,Yg))};var ai=(n,i,c,m,p)=>n(c,m)?he.some(c):ce(p)&&p(c)?he.none():i(c,m,p);const di=(n,i,c)=>{let m=n.dom;const p=ce(c)?c:je;for(;m.parentNode;){m=m.parentNode;const w=Ke.fromDom(m);if(i(w))return he.some(w);if(p(w))break}return he.none()},Zl=(n,i,c)=>ai((p,w)=>w(p),di,n,i,c),Vp=(n,i)=>{const c=n.dom;return c.parentNode?ee(Ke.fromDom(c.parentNode),m=>!vt(n,m)&&i(m)):he.none()},ee=(n,i)=>{const c=p=>i(Ke.fromDom(p));return oo(n.dom.childNodes,c).map(Ke.fromDom)},ue=(n,i)=>{const c=m=>{for(let p=0;pdi(n,m=>Pu(m,i),c),Je=(n,i)=>Kh(i,n),at=(n,i,c)=>ai((p,w)=>Pu(p,w),Se,n,i,c),Dn=n=>at(n,"[contenteditable]"),wn=(n,i=!1)=>Ed(n)?n.dom.isContentEditable:Dn(n).fold(Qe(i),c=>Ko(c)==="true"),Ko=n=>n.dom.contentEditable,ss=n=>n.style!==void 0&&ce(n.style.getPropertyValue),vo=(n,i,c)=>{if(!L(c))throw console.error("Invalid call to CSS.set. Property ",i,":: Value ",c,":: Element ",n),new Error("CSS value must be a string: "+c);ss(n)&&n.style.setProperty(i,c)},Tr=(n,i)=>{ss(n)&&n.style.removeProperty(i)},Gl=(n,i,c)=>{const m=n.dom;vo(m,i,c)},ua=(n,i)=>{const c=n.dom;ln(i,(m,p)=>{vo(c,p,m)})},Bi=(n,i)=>{const c=n.dom,p=window.getComputedStyle(c).getPropertyValue(i);return p===""&&!Ed(n)?Ru(c,i):p},Ru=(n,i)=>ss(n)?n.style.getPropertyValue(i):"",Pa=(n,i)=>{const c=n.dom,m=Ru(c,i);return he.from(m).filter(p=>p.length>0)},nm=n=>{const i={},c=n.dom;if(ss(c))for(let m=0;m{const c=n.dom;Tr(c,i),Gr(Va(n,"style").map(kc),"")&&Vi(n,"style")},Wi=n=>n.dom.offsetWidth,Ca=(n,i)=>{fi(n).each(m=>{m.dom.insertBefore(i.dom,n.dom)})},iu=(n,i)=>{Td(n).fold(()=>{fi(n).each(p=>{na(p,i)})},m=>{Ca(m,i)})},ah=(n,i)=>{ii(n).fold(()=>{na(n,i)},m=>{n.dom.insertBefore(i.dom,m.dom)})},na=(n,i)=>{n.dom.appendChild(i.dom)},e0=(n,i)=>{Ca(n,i),na(i,n)},Dv=(n,i)=>{Ne(i,(c,m)=>{const p=m===0?n:i[m-1];iu(p,c)})},ni=(n,i)=>{Ne(i,c=>{na(n,c)})},Ad=n=>{n.dom.textContent="",Ne(Da(n),i=>{wr(i)})},wr=n=>{const i=n.dom;i.parentNode!==null&&i.parentNode.removeChild(i)},Kl=n=>{const i=Da(n);i.length>0&&Dv(n,i),wr(n)},ed=(n,i)=>{const m=(i||document).createElement("div");return m.innerHTML=n,Da(Ke.fromDom(m))},lh=n=>pt(n,Ke.fromDom),Ae=n=>n.dom.innerHTML,Mf=(n,i)=>{const m=an(n).dom,p=Ke.fromDom(m.createDocumentFragment()),w=ed(i,m);ni(p,w),Ad(n),na(n,p)},Xg=n=>{const i=Ke.fromTag("div"),c=Ke.fromDom(n.dom.cloneNode(!0));return na(i,c),Ae(i)},$u=(n,i,c,m,p,w,x)=>({target:n,x:i,y:c,stop:m,prevent:p,kill:w,raw:x}),hi=n=>{const i=Ke.fromDom(tm(n).getOr(n.target)),c=()=>n.stopPropagation(),m=()=>n.preventDefault(),p=V(m,c);return $u(i,n.clientX,n.clientY,c,m,p,n)},Pv=(n,i)=>c=>{n(c)&&i(hi(c))},j1=(n,i,c,m,p)=>{const w=Pv(c,m);return n.dom.addEventListener(i,w,p),{unbind:He(td,n,i,w,p)}},t0=(n,i,c,m)=>j1(n,i,c,m,!1),td=(n,i,c,m)=>{n.dom.removeEventListener(i,c,m)},Ym=(n,i)=>({left:n,top:i,translate:(m,p)=>Ym(n+m,i+p)}),jg=Ym,Mv=n=>{const i=n.getBoundingClientRect();return jg(i.left,i.top)},Rf=(n,i)=>n!==void 0?n:i!==void 0?i:0,xy=n=>{const i=n.dom.ownerDocument,c=i.body,m=i.defaultView,p=i.documentElement;if(c===n.dom)return jg(c.offsetLeft,c.offsetTop);const w=Rf(m==null?void 0:m.pageYOffset,p.scrollTop),x=Rf(m==null?void 0:m.pageXOffset,p.scrollLeft),M=Rf(p.clientTop,c.clientTop),B=Rf(p.clientLeft,c.clientLeft);return Nu(n).translate(x-B,w-M)},Nu=n=>{const i=n.dom,m=i.ownerDocument.body;return m===i?jg(m.offsetLeft,m.offsetTop):Ed(n)?Mv(i):jg(0,0)},nf=n=>{const i=n!==void 0?n.dom:document,c=i.body.scrollLeft||i.documentElement.scrollLeft,m=i.body.scrollTop||i.documentElement.scrollTop;return jg(c,m)},n0=(n,i,c)=>{const p=(c!==void 0?c.dom:document).defaultView;p&&p.scrollTo(n,i)},o0=(n,i)=>{ys().browser.isSafari()&&ce(n.dom.scrollIntoViewIfNeeded)?n.dom.scrollIntoViewIfNeeded(!1):n.dom.scrollIntoView(i)},s0=n=>{const i=n===void 0?window:n;return ys().browser.isFirefox()?he.none():he.from(i.visualViewport)},q1=(n,i,c,m)=>({x:n,y:i,width:c,height:m,right:n+c,bottom:i+m}),nd=n=>{const i=n===void 0?window:n,c=i.document,m=nf(Ke.fromDom(c));return s0(i).fold(()=>{const p=i.document.documentElement,w=p.clientWidth,x=p.clientHeight;return q1(m.left,m.top,w,x)},p=>q1(Math.max(p.pageLeft,m.left),Math.max(p.pageTop,m.top),p.width,p.height))},r0=(n,i)=>At(Da(n),i),i0=(n,i)=>{let c=[];return Ne(Da(n),m=>{i(m)&&(c=c.concat([m])),c=c.concat(i0(m,i))}),c},pl=(n,i)=>U1(i,n),Ty=(n,i,c)=>Se(n,i,c).isSome();class _i{constructor(i,c){this.node=i,this.rootNode=c,this.current=this.current.bind(this),this.next=this.next.bind(this),this.prev=this.prev.bind(this),this.prev2=this.prev2.bind(this)}current(){return this.node}next(i){return this.node=this.findSibling(this.node,"firstChild","nextSibling",i),this.node}prev(i){return this.node=this.findSibling(this.node,"lastChild","previousSibling",i),this.node}prev2(i){return this.node=this.findPreviousNode(this.node,i),this.node}findSibling(i,c,m,p){if(i){if(!p&&i[c])return i[c];if(i!==this.rootNode){let w=i[m];if(w)return w;for(let x=i.parentNode;x&&x!==this.rootNode;x=x.parentNode)if(w=x[m],w)return w}}}findPreviousNode(i,c){if(i){const m=i.previousSibling;if(this.rootNode&&m===this.rootNode)return;if(m){if(!c){for(let w=m.lastChild;w;w=w.lastChild)if(!w.lastChild)return w}return m}const p=i.parentNode;if(p&&p!==this.rootNode)return p}}}const fo=n=>i=>!!i&&i.nodeType===n,Dd=n=>!!n&&!Object.getPrototypeOf(n),Jn=fo(1),Ac=n=>{const i=n.toLowerCase();return c=>Oe(c)&&c.nodeName.toLowerCase()===i},$f=n=>{const i=n.map(c=>c.toLowerCase());return c=>{if(c&&c.nodeName){const m=c.nodeName.toLowerCase();return kt(i,m)}return!1}},ch=(n,i)=>{const c=i.toLowerCase().split(" ");return m=>{if(Jn(m)){const p=m.ownerDocument.defaultView;if(p)for(let w=0;wi=>Jn(i)&&i.hasAttribute(n),qg=(n,i)=>c=>Jn(c)&&c.getAttribute(n)===i,Pd=n=>Jn(n)&&n.hasAttribute("data-mce-bogus"),bl=n=>Jn(n)&&n.getAttribute("data-mce-bogus")==="all",Iu=n=>Jn(n)&&n.tagName==="TABLE",Wp=n=>i=>!!(Jn(i)&&(i.contentEditable===n||i.getAttribute("data-mce-contenteditable")===n)),G1=$f(["textarea","input"]),_n=fo(3),Xm=fo(4),Md=fo(7),uh=fo(8),of=fo(9),K1=fo(11),mi=Ac("br"),Ui=Ac("img"),ba=Wp("true"),Es=Wp("false"),Rd=$f(["td","th"]),xl=$f(["td","th","caption"]),sf=$f(["video","audio","object","embed"]),Wa=Ac("li"),ka=Ac("details"),Up=Ac("summary"),nn="\uFEFF",Kr="\xA0",a0=n=>n===nn,xa=n=>n.replace(/\uFEFF/g,""),Gg=((n,i)=>{const c=w=>{if(!n(w))throw new Error("Can only get "+i+" value of a "+i+" node");return m(w).getOr("")},m=w=>n(w)?he.from(w.dom.nodeValue):he.none();return{get:c,getOption:m,set:(w,x)=>{if(!n(w))throw new Error("Can only set raw "+i+" value of a "+i+" node");w.dom.nodeValue=x}}})(sl,"text"),Wc=n=>Gg.get(n),od=n=>Gg.getOption(n),sd=(n,i)=>Gg.set(n,i),Yp=["article","aside","details","div","dt","figcaption","footer","form","fieldset","header","hgroup","html","main","nav","section","summary","body","p","dl","multicol","dd","figure","address","center","blockquote","h1","h2","h3","h4","h5","h6","listing","xmp","pre","plaintext","menu","dir","ul","ol","li","hr","table","tbody","thead","tfoot","th","tr","td","caption"],Hl=["td","th"],Er=["thead","tbody","tfoot"],Ya=["h1","h2","h3","h4","h5","h6","p","div","address","pre","form","blockquote","center","dir","fieldset","header","footer","article","section","hgroup","aside","nav","figure"],fh=["h1","h2","h3","h4","h5","h6"],Jl=["li","dd","dt"],l0=["ul","ol","dl"],jm=["pre","script","textarea","style"],J1=["pre"].concat(fh),Xa=n=>{let i;return c=>(i=i||dr(n,mt),fn(i,ti(c)))},hc=Xa(Yp),xt=n=>ti(n)==="table",Dc=n=>kl(n)&&!hc(n),au=n=>kl(n)&&ti(n)==="br",mc=Xa(Ya),Bu=Xa(l0),ja=Xa(Jl),qa=Xa(Er),qm=Xa(Hl),lu=Xa(jm),c0=Xa(J1),Ho=n=>c0(n)||Dc(n),z=n=>{const i=[];let c=n.dom;for(;c;)i.push(Ke.fromDom(c)),c=c.lastChild;return i},j=n=>{const i=pl(n,"br"),c=At(z(n).slice(-1),au);i.length===c.length&&Ne(c,wr)},ye=()=>{const n=Ke.fromTag("br");return Pr(n,"data-mce-bogus","1"),n},Pe=n=>{Ad(n),na(n,ye())},ct=n=>{Mu(n).each(i=>{Sa(i).each(c=>{hc(n)&&au(i)&&hc(c)&&wr(i)})})},Ft=nn,Sn=a0,In=xa,Uo=Jn,ts=_n,Si=n=>(ts(n)&&(n=n.parentNode),Uo(n)&&n.hasAttribute("data-mce-caret")),sr=n=>ts(n)&&Sn(n.data),_r=n=>Si(n)||sr(n),Uc=n=>n.firstChild!==n.lastChild||!mi(n.firstChild),cu=(n,i)=>{var c;const p=((c=n.ownerDocument)!==null&&c!==void 0?c:document).createTextNode(Ft),w=n.parentNode;if(i){const x=n.previousSibling;if(ts(x)){if(_r(x))return x;if(hr(x))return x.splitText(x.data.length-1)}w==null||w.insertBefore(p,n)}else{const x=n.nextSibling;if(ts(x)){if(_r(x))return x;if(hh(x))return x.splitText(1),x}n.nextSibling?w==null||w.insertBefore(p,n.nextSibling):w==null||w.appendChild(p)}return p},rf=n=>{const i=n.container();return _n(i)?i.data.charAt(n.offset())===Ft||n.isAtStart()&&sr(i.previousSibling):!1},Nf=n=>{const i=n.container();return _n(i)?i.data.charAt(n.offset()-1)===Ft||n.isAtEnd()&&sr(i.nextSibling):!1},dh=(n,i,c)=>{var m;const w=((m=i.ownerDocument)!==null&&m!==void 0?m:document).createElement(n);w.setAttribute("data-mce-caret",c?"before":"after"),w.setAttribute("data-mce-bogus","all"),w.appendChild(ye().dom);const x=i.parentNode;return c?x==null||x.insertBefore(w,i):i.nextSibling?x==null||x.insertBefore(w,i.nextSibling):x==null||x.appendChild(w),w},hh=n=>ts(n)&&n.data[0]===Ft,hr=n=>ts(n)&&n.data[n.data.length-1]===Ft,Gm=n=>{var i;const c=n.getElementsByTagName("br"),m=c[c.length-1];Pd(m)&&((i=m.parentNode)===null||i===void 0||i.removeChild(m))},Km=n=>n&&n.hasAttribute("data-mce-caret")?(Gm(n),n.removeAttribute("data-mce-caret"),n.removeAttribute("data-mce-bogus"),n.removeAttribute("style"),n.removeAttribute("data-mce-style"),n.removeAttribute("_moz_abspos"),n):null,oa=n=>Si(n.startContainer),uu=ba,Xp=Es,Jm=mi,Ps=_n,Fr=$f(["script","style","textarea"]),Ma=$f(["img","input","textarea","hr","iframe","video","audio","object","embed"]),gc=$f(["table"]),eb=_r,Tl=n=>eb(n)?!1:Ps(n)?!Fr(n.parentNode):Ma(n)||Jm(n)||gc(n)||fu(n),Gi=n=>Jn(n)&&n.getAttribute("unselectable")==="true",fu=n=>!Gi(n)&&Xp(n),If=(n,i)=>{for(let c=n.parentNode;c&&c!==i;c=c.parentNode){if(fu(c))return!1;if(uu(c))return!0}return!0},Jw=n=>fu(n)?!zn(Rr(n.getElementsByTagName("*")),(i,c)=>i||uu(c),!1):!1,om=n=>Ma(n)||Jw(n),Kg=(n,i)=>Tl(n)&&If(n,i),sm=/^[ \t\r\n]*$/,eg=n=>sm.test(n),Jg=n=>{for(const i of n)if(!a0(i))return!1;return!0},u0=n=>" \f \v".indexOf(n)!==-1,rm=n=>n===` `||n==="\r",Ra=(n,i)=>i=0?rm(n[i]):!1,mh=(n,i=4,c=!0,m=!0)=>{const p=Tu(" ",i),w=n.replace(/\t/g,p);return zn(w,(M,B)=>u0(B)||B===Kr?M.pcIsSpace||M.str===""&&c||M.str.length===w.length-1&&m||Ra(w,M.str.length+1)?{pcIsSpace:!1,str:M.str+Kr}:{pcIsSpace:!0,str:M.str+" "}:{pcIsSpace:rm(B),str:M.str+B},{pcIsSpace:!1,str:""}).str},$d=(n,i)=>{const c=Ke.fromDom(i),m=Ke.fromDom(n);return Ty(m,"pre,code",He(vt,c))},tg=(n,i)=>_n(n)&&eg(n.data)&&!$d(n,i),ng=n=>Jn(n)&&n.nodeName==="A"&&!n.hasAttribute("href")&&(n.hasAttribute("name")||n.hasAttribute("id")),im=(n,i)=>Tl(n)&&!tg(n,i)||ng(n)||af(n),af=Vc("data-mce-bookmark"),f0=Vc("data-mce-bogus"),tb=qg("data-mce-bogus","all"),e_=(n,i)=>{let c=0;if(im(n,n))return!1;{let m=n.firstChild;if(!m)return!0;const p=new _i(m,n);do{if(i){if(tb(m)){m=p.next(!0);continue}if(f0(m)){m=p.next();continue}}if(mi(m)){c++,m=p.next();continue}if(im(m,n))return!1;m=p.next()}while(m);return c<=1}},$a=(n,i=!0)=>e_(n.dom,i),ep="data-mce-block",og=n=>At(bs(n),i=>!/[A-Z]/.test(i)),du=n=>og(n).join(","),Bf=(n,i)=>Oe(i.querySelector(n))?(i.setAttribute(ep,"true"),i.getAttribute("data-mce-selected")==="inline-boundary"&&i.removeAttribute("data-mce-selected"),!0):(i.removeAttribute(ep),!1),sg=(n,i)=>{const c=du(n.getTransparentElements()),m=du(n.getBlockElements());return At(i.querySelectorAll(c),p=>Bf(m,p))},gh=(n,i)=>{var c;const m=i?"lastChild":"firstChild";for(let p=n[m];p;p=p[m])if($a(Ke.fromDom(p))){(c=p.parentNode)===null||c===void 0||c.removeChild(p);return}},Lu=(n,i)=>{const c=document.createRange(),m=n.parentNode;if(m){c.setStartBefore(n),c.setEndBefore(i);const p=c.extractContents();gh(p,!0),c.setStartAfter(i),c.setEndAfter(n);const w=c.extractContents();gh(w,!1),$a(Ke.fromDom(p))||m.insertBefore(p,n),$a(Ke.fromDom(i))||m.insertBefore(i,n),$a(Ke.fromDom(w))||m.insertBefore(w,n),m.removeChild(n)}},Nd=(n,i,c)=>{const m=n.getBlockElements(),p=Ke.fromDom(i),w=M=>ti(M)in m,x=M=>vt(M,p);Ne(lh(c),M=>{di(M,w,x).each(B=>{const q=r0(M,ae=>w(ae)&&!n.isValidChild(ti(B),ti(ae)));if(q.length>0){const ae=wi(B);Ne(q,fe=>{di(fe,w,x).each(be=>{Lu(be.dom,fe.dom)})}),ae.each(fe=>sg(n,fe.dom))}})})},rg=(n,i,c)=>{Ne([...c,...ig(n,i)?[i]:[]],m=>Ne(pl(Ke.fromDom(m),m.nodeName.toLowerCase()),p=>{Iv(n,p.dom)&&Kl(p)}))},d0=(n,i)=>{const c=sg(n,i);Nd(n,i,c),rg(n,i,c)},Rv=(n,i)=>{if(Nv(n,i)){const c=du(n.getBlockElements());Bf(c,i)}},$v=(n,i,c)=>{const m=w=>vt(w,Ke.fromDom(i)),p=oh(Ke.fromDom(c),m);qr(p,p.length-2).filter(kl).fold(()=>d0(n,i),w=>d0(n,w.dom))},ph=n=>n.hasAttribute(ep),tp=(n,i)=>fn(n.getTransparentElements(),i),Nv=(n,i)=>Jn(i)&&tp(n,i.nodeName),ig=(n,i)=>Nv(n,i)&&ph(i),Iv=(n,i)=>Nv(n,i)&&!ph(i),rr=(n,i)=>i.type===1&&tp(n,i.name)&&L(i.attr(ep)),Ao=ys().browser,bh=n=>oo(n,kl),nb=n=>Ao.isFirefox()&&ti(n)==="table"?bh(Da(n)).filter(i=>ti(i)==="caption").bind(i=>bh(il(i)).map(c=>{const m=c.dom.offsetTop,p=i.dom.offsetTop,w=i.dom.offsetHeight;return m<=p?-w:0})).getOr(0):0,np=(n,i)=>n.children&&kt(n.children,i),WC=(n,i,c)=>{let m=0,p=0;const w=n.ownerDocument;if(c=c||n,i){if(c===n&&i.getBoundingClientRect&&Bi(Ke.fromDom(n),"position")==="static"){const M=i.getBoundingClientRect();return m=M.left+(w.documentElement.scrollLeft||n.scrollLeft)-w.documentElement.clientLeft,p=M.top+(w.documentElement.scrollTop||n.scrollTop)-w.documentElement.clientTop,{x:m,y:p}}let x=i;for(;x&&x!==c&&x.nodeType&&!np(x,c);){const M=x;m+=M.offsetLeft||0,p+=M.offsetTop||0,x=M.offsetParent}for(x=i.parentNode;x&&x!==c&&x.nodeType&&!np(x,c);)m-=x.scrollLeft||0,p-=x.scrollTop||0,x=x.parentNode;p+=nb(Ke.fromDom(i))}return{x:m,y:p}},Bv=(n,i={})=>{let c=0;const m={},p=Ke.fromDom(n),w=Eo(p),x=Me=>{i.referrerPolicy=Me},M=Me=>{i.contentCssCors=Me},B=Me=>{na(em(p),Me)},q=Me=>{const Ve=em(p);Je(Ve,"#"+Me).each(wr)},ae=Me=>wo(m,Me).getOrThunk(()=>({id:"mce-u"+c++,passed:[],failed:[],count:0})),fe=Me=>new Promise((Ve,gt)=>{let Ot;const wt=gn._addCacheSuffix(Me),Pt=ae(wt);m[wt]=Pt,Pt.count++;const hn=(Zt,yn)=>{Ne(Zt,Cn),Pt.status=yn,Pt.passed=[],Pt.failed=[],Ot&&(Ot.onload=null,Ot.onerror=null,Ot=null)},Hn=()=>hn(Pt.passed,2),$n=()=>hn(Pt.failed,3);if(Ve&&Pt.passed.push(Ve),gt&&Pt.failed.push(gt),Pt.status===1)return;if(Pt.status===2){Hn();return}if(Pt.status===3){$n();return}Pt.status=1;const Lt=Ke.fromTag("link",w.dom);Ju(Lt,{rel:"stylesheet",type:"text/css",id:Pt.id}),i.contentCssCors&&Pr(Lt,"crossOrigin","anonymous"),i.referrerPolicy&&Pr(Lt,"referrerpolicy",i.referrerPolicy),Ot=Lt.dom,Ot.onload=Hn,Ot.onerror=$n,B(Lt),Pr(Lt,"href",wt)}),be=Me=>Promise.allSettled(pt(Me,gt=>fe(gt).then(Qe(gt)))).then(gt=>{const Ot=bn(gt,wt=>wt.status==="fulfilled");return Ot.fail.length>0?Promise.reject(pt(Ot.fail,wt=>wt.reason)):pt(Ot.pass,wt=>wt.value)}),Le=Me=>{const Ve=gn._addCacheSuffix(Me);wo(m,Ve).each(gt=>{--gt.count===0&&(delete m[Ve],q(gt.id))})};return{load:fe,loadAll:be,unload:Le,unloadAll:Me=>{Ne(Me,Ve=>{Le(Ve)})},_setReferrerPolicy:x,_setContentCssCors:M}},Lv=(()=>{const n=new WeakMap;return{forElement:(c,m)=>{const w=ql(c).dom;return he.from(n.get(w)).getOrThunk(()=>{const x=Bv(w,m);return n.set(w,x),x})}}})(),ob=n=>n.nodeName.toLowerCase()==="span",Ey=(n,i)=>Oe(n)&&(im(n,i)||Dc(Ke.fromDom(n))),on=(n,i)=>{const c=new _i(n,i).prev(!1),m=new _i(n,i).next(!1),p=ve(c)||Ey(c,i),w=ve(m)||Ey(m,i);return p&&w},Id=n=>ob(n)&&n.getAttribute("data-mce-type")==="bookmark",t_=(n,i)=>_n(n)&&n.data.length>0&&on(n,i),h0=n=>Jn(n)?n.childNodes.length>0:!1,UC=n=>K1(n)||of(n),ag=(n,i,c)=>{var m;const p=c||i;if(Jn(i)&&Id(i))return i;const w=i.childNodes;for(let x=w.length-1;x>=0;x--)ag(n,w[x],p);if(Jn(i)){const x=i.childNodes;x.length===1&&Id(x[0])&&((m=i.parentNode)===null||m===void 0||m.insertBefore(x[0],i))}return!UC(i)&&!im(i,p)&&!h0(i)&&!t_(i,p)&&n.remove(i),i},Ay=gn.makeMap,am=/[&<>\"\u0060\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Bd=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,lg=/[<>&\"\']/g,Ci=/&#([a-z0-9]+);?|&([a-z0-9]+);/gi,Ld={128:"\u20AC",130:"\u201A",131:"\u0192",132:"\u201E",133:"\u2026",134:"\u2020",135:"\u2021",136:"\u02C6",137:"\u2030",138:"\u0160",139:"\u2039",140:"\u0152",142:"\u017D",145:"\u2018",146:"\u2019",147:"\u201C",148:"\u201D",149:"\u2022",150:"\u2013",151:"\u2014",152:"\u02DC",153:"\u2122",154:"\u0161",155:"\u203A",156:"\u0153",158:"\u017E",159:"\u0178"},Fd={'"':""","'":"'","<":"<",">":">","&":"&","`":"`"},hu={"<":"<",">":">","&":"&",""":'"',"'":"'"},Qs=n=>{const i=Ke.fromTag("div").dom;return i.innerHTML=n,i.textContent||i.innerText||n},jp=(n,i)=>{const c={};if(n){const m=n.split(",");i=i||10;for(let p=0;pn.replace(i?am:Bd,c=>Fd[c]||c),YC=n=>(""+n).replace(lg,i=>Fd[i]||i),m0=(n,i)=>n.replace(i?am:Bd,c=>c.length>1?"&#"+((c.charCodeAt(0)-55296)*1024+(c.charCodeAt(1)-56320)+65536)+";":Fd[c]||"&#"+c.charCodeAt(0)+";"),Fv=(n,i,c)=>{const m=c||vh;return n.replace(i?am:Bd,p=>Fd[p]||m[p]||p)},sp={encodeRaw:op,encodeAllRaw:YC,encodeNumeric:m0,encodeNamed:Fv,getEncodeFunc:(n,i)=>{const c=jp(i)||vh,m=(x,M)=>x.replace(M?am:Bd,B=>Fd[B]!==void 0?Fd[B]:c[B]!==void 0?c[B]:B.length>1?"&#"+((B.charCodeAt(0)-55296)*1024+(B.charCodeAt(1)-56320)+65536)+";":"&#"+B.charCodeAt(0)+";"),p=(x,M)=>Fv(x,M,c),w=Ay(n.replace(/\+/g,","));return w.named&&w.numeric?m:w.named?i?p:Fv:w.numeric?m0:op},decode:n=>n.replace(Ci,(i,c)=>c?(c.charAt(0).toLowerCase()==="x"?c=parseInt(c.substr(1),16):c=parseInt(c,10),c>65535?(c-=65536,String.fromCharCode(55296+(c>>10),56320+(c&1023))):Ld[c]||String.fromCharCode(c)):hu[i]||vh[i]||Qs(i))},Al=(n,i)=>(n=gn.trim(n),n?n.split(i||" "):[]),Dy=n=>new RegExp("^"+n.replace(/([?+*])/g,".$1")+"$"),io=n=>{const i=/^(~)?(.+)$/;return $s(Al(n,","),c=>{const m=i.exec(c);if(m){const p=m[1]==="~",w=p?"span":"div",x=m[2];return[{inline:p,cloneName:w,name:x}]}else return[]})},Py=n=>{let i,c,m,p;if(i="id accesskey class dir lang style tabindex title role",c="address blockquote div dl fieldset form h1 h2 h3 h4 h5 h6 hr menu ol p pre table ul",m="a abbr b bdo br button cite code del dfn em embed i iframe img input ins kbd label map noscript object q s samp script select small span strong sub sup textarea u var #text #comment",n!=="html4"){const w="a ins del canvas map";i+=" contenteditable contextmenu draggable dropzone hidden spellcheck translate",c+=" article aside details dialog figure main header footer hgroup section nav "+w,m+=" audio canvas command datalist mark meter output picture progress time wbr video ruby bdi keygen"}return n!=="html5-strict"&&(i+=" xml:lang",m=[m,"acronym applet basefont big font strike tt"].join(" "),c=[c,"center dir isindex noframes"].join(" "),p=[c,m].join(" ")),p=p||[c,m].join(" "),{globalAttributes:i,blockContent:c,phrasingContent:m,flowContent:p}},XC=n=>{const{globalAttributes:i,phrasingContent:c,flowContent:m}=Py(n),p={},w=(M,B="",q="")=>{const ae=Al(q),fe=Al(M);let be=fe.length;for(;be--;){const Le=Al([i,B].join(" "));p[fe[be]]={attributes:dr(Le,Qe({})),attributesOrder:Le,children:dr(ae,Qe({}))}}},x=(M,B)=>{const q=Al(M),ae=Al(B);let fe=q.length;for(;fe--;){const be=p[q[fe]];for(let Le=0,Ye=ae.length;Le{w(q,"",c)}),Ne(Al("center dir isindex noframes"),q=>{w(q,"",m)})),w("html","manifest","head body"),w("head","","base command link meta noscript script style title"),w("title hr noscript br"),w("base","href target"),w("link","href rel media hreflang type sizes hreflang"),w("meta","name http-equiv content charset"),w("style","media type scoped"),w("script","src async defer type charset"),w("body","onafterprint onbeforeprint onbeforeunload onblur onerror onfocus onhashchange onload onmessage onoffline ononline onpagehide onpageshow onpopstate onresize onscroll onstorage onunload",m),w("dd div","",m),w("address dt caption","",n==="html4"?c:m),w("h1 h2 h3 h4 h5 h6 pre p abbr code var samp kbd sub sup i b u bdo span legend em strong small s cite dfn","",c),w("blockquote","cite",m),w("ol","reversed start type","li"),w("ul","","li"),w("li","value",m),w("dl","","dt dd"),w("a","href target rel media hreflang type",n==="html4"?c:m),w("q","cite",c),w("ins del","cite datetime",m),w("img","src sizes srcset alt usemap ismap width height"),w("iframe","src name width height",m),w("embed","src type width height"),w("object","data type typemustmatch name usemap form width height",[m,"param"].join(" ")),w("param","name value"),w("map","name",[m,"area"].join(" ")),w("area","alt coords shape href target rel media hreflang type"),w("table","border","caption colgroup thead tfoot tbody tr"+(n==="html4"?" col":"")),w("colgroup","span","col"),w("col","span"),w("tbody thead tfoot","","tr"),w("tr","","td th"),w("td","colspan rowspan headers",m),w("th","colspan rowspan headers scope abbr",m),w("form","accept-charset action autocomplete enctype method name novalidate target",m),w("fieldset","disabled form name",[m,"legend"].join(" ")),w("label","form for",c),w("input","accept alt autocomplete checked dirname disabled form formaction formenctype formmethod formnovalidate formtarget height list max maxlength min multiple name pattern readonly required size src step type value width"),w("button","disabled form formaction formenctype formmethod formnovalidate formtarget name type value",n==="html4"?m:c),w("select","disabled form multiple name required size","option optgroup"),w("optgroup","disabled label","option"),w("option","disabled label selected value"),w("textarea","cols dirname disabled form maxlength name readonly required rows wrap"),w("menu","type label",[m,"li"].join(" ")),w("noscript","",m),n!=="html4"&&(w("wbr"),w("ruby","",[c,"rt rp"].join(" ")),w("figcaption","",m),w("mark rt rp summary bdi","",c),w("canvas","width height",m),w("video","src crossorigin poster preload autoplay mediagroup loop muted controls width height buffered",[m,"track source"].join(" ")),w("audio","src crossorigin preload autoplay mediagroup loop muted controls buffered volume",[m,"track source"].join(" ")),w("picture","","img source"),w("source","src srcset type media sizes"),w("track","kind src srclang label default"),w("datalist","",[c,"option"].join(" ")),w("article section nav aside main header footer","",m),w("hgroup","","h1 h2 h3 h4 h5 h6"),w("figure","",[m,"figcaption"].join(" ")),w("time","datetime",c),w("dialog","open",m),w("command","type label icon disabled checked radiogroup command"),w("output","for form name",c),w("progress","value max",c),w("meter","value min max low high optimum",c),w("details","open",[m,"summary"].join(" ")),w("keygen","autofocus challenge disabled form keytype name")),n!=="html5-strict"&&(x("script","language xml:space"),x("style","xml:space"),x("object","declare classid code codebase codetype archive standby align border hspace vspace"),x("embed","align name hspace vspace"),x("param","valuetype type"),x("a","charset name rev shape coords"),x("br","clear"),x("applet","codebase archive code object alt name width height align hspace vspace"),x("img","name longdesc align border hspace vspace"),x("iframe","longdesc frameborder marginwidth marginheight scrolling align"),x("font basefont","size color face"),x("input","usemap align"),x("select"),x("textarea"),x("h1 h2 h3 h4 h5 h6 div p legend caption","align"),x("ul","type compact"),x("li","type"),x("ol dl menu dir","compact"),x("pre","width xml:space"),x("hr","align noshade size width"),x("isindex","prompt"),x("table","summary width frame rules cellspacing cellpadding align bgcolor"),x("col","width align char charoff valign"),x("colgroup","width align char charoff valign"),x("thead","align char charoff valign"),x("tr","align char charoff valign bgcolor"),x("th","axis align char charoff valign nowrap bgcolor width height"),x("form","accept"),x("td","abbr axis scope align char charoff valign nowrap bgcolor width height"),x("tfoot","align char charoff valign"),x("tbody","align char charoff valign"),x("area","nohref"),x("body","background bgcolor text link vlink alink")),n!=="html4"&&(x("input button select textarea","autofocus"),x("input textarea","placeholder"),x("a","download"),x("link script img","crossorigin"),x("img","loading"),x("iframe","sandbox seamless allow allowfullscreen loading")),n!=="html4"&&Ne([p.video,p.audio],M=>{delete M.children.audio,delete M.children.video}),Ne(Al("a form meter progress dfn"),M=>{p[M]&&delete p[M].children[M]}),delete p.caption.children.table,delete p.script,p},My=n=>n==="-"?"remove":"add",lm=n=>{const i=/^([+\-]?)([A-Za-z0-9_\-.\u00b7\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u037d\u037f-\u1fff\u200c-\u200d\u203f-\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]+)\[([^\]]+)]$/;return $s(Al(n,","),c=>{const m=i.exec(c);if(m){const p=m[1],w=p?My(p):"replace",x=m[2],M=Al(m[3],"|");return[{operation:w,name:x,validChildren:M}]}else return[]})},lf=(n,i)=>{const c=/^([!\-])?(\w+[\\:]:\w+|[^=~<]+)?(?:([=~<])(.*))?$/,m=/[*?+]/,{attributes:p,attributesOrder:w}=i;return Ne(Al(n,"|"),x=>{const M=c.exec(x);if(M){const B={},q=M[1],ae=M[2].replace(/[\\:]:/g,":"),fe=M[3],be=M[4];if(q==="!"&&(i.attributesRequired=i.attributesRequired||[],i.attributesRequired.push(ae),B.required=!0),q==="-"){delete p[ae],w.splice(gn.inArray(w,ae),1);return}if(fe&&(fe==="="?(i.attributesDefault=i.attributesDefault||[],i.attributesDefault.push({name:ae,value:be}),B.defaultValue=be):fe==="~"?(i.attributesForced=i.attributesForced||[],i.attributesForced.push({name:ae,value:be}),B.forcedValue=be):fe==="<"&&(B.validValues=gn.makeMap(be,"?"))),m.test(ae)){const Le=B;i.attributePatterns=i.attributePatterns||[],Le.pattern=Dy(ae),i.attributePatterns.push(Le)}else p[ae]||w.push(ae),p[ae]=B}})},Oh=(n,i)=>{ln(n.attributes,(c,m)=>{i.attributes[m]=c}),i.attributesOrder.push(...n.attributesOrder)},rp=(n,i)=>{const c=/^([#+\-])?([^\[!\/]+)(?:\/([^\[!]+))?(?:(!?)\[([^\]]+)])?$/;return $s(Al(i,","),m=>{const p=c.exec(m);if(p){const w=p[1],x=p[2],M=p[3],B=p[4],q=p[5],ae={attributes:{},attributesOrder:[]};if(n.each(fe=>Oh(fe,ae)),w==="#"?ae.paddEmpty=!0:w==="-"&&(ae.removeEmpty=!0),B==="!"&&(ae.removeEmptyAttrs=!0),q&&lf(q,ae),M&&(ae.outputName=x),x==="@")if(n.isNone())n=he.some(ae);else return[];return[M?{name:x,element:ae,aliasName:M}:{name:x,element:ae}]}else return[]})},yh={},g0=gn.makeMap,Lf=gn.each,ip=gn.extend,Ry=gn.explode,qp=(n,i={})=>{const c=g0(n," ",g0(n.toUpperCase()," "));return ip(c,i)},rd=n=>qp("td th li dt dd figcaption caption details summary",n.getTextBlockElements()),$y=(n,i)=>{if(n){const c={};return L(n)&&(n={"*":n}),Lf(n,(m,p)=>{c[p]=c[p.toUpperCase()]=i==="map"?g0(m,/[, ]/):Ry(m,/[, ]/)}),c}else return},wh=(n={})=>{var i;const c={},m={};let p=[];const w={},x={},M=(ho,Us,ci)=>{const Ja=n[ho];if(Ja)return g0(Ja,/[, ]/,g0(Ja.toUpperCase(),/[, ]/));{let Ei=yh[ho];return Ei||(Ei=qp(Us,ci),yh[ho]=Ei),Ei}},B=(i=n.schema)!==null&&i!==void 0?i:"html5",q=XC(B);n.verify_html===!1&&(n.valid_elements="*[*]");const ae=$y(n.valid_styles),fe=$y(n.invalid_styles,"map"),be=$y(n.valid_classes,"map"),Le=M("whitespace_elements","pre script noscript style textarea video audio iframe object code"),Ye=M("self_closing_elements","colgroup dd dt li option p td tfoot th thead tr"),Me=M("void_elements","area base basefont br col frame hr img input isindex link meta param embed source wbr track"),Ve=M("boolean_attributes","checked compact declare defer disabled ismap multiple nohref noresize noshade nowrap readonly selected autoplay loop controls allowfullscreen"),gt="td th iframe video audio object script code",Ot=M("non_empty_elements",gt+" pre",Me),wt=M("move_caret_before_on_enter_elements",gt+" table",Me),Pt=M("text_block_elements","h1 h2 h3 h4 h5 h6 p div address pre form blockquote center dir fieldset header footer article section hgroup aside main nav figure"),hn=M("block_elements","hr table tbody thead tfoot th tr td li ol ul caption dl dt dd noscript menu isindex option datalist select optgroup figcaption details summary",Pt),Hn=M("text_inline_elements","span strong b em i font s strike u var cite dfn code mark q sup sub samp"),$n=M("transparent_elements","a ins del canvas map");Lf("script noscript iframe noframes noembed title style textarea xmp plaintext".split(" "),ho=>{x[ho]=new RegExp("]*>","gi")});const Lt=ho=>{const Us=he.from(c["@"]),ci=/[*?+]/;Ne(rp(Us,ho!=null?ho:""),({name:Ja,element:Ei,aliasName:$c})=>{if($c&&(c[$c]=Ei),ci.test(Ja)){const Qh=Ei;Qh.pattern=Dy(Ja),p.push(Qh)}else c[Ja]=Ei})},Zt=ho=>{p=[],Ne(bs(c),Us=>{delete c[Us]}),Lt(ho)},yn=ho=>{delete yh.text_block_elements,delete yh.block_elements,Ne(io(ho!=null?ho:""),({inline:Us,name:ci,cloneName:Ja})=>{if(m[ci]=m[Ja],w[ci]=Ja,Ot[ci.toUpperCase()]={},Ot[ci]={},Us||(hn[ci.toUpperCase()]={},hn[ci]={}),!c[ci]){let Ei=c[Ja];Ei=ip({},Ei),delete Ei.removeEmptyAttrs,delete Ei.removeEmpty,c[ci]=Ei}ln(m,(Ei,$c)=>{Ei[Ja]&&(m[$c]=Ei=ip({},m[$c]),Ei[ci]=Ei[Ja])})})},yo=ho=>{Ne(lm(ho!=null?ho:""),({operation:Us,name:ci,validChildren:Ja})=>{const Ei=Us==="replace"?{"#comment":{}}:m[ci];Ne(Ja,$c=>{Us==="remove"?delete Ei[$c]:Ei[$c]={}}),m[ci]=Ei})},Do=ho=>{const Us=c[ho];if(Us)return Us;let ci=p.length;for(;ci--;){const Ja=p[ci];if(Ja.pattern.test(ho))return Ja}};n.valid_elements?(Zt(n.valid_elements),Lf(q,(ho,Us)=>{m[Us]=ho.children})):(Lf(q,(ho,Us)=>{c[Us]={attributes:ho.attributes,attributesOrder:ho.attributesOrder},m[Us]=ho.children}),Lf(Al("strong/b em/i"),ho=>{const Us=Al(ho,"/");c[Us[1]].outputName=Us[0]}),Lf(Hn,(ho,Us)=>{c[Us]&&(n.padd_empty_block_inline_children&&(c[Us].paddInEmptyBlock=!0),c[Us].removeEmpty=!0)}),Lf(Al("ol ul blockquote a table tbody"),ho=>{c[ho]&&(c[ho].removeEmpty=!0)}),Lf(Al("p h1 h2 h3 h4 h5 h6 th td pre div address caption li summary"),ho=>{c[ho]&&(c[ho].paddEmpty=!0)}),Lf(Al("span"),ho=>{c[ho].removeEmptyAttrs=!0})),yn(n.custom_elements),yo(n.valid_children),Lt(n.extended_valid_elements),yo("+ol[ul|ol],+ul[ul|ol]"),Lf({dd:"dl",dt:"dl",li:"ul ol",td:"tr",th:"tr",tr:"tbody thead tfoot",tbody:"table",thead:"table",tfoot:"table",legend:"fieldset",area:"map",param:"video audio object"},(ho,Us)=>{c[Us]&&(c[Us].parentsRequired=Al(ho))}),n.invalid_elements&&Lf(Ry(n.invalid_elements),ho=>{c[ho]&&delete c[ho]}),Do("span")||Lt("span[!data-mce-type|*]");const Cs=Qe(ae),Ws=Qe(fe),Ir=Qe(be),pi=Qe(Ve),fl=Qe(hn),Il=Qe(Pt),Oc=Qe(Hn),Pn=Qe(Object.seal(Me)),eo=Qe(Ye),Cr=Qe(Ot),Bs=Qe(wt),Co=Qe(Le),Mn=Qe($n),En=Qe(Object.seal(x)),jo=(ho,Us)=>{const ci=m[ho.toLowerCase()];return!!(ci&&ci[Us.toLowerCase()])},Ks=(ho,Us)=>{const ci=Do(ho);if(ci)if(Us){if(ci.attributes[Us])return!0;const Ja=ci.attributePatterns;if(Ja){let Ei=Ja.length;for(;Ei--;)if(Ja[Ei].pattern.test(Us))return!0}}else return!0;return!1},Jr=Qe(w);return{type:B,children:m,elements:c,getValidStyles:Cs,getValidClasses:Ir,getBlockElements:fl,getInvalidStyles:Ws,getVoidElements:Pn,getTextBlockElements:Il,getTextInlineElements:Oc,getBoolAttrs:pi,getElementRule:Do,getSelfClosingElements:eo,getNonEmptyElements:Cr,getMoveCaretBeforeOnEnterElements:Bs,getWhitespaceElements:Co,getTransparentElements:Mn,getSpecialElements:En,isValidChild:jo,isValid:Ks,getCustomElements:Jr,addValidElements:Lt,setValidElements:Zt,addCustomElements:yn,addValidChildren:yo}},Qv=(n={},i)=>{const c=/(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi,m=/\s*([^:]+):\s*([^;]+);?/g,p=/\s+$/,w={};let x,M;const B=nn;i&&(x=i.getValidStyles(),M=i.getInvalidStyles());const q=(`\\" \\' \\; \\: ; : `+B).split(" ");for(let fe=0;fe{const be={};let Le=!1;const Ye=n.url_converter,Me=n.url_converter_scope||ae,Ve=(Lt,Zt,yn)=>{const yo=be[Lt+"-top"+Zt];if(!yo)return;const Do=be[Lt+"-right"+Zt];if(!Do)return;const Cs=be[Lt+"-bottom"+Zt];if(!Cs)return;const Ws=be[Lt+"-left"+Zt];if(!Ws)return;const Ir=[yo,Do,Cs,Ws];let pi=Ir.length-1;for(;pi--&&Ir[pi]===Ir[pi+1];);pi>-1&&yn||(be[Lt+Zt]=pi===-1?Ir[0]:Ir.join(" "),delete be[Lt+"-top"+Zt],delete be[Lt+"-right"+Zt],delete be[Lt+"-bottom"+Zt],delete be[Lt+"-left"+Zt])},gt=Lt=>{const Zt=be[Lt];if(!Zt)return;const yn=Zt.indexOf(",")>-1?[Zt]:Zt.split(" ");let yo=yn.length;for(;yo--;)if(yn[yo]!==yn[0])return!1;return be[Lt]=yn[0],!0},Ot=(Lt,Zt,yn,yo)=>{!gt(Zt)||!gt(yn)||!gt(yo)||(be[Lt]=be[Zt]+" "+be[yn]+" "+be[yo],delete be[Zt],delete be[yn],delete be[yo])},wt=Lt=>(Le=!0,w[Lt]),Pt=(Lt,Zt)=>(Le&&(Lt=Lt.replace(/\uFEFF[0-9]/g,yn=>w[yn])),Zt||(Lt=Lt.replace(/\\([\'\";:])/g,"$1")),Lt),hn=Lt=>String.fromCharCode(parseInt(Lt.slice(1),16)),Hn=Lt=>Lt.replace(/\\[0-9a-f]+/gi,hn),$n=(Lt,Zt,yn,yo,Do,Cs)=>{if(Do=Do||Cs,Do)return Do=Pt(Do),"'"+Do.replace(/\'/g,"\\'")+"'";if(Zt=Pt(Zt||yn||yo||""),!n.allow_script_urls){const Ws=Zt.replace(/[\s\r\n]+/g,"");if(/(java|vb)script:/i.test(Ws)||!n.allow_svg_data_urls&&/^data:image\/svg/i.test(Ws))return""}return Ye&&(Zt=Ye.call(Me,Zt,"style")),"url('"+Zt.replace(/\'/g,"\\'")+"')"};if(fe){fe=fe.replace(/[\u0000-\u001F]/g,""),fe=fe.replace(/\\[\"\';:\uFEFF]/g,wt).replace(/\"[^\"]+\"|\'[^\']+\'/g,Zt=>Zt.replace(/[;:]/g,wt));let Lt;for(;Lt=m.exec(fe);){m.lastIndex=Lt.index+Lt[0].length;let Zt=Lt[1].replace(p,"").toLowerCase(),yn=Lt[2].replace(p,"");if(Zt&&yn){if(Zt=Hn(Zt),yn=Hn(yn),Zt.indexOf(B)!==-1||Zt.indexOf('"')!==-1||!n.allow_script_urls&&(Zt==="behavior"||/expression\s*\(|\/\*|\*\//.test(yn)))continue;Zt==="font-weight"&&yn==="700"?yn="bold":(Zt==="color"||Zt==="background-color")&&(yn=yn.toLowerCase()),yn=yn.replace(c,$n),be[Zt]=Le?Pt(yn,!0):yn}}Ve("border","",!0),Ve("border","-width"),Ve("border","-color"),Ve("border","-style"),Ve("padding",""),Ve("margin",""),Ot("border","border-width","border-style","border-color"),be.border==="medium none"&&delete be.border,be["border-image"]==="none"&&delete be["border-image"]}return be},serialize:(fe,be)=>{let Le="";const Ye=(Ve,gt)=>{const Ot=gt[Ve];if(Ot)for(let wt=0,Pt=Ot.length;wt0?" ":"")+hn+": "+Hn+";")}},Me=(Ve,gt)=>{if(!M||!gt)return!0;let Ot=M["*"];return Ot&&Ot[Ve]?!1:(Ot=M[gt],!(Ot&&Ot[Ve]))};return be&&x?(Ye("*",x),Ye(be,x)):ln(fe,(Ve,gt)=>{Ve&&Me(gt,be)&&(Le+=(Le.length>0?" ":"")+gt+": "+Ve+";")}),Le}};return ae},n_={keyLocation:!0,layerX:!0,layerY:!0,returnValue:!0,webkitMovementX:!0,webkitMovementY:!0,keyIdentifier:!0,mozPressure:!0},Ny=n=>n instanceof Event||ce(n.initEvent),ap=n=>n.isDefaultPrevented===mt||n.isDefaultPrevented===je,Ff=n=>Re(n.preventDefault)||Ny(n),mu=(n,i)=>{const c=i!=null?i:{};for(const m in n)fn(n_,m)||(c[m]=n[m]);return Oe(n.composedPath)&&(c.composedPath=()=>n.composedPath()),c},lp=(n,i,c,m)=>{var p;const w=mu(i,m);return w.type=n,Re(w.target)&&(w.target=(p=w.srcElement)!==null&&p!==void 0?p:c),Ff(i)&&(w.preventDefault=()=>{w.defaultPrevented=!0,w.isDefaultPrevented=mt,ce(i.preventDefault)&&i.preventDefault()},w.stopPropagation=()=>{w.cancelBubble=!0,w.isPropagationStopped=mt,ce(i.stopPropagation)&&i.stopPropagation()},w.stopImmediatePropagation=()=>{w.isImmediatePropagationStopped=mt,w.stopPropagation()},ap(w)||(w.isDefaultPrevented=w.defaultPrevented===!0?mt:je,w.isPropagationStopped=w.cancelBubble===!0?mt:je,w.isImmediatePropagationStopped=je)),w},Iy="mce-data-",o_=/^(?:mouse|contextmenu)|click/,p0=(n,i,c,m)=>{n.addEventListener(i,c,m||!1)},Yc=(n,i,c,m)=>{n.removeEventListener(i,c,m||!1)},b0=n=>Oe(n)&&o_.test(n.type),cf=(n,i)=>{const c=lp(n.type,n,document,i);if(b0(n)&&ve(n.pageX)&&!ve(n.clientX)){const m=c.target.ownerDocument||document,p=m.documentElement,w=m.body,x=c;x.pageX=n.clientX+(p&&p.scrollLeft||w&&w.scrollLeft||0)-(p&&p.clientLeft||w&&w.clientLeft||0),x.pageY=n.clientY+(p&&p.scrollTop||w&&w.scrollTop||0)-(p&&p.clientTop||w&&w.clientTop||0)}return c},cp=(n,i,c)=>{const m=n.document,p={type:"ready"};if(c.domLoaded){i(p);return}const w=()=>m.readyState==="complete"||m.readyState==="interactive"&&m.body,x=()=>{Yc(n,"DOMContentLoaded",x),Yc(n,"load",x),c.domLoaded||(c.domLoaded=!0,i(p)),n=null};w()?x():p0(n,"DOMContentLoaded",x),c.domLoaded||p0(n,"load",x)};class cm{constructor(){this.domLoaded=!1,this.events={},this.count=1,this.expando=Iy+(+new Date).toString(32),this.hasFocusIn="onfocusin"in document.documentElement,this.count=1}bind(i,c,m,p){const w=this;let x;const M=window,B=be=>{w.executeHandlers(cf(be||M.event),q)};if(!i||_n(i)||uh(i))return m;let q;i[w.expando]?q=i[w.expando]:(q=w.count++,i[w.expando]=q,w.events[q]={}),p=p||i;const ae=c.split(" ");let fe=ae.length;for(;fe--;){let be=ae[fe],Le=B,Ye=!1,Me=!1;if(be==="DOMContentLoaded"&&(be="ready"),w.domLoaded&&be==="ready"&&i.readyState==="complete"){m.call(p,cf({type:be}));continue}!w.hasFocusIn&&(be==="focusin"||be==="focusout")&&(Ye=!0,Me=be==="focusin"?"focus":"blur",Le=Ve=>{const gt=cf(Ve||M.event);gt.type=gt.type==="focus"?"focusin":"focusout",w.executeHandlers(gt,q)}),x=w.events[q][be],x?be==="ready"&&w.domLoaded?m(cf({type:be})):x.push({func:m,scope:p}):(w.events[q][be]=x=[{func:m,scope:p}],x.fakeName=Me,x.capture=Ye,x.nativeHandler=Le,be==="ready"?cp(i,Le,w):p0(i,Me||be,Le,Ye))}return i=x=null,m}unbind(i,c,m){if(!i||_n(i)||uh(i))return this;const p=i[this.expando];if(p){let w=this.events[p];if(c){const x=c.split(" ");let M=x.length;for(;M--;){const B=x[M],q=w[B];if(q){if(m){let ae=q.length;for(;ae--;)if(q[ae].func===m){const fe=q.nativeHandler,be=q.fakeName,Le=q.capture,Ye=q.slice(0,ae).concat(q.slice(ae+1));Ye.nativeHandler=fe,Ye.fakeName=be,Ye.capture=Le,w[B]=Ye}}(!m||q.length===0)&&(delete w[B],Yc(i,q.fakeName||B,q.nativeHandler,q.capture))}}}else ln(w,(x,M)=>{Yc(i,x.fakeName||M,x.nativeHandler,x.capture)}),w={};for(const x in w)if(fn(w,x))return this;delete this.events[p];try{delete i[this.expando]}catch{i[this.expando]=null}}return this}fire(i,c,m){return this.dispatch(i,c,m)}dispatch(i,c,m){if(!i||_n(i)||uh(i))return this;const p=cf({type:c,target:i},m);do{const w=i[this.expando];w&&this.executeHandlers(p,w),i=i.parentNode||i.ownerDocument||i.defaultView||i.parentWindow}while(i&&!p.isPropagationStopped());return this}clean(i){if(!i||_n(i)||uh(i))return this;if(i[this.expando]&&this.unbind(i),i.getElementsByTagName||(i=i.document),i&&i.getElementsByTagName){this.unbind(i);const c=i.getElementsByTagName("*");let m=c.length;for(;m--;)i=c[m],i[this.expando]&&this.unbind(i)}return this}destroy(){this.events={}}cancel(i){return i&&(i.preventDefault(),i.stopImmediatePropagation()),!1}executeHandlers(i,c){const m=this.events[c],p=m&&m[i.type];if(p)for(let w=0,x=p.length;w{Re(c)||c===""?Vi(n,i):Pr(n,i,c)},v0=n=>n.replace(/[A-Z]/g,i=>"-"+i.toLowerCase()),sb=(n,i)=>{let c=0;if(n)for(let m=n.nodeType,p=n.previousSibling;p;p=p.previousSibling){const w=p.nodeType;i&&_n(p)&&(w===m||!p.data.length)||(c++,m=w)}return c},Ly=(n,i)=>{const c=Fl(i,"style"),m=n.serialize(n.parse(c),ti(i));up(i,Gp,m)},Fy=(n,i)=>Xe(n)?fn(By,i)?n+"":n+"px":n,r_=(n,i,c)=>{const m=v0(i);Re(c)||c===""?Um(n,m):Gl(n,m,Fy(c,m))},jC=(n,i,c)=>{const m=i.keep_values,p={set:(x,M,B)=>{const q=Ke.fromDom(x);ce(i.url_converter)&&Oe(M)&&(M=i.url_converter.call(i.url_converter_scope||c(),String(M),B,x));const ae="data-mce-"+B;up(q,ae,M),up(q,B,M)},get:(x,M)=>{const B=Ke.fromDom(x);return Fl(B,"data-mce-"+M)||Fl(B,M)}},w={style:{set:(x,M)=>{const B=Ke.fromDom(x);m&&up(B,Gp,M),Vi(B,"style"),L(M)&&ua(B,n.parse(M))},get:x=>{const M=Ke.fromDom(x),B=Fl(M,Gp)||Fl(M,"style");return n.serialize(n.parse(B),ti(M))}}};return m&&(w.href=w.src=p),w},Qr=(n,i={})=>{const c={},m=window,p={};let w=0;const x=!0,M=!0,B=Lv.forElement(Ke.fromDom(n),{contentCssCors:i.contentCssCors,referrerPolicy:i.referrerPolicy}),q=[],ae=i.schema?i.schema:wh({}),fe=Qv({url_converter:i.url_converter,url_converter_scope:i.url_converter_scope},i.schema),be=i.ownEvents?new cm:cm.Event,Le=ae.getBlockElements(),Ye=Mt=>L(Mt)?fn(Le,Mt):Jn(Mt)&&(fn(Le,Mt.nodeName)||ig(ae,Mt)),Me=Mt=>Mt&&n&&L(Mt)?n.getElementById(Mt):Mt,Ve=Mt=>{const Rt=Me(Mt);return Oe(Rt)?Ke.fromDom(Rt):null},gt=(Mt,Rt,Rn="")=>{let xn;const Io=Ve(Mt);if(Oe(Io)&&kl(Io)){const br=Rw[Rt];br&&br.get?xn=br.get(Io.dom,Rt):xn=Fl(Io,Rt)}return Oe(xn)?xn:Rn},Ot=Mt=>{const Rt=Me(Mt);return Re(Rt)?[]:Rt.attributes},wt=(Mt,Rt,Rn)=>{eo(Mt,xn=>{if(Jn(xn)){const Io=Ke.fromDom(xn),br=Rn===""?null:Rn,ha=Fl(Io,Rt),Nc=Rw[Rt];Nc&&Nc.set?Nc.set(Io.dom,br,Rt):up(Io,Rt,br),ha!==br&&i.onSetAttrib&&i.onSetAttrib({attrElm:Io.dom,attrName:Rt,attrValue:br})}})},Pt=(Mt,Rt)=>Mt.cloneNode(Rt),hn=()=>i.root_element||n.body,Hn=Mt=>{const Rt=nd(Mt);return{x:Rt.x,y:Rt.y,w:Rt.width,h:Rt.height}},$n=(Mt,Rt)=>WC(n.body,Me(Mt),Rt),Lt=(Mt,Rt,Rn)=>{eo(Mt,xn=>{const Io=Ke.fromDom(xn);r_(Io,Rt,Rn),i.update_styles&&Ly(fe,Io)})},Zt=(Mt,Rt)=>{eo(Mt,Rn=>{const xn=Ke.fromDom(Rn);ln(Rt,(Io,br)=>{r_(xn,br,Io)}),i.update_styles&&Ly(fe,xn)})},yn=(Mt,Rt,Rn)=>{const xn=Me(Mt);if(!(Re(xn)||!Jn(xn)))return Rn?Bi(Ke.fromDom(xn),v0(Rt)):(Rt=Rt.replace(/-(\D)/g,(Io,br)=>br.toUpperCase()),Rt==="float"&&(Rt="cssFloat"),xn.style?xn.style[Rt]:void 0)},yo=Mt=>{const Rt=Me(Mt);if(!Rt)return{w:0,h:0};let Rn=yn(Rt,"width"),xn=yn(Rt,"height");return(!Rn||Rn.indexOf("px")===-1)&&(Rn="0"),(!xn||xn.indexOf("px")===-1)&&(xn="0"),{w:parseInt(Rn,10)||Rt.offsetWidth||Rt.clientWidth,h:parseInt(xn,10)||Rt.offsetHeight||Rt.clientHeight}},Do=Mt=>{const Rt=Me(Mt),Rn=$n(Rt),xn=yo(Rt);return{x:Rn.x,y:Rn.y,w:xn.w,h:xn.h}},Cs=(Mt,Rt)=>{if(!Mt)return!1;const Rn=oe(Mt)?Mt:[Mt];return jt(Rn,xn=>Pu(Ke.fromDom(xn),Rt))},Ws=(Mt,Rt,Rn,xn)=>{const Io=[];let br=Me(Mt);xn=xn===void 0;const ha=Rn||(hn().nodeName!=="BODY"?hn().parentNode:null);if(L(Rt))if(Rt==="*")Rt=Jn;else{const Nc=Rt;Rt=_u=>Cs(_u,Nc)}for(;br&&!(br===ha||Re(br.nodeType)||of(br)||K1(br));){if(!Rt||Rt(br))if(xn)Io.push(br);else return[br];br=br.parentNode}return xn?Io:null},Ir=(Mt,Rt,Rn)=>{const xn=Ws(Mt,Rt,Rn,!1);return xn&&xn.length>0?xn[0]:null},pi=(Mt,Rt,Rn)=>{let xn=Rt;if(Mt){L(Rt)&&(xn=Io=>Cs(Io,Rt));for(let Io=Mt[Rn];Io;Io=Io[Rn])if(ce(xn)&&xn(Io))return Io}return null},fl=(Mt,Rt)=>pi(Mt,Rt,"nextSibling"),Il=(Mt,Rt)=>pi(Mt,Rt,"previousSibling"),Oc=Mt=>ce(Mt.querySelectorAll),Pn=(Mt,Rt)=>{var Rn,xn;const Io=(xn=(Rn=Me(Rt))!==null&&Rn!==void 0?Rn:i.root_element)!==null&&xn!==void 0?xn:n;return Oc(Io)?Rr(Io.querySelectorAll(Mt)):[]},eo=function(Mt,Rt,Rn){const xn=Rn!=null?Rn:this;if(oe(Mt)){const Io=[];return Zv(Mt,(br,ha)=>{const Nc=Me(br);Nc&&Io.push(Rt.call(xn,Nc,ha))}),Io}else{const Io=Me(Mt);return Io?Rt.call(xn,Io):!1}},Cr=(Mt,Rt)=>{eo(Mt,Rn=>{ln(Rt,(xn,Io)=>{wt(Rn,Io,xn)})})},Bs=(Mt,Rt)=>{eo(Mt,Rn=>{const xn=Ke.fromDom(Rn);Mf(xn,Rt)})},Co=(Mt,Rt,Rn,xn,Io)=>eo(Mt,br=>{const ha=L(Rt)?n.createElement(Rt):Rt;return Oe(Rn)&&Cr(ha,Rn),xn&&(!L(xn)&&xn.nodeType?ha.appendChild(xn):L(xn)&&Bs(ha,xn)),Io?ha:br.appendChild(ha)}),Mn=(Mt,Rt,Rn)=>Co(n.createElement(Mt),Mt,Rt,Rn,!0),En=sp.decode,jo=sp.encodeAllRaw,Ks=(Mt,Rt,Rn="")=>{let xn="<"+Mt;for(const Io in Rt)os(Rt,Io)&&(xn+=" "+Io+'="'+jo(Rt[Io])+'"');return ol(Rn)&&fn(ae.getVoidElements(),Mt)?xn+" />":xn+">"+Rn+""},Jr=Mt=>{const Rt=n.createElement("div"),Rn=n.createDocumentFragment();Rn.appendChild(Rt),Mt&&(Rt.innerHTML=Mt);let xn;for(;xn=Rt.firstChild;)Rn.appendChild(xn);return Rn.removeChild(Rt),Rn},ho=(Mt,Rt)=>eo(Mt,Rn=>{const xn=Ke.fromDom(Rn);return Rt&&Ne(Da(xn),Io=>{sl(Io)&&Io.dom.length===0?wr(Io):Ca(xn,Io)}),wr(xn),xn.dom}),Us=Mt=>eo(Mt,Rt=>{const Rn=Rt.attributes;for(let xn=Rn.length-1;xn>=0;xn--)Rt.removeAttributeNode(Rn.item(xn))}),ci=Mt=>fe.parse(Mt),Ja=(Mt,Rt)=>fe.serialize(Mt,Rt),Ei=Mt=>{if(E1!==Qr.DOM&&n===document){if(c[Mt])return;c[Mt]=!0}let Rt=n.getElementById("mceDefaultStyles");if(!Rt){Rt=n.createElement("style"),Rt.id="mceDefaultStyles",Rt.type="text/css";const Rn=n.head;Rn.firstChild?Rn.insertBefore(Rt,Rn.firstChild):Rn.appendChild(Rt)}Rt.styleSheet?Rt.styleSheet.cssText+=Mt:Rt.appendChild(n.createTextNode(Mt))},$c=Mt=>{Mt||(Mt=""),Ne(Mt.split(","),Rt=>{p[Rt]=!0,B.load(Rt).catch(ot)})},Qh=(Mt,Rt,Rn)=>{eo(Mt,xn=>{if(Jn(xn)){const Io=Ke.fromDom(xn),br=Rt.split(" ");Ne(br,ha=>{Oe(Rn)?(Rn?ef:zc)(Io,ha):Gh(Io,ha)})}})},qd=(Mt,Rt)=>{Qh(Mt,Rt,!0)},Dm=(Mt,Rt)=>{Qh(Mt,Rt,!1)},qO=(Mt,Rt)=>{const Rn=Ve(Mt),xn=Rt.split(" ");return Oe(Rn)&&tr(xn,Io=>Pf(Rn,Io))},Pw=Mt=>{eo(Mt,Rt=>Um(Ke.fromDom(Rt),"display"))},GO=Mt=>{eo(Mt,Rt=>Gl(Ke.fromDom(Rt),"display","none"))},KO=Mt=>{const Rt=Ve(Mt);return Oe(Rt)&&Gr(Pa(Rt,"display"),"none")},Z4=Mt=>(Mt||"mce_")+w++,H4=Mt=>{const Rt=Ve(Mt);return Oe(Rt)?Jn(Rt.dom)?Rt.dom.outerHTML:Xg(Rt):""},z4=(Mt,Rt)=>{eo(Mt,Rn=>{Jn(Rn)&&(Rn.outerHTML=Rt)})},FT=(Mt,Rt)=>{const Rn=Me(Rt);return eo(Mt,xn=>{const Io=Rn==null?void 0:Rn.parentNode,br=Rn==null?void 0:Rn.nextSibling;return Io&&(br?Io.insertBefore(xn,br):Io.appendChild(xn)),xn})},QT=(Mt,Rt,Rn)=>eo(Rt,xn=>{var Io;const br=oe(Rt)?Mt.cloneNode(!0):Mt;return Rn&&Zv(s_(xn.childNodes),ha=>{br.appendChild(ha)}),(Io=xn.parentNode)===null||Io===void 0||Io.replaceChild(br,xn),xn}),ZT=(Mt,Rt)=>{if(Mt.nodeName!==Rt.toUpperCase()){const Rn=Mn(Rt);return Zv(Ot(Mt),xn=>{wt(Rn,xn.nodeName,gt(Mt,xn.nodeName))}),QT(Rn,Mt,!0),Rn}else return Mt},cC=(Mt,Rt)=>{let Rn=Mt;for(;Rn;){let xn=Rt;for(;xn&&Rn!==xn;)xn=xn.parentNode;if(Rn===xn)break;Rn=Rn.parentNode}return!Rn&&Mt.ownerDocument?Mt.ownerDocument.documentElement:Rn},T1=Mt=>{if(Jn(Mt)){const Rt=Mt.nodeName.toLowerCase()==="a"&&!gt(Mt,"href")&>(Mt,"id");if(gt(Mt,"name")||gt(Mt,"data-mce-bookmark")||Rt)return!0}return!1},uC=(Mt,Rt,Rn)=>{let xn=0;if(T1(Mt))return!1;const Io=Mt.firstChild;if(Io){const br=new _i(Io,Mt),ha=ae?ae.getWhitespaceElements():{},Nc=Rt||(ae?ae.getNonEmptyElements():null);let _u=Io;do{if(Jn(_u)){const YT=_u.getAttribute("data-mce-bogus");if(YT){_u=br.next(YT==="all");continue}const XT=_u.nodeName.toLowerCase();if(Nc&&Nc[XT]){if(XT==="br"){xn++,_u=br.next();continue}return!1}if(T1(_u))return!1}if(uh(_u)||_n(_u)&&!eg(_u.data)&&(!(Rn!=null&&Rn.includeZwsp)||!Jg(_u.data))||_n(_u)&&_u.parentNode&&ha[_u.parentNode.nodeName]&&eg(_u.data))return!1;_u=br.next()}while(_u)}return xn<=1},Mw=()=>n.createRange(),vv=(Mt,Rt,Rn)=>{let xn=Mw(),Io,br;if(Mt&&Rt&&Mt.parentNode&&Rt.parentNode){const ha=Mt.parentNode;return xn.setStart(ha,sb(Mt)),xn.setEnd(Rt.parentNode,sb(Rt)),Io=xn.extractContents(),xn=Mw(),xn.setStart(Rt.parentNode,sb(Rt)+1),xn.setEnd(ha,sb(Mt)+1),br=xn.extractContents(),ha.insertBefore(ag(E1,Io),Mt),Rn?ha.insertBefore(Rn,Mt):ha.insertBefore(Rt,Mt),ha.insertBefore(ag(E1,br),Mt),ho(Mt),Rn||Rt}else return},HT=(Mt,Rt,Rn,xn)=>{if(oe(Mt)){let Io=Mt.length;const br=[];for(;Io--;)br[Io]=HT(Mt[Io],Rt,Rn,xn);return br}else return i.collect&&(Mt===n||Mt===m)&&q.push([Mt,Rt,Rn,xn]),be.bind(Mt,Rt,Rn,xn||E1)},zT=(Mt,Rt,Rn)=>{if(oe(Mt)){let xn=Mt.length;const Io=[];for(;xn--;)Io[xn]=zT(Mt[xn],Rt,Rn);return Io}else{if(q.length>0&&(Mt===n||Mt===m)){let xn=q.length;for(;xn--;){const[Io,br,ha]=q[xn];Mt===Io&&(!Rt||Rt===br)&&(!Rn||Rn===ha)&&be.unbind(Io,br,ha)}}return be.unbind(Mt,Rt,Rn)}},Ib=(Mt,Rt,Rn)=>be.dispatch(Mt,Rt,Rn),Ov=(Mt,Rt,Rn)=>be.dispatch(Mt,Rt,Rn),VT=Mt=>{if(Mt&&Jn(Mt)){const Rt=Mt.getAttribute("data-mce-contenteditable");return Rt&&Rt!=="inherit"?Rt:Mt.contentEditable!=="inherit"?Mt.contentEditable:null}else return null},E1={doc:n,settings:i,win:m,files:p,stdMode:x,boxModel:M,styleSheetLoader:B,boundEvents:q,styles:fe,schema:ae,events:be,isBlock:Ye,root:null,clone:Pt,getRoot:hn,getViewPort:Hn,getRect:Do,getSize:yo,getParent:Ir,getParents:Ws,get:Me,getNext:fl,getPrev:Il,select:Pn,is:Cs,add:Co,create:Mn,createHTML:Ks,createFragment:Jr,remove:ho,setStyle:Lt,getStyle:yn,setStyles:Zt,removeAllAttribs:Us,setAttrib:wt,setAttribs:Cr,getAttrib:gt,getPos:$n,parseStyle:ci,serializeStyle:Ja,addStyle:Ei,loadCSS:$c,addClass:qd,removeClass:Dm,hasClass:qO,toggleClass:Qh,show:Pw,hide:GO,isHidden:KO,uniqueId:Z4,setHTML:Bs,getOuterHTML:H4,setOuterHTML:z4,decode:En,encode:jo,insertAfter:FT,replace:QT,rename:ZT,findCommonAncestor:cC,run:eo,getAttribs:Ot,isEmpty:uC,createRng:Mw,nodeIndex:sb,split:vv,bind:HT,unbind:zT,fire:Ov,dispatch:Ib,getContentEditable:VT,getContentEditableParent:Mt=>{const Rt=hn();let Rn=null;for(let xn=Mt;xn&&xn!==Rt&&(Rn=VT(xn),Rn===null);xn=xn.parentNode);return Rn},isEditable:Mt=>{if(Oe(Mt)){const Rt=Jn(Mt)?Mt:Mt.parentElement;return Oe(Rt)&&wn(Ke.fromDom(Rt))}else return!1},destroy:()=>{if(q.length>0){let Mt=q.length;for(;Mt--;){const[Rt,Rn,xn]=q[Mt];be.unbind(Rt,Rn,xn)}}ln(p,(Mt,Rt)=>{B.unload(Rt),delete p[Rt]})},isChildOf:(Mt,Rt)=>Mt===Rt||Rt.contains(Mt),dumpRng:Mt=>"startContainer: "+Mt.startContainer.nodeName+", startOffset: "+Mt.startOffset+", endContainer: "+Mt.endContainer.nodeName+", endOffset: "+Mt.endOffset},Rw=jC(fe,i,Qe(E1));return E1};Qr.DOM=Qr(document),Qr.nodeIndex=sb;const Hv=Qr.DOM,Qy=0,Zy=1,O0=2,qC=3;class um{constructor(i={}){this.states={},this.queue=[],this.scriptLoadedCallbacks={},this.queueLoadedCallbacks=[],this.loading=!1,this.settings=i}_setReferrerPolicy(i){this.settings.referrerPolicy=i}loadScript(i){return new Promise((c,m)=>{const p=Hv;let w;const x=()=>{p.remove(q),w&&(w.onerror=w.onload=w=null)},M=()=>{x(),c()},B=()=>{x(),m("Failed to load script: "+i)},q=p.uniqueId();w=document.createElement("script"),w.id=q,w.type="text/javascript",w.src=gn._addCacheSuffix(i),this.settings.referrerPolicy&&p.setAttrib(w,"referrerpolicy",this.settings.referrerPolicy),w.onload=M,w.onerror=B,(document.getElementsByTagName("head")[0]||document.body).appendChild(w)})}isDone(i){return this.states[i]===O0}markDone(i){this.states[i]=O0}add(i){const c=this;return c.queue.push(i),c.states[i]===void 0&&(c.states[i]=Qy),new Promise((p,w)=>{c.scriptLoadedCallbacks[i]||(c.scriptLoadedCallbacks[i]=[]),c.scriptLoadedCallbacks[i].push({resolve:p,reject:w})})}load(i){return this.add(i)}remove(i){delete this.states[i],delete this.scriptLoadedCallbacks[i]}loadQueue(){const i=this.queue;return this.queue=[],this.loadScripts(i)}loadScripts(i){const c=this,m=(B,q)=>{wo(c.scriptLoadedCallbacks,q).each(ae=>{Ne(ae,fe=>fe[B](q))}),delete c.scriptLoadedCallbacks[q]},p=B=>{const q=At(B,ae=>ae.status==="rejected");return q.length>0?Promise.reject($s(q,({reason:ae})=>oe(ae)?ae:[ae])):Promise.resolve()},w=B=>Promise.allSettled(pt(B,q=>c.states[q]===O0?(m("resolve",q),Promise.resolve()):c.states[q]===qC?(m("reject",q),Promise.reject(q)):(c.states[q]=Zy,c.loadScript(q).then(()=>{c.states[q]=O0,m("resolve",q);const ae=c.queue;return ae.length>0?(c.queue=[],w(ae).then(p)):Promise.resolve()},()=>(c.states[q]=qC,m("reject",q),Promise.reject(q)))))),x=B=>(c.loading=!0,w(B).then(q=>{c.loading=!1;const ae=c.queueLoadedCallbacks.shift();return he.from(ae).each(Cn),p(q)})),M=fs(i);return c.loading?new Promise((B,q)=>{c.queueLoadedCallbacks.push(()=>{x(M).then(B,q)})}):x(M)}}um.ScriptLoader=new um;const Ga=n=>{let i=n;return{get:()=>i,set:p=>{i=p}}},y0=(n,i)=>{const c=n.indexOf(i);return c!==-1&&n.indexOf(i,c+1)>c},rb=n=>te(n)&&fn(n,"raw"),i_=n=>oe(n)&&n.length>1,w0={},Hy=Ga("en"),Na=()=>wo(w0,Hy.get()),id={getData:()=>vs(w0,n=>({...n})),setCode:n=>{n&&Hy.set(n)},getCode:()=>Hy.get(),add:(n,i)=>{let c=w0[n];c||(w0[n]=c={});const m=pt(bs(i),p=>p.toLowerCase());ln(i,(p,w)=>{const x=w.toLowerCase();x!==w&&y0(m,x)?(fn(i,x)||(c[x]=p),c[w]=p):c[x]=p})},translate:n=>{const i=Na().getOr({}),c=x=>ce(x)?Object.prototype.toString.call(x):m(x)?"":""+x,m=x=>x===""||x===null||x===void 0,p=x=>{const M=c(x);return fn(i,M)?c(i[M]):wo(i,M.toLowerCase()).map(c).getOr(M)},w=x=>x.replace(/{context:\w+}$/,"");if(m(n))return"";if(rb(n))return c(n.raw);if(i_(n)){const x=n.slice(1),M=p(n[0]).replace(/\{([0-9]+)\}/g,(B,q)=>fn(x,q)?c(x[q]):B);return w(M)}return w(p(n))},isRtl:()=>Na().bind(n=>wo(n,"_dir")).exists(n=>n==="rtl"),hasCode:n=>fn(w0,n)},Ia=()=>{const n=[],i={},c={},m=[],p=(Me,Ve)=>{const gt=At(m,Ot=>Ot.name===Me&&Ot.state===Ve);Ne(gt,Ot=>Ot.resolve())},w=Me=>fn(i,Me),x=Me=>fn(c,Me),M=Me=>{if(c[Me])return c[Me].instance},B=(Me,Ve)=>{const gt=id.getCode(),Ot=","+(Ve||"")+",";!gt||Ve&&Ot.indexOf(","+gt+",")===-1||um.ScriptLoader.add(i[Me]+"/langs/"+gt+".js")},q=(Me,Ve)=>{Ia.languageLoad!==!1&&(w(Me)?B(Me,Ve):Ye(Me,"loaded").then(()=>B(Me,Ve)))},ae=(Me,Ve)=>(n.push(Ve),c[Me]={instance:Ve},p(Me,"added"),Ve),fe=Me=>{delete i[Me],delete c[Me]},be=(Me,Ve)=>L(Ve)?L(Me)?{prefix:"",resource:Ve,suffix:""}:{prefix:Me.prefix,resource:Ve,suffix:Me.suffix}:Ve,Le=(Me,Ve)=>{if(i[Me])return Promise.resolve();let gt=L(Ve)?Ve:Ve.prefix+Ve.resource+Ve.suffix;gt.indexOf("/")!==0&>.indexOf("://")===-1&&(gt=Ia.baseURL+"/"+gt),i[Me]=gt.substring(0,gt.lastIndexOf("/"));const Ot=()=>(p(Me,"loaded"),Promise.resolve());return c[Me]?Ot():um.ScriptLoader.add(gt).then(Ot)},Ye=(Me,Ve="added")=>Ve==="added"&&x(Me)||Ve==="loaded"&&w(Me)?Promise.resolve():new Promise(gt=>{m.push({name:Me,state:Ve,resolve:gt})});return{items:n,urls:i,lookup:c,get:M,requireLangPack:q,add:ae,remove:fe,createUrl:be,load:Le,waitFor:Ye}};Ia.languageLoad=!0,Ia.baseURL="",Ia.PluginManager=Ia(),Ia.ThemeManager=Ia(),Ia.ModelManager=Ia();const Ta=n=>{const i=Ga(he.none()),c=()=>i.get().each(n);return{clear:()=>{c(),i.set(he.none())},isSet:()=>i.get().isSome(),get:()=>i.get(),set:M=>{c(),i.set(he.some(M))}}},KC=n=>{const i=Ga(he.none()),c=()=>i.get().each(M=>clearInterval(M));return{clear:()=>{c(),i.set(he.none())},isSet:()=>i.get().isSome(),get:()=>i.get(),set:M=>{c(),i.set(he.some(setInterval(M,n)))}}},Sh=()=>{const n=Ta(ot);return{...n,on:c=>n.get().each(c)}},_0=(n,i)=>{let c=null;return{cancel:()=>{G(c)||(clearTimeout(c),c=null)},throttle:(...w)=>{G(c)&&(c=setTimeout(()=>{c=null,n.apply(null,w)},i))}}},zv=(n,i)=>{let c=null;const m=()=>{G(c)||(clearTimeout(c),c=null)};return{cancel:m,throttle:(...w)=>{m(),c=setTimeout(()=>{c=null,n.apply(null,w)},i)}}},ad=Qe("mce-annotation"),ff=Qe("data-mce-annotation"),Kp=Qe("data-mce-annotation-uid"),ib=Qe("data-mce-annotation-active"),S0=Qe("data-mce-annotation-classes"),C0=Qe("data-mce-annotation-attrs"),a_=n=>i=>vt(i,n),Vy=(n,i)=>{const c=n.selection.getRng(),m=Ke.fromDom(c.startContainer),p=Ke.fromDom(n.getBody()),w=i.fold(()=>"."+ad(),B=>`[${ff()}="${B}"]`),x=tf(m,c.startOffset).getOr(m);return at(x,w,a_(p)).bind(B=>Va(B,`${Kp()}`).bind(q=>Va(B,`${ff()}`).map(ae=>{const fe=c_(n,q);return{uid:q,name:ae,elements:fe}})))},JC=n=>kl(n)&&Pf(n,ad()),l_=(n,i)=>qi(n,"data-mce-bogus")||Ty(n,'[data-mce-bogus="all"]',a_(i)),c_=(n,i)=>{const c=Ke.fromDom(n.getBody()),m=pl(c,`[${Kp()}="${i}"]`);return At(m,p=>!l_(p,c))},Wy=(n,i)=>{const c=Ke.fromDom(n.getBody()),m=pl(c,`[${ff()}="${i}"]`),p={};return Ne(m,w=>{if(!l_(w,c)){const x=Fl(w,Kp()),M=wo(p,x).getOr([]);p[x]=M.concat([w])}}),p},u_=(n,i)=>{const c=Ga({}),m=()=>({listeners:[],previous:Sh()}),p=(fe,be)=>{w(fe,Le=>(be(Le),Le))},w=(fe,be)=>{const Le=c.get(),Ye=wo(Le,fe).getOrThunk(m),Me=be(Ye);Le[fe]=Me,c.set(Le)},x=(fe,be,Le)=>{p(fe,Ye=>{Ne(Ye.listeners,Me=>Me(!0,fe,{uid:be,nodes:pt(Le,Ve=>Ve.dom)}))})},M=fe=>{p(fe,be=>{Ne(be.listeners,Le=>Le(!1,fe))})},B=(fe,be)=>{Ne(c_(n,fe),Le=>{be?Pr(Le,ib(),"true"):Vi(Le,ib())})},q=zv(()=>{const fe=Ns(i.getNames());Ne(fe,be=>{w(be,Le=>{const Ye=Le.previous.get();return Vy(n,he.some(be)).fold(()=>{Ye.each(Me=>{M(be),Le.previous.clear(),B(Me,!1)})},({uid:Me,name:Ve,elements:gt})=>{Gr(Ye,Me)||(Ye.each(Ot=>B(Ot,!1)),x(Ve,Me,gt),Le.previous.set(Me),B(Me,!0))}),{previous:Le.previous,listeners:Le.listeners}})})},30);return n.on("remove",()=>{q.cancel()}),n.on("NodeChange",()=>{q.throttle()}),{addListener:(fe,be)=>{w(fe,Le=>({previous:Le.previous,listeners:Le.listeners.concat([be])}))}}},EE=(n,i)=>{const c=ff(),m=w=>he.from(w.attr(c)).bind(i.lookup),p=w=>{var x,M;w.attr(Kp(),null),w.attr(ff(),null),w.attr(ib(),null);const B=he.from(w.attr(C0())).map(be=>be.split(",")).getOr([]),q=he.from(w.attr(S0())).map(be=>be.split(",")).getOr([]);Ne(B,be=>w.attr(be,null));const ae=(M=(x=w.attr("class"))===null||x===void 0?void 0:x.split(" "))!==null&&M!==void 0?M:[],fe=wa(ae,[ad()].concat(q));w.attr("class",fe.length>0?fe.join(" "):null),w.attr(S0(),null),w.attr(C0(),null)};n.serializer.addTempAttr(ib()),n.serializer.addAttributeFilter(c,w=>{for(const x of w)m(x).each(M=>{M.persistent===!1&&(x.name==="span"?x.unwrap():p(x))})})},Vv=()=>{const n={};return{register:(p,w)=>{n[p]={name:p,settings:w}},lookup:p=>wo(n,p).map(w=>w.settings),getNames:()=>bs(n)}};let f_=0;const Li=n=>{const c=new Date().getTime(),m=Math.floor(Math.random()*1e9);return f_++,n+"_"+m+f_+String(c)},Wv=(n,i)=>{Ne(i,c=>{ef(n,c)})},Uy=(n,i)=>{Ne(i,c=>{zc(n,c)})},d_=(n,i)=>Ke.fromDom(n.dom.cloneNode(i)),ug=n=>d_(n,!1),pc=n=>d_(n,!0),gu=(n,i)=>{const c=Ke.fromTag(i),m=Kf(n);return Ju(c,m),c},h_=(n,i)=>{const c=gu(n,i);iu(n,c);const m=Da(n);return ni(c,m),wr(n),c},Yy=(n,i,c=je)=>{const m=new _i(n,i),p=w=>{let x;do x=m[w]();while(x&&!_n(x)&&!c(x));return he.from(x).filter(_n)};return{current:()=>he.from(m.current()).filter(_n),next:()=>p("next"),prev:()=>p("prev"),prev2:()=>p("prev2")}},fp=(n,i)=>{const c=i||(x=>n.isBlock(x)||mi(x)||Es(x)),m=(x,M,B,q)=>{if(_n(x)){const ae=q(x,M,x.data);if(ae!==-1)return he.some({container:x,offset:ae})}return B().bind(ae=>m(ae.container,ae.offset,B,q))};return{backwards:(x,M,B,q)=>{const ae=Yy(x,q!=null?q:n.getRoot(),c);return m(x,M,()=>ae.prev().map(fe=>({container:fe,offset:fe.length})),B).getOrNull()},forwards:(x,M,B,q)=>{const ae=Yy(x,q!=null?q:n.getRoot(),c);return m(x,M,()=>ae.next().map(fe=>({container:fe,offset:0})),B).getOrNull()}}},dp=Math.round,Jp=n=>n?{left:dp(n.left),top:dp(n.top),bottom:dp(n.bottom),right:dp(n.right),width:dp(n.width),height:dp(n.height)}:{left:0,top:0,bottom:0,right:0,width:0,height:0},e1=(n,i)=>(n=Jp(n),i||(n.left=n.left+n.width),n.right=n.left,n.width=0,n),fg=(n,i)=>n.left===i.left&&n.top===i.top&&n.bottom===i.bottom&&n.right===i.right,Uv=(n,i,c)=>n>=0&&n<=Math.min(i.height,c.height)/2,sa=(n,i)=>{const c=Math.min(i.height/2,n.height/2);return n.bottom-ci.bottom?!1:Uv(i.top-n.bottom,n,i)},df=(n,i)=>n.top>i.bottom?!0:n.bottomi>=n.left&&i<=n.right&&c>=n.top&&c<=n.bottom,ek=n=>zn(n,(i,c)=>i.fold(()=>he.some(c),m=>{const p=Math.min(c.left,m.left),w=Math.min(c.top,m.top),x=Math.max(c.right,m.right),M=Math.max(c.bottom,m.bottom);return he.some({top:w,right:x,bottom:M,left:p,width:x-p,height:M-w})}),he.none()),Xy=(n,i,c)=>{const m=Math.max(Math.min(i,n.left+n.width),n.left),p=Math.max(Math.min(c,n.top+n.height),n.top);return Math.sqrt((i-m)*(i-m)+(c-p)*(c-p))},tk=(n,i)=>Math.max(0,Math.min(n.bottom,i.bottom)-Math.max(n.top,i.top)),t1=(n,i,c)=>Math.min(Math.max(n,i),c),lb=n=>{const i=n.startContainer,c=n.startOffset;return i===n.endContainer&&i.hasChildNodes()&&n.endOffset===c+1?i.childNodes[c]:null},ld=(n,i)=>{if(Jn(n)&&n.hasChildNodes()){const c=n.childNodes,m=t1(i,0,c.length-1);return c[m]}else return n},jy=(n,i)=>{if(!(i<0&&Jn(n)&&n.hasChildNodes()))return ld(n,i)},m_=new RegExp("[\u0300-\u036F\u0483-\u0487\u0488-\u0489\u0591-\u05BD\u05BF\u05C1-\u05C2\u05C4-\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7-\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962-\u0963\u0981\u09BC\u09BE\u09C1-\u09C4\u09CD\u09D7\u09E2-\u09E3\u0A01-\u0A02\u0A3C\u0A41-\u0A42\u0A47-\u0A48\u0A4B-\u0A4D\u0A51\u0A70-\u0A71\u0A75\u0A81-\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7-\u0AC8\u0ACD\u0AE2-\u0AE3\u0B01\u0B3C\u0B3E\u0B3F\u0B41-\u0B44\u0B4D\u0B56\u0B57\u0B62-\u0B63\u0B82\u0BBE\u0BC0\u0BCD\u0BD7\u0C00\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55-\u0C56\u0C62-\u0C63\u0C81\u0CBC\u0CBF\u0CC2\u0CC6\u0CCC-\u0CCD\u0CD5-\u0CD6\u0CE2-\u0CE3\u0D01\u0D3E\u0D41-\u0D44\u0D4D\u0D57\u0D62-\u0D63\u0DCA\u0DCF\u0DD2-\u0DD4\u0DD6\u0DDF\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB-\u0EBC\u0EC8-\u0ECD\u0F18-\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86-\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039-\u103A\u103D-\u103E\u1058-\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085-\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752-\u1753\u1772-\u1773\u17B4-\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u18A9\u1920-\u1922\u1927-\u1928\u1932\u1939-\u193B\u1A17-\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ABD\u1ABE\u1B00-\u1B03\u1B34\u1B36-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80-\u1B81\u1BA2-\u1BA5\u1BA8-\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8-\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8-\u1CF9\u1DC0-\u1DF5\u1DFC-\u1DFF\u200C-\u200D\u20D0-\u20DC\u20DD-\u20E0\u20E1\u20E2-\u20E4\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302D\u302E-\u302F\u3099-\u309A\uA66F\uA670-\uA672\uA674-\uA67D\uA69E-\uA69F\uA6F0-\uA6F1\uA802\uA806\uA80B\uA825-\uA826\uA8C4\uA8E0-\uA8F1\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9E5\uAA29-\uAA2E\uAA31-\uAA32\uAA35-\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7-\uAAB8\uAABE-\uAABF\uAAC1\uAAEC-\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E-\uFF9F]"),g_=n=>L(n)&&n.charCodeAt(0)>=768&&m_.test(n),nk=(...n)=>i=>{for(let c=0;ci=>{for(let c=0;cn?n.createRange():Qr.DOM.createRng(),qs=n=>L(n)&&/[\r\n\t ]/.test(n),pu=n=>!!n.setStart&&!!n.setEnd,hg=n=>{const i=n.startContainer,c=n.startOffset;if(qs(n.toString())&&v_(i.parentNode)&&_n(i)){const m=i.data;if(qs(m[c-1])||qs(m[c+1]))return!0}return!1},Gy=n=>{const i=n.ownerDocument,c=cb(i),m=i.createTextNode(Kr),p=n.parentNode;p.insertBefore(m,n),c.setStart(m,0),c.setEnd(m,1);const w=Jp(c.getBoundingClientRect());return p.removeChild(m),w},Yi=n=>{const i=n.startContainer,c=n.endContainer,m=n.startOffset,p=n.endOffset;if(i===c&&_n(c)&&m===0&&p===1){const w=n.cloneRange();return w.setEndAfter(c),mg(w)}else return null},Ky=n=>n.left===0&&n.right===0&&n.top===0&&n.bottom===0,mg=n=>{var i;let c;const m=n.getClientRects();return m.length>0?c=Jp(m[0]):c=Jp(n.getBoundingClientRect()),!pu(n)&&dg(n)&&Ky(c)?Gy(n):Ky(c)&&pu(n)&&(i=Yi(n))!==null&&i!==void 0?i:c},Oa=(n,i)=>{const c=e1(n,i);return c.width=1,c.right=c.left+1,c},fm=n=>{const i=[],c=x=>{x.height!==0&&(i.length>0&&fg(x,i[i.length-1])||i.push(x))},m=(x,M)=>{const B=cb(x.ownerDocument);if(M0&&(B.setStart(x,M-1),B.setEnd(x,M),hg(B)||c(Oa(mg(B),!1))),M{const m=()=>(o1(n),i===0),p=()=>o1(n)?i>=n.data.length:i>=n.childNodes.length,w=()=>{const ae=cb(n.ownerDocument);return ae.setStart(n,i),ae.setEnd(n,i),ae},x=()=>(c||(c=fm(Vt(n,i))),c),M=()=>x().length>0,B=ae=>ae&&n===ae.container()&&i===ae.offset(),q=ae=>hf(n,ae?i-1:i);return{container:Qe(n),offset:Qe(i),toRange:w,getClientRects:x,isVisible:M,isAtStart:m,isAtEnd:p,isEqual:B,getNode:q}};Vt.fromRangeStart=n=>Vt(n.startContainer,n.startOffset),Vt.fromRangeEnd=n=>Vt(n.endContainer,n.endOffset),Vt.after=n=>Vt(n.parentNode,Yv(n)+1),Vt.before=n=>Vt(n.parentNode,Yv(n)),Vt.isAbove=(n,i)=>ri($o(i.getClientRects()),Po(n.getClientRects()),sa).getOr(!1),Vt.isBelow=(n,i)=>ri(Po(i.getClientRects()),$o(n.getClientRects()),df).getOr(!1),Vt.isAtStart=n=>n?n.isAtStart():!1,Vt.isAtEnd=n=>n?n.isAtEnd():!1,Vt.isTextPosition=n=>n?_n(n.container()):!1,Vt.isElementPosition=n=>!Vt.isTextPosition(n);const T0=(n,i)=>{_n(i)&&i.data.length===0&&n.remove(i)},Jy=(n,i,c)=>{i.insertNode(c),T0(n,c.previousSibling),T0(n,c.nextSibling)},E0=(n,i,c)=>{const m=he.from(c.firstChild),p=he.from(c.lastChild);i.insertNode(c),m.each(w=>T0(n,w.previousSibling)),p.each(w=>T0(n,w.nextSibling))},Ch=(n,i,c)=>{K1(c)?E0(n,i,c):Jy(n,i,c)},mf=_n,ub=Pd,Xv=Qr.nodeIndex,e2=n=>{const i=n.parentNode;return ub(i)?e2(i):i},jv=n=>n?Ge(n.childNodes,(i,c)=>(ub(c)&&c.nodeName!=="BR"?i=i.concat(jv(c)):i.push(c),i),[]):[],A0=(n,i)=>{let c=n;for(;(c=c.previousSibling)&&mf(c);)i+=c.data.length;return i},kh=n=>i=>n===i,cd=n=>{let i,c;i=jv(e2(n)),c=qe(i,kh(n),n),i=i.slice(0,c+1);const m=Ge(i,(p,w,x)=>(mf(w)&&mf(i[x-1])&&p++,p),0);return i=Qa(i,$f([n.nodeName])),c=qe(i,kh(n),n),c-m},Fu=n=>(mf(n)?"text()":n.nodeName.toLowerCase())+"["+cd(n)+"]",zl=(n,i,c)=>{const m=[];for(let p=i.parentNode;p&&p!==n&&!(c&&c(p));p=p.parentNode)m.push(p);return m},t2=(n,i)=>{let c=[],m=i.container(),p=i.offset(),w;if(mf(m))w=A0(m,p);else{const M=m.childNodes;p>=M.length?(w="after",p=M.length-1):w="before",m=M[p]}c.push(Fu(m));let x=zl(n,m);return x=Qa(x,st(Pd)),c=c.concat(Zi(x,M=>Fu(M))),c.reverse().join("/")+","+w},hp=(n,i,c)=>{let m=jv(n);return m=Qa(m,(p,w)=>!mf(p)||!mf(m[w-1])),m=Qa(m,$f([i])),m[c]},O_=(n,i)=>{let c=n,m=0;for(;mf(c);){const p=c.data.length;if(i>=m&&i<=m+p){n=c,i=i-m;break}if(!mf(c.nextSibling)){n=c,i=p;break}m+=p,c=c.nextSibling}return mf(n)&&i>n.data.length&&(i=n.data.length),Vt(n,i)},D0=(n,i)=>{if(!i)return null;const c=i.split(","),m=c[0].split("/"),p=c.length>1?c[1]:"before",w=Ge(m,(x,M)=>{const B=/([\w\-\(\)]+)\[([0-9]+)\]/.exec(M);return B?(B[1]==="text()"&&(B[1]="#text"),hp(x,B[1],parseInt(B[2],10))):null},n);if(!w)return null;if(!mf(w)&&w.parentNode){let x;return p==="after"?x=Xv(w)+1:x=Xv(w),Vt(w.parentNode,x)}return O_(w,parseInt(p,10))},s1=Es,n2=(n,i,c)=>{let m=n(i.data.slice(0,c)).length;for(let p=i.previousSibling;p&&_n(p);p=p.previousSibling)m+=n(p.data).length;return m},qv=(n,i,c,m,p)=>{const w=p?m.startContainer:m.endContainer;let x=p?m.startOffset:m.endOffset;const M=[],B=n.getRoot();if(_n(w))M.push(c?n2(i,w,x):x);else{let q=0;const ae=w.childNodes;x>=ae.length&&ae.length&&(q=1,x=Math.max(0,ae.length-1)),M.push(n.nodeIndex(ae[x],c)+q)}for(let q=w;q&&q!==B;q=q.parentNode)M.push(n.nodeIndex(q,c));return M},y_=(n,i,c,m)=>{const p=i.dom,w=qv(p,n,c,m,!0),x=i.isForward(),M=oa(m)?{isFakeCaret:!0}:{};if(i.isCollapsed())return{start:w,forward:x,...M};{const B=qv(p,n,c,m,!1);return{start:w,end:B,forward:x,...M}}},Gv=(n,i,c)=>{let m=0;return gn.each(n.select(i),p=>{if(p.getAttribute("data-mce-bogus")!=="all"){if(p===c)return!1;m++;return}}),m},o2=(n,i)=>{let c=i?n.startContainer:n.endContainer,m=i?n.startOffset:n.endOffset;if(Jn(c)&&c.nodeName==="TR"){const p=c.childNodes;c=p[Math.min(i?m:m-1,p.length-1)],c&&(m=i?0:c.childNodes.length,i?n.setStart(c,m):n.setEnd(c,m))}},vl=n=>(o2(n,!0),o2(n,!1),n),ec=(n,i)=>{if(Jn(n)&&(n=ld(n,i),s1(n)))return n;if(_r(n)){_n(n)&&Si(n)&&(n=n.parentNode);let c=n.previousSibling;if(s1(c)||(c=n.nextSibling,s1(c)))return c}},Qu=n=>ec(n.startContainer,n.startOffset)||ec(n.endContainer,n.endOffset),Zr=(n,i,c)=>{const m=c.getNode(),p=c.getRng();if(m.nodeName==="IMG"||s1(m)){const x=m.nodeName;return{name:x,index:Gv(c.dom,x,m)}}const w=Qu(p);if(w){const x=w.tagName;return{name:x,index:Gv(c.dom,x,w)}}return y_(n,c,i,p)},tc=n=>{const i=n.getRng();return{start:t2(n.dom.getRoot(),Vt.fromRangeStart(i)),end:t2(n.dom.getRoot(),Vt.fromRangeEnd(i)),forward:n.isForward()}},Vl=n=>({rng:n.getRng(),forward:n.isForward()}),dm=(n,i,c)=>{const m={"data-mce-type":"bookmark",id:i,style:"overflow:hidden;line-height:0px"};return c?n.create("span",m,""):n.create("span",m)},Sr=(n,i)=>{const c=n.dom;let m=n.getRng();const p=c.uniqueId(),w=n.isCollapsed(),x=n.getNode(),M=x.nodeName,B=n.isForward();if(M==="IMG")return{name:M,index:Gv(c,M,x)};const q=vl(m.cloneRange());if(!w){q.collapse(!1);const fe=dm(c,p+"_end",i);Ch(c,q,fe)}m=vl(m),m.collapse(!0);const ae=dm(c,p+"_start",i);return Ch(c,m,ae),n.moveToBookmark({id:p,keep:!0,forward:B}),{id:p,forward:B}},w_=(n,i,c=!1)=>i===2?Zr(In,c,n):i===3?tc(n):i?Vl(n):Sr(n,!1),bu=He(Zr,Bt,!0),Dl=n=>{const i=w=>w(n),c=Qe(n),m=()=>p,p={tag:!0,inner:n,fold:(w,x)=>x(n),isValue:mt,isError:je,map:w=>bc.value(w(n)),mapError:m,bind:i,exists:i,forall:i,getOr:c,or:m,getOrThunk:c,orThunk:m,getOrDie:c,each:w=>{w(n)},toOptional:()=>he.some(n)};return p},s2=n=>{const i=()=>c,c={tag:!1,inner:n,fold:(m,p)=>m(n),isValue:je,isError:mt,map:i,mapError:m=>bc.error(m(n)),bind:i,exists:je,forall:mt,getOr:Bt,or:Bt,getOrThunk:Et,orThunk:Et,getOrDie:rn(String(n)),each:ot,toOptional:he.none};return c},bc={value:Dl,error:s2,fromOption:(n,i)=>n.fold(()=>s2(i),Dl)},pg={generate:n=>{if(!oe(n))throw new Error("cases must be an array");if(n.length===0)throw new Error("there must be at least one case");const i=[],c={};return Ne(n,(m,p)=>{const w=bs(m);if(w.length!==1)throw new Error("one and only one name per case");const x=w[0],M=m[x];if(c[x]!==void 0)throw new Error("duplicate key detected:"+x);if(x==="cata")throw new Error("cannot have a case named cata (sorry)");if(!oe(M))throw new Error("case arguments must be an array");i.push(x),c[x]=(...B)=>{const q=B.length;if(q!==M.length)throw new Error("Wrong number of arguments to case "+x+". Expected "+M.length+" ("+M+"), got "+q);return{fold:(...fe)=>{if(fe.length!==n.length)throw new Error("Wrong number of arguments to fold. Expected "+n.length+", got "+fe.length);return fe[p].apply(null,B)},match:fe=>{const be=bs(fe);if(i.length!==be.length)throw new Error("Wrong number of arguments to match. Expected: "+i.join(",")+` Actual: `+be.join(","));if(!tr(i,Ye=>kt(be,Ye)))throw new Error("Not all branches were specified when using match. Specified: "+be.join(", ")+` Required: `+i.join(", "));return fe[x].apply(null,B)},log:fe=>{console.log(fe,{constructors:i,constructor:x,params:B})}}}}),c}};pg.generate([{bothErrors:["error1","error2"]},{firstError:["error1","value2"]},{secondError:["value1","error2"]},{bothValues:["value1","value2"]}]);const ok=n=>{const i=[],c=[];return Ne(n,m=>{m.fold(p=>{i.push(p)},p=>{c.push(p)})}),{errors:i,values:c}},sk=n=>n.type==="inline-command"||n.type==="inline-format",r2=n=>n.type==="block-command"||n.type==="block-format",i2=n=>{const i=m=>bc.error({message:m,pattern:n}),c=(m,p,w)=>{if(n.format!==void 0){let x;if(oe(n.format)){if(!tr(n.format,L))return i(m+" pattern has non-string items in the `format` array");x=n.format}else if(L(n.format))x=[n.format];else return i(m+" pattern has non-string `format` parameter");return bc.value(p(x))}else return n.cmd!==void 0?L(n.cmd)?bc.value(w(n.cmd,n.value)):i(m+" pattern has non-string `cmd` parameter"):i(m+" pattern is missing both `format` and `cmd` parameters")};if(!te(n))return i("Raw pattern is not an object");if(!L(n.start))return i("Raw pattern is missing `start` parameter");if(n.end!==void 0){if(!L(n.end))return i("Inline pattern has non-string `end` parameter");if(n.start.length===0&&n.end.length===0)return i("Inline pattern has empty `start` and `end` parameters");let m=n.start,p=n.end;return p.length===0&&(p=m,m=""),c("Inline",w=>({type:"inline-format",start:m,end:p,format:w}),(w,x)=>({type:"inline-command",start:m,end:p,cmd:w,value:x}))}else return n.replacement!==void 0?L(n.replacement)?n.start.length===0?i("Replacement pattern has empty `start` parameter"):bc.value({type:"inline-command",start:"",end:n.start,cmd:"mceInsertContent",value:n.replacement}):i("Replacement pattern has non-string `replacement` parameter"):n.start.length===0?i("Block pattern has empty `start` parameter"):c("Block",m=>({type:"block-format",start:n.start,format:m[0]}),(m,p)=>({type:"block-command",start:n.start,cmd:m,value:p}))},hm=n=>At(n,r2),a2=n=>At(n,sk),r1=(n,i)=>({inlinePatterns:a2(n),blockPatterns:hm(n),dynamicPatternsLookup:i}),Ol=n=>{const i=ok(pt(n,i2));return Ne(i.errors,c=>console.error(c.message,c.pattern)),i.values},Pl=n=>i=>{const c=n(i);return Ol(c)},Tn=ys().deviceType,rk=Tn.isTouch(),nc=Qr.DOM,ik=n=>{const i=n.indexOf("=")>0?n.split(/[;,](?![^=;,]*(?:[;,]|$))/):n.split(",");return zn(i,(c,m)=>{const p=m.split("="),w=p[0],x=p.length>1?p[1]:w;return c[kc(w)]=kc(x),c},{})},l2=n=>K(n,RegExp),no=n=>i=>i.options.get(n),Pc=n=>L(n)||te(n),c2=(n,i="")=>c=>{const m=L(c);if(m)if(c.indexOf("=")!==-1){const p=ik(c);return{value:wo(p,n.id).getOr(i),valid:m}}else return{value:c,valid:m};else return{valid:!1,message:"Must be a string."}},fb=n=>{const i=n.options.register;i("id",{processor:"string",default:n.id}),i("selector",{processor:"string"}),i("target",{processor:"object"}),i("suffix",{processor:"string"}),i("cache_suffix",{processor:"string"}),i("base_url",{processor:"string"}),i("referrer_policy",{processor:"string",default:""}),i("language_load",{processor:"boolean",default:!0}),i("inline",{processor:"boolean",default:!1}),i("iframe_attrs",{processor:"object",default:{}}),i("doctype",{processor:"string",default:""}),i("document_base_url",{processor:"string",default:n.documentBaseUrl}),i("body_id",{processor:c2(n,"tinymce"),default:"tinymce"}),i("body_class",{processor:c2(n),default:""}),i("content_security_policy",{processor:"string",default:""}),i("br_in_pre",{processor:"boolean",default:!0}),i("forced_root_block",{processor:c=>{const m=L(c)&&yr(c);return m?{value:c,valid:m}:{valid:!1,message:"Must be a non-empty string."}},default:"p"}),i("forced_root_block_attrs",{processor:"object",default:{}}),i("newline_behavior",{processor:c=>{const m=kt(["block","linebreak","invert","default"],c);return m?{value:c,valid:m}:{valid:!1,message:"Must be one of: block, linebreak, invert or default."}},default:"default"}),i("br_newline_selector",{processor:"string",default:".mce-toc h2,figcaption,caption"}),i("no_newline_selector",{processor:"string",default:""}),i("keep_styles",{processor:"boolean",default:!0}),i("end_container_on_empty_block",{processor:c=>we(c)?{valid:!0,value:c}:L(c)?{valid:!0,value:c}:{valid:!1,message:"Must be boolean or a string"},default:"blockquote"}),i("font_size_style_values",{processor:"string",default:"xx-small,x-small,small,medium,large,x-large,xx-large"}),i("font_size_legacy_values",{processor:"string",default:"xx-small,small,medium,large,x-large,xx-large,300%"}),i("font_size_classes",{processor:"string",default:""}),i("automatic_uploads",{processor:"boolean",default:!0}),i("images_reuse_filename",{processor:"boolean",default:!1}),i("images_replace_blob_uris",{processor:"boolean",default:!0}),i("icons",{processor:"string",default:""}),i("icons_url",{processor:"string",default:""}),i("images_upload_url",{processor:"string",default:""}),i("images_upload_base_path",{processor:"string",default:""}),i("images_upload_credentials",{processor:"boolean",default:!1}),i("images_upload_handler",{processor:"function"}),i("language",{processor:"string",default:"en"}),i("language_url",{processor:"string",default:""}),i("entity_encoding",{processor:"string",default:"named"}),i("indent",{processor:"boolean",default:!0}),i("indent_before",{processor:"string",default:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,th,ul,ol,li,dl,dt,dd,area,table,thead,tfoot,tbody,tr,section,details,summary,article,hgroup,aside,figure,figcaption,option,optgroup,datalist"}),i("indent_after",{processor:"string",default:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,th,ul,ol,li,dl,dt,dd,area,table,thead,tfoot,tbody,tr,section,details,summary,article,hgroup,aside,figure,figcaption,option,optgroup,datalist"}),i("indent_use_margin",{processor:"boolean",default:!1}),i("indentation",{processor:"string",default:"40px"}),i("content_css",{processor:c=>{const m=c===!1||L(c)||tt(c,L);return m?L(c)?{value:pt(c.split(","),kc),valid:m}:oe(c)?{value:c,valid:m}:c===!1?{value:[],valid:m}:{value:c,valid:m}:{valid:!1,message:"Must be false, a string or an array of strings."}},default:M_(n)?[]:["default"]}),i("content_style",{processor:"string"}),i("content_css_cors",{processor:"boolean",default:!1}),i("font_css",{processor:c=>{const m=L(c)||tt(c,L);return m?{value:oe(c)?c:pt(c.split(","),kc),valid:m}:{valid:!1,message:"Must be a string or an array of strings."}},default:[]}),i("inline_boundaries",{processor:"boolean",default:!0}),i("inline_boundaries_selector",{processor:"string",default:"a[href],code,span.mce-annotation"}),i("object_resizing",{processor:c=>{const m=we(c)||L(c);return m?c===!1||Tn.isiPhone()||Tn.isiPad()?{value:"",valid:m}:{value:c===!0?"table,img,figure.image,div,video,iframe":c,valid:m}:{valid:!1,message:"Must be boolean or a string"}},default:!rk}),i("resize_img_proportional",{processor:"boolean",default:!0}),i("event_root",{processor:"object"}),i("service_message",{processor:"string"}),i("theme",{processor:c=>c===!1||L(c)||ce(c),default:"silver"}),i("theme_url",{processor:"string"}),i("formats",{processor:"object"}),i("format_empty_lines",{processor:"boolean",default:!1}),i("format_noneditable_selector",{processor:"string",default:""}),i("preview_styles",{processor:c=>{const m=c===!1||L(c);return m?{value:c===!1?"":c,valid:m}:{valid:!1,message:"Must be false or a string"}},default:"font-family font-size font-weight font-style text-decoration text-transform color background-color border border-radius outline text-shadow"}),i("custom_ui_selector",{processor:"string",default:""}),i("hidden_input",{processor:"boolean",default:!0}),i("submit_patch",{processor:"boolean",default:!0}),i("encoding",{processor:"string"}),i("add_form_submit_trigger",{processor:"boolean",default:!0}),i("add_unload_trigger",{processor:"boolean",default:!0}),i("custom_undo_redo_levels",{processor:"number",default:0}),i("disable_nodechange",{processor:"boolean",default:!1}),i("readonly",{processor:"boolean",default:!1}),i("editable_root",{processor:"boolean",default:!0}),i("plugins",{processor:"string[]",default:[]}),i("external_plugins",{processor:"object"}),i("forced_plugins",{processor:"string[]"}),i("model",{processor:"string",default:n.hasPlugin("rtc")?"plugin":"dom"}),i("model_url",{processor:"string"}),i("block_unsupported_drop",{processor:"boolean",default:!0}),i("visual",{processor:"boolean",default:!0}),i("visual_table_class",{processor:"string",default:"mce-item-table"}),i("visual_anchor_class",{processor:"string",default:"mce-item-anchor"}),i("iframe_aria_text",{processor:"string",default:"Rich Text Area. Press ALT-0 for help."}),i("setup",{processor:"function"}),i("init_instance_callback",{processor:"function"}),i("url_converter",{processor:"function",default:n.convertURL}),i("url_converter_scope",{processor:"object",default:n}),i("urlconverter_callback",{processor:"function"}),i("allow_conditional_comments",{processor:"boolean",default:!1}),i("allow_html_data_urls",{processor:"boolean",default:!1}),i("allow_svg_data_urls",{processor:"boolean"}),i("allow_html_in_named_anchor",{processor:"boolean",default:!1}),i("allow_script_urls",{processor:"boolean",default:!1}),i("allow_unsafe_link_target",{processor:"boolean",default:!1}),i("convert_fonts_to_spans",{processor:"boolean",default:!0,deprecated:!0}),i("fix_list_elements",{processor:"boolean",default:!1}),i("preserve_cdata",{processor:"boolean",default:!1}),i("remove_trailing_brs",{processor:"boolean",default:!0}),i("pad_empty_with_br",{processor:"boolean",default:!1}),i("inline_styles",{processor:"boolean",default:!0,deprecated:!0}),i("element_format",{processor:"string",default:"html"}),i("entities",{processor:"string"}),i("schema",{processor:"string",default:"html5"}),i("convert_urls",{processor:"boolean",default:!0}),i("relative_urls",{processor:"boolean",default:!0}),i("remove_script_host",{processor:"boolean",default:!0}),i("custom_elements",{processor:"string"}),i("extended_valid_elements",{processor:"string"}),i("invalid_elements",{processor:"string"}),i("invalid_styles",{processor:Pc}),i("valid_children",{processor:"string"}),i("valid_classes",{processor:Pc}),i("valid_elements",{processor:"string"}),i("valid_styles",{processor:Pc}),i("verify_html",{processor:"boolean",default:!0}),i("auto_focus",{processor:c=>L(c)||c===!0}),i("browser_spellcheck",{processor:"boolean",default:!1}),i("protect",{processor:"array"}),i("images_file_types",{processor:"string",default:"jpeg,jpg,jpe,jfi,jif,jfif,png,gif,bmp,webp"}),i("deprecation_warnings",{processor:"boolean",default:!0}),i("a11y_advanced_options",{processor:"boolean",default:!1}),i("api_key",{processor:"string"}),i("paste_block_drop",{processor:"boolean",default:!1}),i("paste_data_images",{processor:"boolean",default:!0}),i("paste_preprocess",{processor:"function"}),i("paste_postprocess",{processor:"function"}),i("paste_webkit_styles",{processor:"string",default:"none"}),i("paste_remove_styles_if_webkit",{processor:"boolean",default:!0}),i("paste_merge_formats",{processor:"boolean",default:!0}),i("smart_paste",{processor:"boolean",default:!0}),i("paste_as_text",{processor:"boolean",default:!1}),i("paste_tab_spaces",{processor:"number",default:4}),i("text_patterns",{processor:c=>tt(c,te)||c===!1?{value:Ol(c===!1?[]:c),valid:!0}:{valid:!1,message:"Must be an array of objects or false."},default:[{start:"*",end:"*",format:"italic"},{start:"**",end:"**",format:"bold"},{start:"#",format:"h1"},{start:"##",format:"h2"},{start:"###",format:"h3"},{start:"####",format:"h4"},{start:"#####",format:"h5"},{start:"######",format:"h6"},{start:"1. ",cmd:"InsertOrderedList"},{start:"* ",cmd:"InsertUnorderedList"},{start:"- ",cmd:"InsertUnorderedList"}]}),i("text_patterns_lookup",{processor:c=>ce(c)?{value:Pl(c),valid:!0}:{valid:!1,message:"Must be a single function"},default:c=>[]}),i("noneditable_class",{processor:"string",default:"mceNonEditable"}),i("editable_class",{processor:"string",default:"mceEditable"}),i("noneditable_regexp",{processor:c=>tt(c,l2)?{value:c,valid:!0}:l2(c)?{value:[c],valid:!0}:{valid:!1,message:"Must be a RegExp or an array of RegExp."},default:[]}),i("table_tab_navigation",{processor:"boolean",default:!0}),i("highlight_on_focus",{processor:"boolean",default:!1}),i("xss_sanitization",{processor:"boolean",default:!0}),i("details_initial_state",{processor:c=>{const m=kt(["inherited","collapsed","expanded"],c);return m?{value:c,valid:m}:{valid:!1,message:"Must be one of: inherited, collapsed, or expanded."}},default:"inherited"}),i("details_serialized_state",{processor:c=>{const m=kt(["inherited","collapsed","expanded"],c);return m?{value:c,valid:m}:{valid:!1,message:"Must be one of: inherited, collapsed, or expanded."}},default:"inherited"}),i("init_content_sync",{processor:"boolean",default:!1}),i("newdocument_content",{processor:"string",default:""}),n.on("ScriptsLoaded",()=>{i("directionality",{processor:"string",default:id.isRtl()?"rtl":void 0}),i("placeholder",{processor:"string",default:nc.getAttrib(n.getElement(),"placeholder")})})},gf=no("iframe_attrs"),Kv=no("doctype"),i1=no("document_base_url"),Qf=no("body_id"),al=no("body_class"),Qd=no("content_security_policy"),Zd=no("br_in_pre"),jc=no("forced_root_block"),db=no("forced_root_block_attrs"),u2=no("newline_behavior"),__=no("br_newline_selector"),f2=no("no_newline_selector"),xh=no("keep_styles"),jr=no("end_container_on_empty_block"),Jv=no("automatic_uploads"),ud=no("images_reuse_filename"),S_=no("images_replace_blob_uris"),C_=no("icons"),fa=no("icons_url"),ak=no("images_upload_url"),eO=no("images_upload_base_path"),tO=no("images_upload_credentials"),k_=no("images_upload_handler"),lk=no("content_css_cors"),hb=no("referrer_policy"),x_=no("language"),ck=no("language_url"),T_=no("indent_use_margin"),uk=no("indentation"),E_=no("content_css"),nO=no("content_style"),mp=no("font_css"),mb=no("directionality"),Xi=no("inline_boundaries_selector"),d2=no("object_resizing"),Mc=no("resize_img_proportional"),gb=no("placeholder"),ll=no("event_root"),A_=no("service_message"),mm=no("theme"),fk=no("theme_url"),oc=no("model"),pf=no("model_url"),P0=no("inline_boundaries"),dk=no("formats"),hk=no("preview_styles"),D_=no("format_empty_lines"),M0=no("format_noneditable_selector"),P_=no("custom_ui_selector"),M_=no("inline"),gp=no("hidden_input"),mk=no("submit_patch"),gk=no("add_form_submit_trigger"),pk=no("add_unload_trigger"),h2=no("custom_undo_redo_levels"),oO=no("disable_nodechange"),bg=no("readonly"),R_=no("editable_root"),$_=no("content_css_cors"),sO=no("plugins"),pb=no("external_plugins"),vg=no("block_unsupported_drop"),rO=no("visual"),iO=no("visual_table_class"),R0=no("visual_anchor_class"),N_=no("iframe_aria_text"),Th=no("setup"),$0=no("init_instance_callback"),I_=no("urlconverter_callback"),Eh=no("auto_focus"),pp=no("browser_spellcheck"),m2=no("protect"),B_=no("paste_block_drop"),aO=no("paste_data_images"),bk=no("paste_preprocess"),L_=no("paste_postprocess"),vk=no("newdocument_content"),Ok=no("paste_webkit_styles"),F_=no("paste_remove_styles_if_webkit"),Q_=no("paste_merge_formats"),Z_=no("smart_paste"),yk=no("paste_as_text"),wk=no("paste_tab_spaces"),_k=no("allow_html_data_urls"),H_=no("text_patterns"),g2=no("text_patterns_lookup"),p2=no("noneditable_class"),Sk=no("editable_class"),Ck=no("noneditable_regexp"),lO=no("preserve_cdata"),z_=no("highlight_on_focus"),cO=no("xss_sanitization"),N0=no("init_content_sync"),bb=n=>n.options.isSet("text_patterns_lookup"),uO=n=>gn.explode(n.options.get("font_size_style_values")),b2=n=>gn.explode(n.options.get("font_size_classes")),V_=n=>n.options.get("encoding")==="xml",v2=n=>gn.explode(n.options.get("images_file_types")),kk=no("table_tab_navigation"),fO=no("details_initial_state"),I0=no("details_serialized_state"),xk=Jn,dO=_n,bf=n=>{const i=n.parentNode;i&&i.removeChild(n)},hO=n=>{const i=In(n);return{count:n.length-i.length,text:i}},W_=n=>{let i;for(;(i=n.data.lastIndexOf(Ft))!==-1;)n.deleteData(i,1)},mO=(n,i)=>(yl(n),i),Tk=(n,i)=>{const c=hO(n.data.substr(0,i.offset())),m=hO(n.data.substr(i.offset()));return(c.text+m.text).length>0?(W_(n),Vt(n,i.offset()-c.count)):i},B0=(n,i)=>{const c=i.container(),m=as(Rr(c.childNodes),n).map(p=>pdO(n)&&i.container()===n?Tk(n,i):mO(n,i),Ek=(n,i)=>i.container()===n.parentNode?B0(n,i):mO(n,i),gO=(n,i)=>Vt.isTextPosition(i)?O2(n,i):Ek(n,i),yl=n=>{xk(n)&&_r(n)&&(Uc(n)?n.removeAttribute("data-mce-caret"):bf(n)),dO(n)&&(W_(n),n.data.length===0&&bf(n))},Ak=Es,vb=sf,Dk=Rd,Ob="*[contentEditable=false],video,audio,embed,object",y2=(n,i,c)=>{const m=e1(i.getBoundingClientRect(),c);let p,w;if(n.tagName==="BODY"){const M=n.ownerDocument.documentElement;p=n.scrollLeft||M.scrollLeft,w=n.scrollTop||M.scrollTop}else{const M=n.getBoundingClientRect();p=n.scrollLeft-M.left,w=n.scrollTop-M.top}m.left+=p,m.right+=p,m.top+=w,m.bottom+=w,m.width=1;let x=i.offsetWidth-i.clientWidth;return x>0&&(c&&(x*=-1),m.left+=x,m.right+=x),m},Pk=n=>{var i,c;const m=pl(Ke.fromDom(n),Ob);for(let p=0;p{const p=Sh();let w,x;const M=jc(n),B=n.dom,q=(Me,Ve)=>{let gt;if(ae(),Dk(Ve))return null;if(c(Ve)){const Ot=dh(M,Ve,Me),wt=y2(i,Ve,Me);B.setStyle(Ot,"top",wt.top),x=Ot;const Pt=B.create("div",{class:"mce-visual-caret","data-mce-bogus":"all"});B.setStyles(Pt,{...wt}),B.add(i,Pt),p.set({caret:Pt,element:Ve,before:Me}),Me&&B.addClass(Pt,"mce-visual-caret-before"),fe(),gt=Ve.ownerDocument.createRange(),gt.setStart(Ot,0),gt.setEnd(Ot,0)}else return x=cu(Ve,Me),gt=Ve.ownerDocument.createRange(),gm(x.nextSibling)?(gt.setStart(x,0),gt.setEnd(x,0)):(gt.setStart(x,1),gt.setEnd(x,1)),gt;return gt},ae=()=>{Pk(i),x&&(yl(x),x=null),p.on(Me=>{B.remove(Me.caret),p.clear()}),w&&(clearInterval(w),w=void 0)},fe=()=>{w=setInterval(()=>{p.on(Me=>{m()?B.toggleClass(Me.caret,"mce-visual-caret-hidden"):B.addClass(Me.caret,"mce-visual-caret-hidden")})},500)};return{show:q,hide:ae,getCss:()=>".mce-visual-caret {position: absolute;background-color: black;background-color: currentcolor;}.mce-visual-caret-hidden {display: none;}*[data-mce-caret] {position: absolute;left: -1000px;right: auto;top: 0;margin: 0;padding: 0;}",reposition:()=>{p.on(Me=>{const Ve=y2(i,Me.element,Me.before);B.setStyles(Me.caret,{...Ve})})},destroy:()=>clearInterval(w)}},L0=()=>qn.browser.isFirefox(),gm=n=>Ak(n)||vb(n),yb=n=>(gm(n)||Iu(n)&&L0())&&wi(Ke.fromDom(n)).exists(wn),vu=ba,a1=Es,U_=sf,Y_=ch("display","block table table-cell table-caption list-item"),w2=_r,_2=Si,S2=Jn,Rk=_n,F0=Tl,pO=n=>n>0,bp=n=>n<0,Q0=(n,i)=>{let c;for(;c=n(i);)if(!_2(c))return c;return null},Ah=(n,i,c,m,p)=>{const w=new _i(n,m),x=a1(n)||_2(n);let M;if(bp(i)){if(x&&(M=Q0(w.prev.bind(w),!0),c(M)))return M;for(;M=Q0(w.prev.bind(w),p);)if(c(M))return M}if(pO(i)){if(x&&(M=Q0(w.next.bind(w),!0),c(M)))return M;for(;M=Q0(w.next.bind(w),p);)if(c(M))return M}return null},$k=(n,i)=>{const c=p=>vu(p.dom),m=p=>p.dom===i;return di(Ke.fromDom(n),c,m).map(p=>p.dom).getOr(i)},pm=(n,i)=>{for(;n&&n!==i;){if(Y_(n))return n;n=n.parentNode}return null},Hd=(n,i,c)=>pm(n.container(),c)===pm(i.container(),c),wb=(n,i)=>{if(!i)return he.none();const c=i.container(),m=i.offset();return S2(c)?he.from(c.childNodes[m+n]):he.none()},C2=(n,i)=>{var c;const p=((c=i.ownerDocument)!==null&&c!==void 0?c:document).createRange();return n?(p.setStartBefore(i),p.setEndBefore(i)):(p.setStartAfter(i),p.setEndAfter(i)),p},_b=(n,i,c)=>pm(i,n)===pm(c,n),Og=(n,i,c)=>{const m=n?"previousSibling":"nextSibling";let p=c;for(;p&&p!==i;){let w=p[m];if(w&&w2(w)&&(w=w[m]),a1(w)||U_(w)){if(_b(i,w,p))return w;break}if(F0(w))break;p=p.parentNode}return null},S=He(C2,!0),A=He(C2,!1),H=(n,i,c)=>{let m;const p=He(Og,!0,i),w=He(Og,!1,i),x=c.startContainer,M=c.startOffset;if(Si(x)){const B=Rk(x)?x.parentNode:x,q=B.getAttribute("data-mce-caret");if(q==="before"&&(m=B.nextSibling,yb(m)))return S(m);if(q==="after"&&(m=B.previousSibling,yb(m)))return A(m)}if(!c.collapsed)return c;if(_n(x)){if(w2(x)){if(n===1){if(m=w(x),m)return S(m);if(m=p(x),m)return A(m)}if(n===-1){if(m=p(x),m)return A(m);if(m=w(x),m)return S(m)}return c}if(hr(x)&&M>=x.data.length-1)return n===1&&(m=w(x),m)?S(m):c;if(hh(x)&&M<=1)return n===-1&&(m=p(x),m)?A(m):c;if(M===x.data.length)return m=w(x),m?S(m):c;if(M===0)return m=p(x),m?A(m):c}return c},le=(n,i)=>wb(n?0:-1,i).filter(a1),Ce=(n,i,c)=>{const m=H(n,i,c);return n===-1?Vt.fromRangeStart(m):Vt.fromRangeEnd(m)},We=n=>he.from(n.getNode()).map(Ke.fromDom),ht=n=>he.from(n.getNode(!0)).map(Ke.fromDom),St=(n,i)=>{let c=i;for(;c=n(c);)if(c.isVisible())return c;return c},zt=(n,i)=>{const c=Hd(n,i);return!c&&mi(n.getNode())?!0:c};var vn;(function(n){n[n.Backwards=-1]="Backwards",n[n.Forwards=1]="Forwards"})(vn||(vn={}));const Zn=Es,Vn=_n,Fo=Jn,ms=mi,Is=Tl,Hr=om,Zs=Kg,gi=(n,i)=>{const c=[];let m=n;for(;m&&m!==i;)c.push(m),m=m.parentNode;return c},ki=(n,i)=>n.hasChildNodes()&&i{if(pO(n)){if(Is(i.previousSibling)&&!Vn(i.previousSibling))return Vt.before(i);if(Vn(i))return Vt(i,0)}if(bp(n)){if(Is(i.nextSibling)&&!Vn(i.nextSibling))return Vt.after(i);if(Vn(i))return Vt(i,i.data.length)}return bp(n)?ms(i)?Vt.before(i):Vt.after(i):Vt.before(i)},Zu=(n,i)=>{const c=i.nextSibling;return c&&Is(c)?Vn(c)?Vt(c,0):Vt.before(c):Zf(vn.Forwards,Vt.after(i),n)},Zf=(n,i,c)=>{let m,p,w,x;if(!Fo(c)||!i)return null;if(i.isEqual(Vt.after(c))&&c.lastChild){if(x=Vt.after(c.lastChild),bp(n)&&Is(c.lastChild)&&Fo(c.lastChild))return ms(c.lastChild)?Vt.before(c.lastChild):x}else x=i;const M=x.container();let B=x.offset();if(Vn(M)){if(bp(n)&&B>0)return Vt(M,--B);if(pO(n)&&B0&&(p=ki(M,B-1),Is(p)))return!Hr(p)&&(w=Ah(p,n,Zs,p),w)?Vn(w)?Vt(w,w.data.length):Vt.after(w):Vn(p)?Vt(p,p.data.length):Vt.before(p);if(pO(n)&&B({next:i=>Zf(vn.Forwards,i,n),prev:i=>Zf(vn.Backwards,i,n)}),bm=(n,i,c)=>{const m=n?Vt.before(c):Vt.after(c);return zd(n,i,m)},fd=n=>mi(n)?Vt.before(n):Vt.after(n),k2=n=>Vt.isTextPosition(n)?n.offset()===0:Tl(n.getNode()),yu=n=>{if(Vt.isTextPosition(n)){const i=n.container();return n.offset()===i.data.length}else return Tl(n.getNode(!0))},X_=(n,i)=>!Vt.isTextPosition(n)&&!Vt.isTextPosition(i)&&n.getNode()===i.getNode(!0),Z0=n=>!Vt.isTextPosition(n)&&mi(n.getNode()),H0=(n,i,c)=>n?!X_(i,c)&&!Z0(i)&&yu(i)&&k2(c):!X_(c,i)&&k2(i)&&yu(c),zd=(n,i,c)=>{const m=Ea(i);return he.from(n?m.next(c):m.prev(c))},Sb=(n,i,c)=>zd(n,i,c).bind(m=>Hd(c,m,i)&&H0(n,c,m)?zd(n,i,m):he.some(m)),Nk=(n,i,c,m)=>Sb(n,i,c).bind(p=>m(p)?Nk(n,i,p,m):he.some(p)),bO=(n,i)=>{const c=n?i.firstChild:i.lastChild;return _n(c)?he.some(Vt(c,n?0:c.data.length)):c?Tl(c)?he.some(n?Vt.before(c):fd(c)):bm(n,i,c):he.none()},Hf=He(zd,!0),Hu=He(zd,!1),cl=He(bO,!0),Vd=He(bO,!1),j_="_mce_caret",qc=n=>Jn(n)&&n.id===j_,Cb=(n,i)=>{let c=i;for(;c&&c!==n;){if(qc(c))return c;c=c.parentNode}return null},vO=n=>L(n.start),x2=n=>fn(n,"rng"),Ik=n=>fn(n,"id"),Bk=n=>fn(n,"name"),l1=n=>gn.isArray(n.start),T2=n=>!Bk(n)&&we(n.forward)?n.forward:!0,yg=(n,i)=>(Jn(i)&&n.isBlock(i)&&!i.innerHTML&&(i.innerHTML='
'),i),rP=(n,i)=>{const c=he.from(D0(n.getRoot(),i.start)),m=he.from(D0(n.getRoot(),i.end));return ri(c,m,(p,w)=>{const x=n.createRng();return x.setStart(p.container(),p.offset()),x.setEnd(w.container(),w.offset()),{range:x,forward:T2(i)}})},Lk=(n,i)=>{var c;const p=((c=n.ownerDocument)!==null&&c!==void 0?c:document).createTextNode(Ft);n.appendChild(p),i.setStart(p,0),i.setEnd(p,0)},DE=n=>!n.hasChildNodes(),bI=(n,i)=>Vd(n).fold(je,c=>(i.setStart(c.container(),c.offset()),i.setEnd(c.container(),c.offset()),!0)),PE=(n,i,c)=>DE(i)&&Cb(n,i)?(Lk(i,c),!0):!1,ME=(n,i,c,m)=>{const p=c[i?"start":"end"],w=n.getRoot();if(p){let x=w,M=p[0];for(let B=p.length-1;x&&B>=1;B--){const q=x.childNodes;if(PE(w,x,m))return!0;if(p[B]>q.length-1)return PE(w,x,m)?!0:bI(x,m);x=q[p[B]]}_n(x)&&(M=Math.min(p[0],x.data.length)),Jn(x)&&(M=Math.min(p[0],x.childNodes.length)),i?m.setStart(x,M):m.setEnd(x,M)}return!0},Fk=n=>_n(n)&&n.data.length>0,Qk=(n,i,c)=>{const m=n.get(c.id+"_"+i),p=m==null?void 0:m.parentNode,w=c.keep;if(m&&p){let x,M;if(i==="start"?w?m.hasChildNodes()?(x=m.firstChild,M=1):Fk(m.nextSibling)?(x=m.nextSibling,M=0):Fk(m.previousSibling)?(x=m.previousSibling,M=m.previousSibling.data.length):(x=p,M=n.nodeIndex(m)+1):(x=p,M=n.nodeIndex(m)):w?m.hasChildNodes()?(x=m.firstChild,M=1):Fk(m.previousSibling)?(x=m.previousSibling,M=m.previousSibling.data.length):(x=p,M=n.nodeIndex(m)):(x=p,M=n.nodeIndex(m)),!w){const B=m.previousSibling,q=m.nextSibling;gn.each(gn.grep(m.childNodes),fe=>{_n(fe)&&(fe.data=fe.data.replace(/\uFEFF/g,""))});let ae;for(;ae=n.get(c.id+"_"+i);)n.remove(ae,!0);if(_n(q)&&_n(B)&&!qn.browser.isOpera()){const fe=B.data.length;B.appendData(q.data),n.remove(q),x=B,M=fe}}return he.some(Vt(x,M))}else return he.none()},Zk=(n,i)=>{const c=n.createRng();return ME(n,!0,i,c)&&ME(n,!1,i,c)?he.some({range:c,forward:T2(i)}):he.none()},RE=(n,i)=>{const c=Qk(n,"start",i),m=Qk(n,"end",i);return ri(c,m.or(c),(p,w)=>{const x=n.createRng();return x.setStart(yg(n,p.container()),p.offset()),x.setEnd(yg(n,w.container()),w.offset()),{range:x,forward:T2(i)}})},$E=(n,i)=>he.from(n.select(i.name)[i.index]).map(c=>{const m=n.createRng();return m.selectNode(c),{range:m,forward:!0}}),NE=(n,i)=>{const c=n.dom;if(i){if(l1(i))return Zk(c,i);if(vO(i))return rP(c,i);if(Ik(i))return RE(c,i);if(Bk(i))return $E(c,i);if(x2(i))return he.some({range:i.rng,forward:T2(i)})}return he.none()},iP=(n,i,c)=>w_(n,i,c),aP=(n,i)=>{NE(n,i).each(({range:c,forward:m})=>{n.setRng(c,m)})},Wd=n=>Jn(n)&&n.tagName==="SPAN"&&n.getAttribute("data-mce-type")==="bookmark",Gs=(n=>i=>n===i)(Kr),Dh=n=>n!==""&&` \f @@ -173,12 +173,12 @@ Required: `+j.join(", "));return sr[Sn].apply(null,Uo)},log:sr=>{console.log(sr, constructor(\${params}) { \${} } -}`,{label:"class",detail:"definition",type:"keyword"}),$p('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),$p('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],VRe=uOe.concat([$p("interface ${name} {\n ${}\n}",{label:"interface",detail:"definition",type:"keyword"}),$p("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),$p("enum ${name} {\n ${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),_he=new Ybe,fOe=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function UN(o){return(e,t)=>{let s=e.node.getChild("VariableDefinition");return s&&t(s,o),!0}}const WRe=["FunctionDeclaration"],URe={FunctionDeclaration:UN("function"),ClassDeclaration:UN("class"),ClassExpression:()=>!0,EnumDeclaration:UN("constant"),TypeAliasDeclaration:UN("type"),NamespaceDeclaration:UN("namespace"),VariableDefinition(o,e){o.matchContext(WRe)||e(o,"variable")},TypeDefinition(o,e){e(o,"type")},__proto__:null};function dOe(o,e){let t=_he.get(e);if(t)return t;let s=[],a=!0;function l(u,d){let h=o.sliceString(u.from,u.to);s.push({label:h,type:d})}return e.cursor(wc.IncludeAnonymous).iterate(u=>{if(a)a=!1;else if(u.name){let d=URe[u.name];if(d&&d(u,l)||fOe.has(u.name))return!1}else if(u.to-u.from>8192){for(let d of dOe(o,u.node))s.push(d);return!1}}),_he.set(e,s),s}const She=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,hOe=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName",".","?."];function YRe(o){let e=_c(o.state).resolveInner(o.pos,-1);if(hOe.indexOf(e.name)>-1)return null;let t=e.name=="VariableName"||e.to-e.from<20&&She.test(o.state.sliceDoc(e.from,e.to));if(!t&&!o.explicit)return null;let s=[];for(let a=e;a;a=a.parent)fOe.has(a.name)&&(s=s.concat(dOe(o.state.doc,a)));return{options:s,from:t?e.from:o.pos,validFor:She}}const gy=pE.define({name:"javascript",parser:zRe.configure({props:[GD.add({IfStatement:SD({except:/^\s*({|else\b)/}),TryStatement:SD({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:f4e,SwitchBody:o=>{let e=o.textAfter,t=/^\s*\}/.test(e),s=/^\s*(case|default)\b/.test(e);return o.baseIndent+(t?0:s?1:2)*o.unit},Block:u4e({closing:"}"}),ArrowFunction:o=>o.baseIndent+o.unit,"TemplateString BlockComment":()=>null,"Statement Property":SD({except:/^{/}),JSXElement(o){let e=/^\s*<\//.test(o.textAfter);return o.lineIndent(o.node.from)+(e?0:o.unit)},JSXEscape(o){let e=/\s*\}/.test(o.textAfter);return o.lineIndent(o.node.from)+(e?0:o.unit)},"JSXOpenTag JSXSelfClosingTag"(o){return o.column(o.node.from)+o.unit}}),KD.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":Dre,BlockComment(o){return{from:o.from+2,to:o.to-2}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),mOe={test:o=>/^JSX/.test(o.name),facet:xre({commentTokens:{block:{open:"{/*",close:"*/}"}}})},gOe=gy.configure({dialect:"ts"},"typescript"),pOe=gy.configure({dialect:"jsx",props:[Tre.add(o=>o.isTop?[mOe]:void 0)]}),bOe=gy.configure({dialect:"jsx ts",props:[Tre.add(o=>o.isTop?[mOe]:void 0)]},"typescript");let vOe=o=>({label:o,type:"keyword"});const OOe="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(vOe),XRe=OOe.concat(["declare","implements","private","protected","public"].map(vOe));function jRe(o={}){let e=o.jsx?o.typescript?bOe:pOe:o.typescript?gOe:gy,t=o.typescript?VRe.concat(XRe):uOe.concat(OOe);return new $D(e,[gy.data.of({autocomplete:xPe(hOe,ove(t))}),gy.data.of({autocomplete:YRe}),o.jsx?KRe:[]])}function qRe(o){for(;;){if(o.name=="JSXOpenTag"||o.name=="JSXSelfClosingTag"||o.name=="JSXFragmentTag")return o;if(o.name=="JSXEscape"||!o.parent)return null;o=o.parent}}function Che(o,e,t=o.length){for(let s=e==null?void 0:e.firstChild;s;s=s.nextSibling)if(s.name=="JSXIdentifier"||s.name=="JSXBuiltin"||s.name=="JSXNamespacedName"||s.name=="JSXMemberExpression")return o.sliceString(s.from,Math.min(s.to,t));return""}const GRe=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),KRe=is.inputHandler.of((o,e,t,s,a)=>{if((GRe?o.composing:o.compositionStarted)||o.state.readOnly||e!=t||s!=">"&&s!="/"||!gy.isActiveAt(o.state,e,-1))return!1;let l=a(),{state:u}=l,d=u.changeByRange(h=>{var b;let{head:y}=h,C=_c(u).resolveInner(y-1,-1),E;if(C.name=="JSXStartTag"&&(C=C.parent),!(u.doc.sliceString(y-1,y)!=s||C.name=="JSXAttributeValue"&&C.to>y)){if(s==">"&&C.name=="JSXFragmentTag")return{range:h,changes:{from:y,insert:""}};if(s=="/"&&C.name=="JSXStartCloseTag"){let R=C.parent,$=R.parent;if($&&R.from==y-2&&((E=Che(u.doc,$.firstChild,y))||((b=$.firstChild)===null||b===void 0?void 0:b.name)=="JSXFragmentTag")){let Q=`${E}>`;return{range:Ln.cursor(y+Q.length,-1),changes:{from:y,insert:Q}}}}else if(s==">"){let R=qRe(C);if(R&&!/^\/?>|^<\//.test(u.doc.sliceString(y,y+2))&&(E=Che(u.doc,R,y)))return{range:h,changes:{from:y,insert:``}}}}return{range:h}});return d.changes.empty?!1:(o.dispatch([l,u.update(d,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),YN=["_blank","_self","_top","_parent"],soe=["ascii","utf-8","utf-16","latin1","latin1"],roe=["get","post","put","delete"],ioe=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],M1=["true","false"],zs={},JRe={a:{attrs:{href:null,ping:null,type:null,media:null,target:YN,hreflang:null}},abbr:zs,address:zs,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:zs,aside:zs,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:zs,base:{attrs:{href:null,target:YN}},bdi:zs,bdo:zs,blockquote:{attrs:{cite:null}},body:zs,br:zs,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:ioe,formmethod:roe,formnovalidate:["novalidate"],formtarget:YN,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:zs,center:zs,cite:zs,code:zs,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["disabled"],checked:["checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["disabled"],multiple:["multiple"]}},datalist:{attrs:{data:null}},dd:zs,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:zs,div:zs,dl:zs,dt:zs,em:zs,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:zs,figure:zs,footer:zs,form:{attrs:{action:null,name:null,"accept-charset":soe,autocomplete:["on","off"],enctype:ioe,method:roe,novalidate:["novalidate"],target:YN}},h1:zs,h2:zs,h3:zs,h4:zs,h5:zs,h6:zs,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:zs,hgroup:zs,hr:zs,html:{attrs:{manifest:null}},i:zs,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["autofocus"],checked:["checked"],disabled:["disabled"],formenctype:ioe,formmethod:roe,formnovalidate:["novalidate"],formtarget:YN,multiple:["multiple"],readonly:["readonly"],required:["required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:zs,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:zs,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:zs,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:soe,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:zs,noscript:zs,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["typemustmatch"]}},ol:{attrs:{reversed:["reversed"],start:null,type:["1","a","A","i","I"]},children:["li","script","template","ul","ol"]},optgroup:{attrs:{disabled:["disabled"],label:null}},option:{attrs:{disabled:["disabled"],label:null,selected:["selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:zs,param:{attrs:{name:null,value:null}},pre:zs,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:zs,rt:zs,ruby:zs,samp:zs,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:soe}},section:zs,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:zs,source:{attrs:{src:null,type:null,media:null}},span:zs,strong:zs,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:zs,summary:zs,sup:zs,table:zs,tbody:zs,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:zs,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["autofocus"],disabled:["disabled"],readonly:["readonly"],required:["required"],wrap:["soft","hard"]}},tfoot:zs,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:zs,time:{attrs:{datetime:null}},title:zs,tr:zs,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:zs,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["autoplay"],mediagroup:["movie"],muted:["muted"],controls:["controls"]}},wbr:zs},yOe={accesskey:null,class:null,contenteditable:M1,contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["ar","bn","de","en-GB","en-US","es","fr","hi","id","ja","pa","pt","ru","tr","zh"],spellcheck:M1,autocorrect:M1,autocapitalize:M1,style:null,tabindex:null,title:null,translate:["yes","no"],rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"],role:"alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer".split(" "),"aria-activedescendant":null,"aria-atomic":M1,"aria-autocomplete":["inline","list","both","none"],"aria-busy":M1,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":M1,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":M1,"aria-hidden":M1,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":M1,"aria-multiselectable":M1,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":M1,"aria-relevant":null,"aria-required":M1,"aria-selected":["true","false","undefined"],"aria-setsize":null,"aria-sort":["ascending","descending","none","other"],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},wOe="beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload".split(" ").map(o=>"on"+o);for(let o of wOe)yOe[o]=null;class z6{constructor(e,t){this.tags=Object.assign(Object.assign({},JRe),e),this.globalAttrs=Object.assign(Object.assign({},yOe),t),this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}}z6.default=new z6;function LD(o,e,t=o.length){if(!e)return"";let s=e.firstChild,a=s&&s.getChild("TagName");return a?o.sliceString(a.from,Math.min(a.to,t)):""}function FD(o,e=!1){for(;o;o=o.parent)if(o.name=="Element")if(e)e=!1;else return o;return null}function _Oe(o,e,t){let s=t.tags[LD(o,FD(e))];return(s==null?void 0:s.children)||t.allTags}function Jre(o,e){let t=[];for(let s=FD(e);s&&!s.type.isTop;s=FD(s.parent)){let a=LD(o,s);if(a&&s.lastChild.name=="CloseTag")break;a&&t.indexOf(a)<0&&(e.name=="EndTag"||e.from>=s.firstChild.to)&&t.push(a)}return t}const SOe=/^[:\-\.\w\u00b7-\uffff]*$/;function khe(o,e,t,s,a){let l=/\s*>/.test(o.sliceDoc(a,a+5))?"":">",u=FD(t,!0);return{from:s,to:a,options:_Oe(o.doc,u,e).map(d=>({label:d,type:"type"})).concat(Jre(o.doc,t).map((d,h)=>({label:"/"+d,apply:"/"+d+l,type:"type",boost:99-h}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function xhe(o,e,t,s){let a=/\s*>/.test(o.sliceDoc(s,s+5))?"":">";return{from:t,to:s,options:Jre(o.doc,e).map((l,u)=>({label:l,apply:l+a,type:"type",boost:99-u})),validFor:SOe}}function e$e(o,e,t,s){let a=[],l=0;for(let u of _Oe(o.doc,t,e))a.push({label:"<"+u,type:"type"});for(let u of Jre(o.doc,t))a.push({label:"",type:"type",boost:99-l++});return{from:s,to:s,options:a,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}function t$e(o,e,t,s,a){let l=FD(t),u=l?e.tags[LD(o.doc,l)]:null,d=u&&u.attrs?Object.keys(u.attrs):[],h=u&&u.globalAttrs===!1?d:d.length?d.concat(e.globalAttrNames):e.globalAttrNames;return{from:s,to:a,options:h.map(b=>({label:b,type:"property"})),validFor:SOe}}function n$e(o,e,t,s,a){var l;let u=(l=t.parent)===null||l===void 0?void 0:l.getChild("AttributeName"),d=[],h;if(u){let b=o.sliceDoc(u.from,u.to),y=e.globalAttrs[b];if(!y){let C=FD(t),E=C?e.tags[LD(o.doc,C)]:null;y=(E==null?void 0:E.attrs)&&E.attrs[b]}if(y){let C=o.sliceDoc(s,a).toLowerCase(),E='"',R='"';/^['"]/.test(C)?(h=C[0]=='"'?/^[^"]*$/:/^[^']*$/,E="",R=o.sliceDoc(a,a+1)==C[0]?"":C[0],C=C.slice(1),s++):h=/^[^\s<>='"]*$/;for(let $ of y)d.push({label:$,apply:E+$+R,type:"constant"})}}return{from:s,to:a,options:d,validFor:h}}function COe(o,e){let{state:t,pos:s}=e,a=_c(t).resolveInner(s,-1),l=a.resolve(s);for(let u=s,d;l==a&&(d=a.childBefore(u));){let h=d.lastChild;if(!h||!h.type.isError||h.fromCOe(s,a)}const r$e=gy.parser.configure({top:"SingleExpression"}),kOe=[{tag:"script",attrs:o=>o.type=="text/typescript"||o.lang=="ts",parser:gOe.parser},{tag:"script",attrs:o=>o.type=="text/babel"||o.type=="text/jsx",parser:pOe.parser},{tag:"script",attrs:o=>o.type=="text/typescript-jsx",parser:bOe.parser},{tag:"script",attrs:o=>o.type=="importmap"||o.type=="speculationrules",parser:r$e},{tag:"script",attrs(o){return!o.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(o.type)},parser:gy.parser},{tag:"style",attrs(o){return(!o.lang||o.lang=="css")&&(!o.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(o.type))},parser:Zz.parser}],xOe=[{name:"style",parser:Zz.parser.configure({top:"Styles"})}].concat(wOe.map(o=>({name:o,parser:gy.parser}))),TOe=pE.define({name:"html",parser:qMe.configure({props:[GD.add({Element(o){let e=/^(\s*)(<\/)?/.exec(o.textAfter);return o.node.to<=o.pos+e[0].length?o.continue():o.lineIndent(o.node.from)+(e[2]?0:o.unit)},"OpenTag CloseTag SelfClosingTag"(o){return o.column(o.node.from)+o.unit},Document(o){if(o.pos+/\s*/.exec(o.textAfter)[0].lengtho.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:""}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-._"}}),zH=TOe.configure({wrap:rOe(kOe,xOe)});function i$e(o={}){let e="",t;o.matchClosingTags===!1&&(e="noMatch"),o.selfClosingTags===!0&&(e=(e?e+" ":"")+"selfClosing"),(o.nestedLanguages&&o.nestedLanguages.length||o.nestedAttributes&&o.nestedAttributes.length)&&(t=rOe((o.nestedLanguages||[]).concat(kOe),(o.nestedAttributes||[]).concat(xOe)));let s=t?TOe.configure({wrap:t,dialect:e}):e?zH.configure({dialect:e}):zH;return new $D(s,[zH.data.of({autocomplete:s$e(o)}),o.autoCloseTags!==!1?a$e:[],jRe().support,_Re().support])}const The=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")),a$e=is.inputHandler.of((o,e,t,s,a)=>{if(o.composing||o.state.readOnly||e!=t||s!=">"&&s!="/"||!zH.isActiveAt(o.state,e,-1))return!1;let l=a(),{state:u}=l,d=u.changeByRange(h=>{var b,y,C;let E=u.doc.sliceString(h.from-1,h.to)==s,{head:R}=h,$=_c(u).resolveInner(R-1,-1),Q;if(($.name=="TagName"||$.name=="StartTag")&&($=$.parent),E&&s==">"&&$.name=="OpenTag"){if(((y=(b=$.parent)===null||b===void 0?void 0:b.lastChild)===null||y===void 0?void 0:y.name)!="CloseTag"&&(Q=LD(u.doc,$.parent,R))&&!The.has(Q)){let F=R+(u.doc.sliceString(R,R+1)===">"?1:0),U=``;return{range:h,changes:{from:R,to:F,insert:U}}}}else if(E&&s=="/"&&$.name=="IncompleteCloseTag"){let F=$.parent;if($.from==R-2&&((C=F.lastChild)===null||C===void 0?void 0:C.name)!="CloseTag"&&(Q=LD(u.doc,F,R))&&!The.has(Q)){let U=R+(u.doc.sliceString(R,R+1)===">"?1:0),K=`${Q}>`;return{range:Ln.cursor(R+K.length,-1),changes:{from:R,to:U,insert:K}}}}return{range:h}});return d.changes.empty?!1:(o.dispatch([l,u.update(d,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),EOe=xre({commentTokens:{block:{open:""}}}),AOe=new ui,DOe=U5e.configure({props:[KD.add(o=>!o.is("Block")||o.is("Document")||Fse(o)!=null?void 0:(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})),AOe.add(Fse),GD.add({Document:()=>null}),iE.add({Document:EOe})]});function Fse(o){let e=/^(?:ATX|Setext)Heading(\d)$/.exec(o.name);return e?+e[1]:void 0}function l$e(o,e){let t=o;for(;;){let s=t.nextSibling,a;if(!s||(a=Fse(s.type))!=null&&a<=e)break;t=s}return t.to}const c$e=e0e.of((o,e,t)=>{for(let s=_c(o).resolveInner(t,-1);s&&!(s.fromt)return{from:t,to:l}}return null});function eie(o){return new Zb(EOe,o,[c$e],"markdown")}const u$e=eie(DOe),f$e=DOe.configure([nMe,sMe,oMe,rMe]),POe=eie(f$e);function d$e(o,e){return t=>{if(t&&o){let s=null;if(t=/\S*/.exec(t)[0],typeof o=="function"?s=o(t):s=wz.matchLanguageName(o,t,!0),s instanceof wz)return s.support?s.support.language.parser:N6.getSkippingParser(s.load());if(s)return s.parser}return e?e.parser:null}}class cH{constructor(e,t,s,a,l,u,d){this.node=e,this.from=t,this.to=s,this.spaceBefore=a,this.spaceAfter=l,this.type=u,this.item=d}blank(e,t=!0){let s=this.spaceBefore+(this.node.name=="Blockquote"?">":"");if(e!=null){for(;s.length0;a--)s+=" ";return s+(t?this.spaceAfter:"")}}marker(e,t){let s=this.node.name=="OrderedList"?String(+ROe(this.item,e)[2]+t):"";return this.spaceBefore+s+this.type+this.spaceAfter}}function MOe(o,e){let t=[];for(let a=o;a&&a.name!="Document";a=a.parent)(a.name=="ListItem"||a.name=="Blockquote"||a.name=="FencedCode")&&t.push(a);let s=[];for(let a=t.length-1;a>=0;a--){let l=t[a],u,d=e.lineAt(l.from),h=l.from-d.from;if(l.name=="FencedCode")s.push(new cH(l,h,h,"","","",null));else if(l.name=="Blockquote"&&(u=/^ *>( ?)/.exec(d.text.slice(h))))s.push(new cH(l,h,h+u[0].length,"",u[1],">",null));else if(l.name=="ListItem"&&l.parent.name=="OrderedList"&&(u=/^( *)\d+([.)])( *)/.exec(d.text.slice(h)))){let b=u[3],y=u[0].length;b.length>=4&&(b=b.slice(0,b.length-4),y-=4),s.push(new cH(l.parent,h,h+y,u[1],b,u[2],l))}else if(l.name=="ListItem"&&l.parent.name=="BulletList"&&(u=/^( *)([-+*])( {1,4}\[[ xX]\])?( +)/.exec(d.text.slice(h)))){let b=u[4],y=u[0].length;b.length>4&&(b=b.slice(0,b.length-4),y-=4);let C=u[2];u[3]&&(C+=u[3].replace(/[xX]/," ")),s.push(new cH(l.parent,h,h+y,u[1],b,C,l))}}return s}function ROe(o,e){return/^(\s*)(\d+)(?=[.)])/.exec(e.sliceString(o.from,o.from+10))}function aoe(o,e,t,s=0){for(let a=-1,l=o;;){if(l.name=="ListItem"){let d=ROe(l,e),h=+d[2];if(a>=0){if(h!=a+1)return;t.push({from:l.from+d[1].length,to:l.from+d[0].length,insert:String(a+2+s)})}a=h}let u=l.nextSibling;if(!u)break;l=u}}function Qse(o,e){let t=/^[ \t]*/.exec(o)[0].length;if(!t||e.facet(lI)!=" ")return o;let s=Cv(o,4,t),a="";for(let l=s;l>0;)l>=4?(a+=" ",l-=4):(a+=" ",l--);return a+o.slice(t)}const h$e=({state:o,dispatch:e})=>{let t=_c(o),{doc:s}=o,a=null,l=o.changeByRange(u=>{if(!u.empty||!POe.isActiveAt(o,u.from))return a={range:u};let d=u.from,h=s.lineAt(d),b=MOe(t.resolveInner(d,-1),s);for(;b.length&&b[b.length-1].from>d-h.from;)b.pop();if(!b.length)return a={range:u};let y=b[b.length-1];if(y.to-y.spaceAfter.length>d-h.from)return a={range:u};let C=d>=y.to-y.spaceAfter.length&&!/\S/.test(h.text.slice(y.to));if(y.item&&C)if(y.node.firstChild.to>=d||h.from>0&&!/[^\s>]/.test(s.lineAt(h.from-1).text)){let F=b.length>1?b[b.length-2]:null,U,K="";F&&F.item?(U=h.from+F.from,K=F.marker(s,1)):U=h.from+(F?F.to:0);let L=[{from:U,to:d,insert:K}];return y.node.name=="OrderedList"&&aoe(y.item,s,L,-2),F&&F.node.name=="OrderedList"&&aoe(F.item,s,L),{range:Ln.cursor(U+K.length),changes:L}}else{let F="";for(let U=0,K=b.length-2;U<=K;U++)F+=b[U].blank(U\s*$/.exec(F.text);if(U&&U.index==y.from){let K=o.changes([{from:F.from+U.index,to:F.to},{from:h.from+y.from,to:h.to}]);return{range:u.map(K),changes:K}}}let E=[];y.node.name=="OrderedList"&&aoe(y.item,s,E);let R=y.item&&y.item.from]*/.exec(h.text)[0].length>=y.to)for(let F=0,U=b.length-1;F<=U;F++)$+=F==U&&!R?b[F].marker(s,1):b[F].blank(Fh.from&&/\s/.test(h.text.charAt(Q-h.from-1));)Q--;return $=Qse($,o),E.push({from:Q,to:d,insert:o.lineBreak+$}),{range:Ln.cursor(Q+$.length+1),changes:E}});return a?!1:(e(o.update(l,{scrollIntoView:!0,userEvent:"input"})),!0)};function Ehe(o){return o.name=="QuoteMark"||o.name=="ListMark"}function m$e(o,e){let t=o.resolveInner(e,-1),s=e;Ehe(t)&&(s=t.from,t=t.parent);for(let a;a=t.childBefore(s);)if(Ehe(a))s=a.from;else if(a.name=="OrderedList"||a.name=="BulletList")t=a.lastChild,s=t.to;else break;return t}const g$e=({state:o,dispatch:e})=>{let t=_c(o),s=null,a=o.changeByRange(l=>{let u=l.from,{doc:d}=o;if(l.empty&&POe.isActiveAt(o,l.from)){let h=d.lineAt(u),b=MOe(m$e(t,u),d);if(b.length){let y=b[b.length-1],C=y.to-y.spaceAfter.length+(y.spaceAfter?1:0);if(u-h.from>C&&!/\S/.test(h.text.slice(C,u-h.from)))return{range:Ln.cursor(h.from+C),changes:{from:h.from+C,to:u}};if(u-h.from==C&&(!y.item||h.from<=y.item.from||!/\S/.test(h.text.slice(0,y.to)))){let E=h.from+y.from;if(y.item&&y.node.from{let h=new DC,b=new DC,y=ra.create({doc:l,extensions:[Rz,wE.of([W0e,...yve,...Wre]),h.of(Ahe()),Ahe(),gve(),b.of(ra.tabSize.of(4)),Rz,is.editable.of(u),is.updateListener.of(function(C){C.docChanged&&t(2,l=C.state.doc.toString())}),is.lineWrapping,is.contentAttributes.of({spellcheck:"true"})]});a=new is({state:y,parent:s})}),ore(()=>{a&&a.destroy()});function d(h){Ro[h?"unshift":"push"](()=>{s=h,t(1,s)})}return o.$$set=h=>{"value"in h&&t(2,l=h.value),"editable"in h&&t(0,u=h.editable)},[u,s,l,d]}class $Oe extends uo{constructor(e){super(),co(this,e,y$e,O$e,lo,{value:2,editable:0})}}function w$e(o){let e,t,s,a;function l(d){o[1](d)}let u={};return o[0].value!==void 0&&(u.value=o[0].value),t=new $Oe({props:u}),Ro.push(()=>er(t,"value",l)),{c(){e=re("div"),en(t.$$.fragment),Z(e,"class","mb-3")},m(d,h){Te(d,e,h),Kt(t,e,null),a=!0},p(d,[h]){const b={};!s&&h&1&&(s=!0,b.value=d[0].value,lr(()=>s=!1)),t.$set(b)},i(d){a||(xe(t.$$.fragment,d),a=!0)},o(d){Be(t.$$.fragment,d),a=!1},d(d){d&&ke(e),Jt(t)}}}function _$e(o,e,t){let{block:s}=e;function a(l){o.$$.not_equal(s.value,l)&&(s.value=l,t(0,s))}return o.$$set=l=>{"block"in l&&t(0,s=l.block)},[s,a]}class S$e extends uo{constructor(e){super(),co(this,e,_$e,w$e,lo,{block:0})}}function Dhe(o,e,t){const s=o.slice();return s[11]=e[t],s}function Phe(o){let e,t;return e=new oI({props:{sortableClass:"row row-cols-3 mt-3",$$slots:{default:[C$e]},$$scope:{ctx:o}}}),e.$on("update",o[3]),{c(){en(e.$$.fragment)},m(s,a){Kt(e,s,a),t=!0},p(s,a){const l={};a&16385&&(l.$$scope={dirty:a,ctx:s}),e.$set(l)},i(s){t||(xe(e.$$.fragment,s),t=!0)},o(s){Be(e.$$.fragment,s),t=!1},d(s){Jt(e,s)}}}function Mhe(o,e){let t,s,a,l;return s=new J6({props:{classes:"h-100",record:e[11],hasDelete:!0}}),s.$on("remove",e[2]),{key:o,first:null,c(){t=re("div"),en(s.$$.fragment),a=Ze(),Z(t,"class","col mb-3"),this.first=t},m(u,d){Te(u,t,d),Kt(s,t,null),X(t,a),l=!0},p(u,d){e=u;const h={};d&1&&(h.record=e[11]),s.$set(h)},i(u){l||(xe(s.$$.fragment,u),l=!0)},o(u){Be(s.$$.fragment,u),l=!1},d(u){u&&ke(t),Jt(s)}}}function C$e(o){let e=[],t=new Map,s,a,l=o[0];const u=d=>d[11].id;for(let d=0;d0&&Phe(o);return{c(){e=re("div"),en(t.$$.fragment),s=Ze(),u&&u.c(),a=Rs(),Z(e,"class","inline-card-wrapper")},m(d,h){Te(d,e,h),Kt(t,e,null),Te(d,s,h),u&&u.m(d,h),Te(d,a,h),l=!0},p(d,[h]){d[0].length>0?u?(u.p(d,h),h&1&&xe(u,1)):(u=Phe(d),u.c(),xe(u,1),u.m(a.parentNode,a)):u&&(mo(),Be(u,1,1,()=>{u=null}),go())},i(d){l||(xe(t.$$.fragment,d),xe(u),l=!0)},o(d){Be(t.$$.fragment,d),Be(u),l=!1},d(d){d&&ke(e),Jt(t),d&&ke(s),u&&u.d(d),d&&ke(a)}}}function x$e(o,e,t){let s;const a=Ur("channel");let{block:l}=e,{record:u}=e,{field:d}=e,{graph:h}=e,b=d.name+":"+l.id,y=a.schemas.filter($=>l.meta.collections.includes($.name));function C($){var Q;$.preventDefault(),t(5,h.edges=h.edges.filter(F=>!(F.target===$.detail&&F.field===b)),h),t(6,l.value=(Q=h.edges.filter(F=>F.field===b))!=null?Q:[],l)}function E($){t(5,h.edges=qD($.detail.source,$.detail.target,h.edges,b),h)}function R($){$.preventDefault(),t(5,h=K6(h,u,$.detail.records,b,$.detail.action))}return o.$$set=$=>{"block"in $&&t(6,l=$.block),"record"in $&&t(7,u=$.record),"field"in $&&t(8,d=$.field),"graph"in $&&t(5,h=$.graph)},o.$$.update=()=>{var $;o.$$.dirty&160&&t(0,s=($=h.edges.filter(Q=>Q.field===b).map(Q=>h.records.find(F=>F.id===Q.target&&u.id===Q.source)).filter(Q=>!!(Q!=null&&Q.id)))!=null?$:[])},[s,y,C,E,R,h,l,u,d]}class T$e extends uo{constructor(e){super(),co(this,e,x$e,k$e,lo,{block:6,record:7,field:8,graph:5})}}function Rhe(o,e,t){const s=o.slice();return s[16]=e[t],s}function $he(o,e,t){const s=o.slice();return s[19]=e[t],s}function E$e(o){let e,t,s,a,l=o[3],u=[];for(let d=0;dd[16].id;for(let d=0;d0&&Ihe(o),y={};return a=new are({props:y}),o[13](a),a.$on("insert",o[7]),{c(){e=re("div"),h.c(),t=Ze(),b&&b.c(),s=Ze(),en(a.$$.fragment),Z(e,"class","mb-0")},m(C,E){Te(C,e,E),h.m(e,null),Te(C,t,E),b&&b.m(C,E),Te(C,s,E),Kt(a,C,E),l=!0},p(C,[E]){d===(d=u(C))&&h?h.p(C,E):(h.d(1),h=d(C),h&&(h.c(),h.m(e,null))),C[2].length>0?b?(b.p(C,E),E&4&&xe(b,1)):(b=Ihe(C),b.c(),xe(b,1),b.m(s.parentNode,s)):b&&(mo(),Be(b,1,1,()=>{b=null}),go());const R={};a.$set(R)},i(C){l||(xe(b),xe(a.$$.fragment,C),l=!0)},o(C){Be(b),Be(a.$$.fragment,C),l=!1},d(C){C&&ke(e),h.d(),C&&ke(t),b&&b.d(C),C&&ke(s),o[13](null),Jt(a,C)}}}function M$e(o,e,t){let s;const a=Ur("channel");let{block:l}=e,{record:u}=e,{field:d}=e,{graph:h}=e,b,y=d.name+":"+l.id,C=a.schemas.filter(L=>l.meta.collections.includes(L.name));function E(L){var te;L.preventDefault(),t(8,h.edges=h.edges.filter(ne=>!(ne.target===L.detail&&ne.field===y)),h),t(0,l.value=(te=h.edges.filter(ne=>ne.field===y))!=null?te:[],l)}function R(L,te){L.preventDefault(),b.open(te)}function $(L){t(8,h.edges=qD(L.detail.source,L.detail.target,h.edges,y),h)}function Q(L){L.preventDefault(),b.close(),t(8,h=K6(h,u,L.detail.records,y,L.detail.action))}const F=L=>R(L,C[0].name),U=(L,te)=>R(te,L.name);function K(L){Ro[L?"unshift":"push"](()=>{b=L,t(1,b)})}return o.$$set=L=>{"block"in L&&t(0,l=L.block),"record"in L&&t(9,u=L.record),"field"in L&&t(10,d=L.field),"graph"in L&&t(8,h=L.graph)},o.$$.update=()=>{var L;o.$$.dirty&768&&t(2,s=(L=h.edges.filter(te=>te.field===y).map(te=>h.records.find(ne=>ne.id===te.target&&u.id===te.source)).filter(te=>!!(te!=null&&te.id)))!=null?L:[])},[l,b,s,C,E,R,$,Q,h,u,d,F,U,K]}class R$e extends uo{constructor(e){super(),co(this,e,M$e,P$e,lo,{block:0,record:9,field:10,graph:8})}}function Lhe(o,e,t){const s=o.slice();return s[25]=e[t],s}function Fhe(o){let e,t=o[25].label+"",s,a,l,u;function d(...h){return o[15](o[25],...h)}return{c(){e=re("button"),s=Ht(t),a=Ze(),Z(e,"class","dropdown-item")},m(h,b){Te(h,e,b),X(e,s),X(e,a),l||(u=mn(e,"click",d),l=!0)},p(h,b){o=h},d(h){h&&ke(e),l=!1,u()}}}function $$e(o){let e,t,s,a;function l(h){o[22](h)}function u(h){o[23](h)}let d={record:o[2],field:o[3]};return o[0]!==void 0&&(d.graph=o[0]),o[1]!==void 0&&(d.block=o[1]),e=new T$e({props:d}),Ro.push(()=>er(e,"graph",l)),Ro.push(()=>er(e,"block",u)),{c(){en(e.$$.fragment)},m(h,b){Kt(e,h,b),a=!0},p(h,b){const y={};b&4&&(y.record=h[2]),b&8&&(y.field=h[3]),!t&&b&1&&(t=!0,y.graph=h[0],lr(()=>t=!1)),!s&&b&2&&(s=!0,y.block=h[1],lr(()=>s=!1)),e.$set(y)},i(h){a||(xe(e.$$.fragment,h),a=!0)},o(h){Be(e.$$.fragment,h),a=!1},d(h){Jt(e,h)}}}function N$e(o){let e,t,s,a;function l(h){o[20](h)}function u(h){o[21](h)}let d={record:o[2],field:o[3]};return o[0]!==void 0&&(d.graph=o[0]),o[1]!==void 0&&(d.block=o[1]),e=new R$e({props:d}),Ro.push(()=>er(e,"graph",l)),Ro.push(()=>er(e,"block",u)),{c(){en(e.$$.fragment)},m(h,b){Kt(e,h,b),a=!0},p(h,b){const y={};b&4&&(y.record=h[2]),b&8&&(y.field=h[3]),!t&&b&1&&(t=!0,y.graph=h[0],lr(()=>t=!1)),!s&&b&2&&(s=!0,y.block=h[1],lr(()=>s=!1)),e.$set(y)},i(h){a||(xe(e.$$.fragment,h),a=!0)},o(h){Be(e.$$.fragment,h),a=!1},d(h){Jt(e,h)}}}function I$e(o){let e,t,s;function a(u){o[19](u)}let l={};return o[1]!==void 0&&(l.block=o[1]),e=new S$e({props:l}),Ro.push(()=>er(e,"block",a)),{c(){en(e.$$.fragment)},m(u,d){Kt(e,u,d),s=!0},p(u,d){const h={};!t&&d&2&&(t=!0,h.block=u[1],lr(()=>t=!1)),e.$set(h)},i(u){s||(xe(e.$$.fragment,u),s=!0)},o(u){Be(e.$$.fragment,u),s=!1},d(u){Jt(e,u)}}}function B$e(o){let e,t,s;function a(u){o[18](u)}let l={};return o[1]!==void 0&&(l.block=o[1]),e=new zTe({props:l}),Ro.push(()=>er(e,"block",a)),{c(){en(e.$$.fragment)},m(u,d){Kt(e,u,d),s=!0},p(u,d){const h={};!t&&d&2&&(t=!0,h.block=u[1],lr(()=>t=!1)),e.$set(h)},i(u){s||(xe(e.$$.fragment,u),s=!0)},o(u){Be(e.$$.fragment,u),s=!1},d(u){Jt(e,u)}}}function L$e(o){let e,t,s;function a(u){o[17](u)}let l={};return o[1]!==void 0&&(l.block=o[1]),e=new NTe({props:l}),Ro.push(()=>er(e,"block",a)),{c(){en(e.$$.fragment)},m(u,d){Kt(e,u,d),s=!0},p(u,d){const h={};!t&&d&2&&(t=!0,h.block=u[1],lr(()=>t=!1)),e.$set(h)},i(u){s||(xe(e.$$.fragment,u),s=!0)},o(u){Be(e.$$.fragment,u),s=!1},d(u){Jt(e,u)}}}function F$e(o){let e,t,s;function a(u){o[16](u)}let l={};return o[1]!==void 0&&(l.block=o[1]),e=new MTe({props:l}),Ro.push(()=>er(e,"block",a)),{c(){en(e.$$.fragment)},m(u,d){Kt(e,u,d),s=!0},p(u,d){const h={};!t&&d&2&&(t=!0,h.block=u[1],lr(()=>t=!1)),e.$set(h)},i(u){s||(xe(e.$$.fragment,u),s=!0)},o(u){Be(e.$$.fragment,u),s=!1},d(u){Jt(e,u)}}}function Q$e(o){let e,t,s,a=o[1].meta.label+"",l,u,d,h,b,y,C,E,R,$,Q,F,U,K,L,te,ne,oe,G,we,ve,Re,Oe,ce,Xe,tt,ot,V,ut,Qe,Bt,Ct,He;b=new Fa({props:{icon:"ellipsis"}});let st=o[4].fields,rn=[];for(let mt=0;mt{let s=e.node.getChild("VariableDefinition");return s&&t(s,o),!0}}const WRe=["FunctionDeclaration"],URe={FunctionDeclaration:UN("function"),ClassDeclaration:UN("class"),ClassExpression:()=>!0,EnumDeclaration:UN("constant"),TypeAliasDeclaration:UN("type"),NamespaceDeclaration:UN("namespace"),VariableDefinition(o,e){o.matchContext(WRe)||e(o,"variable")},TypeDefinition(o,e){e(o,"type")},__proto__:null};function dOe(o,e){let t=_he.get(e);if(t)return t;let s=[],a=!0;function l(u,d){let h=o.sliceString(u.from,u.to);s.push({label:h,type:d})}return e.cursor(wc.IncludeAnonymous).iterate(u=>{if(a)a=!1;else if(u.name){let d=URe[u.name];if(d&&d(u,l)||fOe.has(u.name))return!1}else if(u.to-u.from>8192){for(let d of dOe(o,u.node))s.push(d);return!1}}),_he.set(e,s),s}const She=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,hOe=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName",".","?."];function YRe(o){let e=_c(o.state).resolveInner(o.pos,-1);if(hOe.indexOf(e.name)>-1)return null;let t=e.name=="VariableName"||e.to-e.from<20&&She.test(o.state.sliceDoc(e.from,e.to));if(!t&&!o.explicit)return null;let s=[];for(let a=e;a;a=a.parent)fOe.has(a.name)&&(s=s.concat(dOe(o.state.doc,a)));return{options:s,from:t?e.from:o.pos,validFor:She}}const gy=pE.define({name:"javascript",parser:zRe.configure({props:[GD.add({IfStatement:SD({except:/^\s*({|else\b)/}),TryStatement:SD({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:f4e,SwitchBody:o=>{let e=o.textAfter,t=/^\s*\}/.test(e),s=/^\s*(case|default)\b/.test(e);return o.baseIndent+(t?0:s?1:2)*o.unit},Block:u4e({closing:"}"}),ArrowFunction:o=>o.baseIndent+o.unit,"TemplateString BlockComment":()=>null,"Statement Property":SD({except:/^{/}),JSXElement(o){let e=/^\s*<\//.test(o.textAfter);return o.lineIndent(o.node.from)+(e?0:o.unit)},JSXEscape(o){let e=/\s*\}/.test(o.textAfter);return o.lineIndent(o.node.from)+(e?0:o.unit)},"JSXOpenTag JSXSelfClosingTag"(o){return o.column(o.node.from)+o.unit}}),KD.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":Dre,BlockComment(o){return{from:o.from+2,to:o.to-2}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),mOe={test:o=>/^JSX/.test(o.name),facet:xre({commentTokens:{block:{open:"{/*",close:"*/}"}}})},gOe=gy.configure({dialect:"ts"},"typescript"),pOe=gy.configure({dialect:"jsx",props:[Tre.add(o=>o.isTop?[mOe]:void 0)]}),bOe=gy.configure({dialect:"jsx ts",props:[Tre.add(o=>o.isTop?[mOe]:void 0)]},"typescript");let vOe=o=>({label:o,type:"keyword"});const OOe="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(vOe),XRe=OOe.concat(["declare","implements","private","protected","public"].map(vOe));function jRe(o={}){let e=o.jsx?o.typescript?bOe:pOe:o.typescript?gOe:gy,t=o.typescript?VRe.concat(XRe):uOe.concat(OOe);return new $D(e,[gy.data.of({autocomplete:xPe(hOe,ove(t))}),gy.data.of({autocomplete:YRe}),o.jsx?KRe:[]])}function qRe(o){for(;;){if(o.name=="JSXOpenTag"||o.name=="JSXSelfClosingTag"||o.name=="JSXFragmentTag")return o;if(o.name=="JSXEscape"||!o.parent)return null;o=o.parent}}function Che(o,e,t=o.length){for(let s=e==null?void 0:e.firstChild;s;s=s.nextSibling)if(s.name=="JSXIdentifier"||s.name=="JSXBuiltin"||s.name=="JSXNamespacedName"||s.name=="JSXMemberExpression")return o.sliceString(s.from,Math.min(s.to,t));return""}const GRe=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),KRe=is.inputHandler.of((o,e,t,s,a)=>{if((GRe?o.composing:o.compositionStarted)||o.state.readOnly||e!=t||s!=">"&&s!="/"||!gy.isActiveAt(o.state,e,-1))return!1;let l=a(),{state:u}=l,d=u.changeByRange(h=>{var b;let{head:y}=h,C=_c(u).resolveInner(y-1,-1),E;if(C.name=="JSXStartTag"&&(C=C.parent),!(u.doc.sliceString(y-1,y)!=s||C.name=="JSXAttributeValue"&&C.to>y)){if(s==">"&&C.name=="JSXFragmentTag")return{range:h,changes:{from:y,insert:""}};if(s=="/"&&C.name=="JSXStartCloseTag"){let R=C.parent,$=R.parent;if($&&R.from==y-2&&((E=Che(u.doc,$.firstChild,y))||((b=$.firstChild)===null||b===void 0?void 0:b.name)=="JSXFragmentTag")){let Q=`${E}>`;return{range:Ln.cursor(y+Q.length,-1),changes:{from:y,insert:Q}}}}else if(s==">"){let R=qRe(C);if(R&&!/^\/?>|^<\//.test(u.doc.sliceString(y,y+2))&&(E=Che(u.doc,R,y)))return{range:h,changes:{from:y,insert:``}}}}return{range:h}});return d.changes.empty?!1:(o.dispatch([l,u.update(d,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),YN=["_blank","_self","_top","_parent"],soe=["ascii","utf-8","utf-16","latin1","latin1"],roe=["get","post","put","delete"],ioe=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],M1=["true","false"],zs={},JRe={a:{attrs:{href:null,ping:null,type:null,media:null,target:YN,hreflang:null}},abbr:zs,address:zs,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:zs,aside:zs,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:zs,base:{attrs:{href:null,target:YN}},bdi:zs,bdo:zs,blockquote:{attrs:{cite:null}},body:zs,br:zs,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:ioe,formmethod:roe,formnovalidate:["novalidate"],formtarget:YN,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:zs,center:zs,cite:zs,code:zs,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["disabled"],checked:["checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["disabled"],multiple:["multiple"]}},datalist:{attrs:{data:null}},dd:zs,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:zs,div:zs,dl:zs,dt:zs,em:zs,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:zs,figure:zs,footer:zs,form:{attrs:{action:null,name:null,"accept-charset":soe,autocomplete:["on","off"],enctype:ioe,method:roe,novalidate:["novalidate"],target:YN}},h1:zs,h2:zs,h3:zs,h4:zs,h5:zs,h6:zs,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:zs,hgroup:zs,hr:zs,html:{attrs:{manifest:null}},i:zs,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["autofocus"],checked:["checked"],disabled:["disabled"],formenctype:ioe,formmethod:roe,formnovalidate:["novalidate"],formtarget:YN,multiple:["multiple"],readonly:["readonly"],required:["required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:zs,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:zs,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:zs,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:soe,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:zs,noscript:zs,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["typemustmatch"]}},ol:{attrs:{reversed:["reversed"],start:null,type:["1","a","A","i","I"]},children:["li","script","template","ul","ol"]},optgroup:{attrs:{disabled:["disabled"],label:null}},option:{attrs:{disabled:["disabled"],label:null,selected:["selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:zs,param:{attrs:{name:null,value:null}},pre:zs,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:zs,rt:zs,ruby:zs,samp:zs,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:soe}},section:zs,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:zs,source:{attrs:{src:null,type:null,media:null}},span:zs,strong:zs,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:zs,summary:zs,sup:zs,table:zs,tbody:zs,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:zs,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["autofocus"],disabled:["disabled"],readonly:["readonly"],required:["required"],wrap:["soft","hard"]}},tfoot:zs,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:zs,time:{attrs:{datetime:null}},title:zs,tr:zs,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:zs,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["autoplay"],mediagroup:["movie"],muted:["muted"],controls:["controls"]}},wbr:zs},yOe={accesskey:null,class:null,contenteditable:M1,contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["ar","bn","de","en-GB","en-US","es","fr","hi","id","ja","pa","pt","ru","tr","zh"],spellcheck:M1,autocorrect:M1,autocapitalize:M1,style:null,tabindex:null,title:null,translate:["yes","no"],rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"],role:"alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer".split(" "),"aria-activedescendant":null,"aria-atomic":M1,"aria-autocomplete":["inline","list","both","none"],"aria-busy":M1,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":M1,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":M1,"aria-hidden":M1,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":M1,"aria-multiselectable":M1,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":M1,"aria-relevant":null,"aria-required":M1,"aria-selected":["true","false","undefined"],"aria-setsize":null,"aria-sort":["ascending","descending","none","other"],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},wOe="beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload".split(" ").map(o=>"on"+o);for(let o of wOe)yOe[o]=null;class z6{constructor(e,t){this.tags=Object.assign(Object.assign({},JRe),e),this.globalAttrs=Object.assign(Object.assign({},yOe),t),this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}}z6.default=new z6;function LD(o,e,t=o.length){if(!e)return"";let s=e.firstChild,a=s&&s.getChild("TagName");return a?o.sliceString(a.from,Math.min(a.to,t)):""}function FD(o,e=!1){for(;o;o=o.parent)if(o.name=="Element")if(e)e=!1;else return o;return null}function _Oe(o,e,t){let s=t.tags[LD(o,FD(e))];return(s==null?void 0:s.children)||t.allTags}function Jre(o,e){let t=[];for(let s=FD(e);s&&!s.type.isTop;s=FD(s.parent)){let a=LD(o,s);if(a&&s.lastChild.name=="CloseTag")break;a&&t.indexOf(a)<0&&(e.name=="EndTag"||e.from>=s.firstChild.to)&&t.push(a)}return t}const SOe=/^[:\-\.\w\u00b7-\uffff]*$/;function khe(o,e,t,s,a){let l=/\s*>/.test(o.sliceDoc(a,a+5))?"":">",u=FD(t,!0);return{from:s,to:a,options:_Oe(o.doc,u,e).map(d=>({label:d,type:"type"})).concat(Jre(o.doc,t).map((d,h)=>({label:"/"+d,apply:"/"+d+l,type:"type",boost:99-h}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function xhe(o,e,t,s){let a=/\s*>/.test(o.sliceDoc(s,s+5))?"":">";return{from:t,to:s,options:Jre(o.doc,e).map((l,u)=>({label:l,apply:l+a,type:"type",boost:99-u})),validFor:SOe}}function e$e(o,e,t,s){let a=[],l=0;for(let u of _Oe(o.doc,t,e))a.push({label:"<"+u,type:"type"});for(let u of Jre(o.doc,t))a.push({label:"",type:"type",boost:99-l++});return{from:s,to:s,options:a,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}function t$e(o,e,t,s,a){let l=FD(t),u=l?e.tags[LD(o.doc,l)]:null,d=u&&u.attrs?Object.keys(u.attrs):[],h=u&&u.globalAttrs===!1?d:d.length?d.concat(e.globalAttrNames):e.globalAttrNames;return{from:s,to:a,options:h.map(b=>({label:b,type:"property"})),validFor:SOe}}function n$e(o,e,t,s,a){var l;let u=(l=t.parent)===null||l===void 0?void 0:l.getChild("AttributeName"),d=[],h;if(u){let b=o.sliceDoc(u.from,u.to),y=e.globalAttrs[b];if(!y){let C=FD(t),E=C?e.tags[LD(o.doc,C)]:null;y=(E==null?void 0:E.attrs)&&E.attrs[b]}if(y){let C=o.sliceDoc(s,a).toLowerCase(),E='"',R='"';/^['"]/.test(C)?(h=C[0]=='"'?/^[^"]*$/:/^[^']*$/,E="",R=o.sliceDoc(a,a+1)==C[0]?"":C[0],C=C.slice(1),s++):h=/^[^\s<>='"]*$/;for(let $ of y)d.push({label:$,apply:E+$+R,type:"constant"})}}return{from:s,to:a,options:d,validFor:h}}function COe(o,e){let{state:t,pos:s}=e,a=_c(t).resolveInner(s,-1),l=a.resolve(s);for(let u=s,d;l==a&&(d=a.childBefore(u));){let h=d.lastChild;if(!h||!h.type.isError||h.fromCOe(s,a)}const r$e=gy.parser.configure({top:"SingleExpression"}),kOe=[{tag:"script",attrs:o=>o.type=="text/typescript"||o.lang=="ts",parser:gOe.parser},{tag:"script",attrs:o=>o.type=="text/babel"||o.type=="text/jsx",parser:pOe.parser},{tag:"script",attrs:o=>o.type=="text/typescript-jsx",parser:bOe.parser},{tag:"script",attrs:o=>o.type=="importmap"||o.type=="speculationrules",parser:r$e},{tag:"script",attrs(o){return!o.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(o.type)},parser:gy.parser},{tag:"style",attrs(o){return(!o.lang||o.lang=="css")&&(!o.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(o.type))},parser:Zz.parser}],xOe=[{name:"style",parser:Zz.parser.configure({top:"Styles"})}].concat(wOe.map(o=>({name:o,parser:gy.parser}))),TOe=pE.define({name:"html",parser:qMe.configure({props:[GD.add({Element(o){let e=/^(\s*)(<\/)?/.exec(o.textAfter);return o.node.to<=o.pos+e[0].length?o.continue():o.lineIndent(o.node.from)+(e[2]?0:o.unit)},"OpenTag CloseTag SelfClosingTag"(o){return o.column(o.node.from)+o.unit},Document(o){if(o.pos+/\s*/.exec(o.textAfter)[0].lengtho.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:""}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-._"}}),zH=TOe.configure({wrap:rOe(kOe,xOe)});function i$e(o={}){let e="",t;o.matchClosingTags===!1&&(e="noMatch"),o.selfClosingTags===!0&&(e=(e?e+" ":"")+"selfClosing"),(o.nestedLanguages&&o.nestedLanguages.length||o.nestedAttributes&&o.nestedAttributes.length)&&(t=rOe((o.nestedLanguages||[]).concat(kOe),(o.nestedAttributes||[]).concat(xOe)));let s=t?TOe.configure({wrap:t,dialect:e}):e?zH.configure({dialect:e}):zH;return new $D(s,[zH.data.of({autocomplete:s$e(o)}),o.autoCloseTags!==!1?a$e:[],jRe().support,_Re().support])}const The=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")),a$e=is.inputHandler.of((o,e,t,s,a)=>{if(o.composing||o.state.readOnly||e!=t||s!=">"&&s!="/"||!zH.isActiveAt(o.state,e,-1))return!1;let l=a(),{state:u}=l,d=u.changeByRange(h=>{var b,y,C;let E=u.doc.sliceString(h.from-1,h.to)==s,{head:R}=h,$=_c(u).resolveInner(R-1,-1),Q;if(($.name=="TagName"||$.name=="StartTag")&&($=$.parent),E&&s==">"&&$.name=="OpenTag"){if(((y=(b=$.parent)===null||b===void 0?void 0:b.lastChild)===null||y===void 0?void 0:y.name)!="CloseTag"&&(Q=LD(u.doc,$.parent,R))&&!The.has(Q)){let F=R+(u.doc.sliceString(R,R+1)===">"?1:0),U=``;return{range:h,changes:{from:R,to:F,insert:U}}}}else if(E&&s=="/"&&$.name=="IncompleteCloseTag"){let F=$.parent;if($.from==R-2&&((C=F.lastChild)===null||C===void 0?void 0:C.name)!="CloseTag"&&(Q=LD(u.doc,F,R))&&!The.has(Q)){let U=R+(u.doc.sliceString(R,R+1)===">"?1:0),K=`${Q}>`;return{range:Ln.cursor(R+K.length,-1),changes:{from:R,to:U,insert:K}}}}return{range:h}});return d.changes.empty?!1:(o.dispatch([l,u.update(d,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),EOe=xre({commentTokens:{block:{open:""}}}),AOe=new ui,DOe=U5e.configure({props:[KD.add(o=>!o.is("Block")||o.is("Document")||Fse(o)!=null?void 0:(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})),AOe.add(Fse),GD.add({Document:()=>null}),iE.add({Document:EOe})]});function Fse(o){let e=/^(?:ATX|Setext)Heading(\d)$/.exec(o.name);return e?+e[1]:void 0}function l$e(o,e){let t=o;for(;;){let s=t.nextSibling,a;if(!s||(a=Fse(s.type))!=null&&a<=e)break;t=s}return t.to}const c$e=e0e.of((o,e,t)=>{for(let s=_c(o).resolveInner(t,-1);s&&!(s.fromt)return{from:t,to:l}}return null});function eie(o){return new Zb(EOe,o,[c$e],"markdown")}const u$e=eie(DOe),f$e=DOe.configure([nMe,sMe,oMe,rMe]),POe=eie(f$e);function d$e(o,e){return t=>{if(t&&o){let s=null;if(t=/\S*/.exec(t)[0],typeof o=="function"?s=o(t):s=wz.matchLanguageName(o,t,!0),s instanceof wz)return s.support?s.support.language.parser:N6.getSkippingParser(s.load());if(s)return s.parser}return e?e.parser:null}}class cH{constructor(e,t,s,a,l,u,d){this.node=e,this.from=t,this.to=s,this.spaceBefore=a,this.spaceAfter=l,this.type=u,this.item=d}blank(e,t=!0){let s=this.spaceBefore+(this.node.name=="Blockquote"?">":"");if(e!=null){for(;s.length0;a--)s+=" ";return s+(t?this.spaceAfter:"")}}marker(e,t){let s=this.node.name=="OrderedList"?String(+ROe(this.item,e)[2]+t):"";return this.spaceBefore+s+this.type+this.spaceAfter}}function MOe(o,e){let t=[];for(let a=o;a&&a.name!="Document";a=a.parent)(a.name=="ListItem"||a.name=="Blockquote"||a.name=="FencedCode")&&t.push(a);let s=[];for(let a=t.length-1;a>=0;a--){let l=t[a],u,d=e.lineAt(l.from),h=l.from-d.from;if(l.name=="FencedCode")s.push(new cH(l,h,h,"","","",null));else if(l.name=="Blockquote"&&(u=/^ *>( ?)/.exec(d.text.slice(h))))s.push(new cH(l,h,h+u[0].length,"",u[1],">",null));else if(l.name=="ListItem"&&l.parent.name=="OrderedList"&&(u=/^( *)\d+([.)])( *)/.exec(d.text.slice(h)))){let b=u[3],y=u[0].length;b.length>=4&&(b=b.slice(0,b.length-4),y-=4),s.push(new cH(l.parent,h,h+y,u[1],b,u[2],l))}else if(l.name=="ListItem"&&l.parent.name=="BulletList"&&(u=/^( *)([-+*])( {1,4}\[[ xX]\])?( +)/.exec(d.text.slice(h)))){let b=u[4],y=u[0].length;b.length>4&&(b=b.slice(0,b.length-4),y-=4);let C=u[2];u[3]&&(C+=u[3].replace(/[xX]/," ")),s.push(new cH(l.parent,h,h+y,u[1],b,C,l))}}return s}function ROe(o,e){return/^(\s*)(\d+)(?=[.)])/.exec(e.sliceString(o.from,o.from+10))}function aoe(o,e,t,s=0){for(let a=-1,l=o;;){if(l.name=="ListItem"){let d=ROe(l,e),h=+d[2];if(a>=0){if(h!=a+1)return;t.push({from:l.from+d[1].length,to:l.from+d[0].length,insert:String(a+2+s)})}a=h}let u=l.nextSibling;if(!u)break;l=u}}function Qse(o,e){let t=/^[ \t]*/.exec(o)[0].length;if(!t||e.facet(lI)!=" ")return o;let s=Cv(o,4,t),a="";for(let l=s;l>0;)l>=4?(a+=" ",l-=4):(a+=" ",l--);return a+o.slice(t)}const h$e=({state:o,dispatch:e})=>{let t=_c(o),{doc:s}=o,a=null,l=o.changeByRange(u=>{if(!u.empty||!POe.isActiveAt(o,u.from))return a={range:u};let d=u.from,h=s.lineAt(d),b=MOe(t.resolveInner(d,-1),s);for(;b.length&&b[b.length-1].from>d-h.from;)b.pop();if(!b.length)return a={range:u};let y=b[b.length-1];if(y.to-y.spaceAfter.length>d-h.from)return a={range:u};let C=d>=y.to-y.spaceAfter.length&&!/\S/.test(h.text.slice(y.to));if(y.item&&C)if(y.node.firstChild.to>=d||h.from>0&&!/[^\s>]/.test(s.lineAt(h.from-1).text)){let F=b.length>1?b[b.length-2]:null,U,K="";F&&F.item?(U=h.from+F.from,K=F.marker(s,1)):U=h.from+(F?F.to:0);let L=[{from:U,to:d,insert:K}];return y.node.name=="OrderedList"&&aoe(y.item,s,L,-2),F&&F.node.name=="OrderedList"&&aoe(F.item,s,L),{range:Ln.cursor(U+K.length),changes:L}}else{let F="";for(let U=0,K=b.length-2;U<=K;U++)F+=b[U].blank(U\s*$/.exec(F.text);if(U&&U.index==y.from){let K=o.changes([{from:F.from+U.index,to:F.to},{from:h.from+y.from,to:h.to}]);return{range:u.map(K),changes:K}}}let E=[];y.node.name=="OrderedList"&&aoe(y.item,s,E);let R=y.item&&y.item.from]*/.exec(h.text)[0].length>=y.to)for(let F=0,U=b.length-1;F<=U;F++)$+=F==U&&!R?b[F].marker(s,1):b[F].blank(Fh.from&&/\s/.test(h.text.charAt(Q-h.from-1));)Q--;return $=Qse($,o),E.push({from:Q,to:d,insert:o.lineBreak+$}),{range:Ln.cursor(Q+$.length+1),changes:E}});return a?!1:(e(o.update(l,{scrollIntoView:!0,userEvent:"input"})),!0)};function Ehe(o){return o.name=="QuoteMark"||o.name=="ListMark"}function m$e(o,e){let t=o.resolveInner(e,-1),s=e;Ehe(t)&&(s=t.from,t=t.parent);for(let a;a=t.childBefore(s);)if(Ehe(a))s=a.from;else if(a.name=="OrderedList"||a.name=="BulletList")t=a.lastChild,s=t.to;else break;return t}const g$e=({state:o,dispatch:e})=>{let t=_c(o),s=null,a=o.changeByRange(l=>{let u=l.from,{doc:d}=o;if(l.empty&&POe.isActiveAt(o,l.from)){let h=d.lineAt(u),b=MOe(m$e(t,u),d);if(b.length){let y=b[b.length-1],C=y.to-y.spaceAfter.length+(y.spaceAfter?1:0);if(u-h.from>C&&!/\S/.test(h.text.slice(C,u-h.from)))return{range:Ln.cursor(h.from+C),changes:{from:h.from+C,to:u}};if(u-h.from==C&&(!y.item||h.from<=y.item.from||!/\S/.test(h.text.slice(0,y.to)))){let E=h.from+y.from;if(y.item&&y.node.from{let h=new DC,b=new DC,y=ra.create({doc:l,extensions:[Rz,wE.of([W0e,...yve,...Wre]),h.of(Ahe()),Ahe(),gve(),b.of(ra.tabSize.of(4)),Rz,is.editable.of(u),is.updateListener.of(function(C){C.docChanged&&t(2,l=C.state.doc.toString())}),is.lineWrapping,is.contentAttributes.of({spellcheck:"true"})]});a=new is({state:y,parent:s})}),ore(()=>{a&&a.destroy()});function d(h){Ro[h?"unshift":"push"](()=>{s=h,t(1,s)})}return o.$$set=h=>{"value"in h&&t(2,l=h.value),"editable"in h&&t(0,u=h.editable)},[u,s,l,d]}class $Oe extends uo{constructor(e){super(),co(this,e,y$e,O$e,lo,{value:2,editable:0})}}function w$e(o){let e,t,s,a;function l(d){o[1](d)}let u={};return o[0].value!==void 0&&(u.value=o[0].value),t=new $Oe({props:u}),Ro.push(()=>er(t,"value",l)),{c(){e=re("div"),en(t.$$.fragment),Z(e,"class","mb-3")},m(d,h){Te(d,e,h),Kt(t,e,null),a=!0},p(d,[h]){const b={};!s&&h&1&&(s=!0,b.value=d[0].value,lr(()=>s=!1)),t.$set(b)},i(d){a||(xe(t.$$.fragment,d),a=!0)},o(d){Be(t.$$.fragment,d),a=!1},d(d){d&&ke(e),Jt(t)}}}function _$e(o,e,t){let{block:s}=e;function a(l){o.$$.not_equal(s.value,l)&&(s.value=l,t(0,s))}return o.$$set=l=>{"block"in l&&t(0,s=l.block)},[s,a]}class S$e extends uo{constructor(e){super(),co(this,e,_$e,w$e,lo,{block:0})}}function Dhe(o,e,t){const s=o.slice();return s[11]=e[t],s}function Phe(o){let e,t;return e=new oI({props:{sortableClass:"row row-cols-3 mt-3",$$slots:{default:[C$e]},$$scope:{ctx:o}}}),e.$on("update",o[3]),{c(){en(e.$$.fragment)},m(s,a){Kt(e,s,a),t=!0},p(s,a){const l={};a&16385&&(l.$$scope={dirty:a,ctx:s}),e.$set(l)},i(s){t||(xe(e.$$.fragment,s),t=!0)},o(s){Be(e.$$.fragment,s),t=!1},d(s){Jt(e,s)}}}function Mhe(o,e){let t,s,a,l;return s=new J6({props:{classes:"h-100",record:e[11],hasDelete:!0}}),s.$on("remove",e[2]),{key:o,first:null,c(){t=re("div"),en(s.$$.fragment),a=Ze(),Z(t,"class","col mb-3"),this.first=t},m(u,d){Te(u,t,d),Kt(s,t,null),X(t,a),l=!0},p(u,d){e=u;const h={};d&1&&(h.record=e[11]),s.$set(h)},i(u){l||(xe(s.$$.fragment,u),l=!0)},o(u){Be(s.$$.fragment,u),l=!1},d(u){u&&ke(t),Jt(s)}}}function C$e(o){let e=[],t=new Map,s,a,l=o[0];const u=d=>d[11].id;for(let d=0;d0&&Phe(o);return{c(){e=re("div"),en(t.$$.fragment),s=Ze(),u&&u.c(),a=Rs(),Z(e,"class","inline-card-wrapper")},m(d,h){Te(d,e,h),Kt(t,e,null),Te(d,s,h),u&&u.m(d,h),Te(d,a,h),l=!0},p(d,[h]){d[0].length>0?u?(u.p(d,h),h&1&&xe(u,1)):(u=Phe(d),u.c(),xe(u,1),u.m(a.parentNode,a)):u&&(mo(),Be(u,1,1,()=>{u=null}),go())},i(d){l||(xe(t.$$.fragment,d),xe(u),l=!0)},o(d){Be(t.$$.fragment,d),Be(u),l=!1},d(d){d&&ke(e),Jt(t),d&&ke(s),u&&u.d(d),d&&ke(a)}}}function x$e(o,e,t){let s;const a=Ur("channel");let{block:l}=e,{record:u}=e,{field:d}=e,{graph:h}=e,b=d.name+":"+l.id,y=a.schemas.filter($=>l.meta.collections.includes($.name));function C($){var Q;$.preventDefault(),t(5,h.edges=h.edges.filter(F=>!(F.target===$.detail&&F.field===b)),h),t(6,l.value=(Q=h.edges.filter(F=>F.field===b))!=null?Q:[],l)}function E($){t(5,h.edges=qD($.detail.source,$.detail.target,h.edges,b,s),h)}function R($){$.preventDefault(),t(5,h=K6(h,u,$.detail.records,b,$.detail.action))}return o.$$set=$=>{"block"in $&&t(6,l=$.block),"record"in $&&t(7,u=$.record),"field"in $&&t(8,d=$.field),"graph"in $&&t(5,h=$.graph)},o.$$.update=()=>{var $;o.$$.dirty&160&&t(0,s=($=h.edges.filter(Q=>Q.field===b).map(Q=>h.records.find(F=>F.id===Q.target&&u.id===Q.source)).filter(Q=>!!(Q!=null&&Q.id)))!=null?$:[])},[s,y,C,E,R,h,l,u,d]}class T$e extends uo{constructor(e){super(),co(this,e,x$e,k$e,lo,{block:6,record:7,field:8,graph:5})}}function Rhe(o,e,t){const s=o.slice();return s[16]=e[t],s}function $he(o,e,t){const s=o.slice();return s[19]=e[t],s}function E$e(o){let e,t,s,a,l=o[3],u=[];for(let d=0;dd[16].id;for(let d=0;d0&&Ihe(o),y={};return a=new are({props:y}),o[13](a),a.$on("insert",o[7]),{c(){e=re("div"),h.c(),t=Ze(),b&&b.c(),s=Ze(),en(a.$$.fragment),Z(e,"class","mb-0")},m(C,E){Te(C,e,E),h.m(e,null),Te(C,t,E),b&&b.m(C,E),Te(C,s,E),Kt(a,C,E),l=!0},p(C,[E]){d===(d=u(C))&&h?h.p(C,E):(h.d(1),h=d(C),h&&(h.c(),h.m(e,null))),C[2].length>0?b?(b.p(C,E),E&4&&xe(b,1)):(b=Ihe(C),b.c(),xe(b,1),b.m(s.parentNode,s)):b&&(mo(),Be(b,1,1,()=>{b=null}),go());const R={};a.$set(R)},i(C){l||(xe(b),xe(a.$$.fragment,C),l=!0)},o(C){Be(b),Be(a.$$.fragment,C),l=!1},d(C){C&&ke(e),h.d(),C&&ke(t),b&&b.d(C),C&&ke(s),o[13](null),Jt(a,C)}}}function M$e(o,e,t){let s;const a=Ur("channel");let{block:l}=e,{record:u}=e,{field:d}=e,{graph:h}=e,b,y=d.name+":"+l.id,C=a.schemas.filter(L=>l.meta.collections.includes(L.name));function E(L){var te;L.preventDefault(),t(8,h.edges=h.edges.filter(ne=>!(ne.target===L.detail&&ne.field===y)),h),t(0,l.value=(te=h.edges.filter(ne=>ne.field===y))!=null?te:[],l)}function R(L,te){L.preventDefault(),b.open(te)}function $(L){t(8,h.edges=qD(L.detail.source,L.detail.target,h.edges,y,s),h)}function Q(L){L.preventDefault(),b.close(),t(8,h=K6(h,u,L.detail.records,y,L.detail.action))}const F=L=>R(L,C[0].name),U=(L,te)=>R(te,L.name);function K(L){Ro[L?"unshift":"push"](()=>{b=L,t(1,b)})}return o.$$set=L=>{"block"in L&&t(0,l=L.block),"record"in L&&t(9,u=L.record),"field"in L&&t(10,d=L.field),"graph"in L&&t(8,h=L.graph)},o.$$.update=()=>{var L;o.$$.dirty&768&&t(2,s=(L=h.edges.filter(te=>te.field===y).map(te=>h.records.find(ne=>ne.id===te.target&&u.id===te.source)).filter(te=>!!(te!=null&&te.id)))!=null?L:[])},[l,b,s,C,E,R,$,Q,h,u,d,F,U,K]}class R$e extends uo{constructor(e){super(),co(this,e,M$e,P$e,lo,{block:0,record:9,field:10,graph:8})}}function Lhe(o,e,t){const s=o.slice();return s[25]=e[t],s}function Fhe(o){let e,t=o[25].label+"",s,a,l,u;function d(...h){return o[15](o[25],...h)}return{c(){e=re("button"),s=Ht(t),a=Ze(),Z(e,"class","dropdown-item")},m(h,b){Te(h,e,b),X(e,s),X(e,a),l||(u=mn(e,"click",d),l=!0)},p(h,b){o=h},d(h){h&&ke(e),l=!1,u()}}}function $$e(o){let e,t,s,a;function l(h){o[22](h)}function u(h){o[23](h)}let d={record:o[2],field:o[3]};return o[0]!==void 0&&(d.graph=o[0]),o[1]!==void 0&&(d.block=o[1]),e=new T$e({props:d}),Ro.push(()=>er(e,"graph",l)),Ro.push(()=>er(e,"block",u)),{c(){en(e.$$.fragment)},m(h,b){Kt(e,h,b),a=!0},p(h,b){const y={};b&4&&(y.record=h[2]),b&8&&(y.field=h[3]),!t&&b&1&&(t=!0,y.graph=h[0],lr(()=>t=!1)),!s&&b&2&&(s=!0,y.block=h[1],lr(()=>s=!1)),e.$set(y)},i(h){a||(xe(e.$$.fragment,h),a=!0)},o(h){Be(e.$$.fragment,h),a=!1},d(h){Jt(e,h)}}}function N$e(o){let e,t,s,a;function l(h){o[20](h)}function u(h){o[21](h)}let d={record:o[2],field:o[3]};return o[0]!==void 0&&(d.graph=o[0]),o[1]!==void 0&&(d.block=o[1]),e=new R$e({props:d}),Ro.push(()=>er(e,"graph",l)),Ro.push(()=>er(e,"block",u)),{c(){en(e.$$.fragment)},m(h,b){Kt(e,h,b),a=!0},p(h,b){const y={};b&4&&(y.record=h[2]),b&8&&(y.field=h[3]),!t&&b&1&&(t=!0,y.graph=h[0],lr(()=>t=!1)),!s&&b&2&&(s=!0,y.block=h[1],lr(()=>s=!1)),e.$set(y)},i(h){a||(xe(e.$$.fragment,h),a=!0)},o(h){Be(e.$$.fragment,h),a=!1},d(h){Jt(e,h)}}}function I$e(o){let e,t,s;function a(u){o[19](u)}let l={};return o[1]!==void 0&&(l.block=o[1]),e=new S$e({props:l}),Ro.push(()=>er(e,"block",a)),{c(){en(e.$$.fragment)},m(u,d){Kt(e,u,d),s=!0},p(u,d){const h={};!t&&d&2&&(t=!0,h.block=u[1],lr(()=>t=!1)),e.$set(h)},i(u){s||(xe(e.$$.fragment,u),s=!0)},o(u){Be(e.$$.fragment,u),s=!1},d(u){Jt(e,u)}}}function B$e(o){let e,t,s;function a(u){o[18](u)}let l={};return o[1]!==void 0&&(l.block=o[1]),e=new zTe({props:l}),Ro.push(()=>er(e,"block",a)),{c(){en(e.$$.fragment)},m(u,d){Kt(e,u,d),s=!0},p(u,d){const h={};!t&&d&2&&(t=!0,h.block=u[1],lr(()=>t=!1)),e.$set(h)},i(u){s||(xe(e.$$.fragment,u),s=!0)},o(u){Be(e.$$.fragment,u),s=!1},d(u){Jt(e,u)}}}function L$e(o){let e,t,s;function a(u){o[17](u)}let l={};return o[1]!==void 0&&(l.block=o[1]),e=new NTe({props:l}),Ro.push(()=>er(e,"block",a)),{c(){en(e.$$.fragment)},m(u,d){Kt(e,u,d),s=!0},p(u,d){const h={};!t&&d&2&&(t=!0,h.block=u[1],lr(()=>t=!1)),e.$set(h)},i(u){s||(xe(e.$$.fragment,u),s=!0)},o(u){Be(e.$$.fragment,u),s=!1},d(u){Jt(e,u)}}}function F$e(o){let e,t,s;function a(u){o[16](u)}let l={};return o[1]!==void 0&&(l.block=o[1]),e=new MTe({props:l}),Ro.push(()=>er(e,"block",a)),{c(){en(e.$$.fragment)},m(u,d){Kt(e,u,d),s=!0},p(u,d){const h={};!t&&d&2&&(t=!0,h.block=u[1],lr(()=>t=!1)),e.$set(h)},i(u){s||(xe(e.$$.fragment,u),s=!0)},o(u){Be(e.$$.fragment,u),s=!1},d(u){Jt(e,u)}}}function Q$e(o){let e,t,s,a=o[1].meta.label+"",l,u,d,h,b,y,C,E,R,$,Q,F,U,K,L,te,ne,oe,G,we,ve,Re,Oe,ce,Xe,tt,ot,V,ut,Qe,Bt,Ct,He;b=new Fa({props:{icon:"ellipsis"}});let st=o[4].fields,rn=[];for(let mt=0;mt',ne=Ze(),oe=re("h6"),oe.textContent="Actions",G=Ze(),we=re("button"),we.textContent="Move up",ve=Ze(),Re=re("button"),Re.textContent="Move down",Oe=Ze(),ce=re("button"),ce.textContent="Delete",Xe=Ze(),tt=re("h6"),tt.textContent="Insert after",ot=Ze();for(let mt=0;mt{Cn[Zo]=null}),go()),~ut?(Qe=Cn[ut],Qe?Qe.p(mt,he):(Qe=Cn[ut]=Et[ut](mt),Qe.c()),xe(Qe,1),Qe.m(e,null)):Qe=null)},i(mt){Bt||(xe(b.$$.fragment,mt),xe(Qe),Bt=!0)},o(mt){Be(b.$$.fragment,mt),Be(Qe),Bt=!1},d(mt){mt&&ke(e),Jt(b),ia(rn,mt),~ut&&Cn[ut].d(),Ct=!1,vi(He)}}}function Z$e(o,e,t){const s=Ur("channel");let{record:a}=e,{blockData:l}=e,{field:u}=e,{graph:d}=e,{block:h}=e,b=s.schemas.find(ce=>ce.name===u.schema);function y(ce,Xe,tt){ce.preventDefault(),t(11,l=m1e(l,Xe,tt))}function C(ce,Xe){ce.preventDefault(),t(11,l=l.filter(tt=>tt.id!==Xe))}function E(ce,Xe){ce.preventDefault();let tt=Lc.exports.findIndex(l,V=>V.id===Xe),ot=l[tt];t(11,l[tt]=l[tt-1],l),t(11,l[tt-1]=ot,l)}function R(ce,Xe){ce.preventDefault();let tt=Lc.exports.findIndex(l,V=>V.id===Xe),ot=l[tt];t(11,l[tt]=l[tt+1],l),t(11,l[tt+1]=ot,l)}function $(ce){return Lc.exports.findIndex(l,Xe=>Xe.id===ce)===0}function Q(ce){return Lc.exports.findIndex(l,Xe=>Xe.id===ce)===l.length-1}const F=ce=>E(ce,h.id),U=ce=>R(ce,h.id),K=ce=>C(ce,h.id),L=(ce,Xe)=>y(Xe,ce,h.id);function te(ce){h=ce,t(1,h)}function ne(ce){h=ce,t(1,h)}function oe(ce){h=ce,t(1,h)}function G(ce){h=ce,t(1,h)}function we(ce){d=ce,t(0,d)}function ve(ce){h=ce,t(1,h)}function Re(ce){d=ce,t(0,d)}function Oe(ce){h=ce,t(1,h)}return o.$$set=ce=>{"record"in ce&&t(2,a=ce.record),"blockData"in ce&&t(11,l=ce.blockData),"field"in ce&&t(3,u=ce.field),"graph"in ce&&t(0,d=ce.graph),"block"in ce&&t(1,h=ce.block)},[d,h,a,u,b,y,C,E,R,$,Q,l,F,U,K,L,te,ne,oe,G,we,ve,Re,Oe]}class H$e extends uo{constructor(e){super(),co(this,e,Z$e,Q$e,lo,{record:2,blockData:11,field:3,graph:0,block:1})}}function Qhe(o,e,t){const s=o.slice();return s[10]=e[t],s[11]=e,s[12]=t,s}function Zhe(o,e){let t,s,a,l,u,d,h,b=un,y;function C(Q){e[6](Q,e[10],e[11],e[12])}function E(Q){e[7](Q)}function R(Q){e[8](Q)}let $={record:e[2],field:e[3]};return e[10]!==void 0&&($.block=e[10]),e[0]!==void 0&&($.blockData=e[0]),e[1]!==void 0&&($.graph=e[1]),s=new H$e({props:$}),Ro.push(()=>er(s,"block",C)),Ro.push(()=>er(s,"blockData",E)),Ro.push(()=>er(s,"graph",R)),{key:o,first:null,c(){t=re("div"),en(s.$$.fragment),d=Ze(),Z(t,"class","block-field-wrapper"),this.first=t},m(Q,F){Te(Q,t,F),Kt(s,t,null),X(t,d),y=!0},p(Q,F){e=Q;const U={};F&4&&(U.record=e[2]),F&8&&(U.field=e[3]),!a&&F&1&&(a=!0,U.block=e[10],lr(()=>a=!1)),!l&&F&1&&(l=!0,U.blockData=e[0],lr(()=>l=!1)),!u&&F&2&&(u=!0,U.graph=e[1],lr(()=>u=!1)),s.$set(U)},r(){h=t.getBoundingClientRect()},f(){Tpe(t),b()},a(){b(),b=xpe(t,h,h1e,{delay:250,duration:250,easing:Mpe})},i(Q){y||(xe(s.$$.fragment,Q),y=!0)},o(Q){Be(s.$$.fragment,Q),y=!1},d(Q){Q&&ke(t),Jt(s)}}}function z$e(o){let e,t,s,a,l,u=[],d=new Map,h;function b(R){o[5](R)}let y={blockSchema:o[4]};o[0]!==void 0&&(y.blockData=o[0]),s=new ATe({props:y}),Ro.push(()=>er(s,"blockData",b));let C=o[0];const E=R=>R[10].id;for(let R=0;Ra=!1)),s.$set(Q),$&15){C=R[0],mo();for(let F=0;FR.name===l.schema);function b(R){u=R,t(0,u)}function y(R,$,Q,F){Q[F]=R,t(0,u)}function C(R){u=R,t(0,u)}function E(R){d=R,t(1,d)}return o.$$set=R=>{"record"in R&&t(2,a=R.record),"field"in R&&t(3,l=R.field),"value"in R&&t(0,u=R.value),"graph"in R&&t(1,d=R.graph)},[u,d,a,l,h,b,y,C,E]}class W$e extends uo{constructor(e){super(),co(this,e,V$e,z$e,lo,{record:2,field:3,value:0,graph:1})}}function Hhe(o){let e,t;return{c(){e=re("div"),t=Ht(o[4]),Z(e,"class","invalid-feedback d-block")},m(s,a){Te(s,e,a),X(e,t)},p(s,a){a&16&&Fn(t,s[4])},d(s){s&&ke(e)}}}function U$e(o){let e,t,s,a,l,u,d,h,b,y,C,E=o[4]&&Hhe(o);return{c(){e=re("div"),t=re("div"),s=re("div"),a=re("input"),u=Ze(),d=re("input"),b=Ze(),E&&E.c(),Z(a,"type","color"),Z(a,"id",o[3]),Z(a,"class","form-control form-control-color"),a.disabled=l=o[1].readonly&&!o[2],rs(s,"width","64px"),Z(d,"type","text"),Z(d,"id",o[3]),Z(d,"class","form-control"),d.readOnly=h=o[1].readonly&&!o[2],Vo(d,"is-invalid",o[4]),Z(t,"class","input-group "),Z(e,"class","mb-0")},m(R,$){Te(R,e,$),X(e,t),X(t,s),X(s,a),ar(a,o[0]),X(t,u),X(t,d),ar(d,o[0]),X(e,b),E&&E.m(e,null),y||(C=[mn(a,"input",o[6]),mn(d,"input",o[7])],y=!0)},p(R,[$]){$&8&&Z(a,"id",R[3]),$&6&&l!==(l=R[1].readonly&&!R[2])&&(a.disabled=l),$&1&&ar(a,R[0]),$&8&&Z(d,"id",R[3]),$&6&&h!==(h=R[1].readonly&&!R[2])&&(d.readOnly=h),$&1&&d.value!==R[0]&&ar(d,R[0]),$&16&&Vo(d,"is-invalid",R[4]),R[4]?E?E.p(R,$):(E=Hhe(R),E.c(),E.m(e,null)):E&&(E.d(1),E=null)},i:un,o:un,d(R){R&&ke(e),E&&E.d(),y=!1,vi(C)}}}function Y$e(o,e,t){let s,{field:a}=e,{value:l}=e,{isCreateMode:u}=e,{validationErrors:d}=e,{id:h}=e;function b(){l=this.value,t(0,l)}function y(){l=this.value,t(0,l)}return o.$$set=C=>{"field"in C&&t(1,a=C.field),"value"in C&&t(0,l=C.value),"isCreateMode"in C&&t(2,u=C.isCreateMode),"validationErrors"in C&&t(5,d=C.validationErrors),"id"in C&&t(3,h=C.id)},o.$$.update=()=>{o.$$.dirty&34&&t(4,s=Lm(d,a.name))},[l,a,u,h,s,d,b,y]}class X$e extends uo{constructor(e){super(),co(this,e,Y$e,U$e,lo,{field:1,value:0,isCreateMode:2,validationErrors:5,id:3})}}function zhe(o){let e,t,s,a,l,u,d,h,b,y,C;return b=nre(o[7][0]),{c(){e=re("div"),t=re("input"),l=Ze(),u=re("label"),d=Ht("Don't Know"),Z(t,"class","form-check-input"),Z(t,"id",s=o[1]+"-3"),Z(t,"type","radio"),t.__value=null,t.value=t.__value,t.disabled=a=o[2].readonly&&!o[3],Vo(t,"is-invalid",o[4]),Z(u,"class","form-check-label"),Z(u,"for",h=o[1]+"-3"),Z(e,"class","form-check form-check-inline"),b.p(t)},m(E,R){Te(E,e,R),X(e,t),t.checked=t.__value===o[0],X(e,l),X(e,u),X(u,d),y||(C=mn(t,"change",o[9]),y=!0)},p(E,R){R&2&&s!==(s=E[1]+"-3")&&Z(t,"id",s),R&12&&a!==(a=E[2].readonly&&!E[3])&&(t.disabled=a),R&1&&(t.checked=t.__value===E[0]),R&16&&Vo(t,"is-invalid",E[4]),R&2&&h!==(h=E[1]+"-3")&&Z(u,"for",h)},d(E){E&&ke(e),b.r(),y=!1,C()}}}function Vhe(o){let e,t;return{c(){e=re("div"),t=Ht(o[4]),Z(e,"class","invalid-feedback d-block")},m(s,a){Te(s,e,a),X(e,t)},p(s,a){a&16&&Fn(t,s[4])},d(s){s&&ke(e)}}}function j$e(o){let e,t,s,a,l,u,d,h,b,y,C,E,R,$,Q,F,U,K,L,te,ne,oe,G,we,ve=o[2].nullable&&zhe(o),Re=o[4]&&Vhe(o);return oe=nre(o[7][0]),{c(){e=re("div"),t=re("div"),s=re("input"),u=Ze(),d=re("label"),h=Ht("Yes"),y=Ze(),C=re("div"),E=re("input"),Q=Ze(),F=re("label"),U=Ht("No"),L=Ze(),ve&&ve.c(),te=Ze(),Re&&Re.c(),ne=Rs(),Z(s,"class","form-check-input"),Z(s,"type","radio"),Z(s,"id",a=o[1]+"-1"),s.__value=!0,s.value=s.__value,s.disabled=l=o[2].readonly&&!o[3],Vo(s,"is-invalid",o[4]),Z(d,"class","form-check-label"),Z(d,"for",b=o[1]+"-1"),Z(t,"class","form-check form-check-inline"),Z(E,"class","form-check-input"),Z(E,"type","radio"),Z(E,"id",R=o[1]+"-2"),E.__value=!1,E.value=E.__value,E.disabled=$=o[2].readonly&&!o[3],Vo(E,"is-invalid",o[4]),Z(F,"class","form-check-label"),Z(F,"for",K=o[1]+"-2"),Z(C,"class","form-check form-check-inline"),oe.p(s,E)},m(Oe,ce){Te(Oe,e,ce),X(e,t),X(t,s),s.checked=s.__value===o[0],X(t,u),X(t,d),X(d,h),X(e,y),X(e,C),X(C,E),E.checked=E.__value===o[0],X(C,Q),X(C,F),X(F,U),X(e,L),ve&&ve.m(e,null),Te(Oe,te,ce),Re&&Re.m(Oe,ce),Te(Oe,ne,ce),G||(we=[mn(s,"change",o[6]),mn(E,"change",o[8])],G=!0)},p(Oe,[ce]){ce&2&&a!==(a=Oe[1]+"-1")&&Z(s,"id",a),ce&12&&l!==(l=Oe[2].readonly&&!Oe[3])&&(s.disabled=l),ce&1&&(s.checked=s.__value===Oe[0]),ce&16&&Vo(s,"is-invalid",Oe[4]),ce&2&&b!==(b=Oe[1]+"-1")&&Z(d,"for",b),ce&2&&R!==(R=Oe[1]+"-2")&&Z(E,"id",R),ce&12&&$!==($=Oe[2].readonly&&!Oe[3])&&(E.disabled=$),ce&1&&(E.checked=E.__value===Oe[0]),ce&16&&Vo(E,"is-invalid",Oe[4]),ce&2&&K!==(K=Oe[1]+"-2")&&Z(F,"for",K),Oe[2].nullable?ve?ve.p(Oe,ce):(ve=zhe(Oe),ve.c(),ve.m(e,null)):ve&&(ve.d(1),ve=null),Oe[4]?Re?Re.p(Oe,ce):(Re=Vhe(Oe),Re.c(),Re.m(ne.parentNode,ne)):Re&&(Re.d(1),Re=null)},i:un,o:un,d(Oe){Oe&&ke(e),ve&&ve.d(),Oe&&ke(te),Re&&Re.d(Oe),Oe&&ke(ne),oe.r(),G=!1,vi(we)}}}function q$e(o,e,t){let s,{id:a}=e,{field:l}=e,{value:u}=e,{isCreateMode:d}=e,{validationErrors:h}=e;const b=[[]];function y(){u=this.__value,t(0,u)}function C(){u=this.__value,t(0,u)}function E(){u=this.__value,t(0,u)}return o.$$set=R=>{"id"in R&&t(1,a=R.id),"field"in R&&t(2,l=R.field),"value"in R&&t(0,u=R.value),"isCreateMode"in R&&t(3,d=R.isCreateMode),"validationErrors"in R&&t(5,h=R.validationErrors)},o.$$.update=()=>{o.$$.dirty&36&&t(4,s=Lm(h,l.name))},[u,a,l,d,s,h,y,b,C,E]}class G$e extends uo{constructor(e){super(),co(this,e,q$e,j$e,lo,{id:1,field:2,value:0,isCreateMode:3,validationErrors:5})}}function K$e(o){let e,t,s,a;return{c(){e=re("input"),Z(e,"type","number"),Z(e,"id",o[4]),Z(e,"class","form-control"),Z(e,"autocomplete","off"),e.readOnly=t=o[1].readonly&&!o[3],Vo(e,"is-invalid",o[7])},m(l,u){Te(l,e,u),ar(e,o[0]),s||(a=[mn(e,"change",o[9]),mn(e,"input",o[16])],s=!0)},p(l,u){u&16&&Z(e,"id",l[4]),u&10&&t!==(t=l[1].readonly&&!l[3])&&(e.readOnly=t),u&1&&GH(e.value)!==l[0]&&ar(e,l[0]),u&128&&Vo(e,"is-invalid",l[7])},i:un,o:un,d(l){l&&ke(e),s=!1,vi(a)}}}function J$e(o){let e,t,s,a,l,u,d,h,b,y,C=o[1].optionsFrom&&Whe(o),E=o[0]&&Uhe(o);return{c(){e=re("div"),t=re("input"),a=Ze(),l=re("ul"),C&&C.c(),u=Ze(),E&&E.c(),d=Rs(),Z(t,"type","number"),Z(t,"id",o[4]),Z(t,"placeholder","Search for options"),Z(t,"class","form-control dropdown-toggle"),Z(t,"data-bs-toggle","dropdown"),Z(t,"autocomplete","off"),t.readOnly=s=o[1].readonly&&!o[3],Vo(t,"is-invalid",o[7]),Z(l,"class","dropdown-menu w-100"),Z(e,"class","dropdown")},m(R,$){Te(R,e,$),X(e,t),ar(t,o[8]),X(e,a),X(e,l),C&&C.m(l,null),Te(R,u,$),E&&E.m(R,$),Te(R,d,$),h=!0,b||(y=[mn(t,"keyup",function(){Ub(o[5].update)&&o[5].update.apply(this,arguments)}),mn(t,"focus",function(){Ub(o[5].update)&&o[5].update.apply(this,arguments)}),mn(t,"input",o[11])],b=!0)},p(R,$){o=R,(!h||$&16)&&Z(t,"id",o[4]),(!h||$&10&&s!==(s=o[1].readonly&&!o[3]))&&(t.readOnly=s),$&256&&GH(t.value)!==o[8]&&ar(t,o[8]),(!h||$&128)&&Vo(t,"is-invalid",o[7]),o[1].optionsFrom?C?(C.p(o,$),$&2&&xe(C,1)):(C=Whe(o),C.c(),xe(C,1),C.m(l,null)):C&&(mo(),Be(C,1,1,()=>{C=null}),go()),o[0]?E?E.p(o,$):(E=Uhe(o),E.c(),E.m(d.parentNode,d)):E&&(E.d(1),E=null)},i(R){h||(xe(C),h=!0)},o(R){Be(C),h=!1},d(R){R&&ke(e),C&&C.d(),R&&ke(u),E&&E.d(R),R&&ke(d),b=!1,vi(y)}}}function Whe(o){let e,t,s,a;function l(h){o[13](h)}function u(h){o[14](h)}let d={field:o[1],schemas:o[2]};return o[0]!==void 0&&(d.value=o[0]),o[8]!==void 0&&(d.search=o[8]),e=new eV({props:d}),o[12](e),Ro.push(()=>er(e,"value",l)),Ro.push(()=>er(e,"search",u)),{c(){en(e.$$.fragment)},m(h,b){Kt(e,h,b),a=!0},p(h,b){const y={};b&2&&(y.field=h[1]),b&4&&(y.schemas=h[2]),!t&&b&1&&(t=!0,y.value=h[0],lr(()=>t=!1)),!s&&b&256&&(s=!0,y.search=h[8],lr(()=>s=!1)),e.$set(y)},i(h){a||(xe(e.$$.fragment,h),a=!0)},o(h){Be(e.$$.fragment,h),a=!1},d(h){o[12](null),Jt(e,h)}}}function Uhe(o){let e,t,s,a,l,u,d;return{c(){e=re("span"),t=re("div"),s=Ht(o[0]),a=Ze(),l=re("button"),Z(l,"type","button"),Z(l,"class","btn-close btn-sm ms-1"),rs(l,"font-size","10px"),Z(l,"aria-label","Close"),Z(t,"class","d-flex align-items-center "),Z(e,"class","badge rounded-pill bg-light text-dark fs-6 mt-3")},m(h,b){Te(h,e,b),X(e,t),X(t,s),X(t,a),X(t,l),u||(d=mn(l,"click",ku(o[15])),u=!0)},p(h,b){b&1&&Fn(s,h[0])},d(h){h&&ke(e),u=!1,d()}}}function Yhe(o){let e,t;return{c(){e=re("div"),t=Ht(o[7]),Z(e,"class","invalid-feedback d-block")},m(s,a){Te(s,e,a),X(e,t)},p(s,a){a&128&&Fn(t,s[7])},d(s){s&&ke(e)}}}function eNe(o){let e,t,s,a,l;const u=[J$e,K$e],d=[];function h(y,C){return y[6]?0:1}t=h(o),s=d[t]=u[t](o);let b=o[7]&&Yhe(o);return{c(){e=re("div"),s.c(),a=Ze(),b&&b.c(),Z(e,"class","mb-0")},m(y,C){Te(y,e,C),d[t].m(e,null),X(e,a),b&&b.m(e,null),l=!0},p(y,[C]){let E=t;t=h(y),t===E?d[t].p(y,C):(mo(),Be(d[E],1,1,()=>{d[E]=null}),go(),s=d[t],s?s.p(y,C):(s=d[t]=u[t](y),s.c()),xe(s,1),s.m(e,a)),y[7]?b?b.p(y,C):(b=Yhe(y),b.c(),b.m(e,null)):b&&(b.d(1),b=null)},i(y){l||(xe(s),l=!0)},o(y){Be(s),l=!1},d(y){y&&ke(e),d[t].d(),b&&b.d()}}}function tNe(o,e,t){let s,a,l,{field:u}=e,{value:d}=e,{schemas:h}=e,{validationErrors:b}=e,{isCreateMode:y}=e,{id:C}=e,E;function R(ne){const oe=ne.currentTarget.value,G=$(oe);t(0,d=isNaN(G)?null:G)}function $(ne){return parseFloat(ne).toFixed(u.decimals)}function Q(){s=GH(this.value),t(8,s)}function F(ne){Ro[ne?"unshift":"push"](()=>{E=ne,t(5,E)})}function U(ne){d=ne,t(0,d)}function K(ne){s=ne,t(8,s)}const L=ne=>t(0,d="");function te(){d=GH(this.value),t(0,d)}return o.$$set=ne=>{"field"in ne&&t(1,u=ne.field),"value"in ne&&t(0,d=ne.value),"schemas"in ne&&t(2,h=ne.schemas),"validationErrors"in ne&&t(10,b=ne.validationErrors),"isCreateMode"in ne&&t(3,y=ne.isCreateMode),"id"in ne&&t(4,C=ne.id)},o.$$.update=()=>{o.$$.dirty&1026&&t(7,a=Lm(b,u.name)),o.$$.dirty&10&&t(6,l=u.optionsFrom&&!(u.readonly&&!y))},t(8,s=""),[d,u,h,y,C,E,l,a,s,R,b,Q,F,U,K,L,te]}class nNe extends uo{constructor(e){super(),co(this,e,tNe,eNe,lo,{field:1,value:0,schemas:2,validationErrors:10,isCreateMode:3,id:4})}}function Xhe(o){let e,t=o[1].help+"",s;return{c(){e=re("small"),s=Ht(t),Z(e,"class","text-primary opacity-50")},m(a,l){Te(a,e,l),X(e,s)},p(a,l){l&2&&t!==(t=a[1].help+"")&&Fn(s,t)},d(a){a&&ke(e)}}}function oNe(o){let e,t,s,a=o[1].label+"",l,u,d,h,b=o[1].name+"",y,C,E,R,$,Q,F,U=o[1].help&&Xhe(o);return{c(){e=re("div"),t=re("div"),s=re("label"),l=Ht(a),u=Ze(),d=re("a"),h=re("code"),y=Ht(b),E=Ze(),R=re("input"),$=Ze(),U&&U.c(),Z(s,"for",o[4]),Z(s,"class","form-label"),Z(h,"class","text-primary opacity-50"),Z(d,"class","text-decoration-none"),Z(d,"href",C=o[3]+"/schemas/"+o[2].name+"/fields/edit/"+o[1].name),Z(t,"class","d-flex justify-content-between"),Z(R,"type","url"),Z(R,"id",o[4]),Z(R,"class","form-control"),Z(R,"placeholder","https://www.example.com"),Z(e,"class","mb-0")},m(K,L){Te(K,e,L),X(e,t),X(t,s),X(s,l),X(t,u),X(t,d),X(d,h),X(h,y),X(e,E),X(e,R),ar(R,o[0]),X(e,$),U&&U.m(e,null),Q||(F=mn(R,"input",o[5]),Q=!0)},p(K,[L]){L&2&&a!==(a=K[1].label+"")&&Fn(l,a),L&2&&b!==(b=K[1].name+"")&&Fn(y,b),L&6&&C!==(C=K[3]+"/schemas/"+K[2].name+"/fields/edit/"+K[1].name)&&Z(d,"href",C),L&1&&R.value!==K[0]&&ar(R,K[0]),K[1].help?U?U.p(K,L):(U=Xhe(K),U.c(),U.m(e,null)):U&&(U.d(1),U=null)},i:un,o:un,d(K){K&&ke(e),U&&U.d(),Q=!1,F()}}}function sNe(o,e,t){const s=Ur("channelurl");let{field:a}=e,{value:l}=e,{schema:u}=e,d=Lc.exports.uniqueId();function h(){l=this.value,t(0,l)}return o.$$set=b=>{"field"in b&&t(1,a=b.field),"value"in b&&t(0,l=b.value),"schema"in b&&t(2,u=b.schema)},[l,a,u,s,d,h]}class rNe extends uo{constructor(e){super(),co(this,e,sNe,oNe,lo,{field:1,value:0,schema:2})}}var coe=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],TD={_disable:[],allowInput:!1,allowInvalidPreload:!1,altFormat:"F j, Y",altInput:!1,altInputClass:"form-control input",animate:typeof window=="object"&&window.navigator.userAgent.indexOf("MSIE")===-1,ariaDateFormat:"F j, Y",autoFillDefaultTime:!0,clickOpens:!0,closeOnSelect:!0,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:!1,enableSeconds:!1,enableTime:!1,errorHandler:function(o){return typeof console<"u"&&console.warn(o)},getWeek:function(o){var e=new Date(o.getTime());e.setHours(0,0,0,0),e.setDate(e.getDate()+3-(e.getDay()+6)%7);var t=new Date(e.getFullYear(),0,4);return 1+Math.round(((e.getTime()-t.getTime())/864e5-3+(t.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:"default",minuteIncrement:5,mode:"single",monthSelectorType:"dropdown",nextArrow:"",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1},V6={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(o){var e=o%100;if(e>3&&e<21)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year",monthAriaLabel:"Month",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",time_24hr:!1},Np=function(o,e){return e===void 0&&(e=2),("000"+o).slice(e*-1)},Bb=function(o){return o===!0?1:0};function jhe(o,e){var t;return function(){var s=this,a=arguments;clearTimeout(t),t=setTimeout(function(){return o.apply(s,a)},e)}}var uoe=function(o){return o instanceof Array?o:[o]};function Mg(o,e,t){if(t===!0)return o.classList.add(e);o.classList.remove(e)}function dl(o,e,t){var s=window.document.createElement(o);return e=e||"",t=t||"",s.className=e,t!==void 0&&(s.textContent=t),s}function uH(o){for(;o.firstChild;)o.removeChild(o.firstChild)}function NOe(o,e){if(e(o))return o;if(o.parentNode)return NOe(o.parentNode,e)}function fH(o,e){var t=dl("div","numInputWrapper"),s=dl("input","numInput "+o),a=dl("span","arrowUp"),l=dl("span","arrowDown");if(navigator.userAgent.indexOf("MSIE 9.0")===-1?s.type="number":(s.type="text",s.pattern="\\d*"),e!==void 0)for(var u in e)s.setAttribute(u,e[u]);return t.appendChild(s),t.appendChild(a),t.appendChild(l),t}function R1(o){try{if(typeof o.composedPath=="function"){var e=o.composedPath();return e[0]}return o.target}catch{return o.target}}var foe=function(){},Hz=function(o,e,t){return t.months[e?"shorthand":"longhand"][o]},iNe={D:foe,F:function(o,e,t){o.setMonth(t.months.longhand.indexOf(e))},G:function(o,e){o.setHours((o.getHours()>=12?12:0)+parseFloat(e))},H:function(o,e){o.setHours(parseFloat(e))},J:function(o,e){o.setDate(parseFloat(e))},K:function(o,e,t){o.setHours(o.getHours()%12+12*Bb(new RegExp(t.amPM[1],"i").test(e)))},M:function(o,e,t){o.setMonth(t.months.shorthand.indexOf(e))},S:function(o,e){o.setSeconds(parseFloat(e))},U:function(o,e){return new Date(parseFloat(e)*1e3)},W:function(o,e,t){var s=parseInt(e),a=new Date(o.getFullYear(),0,2+(s-1)*7,0,0,0,0);return a.setDate(a.getDate()-a.getDay()+t.firstDayOfWeek),a},Y:function(o,e){o.setFullYear(parseFloat(e))},Z:function(o,e){return new Date(e)},d:function(o,e){o.setDate(parseFloat(e))},h:function(o,e){o.setHours((o.getHours()>=12?12:0)+parseFloat(e))},i:function(o,e){o.setMinutes(parseFloat(e))},j:function(o,e){o.setDate(parseFloat(e))},l:foe,m:function(o,e){o.setMonth(parseFloat(e)-1)},n:function(o,e){o.setMonth(parseFloat(e)-1)},s:function(o,e){o.setSeconds(parseFloat(e))},u:function(o,e){return new Date(parseFloat(e))},w:foe,y:function(o,e){o.setFullYear(2e3+parseFloat(e))}},sE={D:"",F:"",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"",S:"(\\d\\d|\\d)",U:"(.+)",W:"(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",u:"(.+)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},b6={Z:function(o){return o.toISOString()},D:function(o,e,t){return e.weekdays.shorthand[b6.w(o,e,t)]},F:function(o,e,t){return Hz(b6.n(o,e,t)-1,!1,e)},G:function(o,e,t){return Np(b6.h(o,e,t))},H:function(o){return Np(o.getHours())},J:function(o,e){return e.ordinal!==void 0?o.getDate()+e.ordinal(o.getDate()):o.getDate()},K:function(o,e){return e.amPM[Bb(o.getHours()>11)]},M:function(o,e){return Hz(o.getMonth(),!0,e)},S:function(o){return Np(o.getSeconds())},U:function(o){return o.getTime()/1e3},W:function(o,e,t){return t.getWeek(o)},Y:function(o){return Np(o.getFullYear(),4)},d:function(o){return Np(o.getDate())},h:function(o){return o.getHours()%12?o.getHours()%12:12},i:function(o){return Np(o.getMinutes())},j:function(o){return o.getDate()},l:function(o,e){return e.weekdays.longhand[o.getDay()]},m:function(o){return Np(o.getMonth()+1)},n:function(o){return o.getMonth()+1},s:function(o){return o.getSeconds()},u:function(o){return o.getTime()},w:function(o){return o.getDay()},y:function(o){return String(o.getFullYear()).substring(2)}},IOe=function(o){var e=o.config,t=e===void 0?TD:e,s=o.l10n,a=s===void 0?V6:s,l=o.isMobile,u=l===void 0?!1:l;return function(d,h,b){var y=b||a;return t.formatDate!==void 0&&!u?t.formatDate(d,h,y):h.split("").map(function(C,E,R){return b6[C]&&R[E-1]!=="\\"?b6[C](d,y,t):C!=="\\"?C:""}).join("")}},Hse=function(o){var e=o.config,t=e===void 0?TD:e,s=o.l10n,a=s===void 0?V6:s;return function(l,u,d,h){if(!(l!==0&&!l)){var b=h||a,y,C=l;if(l instanceof Date)y=new Date(l.getTime());else if(typeof l!="string"&&l.toFixed!==void 0)y=new Date(l);else if(typeof l=="string"){var E=u||(t||TD).dateFormat,R=String(l).trim();if(R==="today")y=new Date,d=!0;else if(t&&t.parseDate)y=t.parseDate(l,E);else if(/Z$/.test(R)||/GMT$/.test(R))y=new Date(l);else{for(var $=void 0,Q=[],F=0,U=0,K="";FMath.min(e,t)&&o=0?new Date:new Date(t.config.minDate.getTime()),Tt=hoe(t.config);et.setHours(Tt.hours,Tt.minutes,Tt.seconds,et.getMilliseconds()),t.selectedDates=[et],t.latestSelectedDateObj=et}ze!==void 0&&ze.type!=="blur"&&Qi(ze);var Wt=t._input.value;C(),ln(),t._input.value!==Wt&&t._debouncedChange()}function b(ze,et){return ze%12+12*Bb(et===t.l10n.amPM[1])}function y(ze){switch(ze%24){case 0:case 12:return 12;default:return ze%12}}function C(){if(!(t.hourElement===void 0||t.minuteElement===void 0)){var ze=(parseInt(t.hourElement.value.slice(-2),10)||0)%24,et=(parseInt(t.minuteElement.value,10)||0)%60,Tt=t.secondElement!==void 0?(parseInt(t.secondElement.value,10)||0)%60:0;t.amPM!==void 0&&(ze=b(ze,t.amPM.textContent));var Wt=t.config.minTime!==void 0||t.config.minDate&&t.minDateHasTime&&t.latestSelectedDateObj&&N1(t.latestSelectedDateObj,t.config.minDate,!0)===0,Yn=t.config.maxTime!==void 0||t.config.maxDate&&t.maxDateHasTime&&t.latestSelectedDateObj&&N1(t.latestSelectedDateObj,t.config.maxDate,!0)===0;if(t.config.maxTime!==void 0&&t.config.minTime!==void 0&&t.config.minTime>t.config.maxTime){var po=doe(t.config.minTime.getHours(),t.config.minTime.getMinutes(),t.config.minTime.getSeconds()),wo=doe(t.config.maxTime.getHours(),t.config.maxTime.getMinutes(),t.config.maxTime.getSeconds()),fn=doe(ze,et,Tt);if(fn>wo&&fn=12)]),t.secondElement!==void 0&&(t.secondElement.value=Np(Tt)))}function $(ze){var et=R1(ze),Tt=parseInt(et.value)+(ze.delta||0);(Tt/1e3>1||ze.key==="Enter"&&!/[^\d]/.test(Tt.toString()))&&mt(Tt)}function Q(ze,et,Tt,Wt){if(et instanceof Array)return et.forEach(function(Yn){return Q(ze,Yn,Tt,Wt)});if(ze instanceof Array)return ze.forEach(function(Yn){return Q(Yn,et,Tt,Wt)});ze.addEventListener(et,Tt,Wt),t._handlers.push({remove:function(){return ze.removeEventListener(et,Tt,Wt)}})}function F(){Po("onChange")}function U(){if(t.config.wrap&&["open","close","toggle","clear"].forEach(function(Tt){Array.prototype.forEach.call(t.element.querySelectorAll("[data-"+Tt+"]"),function(Wt){return Q(Wt,"click",t[Tt])})}),t.isMobile){qr();return}var ze=jhe(as,50);if(t._debouncedChange=jhe(F,uNe),t.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&Q(t.daysContainer,"mouseover",function(Tt){t.config.mode==="range"&&Yo(R1(Tt))}),Q(t._input,"keydown",so),t.calendarContainer!==void 0&&Q(t.calendarContainer,"keydown",so),!t.config.inline&&!t.config.static&&Q(window,"resize",ze),window.ontouchstart!==void 0?Q(window.document,"touchstart",je):Q(window.document,"mousedown",je),Q(window.document,"focus",je,{capture:!0}),t.config.clickOpens===!0&&(Q(t._input,"focus",t.open),Q(t._input,"click",t.open)),t.daysContainer!==void 0&&(Q(t.monthNav,"click",vs),Q(t.monthNav,["keyup","increment"],$),Q(t.daysContainer,"click",oo)),t.timeContainer!==void 0&&t.minuteElement!==void 0&&t.hourElement!==void 0){var et=function(Tt){return R1(Tt).select()};Q(t.timeContainer,["increment"],h),Q(t.timeContainer,"blur",h,{capture:!0}),Q(t.timeContainer,"click",L),Q([t.hourElement,t.minuteElement],["focus","click"],et),t.secondElement!==void 0&&Q(t.secondElement,"focus",function(){return t.secondElement&&t.secondElement.select()}),t.amPM!==void 0&&Q(t.amPM,"click",function(Tt){h(Tt)})}t.config.allowInput&&Q(t._input,"blur",Kn)}function K(ze,et){var Tt=ze!==void 0?t.parseDate(ze):t.latestSelectedDateObj||(t.config.minDate&&t.config.minDate>t.now?t.config.minDate:t.config.maxDate&&t.config.maxDate1),t.calendarContainer.appendChild(ze);var Yn=t.config.appendTo!==void 0&&t.config.appendTo.nodeType!==void 0;if((t.config.inline||t.config.static)&&(t.calendarContainer.classList.add(t.config.inline?"inline":"static"),t.config.inline&&(!Yn&&t.element.parentNode?t.element.parentNode.insertBefore(t.calendarContainer,t._input.nextSibling):t.config.appendTo!==void 0&&t.config.appendTo.appendChild(t.calendarContainer)),t.config.static)){var po=dl("div","flatpickr-wrapper");t.element.parentNode&&t.element.parentNode.insertBefore(po,t.element),po.appendChild(t.element),t.altInput&&po.appendChild(t.altInput),po.appendChild(t.calendarContainer)}!t.config.static&&!t.config.inline&&(t.config.appendTo!==void 0?t.config.appendTo:window.document.body).appendChild(t.calendarContainer)}function oe(ze,et,Tt,Wt){var Yn=he(et,!0),po=dl("span",ze,et.getDate().toString());return po.dateObj=et,po.$i=Wt,po.setAttribute("aria-label",t.formatDate(et,t.config.ariaDateFormat)),ze.indexOf("hidden")===-1&&N1(et,t.now)===0&&(t.todayDateElem=po,po.classList.add("today"),po.setAttribute("aria-current","date")),Yn?(po.tabIndex=-1,Ls(et)&&(po.classList.add("selected"),t.selectedDateElem=po,t.config.mode==="range"&&(Mg(po,"startRange",t.selectedDates[0]&&N1(et,t.selectedDates[0],!0)===0),Mg(po,"endRange",t.selectedDates[1]&&N1(et,t.selectedDates[1],!0)===0),ze==="nextMonthDay"&&po.classList.add("inRange")))):po.classList.add("flatpickr-disabled"),t.config.mode==="range"&&aa(et)&&!Ls(et)&&po.classList.add("inRange"),t.weekNumbers&&t.config.showMonths===1&&ze!=="prevMonthDay"&&Wt%7===6&&t.weekNumbers.insertAdjacentHTML("beforeend",""+t.config.getWeek(et)+""),Po("onDayCreate",po),po}function G(ze){ze.focus(),t.config.mode==="range"&&Yo(ze)}function we(ze){for(var et=ze>0?0:t.config.showMonths-1,Tt=ze>0?t.config.showMonths:-1,Wt=et;Wt!=Tt;Wt+=ze)for(var Yn=t.daysContainer.children[Wt],po=ze>0?0:Yn.children.length-1,wo=ze>0?Yn.children.length:-1,fn=po;fn!=wo;fn+=ze){var os=Yn.children[fn];if(os.className.indexOf("hidden")===-1&&he(os.dateObj))return os}}function ve(ze,et){for(var Tt=ze.className.indexOf("Month")===-1?ze.dateObj.getMonth():t.currentMonth,Wt=et>0?t.config.showMonths:-1,Yn=et>0?1:-1,po=Tt-t.currentMonth;po!=Wt;po+=Yn)for(var wo=t.daysContainer.children[po],fn=Tt-t.currentMonth===po?ze.$i+et:et<0?wo.children.length-1:0,os=wo.children.length,xo=fn;xo>=0&&xo0?os:-1);xo+=Yn){var fs=wo.children[xo];if(fs.className.indexOf("hidden")===-1&&he(fs.dateObj)&&Math.abs(ze.$i-xo)>=Math.abs(et))return G(fs)}t.changeMonth(Yn),Re(we(Yn),0)}function Re(ze,et){var Tt=l(),Wt=Zo(Tt||document.body),Yn=ze!==void 0?ze:Wt?Tt:t.selectedDateElem!==void 0&&Zo(t.selectedDateElem)?t.selectedDateElem:t.todayDateElem!==void 0&&Zo(t.todayDateElem)?t.todayDateElem:we(et>0?1:-1);Yn===void 0?t._input.focus():Wt?ve(Yn,et):G(Yn)}function Oe(ze,et){for(var Tt=(new Date(ze,et,1).getDay()-t.l10n.firstDayOfWeek+7)%7,Wt=t.utils.getDaysInMonth((et-1+12)%12,ze),Yn=t.utils.getDaysInMonth(et,ze),po=window.document.createDocumentFragment(),wo=t.config.showMonths>1,fn=wo?"prevMonthDay hidden":"prevMonthDay",os=wo?"nextMonthDay hidden":"nextMonthDay",xo=Wt+1-Tt,fs=0;xo<=Wt;xo++,fs++)po.appendChild(oe("flatpickr-day "+fn,new Date(ze,et-1,xo),xo,fs));for(xo=1;xo<=Yn;xo++,fs++)po.appendChild(oe("flatpickr-day",new Date(ze,et,xo),xo,fs));for(var kr=Yn+1;kr<=42-Tt&&(t.config.showMonths===1||fs%7!==0);kr++,fs++)po.appendChild(oe("flatpickr-day "+os,new Date(ze,et+1,kr%Yn),kr,fs));var Lr=dl("div","dayContainer");return Lr.appendChild(po),Lr}function ce(){if(t.daysContainer!==void 0){uH(t.daysContainer),t.weekNumbers&&uH(t.weekNumbers);for(var ze=document.createDocumentFragment(),et=0;et1||t.config.monthSelectorType!=="dropdown")){var ze=function(Wt){return t.config.minDate!==void 0&&t.currentYear===t.config.minDate.getFullYear()&&Wtt.config.maxDate.getMonth())};t.monthsDropdownContainer.tabIndex=-1,t.monthsDropdownContainer.innerHTML="";for(var et=0;et<12;et++)if(!!ze(et)){var Tt=dl("option","flatpickr-monthDropdown-month");Tt.value=new Date(t.currentYear,et).getMonth().toString(),Tt.textContent=Hz(et,t.config.shorthandCurrentMonth,t.l10n),Tt.tabIndex=-1,t.currentMonth===et&&(Tt.selected=!0),t.monthsDropdownContainer.appendChild(Tt)}}}function tt(){var ze=dl("div","flatpickr-month"),et=window.document.createDocumentFragment(),Tt;t.config.showMonths>1||t.config.monthSelectorType==="static"?Tt=dl("span","cur-month"):(t.monthsDropdownContainer=dl("select","flatpickr-monthDropdown-months"),t.monthsDropdownContainer.setAttribute("aria-label",t.l10n.monthAriaLabel),Q(t.monthsDropdownContainer,"change",function(wo){var fn=R1(wo),os=parseInt(fn.value,10);t.changeMonth(os-t.currentMonth),Po("onMonthChange")}),Xe(),Tt=t.monthsDropdownContainer);var Wt=fH("cur-year",{tabindex:"-1"}),Yn=Wt.getElementsByTagName("input")[0];Yn.setAttribute("aria-label",t.l10n.yearAriaLabel),t.config.minDate&&Yn.setAttribute("min",t.config.minDate.getFullYear().toString()),t.config.maxDate&&(Yn.setAttribute("max",t.config.maxDate.getFullYear().toString()),Yn.disabled=!!t.config.minDate&&t.config.minDate.getFullYear()===t.config.maxDate.getFullYear());var po=dl("div","flatpickr-current-month");return po.appendChild(Tt),po.appendChild(Wt),et.appendChild(po),ze.appendChild(et),{container:ze,yearElement:Yn,monthElement:Tt}}function ot(){uH(t.monthNav),t.monthNav.appendChild(t.prevMonthNav),t.config.showMonths&&(t.yearElements=[],t.monthElements=[]);for(var ze=t.config.showMonths;ze--;){var et=tt();t.yearElements.push(et.yearElement),t.monthElements.push(et.monthElement),t.monthNav.appendChild(et.container)}t.monthNav.appendChild(t.nextMonthNav)}function V(){return t.monthNav=dl("div","flatpickr-months"),t.yearElements=[],t.monthElements=[],t.prevMonthNav=dl("span","flatpickr-prev-month"),t.prevMonthNav.innerHTML=t.config.prevArrow,t.nextMonthNav=dl("span","flatpickr-next-month"),t.nextMonthNav.innerHTML=t.config.nextArrow,ot(),Object.defineProperty(t,"_hidePrevMonthArrow",{get:function(){return t.__hidePrevMonthArrow},set:function(ze){t.__hidePrevMonthArrow!==ze&&(Mg(t.prevMonthNav,"flatpickr-disabled",ze),t.__hidePrevMonthArrow=ze)}}),Object.defineProperty(t,"_hideNextMonthArrow",{get:function(){return t.__hideNextMonthArrow},set:function(ze){t.__hideNextMonthArrow!==ze&&(Mg(t.nextMonthNav,"flatpickr-disabled",ze),t.__hideNextMonthArrow=ze)}}),t.currentYearElement=t.yearElements[0],bs(),t.monthNav}function ut(){t.calendarContainer.classList.add("hasTime"),t.config.noCalendar&&t.calendarContainer.classList.add("noCalendar");var ze=hoe(t.config);t.timeContainer=dl("div","flatpickr-time"),t.timeContainer.tabIndex=-1;var et=dl("span","flatpickr-time-separator",":"),Tt=fH("flatpickr-hour",{"aria-label":t.l10n.hourAriaLabel});t.hourElement=Tt.getElementsByTagName("input")[0];var Wt=fH("flatpickr-minute",{"aria-label":t.l10n.minuteAriaLabel});if(t.minuteElement=Wt.getElementsByTagName("input")[0],t.hourElement.tabIndex=t.minuteElement.tabIndex=-1,t.hourElement.value=Np(t.latestSelectedDateObj?t.latestSelectedDateObj.getHours():t.config.time_24hr?ze.hours:y(ze.hours)),t.minuteElement.value=Np(t.latestSelectedDateObj?t.latestSelectedDateObj.getMinutes():ze.minutes),t.hourElement.setAttribute("step",t.config.hourIncrement.toString()),t.minuteElement.setAttribute("step",t.config.minuteIncrement.toString()),t.hourElement.setAttribute("min",t.config.time_24hr?"0":"1"),t.hourElement.setAttribute("max",t.config.time_24hr?"23":"12"),t.hourElement.setAttribute("maxlength","2"),t.minuteElement.setAttribute("min","0"),t.minuteElement.setAttribute("max","59"),t.minuteElement.setAttribute("maxlength","2"),t.timeContainer.appendChild(Tt),t.timeContainer.appendChild(et),t.timeContainer.appendChild(Wt),t.config.time_24hr&&t.timeContainer.classList.add("time24hr"),t.config.enableSeconds){t.timeContainer.classList.add("hasSeconds");var Yn=fH("flatpickr-second");t.secondElement=Yn.getElementsByTagName("input")[0],t.secondElement.value=Np(t.latestSelectedDateObj?t.latestSelectedDateObj.getSeconds():ze.seconds),t.secondElement.setAttribute("step",t.minuteElement.getAttribute("step")),t.secondElement.setAttribute("min","0"),t.secondElement.setAttribute("max","59"),t.secondElement.setAttribute("maxlength","2"),t.timeContainer.appendChild(dl("span","flatpickr-time-separator",":")),t.timeContainer.appendChild(Yn)}return t.config.time_24hr||(t.amPM=dl("span","flatpickr-am-pm",t.l10n.amPM[Bb((t.latestSelectedDateObj?t.hourElement.value:t.config.defaultHour)>11)]),t.amPM.title=t.l10n.toggleTitle,t.amPM.tabIndex=-1,t.timeContainer.appendChild(t.amPM)),t.timeContainer}function Qe(){t.weekdayContainer?uH(t.weekdayContainer):t.weekdayContainer=dl("div","flatpickr-weekdays");for(var ze=t.config.showMonths;ze--;){var et=dl("div","flatpickr-weekdaycontainer");t.weekdayContainer.appendChild(et)}return Bt(),t.weekdayContainer}function Bt(){if(!!t.weekdayContainer){var ze=t.l10n.firstDayOfWeek,et=qhe(t.l10n.weekdays.shorthand);ze>0&&ze `+et.join("")+` - `}}function Ct(){t.calendarContainer.classList.add("hasWeeks");var ze=dl("div","flatpickr-weekwrapper");ze.appendChild(dl("span","flatpickr-weekday",t.l10n.weekAbbreviation));var et=dl("div","flatpickr-weeks");return ze.appendChild(et),{weekWrapper:ze,weekNumbers:et}}function He(ze,et){et===void 0&&(et=!0);var Tt=et?ze:ze-t.currentMonth;Tt<0&&t._hidePrevMonthArrow===!0||Tt>0&&t._hideNextMonthArrow===!0||(t.currentMonth+=Tt,(t.currentMonth<0||t.currentMonth>11)&&(t.currentYear+=t.currentMonth>11?1:-1,t.currentMonth=(t.currentMonth+12)%12,Po("onYearChange"),Xe()),ce(),Po("onMonthChange"),bs())}function st(ze,et){if(ze===void 0&&(ze=!0),et===void 0&&(et=!0),t.input.value="",t.altInput!==void 0&&(t.altInput.value=""),t.mobileInput!==void 0&&(t.mobileInput.value=""),t.selectedDates=[],t.latestSelectedDateObj=void 0,et===!0&&(t.currentYear=t._initialDate.getFullYear(),t.currentMonth=t._initialDate.getMonth()),t.config.enableTime===!0){var Tt=hoe(t.config),Wt=Tt.hours,Yn=Tt.minutes,po=Tt.seconds;R(Wt,Yn,po)}t.redraw(),ze&&Po("onChange")}function rn(){t.isOpen=!1,t.isMobile||(t.calendarContainer!==void 0&&t.calendarContainer.classList.remove("open"),t._input!==void 0&&t._input.classList.remove("active")),Po("onClose")}function Et(){t.config!==void 0&&Po("onDestroy");for(var ze=t._handlers.length;ze--;)t._handlers[ze].remove();if(t._handlers=[],t.mobileInput)t.mobileInput.parentNode&&t.mobileInput.parentNode.removeChild(t.mobileInput),t.mobileInput=void 0;else if(t.calendarContainer&&t.calendarContainer.parentNode)if(t.config.static&&t.calendarContainer.parentNode){var et=t.calendarContainer.parentNode;if(et.lastChild&&et.removeChild(et.lastChild),et.parentNode){for(;et.firstChild;)et.parentNode.insertBefore(et.firstChild,et);et.parentNode.removeChild(et)}}else t.calendarContainer.parentNode.removeChild(t.calendarContainer);t.altInput&&(t.input.type="text",t.altInput.parentNode&&t.altInput.parentNode.removeChild(t.altInput),delete t.altInput),t.input&&(t.input.type=t.input._type,t.input.classList.remove("flatpickr-input"),t.input.removeAttribute("readonly")),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(Tt){try{delete t[Tt]}catch{}})}function Cn(ze){return t.calendarContainer.contains(ze)}function je(ze){if(t.isOpen&&!t.config.inline){var et=R1(ze),Tt=Cn(et),Wt=et===t.input||et===t.altInput||t.element.contains(et)||ze.path&&ze.path.indexOf&&(~ze.path.indexOf(t.input)||~ze.path.indexOf(t.altInput)),Yn=!Wt&&!Tt&&!Cn(ze.relatedTarget),po=!t.config.ignoredFocusElements.some(function(wo){return wo.contains(et)});Yn&&po&&(t.config.allowInput&&t.setDate(t._input.value,!1,t.config.altInput?t.config.altFormat:t.config.dateFormat),t.timeContainer!==void 0&&t.minuteElement!==void 0&&t.hourElement!==void 0&&t.input.value!==""&&t.input.value!==void 0&&h(),t.close(),t.config&&t.config.mode==="range"&&t.selectedDates.length===1&&t.clear(!1))}}function mt(ze){if(!(!ze||t.config.minDate&&zet.config.maxDate.getFullYear())){var et=ze,Tt=t.currentYear!==et;t.currentYear=et||t.currentYear,t.config.maxDate&&t.currentYear===t.config.maxDate.getFullYear()?t.currentMonth=Math.min(t.config.maxDate.getMonth(),t.currentMonth):t.config.minDate&&t.currentYear===t.config.minDate.getFullYear()&&(t.currentMonth=Math.max(t.config.minDate.getMonth(),t.currentMonth)),Tt&&(t.redraw(),Po("onYearChange"),Xe())}}function he(ze,et){var Tt;et===void 0&&(et=!0);var Wt=t.parseDate(ze,void 0,et);if(t.config.minDate&&Wt&&N1(Wt,t.config.minDate,et!==void 0?et:!t.minDateHasTime)<0||t.config.maxDate&&Wt&&N1(Wt,t.config.maxDate,et!==void 0?et:!t.maxDateHasTime)>0)return!1;if(!t.config.enable&&t.config.disable.length===0)return!0;if(Wt===void 0)return!1;for(var Yn=!!t.config.enable,po=(Tt=t.config.enable)!==null&&Tt!==void 0?Tt:t.config.disable,wo=0,fn=void 0;wo=fn.from.getTime()&&Wt.getTime()<=fn.to.getTime())return Yn}return!Yn}function Zo(ze){return t.daysContainer!==void 0?ze.className.indexOf("hidden")===-1&&ze.className.indexOf("flatpickr-disabled")===-1&&t.daysContainer.contains(ze):!1}function Kn(ze){var et=ze.target===t._input,Tt=t._input.value.trimEnd()!==_a();et&&Tt&&!(ze.relatedTarget&&Cn(ze.relatedTarget))&&t.setDate(t._input.value,!0,ze.target===t.altInput?t.config.altFormat:t.config.dateFormat)}function so(ze){var et=R1(ze),Tt=t.config.wrap?o.contains(et):et===t._input,Wt=t.config.allowInput,Yn=t.isOpen&&(!Wt||!Tt),po=t.config.inline&&Tt&&!Wt;if(ze.keyCode===13&&Tt){if(Wt)return t.setDate(t._input.value,!0,et===t.altInput?t.config.altFormat:t.config.dateFormat),t.close(),et.blur();t.open()}else if(Cn(et)||Yn||po){var wo=!!t.timeContainer&&t.timeContainer.contains(et);switch(ze.keyCode){case 13:wo?(ze.preventDefault(),h(),ps()):oo(ze);break;case 27:ze.preventDefault(),ps();break;case 8:case 46:Tt&&!t.config.allowInput&&(ze.preventDefault(),t.clear());break;case 37:case 39:if(!wo&&!Tt){ze.preventDefault();var fn=l();if(t.daysContainer!==void 0&&(Wt===!1||fn&&Zo(fn))){var os=ze.keyCode===39?1:-1;ze.ctrlKey?(ze.stopPropagation(),He(os),Re(we(1),0)):Re(void 0,os)}}else t.hourElement&&t.hourElement.focus();break;case 38:case 40:ze.preventDefault();var xo=ze.keyCode===40?1:-1;t.daysContainer&&et.$i!==void 0||et===t.input||et===t.altInput?ze.ctrlKey?(ze.stopPropagation(),mt(t.currentYear-xo),Re(we(1),0)):wo||Re(void 0,xo*7):et===t.currentYearElement?mt(t.currentYear-xo):t.config.enableTime&&(!wo&&t.hourElement&&t.hourElement.focus(),h(ze),t._debouncedChange());break;case 9:if(wo){var fs=[t.hourElement,t.minuteElement,t.secondElement,t.amPM].concat(t.pluginElements).filter(function(Vs){return Vs}),kr=fs.indexOf(et);if(kr!==-1){var Lr=fs[kr+(ze.shiftKey?-1:1)];ze.preventDefault(),(Lr||t._input).focus()}}else!t.config.noCalendar&&t.daysContainer&&t.daysContainer.contains(et)&&ze.shiftKey&&(ze.preventDefault(),t._input.focus());break}}if(t.amPM!==void 0&&et===t.amPM)switch(ze.key){case t.l10n.amPM[0].charAt(0):case t.l10n.amPM[0].charAt(0).toLowerCase():t.amPM.textContent=t.l10n.amPM[0],C(),ln();break;case t.l10n.amPM[1].charAt(0):case t.l10n.amPM[1].charAt(0).toLowerCase():t.amPM.textContent=t.l10n.amPM[1],C(),ln();break}(Tt||Cn(et))&&Po("onKeyDown",ze)}function Yo(ze,et){if(et===void 0&&(et="flatpickr-day"),!(t.selectedDates.length!==1||ze&&(!ze.classList.contains(et)||ze.classList.contains("flatpickr-disabled")))){for(var Tt=ze?ze.dateObj.getTime():t.days.firstElementChild.dateObj.getTime(),Wt=t.parseDate(t.selectedDates[0],void 0,!0).getTime(),Yn=Math.min(Tt,t.selectedDates[0].getTime()),po=Math.max(Tt,t.selectedDates[0].getTime()),wo=!1,fn=0,os=0,xo=Yn;xoYn&&xofn)?fn=xo:xo>Wt&&(!os||xo ."+et));fs.forEach(function(kr){var Lr=kr.dateObj,Vs=Lr.getTime(),Yr=fn>0&&Vs0&&Vs>os;if(Yr){kr.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(Zi){kr.classList.remove(Zi)});return}else if(wo&&!Yr)return;["startRange","inRange","endRange","notAllowed"].forEach(function(Zi){kr.classList.remove(Zi)}),ze!==void 0&&(ze.classList.add(Tt<=t.selectedDates[0].getTime()?"startRange":"endRange"),WtTt&&Vs===Wt&&kr.classList.add("endRange"),Vs>=fn&&(os===0||Vs<=os)&&aNe(Vs,Wt,Tt)&&kr.classList.add("inRange"))})}}function as(){t.isOpen&&!t.config.static&&!t.config.inline&&bn()}function kt(ze,et){if(et===void 0&&(et=t._positionElement),t.isMobile===!0){if(ze){ze.preventDefault();var Tt=R1(ze);Tt&&Tt.blur()}t.mobileInput!==void 0&&(t.mobileInput.focus(),t.mobileInput.click()),Po("onOpen");return}else if(t._input.disabled||t.config.inline)return;var Wt=t.isOpen;t.isOpen=!0,Wt||(t.calendarContainer.classList.add("open"),t._input.classList.add("active"),Po("onOpen"),bn(et)),t.config.enableTime===!0&&t.config.noCalendar===!0&&t.config.allowInput===!1&&(ze===void 0||!t.timeContainer.contains(ze.relatedTarget))&&setTimeout(function(){return t.hourElement.select()},50)}function jt(ze){return function(et){var Tt=t.config["_"+ze+"Date"]=t.parseDate(et,t.config.dateFormat),Wt=t.config["_"+(ze==="min"?"max":"min")+"Date"];Tt!==void 0&&(t[ze==="min"?"minDateHasTime":"maxDateHasTime"]=Tt.getHours()>0||Tt.getMinutes()>0||Tt.getSeconds()>0),t.selectedDates&&(t.selectedDates=t.selectedDates.filter(function(Yn){return he(Yn)}),!t.selectedDates.length&&ze==="min"&&E(Tt),ln()),t.daysContainer&&(zn(),Tt!==void 0?t.currentYearElement[ze]=Tt.getFullYear().toString():t.currentYearElement.removeAttribute(ze),t.currentYearElement.disabled=!!Wt&&Tt!==void 0&&Wt.getFullYear()===Tt.getFullYear())}}function pt(){var ze=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],et=$m($m({},JSON.parse(JSON.stringify(o.dataset||{}))),e),Tt={};t.config.parseDate=et.parseDate,t.config.formatDate=et.formatDate,Object.defineProperty(t.config,"enable",{get:function(){return t.config._enable},set:function(fs){t.config._enable=Xs(fs)}}),Object.defineProperty(t.config,"disable",{get:function(){return t.config._disable},set:function(fs){t.config._disable=Xs(fs)}});var Wt=et.mode==="time";if(!et.dateFormat&&(et.enableTime||Wt)){var Yn=Cf.defaultConfig.dateFormat||TD.dateFormat;Tt.dateFormat=et.noCalendar||Wt?"H:i"+(et.enableSeconds?":S":""):Yn+" H:i"+(et.enableSeconds?":S":"")}if(et.altInput&&(et.enableTime||Wt)&&!et.altFormat){var po=Cf.defaultConfig.altFormat||TD.altFormat;Tt.altFormat=et.noCalendar||Wt?"h:i"+(et.enableSeconds?":S K":" K"):po+(" h:i"+(et.enableSeconds?":S":"")+" K")}Object.defineProperty(t.config,"minDate",{get:function(){return t.config._minDate},set:jt("min")}),Object.defineProperty(t.config,"maxDate",{get:function(){return t.config._maxDate},set:jt("max")});var wo=function(fs){return function(kr){t.config[fs==="min"?"_minTime":"_maxTime"]=t.parseDate(kr,"H:i:S")}};Object.defineProperty(t.config,"minTime",{get:function(){return t.config._minTime},set:wo("min")}),Object.defineProperty(t.config,"maxTime",{get:function(){return t.config._maxTime},set:wo("max")}),et.mode==="time"&&(t.config.noCalendar=!0,t.config.enableTime=!0),Object.assign(t.config,Tt,et);for(var fn=0;fn-1?t.config[xo]=uoe(os[xo]).map(u).concat(t.config[xo]):typeof et[xo]>"u"&&(t.config[xo]=os[xo])}et.altInputClass||(t.config.altInputClass=Ne().className+" "+t.config.altInputClass),Po("onParseConfig")}function Ne(){return t.config.wrap?o.querySelector("[data-input]"):o}function Gt(){typeof t.config.locale!="object"&&typeof Cf.l10ns[t.config.locale]>"u"&&t.config.errorHandler(new Error("flatpickr: invalid locale "+t.config.locale)),t.l10n=$m($m({},Cf.l10ns.default),typeof t.config.locale=="object"?t.config.locale:t.config.locale!=="default"?Cf.l10ns[t.config.locale]:void 0),sE.D="("+t.l10n.weekdays.shorthand.join("|")+")",sE.l="("+t.l10n.weekdays.longhand.join("|")+")",sE.M="("+t.l10n.months.shorthand.join("|")+")",sE.F="("+t.l10n.months.longhand.join("|")+")",sE.K="("+t.l10n.amPM[0]+"|"+t.l10n.amPM[1]+"|"+t.l10n.amPM[0].toLowerCase()+"|"+t.l10n.amPM[1].toLowerCase()+")";var ze=$m($m({},e),JSON.parse(JSON.stringify(o.dataset||{})));ze.time_24hr===void 0&&Cf.defaultConfig.time_24hr===void 0&&(t.config.time_24hr=t.l10n.time_24hr),t.formatDate=IOe(t),t.parseDate=Hse({config:t.config,l10n:t.l10n})}function bn(ze){if(typeof t.config.position=="function")return void t.config.position(t,ze);if(t.calendarContainer!==void 0){Po("onPreCalendarPosition");var et=ze||t._positionElement,Tt=Array.prototype.reduce.call(t.calendarContainer.children,function(Go,ei){return Go+ei.offsetHeight},0),Wt=t.calendarContainer.offsetWidth,Yn=t.config.position.split(" "),po=Yn[0],wo=Yn.length>1?Yn[1]:null,fn=et.getBoundingClientRect(),os=window.innerHeight-fn.bottom,xo=po==="above"||po!=="below"&&osTt,fs=window.pageYOffset+fn.top+(xo?-Tt-2:et.offsetHeight+2);if(Mg(t.calendarContainer,"arrowTop",!xo),Mg(t.calendarContainer,"arrowBottom",xo),!t.config.inline){var kr=window.pageXOffset+fn.left,Lr=!1,Vs=!1;wo==="center"?(kr-=(Wt-fn.width)/2,Lr=!0):wo==="right"&&(kr-=Wt-fn.width,Vs=!0),Mg(t.calendarContainer,"arrowLeft",!Lr&&!Vs),Mg(t.calendarContainer,"arrowCenter",Lr),Mg(t.calendarContainer,"arrowRight",Vs);var Yr=window.document.body.offsetWidth-(window.pageXOffset+fn.right),Zi=kr+Wt>window.document.body.offsetWidth,Qa=Yr+Wt>window.document.body.offsetWidth;if(Mg(t.calendarContainer,"rightMost",Zi),!t.config.static)if(t.calendarContainer.style.top=fs+"px",!Zi)t.calendarContainer.style.left=kr+"px",t.calendarContainer.style.right="auto";else if(!Qa)t.calendarContainer.style.left="auto",t.calendarContainer.style.right=Yr+"px";else{var Oi=At();if(Oi===void 0)return;var Ge=window.document.body.offsetWidth,qe=Math.max(0,Ge/2-Wt/2),Nt=".flatpickr-calendar.centerMost:before",Ut=".flatpickr-calendar.centerMost:after",bo=Oi.cssRules.length,Lo="{left:"+fn.left+"px;right:auto;}";Mg(t.calendarContainer,"rightMost",!1),Mg(t.calendarContainer,"centerMost",!0),Oi.insertRule(Nt+","+Ut+Lo,bo),t.calendarContainer.style.left=qe+"px",t.calendarContainer.style.right="auto"}}}}function At(){for(var ze=null,et=0;ett.currentMonth+t.config.showMonths-1)&&t.config.mode!=="range";if(t.selectedDateElem=Wt,t.config.mode==="single")t.selectedDates=[Yn];else if(t.config.mode==="multiple"){var wo=Ls(Yn);wo?t.selectedDates.splice(parseInt(wo),1):t.selectedDates.push(Yn)}else t.config.mode==="range"&&(t.selectedDates.length===2&&t.clear(!1,!1),t.latestSelectedDateObj=Yn,t.selectedDates.push(Yn),N1(Yn,t.selectedDates[0],!0)!==0&&t.selectedDates.sort(function(fs,kr){return fs.getTime()-kr.getTime()}));if(C(),po){var fn=t.currentYear!==Yn.getFullYear();t.currentYear=Yn.getFullYear(),t.currentMonth=Yn.getMonth(),fn&&(Po("onYearChange"),Xe()),Po("onMonthChange")}if(bs(),ce(),ln(),!po&&t.config.mode!=="range"&&t.config.showMonths===1?G(Wt):t.selectedDateElem!==void 0&&t.hourElement===void 0&&t.selectedDateElem&&t.selectedDateElem.focus(),t.hourElement!==void 0&&t.hourElement!==void 0&&t.hourElement.focus(),t.config.closeOnSelect){var os=t.config.mode==="single"&&!t.config.enableTime,xo=t.config.mode==="range"&&t.selectedDates.length===2&&!t.config.enableTime;(os||xo)&&ps()}F()}}var Ss={locale:[Gt,Bt],showMonths:[ot,d,Qe],minDate:[K],maxDate:[K],positionElement:[Ns],clickOpens:[function(){t.config.clickOpens===!0?(Q(t._input,"focus",t.open),Q(t._input,"click",t.open)):(t._input.removeEventListener("focus",t.open),t._input.removeEventListener("click",t.open))}]};function Mr(ze,et){if(ze!==null&&typeof ze=="object"){Object.assign(t.config,ze);for(var Tt in ze)Ss[Tt]!==void 0&&Ss[Tt].forEach(function(Wt){return Wt()})}else t.config[ze]=et,Ss[ze]!==void 0?Ss[ze].forEach(function(Wt){return Wt()}):coe.indexOf(ze)>-1&&(t.config[ze]=uoe(et));t.redraw(),ln(!0)}function $s(ze,et){var Tt=[];if(ze instanceof Array)Tt=ze.map(function(Wt){return t.parseDate(Wt,et)});else if(ze instanceof Date||typeof ze=="number")Tt=[t.parseDate(ze,et)];else if(typeof ze=="string")switch(t.config.mode){case"single":case"time":Tt=[t.parseDate(ze,et)];break;case"multiple":Tt=ze.split(t.config.conjunction).map(function(Wt){return t.parseDate(Wt,et)});break;case"range":Tt=ze.split(t.l10n.rangeSeparator).map(function(Wt){return t.parseDate(Wt,et)});break}else t.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(ze)));t.selectedDates=t.config.allowInvalidPreload?Tt:Tt.filter(function(Wt){return Wt instanceof Date&&he(Wt,!1)}),t.config.mode==="range"&&t.selectedDates.sort(function(Wt,Yn){return Wt.getTime()-Yn.getTime()})}function tr(ze,et,Tt){if(et===void 0&&(et=!1),Tt===void 0&&(Tt=t.config.dateFormat),ze!==0&&!ze||ze instanceof Array&&ze.length===0)return t.clear(et);$s(ze,Tt),t.latestSelectedDateObj=t.selectedDates[t.selectedDates.length-1],t.redraw(),K(void 0,et),E(),t.selectedDates.length===0&&t.clear(!1),ln(et),et&&Po("onChange")}function Xs(ze){return ze.slice().map(function(et){return typeof et=="string"||typeof et=="number"||et instanceof Date?t.parseDate(et,void 0,!0):et&&typeof et=="object"&&et.from&&et.to?{from:t.parseDate(et.from,void 0),to:t.parseDate(et.to,void 0)}:et}).filter(function(et){return et})}function wa(){t.selectedDates=[],t.now=t.parseDate(t.config.now)||new Date;var ze=t.config.defaultDate||((t.input.nodeName==="INPUT"||t.input.nodeName==="TEXTAREA")&&t.input.placeholder&&t.input.value===t.input.placeholder?null:t.input.value);ze&&$s(ze,t.config.dateFormat),t._initialDate=t.selectedDates.length>0?t.selectedDates[0]:t.config.minDate&&t.config.minDate.getTime()>t.now.getTime()?t.config.minDate:t.config.maxDate&&t.config.maxDate.getTime()0&&(t.latestSelectedDateObj=t.selectedDates[0]),t.config.minTime!==void 0&&(t.config.minTime=t.parseDate(t.config.minTime,"H:i")),t.config.maxTime!==void 0&&(t.config.maxTime=t.parseDate(t.config.maxTime,"H:i")),t.minDateHasTime=!!t.config.minDate&&(t.config.minDate.getHours()>0||t.config.minDate.getMinutes()>0||t.config.minDate.getSeconds()>0),t.maxDateHasTime=!!t.config.maxDate&&(t.config.maxDate.getHours()>0||t.config.maxDate.getMinutes()>0||t.config.maxDate.getSeconds()>0)}function dr(){if(t.input=Ne(),!t.input){t.config.errorHandler(new Error("Invalid input element specified"));return}t.input._type=t.input.type,t.input.type="text",t.input.classList.add("flatpickr-input"),t._input=t.input,t.config.altInput&&(t.altInput=dl(t.input.nodeName,t.config.altInputClass),t._input=t.altInput,t.altInput.placeholder=t.input.placeholder,t.altInput.disabled=t.input.disabled,t.altInput.required=t.input.required,t.altInput.tabIndex=t.input.tabIndex,t.altInput.type="text",t.input.setAttribute("type","hidden"),!t.config.static&&t.input.parentNode&&t.input.parentNode.insertBefore(t.altInput,t.input.nextSibling)),t.config.allowInput||t._input.setAttribute("readonly","readonly"),Ns()}function Ns(){t._positionElement=t.config.positionElement||t._input}function qr(){var ze=t.config.enableTime?t.config.noCalendar?"time":"datetime-local":"date";t.mobileInput=dl("input",t.input.className+" flatpickr-mobile"),t.mobileInput.tabIndex=1,t.mobileInput.type=ze,t.mobileInput.disabled=t.input.disabled,t.mobileInput.required=t.input.required,t.mobileInput.placeholder=t.input.placeholder,t.mobileFormatStr=ze==="datetime-local"?"Y-m-d\\TH:i:S":ze==="date"?"Y-m-d":"H:i:S",t.selectedDates.length>0&&(t.mobileInput.defaultValue=t.mobileInput.value=t.formatDate(t.selectedDates[0],t.mobileFormatStr)),t.config.minDate&&(t.mobileInput.min=t.formatDate(t.config.minDate,"Y-m-d")),t.config.maxDate&&(t.mobileInput.max=t.formatDate(t.config.maxDate,"Y-m-d")),t.input.getAttribute("step")&&(t.mobileInput.step=String(t.input.getAttribute("step"))),t.input.type="hidden",t.altInput!==void 0&&(t.altInput.type="hidden");try{t.input.parentNode&&t.input.parentNode.insertBefore(t.mobileInput,t.input.nextSibling)}catch{}Q(t.mobileInput,"change",function(et){t.setDate(R1(et).value,!1,t.mobileFormatStr),Po("onChange"),Po("onClose")})}function $o(ze){if(t.isOpen===!0)return t.close();t.open(ze)}function Po(ze,et){if(t.config!==void 0){var Tt=t.config[ze];if(Tt!==void 0&&Tt.length>0)for(var Wt=0;Tt[Wt]&&Wt=0&&N1(ze,t.selectedDates[1])<=0}function bs(){t.config.noCalendar||t.isMobile||!t.monthNav||(t.yearElements.forEach(function(ze,et){var Tt=new Date(t.currentYear,t.currentMonth,1);Tt.setMonth(t.currentMonth+et),t.config.showMonths>1||t.config.monthSelectorType==="static"?t.monthElements[et].textContent=Hz(Tt.getMonth(),t.config.shorthandCurrentMonth,t.l10n)+" ":t.monthsDropdownContainer.value=Tt.getMonth().toString(),ze.value=Tt.getFullYear().toString()}),t._hidePrevMonthArrow=t.config.minDate!==void 0&&(t.currentYear===t.config.minDate.getFullYear()?t.currentMonth<=t.config.minDate.getMonth():t.currentYeart.config.maxDate.getMonth():t.currentYear>t.config.maxDate.getFullYear()))}function _a(ze){var et=ze||(t.config.altInput?t.config.altFormat:t.config.dateFormat);return t.selectedDates.map(function(Tt){return t.formatDate(Tt,et)}).filter(function(Tt,Wt,Yn){return t.config.mode!=="range"||t.config.enableTime||Yn.indexOf(Tt)===Wt}).join(t.config.mode!=="range"?t.config.conjunction:t.l10n.rangeSeparator)}function ln(ze){ze===void 0&&(ze=!0),t.mobileInput!==void 0&&t.mobileFormatStr&&(t.mobileInput.value=t.latestSelectedDateObj!==void 0?t.formatDate(t.latestSelectedDateObj,t.mobileFormatStr):""),t.input.value=_a(t.config.dateFormat),t.altInput!==void 0&&(t.altInput.value=_a(t.config.altFormat)),ze!==!1&&Po("onValueUpdate")}function vs(ze){var et=R1(ze),Tt=t.prevMonthNav.contains(et),Wt=t.nextMonthNav.contains(et);Tt||Wt?He(Tt?-1:1):t.yearElements.indexOf(et)>=0?et.select():et.classList.contains("arrowUp")?t.changeYear(t.currentYear+1):et.classList.contains("arrowDown")&&t.changeYear(t.currentYear-1)}function Qi(ze){ze.preventDefault();var et=ze.type==="keydown",Tt=R1(ze),Wt=Tt;t.amPM!==void 0&&Tt===t.amPM&&(t.amPM.textContent=t.l10n.amPM[Bb(t.amPM.textContent===t.l10n.amPM[0])]);var Yn=parseFloat(Wt.getAttribute("min")),po=parseFloat(Wt.getAttribute("max")),wo=parseFloat(Wt.getAttribute("step")),fn=parseInt(Wt.value,10),os=ze.delta||(et?ze.which===38?1:-1:0),xo=fn+wo*os;if(typeof Wt.value<"u"&&Wt.value.length===2){var fs=Wt===t.hourElement,kr=Wt===t.minuteElement;xopo&&(xo=Wt===t.hourElement?xo-po-Bb(!t.amPM):Yn,kr&&te(void 0,1,t.hourElement)),t.amPM&&fs&&(wo===1?xo+fn===23:Math.abs(xo-fn)>wo)&&(t.amPM.textContent=t.l10n.amPM[Bb(t.amPM.textContent===t.l10n.amPM[0])]),Wt.value=Np(xo)}}return a(),t}function ED(o,e){for(var t=Array.prototype.slice.call(o).filter(function(u){return u instanceof HTMLElement}),s=[],a=0;a{$=null}),go()),o[0]?Q?Q.p(o,U):(Q=Khe(o),Q.c(),Q.m(y.parentNode,y)):Q&&(Q.d(1),Q=null)},i(F){C||(xe(u.$$.fragment,F),xe($),C=!0)},o(F){Be(u.$$.fragment,F),Be($),C=!1},d(F){F&&ke(e),o[12](null),Jt(u),$&&$.d(),F&&ke(b),Q&&Q.d(F),F&&ke(y),E=!1,vi(R)}}}function Ghe(o){let e,t,s,a;function l(h){o[15](h)}function u(h){o[16](h)}let d={field:o[1]};return o[0]!==void 0&&(d.value=o[0]),o[9]!==void 0&&(d.search=o[9]),e=new eV({props:d}),o[14](e),Ro.push(()=>er(e,"value",l)),Ro.push(()=>er(e,"search",u)),{c(){en(e.$$.fragment)},m(h,b){Kt(e,h,b),a=!0},p(h,b){const y={};b&2&&(y.field=h[1]),!t&&b&1&&(t=!0,y.value=h[0],lr(()=>t=!1)),!s&&b&512&&(s=!0,y.search=h[9],lr(()=>s=!1)),e.$set(y)},i(h){a||(xe(e.$$.fragment,h),a=!0)},o(h){Be(e.$$.fragment,h),a=!1},d(h){o[14](null),Jt(e,h)}}}function Khe(o){let e,t,s,a,l,u,d;return{c(){e=re("span"),t=re("div"),s=Ht(o[0]),a=Ze(),l=re("button"),Z(l,"type","button"),Z(l,"class","btn-close btn-sm ms-1"),rs(l,"font-size","10px"),Z(l,"aria-label","Close"),Z(t,"class","d-flex align-items-center "),Z(e,"class","badge rounded-pill bg-light text-dark fs-6 mt-3")},m(h,b){Te(h,e,b),X(e,t),X(t,s),X(t,a),X(t,l),u||(d=mn(l,"click",ku(o[17])),u=!0)},p(h,b){b&1&&Fn(s,h[0])},d(h){h&&ke(e),u=!1,d()}}}function Jhe(o){let e,t;return{c(){e=re("div"),t=Ht(o[8]),Z(e,"class","invalid-feedback d-block")},m(s,a){Te(s,e,a),X(e,t)},p(s,a){a&256&&Fn(t,s[8])},d(s){s&&ke(e)}}}function mNe(o){let e,t,s,a,l;const u=[hNe,dNe],d=[];function h(y,C){return y[7]?0:1}t=h(o),s=d[t]=u[t](o);let b=o[8]&&Jhe(o);return{c(){e=re("div"),s.c(),a=Ze(),b&&b.c(),Z(e,"class","mb-0")},m(y,C){Te(y,e,C),d[t].m(e,null),X(e,a),b&&b.m(e,null),l=!0},p(y,[C]){let E=t;t=h(y),t===E?d[t].p(y,C):(mo(),Be(d[E],1,1,()=>{d[E]=null}),go(),s=d[t],s?s.p(y,C):(s=d[t]=u[t](y),s.c()),xe(s,1),s.m(e,a)),y[8]?b?b.p(y,C):(b=Jhe(y),b.c(),b.m(e,null)):b&&(b.d(1),b=null)},i(y){l||(xe(s),l=!0)},o(y){Be(s),l=!1},d(y){y&&ke(e),d[t].d(),b&&b.d()}}}function gNe(o,e,t){let s,a,l,{field:u}=e,{value:d}=e,{id:h}=e,{isCreateMode:b}=e,{validationErrors:y}=e,C,E,R,$={enableTime:!1,allowInput:!0,dateFormat:"Y-m-d"};u.min&&($.minDate=u.min),u.max&&($.maxDate=u.max),W1(()=>{(!u.readonly||b)&&(a&&($.clickOpens=!1),t(6,R=Cf(E,$)))});function Q(){s=this.value,t(9,s)}function F(we){Ro[we?"unshift":"push"](()=>{E=we,t(5,E)})}const U=we=>R.open();function K(we){Ro[we?"unshift":"push"](()=>{C=we,t(4,C)})}function L(we){d=we,t(0,d)}function te(we){s=we,t(9,s)}const ne=we=>t(0,d="");function oe(){d=this.value,t(0,d)}function G(we){Ro[we?"unshift":"push"](()=>{E=we,t(5,E)})}return o.$$set=we=>{"field"in we&&t(1,u=we.field),"value"in we&&t(0,d=we.value),"id"in we&&t(2,h=we.id),"isCreateMode"in we&&t(3,b=we.isCreateMode),"validationErrors"in we&&t(10,y=we.validationErrors)},o.$$.update=()=>{o.$$.dirty&10&&t(7,a=u.optionsFrom&&!(u.readonly&&!b)),o.$$.dirty&1026&&t(8,l=Lm(y,u.name))},t(9,s=""),[d,u,h,b,C,E,R,a,l,s,y,Q,F,U,K,L,te,ne,oe,G]}class pNe extends uo{constructor(e){super(),co(this,e,gNe,mNe,lo,{field:1,value:0,id:2,isCreateMode:3,validationErrors:10})}}var dH,bNe=new Uint8Array(16);function vNe(){if(!dH&&(dH=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!dH))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return dH(bNe)}const ONe=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function yNe(o){return typeof o=="string"&&ONe.test(o)}var zh=[];for(var moe=0;moe<256;++moe)zh.push((moe+256).toString(16).substr(1));function wNe(o){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,t=(zh[o[e+0]]+zh[o[e+1]]+zh[o[e+2]]+zh[o[e+3]]+"-"+zh[o[e+4]]+zh[o[e+5]]+"-"+zh[o[e+6]]+zh[o[e+7]]+"-"+zh[o[e+8]]+zh[o[e+9]]+"-"+zh[o[e+10]]+zh[o[e+11]]+zh[o[e+12]]+zh[o[e+13]]+zh[o[e+14]]+zh[o[e+15]]).toLowerCase();if(!yNe(t))throw TypeError("Stringified UUID is invalid");return t}function _Ne(o,e,t){o=o||{};var s=o.random||(o.rng||vNe)();if(s[6]=s[6]&15|64,s[8]=s[8]&63|128,e){t=t||0;for(var a=0;a<16;++a)e[t+a]=s[a];return e}return wNe(s)}function SNe(o){let e,t,s,a,l;return t=new Fa({props:{icon:"dice"}}),{c(){e=re("button"),en(t.$$.fragment),Z(e,"class","btn btn-primary ms-2"),Z(e,"title","Generate a new UUIDv4")},m(u,d){Te(u,e,d),Kt(t,e,null),s=!0,a||(l=mn(e,"click",o[4]),a=!0)},p:un,i(u){s||(xe(t.$$.fragment,u),s=!0)},o(u){Be(t.$$.fragment,u),s=!1},d(u){u&&ke(e),Jt(t),a=!1,l()}}}function eme(o){let e,t;return{c(){e=re("div"),t=Ht(o[2]),Z(e,"class","invalid-feedback d-block")},m(s,a){Te(s,e,a),X(e,t)},p(s,a){a&4&&Fn(t,s[2])},d(s){s&&ke(e)}}}function CNe(o){let e,t,s,a,l,u,d,h,b=!o[3]&&SNe(o),y=o[2]&&eme(o);return{c(){e=re("div"),t=re("div"),s=re("input"),a=Ze(),b&&b.c(),l=Ze(),y&&y.c(),Z(s,"type","text"),Z(s,"id",o[1]),Z(s,"class","form-control"),Z(s,"autocomplete","off"),s.readOnly=o[3],Vo(s,"is-invalid",o[2]),Z(t,"class","d-flex justify-content-between"),Z(e,"class","mb-0")},m(C,E){Te(C,e,E),X(e,t),X(t,s),ar(s,o[0]),X(t,a),b&&b.m(t,null),X(e,l),y&&y.m(e,null),u=!0,d||(h=mn(s,"input",o[8]),d=!0)},p(C,[E]){(!u||E&2)&&Z(s,"id",C[1]),E&1&&s.value!==C[0]&&ar(s,C[0]),(!u||E&4)&&Vo(s,"is-invalid",C[2]),C[3]||b.p(C,E),C[2]?y?y.p(C,E):(y=eme(C),y.c(),y.m(e,null)):y&&(y.d(1),y=null)},i(C){u||(xe(b),u=!0)},o(C){Be(b),u=!1},d(C){C&&ke(e),b&&b.d(),y&&y.d(),d=!1,h()}}}function kNe(o,e,t){let s;Ur("channelurl");let{validationErrors:a}=e,{field:l}=e,{value:u}=e,{id:d}=e,{isCreateMode:h}=e,b=l.readonly&&!h;function y(E){E.preventDefault(),t(0,u=_Ne())}function C(){u=this.value,t(0,u)}return o.$$set=E=>{"validationErrors"in E&&t(5,a=E.validationErrors),"field"in E&&t(6,l=E.field),"value"in E&&t(0,u=E.value),"id"in E&&t(1,d=E.id),"isCreateMode"in E&&t(7,h=E.isCreateMode)},o.$$.update=()=>{o.$$.dirty&96&&t(2,s=Lm(a,l.name))},[u,d,s,b,y,a,l,h,C]}class xNe extends uo{constructor(e){super(),co(this,e,kNe,CNe,lo,{validationErrors:5,field:6,value:0,id:1,isCreateMode:7})}}function tme(o,e,t){const s=o.slice();return s[14]=e[t],s}function nme(o,e,t){const s=o.slice();return s[17]=e[t],s}function TNe(o){let e,t,s,a,l=o[3],u=[];for(let d=0;dd[14].id;for(let d=0;d0&&sme(o),y={};return a=new are({props:y}),o[12](a),a.$on("insert",o[7]),{c(){e=re("div"),h.c(),t=Ze(),b&&b.c(),s=Ze(),en(a.$$.fragment),Z(e,"class","mb-0")},m(C,E){Te(C,e,E),h.m(e,null),Te(C,t,E),b&&b.m(C,E),Te(C,s,E),Kt(a,C,E),l=!0},p(C,[E]){d===(d=u(C))&&h?h.p(C,E):(h.d(1),h=d(C),h&&(h.c(),h.m(e,null))),C[2].length>0?b?(b.p(C,E),E&4&&xe(b,1)):(b=sme(C),b.c(),xe(b,1),b.m(s.parentNode,s)):b&&(mo(),Be(b,1,1,()=>{b=null}),go());const R={};a.$set(R)},i(C){l||(xe(b),xe(a.$$.fragment,C),l=!0)},o(C){Be(b),Be(a.$$.fragment,C),l=!1},d(C){C&&ke(e),h.d(),C&&ke(t),b&&b.d(C),C&&ke(s),o[12](null),Jt(a,C)}}}function PNe(o,e,t){let s;const a=Ur("channel");let{field:l}=e,{record:u}=e,{graph:d}=e,h,b=a.schemas.filter(U=>l.collections.includes(U.name));function y(U){U.preventDefault(),t(8,d.edges=d.edges.filter(K=>!(K.target===U.detail&&K.field===l.name)),d)}function C(U,K){U.preventDefault(),h.open(K)}async function E(U){t(8,d.edges=await qD(U.detail.source,U.detail.target,d.edges,l.name),d)}function R(U){var oe;U.preventDefault(),h.close();const K=U.detail.records,L=U.detail.action;let te=K.map(G=>({target:G.id,source:u.id,sourceSchema:u.schema,targetSchema:G.schema,field:l.name,rank:""})),ne=(oe=d.edges)!=null?oe:[];L==="replace"&&(ne=ne.filter(G=>G.field!==l.name)),t(8,d.records=Lc.exports.uniqBy([...d.records,...K],G=>G.id),d),t(8,d.edges=Lc.exports.uniqBy([...ne,...te],G=>G.target+G.field),d)}const $=U=>C(U,b[0].name),Q=(U,K)=>C(K,U.name);function F(U){Ro[U?"unshift":"push"](()=>{h=U,t(1,h)})}return o.$$set=U=>{"field"in U&&t(0,l=U.field),"record"in U&&t(9,u=U.record),"graph"in U&&t(8,d=U.graph)},o.$$.update=()=>{var U;o.$$.dirty&769&&t(2,s=(U=d==null?void 0:d.edges.filter(K=>K.field===l.name).map(K=>d.records.find(L=>L.id==K.target&&u.id==K.source)).filter(K=>!!(K!=null&&K.id)))!=null?U:[])},[l,h,s,b,y,C,E,R,d,u,$,Q,F]}class MNe extends uo{constructor(e){super(),co(this,e,PNe,DNe,lo,{field:0,record:9,graph:8})}}function ime(o){let e,t;return{c(){e=re("div"),t=Ht(o[5]),Z(e,"class","invalid-feedback d-block")},m(s,a){Te(s,e,a),X(e,t)},p(s,a){a&32&&Fn(t,s[5])},d(s){s&&ke(e)}}}function RNe(o){let e,t,s,a,l,u,d=o[5]&&ime(o);return{c(){e=re("div"),t=re("textarea"),a=Ze(),d&&d.c(),Z(t,"id",o[3]),Z(t,"class","form-control svelte-1er4ovm"),Z(t,"rows","2"),t.readOnly=s=o[1].readonly&&!o[2],Vo(t,"is-invalid",o[5]),Z(e,"class","mb-0")},m(h,b){Te(h,e,b),X(e,t),ar(t,o[0]),o[8](t),X(e,a),d&&d.m(e,null),l||(u=[mn(t,"input",o[7]),mn(t,"input",zse),mn(t,"focus",zse)],l=!0)},p(h,[b]){b&8&&Z(t,"id",h[3]),b&6&&s!==(s=h[1].readonly&&!h[2])&&(t.readOnly=s),b&1&&ar(t,h[0]),b&32&&Vo(t,"is-invalid",h[5]),h[5]?d?d.p(h,b):(d=ime(h),d.c(),d.m(e,null)):d&&(d.d(1),d=null)},i:un,o:un,d(h){h&&ke(e),o[8](null),d&&d.d(),l=!1,vi(u)}}}function zse(o){let e;o.target?e=o.target:e=o,e.style.overflow="hidden",e.style.height="1px",e.style.height=+e.scrollHeight+"px"}function $Ne(o,e,t){let s,{field:a}=e,{value:l}=e,{isCreateMode:u}=e,{validationErrors:d}=e,h,{id:b}=e;W1(()=>{zse(h)});function y(){l=this.value,t(0,l)}function C(E){Ro[E?"unshift":"push"](()=>{h=E,t(4,h)})}return o.$$set=E=>{"field"in E&&t(1,a=E.field),"value"in E&&t(0,l=E.value),"isCreateMode"in E&&t(2,u=E.isCreateMode),"validationErrors"in E&&t(6,d=E.validationErrors),"id"in E&&t(3,b=E.id)},o.$$.update=()=>{o.$$.dirty&66&&t(5,s=Lm(d,a.name))},[l,a,u,b,h,s,d,y,C]}class BOe extends uo{constructor(e){super(),co(this,e,$Ne,RNe,lo,{field:1,value:0,isCreateMode:2,validationErrors:6,id:3})}}function NNe(o){let e,t,s,a;return{c(){e=re("input"),Z(e,"type","text"),Z(e,"id",o[3]),Z(e,"class","form-control"),Z(e,"autocomplete","off"),e.readOnly=t=o[1].readonly&&!o[2],Vo(e,"is-invalid",o[8])},m(l,u){Te(l,e,u),ar(e,o[0]),o[20](e),s||(a=mn(e,"input",o[19]),s=!0)},p(l,u){u&8&&Z(e,"id",l[3]),u&6&&t!==(t=l[1].readonly&&!l[2])&&(e.readOnly=t),u&1&&e.value!==l[0]&&ar(e,l[0]),u&256&&Vo(e,"is-invalid",l[8])},i:un,o:un,d(l){l&&ke(e),o[20](null),s=!1,a()}}}function INe(o){let e,t,s,a,l,u,d,h,b,y,C,E,R;u=new Fa({props:{icon:"calendar"}});let $=o[1].optionsFrom&&ame(o),Q=o[0]&&lme(o);return{c(){e=re("div"),t=re("input"),a=Ze(),l=re("button"),en(u.$$.fragment),d=Ze(),h=re("ul"),$&&$.c(),b=Ze(),Q&&Q.c(),y=Rs(),Z(t,"type","search"),Z(t,"id",o[3]),Z(t,"class","form-control dropdown-toggle"),Z(t,"placeholder","Search for options"),Z(t,"data-bs-toggle","dropdown"),Z(t,"autocomplete","off"),t.readOnly=s=o[1].readonly&&!o[2],Vo(t,"is-invalid",o[8]),Z(l,"class","btn btn-light ms-1"),Z(h,"class","dropdown-menu w-100"),Z(e,"class","dropdown d-flex")},m(F,U){Te(F,e,U),X(e,t),ar(t,o[9]),o[13](t),X(e,a),X(e,l),Kt(u,l,null),X(e,d),X(e,h),$&&$.m(h,null),Te(F,b,U),Q&&Q.m(F,U),Te(F,y,U),C=!0,E||(R=[mn(t,"keyup",function(){Ub(o[4].update)&&o[4].update.apply(this,arguments)}),mn(t,"focus",function(){Ub(o[4].update)&&o[4].update.apply(this,arguments)}),mn(t,"input",o[12]),mn(l,"click",ku(o[14]))],E=!0)},p(F,U){o=F,(!C||U&8)&&Z(t,"id",o[3]),(!C||U&6&&s!==(s=o[1].readonly&&!o[2]))&&(t.readOnly=s),U&512&&t.value!==o[9]&&ar(t,o[9]),(!C||U&256)&&Vo(t,"is-invalid",o[8]),o[1].optionsFrom?$?($.p(o,U),U&2&&xe($,1)):($=ame(o),$.c(),xe($,1),$.m(h,null)):$&&(mo(),Be($,1,1,()=>{$=null}),go()),o[0]?Q?Q.p(o,U):(Q=lme(o),Q.c(),Q.m(y.parentNode,y)):Q&&(Q.d(1),Q=null)},i(F){C||(xe(u.$$.fragment,F),xe($),C=!0)},o(F){Be(u.$$.fragment,F),Be($),C=!1},d(F){F&&ke(e),o[13](null),Jt(u),$&&$.d(),F&&ke(b),Q&&Q.d(F),F&&ke(y),E=!1,vi(R)}}}function ame(o){let e,t,s,a;function l(h){o[16](h)}function u(h){o[17](h)}let d={field:o[1]};return o[0]!==void 0&&(d.value=o[0]),o[9]!==void 0&&(d.search=o[9]),e=new eV({props:d}),o[15](e),Ro.push(()=>er(e,"value",l)),Ro.push(()=>er(e,"search",u)),{c(){en(e.$$.fragment)},m(h,b){Kt(e,h,b),a=!0},p(h,b){const y={};b&2&&(y.field=h[1]),!t&&b&1&&(t=!0,y.value=h[0],lr(()=>t=!1)),!s&&b&512&&(s=!0,y.search=h[9],lr(()=>s=!1)),e.$set(y)},i(h){a||(xe(e.$$.fragment,h),a=!0)},o(h){Be(e.$$.fragment,h),a=!1},d(h){o[15](null),Jt(e,h)}}}function lme(o){let e,t,s,a,l,u,d;return{c(){e=re("span"),t=re("div"),s=Ht(o[0]),a=Ze(),l=re("button"),Z(l,"type","button"),Z(l,"class","btn-close btn-sm ms-1"),rs(l,"font-size","10px"),Z(l,"aria-label","Close"),Z(t,"class","d-flex align-items-center "),Z(e,"class","badge rounded-pill bg-light text-dark fs-6 mt-3")},m(h,b){Te(h,e,b),X(e,t),X(t,s),X(t,a),X(t,l),u||(d=mn(l,"click",ku(o[18])),u=!0)},p(h,b){b&1&&Fn(s,h[0])},d(h){h&&ke(e),u=!1,d()}}}function cme(o){let e,t;return{c(){e=re("div"),t=Ht(o[8]),Z(e,"class","invalid-feedback d-block")},m(s,a){Te(s,e,a),X(e,t)},p(s,a){a&256&&Fn(t,s[8])},d(s){s&&ke(e)}}}function BNe(o){let e,t,s,a,l,u,d;const h=[INe,NNe],b=[];function y(E,R){return E[7]?0:1}t=y(o),s=b[t]=h[t](o);let C=o[8]&&cme(o);return{c(){e=re("div"),s.c(),a=Ze(),l=re("small"),l.textContent=`Dates are displayed according to your timezone: ${o[10]}`,u=Ze(),C&&C.c(),Z(l,"class","text-primary opacity-50"),Z(e,"class","mb-0")},m(E,R){Te(E,e,R),b[t].m(e,null),X(e,a),X(e,l),X(e,u),C&&C.m(e,null),d=!0},p(E,[R]){let $=t;t=y(E),t===$?b[t].p(E,R):(mo(),Be(b[$],1,1,()=>{b[$]=null}),go(),s=b[t],s?s.p(E,R):(s=b[t]=h[t](E),s.c()),xe(s,1),s.m(e,a)),E[8]?C?C.p(E,R):(C=cme(E),C.c(),C.m(e,null)):C&&(C.d(1),C=null)},i(E){d||(xe(s),d=!0)},o(E){Be(s),d=!1},d(E){E&&ke(e),b[t].d(),C&&C.d()}}}function LNe(o,e,t){let s,a,l,{field:u}=e,{value:d}=e,{isCreateMode:h}=e,{validationErrors:b}=e;const y=Intl.DateTimeFormat().resolvedOptions().timeZone;let{id:C}=e,E,R,$,Q={enableTime:!1,allowInput:!0,altInput:!0,altFormat:"Y-m-d H:i:S",dateFormat:"Z",enableTime:!0,time_24hr:!0,enableSeconds:!0};u.min&&(Q.minDate=u.min),u.max&&(Q.maxDate=u.max),W1(()=>{(!u.readonly||h)&&(a&&(Q.clickOpens=!1),t(6,$=Cf(R,Q)))});function F(){s=this.value,t(9,s)}function U(ve){Ro[ve?"unshift":"push"](()=>{R=ve,t(5,R)})}const K=ve=>$.open();function L(ve){Ro[ve?"unshift":"push"](()=>{E=ve,t(4,E)})}function te(ve){d=ve,t(0,d)}function ne(ve){s=ve,t(9,s)}const oe=ve=>t(0,d="");function G(){d=this.value,t(0,d)}function we(ve){Ro[ve?"unshift":"push"](()=>{R=ve,t(5,R)})}return o.$$set=ve=>{"field"in ve&&t(1,u=ve.field),"value"in ve&&t(0,d=ve.value),"isCreateMode"in ve&&t(2,h=ve.isCreateMode),"validationErrors"in ve&&t(11,b=ve.validationErrors),"id"in ve&&t(3,C=ve.id)},o.$$.update=()=>{o.$$.dirty&6&&t(7,a=u.optionsFrom&&!(u.readonly&&!h)),o.$$.dirty&2050&&t(8,l=Lm(b,u.name))},t(9,s=""),[d,u,h,C,E,R,$,a,l,s,y,b,F,U,K,L,te,ne,oe,G,we]}class FNe extends uo{constructor(e){super(),co(this,e,LNe,BNe,lo,{field:1,value:0,isCreateMode:2,validationErrors:11,id:3})}}function ume(o){let e,t;return{c(){e=re("div"),t=Ht(o[2]),Z(e,"class","invalid-feedback d-block")},m(s,a){Te(s,e,a),X(e,t)},p(s,a){a&4&&Fn(t,s[2])},d(s){s&&ke(e)}}}function QNe(o){let e,t,s,a,l;function u(b){o[7](b)}let d={additionalConfig:o[3],schema:o[1]};o[0]!==void 0&&(d.value=o[0]),t=new b1e({props:d}),Ro.push(()=>er(t,"value",u));let h=o[2]&&ume(o);return{c(){e=re("div"),en(t.$$.fragment),a=Ze(),h&&h.c(),Z(e,"class","mb-0")},m(b,y){Te(b,e,y),Kt(t,e,null),X(e,a),h&&h.m(e,null),l=!0},p(b,[y]){const C={};y&2&&(C.schema=b[1]),!s&&y&1&&(s=!0,C.value=b[0],lr(()=>s=!1)),t.$set(C),b[2]?h?h.p(b,y):(h=ume(b),h.c(),h.m(e,null)):h&&(h.d(1),h=null)},i(b){l||(xe(t.$$.fragment,b),l=!0)},o(b){Be(t.$$.fragment,b),l=!1},d(b){b&&ke(e),Jt(t),h&&h.d()}}}function ZNe(o,e,t){let s,{value:a}=e,{field:l}=e,{isCreateMode:u}=e,{schema:d}=e,{validationErrors:h}=e,b={readonly:l.readonly&&!u};function y(C){a=C,t(0,a)}return o.$$set=C=>{"value"in C&&t(0,a=C.value),"field"in C&&t(4,l=C.field),"isCreateMode"in C&&t(5,u=C.isCreateMode),"schema"in C&&t(1,d=C.schema),"validationErrors"in C&&t(6,h=C.validationErrors)},o.$$.update=()=>{o.$$.dirty&80&&t(2,s=Lm(h,l.name))},[a,d,s,b,l,u,h,y]}class HNe extends uo{constructor(e){super(),co(this,e,ZNe,QNe,lo,{value:0,field:4,isCreateMode:5,schema:1,validationErrors:6})}}const zNe=SE({String:yt.string,Number:yt.number,"True False":yt.bool,PropertyName:yt.propertyName,Null:yt.null,",":yt.separator,"[ ]":yt.squareBracket,"{ }":yt.brace}),VNe=vE.deserialize({version:14,states:"$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#CjOOQO'#Cp'#CpQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CrOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59U,59UO!iQPO,59UOVQPO,59QOqQPO'#CkO!nQPO,59^OOQO1G.k1G.kOVQPO'#ClO!vQPO,59aOOQO1G.p1G.pOOQO1G.l1G.lOOQO,59V,59VOOQO-E6i-E6iOOQO,59W,59WOOQO-E6j-E6j",stateData:"#O~OcOS~OQSORSOSSOTSOWQO]ROePO~OVXOeUO~O[[O~PVOg^O~Oh_OVfX~OVaO~OhbO[iX~O[dO~Oh_OVfa~OhbO[ia~O",goto:"!kjPPPPPPkPPkqwPPk{!RPPP!XP!ePP!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",nodeNames:"\u26A0 JsonText True False Null Number String } { Object Property PropertyName ] [ Array",maxTerm:25,nodeProps:[["openedBy",7,"{",12,"["],["closedBy",8,"}",13,"]"]],propSources:[zNe],skippedNodes:[0],repeatNodeCount:2,tokenData:"(|~RaXY!WYZ!W]^!Wpq!Wrs!]|}$u}!O$z!Q!R%T!R![&c![!]&t!}#O&y#P#Q'O#Y#Z'T#b#c'r#h#i(Z#o#p(r#q#r(w~!]Oc~~!`Wpq!]qr!]rs!xs#O!]#O#P!}#P;'S!];'S;=`$o<%lO!]~!}Oe~~#QXrs!]!P!Q!]#O#P!]#U#V!]#Y#Z!]#b#c!]#f#g!]#h#i!]#i#j#m~#pR!Q![#y!c!i#y#T#Z#y~#|R!Q![$V!c!i$V#T#Z$V~$YR!Q![$c!c!i$c#T#Z$c~$fR!Q![!]!c!i!]#T#Z!]~$rP;=`<%l!]~$zOh~~$}Q!Q!R%T!R![&c~%YRT~!O!P%c!g!h%w#X#Y%w~%fP!Q![%i~%nRT~!Q![%i!g!h%w#X#Y%w~%zR{|&T}!O&T!Q![&Z~&WP!Q![&Z~&`PT~!Q![&Z~&hST~!O!P%c!Q![&c!g!h%w#X#Y%w~&yOg~~'OO]~~'TO[~~'WP#T#U'Z~'^P#`#a'a~'dP#g#h'g~'jP#X#Y'm~'rOR~~'uP#i#j'x~'{P#`#a(O~(RP#`#a(U~(ZOS~~(^P#f#g(a~(dP#i#j(g~(jP#X#Y(m~(rOQ~~(wOW~~(|OV~",tokenizers:[0],topRules:{JsonText:[0,1]},tokenPrec:0}),WNe=()=>o=>{try{JSON.parse(o.state.doc.toString())}catch(e){if(!(e instanceof SyntaxError))throw e;const t=UNe(e,o.state.doc);return[{from:t,message:e.message,severity:"error",to:t}]}return[]};function UNe(o,e){let t;return(t=o.message.match(/at position (\d+)/))?Math.min(+t[1],e.length):(t=o.message.match(/at line (\d+) column (\d+)/))?Math.min(e.line(+t[1]).from+ +t[2]-1,e.length):0}const YNe=pE.define({name:"json",parser:VNe.configure({props:[GD.add({Object:SD({except:/^\s*\}/}),Array:SD({except:/^\s*\]/})}),KD.add({"Object Array":Dre})]}),languageData:{closeBrackets:{brackets:["[","{",'"']},indentOnInput:/^\s*[\}\]]$/}});function fme(){return new $D(YNe)}function XNe(o){let e,t;return{c(){e=re("div"),Z(e,"class",t="is-editable-"+o[0])},m(s,a){Te(s,e,a),o[3](e)},p(s,[a]){a&1&&t!==(t="is-editable-"+s[0])&&Z(e,"class",t)},i:un,o:un,d(s){s&&ke(e),o[3](null)}}}function jNe(o,e,t){let s,a,{value:l}=e,{editable:u=!0}=e;W1(()=>{let h=new DC,b=new DC,y=ra.create({doc:JSON.stringify(l,null,4),extensions:[Rz,wE.of([W0e]),h.of(fme()),fme(),b.of(ra.tabSize.of(4)),M5e(),Rz,is.editable.of(u),is.updateListener.of(function(C){C.docChanged&&t(2,l=C.state.doc.toString())}),S5e(WNe())]});a=new is({state:y,parent:s})}),ore(()=>{a&&a.destroy()});function d(h){Ro[h?"unshift":"push"](()=>{s=h,t(1,s)})}return o.$$set=h=>{"value"in h&&t(2,l=h.value),"editable"in h&&t(0,u=h.editable)},[u,s,l,d]}class qNe extends uo{constructor(e){super(),co(this,e,jNe,XNe,lo,{value:2,editable:0})}}function dme(o){let e,t;return{c(){e=re("div"),t=Ht(o[3]),Z(e,"class","invalid-feedback d-block")},m(s,a){Te(s,e,a),X(e,t)},p(s,a){a&8&&Fn(t,s[3])},d(s){s&&ke(e)}}}function GNe(o){let e,t,s,a,l;function u(b){o[5](b)}let d={editable:!o[1].readonly||o[2]};o[0]!==void 0&&(d.value=o[0]),t=new qNe({props:d}),Ro.push(()=>er(t,"value",u));let h=o[3]&&dme(o);return{c(){e=re("div"),en(t.$$.fragment),a=Ze(),h&&h.c(),Z(e,"class","mb-3")},m(b,y){Te(b,e,y),Kt(t,e,null),X(e,a),h&&h.m(e,null),l=!0},p(b,[y]){const C={};y&6&&(C.editable=!b[1].readonly||b[2]),!s&&y&1&&(s=!0,C.value=b[0],lr(()=>s=!1)),t.$set(C),b[3]?h?h.p(b,y):(h=dme(b),h.c(),h.m(e,null)):h&&(h.d(1),h=null)},i(b){l||(xe(t.$$.fragment,b),l=!0)},o(b){Be(t.$$.fragment,b),l=!1},d(b){b&&ke(e),Jt(t),h&&h.d()}}}function KNe(o,e,t){let s,{value:a}=e,{field:l}=e,{isCreateMode:u}=e,{validationErrors:d}=e;function h(b){a=b,t(0,a)}return o.$$set=b=>{"value"in b&&t(0,a=b.value),"field"in b&&t(1,l=b.field),"isCreateMode"in b&&t(2,u=b.isCreateMode),"validationErrors"in b&&t(4,d=b.validationErrors)},o.$$.update=()=>{o.$$.dirty&18&&t(3,s=Lm(d,l.name))},[a,l,u,s,d,h]}class JNe extends uo{constructor(e){super(),co(this,e,KNe,GNe,lo,{value:0,field:1,isCreateMode:2,validationErrors:4})}}function hme(o){let e,t;return{c(){e=re("div"),t=Ht(o[3]),Z(e,"class","invalid-feedback d-block")},m(s,a){Te(s,e,a),X(e,t)},p(s,a){a&8&&Fn(t,s[3])},d(s){s&&ke(e)}}}function e6e(o){let e,t,s,a,l;function u(b){o[5](b)}let d={editable:!o[1].readonly||o[2]};o[0]!==void 0&&(d.value=o[0]),t=new $Oe({props:d}),Ro.push(()=>er(t,"value",u));let h=o[3]&&hme(o);return{c(){e=re("div"),en(t.$$.fragment),a=Ze(),h&&h.c(),Z(e,"class","mb-3")},m(b,y){Te(b,e,y),Kt(t,e,null),X(e,a),h&&h.m(e,null),l=!0},p(b,[y]){const C={};y&6&&(C.editable=!b[1].readonly||b[2]),!s&&y&1&&(s=!0,C.value=b[0],lr(()=>s=!1)),t.$set(C),b[3]?h?h.p(b,y):(h=hme(b),h.c(),h.m(e,null)):h&&(h.d(1),h=null)},i(b){l||(xe(t.$$.fragment,b),l=!0)},o(b){Be(t.$$.fragment,b),l=!1},d(b){b&&ke(e),Jt(t),h&&h.d()}}}function t6e(o,e,t){let s,{value:a}=e,{field:l}=e,{isCreateMode:u}=e,{validationErrors:d}=e;function h(b){a=b,t(0,a)}return o.$$set=b=>{"value"in b&&t(0,a=b.value),"field"in b&&t(1,l=b.field),"isCreateMode"in b&&t(2,u=b.isCreateMode),"validationErrors"in b&&t(4,d=b.validationErrors)},o.$$.update=()=>{o.$$.dirty&18&&t(3,s=Lm(d,l.name))},[a,l,u,s,d,h]}class n6e extends uo{constructor(e){super(),co(this,e,t6e,e6e,lo,{value:0,field:1,isCreateMode:2,validationErrors:4})}}function mme(o){let e,t=o[0].help+"",s;return{c(){e=re("small"),s=Ht(t),Z(e,"class","text-primary opacity-50")},m(a,l){Te(a,e,l),X(e,s)},p(a,l){l&1&&t!==(t=a[0].help+"")&&Fn(s,t)},d(a){a&&ke(e)}}}function o6e(o){let e,t,s,a,l=o[0].label+"",u,d,h,b,y,C=o[0].name+"",E,R=o[0].help&&mme(o);return{c(){e=re("div"),t=re("div"),s=re("div"),a=re("label"),u=Ht(l),d=Ze(),R&&R.c(),h=Ze(),b=re("span"),y=re("code"),E=Ht(C),Z(a,"for",o[1]),Z(a,"class","form-label"),Z(y,"class","text-primary opacity-50"),Z(b,"tabindex","-1"),Z(b,"class","text-decoration-none"),Z(t,"class","d-flex justify-content-between"),Z(e,"class","mb-1")},m($,Q){Te($,e,Q),X(e,t),X(t,s),X(s,a),X(a,u),X(s,d),R&&R.m(s,null),X(t,h),X(t,b),X(b,y),X(y,E)},p($,[Q]){Q&1&&l!==(l=$[0].label+"")&&Fn(u,l),Q&2&&Z(a,"for",$[1]),$[0].help?R?R.p($,Q):(R=mme($),R.c(),R.m(s,null)):R&&(R.d(1),R=null),Q&1&&C!==(C=$[0].name+"")&&Fn(E,C)},i:un,o:un,d($){$&&ke(e),R&&R.d()}}}function s6e(o,e,t){let{field:s}=e,{id:a}=e;return o.$$set=l=>{"field"in l&&t(0,s=l.field),"id"in l&&t(1,a=l.id)},[s,a]}class r6e extends uo{constructor(e){super(),co(this,e,s6e,o6e,lo,{field:0,id:1})}}function gme(o,e,t){const s=o.slice();return s[2]=e[t],s[19]=t,s}function pme(o,e,t){const s=o.slice();return s[1]=e[t],s[19]=t,s}function bme(o,e,t){const s=o.slice();return s[1]=e[t],s}function vme(o){let e,t;return{c(){e=re("div"),t=Ht(o[5]),Z(e,"class","invalid-feedback d-block mb-3")},m(s,a){Te(s,e,a),X(e,t)},p(s,a){a&32&&Fn(t,s[5])},d(s){s&&ke(e)}}}function Ome(o){let e,t,s,a,l,u,d,h,b,y,C,E=o[3],R=[];for(let $=0;$Be(oe[Oe],1,1,()=>{oe[Oe]=null});$=new Fa({props:{icon:"trash-can"}});function we(...Oe){return e[15](e[2],...Oe)}let ve=e[4].length>30&&e[19]>0&&_me(e),Re=e[4].length>30&&e[19]+130&&e[19]>0?ve?(ve.p(e,ce),ce&16&&xe(ve,1)):(ve=_me(e),ve.c(),xe(ve,1),ve.m(E,F)):ve&&(mo(),Be(ve,1,1,()=>{ve=null}),go()),e[4].length>30&&e[19]+1{Re=null}),go())},i(Oe){if(!K){for(let ce=0;ced[2].id;for(let d=0;d0&&Ome(o);return{c(){d&&d.c(),e=Ze(),t=re("div"),en(s.$$.fragment),a=Ze(),h&&h.c(),l=Rs(),Z(t,"class","inline-card-wrapper")},m(b,y){d&&d.m(b,y),Te(b,e,y),Te(b,t,y),Kt(s,t,null),Te(b,a,y),h&&h.m(b,y),Te(b,l,y),u=!0},p(b,[y]){b[5]?d?d.p(b,y):(d=vme(b),d.c(),d.m(e.parentNode,e)):d&&(d.d(1),d=null),b[4].length>0?h?(h.p(b,y),y&16&&xe(h,1)):(h=Ome(b),h.c(),xe(h,1),h.m(l.parentNode,l)):h&&(mo(),Be(h,1,1,()=>{h=null}),go())},i(b){u||(xe(s.$$.fragment,b),xe(h),u=!0)},o(b){Be(s.$$.fragment,b),Be(h),u=!1},d(b){d&&d.d(b),b&&ke(e),b&&ke(t),Jt(s),b&&ke(a),h&&h.d(b),b&&ke(l)}}}function l6e(o,e,t){let s,a,l;const u=Ur("channel");let{field:d}=e,{record:h}=e,{graph:b}=e,{validationErrors:y}=e,C=u.schemas.filter(ne=>d.collections.includes(ne.name)),E=u.schemas.filter(ne=>d.collections.includes(ne.name))[0];function R(ne,oe){ne.preventDefault(),t(0,b.edges=b.edges.filter(G=>!(G.source===h.id&&G.target===oe&&G.field===d.name)),b)}function $(ne,oe){ne.preventDefault();let G=b.edges.find(we=>we.source===h.id&&we.target===oe&&we.field===d.name);R(ne,oe),t(0,b.edges=[G,...b.edges],b)}function Q(ne,oe){ne.preventDefault();let G=b.edges.find(we=>we.source===h.id&&we.target===oe&&we.field===d.name);R(ne,oe),t(0,b.edges=[...b.edges,G],b)}function F(ne){t(0,b.edges=qD(ne.detail.source,ne.detail.target,b.edges,d.name),b)}function U(ne){ne.preventDefault(),t(0,b=K6(b,h,ne.detail.records,d.name,ne.detail.action))}const K=(ne,oe)=>R(oe,ne.id),L=(ne,oe)=>$(oe,ne.id),te=(ne,oe)=>Q(oe,ne.id);return o.$$set=ne=>{"field"in ne&&t(1,d=ne.field),"record"in ne&&t(2,h=ne.record),"graph"in ne&&t(0,b=ne.graph),"validationErrors"in ne&&t(14,y=ne.validationErrors)},o.$$.update=()=>{var ne;o.$$.dirty&16386&&t(5,s=Lm(y,d.name)),o.$$.dirty&7&&t(4,a=(ne=b.edges.filter(oe=>oe.field===d.name).map(oe=>b.records.find(G=>G.id===oe.target&&h.id===oe.source)).filter(oe=>!!(oe!=null&&oe.id)))!=null?ne:[])},t(3,l=[]),[b,d,h,l,a,s,u,C,E,R,$,Q,F,U,y,K,L,te]}class c6e extends uo{constructor(e){super(),co(this,e,l6e,a6e,lo,{field:1,record:2,graph:0,validationErrors:14})}}function kme(o,e,t){const s=o.slice();return s[2]=e[t],s}function xme(o,e,t){const s=o.slice();return s[22]=e[t],s}function Tme(o){let e,t;return{c(){e=re("div"),t=Ht(o[6]),Z(e,"class","invalid-feedback d-block mb-3")},m(s,a){Te(s,e,a),X(e,t)},p(s,a){a&64&&Fn(t,s[6])},d(s){s&&ke(e)}}}function Eme(o){let e=[],t=new Map,s,a=o[4];const l=d=>d[22].id;for(let d=0;du[2].id;for(let u=0;u0&&Mme(o);return{c(){E&&E.c(),e=Ze(),t=re("input"),l=Ze(),u=re("div"),R&&R.c(),d=Ze(),$&&$.c(),h=Ze(),Q&&Q.c(),b=Rs(),Z(t,"type","search"),Z(t,"id",o[1]),Z(t,"class","form-control dropdown-toggle"),Z(t,"placeholder",s="Search for "+o[0].label),Z(t,"data-bs-toggle","dropdown"),Z(t,"autocomplete","off"),t.readOnly=a=o[0].readonly&&!isCreateMode,Vo(t,"is-invalid",o[6]),Z(u,"class","dropdown-menu w-100")},m(F,U){E&&E.m(F,U),Te(F,e,U),Te(F,t,U),ar(t,o[3]),Te(F,l,U),Te(F,u,U),R&&R.m(u,null),X(u,d),$&&$.m(u,null),Te(F,h,U),Q&&Q.m(F,U),Te(F,b,U),y||(C=[mn(t,"keyup",o[11]),mn(t,"input",o[14])],y=!0)},p(F,[U]){F[6]?E?E.p(F,U):(E=Tme(F),E.c(),E.m(e.parentNode,e)):E&&(E.d(1),E=null),U&2&&Z(t,"id",F[1]),U&1&&s!==(s="Search for "+F[0].label)&&Z(t,"placeholder",s),U&1&&a!==(a=F[0].readonly&&!isCreateMode)&&(t.readOnly=a),U&8&&t.value!==F[3]&&ar(t,F[3]),U&64&&Vo(t,"is-invalid",F[6]),F[4]?R?R.p(F,U):(R=Eme(F),R.c(),R.m(u,d)):R&&(R.d(1),R=null),F[3]?$?$.p(F,U):($=Pme(F),$.c(),$.m(u,null)):$&&($.d(1),$=null),F[5].length>0?Q?Q.p(F,U):(Q=Mme(F),Q.c(),Q.m(b.parentNode,b)):Q&&(Q.d(1),Q=null)},i:un,o:un,d(F){E&&E.d(F),F&&ke(e),F&&ke(t),F&&ke(l),F&&ke(u),R&&R.d(),$&&$.d(),F&&ke(h),Q&&Q.d(F),F&&ke(b),y=!1,vi(C)}}}function f6e(o,e,t){let s,a,l;const u=Ur("channel");let{field:d}=e,{id:h}=e,{record:b}=e,{graph:y}=e,{validationErrors:C}=e,E="";function R(G,we){G.preventDefault(),t(12,y.edges=y.edges.filter(ve=>!(ve.target===we&&ve.field===d.name)),y)}function $(G,we){G.preventDefault(),axios.post(u.lucentUrl+"/records",{isCreateMode:!0,record:{schema:d.collections[0],status:"published",data:{[d.searchField]:we}}}).then(ve=>{t(4,l=[]),Q(G,ve.data.records[0]),console.log(ve)}).catch(ve=>{t(4,l=[]),console.log(ve)})}function Q(G,we){G.preventDefault(),t(12,y=K6(y,b,[we],d.name,G.detail.action))}const F=Lc.exports.debounce(G=>{axios.get(u.lucentUrl+"/records/suggestions",{params:{schema:d.collections[0],field:d.searchField,value:E,ui:"text"}}).then(we=>{t(4,l=we.data)}).catch(we=>{t(4,l=[]),console.log(we)})},500);function U(){E=this.value,t(3,E)}const K=(G,we)=>Q(we,G),L=(G,we)=>Q(we,G),te=G=>$(G,E),ne=G=>$(G,E),oe=(G,we)=>R(we,G.id);return o.$$set=G=>{"field"in G&&t(0,d=G.field),"id"in G&&t(1,h=G.id),"record"in G&&t(2,b=G.record),"graph"in G&&t(12,y=G.graph),"validationErrors"in G&&t(13,C=G.validationErrors)},o.$$.update=()=>{var G;o.$$.dirty&8193&&t(6,s=Lm(C,d.name)),o.$$.dirty&4101&&t(5,a=(G=y.edges.filter(we=>we.field===d.name).map(we=>y.records.find(ve=>ve.id==we.target&&b.id==we.source)).filter(we=>!!(we!=null&&we.id)))!=null?G:[])},t(4,l=[]),[d,h,b,E,l,a,s,u,R,$,Q,F,y,C,U,K,L,te,ne,oe]}class d6e extends uo{constructor(e){super(),co(this,e,f6e,u6e,lo,{field:0,id:1,record:2,graph:12,validationErrors:13})}}function h6e(o){let e,t,s,a;function l(h){o[19](h)}var u=o[7];function d(h){let b={schema:h[3],field:h[2],validationErrors:h[5],isCreateMode:h[6],id:h[8]};return h[0][h[2].name]!==void 0&&(b.value=h[0][h[2].name]),{props:b}}return u&&(e=EC(u,d(o)),Ro.push(()=>er(e,"value",l))),{c(){e&&en(e.$$.fragment),s=Rs()},m(h,b){e&&Kt(e,h,b),Te(h,s,b),a=!0},p(h,b){const y={};if(b&8&&(y.schema=h[3]),b&4&&(y.field=h[2]),b&32&&(y.validationErrors=h[5]),b&64&&(y.isCreateMode=h[6]),!t&&b&5&&(t=!0,y.value=h[0][h[2].name],lr(()=>t=!1)),u!==(u=h[7])){if(e){mo();const C=e;Be(C.$$.fragment,1,0,()=>{Jt(C,1)}),go()}u?(e=EC(u,d(h)),Ro.push(()=>er(e,"value",l)),en(e.$$.fragment),xe(e.$$.fragment,1),Kt(e,s.parentNode,s)):e=null}else u&&e.$set(y)},i(h){a||(e&&xe(e.$$.fragment,h),a=!0)},o(h){e&&Be(e.$$.fragment,h),a=!1},d(h){h&&ke(s),e&&Jt(e,h)}}}function m6e(o){let e,t,s;function a(u){o[18](u)}let l={field:o[2],validationErrors:o[5],isCreateMode:o[6],id:o[8]};return o[0][o[2].name]!==void 0&&(l.value=o[0][o[2].name]),e=new BOe({props:l}),Ro.push(()=>er(e,"value",a)),{c(){en(e.$$.fragment)},m(u,d){Kt(e,u,d),s=!0},p(u,d){const h={};d&4&&(h.field=u[2]),d&32&&(h.validationErrors=u[5]),d&64&&(h.isCreateMode=u[6]),!t&&d&5&&(t=!0,h.value=u[0][u[2].name],lr(()=>t=!1)),e.$set(h)},i(u){s||(xe(e.$$.fragment,u),s=!0)},o(u){Be(e.$$.fragment,u),s=!1},d(u){Jt(e,u)}}}function g6e(o){let e,t,s;function a(u){o[17](u)}let l={field:o[2],id:o[8],validationErrors:o[5],isCreateMode:o[6]};return o[0][o[2].name]!==void 0&&(l.value=o[0][o[2].name]),e=new Ype({props:l}),Ro.push(()=>er(e,"value",a)),{c(){en(e.$$.fragment)},m(u,d){Kt(e,u,d),s=!0},p(u,d){const h={};d&4&&(h.field=u[2]),d&32&&(h.validationErrors=u[5]),d&64&&(h.isCreateMode=u[6]),!t&&d&5&&(t=!0,h.value=u[0][u[2].name],lr(()=>t=!1)),e.$set(h)},i(u){s||(xe(e.$$.fragment,u),s=!0)},o(u){Be(e.$$.fragment,u),s=!1},d(u){Jt(e,u)}}}function p6e(o){let e,t,s;function a(u){o[16](u)}let l={field:o[2],id:o[8],validationErrors:o[5],isCreateMode:o[6]};return o[0][o[2].name]!==void 0&&(l.value=o[0][o[2].name]),e=new Upe({props:l}),Ro.push(()=>er(e,"value",a)),{c(){en(e.$$.fragment)},m(u,d){Kt(e,u,d),s=!0},p(u,d){const h={};d&4&&(h.field=u[2]),d&32&&(h.validationErrors=u[5]),d&64&&(h.isCreateMode=u[6]),!t&&d&5&&(t=!0,h.value=u[0][u[2].name],lr(()=>t=!1)),e.$set(h)},i(u){s||(xe(e.$$.fragment,u),s=!0)},o(u){Be(e.$$.fragment,u),s=!1},d(u){Jt(e,u)}}}function b6e(o){let e,t,s,a;function l(h){o[14](h)}function u(h){o[15](h)}let d={record:o[4],id:o[8],field:o[2],validationErrors:o[5]};return o[1]!==void 0&&(d.graph=o[1]),o[0][o[2].name]!==void 0&&(d.value=o[0][o[2].name]),e=new W$e({props:d}),Ro.push(()=>er(e,"graph",l)),Ro.push(()=>er(e,"value",u)),{c(){en(e.$$.fragment)},m(h,b){Kt(e,h,b),a=!0},p(h,b){const y={};b&16&&(y.record=h[4]),b&4&&(y.field=h[2]),b&32&&(y.validationErrors=h[5]),!t&&b&2&&(t=!0,y.graph=h[1],lr(()=>t=!1)),!s&&b&5&&(s=!0,y.value=h[0][h[2].name],lr(()=>s=!1)),e.$set(y)},i(h){a||(xe(e.$$.fragment,h),a=!0)},o(h){Be(e.$$.fragment,h),a=!1},d(h){Jt(e,h)}}}function v6e(o){let e,t,s;function a(u){o[13](u)}let l={record:o[4],field:o[2],validationErrors:o[5]};return o[1]!==void 0&&(l.graph=o[1]),e=new MNe({props:l}),Ro.push(()=>er(e,"graph",a)),{c(){en(e.$$.fragment)},m(u,d){Kt(e,u,d),s=!0},p(u,d){const h={};d&16&&(h.record=u[4]),d&4&&(h.field=u[2]),d&32&&(h.validationErrors=u[5]),!t&&d&2&&(t=!0,h.graph=u[1],lr(()=>t=!1)),e.$set(h)},i(u){s||(xe(e.$$.fragment,u),s=!0)},o(u){Be(e.$$.fragment,u),s=!1},d(u){Jt(e,u)}}}function O6e(o){let e,t,s;function a(u){o[12](u)}let l={id:o[8],record:o[4],field:o[2],validationErrors:o[5]};return o[1]!==void 0&&(l.graph=o[1]),e=new fTe({props:l}),Ro.push(()=>er(e,"graph",a)),{c(){en(e.$$.fragment)},m(u,d){Kt(e,u,d),s=!0},p(u,d){const h={};d&16&&(h.record=u[4]),d&4&&(h.field=u[2]),d&32&&(h.validationErrors=u[5]),!t&&d&2&&(t=!0,h.graph=u[1],lr(()=>t=!1)),e.$set(h)},i(u){s||(xe(e.$$.fragment,u),s=!0)},o(u){Be(e.$$.fragment,u),s=!1},d(u){Jt(e,u)}}}function y6e(o){let e,t,s;function a(u){o[11](u)}let l={id:o[8],record:o[4],field:o[2],validationErrors:o[5]};return o[1]!==void 0&&(l.graph=o[1]),e=new d6e({props:l}),Ro.push(()=>er(e,"graph",a)),{c(){en(e.$$.fragment)},m(u,d){Kt(e,u,d),s=!0},p(u,d){const h={};d&16&&(h.record=u[4]),d&4&&(h.field=u[2]),d&32&&(h.validationErrors=u[5]),!t&&d&2&&(t=!0,h.graph=u[1],lr(()=>t=!1)),e.$set(h)},i(u){s||(xe(e.$$.fragment,u),s=!0)},o(u){Be(e.$$.fragment,u),s=!1},d(u){Jt(e,u)}}}function w6e(o){let e,t,s;function a(u){o[10](u)}let l={id:o[8],record:o[4],field:o[2],validationErrors:o[5]};return o[1]!==void 0&&(l.graph=o[1]),e=new c6e({props:l}),Ro.push(()=>er(e,"graph",a)),{c(){en(e.$$.fragment)},m(u,d){Kt(e,u,d),s=!0},p(u,d){const h={};d&16&&(h.record=u[4]),d&4&&(h.field=u[2]),d&32&&(h.validationErrors=u[5]),!t&&d&2&&(t=!0,h.graph=u[1],lr(()=>t=!1)),e.$set(h)},i(u){s||(xe(e.$$.fragment,u),s=!0)},o(u){Be(e.$$.fragment,u),s=!1},d(u){Jt(e,u)}}}function _6e(o){let e,t,s;function a(u){o[9](u)}let l={record:o[4],field:o[2],validationErrors:o[5]};return o[1]!==void 0&&(l.graph=o[1]),e=new xTe({props:l}),Ro.push(()=>er(e,"graph",a)),{c(){en(e.$$.fragment)},m(u,d){Kt(e,u,d),s=!0},p(u,d){const h={};d&16&&(h.record=u[4]),d&4&&(h.field=u[2]),d&32&&(h.validationErrors=u[5]),!t&&d&2&&(t=!0,h.graph=u[1],lr(()=>t=!1)),e.$set(h)},i(u){s||(xe(e.$$.fragment,u),s=!0)},o(u){Be(e.$$.fragment,u),s=!1},d(u){Jt(e,u)}}}function S6e(o){let e,t,s,a,l,u;t=new r6e({props:{schema:o[3],field:o[2],id:o[8]}});const d=[_6e,w6e,y6e,O6e,v6e,b6e,p6e,g6e,m6e,h6e],h=[];function b(y,C){return y[2].info.name==="reference"&&y[2].layout==="inline"?0:y[2].info.name==="reference"&&y[2].layout==="table"?1:y[2].info.name==="reference"&&y[2].layout==="tags"?2:y[2].info.name==="reference"?3:y[2].info.name==="file"?4:y[2].info.name==="block"?5:y[2].info.name==="text"?6:y[2].info.name==="slug"?7:y[2].info.name==="textarea"?8:9}return a=b(o),l=h[a]=d[a](o),{c(){e=re("div"),en(t.$$.fragment),s=Ze(),l.c(),Z(e,"class","card editor-field")},m(y,C){Te(y,e,C),Kt(t,e,null),X(e,s),h[a].m(e,null),u=!0},p(y,[C]){const E={};C&8&&(E.schema=y[3]),C&4&&(E.field=y[2]),t.$set(E);let R=a;a=b(y),a===R?h[a].p(y,C):(mo(),Be(h[R],1,1,()=>{h[R]=null}),go(),l=h[a],l?l.p(y,C):(l=h[a]=d[a](y),l.c()),xe(l,1),l.m(e,null))},i(y){u||(xe(t.$$.fragment,y),xe(l),u=!0)},o(y){Be(t.$$.fragment,y),Be(l),u=!1},d(y){y&&ke(e),Jt(t),h[a].d()}}}function C6e(o,e,t){const s={text:Upe,slug:Ype,textarea:BOe,rich:HNe,color:X$e,checkbox:G$e,number:nNe,url:rNe,date:pNe,datetime:FNe,uuid:xNe,json:JNe,markdown:n6e};let{field:a}=e,{data:l}=e,{schema:u}=e,{record:d}=e,{graph:h}=e,{validationErrors:b}=e,{isCreateMode:y}=e,C=s[a.info.name];const E=`field-${a.name}-${d.id}`;function R(we){h=we,t(1,h)}function $(we){h=we,t(1,h)}function Q(we){h=we,t(1,h)}function F(we){h=we,t(1,h)}function U(we){h=we,t(1,h)}function K(we){h=we,t(1,h)}function L(we){o.$$.not_equal(l[a.name],we)&&(l[a.name]=we,t(0,l))}function te(we){o.$$.not_equal(l[a.name],we)&&(l[a.name]=we,t(0,l))}function ne(we){o.$$.not_equal(l[a.name],we)&&(l[a.name]=we,t(0,l))}function oe(we){o.$$.not_equal(l[a.name],we)&&(l[a.name]=we,t(0,l))}function G(we){o.$$.not_equal(l[a.name],we)&&(l[a.name]=we,t(0,l))}return o.$$set=we=>{"field"in we&&t(2,a=we.field),"data"in we&&t(0,l=we.data),"schema"in we&&t(3,u=we.schema),"record"in we&&t(4,d=we.record),"graph"in we&&t(1,h=we.graph),"validationErrors"in we&&t(5,b=we.validationErrors),"isCreateMode"in we&&t(6,y=we.isCreateMode)},[l,h,a,u,d,b,y,C,E,R,$,Q,F,U,K,L,te,ne,oe,G]}class LOe extends uo{constructor(e){super(),co(this,e,C6e,S6e,lo,{field:2,data:0,schema:3,record:4,graph:1,validationErrors:5,isCreateMode:6})}}function $me(o,e,t){const s=o.slice();return s[5]=e[t][0],s[6]=e[t][1],s}function Nme(o,e,t){const s=o.slice();return s[9]=e[t],s}function Ime(o,e,t){const s=o.slice();return s[5]=e[t][0],s[6]=e[t][1],s}function Bme(o,e,t){const s=o.slice();return s[9]=e[t],s}function k6e(o){let e,t,s;return t=new G6({props:{graph:o[0],record:o[9]}}),{c(){e=re("div"),en(t.$$.fragment),Z(e,"class","ms-2 mb-2")},m(a,l){Te(a,e,l),Kt(t,e,null),s=!0},p(a,l){const u={};l&1&&(u.graph=a[0]),t.$set(u)},i(a){s||(xe(t.$$.fragment,a),s=!0)},o(a){Be(t.$$.fragment,a),s=!1},d(a){a&&ke(e),Jt(t)}}}function x6e(o){let e,t,s;return t=new Xw({props:{record:o[9],size:"small"}}),{c(){e=re("div"),en(t.$$.fragment),Z(e,"class","ms-2 mb-2"),rs(e,"max-height","64px")},m(a,l){Te(a,e,l),Kt(t,e,null),s=!0},p:un,i(a){s||(xe(t.$$.fragment,a),s=!0)},o(a){Be(t.$$.fragment,a),s=!1},d(a){a&&ke(e),Jt(t)}}}function Lme(o){let e,t,s,a;const l=[x6e,k6e],u=[];function d(h,b){var y;return(y=h[9]._file)!=null&&y.path?0:1}return e=d(o),t=u[e]=l[e](o),{c(){t.c(),s=Rs()},m(h,b){u[e].m(h,b),Te(h,s,b),a=!0},p(h,b){t.p(h,b)},i(h){a||(xe(t),a=!0)},o(h){Be(t),a=!1},d(h){u[e].d(h),h&&ke(s)}}}function Fme(o){let e,t,s,a=o[6].schema.label+"",l,u,d,h,b,y=o[6].field.label+"",C,E,R,$;d=new Fa({props:{icon:"angle-right",width:"12",height:"12"}});let Q=o[6].nodes,F=[];for(let K=0;KBe(F[K],1,1,()=>{F[K]=null});return{c(){e=re("div"),t=re("div"),s=re("span"),l=Ht(a),u=Ze(),en(d.$$.fragment),h=Ze(),b=re("span"),C=Ht(y),E=Ze(),R=re("div");for(let K=0;KBe(y[E],1,1,()=>{y[E]=null});return{c(){e=re("div"),t=re("div"),a=Ht(s),l=Ze(),u=re("div");for(let E=0;E0,s,a,l,u,d=Object.entries(o[3]).length>0,h,b,y,C=Object.entries(o[2]),E=[];for(let L=0;LBe(E[L],1,1,()=>{E[L]=null});let $=t&&T6e();l=new J6({props:{graph:o[0],record:o[1]}});let Q=d&&E6e(),F=Object.entries(o[3]),U=[];for(let L=0;LBe(U[L],1,1,()=>{U[L]=null});return{c(){for(let L=0;Lt.name===e)}function M6e(o,e,t){const s=Ur("channel");let{graph:a}=e,{record:l}=e,u=a.parentEdges.filter(h=>h.source!==l.id&&h.depth===1).reduce((h,b)=>{let y=s.schemas.find($=>$.name===b.sourceSchema),C=Hme(y,b.field),E=b.sourceSchema+C,R=a.records.find($=>$.id===b.source);return h[E]||(h[E]={field:C,schema:y,nodes:[]}),R&&(h[E].nodes.push(R),h[E].nodes=Lc.exports.uniqBy(h[E].nodes,"id")),h},{}),d=a.edges.filter(h=>h.source===l.id&&h.depth===1).reduce((h,b)=>{let y=s.schemas.find($=>$.name===l.schema),C=Hme(y,b.field),E=C.name+b.targetSchema;h[E]||(h[E]={field:C,nodes:[]});let R=a.records.find($=>$.id===b.target);return R&&(h[E].nodes.push(R),h[E].nodes=Lc.exports.uniqBy(h[E].nodes,"id")),h},{});return o.$$set=h=>{"graph"in h&&t(0,a=h.graph),"record"in h&&t(1,l=h.record)},[a,l,u,d]}class R6e extends uo{constructor(e){super(),co(this,e,M6e,P6e,lo,{graph:0,record:1})}}function zme(o,e,t){const s=o.slice();return s[4]=e[t],s}function $6e(o){var l;let e,t=((l=JSON.stringify(o[1]))!=null?l:"")+"",s,a;return{c(){e=re("div"),s=Ht(t),Z(e,"class",a=o[3]+" field-content svelte-md34ba")},m(u,d){Te(u,e,d),X(e,s)},p(u,d){var h;d&2&&t!==(t=((h=JSON.stringify(u[1]))!=null?h:"")+"")&&Fn(s,t),d&8&&a!==(a=u[3]+" field-content svelte-md34ba")&&Z(e,"class",a)},i:un,o:un,d(u){u&&ke(e)}}}function N6e(o){var a;let e,t=((a=o[1])!=null?a:"")+"",s;return{c(){e=re("div"),Z(e,"class",s=o[3]+" field-content svelte-md34ba")},m(l,u){Te(l,e,u),e.innerHTML=t},p(l,u){var d;u&2&&t!==(t=((d=l[1])!=null?d:"")+"")&&(e.innerHTML=t),u&8&&s!==(s=l[3]+" field-content svelte-md34ba")&&Z(e,"class",s)},i:un,o:un,d(l){l&&ke(e)}}}function I6e(o){var l;let e,t=((l=JSON.stringify(o[1],null,2))!=null?l:"")+"",s,a;return{c(){e=re("div"),s=Ht(t),Z(e,"class",a=o[3]+" field-content svelte-md34ba"),rs(e,"white-space","break-spaces")},m(u,d){Te(u,e,d),X(e,s)},p(u,d){var h;d&2&&t!==(t=((h=JSON.stringify(u[1],null,2))!=null?h:"")+"")&&Fn(s,t),d&8&&a!==(a=u[3]+" field-content svelte-md34ba")&&Z(e,"class",a)},i:un,o:un,d(u){u&&ke(e)}}}function B6e(o){let e,t,s,a,l=o[2][o[0].name],u=[];for(let h=0;hBe(u[h],1,1,()=>{u[h]=null});return{c(){e=re("div"),t=re("div");for(let h=0;h{u[y]=null}),go(),t=u[e],t?t.p(h,b):(t=u[e]=l[e](h),t.c()),xe(t,1),t.m(s.parentNode,s))},i(h){a||(xe(t),a=!0)},o(h){Be(t),a=!1},d(h){u[e].d(h),h&&ke(s)}}}function Q6e(o){let e,t,s,a,l,u;const d=[B6e,I6e,N6e,$6e],h=[];function b(y,C){return C&1&&(e=null),C&1&&(t=null),e==null&&(e=!!["reference","file"].includes(y[0].info.name)),e?0:(t==null&&(t=!!["json","block"].includes(y[0].info.name)),t?1:y[0].info.name==="rich"?2:3)}return s=b(o,-1),a=h[s]=d[s](o),{c(){a.c(),l=Rs()},m(y,C){h[s].m(y,C),Te(y,l,C),u=!0},p(y,[C]){let E=s;s=b(y,C),s===E?h[s].p(y,C):(mo(),Be(h[E],1,1,()=>{h[E]=null}),go(),a=h[s],a?a.p(y,C):(a=h[s]=d[s](y),a.c()),xe(a,1),a.m(l.parentNode,l))},i(y){u||(xe(a),u=!0)},o(y){Be(a),u=!1},d(y){h[s].d(y),y&&ke(l)}}}function Z6e(o,e,t){let{field:s}=e,{side:a}=e,{edges:l}=e,{colorClass:u}=e;return o.$$set=d=>{"field"in d&&t(0,s=d.field),"side"in d&&t(1,a=d.side),"edges"in d&&t(2,l=d.edges),"colorClass"in d&&t(3,u=d.colorClass)},[s,a,l,u]}class Wme extends uo{constructor(e){super(),co(this,e,Z6e,Q6e,lo,{field:0,side:1,edges:2,colorClass:3})}}function H6e(o){let e,t,s,a=o[0].rank+"",l,u,d,h,b,y=o[0].target+"",C,E;return{c(){e=re("div"),t=re("span"),s=Ht("Rank: "),l=Ht(a),u=Ze(),d=re("span"),d.textContent="id:",h=Ze(),b=re("a"),C=Ht(y),Z(t,"class","me-3"),Z(b,"href",E=o[1].lucentUrl+"/records/"+o[0].target),Z(b,"target","_blank")},m(R,$){Te(R,e,$),X(e,t),X(t,s),X(t,l),X(e,u),X(e,d),X(e,h),X(e,b),X(b,C)},p(R,[$]){$&1&&a!==(a=R[0].rank+"")&&Fn(l,a),$&1&&y!==(y=R[0].target+"")&&Fn(C,y),$&1&&E!==(E=R[1].lucentUrl+"/records/"+R[0].target)&&Z(b,"href",E)},i:un,o:un,d(R){R&&ke(e)}}}function z6e(o,e,t){const s=Ur("channel");let{edge:a}=e;return o.$$set=l=>{"edge"in l&&t(0,a=l.edge)},[a,s]}class FOe extends uo{constructor(e){super(),co(this,e,z6e,H6e,lo,{edge:0})}}function Ume(o,e,t){const s=o.slice();return s[16]=e[t][0],s[17]=e[t][1],s}function Yme(o,e,t){const s=o.slice();return s[20]=e[t],s}function Xme(o,e,t){const s=o.slice();return s[20]=e[t],s}function jme(o,e,t){const s=o.slice();return s[16]=e[t],s}function qme(o,e,t){const s=o.slice();return s[27]=e[t],s}function V6e(o){let e;return{c(){e=re("div"),e.innerHTML="Revisions are not enabled for this Schema",Z(e,"class","card-body")},m(t,s){Te(t,e,s)},p:un,i:un,o:un,d(t){t&&ke(e)}}}function W6e(o){let e,t,s,a,l=o[8],u=[];for(let h=0;hBe(u[h],1,1,()=>{u[h]=null});return{c(){e=re("div"),e.textContent="Revisions",t=Ze();for(let h=0;h{s=null}),go())},i(a){t||(xe(s),t=!0)},o(a){Be(s),t=!1},d(a){s&&s.d(a),a&&ke(e)}}}function Jme(o){let e,t,s,a,l,u,d,h;const b=[Y6e,U6e],y=[];function C(Q,F){return Q[6].length>0?0:1}t=C(o),s=y[t]=b[t](o);let E=Object.entries(o[7]),R=[];for(let Q=0;QBe(R[Q],1,1,()=>{R[Q]=null});return{c(){e=re("div"),s.c(),a=Ze(),l=re("div"),u=re("p"),u.textContent="Record References",d=Ze();for(let Q=0;Q{y[U]=null}),go(),s=y[t],s?s.p(Q,F):(s=y[t]=b[t](Q),s.c()),xe(s,1),s.m(e,a)),F&128){E=Object.entries(Q[7]);let K;for(K=0;KNothing will change",Z(e,"class","lx-card text-center")},m(t,s){Te(t,e,s)},p:un,i:un,o:un,d(t){t&&ke(e)}}}function Y6e(o){let e,t,s,a,l=o[5]._sys.version+"",u,d,h,b,y,C,E,R=o[4]&&ege(o),$=o[6],Q=[];for(let U=0;U<$.length;U+=1)Q[U]=tge(jme(o,$,U));const F=U=>Be(Q[U],1,1,()=>{Q[U]=null});return{c(){e=re("p"),e.textContent="If you choose to rollback to this revision",t=Ze(),s=re("button"),a=Ht("Rollback to version "),u=Ht(l),d=Ze(),R&&R.c(),h=Ze(),b=re("div");for(let U=0;UBe(F[G],1,1,()=>{F[G]=null});let K=null;Q.length||(K=nge());let L=o[17].revision,te=[];for(let G=0;GBe(te[G],1,1,()=>{te[G]=null});let oe=null;return L.length||(oe=sge()),{c(){e=re("div"),t=re("div"),a=Ht(s),l=Ht(":"),u=Ze(),d=re("div"),h=re("p"),h.textContent="Record",b=Ze();for(let G=0;G0?0:1}mt=kt(o),he=as[mt]=Yo[mt](o);let jt=o[5]&&Jme(o);return{c(){e=re("div"),t=re("div"),s=re("div"),a=re("div"),l=re("span"),l.textContent="record id",u=Ze(),d=re("small"),b=Ht(h),y=Ze(),C=re("div"),E=re("span"),E.textContent="current version",R=Ze(),Q=Ht($),F=Ze(),U=re("div"),K=re("span"),K.textContent="created",L=Ze(),en(te.$$.fragment),ne=Ze(),G=Ht(oe),we=Ze(),ve=re("div"),Re=re("span"),Re.textContent="updated",Oe=Ze(),en(ce.$$.fragment),Xe=Ze(),ot=Ht(tt),V=Ze(),ut=re("div"),Qe=re("span"),Qe.textContent="Rules for this schema",Bt=Ze(),Ct=re("small"),He=Ht("Each record maintains the last "),rn=Ht(st),Et=Ht(` + `}}function Ct(){t.calendarContainer.classList.add("hasWeeks");var ze=dl("div","flatpickr-weekwrapper");ze.appendChild(dl("span","flatpickr-weekday",t.l10n.weekAbbreviation));var et=dl("div","flatpickr-weeks");return ze.appendChild(et),{weekWrapper:ze,weekNumbers:et}}function He(ze,et){et===void 0&&(et=!0);var Tt=et?ze:ze-t.currentMonth;Tt<0&&t._hidePrevMonthArrow===!0||Tt>0&&t._hideNextMonthArrow===!0||(t.currentMonth+=Tt,(t.currentMonth<0||t.currentMonth>11)&&(t.currentYear+=t.currentMonth>11?1:-1,t.currentMonth=(t.currentMonth+12)%12,Po("onYearChange"),Xe()),ce(),Po("onMonthChange"),bs())}function st(ze,et){if(ze===void 0&&(ze=!0),et===void 0&&(et=!0),t.input.value="",t.altInput!==void 0&&(t.altInput.value=""),t.mobileInput!==void 0&&(t.mobileInput.value=""),t.selectedDates=[],t.latestSelectedDateObj=void 0,et===!0&&(t.currentYear=t._initialDate.getFullYear(),t.currentMonth=t._initialDate.getMonth()),t.config.enableTime===!0){var Tt=hoe(t.config),Wt=Tt.hours,Yn=Tt.minutes,po=Tt.seconds;R(Wt,Yn,po)}t.redraw(),ze&&Po("onChange")}function rn(){t.isOpen=!1,t.isMobile||(t.calendarContainer!==void 0&&t.calendarContainer.classList.remove("open"),t._input!==void 0&&t._input.classList.remove("active")),Po("onClose")}function Et(){t.config!==void 0&&Po("onDestroy");for(var ze=t._handlers.length;ze--;)t._handlers[ze].remove();if(t._handlers=[],t.mobileInput)t.mobileInput.parentNode&&t.mobileInput.parentNode.removeChild(t.mobileInput),t.mobileInput=void 0;else if(t.calendarContainer&&t.calendarContainer.parentNode)if(t.config.static&&t.calendarContainer.parentNode){var et=t.calendarContainer.parentNode;if(et.lastChild&&et.removeChild(et.lastChild),et.parentNode){for(;et.firstChild;)et.parentNode.insertBefore(et.firstChild,et);et.parentNode.removeChild(et)}}else t.calendarContainer.parentNode.removeChild(t.calendarContainer);t.altInput&&(t.input.type="text",t.altInput.parentNode&&t.altInput.parentNode.removeChild(t.altInput),delete t.altInput),t.input&&(t.input.type=t.input._type,t.input.classList.remove("flatpickr-input"),t.input.removeAttribute("readonly")),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(Tt){try{delete t[Tt]}catch{}})}function Cn(ze){return t.calendarContainer.contains(ze)}function je(ze){if(t.isOpen&&!t.config.inline){var et=R1(ze),Tt=Cn(et),Wt=et===t.input||et===t.altInput||t.element.contains(et)||ze.path&&ze.path.indexOf&&(~ze.path.indexOf(t.input)||~ze.path.indexOf(t.altInput)),Yn=!Wt&&!Tt&&!Cn(ze.relatedTarget),po=!t.config.ignoredFocusElements.some(function(wo){return wo.contains(et)});Yn&&po&&(t.config.allowInput&&t.setDate(t._input.value,!1,t.config.altInput?t.config.altFormat:t.config.dateFormat),t.timeContainer!==void 0&&t.minuteElement!==void 0&&t.hourElement!==void 0&&t.input.value!==""&&t.input.value!==void 0&&h(),t.close(),t.config&&t.config.mode==="range"&&t.selectedDates.length===1&&t.clear(!1))}}function mt(ze){if(!(!ze||t.config.minDate&&zet.config.maxDate.getFullYear())){var et=ze,Tt=t.currentYear!==et;t.currentYear=et||t.currentYear,t.config.maxDate&&t.currentYear===t.config.maxDate.getFullYear()?t.currentMonth=Math.min(t.config.maxDate.getMonth(),t.currentMonth):t.config.minDate&&t.currentYear===t.config.minDate.getFullYear()&&(t.currentMonth=Math.max(t.config.minDate.getMonth(),t.currentMonth)),Tt&&(t.redraw(),Po("onYearChange"),Xe())}}function he(ze,et){var Tt;et===void 0&&(et=!0);var Wt=t.parseDate(ze,void 0,et);if(t.config.minDate&&Wt&&N1(Wt,t.config.minDate,et!==void 0?et:!t.minDateHasTime)<0||t.config.maxDate&&Wt&&N1(Wt,t.config.maxDate,et!==void 0?et:!t.maxDateHasTime)>0)return!1;if(!t.config.enable&&t.config.disable.length===0)return!0;if(Wt===void 0)return!1;for(var Yn=!!t.config.enable,po=(Tt=t.config.enable)!==null&&Tt!==void 0?Tt:t.config.disable,wo=0,fn=void 0;wo=fn.from.getTime()&&Wt.getTime()<=fn.to.getTime())return Yn}return!Yn}function Zo(ze){return t.daysContainer!==void 0?ze.className.indexOf("hidden")===-1&&ze.className.indexOf("flatpickr-disabled")===-1&&t.daysContainer.contains(ze):!1}function Kn(ze){var et=ze.target===t._input,Tt=t._input.value.trimEnd()!==_a();et&&Tt&&!(ze.relatedTarget&&Cn(ze.relatedTarget))&&t.setDate(t._input.value,!0,ze.target===t.altInput?t.config.altFormat:t.config.dateFormat)}function so(ze){var et=R1(ze),Tt=t.config.wrap?o.contains(et):et===t._input,Wt=t.config.allowInput,Yn=t.isOpen&&(!Wt||!Tt),po=t.config.inline&&Tt&&!Wt;if(ze.keyCode===13&&Tt){if(Wt)return t.setDate(t._input.value,!0,et===t.altInput?t.config.altFormat:t.config.dateFormat),t.close(),et.blur();t.open()}else if(Cn(et)||Yn||po){var wo=!!t.timeContainer&&t.timeContainer.contains(et);switch(ze.keyCode){case 13:wo?(ze.preventDefault(),h(),ps()):oo(ze);break;case 27:ze.preventDefault(),ps();break;case 8:case 46:Tt&&!t.config.allowInput&&(ze.preventDefault(),t.clear());break;case 37:case 39:if(!wo&&!Tt){ze.preventDefault();var fn=l();if(t.daysContainer!==void 0&&(Wt===!1||fn&&Zo(fn))){var os=ze.keyCode===39?1:-1;ze.ctrlKey?(ze.stopPropagation(),He(os),Re(we(1),0)):Re(void 0,os)}}else t.hourElement&&t.hourElement.focus();break;case 38:case 40:ze.preventDefault();var xo=ze.keyCode===40?1:-1;t.daysContainer&&et.$i!==void 0||et===t.input||et===t.altInput?ze.ctrlKey?(ze.stopPropagation(),mt(t.currentYear-xo),Re(we(1),0)):wo||Re(void 0,xo*7):et===t.currentYearElement?mt(t.currentYear-xo):t.config.enableTime&&(!wo&&t.hourElement&&t.hourElement.focus(),h(ze),t._debouncedChange());break;case 9:if(wo){var fs=[t.hourElement,t.minuteElement,t.secondElement,t.amPM].concat(t.pluginElements).filter(function(Vs){return Vs}),kr=fs.indexOf(et);if(kr!==-1){var Lr=fs[kr+(ze.shiftKey?-1:1)];ze.preventDefault(),(Lr||t._input).focus()}}else!t.config.noCalendar&&t.daysContainer&&t.daysContainer.contains(et)&&ze.shiftKey&&(ze.preventDefault(),t._input.focus());break}}if(t.amPM!==void 0&&et===t.amPM)switch(ze.key){case t.l10n.amPM[0].charAt(0):case t.l10n.amPM[0].charAt(0).toLowerCase():t.amPM.textContent=t.l10n.amPM[0],C(),ln();break;case t.l10n.amPM[1].charAt(0):case t.l10n.amPM[1].charAt(0).toLowerCase():t.amPM.textContent=t.l10n.amPM[1],C(),ln();break}(Tt||Cn(et))&&Po("onKeyDown",ze)}function Yo(ze,et){if(et===void 0&&(et="flatpickr-day"),!(t.selectedDates.length!==1||ze&&(!ze.classList.contains(et)||ze.classList.contains("flatpickr-disabled")))){for(var Tt=ze?ze.dateObj.getTime():t.days.firstElementChild.dateObj.getTime(),Wt=t.parseDate(t.selectedDates[0],void 0,!0).getTime(),Yn=Math.min(Tt,t.selectedDates[0].getTime()),po=Math.max(Tt,t.selectedDates[0].getTime()),wo=!1,fn=0,os=0,xo=Yn;xoYn&&xofn)?fn=xo:xo>Wt&&(!os||xo ."+et));fs.forEach(function(kr){var Lr=kr.dateObj,Vs=Lr.getTime(),Yr=fn>0&&Vs0&&Vs>os;if(Yr){kr.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(Zi){kr.classList.remove(Zi)});return}else if(wo&&!Yr)return;["startRange","inRange","endRange","notAllowed"].forEach(function(Zi){kr.classList.remove(Zi)}),ze!==void 0&&(ze.classList.add(Tt<=t.selectedDates[0].getTime()?"startRange":"endRange"),WtTt&&Vs===Wt&&kr.classList.add("endRange"),Vs>=fn&&(os===0||Vs<=os)&&aNe(Vs,Wt,Tt)&&kr.classList.add("inRange"))})}}function as(){t.isOpen&&!t.config.static&&!t.config.inline&&bn()}function kt(ze,et){if(et===void 0&&(et=t._positionElement),t.isMobile===!0){if(ze){ze.preventDefault();var Tt=R1(ze);Tt&&Tt.blur()}t.mobileInput!==void 0&&(t.mobileInput.focus(),t.mobileInput.click()),Po("onOpen");return}else if(t._input.disabled||t.config.inline)return;var Wt=t.isOpen;t.isOpen=!0,Wt||(t.calendarContainer.classList.add("open"),t._input.classList.add("active"),Po("onOpen"),bn(et)),t.config.enableTime===!0&&t.config.noCalendar===!0&&t.config.allowInput===!1&&(ze===void 0||!t.timeContainer.contains(ze.relatedTarget))&&setTimeout(function(){return t.hourElement.select()},50)}function jt(ze){return function(et){var Tt=t.config["_"+ze+"Date"]=t.parseDate(et,t.config.dateFormat),Wt=t.config["_"+(ze==="min"?"max":"min")+"Date"];Tt!==void 0&&(t[ze==="min"?"minDateHasTime":"maxDateHasTime"]=Tt.getHours()>0||Tt.getMinutes()>0||Tt.getSeconds()>0),t.selectedDates&&(t.selectedDates=t.selectedDates.filter(function(Yn){return he(Yn)}),!t.selectedDates.length&&ze==="min"&&E(Tt),ln()),t.daysContainer&&(zn(),Tt!==void 0?t.currentYearElement[ze]=Tt.getFullYear().toString():t.currentYearElement.removeAttribute(ze),t.currentYearElement.disabled=!!Wt&&Tt!==void 0&&Wt.getFullYear()===Tt.getFullYear())}}function pt(){var ze=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],et=$m($m({},JSON.parse(JSON.stringify(o.dataset||{}))),e),Tt={};t.config.parseDate=et.parseDate,t.config.formatDate=et.formatDate,Object.defineProperty(t.config,"enable",{get:function(){return t.config._enable},set:function(fs){t.config._enable=Xs(fs)}}),Object.defineProperty(t.config,"disable",{get:function(){return t.config._disable},set:function(fs){t.config._disable=Xs(fs)}});var Wt=et.mode==="time";if(!et.dateFormat&&(et.enableTime||Wt)){var Yn=Cf.defaultConfig.dateFormat||TD.dateFormat;Tt.dateFormat=et.noCalendar||Wt?"H:i"+(et.enableSeconds?":S":""):Yn+" H:i"+(et.enableSeconds?":S":"")}if(et.altInput&&(et.enableTime||Wt)&&!et.altFormat){var po=Cf.defaultConfig.altFormat||TD.altFormat;Tt.altFormat=et.noCalendar||Wt?"h:i"+(et.enableSeconds?":S K":" K"):po+(" h:i"+(et.enableSeconds?":S":"")+" K")}Object.defineProperty(t.config,"minDate",{get:function(){return t.config._minDate},set:jt("min")}),Object.defineProperty(t.config,"maxDate",{get:function(){return t.config._maxDate},set:jt("max")});var wo=function(fs){return function(kr){t.config[fs==="min"?"_minTime":"_maxTime"]=t.parseDate(kr,"H:i:S")}};Object.defineProperty(t.config,"minTime",{get:function(){return t.config._minTime},set:wo("min")}),Object.defineProperty(t.config,"maxTime",{get:function(){return t.config._maxTime},set:wo("max")}),et.mode==="time"&&(t.config.noCalendar=!0,t.config.enableTime=!0),Object.assign(t.config,Tt,et);for(var fn=0;fn-1?t.config[xo]=uoe(os[xo]).map(u).concat(t.config[xo]):typeof et[xo]>"u"&&(t.config[xo]=os[xo])}et.altInputClass||(t.config.altInputClass=Ne().className+" "+t.config.altInputClass),Po("onParseConfig")}function Ne(){return t.config.wrap?o.querySelector("[data-input]"):o}function Gt(){typeof t.config.locale!="object"&&typeof Cf.l10ns[t.config.locale]>"u"&&t.config.errorHandler(new Error("flatpickr: invalid locale "+t.config.locale)),t.l10n=$m($m({},Cf.l10ns.default),typeof t.config.locale=="object"?t.config.locale:t.config.locale!=="default"?Cf.l10ns[t.config.locale]:void 0),sE.D="("+t.l10n.weekdays.shorthand.join("|")+")",sE.l="("+t.l10n.weekdays.longhand.join("|")+")",sE.M="("+t.l10n.months.shorthand.join("|")+")",sE.F="("+t.l10n.months.longhand.join("|")+")",sE.K="("+t.l10n.amPM[0]+"|"+t.l10n.amPM[1]+"|"+t.l10n.amPM[0].toLowerCase()+"|"+t.l10n.amPM[1].toLowerCase()+")";var ze=$m($m({},e),JSON.parse(JSON.stringify(o.dataset||{})));ze.time_24hr===void 0&&Cf.defaultConfig.time_24hr===void 0&&(t.config.time_24hr=t.l10n.time_24hr),t.formatDate=IOe(t),t.parseDate=Hse({config:t.config,l10n:t.l10n})}function bn(ze){if(typeof t.config.position=="function")return void t.config.position(t,ze);if(t.calendarContainer!==void 0){Po("onPreCalendarPosition");var et=ze||t._positionElement,Tt=Array.prototype.reduce.call(t.calendarContainer.children,function(Go,ei){return Go+ei.offsetHeight},0),Wt=t.calendarContainer.offsetWidth,Yn=t.config.position.split(" "),po=Yn[0],wo=Yn.length>1?Yn[1]:null,fn=et.getBoundingClientRect(),os=window.innerHeight-fn.bottom,xo=po==="above"||po!=="below"&&osTt,fs=window.pageYOffset+fn.top+(xo?-Tt-2:et.offsetHeight+2);if(Mg(t.calendarContainer,"arrowTop",!xo),Mg(t.calendarContainer,"arrowBottom",xo),!t.config.inline){var kr=window.pageXOffset+fn.left,Lr=!1,Vs=!1;wo==="center"?(kr-=(Wt-fn.width)/2,Lr=!0):wo==="right"&&(kr-=Wt-fn.width,Vs=!0),Mg(t.calendarContainer,"arrowLeft",!Lr&&!Vs),Mg(t.calendarContainer,"arrowCenter",Lr),Mg(t.calendarContainer,"arrowRight",Vs);var Yr=window.document.body.offsetWidth-(window.pageXOffset+fn.right),Zi=kr+Wt>window.document.body.offsetWidth,Qa=Yr+Wt>window.document.body.offsetWidth;if(Mg(t.calendarContainer,"rightMost",Zi),!t.config.static)if(t.calendarContainer.style.top=fs+"px",!Zi)t.calendarContainer.style.left=kr+"px",t.calendarContainer.style.right="auto";else if(!Qa)t.calendarContainer.style.left="auto",t.calendarContainer.style.right=Yr+"px";else{var Oi=At();if(Oi===void 0)return;var Ge=window.document.body.offsetWidth,qe=Math.max(0,Ge/2-Wt/2),Nt=".flatpickr-calendar.centerMost:before",Ut=".flatpickr-calendar.centerMost:after",bo=Oi.cssRules.length,Lo="{left:"+fn.left+"px;right:auto;}";Mg(t.calendarContainer,"rightMost",!1),Mg(t.calendarContainer,"centerMost",!0),Oi.insertRule(Nt+","+Ut+Lo,bo),t.calendarContainer.style.left=qe+"px",t.calendarContainer.style.right="auto"}}}}function At(){for(var ze=null,et=0;ett.currentMonth+t.config.showMonths-1)&&t.config.mode!=="range";if(t.selectedDateElem=Wt,t.config.mode==="single")t.selectedDates=[Yn];else if(t.config.mode==="multiple"){var wo=Ls(Yn);wo?t.selectedDates.splice(parseInt(wo),1):t.selectedDates.push(Yn)}else t.config.mode==="range"&&(t.selectedDates.length===2&&t.clear(!1,!1),t.latestSelectedDateObj=Yn,t.selectedDates.push(Yn),N1(Yn,t.selectedDates[0],!0)!==0&&t.selectedDates.sort(function(fs,kr){return fs.getTime()-kr.getTime()}));if(C(),po){var fn=t.currentYear!==Yn.getFullYear();t.currentYear=Yn.getFullYear(),t.currentMonth=Yn.getMonth(),fn&&(Po("onYearChange"),Xe()),Po("onMonthChange")}if(bs(),ce(),ln(),!po&&t.config.mode!=="range"&&t.config.showMonths===1?G(Wt):t.selectedDateElem!==void 0&&t.hourElement===void 0&&t.selectedDateElem&&t.selectedDateElem.focus(),t.hourElement!==void 0&&t.hourElement!==void 0&&t.hourElement.focus(),t.config.closeOnSelect){var os=t.config.mode==="single"&&!t.config.enableTime,xo=t.config.mode==="range"&&t.selectedDates.length===2&&!t.config.enableTime;(os||xo)&&ps()}F()}}var Ss={locale:[Gt,Bt],showMonths:[ot,d,Qe],minDate:[K],maxDate:[K],positionElement:[Ns],clickOpens:[function(){t.config.clickOpens===!0?(Q(t._input,"focus",t.open),Q(t._input,"click",t.open)):(t._input.removeEventListener("focus",t.open),t._input.removeEventListener("click",t.open))}]};function Mr(ze,et){if(ze!==null&&typeof ze=="object"){Object.assign(t.config,ze);for(var Tt in ze)Ss[Tt]!==void 0&&Ss[Tt].forEach(function(Wt){return Wt()})}else t.config[ze]=et,Ss[ze]!==void 0?Ss[ze].forEach(function(Wt){return Wt()}):coe.indexOf(ze)>-1&&(t.config[ze]=uoe(et));t.redraw(),ln(!0)}function $s(ze,et){var Tt=[];if(ze instanceof Array)Tt=ze.map(function(Wt){return t.parseDate(Wt,et)});else if(ze instanceof Date||typeof ze=="number")Tt=[t.parseDate(ze,et)];else if(typeof ze=="string")switch(t.config.mode){case"single":case"time":Tt=[t.parseDate(ze,et)];break;case"multiple":Tt=ze.split(t.config.conjunction).map(function(Wt){return t.parseDate(Wt,et)});break;case"range":Tt=ze.split(t.l10n.rangeSeparator).map(function(Wt){return t.parseDate(Wt,et)});break}else t.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(ze)));t.selectedDates=t.config.allowInvalidPreload?Tt:Tt.filter(function(Wt){return Wt instanceof Date&&he(Wt,!1)}),t.config.mode==="range"&&t.selectedDates.sort(function(Wt,Yn){return Wt.getTime()-Yn.getTime()})}function tr(ze,et,Tt){if(et===void 0&&(et=!1),Tt===void 0&&(Tt=t.config.dateFormat),ze!==0&&!ze||ze instanceof Array&&ze.length===0)return t.clear(et);$s(ze,Tt),t.latestSelectedDateObj=t.selectedDates[t.selectedDates.length-1],t.redraw(),K(void 0,et),E(),t.selectedDates.length===0&&t.clear(!1),ln(et),et&&Po("onChange")}function Xs(ze){return ze.slice().map(function(et){return typeof et=="string"||typeof et=="number"||et instanceof Date?t.parseDate(et,void 0,!0):et&&typeof et=="object"&&et.from&&et.to?{from:t.parseDate(et.from,void 0),to:t.parseDate(et.to,void 0)}:et}).filter(function(et){return et})}function wa(){t.selectedDates=[],t.now=t.parseDate(t.config.now)||new Date;var ze=t.config.defaultDate||((t.input.nodeName==="INPUT"||t.input.nodeName==="TEXTAREA")&&t.input.placeholder&&t.input.value===t.input.placeholder?null:t.input.value);ze&&$s(ze,t.config.dateFormat),t._initialDate=t.selectedDates.length>0?t.selectedDates[0]:t.config.minDate&&t.config.minDate.getTime()>t.now.getTime()?t.config.minDate:t.config.maxDate&&t.config.maxDate.getTime()0&&(t.latestSelectedDateObj=t.selectedDates[0]),t.config.minTime!==void 0&&(t.config.minTime=t.parseDate(t.config.minTime,"H:i")),t.config.maxTime!==void 0&&(t.config.maxTime=t.parseDate(t.config.maxTime,"H:i")),t.minDateHasTime=!!t.config.minDate&&(t.config.minDate.getHours()>0||t.config.minDate.getMinutes()>0||t.config.minDate.getSeconds()>0),t.maxDateHasTime=!!t.config.maxDate&&(t.config.maxDate.getHours()>0||t.config.maxDate.getMinutes()>0||t.config.maxDate.getSeconds()>0)}function dr(){if(t.input=Ne(),!t.input){t.config.errorHandler(new Error("Invalid input element specified"));return}t.input._type=t.input.type,t.input.type="text",t.input.classList.add("flatpickr-input"),t._input=t.input,t.config.altInput&&(t.altInput=dl(t.input.nodeName,t.config.altInputClass),t._input=t.altInput,t.altInput.placeholder=t.input.placeholder,t.altInput.disabled=t.input.disabled,t.altInput.required=t.input.required,t.altInput.tabIndex=t.input.tabIndex,t.altInput.type="text",t.input.setAttribute("type","hidden"),!t.config.static&&t.input.parentNode&&t.input.parentNode.insertBefore(t.altInput,t.input.nextSibling)),t.config.allowInput||t._input.setAttribute("readonly","readonly"),Ns()}function Ns(){t._positionElement=t.config.positionElement||t._input}function qr(){var ze=t.config.enableTime?t.config.noCalendar?"time":"datetime-local":"date";t.mobileInput=dl("input",t.input.className+" flatpickr-mobile"),t.mobileInput.tabIndex=1,t.mobileInput.type=ze,t.mobileInput.disabled=t.input.disabled,t.mobileInput.required=t.input.required,t.mobileInput.placeholder=t.input.placeholder,t.mobileFormatStr=ze==="datetime-local"?"Y-m-d\\TH:i:S":ze==="date"?"Y-m-d":"H:i:S",t.selectedDates.length>0&&(t.mobileInput.defaultValue=t.mobileInput.value=t.formatDate(t.selectedDates[0],t.mobileFormatStr)),t.config.minDate&&(t.mobileInput.min=t.formatDate(t.config.minDate,"Y-m-d")),t.config.maxDate&&(t.mobileInput.max=t.formatDate(t.config.maxDate,"Y-m-d")),t.input.getAttribute("step")&&(t.mobileInput.step=String(t.input.getAttribute("step"))),t.input.type="hidden",t.altInput!==void 0&&(t.altInput.type="hidden");try{t.input.parentNode&&t.input.parentNode.insertBefore(t.mobileInput,t.input.nextSibling)}catch{}Q(t.mobileInput,"change",function(et){t.setDate(R1(et).value,!1,t.mobileFormatStr),Po("onChange"),Po("onClose")})}function $o(ze){if(t.isOpen===!0)return t.close();t.open(ze)}function Po(ze,et){if(t.config!==void 0){var Tt=t.config[ze];if(Tt!==void 0&&Tt.length>0)for(var Wt=0;Tt[Wt]&&Wt=0&&N1(ze,t.selectedDates[1])<=0}function bs(){t.config.noCalendar||t.isMobile||!t.monthNav||(t.yearElements.forEach(function(ze,et){var Tt=new Date(t.currentYear,t.currentMonth,1);Tt.setMonth(t.currentMonth+et),t.config.showMonths>1||t.config.monthSelectorType==="static"?t.monthElements[et].textContent=Hz(Tt.getMonth(),t.config.shorthandCurrentMonth,t.l10n)+" ":t.monthsDropdownContainer.value=Tt.getMonth().toString(),ze.value=Tt.getFullYear().toString()}),t._hidePrevMonthArrow=t.config.minDate!==void 0&&(t.currentYear===t.config.minDate.getFullYear()?t.currentMonth<=t.config.minDate.getMonth():t.currentYeart.config.maxDate.getMonth():t.currentYear>t.config.maxDate.getFullYear()))}function _a(ze){var et=ze||(t.config.altInput?t.config.altFormat:t.config.dateFormat);return t.selectedDates.map(function(Tt){return t.formatDate(Tt,et)}).filter(function(Tt,Wt,Yn){return t.config.mode!=="range"||t.config.enableTime||Yn.indexOf(Tt)===Wt}).join(t.config.mode!=="range"?t.config.conjunction:t.l10n.rangeSeparator)}function ln(ze){ze===void 0&&(ze=!0),t.mobileInput!==void 0&&t.mobileFormatStr&&(t.mobileInput.value=t.latestSelectedDateObj!==void 0?t.formatDate(t.latestSelectedDateObj,t.mobileFormatStr):""),t.input.value=_a(t.config.dateFormat),t.altInput!==void 0&&(t.altInput.value=_a(t.config.altFormat)),ze!==!1&&Po("onValueUpdate")}function vs(ze){var et=R1(ze),Tt=t.prevMonthNav.contains(et),Wt=t.nextMonthNav.contains(et);Tt||Wt?He(Tt?-1:1):t.yearElements.indexOf(et)>=0?et.select():et.classList.contains("arrowUp")?t.changeYear(t.currentYear+1):et.classList.contains("arrowDown")&&t.changeYear(t.currentYear-1)}function Qi(ze){ze.preventDefault();var et=ze.type==="keydown",Tt=R1(ze),Wt=Tt;t.amPM!==void 0&&Tt===t.amPM&&(t.amPM.textContent=t.l10n.amPM[Bb(t.amPM.textContent===t.l10n.amPM[0])]);var Yn=parseFloat(Wt.getAttribute("min")),po=parseFloat(Wt.getAttribute("max")),wo=parseFloat(Wt.getAttribute("step")),fn=parseInt(Wt.value,10),os=ze.delta||(et?ze.which===38?1:-1:0),xo=fn+wo*os;if(typeof Wt.value<"u"&&Wt.value.length===2){var fs=Wt===t.hourElement,kr=Wt===t.minuteElement;xopo&&(xo=Wt===t.hourElement?xo-po-Bb(!t.amPM):Yn,kr&&te(void 0,1,t.hourElement)),t.amPM&&fs&&(wo===1?xo+fn===23:Math.abs(xo-fn)>wo)&&(t.amPM.textContent=t.l10n.amPM[Bb(t.amPM.textContent===t.l10n.amPM[0])]),Wt.value=Np(xo)}}return a(),t}function ED(o,e){for(var t=Array.prototype.slice.call(o).filter(function(u){return u instanceof HTMLElement}),s=[],a=0;a{$=null}),go()),o[0]?Q?Q.p(o,U):(Q=Khe(o),Q.c(),Q.m(y.parentNode,y)):Q&&(Q.d(1),Q=null)},i(F){C||(xe(u.$$.fragment,F),xe($),C=!0)},o(F){Be(u.$$.fragment,F),Be($),C=!1},d(F){F&&ke(e),o[12](null),Jt(u),$&&$.d(),F&&ke(b),Q&&Q.d(F),F&&ke(y),E=!1,vi(R)}}}function Ghe(o){let e,t,s,a;function l(h){o[15](h)}function u(h){o[16](h)}let d={field:o[1]};return o[0]!==void 0&&(d.value=o[0]),o[9]!==void 0&&(d.search=o[9]),e=new eV({props:d}),o[14](e),Ro.push(()=>er(e,"value",l)),Ro.push(()=>er(e,"search",u)),{c(){en(e.$$.fragment)},m(h,b){Kt(e,h,b),a=!0},p(h,b){const y={};b&2&&(y.field=h[1]),!t&&b&1&&(t=!0,y.value=h[0],lr(()=>t=!1)),!s&&b&512&&(s=!0,y.search=h[9],lr(()=>s=!1)),e.$set(y)},i(h){a||(xe(e.$$.fragment,h),a=!0)},o(h){Be(e.$$.fragment,h),a=!1},d(h){o[14](null),Jt(e,h)}}}function Khe(o){let e,t,s,a,l,u,d;return{c(){e=re("span"),t=re("div"),s=Ht(o[0]),a=Ze(),l=re("button"),Z(l,"type","button"),Z(l,"class","btn-close btn-sm ms-1"),rs(l,"font-size","10px"),Z(l,"aria-label","Close"),Z(t,"class","d-flex align-items-center "),Z(e,"class","badge rounded-pill bg-light text-dark fs-6 mt-3")},m(h,b){Te(h,e,b),X(e,t),X(t,s),X(t,a),X(t,l),u||(d=mn(l,"click",ku(o[17])),u=!0)},p(h,b){b&1&&Fn(s,h[0])},d(h){h&&ke(e),u=!1,d()}}}function Jhe(o){let e,t;return{c(){e=re("div"),t=Ht(o[8]),Z(e,"class","invalid-feedback d-block")},m(s,a){Te(s,e,a),X(e,t)},p(s,a){a&256&&Fn(t,s[8])},d(s){s&&ke(e)}}}function mNe(o){let e,t,s,a,l;const u=[hNe,dNe],d=[];function h(y,C){return y[7]?0:1}t=h(o),s=d[t]=u[t](o);let b=o[8]&&Jhe(o);return{c(){e=re("div"),s.c(),a=Ze(),b&&b.c(),Z(e,"class","mb-0")},m(y,C){Te(y,e,C),d[t].m(e,null),X(e,a),b&&b.m(e,null),l=!0},p(y,[C]){let E=t;t=h(y),t===E?d[t].p(y,C):(mo(),Be(d[E],1,1,()=>{d[E]=null}),go(),s=d[t],s?s.p(y,C):(s=d[t]=u[t](y),s.c()),xe(s,1),s.m(e,a)),y[8]?b?b.p(y,C):(b=Jhe(y),b.c(),b.m(e,null)):b&&(b.d(1),b=null)},i(y){l||(xe(s),l=!0)},o(y){Be(s),l=!1},d(y){y&&ke(e),d[t].d(),b&&b.d()}}}function gNe(o,e,t){let s,a,l,{field:u}=e,{value:d}=e,{id:h}=e,{isCreateMode:b}=e,{validationErrors:y}=e,C,E,R,$={enableTime:!1,allowInput:!0,dateFormat:"Y-m-d"};u.min&&($.minDate=u.min),u.max&&($.maxDate=u.max),W1(()=>{(!u.readonly||b)&&(a&&($.clickOpens=!1),t(6,R=Cf(E,$)))});function Q(){s=this.value,t(9,s)}function F(we){Ro[we?"unshift":"push"](()=>{E=we,t(5,E)})}const U=we=>R.open();function K(we){Ro[we?"unshift":"push"](()=>{C=we,t(4,C)})}function L(we){d=we,t(0,d)}function te(we){s=we,t(9,s)}const ne=we=>t(0,d="");function oe(){d=this.value,t(0,d)}function G(we){Ro[we?"unshift":"push"](()=>{E=we,t(5,E)})}return o.$$set=we=>{"field"in we&&t(1,u=we.field),"value"in we&&t(0,d=we.value),"id"in we&&t(2,h=we.id),"isCreateMode"in we&&t(3,b=we.isCreateMode),"validationErrors"in we&&t(10,y=we.validationErrors)},o.$$.update=()=>{o.$$.dirty&10&&t(7,a=u.optionsFrom&&!(u.readonly&&!b)),o.$$.dirty&1026&&t(8,l=Lm(y,u.name))},t(9,s=""),[d,u,h,b,C,E,R,a,l,s,y,Q,F,U,K,L,te,ne,oe,G]}class pNe extends uo{constructor(e){super(),co(this,e,gNe,mNe,lo,{field:1,value:0,id:2,isCreateMode:3,validationErrors:10})}}var dH,bNe=new Uint8Array(16);function vNe(){if(!dH&&(dH=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!dH))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return dH(bNe)}const ONe=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function yNe(o){return typeof o=="string"&&ONe.test(o)}var zh=[];for(var moe=0;moe<256;++moe)zh.push((moe+256).toString(16).substr(1));function wNe(o){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,t=(zh[o[e+0]]+zh[o[e+1]]+zh[o[e+2]]+zh[o[e+3]]+"-"+zh[o[e+4]]+zh[o[e+5]]+"-"+zh[o[e+6]]+zh[o[e+7]]+"-"+zh[o[e+8]]+zh[o[e+9]]+"-"+zh[o[e+10]]+zh[o[e+11]]+zh[o[e+12]]+zh[o[e+13]]+zh[o[e+14]]+zh[o[e+15]]).toLowerCase();if(!yNe(t))throw TypeError("Stringified UUID is invalid");return t}function _Ne(o,e,t){o=o||{};var s=o.random||(o.rng||vNe)();if(s[6]=s[6]&15|64,s[8]=s[8]&63|128,e){t=t||0;for(var a=0;a<16;++a)e[t+a]=s[a];return e}return wNe(s)}function SNe(o){let e,t,s,a,l;return t=new Fa({props:{icon:"dice"}}),{c(){e=re("button"),en(t.$$.fragment),Z(e,"class","btn btn-primary ms-2"),Z(e,"title","Generate a new UUIDv4")},m(u,d){Te(u,e,d),Kt(t,e,null),s=!0,a||(l=mn(e,"click",o[4]),a=!0)},p:un,i(u){s||(xe(t.$$.fragment,u),s=!0)},o(u){Be(t.$$.fragment,u),s=!1},d(u){u&&ke(e),Jt(t),a=!1,l()}}}function eme(o){let e,t;return{c(){e=re("div"),t=Ht(o[2]),Z(e,"class","invalid-feedback d-block")},m(s,a){Te(s,e,a),X(e,t)},p(s,a){a&4&&Fn(t,s[2])},d(s){s&&ke(e)}}}function CNe(o){let e,t,s,a,l,u,d,h,b=!o[3]&&SNe(o),y=o[2]&&eme(o);return{c(){e=re("div"),t=re("div"),s=re("input"),a=Ze(),b&&b.c(),l=Ze(),y&&y.c(),Z(s,"type","text"),Z(s,"id",o[1]),Z(s,"class","form-control"),Z(s,"autocomplete","off"),s.readOnly=o[3],Vo(s,"is-invalid",o[2]),Z(t,"class","d-flex justify-content-between"),Z(e,"class","mb-0")},m(C,E){Te(C,e,E),X(e,t),X(t,s),ar(s,o[0]),X(t,a),b&&b.m(t,null),X(e,l),y&&y.m(e,null),u=!0,d||(h=mn(s,"input",o[8]),d=!0)},p(C,[E]){(!u||E&2)&&Z(s,"id",C[1]),E&1&&s.value!==C[0]&&ar(s,C[0]),(!u||E&4)&&Vo(s,"is-invalid",C[2]),C[3]||b.p(C,E),C[2]?y?y.p(C,E):(y=eme(C),y.c(),y.m(e,null)):y&&(y.d(1),y=null)},i(C){u||(xe(b),u=!0)},o(C){Be(b),u=!1},d(C){C&&ke(e),b&&b.d(),y&&y.d(),d=!1,h()}}}function kNe(o,e,t){let s;Ur("channelurl");let{validationErrors:a}=e,{field:l}=e,{value:u}=e,{id:d}=e,{isCreateMode:h}=e,b=l.readonly&&!h;function y(E){E.preventDefault(),t(0,u=_Ne())}function C(){u=this.value,t(0,u)}return o.$$set=E=>{"validationErrors"in E&&t(5,a=E.validationErrors),"field"in E&&t(6,l=E.field),"value"in E&&t(0,u=E.value),"id"in E&&t(1,d=E.id),"isCreateMode"in E&&t(7,h=E.isCreateMode)},o.$$.update=()=>{o.$$.dirty&96&&t(2,s=Lm(a,l.name))},[u,d,s,b,y,a,l,h,C]}class xNe extends uo{constructor(e){super(),co(this,e,kNe,CNe,lo,{validationErrors:5,field:6,value:0,id:1,isCreateMode:7})}}function tme(o,e,t){const s=o.slice();return s[14]=e[t],s}function nme(o,e,t){const s=o.slice();return s[17]=e[t],s}function TNe(o){let e,t,s,a,l=o[3],u=[];for(let d=0;dd[14].id;for(let d=0;d0&&sme(o),y={};return a=new are({props:y}),o[12](a),a.$on("insert",o[7]),{c(){e=re("div"),h.c(),t=Ze(),b&&b.c(),s=Ze(),en(a.$$.fragment),Z(e,"class","mb-0")},m(C,E){Te(C,e,E),h.m(e,null),Te(C,t,E),b&&b.m(C,E),Te(C,s,E),Kt(a,C,E),l=!0},p(C,[E]){d===(d=u(C))&&h?h.p(C,E):(h.d(1),h=d(C),h&&(h.c(),h.m(e,null))),C[2].length>0?b?(b.p(C,E),E&4&&xe(b,1)):(b=sme(C),b.c(),xe(b,1),b.m(s.parentNode,s)):b&&(mo(),Be(b,1,1,()=>{b=null}),go());const R={};a.$set(R)},i(C){l||(xe(b),xe(a.$$.fragment,C),l=!0)},o(C){Be(b),Be(a.$$.fragment,C),l=!1},d(C){C&&ke(e),h.d(),C&&ke(t),b&&b.d(C),C&&ke(s),o[12](null),Jt(a,C)}}}function PNe(o,e,t){let s;const a=Ur("channel");let{field:l}=e,{record:u}=e,{graph:d}=e,h,b=a.schemas.filter(U=>l.collections.includes(U.name));function y(U){U.preventDefault(),t(8,d.edges=d.edges.filter(K=>!(K.target===U.detail&&K.field===l.name)),d)}function C(U,K){U.preventDefault(),h.open(K)}async function E(U){t(8,d.edges=await qD(U.detail.source,U.detail.target,d.edges,l.name,s),d)}function R(U){var oe;U.preventDefault(),h.close();const K=U.detail.records,L=U.detail.action;let te=K.map(G=>({target:G.id,source:u.id,sourceSchema:u.schema,targetSchema:G.schema,field:l.name,rank:""})),ne=(oe=d.edges)!=null?oe:[];L==="replace"&&(ne=ne.filter(G=>G.field!==l.name)),t(8,d.records=Lc.exports.uniqBy([...d.records,...K],G=>G.id),d),t(8,d.edges=Lc.exports.uniqBy([...ne,...te],G=>G.target+G.field),d)}const $=U=>C(U,b[0].name),Q=(U,K)=>C(K,U.name);function F(U){Ro[U?"unshift":"push"](()=>{h=U,t(1,h)})}return o.$$set=U=>{"field"in U&&t(0,l=U.field),"record"in U&&t(9,u=U.record),"graph"in U&&t(8,d=U.graph)},o.$$.update=()=>{var U;o.$$.dirty&769&&t(2,s=(U=d==null?void 0:d.edges.filter(K=>K.field===l.name).map(K=>d.records.find(L=>L.id===K.target&&u.id===K.source)).filter(K=>!!(K!=null&&K.id)))!=null?U:[])},[l,h,s,b,y,C,E,R,d,u,$,Q,F]}class MNe extends uo{constructor(e){super(),co(this,e,PNe,DNe,lo,{field:0,record:9,graph:8})}}function ime(o){let e,t;return{c(){e=re("div"),t=Ht(o[5]),Z(e,"class","invalid-feedback d-block")},m(s,a){Te(s,e,a),X(e,t)},p(s,a){a&32&&Fn(t,s[5])},d(s){s&&ke(e)}}}function RNe(o){let e,t,s,a,l,u,d=o[5]&&ime(o);return{c(){e=re("div"),t=re("textarea"),a=Ze(),d&&d.c(),Z(t,"id",o[3]),Z(t,"class","form-control svelte-1er4ovm"),Z(t,"rows","2"),t.readOnly=s=o[1].readonly&&!o[2],Vo(t,"is-invalid",o[5]),Z(e,"class","mb-0")},m(h,b){Te(h,e,b),X(e,t),ar(t,o[0]),o[8](t),X(e,a),d&&d.m(e,null),l||(u=[mn(t,"input",o[7]),mn(t,"input",zse),mn(t,"focus",zse)],l=!0)},p(h,[b]){b&8&&Z(t,"id",h[3]),b&6&&s!==(s=h[1].readonly&&!h[2])&&(t.readOnly=s),b&1&&ar(t,h[0]),b&32&&Vo(t,"is-invalid",h[5]),h[5]?d?d.p(h,b):(d=ime(h),d.c(),d.m(e,null)):d&&(d.d(1),d=null)},i:un,o:un,d(h){h&&ke(e),o[8](null),d&&d.d(),l=!1,vi(u)}}}function zse(o){let e;o.target?e=o.target:e=o,e.style.overflow="hidden",e.style.height="1px",e.style.height=+e.scrollHeight+"px"}function $Ne(o,e,t){let s,{field:a}=e,{value:l}=e,{isCreateMode:u}=e,{validationErrors:d}=e,h,{id:b}=e;W1(()=>{zse(h)});function y(){l=this.value,t(0,l)}function C(E){Ro[E?"unshift":"push"](()=>{h=E,t(4,h)})}return o.$$set=E=>{"field"in E&&t(1,a=E.field),"value"in E&&t(0,l=E.value),"isCreateMode"in E&&t(2,u=E.isCreateMode),"validationErrors"in E&&t(6,d=E.validationErrors),"id"in E&&t(3,b=E.id)},o.$$.update=()=>{o.$$.dirty&66&&t(5,s=Lm(d,a.name))},[l,a,u,b,h,s,d,y,C]}class BOe extends uo{constructor(e){super(),co(this,e,$Ne,RNe,lo,{field:1,value:0,isCreateMode:2,validationErrors:6,id:3})}}function NNe(o){let e,t,s,a;return{c(){e=re("input"),Z(e,"type","text"),Z(e,"id",o[3]),Z(e,"class","form-control"),Z(e,"autocomplete","off"),e.readOnly=t=o[1].readonly&&!o[2],Vo(e,"is-invalid",o[8])},m(l,u){Te(l,e,u),ar(e,o[0]),o[20](e),s||(a=mn(e,"input",o[19]),s=!0)},p(l,u){u&8&&Z(e,"id",l[3]),u&6&&t!==(t=l[1].readonly&&!l[2])&&(e.readOnly=t),u&1&&e.value!==l[0]&&ar(e,l[0]),u&256&&Vo(e,"is-invalid",l[8])},i:un,o:un,d(l){l&&ke(e),o[20](null),s=!1,a()}}}function INe(o){let e,t,s,a,l,u,d,h,b,y,C,E,R;u=new Fa({props:{icon:"calendar"}});let $=o[1].optionsFrom&&ame(o),Q=o[0]&&lme(o);return{c(){e=re("div"),t=re("input"),a=Ze(),l=re("button"),en(u.$$.fragment),d=Ze(),h=re("ul"),$&&$.c(),b=Ze(),Q&&Q.c(),y=Rs(),Z(t,"type","search"),Z(t,"id",o[3]),Z(t,"class","form-control dropdown-toggle"),Z(t,"placeholder","Search for options"),Z(t,"data-bs-toggle","dropdown"),Z(t,"autocomplete","off"),t.readOnly=s=o[1].readonly&&!o[2],Vo(t,"is-invalid",o[8]),Z(l,"class","btn btn-light ms-1"),Z(h,"class","dropdown-menu w-100"),Z(e,"class","dropdown d-flex")},m(F,U){Te(F,e,U),X(e,t),ar(t,o[9]),o[13](t),X(e,a),X(e,l),Kt(u,l,null),X(e,d),X(e,h),$&&$.m(h,null),Te(F,b,U),Q&&Q.m(F,U),Te(F,y,U),C=!0,E||(R=[mn(t,"keyup",function(){Ub(o[4].update)&&o[4].update.apply(this,arguments)}),mn(t,"focus",function(){Ub(o[4].update)&&o[4].update.apply(this,arguments)}),mn(t,"input",o[12]),mn(l,"click",ku(o[14]))],E=!0)},p(F,U){o=F,(!C||U&8)&&Z(t,"id",o[3]),(!C||U&6&&s!==(s=o[1].readonly&&!o[2]))&&(t.readOnly=s),U&512&&t.value!==o[9]&&ar(t,o[9]),(!C||U&256)&&Vo(t,"is-invalid",o[8]),o[1].optionsFrom?$?($.p(o,U),U&2&&xe($,1)):($=ame(o),$.c(),xe($,1),$.m(h,null)):$&&(mo(),Be($,1,1,()=>{$=null}),go()),o[0]?Q?Q.p(o,U):(Q=lme(o),Q.c(),Q.m(y.parentNode,y)):Q&&(Q.d(1),Q=null)},i(F){C||(xe(u.$$.fragment,F),xe($),C=!0)},o(F){Be(u.$$.fragment,F),Be($),C=!1},d(F){F&&ke(e),o[13](null),Jt(u),$&&$.d(),F&&ke(b),Q&&Q.d(F),F&&ke(y),E=!1,vi(R)}}}function ame(o){let e,t,s,a;function l(h){o[16](h)}function u(h){o[17](h)}let d={field:o[1]};return o[0]!==void 0&&(d.value=o[0]),o[9]!==void 0&&(d.search=o[9]),e=new eV({props:d}),o[15](e),Ro.push(()=>er(e,"value",l)),Ro.push(()=>er(e,"search",u)),{c(){en(e.$$.fragment)},m(h,b){Kt(e,h,b),a=!0},p(h,b){const y={};b&2&&(y.field=h[1]),!t&&b&1&&(t=!0,y.value=h[0],lr(()=>t=!1)),!s&&b&512&&(s=!0,y.search=h[9],lr(()=>s=!1)),e.$set(y)},i(h){a||(xe(e.$$.fragment,h),a=!0)},o(h){Be(e.$$.fragment,h),a=!1},d(h){o[15](null),Jt(e,h)}}}function lme(o){let e,t,s,a,l,u,d;return{c(){e=re("span"),t=re("div"),s=Ht(o[0]),a=Ze(),l=re("button"),Z(l,"type","button"),Z(l,"class","btn-close btn-sm ms-1"),rs(l,"font-size","10px"),Z(l,"aria-label","Close"),Z(t,"class","d-flex align-items-center "),Z(e,"class","badge rounded-pill bg-light text-dark fs-6 mt-3")},m(h,b){Te(h,e,b),X(e,t),X(t,s),X(t,a),X(t,l),u||(d=mn(l,"click",ku(o[18])),u=!0)},p(h,b){b&1&&Fn(s,h[0])},d(h){h&&ke(e),u=!1,d()}}}function cme(o){let e,t;return{c(){e=re("div"),t=Ht(o[8]),Z(e,"class","invalid-feedback d-block")},m(s,a){Te(s,e,a),X(e,t)},p(s,a){a&256&&Fn(t,s[8])},d(s){s&&ke(e)}}}function BNe(o){let e,t,s,a,l,u,d;const h=[INe,NNe],b=[];function y(E,R){return E[7]?0:1}t=y(o),s=b[t]=h[t](o);let C=o[8]&&cme(o);return{c(){e=re("div"),s.c(),a=Ze(),l=re("small"),l.textContent=`Dates are displayed according to your timezone: ${o[10]}`,u=Ze(),C&&C.c(),Z(l,"class","text-primary opacity-50"),Z(e,"class","mb-0")},m(E,R){Te(E,e,R),b[t].m(e,null),X(e,a),X(e,l),X(e,u),C&&C.m(e,null),d=!0},p(E,[R]){let $=t;t=y(E),t===$?b[t].p(E,R):(mo(),Be(b[$],1,1,()=>{b[$]=null}),go(),s=b[t],s?s.p(E,R):(s=b[t]=h[t](E),s.c()),xe(s,1),s.m(e,a)),E[8]?C?C.p(E,R):(C=cme(E),C.c(),C.m(e,null)):C&&(C.d(1),C=null)},i(E){d||(xe(s),d=!0)},o(E){Be(s),d=!1},d(E){E&&ke(e),b[t].d(),C&&C.d()}}}function LNe(o,e,t){let s,a,l,{field:u}=e,{value:d}=e,{isCreateMode:h}=e,{validationErrors:b}=e;const y=Intl.DateTimeFormat().resolvedOptions().timeZone;let{id:C}=e,E,R,$,Q={enableTime:!1,allowInput:!0,altInput:!0,altFormat:"Y-m-d H:i:S",dateFormat:"Z",enableTime:!0,time_24hr:!0,enableSeconds:!0};u.min&&(Q.minDate=u.min),u.max&&(Q.maxDate=u.max),W1(()=>{(!u.readonly||h)&&(a&&(Q.clickOpens=!1),t(6,$=Cf(R,Q)))});function F(){s=this.value,t(9,s)}function U(ve){Ro[ve?"unshift":"push"](()=>{R=ve,t(5,R)})}const K=ve=>$.open();function L(ve){Ro[ve?"unshift":"push"](()=>{E=ve,t(4,E)})}function te(ve){d=ve,t(0,d)}function ne(ve){s=ve,t(9,s)}const oe=ve=>t(0,d="");function G(){d=this.value,t(0,d)}function we(ve){Ro[ve?"unshift":"push"](()=>{R=ve,t(5,R)})}return o.$$set=ve=>{"field"in ve&&t(1,u=ve.field),"value"in ve&&t(0,d=ve.value),"isCreateMode"in ve&&t(2,h=ve.isCreateMode),"validationErrors"in ve&&t(11,b=ve.validationErrors),"id"in ve&&t(3,C=ve.id)},o.$$.update=()=>{o.$$.dirty&6&&t(7,a=u.optionsFrom&&!(u.readonly&&!h)),o.$$.dirty&2050&&t(8,l=Lm(b,u.name))},t(9,s=""),[d,u,h,C,E,R,$,a,l,s,y,b,F,U,K,L,te,ne,oe,G,we]}class FNe extends uo{constructor(e){super(),co(this,e,LNe,BNe,lo,{field:1,value:0,isCreateMode:2,validationErrors:11,id:3})}}function ume(o){let e,t;return{c(){e=re("div"),t=Ht(o[2]),Z(e,"class","invalid-feedback d-block")},m(s,a){Te(s,e,a),X(e,t)},p(s,a){a&4&&Fn(t,s[2])},d(s){s&&ke(e)}}}function QNe(o){let e,t,s,a,l;function u(b){o[7](b)}let d={additionalConfig:o[3],schema:o[1]};o[0]!==void 0&&(d.value=o[0]),t=new b1e({props:d}),Ro.push(()=>er(t,"value",u));let h=o[2]&&ume(o);return{c(){e=re("div"),en(t.$$.fragment),a=Ze(),h&&h.c(),Z(e,"class","mb-0")},m(b,y){Te(b,e,y),Kt(t,e,null),X(e,a),h&&h.m(e,null),l=!0},p(b,[y]){const C={};y&2&&(C.schema=b[1]),!s&&y&1&&(s=!0,C.value=b[0],lr(()=>s=!1)),t.$set(C),b[2]?h?h.p(b,y):(h=ume(b),h.c(),h.m(e,null)):h&&(h.d(1),h=null)},i(b){l||(xe(t.$$.fragment,b),l=!0)},o(b){Be(t.$$.fragment,b),l=!1},d(b){b&&ke(e),Jt(t),h&&h.d()}}}function ZNe(o,e,t){let s,{value:a}=e,{field:l}=e,{isCreateMode:u}=e,{schema:d}=e,{validationErrors:h}=e,b={readonly:l.readonly&&!u};function y(C){a=C,t(0,a)}return o.$$set=C=>{"value"in C&&t(0,a=C.value),"field"in C&&t(4,l=C.field),"isCreateMode"in C&&t(5,u=C.isCreateMode),"schema"in C&&t(1,d=C.schema),"validationErrors"in C&&t(6,h=C.validationErrors)},o.$$.update=()=>{o.$$.dirty&80&&t(2,s=Lm(h,l.name))},[a,d,s,b,l,u,h,y]}class HNe extends uo{constructor(e){super(),co(this,e,ZNe,QNe,lo,{value:0,field:4,isCreateMode:5,schema:1,validationErrors:6})}}const zNe=SE({String:yt.string,Number:yt.number,"True False":yt.bool,PropertyName:yt.propertyName,Null:yt.null,",":yt.separator,"[ ]":yt.squareBracket,"{ }":yt.brace}),VNe=vE.deserialize({version:14,states:"$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#CjOOQO'#Cp'#CpQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CrOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59U,59UO!iQPO,59UOVQPO,59QOqQPO'#CkO!nQPO,59^OOQO1G.k1G.kOVQPO'#ClO!vQPO,59aOOQO1G.p1G.pOOQO1G.l1G.lOOQO,59V,59VOOQO-E6i-E6iOOQO,59W,59WOOQO-E6j-E6j",stateData:"#O~OcOS~OQSORSOSSOTSOWQO]ROePO~OVXOeUO~O[[O~PVOg^O~Oh_OVfX~OVaO~OhbO[iX~O[dO~Oh_OVfa~OhbO[ia~O",goto:"!kjPPPPPPkPPkqwPPk{!RPPP!XP!ePP!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",nodeNames:"\u26A0 JsonText True False Null Number String } { Object Property PropertyName ] [ Array",maxTerm:25,nodeProps:[["openedBy",7,"{",12,"["],["closedBy",8,"}",13,"]"]],propSources:[zNe],skippedNodes:[0],repeatNodeCount:2,tokenData:"(|~RaXY!WYZ!W]^!Wpq!Wrs!]|}$u}!O$z!Q!R%T!R![&c![!]&t!}#O&y#P#Q'O#Y#Z'T#b#c'r#h#i(Z#o#p(r#q#r(w~!]Oc~~!`Wpq!]qr!]rs!xs#O!]#O#P!}#P;'S!];'S;=`$o<%lO!]~!}Oe~~#QXrs!]!P!Q!]#O#P!]#U#V!]#Y#Z!]#b#c!]#f#g!]#h#i!]#i#j#m~#pR!Q![#y!c!i#y#T#Z#y~#|R!Q![$V!c!i$V#T#Z$V~$YR!Q![$c!c!i$c#T#Z$c~$fR!Q![!]!c!i!]#T#Z!]~$rP;=`<%l!]~$zOh~~$}Q!Q!R%T!R![&c~%YRT~!O!P%c!g!h%w#X#Y%w~%fP!Q![%i~%nRT~!Q![%i!g!h%w#X#Y%w~%zR{|&T}!O&T!Q![&Z~&WP!Q![&Z~&`PT~!Q![&Z~&hST~!O!P%c!Q![&c!g!h%w#X#Y%w~&yOg~~'OO]~~'TO[~~'WP#T#U'Z~'^P#`#a'a~'dP#g#h'g~'jP#X#Y'm~'rOR~~'uP#i#j'x~'{P#`#a(O~(RP#`#a(U~(ZOS~~(^P#f#g(a~(dP#i#j(g~(jP#X#Y(m~(rOQ~~(wOW~~(|OV~",tokenizers:[0],topRules:{JsonText:[0,1]},tokenPrec:0}),WNe=()=>o=>{try{JSON.parse(o.state.doc.toString())}catch(e){if(!(e instanceof SyntaxError))throw e;const t=UNe(e,o.state.doc);return[{from:t,message:e.message,severity:"error",to:t}]}return[]};function UNe(o,e){let t;return(t=o.message.match(/at position (\d+)/))?Math.min(+t[1],e.length):(t=o.message.match(/at line (\d+) column (\d+)/))?Math.min(e.line(+t[1]).from+ +t[2]-1,e.length):0}const YNe=pE.define({name:"json",parser:VNe.configure({props:[GD.add({Object:SD({except:/^\s*\}/}),Array:SD({except:/^\s*\]/})}),KD.add({"Object Array":Dre})]}),languageData:{closeBrackets:{brackets:["[","{",'"']},indentOnInput:/^\s*[\}\]]$/}});function fme(){return new $D(YNe)}function XNe(o){let e,t;return{c(){e=re("div"),Z(e,"class",t="is-editable-"+o[0])},m(s,a){Te(s,e,a),o[3](e)},p(s,[a]){a&1&&t!==(t="is-editable-"+s[0])&&Z(e,"class",t)},i:un,o:un,d(s){s&&ke(e),o[3](null)}}}function jNe(o,e,t){let s,a,{value:l}=e,{editable:u=!0}=e;W1(()=>{let h=new DC,b=new DC,y=ra.create({doc:JSON.stringify(l,null,4),extensions:[Rz,wE.of([W0e]),h.of(fme()),fme(),b.of(ra.tabSize.of(4)),M5e(),Rz,is.editable.of(u),is.updateListener.of(function(C){C.docChanged&&t(2,l=C.state.doc.toString())}),S5e(WNe())]});a=new is({state:y,parent:s})}),ore(()=>{a&&a.destroy()});function d(h){Ro[h?"unshift":"push"](()=>{s=h,t(1,s)})}return o.$$set=h=>{"value"in h&&t(2,l=h.value),"editable"in h&&t(0,u=h.editable)},[u,s,l,d]}class qNe extends uo{constructor(e){super(),co(this,e,jNe,XNe,lo,{value:2,editable:0})}}function dme(o){let e,t;return{c(){e=re("div"),t=Ht(o[3]),Z(e,"class","invalid-feedback d-block")},m(s,a){Te(s,e,a),X(e,t)},p(s,a){a&8&&Fn(t,s[3])},d(s){s&&ke(e)}}}function GNe(o){let e,t,s,a,l;function u(b){o[5](b)}let d={editable:!o[1].readonly||o[2]};o[0]!==void 0&&(d.value=o[0]),t=new qNe({props:d}),Ro.push(()=>er(t,"value",u));let h=o[3]&&dme(o);return{c(){e=re("div"),en(t.$$.fragment),a=Ze(),h&&h.c(),Z(e,"class","mb-3")},m(b,y){Te(b,e,y),Kt(t,e,null),X(e,a),h&&h.m(e,null),l=!0},p(b,[y]){const C={};y&6&&(C.editable=!b[1].readonly||b[2]),!s&&y&1&&(s=!0,C.value=b[0],lr(()=>s=!1)),t.$set(C),b[3]?h?h.p(b,y):(h=dme(b),h.c(),h.m(e,null)):h&&(h.d(1),h=null)},i(b){l||(xe(t.$$.fragment,b),l=!0)},o(b){Be(t.$$.fragment,b),l=!1},d(b){b&&ke(e),Jt(t),h&&h.d()}}}function KNe(o,e,t){let s,{value:a}=e,{field:l}=e,{isCreateMode:u}=e,{validationErrors:d}=e;function h(b){a=b,t(0,a)}return o.$$set=b=>{"value"in b&&t(0,a=b.value),"field"in b&&t(1,l=b.field),"isCreateMode"in b&&t(2,u=b.isCreateMode),"validationErrors"in b&&t(4,d=b.validationErrors)},o.$$.update=()=>{o.$$.dirty&18&&t(3,s=Lm(d,l.name))},[a,l,u,s,d,h]}class JNe extends uo{constructor(e){super(),co(this,e,KNe,GNe,lo,{value:0,field:1,isCreateMode:2,validationErrors:4})}}function hme(o){let e,t;return{c(){e=re("div"),t=Ht(o[3]),Z(e,"class","invalid-feedback d-block")},m(s,a){Te(s,e,a),X(e,t)},p(s,a){a&8&&Fn(t,s[3])},d(s){s&&ke(e)}}}function e6e(o){let e,t,s,a,l;function u(b){o[5](b)}let d={editable:!o[1].readonly||o[2]};o[0]!==void 0&&(d.value=o[0]),t=new $Oe({props:d}),Ro.push(()=>er(t,"value",u));let h=o[3]&&hme(o);return{c(){e=re("div"),en(t.$$.fragment),a=Ze(),h&&h.c(),Z(e,"class","mb-3")},m(b,y){Te(b,e,y),Kt(t,e,null),X(e,a),h&&h.m(e,null),l=!0},p(b,[y]){const C={};y&6&&(C.editable=!b[1].readonly||b[2]),!s&&y&1&&(s=!0,C.value=b[0],lr(()=>s=!1)),t.$set(C),b[3]?h?h.p(b,y):(h=hme(b),h.c(),h.m(e,null)):h&&(h.d(1),h=null)},i(b){l||(xe(t.$$.fragment,b),l=!0)},o(b){Be(t.$$.fragment,b),l=!1},d(b){b&&ke(e),Jt(t),h&&h.d()}}}function t6e(o,e,t){let s,{value:a}=e,{field:l}=e,{isCreateMode:u}=e,{validationErrors:d}=e;function h(b){a=b,t(0,a)}return o.$$set=b=>{"value"in b&&t(0,a=b.value),"field"in b&&t(1,l=b.field),"isCreateMode"in b&&t(2,u=b.isCreateMode),"validationErrors"in b&&t(4,d=b.validationErrors)},o.$$.update=()=>{o.$$.dirty&18&&t(3,s=Lm(d,l.name))},[a,l,u,s,d,h]}class n6e extends uo{constructor(e){super(),co(this,e,t6e,e6e,lo,{value:0,field:1,isCreateMode:2,validationErrors:4})}}function mme(o){let e,t=o[0].help+"",s;return{c(){e=re("small"),s=Ht(t),Z(e,"class","text-primary opacity-50")},m(a,l){Te(a,e,l),X(e,s)},p(a,l){l&1&&t!==(t=a[0].help+"")&&Fn(s,t)},d(a){a&&ke(e)}}}function o6e(o){let e,t,s,a,l=o[0].label+"",u,d,h,b,y,C=o[0].name+"",E,R=o[0].help&&mme(o);return{c(){e=re("div"),t=re("div"),s=re("div"),a=re("label"),u=Ht(l),d=Ze(),R&&R.c(),h=Ze(),b=re("span"),y=re("code"),E=Ht(C),Z(a,"for",o[1]),Z(a,"class","form-label"),Z(y,"class","text-primary opacity-50"),Z(b,"tabindex","-1"),Z(b,"class","text-decoration-none"),Z(t,"class","d-flex justify-content-between"),Z(e,"class","mb-1")},m($,Q){Te($,e,Q),X(e,t),X(t,s),X(s,a),X(a,u),X(s,d),R&&R.m(s,null),X(t,h),X(t,b),X(b,y),X(y,E)},p($,[Q]){Q&1&&l!==(l=$[0].label+"")&&Fn(u,l),Q&2&&Z(a,"for",$[1]),$[0].help?R?R.p($,Q):(R=mme($),R.c(),R.m(s,null)):R&&(R.d(1),R=null),Q&1&&C!==(C=$[0].name+"")&&Fn(E,C)},i:un,o:un,d($){$&&ke(e),R&&R.d()}}}function s6e(o,e,t){let{field:s}=e,{id:a}=e;return o.$$set=l=>{"field"in l&&t(0,s=l.field),"id"in l&&t(1,a=l.id)},[s,a]}class r6e extends uo{constructor(e){super(),co(this,e,s6e,o6e,lo,{field:0,id:1})}}function gme(o,e,t){const s=o.slice();return s[2]=e[t],s[19]=t,s}function pme(o,e,t){const s=o.slice();return s[1]=e[t],s[19]=t,s}function bme(o,e,t){const s=o.slice();return s[1]=e[t],s}function vme(o){let e,t;return{c(){e=re("div"),t=Ht(o[5]),Z(e,"class","invalid-feedback d-block mb-3")},m(s,a){Te(s,e,a),X(e,t)},p(s,a){a&32&&Fn(t,s[5])},d(s){s&&ke(e)}}}function Ome(o){let e,t,s,a,l,u,d,h,b,y,C,E=o[3],R=[];for(let $=0;$Be(oe[Oe],1,1,()=>{oe[Oe]=null});$=new Fa({props:{icon:"trash-can"}});function we(...Oe){return e[15](e[2],...Oe)}let ve=e[4].length>30&&e[19]>0&&_me(e),Re=e[4].length>30&&e[19]+130&&e[19]>0?ve?(ve.p(e,ce),ce&16&&xe(ve,1)):(ve=_me(e),ve.c(),xe(ve,1),ve.m(E,F)):ve&&(mo(),Be(ve,1,1,()=>{ve=null}),go()),e[4].length>30&&e[19]+1{Re=null}),go())},i(Oe){if(!K){for(let ce=0;ced[2].id;for(let d=0;d0&&Ome(o);return{c(){d&&d.c(),e=Ze(),t=re("div"),en(s.$$.fragment),a=Ze(),h&&h.c(),l=Rs(),Z(t,"class","inline-card-wrapper")},m(b,y){d&&d.m(b,y),Te(b,e,y),Te(b,t,y),Kt(s,t,null),Te(b,a,y),h&&h.m(b,y),Te(b,l,y),u=!0},p(b,[y]){b[5]?d?d.p(b,y):(d=vme(b),d.c(),d.m(e.parentNode,e)):d&&(d.d(1),d=null),b[4].length>0?h?(h.p(b,y),y&16&&xe(h,1)):(h=Ome(b),h.c(),xe(h,1),h.m(l.parentNode,l)):h&&(mo(),Be(h,1,1,()=>{h=null}),go())},i(b){u||(xe(s.$$.fragment,b),xe(h),u=!0)},o(b){Be(s.$$.fragment,b),Be(h),u=!1},d(b){d&&d.d(b),b&&ke(e),b&&ke(t),Jt(s),b&&ke(a),h&&h.d(b),b&&ke(l)}}}function l6e(o,e,t){let s,a,l;const u=Ur("channel");let{field:d}=e,{record:h}=e,{graph:b}=e,{validationErrors:y}=e,C=u.schemas.filter(ne=>d.collections.includes(ne.name)),E=u.schemas.filter(ne=>d.collections.includes(ne.name))[0];function R(ne,oe){ne.preventDefault(),t(0,b.edges=b.edges.filter(G=>!(G.source===h.id&&G.target===oe&&G.field===d.name)),b)}function $(ne,oe){ne.preventDefault();let G=b.edges.find(we=>we.source===h.id&&we.target===oe&&we.field===d.name);R(ne,oe),t(0,b.edges=[G,...b.edges],b)}function Q(ne,oe){ne.preventDefault();let G=b.edges.find(we=>we.source===h.id&&we.target===oe&&we.field===d.name);R(ne,oe),t(0,b.edges=[...b.edges,G],b)}function F(ne){t(0,b.edges=qD(ne.detail.source,ne.detail.target,b.edges,d.name,a),b)}function U(ne){ne.preventDefault(),t(0,b=K6(b,h,ne.detail.records,d.name,ne.detail.action))}const K=(ne,oe)=>R(oe,ne.id),L=(ne,oe)=>$(oe,ne.id),te=(ne,oe)=>Q(oe,ne.id);return o.$$set=ne=>{"field"in ne&&t(1,d=ne.field),"record"in ne&&t(2,h=ne.record),"graph"in ne&&t(0,b=ne.graph),"validationErrors"in ne&&t(14,y=ne.validationErrors)},o.$$.update=()=>{var ne;o.$$.dirty&16386&&t(5,s=Lm(y,d.name)),o.$$.dirty&7&&t(4,a=(ne=b.edges.filter(oe=>oe.field===d.name).map(oe=>b.records.find(G=>G.id===oe.target&&h.id===oe.source)).filter(oe=>!!(oe!=null&&oe.id)))!=null?ne:[])},t(3,l=[]),[b,d,h,l,a,s,u,C,E,R,$,Q,F,U,y,K,L,te]}class c6e extends uo{constructor(e){super(),co(this,e,l6e,a6e,lo,{field:1,record:2,graph:0,validationErrors:14})}}function kme(o,e,t){const s=o.slice();return s[2]=e[t],s}function xme(o,e,t){const s=o.slice();return s[22]=e[t],s}function Tme(o){let e,t;return{c(){e=re("div"),t=Ht(o[6]),Z(e,"class","invalid-feedback d-block mb-3")},m(s,a){Te(s,e,a),X(e,t)},p(s,a){a&64&&Fn(t,s[6])},d(s){s&&ke(e)}}}function Eme(o){let e=[],t=new Map,s,a=o[4];const l=d=>d[22].id;for(let d=0;du[2].id;for(let u=0;u0&&Mme(o);return{c(){E&&E.c(),e=Ze(),t=re("input"),l=Ze(),u=re("div"),R&&R.c(),d=Ze(),$&&$.c(),h=Ze(),Q&&Q.c(),b=Rs(),Z(t,"type","search"),Z(t,"id",o[1]),Z(t,"class","form-control dropdown-toggle"),Z(t,"placeholder",s="Search for "+o[0].label),Z(t,"data-bs-toggle","dropdown"),Z(t,"autocomplete","off"),t.readOnly=a=o[0].readonly&&!isCreateMode,Vo(t,"is-invalid",o[6]),Z(u,"class","dropdown-menu w-100")},m(F,U){E&&E.m(F,U),Te(F,e,U),Te(F,t,U),ar(t,o[3]),Te(F,l,U),Te(F,u,U),R&&R.m(u,null),X(u,d),$&&$.m(u,null),Te(F,h,U),Q&&Q.m(F,U),Te(F,b,U),y||(C=[mn(t,"keyup",o[11]),mn(t,"input",o[14])],y=!0)},p(F,[U]){F[6]?E?E.p(F,U):(E=Tme(F),E.c(),E.m(e.parentNode,e)):E&&(E.d(1),E=null),U&2&&Z(t,"id",F[1]),U&1&&s!==(s="Search for "+F[0].label)&&Z(t,"placeholder",s),U&1&&a!==(a=F[0].readonly&&!isCreateMode)&&(t.readOnly=a),U&8&&t.value!==F[3]&&ar(t,F[3]),U&64&&Vo(t,"is-invalid",F[6]),F[4]?R?R.p(F,U):(R=Eme(F),R.c(),R.m(u,d)):R&&(R.d(1),R=null),F[3]?$?$.p(F,U):($=Pme(F),$.c(),$.m(u,null)):$&&($.d(1),$=null),F[5].length>0?Q?Q.p(F,U):(Q=Mme(F),Q.c(),Q.m(b.parentNode,b)):Q&&(Q.d(1),Q=null)},i:un,o:un,d(F){E&&E.d(F),F&&ke(e),F&&ke(t),F&&ke(l),F&&ke(u),R&&R.d(),$&&$.d(),F&&ke(h),Q&&Q.d(F),F&&ke(b),y=!1,vi(C)}}}function f6e(o,e,t){let s,a,l;const u=Ur("channel");let{field:d}=e,{id:h}=e,{record:b}=e,{graph:y}=e,{validationErrors:C}=e,E="";function R(G,we){G.preventDefault(),t(12,y.edges=y.edges.filter(ve=>!(ve.target===we&&ve.field===d.name)),y)}function $(G,we){G.preventDefault(),axios.post(u.lucentUrl+"/records",{isCreateMode:!0,record:{schema:d.collections[0],status:"published",data:{[d.searchField]:we}}}).then(ve=>{t(4,l=[]),Q(G,ve.data.records[0]),console.log(ve)}).catch(ve=>{t(4,l=[]),console.log(ve)})}function Q(G,we){G.preventDefault(),t(12,y=K6(y,b,[we],d.name,G.detail.action))}const F=Lc.exports.debounce(G=>{axios.get(u.lucentUrl+"/records/suggestions",{params:{schema:d.collections[0],field:d.searchField,value:E,ui:"text"}}).then(we=>{t(4,l=we.data)}).catch(we=>{t(4,l=[]),console.log(we)})},500);function U(){E=this.value,t(3,E)}const K=(G,we)=>Q(we,G),L=(G,we)=>Q(we,G),te=G=>$(G,E),ne=G=>$(G,E),oe=(G,we)=>R(we,G.id);return o.$$set=G=>{"field"in G&&t(0,d=G.field),"id"in G&&t(1,h=G.id),"record"in G&&t(2,b=G.record),"graph"in G&&t(12,y=G.graph),"validationErrors"in G&&t(13,C=G.validationErrors)},o.$$.update=()=>{var G;o.$$.dirty&8193&&t(6,s=Lm(C,d.name)),o.$$.dirty&4101&&t(5,a=(G=y.edges.filter(we=>we.field===d.name).map(we=>y.records.find(ve=>ve.id==we.target&&b.id==we.source)).filter(we=>!!(we!=null&&we.id)))!=null?G:[])},t(4,l=[]),[d,h,b,E,l,a,s,u,R,$,Q,F,y,C,U,K,L,te,ne,oe]}class d6e extends uo{constructor(e){super(),co(this,e,f6e,u6e,lo,{field:0,id:1,record:2,graph:12,validationErrors:13})}}function h6e(o){let e,t,s,a;function l(h){o[19](h)}var u=o[7];function d(h){let b={schema:h[3],field:h[2],validationErrors:h[5],isCreateMode:h[6],id:h[8]};return h[0][h[2].name]!==void 0&&(b.value=h[0][h[2].name]),{props:b}}return u&&(e=EC(u,d(o)),Ro.push(()=>er(e,"value",l))),{c(){e&&en(e.$$.fragment),s=Rs()},m(h,b){e&&Kt(e,h,b),Te(h,s,b),a=!0},p(h,b){const y={};if(b&8&&(y.schema=h[3]),b&4&&(y.field=h[2]),b&32&&(y.validationErrors=h[5]),b&64&&(y.isCreateMode=h[6]),!t&&b&5&&(t=!0,y.value=h[0][h[2].name],lr(()=>t=!1)),u!==(u=h[7])){if(e){mo();const C=e;Be(C.$$.fragment,1,0,()=>{Jt(C,1)}),go()}u?(e=EC(u,d(h)),Ro.push(()=>er(e,"value",l)),en(e.$$.fragment),xe(e.$$.fragment,1),Kt(e,s.parentNode,s)):e=null}else u&&e.$set(y)},i(h){a||(e&&xe(e.$$.fragment,h),a=!0)},o(h){e&&Be(e.$$.fragment,h),a=!1},d(h){h&&ke(s),e&&Jt(e,h)}}}function m6e(o){let e,t,s;function a(u){o[18](u)}let l={field:o[2],validationErrors:o[5],isCreateMode:o[6],id:o[8]};return o[0][o[2].name]!==void 0&&(l.value=o[0][o[2].name]),e=new BOe({props:l}),Ro.push(()=>er(e,"value",a)),{c(){en(e.$$.fragment)},m(u,d){Kt(e,u,d),s=!0},p(u,d){const h={};d&4&&(h.field=u[2]),d&32&&(h.validationErrors=u[5]),d&64&&(h.isCreateMode=u[6]),!t&&d&5&&(t=!0,h.value=u[0][u[2].name],lr(()=>t=!1)),e.$set(h)},i(u){s||(xe(e.$$.fragment,u),s=!0)},o(u){Be(e.$$.fragment,u),s=!1},d(u){Jt(e,u)}}}function g6e(o){let e,t,s;function a(u){o[17](u)}let l={field:o[2],id:o[8],validationErrors:o[5],isCreateMode:o[6]};return o[0][o[2].name]!==void 0&&(l.value=o[0][o[2].name]),e=new Ype({props:l}),Ro.push(()=>er(e,"value",a)),{c(){en(e.$$.fragment)},m(u,d){Kt(e,u,d),s=!0},p(u,d){const h={};d&4&&(h.field=u[2]),d&32&&(h.validationErrors=u[5]),d&64&&(h.isCreateMode=u[6]),!t&&d&5&&(t=!0,h.value=u[0][u[2].name],lr(()=>t=!1)),e.$set(h)},i(u){s||(xe(e.$$.fragment,u),s=!0)},o(u){Be(e.$$.fragment,u),s=!1},d(u){Jt(e,u)}}}function p6e(o){let e,t,s;function a(u){o[16](u)}let l={field:o[2],id:o[8],validationErrors:o[5],isCreateMode:o[6]};return o[0][o[2].name]!==void 0&&(l.value=o[0][o[2].name]),e=new Upe({props:l}),Ro.push(()=>er(e,"value",a)),{c(){en(e.$$.fragment)},m(u,d){Kt(e,u,d),s=!0},p(u,d){const h={};d&4&&(h.field=u[2]),d&32&&(h.validationErrors=u[5]),d&64&&(h.isCreateMode=u[6]),!t&&d&5&&(t=!0,h.value=u[0][u[2].name],lr(()=>t=!1)),e.$set(h)},i(u){s||(xe(e.$$.fragment,u),s=!0)},o(u){Be(e.$$.fragment,u),s=!1},d(u){Jt(e,u)}}}function b6e(o){let e,t,s,a;function l(h){o[14](h)}function u(h){o[15](h)}let d={record:o[4],id:o[8],field:o[2],validationErrors:o[5]};return o[1]!==void 0&&(d.graph=o[1]),o[0][o[2].name]!==void 0&&(d.value=o[0][o[2].name]),e=new W$e({props:d}),Ro.push(()=>er(e,"graph",l)),Ro.push(()=>er(e,"value",u)),{c(){en(e.$$.fragment)},m(h,b){Kt(e,h,b),a=!0},p(h,b){const y={};b&16&&(y.record=h[4]),b&4&&(y.field=h[2]),b&32&&(y.validationErrors=h[5]),!t&&b&2&&(t=!0,y.graph=h[1],lr(()=>t=!1)),!s&&b&5&&(s=!0,y.value=h[0][h[2].name],lr(()=>s=!1)),e.$set(y)},i(h){a||(xe(e.$$.fragment,h),a=!0)},o(h){Be(e.$$.fragment,h),a=!1},d(h){Jt(e,h)}}}function v6e(o){let e,t,s;function a(u){o[13](u)}let l={record:o[4],field:o[2],validationErrors:o[5]};return o[1]!==void 0&&(l.graph=o[1]),e=new MNe({props:l}),Ro.push(()=>er(e,"graph",a)),{c(){en(e.$$.fragment)},m(u,d){Kt(e,u,d),s=!0},p(u,d){const h={};d&16&&(h.record=u[4]),d&4&&(h.field=u[2]),d&32&&(h.validationErrors=u[5]),!t&&d&2&&(t=!0,h.graph=u[1],lr(()=>t=!1)),e.$set(h)},i(u){s||(xe(e.$$.fragment,u),s=!0)},o(u){Be(e.$$.fragment,u),s=!1},d(u){Jt(e,u)}}}function O6e(o){let e,t,s;function a(u){o[12](u)}let l={id:o[8],record:o[4],field:o[2],validationErrors:o[5]};return o[1]!==void 0&&(l.graph=o[1]),e=new fTe({props:l}),Ro.push(()=>er(e,"graph",a)),{c(){en(e.$$.fragment)},m(u,d){Kt(e,u,d),s=!0},p(u,d){const h={};d&16&&(h.record=u[4]),d&4&&(h.field=u[2]),d&32&&(h.validationErrors=u[5]),!t&&d&2&&(t=!0,h.graph=u[1],lr(()=>t=!1)),e.$set(h)},i(u){s||(xe(e.$$.fragment,u),s=!0)},o(u){Be(e.$$.fragment,u),s=!1},d(u){Jt(e,u)}}}function y6e(o){let e,t,s;function a(u){o[11](u)}let l={id:o[8],record:o[4],field:o[2],validationErrors:o[5]};return o[1]!==void 0&&(l.graph=o[1]),e=new d6e({props:l}),Ro.push(()=>er(e,"graph",a)),{c(){en(e.$$.fragment)},m(u,d){Kt(e,u,d),s=!0},p(u,d){const h={};d&16&&(h.record=u[4]),d&4&&(h.field=u[2]),d&32&&(h.validationErrors=u[5]),!t&&d&2&&(t=!0,h.graph=u[1],lr(()=>t=!1)),e.$set(h)},i(u){s||(xe(e.$$.fragment,u),s=!0)},o(u){Be(e.$$.fragment,u),s=!1},d(u){Jt(e,u)}}}function w6e(o){let e,t,s;function a(u){o[10](u)}let l={id:o[8],record:o[4],field:o[2],validationErrors:o[5]};return o[1]!==void 0&&(l.graph=o[1]),e=new c6e({props:l}),Ro.push(()=>er(e,"graph",a)),{c(){en(e.$$.fragment)},m(u,d){Kt(e,u,d),s=!0},p(u,d){const h={};d&16&&(h.record=u[4]),d&4&&(h.field=u[2]),d&32&&(h.validationErrors=u[5]),!t&&d&2&&(t=!0,h.graph=u[1],lr(()=>t=!1)),e.$set(h)},i(u){s||(xe(e.$$.fragment,u),s=!0)},o(u){Be(e.$$.fragment,u),s=!1},d(u){Jt(e,u)}}}function _6e(o){let e,t,s;function a(u){o[9](u)}let l={record:o[4],field:o[2],validationErrors:o[5]};return o[1]!==void 0&&(l.graph=o[1]),e=new xTe({props:l}),Ro.push(()=>er(e,"graph",a)),{c(){en(e.$$.fragment)},m(u,d){Kt(e,u,d),s=!0},p(u,d){const h={};d&16&&(h.record=u[4]),d&4&&(h.field=u[2]),d&32&&(h.validationErrors=u[5]),!t&&d&2&&(t=!0,h.graph=u[1],lr(()=>t=!1)),e.$set(h)},i(u){s||(xe(e.$$.fragment,u),s=!0)},o(u){Be(e.$$.fragment,u),s=!1},d(u){Jt(e,u)}}}function S6e(o){let e,t,s,a,l,u;t=new r6e({props:{schema:o[3],field:o[2],id:o[8]}});const d=[_6e,w6e,y6e,O6e,v6e,b6e,p6e,g6e,m6e,h6e],h=[];function b(y,C){return y[2].info.name==="reference"&&y[2].layout==="inline"?0:y[2].info.name==="reference"&&y[2].layout==="table"?1:y[2].info.name==="reference"&&y[2].layout==="tags"?2:y[2].info.name==="reference"?3:y[2].info.name==="file"?4:y[2].info.name==="block"?5:y[2].info.name==="text"?6:y[2].info.name==="slug"?7:y[2].info.name==="textarea"?8:9}return a=b(o),l=h[a]=d[a](o),{c(){e=re("div"),en(t.$$.fragment),s=Ze(),l.c(),Z(e,"class","card editor-field")},m(y,C){Te(y,e,C),Kt(t,e,null),X(e,s),h[a].m(e,null),u=!0},p(y,[C]){const E={};C&8&&(E.schema=y[3]),C&4&&(E.field=y[2]),t.$set(E);let R=a;a=b(y),a===R?h[a].p(y,C):(mo(),Be(h[R],1,1,()=>{h[R]=null}),go(),l=h[a],l?l.p(y,C):(l=h[a]=d[a](y),l.c()),xe(l,1),l.m(e,null))},i(y){u||(xe(t.$$.fragment,y),xe(l),u=!0)},o(y){Be(t.$$.fragment,y),Be(l),u=!1},d(y){y&&ke(e),Jt(t),h[a].d()}}}function C6e(o,e,t){const s={text:Upe,slug:Ype,textarea:BOe,rich:HNe,color:X$e,checkbox:G$e,number:nNe,url:rNe,date:pNe,datetime:FNe,uuid:xNe,json:JNe,markdown:n6e};let{field:a}=e,{data:l}=e,{schema:u}=e,{record:d}=e,{graph:h}=e,{validationErrors:b}=e,{isCreateMode:y}=e,C=s[a.info.name];const E=`field-${a.name}-${d.id}`;function R(we){h=we,t(1,h)}function $(we){h=we,t(1,h)}function Q(we){h=we,t(1,h)}function F(we){h=we,t(1,h)}function U(we){h=we,t(1,h)}function K(we){h=we,t(1,h)}function L(we){o.$$.not_equal(l[a.name],we)&&(l[a.name]=we,t(0,l))}function te(we){o.$$.not_equal(l[a.name],we)&&(l[a.name]=we,t(0,l))}function ne(we){o.$$.not_equal(l[a.name],we)&&(l[a.name]=we,t(0,l))}function oe(we){o.$$.not_equal(l[a.name],we)&&(l[a.name]=we,t(0,l))}function G(we){o.$$.not_equal(l[a.name],we)&&(l[a.name]=we,t(0,l))}return o.$$set=we=>{"field"in we&&t(2,a=we.field),"data"in we&&t(0,l=we.data),"schema"in we&&t(3,u=we.schema),"record"in we&&t(4,d=we.record),"graph"in we&&t(1,h=we.graph),"validationErrors"in we&&t(5,b=we.validationErrors),"isCreateMode"in we&&t(6,y=we.isCreateMode)},[l,h,a,u,d,b,y,C,E,R,$,Q,F,U,K,L,te,ne,oe,G]}class LOe extends uo{constructor(e){super(),co(this,e,C6e,S6e,lo,{field:2,data:0,schema:3,record:4,graph:1,validationErrors:5,isCreateMode:6})}}function $me(o,e,t){const s=o.slice();return s[5]=e[t][0],s[6]=e[t][1],s}function Nme(o,e,t){const s=o.slice();return s[9]=e[t],s}function Ime(o,e,t){const s=o.slice();return s[5]=e[t][0],s[6]=e[t][1],s}function Bme(o,e,t){const s=o.slice();return s[9]=e[t],s}function k6e(o){let e,t,s;return t=new G6({props:{graph:o[0],record:o[9]}}),{c(){e=re("div"),en(t.$$.fragment),Z(e,"class","ms-2 mb-2")},m(a,l){Te(a,e,l),Kt(t,e,null),s=!0},p(a,l){const u={};l&1&&(u.graph=a[0]),t.$set(u)},i(a){s||(xe(t.$$.fragment,a),s=!0)},o(a){Be(t.$$.fragment,a),s=!1},d(a){a&&ke(e),Jt(t)}}}function x6e(o){let e,t,s;return t=new Xw({props:{record:o[9],size:"small"}}),{c(){e=re("div"),en(t.$$.fragment),Z(e,"class","ms-2 mb-2"),rs(e,"max-height","64px")},m(a,l){Te(a,e,l),Kt(t,e,null),s=!0},p:un,i(a){s||(xe(t.$$.fragment,a),s=!0)},o(a){Be(t.$$.fragment,a),s=!1},d(a){a&&ke(e),Jt(t)}}}function Lme(o){let e,t,s,a;const l=[x6e,k6e],u=[];function d(h,b){var y;return(y=h[9]._file)!=null&&y.path?0:1}return e=d(o),t=u[e]=l[e](o),{c(){t.c(),s=Rs()},m(h,b){u[e].m(h,b),Te(h,s,b),a=!0},p(h,b){t.p(h,b)},i(h){a||(xe(t),a=!0)},o(h){Be(t),a=!1},d(h){u[e].d(h),h&&ke(s)}}}function Fme(o){let e,t,s,a=o[6].schema.label+"",l,u,d,h,b,y=o[6].field.label+"",C,E,R,$;d=new Fa({props:{icon:"angle-right",width:"12",height:"12"}});let Q=o[6].nodes,F=[];for(let K=0;KBe(F[K],1,1,()=>{F[K]=null});return{c(){e=re("div"),t=re("div"),s=re("span"),l=Ht(a),u=Ze(),en(d.$$.fragment),h=Ze(),b=re("span"),C=Ht(y),E=Ze(),R=re("div");for(let K=0;KBe(y[E],1,1,()=>{y[E]=null});return{c(){e=re("div"),t=re("div"),a=Ht(s),l=Ze(),u=re("div");for(let E=0;E0,s,a,l,u,d=Object.entries(o[3]).length>0,h,b,y,C=Object.entries(o[2]),E=[];for(let L=0;LBe(E[L],1,1,()=>{E[L]=null});let $=t&&T6e();l=new J6({props:{graph:o[0],record:o[1]}});let Q=d&&E6e(),F=Object.entries(o[3]),U=[];for(let L=0;LBe(U[L],1,1,()=>{U[L]=null});return{c(){for(let L=0;Lt.name===e)}function M6e(o,e,t){const s=Ur("channel");let{graph:a}=e,{record:l}=e,u=a.parentEdges.filter(h=>h.source!==l.id&&h.depth===1).reduce((h,b)=>{let y=s.schemas.find($=>$.name===b.sourceSchema),C=Hme(y,b.field),E=b.sourceSchema+C,R=a.records.find($=>$.id===b.source);return h[E]||(h[E]={field:C,schema:y,nodes:[]}),R&&(h[E].nodes.push(R),h[E].nodes=Lc.exports.uniqBy(h[E].nodes,"id")),h},{}),d=a.edges.filter(h=>h.source===l.id&&h.depth===1).reduce((h,b)=>{let y=s.schemas.find($=>$.name===l.schema),C=Hme(y,b.field),E=C.name+b.targetSchema;h[E]||(h[E]={field:C,nodes:[]});let R=a.records.find($=>$.id===b.target);return R&&(h[E].nodes.push(R),h[E].nodes=Lc.exports.uniqBy(h[E].nodes,"id")),h},{});return o.$$set=h=>{"graph"in h&&t(0,a=h.graph),"record"in h&&t(1,l=h.record)},[a,l,u,d]}class R6e extends uo{constructor(e){super(),co(this,e,M6e,P6e,lo,{graph:0,record:1})}}function zme(o,e,t){const s=o.slice();return s[4]=e[t],s}function $6e(o){var l;let e,t=((l=JSON.stringify(o[1]))!=null?l:"")+"",s,a;return{c(){e=re("div"),s=Ht(t),Z(e,"class",a=o[3]+" field-content svelte-md34ba")},m(u,d){Te(u,e,d),X(e,s)},p(u,d){var h;d&2&&t!==(t=((h=JSON.stringify(u[1]))!=null?h:"")+"")&&Fn(s,t),d&8&&a!==(a=u[3]+" field-content svelte-md34ba")&&Z(e,"class",a)},i:un,o:un,d(u){u&&ke(e)}}}function N6e(o){var a;let e,t=((a=o[1])!=null?a:"")+"",s;return{c(){e=re("div"),Z(e,"class",s=o[3]+" field-content svelte-md34ba")},m(l,u){Te(l,e,u),e.innerHTML=t},p(l,u){var d;u&2&&t!==(t=((d=l[1])!=null?d:"")+"")&&(e.innerHTML=t),u&8&&s!==(s=l[3]+" field-content svelte-md34ba")&&Z(e,"class",s)},i:un,o:un,d(l){l&&ke(e)}}}function I6e(o){var l;let e,t=((l=JSON.stringify(o[1],null,2))!=null?l:"")+"",s,a;return{c(){e=re("div"),s=Ht(t),Z(e,"class",a=o[3]+" field-content svelte-md34ba"),rs(e,"white-space","break-spaces")},m(u,d){Te(u,e,d),X(e,s)},p(u,d){var h;d&2&&t!==(t=((h=JSON.stringify(u[1],null,2))!=null?h:"")+"")&&Fn(s,t),d&8&&a!==(a=u[3]+" field-content svelte-md34ba")&&Z(e,"class",a)},i:un,o:un,d(u){u&&ke(e)}}}function B6e(o){let e,t,s,a,l=o[2][o[0].name],u=[];for(let h=0;hBe(u[h],1,1,()=>{u[h]=null});return{c(){e=re("div"),t=re("div");for(let h=0;h{u[y]=null}),go(),t=u[e],t?t.p(h,b):(t=u[e]=l[e](h),t.c()),xe(t,1),t.m(s.parentNode,s))},i(h){a||(xe(t),a=!0)},o(h){Be(t),a=!1},d(h){u[e].d(h),h&&ke(s)}}}function Q6e(o){let e,t,s,a,l,u;const d=[B6e,I6e,N6e,$6e],h=[];function b(y,C){return C&1&&(e=null),C&1&&(t=null),e==null&&(e=!!["reference","file"].includes(y[0].info.name)),e?0:(t==null&&(t=!!["json","block"].includes(y[0].info.name)),t?1:y[0].info.name==="rich"?2:3)}return s=b(o,-1),a=h[s]=d[s](o),{c(){a.c(),l=Rs()},m(y,C){h[s].m(y,C),Te(y,l,C),u=!0},p(y,[C]){let E=s;s=b(y,C),s===E?h[s].p(y,C):(mo(),Be(h[E],1,1,()=>{h[E]=null}),go(),a=h[s],a?a.p(y,C):(a=h[s]=d[s](y),a.c()),xe(a,1),a.m(l.parentNode,l))},i(y){u||(xe(a),u=!0)},o(y){Be(a),u=!1},d(y){h[s].d(y),y&&ke(l)}}}function Z6e(o,e,t){let{field:s}=e,{side:a}=e,{edges:l}=e,{colorClass:u}=e;return o.$$set=d=>{"field"in d&&t(0,s=d.field),"side"in d&&t(1,a=d.side),"edges"in d&&t(2,l=d.edges),"colorClass"in d&&t(3,u=d.colorClass)},[s,a,l,u]}class Wme extends uo{constructor(e){super(),co(this,e,Z6e,Q6e,lo,{field:0,side:1,edges:2,colorClass:3})}}function H6e(o){let e,t,s,a=o[0].rank+"",l,u,d,h,b,y=o[0].target+"",C,E;return{c(){e=re("div"),t=re("span"),s=Ht("Rank: "),l=Ht(a),u=Ze(),d=re("span"),d.textContent="id:",h=Ze(),b=re("a"),C=Ht(y),Z(t,"class","me-3"),Z(b,"href",E=o[1].lucentUrl+"/records/"+o[0].target),Z(b,"target","_blank")},m(R,$){Te(R,e,$),X(e,t),X(t,s),X(t,l),X(e,u),X(e,d),X(e,h),X(e,b),X(b,C)},p(R,[$]){$&1&&a!==(a=R[0].rank+"")&&Fn(l,a),$&1&&y!==(y=R[0].target+"")&&Fn(C,y),$&1&&E!==(E=R[1].lucentUrl+"/records/"+R[0].target)&&Z(b,"href",E)},i:un,o:un,d(R){R&&ke(e)}}}function z6e(o,e,t){const s=Ur("channel");let{edge:a}=e;return o.$$set=l=>{"edge"in l&&t(0,a=l.edge)},[a,s]}class FOe extends uo{constructor(e){super(),co(this,e,z6e,H6e,lo,{edge:0})}}function Ume(o,e,t){const s=o.slice();return s[16]=e[t][0],s[17]=e[t][1],s}function Yme(o,e,t){const s=o.slice();return s[20]=e[t],s}function Xme(o,e,t){const s=o.slice();return s[20]=e[t],s}function jme(o,e,t){const s=o.slice();return s[16]=e[t],s}function qme(o,e,t){const s=o.slice();return s[27]=e[t],s}function V6e(o){let e;return{c(){e=re("div"),e.innerHTML="Revisions are not enabled for this Schema",Z(e,"class","card-body")},m(t,s){Te(t,e,s)},p:un,i:un,o:un,d(t){t&&ke(e)}}}function W6e(o){let e,t,s,a,l=o[8],u=[];for(let h=0;hBe(u[h],1,1,()=>{u[h]=null});return{c(){e=re("div"),e.textContent="Revisions",t=Ze();for(let h=0;h{s=null}),go())},i(a){t||(xe(s),t=!0)},o(a){Be(s),t=!1},d(a){s&&s.d(a),a&&ke(e)}}}function Jme(o){let e,t,s,a,l,u,d,h;const b=[Y6e,U6e],y=[];function C(Q,F){return Q[6].length>0?0:1}t=C(o),s=y[t]=b[t](o);let E=Object.entries(o[7]),R=[];for(let Q=0;QBe(R[Q],1,1,()=>{R[Q]=null});return{c(){e=re("div"),s.c(),a=Ze(),l=re("div"),u=re("p"),u.textContent="Record References",d=Ze();for(let Q=0;Q{y[U]=null}),go(),s=y[t],s?s.p(Q,F):(s=y[t]=b[t](Q),s.c()),xe(s,1),s.m(e,a)),F&128){E=Object.entries(Q[7]);let K;for(K=0;KNothing will change",Z(e,"class","lx-card text-center")},m(t,s){Te(t,e,s)},p:un,i:un,o:un,d(t){t&&ke(e)}}}function Y6e(o){let e,t,s,a,l=o[5]._sys.version+"",u,d,h,b,y,C,E,R=o[4]&&ege(o),$=o[6],Q=[];for(let U=0;U<$.length;U+=1)Q[U]=tge(jme(o,$,U));const F=U=>Be(Q[U],1,1,()=>{Q[U]=null});return{c(){e=re("p"),e.textContent="If you choose to rollback to this revision",t=Ze(),s=re("button"),a=Ht("Rollback to version "),u=Ht(l),d=Ze(),R&&R.c(),h=Ze(),b=re("div");for(let U=0;UBe(F[G],1,1,()=>{F[G]=null});let K=null;Q.length||(K=nge());let L=o[17].revision,te=[];for(let G=0;GBe(te[G],1,1,()=>{te[G]=null});let oe=null;return L.length||(oe=sge()),{c(){e=re("div"),t=re("div"),a=Ht(s),l=Ht(":"),u=Ze(),d=re("div"),h=re("p"),h.textContent="Record",b=Ze();for(let G=0;G0?0:1}mt=kt(o),he=as[mt]=Yo[mt](o);let jt=o[5]&&Jme(o);return{c(){e=re("div"),t=re("div"),s=re("div"),a=re("div"),l=re("span"),l.textContent="record id",u=Ze(),d=re("small"),b=Ht(h),y=Ze(),C=re("div"),E=re("span"),E.textContent="current version",R=Ze(),Q=Ht($),F=Ze(),U=re("div"),K=re("span"),K.textContent="created",L=Ze(),en(te.$$.fragment),ne=Ze(),G=Ht(oe),we=Ze(),ve=re("div"),Re=re("span"),Re.textContent="updated",Oe=Ze(),en(ce.$$.fragment),Xe=Ze(),ot=Ht(tt),V=Ze(),ut=re("div"),Qe=re("span"),Qe.textContent="Rules for this schema",Bt=Ze(),Ct=re("small"),He=Ht("Each record maintains the last "),rn=Ht(st),Et=Ht(` versions`),Cn=Ze(),je=re("div"),he.c(),Zo=Ze(),Kn=re("div"),jt&&jt.c(),Z(l,"class","label text-end text-muted svelte-4o2asb"),Z(E,"class","label text-end text-muted svelte-4o2asb"),Z(K,"class","label text-end text-muted svelte-4o2asb"),Z(Re,"class","label text-end text-muted svelte-4o2asb"),Z(s,"class","col-8"),Z(Qe,"class","label d-block text-muted svelte-4o2asb"),Z(ut,"class","col-4"),Z(t,"class","row"),Z(e,"class","lx-card "),Z(je,"class","lx-card mt-4")},m(pt,Ne){Te(pt,e,Ne),X(e,t),X(t,s),X(s,a),X(a,l),X(a,u),X(a,d),X(d,b),X(s,y),X(s,C),X(C,E),X(C,R),X(C,Q),X(s,F),X(s,U),X(U,K),X(U,L),Kt(te,U,null),X(U,ne),X(U,G),X(s,we),X(s,ve),X(ve,Re),X(ve,Oe),Kt(ce,ve,null),X(ve,Xe),X(ve,ot),X(t,V),X(t,ut),X(ut,Qe),X(ut,Bt),X(ut,Ct),X(Ct,He),X(Ct,rn),X(Ct,Et),Te(pt,Cn,Ne),Te(pt,je,Ne),as[mt].m(je,null),Te(pt,Zo,Ne),Te(pt,Kn,Ne),jt&&jt.m(Kn,null),o[13](Kn),so=!0},p(pt,[Ne]){(!so||Ne&1)&&h!==(h=pt[0].id+"")&&Fn(b,h),(!so||Ne&1)&&$!==($=pt[0]._sys.version+"")&&Fn(Q,$);const Gt={};Ne&3&&(Gt.name=Lp(pt[1],pt[0]._sys.createdBy)),te.$set(Gt),(!so||Ne&1)&&oe!==(oe=cy(pt[0]._sys.createdAt)+"")&&Fn(G,oe);const bn={};Ne&3&&(bn.name=Lp(pt[1],pt[0]._sys.updatedBy)),ce.$set(bn),(!so||Ne&1)&&tt!==(tt=cy(pt[0]._sys.updatedAt)+"")&&Fn(ot,tt),(!so||Ne&4)&&st!==(st=pt[2].revisions+"")&&Fn(rn,st);let At=mt;mt=kt(pt),mt===At?as[mt].p(pt,Ne):(mo(),Be(as[At],1,1,()=>{as[At]=null}),go(),he=as[mt],he?he.p(pt,Ne):(he=as[mt]=Yo[mt](pt),he.c()),xe(he,1),he.m(je,null)),pt[5]?jt?(jt.p(pt,Ne),Ne&32&&xe(jt,1)):(jt=Jme(pt),jt.c(),xe(jt,1),jt.m(Kn,null)):jt&&(mo(),Be(jt,1,1,()=>{jt=null}),go())},i(pt){so||(xe(te.$$.fragment,pt),xe(ce.$$.fragment,pt),xe(he),xe(jt),so=!0)},o(pt){Be(te.$$.fragment,pt),Be(ce.$$.fragment,pt),Be(he),Be(jt),so=!1},d(pt){pt&&ke(e),Jt(te),Jt(ce),pt&&ke(Cn),pt&&ke(je),as[mt].d(),pt&&ke(Zo),pt&&ke(Kn),jt&&jt.d(),o[13](null)}}}function j6e(o,e,t){let s,a,l,u;const d=Ur("channel");let{record:h}=e,{graph:b}=e,{users:y}=e,{schema:C}=e,E,R="";axios.get(`${d.lucentUrl}/records/${h.id}/revisions`).then(L=>{t(8,s=L.data)}).catch(L=>{console.log(L)});function $(L,te){t(7,u=b.edges.filter(ne=>ne.depth===1).reduce((ne,oe)=>(ne[oe.field]||(ne[oe.field]={record:[],revision:[]}),ne[oe.field].record.push(oe),ne),{})),t(7,u=te._edges.reduce((ne,oe)=>(ne[oe.field]||(ne[oe.field]={record:[],revision:[]}),ne[oe.field].revision.push(oe),ne),u))}function Q(L,te){L.preventDefault(),t(5,l=te),t(6,a=C.fields.filter(ne=>!Lc.exports.isEqual(l.data[ne.name],h.data[ne.name]))),$(a,te),E.scrollIntoView()}function F(L){L.preventDefault(),t(4,R=""),axios.post(`${d.lucentUrl}/records/${h.id}/rollback/${l._sys.version}`).then(te=>{window.location.reload()}).catch(te=>{const ne=te.response.data.error;t(4,R=ne.fieldLabel+": "+ne.message)})}const U=(L,te)=>Q(te,L);function K(L){Ro[L?"unshift":"push"](()=>{E=L,t(3,E)})}return o.$$set=L=>{"record"in L&&t(0,h=L.record),"graph"in L&&t(11,b=L.graph),"users"in L&&t(1,y=L.users),"schema"in L&&t(2,C=L.schema)},t(8,s=[]),t(6,a=[]),t(5,l=null),t(7,u={}),[h,y,C,E,R,l,a,u,s,Q,F,b,U,K]}class q6e extends uo{constructor(e){super(),co(this,e,j6e,X6e,lo,{record:0,graph:11,users:1,schema:2})}}const{window:G6e}=q2e;function age(o,e,t){const s=o.slice();return s[23]=e[t],s}function lge(o){let e,t,s,a,l,u;function d(E){o[15](E)}let h={record:o[0],schema:o[2]};o[0].status!==void 0&&(h.status=o[0].status),s=new zpe({props:h}),Ro.push(()=>er(s,"status",d));function b(E,R){if(E[4])return J6e;if(E[10])return K6e}let y=b(o),C=y&&y(o);return{c(){e=re("div"),t=re("div"),en(s.$$.fragment),l=Ze(),C&&C.c(),Z(t,"class","d-flex mt-3 mb-3 align-items-center justify-content-center"),Z(e,"class","shadow-lg "),rs(e,"position","fixed"),rs(e,"bottom","0"),rs(e,"left","0px"),rs(e,"width","100%"),rs(e,"background","rgb(206, 223, 210)"),rs(e,"z-index","1050")},m(E,R){Te(E,e,R),X(e,t),Kt(s,t,null),X(t,l),C&&C.m(t,null),u=!0},p(E,R){const $={};R&1&&($.record=E[0]),R&4&&($.schema=E[2]),!a&&R&1&&(a=!0,$.status=E[0].status,lr(()=>a=!1)),s.$set($),y===(y=b(E))&&C?C.p(E,R):(C&&C.d(1),C=y&&y(E),C&&(C.c(),C.m(t,null)))},i(E){u||(xe(s.$$.fragment,E),u=!0)},o(E){Be(s.$$.fragment,E),u=!1},d(E){E&&ke(e),Jt(s),C&&C.d()}}}function K6e(o){let e,t,s;return{c(){e=re("button"),e.innerHTML=` Save`,Z(e,"type","button"),Z(e,"class","ms-2 btn btn-primary btn-spinner")},m(a,l){Te(a,e,l),t||(s=mn(e,"click",o[13]),t=!0)},p:un,d(a){a&&ke(e),t=!1,s()}}}function J6e(o){let e,t,s;return{c(){e=re("button"),e.innerHTML=` Create`,Z(e,"class","ms-2 btn btn-primary btn-spinner")},m(a,l){Te(a,e,l),t||(s=mn(e,"click",o[13]),t=!0)},p:un,d(a){a&&ke(e),t=!1,s()}}}function eIe(o){let e,t;return e=new q6e({props:{record:o[0],graph:o[1],users:o[6],schema:o[2]}}),{c(){en(e.$$.fragment)},m(s,a){Kt(e,s,a),t=!0},p(s,a){const l={};a&1&&(l.record=s[0]),a&2&&(l.graph=s[1]),a&64&&(l.users=s[6]),a&4&&(l.schema=s[2]),e.$set(l)},i(s){t||(xe(e.$$.fragment,s),t=!0)},o(s){Be(e.$$.fragment,s),t=!1},d(s){Jt(e,s)}}}function tIe(o){let e,t;return e=new R6e({props:{graph:o[1],record:o[0]}}),{c(){en(e.$$.fragment)},m(s,a){Kt(e,s,a),t=!0},p(s,a){const l={};a&2&&(l.graph=s[1]),a&1&&(l.record=s[0]),e.$set(l)},i(s){t||(xe(e.$$.fragment,s),t=!0)},o(s){Be(e.$$.fragment,s),t=!1},d(s){Jt(e,s)}}}function nIe(o){let e,t,s=[],a=new Map,l,u;e=new Vpe({props:{record:o[0],schema:o[2]}});let d=o[11];const h=b=>b[23].name;for(let b=0;ber(e,"data",l)),Ro.push(()=>er(e,"graph",u)),{c(){en(e.$$.fragment)},m(h,b){Kt(e,h,b),a=!0},p(h,b){const y={};b&4&&(y.schema=h[2]),b&1&&(y.record=h[0]),b&128&&(y.validationErrors=h[7]),b&16&&(y.isCreateMode=h[4]),!t&&b&1&&(t=!0,y.data=h[0].data,lr(()=>t=!1)),!s&&b&2&&(s=!0,y.graph=h[1],lr(()=>s=!1)),e.$set(y)},i(h){a||(xe(e.$$.fragment,h),a=!0)},o(h){Be(e.$$.fragment,h),a=!1},d(h){Jt(e,h)}}}function uge(o,e){let t,s,a,l=e[8]===e[23].group&&cge(e);return{key:o,first:null,c(){t=Rs(),l&&l.c(),s=Rs(),this.first=t},m(u,d){Te(u,t,d),l&&l.m(u,d),Te(u,s,d),a=!0},p(u,d){e=u,e[8]===e[23].group?l?(l.p(e,d),d&256&&xe(l,1)):(l=cge(e),l.c(),xe(l,1),l.m(s.parentNode,s)):l&&(mo(),Be(l,1,1,()=>{l=null}),go())},i(u){a||(xe(l),a=!0)},o(u){Be(l),a=!1},d(u){u&&ke(t),l&&l.d(u),u&&ke(s)}}}function oIe(o){let e,t,s,a,l,u,d=!["_graph","_info"].includes(o[8])&&o[5],h,b,y,C,E,R,$,Q,F,U,K,L,te;t=new VSe({props:{managerRecords:o[3],graph:o[1]}});function ne(Xe){o[14](Xe)}let oe={schema:o[2],record:o[0],isCreateMode:o[4],graph:o[1]};o[8]!==void 0&&(oe.activeContentTab=o[8]),a=new jSe({props:oe}),Ro.push(()=>er(a,"activeContentTab",ne));let G=d&&lge(o);b=new X6({props:{message:o[9]}});function we(Xe){o[16](Xe)}let ve={schema:o[2],isCreateMode:o[4]};o[8]!==void 0&&(ve.active=o[8]),E=new Wpe({props:ve}),Ro.push(()=>er(E,"active",we));const Re=[nIe,tIe,eIe],Oe=[];function ce(Xe,tt){return tt&256&&(Q=null),Q==null&&(Q=!["_graph","_info"].includes(Xe[8])),Q?0:Xe[8]==="_graph"?1:Xe[8]==="_info"?2:-1}return~(F=ce(o,-1))&&(U=Oe[F]=Re[F](o)),{c(){e=re("div"),en(t.$$.fragment),s=Ze(),en(a.$$.fragment),u=Ze(),G&&G.c(),h=Ze(),en(b.$$.fragment),y=Ze(),C=re("div"),en(E.$$.fragment),$=Ze(),U&&U.c(),Z(C,"class","mt-4"),rs(C,"margin-bottom","150px"),Z(e,"class","wrapper-normal transparent")},m(Xe,tt){Te(Xe,e,tt),Kt(t,e,null),X(e,s),Kt(a,e,null),X(e,u),G&&G.m(e,null),X(e,h),Kt(b,e,null),X(e,y),X(e,C),Kt(E,C,null),X(C,$),~F&&Oe[F].m(C,null),K=!0,L||(te=mn(G6e,"beforeunload",o[12]),L=!0)},p(Xe,[tt]){const ot={};tt&8&&(ot.managerRecords=Xe[3]),tt&2&&(ot.graph=Xe[1]),t.$set(ot);const V={};tt&4&&(V.schema=Xe[2]),tt&1&&(V.record=Xe[0]),tt&16&&(V.isCreateMode=Xe[4]),tt&2&&(V.graph=Xe[1]),!l&&tt&256&&(l=!0,V.activeContentTab=Xe[8],lr(()=>l=!1)),a.$set(V),tt&288&&(d=!["_graph","_info"].includes(Xe[8])&&Xe[5]),d?G?(G.p(Xe,tt),tt&288&&xe(G,1)):(G=lge(Xe),G.c(),xe(G,1),G.m(e,h)):G&&(mo(),Be(G,1,1,()=>{G=null}),go());const ut={};tt&512&&(ut.message=Xe[9]),b.$set(ut);const Qe={};tt&4&&(Qe.schema=Xe[2]),tt&16&&(Qe.isCreateMode=Xe[4]),!R&&tt&256&&(R=!0,Qe.active=Xe[8],lr(()=>R=!1)),E.$set(Qe);let Bt=F;F=ce(Xe,tt),F===Bt?~F&&Oe[F].p(Xe,tt):(U&&(mo(),Be(Oe[Bt],1,1,()=>{Oe[Bt]=null}),go()),~F?(U=Oe[F],U?U.p(Xe,tt):(U=Oe[F]=Re[F](Xe),U.c()),xe(U,1),U.m(C,null)):U=null)},i(Xe){K||(xe(t.$$.fragment,Xe),xe(a.$$.fragment,Xe),xe(G),xe(b.$$.fragment,Xe),xe(E.$$.fragment,Xe),xe(U),K=!0)},o(Xe){Be(t.$$.fragment,Xe),Be(a.$$.fragment,Xe),Be(G),Be(b.$$.fragment,Xe),Be(E.$$.fragment,Xe),Be(U),K=!1},d(Xe){Xe&&ke(e),Jt(t),Jt(a),G&&G.d(),Jt(b),Jt(E),~F&&Oe[F].d(),L=!1,te()}}}function sIe(o,e,t){let s,a,l;const u=Ur("channel");let{schema:d}=e,{record:h}=e,{graph:b={records:[],edges:[]}}=e,{recordHistory:y}=e,{isCreateMode:C}=e,{isWritable:E=!1}=e,{users:R}=e,$,Q="",F=d.fields.filter(Re=>Re.name!=="id");W1(()=>{U()});function U(){$={data:JSON.parse(JSON.stringify(h.data)),schema:h.schema,status:h.status,_sys:JSON.parse(JSON.stringify(h._sys)),_file:JSON.parse(JSON.stringify(h._file)),edges:JSON.parse(JSON.stringify(b.edges))}}Epe(()=>{t(10,s=L())});function K(Re){return s?Re.returnValue="You have unsaved changes. Are you sure you want to exit?":(delete Re.returnValue,"...")}function L(){return C?!1:!Lc.exports.isEqual($,{data:h.data,schema:h.schema,status:h.status,_sys:h._sys,_file:h._file,edges:b.edges})}function te(Re){return Re.preventDefault(),console.log("SAVE: Attempt"),t(7,a=null),t(9,l=""),new Promise(function(Oe,ce){var Xe;if(!s&&!C){Oe(null);return}if(!h){Oe(null);return}t(1,b.edges=(Xe=b.edges)==null?void 0:Xe.filter(tt=>!tt._isTrashed&&tt.source===h.id),b),axios.post(u.lucentUrl+"/records",{record:h,edges:b.edges,isCreateMode:C}).then(function(tt){var ot;if(console.log("SAVE: SAVED"),C)window.location=u.lucentUrl+"/records/"+h.id;else{if(t(0,h=(ot=tt.data.records[0])!=null?ot:null),!h){t(10,s=!1),window.location=u.lucentUrl;return}t(1,b=tt.data),U()}Oe(null)}).catch(function(tt){tt.response&&(typeof tt.response.data.error=="string"?t(9,l=tt.response.data.error):(t(7,a=tt.response.data.error),console.log(a))),Oe(null)})})}function ne(Re){Q=Re,t(8,Q)}function oe(Re){o.$$.not_equal(h.status,Re)&&(h.status=Re,t(0,h))}function G(Re){Q=Re,t(8,Q)}function we(Re){o.$$.not_equal(h.data,Re)&&(h.data=Re,t(0,h))}function ve(Re){b=Re,t(1,b)}return o.$$set=Re=>{"schema"in Re&&t(2,d=Re.schema),"record"in Re&&t(0,h=Re.record),"graph"in Re&&t(1,b=Re.graph),"recordHistory"in Re&&t(3,y=Re.recordHistory),"isCreateMode"in Re&&t(4,C=Re.isCreateMode),"isWritable"in Re&&t(5,E=Re.isWritable),"users"in Re&&t(6,R=Re.users)},o.$$.update=()=>{o.$$.dirty&128&&t(9,l=a?`Record submission failed. ${Object.entries(a).length} error(s)`:null)},t(10,s=!1),t(7,a=null),[h,b,d,y,C,E,R,a,Q,l,s,F,K,te,ne,oe,G,we,ve]}class rIe extends uo{constructor(e){super(),co(this,e,sIe,oIe,lo,{schema:2,record:0,graph:1,recordHistory:3,isCreateMode:4,isWritable:5,users:6})}}function fge(o,e,t){const s=o.slice();return s[3]=e[t],s}function dge(o){let e,t=o[3].label+"",s,a;return{c(){var l;e=re("a"),s=Ht(t),Z(e,"class","list-group-item list-group-item-action"),Z(e,"aria-current","page"),Z(e,"href",a=o[2].lucentUrl+"/content/"+o[3].name),Vo(e,"active",o[3].name===((l=o[1])==null?void 0:l.name))},m(l,u){Te(l,e,u),X(e,s)},p(l,u){var d;u&1&&t!==(t=l[3].label+"")&&Fn(s,t),u&1&&a!==(a=l[2].lucentUrl+"/content/"+l[3].name)&&Z(e,"href",a),u&3&&Vo(e,"active",l[3].name===((d=l[1])==null?void 0:d.name))},d(l){l&&ke(e)}}}function iIe(o){let e,t=o[0],s=[];for(let a=0;a{"schemas"in u&&t(0,a=u.schemas),"schema"in u&&t(1,l=u.schema)},[a,l,s]}class tie extends uo{constructor(e){super(),co(this,e,aIe,iIe,lo,{schemas:0,schema:1})}}function lIe(o){let e,t;return{c(){e=re("a"),t=Ht("Build website"),Z(e,"href",o[4].lucentUrl+"/build-report"),Z(e,"class","btn btn-outline-primary btn-sm d-")},m(s,a){Te(s,e,a),X(e,t)},p:un,d(s){s&&ke(e)}}}function cIe(o){let e,t,s,a,l,u,d,h,b;return h=new tie({props:{schemas:o[8],schema:o[0]}}),{c(){e=re("div"),t=re("h2"),s=re("button"),a=Ht("Other"),l=Ze(),u=re("div"),d=re("div"),en(h.$$.fragment),Z(s,"class","accordion-button"),Z(s,"type","button"),Z(s,"data-bs-toggle","collapse"),Z(s,"data-bs-target","#panelsStayOpen-collapseOther"),Z(s,"aria-expanded",o[3]),Z(s,"aria-controls","panelsStayOpen-collapseOther"),Vo(s,"collapsed",!o[3]),Z(t,"class","accordion-header"),Z(t,"id","panelsStayOpen-headingOther"),Z(d,"class","accordion-body"),Z(u,"id","panelsStayOpen-collapseOther"),Z(u,"class","accordion-collapse collapse"),Z(u,"aria-labelledby","panelsStayOpen-headingOther"),Vo(u,"show",o[3]),Z(e,"class","accordion-item")},m(y,C){Te(y,e,C),X(e,t),X(t,s),X(s,a),X(e,l),X(e,u),X(u,d),Kt(h,d,null),b=!0},p(y,C){(!b||C&8)&&Z(s,"aria-expanded",y[3]),(!b||C&8)&&Vo(s,"collapsed",!y[3]);const E={};C&1&&(E.schema=y[0]),h.$set(E),(!b||C&8)&&Vo(u,"show",y[3])},i(y){b||(xe(h.$$.fragment,y),b=!0)},o(y){Be(h.$$.fragment,y),b=!1},d(y){y&&ke(e),Jt(h)}}}function uIe(o){let e,t,s,a,l,u,d,h,b;return h=new tie({props:{schemas:o[7],schema:o[0]}}),{c(){e=re("div"),t=re("h2"),s=re("button"),a=Ht("Filesystem"),l=Ze(),u=re("div"),d=re("div"),en(h.$$.fragment),Z(s,"class","accordion-button "),Z(s,"type","button"),Z(s,"data-bs-toggle","collapse"),Z(s,"data-bs-target","#panelsStayOpen-collapseFS"),Z(s,"aria-expanded",o[2]),Z(s,"aria-controls","panelsStayOpen-collapseFS"),Vo(s,"collapsed",!o[2]),Z(t,"class","accordion-header"),Z(t,"id","panelsStayOpen-headingFS"),Z(d,"class","accordion-body"),Z(u,"id","panelsStayOpen-collapseFS"),Z(u,"class","accordion-collapse collapse"),Z(u,"aria-labelledby","panelsStayOpen-headingFS"),Vo(u,"show",o[2]),Z(e,"class","accordion-item")},m(y,C){Te(y,e,C),X(e,t),X(t,s),X(s,a),X(e,l),X(e,u),X(u,d),Kt(h,d,null),b=!0},p(y,C){(!b||C&4)&&Z(s,"aria-expanded",y[2]),(!b||C&4)&&Vo(s,"collapsed",!y[2]);const E={};C&1&&(E.schema=y[0]),h.$set(E),(!b||C&4)&&Vo(u,"show",y[2])},i(y){b||(xe(h.$$.fragment,y),b=!0)},o(y){Be(h.$$.fragment,y),b=!1},d(y){y&&ke(e),Jt(h)}}}function fIe(o){let e,t,s,a,l,u,d=o[4].name+"",h,b,y,C,E,R,$,Q,F,U,K,L,te,ne,oe,G,we,ve,Re,Oe,ce,Xe,tt,ot,V,ut,Qe=o[4].generateCommand&&lIe(o);F=new vy({props:{side:"28",name:o[6].name}}),ce=new tie({props:{schemas:o[5].filter(dIe),schema:o[0]}});let Bt=o[8].length>0&&cIe(o),Ct=o[7].length>0&&uIe(o);return{c(){e=re("nav"),t=re("div"),s=re("button"),s.textContent="\xAB Content",a=Ze(),l=re("div"),u=re("a"),h=Ht(d),b=Ze(),y=re("a"),C=Ht("Members"),E=Ze(),Qe&&Qe.c(),R=Ze(),$=re("div"),Q=re("a"),en(F.$$.fragment),U=Ze(),K=re("div"),L=re("div"),te=re("button"),te.textContent="\xAB close",ne=Ze(),oe=re("div"),G=re("div"),we=re("h2"),we.innerHTML='',ve=Ze(),Re=re("div"),Oe=re("div"),en(ce.$$.fragment),Xe=Ze(),Bt&&Bt.c(),tt=Ze(),Ct&&Ct.c(),Z(s,"class","btn btn-primary btn-sm d-xxl-none"),Z(u,"class","nav-item"),Z(u,"href",o[4].lucentUrl),Z(y,"class","nav-item"),Z(y,"href",o[4].lucentUrl+"/members"),Z(l,"class","d-flex align-items-center "),Z(Q,"class","nav-item"),Z(Q,"href",o[4].lucentUrl+"/profile"),Z(e,"class","lx-nav"),Z(te,"class","btn btn-primary btn-sm d-xxl-none mb-4"),Z(we,"class","accordion-header"),Z(we,"id","panelsStayOpen-headingMain"),Z(Oe,"class","accordion-body"),Z(Re,"id","panelsStayOpen-collapseMain"),Z(Re,"class","accordion-collapse collapse show"),Z(Re,"aria-labelledby","panelsStayOpen-headingMain"),Z(G,"class","accordion-item"),Z(oe,"class","accordion"),Z(L,"class","offcanvas-body"),Z(K,"class","offcanvas offcanvas-start d-xxl-block show border-0 bg-light-subtle"),rs(K,"padding-top","36px "),Z(K,"data-bs-scroll","true"),Z(K,"data-bs-backdrop","false"),Z(K,"tabindex","-1"),Z(K,"aria-labelledby","offcanvasScrollingLabel"),Vo(K,"d-none",!o[1])},m(He,st){Te(He,e,st),X(e,t),X(t,s),X(e,a),X(e,l),X(l,u),X(u,h),X(l,b),X(l,y),X(y,C),X(l,E),Qe&&Qe.m(l,null),X(e,R),X(e,$),X($,Q),Kt(F,Q,null),Te(He,U,st),Te(He,K,st),X(K,L),X(L,te),X(L,ne),X(L,oe),X(oe,G),X(G,we),X(G,ve),X(G,Re),X(Re,Oe),Kt(ce,Oe,null),X(oe,Xe),Bt&&Bt.m(oe,null),X(oe,tt),Ct&&Ct.m(oe,null),ot=!0,V||(ut=[mn(s,"click",o[9]),mn(te,"click",o[10])],V=!0)},p(He,[st]){He[4].generateCommand&&Qe.p(He,st);const rn={};st&1&&(rn.schema=He[0]),ce.$set(rn),He[8].length>0&&Bt.p(He,st),He[7].length>0&&Ct.p(He,st),(!ot||st&2)&&Vo(K,"d-none",!He[1])},i(He){ot||(xe(F.$$.fragment,He),xe(ce.$$.fragment,He),xe(Bt),xe(Ct),ot=!0)},o(He){Be(F.$$.fragment,He),Be(ce.$$.fragment,He),Be(Bt),Be(Ct),ot=!1},d(He){He&&ke(e),Qe&&Qe.d(),Jt(F),He&&ke(U),He&&ke(K),Jt(ce),Bt&&Bt.d(),Ct&&Ct.d(),V=!1,vi(ut)}}}const dIe=o=>o.isEntry;function hIe(o,e,t){let{schema:s}=e;const a=Ur("channel"),l=Ur("readableSchemas"),u=Ur("user");let d=!1;const h=l.filter($=>$.type==="files"),b=l.filter($=>!$.isEntry&&$.type==="collection");let y=!1,C=!1;s&&(y=h.filter($=>$.name===s.name).length>0,C=b.filter($=>$.name===s.name).length>0);const E=$=>t(1,d=!0),R=$=>t(1,d=!1);return o.$$set=$=>{"schema"in $&&t(0,s=$.schema)},[s,d,y,C,a,l,u,h,b,E,R]}class mIe extends uo{constructor(e){super(),co(this,e,hIe,fIe,lo,{schema:0})}}function gIe(o){let e,t=qu(o[3].schemas,o[2],o[1])+"",s,a;return{c(){e=re("a"),s=Ht(t),Z(e,"href",a=o[3].lucentUrl+"/records/"+o[2].id),Z(e,"class","text-decoration-none text-dark d-block")},m(l,u){Te(l,e,u),X(e,s)},p(l,u){u&6&&t!==(t=qu(l[3].schemas,l[2],l[1])+"")&&Fn(s,t),u&4&&a!==(a=l[3].lucentUrl+"/records/"+l[2].id)&&Z(e,"href",a)},i:un,o:un,d(l){l&&ke(e)}}}function pIe(o){let e,t;return e=new Xw({props:{record:o[2],size:"tiny"}}),{c(){en(e.$$.fragment)},m(s,a){Kt(e,s,a),t=!0},p(s,a){const l={};a&4&&(l.record=s[2]),e.$set(l)},i(s){t||(xe(e.$$.fragment,s),t=!0)},o(s){Be(e.$$.fragment,s),t=!1},d(s){Jt(e,s)}}}function bIe(o){let e,t,s,a,l,u,d=o[4].label+"",h,b,y,C,E,R,$,Q,F,U,K;const L=[pIe,gIe],te=[];function ne(oe,G){return oe[4].type==="files"?0:1}return t=ne(o),s=te[t]=L[t](o),C=new ire({props:{status:o[2].status}}),Q=new vy({props:{name:Lp(o[0],o[2]._sys.updatedBy),side:24}}),{c(){e=re("td"),s.c(),a=Ze(),l=re("td"),u=re("a"),h=Ht(d),b=Ze(),y=re("td"),en(C.$$.fragment),E=Ze(),R=re("td"),$=re("div"),en(Q.$$.fragment),F=Ze(),U=re("div"),U.textContent=`${o[5]}`,Z(u,"class","text-decoration-none lx-small-text"),Z(u,"href",o[3].lucentUrl+"/content/"+o[4].name),Z(y,"class","text-center"),Z(U,"class","ms-2"),Z($,"class","d-flex")},m(oe,G){Te(oe,e,G),te[t].m(e,null),Te(oe,a,G),Te(oe,l,G),X(l,u),X(u,h),Te(oe,b,G),Te(oe,y,G),Kt(C,y,null),Te(oe,E,G),Te(oe,R,G),X(R,$),Kt(Q,$,null),X($,F),X($,U),K=!0},p(oe,[G]){s.p(oe,G);const we={};G&4&&(we.status=oe[2].status),C.$set(we);const ve={};G&5&&(ve.name=Lp(oe[0],oe[2]._sys.updatedBy)),Q.$set(ve)},i(oe){K||(xe(s),xe(C.$$.fragment,oe),xe(Q.$$.fragment,oe),K=!0)},o(oe){Be(s),Be(C.$$.fragment,oe),Be(Q.$$.fragment,oe),K=!1},d(oe){oe&&ke(e),te[t].d(),oe&&ke(a),oe&&ke(l),oe&&ke(b),oe&&ke(y),Jt(C),oe&&ke(E),oe&&ke(R),Jt(Q)}}}function vIe(o,e,t){const s=Ur("channel");let{users:a}=e,{graph:l}=e,{record:u}=e,d=s.schemas.find(b=>b.name===u.schema),h=Fpe(Jz(u._sys.updatedAt),{addSuffix:!0});return o.$$set=b=>{"users"in b&&t(0,a=b.users),"graph"in b&&t(1,l=b.graph),"record"in b&&t(2,u=b.record)},[a,l,u,s,d,h]}class OIe extends uo{constructor(e){super(),co(this,e,vIe,bIe,lo,{users:0,graph:1,record:2})}}function hge(o,e,t){const s=o.slice();return s[4]=e[t],s}function mge(o){let e,t,s,a,l=[],u=new Map,d,h=o[0];const b=y=>y[4].id;for(let y=0;y0&&mge(o);return{c(){e=re("div"),t=re("h3"),t.textContent="Latest Content changes",s=Ze(),l&&l.c(),Z(t,"class","header-small mb-4 mt-5"),Z(e,"class","wrapper-normal transparent")},m(u,d){Te(u,e,d),X(e,t),X(e,s),l&&l.m(e,null),a=!0},p(u,[d]){u[0].length>0?l?(l.p(u,d),d&1&&xe(l,1)):(l=mge(u),l.c(),xe(l,1),l.m(e,null)):l&&(mo(),Be(l,1,1,()=>{l=null}),go())},i(u){a||(xe(l),a=!0)},o(u){Be(l),a=!1},d(u){u&&ke(e),l&&l.d()}}}function wIe(o,e,t){const s=Ur("channel");let a=[],l=null,u=[];return W1(()=>{axios.get(s.lucentUrl+"/home/records").then(d=>{t(0,a=d.data.records),t(1,l=d.data.graph),t(2,u=d.data.users)}).catch(d=>{console.log(d)})}),[a,l,u]}class _Ie extends uo{constructor(e){super(),co(this,e,wIe,yIe,lo,{})}}function pge(o){let e;return{c(){e=re("span"),e.textContent="Build in progress",Z(e,"class","badge text-bg-warning")},m(t,s){Te(t,e,s)},d(t){t&&ke(e)}}}function bge(o){let e;return{c(){e=re("span"),e.textContent="Build completed",Z(e,"class","badge text-bg-info")},m(t,s){Te(t,e,s)},d(t){t&&ke(e)}}}function SIe(o){let e,t,s,a,l,u,d,h,b,y,C,E,R,$,Q,F=o[1]&&pge(),U=!o[1]&&o[2]&&bge();return{c(){e=re("div"),t=re("div"),s=re("h3"),a=Ht(o[0]),l=Ze(),u=re("button"),d=Ht("Start Build"),h=Ze(),b=re("div"),F&&F.c(),y=Ze(),U&&U.c(),C=Ze(),E=re("pre"),R=Ht(o[2]),Z(s,"class","header-small mb-5"),Z(u,"class","btn btn-outline-primary btn-sm mb-3"),u.disabled=o[1],Z(b,"class","mb-3"),Z(t,"class","lx-card mt-5"),Z(e,"class","wrapper-tiny transparent mb-5")},m(K,L){Te(K,e,L),X(e,t),X(t,s),X(s,a),X(t,l),X(t,u),X(u,d),X(t,h),X(t,b),F&&F.m(b,null),X(b,y),U&&U.m(b,null),X(t,C),X(t,E),X(E,R),$||(Q=mn(u,"click",o[3]),$=!0)},p(K,[L]){L&1&&Fn(a,K[0]),L&2&&(u.disabled=K[1]),K[1]?F||(F=pge(),F.c(),F.m(b,y)):F&&(F.d(1),F=null),!K[1]&&K[2]?U||(U=bge(),U.c(),U.m(b,null)):U&&(U.d(1),U=null),L&4&&Fn(R,K[2])},i:un,o:un,d(K){K&&ke(e),F&&F.d(),U&&U.d(),$=!1,Q()}}}function CIe(o,e,t){let s;const a=Ur("channel");let{title:l}=e,u=!1;function d(){const b=new EventSource(a.lucentUrl+"/build-report-source");b.onmessage=function(y){t(1,u=!0);const C=JSON.parse(y.data);C.date,t(2,s=C.logs)},b.onerror=y=>{console.log(y),b.close(),t(1,u=!1)}}function h(b){b.preventDefault(),t(1,u=!0),axios.post(a.lucentUrl+"/build").then(y=>{d()})}return W1(()=>{d()}),o.$$set=b=>{"title"in b&&t(0,l=b.title)},t(2,s=""),[l,u,s,h]}class kIe extends uo{constructor(e){super(),co(this,e,CIe,SIe,lo,{title:0})}}function xIe(o){let e,t,s,a,l;e=new mIe({props:{schema:o[2].schema}});const u=[{title:o[0]},o[2]];var d=o[3][o[1]];function h(b){let y={};for(let C=0;C{Jt(R,1)}),go()}d?(s=EC(d,h()),en(s.$$.fragment),xe(s.$$.fragment,1),Kt(s,a.parentNode,a)):s=null}else d&&s.$set(E)},i(b){l||(xe(e.$$.fragment,b),s&&xe(s.$$.fragment,b),l=!0)},o(b){Be(e.$$.fragment,b),s&&Be(s.$$.fragment,b),l=!1},d(b){Jt(e,b),b&&ke(t),b&&ke(a),s&&Jt(s,b)}}}function TIe(o,e,t){const s={members:Wwe,recordEdit:rIe,recordNotFound:Xwe,contentIndex:Jpe,homeIndex:_Ie,buildReport:kIe};let{title:a}=e,{view:l}=e,{user:u}=e,{data:d}=e,{channel:h}=e,{axios:b}=e,{readableSchemas:y}=e;return dD("axios",b),dD("channel",h),dD("readableSchemas",h.schemas.filter(C=>y.includes(C.name))),dD("user",u),o.$$set=C=>{"title"in C&&t(0,a=C.title),"view"in C&&t(1,l=C.view),"user"in C&&t(4,u=C.user),"data"in C&&t(2,d=C.data),"channel"in C&&t(5,h=C.channel),"axios"in C&&t(6,b=C.axios),"readableSchemas"in C&&t(7,y=C.readableSchemas)},[a,l,d,s,u,h,b,y]}class EIe extends uo{constructor(e){super(),co(this,e,TIe,xIe,lo,{title:0,view:1,user:4,data:2,channel:5,axios:6,readableSchemas:7})}}var Bg="top",H1="bottom",z1="right",Lg="left",vV="auto",nP=[Bg,H1,z1,Lg],OE="start",QD="end",QOe="clippingParents",nie="viewport",cD="popper",ZOe="reference",Vse=nP.reduce(function(o,e){return o.concat([e+"-"+OE,e+"-"+QD])},[]),oie=[].concat(nP,[vV]).reduce(function(o,e){return o.concat([e,e+"-"+OE,e+"-"+QD])},[]),HOe="beforeRead",zOe="read",VOe="afterRead",WOe="beforeMain",UOe="main",YOe="afterMain",XOe="beforeWrite",jOe="write",qOe="afterWrite",GOe=[HOe,zOe,VOe,WOe,UOe,YOe,XOe,jOe,qOe];function _y(o){return o?(o.nodeName||"").toLowerCase():null}function V1(o){if(o==null)return window;if(o.toString()!=="[object Window]"){var e=o.ownerDocument;return e&&e.defaultView||window}return o}function yE(o){var e=V1(o).Element;return o instanceof e||o instanceof Element}function Wb(o){var e=V1(o).HTMLElement;return o instanceof e||o instanceof HTMLElement}function sie(o){if(typeof ShadowRoot>"u")return!1;var e=V1(o).ShadowRoot;return o instanceof e||o instanceof ShadowRoot}function AIe(o){var e=o.state;Object.keys(e.elements).forEach(function(t){var s=e.styles[t]||{},a=e.attributes[t]||{},l=e.elements[t];!Wb(l)||!_y(l)||(Object.assign(l.style,s),Object.keys(a).forEach(function(u){var d=a[u];d===!1?l.removeAttribute(u):l.setAttribute(u,d===!0?"":d)}))})}function DIe(o){var e=o.state,t={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,t.popper),e.styles=t,e.elements.arrow&&Object.assign(e.elements.arrow.style,t.arrow),function(){Object.keys(e.elements).forEach(function(s){var a=e.elements[s],l=e.attributes[s]||{},u=Object.keys(e.styles.hasOwnProperty(s)?e.styles[s]:t[s]),d=u.reduce(function(h,b){return h[b]="",h},{});!Wb(a)||!_y(a)||(Object.assign(a.style,d),Object.keys(l).forEach(function(h){a.removeAttribute(h)}))})}}const rie={name:"applyStyles",enabled:!0,phase:"write",fn:AIe,effect:DIe,requires:["computeStyles"]};function py(o){return o.split("-")[0]}var dE=Math.max,zz=Math.min,ZD=Math.round;function Wse(){var o=navigator.userAgentData;return o!=null&&o.brands&&Array.isArray(o.brands)?o.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function KOe(){return!/^((?!chrome|android).)*safari/i.test(Wse())}function HD(o,e,t){e===void 0&&(e=!1),t===void 0&&(t=!1);var s=o.getBoundingClientRect(),a=1,l=1;e&&Wb(o)&&(a=o.offsetWidth>0&&ZD(s.width)/o.offsetWidth||1,l=o.offsetHeight>0&&ZD(s.height)/o.offsetHeight||1);var u=yE(o)?V1(o):window,d=u.visualViewport,h=!KOe()&&t,b=(s.left+(h&&d?d.offsetLeft:0))/a,y=(s.top+(h&&d?d.offsetTop:0))/l,C=s.width/a,E=s.height/l;return{width:C,height:E,top:y,right:b+C,bottom:y+E,left:b,x:b,y}}function iie(o){var e=HD(o),t=o.offsetWidth,s=o.offsetHeight;return Math.abs(e.width-t)<=1&&(t=e.width),Math.abs(e.height-s)<=1&&(s=e.height),{x:o.offsetLeft,y:o.offsetTop,width:t,height:s}}function JOe(o,e){var t=e.getRootNode&&e.getRootNode();if(o.contains(e))return!0;if(t&&sie(t)){var s=e;do{if(s&&o.isSameNode(s))return!0;s=s.parentNode||s.host}while(s)}return!1}function Yw(o){return V1(o).getComputedStyle(o)}function PIe(o){return["table","td","th"].indexOf(_y(o))>=0}function HC(o){return((yE(o)?o.ownerDocument:o.document)||window.document).documentElement}function OV(o){return _y(o)==="html"?o:o.assignedSlot||o.parentNode||(sie(o)?o.host:null)||HC(o)}function vge(o){return!Wb(o)||Yw(o).position==="fixed"?null:o.offsetParent}function MIe(o){var e=/firefox/i.test(Wse()),t=/Trident/i.test(Wse());if(t&&Wb(o)){var s=Yw(o);if(s.position==="fixed")return null}var a=OV(o);for(sie(a)&&(a=a.host);Wb(a)&&["html","body"].indexOf(_y(a))<0;){var l=Yw(a);if(l.transform!=="none"||l.perspective!=="none"||l.contain==="paint"||["transform","perspective"].indexOf(l.willChange)!==-1||e&&l.willChange==="filter"||e&&l.filter&&l.filter!=="none")return a;a=a.parentNode}return null}function dI(o){for(var e=V1(o),t=vge(o);t&&PIe(t)&&Yw(t).position==="static";)t=vge(t);return t&&(_y(t)==="html"||_y(t)==="body"&&Yw(t).position==="static")?e:t||MIe(o)||e}function aie(o){return["top","bottom"].indexOf(o)>=0?"x":"y"}function v6(o,e,t){return dE(o,zz(e,t))}function RIe(o,e,t){var s=v6(o,e,t);return s>t?t:s}function eye(){return{top:0,right:0,bottom:0,left:0}}function tye(o){return Object.assign({},eye(),o)}function nye(o,e){return e.reduce(function(t,s){return t[s]=o,t},{})}var $Ie=function(e,t){return e=typeof e=="function"?e(Object.assign({},t.rects,{placement:t.placement})):e,tye(typeof e!="number"?e:nye(e,nP))};function NIe(o){var e,t=o.state,s=o.name,a=o.options,l=t.elements.arrow,u=t.modifiersData.popperOffsets,d=py(t.placement),h=aie(d),b=[Lg,z1].indexOf(d)>=0,y=b?"height":"width";if(!(!l||!u)){var C=$Ie(a.padding,t),E=iie(l),R=h==="y"?Bg:Lg,$=h==="y"?H1:z1,Q=t.rects.reference[y]+t.rects.reference[h]-u[h]-t.rects.popper[y],F=u[h]-t.rects.reference[h],U=dI(l),K=U?h==="y"?U.clientHeight||0:U.clientWidth||0:0,L=Q/2-F/2,te=C[R],ne=K-E[y]-C[$],oe=K/2-E[y]/2+L,G=v6(te,oe,ne),we=h;t.modifiersData[s]=(e={},e[we]=G,e.centerOffset=G-oe,e)}}function IIe(o){var e=o.state,t=o.options,s=t.element,a=s===void 0?"[data-popper-arrow]":s;a!=null&&(typeof a=="string"&&(a=e.elements.popper.querySelector(a),!a)||!JOe(e.elements.popper,a)||(e.elements.arrow=a))}const oye={name:"arrow",enabled:!0,phase:"main",fn:NIe,effect:IIe,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function zD(o){return o.split("-")[1]}var BIe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function LIe(o,e){var t=o.x,s=o.y,a=e.devicePixelRatio||1;return{x:ZD(t*a)/a||0,y:ZD(s*a)/a||0}}function Oge(o){var e,t=o.popper,s=o.popperRect,a=o.placement,l=o.variation,u=o.offsets,d=o.position,h=o.gpuAcceleration,b=o.adaptive,y=o.roundOffsets,C=o.isFixed,E=u.x,R=E===void 0?0:E,$=u.y,Q=$===void 0?0:$,F=typeof y=="function"?y({x:R,y:Q}):{x:R,y:Q};R=F.x,Q=F.y;var U=u.hasOwnProperty("x"),K=u.hasOwnProperty("y"),L=Lg,te=Bg,ne=window;if(b){var oe=dI(t),G="clientHeight",we="clientWidth";if(oe===V1(t)&&(oe=HC(t),Yw(oe).position!=="static"&&d==="absolute"&&(G="scrollHeight",we="scrollWidth")),oe=oe,a===Bg||(a===Lg||a===z1)&&l===QD){te=H1;var ve=C&&oe===ne&&ne.visualViewport?ne.visualViewport.height:oe[G];Q-=ve-s.height,Q*=h?1:-1}if(a===Lg||(a===Bg||a===H1)&&l===QD){L=z1;var Re=C&&oe===ne&&ne.visualViewport?ne.visualViewport.width:oe[we];R-=Re-s.width,R*=h?1:-1}}var Oe=Object.assign({position:d},b&&BIe),ce=y===!0?LIe({x:R,y:Q},V1(t)):{x:R,y:Q};if(R=ce.x,Q=ce.y,h){var Xe;return Object.assign({},Oe,(Xe={},Xe[te]=K?"0":"",Xe[L]=U?"0":"",Xe.transform=(ne.devicePixelRatio||1)<=1?"translate("+R+"px, "+Q+"px)":"translate3d("+R+"px, "+Q+"px, 0)",Xe))}return Object.assign({},Oe,(e={},e[te]=K?Q+"px":"",e[L]=U?R+"px":"",e.transform="",e))}function FIe(o){var e=o.state,t=o.options,s=t.gpuAcceleration,a=s===void 0?!0:s,l=t.adaptive,u=l===void 0?!0:l,d=t.roundOffsets,h=d===void 0?!0:d,b={placement:py(e.placement),variation:zD(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:a,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,Oge(Object.assign({},b,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:u,roundOffsets:h})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,Oge(Object.assign({},b,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:h})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const lie={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:FIe,data:{}};var hH={passive:!0};function QIe(o){var e=o.state,t=o.instance,s=o.options,a=s.scroll,l=a===void 0?!0:a,u=s.resize,d=u===void 0?!0:u,h=V1(e.elements.popper),b=[].concat(e.scrollParents.reference,e.scrollParents.popper);return l&&b.forEach(function(y){y.addEventListener("scroll",t.update,hH)}),d&&h.addEventListener("resize",t.update,hH),function(){l&&b.forEach(function(y){y.removeEventListener("scroll",t.update,hH)}),d&&h.removeEventListener("resize",t.update,hH)}}const cie={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:QIe,data:{}};var ZIe={left:"right",right:"left",bottom:"top",top:"bottom"};function VH(o){return o.replace(/left|right|bottom|top/g,function(e){return ZIe[e]})}var HIe={start:"end",end:"start"};function yge(o){return o.replace(/start|end/g,function(e){return HIe[e]})}function uie(o){var e=V1(o),t=e.pageXOffset,s=e.pageYOffset;return{scrollLeft:t,scrollTop:s}}function fie(o){return HD(HC(o)).left+uie(o).scrollLeft}function zIe(o,e){var t=V1(o),s=HC(o),a=t.visualViewport,l=s.clientWidth,u=s.clientHeight,d=0,h=0;if(a){l=a.width,u=a.height;var b=KOe();(b||!b&&e==="fixed")&&(d=a.offsetLeft,h=a.offsetTop)}return{width:l,height:u,x:d+fie(o),y:h}}function VIe(o){var e,t=HC(o),s=uie(o),a=(e=o.ownerDocument)==null?void 0:e.body,l=dE(t.scrollWidth,t.clientWidth,a?a.scrollWidth:0,a?a.clientWidth:0),u=dE(t.scrollHeight,t.clientHeight,a?a.scrollHeight:0,a?a.clientHeight:0),d=-s.scrollLeft+fie(o),h=-s.scrollTop;return Yw(a||t).direction==="rtl"&&(d+=dE(t.clientWidth,a?a.clientWidth:0)-l),{width:l,height:u,x:d,y:h}}function die(o){var e=Yw(o),t=e.overflow,s=e.overflowX,a=e.overflowY;return/auto|scroll|overlay|hidden/.test(t+a+s)}function sye(o){return["html","body","#document"].indexOf(_y(o))>=0?o.ownerDocument.body:Wb(o)&&die(o)?o:sye(OV(o))}function O6(o,e){var t;e===void 0&&(e=[]);var s=sye(o),a=s===((t=o.ownerDocument)==null?void 0:t.body),l=V1(s),u=a?[l].concat(l.visualViewport||[],die(s)?s:[]):s,d=e.concat(u);return a?d:d.concat(O6(OV(u)))}function Use(o){return Object.assign({},o,{left:o.x,top:o.y,right:o.x+o.width,bottom:o.y+o.height})}function WIe(o,e){var t=HD(o,!1,e==="fixed");return t.top=t.top+o.clientTop,t.left=t.left+o.clientLeft,t.bottom=t.top+o.clientHeight,t.right=t.left+o.clientWidth,t.width=o.clientWidth,t.height=o.clientHeight,t.x=t.left,t.y=t.top,t}function wge(o,e,t){return e===nie?Use(zIe(o,t)):yE(e)?WIe(e,t):Use(VIe(HC(o)))}function UIe(o){var e=O6(OV(o)),t=["absolute","fixed"].indexOf(Yw(o).position)>=0,s=t&&Wb(o)?dI(o):o;return yE(s)?e.filter(function(a){return yE(a)&&JOe(a,s)&&_y(a)!=="body"}):[]}function YIe(o,e,t,s){var a=e==="clippingParents"?UIe(o):[].concat(e),l=[].concat(a,[t]),u=l[0],d=l.reduce(function(h,b){var y=wge(o,b,s);return h.top=dE(y.top,h.top),h.right=zz(y.right,h.right),h.bottom=zz(y.bottom,h.bottom),h.left=dE(y.left,h.left),h},wge(o,u,s));return d.width=d.right-d.left,d.height=d.bottom-d.top,d.x=d.left,d.y=d.top,d}function rye(o){var e=o.reference,t=o.element,s=o.placement,a=s?py(s):null,l=s?zD(s):null,u=e.x+e.width/2-t.width/2,d=e.y+e.height/2-t.height/2,h;switch(a){case Bg:h={x:u,y:e.y-t.height};break;case H1:h={x:u,y:e.y+e.height};break;case z1:h={x:e.x+e.width,y:d};break;case Lg:h={x:e.x-t.width,y:d};break;default:h={x:e.x,y:e.y}}var b=a?aie(a):null;if(b!=null){var y=b==="y"?"height":"width";switch(l){case OE:h[b]=h[b]-(e[y]/2-t[y]/2);break;case QD:h[b]=h[b]+(e[y]/2-t[y]/2);break}}return h}function VD(o,e){e===void 0&&(e={});var t=e,s=t.placement,a=s===void 0?o.placement:s,l=t.strategy,u=l===void 0?o.strategy:l,d=t.boundary,h=d===void 0?QOe:d,b=t.rootBoundary,y=b===void 0?nie:b,C=t.elementContext,E=C===void 0?cD:C,R=t.altBoundary,$=R===void 0?!1:R,Q=t.padding,F=Q===void 0?0:Q,U=tye(typeof F!="number"?F:nye(F,nP)),K=E===cD?ZOe:cD,L=o.rects.popper,te=o.elements[$?K:E],ne=YIe(yE(te)?te:te.contextElement||HC(o.elements.popper),h,y,u),oe=HD(o.elements.reference),G=rye({reference:oe,element:L,strategy:"absolute",placement:a}),we=Use(Object.assign({},L,G)),ve=E===cD?we:oe,Re={top:ne.top-ve.top+U.top,bottom:ve.bottom-ne.bottom+U.bottom,left:ne.left-ve.left+U.left,right:ve.right-ne.right+U.right},Oe=o.modifiersData.offset;if(E===cD&&Oe){var ce=Oe[a];Object.keys(Re).forEach(function(Xe){var tt=[z1,H1].indexOf(Xe)>=0?1:-1,ot=[Bg,H1].indexOf(Xe)>=0?"y":"x";Re[Xe]+=ce[ot]*tt})}return Re}function XIe(o,e){e===void 0&&(e={});var t=e,s=t.placement,a=t.boundary,l=t.rootBoundary,u=t.padding,d=t.flipVariations,h=t.allowedAutoPlacements,b=h===void 0?oie:h,y=zD(s),C=y?d?Vse:Vse.filter(function($){return zD($)===y}):nP,E=C.filter(function($){return b.indexOf($)>=0});E.length===0&&(E=C);var R=E.reduce(function($,Q){return $[Q]=VD(o,{placement:Q,boundary:a,rootBoundary:l,padding:u})[py(Q)],$},{});return Object.keys(R).sort(function($,Q){return R[$]-R[Q]})}function jIe(o){if(py(o)===vV)return[];var e=VH(o);return[yge(o),e,yge(e)]}function qIe(o){var e=o.state,t=o.options,s=o.name;if(!e.modifiersData[s]._skip){for(var a=t.mainAxis,l=a===void 0?!0:a,u=t.altAxis,d=u===void 0?!0:u,h=t.fallbackPlacements,b=t.padding,y=t.boundary,C=t.rootBoundary,E=t.altBoundary,R=t.flipVariations,$=R===void 0?!0:R,Q=t.allowedAutoPlacements,F=e.options.placement,U=py(F),K=U===F,L=h||(K||!$?[VH(F)]:jIe(F)),te=[F].concat(L).reduce(function(Et,Cn){return Et.concat(py(Cn)===vV?XIe(e,{placement:Cn,boundary:y,rootBoundary:C,padding:b,flipVariations:$,allowedAutoPlacements:Q}):Cn)},[]),ne=e.rects.reference,oe=e.rects.popper,G=new Map,we=!0,ve=te[0],Re=0;Re=0,ot=tt?"width":"height",V=VD(e,{placement:Oe,boundary:y,rootBoundary:C,altBoundary:E,padding:b}),ut=tt?Xe?z1:Lg:Xe?H1:Bg;ne[ot]>oe[ot]&&(ut=VH(ut));var Qe=VH(ut),Bt=[];if(l&&Bt.push(V[ce]<=0),d&&Bt.push(V[ut]<=0,V[Qe]<=0),Bt.every(function(Et){return Et})){ve=Oe,we=!1;break}G.set(Oe,Bt)}if(we)for(var Ct=$?3:1,He=function(Cn){var je=te.find(function(mt){var he=G.get(mt);if(he)return he.slice(0,Cn).every(function(Zo){return Zo})});if(je)return ve=je,"break"},st=Ct;st>0;st--){var rn=He(st);if(rn==="break")break}e.placement!==ve&&(e.modifiersData[s]._skip=!0,e.placement=ve,e.reset=!0)}}const iye={name:"flip",enabled:!0,phase:"main",fn:qIe,requiresIfExists:["offset"],data:{_skip:!1}};function _ge(o,e,t){return t===void 0&&(t={x:0,y:0}),{top:o.top-e.height-t.y,right:o.right-e.width+t.x,bottom:o.bottom-e.height+t.y,left:o.left-e.width-t.x}}function Sge(o){return[Bg,z1,H1,Lg].some(function(e){return o[e]>=0})}function GIe(o){var e=o.state,t=o.name,s=e.rects.reference,a=e.rects.popper,l=e.modifiersData.preventOverflow,u=VD(e,{elementContext:"reference"}),d=VD(e,{altBoundary:!0}),h=_ge(u,s),b=_ge(d,a,l),y=Sge(h),C=Sge(b);e.modifiersData[t]={referenceClippingOffsets:h,popperEscapeOffsets:b,isReferenceHidden:y,hasPopperEscaped:C},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":y,"data-popper-escaped":C})}const aye={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:GIe};function KIe(o,e,t){var s=py(o),a=[Lg,Bg].indexOf(s)>=0?-1:1,l=typeof t=="function"?t(Object.assign({},e,{placement:o})):t,u=l[0],d=l[1];return u=u||0,d=(d||0)*a,[Lg,z1].indexOf(s)>=0?{x:d,y:u}:{x:u,y:d}}function JIe(o){var e=o.state,t=o.options,s=o.name,a=t.offset,l=a===void 0?[0,0]:a,u=oie.reduce(function(y,C){return y[C]=KIe(C,e.rects,l),y},{}),d=u[e.placement],h=d.x,b=d.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=h,e.modifiersData.popperOffsets.y+=b),e.modifiersData[s]=u}const lye={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:JIe};function eBe(o){var e=o.state,t=o.name;e.modifiersData[t]=rye({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}const hie={name:"popperOffsets",enabled:!0,phase:"read",fn:eBe,data:{}};function tBe(o){return o==="x"?"y":"x"}function nBe(o){var e=o.state,t=o.options,s=o.name,a=t.mainAxis,l=a===void 0?!0:a,u=t.altAxis,d=u===void 0?!1:u,h=t.boundary,b=t.rootBoundary,y=t.altBoundary,C=t.padding,E=t.tether,R=E===void 0?!0:E,$=t.tetherOffset,Q=$===void 0?0:$,F=VD(e,{boundary:h,rootBoundary:b,padding:C,altBoundary:y}),U=py(e.placement),K=zD(e.placement),L=!K,te=aie(U),ne=tBe(te),oe=e.modifiersData.popperOffsets,G=e.rects.reference,we=e.rects.popper,ve=typeof Q=="function"?Q(Object.assign({},e.rects,{placement:e.placement})):Q,Re=typeof ve=="number"?{mainAxis:ve,altAxis:ve}:Object.assign({mainAxis:0,altAxis:0},ve),Oe=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,ce={x:0,y:0};if(!!oe){if(l){var Xe,tt=te==="y"?Bg:Lg,ot=te==="y"?H1:z1,V=te==="y"?"height":"width",ut=oe[te],Qe=ut+F[tt],Bt=ut-F[ot],Ct=R?-we[V]/2:0,He=K===OE?G[V]:we[V],st=K===OE?-we[V]:-G[V],rn=e.elements.arrow,Et=R&&rn?iie(rn):{width:0,height:0},Cn=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:eye(),je=Cn[tt],mt=Cn[ot],he=v6(0,G[V],Et[V]),Zo=L?G[V]/2-Ct-he-je-Re.mainAxis:He-he-je-Re.mainAxis,Kn=L?-G[V]/2+Ct+he+mt+Re.mainAxis:st+he+mt+Re.mainAxis,so=e.elements.arrow&&dI(e.elements.arrow),Yo=so?te==="y"?so.clientTop||0:so.clientLeft||0:0,as=(Xe=Oe==null?void 0:Oe[te])!=null?Xe:0,kt=ut+Zo-as-Yo,jt=ut+Kn-as,pt=v6(R?zz(Qe,kt):Qe,ut,R?dE(Bt,jt):Bt);oe[te]=pt,ce[te]=pt-ut}if(d){var Ne,Gt=te==="x"?Bg:Lg,bn=te==="x"?H1:z1,At=oe[ne],An=ne==="y"?"height":"width",zn=At+F[Gt],ps=At-F[bn],oo=[Bg,Lg].indexOf(U)!==-1,Ss=(Ne=Oe==null?void 0:Oe[ne])!=null?Ne:0,Mr=oo?zn:At-G[An]-we[An]-Ss+Re.altAxis,$s=oo?At+G[An]+we[An]-Ss-Re.altAxis:ps,tr=R&&oo?RIe(Mr,At,$s):v6(R?Mr:zn,At,R?$s:ps);oe[ne]=tr,ce[ne]=tr-At}e.modifiersData[s]=ce}}const cye={name:"preventOverflow",enabled:!0,phase:"main",fn:nBe,requiresIfExists:["offset"]};function oBe(o){return{scrollLeft:o.scrollLeft,scrollTop:o.scrollTop}}function sBe(o){return o===V1(o)||!Wb(o)?uie(o):oBe(o)}function rBe(o){var e=o.getBoundingClientRect(),t=ZD(e.width)/o.offsetWidth||1,s=ZD(e.height)/o.offsetHeight||1;return t!==1||s!==1}function iBe(o,e,t){t===void 0&&(t=!1);var s=Wb(e),a=Wb(e)&&rBe(e),l=HC(e),u=HD(o,a,t),d={scrollLeft:0,scrollTop:0},h={x:0,y:0};return(s||!s&&!t)&&((_y(e)!=="body"||die(l))&&(d=sBe(e)),Wb(e)?(h=HD(e,!0),h.x+=e.clientLeft,h.y+=e.clientTop):l&&(h.x=fie(l))),{x:u.left+d.scrollLeft-h.x,y:u.top+d.scrollTop-h.y,width:u.width,height:u.height}}function aBe(o){var e=new Map,t=new Set,s=[];o.forEach(function(l){e.set(l.name,l)});function a(l){t.add(l.name);var u=[].concat(l.requires||[],l.requiresIfExists||[]);u.forEach(function(d){if(!t.has(d)){var h=e.get(d);h&&a(h)}}),s.push(l)}return o.forEach(function(l){t.has(l.name)||a(l)}),s}function lBe(o){var e=aBe(o);return GOe.reduce(function(t,s){return t.concat(e.filter(function(a){return a.phase===s}))},[])}function cBe(o){var e;return function(){return e||(e=new Promise(function(t){Promise.resolve().then(function(){e=void 0,t(o())})})),e}}function uBe(o){var e=o.reduce(function(t,s){var a=t[s.name];return t[s.name]=a?Object.assign({},a,s,{options:Object.assign({},a.options,s.options),data:Object.assign({},a.data,s.data)}):s,t},{});return Object.keys(e).map(function(t){return e[t]})}var Cge={placement:"bottom",modifiers:[],strategy:"absolute"};function kge(){for(var o=arguments.length,e=new Array(o),t=0;t