You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
138 KiB
JavaScript
1 line
138 KiB
JavaScript
3 years ago
|
(()=>{var t={8711:()=>{},4432:()=>{},2065:()=>{},35:()=>{},5074:()=>{},2811:()=>{up.browser=function(){const t=up.util;function e(){return"ActiveXObject"in window}function n(){return!!window.jQuery}return{submitForm:function(t){t.submit()},canPushState:function(){return history.pushState&&"GET"===up.protocol.initialRequestMethod()},canFormatLog:t.negate(e),canPassiveEventListener:t.negate(e),canJQuery:n,canPromise:function(){return!!window.Promise},canEval:t.memoize((function(){try{return new Function("return true")()}catch{return!1}})),assertConfirmed:function(t){if(t.confirm&&!window.confirm(t.confirm))throw up.error.aborted("User canceled action");return!0},popCookie:function(t){let e=document.cookie.match(new RegExp(t+"=(\\w+)"))?.[1];if(e)return document.cookie=t+"=;Max-Age=0;Path=/",e},get jQuery(){return n()||up.fail("jQuery must be published as window.jQuery"),jQuery},isIE11:e,isEdge18:function(){return t.contains(navigator.userAgent," Edge/")}}}()},6346:()=>{const t=up.element;up.BodyShifter=class{constructor(){this.unshiftFns=[],this.reset()}reset(){this.unshiftNow(),this.shiftCount=0}shift(){if(this.shiftCount++,this.shiftCount>1)return;const e=up.viewport.rootHasReducedWidthFromScrollbar(),n=up.viewport.rootOverflowElement();if(this.changeStyle(n,{overflowY:"hidden"}),!e)return;const{body:r}=document,s=up.viewport.scrollbarWidth(),i=s+t.styleNumber(r,"paddingRight");this.changeStyle(r,{paddingRight:i});for(let e of up.viewport.anchoredRight()){const n=s+t.styleNumber(e,"right");this.changeStyle(e,{right:n})}}changeStyle(e,n){this.unshiftFns.push(t.setTemporaryStyle(e,n))}unshift(){this.shiftCount--,0==this.shiftCount&&this.unshiftNow()}unshiftNow(){let t;for(;t=this.unshiftFns.pop();)t()}}},3115:()=>{const t=up.util;up.Cache=class{constructor(t={}){this.config=t,this.store=this.config.store||new up.store.Memory}size(){return this.store.size()}maxSize(){return t.evalOption(this.config.size)}expiryMillis(){return t.evalOption(this.config.expiry)}normalizeStoreKey(t){return this.config.key?this.config.key(t):t.toString()}isEnabled(){return 0!==this.maxSize()&&0!==this.expiryMillis()}clear(){this.store.clear()}log(...t){this.config.logPrefix&&(t[0]=`[${this.config.logPrefix}] ${t[0]}`,up.puts("up.Cache",...t))}keys(){return this.store.keys()}each(e){t.each(this.keys(),(t=>{const n=this.store.get(t);e(t,n.value,n.timestamp)}))}makeRoomForAnotherEntry(){if(this.hasRoomForAnotherEntry())return;let t,e;this.each((function(n,r,s){(!e||e>s)&&(t=n,e=s)})),t&&this.store.remove(t)}hasRoomForAnotherEntry(){const t=this.maxSize();return!t||this.size()<t}alias(e,n){const r=this.get(e,{silent:!0});t.isDefined(r)&&this.set(n,r)}timestamp(){return(new Date).valueOf()}set(t,e){if(this.isEnabled()){this.makeRoomForAnotherEntry();const n=this.normalizeStoreKey(t),r={timestamp:this.timestamp(),value:e};this.store.set(n,r)}}remove(t){const e=this.normalizeStoreKey(t);this.store.remove(e)}isFresh(t){const e=this.expiryMillis();return!e||this.timestamp()-t.timestamp<e}get(t,e={}){const n=this.normalizeStoreKey(t);let r=this.store.get(n);if(r){if(this.isFresh(r))return e.silent||this.log("Cache hit for '%s'",t),r.value;e.silent||this.log("Discarding stale cache entry for '%s'",t),this.remove(t)}else e.silent||this.log("Cache miss for '%s'",t)}}},7948:()=>{const t=up.util,e=up.element;up.Change.Addition=class extends up.Change{constructor(t){super(t),this.responseDoc=t.responseDoc,this.acceptLayer=t.acceptLayer,this.dismissLayer=t.dismissLayer,this.eventPlans=t.eventPlans||[]}handleLayerChangeRequests(){this.layer.isOverlay()&&(this.tryAcceptLayerFromServer(),this.abortWhenLayerClosed(),this.layer.tryAcceptForLocation(),this.abortWhenLayerClosed(),this.tryDismissLayerFromServer(),this.abortWhenLayerClosed(),this.layer.tryDismissForLocation(),this.abortWhenLayerClosed()),this.layer.asCurrent((()=>{for(let t of this.eventPlans)up.emit(t),this.abortWhenLayerClosed()}))}tryAcceptLayerFromServer(){t.isDefined(this.acceptLayer)&&this.layer.isOverlay()&&this.layer.accept(this.acceptLayer)}tryDismissLayerFromServer(){t.isDefined(this.dismissLa
|