-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpride.min.js
17 lines (17 loc) · 42.5 KB
/
pride.min.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
var ir=Object.defineProperty;var Zn=Object.getOwnPropertyDescriptor;var jn=Object.getOwnPropertyNames;var ti=Object.prototype.hasOwnProperty;var Mo=(t,e)=>{for(var r in e)ir(t,r,{get:e[r],enumerable:!0})},ei=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of jn(e))!ti.call(t,i)&&i!==r&&ir(t,i,{get:()=>e[i],enumerable:!(n=Zn(e,i))||n.enumerable});return t};var ri=t=>ei(ir({},"__esModule",{value:!0}),t);var Vi={};Mo(Vi,{Pride:()=>On});module.exports=ri(Vi);var oi={array:[],get(t){return this.array.find(e=>e.get("uid")===t)}},Ot=oi;var so={};Mo(so,{VERSION:()=>_e,after:()=>Kr,all:()=>De,allKeys:()=>W,any:()=>Ie,assign:()=>ht,before:()=>re,bind:()=>Pe,bindAll:()=>on,chain:()=>Br,chunk:()=>io,clone:()=>$r,collect:()=>V,compact:()=>to,compose:()=>Vr,constant:()=>Qt,contains:()=>B,countBy:()=>pn,create:()=>Fr,debounce:()=>zr,default:()=>xn,defaults:()=>Me,defer:()=>nn,delay:()=>Ce,detect:()=>Pt,difference:()=>Ue,drop:()=>At,each:()=>P,escape:()=>jo,every:()=>De,extend:()=>Re,extendOwn:()=>ht,filter:()=>J,find:()=>Pt,findIndex:()=>Tt,findKey:()=>oe,findLastIndex:()=>be,findWhere:()=>Qr,first:()=>me,flatten:()=>eo,foldl:()=>Le,foldr:()=>kr,forEach:()=>P,functions:()=>Rt,get:()=>Yt,groupBy:()=>un,has:()=>qr,head:()=>me,identity:()=>xt,include:()=>B,includes:()=>B,indexBy:()=>ln,indexOf:()=>Be,initial:()=>pe,inject:()=>Le,intersection:()=>ro,invert:()=>Ht,invoke:()=>fn,isArguments:()=>St,isArray:()=>z,isArrayBuffer:()=>Fe,isBoolean:()=>Vt,isDataView:()=>mt,isDate:()=>Do,isElement:()=>dr,isEmpty:()=>vr,isEqual:()=>_r,isError:()=>zo,isFinite:()=>xr,isFunction:()=>$,isMap:()=>Ho,isMatch:()=>Gt,isNaN:()=>Kt,isNull:()=>cr,isNumber:()=>Ee,isObject:()=>b,isRegExp:()=>Io,isSet:()=>Yo,isString:()=>Ft,isSymbol:()=>Oe,isTypedArray:()=>Se,isUndefined:()=>Ut,isWeakMap:()=>Xo,isWeakSet:()=>Zo,iteratee:()=>Mt,keys:()=>y,last:()=>jr,lastIndexOf:()=>an,map:()=>V,mapObject:()=>Rr,matcher:()=>Z,matches:()=>Z,max:()=>fe,memoize:()=>Dr,methods:()=>Rt,min:()=>Gr,mixin:()=>ce,negate:()=>yt,noop:()=>jt,now:()=>it,object:()=>oo,omit:()=>cn,once:()=>sn,pairs:()=>Or,partial:()=>st,partition:()=>mn,pick:()=>ze,pluck:()=>_t,property:()=>vt,propertyOf:()=>Mr,random:()=>Nt,range:()=>no,reduce:()=>Le,reduceRight:()=>kr,reject:()=>Jr,rest:()=>At,restArguments:()=>O,result:()=>Cr,sample:()=>le,select:()=>J,shuffle:()=>Hr,size:()=>Yr,some:()=>Ie,sortBy:()=>Xr,sortedIndex:()=>ie,tail:()=>At,take:()=>me,tap:()=>Sr,template:()=>Pr,templateSettings:()=>rn,throttle:()=>Ir,times:()=>Nr,toArray:()=>ue,toPath:()=>Ne,transpose:()=>bt,unescape:()=>en,union:()=>hn,uniq:()=>Ct,unique:()=>Ct,uniqueId:()=>br,unzip:()=>bt,values:()=>K,where:()=>Wr,without:()=>dn,wrap:()=>Ur,zip:()=>gn});var _e="1.13.6",sr=typeof self=="object"&&self.self===self&&self||typeof global=="object"&&global.global===global&&global||Function("return this")()||{},zt=Array.prototype,Ae=Object.prototype,ar=typeof Symbol<"u"?Symbol.prototype:null,No=zt.push,Y=zt.slice,tt=Ae.toString,To=Ae.hasOwnProperty,fr=typeof ArrayBuffer<"u",Po=typeof DataView<"u",Co=Array.isArray,ur=Object.keys,lr=Object.create,pr=fr&&ArrayBuffer.isView,bo=isNaN,Bo=isFinite,we=!{toString:null}.propertyIsEnumerable("toString"),mr=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],Lo=Math.pow(2,53)-1;function O(t,e){return e=e==null?t.length-1:+e,function(){for(var r=Math.max(arguments.length-e,0),n=Array(r),i=0;i<r;i++)n[i]=arguments[i+e];switch(e){case 0:return t.call(this,n);case 1:return t.call(this,arguments[0],n);case 2:return t.call(this,arguments[0],arguments[1],n)}var o=Array(e+1);for(i=0;i<e;i++)o[i]=arguments[i];return o[e]=n,t.apply(this,o)}}function b(t){var e=typeof t;return e==="function"||e==="object"&&!!t}function cr(t){return t===null}function Ut(t){return t===void 0}function Vt(t){return t===!0||t===!1||tt.call(t)==="[object Boolean]"}function dr(t){return!!(t&&t.nodeType===1)}function A(t){var e="[object "+t+"]";return function(r){return tt.call(r)===e}}var Ft=A("String");var Ee=A("Number");var Do=A("Date");var Io=A("RegExp");var zo=A("Error");var Oe=A("Symbol");var Fe=A("ArrayBuffer");var Uo=A("Function"),ni=sr.document&&sr.document.childNodes;typeof/./!="function"&&typeof Int8Array!="object"&&typeof ni!="function"&&(Uo=function(t){return typeof t=="function"||!1});var $=Uo;var hr=A("Object");var $e=Po&&hr(new DataView(new ArrayBuffer(8))),$t=typeof Map<"u"&&hr(new Map);var ii=A("DataView");function si(t){return t!=null&&$(t.getInt8)&&Fe(t.buffer)}var mt=$e?si:ii;var z=Co||A("Array");function T(t,e){return t!=null&&To.call(t,e)}var gr=A("Arguments");(function(){gr(arguments)||(gr=function(t){return T(t,"callee")})})();var St=gr;function xr(t){return!Oe(t)&&Bo(t)&&!isNaN(parseFloat(t))}function Kt(t){return Ee(t)&&bo(t)}function Qt(t){return function(){return t}}function kt(t){return function(e){var r=t(e);return typeof r=="number"&&r>=0&&r<=Lo}}function Jt(t){return function(e){return e?.[t]}}var ct=Jt("byteLength");var Vo=kt(ct);var ai=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;function fi(t){return pr?pr(t)&&!mt(t):Vo(t)&&ai.test(tt.call(t))}var Se=fr?fi:Qt(!1);var q=Jt("length");function ui(t){for(var e={},r=t.length,n=0;n<r;++n)e[t[n]]=!0;return{contains:function(i){return e[i]===!0},push:function(i){return e[i]=!0,t.push(i)}}}function Wt(t,e){e=ui(e);var r=mr.length,n=t.constructor,i=$(n)&&n.prototype||Ae,o="constructor";for(T(t,o)&&!e.contains(o)&&e.push(o);r--;)o=mr[r],o in t&&t[o]!==i[o]&&!e.contains(o)&&e.push(o)}function y(t){if(!b(t))return[];if(ur)return ur(t);var e=[];for(var r in t)T(t,r)&&e.push(r);return we&&Wt(t,e),e}function vr(t){if(t==null)return!0;var e=q(t);return typeof e=="number"&&(z(t)||Ft(t)||St(t))?e===0:q(y(t))===0}function Gt(t,e){var r=y(e),n=r.length;if(t==null)return!n;for(var i=Object(t),o=0;o<n;o++){var a=r[o];if(e[a]!==i[a]||!(a in i))return!1}return!0}function h(t){if(t instanceof h)return t;if(!(this instanceof h))return new h(t);this._wrapped=t}h.VERSION=_e;h.prototype.value=function(){return this._wrapped};h.prototype.valueOf=h.prototype.toJSON=h.prototype.value;h.prototype.toString=function(){return String(this._wrapped)};function qe(t){return new Uint8Array(t.buffer||t,t.byteOffset||0,ct(t))}var Ko="[object DataView]";function yr(t,e,r,n){if(t===e)return t!==0||1/t===1/e;if(t==null||e==null)return!1;if(t!==t)return e!==e;var i=typeof t;return i!=="function"&&i!=="object"&&typeof e!="object"?!1:Qo(t,e,r,n)}function Qo(t,e,r,n){t instanceof h&&(t=t._wrapped),e instanceof h&&(e=e._wrapped);var i=tt.call(t);if(i!==tt.call(e))return!1;if($e&&i=="[object Object]"&&mt(t)){if(!mt(e))return!1;i=Ko}switch(i){case"[object RegExp]":case"[object String]":return""+t==""+e;case"[object Number]":return+t!=+t?+e!=+e:+t==0?1/+t===1/e:+t==+e;case"[object Date]":case"[object Boolean]":return+t==+e;case"[object Symbol]":return ar.valueOf.call(t)===ar.valueOf.call(e);case"[object ArrayBuffer]":case Ko:return Qo(qe(t),qe(e),r,n)}var o=i==="[object Array]";if(!o&&Se(t)){var a=ct(t);if(a!==ct(e))return!1;if(t.buffer===e.buffer&&t.byteOffset===e.byteOffset)return!0;o=!0}if(!o){if(typeof t!="object"||typeof e!="object")return!1;var u=t.constructor,c=e.constructor;if(u!==c&&!($(u)&&u instanceof u&&$(c)&&c instanceof c)&&"constructor"in t&&"constructor"in e)return!1}r=r||[],n=n||[];for(var d=r.length;d--;)if(r[d]===t)return n[d]===e;if(r.push(t),n.push(e),o){if(d=t.length,d!==e.length)return!1;for(;d--;)if(!yr(t[d],e[d],r,n))return!1}else{var F=y(t),S;if(d=F.length,y(e).length!==d)return!1;for(;d--;)if(S=F[d],!(T(e,S)&&yr(t[S],e[S],r,n)))return!1}return r.pop(),n.pop(),!0}function _r(t,e){return yr(t,e)}function W(t){if(!b(t))return[];var e=[];for(var r in t)e.push(r);return we&&Wt(t,e),e}function qt(t){var e=q(t);return function(r){if(r==null)return!1;var n=W(r);if(q(n))return!1;for(var i=0;i<e;i++)if(!$(r[t[i]]))return!1;return t!==Er||!$(r[Ar])}}var Ar="forEach",ko="has",wr=["clear","delete"],Jo=["get",ko,"set"],Wo=wr.concat(Ar,Jo),Er=wr.concat(Jo),Go=["add"].concat(wr,Ar,ko);var Ho=$t?qt(Wo):A("Map");var Xo=$t?qt(Er):A("WeakMap");var Yo=$t?qt(Go):A("Set");var Zo=A("WeakSet");function K(t){for(var e=y(t),r=e.length,n=Array(r),i=0;i<r;i++)n[i]=t[e[i]];return n}function Or(t){for(var e=y(t),r=e.length,n=Array(r),i=0;i<r;i++)n[i]=[e[i],t[e[i]]];return n}function Ht(t){for(var e={},r=y(t),n=0,i=r.length;n<i;n++)e[t[r[n]]]=r[n];return e}function Rt(t){var e=[];for(var r in t)$(t[r])&&e.push(r);return e.sort()}function dt(t,e){return function(r){var n=arguments.length;if(e&&(r=Object(r)),n<2||r==null)return r;for(var i=1;i<n;i++)for(var o=arguments[i],a=t(o),u=a.length,c=0;c<u;c++){var d=a[c];(!e||r[d]===void 0)&&(r[d]=o[d])}return r}}var Re=dt(W);var ht=dt(y);var Me=dt(W,!0);function li(){return function(){}}function Xt(t){if(!b(t))return{};if(lr)return lr(t);var e=li();e.prototype=t;var r=new e;return e.prototype=null,r}function Fr(t,e){var r=Xt(t);return e&&ht(r,e),r}function $r(t){return b(t)?z(t)?t.slice():Re({},t):t}function Sr(t,e){return e(t),t}function Ne(t){return z(t)?t:[t]}h.toPath=Ne;function G(t){return h.toPath(t)}function gt(t,e){for(var r=e.length,n=0;n<r;n++){if(t==null)return;t=t[e[n]]}return r?t:void 0}function Yt(t,e,r){var n=gt(t,G(e));return Ut(n)?r:n}function qr(t,e){e=G(e);for(var r=e.length,n=0;n<r;n++){var i=e[n];if(!T(t,i))return!1;t=t[i]}return!!r}function xt(t){return t}function Z(t){return t=ht({},t),function(e){return Gt(e,t)}}function vt(t){return t=G(t),function(e){return gt(e,t)}}function H(t,e,r){if(e===void 0)return t;switch(r??3){case 1:return function(n){return t.call(e,n)};case 3:return function(n,i,o){return t.call(e,n,i,o)};case 4:return function(n,i,o,a){return t.call(e,n,i,o,a)}}return function(){return t.apply(e,arguments)}}function Zt(t,e,r){return t==null?xt:$(t)?H(t,e,r):b(t)&&!z(t)?Z(t):vt(t)}function Mt(t,e){return Zt(t,e,1/0)}h.iteratee=Mt;function E(t,e,r){return h.iteratee!==Mt?h.iteratee(t,e):Zt(t,e,r)}function Rr(t,e,r){e=E(e,r);for(var n=y(t),i=n.length,o={},a=0;a<i;a++){var u=n[a];o[u]=e(t[u],u,t)}return o}function jt(){}function Mr(t){return t==null?jt:function(e){return Yt(t,e)}}function Nr(t,e,r){var n=Array(Math.max(0,t));e=H(e,r,1);for(var i=0;i<t;i++)n[i]=e(i);return n}function Nt(t,e){return e==null&&(e=t,t=0),t+Math.floor(Math.random()*(e-t+1))}var it=Date.now||function(){return new Date().getTime()};function te(t){var e=function(o){return t[o]},r="(?:"+y(t).join("|")+")",n=RegExp(r),i=RegExp(r,"g");return function(o){return o=o==null?"":""+o,n.test(o)?o.replace(i,e):o}}var Te={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"};var jo=te(Te);var tn=Ht(Te);var en=te(tn);var rn=h.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var Tr=/(.)^/,pi={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},mi=/\\|'|\r|\n|\u2028|\u2029/g;function ci(t){return"\\"+pi[t]}var di=/^\s*(\w|\$)+\s*$/;function Pr(t,e,r){!e&&r&&(e=r),e=Me({},e,h.templateSettings);var n=RegExp([(e.escape||Tr).source,(e.interpolate||Tr).source,(e.evaluate||Tr).source].join("|")+"|$","g"),i=0,o="__p+='";t.replace(n,function(d,F,S,v,g){return o+=t.slice(i,g).replace(mi,ci),i=g+d.length,F?o+=`'+
((__t=(`+F+`))==null?'':_.escape(__t))+
'`:S?o+=`'+
((__t=(`+S+`))==null?'':__t)+
'`:v&&(o+=`';
`+v+`
__p+='`),d}),o+=`';
`;var a=e.variable;if(a){if(!di.test(a))throw new Error("variable is not a bare identifier: "+a)}else o=`with(obj||{}){
`+o+`}
`,a="obj";o=`var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};
`+o+`return __p;
`;var u;try{u=new Function(a,"_",o)}catch(d){throw d.source=o,d}var c=function(d){return u.call(this,d,h)};return c.source="function("+a+`){
`+o+"}",c}function Cr(t,e,r){e=G(e);var n=e.length;if(!n)return $(r)?r.call(t):r;for(var i=0;i<n;i++){var o=t?.[e[i]];o===void 0&&(o=r,i=n),t=$(o)?o.call(t):o}return t}var hi=0;function br(t){var e=++hi+"";return t?t+e:e}function Br(t){var e=h(t);return e._chain=!0,e}function ee(t,e,r,n,i){if(!(n instanceof e))return t.apply(r,i);var o=Xt(t.prototype),a=t.apply(o,i);return b(a)?a:o}var Lr=O(function(t,e){var r=Lr.placeholder,n=function(){for(var i=0,o=e.length,a=Array(o),u=0;u<o;u++)a[u]=e[u]===r?arguments[i++]:e[u];for(;i<arguments.length;)a.push(arguments[i++]);return ee(t,n,this,this,a)};return n});Lr.placeholder=h;var st=Lr;var Pe=O(function(t,e,r){if(!$(t))throw new TypeError("Bind must be called on a function");var n=O(function(i){return ee(t,n,e,this,r.concat(i))});return n});var R=kt(q);function U(t,e,r,n){if(n=n||[],!e&&e!==0)e=1/0;else if(e<=0)return n.concat(t);for(var i=n.length,o=0,a=q(t);o<a;o++){var u=t[o];if(R(u)&&(z(u)||St(u)))if(e>1)U(u,e-1,r,n),i=n.length;else for(var c=0,d=u.length;c<d;)n[i++]=u[c++];else r||(n[i++]=u)}return n}var on=O(function(t,e){e=U(e,!1,!1);var r=e.length;if(r<1)throw new Error("bindAll must be passed function names");for(;r--;){var n=e[r];t[n]=Pe(t[n],t)}return t});function Dr(t,e){var r=function(n){var i=r.cache,o=""+(e?e.apply(this,arguments):n);return T(i,o)||(i[o]=t.apply(this,arguments)),i[o]};return r.cache={},r}var Ce=O(function(t,e,r){return setTimeout(function(){return t.apply(null,r)},e)});var nn=st(Ce,h,1);function Ir(t,e,r){var n,i,o,a,u=0;r||(r={});var c=function(){u=r.leading===!1?0:it(),n=null,a=t.apply(i,o),n||(i=o=null)},d=function(){var F=it();!u&&r.leading===!1&&(u=F);var S=e-(F-u);return i=this,o=arguments,S<=0||S>e?(n&&(clearTimeout(n),n=null),u=F,a=t.apply(i,o),n||(i=o=null)):!n&&r.trailing!==!1&&(n=setTimeout(c,S)),a};return d.cancel=function(){clearTimeout(n),u=0,n=i=o=null},d}function zr(t,e,r){var n,i,o,a,u,c=function(){var F=it()-i;e>F?n=setTimeout(c,e-F):(n=null,r||(a=t.apply(u,o)),n||(o=u=null))},d=O(function(F){return u=this,o=F,i=it(),n||(n=setTimeout(c,e),r&&(a=t.apply(u,o))),a});return d.cancel=function(){clearTimeout(n),n=o=u=null},d}function Ur(t,e){return st(e,t)}function yt(t){return function(){return!t.apply(this,arguments)}}function Vr(){var t=arguments,e=t.length-1;return function(){for(var r=e,n=t[e].apply(this,arguments);r--;)n=t[r].call(this,n);return n}}function Kr(t,e){return function(){if(--t<1)return e.apply(this,arguments)}}function re(t,e){var r;return function(){return--t>0&&(r=e.apply(this,arguments)),t<=1&&(e=null),r}}var sn=st(re,2);function oe(t,e,r){e=E(e,r);for(var n=y(t),i,o=0,a=n.length;o<a;o++)if(i=n[o],e(t[i],i,t))return i}function ne(t){return function(e,r,n){r=E(r,n);for(var i=q(e),o=t>0?0:i-1;o>=0&&o<i;o+=t)if(r(e[o],o,e))return o;return-1}}var Tt=ne(1);var be=ne(-1);function ie(t,e,r,n){r=E(r,n,1);for(var i=r(e),o=0,a=q(t);o<a;){var u=Math.floor((o+a)/2);r(t[u])<i?o=u+1:a=u}return o}function se(t,e,r){return function(n,i,o){var a=0,u=q(n);if(typeof o=="number")t>0?a=o>=0?o:Math.max(o+u,a):u=o>=0?Math.min(o+1,u):o+u+1;else if(r&&o&&u)return o=r(n,i),n[o]===i?o:-1;if(i!==i)return o=e(Y.call(n,a,u),Kt),o>=0?o+a:-1;for(o=t>0?a:u-1;o>=0&&o<u;o+=t)if(n[o]===i)return o;return-1}}var Be=se(1,Tt,ie);var an=se(-1,be);function Pt(t,e,r){var n=R(t)?Tt:oe,i=n(t,e,r);if(i!==void 0&&i!==-1)return t[i]}function Qr(t,e){return Pt(t,Z(e))}function P(t,e,r){e=H(e,r);var n,i;if(R(t))for(n=0,i=t.length;n<i;n++)e(t[n],n,t);else{var o=y(t);for(n=0,i=o.length;n<i;n++)e(t[o[n]],o[n],t)}return t}function V(t,e,r){e=E(e,r);for(var n=!R(t)&&y(t),i=(n||t).length,o=Array(i),a=0;a<i;a++){var u=n?n[a]:a;o[a]=e(t[u],u,t)}return o}function ae(t){var e=function(r,n,i,o){var a=!R(r)&&y(r),u=(a||r).length,c=t>0?0:u-1;for(o||(i=r[a?a[c]:c],c+=t);c>=0&&c<u;c+=t){var d=a?a[c]:c;i=n(i,r[d],d,r)}return i};return function(r,n,i,o){var a=arguments.length>=3;return e(r,H(n,o,4),i,a)}}var Le=ae(1);var kr=ae(-1);function J(t,e,r){var n=[];return e=E(e,r),P(t,function(i,o,a){e(i,o,a)&&n.push(i)}),n}function Jr(t,e,r){return J(t,yt(E(e)),r)}function De(t,e,r){e=E(e,r);for(var n=!R(t)&&y(t),i=(n||t).length,o=0;o<i;o++){var a=n?n[o]:o;if(!e(t[a],a,t))return!1}return!0}function Ie(t,e,r){e=E(e,r);for(var n=!R(t)&&y(t),i=(n||t).length,o=0;o<i;o++){var a=n?n[o]:o;if(e(t[a],a,t))return!0}return!1}function B(t,e,r,n){return R(t)||(t=K(t)),(typeof r!="number"||n)&&(r=0),Be(t,e,r)>=0}var fn=O(function(t,e,r){var n,i;return $(e)?i=e:(e=G(e),n=e.slice(0,-1),e=e[e.length-1]),V(t,function(o){var a=i;if(!a){if(n&&n.length&&(o=gt(o,n)),o==null)return;a=o[e]}return a==null?a:a.apply(o,r)})});function _t(t,e){return V(t,vt(e))}function Wr(t,e){return J(t,Z(e))}function fe(t,e,r){var n=-1/0,i=-1/0,o,a;if(e==null||typeof e=="number"&&typeof t[0]!="object"&&t!=null){t=R(t)?t:K(t);for(var u=0,c=t.length;u<c;u++)o=t[u],o!=null&&o>n&&(n=o)}else e=E(e,r),P(t,function(d,F,S){a=e(d,F,S),(a>i||a===-1/0&&n===-1/0)&&(n=d,i=a)});return n}function Gr(t,e,r){var n=1/0,i=1/0,o,a;if(e==null||typeof e=="number"&&typeof t[0]!="object"&&t!=null){t=R(t)?t:K(t);for(var u=0,c=t.length;u<c;u++)o=t[u],o!=null&&o<n&&(n=o)}else e=E(e,r),P(t,function(d,F,S){a=e(d,F,S),(a<i||a===1/0&&n===1/0)&&(n=d,i=a)});return n}var gi=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;function ue(t){return t?z(t)?Y.call(t):Ft(t)?t.match(gi):R(t)?V(t,xt):K(t):[]}function le(t,e,r){if(e==null||r)return R(t)||(t=K(t)),t[Nt(t.length-1)];var n=ue(t),i=q(n);e=Math.max(Math.min(e,i),0);for(var o=i-1,a=0;a<e;a++){var u=Nt(a,o),c=n[a];n[a]=n[u],n[u]=c}return n.slice(0,e)}function Hr(t){return le(t,1/0)}function Xr(t,e,r){var n=0;return e=E(e,r),_t(V(t,function(i,o,a){return{value:i,index:n++,criteria:e(i,o,a)}}).sort(function(i,o){var a=i.criteria,u=o.criteria;if(a!==u){if(a>u||a===void 0)return 1;if(a<u||u===void 0)return-1}return i.index-o.index}),"value")}function et(t,e){return function(r,n,i){var o=e?[[],[]]:{};return n=E(n,i),P(r,function(a,u){var c=n(a,u,r);t(o,a,c)}),o}}var un=et(function(t,e,r){T(t,r)?t[r].push(e):t[r]=[e]});var ln=et(function(t,e,r){t[r]=e});var pn=et(function(t,e,r){T(t,r)?t[r]++:t[r]=1});var mn=et(function(t,e,r){t[r?0:1].push(e)},!0);function Yr(t){return t==null?0:R(t)?t.length:y(t).length}function Zr(t,e,r){return e in r}var ze=O(function(t,e){var r={},n=e[0];if(t==null)return r;$(n)?(e.length>1&&(n=H(n,e[1])),e=W(t)):(n=Zr,e=U(e,!1,!1),t=Object(t));for(var i=0,o=e.length;i<o;i++){var a=e[i],u=t[a];n(u,a,t)&&(r[a]=u)}return r});var cn=O(function(t,e){var r=e[0],n;return $(r)?(r=yt(r),e.length>1&&(n=e[1])):(e=V(U(e,!1,!1),String),r=function(i,o){return!B(e,o)}),ze(t,r,n)});function pe(t,e,r){return Y.call(t,0,Math.max(0,t.length-(e==null||r?1:e)))}function me(t,e,r){return t==null||t.length<1?e==null||r?void 0:[]:e==null||r?t[0]:pe(t,t.length-e)}function At(t,e,r){return Y.call(t,e==null||r?1:e)}function jr(t,e,r){return t==null||t.length<1?e==null||r?void 0:[]:e==null||r?t[t.length-1]:At(t,Math.max(0,t.length-e))}function to(t){return J(t,Boolean)}function eo(t,e){return U(t,e,!1)}var Ue=O(function(t,e){return e=U(e,!0,!0),J(t,function(r){return!B(e,r)})});var dn=O(function(t,e){return Ue(t,e)});function Ct(t,e,r,n){Vt(e)||(n=r,r=e,e=!1),r!=null&&(r=E(r,n));for(var i=[],o=[],a=0,u=q(t);a<u;a++){var c=t[a],d=r?r(c,a,t):c;e&&!r?((!a||o!==d)&&i.push(c),o=d):r?B(o,d)||(o.push(d),i.push(c)):B(i,c)||i.push(c)}return i}var hn=O(function(t){return Ct(U(t,!0,!0))});function ro(t){for(var e=[],r=arguments.length,n=0,i=q(t);n<i;n++){var o=t[n];if(!B(e,o)){var a;for(a=1;a<r&&B(arguments[a],o);a++);a===r&&e.push(o)}}return e}function bt(t){for(var e=t&&fe(t,q).length||0,r=Array(e),n=0;n<e;n++)r[n]=_t(t,n);return r}var gn=O(bt);function oo(t,e){for(var r={},n=0,i=q(t);n<i;n++)e?r[t[n]]=e[n]:r[t[n][0]]=t[n][1];return r}function no(t,e,r){e==null&&(e=t||0,t=0),r||(r=e<t?-1:1);for(var n=Math.max(Math.ceil((e-t)/r),0),i=Array(n),o=0;o<n;o++,t+=r)i[o]=t;return i}function io(t,e){if(e==null||e<1)return[];for(var r=[],n=0,i=t.length;n<i;)r.push(Y.call(t,n,n+=e));return r}function Bt(t,e){return t._chain?h(e).chain():e}function ce(t){return P(Rt(t),function(e){var r=h[e]=t[e];h.prototype[e]=function(){var n=[this._wrapped];return No.apply(n,arguments),Bt(this,r.apply(h,n))}}),h}P(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var e=zt[t];h.prototype[t]=function(){var r=this._wrapped;return r!=null&&(e.apply(r,arguments),(t==="shift"||t==="splice")&&r.length===0&&delete r[0]),Bt(this,r)}});P(["concat","join","slice"],function(t){var e=zt[t];h.prototype[t]=function(){var r=this._wrapped;return r!=null&&(r=e.apply(r,arguments)),Bt(this,r)}});var xn=h;var ao=ce(so);ao._=ao;var w=ao;var xi=function(t){return!t||typeof t=="function"?t:JSON.parse(JSON.stringify(t))},L=xi;var vi=["start","count","end","page","index_limit","total_pages","total_available","page_limit"],Ve=vi;var Ke=class{constructor(e){this.values={count:0,end:0,index_limit:1/0,page:0,page_limit:1/0,start:0,total_available:void 0,total_pages:void 0},this.set(e)}set(e){let r=Object.keys(e);if(["index_limit","total_pages"].forEach(n=>{if(r.includes(n))throw new Error(`Cannot set ${n} (it is a calculated value)`)}),r.includes("start")&&r.includes("end")&&r.includes("count"))throw new Error("Cannot set start, end, and count all at the same time");if(r.includes("page")&&(r.includes("start")||r.includes("end")))throw new Error("Cannot set page as well as the start and/or end");if(r.forEach(n=>{n!=="end"&&(this.values[n]=e[n])}),r.includes("page")&&(this.values.start=this.values.count*(this.values.page-1)),r.includes("end")){if(this.values.start>=e.end)throw new Error("The start value cannot be greater than the end value");r.includes("count")?this.values.start=Math.max(0,e.end-(this.values.count-1)):this.values.count=e.end-this.values.start+1,this.values.end=e.end}else{let n=this.values.start+this.values.count-1;this.values.end=n<this.values.start?this.values.end:n}if(typeof this.values.total_available=="number"&&this.values.total_available>0&&(this.values.index_limit=this.values.total_available-1),this.values.count>0&&this.values.start%this.values.count===0&&(this.values.page=Math.floor(this.values.start/this.values.count)+1,typeof this.values.total_available=="number"&&(this.values.total_pages=Math.ceil(this.values.total_available/this.values.count),this.values.page_limit=this.values.total_pages)),!("start"in this.values)||!("count"in this.values))throw new Error("Not enough information given to create Paginator");return this}get(e){return this.values[e]}};Ke.getPossibleKeys=Ve;var de=Ke;var fo=class t{constructor(e,r){this.start=Math.max(Math.min(e,r),0),this.end=Math.max(Math.max(e,r),0)}inSection(e){return e>=this.start&&e<=this.end}overlaps(e){return this.inSection(e.start)||this.inSection(e.end)}calcLength(){return this.end-this.start+1}shifted(e,r=e){return new t(this.start+e,this.end+r)}expanded(e){return this.shifted(-e,e)}},at=fo;var uo=class t{static paginatorKeys=de.getPossibleKeys;constructor(e){this.paginator=new de({start:e.start,count:e.count}),this.queryInfo=L(e),t.paginatorKeys.forEach(r=>{delete this.queryInfo[r]}),this.queryInfo.request_id=this.queryInfo.request_id||0}get(e){return t.paginatorKeys.includes(e)?this.paginator.get(e):this.queryInfo[e]}set(e){let r={...e},n={...e};return t.paginatorKeys.forEach(i=>{i in e?delete n[i]:delete r[i]}),Object.keys(n).length>0&&(this.paginator.set({total_available:void 0}),typeof n.request_id!="number"&&(this.queryInfo.request_id+=1)),this.paginator.set(r),this.queryInfo={...this.queryInfo,...n},this}clone(){let e=L(this.queryInfo);return e.start=this.paginator.get("start"),e.count=this.paginator.get("count"),new t(e)}toSection(){return new at(this.get("start"),this.get("end"))}toLimitSection(){return new at(this.get("start"),this.get("index_limit"))}toJSON(){return{uid:this.get("uid"),request_id:this.get("request_id"),start:this.get("start"),count:this.get("count"),field_tree:this.get("field_tree"),facets:this.get("facets"),sort:this.get("sort"),settings:this.get("settings"),raw_query:this.get("raw_query")}}},Qe=uo;var yi={cache_size:{},connection_attempts:3,datastores_url:"",default_cache_size:20,init_attempts:3,message_formats:{failed_init:"Failed to initialize Pride",failed_record_load:"Failed to load $1",failed_search_run:"Failed to search $1"},ms_between_attempts:1500,obnoxious:!1},C=yi;var _i=(t,e,...r)=>{C.obnoxious&&console.log(`[Pride: ${t}] ${e}`,...r)},Q=_i;var Ai=function(t){let e={};this.clear=n=>(delete e[n],this),this.clearAll=()=>(e={},this);let r=n=>(e[n]??=[],e[n]);this.add=(n,i)=>(r(i).push(n),this),this.remove=(n,i)=>(e[i]=r(i).filter(o=>n!==o),this),this.apply=(n,i=[])=>(r(n).forEach(o=>{o?.(...i)}),this),this.call=(n,...i)=>(this.apply(n,i),this),typeof t=="function"&&t.call(this)},j=Ai;var wi=()=>{let t=new j,e={addObserver:t.add,clearObservers:t.clear,preset:()=>{},removeObserver:t.remove,sendMessage:r=>(r.summary&&(r.class||="info",r.details||="",t.call(r.class,r),Q("Messenger","MESSAGE SENT",r)),e),sendMessageArray:r=>(r?.length>0&&r.forEach(n=>{e.sendMessage(n)}),e)};return e},Ei=wi(),D=Ei;var Oi=function(t,e){this.datastore=t.datastore,this.query=t.query||this.datastore.baseQuery();let r=this,n=t.requestFunc||this.datastore.runQuery,i=t.starting_results||[],o=t.cache_size||C.cache_size[this.datastore.uid]||C.default_cache_size;this.log=function(...p){let x=["Search ("+r.datastore.get("uid")+")",...p];Q.apply(window,x)},this.set=function(p){return r.query.set(p),r.setDataChanged?.apply(this),w.isEmpty(w.omit(p,Ve))||(i=[]),r},this.run=function(p){return r.resultsChanged?.apply(this),w.isUndefined(p)&&(p=o),a(d(r.query.toSection().expanded(p))),r},this.results=function(){return F(new at(r.query.get("start"),Math.min(r.query.get("end"),r.query.get("index_limit"))))};let a=function(p){if(r.log("REQUESTING",p),r.log("TOTAL AVAILABLE (pre-request)",r.query.get("total_available")),p&&r.query.toLimitSection().overlaps(p)){r.log("Sending query...");let x=r.query.clone().set({start:p.start,count:p.calcLength()});n({query:x,failure_message:D.preset("failed_search_run",r.datastore.get("metadata").name),success:function(M){if(M.request.request_id===r.query.get("request_id")){c(M),u(M.response,x.get("start"));let k=M.response.length;k!==0&&k<x.get("count")&&a(p.shifted(k,0))}}})}else r.runDataChanged?.apply(this)},u=function(p,x){let M=!1;r.log("NEW RECORDS",p),w.each(p,function(k,Dt){let pt=Dt+x;w.isUndefined(i[pt])&&(i[pt]=r.createItem?.apply(this,[k]),r.query.toSection().inSection(pt)&&(M=!0))}),r.log("CACHE LENGTH",i.length),(M||w.isEmpty(p))&&r.resultsChanged?.apply(this)},c=function(p){r.datastore.update(p.datastore);let x=w.omit(p.new_request,"start","count");x.specialists=p.specialists,x.total_available=p.total_available,r.query.set(x),r.runDataChanged?.apply(this)},d=function(p){let x=F(p),M=w.indexOf(x,void 0);if(M!==-1){let k=p.start+w.lastIndexOf(x,void 0);return M+=p.start,new at(M,k)}},F=function(p){let x=[];for(let M=p.start;M<=p.end;M++)x.push(i[M]);return x},S=!1,v=[],g=[];this.clearAllObservers=function(){return w.each(v,function(p){p.clearAll()}),r.initialize_observables?.apply(this),r},this.getMute=function(){return S},this.setMute=function(p){return p!==S&&(S=p,r.muteChanged?.apply(this),S||w.each(g,function(x){x.notify()})),r},this.createObservable=function(p,x,M){let k=new j(function(){let Dt=this.add,pt=this.call;v.push(this),M||g.push(this),this.add=function(ot){return(!r.muted||M)&&ot(x()),Dt(ot,"observers"),this},this.notify=function(){if(!r.muted||M){let ot=x();r.log("NOTIFY ("+p+")",ot),pt("observers",ot)}return this}});return r[p+"Changed"]=k.notify,e[p+"Observers"]=k,r},this.createObservable("mute",this.getMute,!0).createObservable("setData",function(){e.getData()}).createObservable("runData",function(){e.getData()}).createObservable("results",this.results),e.set=function(p){return r.set(p),e},e.run=function(p){return r.run(p),e},e.nextPage=function(p){let x=r.query.get("page");return w.isNumber(x)&&x<r.query.get("page_limit")&&(e.set({page:x+1}),e.run(p)),e},e.prevPage=function(p){let x=r.query.get("page");return w.isNumber(x)&&x>1&&(e.set({page:x-1}),e.run(p)),e}},ke=Oi;var vn=async t=>{if(!t.url)throw new Error("No URL given to Pride.Util.request()");Q("Request","Sending HTTP request..."),Q("Request","URL",t.url),Q("Request","CONTENT",JSON.stringify(t.query)),typeof t.attempts!="number"&&(t.attempts=C.connection_attempts),t.attempts-=1;try{let r=await(await fetch(t.url,{credentials:"include",headers:{"Content-Type":"application/json"},method:t.query?"post":"get",...t.query&&{body:JSON.stringify(t.query)}})).json();Q("Request","SUCCESS",r),t.success?.(r),D.sendMessage({class:"success",summary:t.success_message}),r.messages&&D.sendMessageArray(r.messages)}catch(e){t.attempts>0?(Q("Request","Trying request again..."),setTimeout(()=>vn(t),C.ms_between_attempts)):(Q("Request","ERROR",e),t.failure?.(e),D.sendMessage({class:"error",summary:t.failure_message}))}},ft=vn;var lo=class{#t;#o=!1;#n=!1;#i=!1;#e;requestOptions;constructor(e={}){this.#t=new j,this.requestOptions=e}request=e=>(this.#t.add(e.success,"success").add(e.failure,"failure"),this.#o?this.#r():this.#a(),this);#r=e=>{this.#e=e??this.#e,this.#n?this.#s("success"):this.#i&&this.#s("failure")};#a=()=>{this.#o=!0;let e=this.requestOptions;ft({url:typeof e.url=="function"?e.url():e.url,attempts:e.attempts?.()||C.connection_attempts,failure_message:e.failure_message?.(),failure:r=>{this.#i=!0,e.before_failure?.(r),this.#r(r),e.after_failure?.(r)},success:r=>{this.#n=!0,e.before_success?.(r),r=typeof e.edit_response=="function"?e.edit_response(r):r,this.#r(r),e.after_success?.(r)}})};#s=e=>{this.#t.call(e,this.#e).clearAll()}},ut=lo;var po=class{constructor(e){this.data=e}getData(e){let r=this.data.fields.find(i=>i.uid==="resource_access"),n=r?.value??r;e([n].concat(this.data.holdings||[]))}},he=po;var mo=class{constructor(e,r){this.barcode=e,this.data=r;let n=r.fields.find(i=>i.uid==="get_this_url");this.requestBuffer=new ut({url:`${n?.value??""}/${this.barcode}`,failure_message:D.preset("failed_get_this_load",r.names[0]),edit_response:i=>(this.data=i,this.data)})}getData(e){this.requestBuffer.request({success:e})}},ge=mo;var Fi=t=>{let e=document.createElement("div");return e.appendChild(document.createTextNode(t)),e.innerHTML},xe=Fi;var $i={engine:null,registerEngine(t){return t?(this.engine=t,this.updateSelectedRecords(this.engine.listRecords()),this.engine.addObserver(e=>{this.updateSelectedRecords(e)}),this):this},selected(t){return!!this.selectedRecords?.[t.datastore]?.[t.uid]},selectedRecords:null,updateSelectedRecords(t){return this.selectedRecords||={articlesplus:{},databases:{},journals:{},mirlyn:{},website:{}},Array.isArray(t)?t.forEach(e=>{this.selectedRecords[e.datastore]||={},this.selectedRecords[e.datastore][e.uid]=!0}):Object.keys(t).forEach(e=>{this.selectedRecords[e]={},t[e].forEach(r=>{this.selectedRecords[e][r.uid]=!0})}),this}},Je=$i;var Si=function(t){let e=new ut({url:t.source,failure_message:D.preset("failed_record_load",t.names[0]),edit_response:function(a){return t=o(a),t}}),r=null,n={};this.placeHold=function(a,u,c,d){this.renderFull(function(F){let v=ft({url:[function(){let g;return w.each(F.fields,function(p){p.uid==="holdings_url"&&(g=p.value)}),g}(),a,u,c].join("/"),query:!0,failure:function(){D.sendMessage({summary:"Failed to place hold",class:"error"})},success:d,failure_message:"placeHold failed",success_message:"placeHold succeeded"});console.log(v)})},this.getHoldings=function(a){r?r.getData(a):t.complete?(r=new he(t),r.getData(a)):e.request({success:function(u){r=new he(u),r.getData(a)}})},this.getGetThis=function(a,u){n[a]?n[a].getData(u):t.complete?(n[a]=new ge(a,t),n[a].getData(u)):e.request({success:function(c){n[a]=new ge(a,c),n[a].getData(u)}})},this.renderPart=function(a){i(a)},this.renderPartThenCache=function(a){i(a),e.request()},this.renderFull=function(a){t.complete?i(a):e.request({success:a})},this.renderCSL=function(a){this.renderFull(function(u){let c;w.each(u.fields,function(d){d.uid==="csl"&&(c=d.value)}),a(c)})};let i=function(a){a(w.omit(t,"complete","source"),t.complete)},o=function(a){return a.fields=w.map(a.fields,function(u){return u.value_has_html||(u.value=xe(u.value)),w.omit(u,"value_has_html")}),a.names_have_html||(a.names=w.map(a.names,function(u){return xe(u)})),a.uid?a.status=200:a.status=404,Je.selected(a)&&(a.selected=!0),w.omit(a,"names_have_html")};t=o(t)},Lt=Si;var qi=function(t){this.uid=t.data.uid,this.getData=()=>t.data,this.getResults=()=>t.results;let e=!1;this.getMute=()=>e,this.setMute=n=>(e=n,this),this.observables=[];let r=n=>{let i=this;return new j(function(){i.observables.push(this);let a=this.add;this.add=function(u){return i.muted||u(n()),a(u,"observers"),this}})};this.resultsObservers=r(this.getResults),this.setDataObservers=this.runDataObservers=r(this.getData),this.clearAllObservers=()=>(this.observables.forEach(n=>{n.clearAll()}),this)},We=qi;var Ri=function(t){let e=this,r=new ke(t,this);r.createItem=function(o){return new Lt(o)};let n=[],i=[];this.getFacets=function(){return n},this.uid=r.datastore.get("uid"),this.getData=function(){return{uid:e.uid,metadata:L(r.datastore.get("metadata")),sorts:L(r.datastore.get("sorts")),selected_sort:r.query.get("sort"),facets:L(r.query.get("facets")),fields:L(r.datastore.get("fields")),field_tree:L(r.query.get("field_tree")),settings:L(r.query.get("settings")),page:r.query.get("page"),count:r.query.get("count"),total_available:r.query.get("total_available"),total_pages:r.query.get("total_pages"),page_limit:r.query.get("page_limit"),specialists:L(r.query.get("specialists"))}},this.getResults=r.results,r.initialize_observables=function(){e.runDataObservers.add(function(){let o=r.datastore.get("facets");JSON.stringify(i)!==JSON.stringify(o)&&(w.each(n,function(a){a.clearAllObservers()}),n=w.map(o,function(a){return new We({data:w.omit(a,"values"),results:a.values})}),i=o,e.facetsObservers.notify())})},this.getMute=r.getMute,this.setMute=function(o){return w.each(n,function(a){a.setMute(o)}),r.setMute(o),e},r.createObservable("facets",this.getFacets).initialize_observables()},Ge=Ri;var Mi=(t,e=[],r)=>function(n,...i){this.type=t,this.childTypes=e,this.value=n.trim(),this.children=i.length===1&&Array.isArray(i[0])?i[0]:i,this.addChild=o=>{if(!this.childTypes.includes(o.type))throw new Error(`Not a valid child for a ${this.type}`);return this.children.push(o),this},this.contains=o=>this.matches(o)?this:this.children.find(a=>a.contains(o))??!1,this.matches=o=>{let a=Object.keys(o).filter(c=>c!=="children"),{children:u=[]}=o;return a.every(c=>this[c]===o[c])&&u.every(c=>this.children.some(d=>d.matches(c)))},this.serialize=()=>n,this.serializedChildren=()=>this.children.map(o=>o.serialize()),this.toJSON=()=>({type:this.type,value:this.value,children:this.children.map(a=>a.toJSON())}),typeof r=="function"&&r.call(this)},lt=Mi;var Ni=lt("field_boolean",["field_boolean","field"],function(){if(!["AND","OR","NOT"].includes(this.value))throw new Error("Not a valid boolean value");this.serializedChildren=()=>this.children.map(t=>t.type===this.type||t.type==="literal"&&t.value.match(/\s/)?`(${t.serialize()})`:t.serialize()),this.serialize=()=>this.serializedChildren().join(` ${this.value} `)}),ve=Ni;var Ti=lt("field",["value_boolean","literal","tag","special"],function(){this.serialize=()=>`${this.value}: (${this.serializedChildren().join(" ")})`}),He=Ti;var Pi=lt("literal"),Xe=Pi;var Ci=function(t){t=L(t),this.baseQuery=function(){return new Qe({uid:t.uid,sort:t.default_sort,start:0,count:0,settings:{},field_tree:e(),facets:w.reduce(t.facets,function(r,n){return n.required&&!n.fixed&&(r[n.uid]=n.default_value),r},{})})},this.baseSearch=function(){return new Ge({datastore:this})},this.runQuery=function(r){return r.url=t.url,ft(r),this},this.get=function(r){return t[r]},this.update=function(r){w.extend(t,r)};let e=function(r){r=r||new ve("AND");let n=w.reduce(t.fields,function(i,o){if((o.required||o.fixed)&&!i.contains({type:"field",value:o.uid})){let a=new He(o.uid,new Xe(o.default_value));return w.isMatch(i,{type:"field_boolean",value:"AND"})?i.addChild(a):new ve("AND",i,a)}return i},r);return n.matches({type:"field_boolean",children:[]})?{}:n}},Ye=Ci;var bi={Datastore:Ye,DatastoreSearch:Ge,FacetSearch:We,GetThis:ge,Holdings:he,log:Q,nodeFactory:lt,Query:Qe,Record:Lt,SearchBase:ke},yn=bi;var Bi={Field:He,FieldBoolean:ve,Literal:Xe},rt=Bi;var Li=new ut({attempts:()=>C.init_attempts,before_success:t=>{C.default_institution=t.default_institution,C.affiliation=t.affiliation,Ot.array=t.response.map(e=>new Ye(e))},edit_response:()=>null,failure_message:()=>D.preset("failed_init"),url:()=>C.datastores_url}).request,_n=Li;var Di=function(){"use strict";function t(n,i){function o(){this.constructor=n}o.prototype=i.prototype,n.prototype=new o}function e(n,i,o,a){this.message=n,this.expected=i,this.found=o,this.location=a,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,e)}t(e,Error),e.buildMessage=function(n,i){let o={literal:function(v){return'"'+u(v.text)+'"'},class:function(v){let g="",p;for(p=0;p<v.parts.length;p++)g+=v.parts[p]instanceof Array?c(v.parts[p][0])+"-"+c(v.parts[p][1]):c(v.parts[p]);return"["+(v.inverted?"^":"")+g+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(v){return v.description}};function a(v){return v.charCodeAt(0).toString(16).toUpperCase()}function u(v){return v.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(g){return"\\x0"+a(g)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(g){return"\\x"+a(g)})}function c(v){return v.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(g){return"\\x0"+a(g)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(g){return"\\x"+a(g)})}function d(v){return o[v.type](v)}function F(v){let g=new Array(v.length),p,x;for(p=0;p<v.length;p++)g[p]=d(v[p]);if(g.sort(),g.length>0){for(p=1,x=1;p<g.length;p++)g[p-1]!==g[p]&&(g[x]=g[p],x++);g.length=x}switch(g.length){case 1:return g[0];case 2:return g[0]+" or "+g[1];default:return g.slice(0,-1).join(", ")+", or "+g[g.length-1]}}function S(v){return v?'"'+u(v)+'"':"end of input"}return"Expected "+F(n)+" but "+S(i)+" found."};function r(n,i){i=i!==void 0?i:{};let o={},a={start:Ao},u=Ao,c=function(s){return s},d=function(s,f,m){return new rt.FieldBoolean(f,s,m)},F=function(s,f){return f?[s,f]:s},S=function(s){return s},v=":",g=wt(":",!1),p=function(s,f){return new rt.Field(s,f)},x=function(s){return new rt.Field(Yn,s)},M=function(s){return s.join("")},k=function(s,f){return f?s.concat(f):s},Dt=function(s,f){return[new rt.Literal(s+f.join(""))]},pt=function(s){return[new rt.Literal(s.join(""))]},ot=function(s){return[new rt.Literal('"'+s.join("")+'"')]},Fn=function(s){return s},co="AND",$n=wt("AND",!1),ho="OR",Sn=wt("OR",!1),go="NOT",qn=wt("NOT",!1),Rn="'",Mn=wt("'",!1),Nn=/^[^']/,Tn=Et(["'"],!0,!1),Pn='"',Cn=wt('"',!1),bn=/^[^"]/,Bn=Et(['"'],!0,!1),Ln=/^[^ \t\r\n:'"()]/,Dn=Et([" "," ","\r",`
`,":","'",'"',"(",")"],!0,!1),In=/^[^ \t\r\n():]/,zn=Et([" "," ","\r",`
`,"(",")",":"],!0,!1),Un=/^[^ \t\r\n'"():]/,Vn=Et([" "," ","\r",`
`,"'",'"',"(",")",":"],!0,!1),xo=/^[ \t\r\n]/,vo=Et([" "," ","\r",`
`],!1,!1),l=0,ye=[{line:1,column:1}],X=0,Ze=[],N=0;if("startRule"in i){if(!(i.startRule in a))throw new Error(`Can't start parsing from rule "`+i.startRule+'".');u=a[i.startRule]}function wt(s,f){return{type:"literal",text:s,ignoreCase:f}}function Et(s,f,m){return{type:"class",parts:s,inverted:f,ignoreCase:m}}function Kn(){return{type:"end"}}function yo(s){let f=ye[s],m;if(f)return f;for(m=s-1;!ye[m];)m--;for(f=ye[m],f={line:f.line,column:f.column};m<s;)n.charCodeAt(m)===10?(f.line++,f.column=1):f.column++,m++;return ye[s]=f,f}function _o(s,f){let m=yo(s),_=yo(f);return{start:{offset:s,line:m.line,column:m.column},end:{offset:f,line:_.line,column:_.column}}}function I(s){l<X||(l>X&&(X=l,Ze=[]),Ze.push(s))}function Qn(s,f,m){return new e(e.buildMessage(s,f),s,f,m)}function Ao(){let s,f,m;return s=l,f=wo(),f!==o?(m=Xn(),m!==o?(f=c(f),s=f):(l=s,s=o)):(l=s,s=o),s}function wo(){let s,f,m,_,nt,nr;return s=l,f=je(),f!==o?(m=It(),m!==o?(_=Hn(),_!==o?(nt=It(),nt!==o?(nr=wo(),nr!==o?(f=d(f,_,nr),s=f):(l=s,s=o)):(l=s,s=o)):(l=s,s=o)):(l=s,s=o)):(l=s,s=o),s===o&&(s=Eo()),s}function Eo(){let s,f,m;return s=je(),s===o&&(s=l,f=je(),f!==o?(m=kn(),m===o&&(m=null),m!==o?(f=F(f,m),s=f):(l=s,s=o)):(l=s,s=o)),s}function kn(){let s,f,m;return s=l,f=It(),f!==o?(m=Eo(),m!==o?(f=S(m),s=f):(l=s,s=o)):(l=s,s=o),s}function je(){let s,f,m,_;return s=l,f=Jn(),f!==o?(n.charCodeAt(l)===58?(m=v,l++):(m=o,N===0&&I(g)),m!==o?(_=tr(),_!==o?(f=p(f,_),s=f):(l=s,s=o)):(l=s,s=o)):(l=s,s=o),s===o&&(s=l,f=tr(),f!==o&&(f=x(f)),s=f),s}function Jn(){let s,f,m;if(s=l,f=[],m=qo(),m!==o)for(;m!==o;)f.push(m),m=qo();else f=o;return f!==o&&(f=M(f)),s=f,s}function tr(){let s,f,m;return s=l,f=Gn(),f!==o?(m=Wn(),m===o&&(m=null),m!==o?(f=k(f,m),s=f):(l=s,s=o)):(l=s,s=o),s}function Wn(){let s,f,m;return s=l,f=It(),f!==o?(m=tr(),m!==o?(f=S(m),s=f):(l=s,s=o)):(l=s,s=o),s}function Gn(){let s,f,m,_,nt;if(s=l,f=l,N++,m=er(),N--,m===o?f=void 0:(l=f,f=o),f!==o)if(m=rr(),m!==o){if(_=[],nt=Ro(),nt!==o)for(;nt!==o;)_.push(nt),nt=Ro();else _=o;_!==o?(f=Dt(m,_),s=f):(l=s,s=o)}else l=s,s=o;else l=s,s=o;if(s===o){if(s=l,f=l,N++,m=er(),N--,m===o?f=void 0:(l=f,f=o),f!==o){if(m=[],_=rr(),_!==o)for(;_!==o;)m.push(_),_=rr();else m=o;m!==o?(f=pt(m),s=f):(l=s,s=o)}else l=s,s=o;if(s===o){if(s=l,f=Oo(),f!==o){for(m=[],_=Fo();_!==o;)m.push(_),_=Fo();m!==o?(_=Oo(),_!==o?(f=ot(m),s=f):(l=s,s=o)):(l=s,s=o)}else l=s,s=o;if(s===o)if(s=l,f=$o(),f!==o){for(m=[],_=So();_!==o;)m.push(_),_=So();m!==o?(_=$o(),_!==o?(f=ot(m),s=f):(l=s,s=o)):(l=s,s=o)}else l=s,s=o}}return s}function Hn(){let s,f;return s=l,f=er(),f!==o&&(f=Fn(f)),s=f,s}function er(){let s;return n.substr(l,3)===co?(s=co,l+=3):(s=o,N===0&&I($n)),s===o&&(n.substr(l,2)===ho?(s=ho,l+=2):(s=o,N===0&&I(Sn)),s===o&&(n.substr(l,3)===go?(s=go,l+=3):(s=o,N===0&&I(qn)))),s}function Oo(){let s;return n.charCodeAt(l)===39?(s=Rn,l++):(s=o,N===0&&I(Mn)),s}function Fo(){let s;return Nn.test(n.charAt(l))?(s=n.charAt(l),l++):(s=o,N===0&&I(Tn)),s}function $o(){let s;return n.charCodeAt(l)===34?(s=Pn,l++):(s=o,N===0&&I(Cn)),s}function So(){let s;return bn.test(n.charAt(l))?(s=n.charAt(l),l++):(s=o,N===0&&I(Bn)),s}function qo(){let s;return Ln.test(n.charAt(l))?(s=n.charAt(l),l++):(s=o,N===0&&I(Dn)),s}function Ro(){let s;return In.test(n.charAt(l))?(s=n.charAt(l),l++):(s=o,N===0&&I(zn)),s}function rr(){let s;return Un.test(n.charAt(l))?(s=n.charAt(l),l++):(s=o,N===0&&I(Vn)),s}function It(){let s,f;if(s=[],xo.test(n.charAt(l))?(f=n.charAt(l),l++):(f=o,N===0&&I(vo)),f!==o)for(;f!==o;)s.push(f),xo.test(n.charAt(l))?(f=n.charAt(l),l++):(f=o,N===0&&I(vo));else s=o;return s}function Xn(){let s;return s=It(),s===o&&(s=null),s}let Yn=i.defaultFieldName||"all_fields",or=u();if(or!==o&&l===n.length)return or;throw or!==o&&l<n.length&&I(Kn()),Qn(Ze,X<n.length?n.charAt(X):null,X<n.length?_o(X,X+1):_o(X,X))}return{SyntaxError:e,parse:r}}(),An=Di;var Ii=(t,e,r=()=>{})=>{let n=new Lt({complete:!1,names:[],source:`${Ot.get(t)?.get("url")??""}/record/${e}`});return n.renderFull(r),n},wn=Ii;var zi={deepClone:L,escape:xe,FuncBuffer:j,Paginator:de,request:ft,RequestBuffer:ut,Section:at},En=zi;var Ui={AllDatastores:Ot,Core:yn,FieldTree:rt,Messenger:D,Parser:An,PreferenceEngine:Je,Settings:C,Util:En,init:_n,requestRecord:wn},On=Ui;