unpoly-rails 2.0.0 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of unpoly-rails might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/.yardopts +1 -1
- data/README.md +472 -50
- data/{dist → assets/unpoly}/unpoly-bootstrap3.css +1 -0
- data/assets/unpoly/unpoly-bootstrap3.js +54 -0
- data/{dist → assets/unpoly}/unpoly-bootstrap3.min.css +1 -0
- data/assets/unpoly/unpoly-bootstrap3.min.js +1 -0
- data/{dist → assets/unpoly}/unpoly-bootstrap4.css +1 -0
- data/assets/unpoly/unpoly-bootstrap4.js +54 -0
- data/{dist → assets/unpoly}/unpoly-bootstrap4.min.css +1 -0
- data/assets/unpoly/unpoly-bootstrap4.min.js +1 -0
- data/{dist → assets/unpoly}/unpoly-bootstrap5.css +1 -0
- data/assets/unpoly/unpoly-bootstrap5.js +56 -0
- data/{dist → assets/unpoly}/unpoly-bootstrap5.min.css +1 -0
- data/assets/unpoly/unpoly-bootstrap5.min.js +1 -0
- data/assets/unpoly/unpoly-migrate.js +1281 -0
- data/assets/unpoly/unpoly-migrate.min.js +1 -0
- data/{dist → assets/unpoly}/unpoly.css +23 -6
- data/assets/unpoly/unpoly.es5.js +23195 -0
- data/assets/unpoly/unpoly.es5.min.js +1 -0
- data/assets/unpoly/unpoly.js +21457 -0
- data/assets/unpoly/unpoly.min.css +10 -0
- data/assets/unpoly/unpoly.min.js +1 -0
- data/lib/unpoly-rails.rb +12 -12
- data/lib/unpoly/rails/controller.rb +1 -1
- data/lib/unpoly/rails/engine.rb +13 -20
- data/lib/unpoly/rails/request_echo_headers.rb +1 -1
- data/lib/unpoly/rails/version.rb +1 -1
- metadata +52 -26
- data/CHANGELOG.md +0 -2345
- data/README_RAILS.md +0 -418
- data/dist/unpoly-bootstrap3.js +0 -16
- data/dist/unpoly-bootstrap3.min.js +0 -1
- data/dist/unpoly-bootstrap4.js +0 -16
- data/dist/unpoly-bootstrap4.min.js +0 -1
- data/dist/unpoly-bootstrap5.js +0 -14
- data/dist/unpoly-bootstrap5.min.js +0 -1
- data/dist/unpoly-migrate.js +0 -1306
- data/dist/unpoly-migrate.min.js +0 -1
- data/dist/unpoly.js +0 -22134
- data/dist/unpoly.min.css +0 -1
- data/dist/unpoly.min.js +0 -6
- data/lib/unpoly/tasks.rb +0 -55
data/dist/unpoly.min.css
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
up-wrapper{display:inline-block}up-focus-trap{position:fixed;top:0;left:0;width:0;height:0}up-modal,up-drawer,up-cover,up-modal-backdrop,up-drawer-backdrop,up-modal-viewport,up-drawer-viewport,up-cover-viewport{top:0;left:0;bottom:0;right:0}up-modal-box,up-drawer-box{box-shadow:0 0 10px 1px rgba(0,0,0,0.3)}up-popup{box-shadow:0 0 4px rgba(0,0,0,0.3)}up-modal:focus,up-drawer:focus,up-cover:focus,up-modal-box:focus,up-drawer-box:focus,up-cover-box:focus,up-popup:focus,up-modal:focus-visible,up-drawer:focus-visible,up-cover:focus-visible,up-modal-box:focus-visible,up-drawer-box:focus-visible,up-cover-box:focus-visible,up-popup:focus-visible{outline:none}up-modal,up-drawer,up-cover{z-index:2000;position:fixed}up-modal-backdrop,up-drawer-backdrop{position:absolute;background:rgba(0,0,0,0.4)}up-modal-viewport,up-drawer-viewport,up-cover-viewport{position:absolute;overflow-y:scroll;overflow-x:hidden;overscroll-behavior:contain;text-align:center}up-modal-box,up-drawer-box,up-cover-box,up-popup{display:inline-block;text-align:left;position:relative;box-sizing:border-box;max-width:100%;background-color:#fff;padding:20px;overflow-x:hidden}up-modal-content,up-drawer-content,up-cover-content,up-popup-content{display:block}up-popup{z-index:1000}up-modal-dismiss,up-drawer-dismiss,up-cover-dismiss,up-popup-dismiss{color:#888;position:absolute;top:10px;right:10px;font-size:1.7rem;line-height:0.5}up-modal-viewport{justify-content:center}up-modal[nesting="0"] up-modal-viewport{padding:25px 15px}up-modal[nesting="1"] up-modal-viewport{padding:50px 30px}up-modal[nesting="2"] up-modal-viewport{padding:75px 45px}up-modal[nesting="3"] up-modal-viewport{padding:100px 60px}up-modal[nesting="4"] up-modal-viewport{padding:125px 75px}up-modal[size=small] up-modal-box{width:350px}up-modal[size=medium] up-modal-box{width:650px}up-modal[size=large] up-modal-box{width:1000px}up-modal[size=grow] up-modal-box{width:auto}up-modal[size=full] up-modal-box{width:100%}up-drawer-viewport{text-align:left}up-drawer[position=right] up-drawer-viewport{text-align:right}up-drawer-box{min-height:100vh}up-drawer[size=small] up-drawer-box{width:150px}up-drawer[size=medium] up-drawer-box{width:340px}up-drawer[size=large] up-drawer-box{width:600px}up-drawer[size=grow] up-drawer-box{width:auto}up-drawer[size=full] up-drawer-box{width:100%}up-cover-box{width:100%;min-height:100vh;padding:0}up-popup{padding:15px}up-popup[size=small]{width:180px}up-popup[size=medium]{width:300px}up-popup[size=large]{width:550px}up-popup[size=grow] up-popup{width:auto}up-popup[size=full] up-popup{width:100%}a[up-content],a[up-fragment],a[up-document],[up-href],[up-clickable],[up-accept],[up-dismiss]{cursor:pointer}.up-request-loader{display:none}up-bounds{position:absolute}.up-focusable-content:focus,.up-focusable-content:focus-visible{outline:0}
|
data/dist/unpoly.min.js
DELETED
@@ -1,6 +0,0 @@
|
|
1
|
-
(function(){window.up={version:"2.0.0"}}).call(this),function(){up.mockable=function(t){var e,n;return n=null,(e=function(){return(n||t).apply(null,arguments)}).mock=function(){return n=jasmine.createSpy("mockable",t)},document.addEventListener("up:framework:reset",function(){return n=null}),e}}.call(this),function(){var n,r,e,i,s,t,o,u,a,l,p,c,h,f,d,m,y,g,v,b,w,k,E,S,L,C,_,O,F,T,R,A,x,P,q,D,M,H,j,N,z,B,U,V,K,I,W,Q,X,G,$,J,Y,Z,tt,et,nt,rt,ot,it,st,ut,at,lt,pt,ct,ht,ft,dt,mt,yt,gt,vt,bt,wt,kt,Et,St,Lt,Ct,_t,Ot,Ft,Tt,Rt,At,xt,Pt,qt,Dt,Mt,Ht,jt,Nt,zt,Bt,Ut,Vt,Kt,It,Wt,Qt,Xt,Gt,$t,Jt,Yt,Zt,te,ee,ne,re,oe,ie,se,ue,ae,le,pe,ce=[].slice,he={}.hasOwnProperty;up.util=(i={host:"cross-domain",stripTrailingSlash:(at=function(t,e){return(""===(e=e.toString())||"80"===e)&&"http:"===t||"443"===e&&"https:"===t},!(c=function(){return Promise.resolve()})),search:!0,hash:(bt=function(e){var n,r;return r=void 0,n=!1,function(){var t;return t=1<=arguments.length?ce.call(arguments,0):[],n?r:(n=!0,r=e.apply(this,t))}},!(Ot=function(){}))},Tt=function(t,e){var n,r,o;return e=Ct(e,i),r=Dt(t),n="","cross-domain"===e.host&&(e.host=B(r)),e.host&&(n+=r.protocol+"//"+r.hostname,at(r.protocol,r.port)||(n+=":"+r.port)),o=r.pathname,e.stripTrailingSlash&&(o=o.replace(/\/$/,"")),n+=o,e.search&&(n+=r.search),e.hash&&(n+=r.hash),n},ae=function(t){return Tt(t,{host:!1})},vt=function(t,e){return Tt(t)===Tt(e)},r=location.protocol,n=location.hostname,B=function(t){var e;return(!lt(t)||-1!==t.indexOf("//"))&&(e=Dt(t),n!==e.hostname||r!==e.protocol)},Dt=function(t){var e;return J(t)?e=up.element.get(t):t.pathname?e=t:(e=document.createElement("a")).href=t,e.hostname||(e.href=e.href),"/"!==e.pathname[0]&&((e=Mt(e,["protocol","hostname","port","pathname","search","hash"])).pathname="/"+e.pathname),e},Ft=function(t){return t?t.toUpperCase():"GET"},Et=function(t){return"GET"!==t&&"HEAD"!==t},p=function(t){var e,n,r,o,i,s,u;for(s=t,e=0,r=(i=2<=arguments.length?ce.call(arguments,1):[]).length;e<r;e++)for(n in o=i[e])he.call(o,n)&&(u=o[n],s[n]=u);return s},l=Object.assign||p,le=function(t){var e,n,r;for(e in n=[],t)r=t[e],n.push(r);return n},xt=Object.values||le,ht=function(e){return lt(e)?function(t){return t[e]}:e},gt=function(t,e){var n;return n=function(t,e){return t[e[0]]=e[1],t},yt(t,e).reduce(n,{})},w=yt=function(t,e){var n,r,o,i,s;if(0===t.length)return[];for(e=ht(e),s=[],n=o=0,i=t.length;o<i;n=++o)r=t[n],s.push(e(r,n));return s},k=function(t,e){var n,r;for(r=[];(n=t.next())&&!n.done;)r.push(e(n.value));return r},ee=function(t,e){var n,r,o,i;for(i=[],n=r=0,o=t-1;0<=o?r<=o:o<=r;n=0<=o?++r:--r)i.push(e(n));return i},et=function(t){return null===t},ct=function(t){return void 0===t},U=function(t){return!ct(t)},Z=function(t){return ct(t)||et(t)},G=function(t){return!Z(t)},(N=function(t){return!!Z(t)||(rt(t)&&t[N.key]?t[N.key]():lt(t)||Y(t)?0===t.length:!!ot(t)&&0===Object.keys(t).length)}).key="up.util.isBlank",zt=function(t,e){return null==e&&(e=it),e(t)?t:void 0},it=function(t){return!N(t)},X=function(t){return"function"==typeof t},lt=function(t){return"string"==typeof t||t instanceof String},z=function(t){return"boolean"==typeof t||t instanceof Boolean},nt=function(t){return"number"==typeof t||t instanceof Number},ot=function(t){return"object"==typeof t&&!et(t)&&(ct(t.constructor)||t.constructor===Object)},rt=function(t){var e;return"object"==(e=typeof t)&&!et(t)||"function"===e},V=function(t){return t instanceof Element},ut=function(t){return t instanceof RegExp},J=function(t){return!!(null!=t?t.jquery:void 0)},K=function(t){var e;return!(!t||!(t.addEventListener||(null!=(e=t[0])?e.addEventListener:void 0)))},st=function(t){return rt(t)&&X(t.then)},H=Array.isArray,Q=function(t){return t instanceof FormData},ne=function(t){return H(t)?t:g(t)},Y=function(t){return H(t)||tt(t)||M(t)||J(t)||$(t)},tt=function(t){return t instanceof NodeList},$=function(t){return t instanceof HTMLCollection},M=function(t){return"[object Arguments]"===Object.prototype.toString.call(t)},Rt=function(t){return et(t)?void 0:t},pe=function(t){return Y(t)?t:Z(t)?[]:[t]},y=function(t){return rt(t)&&t[y.key]?t=t[y.key]():Y(t)?t=g(t):ot(t)&&(t=l({},t)),t},g=function(t){return Array.prototype.slice.call(t)},y.key="up.util.copy",Date.prototype[y.key]=function(){return new Date(+this)},wt=function(){var t;return t=1<=arguments.length?ce.call(arguments,0):[],l.apply(null,[{}].concat(ce.call(t)))},kt=function(){var t,e,n,r,o,i,s;for(r={},t=0,n=(i=1<=arguments.length?ce.call(arguments,0):[]).length;t<n;t++)if(o=i[t])for(e in o)s=o[e],U(s)&&(r[e]=s);return r},Ct=function(t,e){return e?wt(e,t):t?y(t):{}},qt=function(t,e){var n;return n=F(t),U(t[0])&&((n=y(n))[e]=t[0]),n},R=function(t,e){var n,r,o,i;for(e=ht(e),i=void 0,r=0,o=t.length;r<o;r++)if(e(n=t[r])){i=n;break}return i},$t=function(t,e){return!!A(t,e)},A=function(t,e){var n,r,o,i;for(e=ht(e),n=r=0,o=t.length;r<o;n=++r)if(i=e(t[n],n))return i},C=function(t,e){var n,r,o,i;for(e=ht(e),i=!0,n=r=0,o=t.length;r<o;n=++r)if(!e(t[n],n)){i=!1;break}return i},f=function(t){return T(t,G)},d=function(t){return Ht(t,G)},re=function(t){return t.length<2?t:Gt(a(t))},oe=function(t,r){var o;return t.length<2?t:(r=ht(r),o=new Set,T(t,function(t,e){var n;return n=r(t,e),!o.has(n)&&(o.add(n),!0)}))},Gt=function(t){var e;return e=[],t.forEach(function(t){return e.push(t)}),e},a=function(t){var e;return e=new Set,t.forEach(function(t){return e.add(t)}),e},T=function(t,n){var r;return n=ht(n),r=[],w(t,function(t,e){if(n(t,e))return r.push(t)}),r},Vt=function(t,n){return n=ht(n),T(t,function(t,e){return!n(t,e)})},D=function(t,e){return T(t,function(t){return m(e,t)})},Qt=function(t,e){return setTimeout(e,t)},Ut=function(t){return setTimeout(t,0)},Bt=function(t){return Promise.resolve().then(t)},t=function(t){var e;return e=!1,Bt(function(){if(!e)return t()}),function(){return e=!0}},ft=function(t){return t[t.length-1]},m=function(t,e){return 0<=t.indexOf(e)},At=function(t,e){var n;return n=Mt(t,Object.keys(e)),I(e,n)},Mt=function(t,e){var n,r,o,i;for(n={},r=0,i=e.length;r<i;r++)(o=e[r])in t&&(n[o]=t[o]);return n},Ht=function(t,e){var n,r;for(r in e=ht(e),n={},t)e(t[r],r,t)&&(n[r]=t[r]);return n},Pt=function(t,n){return Ht(t,function(t,e){return!m(n,e)})},se=function(){return new Promise(Ot)},Kt=function(t,e){var n;if(0<=(n=t.indexOf(e)))return t.splice(n,1),e},L=function(t){var e,n;return n=t,e=2<=arguments.length?ce.call(arguments,1):[],X(n)?n.apply(null,e):n},e={"&":"&","<":"<",">":">",'"':""","'":"'"},E=function(t){return t.replace(/[&<>"']/g,function(t){return e[t]})},S=function(t){return t.replace(/[\\^$*+?.()|[\]{}]/g,"\\$&")},jt=function(t,e){var n;return n=t[e],delete t[e],n},It=function(t,e,n){return t[n]=jt(t,e)},O=function(t,e){if(e(ft(t)))return t.pop()},_=function(t){return O(t,X)},F=function(t){return O(t,ot)||{}},q=function(t){return t},Xt=function(t){return 1===t.length?t[0]:function(){return yt(t,function(t){return t()})}},P=function(t){var e,n,r,o;for(e=[],n=0,r=t.length;n<r;n++)o=t[n],Y(o)?e.push.apply(e,o):e.push(o);return e},x=function(t,e){return P(yt(t,e))},pt=function(t){return!!t},u=function(t,e){return t.then(e,e)},St=function(t){return null!=t?t["catch"](Ot):void 0},Lt=function(){var t,n,r;return n=r=void 0,(t=new Promise(function(t,e){return r=t,n=e})).resolve=r,t.reject=n,t.promise=function(){return t},t},h=function(t){var e;try{return Promise.resolve(t())}catch(n){return e=n,Promise.reject(e)}},j=function(t){return Object.prototype.hasOwnProperty(t)},(I=function(e,n){var t,r;return(null!=e?e.valueOf:void 0)&&(e=e.valueOf()),(null!=n?n.valueOf:void 0)&&(n=n.valueOf()),typeof e==typeof n&&(Y(e)&&Y(n)?W(e,n):rt(e)&&e[I.key]?e[I.key](n):ot(e)&&ot(n)?(t=Object.keys(e),r=Object.keys(n),!!W(t,r)&&C(t,function(t){return I(e[t],n[t])})):e===n)}).key="up.util.isEqual",W=function(t,n){return t.length===n.length&&C(t,function(t,e){return I(t,n[e])})},Jt=function(t,e){return null==e&&(e=" "),lt(t)?(t=t.split(e),t=yt(t,function(t){return t.trim()}),t=T(t,it)):pe(t)},_t=0,Wt=function(t){return y(t).reverse()},Nt=function(t,e){return e+ue(t)},ie=function(t,e){var n,r;if(r=new RegExp("^"+e+"(.+)$"),n=t.match(r))return mt(n[1])},v=function(t,e,r){return pe(e).forEach(function(n){return Object.defineProperty(t,n,{get:function(){var t,e;return e=(t=r.call(this))[n],X(e)&&(e=e.bind(t)),e},set:function(t){return r.call(this)[n]=t}})})},dt=function(t){var e,n,r,o;for(e in n={},t)o=t[e],(r=ie(e,"get_"))?b(n,r,o):n[e]=o;return n},te=function(t){var e,n,r,o,i,s,u,a,l;if(s=200,n="",lt(t))a=(a=(a=t.replace(/[\n\r\t ]+/g," ")).replace(/^[\n\r\t ]+/,"")).replace(/[\n\r\t ]$/,"");else if(ct(t))a="undefined";else if(nt(t)||X(t))a=t.toString();else if(H(t))a="["+yt(t,te).join(", ")+"]",n="]";else if(J(t))a="$("+yt(t,te).join(", ")+")",n=")";else if(V(t)){for(a="<"+t.tagName.toLowerCase(),o=0,i=(u=["id","name","class"]).length;o<i;o++)e=u[o],(l=t.getAttribute(e))&&(a+=" "+e+'="'+l+'"');a+=">",n=">"}else if(ut(t))a=t.toString();else try{a=JSON.stringify(t)}catch(p){if("TypeError"!==(r=p).name)throw r;a="(circular structure)"}return a.length>s&&(a=a.substr(0,s)+" \u2026",a+=n),a},s=/\%[oOdisf]/g,Yt=function(t){var e,n;return n=t,e=2<=arguments.length?ce.call(arguments,1):[],Zt.apply(null,[q,n].concat(ce.call(e)))},o=function(t){return Promise.all(yt(t,St))},{parseURL:Dt,normalizeURL:Tt,urlWithoutHost:ae,matchURLs:vt,normalizeMethod:Ft,methodAllowsPayload:Et,assign:l,assignPolyfill:p,copy:y,copyArrayLike:g,merge:wt,mergeDefined:kt,options:Ct,parseArgIntoOptions:qt,each:w,eachIterator:k,map:yt,flatMap:x,mapObject:gt,times:ee,findResult:A,some:$t,every:C,find:R,filter:T,reject:Vt,intersect:D,compact:f,compactObject:d,uniq:re,uniqBy:oe,last:ft,isNull:et,isDefined:U,isUndefined:ct,isGiven:G,isMissing:Z,isPresent:it,isBlank:N,presence:zt,isObject:rt,isFunction:X,isString:lt,isBoolean:z,isNumber:nt,isElement:V,isJQuery:J,isElementish:K,isPromise:st,isOptions:ot,isArray:H,isFormData:Q,isNodeList:tt,isArguments:M,isList:Y,isRegExp:ut,timer:Qt,contains:m,objectContains:At,toArray:ne,pick:Mt,pickBy:Ht,omit:Pt,unresolvablePromise:se,remove:Kt,memoize:bt,pluckKey:jt,renameKey:It,extractOptions:F,extractCallback:_,noop:Ot,asyncNoop:c,identity:q,escapeHTML:E,escapeRegExp:S,sequence:Xt,evalOption:L,flatten:P,isTruthy:pt,newDeferred:Lt,always:u,muteRejection:St,asyncify:h,isBasicObjectProperty:j,isCrossOrigin:B,task:Ut,microtask:Bt,abortableMicrotask:t,isEqual:I,splitValues:Jt,endsWith:function(t,e){return!(e.length>t.length)&&t.substring(t.length-e.length)===e},wrapList:pe,wrapValue:function(t){var e,n;return n=t,(e=2<=arguments.length?ce.call(arguments,1):[])[0]instanceof n?e[0]:function(t,e,n){n.prototype=t.prototype;var r=new n,o=t.apply(r,e);return Object(o)===o?o:r}(n,e,function(){})},simpleEase:function(t){return t<.5?2*t*t:t*(4-2*t)-1},values:xt,arrayToSet:a,setToArray:Gt,uid:function(){return _t++},upperCaseFirst:ue=function(t){return t[0].toUpperCase()+t.slice(1)},lowerCaseFirst:mt=function(t){return t[0].toLowerCase()+t.slice(1)},getter:b=function(t,e,n){return Object.defineProperty(t,e,{get:n})},delegate:v,literal:dt,reverse:Wt,prefixCamelCase:Nt,unprefixCamelCase:ie,camelToKebabCase:function(t){return t.replace(/[A-Z]/g,function(t){return"-"+t.toLowerCase()})},nullToUndefined:Rt,sprintf:Yt,sprintfWithFormattedArgs:Zt=function(t,e){var n,r,o,i;return r=t,i=e,n=3<=arguments.length?ce.call(arguments,2):[],i?(o=0,i.replace(s,function(){var t;return t=n[o],t=r(te(t)),o+=1,t})):""},renameKeys:function(t,e){var n,r,o;for(n in r={},t)o=t[n],r[e(n)]=o;return r},timestamp:function(){return Math.floor(.001*Date.now())},allSettled:o})}.call(this),function(){var t,o,e,n,r,i,s,u=[].slice;up.error=(s=up.util,o=function(t,e){var n;return null==e&&(e={}),s.isArray(t)&&(t=s.sprintf.apply(s,t)),n=new Error(t),s.assign(n,e),n},n=(e=function(n,r){var e;return null==r&&(r=o),(e=function(){var t,e;return t=1<=arguments.length?u.call(arguments,0):[],(e=r.apply(null,t)).name=n,e}).is=function(t){return t.name===n},e.async=function(){var t;return t=1<=arguments.length?u.call(arguments,0):[],Promise.reject(e.apply(null,t))},e})("up.Failed"),t=e("AbortError",function(t){return o(t||"Aborted")}),i=e("up.NotImplemented"),r=e("up.NotApplicable",function(t,e){return o("Cannot apply change: "+t+" ("+e+")")}),{failed:n,aborted:t,invalidSelector:e("up.InvalidSelector",function(t){return o("Cannot parse selector: "+t)}),notApplicable:r,notImplemented:i,emitGlobal:function(t){var e;return e=t.message,up.emit(window,"error",{message:e,error:t,log:!1})}})}.call(this),function(){up.migrate={config:{}}}.call(this),function(){var t,e,n,r,o,i,s,u,a,l,p,c,h,f=[].slice;up.browser=(h=up.util,l=function(t){return new up.Request(t).loadPage()},c=function(t){return t.submit()},u=h.memoize(function(){return"ActiveXObject"in window}),s=function(){return history.pushState&&"GET"===up.protocol.initialRequestMethod()},i=h.memoize(function(){return!!window.Promise}),n=h.memoize(function(){return!u()}),o=h.memoize(function(){return!u()}),r=function(){return!!window.jQuery},p=function(t){var e,n;return(n=null!=(e=document.cookie.match(new RegExp(t+"=(\\w+)")))?e[1]:void 0)&&(document.cookie=t+"=; expires=Thu, 01-Jan-70 00:00:01 GMT; path=/"),n},t=function(t){return!t.confirm||window.confirm(t.confirm)||function(){throw up.error.aborted("User canceled action")}()},a=function(){return i()},e=function(){var t;return t=1<=arguments.length?f.call(arguments,0):[],r()||up.fail("jQuery must be published as window.jQuery"),jQuery.apply(null,t)},h.literal({loadPage:l,submitForm:c,canPushState:s,canFormatLog:n,canPassiveEventListener:o,canJQuery:r,assertConfirmed:t,isSupported:a,popCookie:p,jQuery:e,isIE11:u}))}.call(this),function(){var n,r,e,o,t,i,s,u,a,l,p,c,h,f,d,m,y,g,v,b,w,k,E,S,L,C,_,O,F,T,R,A,x,P,q,D,M,H,j,N,z,B,U,V,K,I,W,Q,X,G,$,J,Y,Z,tt,et,nt,rt,ot,it,st,ut,at,lt,pt,ct,ht=[].slice;up.element=(ut=up.util,r=up.browser.isIE11()?"msMatchesSelector":"matches",L=function(){var t,e;return e=(t=1<=arguments.length?ht.call(arguments,0):[]).pop(),(t[0]||document).querySelector(e)},i=function(){var t,e;return e=(t=1<=arguments.length?ht.call(arguments,0):[]).pop(),(t[0]||document).querySelectorAll(e)},et=function(t,e){var n;return n=[],z(t,e)&&n.push(t),n.push.apply(n,i(t,e)),n},D=function(t,e){var n;return n=O(e),t.contains(n)},f=function(t,e){return t.closest?t.closest(e):z(t,e)?t:s(t,e)},z=function(t,e){return"function"==typeof t[r]?t[r](e):void 0},s=function(t,e){var n;if(n=t.parentElement)return z(n,e)?n:s(n,e)},u=function(t,e){return _(f(t,e),et(t,e))},O=function(){var t,e;return e=(t=1<=arguments.length?ht.call(arguments,0):[]).pop(),ut.isElement(e)?e:ut.isString(e)?L.apply(null,ht.call(t).concat([e])):ut.isList(e)?(1<e.length&&up.fail("up.element.get(): Cannot cast multiple elements (%o) to a single element",e),e[0]):e},_=function(){var t;return t=1<=arguments.length?ht.call(arguments,0):[],ut.flatMap(t,pt)},pt=function(t){return ut.isString(t)?i(t):ut.wrapList(t)},I=function(t){var e;return t.remove?t.remove():(e=t.parentNode)?e.removeChild(t):void 0},R=function(t){return t.style.display="none"},Z=function(t){return t.style.display=""},rt=function(t,e){return null==e&&(e=!j(t)),e?Z(t):R(t)},it=function(t,e,n){var r;return r=t.classList,null==n&&(n=!r.contains(e)),n?r.add(e):r.remove(e)},ot=function(t,e,n,r){return null==r&&(r=!t.hasAttribute(e)),r?t.setAttribute(e,n):t.removeAttribute(e)},Q=function(t,e){var n,r,o;for(n in r=[],e)o=e[n],ut.isGiven(o)?r.push(t.setAttribute(n,o)):r.push(t.removeAttribute(n));return r},J=function(t,e){var n,r,o,i,s;for(i={},n=0,o=(s=Object.keys(e)).length;n<o;n++)r=s[n],i[r]=t.getAttribute(r);return Q(t,e),function(){return Q(t,i)}},B=function(t){var e,n;return n="meta"+a("name",t),null!=(e=L(n))?e.getAttribute("content"):void 0},P=function(t,e){return t.insertAdjacentElement("beforebegin",e)},W=function(t,e){return t.parentElement.replaceChild(e,t)},w=function(t,e){var o,n,r,i,s,u,a,l,p,c,h,f,d,m,y,g,v;for(o=[],u=t.replace(/\[([\w-]+)(?:[\~\|\^\$\*]?=(["'])?([^\2\]]*?)\2)?\]/g,function(t,e,n,r){return o.push(r||""),"["+e+"]"}).split(/[ >]+/),f=i=m=void 0,a=0,c=u.length;a<c;a++){if(s=u[a],g=void 0,s=s.replace(/^[\w-]+/,function(t){return g=t,""}),i=document.createElement(g||"div"),m||(m=i),s=(s=s.replace(/\#([\w-]+)/,function(t,e){return i.id=e,""})).replace(/\.([\w-]+)/g,function(t,e){return i.classList.add(e),""}),o.length&&(s=s.replace(/\[([\w-]+)\]/g,function(t,e){return i.setAttribute(e,o.shift()),""})),""!==s)throw up.error.invalidSelector(t);null!=f&&f.appendChild(i),f=i}if(e){if(n=ut.pluckKey(e,"class"))for(l=0,h=(d=ut.wrapList(n)).length;l<h;l++)p=d[l],m.classList.add(p);(y=ut.pluckKey(e,"style"))&&X(m,y),(v=ut.pluckKey(e,"text"))&&(m.textContent=v),(r=ut.pluckKey(e,"content"))&&(m.innerHTML=r),Q(m,e)}return m},t=function(t){var e,n,r,o,i,s;return o=t,e=2<=arguments.length?ht.call(arguments,1):[],n=ut.extractOptions(e),2===e.length?(i=e[0],s=e[1]):(i="beforeend",s=e[0]),r=w(s,n),o.insertAdjacentElement(i,r),r},nt=function(){var t,e;return t=1<=arguments.length?ht.call(arguments,0):[],(e=up.fragment).toTarget.apply(e,t)},o=["HTML","BODY","HEAD","TITLE"],e=new RegExp("\\b("+o.join("|")+")\\b","i"),M=up.mockable(function(t){return z(t,o.join(","))}),H=function(t){return e.test(t)},E=function(t){return t.tagName.toLowerCase()},a=function(t,e){return"["+t+'="'+(e=e.replace(/"/g,'\\"'))+'"]'},st=function(t){return"["+t+"]:not(["+t+"=false])"},A=function(t){return t.match(/^[a-z0-9\-_]+$/i)?"#"+t:a("id",t)},h=function(t){return"."+(t=t.replace(/:/g,"\\:"))},v=function(t){return(new DOMParser).parseFromString(t,"text/html")},b=function(t){var e;return(e=document.createRange()).setStart(document.body,0),e.createContextualFragment(t).childNodes[0]},F=function(){return document.documentElement},K=function(t){return t.offsetHeight},g=function(t){var e;return e=Y(t,{transition:"none"}),K(t),e},T=function(t){var e,n,r;return n=(r=ut.isOptions(t)?t:m(t)).transitionProperty,e=r.transitionDuration,!("none"===n||"all"===n&&0===e)},C=function(t){var e,n;return e=t.getBoundingClientRect(),t.style.position="absolute",n=t.offsetParent.getBoundingClientRect(),X(t,{left:e.left-y(t,"margin-left")-n.left,top:e.top-y(t,"margin-top")-n.top,right:"",bottom:""})},$=function(t,e){var n,r,o;for(n in r=[],e)o=e[n],r.push(G(t,n,o));return r},G=function(t,e,n){if(ut.isMissing(t.getAttribute(e)))return t.setAttribute(e,n)},at=function(e){var n,t;return n=e.parentNode,t=ut.toArray(e.childNodes),ut.each(t,function(t){return n.insertBefore(t,e)}),n.removeChild(e)},ct=function(t,e){var n,r;for(null==e&&(e="up-wrapper"),r=w(e);n=t.firstChild;)r.appendChild(n);return t.appendChild(r),r},tt=function(t,e){return ut.nullToUndefined(t.getAttribute(e))},l=function(t,e,n){var r;switch(r=tt(t,e)){case"false":return!1;case"true":case"":case e:return!0;default:if(n)return r}},p=function(t,e){return l(t,e,!0)},V=function(t,e){var n;if((n=t.getAttribute(e))&&(n=n.replace(/_/g,"")).match(/^[\d\.]+$/))return parseFloat(n)},N=function(t,e){var n,r;if(n="function"==typeof t.getAttribute&&null!=(r=t.getAttribute(e))?r.trim():void 0)return JSON.parse(n)},c=function(n,t,r){var o,e;if(null==r&&(r=[]),e=n.getAttribute(t))return o=function(t,e,n){n.prototype=t.prototype;var r=new n,o=t.apply(r,e);return Object(o)===o?o:r}(Function,["event"].concat(ht.call(r),[e]),function(){}),function(t){var e;return e=ut.values(ut.pick(t,r)),o.call.apply(o,[n,t].concat(ht.call(e)))}},d=function(t,e){var n;return null!=(n=f(t,"["+e+"]"))?n.getAttribute(e):void 0},Y=function(t,e){var n;return n=x(t,Object.keys(e)),X(t,e),function(){return X(t,n)}},m=function(t,e){var n;return n=window.getComputedStyle(t),S(n,e)},y=function(t,e){var n;return n=m(t,e),ut.isGiven(n)?parseFloat(n):void 0},x=function(t,e){var n;return n=t.style,S(n,e)},S=function(t,e){return ut.isString(e)?t[e]:ut.pick(t,e)},X=function(t,e){var n,r,o,i;for(n in o=t.style,r=[],e)i=e[n],i=U(n,i),r.push(o[n]=i);return r},U=function(t,e){return ut.isMissing(e)?e="":n.has(t.toLowerCase().replace(/-/,""))&&(e=k(e)),e},n=ut.arrayToSet(["top","right","bottom","left","padding","paddingtop","paddingright","paddingbottom","paddingleft","margin","margintop","marginright","marginbottom","marginleft","borderwidth","bordertopwidth","borderrightwidth","borderbottomwidth","borderleftwidth","width","height","maxwidth","maxheight","minwidth","minheight"]),k=function(t){return ut.isNumber(t)||ut.isString(t)&&/^\d+$/.test(t)?t.toString()+"px":t},j=function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},lt=function(t){var e,n,r,o,i,s,u;for(u=/^up-/,n={},r=0,o=(s=t.attributes).length;r<o;r++)(i=(e=s[r]).name).match(u)&&(n[i]=e.value);return n},q=function(t){return t!==document&&!F().contains(t)},ut.literal({all:i,subtree:et,isInSubtree:D,closest:f,closestAttr:d,matches:z,ancestor:s,around:u,get:O,list:_,remove:I,toggle:rt,toggleClass:it,hide:R,show:Z,metaContent:B,replace:W,insertBefore:P,createFromSelector:w,setAttrs:Q,setTemporaryAttrs:J,affix:t,toSelector:nt,idSelector:A,classSelector:h,isSingleton:M,isSingletonSelector:H,attributeSelector:a,trueAttributeSelector:st,elementTagName:E,createDocumentFromHTML:v,createFromHTML:b,get_root:F,paint:K,concludeCSSTransition:g,hasCSSTransition:T,fixedToAbsolute:C,setMissingAttrs:$,setMissingAttr:G,unwrap:at,wrapChildren:ct,attr:tt,booleanAttr:l,numberAttr:V,jsonAttr:N,callbackAttr:c,booleanOrStringAttr:p,setTemporaryStyle:Y,style:m,styleNumber:y,inlineStyle:x,setStyle:X,isVisible:j,upAttrs:lt,toggleAttr:ot,isDetached:q}))}.call(this),function(){var n,e=[].slice;n=up.util,up.Class=function(){function t(){}return t.getter=function(t,e){return n.getter(this.prototype,t,e)},t.accessor=function(t,e){return Object.defineProperty(this.prototype,t,e)},t.delegate=function(t,e){return n.delegate(this.prototype,t,function(){return this[e]})},t.wrap=function(){var t;return t=1<=arguments.length?e.call(arguments,0):[],n.wrapValue.apply(n,[this].concat(e.call(t)))},t}()}.call(this),function(){var n,r=function(t,e){function n(){this.constructor=t}for(var r in e)o.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty;n=up.util,up.Record=function(t){function e(t){n.assign(this,this.defaults(t),this.attributes(t))}return r(e,t),e.prototype.keys=function(){throw"Return an array of keys"},e.prototype.defaults=function(){return{}},e.prototype.attributes=function(t){return null==t&&(t=this),n.pick(t,this.keys())},e.prototype[""+n.copy.key]=function(){return this.variant()},e.prototype.variant=function(t){return null==t&&(t={}),new this.constructor(n.merge(this.attributes(),t))},e.prototype[""+n.isEqual.key]=function(t){return this.constructor===t.constructor&&n.isEqual(this.attributes(),t.attributes())},e}(up.Class)}.call(this),function(){}.call(this),function(){var c;c=up.element,up.BodyShifter=function(){function t(){this.unshiftFns=[],this.reset()}return t.prototype.reset=function(){return this.unshiftNow(),this.shiftCount=0},t.prototype.shift=function(){var t,e,n,r,o,i,s,u,a,l,p;if(this.shiftCount++,!(1<this.shiftCount)&&(l=up.viewport.rootHasReducedWidthFromScrollbar(),s=up.viewport.rootOverflowElement(),this.changeStyle(s,{overflowY:"hidden"}),l)){for(e=document.body,n=(p=up.viewport.scrollbarWidth())+c.styleNumber(e,"paddingRight"),this.changeStyle(e,{paddingRight:n}),a=[],o=0,i=(u=up.viewport.anchoredRight()).length;o<i;o++)t=u[o],r=p+c.styleNumber(t,"right"),a.push(this.changeStyle(t,{right:r}));return a}},t.prototype.changeStyle=function(t,e){return this.unshiftFns.push(c.setTemporaryStyle(t,e))},t.prototype.unshift=function(){if(this.shiftCount--,!(0<this.shiftCount))return this.unshiftNow()},t.prototype.unshiftNow=function(){var t,e;for(t=[];e=this.unshiftFns.pop();)t.push(e());return t},t}()}.call(this),function(){var o,e=function(t,e){return function(){return t.apply(e,arguments)}},n=[].slice;o=up.util,up.Cache=function(){function t(t){this.config=null!=t?t:{},this.get=e(this.get,this),this.isFresh=e(this.isFresh,this),this.remove=e(this.remove,this),this.set=e(this.set,this),this.alias=e(this.alias,this),this.store=this.config.store||new up.store.Memory}return t.prototype.size=function(){return this.store.size()},t.prototype.maxSize=function(){return o.evalOption(this.config.size)},t.prototype.expiryMillis=function(){return o.evalOption(this.config.expiry)},t.prototype.normalizeStoreKey=function(t){return this.config.key?this.config.key(t):t.toString()},t.prototype.isEnabled=function(){return 0!==this.maxSize()&&0!==this.expiryMillis()},t.prototype.clear=function(){return this.store.clear()},t.prototype.log=function(){var t;if(t=1<=arguments.length?n.call(arguments,0):[],this.config.logPrefix)return t[0]="["+this.config.logPrefix+"] "+t[0],up.puts.apply(up,["up.Cache"].concat(n.call(t)))},t.prototype.keys=function(){return this.store.keys()},t.prototype.each=function(n){return o.each(this.keys(),(r=this,function(t){var e;return e=r.store.get(t),n(t,e.value,e.timestamp)}));var r},t.prototype.makeRoomForAnotherEntry=function(){var r,o;if(!this.hasRoomForAnotherEntry())return o=r=void 0,this.each(function(t,e,n){if(!o||n<o)return r=t,o=n}),r?this.store.remove(r):void 0},t.prototype.hasRoomForAnotherEntry=function(){var t;return!(t=this.maxSize())||this.size()<t},t.prototype.alias=function(t,e){var n;if(n=this.get(t,{silent:!0}),o.isDefined(n))return this.set(e,n)},t.prototype.timestamp=function(){return(new Date).valueOf()},t.prototype.set=function(t,e){var n,r;if(this.isEnabled())return this.makeRoomForAnotherEntry(),r=this.normalizeStoreKey(t),n={timestamp:this.timestamp(),value:e},this.store.set(r,n)},t.prototype.remove=function(t){var e;return e=this.normalizeStoreKey(t),this.store.remove(e)},t.prototype.isFresh=function(t){var e;return!(e=this.expiryMillis())||this.timestamp()-t.timestamp<e},t.prototype.get=function(t,e){var n,r;return null==e&&(e={}),r=this.normalizeStoreKey(t),(n=this.store.get(r))?this.isFresh(n)?(e.silent||this.log("Cache hit for '%s'",t),n.value):(e.silent||this.log("Discarding stale cache entry for '%s'",t),void this.remove(t)):void(e.silent||this.log("Cache miss for '%s'",t))},t}()}.call(this),function(){var n,r=function(t,e){function n(){this.constructor=t}for(var r in e)o.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty;n=up.util,up.Change=function(t){function e(t){this.options=t}return r(e,t),e.prototype.notApplicable=function(t){return up.error.notApplicable(this,t)},e.prototype.execute=function(){throw up.error.notImplemented()},e.prototype.onFinished=function(){var t;return"function"==typeof(t=this.options).onFinished?t.onFinished():void 0},e.prototype.improveHistoryValue=function(t,e){return!1===t||n.isString(t)?t:e},e}(up.Class)}.call(this),function(){var o,i,n=function(t,e){function n(){this.constructor=t}for(var r in e)s.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},s={}.hasOwnProperty;i=up.util,o=up.element,up.Change.Addition=function(t){function e(t){e.__super__.constructor.call(this,t),this.responseDoc=t.responseDoc,this.acceptLayer=t.acceptLayer,this.dismissLayer=t.dismissLayer,this.eventPlans=t.eventPlans||[]}return n(e,t),e.prototype.handleLayerChangeRequests=function(){return this.layer.isOverlay()&&(this.tryAcceptLayerFromServer(),this.abortWhenLayerClosed(),this.layer.tryAcceptForLocation(),this.abortWhenLayerClosed(),this.tryDismissLayerFromServer(),this.abortWhenLayerClosed(),this.layer.tryDismissForLocation(),this.abortWhenLayerClosed()),this.layer.asCurrent((i=this,function(){var t,e,n,r,o;for(o=[],e=0,n=(r=i.eventPlans).length;e<n;e++)t=r[e],up.emit(t),o.push(i.abortWhenLayerClosed());return o}));var i},e.prototype.tryAcceptLayerFromServer=function(){if(i.isDefined(this.acceptLayer)&&this.layer.isOverlay())return this.layer.accept(this.acceptLayer)},e.prototype.tryDismissLayerFromServer=function(){if(i.isDefined(this.dismissLayer)&&this.layer.isOverlay())return this.layer.dismiss(this.dismissLayer)},e.prototype.abortWhenLayerClosed=function(){if(this.layer.isClosed())throw up.error.aborted("Layer was closed")},e.prototype.setSource=function(t){var e,n,r;if(n=t.oldElement,e=t.newElement,"keep"===(r=t.source)&&(r=n&&up.fragment.source(n)),r)return o.setMissingAttr(e,"up-source",i.normalizeURL(r))},e}(up.Change)}.call(this),function(){var n=function(t,e){function n(){this.constructor=t}for(var r in e)o.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty;up.util,up.Change.Removal=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e}(up.Change)}.call(this),function(){var r,o,e=function(t,e){function n(){this.constructor=t}for(var r in e)i.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},i={}.hasOwnProperty;o=up.util,r=up.element,up.Change.CloseLayer=function(t){function n(t){var e;n.__super__.constructor.call(this,t),this.verb=t.verb,this.layer=up.layer.get(t),this.origin=t.origin,this.value=t.value,this.preventable=null==(e=t.preventable)||e}return e(n,t),n.prototype.execute=function(){var t,e,n;if(this.origin&&o.isUndefined(e)&&(e=r.jsonAttr(this.origin,"up-"+this.verb)),!this.layer.isOpen())return Promise.resolve();if(up.browser.assertConfirmed(this.options),up.network.abort((n=this,function(t){return t.layer===n.layer})),this.emitCloseEvent().defaultPrevented&&this.preventable)throw up.error.aborted("Close event was prevented");t=this.layer.parent,this.layer.peel(),this.layer.stack.remove(this.layer),t.restoreHistory(),this.handleFocus(t),this.layer.teardownHandlers(),this.layer.destroyElements(this.options),this.emitClosedEvent(t)},n.prototype.emitCloseEvent=function(){return this.layer.emit(this.buildEvent("up:layer:"+this.verb),{callback:this.layer.callback("on"+o.upperCaseFirst(this.verb)),log:"Will "+this.verb+" "+this.layer})},n.prototype.emitClosedEvent=function(t){var e,n;return e=this.verb+"ed",n=o.upperCaseFirst(e),this.layer.emit(this.buildEvent("up:layer:"+e),{baseLayer:t,callback:this.layer.callback("on"+n),ensureBubbles:!0,log:n+" "+this.layer})},n.prototype.buildEvent=function(t){return up.event.build(t,{layer:this.layer,value:this.value,origin:this.origin})},n.prototype.handleFocus=function(t){var e;return this.layer.overlayFocus.teardown(),null!=(e=t.overlayFocus)&&e.moveToFront(),(this.layer.origin||t.element).focus({preventScroll:!0})},n}(up.Change.Removal)}.call(this),function(){var n,r=function(t,e){function n(){this.constructor=t}for(var r in e)o.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty;n=up.element,up.Change.DestroyFragment=function(t){function e(t){e.__super__.constructor.call(this,t),this.layer=up.layer.get(t)||up.layer.current,this.element=this.options.element,this.animation=this.options.animation,this.log=this.options.log}return r(e,t),e.prototype.execute=function(){return this.parent=this.element.parentNode,up.fragment.markAsDestroying(this.element),up.motion.willAnimate(this.element,this.animation,this.options)?(this.emitDestroyed(),this.animate().then((e=this,function(){return e.wipe()})).then((t=this,function(){return t.onFinished()}))):(this.wipe(),this.emitDestroyed(),this.onFinished());var t,e},e.prototype.animate=function(){return up.motion.animate(this.element,this.animation,this.options)},e.prototype.wipe=function(){return this.layer.asCurrent((t=this,function(){return up.syntax.clean(t.element,{layer:t.layer}),up.browser.canJQuery()?jQuery(t.element).remove():n.remove(t.element)}));var t},e.prototype.emitDestroyed=function(){return up.fragment.emitDestroyed(this.element,{parent:this.parent,log:this.log})},e}(up.Change.Removal)}.call(this),function(){var l,n=function(t,e){function n(){this.constructor=t}for(var r in e)o.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty;l=up.util,up.element,up.Change.FromContent=function(t){function e(t){e.__super__.constructor.call(this,t),this.layers=l.filter(up.layer.getAll(this.options),this.isRenderableLayer),this.origin=this.options.origin,this.preview=this.options.preview,this.mode=this.options.mode,this.origin&&(this.originLayer=up.layer.get(this.origin))}return n(e,t),e.prototype.isRenderableLayer=function(t){return"new"===t||t.isOpen()},e.prototype.getPlans=function(){return this.plans||(this.plans=[],this.options.fragment&&(this.options.target=this.getResponseDoc().rootSelector()),this.expandIntoPlans(this.layers,this.options.target),this.expandIntoPlans(this.layers,this.options.fallback)),this.plans},e.prototype.expandIntoPlans=function(t,o){var i,e,s,n,u,r,a
|
2
|
-
;for(r=[],e=0,n=t.length;e<n;e++)s=t[e],r.push(function(){var t,e,n,r;for(r=[],t=0,e=(n=this.expandTargets(o,s)).length;t<e;t++)a=n[t],u=l.merge(this.options,{target:a,layer:s,placement:this.defaultPlacement()}),i="new"===s?new up.Change.OpenLayer(u):new up.Change.UpdateLayer(u),r.push(this.plans.push(i));return r}.call(this));return r},e.prototype.expandTargets=function(t,e){return up.fragment.expandTargets(t,{layer:e,mode:this.mode,origin:this.origin})},e.prototype.execute=function(){var t,e;return this.options.preload?Promise.resolve():(t=function(t){return t.execute(e.getResponseDoc())},(e=this).seekPlan(t)||this.postflightTargetNotApplicable())},e.prototype.getResponseDoc=function(){var t,e;return this.preview||this.responseDoc||(e=l.pick(this.options,["target","content","fragment","document","html"]),"function"==typeof(t=up.migrate).handleResponseDocOptions&&t.handleResponseDocOptions(e),"content"===this.defaultPlacement()&&(e.target=this.firstExpandedTarget(e.target)),this.responseDoc=new up.ResponseDoc(e)),this.responseDoc},e.prototype.defaultPlacement=function(){if(!this.options.document&&!this.options.fragment)return"content"},e.prototype.firstExpandedTarget=function(t){return this.expandTargets(t||":main",this.layers[0])[0]},e.prototype.preflightProps=function(t){var e;return null==t&&(t={}),e=function(t){return t.preflightProps()},this.seekPlan(e)||t.optional||this.preflightTargetNotApplicable()},e.prototype.preflightTargetNotApplicable=function(){return this.targetNotApplicable("Could not find target in current page")},e.prototype.postflightTargetNotApplicable=function(){return this.targetNotApplicable("Could not find common target in current page and response")},e.prototype.targetNotApplicable=function(t){var e,n;return this.getPlans().length?(n=l.uniq(l.map(this.getPlans(),"target")),e=up.layer.optionToString(this.options.layer),up.fail(t+" (tried selectors %o in %s)",n,e)):this.layers.length?up.fail("No target selector given"):up.fail("Layer %o does not exist",this.options.layer)},e.prototype.seekPlan=function(t){var e,n,r,o,i;for(n=0,r=(i=this.getPlans()).length;n<r;n++){o=i[n];try{return t(o)}catch(s){e=s,up.error.notApplicable.is(e)||function(){throw e}()}}},e}(up.Change)}.call(this),function(){var i,n=function(t,e){function n(){this.constructor=t}for(var r in e)o.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty;i=up.util,up.Change.FromURL=function(t){function e(t){this.options=t,e.__super__.constructor.call(this,this.options),this.options.layer=up.layer.getAll(this.options),this.options.normalizeLayerOptions=!1,this.successOptions=this.options,this.failOptions=up.RenderOptions.deriveFailOptions(this.successOptions)}return n(e,t),e.prototype.execute=function(){var t,e,n;return(t=this.newPageReason())?(up.puts("up.render()",t),up.browser.loadPage(this.options),i.unresolvablePromise()):(e=this.makeRequest(),this.options.preload?e:i.always(e,(n=this,function(t){return n.onRequestSettled(t)})))},e.prototype.newPageReason=function(){return i.isCrossOrigin(this.options.url)?"Loading cross-origin content in new page":up.browser.canPushState()?void 0:"Loading content in new page to restore history support"},e.prototype.makeRequest=function(){var t,e,n;return n=this.preflightPropsForRenderOptions(this.successOptions),t=this.preflightPropsForRenderOptions(this.failOptions,{optional:!0}),e=i.merge(this.successOptions,n,i.renameKeys(t,up.fragment.failKey)),this.request=up.request(e),this.request},e.prototype.preflightPropsForRenderOptions=function(t,e){return new up.Change.FromContent(i.merge(t,{preview:!0})).preflightProps(e)},e.prototype.onRequestSettled=function(t){var e;if(this.response=t,this.response instanceof up.Response){if(this.isSuccessfulResponse())return this.updateContentFromResponse(["Loaded fragment from successful response to %s",this.request.description],this.successOptions);throw e=["Loaded fragment from failed response to %s (HTTP %d)",this.request.description,this.response.status],this.updateContentFromResponse(e,this.failOptions)}throw this.response},e.prototype.isSuccessfulResponse=function(){return!1===this.successOptions.fail||this.response.ok},e.prototype.buildEvent=function(t,e){var n;return n={request:this.request,response:this.response,renderOptions:this.options},up.event.build(t,i.merge(n,e))},e.prototype.updateContentFromResponse=function(t,e){var n;return n=this.buildEvent("up:fragment:loaded",{renderOptions:e}),this.request.assertEmitted(n,{log:t,callback:this.options.onLoaded}),this.augmentOptionsFromResponse(e),new up.Change.FromContent(e).execute()},e.prototype.augmentOptionsFromResponse=function(t){var e,n,r,o;return r=n=this.response.url,(e=this.request.hash)&&(r+=t.hash=e),"GET"===this.response.method?t.source=this.improveHistoryValue(t.source,n):(t.source=this.improveHistoryValue(t.source,"keep"),t.history=!!t.location),t.location=this.improveHistoryValue(t.location,r),t.title=this.improveHistoryValue(t.title,this.response.title),t.eventPlans=this.response.eventPlans,(o=this.response.target)&&(t.target=o),t.document=this.response.text,t.acceptLayer=this.response.acceptLayer,t.dismissLayer=this.response.dismissLayer,t.document||!i.isDefined(t.acceptLayer)&&!i.isDefined(t.dismissLayer)||(t.target=":none"),t.context=i.merge(t.context,this.response.context)},e}(up.Change)}.call(this),function(){var n,r=function(t,e){function n(){this.constructor=t}for(var r in e)o.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty;n=up.util,up.Change.OpenLayer=function(t){function e(t){e.__super__.constructor.call(this,t),this.target=t.target,this.origin=t.origin,this.baseLayer=t.baseLayer}return r(e,t),e.prototype.preflightProps=function(){return{layer:this.baseLayer,mode:this.options.mode,context:this.buildLayer().context,target:this.target}},e.prototype.bestPreflightSelector=function(){return this.target},e.prototype.execute=function(t){if(":none"===this.target?this.content=document.createElement("up-none"):this.content=t.select(this.target),!this.content||this.baseLayer.isClosed())throw this.notApplicable();if(up.puts("up.render()",'Opening element "'+this.target+'" in new overlay'),this.options.title=this.improveHistoryValue(this.options.title,t.getTitle()),this.emitOpenEvent().defaultPrevented)throw up.error.aborted("Open event was prevented");var e;return this.baseLayer.peel(),this.layer=this.buildLayer(),up.layer.stack.push(this.layer),this.layer.createElements(this.content),this.layer.setupHandlers(),this.handleHistory(),this.setSource({newElement:this.content,source:this.options.source}),t.finalizeElement(this.content),up.hello(this.layer.element,{layer:this.layer,origin:this.origin}),this.handleLayerChangeRequests(),this.handleScroll(),this.layer.startOpenAnimation().then((e=this,function(){return e.layer.isOpen()&&e.handleFocus(),e.onFinished()})),this.layer.opening=!1,this.emitOpenedEvent(),this.abortWhenLayerClosed(),new up.RenderResult({layer:this.layer,fragments:[this.content]})},e.prototype.buildLayer=function(){return up.layer.build(n.merge(this.options,{opening:!0}))},e.prototype.handleHistory=function(){return"auto"===this.layer.historyVisible&&(this.layer.historyVisible=up.fragment.hasAutoHistory(this.content)),this.layer.parent.saveHistory(),this.options.history=!0,this.layer.updateHistory(this.options)},e.prototype.handleFocus=function(){var t;return null!=(t=this.baseLayer.overlayFocus)&&t.moveToBack(),this.layer.overlayFocus.moveToFront(),new up.FragmentFocus({fragment:this.content,layer:this.layer,autoMeans:["autofocus","layer"]}).process(this.options.focus)},e.prototype.handleScroll=function(){var t;return t=n.merge(this.options,{fragment:this.content,layer:this.layer,autoMeans:["hash","layer"]}),new up.FragmentScrolling(t).process(this.options.scroll)},e.prototype.emitOpenEvent=function(){return up.emit("up:layer:open",{origin:this.origin,baseLayer:this.baseLayer,layerOptions:this.options,log:"Opening new overlay"})},e.prototype.emitOpenedEvent=function(){return this.layer.emit("up:layer:opened",{origin:this.origin,callback:this.layer.callback("onOpened"),log:"Opened new "+this.layer})},e}(up.Change.Addition)}.call(this),function(){var f,d,n=function(t,e){return function(){return t.apply(e,arguments)}},r=function(t,e){function n(){this.constructor=t}for(var r in e)o.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty;d=up.util,f=up.element,up.Change.UpdateLayer=function(t){function e(t){this.executeStep=n(this.executeStep,this),e.__super__.constructor.call(this,t),this.layer=t.layer,this.target=t.target,this.placement=t.placement,this.context=t.context,this.parseSteps()}return r(e,t),e.prototype.preflightProps=function(){return this.matchPreflight(),{layer:this.layer,mode:this.layer.mode,context:d.merge(this.layer.context,this.context),target:this.bestPreflightSelector()}},e.prototype.bestPreflightSelector=function(){return this.matchPreflight(),d.map(this.steps,"selector").join(", ")||":none"},e.prototype.execute=function(t){var e,n;return this.responseDoc=t,this.matchPostflight(),up.puts("up.render()",'Updating "'+this.bestPreflightSelector()+'" in '+this.layer),this.options.title=this.improveHistoryValue(this.options.title,this.responseDoc.getTitle()),this.setScrollAndFocusOptions(),this.options.saveScroll&&up.viewport.saveScroll({layer:this.layer}),this.options.peel&&this.layer.peel(),d.assign(this.layer.context,this.context),"auto"===this.options.history&&(this.options.history=this.hasAutoHistory()),this.layer.updateHistory(d.pick(this.options,["history","location","title"])),this.handleLayerChangeRequests(),e=this.steps.map(this.executeStep),Promise.all(e).then((n=this,function(){return n.abortWhenLayerClosed(),n.onFinished()})),new up.RenderResult({layer:this.layer,fragments:d.map(this.steps,"newElement")})},e.prototype.executeStep=function(t){var e,n,r,o,i,s,u,a,l,p,c,h;switch(this.setSource(t),t.placement){case"swap":return(e=this.findKeepPlan(t))?(up.fragment.emitKept(e),this.handleFocus(t.oldElement,t),this.handleScroll(t.oldElement,t)):(this.transferKeepableElements(t),i=t.oldElement.parentNode,n=d.merge(t,{beforeStart:function(){return up.fragment.markAsDestroying(t.oldElement)},afterInsert:(h=this,function(){return h.responseDoc.finalizeElement(t.newElement),up.hello(t.newElement,t)}),beforeDetach:(c=this,function(){return up.syntax.clean(t.oldElement,{layer:c.layer})}),afterDetach:function(){return f.remove(t.oldElement),up.fragment.emitDestroyed(t.oldElement,{parent:i,log:!1})},scrollNew:(p=this,function(){return p.handleFocus(t.newElement,t),p.handleScroll(t.newElement,t)})}),up.morph(t.oldElement,t.newElement,t.transition,n));case"content":return o=f.wrapChildren(t.oldElement),r=f.wrapChildren(t.newElement),a=d.merge(t,{placement:"swap",oldElement:o,newElement:r,focus:!1}),this.executeStep(a).then((l=this,function(){return f.unwrap(r),l.handleFocus(t.oldElement,t)}));case"before":case"after":return u=f.wrapChildren(t.newElement),s="before"===t.placement?"afterbegin":"beforeend",t.oldElement.insertAdjacentElement(s,u),this.responseDoc.finalizeElement(u),up.hello(u,t),this.handleFocus(u,t),this.handleScroll(u,t).then(function(){return up.animate(u,t.transition,t)}).then(function(){return f.unwrap(u)});default:return up.fail("Unknown placement: %o",t.placement)}},e.prototype.findKeepPlan=function(t){var e,n,r,o,i,s;if(t.keep)return r=t.oldElement,n=t.newElement,(i=f.booleanOrStringAttr(r,"up-keep"))&&(!0===i&&(i="&"),e={layer:this.layer,origin:r},(o=t.descendantsOnly?up.fragment.get(n,i,e):up.fragment.subtree(n,i,e)[0])&&f.matches(o,"[up-keep]")&&(s={oldElement:r,newElement:o,newData:up.syntax.data(o)},!up.fragment.emitKeep(s).defaultPrevented))?s:void 0},e.prototype.transferKeepableElements=function(t){var e,n,r,o,i,s,u;if(n=[],t.keep)for(e=0,i=(u=t.oldElement.querySelectorAll("[up-keep]")).length;e<i;e++)r=u[e],(s=this.findKeepPlan(d.merge(t,{oldElement:r,descendantsOnly:!0})))&&(o=r.cloneNode(!0),f.replace(r,o),f.replace(s.newElement,r),n.push(s));return t.keepPlans=n},e.prototype.parseSteps=function(){var t,e,n,r,o,i,s;for(this.steps=[],o=[],e=0,n=(r=d.splitValues(this.target,",")).length;e<n;e++)":none"!==(i=r[e])?(t=i.match(/^(.+?)(?:\:(before|after))?$/)||function(){throw up.error.invalidSelector(i)}(),s=d.merge(this.options,{selector:t[1],placement:t[2]||this.placement||"swap"}),o.push(this.steps.push(s))):o.push(void 0);return o},e.prototype.matchPreflight=function(){var t,e,n,r,o;if(!this.matchedPreflight){for(e=0,n=(r=this.steps).length;e<n;e++)o=r[e],t=new up.FragmentFinder(o),o.oldElement||(o.oldElement=t.find()||function(){throw this.notApplicable('Could not find element "'+this.target+'" in current page')}.call(this));return this.resolveOldNesting(),this.matchedPreflight=!0}},e.prototype.matchPostflight=function(){var t,e,n,r;if(!this.matchedPostflight){for(this.matchPreflight(),t=0,e=(n=this.steps).length;t<e;t++)(r=n[t]).newElement=this.responseDoc.select(r.selector)||function(){throw this.notApplicable('Could not find element "'+this.target+'" in server response')}.call(this);return this.options.hungry&&this.addHungrySteps(),this.resolveOldNesting(),this.matchedPostflight=!0}},e.prototype.addHungrySteps=function(){var t,e,n,r,o,i,s,u;for(i=[],e=0,n=(t=up.fragment.all(up.radio.hungrySelector(),this.options)).length;e<n;e++)o=t[e],s=up.fragment.toTarget(o),(r=this.responseDoc.select(s))?(u=f.booleanOrStringAttr(o,"transition"),i.push(this.steps.push({selector:s,oldElement:o,newElement:r,transition:u,placement:"swap"}))):i.push(void 0);return i},e.prototype.containedByRivalStep=function(t,e){return d.some(t,function(t){return t!==e&&("swap"===t.placement||"content"===t.placement)&&t.oldElement.contains(e.oldElement)})},e.prototype.resolveOldNesting=function(){var e,n;return e=d.uniqBy(this.steps,"oldElement"),e=d.reject(e,(n=this,function(t){return n.containedByRivalStep(e,t)})),this.steps=e},e.prototype.setScrollAndFocusOptions=function(){return this.steps.forEach((n=this,function(t,e){if(0<e&&(t.scroll=!1,t.focus=!1),"swap"===t.placement||"content"===t.placement)return t.scrollBehavior="auto",null!=n.focusCapsule?n.focusCapsule:n.focusCapsule=up.FocusCapsule.preserveWithin(t.oldElement)}));var n},e.prototype.handleFocus=function(t,e){return new up.FragmentFocus(d.merge(e,{fragment:t,layer:this.layer,focusCapsule:this.focusCapsule,autoMeans:up.fragment.config.autoFocus})).process(e.focus)},e.prototype.handleScroll=function(t,e){return new up.FragmentScrolling(d.merge(e,{fragment:t,layer:this.layer,autoMeans:up.fragment.config.autoScroll})).process(e.scroll)},e.prototype.hasAutoHistory=function(){var t;return t=d.map(this.steps,"oldElement"),d.some(t,function(t){return up.fragment.hasAutoHistory(t)})},e}(up.Change.Addition)}.call(this),function(){var n,i,r=function(t,e){return function(){return t.apply(e,arguments)}};i=up.util,n=up.element,up.CompilerPass=function(){function t(t,e,n){this.root=t,this.compilers=e,null==n&&(n={}),this.isInSkippedSubtree=r(this.isInSkippedSubtree,this),this.skipSubtrees=n.skip,this.skipSubtrees.length&&this.root.querySelector("[up-keep]")||(this.skipSubtrees=void 0),this.layer=n.layer||up.layer.get(this.root)||up.layer.current,this.errors=[]}return t.prototype.run=function(){var i;if(up.puts("up.hello()","Compiling fragment %o",this.root),this.layer.asCurrent((i=this,function(){var t,e,n,r,o;for(o=[],e=0,n=(r=i.compilers).length;e<n;e++)t=r[e],o.push(i.runCompiler(t));return o})),this.errors.length)throw up.error.failed("Errors while compiling",{errors:this.errors})},t.prototype.runCompiler=function(t){var e,n,r,o,i;if((i=this.select(t.selector)).length){if(t.isDefault||up.puts("up.hello()",'Compiling "%s" on %d element(s)',t.selector,i.length),t.batch)this.compileBatch(t,i);else for(n=0,r=i.length;n<r;n++)o=i[n],this.compileOneElement(t,o);return"function"==typeof(e=up.migrate).postCompile?e.postCompile(i,t):void 0}},t.prototype.compileOneElement=function(t,e){var n,r,o,i;if(n=[t.jQuery?up.browser.jQuery(e):e],1!==t.length&&(r=up.syntax.data(e),n.push(r)),i=this.applyCompilerFunction(t,e,n),o=this.destructorPresence(i))return up.destructor(e,o)},t.prototype.compileBatch=function(t,e){var n,r,o;if(n=[t.jQuery?up.browser.jQuery(e):e],1!==t.length&&(r=i.map(e,up.syntax.data),n.push(r)),o=this.applyCompilerFunction(t,e,n),this.destructorPresence(o))return up.fail("Compilers with { batch: true } cannot return destructors")},t.prototype.applyCompilerFunction=function(t,e,n){var r;try{return t.apply(e,n)}catch(o){return r=o,this.errors.push(r),up.log.error("up.hello()","While compiling %o: %o",e,r),up.error.emitGlobal(r)}},t.prototype.destructorPresence=function(t){if(i.isFunction(t)||i.isArray(t)&&i.every(t,i.isFunction))return t},t.prototype.select=function(t){var e;return e=n.subtree(this.root,i.evalOption(t)),this.skipSubtrees&&(e=i.reject(e,this.isInSkippedSubtree)),e},t.prototype.isInSkippedSubtree=function(t){var e;return!!i.contains(this.skipSubtrees,t)||!!(e=t.parentElement)&&this.isInSkippedSubtree(e)},t}()}.call(this),function(){var n,r=function(t,e){function n(){this.constructor=t}for(var r in e)o.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty;n=up.util,up.Config=function(t){function e(t){this.blueprintFn=null!=t?t:function(){return{}},this.reset()}return r(e,t),e.prototype.reset=function(){return n.assign(this,this.blueprintFn())},e}(up.Class)}.call(this),function(){var r,o,i=function(t,e){return function(){return t.apply(e,arguments)}};o=up.util,r=up.element,up.CSSTransition=function(){function t(t,e,n){this.element=t,this.lastFrameKebab=e,this.onTransitionEnd=i(this.onTransitionEnd,this),this.onFinishEvent=i(this.onFinishEvent,this),this.lastFrameKeysKebab=Object.keys(this.lastFrameKebab),o.some(this.lastFrameKeysKebab,function(t){return t.match(/A-Z/)})&&up.fail("Animation keys must be kebab-case"),this.finishEvent=n.finishEvent,this.duration=n.duration,this.easing=n.easing,this.finished=!1}return t.prototype.start=function(){return 0===this.lastFrameKeysKebab.length?(this.finished=!0,Promise.resolve()):(this.deferred=o.newDeferred(),this.pauseOldTransition(),this.startTime=new Date,this.startFallbackTimer(),this.listenToFinishEvent(),this.listenToTransitionEnd(),this.startMotion(),this.deferred.promise())},t.prototype.listenToFinishEvent=function(){if(this.finishEvent)return this.stopListenToFinishEvent=this.element.addEventListener(this.finishEvent,this.onFinishEvent)},t.prototype.onFinishEvent=function(t){return t.stopPropagation(),this.finish()},t.prototype.startFallbackTimer=function(){var t,e;return t=100,this.fallbackTimer=o.timer(this.duration+t,(e=this,function(){return e.finish()}))},t.prototype.stopFallbackTimer=function(){return clearTimeout(this.fallbackTimer)},t.prototype.listenToTransitionEnd=function(){return this.stopListenToTransitionEnd=up.on(this.element,"transitionend",this.onTransitionEnd)},t.prototype.onTransitionEnd=function(t){var e;if(t.target===this.element&&new Date-this.startTime>.25*this.duration&&(e=t.propertyName,o.contains(this.lastFrameKeysKebab,e)))return this.finish()},t.prototype.finish=function(){if(!this.finished)return this.finished=!0,this.stopFallbackTimer(),"function"==typeof this.stopListenToFinishEvent&&this.stopListenToFinishEvent(),"function"==typeof this.stopListenToTransitionEnd&&this.stopListenToTransitionEnd(),r.concludeCSSTransition(this.element),this.resumeOldTransition(),this.deferred.resolve()},t.prototype.pauseOldTransition=function(){var t,e,n;if(t=r.style(this.element,["transitionProperty","transitionDuration","transitionDelay","transitionTimingFunction"]),r.hasCSSTransition(t))return"all"!==t.transitionProperty&&(n=t.transitionProperty.split(/\s*,\s*/),e=r.style(this.element,n),this.setOldTransitionTargetFrame=r.setTemporaryStyle(this.element,e)),this.setOldTransition=r.concludeCSSTransition(this.element)},t.prototype.resumeOldTransition=function(){return"function"==typeof this.setOldTransitionTargetFrame&&this.setOldTransitionTargetFrame(),"function"==typeof this.setOldTransition?this.setOldTransition():void 0},t.prototype.startMotion=function(){return r.setStyle(this.element,{transitionProperty:Object.keys(this.lastFrameKebab).join(", "),transitionDuration:this.duration+"ms",transitionTimingFunction:this.easing}),r.setStyle(this.element,this.lastFrameKebab)},t}()}.call(this),function(){var a;a=up.util,up.element,up.DestructorPass=function(){function t(t,e){this.fragment=t,this.options=e,this.errors=[]}return t.prototype.run=function(){var t,e,n,r,o,i,s,u;for(r=0,i=(u=this.selectCleanables()).length;r<i;r++){if(t=u[r],n=a.pluckKey(t,"upDestructors"))for(o=0,s=n.length;o<s;o++)e=n[o],this.applyDestructorFunction(e,t);t.classList.remove("up-can-clean")}if(this.errors.length)throw up.error.failed("Errors while destroying",{errors:this.errors})},t.prototype.selectCleanables=function(){var t;return t=a.merge(this.options,{destroying:!0}),up.fragment.subtree(this.fragment,".up-can-clean",t)},t.prototype.applyDestructorFunction=function(t,e){var n;try{return t()}catch(r){return n=r,this.errors.push(n),up.log.error("up.destroy()","While destroying %o: %o",e,n),up.error.emitGlobal(n)}},t}()}.call(this),function(){var i,s,n=function(t,e){function n(){this.constructor=t}for(var r in e)o.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty,u=[].slice;s=up.util,i=up.element,up.EventEmitter=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.keys=function(){return["target","event","baseLayer","callback","log","ensureBubbles"]},e.prototype.emit=function(){var t;return this.logEmission(),this.baseLayer?this.baseLayer.asCurrent((t=this,function(){return t.dispatchEvent()})):this.dispatchEvent(),this.event},e.prototype.dispatchEvent=function(){return this.target.dispatchEvent(this.event),this.ensureBubbles&&i.isDetached(this.target)&&document.dispatchEvent(this.event),"function"==typeof this.callback?this.callback(this.event):void 0},e.prototype.assertEmitted=function(){var t;return!(t=this.emit()).defaultPrevented||function(){throw up.error.aborted("Event "+t.type+" was prevented")}()},e.prototype.logEmission=function(){var t,e,n,r;if(up.log.isEnabled())return t=this.log,s.isArray(t)?(t=(n=t)[0],e=2<=n.length?u.call(n,1):[]):e=[],r=this.event.type,s.isString(t)?up.puts.apply(up,[r,t].concat(u.call(e))):!1!==t?up.puts(r,"Event "+r):void 0},e.fromEmitArgs=function(t,e){var n,r,o;return null==e&&(e={}),r=s.extractOptions(t),r=s.merge(e,r),s.isElementish(t[0])?r.target=i.get(t.shift()):t[0]instanceof up.Layer&&(r.layer=t.shift()),r.layer&&(n=up.layer.get(r.layer),null==r.target&&(r.target=n.element),null==r.baseLayer&&(r.baseLayer=n)),r.baseLayer&&(r.baseLayer=up.layer.get(r.baseLayer)),s.isString(r.target)?r.target=up.fragment.get(r.target,{layer:r.layer}):r.target||(r.target=document),(null!=(o=t[0])?o.preventDefault:void 0)?(r.event=t[0],null==r.log&&(r.log=t[0].log)):s.isString(t[0])?r.event=up.event.build(t[0],r):r.event=up.event.build(r),new this(r)},e}(up.Record)}.call(this),function(){var a,l,n=function(t,e){return function(){return t.apply(e,arguments)}},r=function(t,e){function n(){this.constructor=t}for(var r in e)o.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty;l=up.util,a=up.element,up.EventListener=function(t){function e(t){this.nativeCallback=n(this.nativeCallback,this),e.__super__.constructor.call(this,t),this.key=this.constructor.buildKey(t),this.isDefault=up.framework.booting}return r(e,t),e.prototype.keys=function(){return["element","eventType","selector","callback","jQuery","guard","baseLayer","passive","once"]},e.prototype.bind=function(){var t,e,n;return(e=(t=this.element).upEventListeners||(t.upEventListeners={}))[this.key]&&up.fail("up.on(): The %o callback %o cannot be registered more than once",this.eventType,this.callback),(n=(e[this.key]=this).element).addEventListener.apply(n,this.addListenerArgs())},e.prototype.addListenerArgs=function(){var t;return t=[this.eventType,this.nativeCallback],this.passive&&up.browser.canPassiveEventListener()&&t.push({passive:!0}),t},e.prototype.unbind=function(){var t,e;return(t=this.element.upEventListeners)&&delete t[this.key],(e=this.element).removeEventListener.apply(e,this.addListenerArgs())},e.prototype.nativeCallback=function(t){var e,n,r,o,i,s,u;if(this.once&&this.unbind(),o=t.target,this.selector&&(o=a.closest(o,l.evalOption(this.selector))),!this.guard||this.guard(t))return o?(i=this.jQuery?up.browser.jQuery(o):o,n=[t,i],1!==(s=this.callback.length)&&2!==s&&(r=up.syntax.data(o),n.push(r)),e=function(){return u.callback.apply(o,n)},(u=this).baseLayer?this.baseLayer.asCurrent(e):e()):void 0},e.fromElement=function(t){var e;if(e=t.element.upEventListeners)return e[this.buildKey(t)]},e.buildKey=function(t){var e;return(e=t.callback).upUid||(e.upUid=l.uid()),[t.eventType,t.selector,t.callback.upUid].join("|")},e.unbindNonDefault=function(t){var e,n,r,o,i,s;if(i=t.upEventListeners){for(s=[],e=0,n=(o=l.values(i)).length;e<n;e++)(r=o[e]).isDefault?s.push(void 0):s.push(r.unbind());return s}},e}(up.Record)}.call(this),function(){var a,n=function(t,e){function n(){this.constructor=t}for(var r in e)o.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty;a=up.util,up.EventListenerGroup=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.keys=function(){return["elements","eventTypes","selector","callback","jQuery","guard","baseLayer","passive","once"]},e.prototype.bind=function(){var n;return n=[],this.eachListenerAttributes(function(t){var e;return(e=new up.EventListener(t)).bind(),n.push(function(){return e.unbind()})}),a.sequence(n)},e.prototype.eachListenerAttributes=function(o){var i,s,t,e,n,r;for(r=[],t=0,e=(n=this.elements).length;t<e;t++)i=n[t],r.push(function(){var t,e,n,r;for(r=[],t=0,e=(n=this.eventTypes).length;t<e;t++)s=n[t],r.push(o(this.listenerAttributes(i,s)));return r}.call(this));return r},e.prototype.listenerAttributes=function(t,e){return a.merge(this.attributes(),{element:t,eventType:e})},e.prototype.unbind=function(){return this.eachListenerAttributes(function(t){var e;if(e=up.EventListener.fromElement(t))return e.unbind()})},e.fromBindArgs=function(t,e){var n,r,o,i,s,u;return n=(t=a.copy(t)).pop(),r=t[0].addEventListener?[t.shift()]:a.isJQuery(t[0])||a.isList(t[0])&&t[0][0].addEventListener?t.shift():[document],o=a.splitValues(t.shift()),(i=up.migrate.fixEventTypes)&&(o=i(o)),s=a.extractOptions(t),u=t[0],new this(a.merge({elements:r,eventTypes:o,selector:u,callback:n},s,e))},e}(up.Record)}.call(this),function(){var r,l,o=function(t,e){return function(){return t.apply(e,arguments)}};l=up.util,r=up.element,up.FieldObserver=function(){function t(t,e,n){this.callback=n,this.isNewValues=o(this.isNewValues,this),this.scheduleValues=o(this.scheduleValues,this),this.fields=r.list(t),this.delay=e.delay,this.batch=e.batch}return t.prototype.start=function(){return this.scheduledValues=null,this.processedValues=this.readFieldValues(),this.currentTimer=void 0,this.callbackRunning=!1,this.unbind=up.on(this.fields,"input change",(t=this,function(){return t.check()}));var t},t.prototype.stop=function(){return this.unbind(),this.cancelTimer()},t.prototype.cancelTimer=function(){return clearTimeout(this.currentTimer),this.currentTimer=void 0},t.prototype.scheduleTimer=function(){return this.cancelTimer(),this.currentTimer=l.timer(this.delay,(t=this,function(){return t.currentTimer=void 0,t.requestCallback()}));var t},t.prototype.scheduleValues=function(t){return this.scheduledValues=t,this.scheduleTimer()},t.prototype.isNewValues=function(t){return!l.isEqual(t,this.processedValues)&&!l.isEqual(this.scheduledValues,t)},t.prototype.requestCallback=function(){var t,e,n,r,o;if(null!==this.scheduledValues&&!this.currentTimer&&!this.callbackRunning){if(e=this.changedValues(this.processedValues,this.scheduledValues),this.processedValues=this.scheduledValues,this.scheduledValues=null,this.callbackRunning=!0,t=[],this.batch)t.push(this.callback(e));else for(n in e)r=e[n],t.push(this.callback(r,n));return l.allSettled(t).then((o=this,function(){return o.callbackRunning=!1,o.requestCallback()}))}},t.prototype.changedValues=function(t,e){var n,r,o,i,s,u,a;for(n={},i=(i=Object.keys(t)).concat(Object.keys(e)),r=0,s=(i=l.uniq(i)).length;r<s;r++)a=t[o=i[r]],u=e[o],l.isEqual(a,u)||(n[o]=u);return n},t.prototype.readFieldValues=function(){return up.Params.fromFields(this.fields).toObject()},t.prototype.check=function(){var t;if(t=this.readFieldValues(),this.isNewValues(t))return this.scheduleValues(t)},t}()}.call(this),function(){var u,r,o,i,n=function(t,e){function n(){this.constructor=t}for(var r in e)s.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},s={}.hasOwnProperty;up.util,r=up.element,u=["selectionStart","selectionEnd","scrollLeft","scrollTop"],i=function(t,e){var n,r,o,i;for(i=[],n=0,o=u.length;n<o;n++){r=u[n];try{i.push(e[r]=t[r])}catch(s){s}}return i},o=function(t){var e;if(e=document.activeElement,r.isInSubtree(t,e))return e},up.FocusCapsule=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.keys=function(){return["selector","oldElement"].concat(u)},e.prototype.restore=function(t,e){var n;if(this.wasLost())return(n=r.get(t,this.selector))?(i(this,n),up.focus(n,e),!0):void 0},e.preserveWithin=function(t){var e,n;if(e=o(t))return n={oldElement:t,selector:up.fragment.toTarget(e)},i(e,n),new this(n)},e.prototype.wasLost=function(){return!o(this.oldElement)},e}(up.Record)}.call(this),function(){var n;n=/^([^ >+(]+) (.+)$/,up.FragmentFinder=function(){function t(t){this.options=t,this.origin=this.options.origin,this.selector=this.options.selector,this.layer=this.options.layer}return t.prototype.find=function(){return this.findAroundOrigin()||this.findInLayer()},t.prototype.findAroundOrigin=function(){if(this.origin&&up.fragment.config.matchAroundOrigin&&!up.element.isDetached(this.origin))return this.findClosest()||this.findInVicinity()},t.prototype.findClosest=function(){return up.fragment.closest(this.origin,this.selector,this.options)},t.prototype.findInVicinity=function(){var t,e;if((e=this.selector.match(n))&&(t=up.fragment.closest(this.origin,e[1],this.options)))return up.fragment.getDumb(t,e[2])},t.prototype.findInLayer=function(){return up.fragment.getDumb(this.selector,this.options)},t}()}.call(this),function(){var r,n=function(t,e){function n(){this.constructor=t}for(var r in e)o.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty;r=up.util,up.FragmentProcessor=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.keys=function(){return["fragment","autoMeans","origin","layer"]},e.prototype.process=function(t){return this.tryProcess(t)},e.prototype.tryProcess=function(t){var e,n;if(r.isArray(t))return r.find(t,(n=this,function(t){return n.tryProcess(t)}));if(r.isFunction(t))return this.tryProcess(t(this.fragment,this.attributes()));if(r.isElement(t))return this.processElement();if(r.isString(t)){if("auto"===t)return this.tryProcess(this.autoMeans);if(e=t.match(/^(.+?)-if-(.+?)$/))return this.resolveCondition(e[2])&&this.process(e[1])}return this.processPrimitive(t)},e.prototype.resolveCondition=function(t){if("main"===t)return up.fragment.contains(this.fragment,":main")},e.prototype.findSelector=function(t){var e,n;if(e={layer:this.layer,origin:this.origin},n=up.fragment.get(this.fragment,t,e)||up.fragment.get(t,e))return n;up.warn("up.render()",'Could not find an element matching "%s"',t)},e}(up.Record)}.call(this),function(){var n,r,o,i=function(t,e){function n(){this.constructor=t}for(var r in e)s.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},s={}.hasOwnProperty;o=up.util,r=up.element,n={preventScroll:!0},up.FragmentFocus=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.keys=function(){return e.__super__.keys.call(this).concat(["hash","focusCapsule"])},e.prototype.processPrimitive=function(t){switch(t){case"keep":return this.restoreFocus();case"target":case!0:return this.focusElement(this.fragment);case"layer":return this.focusElement(this.layer.getFocusElement());case"main":return this.focusSelector(":main")
|
3
|
-
;case"hash":return this.focusHash();case"autofocus":return this.autofocus();default:if(o.isString(t))return this.focusSelector(t)}},e.prototype.processElement=function(t){return this.focusElement(t)},e.prototype.resolveCondition=function(t){return"lost"===t?this.wasFocusLost():e.__super__.resolveCondition.call(this,t)},e.prototype.focusSelector=function(t){var e;if(e=this.findSelector(t))return this.focusElement(e)},e.prototype.restoreFocus=function(){var t;return null!=(t=this.focusCapsule)?t.restore(this.fragment,n):void 0},e.prototype.autofocus=function(){var t;if(t=r.subtree(this.fragment,"[autofocus]")[0])return up.focus(t,n),!0},e.prototype.focusElement=function(t){return up.viewport.makeFocusable(t),up.focus(t,n),!0},e.prototype.focusHash=function(){var t;if(t=up.viewport.firstHashTarget(this.hash,{layer:this.layer}))return this.focusElement(t)},e.prototype.wasFocusLost=function(){var t;return null!=(t=this.focusCapsule)?t.wasLost():void 0},e}(up.FragmentProcessor)}.call(this),function(){var e,r=function(t,e){function n(){this.constructor=t}for(var r in e)o.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty;e=up.util,up.element,up.FragmentScrolling=function(t){function n(t){var e;"function"==typeof(e=up.migrate).handleScrollOptions&&e.handleScrollOptions(t),n.__super__.constructor.call(this,t)}return r(n,t),n.prototype.keys=function(){return n.__super__.keys.apply(this,arguments).concat(["hash","mode","revealTop","revealMax","revealSnap","scrollBehavior","scrollSpeed"])},n.prototype.process=function(t){return n.__super__.process.call(this,t)||Promise.resolve()},n.prototype.processPrimitive=function(t){switch(t){case"reset":return this.reset();case"layer":return this.revealLayer();case"main":return this.revealSelector(":main");case"restore":return this.restore();case"hash":return this.hash&&up.viewport.revealHash(this.hash,this.attributes());case"target":case"reveal":case!0:return this.revealElement(this.fragment);default:if(e.isString(t))return this.revealSelector(t)}},n.prototype.processElement=function(t){return this.revealElement(t)},n.prototype.revealElement=function(t){return up.reveal(t,this.attributes())},n.prototype.revealSelector=function(t){var e;if(e=this.findSelector(t))return this.revealElement(e)},n.prototype.revealLayer=function(){return this.revealElement(this.layer.getBoxElement())},n.prototype.reset=function(){return up.viewport.resetScroll(e.merge(this.attributes(),{around:this.fragment}))},n.prototype.restore=function(){return up.viewport.restoreScroll(e.merge(this.attributes(),{around:this.fragment}))},n}(up.FragmentProcessor)}.call(this),function(){var a,e,i=function(t,e){return function(){return t.apply(e,arguments)}};e=up.util,a=up.element,up.HTMLWrapper=function(){function t(t,e){var n,r,o;this.tagName=t,null==e&&(e={}),this.wrapMatch=i(this.wrapMatch,this),o="<"+this.tagName+"[^>]*>",n="</"+this.tagName+">",r="(.|\\s)*?",this.pattern=new RegExp(o+r+n,"ig"),this.attrName="up-wrapped-"+this.tagName}return t.prototype.strip=function(t){return t.replace(this.pattern,"")},t.prototype.wrap=function(t){return t.replace(this.pattern,this.wrapMatch)},t.prototype.wrapMatch=function(t){return this.didWrap=!0,'<meta name="'+this.attrName+'" value="'+e.escapeHTML(t)+'">'},t.prototype.unwrap=function(t){var e,n,r,o,i,s,u;if(this.didWrap){for(s=[],e=0,n=(o=t.querySelectorAll("meta[name='"+this.attrName+"']")).length;e<n;e++)r=(u=o[e]).getAttribute("value"),i=a.createFromHTML(r),s.push(a.replace(u,i));return s}},t}()}.call(this),function(){var n,r,o=function(t,e){return function(){return t.apply(e,arguments)}},i=function(t,e){function n(){this.constructor=t}for(var r in e)s.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},s={}.hasOwnProperty,u=[].slice;n=up.element,r=up.util,up.Layer=function(t){function e(t){if(null==t&&(t={}),this.containsEventTarget=o(this.containsEventTarget,this),this.contains=o(this.contains,this),e.__super__.constructor.call(this,t),!this.mode)throw"missing { mode } option"}return i(e,t),e.prototype.keys=function(){return["element","stack","historyVisible","mode","context","lastScrollTops"]},e.prototype.defaults=function(){return{context:{},lastScrollTops:new up.Cache({size:30,key:up.history.normalizeURL})}},e.prototype.setupHandlers=function(){return up.link.convertClicks(this)},e.prototype.teardownHandlers=function(){},e.prototype.mainTargets=function(){return up.layer.mainTargets(this.mode)},e.prototype.sync=function(){},e.prototype.accept=function(){throw up.error.notImplemented()},e.prototype.dismiss=function(){throw up.error.notImplemented()},e.prototype.peel=function(t){return this.stack.peel(this,t)},e.prototype.evalOption=function(t){return r.evalOption(t,this)},e.prototype.isCurrent=function(){return this.stack.isCurrent(this)},e.prototype.isFront=function(){return this.stack.isFront(this)},e.prototype.isRoot=function(){return this.stack.isRoot(this)},e.prototype.isOverlay=function(){return this.stack.isOverlay(this)},e.prototype.isOpen=function(){return this.stack.isOpen(this)},e.prototype.isClosed=function(){return this.stack.isClosed(this)},e.getter("parent",function(){return this.stack.parentOf(this)}),e.getter("child",function(){return this.stack.childOf(this)}),e.getter("ancestors",function(){return this.stack.ancestorsOf(this)}),e.getter("descendants",function(){return this.stack.descendantsOf(this)}),e.getter("index",function(){return this.stack.indexOf(this)}),e.prototype.getContentElement=function(){return this.contentElement||this.element},e.prototype.getBoxElement=function(){return this.boxElement||this.element},e.prototype.getFocusElement=function(){return this.getBoxElement()},e.prototype.getFirstSwappableElement=function(){throw up.error.notImplemented()},e.prototype.contains=function(t){return n.closest(t,up.layer.anySelector())===this.element},e.prototype.on=function(){var t;return t=1<=arguments.length?u.call(arguments,0):[],this.buildEventListenerGroup(t).bind()},e.prototype.off=function(){var t;return t=1<=arguments.length?u.call(arguments,0):[],this.buildEventListenerGroup(t).unbind()},e.prototype.buildEventListenerGroup=function(t){return up.EventListenerGroup.fromBindArgs(t,{guard:this.containsEventTarget,elements:[this.element],baseLayer:this})},e.prototype.containsEventTarget=function(t){return this.contains(t.target)},e.prototype.wasHitByMouseEvent=function(t){var e;return!(e=document.elementFromPoint(t.clientX,t.clientY))||this.contains(e)},e.prototype.buildEventEmitter=function(t){return up.EventEmitter.fromEmitArgs(t,{layer:this})},e.prototype.emit=function(){var t;return t=1<=arguments.length?u.call(arguments,0):[],this.buildEventEmitter(t).emit()},e.prototype.isDetached=function(){return n.isDetached(this.element)},e.prototype.saveHistory=function(){if(this.isHistoryVisible())return this.savedTitle=document.title,this.savedLocation=up.history.location},e.prototype.restoreHistory=function(){if(this.savedLocation&&(up.history.push(this.savedLocation),this.savedLocation=null),this.savedTitle)return document.title=this.savedTitle,this.savedTitle=null},e.prototype.asCurrent=function(t){return this.stack.asCurrent(this,t)},e.prototype.updateHistory=function(t){if(t.history)return r.isString(t.title)&&(this.title=t.title),r.isString(t.location)?this.location=t.location:void 0},e.accessor("title",{get:function(){return this.showsLiveHistory()?document.title:this.savedTitle},set:function(t){if(this.savedTitle=t,this.showsLiveHistory())return document.title=t}}),e.accessor("location",{get:function(){return this.showsLiveHistory()?up.history.location:this.savedLocation},set:function(t){if(this.savedLocation!==(t=up.history.normalizeURL(t))&&(this.savedLocation=t,this.emit("up:layer:location:changed",{location:t,log:!1}),this.showsLiveHistory()))return up.history.push(t)}}),e.prototype.isHistoryVisible=function(){return this.historyVisible&&(this.isRoot()||this.parent.isHistoryVisible())},e.prototype.showsLiveHistory=function(){return this.isHistoryVisible()&&this.isFront()&&(up.history.config.enabled||this.isRoot())},e.prototype.selector=function(t){return this.constructor.selector(t)},e.selector=function(){throw up.error.notImplemented()},e.prototype.toString=function(){throw up.error.notImplemented()},e.prototype.affix=function(){var t;return t=1<=arguments.length?u.call(arguments,0):[],n.affix.apply(n,[this.getFirstSwappableElement()].concat(u.call(t)))},e}(up.Record)}.call(this),function(){var u,a,e=function(t,e){function n(){this.constructor=t}for(var r in e)o.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty;u=up.element,a=up.util,up.Layer.Overlay=function(t){function s(t){s.__super__.constructor.call(this,t),!0===this.dismissable?this.dismissable=["button","key","outside"]:!1===this.dismissable?this.dismissable=[]:this.dismissable=a.splitValues(this.dismissable),this.acceptLocation&&(this.acceptLocation=new up.URLPattern(this.acceptLocation)),this.dismissLocation&&(this.dismissLocation=new up.URLPattern(this.dismissLocation))}return e(s,t),s.prototype.keys=function(){return s.__super__.keys.call(this).concat(["position","align","size","origin","class","backdrop","openAnimation","closeAnimation","openDuration","closeDuration","openEasing","closeEasing","backdropOpenAnimation","backdropCloseAnimation","dismissable","dismissLabel","dismissAriaLabel","onOpened","onAccept","onAccepted","onDismiss","onDismissed","acceptEvent","dismissEvent","acceptLocation","dismissLocation","opening"])},s.prototype.callback=function(t){var e;if(e=this[t])return e.bind(this)},s.prototype.createElement=function(t){var e;return this.nesting||(this.nesting=this.suggestVisualNesting()),e=a.compactObject({align:this.align,position:this.position,size:this.size,"class":this["class"],nesting:this.nesting}),this.element=this.affixPart(t,null,e)},s.prototype.createBackdropElement=function(t){return this.backdropElement=this.affixPart(t,"backdrop")},s.prototype.createViewportElement=function(t){return this.viewportElement=this.affixPart(t,"viewport",{"up-viewport":""})},s.prototype.createBoxElement=function(t){return this.boxElement=this.affixPart(t,"box")},s.prototype.createContentElement=function(t,e){return this.contentElement=this.affixPart(t,"content"),this.contentElement.appendChild(e)},s.prototype.createDismissElement=function(t){return this.dismissElement=this.affixPart(t,"dismiss",{"up-dismiss":'":button"',"aria-label":this.dismissAriaLabel}),u.affix(this.dismissElement,'span[aria-hidden="true"]',{text:this.dismissLabel})},s.prototype.affixPart=function(t,e,n){return null==n&&(n={}),u.affix(t,this.selector(e),n)},s.selector=function(t){return a.compact(["up",this.mode,t]).join("-")},s.prototype.suggestVisualNesting=function(){var t;return t=this.parent,this.mode===t.mode?1+t.suggestVisualNesting():0},s.prototype.setupHandlers=function(){var t,e,r,n,o,i;return s.__super__.setupHandlers.call(this),this.overlayFocus=new up.OverlayFocus(this),this.supportsDismissMethod("button")&&this.createDismissElement(this.getBoxElement()),this.supportsDismissMethod("outside")&&(this.unbindParentClicked=this.parent.on("up:click",(r=this,function(t,e){var n;return n=r.origin&&r.origin.contains(e),r.onOutsideClicked(t,n)})),this.viewportElement&&up.on(this.viewportElement,"up:click",(e=this,function(t){if(t.target===e.viewportElement)return e.onOutsideClicked(t,!0)}))),this.supportsDismissMethod("key")&&(this.unbindEscapePressed=up.event.onEscape((n=this,function(t){return n.onEscapePressed(t)}))),this.registerClickCloser("up-accept",(o=this,function(t,e){return o.accept(t,e)})),this.registerClickCloser("up-dismiss",(i=this,function(t,e){return i.dismiss(t,e)})),"function"==typeof(t=up.migrate).registerLayerCloser&&t.registerLayerCloser(this),this.registerEventCloser(this.acceptEvent,this.accept),this.registerEventCloser(this.dismissEvent,this.dismiss)},s.prototype.onOutsideClicked=function(t,e){return e&&up.event.halt(t),this.dismiss(":outside")},s.prototype.onEscapePressed=function(t){var e;if(this.isFront()){if(e=up.form.focusedField())return e.blur();if(this.supportsDismissMethod("key"))return up.event.halt(t),this.dismiss(":key")}},s.prototype.registerClickCloser=function(i,s){return this.on("up:click","["+i+"]",function(t){var e,n,r,o;return up.event.halt(t),n=t.target,o=u.jsonAttr(n,i),e={origin:n},(r=new up.OptionsParser(e,n)).booleanOrString("animation"),r.string("easing"),r.number("duration"),r.string("confirm"),s(o,e)})},s.prototype.registerEventCloser=function(t,e){var n;if(t)return this.on(t,(n=this,function(t){return t.preventDefault(),e.call(n,t)}))},s.prototype.tryAcceptForLocation=function(){return this.tryCloseForLocation(this.acceptLocation,this.accept)},s.prototype.tryDismissForLocation=function(){return this.tryCloseForLocation(this.dismissLocation,this.dismiss)},s.prototype.tryCloseForLocation=function(t,e){var n,r,o;if(t&&(r=this.location)&&(o=t.recognize(r)))return n=a.merge(o,{location:r}),e.call(this,n)},s.prototype.teardownHandlers=function(){return s.__super__.teardownHandlers.call(this),"function"==typeof this.unbindParentClicked&&this.unbindParentClicked(),"function"==typeof this.unbindEscapePressed&&this.unbindEscapePressed(),this.overlayFocus.teardown()},s.prototype.destroyElements=function(t){var e,n,r,o,i;return e=function(){return o.startCloseAnimation(t)},i=o=this,r=function(){return i.onElementsRemoved(),"function"==typeof t.onFinished?t.onFinished():void 0},n=a.merge(t,{animation:e,onFinished:r,log:!1}),up.destroy(this.element,n)},s.prototype.onElementsRemoved=function(){},s.prototype.startAnimation=function(t){var e,n;return null==t&&(t={}),n=up.animate(this.getBoxElement(),t.boxAnimation,t),this.backdrop&&!up.motion.isNone(t.boxAnimation)&&(e=up.animate(this.backdropElement,t.backdropAnimation,t)),Promise.all([n,e])},s.prototype.startOpenAnimation=function(t){var e,n;return null==t&&(t={}),this.startAnimation({boxAnimation:null!=(e=t.animation)?e:this.evalOption(this.openAnimation),backdropAnimation:"fade-in",easing:t.easing||this.openEasing,duration:t.duration||this.openDuration}).then((n=this,function(){return n.wasEverVisible=!0}))},s.prototype.startCloseAnimation=function(t){var e,n;return null==t&&(t={}),e=this.wasEverVisible&&(null!=(n=t.animation)?n:this.evalOption(this.closeAnimation)),this.startAnimation({boxAnimation:e,backdropAnimation:"fade-out",easing:t.easing||this.closeEasing,duration:t.duration||this.closeDuration})},s.prototype.accept=function(t,e){return null==t&&(t=null),null==e&&(e={}),this.executeCloseChange("accept",t,e)},s.prototype.dismiss=function(t,e){return null==t&&(t=null),null==e&&(e={}),this.executeCloseChange("dismiss",t,e)},s.prototype.supportsDismissMethod=function(t){return a.contains(this.dismissable,t)},s.prototype.executeCloseChange=function(t,e,n){return n=a.merge(n,{verb:t,value:e,layer:this}),new up.Change.CloseLayer(n).execute()},s.prototype.getFirstSwappableElement=function(){return this.getContentElement().children[0]},s.prototype.toString=function(){return this.mode+" overlay"},s}(up.Layer)}.call(this),function(){var n=function(t,e){function n(){this.constructor=t}for(var r in e)o.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty;up.element,up.Layer.OverlayWithViewport=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.bodyShifter=new up.BodyShifter,e.getParentElement=function(){return document.body},e.prototype.createElements=function(t){return this.shiftBody(),this.createElement(this.constructor.getParentElement()),this.backdrop&&this.createBackdropElement(this.element),this.createViewportElement(this.element),this.createBoxElement(this.viewportElement),this.createContentElement(this.boxElement,t)},e.prototype.onElementsRemoved=function(){return this.unshiftBody()},e.prototype.shiftBody=function(){return this.constructor.bodyShifter.shift()},e.prototype.unshiftBody=function(){return this.constructor.bodyShifter.unshift()},e.prototype.sync=function(){if(this.isDetached()&&this.isOpen())return this.constructor.getParentElement().appendChild(this.element)},e}(up.Layer.Overlay)}.call(this),function(){var n=function(t,e){function n(){this.constructor=t}for(var r in e)o.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty;up.Layer.Cover=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.mode="cover",e}(up.Layer.OverlayWithViewport)}.call(this),function(){var n=function(t,e){function n(){this.constructor=t}for(var r in e)o.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty;up.Layer.Drawer=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.mode="drawer",e}(up.Layer.OverlayWithViewport)}.call(this),function(){var n=function(t,e){function n(){this.constructor=t}for(var r in e)o.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty;up.Layer.Modal=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.mode="modal",e}(up.Layer.OverlayWithViewport)}.call(this),function(){var n=function(t,e){function n(){this.constructor=t}for(var r in e)o.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty;up.element,up.Layer.OverlayWithTether=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.createElements=function(t){return this.origin||up.fail("Missing { origin } option"),this.tether=new up.Tether({anchor:this.origin,align:this.align,position:this.position}),this.createElement(this.tether.parent),this.createContentElement(this.element,t),this.tether.start(this.element)},e.prototype.onElementsRemoved=function(){return this.tether.stop()},e.prototype.sync=function(){if(this.isOpen())return this.isDetached()||this.tether.isDetached()?this.dismiss(":detached",{animation:!1,preventable:!1}):this.tether.sync()},e}(up.Layer.Overlay)}.call(this),function(){var n=function(t,e){function n(){this.constructor=t}for(var r in e)o.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty;up.Layer.Popup=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.mode="popup",e}(up.Layer.OverlayWithTether)}.call(this),function(){var n,r,o=function(t,e){function n(){this.constructor=t}for(var r in e)i.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},i={}.hasOwnProperty;r=up.util,n=up.element,up.Layer.Root=function(t){function e(t){e.__super__.constructor.call(this,t),this.setupHandlers()}return o(e,t),e.mode="root",e.getter("element",function(){return n.root}),e.prototype.getFirstSwappableElement=function(){return document.body},e.selector=function(){return"html"},e.prototype.setupHandlers=function(){if(!this.element.upHandlersApplied)return this.element.upHandlersApplied=!0,e.__super__.setupHandlers.call(this)},e.prototype.sync=function(){return this.setupHandlers()},e.prototype.accept=function(){return this.cannotCloseRoot()},e.prototype.dismiss=function(){return this.cannotCloseRoot()},e.prototype.cannotCloseRoot=function(){throw up.error.failed("Cannot close the root layer")},e.prototype.reset=function(){return r.assign(this,this.defaults())},e.prototype.toString=function(){return"root layer"},e}(up.Layer)}.call(this),function(){var n,i,s=[].slice;i=up.util,n=up.element,up.LayerLookup=function(){function t(t){var e,n,r,o;o=t,e=2<=arguments.length?s.call(arguments,1):[],this.stack=o,!1!==(n=i.parseArgIntoOptions(e,"layer")).normalizeLayerOptions&&up.layer.normalizeOptions(n),this.values=i.splitValues(n.layer),this.origin=n.origin,this.baseLayer=n.baseLayer||this.stack.current,i.isString(this.baseLayer)&&(r=i.merge(n,{baseLayer:this.stack.current,normalizeLayerOptions:!1}),this.baseLayer=new this.constructor(this.stack,this.baseLayer,r).first())}return t.prototype.originLayer=function(){if(this.origin)return this.forElement(this.origin)},t.prototype.first=function(){return this.all()[0]},t.prototype.all=function(){var t,e;return t=i.flatMap(this.values,(e=this,function(t){return e.resolveValue(t)})),t=i.compact(t),t=i.uniq(t)},t.prototype.forElement=function(e){return e=n.get(e),i.find(this.stack.reversed(),function(t){return t.contains(e)})},t.prototype.forIndex=function(t){return this.stack[t]},t.prototype.resolveValue=function(t){if(t instanceof up.Layer)return t;if(i.isNumber(t))return this.forIndex(t);if(/^\d+$/.test(t))return this.forIndex(Number(t));if(i.isElementish(t))return this.forElement(t);switch(t){case"any":return[this.baseLayer].concat(s.call(this.stack.reversed()));case"current":return this.baseLayer;case"closest":return this.stack.selfAndAncestorsOf(this.baseLayer);case"parent":return this.baseLayer.parent;case"ancestor":case"ancestors":return this.baseLayer.ancestors;case"child":return this.baseLayer.child;case"descendant":case"descendants":return this.baseLayer.descendants;case"new":return"new";case"root":return this.stack.root;case"overlay":case"overlays":return i.reverse(this.stack.overlays);case"front":return this.stack.front;case"origin":return this.originLayer();default:return up.fail("Unknown { layer } option: %o",t)}},t}()}.call(this),function(){var u,n=function(t,e){function n(){this.constructor=t}for(var r in e)o.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty,r=[].slice;u=up.util,up.element,up.LayerStack=function(t){function e(){e.__super__.constructor.call(this),this.currentOverrides=[],this.push(this.buildRoot())}return n(e,t),e.prototype.buildRoot=function(){return up.layer.build({mode:"root",stack:this})},e.prototype.remove=function(t){return u.remove(this,t)},e.prototype.peel=function(t,e){var n,r,o,i;return n=u.reverse(t.descendants),o=u.merge(e,{preventable:!1}),r=function(t){return t.dismiss(":peel",o)},i=u.map(n,r),Promise.all(i)},e.prototype.reset=function(){return this.peel(this.root,{animation:!1}),this.currentOverrides=[],this.root.reset()},e.prototype.isOpen=function(t){return 0<=t.index},e.prototype.isClosed=function(t){return!this.isOpen(t)},e.prototype.parentOf=function(t){return this[t.index-1]},e.prototype.childOf=function(t){return this[t.index+1]},e.prototype.ancestorsOf=function(t){return u.reverse(this.slice(0,t.index))},e.prototype.selfAndAncestorsOf=function(t){return[t].concat(r.call(t.ancestors))},e.prototype.descendantsOf=function(t){return this.slice(t.index+1)},e.prototype.isRoot=function(t){return this[0]===t},e.prototype.isOverlay=function(t){return!this.isRoot(t)},e.prototype.isCurrent=function(t){return this.current===t},e.prototype.isFront=function(t){return this.front===t},e.prototype.get=function(){var t;return t=1<=arguments.length?r.call(arguments,0):[],this.getAll.apply(this,t)[0]},e.prototype.getAll=function(){var t;return t=1<=arguments.length?r.call(arguments,0):[],function(t,e,n){n.prototype=t.prototype;var r=new n,o=t.apply(r,e);return Object(o)===o?o:r}(up.LayerLookup,[this].concat(r.call(t)),function(){}).all()},e.prototype.sync=function(){var t,e,n,r,o;for(o=[],t=0,n=(r=this).length;t<n;t++)e=r[t],o.push(e.sync());return o},e.prototype.asCurrent=function(t,e){try{return this.currentOverrides.push(t),e()}finally{this.currentOverrides.pop()}},e.prototype.reversed=function(){return u.reverse(this)},e.prototype.dismissOverlays=function(t,e){var n,r,o,i,s;for(null==t&&(t=null),null==e&&(e={}),e.dismissable=!1,s=[],n=0,r=(i=u.reverse(this.overlays)).length;n<r;n++)o=i[n],s.push(o.dismiss(t,e));return s},e.prototype[""+u.copy.key]=function(){return u.copyArrayLike(this)},u.getter(e.prototype,"count",function(){return this.length}),u.getter(e.prototype,"root",function(){return this[0]}),u.getter(e.prototype,"overlays",function(){return this.root.descendants}),u.getter(e.prototype,"current",function(){return u.last(this.currentOverrides)||this.front}),u.getter(e.prototype,"front",function(){return u.last(this)}),e}(Array)}.call(this),function(){up.util,up.LinkFeedbackURLs=function(){function t(t){var e,n,r,o;r=up.feedback.normalizeURL,this.isSafe=up.link.isSafe(t),this.isSafe&&((n=t.getAttribute("href"))&&"#"!==n&&(this.href=r(n)),(o=t.getAttribute("up-href"))&&(this.upHREF=r(o)),(e=t.getAttribute("up-alias"))&&(this.aliasPattern=new up.URLPattern(e,r)))}return t.prototype.isCurrent=function(t){return this.isSafe&&!!(this.href&&this.href===t||this.upHREF&&this.upHREF===t||this.aliasPattern&&this.aliasPattern.test(t,!1))},t}()}.call(this),function(){var o,i,e=function(t,e){return function(){return t.apply(e,arguments)}};i=up.util,o=up.element,up.LinkPreloader=function(){function t(){this.considerPreload=e(this.considerPreload,this)}return t.prototype.observeLink=function(t){if(up.link.isSafe(t))return this.on(t,"mouseenter",(r=this,function(t){return r.considerPreload(t,!0)})),this.on(t,"mousedown touchstart",(n=this,function(t){return n.considerPreload(t)})),this.on(t,"mouseleave",(e=this,function(t){return e.stopPreload(t)}));var e,n,r},t.prototype.on=function(t,e,n){return up.on(t,e,{passive:!0},n)},t.prototype.considerPreload=function(t,e){var n;if((n=t.target)!==this.currentLink&&(this.reset(),this.currentLink=n,up.link.shouldFollowEvent(t,n)))return e?this.preloadAfterDelay(n):this.preloadNow(n)},t.prototype.stopPreload=function(t){if(t.target===this.currentLink)return this.reset()},t.prototype.reset=function(){var t;if(this.currentLink)return clearTimeout(this.timer),(null!=(t=this.currentRequest)?t.preload:void 0)&&this.currentRequest.abort(),this.currentLink=void 0,this.currentRequest=void 0},t.prototype.preloadAfterDelay=function(t){var e,n,r;return e=null!=(n=o.numberAttr(t,"up-delay"))?n:up.link.config.preloadDelay,this.timer=i.timer(e,(r=this,function(){return r.preloadNow(t)}))},t.prototype.preloadNow=function(t){var e,n;if(!o.isDetached(t))return n=this,e=function(t){return n.currentRequest=t},up.log.muteUncriticalRejection(up.link.preload(t,{onQueued:e})),this.queued=!0;this.reset()},t}()}.call(this),function(){var s,u,e=function(t,e){return function(){return t.apply(e,arguments)}};u=up.util,s=up.element,up.MotionController=function(){function t(t){this.whileForwardingFinishEvent=e(this.whileForwardingFinishEvent,this),this.unmarkCluster=e(this.unmarkCluster,this),this.markCluster=e(this.markCluster,this),this.whenElementFinished=e(this.whenElementFinished,this),this.emitFinishEvent=e(this.emitFinishEvent,this),this.finishOneElement=e(this.finishOneElement,this),this.isActive=e(this.isActive,this),this.expandFinishRequest=e(this.expandFinishRequest,this),this.finish=e(this.finish,this),this.startFunction=e(this.startFunction,this),this.activeClass="up-"+t,this.dataKey="up-"+t+"-finished",this.selector="."+this.activeClass,this.finishEvent="up:"+t+":finish",this.finishCount=0,this.clusterCount=0}return t.prototype.startFunction=function(e,t,n){var r,o,i;return null==n&&(n={}),e=s.list(e),r=function(){return up.log.muteUncriticalRejection(t())},n.trackMotion=null!=(o=n.trackMotion)?o:up.motion.isEnabled(),!1===n.trackMotion?u.microtask(r):(n.trackMotion=!1,this.finish(e).then((i=this,function(){var t;return t=(t=i.whileForwardingFinishEvent(e,r)).then(function(){return i.unmarkCluster(e)}),i.markCluster(e,t),t})))},t.prototype.startMotion=function(t,e,n){var r,o,i;return null==n&&(n={}),o=function(){return e.start()},r=function(){return e.finish()},i=up.on(t,this.finishEvent,r),this.startFunction(t,o,n).then(i)},t.prototype.finish=function(t){var e;return this.finishCount++,0!==this.clusterCount&&up.motion.isEnabled()?(t=this.expandFinishRequest(t),e=u.map(t,this.finishOneElement),Promise.all(e)):Promise.resolve()},t.prototype.expandFinishRequest=function(t){return t?u.flatMap(t,(e=this,function(t){return s.list(s.closest(t,e.selector),s.all(t,e.selector))})):s.all(this.selector);var e},t.prototype.isActive=function(t){return t.classList.contains(this.activeClass)},t.prototype.finishOneElement=function(t){return this.emitFinishEvent(t),this.whenElementFinished(t)},t.prototype.emitFinishEvent=function(t,e){return null==e&&(e={}),e=u.merge({target:t,log:!1},e),up.emit(this.finishEvent,e)},t.prototype.whenElementFinished=function(t){return t[this.dataKey]||Promise.resolve()},t.prototype.markCluster=function(t,e){var n,r,o,i;for(this.clusterCount++,i=[],r=0,o=t.length;r<o;r++)(n=t[r]).classList.add(this.activeClass),i.push(n[this.dataKey]=e);return i},t.prototype.unmarkCluster=function(t){var e,n,r,o;for(this.clusterCount--,o=[],n=0,r=t.length;n<r;n++)(e=t[n]).classList.remove(this.activeClass),o.push(delete e[this.dataKey]);return o},t.prototype.whileForwardingFinishEvent=function(t,e){var n,r,o;return t.length<2?e():(o=this,n=function(e){if(!e.forwarded)return u.each(t,function(t){if(t!==e.target&&o.isActive(t))return o.emitFinishEvent(t,{forwarded:!0})})},r=up.on(t,this.finishEvent,n),e().then(r))},t.prototype.reset=function(){return this.finish().then((t=this,function(){return t.finishCount=0,t.clusterCount=0}));var t},t}()}.call(this),function(){var n,f;f=up.util,n=up.element,up.OptionsParser=function(){function t(t,e,n){this.options=t,this.element=e,this.fail=null!=n?n.fail:void 0}return t.prototype.string=function(t,e){return this.parse(n.attr,t,e)},t.prototype["boolean"]=function(t,e){return this.parse(n.booleanAttr,t,e)},t.prototype.number=function(t,e){return this.parse(n.numberAttr,t,e)},t.prototype.booleanOrString=function(t,e){return this.parse(n.booleanOrStringAttr,t,e)},t.prototype.json=function(t,e){return this.parse(n.jsonAttr,t,e)},t.prototype.parse=function(t,e,n){var r,o,i,s,u,a,l,p,c,h;if(null==n&&(n={}),o=f.wrapList(null!=(c=n.attr)?c:this.attrNameForKey(e)),h=this.options[e],this.element)for(a=0,l=o.length;a<l;a++)r=o[a],null==h&&(h=t(this.element,r));if(null==h&&(h=n["default"]),(p=n.normalize)&&(h=p(h)),f.isDefined(h)&&(this.options[e]=h),(n.fail||this.fail)&&(s=up.fragment.failKey(e)))return i=f.compact(f.map(o,this.deriveFailAttrName)),u=f.merge(n,{attr:i,fail:!1}),this.parse(t,s,u)},t.prototype.deriveFailAttrName=function(t){if(0===t.indexOf("up-"))return"up-fail-"+t.slice(3)},t.prototype.attrNameForKey=function(t){return"up-"+f.camelToKebabCase(t)},t}()}.call(this),function(){var n,i;n=up.element,i=up.util,up.OverlayFocus=function(){function t(t){this.layer=t,this.focusElement=this.layer.getFocusElement()}return t.prototype.moveToFront=function(){var e;if(!this.enabled)return this.enabled=!0,this.untrapFocus=up.on("focusin",(e=this,function(t){return e.onFocus(t)})),this.unsetAttrs=n.setTemporaryAttrs(this.focusElement,{tabindex:"0",role:"dialog","aria-modal":"true"}),this.focusTrapBefore=n.affix(this.focusElement,"beforebegin","up-focus-trap[tabindex=0]"),this.focusTrapAfter=n.affix(this.focusElement,"afterend","up-focus-trap[tabindex=0]")},t.prototype.moveToBack=function(){return this.teardown()},t.prototype.teardown=function(){if(this.enabled)return this.enabled=!1,this.untrapFocus(),this.unsetAttrs(),n.remove(this.focusTrapBefore),n.remove(this.focusTrapAfter)},t.prototype.onFocus=function(t){var e;if(e=t.target,!this.processingFocusEvent)return this.processingFocusEvent=!0,e===this.focusTrapBefore?this.focusEnd():e!==this.focusTrapAfter&&this.layer.contains(e)||this.focusStart(),this.processingFocusEvent=!1},t.prototype.focusStart=function(t){return up.focus(this.focusElement,t)},t.prototype.focusEnd=function(){return this.focusLastDescendant(this.layer.getBoxElement())||this.focusStart()},t.prototype.focusLastDescendant=function(t){var e,n,r,o;for(n=0,r=(o=i.reverse(t.children)).length;n<r;n++)if(e=o[n],up.viewport.tryFocus(e)||this.focusLastDescendant(e))return!0},t}()}.call(this),function(){var d,l,n=function(t,e){return function(){return t.apply(e,arguments)}},r=function(t,e){function n(){this.constructor=t}for(var r in e)o.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty;l=up.util,d=up.element,up.Params=function(t){function e(t){this.arrayEntryToQuery=n(this.arrayEntryToQuery,this),this.clear(),this.addAll(t)}return r(e,t),e.prototype.clear=function(){return this.entries=[]},e.prototype[""+l.copy.key]=function(){return new up.Params(this)},e.prototype.toObject=function(){var t,e,n,r,o,i,s;for(o={},e=0,n=(i=this.entries).length;e<n;e++)r=(t=i[e]).name,s=t.value,l.isBasicObjectProperty(r)||(this.isArrayKey(r)?(o[r]||(o[r]=[]),
|
4
|
-
o[r].push(s)):o[r]=s);return o},e.prototype.toArray=function(){return this.entries},e.prototype.toFormData=function(){var t,e,n,r,o;for(e=new FormData,n=0,r=(o=this.entries).length;n<r;n++)t=o[n],e.append(t.name,t.value);return e.entries||(e.originalArray=this.entries),e},e.prototype.toQuery=function(){var t;return t=l.map(this.entries,this.arrayEntryToQuery),(t=l.compact(t)).join("&")},e.prototype.arrayEntryToQuery=function(t){var e,n;if(n=t.value,!this.isBinaryValue(n))return e=encodeURIComponent(t.name),l.isGiven(n)&&(e+="=",e+=encodeURIComponent(n)),e},e.prototype.isBinaryValue=function(t){return t instanceof Blob},e.prototype.hasBinaryValues=function(){var t;return t=l.map(this.entries,"value"),l.some(t,this.isBinaryValue)},e.prototype.toURL=function(t){var e,n;return e=[t,this.toQuery()],e=l.filter(e,l.isPresent),n=l.contains(t,"?")?"&":"?",e.join(n)},e.prototype.add=function(t,e){return this.entries.push({name:t,value:e})},e.prototype.addAll=function(t){var e,n;if(!l.isMissing(t))return t instanceof this.constructor?(e=this.entries).push.apply(e,t.entries):l.isArray(t)?(n=this.entries).push.apply(n,t):l.isString(t)?this.addAllFromQuery(t):l.isFormData(t)?this.addAllFromFormData(t):l.isObject(t)?this.addAllFromObject(t):up.fail("Unsupport params type: %o",t)},e.prototype.addAllFromObject=function(t){var r,e,n,o,i;for(r in e=[],t)n=t[r],i=l.isArray(n)?n:[n],e.push(function(){var t,e,n;for(n=[],t=0,e=i.length;t<e;t++)o=i[t],n.push(this.add(r,o));return n}.call(this));return e},e.prototype.addAllFromQuery=function(t){var e,n,r,o,i,s,u,a;for(u=[],e=0,n=(i=t.split("&")).length;e<n;e++)(o=i[e])?(r=(s=o.split("="))[0],a=s[1],r=decodeURIComponent(r),a=l.isGiven(a)?decodeURIComponent(a):null,u.push(this.add(r,a))):u.push(void 0);return u},e.prototype.addAllFromFormData=function(t){return l.eachIterator(t.entries(),(e=this,function(t){return e.add.apply(e,t)}));var e},e.prototype.set=function(t,e){return this["delete"](t),this.add(t,e)},e.prototype["delete"]=function(t){return this.entries=l.reject(this.entries,this.matchEntryFn(t))},e.prototype.matchEntryFn=function(e){return function(t){return t.name===e}},e.prototype.get=function(t){return this.isArrayKey(t)?this.getAll(t):this.getFirst(t)},e.prototype.getFirst=function(t){var e;return null!=(e=l.find(this.entries,this.matchEntryFn(t)))?e.value:void 0},e.prototype.getAll=function(t){var e;return this.isArrayKey(t)?this.getAll(t):(e=l.map(this.entries,this.matchEntryFn(t)),l.map(e,"value"))},e.prototype.isArrayKey=function(t){return l.endsWith(t,"[]")},e.prototype[""+l.isBlank.key]=function(){return 0===this.entries.length},e.fromForm=function(t){return t=up.fragment.get(t),this.fromFields(up.form.fields(t))},e.fromFields=function(t){var e,n,r,o,i;for(o=new this,n=0,r=(i=l.wrapList(t)).length;n<r;n++)e=i[n],o.addField(e);return o},e.prototype.addField=function(t){var e,n,r,o,i,s,u,a,l,p,c,h,f;if(new this.constructor,(s=(t=d.get(t)).name)&&!t.disabled){if(h=t.tagName,f=t.type,"SELECT"===h){for(p=[],n=0,o=(a=t.querySelectorAll("option")).length;n<o;n++)(u=a[n]).selected?p.push(this.add(s,u.value)):p.push(void 0);return p}if("checkbox"!==f&&"radio"!==f){if("file"!==f)return this.add(s,t.value);for(c=[],r=0,i=(l=t.files).length;r<i;r++)e=l[r],c.push(this.add(s,e));return c}if(t.checked)return this.add(s,t.value)}},e.prototype[""+l.isEqual.key]=function(t){return t&&this.constructor===t.constructor&&l.isEqual(this.entries,t.entries)},e.fromURL=function(t){var e,n;return e=new this,(n=l.parseURL(t).search)&&(n=n.replace(/^\?/,""),e.addAll(n)),e},e.stripURL=function(t){return l.normalizeURL(t,{search:!1})},e}(up.Class)}.call(this),function(){var n=function(t,e){function n(){this.constructor=t}for(var r in e)o.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty;up.util,up.Rect=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.keys=function(){return["left","top","width","height"]},e.getter("bottom",function(){return this.top+this.height}),e.getter("right",function(){return this.left+this.width}),e.fromElement=function(t){return new this(t.getBoundingClientRect())},e}(up.Record)}.call(this),function(){var n,t,r,e,o,i,s,u,a,l;n=up.util,up.RenderOptions=(e={solo:(r={hungry:!0,keep:!0,source:!0,saveScroll:!0,fail:"auto"},!1),confirm:!1,feedback:!1},o=["url","method","origin","headers","params","cache","solo","confirm","feedback","origin","baseLayer","fail"].concat(["keep","hungry","history","source","saveScroll","fallback","navigate"]),t=["url","content","fragment","document"],u=function(t){if(t.navigate)return up.fragment.config.navigateOptions},a=function(t){if(t.preload)return e},s=function(t){var e,n,r,o;for(e in n={},t)o=t[e],(r=up.fragment.successKey(e))&&(n[r]=o);return n},i=function(t){var e;return e=n.merge(n.pick(t,o),s(t)),l(e)},{preprocess:l=function(t){var e;return"function"==typeof(e=up.migrate).handleRenderOptions&&e.handleRenderOptions(t),n.merge(r,u(t),t,a(t))},assertContentGiven:function(e){if(!n.some(t,function(t){return n.isGiven(e[t])}))return e.defaultToEmptyContent?e.content="":up.fail("up.render() needs either { "+t.join(", ")+" } option")},deriveFailOptions:i})}.call(this),function(){var n=function(t,e){function n(){this.constructor=t}for(var r in e)o.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty;up.util,up.element,up.RenderResult=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.keys=function(){return["fragments","layer"]},e}(up.Record)}.call(this),function(){var s,n=function(t,e){function n(){this.constructor=t}for(var r in e)o.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty,r=[].slice;s=up.util,up.element,up.Request=function(t){function e(t){e.__super__.constructor.call(this,t),this.params=new up.Params(this.params),this.headers||(this.headers={}),this.preload&&(this.cache=!0),null==this.wrapMethod&&(this.wrapMethod=up.network.config.wrapMethod),this.normalizeForCaching(),t.basic||(this.layer=up.layer.get(this.layer),this.failLayer=up.layer.get(this.failLayer||this.layer),this.context||(this.context=this.layer.context||{}),this.failContext||(this.failContext=this.failLayer.context||{}),this.mode||(this.mode=this.layer.mode),this.failMode||(this.failMode=this.failLayer.mode),this.deferred=s.newDeferred(),this.state="new")}return n(e,t),e.prototype.keys=function(){return["method","url","hash","params","target","failTarget","headers","timeout","preload","cache","clearCache","layer","mode","context","failLayer","failMode","failContext","origin","solo","queueTime","wrapMethod","contentType","payload","onQueued"]},e.delegate(["then","catch","finally"],"deferred"),e.prototype.followState=function(t){return s.delegate(this,["deferred","state","preload"],function(){return t})},e.prototype.normalizeForCaching=function(){return this.method=s.normalizeMethod(this.method),this.extractHashFromURL(),this.transferParamsToURL(),this.url=s.normalizeURL(this.url)},e.prototype.evictExpensiveAttrs=function(){return s.task((t=this,function(){return t.layer=void 0,t.failLayer=void 0,t.origin=void 0}));var t},e.prototype.extractHashFromURL=function(){var t,e;if(t=null!=(e=this.url)?e.match(/^([^#]*)(#.+)$/):void 0)return this.url=t[1],this.hash=t[2]},e.prototype.transferParamsToURL=function(){if(this.url&&!this.allowsPayload()&&!s.isBlank(this.params))return this.url=this.params.toURL(this.url),this.params.clear()},e.prototype.isSafe=function(){return up.network.isSafeMethod(this.method)},e.prototype.allowsPayload=function(){return s.methodAllowsPayload(this.method)},e.prototype.will302RedirectWithGET=function(){return this.isSafe()||"POST"===this.method},e.prototype.willCache=function(){return"auto"===this.cache?up.network.config.autoCache(this):this.cache},e.prototype.runQueuedCallbacks=function(){var t;return s.always(this,(t=this,function(){return t.evictExpensiveAttrs()})),"function"==typeof this.onQueued?this.onQueued(this):void 0},e.prototype.load=function(){var t,e,n,r;if("new"===this.state)return this.state="loading",this.xhr=new up.Request.XHRRenderer(this).buildAndSend({onload:(r=this,function(){return r.onXHRLoad()}),onerror:(n=this,function(){return n.onXHRError()}),ontimeout:(e=this,function(){return e.onXHRTimeout()}),onabort:(t=this,function(){return t.onXHRAbort()})})},e.prototype.loadPage=function(){return up.network.abort(),new up.Request.FormRenderer(this).buildAndSubmit()},e.prototype.onXHRLoad=function(){var t,e;return t=["Server responded HTTP %d to %s %s (%d characters)",(e=this.extractResponseFromXHR()).status,this.method,this.url,e.text.length],this.emit("up:request:loaded",{request:e.request,response:e,log:t}),this.respondWith(e)},e.prototype.onXHRError=function(){var t;return t="Fatal error during request",this.deferred.reject(up.error.failed(t)),this.emit("up:request:fatal",{log:t})},e.prototype.onXHRTimeout=function(){return this.setAbortedState("Requested timed out")},e.prototype.onXHRAbort=function(){return this.setAbortedState()},e.prototype.abort=function(){if(this.setAbortedState()&&this.xhr)return this.xhr.abort()},e.prototype.setAbortedState=function(t){if(null==t&&(t=["Request to %s %s was aborted",this.method,this.url]),"new"===this.state||"loading"===this.state)return this.state="aborted",this.emit("up:request:aborted",{log:t}),this.deferred.reject(up.error.aborted(t)),!0},e.prototype.respondWith=function(t){if("loading"===this.state)return this.state="loaded",t.ok?this.deferred.resolve(t):this.deferred.reject(t)},e.prototype.csrfHeader=function(){return up.protocol.csrfHeader()},e.prototype.csrfParam=function(){return up.protocol.csrfParam()},e.prototype.csrfToken=function(){if(!this.isSafe()&&!this.isCrossOrigin())return up.protocol.csrfToken()},e.prototype.isCrossOrigin=function(){return s.isCrossOrigin(this.url)},e.prototype.extractResponseFromXHR=function(){var t,e,n;return e={method:this.method,url:this.url,request:this,xhr:this.xhr,text:this.xhr.responseText,status:this.xhr.status,title:up.protocol.titleFromXHR(this.xhr),target:up.protocol.targetFromXHR(this.xhr),acceptLayer:up.protocol.acceptLayerFromXHR(this.xhr),dismissLayer:up.protocol.dismissLayerFromXHR(this.xhr),eventPlans:up.protocol.eventPlansFromXHR(this.xhr),context:up.protocol.contextFromXHR(this.xhr),clearCache:up.protocol.clearCacheFromXHR(this.xhr)},t=up.protocol.methodFromXHR(this.xhr),(n=up.protocol.locationFromXHR(this.xhr))&&(t||s.matchURLs(e.url,n)||(t="GET"),e.url=n),t&&(e.method=t),new up.Response(e)},e.prototype.cacheKey=function(){return JSON.stringify([this.method,this.url,this.params.toQuery(),this.metaProps()])},e.prototype.metaProps=function(){var t,e,n,r,o,i;for(r={},t=0,n=(o=s.evalOption(up.network.config.requestMetaKeys,this)).length;t<n;t++)i=this[e=o[t]],s.isGiven(i)&&(r[e]=i);return r},e.prototype.buildEventEmitter=function(t){return up.EventEmitter.fromEmitArgs(t,{request:this,layer:this.layer})},e.prototype.emit=function(){var t;return t=1<=arguments.length?r.call(arguments,0):[],this.buildEventEmitter(t).emit()},e.prototype.assertEmitted=function(){var t;return t=1<=arguments.length?r.call(arguments,0):[],this.buildEventEmitter(t).assertEmitted()},e.getter("description",function(){return this.method+" "+this.url}),e}(up.Record)}.call(this),function(){var n=function(t,e){function n(){this.constructor=t}for(var r in e)o.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty;up.util,up.Request.Cache=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.maxSize=function(){return up.network.config.cacheSize},e.prototype.expiryMillis=function(){return up.network.config.cacheExpiry},e.prototype.normalizeStoreKey=function(t){return up.Request.wrap(t).cacheKey()},e.prototype.clear=function(n){return n&&"*"!==n&&!0!==n?(n=new up.URLPattern(n),this.each((r=this,function(t,e){if(n.test(e.url))return r.store.remove(t)}))):e.__super__.clear.call(this);var r},e}(up.Cache)}.call(this),function(){var s,u,a;a=up.util,u=up.element,s=["GET","POST"],up.Request.FormRenderer=function(){function t(t){this.request=t}return t.prototype.buildAndSubmit=function(){var t,e,n,r,o,i;return this.params=a.copy(this.request.params),t=this.request.url,o=this.request.method,i=up.Params.fromURL(t),this.params.addAll(i),t=up.Params.stripURL(t),a.contains(s,o)||(o=up.protocol.wrapMethod(o,this.params)),this.form=u.affix(document.body,"form.up-request-loader",{method:o,action:t}),(e=this.request.contentType)&&this.form.setAttribute("enctype",e),(n=this.request.csrfParam())&&(r=this.request.csrfToken())&&this.params.add(n,r),a.each(this.params.toArray(),this.addField.bind(this)),up.browser.submitForm(this.form)},t.prototype.addField=function(t){return u.affix(this.form,"input[type=hidden]",t)},t}()}.call(this),function(){var i,n=function(t,e){function n(){this.constructor=t}for(var r in e)o.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty;i=up.util,up.Request.Queue=function(t){function e(t){var e,n;null==t&&(t={}),this.concurrency=null!=(e=t.concurrency)?e:function(){return up.network.config.concurrency},this.badResponseTime=null!=(n=t.badResponseTime)?n:function(){return up.network.config.badResponseTime},this.reset()}return n(e,t),e.prototype.reset=function(){return this.queuedRequests=[],this.currentRequests=[],clearTimeout(this.checkSlowTimout),this.emittedSlow=!1},e.getter("allRequests",function(){return this.currentRequests.concat(this.queuedRequests)}),e.prototype.asap=function(e){var n;return e.runQueuedCallbacks(),i.always(e,(n=this,function(t){return n.onRequestSettled(e,t)})),e.queueTime=new Date,this.setSlowTimer(),this.hasConcurrencyLeft()?this.sendRequestNow(e):this.queueRequest(e)},e.prototype.promoteToForeground=function(t){if(t.preload)return t.preload=!1,this.setSlowTimer()},e.prototype.setSlowTimer=function(){var t,e;return t=i.evalOption(this.badResponseTime),this.checkSlowTimout=i.timer(t,(e=this,function(){return e.checkSlow()}))},e.prototype.hasConcurrencyLeft=function(){var t;return-1===(t=i.evalOption(this.concurrency))||this.currentRequests.length<t},e.prototype.isBusy=function(){return 0<this.currentRequests.length},e.prototype.queueRequest=function(t){return this.queuedRequests.push(t)},e.prototype.pluckNextRequest=function(){var t;return(t=i.find(this.queuedRequests,function(t){return!t.preload}))||(t=this.queuedRequests[0]),i.remove(this.queuedRequests,t)},e.prototype.sendRequestNow=function(t){return t.emit("up:request:load",{log:["Loading %s %s",t.method,t.url]}).defaultPrevented?t.abort("Prevented by event listener"):(t.normalizeForCaching(),this.currentRequests.push(t),t.load())},e.prototype.onRequestSettled=function(t,e){return i.remove(this.currentRequests,t),e instanceof up.Response&&e.ok&&up.network.registerAliasForRedirect(t,e),this.checkSlow(),i.microtask((n=this,function(){return n.poke()}));var n},e.prototype.poke=function(){var t;if(this.hasConcurrencyLeft()&&(t=this.pluckNextRequest()))return this.sendRequestNow(t)},e.prototype.abort=function(n){var t,e,r,o;for(null==n&&(n=!0),t=0,e=(o=[this.currentRequests,this.queuedRequests]).length;t<e;t++)return r=o[t],void i.filter(r,function(e){return function(t){return e.requestMatches(t,n)}}(this)).forEach(function(t){return t.abort(),i.remove(r,t)})},e.prototype.abortExcept=function(t,e){var n;return null==e&&(e=!0),n=t.cacheKey(),this.abort(function(t){return t.cacheKey()!==n&&i.evalOption(e,t)})},e.prototype.requestMatches=function(t,e){return t===e||i.evalOption(e,t)},e.prototype.checkSlow=function(){var t;if(t=this.isSlow(),this.emittedSlow!==t)return(this.emittedSlow=t)?up.emit("up:request:late",{log:"Server is slow to respond"}):up.emit("up:request:recover",{log:"Slow requests were loaded"})},e.prototype.isSlow=function(){var t,e,n,r;return n=new Date,e=i.evalOption(this.badResponseTime),t=i.reject(this.allRequests,"preload"),r=1,i.some(t,function(t){return n-t.queueTime>=e-r})},e}(up.Class)}.call(this),function(){var e,n,l;n="application/x-www-form-urlencoded",e="multipart/form-data",l=up.util,up.Request.XHRRenderer=function(){function t(t){this.request=t}return t.prototype.buildAndSend=function(t){var e,n,r,o,i,s,u,a;for(i in this.xhr=new XMLHttpRequest,this.params=l.copy(this.request.params),this.request.timeout&&(this.xhr.timeout=this.request.timeout),this.xhr.open(this.getMethod(),this.request.url),s=this.request.metaProps())a=s[i],o=up.protocol.headerize(i),this.addHeader(o,a);for(o in u=this.request.headers)a=u[o],this.addHeader(o,a);return(n=this.request.csrfHeader())&&(r=this.request.csrfToken())&&this.addHeader(n,r),this.addHeader(up.protocol.headerize("version"),up.version),(e=this.getContentType())&&this.addHeader("Content-Type",e),l.assign(this.xhr,t),this.xhr.send(this.getPayload()),this.xhr},t.prototype.getMethod=function(){return this.method||(this.method=this.request.method,this.request.wrapMethod&&!this.request.will302RedirectWithGET()&&(this.method=up.protocol.wrapMethod(this.method,this.params))),this.method},t.prototype.getContentType=function(){return this.finalizePayload(),this.contentType},t.prototype.getPayload=function(){return this.finalizePayload(),this.payload},t.prototype.addHeader=function(t,e){return(l.isOptions(e)||l.isArray(e))&&(e=JSON.stringify(e)),this.xhr.setRequestHeader(t,e)},t.prototype.finalizePayload=function(){if(!this.payloadFinalized)return this.payloadFinalized=!0,this.payload=this.request.payload,this.contentType=this.request.contentType,!this.payload&&this.request.allowsPayload()?(this.contentType||(this.contentType=this.params.hasBinaryValues()?e:n),this.contentType===e?(this.contentType=null,this.payload=this.params.toFormData()):this.payload=this.params.toQuery().replace(/%20/g,"+")):void 0},t}()}.call(this),function(){var n=function(t,e){function n(){this.constructor=t}for(var r in e)o.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty;up.util,up.Response=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.keys=function(){return["method","url","text","status","request","xhr","target","title","acceptLayer","dismissLayer","eventPlans","context","clearCache","headers"]},e.prototype.defaults=function(){return{headers:{}}},e.getter("ok",function(){return this.status&&200<=this.status&&this.status<=299}),e.prototype.getHeader=function(t){var e;return this.headers[t]||(null!=(e=this.xhr)?e.getResponseHeader(t):void 0)},e.getter("contentType",function(){return this.getHeader("Content-Type")}),e.getter("json",function(){return this.parsedJSON||(this.parsedJSON=JSON.parse(this.text))}),e}(up.Record)}.call(this),function(){var o,i;i=up.util,o=up.element,up.ResponseDoc=function(){function t(t){this.noscriptWrapper=new up.HTMLWrapper("noscript"),this.scriptWrapper=new up.HTMLWrapper("script"),this.root=this.parseDocument(t)||this.parseFragment(t)||this.parseContent(t)}return t.prototype.parseDocument=function(t){return this.parse(t.document,o.createDocumentFromHTML)},t.prototype.parseContent=function(t){var e,n,r;return e=t.content||"",r=t.target||up.fail("must pass a { target } when passing { content }"),n=o.createFromSelector(r),i.isString(e)?(e=this.wrapHTML(e),n.innerHTML=e):n.appendChild(e),n},t.prototype.parseFragment=function(t){return this.parse(t.fragment)},t.prototype.parse=function(t,e){return null==e&&(e=o.createFromHTML),i.isString(t)&&(t=e(t=this.wrapHTML(t))),t},t.prototype.rootSelector=function(){return up.fragment.toTarget(this.root)},t.prototype.wrapHTML=function(t){return t=this.noscriptWrapper.wrap(t),t=up.fragment.config.runScripts?this.scriptWrapper.wrap(t):this.scriptWrapper.strip(t)},t.prototype.getTitle=function(){var t;return this.titleParsed||(this.title=null!=(t=this.root.querySelector("head title"))?t.textContent:void 0,this.titleParsed=!0),this.title},t.prototype.select=function(t){return up.fragment.subtree(this.root,t,{layer:"any"})[0]},t.prototype.finalizeElement=function(t){return this.noscriptWrapper.unwrap(t),this.scriptWrapper.unwrap(t)},t}()}.call(this),function(){var c,i;c=up.element,i=up.util,up.RevealMotion=function(){function t(t,e){var n,r,o,i,s,u,a,l,p;this.element=t,this.options=null!=e?e:{},p=up.viewport.config,this.viewport=c.get(this.options.viewport)||up.viewport.get(this.element),this.obstructionsLayer=up.layer.get(this.viewport),this.snap=null!=(n=null!=(r=this.options.snap)?r:this.options.revealSnap)?n:p.revealSnap,this.padding=null!=(o=null!=(i=this.options.padding)?i:this.options.revealPadding)?o:p.revealPadding,this.top=null!=(s=null!=(u=this.options.top)?u:this.options.revealTop)?s:p.revealTop,this.max=null!=(a=null!=(l=this.options.max)?l:this.options.revealMax)?a:p.revealMax,this.topObstructions=p.fixedTop,this.bottomObstructions=p.fixedBottom}return t.prototype.start=function(){var t,e,n,r,o;return o=this.getViewportRect(this.viewport),t=up.Rect.fromElement(this.element),this.max&&(e=i.evalOption(this.max,this.element),t.height=Math.min(t.height,e)),this.addPadding(t),this.substractObstructions(o),o.height<0?up.error.failed.async("Viewport has no visible area"):(n=r=this.viewport.scrollTop,this.top||t.height>o.height?n+=t.top-o.top:t.top<o.top?n-=o.top-t.top:t.bottom>o.bottom&&(n+=t.bottom-o.bottom),i.isNumber(this.snap)&&n<this.snap&&t.top<.5*o.height&&(n=0),n!==r?this.scrollTo(n):Promise.resolve())},t.prototype.scrollTo=function(t){return this.scrollMotion=new up.ScrollMotion(this.viewport,t,this.options),this.scrollMotion.start()},t.prototype.getViewportRect=function(){return up.viewport.isRoot(this.viewport)?new up.Rect({left:0,top:0,width:up.viewport.rootWidth(),height:up.viewport.rootHeight()}):up.Rect.fromElement(this.viewport)},t.prototype.addPadding=function(t){return t.top-=this.padding,t.height+=2*this.padding},t.prototype.selectObstructions=function(t){return up.fragment.all(t.join(","),{layer:this.obstructionsLayer})},t.prototype.substractObstructions=function(t){var e,n,r,o,i,s,u,a,l,p;for(n=0,o=(a=this.selectObstructions(this.topObstructions)).length;n<o;n++)s=a[n],0<(e=(u=up.Rect.fromElement(s)).bottom-t.top)&&(t.top+=e,t.height-=e);for(p=[],r=0,i=(l=this.selectObstructions(this.bottomObstructions)).length;r<i;r++)s=l[r],u=up.Rect.fromElement(s),0<(e=t.bottom-u.top)?p.push(t.height-=e):p.push(void 0);return p},t.prototype.finish=function(){var t;return null!=(t=this.scrollMotion)?t.finish():void 0},t}()}.call(this),function(){var r,a=function(t,e){return function(){return t.apply(e,arguments)}};r=up.util,up.ScrollMotion=function(){function t(t,e,n){var r,o,i,s;this.scrollable=t,this.targetTop=e,null==n&&(n={}),this.abort=a(this.abort,this),this.behavior=null!=(r=null!=(o=n.behavior)?o:n.scrollBehavior)?r:"auto",this.speed=(null!=(i=null!=(s=n.speed)?s:n.scrollSpeed)?i:up.viewport.config.scrollSpeed)*u}var u;return u=.065,t.prototype.start=function(){return new Promise((n=this,function(t,e){return n.resolve=t,n.reject=e,"smooth"===n.behavior&&up.motion.isEnabled()?n.startAnimation():n.finish()}));var n},t.prototype.startAnimation=function(){return this.startTime=Date.now(),this.startTop=this.scrollable.scrollTop,this.topDiff=this.targetTop-this.startTop,this.duration=Math.sqrt(Math.abs(this.topDiff))/this.speed,requestAnimationFrame((t=this,function(){return t.animationFrame()}));var t},t.prototype.animationFrame=function(){var t,e,n;if(!this.settled)return this.frameTop&&1.5<Math.abs(this.frameTop-this.scrollable.scrollTop)&&this.abort("Animation aborted due to user intervention"),t=Date.now()-this.startTime,e=Math.min(t/this.duration,1),this.frameTop=this.startTop+r.simpleEase(e)*this.topDiff,Math.abs(this.targetTop-this.frameTop)<.3?this.finish():(this.scrollable.scrollTop=this.frameTop,requestAnimationFrame((n=this,function(){return n.animationFrame()})))},t.prototype.abort=function(t){return this.settled=!0,this.reject(up.error.aborted(t))},t.prototype.finish=function(){return this.settled=!0,this.scrollable.scrollTop=this.targetTop,this.resolve()},t}()}.call(this),function(){var r,o;r=up.element,o=up.util,up.Selector=function(){function t(t,e){this.selectors=t,this.filters=null!=e?e:[],this.unionSelector=this.selectors.join(",")||"match-none"}return t.prototype.matches=function(t){return r.matches(t,this.unionSelector)&&this.passesFilter(t)},t.prototype.closest=function(t){var e;return this.matches(t)?t:(e=t.parentElement)?this.closest(e):void 0},t.prototype.passesFilter=function(e){return o.every(this.filters,function(t){return t(e)})},t.prototype.descendants=function(e){var t,n;return t=o.flatMap(this.selectors,function(t){return r.all(e,t)}),o.filter(t,(n=this,function(t){return n.passesFilter(t)}))},t.prototype.subtree=function(t){var e;return e=[],this.matches(t)&&e.push(t),e.push.apply(e,this.descendants(t)),e},t}()}.call(this),function(){var e;up.store||(up.store={}),e=up.util,up.store.Memory=function(){function t(){this.clear()}return t.prototype.clear=function(){return this.data={}},t.prototype.get=function(t){return this.data[t]},t.prototype.set=function(t,e){return this.data[t]=e},t.prototype.remove=function(t){return delete this.data[t]},t.prototype.keys=function(){return Object.keys(this.data)},t.prototype.size=function(){return this.keys().length},t.prototype.values=function(){return e.values(this.data)},t}()}.call(this),function(){var e=function(t,e){return function(){return t.apply(e,arguments)}},r=function(t,e){function n(){this.constructor=t}for(var r in e)o.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty;up.util,up.store.Session=function(t){function n(t){this.remove=e(this.remove,this),this.set=e(this.set,this),this.rootKey=t,this.loadFromSessionStorage()}return r(n,t),n.prototype.clear=function(){return n.__super__.clear.call(this),this.saveToSessionStorage()},n.prototype.set=function(t,e){return n.__super__.set.call(this,t,e),this.saveToSessionStorage()},n.prototype.remove=function(t){return n.__super__.remove.call(this,t),this.saveToSessionStorage()},n.prototype.loadFromSessionStorage=function(){var t;try{(t="undefined"!=typeof sessionStorage&&null!==sessionStorage?sessionStorage.getItem(this.rootKey):void 0)&&(this.data=JSON.parse(t))}catch(e){}return this.data||(this.data={})},n.prototype.saveToSessionStorage=function(){var t;t=JSON.stringify(this.data);try{return"undefined"!=typeof sessionStorage&&null!==sessionStorage?sessionStorage.setItem(this.rootKey,t):void 0}catch(e){}},n}(up.store.Memory)}.call(this),function(){var n,o,r=function(t,e){return function(){return t.apply(e,arguments)}};o=up.util,n=up.element,up.Tether=function(){function t(t){var e;this.sync=r(this.sync,this),this.scheduleSync=r(this.scheduleSync,this),"function"==typeof(e=up.migrate).handleTetherOptions&&e.handleTetherOptions(t),this.anchor=t.anchor,this.align=t.align,this.position=t.position,this.alignAxis="top"===this.position||"bottom"===this.position?"horizontal":"vertical",this.viewport=up.viewport.get(this.anchor),this.parent=this.viewport===n.root?document.body:this.viewport,this.syncOnScroll=!this.viewport.contains(this.anchor.offsetParent)}return t.prototype.start=function(t){return this.element=t,this.element.style.position="absolute",this.setOffset(0,0),this.sync(),this.changeEventSubscription("on")},t.prototype.stop=function(){return this.changeEventSubscription("off")},t.prototype.changeEventSubscription=function(t){if(up[t](window,"resize",this.scheduleSync),this.syncOnScroll)return up[t](this.viewport,"scroll",this.scheduleSync)},t.prototype.scheduleSync=function(){return clearTimeout(this.syncTimer),this.syncTimer=o.task(this.sync)},t.prototype.isDetached=function(){return n.isDetached(this.parent)||n.isDetached(this.anchor)},t.prototype.sync=function(){var t,e,n,r;switch(e=this.element.getBoundingClientRect(),t=this.anchor.getBoundingClientRect(),r=n=void 0,this.alignAxis){case"horizontal":r=function(){switch(this.position){case"top":return t.top-e.height;case"bottom":return t.top+t.height}}.call(this),n=function(){switch(this.align){case"left":return t.left;case"center":return t.left+.5*(t.width-e.width);case"right":return t.left+t.width-e.width}}.call(this);break;case"vertical":r=function(){switch(this.align){case"top":return t.top;case"center":return t.top+.5*(t.height-e.height);case"bottom":return t.top+t.height-e.height}}.call(this),n=function(){switch(this.position){case"left":return t.left-e.width;case"right":return t.left+t.width}}.call(this)}return o.isDefined(n)||o.isDefined(r)?this.moveTo(n,r):up.fail("Invalid tether constraints: %o",this.describeConstraints())},t.prototype.describeConstraints=function(){return{position:this.position,align:this.align}},t.prototype.moveTo=function(t,e){var n;return n=this.element.getBoundingClientRect(),this.setOffset(t-n.left+this.offsetLeft,e-n.top+this.offsetTop)},t.prototype.setOffset=function(t,e){return this.offsetLeft=t,this.offsetTop=e,n.setStyle(this.element,{left:t,top:e})},t}()}.call(this),function(){var i;i=up.util,up.URLPattern=function(){function t(t,e){var n,r;this.normalizeURL=null!=e?e:i.normalizeURL,this.groups=[],r=[],n=[],i.splitValues(t).forEach(function(t){return"-"===t[0]?n.push(t.substring(1)):r.push(t)}),this.positiveRegexp=this.buildRegexp(r,!0),this.negativeRegexp=this.buildRegexp(n,!1)}return t.prototype.buildRegexp=function(t,r){var e,o;if(t.length)return e=(e=(e=t.map(this.normalizeURL).map(i.escapeRegExp).join("|")).replace(/\\\*/g,".*?")).replace(/(\:|\\\$)([a-z][\w-]*)/gi,(o=this,function(t,e,n){return"\\$"===e?(r&&o.groups.push({name:n,cast:Number}),"(\\d+)"):(r&&o.groups.push({name:n,cast:String}),"([^/?#]+)")})),new RegExp("^"+e+"$")},t.prototype.test=function(t,e){return null==e&&(e=!0),e&&(t=this.normalizeURL(t)),this.positiveRegexp.test(t)&&!this.isExcluded(t)},t.prototype.recognize=function(t,e){var r,o;if(null==e&&(e=!0),e&&(t=this.normalizeURL(t)),(r=this.positiveRegexp.exec(t))&&!this.isExcluded(t))return o={},this.groups.forEach(function(t,e){var n;if(n=r[e+1])return o[t.name]=t.cast(n)}),o},t.prototype.isExcluded=function(t){var e;return null!=(e=this.negativeRegexp)?e.test(t):void 0},t}()}.call(this),function(){var t,e,n,r,o,i;up.framework=(i=up.util,e=!0,n=function(){return up.emit("up:framework:reset",{log:!1})},t=function(){return up.browser.isSupported()?(up.emit("up:framework:boot",{log:!1}),e=!1,up.event.onReady(function(){return up.emit("up:app:boot",{log:"Booting user application"})})):"function"==typeof console.log?console.log("Unpoly doesn't support this browser. Framework was not booted."):void 0},r=function(){return e=!0},o=function(){return e=!1},i.literal({boot:t,startExtension:r,stopExtension:o,reset:n,get_booting:function(){return e}}))}.call(this),function(){var t,e,n,r,o,i,s,u,a,l,p,c,h,f,d,m,y,g,v=[].slice;up.event=(m=up.util,s=up.element,d=function(){var t,e,n,r,o;for(o=[],e=0,n=(r=[window,document,s.root,document.body]).length;e<n;e++)t=r[e],o.push(up.EventListener.unbindNonDefault(t));return o},n=function(){var t;return t=1<=arguments.length?v.call(arguments,0):[],r(t)},t=function(){var t;return t=1<=arguments.length?v.call(arguments,0):[],r(t,{jQuery:!0})},r=function(t,e){return up.EventListenerGroup.fromBindArgs(t,e).bind()},y=function(){var t;return t=1<=arguments.length?v.call(arguments,0):[],up.EventListenerGroup.fromBindArgs(t).unbind()},i=function(t){return up.EventEmitter.fromEmitArgs(t)},u=function(){var t;return t=1<=arguments.length?v.call(arguments,0):[],i(t).emit()},o=function(){var t,e,n,r,o;return t=1<=arguments.length?v.call(arguments,0):[],r=m.extractOptions(t),o=t[0]||r.type||up.fail("Expected event type to be passed as string argument or { type } property"),(e=document.createEvent("Event")).initEvent(o,!0,!0),m.assign(e,m.omit(r,["type","target"])),up.browser.isIE11()&&(n=e.preventDefault,e.preventDefault=function(){return n.call(e),m.getter(e,"defaultPrevented",function(){return!0})}),e},e=function(){var t;return t=1<=arguments.length?v.call(arguments,0):[],i(t).assertEmitted()},h=function(e){return n("keydown",function(t){if(g(t))return e(t)})},g=function(t){var e;return"Escape"===(e=t.key)||"Esc"===e},l=function(t){return t.stopImmediatePropagation(),t.preventDefault()},f=function(t){return"loading"!==document.readyState?t():document.addEventListener("DOMContentLoaded",t)},c=["metaKey","shiftKey","ctrlKey","altKey"],p=function(e){return(m.isUndefined(e.button)||0===e.button)&&!m.some(c,function(t){return e[t]})},a=function(n,t,e){var r;return null==e&&(e=[]),(
|
5
|
-
r=up.event.build(t,m.pick(n,e))).originalEvent=n,["stopPropagation","stopImmediatePropagation","preventDefault"].forEach(function(t){var e;return e=r[t],r[t]=function(){return n[t](),e.call(r)}}),n.defaultPrevented&&r.preventDefault(),r},n("up:click","a[up-emit]",function(t,e){var n,r,o;if(p(t))return r=s.attr(e,"up-emit"),n=s.jsonAttr(e,"up-emit-props"),o=a(t,r),m.assign(o,n),up.emit(e,o)}),n("up:framework:reset",d),{on:n,$on:t,off:y,build:o,emit:u,assertEmitted:e,onEscape:h,halt:l,onReady:f,isUnmodified:p,fork:a,keyModifiers:c}),up.on=up.event.on,up.$on=up.event.$on,up.off=up.event.off,up.$off=up.event.off,up.emit=up.event.emit}.call(this),function(){var t,e,n,r,o,i,s,u,a,l,p,c,h,f,d,m,y,g,v,b;up.protocol=(v=up.util,a=up.element,c=function(t){return"X-Up"+t.replace(/(^.|[A-Z])/g,function(t){return"-"+t.toUpperCase()})},p=function(t,e,n){var r;if(null==n&&(n=v.identity),r=t.getResponseHeader(c(e)))return n(r)},e=function(t){return p(t,"clearCache",function(t){switch(t){case"true":return!0;case"false":return!1;default:return t}})},r=function(t){return p(t,"context",JSON.parse)},d=function(t){return p(t,"method",v.normalizeMethod)},l=function(t){return p(t,"events",JSON.parse)},t=function(t){return p(t,"acceptLayer",JSON.parse)},u=function(t){return p(t,"dismissLayer",JSON.parse)},h=v.memoize(function(){return v.normalizeMethod(up.browser.popCookie("_up_method"))}),f=function(t){return p(t,"location")||t.responseURL},g=function(t){return p(t,"title")},y=function(t){return p(t,"target")},n=new up.Config(function(){return{methodParam:"_method",csrfParam:function(){return a.metaContent("csrf-param")},csrfToken:function(){return a.metaContent("csrf-token")},csrfHeader:"X-CSRF-Token"}}),o=function(){return v.evalOption(n.csrfHeader)},i=function(){return v.evalOption(n.csrfParam)},s=function(){return v.evalOption(n.csrfToken)},b=function(t,e){return e.add(n.methodParam,t),"POST"},m=function(){return n.reset()},up.on("up:framework:reset",m),{config:n,reset:m,locationFromXHR:f,titleFromXHR:g,targetFromXHR:y,methodFromXHR:d,acceptLayerFromXHR:t,contextFromXHR:r,dismissLayerFromXHR:u,eventPlansFromXHR:l,clearCacheFromXHR:e,csrfHeader:o,csrfParam:i,csrfToken:s,initialRequestMethod:h,headerize:c,wrapMethod:b})}.call(this),function(){var r,t,e,n,o,i,s,u,a,l,p=[].slice;up.log=(up.util,a=new up.store.Session("up.log"),r=new up.Config(function(){return{enabled:a.get("enabled"),banner:!0}}),u=function(){return r.reset()},o=function(){var t;if(t=1<=arguments.length?p.call(arguments,0):[],r.enabled)return i.apply(null,["log"].concat(p.call(t)))},s=function(){var t;return t=1<=arguments.length?p.call(arguments,0):[],i.apply(null,["warn"].concat(p.call(t)))},n=function(){var t;return t=1<=arguments.length?p.call(arguments,0):[],i.apply(null,["error"].concat(p.call(t)))},i=function(t,e,n){var r,o,i,s;if(i=t,s=e,o=n,r=4<=arguments.length?p.call(arguments,3):[],o)return up.browser.canFormatLog()?(r.unshift(""),r.unshift("color: #666666; padding: 1px 3px; border: 1px solid #bbbbbb; border-radius: 2px; font-size: 90%; display: inline-block"),o="%c"+s+"%c "+o):o="["+s+"] "+o,console[i].apply(console,[o].concat(p.call(r)))},e=function(){var t,e,n;if(r.banner)return e=" __ _____ ___ ___ / /_ __\n/ // / _ \\/ _ \\/ _ \\/ / // / "+up.version+"\n\\___/_//_/ .__/\\___/_/\\_. / \n / / / /\n\n",n="",up.migrate.loaded||(n+="Load unpoly-migrate.js to enable deprecated APIs.\n\n"),r.enabled?n+="Call `up.log.disable()` to disable logging for this session.":n+="Call `up.log.enable()` to enable logging for this session.",t="color: #777777",up.browser.canFormatLog()?console.log("%c"+e+"%c"+n,"font-family: monospace;"+t,t):console.log(e+n)},up.on("up:app:boot",e),up.on("up:framework:reset",u),l=function(t){return a.set("enabled",t),r.enabled=t},t=function(){var t;throw t=1<=arguments.length?p.call(arguments,0):[],n.apply(null,["error"].concat(p.call(t))),up.error.failed(t)},{puts:o,error:n,warn:s,config:r,enable:function(){return l(!0)},disable:function(){return l(!1)},fail:t,muteUncriticalRejection:function(t){return t["catch"](function(t){if("object"!=typeof t||!("AbortError"===t.name||t instanceof up.RenderResult||t instanceof up.Response))throw t})},isEnabled:function(){return r.enabled}}),up.puts=up.log.puts,up.warn=up.log.warn,up.fail=up.log.fail}.call(this),function(){var r,n,t,e,o,i,s,u,a,l,p,c,h,f,d,m,y,g,v=[].slice;up.syntax=(g=up.util,s=up.element,r={"[up-back]":-100,"[up-content]":-200,"[up-drawer]":-200,"[up-modal]":-200,"[up-cover]":-200,"[up-popup]":-200,"[up-tooltip]":-200,"[up-dash]":-200,"[up-expand]":-300,"[data-method]":-400,"[data-confirm]":-400},o=[],a=[],c=function(){var t,e;return t=1<=arguments.length?v.call(arguments,0):[],e=n(t),u(o,e)},f=function(){var t,e;return t=1<=arguments.length?v.call(arguments,0):[],(e=c.apply(null,t)).jQuery=!0,e},m=function(){var t,e;return t=1<=arguments.length?v.call(arguments,0):[],e=n(t),up.framework.booting&&(e.priority=i(e.selector)||up.fail("Unregistered priority for system macro %o",e.selector)),u(a,e)},d=function(){var t,e;return t=1<=arguments.length?v.call(arguments,0):[],(e=m.apply(null,t)).jQuery=!0,e},i=function(t){var e,n;for(n in t=g.evalOption(t),r)if(e=r[n],0<=t.indexOf(n))return e},l=function(t){var e,n;return n=t.shift(),e=t.pop(),[n,g.extractOptions(t),e]},n=function(t){var e,n,r,o;return o=(r=l(t))[0],n=r[1],e=r[2],n=g.options(n,{selector:o,isDefault:up.framework.booting,priority:0,batch:!1,keep:!1,jQuery:!1}),g.assign(e,n)},u=function(t,e){var n,r;for(r=0;(n=t[r])&&n.priority>=e.priority;)r+=1;return t.splice(r,0,e),e},e=function(t,e){var n;return n=a.concat(o),new up.CompilerPass(t,n,e).run()},h=function(t,e){var n;return(n=t.upDestructors)||(n=[],t.upDestructors=n,t.classList.add("up-can-clean")),g.isArray(e)?n.push.apply(n,e):n.push(e)},t=function(t,e){return null==e&&(e={}),new up.DestructorPass(t,e).run()},p=function(t){return t=up.fragment.get(t),s.jsonAttr(t,"up-data")||{}},y=function(){return o=g.filter(o,"isDefault"),a=g.filter(a,"isDefault")},up.on("up:framework:reset",y),{compiler:c,macro:m,$compiler:f,$macro:d,destructor:h,compile:e,clean:t,data:p}),up.compiler=up.syntax.compiler,up.$compiler=up.syntax.$compiler,up.destructor=up.syntax.destructor,up.macro=up.syntax.macro,up.$macro=up.syntax.$macro,up.data=up.syntax.data}.call(this),function(){var r,o,n,e,i,s,u,a,l,p,c,t,h,f,d,m,y,g=[].slice;up.history=(y=up.util,e=up.element,o=new up.Config(function(){return{enabled:!0,restoreTargets:[":main"]}}),a=c=void 0,f=function(){return o.reset(),a=c=void 0,m()},l=function(t,e){return null==e&&(e={}),e.hash=!0,y.normalizeURL(t,e)},n=function(t){return l(location.href,t)},(m=function(){var t;if(t=n(),a!==t)return c=a,a=t})(),s=function(t){var e;return l(t,e={stripTrailingSlash:!0})===n(e)},h=function(t,e){if(null==e&&(e={}),u("replaceState",t)&&!1!==e.event)return i("up:location:changed",{url:t,reason:"replace",log:"Replaced state for "+y.urlWithoutHost(t)})},t=function(t){if(t=l(t),!s(t)&&u("pushState",t))return up.emit("up:location:changed",{url:t,reason:"push",log:"Advanced to location "+y.urlWithoutHost(t)})},u=function(t,e){var n;if(o.enabled)return n=r(),window.history[t](n,"",e),m(),n},r=function(){return{up:{}}},d=function(t){var e;return(null!=t?t.up:void 0)?(e=n(),up.render({url:e,history:!0,location:e,peel:!0,layer:"root",target:o.restoreTargets,cache:!0,keep:!1,scroll:"restore",saveScroll:!1}).then(function(){return e=n(),i("up:location:changed",{url:e,reason:"pop",log:"Restored location "+e})})):up.puts("pop","Ignoring a state not pushed by Unpoly (%o)",t)},p=function(t){var e;return m(),up.viewport.saveScroll({location:c}),e=t.state,d(e)},i=function(){var t,e;return t=1<=arguments.length?g.call(arguments,0):[],(e=y.find(up.layer.stack.reversed(),"historyVisible")).emit.apply(e,t)},up.on("up:app:boot",function(){var t;return t=function(){if(window.history.scrollRestoration="manual",window.addEventListener("popstate",p),"GET"===up.protocol.initialRequestMethod())return h(n(),{event:!1})},"undefined"!=typeof jasmine&&null!==jasmine?t():setTimeout(t,100)}),up.macro("a[up-back], [up-href][up-back]",function(t){if(c)return e.setMissingAttrs(t,{"up-href":c,"up-scroll":"restore"}),t.removeAttribute("up-back"),up.link.makeFollowable(t)}),up.on("up:framework:reset",f),y.literal({config:o,push:t,replace:h,get_location:n,get_previousLocation:function(){return c},isLocation:s,normalizeURL:l}))}.call(this),function(){var l,p,s,t,n,e,r,o,i,u,a,c,h,f,d,m,y,g,v,b,w,k,E,S,L,C,_,O,F,T,R,A,x,P,q,D,M,H,j,N=[].slice;p=up.util,l=up.element,up.fragment=(n=new up.Config(function(){return{badTargetClasses:[/^up-/],navigateOptions:{focus:"auto",scroll:"auto",solo:!0,feedback:!0,fallback:!0,history:"auto",peel:!0,cache:"auto"},matchAroundOrigin:!0,runScripts:!1,autoHistoryTargets:[":main"],autoFocus:["hash","autofocus","main-if-main","target-if-lost"],autoScroll:["hash","layer-if-main"]}}),p.delegate(n,"mainTargets",function(){return up.layer.config.any}),x=function(){return n.reset()},q=function(t,e){return null==e&&(e={}),t=y(t,e),l.closestAttr(t,"up-source")},M=function(t){return l.closestAttr(t,"up-time")||"0"},T=up.mockable(function(){var n;return n=1<=arguments.length?N.call(arguments,0):[],p.asyncify(function(){var t,e;return e=O(n),e=up.RenderOptions.preprocess(e),up.browser.assertConfirmed(e),(t=p.pluckKey(e,"guardEvent"))&&(t.renderOptions=e,up.event.assertEmitted(t,{target:e.origin})),up.RenderOptions.assertContentGiven(e),e.url?A(e):R(e)})}),A=function(t){return up.feedback.aroundForOptions(t,function(){return new up.Change.FromURL(t).execute()})},R=function(t){return up.network.mimicLocalRequest(t),new up.Change.FromContent(t).execute()},C=up.mockable(function(){var t,e;return t=1<=arguments.length?N.call(arguments,0):[],e=O(t),T(p.merge(e,{navigate:!0}))}),b=function(t,e){var n;return null==e&&(e={}),t=y(t),n=(e.keepPlans||[]).map(function(t){return a(t),t.oldElement}),up.syntax.compile(t,{skip:n,layer:e.layer}),i(t,e),t},i=function(t,e){return up.emit(t,"up:fragment:inserted",{log:["Inserted fragment %o",t],origin:e.origin})},u=function(t){var e,n;return n=["Keeping fragment %o",t.oldElement],e=l.callbackAttr(t.oldElement,"up-on-keep",["newFragment","newData"]),c(t,"up:fragment:keep",{log:n,callback:e})},a=function(t){var e;return e=["Kept fragment %o",t.oldElement],c(t,"up:fragment:kept",{log:e})},c=function(t,e,n){var r,o;return o=t.oldElement,r=up.event.build(e,{newFragment:t.newElement,newData:t.newData}),up.emit(o,r,n)},o=function(t,e){var n,r,o;return n=null!=(o=e.log)?o:["Destroyed fragment %o",t],r=e.parent||document,up.emit(r,"up:fragment:destroyed",{fragment:t,parent:r,log:n})},w=function(t){return!!l.closest(t,".up-destroying")},E=function(t){return!w(t)},y=function(){var t,e,n,r;return t=1<=arguments.length?N.call(arguments,0):[],e=p.extractOptions(t),r=t.pop(),n=t[0],p.isElementish(r)?l.get(r):n?m(n,r,e):new up.FragmentFinder({selector:r,origin:e.origin,layer:e.layer}).find()},m=function(){var t;return t=1<=arguments.length?N.call(arguments,0):[],d.apply(null,t)[0]},s=/\:has\(([^\)]+)\)$/,d=function(){var t,e,n,r;return t=1<=arguments.length?N.call(arguments,0):[],e=p.extractOptions(t),r=t.pop(),n=t[0],(r=_(r,n,e)).descendants(n||document)},g=function(t,e,n){return null==n&&(n={}),(e=_(e,t,n)).subtree(t)},e=function(t,e){return 0<g(t,e).length},t=function(t,e,n){return t=l.get(t),(e=_(e,t,n)).closest(t)},r=function(){var t,e,n;return t=1<=arguments.length?N.call(arguments,0):[],((n=O(t)).element=y(n.target,n))&&new up.Change.DestroyFragment(n).execute(),"function"==typeof(e=up.migrate).formerlyAsync?e.formerlyAsync("up.destroy()"):void 0},O=function(t){var e;return e=p.parseArgIntoOptions(t,"target"),p.isElement(e.target)&&(e.origin||(e.origin=e.target)),e},S=function(t){return t.classList.add("up-destroying"),t.setAttribute("aria-hidden","true")},F=function(){var t,e,n;return t=1<=arguments.length?N.call(arguments,0):[],(n=O(t)).target||(n.target=":main"),e=y(n.target,n),null==n.url&&(n.url=q(e)),n.headers||(n.headers={}),n.headers[up.protocol.headerize("reloadFromTime")]=M(e),T(n)},j=function(t,e){return C(p.merge({url:t},e))},D=function(t){return p.unprefixCamelCase(t,"fail")},f=function(t){if(!t.match(/^fail[A-Z]/))return p.prefixCamelCase(t,"fail")},H=function(t){var e,n,r,o,i,s,u,a;if(p.isString(t))return t;if(t=l.get(t),l.isSingleton(t))return l.elementTagName(t);if(a=t.getAttribute("up-id"))return l.attributeSelector("up-id",a);if(r=t.getAttribute("id"))return l.idSelector(r);if(s=t.getAttribute("name"))return l.elementTagName(t)+l.attributeSelector("name",s);if(e=p.presence(p.filter(t.classList,k))){for(u="",n=0,i=e.length;n<i;n++)o=e[n],u+=l.classSelector(o);return u}return l.elementTagName(t)},k=function(e){var t;return t=function(t){return p.isRegExp(t)?t.test(e):t===e},!p.some(n.badTargetClasses,t)},P=function(e,t){var n;return null==t&&(t={}),n=t.origin,e.replace(/&|:origin\b/,function(t){return n?H(n):up.fail('Missing { origin } element to resolve "%s" reference (found in %s)',t,e)})},h=function(t,e){var n,r,o,i;for(null==e&&(e={}),"new"===(r=e.layer)||r instanceof up.Layer||up.fail("Must pass an up.Layer as { layer } option, but got %o",r),t=p.copy(p.wrapList(t)),n=[];t.length;)":main"===(i=t.shift())||!0===i?(o="new"===r?e.mode:r.mode,t.unshift.apply(t,up.layer.mainTargets(o))):":layer"===i?"new"===r||r.opening||t.unshift(r.getFirstSwappableElement()):p.isElementish(i)?n.push(H(i)):p.isString(i)&&n.push(P(i,e));return p.uniq(n)},_=function(t,e,n){var r,o,i;return null==n&&(n={}),o=[],n.destroying||o.push(E),n.layer||(n.layer=e),i=up.layer.getAll(n),"any"===n.layer||e&&l.isDetached(e)||o.push(function(e){return p.some(i,function(t){return t.contains(e)})}),r=(r=up.fragment.expandTargets(t,p.merge(n,{layer:i[0]}))).map(function(t){return(t=t.replace(s,function(t,e){return o.push(function(t){return t.querySelector(e)}),""}))||"*"}),new up.Selector(r,o)},v=function(t){return!!e(t,n.autoHistoryTargets)||(up.puts("up.render()","Will not auto-update history because fragment doesn't contain a selector from up.fragment.config.autoHistoryTargets"),!1)},L=function(t,e,n){return null==n&&(n={}),t=l.get(t),(e=_(e,t,n)).matches(t)},up.on("up:app:boot",function(){var t;if((t=document.body).setAttribute("up-source",up.history.location),b(t),!up.browser.canPushState())return up.warn("Cannot push history changes. Next fragment update will load in a new page.")}),up.on("up:framework:reset",x),p.literal({config:n,reload:F,destroy:r,render:T,navigate:C,get:y,getDumb:m,all:d,subtree:g,contains:e,closest:t,source:q,hello:b,visit:j,markAsDestroying:S,emitInserted:i,emitDestroyed:o,emitKeep:u,emitKept:a,successKey:D,failKey:f,expandTargets:h,toTarget:H,matches:L,hasAutoHistory:v})),up.replace=up.fragment.replace,up.extract=up.fragment.extract,up.reload=up.fragment.reload,up.destroy=up.fragment.destroy,up.render=up.fragment.render,up.navigate=up.fragment.navigate,up.hello=up.fragment.hello,up.visit=up.fragment.visit,p.delegate(up,"context",function(){return up.layer.current})}.call(this),function(){var t,r,e,a,n,o,l,i,s,p,u,c,h,f,d,m,y,g,v,b,w,k,E,S,L,C,_,O,F,T,R,A,x,P,q,D,M,H,j,N,z,B=[].slice;up.viewport=(j=up.util,l=up.element,i=up.fragment,n=new up.Config(function(){return{viewportSelectors:["[up-viewport]","[up-fixed]"],fixedTop:["[up-fixed~=top]"],fixedBottom:["[up-fixed~=bottom]"],anchoredRight:["[up-anchored~=right]","[up-fixed~=top]","[up-fixed~=bottom]","[up-fixed~=right]"],revealSnap:200,revealPadding:0,revealTop:!1,revealMax:function(){return.5*window.innerHeight},scrollSpeed:1}}),D=new up.MotionController("scrolling"),w=function(){return n.reset(),D.reset()},A=function(t,e,n){var r;return null==n&&(n={}),t=i.get(t,n),r=new up.ScrollMotion(t,e,n),D.startMotion(t,r,n)},e=function(){var t;return t=n.anchoredRight.join(","),i.all(t,{layer:"root"})},S=function(t,e){var n;return e=j.options(e),t=i.get(t,e),(e.layer=up.layer.get(t))?(e.peel&&e.layer.peel(),n=new up.RevealMotion(t,e),D.startMotion(t,n,e)):up.error.failed.async("Cannot reveal a detached element")},o=function(t,e){var n,r;if(null==e&&(e={}),up.browser.isIE11()?(n=(r=a(t)).scrollTop,t.focus(),r.scrollTop=n):t.focus({preventScroll:!0}),!e.preventScroll)return S(t)},H=function(t,e){return o(t,e),t===document.activeElement},m=function(t){return l.matches(t,"a[href], button, textarea, input, select")},g=function(t){if(!t.hasAttribute("tabindex")&&!m(t))return t.setAttribute("tabindex","-1"),t.classList.add("up-focusable-content")},L=function(t,e){var n;if(null==t&&(t=location.hash),n=s(t,e))return up.reveal(n,{top:!0})},r=function(){return[F()].concat(B.call(n.viewportSelectors)).join(",")},a=function(t,e){var n;return null==e&&(e={}),n=i.get(t,e),l.closest(n,r())},d=function(t,e){return null==e&&(e={}),t=i.get(t,e),l.subtree(t,r())},c=function(t,e){return null==e&&(e={}),t=i.get(t,e),l.around(t,r())},u=function(t){return null==t&&(t={}),i.all(r(),t)},F=function(){var t;return(t=document.scrollingElement)?t.tagName:"html"},h=function(){return document.querySelector(F())},T=function(){return l.root.clientWidth},_=function(){return l.root.clientHeight},y=function(t){return l.matches(t,F())},C=function(){return window.innerWidth>document.documentElement.offsetWidth},O=function(){var t,e;return t=document.body,e=document.documentElement,j.find([e,t],z)||h()},z=function(t){var e;return"auto"===(e=l.style(t,"overflow-y"))||"scroll"===e},q=j.memoize(function(){var t,e,n;return e={position:"absolute",top:"0",left:"0",width:"100px",height:"100px",overflowY:"scroll"},n=(t=up.element.affix(document.body,"[up-viewport]",{style:e})).offsetWidth-t.clientWidth,up.element.remove(t),n}),x=function(t){return up.fragment.toTarget(t)},P=function(t){return null==t&&(t={}),j.mapObject(u(t),function(t){return[x(t),t.scrollTop]})},p=function(t){var e;return null==t&&(t=document),e=["[up-fixed]"].concat(n.fixedTop).concat(n.fixedBottom),t.querySelectorAll(e.join(","))},R=function(){var t,e,n,r,o,i,s;if(t=1<=arguments.length?B.call(arguments,0):[],s=(n=v(t))[0],i=(e=n[1]).location||e.layer.location)return o=null!=(r=e.tops)?r:f(s),e.layer.lastScrollTops.set(i,o)},f=function(t){return j.mapObject(t,function(t){return[x(t),t.scrollTop]})},E=function(){var t,e,n,r,o,i;return t=1<=arguments.length?B.call(arguments,0):[],i=(n=v(t))[0],o=(e=n[1]).layer.location,r=e.layer.lastScrollTops.get(o)||{},up.puts("up.viewport.restoreScroll()","Restoring scroll positions for URL %s to %o",j.urlWithoutHost(o),r),M(i,r)},v=function(t){var e;return(e=j.copy(j.extractOptions(t))).layer=up.layer.get(e),[t[0]?[a(t[0],e)]:e.around?c(e.around,e):u(e),e]},k=function(){var t,e,n;return t=1<=arguments.length?B.call(arguments,0):[],n=(e=v(t))[0],e[1],M(n,{})},M=function(t,r){var e;return e=j.map(t,function(t){var e,n;return e=x(t),n=r[e]||0,A(t,n,{duration:0})}),Promise.all(e)},t=function(t,e){var n,r,o,i,s,u;return null==e&&(e={}),u=a(t).getBoundingClientRect(),s=t.getBoundingClientRect(),r=new up.Rect({left:s.left-u.left,top:s.top-u.top,width:s.width,height:s.height}),"function"==typeof e.afterMeasure&&e.afterMeasure(),l.setStyle(t,{position:"static"===t.style.position?"static":"relative",top:"auto",right:"auto",bottom:"auto",left:"auto",width:"100%",height:"100%"}),n=l.createFromSelector("up-bounds"),l.insertBefore(t,n),n.appendChild(t),(o=function(t,e){return r.left+=t,r.top+=e,l.setStyle(n,r)})(0,0),i=t.getBoundingClientRect(),o(s.left-i.left,s.top-i.top),j.each(p(t),l.fixedToAbsolute),{bounds:n,moveBounds:o}},s=function(t,e){var n;if(null==e&&(e={}),t=b(t))return n=[l.attributeSelector("id",t),"a"+l.attributeSelector("name",t)].join(","),i.get(n,e)},N=!(b=function(t){return null!=t?t.replace(/^#/,""):void 0}),up.on("scroll",{once:!0},function(){return N=!0}),up.on("up:app:boot",function(){return j.task(function(){if(!N)return L()})}),up.on(window,"hashchange",function(){return L()}),up.on("up:framework:reset",w),j.literal({reveal:S,revealHash:L,firstHashTarget:s,scroll:A,config:n,get:a,subtree:d,around:c,all:u,rootSelector:F,get_root:h,rootWidth:T,rootHeight:_,rootHasReducedWidthFromScrollbar:C,rootOverflowElement:O,isRoot:y,scrollbarWidth:q,scrollTops:P,saveScroll:R,restoreScroll:E,resetScroll:k,anchoredRight:e,fixedElements:p,absolutize:t,focus:o,tryFocus:H,makeFocusable:g})),up.focus=up.viewport.focus,up.scroll=up.viewport.scroll,up.reveal=up.viewport.reveal}.call(this),function(){var t,i,m,n,e,y,s,r,g,o,u,a,l,v,p,c,h,f,d,b,w,k,E,S,L,C,_,O,F;up.motion=(C=up.util,y=up.element,p={},c={},v=new up.MotionController("motion"),e=new up.Config(function(){return{duration:175,easing:"ease",enabled:!matchMedia("(prefers-reduced-motion: reduce)").matches}}),h=function(t){return C.pickBy(t,function(t){return t.isDefault})},k=function(){return v.reset(),p=h(p),c=h(c),e.reset()},u=function(){return e.enabled},t=function(t,e,n){var r,o;return t=up.fragment.get(t),n=C.options(n),r=s(e),F(t,e,n)?(o=function(){return r(t,n)},v.startFunction(t,o,n)):E(t,e)},F=function(t,e,n){return m(n),u()&&!a(e)&&0<n.duration&&!y.isSingleton(t)},E=function(t,e){return C.isOptions(e)&&y.setStyle(t,e),Promise.resolve()},i=function(t,e,n){return n=C.merge(n,{finishEvent:v.finishEvent}),new up.CSSTransition(t,e,n).start()},m=function(t){return t.easing||(t.easing=e.easing),t.duration||(t.duration=e.duration)},r=function(t){return p[t]||up.fail("Unknown animation %o",t)},o=function(t){return v.finish(t)},l=function(e,n,t,r){var o,i,s,u,a,l,p,c,h,f,d;return r=C.options(r),m(r),e=up.fragment.get(e),n=up.fragment.get(n),h=g(t),d=F(e,h,r),u=C.pluckKey(r,"beforeStart")||C.noop,i=C.pluckKey(r,"afterInsert")||C.noop,s=C.pluckKey(r,"beforeDetach")||C.noop,o=C.pluckKey(r,"afterDetach")||C.noop,l=C.pluckKey(r,"scrollNew")||C.asyncNoop,u(),d?v.isActive(e)&&!1===r.trackMotion?h(e,n,r):(up.puts("up.morph()","Morphing %o to %o with transition %O",e,n,t),f=up.viewport.get(e),p=f.scrollTop,a=up.viewport.absolutize(e,{afterMeasure:function(){return y.insertBefore(e,n),i()}}),c=function(){return l().then(function(){var t;return t=f.scrollTop,a.moveBounds(0,t-p),h(e,n,r)}).then(function(){return s(),y.remove(a.bounds),o()})},v.startFunction([e,n],c,r)):(s(),S(e,n),i(),o(),l())},g=function(t){var e;if(!a(t))return C.isFunction(t)?t:C.isArray(t)?n.apply(null,t):C.isString(t)?0<=t.indexOf("/")?n.apply(null,t.split("/")):(e=c[t])?g(e):void 0:up.fail("Unknown transition %o",t)},n=function(t,e){var r,o;return a(t)&&a(t)?void 0:(o=s(t)||C.asyncNoop,r=s(e)||C.asyncNoop,function(t,e,n){return Promise.all([o(t,n),r(e,n)])})},s=function(n){return a(n)?void 0:C.isFunction(n)?n:C.isString(n)?r(n):C.isOptions(n)?function(t,e){return i(t,n,e)}:up.fail("Unknown animation %o",n)},S=up.mockable(function(t,e){return y.replace(t,e)}),w=function(t,e){var n;return(n=g(e)).isDefault=up.framework.booting,c[t]=n},f=function(t,e){var n;return(n=s(e)).isDefault=up.framework.booting,p[t]=n},O=function(){if(!u())return up.puts("up.motion","Animations are disabled")},a=function(t){return!t||"none"===t},(b=function(t,n,r){return f(t,function(t,e){return t.style.opacity=0,y.setStyle(t,{opacity:n}),i(t,{opacity:r},e)})})("fade-in",0,1),b("fade-out",1,0),L=function(t,e){return{transform:"translate("+t+"px, "+e+"px)"}},_=function(t){return y.setStyle(t,L(0,0)),t.getBoundingClientRect()},(d=function(t,o){var e;return e="move-from-"+t,f("move-to-"+t,function(t,e){var n,r;return n=_(t),r=o(n),i(t,r,e)}),f(e,function(t,e){var n,r;return n=_(t),r=o(n),y.setStyle(t,r),i(t,L(0,0),e)})})("top",function(t){var e;return e=t.top+t.height,L(0,-e)}),d("bottom",function(t){var e;return e=up.viewport.rootHeight()-t.top,L(0,e)}),d("left",function(t){var e;return e=t.left+t.width,L(-e,0)}),d("right",function(t){var e;return e=up.viewport.rootWidth()-t.left,L(e,0)}),w("cross-fade",["fade-out","fade-in"]),w("move-left",["move-to-left","move-from-right"]),w("move-right",["move-to-right","move-from-left"]),w("move-up",["move-to-top","move-from-bottom"]),w("move-down",["move-to-bottom","move-from-top"]),up.on("up:framework:boot",O),up.on("up:framework:reset",k),{morph:l,animate:t,finish:o,finishCount:function(){return v.finishCount},transition:w,animation:f,config:e,isEnabled:u,isNone:a,willAnimate:F,swapElementsDirectly:S}),up.transition=up.motion.transition,up.animation=up.motion.animation,up.morph=up.motion.morph,up.animate=up.motion.animate}.call(this),function(){var r,o,i,s,e,t,n,u,a,l,p,c,h,f,d,m,y,g=[].slice;r=up.util,up.network=(s=new up.Config(function(){return{concurrency:4,wrapMethod:!0,cacheSize:70,cacheExpiry:3e5,badDownlink:.6,badRTT:750,badResponseTime:400,autoCache:function(t){return t.isSafe()},clearCache:function(t){return!t.isSafe()},requestMetaKeys:["target","failTarget","mode","failMode","context","failContext"]}}),c=new up.Request.Queue,i=new up.Request.Cache,d=function(){return o(),c.reset(),s.reset(),i.clear()},a=function(){var t,e,n;return t=1<=arguments.length?g.call(arguments,0):[],e=new up.Request(p(t)),y(e)||h(e),(n=e.solo)&&c.abortExcept(e,n),e},l=function(t){var e,n;if((n=t.solo)&&o(n),e=t.clearCache)return i.clear(e)},p=function(t){var e,n;return(n=r.extractOptions(t)).url||(n.url=t[0]),"function"==typeof(e=up.migrate).handleRequestOptions&&e.handleRequestOptions(n),n},y=function(t){var e;if(t.willCache()&&(e=i.get(t)))return up.puts("up.request()","Re-using previous request to %s %s",t.method,t.url),t.preload||c.promoteToForeground(e),t.followState(e),!0},h=function(t){return t.preload&&!t.isSafe()&&up.fail("Will not preload request to %s",t.description),e(t),c.asap(t)},e=function(o){return o.willCache()&&i.set(o,o),r.always(o,function(t){var e,n,r;if((e=null!=(n=null!=(r=t.clearCache)?r:o.clearCache)?n:s.clearCache(o,t))&&i.clear(e),(o.willCache()||i.get(o))&&i.set(o,o),!t.ok)return i.remove(o)})},n=function(){return!t()},t=function(){return c.isBusy()},m=function(){var t;if(t=navigator.connection)return t.saveData||t.rtt&&t.rtt>s.badRTT||t.downlink&&t.downlink<s.badDownlink},o=function(){var t;return t=1<=arguments.length?g.call(arguments,0):[],c.abort.apply(c,t)},f=function(t,e){var n;if(t.cache&&e.url&&t.url!==e.url)return n=t.variant({method:e.method,url:e.url}),i.alias(t,n)},u=function(t){return r.contains(["GET","OPTIONS","HEAD"],r.normalizeMethod(t))},up.on("up:framework:reset",d),{request:a,cache:i,isIdle:n,isBusy:t,isSafeMethod:u,config:s,abort:o,registerAliasForRedirect:f,queue:c,shouldReduceRequests:m,mimicLocalRequest:l}),up.request=up.network.request,up.cache=up.network.cache}.call(this),function(){var n,i,o,t,e,r,s,u,a,l,p,c,h,f,d,m,y,g,v,b=[].slice;i=up.util,n=up.element,up.layer=(t=[up.Layer.Modal,up.Layer.Popup,up.Layer.Drawer,up.Layer.Cover],o=[up.Layer.Root].concat(t),l=new up.Config(function(){var t,e,n,r;for(r={mode:"modal",any:{mainTargets:["[up-main='']","main",":layer"]},root:{mainTargets:["[up-main~=root]"],historyVisible:!0},overlay:{mainTargets:["[up-main~=overlay]"],openAnimation:"fade-in",closeAnimation:"fade-out",dismissLabel:"\xd7",dismissAriaLabel:"Dismiss dialog",dismissable:!0,historyVisible:"auto"},cover:{mainTargets:["[up-main~=cover]"]},drawer:{mainTargets:["[up-main~=drawer]"],backdrop:!0,position:"left",size:"medium",openAnimation:function(t){switch(t.position){case"left":return"move-from-left";case"right":return"move-from-right"}},closeAnimation:function(t){switch(t.position){case"left":return"move-to-left";case"right":return"move-to-right"}}},modal:{mainTargets:["[up-main~=modal]"],backdrop:!0,size:"medium"},popup:{mainTargets:["[up-main~=popup]"],position:"bottom",size:"medium",align:"left",dismissable:"outside key"}},e=0,n=o.length;e<n;e++)r[(t=o[e]).mode].Class=t;return r}),v=null,p=[],c=function(t){return i.flatMap(h(t),"mainTargets")},h=function(t){return"root"===t?[l.root,l.any]:[l[t],l.overlay,l.any]},f=function(t){var e,n,r,o;return"function"==typeof(e=up.migrate).handleLayerOptions&&e.handleLayerOptions(t),i.isGiven(t.layer)?(n=String(t.layer).match(/^(new|shatter|swap)( (\w+))?/))&&(t.layer="new",r=n[1],o=n[3],t.mode||(t.mode=o||l.mode),"swap"===r?up.layer.isOverlay()&&(t.baseLayer="parent"):"shatter"===r&&(t.baseLayer="root")):t.mode?t.layer="new":i.isElementish(t.target)?t.layer=v.get(t.target,{normalizeLayerOptions:!1}):t.origin?t.layer="origin":t.layer="current",t.context||(t.context={}),t.baseLayer=v.get("current",i.merge(t,{normalizeLayerOptions:!1}))},u=function(t){var e,n,r,o;return o=t.mode,e=l[o].Class,n=i.reverse(h(o)),(r=up.migrate.handleLayerConfig)&&n.forEach(r),new e(t=i.mergeDefined.apply(i,b.call(n).concat([{mode:o,stack:v}],[t])))},m=function(t,e){return n.callbackAttr(t,e,["layer"])},a=function(t,e){return n.callbackAttr(t,e,["layer","value"])},g=function(){return l.reset(),v.reset(),p=i.filter(p,"isDefault")},d=function(t){return t=i.options(t,{layer:"new",defaultToEmptyContent:!0,navigate:!0}),up.render(t).then(function(t){return t.layer})},s=function(t){return new Promise(function(e,n){return t=i.merge(t,{onAccepted:function(t){return e(t.value)},onDismissed:function(t){return n(t.value)}}),d(t)})},e=function(){return i.map(o,function(t){return t.selector()}).join(",")},y=function(t){return i.isString(t)?'layer "'+t+'"':t.toString()},up.on("up:fragment:destroyed",function(){return v.sync()}),up.on("up:framework:boot",function(){return v=new up.LayerStack}),up.on("up:framework:reset",g),r=i.literal({config:l,mainTargets:c,open:d,build:u,ask:s,normalizeOptions:f,openCallbackAttr:m,closeCallbackAttr:a,anySelector:e,optionToString:y,get_stack:function(){return v}}),i.delegate(r,["get","getAll","root","overlays","current","front","sync","count","dismissOverlays"],function(){return v}),i.delegate(r,["accept","dismiss","isRoot","isOverlay","isFront","on","off","emit","parent","historyVisible","location","mode","context","element","contains","size","affix"],function(){return v.current}),r)}.call(this),function(){var t,e,n,r,o,i,s,u,a,l,p,c,h,f,d,m,y,g,v,b,w,k,E,S,L,C,_,O,F,T,R,A,x,P,q=[].slice;up.link=(x=up.util,u=up.element,L=new up.LinkPreloader,S=null,e=["a[up-content]","a[up-fragment]","a[up-document]"],n=["a[href]","[up-href]"],t=["[up-follow]","[up-target]","[up-layer]","[up-transition]","[up-preload]"],r=function(t,n){return x.flatMap(t,function(e){return n.map(function(t){return e+t})})},o=new up.Config(function(){return{followSelectors:r(n,t).concat(e),noFollowSelectors:["[up-follow=false]","a[download]","a[target]",'a[href^="#"]:not([up-content]):not([up-fragment]):not([up-document])','a[href^="javascript:"]'],instantSelectors:["[up-instant]"],noInstantSelectors:["[up-instant=false]","[onclick]"],preloadSelectors:r(n,["[up-preload]"]),noPreloadSelectors:["[up-preload=false]"],clickableSelectors:e.concat(["[up-emit]","[up-accept]","[up-dismiss]","[up-clickable]"]),preloadDelay:90,preloadEnabled:"auto"}}),d=function(){return o.followSelectors.join(",")},y=function(){return o.preloadSelectors.join(",")},m=function(){return o.instantSelectors.join(",")},f=function(){return o.clickableSelectors.join(",")},g=function(t){return u.matches(t,o.noFollowSelectors.join(","))||x.isCrossOrigin(t)},k=function(t){return!up.browser.canPushState()||u.matches(t,o.noPreloadSelectors.join(","))||g(t)||!P(t)},P=function(t){var e;if((e=O(t)).url)return null==e.cache&&(e.cache="auto"),e.basic=!0,new up.Request(e).willCache()},w=function(t){return u.matches(t,o.noInstantSelectors.join(","))||g(t)},T=function(){return S=null,o.reset(),L.reset()},a=up.mockable(function(t,e){return up.render(p(t,e))}),O=function(t,e){var n;return e=x.options(e),n=new up.OptionsParser(e,t),e.url=c(t,e),e.method=l(t,e),n.json("headers"),n.json("params"),n.booleanOrString("cache"),n.booleanOrString("clearCache"),n["boolean"]("solo"),n.string("contentType",{attr:["enctype","up-content-type"]}),e},p=function(t,e){var n,r,o;return t=up.fragment.get(t),e=O(t,e),(o=new up.OptionsParser(e,t,{fail:!0}))["boolean"]("feedback"),o["boolean"]("fail"),null==(n=o.options).origin&&(n.origin=t),o["boolean"]("navigate",{"default":!0}),o.string("confirm"),o.string("target"),o.booleanOrString("fallback"),o.parse(function(t,e){return u.callbackAttr(t,e,["request","response","renderOptions"])},"onLoaded"),o.string("content"),o.string("fragment"),o.string("document"),o["boolean"]("peel"),o.string("layer"),o.string("baseLayer"),o.json("context"),o.string("mode"),o.string("align"),o.string("position"),o.string("class"),o.string("size"),o.booleanOrString("dismissable"),o.parse(up.layer.openCallbackAttr,"onOpened"),o.parse(up.layer.closeCallbackAttr,"onAccepted"),o.parse(up.layer.closeCallbackAttr,"onDismissed"),o.string("acceptEvent"),o.string("dismissEvent"),o.string("acceptLocation"),o.string("dismissLocation"),o.booleanOrString("historyVisible"),o.booleanOrString("focus"),o["boolean"]("saveScroll"),o.booleanOrString("scroll"),o["boolean"]("revealTop"),o.number("revealMax"),o.number("revealPadding"),o.number("revealSnap"),
|
6
|
-
o.string("scrollBehavior"),o.booleanOrString("history"),o.booleanOrString("location"),o.booleanOrString("title"),o.booleanOrString("animation"),o.booleanOrString("transition"),o.string("easing"),o.number("duration"),"function"==typeof(r=up.migrate).parseFollowOptions&&r.parseFollowOptions(o),e.guardEvent||(e.guardEvent=up.event.build("up:link:follow",{log:"Following link"})),e},F=function(t,e){var n;return t=up.fragment.get(t),A()?(n=up.event.build("up:link:preload",{log:["Preloading link %o",t]}),a(t,x.merge(e,{preload:!0},{guardEvent:n}))):up.error.failed.async("Link preloading is disabled")},A=function(){var t;return"auto"===(t=o.preloadEnabled)?!up.network.shouldReduceRequests():t},l=function(t,e){return null==e&&(e={}),x.normalizeMethod(e.method||t.getAttribute("up-method")||t.getAttribute("data-method"))},c=function(t,e){var n;if(null==e&&(e={}),"#"!==(n=e.url||t.getAttribute("href")||t.getAttribute("up-href")))return n},v=function(t){return t=up.fragment.get(t),u.matches(t,d())&&!g(t)},_=function(t){if(!v(t))return t.setAttribute("up-follow","")},C=function(t){if(!u.matches(t,"a[href], button"))return u.setMissingAttrs(t,{tabindex:"0",role:"link"}),t.addEventListener("keydown",function(t){if("Enter"===t.key||"Space"===t.key)return h(t)})},up.macro(f,C),R=function(t,e){var n,r;return!t.defaultPrevented&&!g(e)&&(r="a, [up-href], "+up.form.fieldSelector(),!(n=u.closest(t.target,r))||n===e)},b=function(t){var e;return(e=u.closest(t,m()))&&!w(e)},i=function(n){return n.on("click",function(t,e){if(up.event.isUnmodified(t))return b(e)&&S?up.event.halt(t):n.wasHitByMouseEvent(t)&&!s(t)&&h(t),S=null}),n.on("mousedown",function(t,e){if(up.event.isUnmodified(t))return S=t.target,b(e)?h(t):void 0})},s=function(t){return S&&S!==t.target},h=function(t){var e;return e=up.event.fork(t,"up:click",["clientX","clientY","button"].concat(q.call(up.event.keyModifiers))),up.emit(t.target,e,{log:!1})},E=function(t){var e;return e=l(t),up.network.isSafeMethod(e)},up.on("up:click",d,function(t,e){if(R(t,e))return up.event.halt(t),up.log.muteUncriticalRejection(a(e))}),up.macro("[up-expand]",function(t){var e,n,r;if(r=t.getAttribute("up-expand")||"a, [up-href]",n=u.get(t,r))return(e=u.upAttrs(n))["up-href"]||(e["up-href"]=n.getAttribute("href")),u.setMissingAttrs(t,e),_(t)}),up.compiler(y,function(t){if(!k(t))return L.observeLink(t)}),up.on("up:framework:reset",T),{follow:a,followOptions:p,preload:F,makeFollowable:_,makeClickable:C,isSafe:E,isFollowable:v,shouldFollowEvent:R,followMethod:l,convertClicks:i,config:o,combineFollowableSelectors:r}),up.follow=up.link.follow}.call(this),function(){var t,n,e,c,h,o,f,i,r,s,u,a,l,p,d,m,y,g,v,b,w,k,E,S,L,C,_,O=[].slice;up.form=(C=up.util,h=up.element,t=["[up-submit]","[up-target]","[up-layer]","[up-transition]"],c=new up.Config(function(){return{validateTargets:["[up-fieldset]:has(:origin)","fieldset:has(:origin)","label:has(:origin)","form:has(:origin)"],fieldSelectors:["select","input:not([type=submit]):not([type=image])","button[type]:not([type=submit])","textarea"],submitSelectors:up.link.combineFollowableSelectors(["form"],t),noSubmitSelectors:["[up-submit=false]","[target]"],submitButtonSelectors:["input[type=submit]","input[type=image]","button[type=submit]","button:not([type])"],observeDelay:0}}),a=function(){return c.submitSelectors.join(",")},n=null,g=function(){return c.reset()},o=function(e){return null==e&&(e=""),c.fieldSelectors.map(function(t){return t+e}).join(",")},f=function(t){var e,n,r;return t=h.get(t),e=h.subtree(t,o()),h.matches(t,"form[id]")&&(n=o(h.attributeSelector("form",t.getAttribute("id"))),r=h.all(n),e.push.apply(e,r),e=C.uniq(e)),e},k=function(t){var e,n;return n=b(),(e=document.activeElement)&&h.matches(e,n)&&t.contains(e)?e:h.get(t,n)},b=function(){return c.submitButtonSelectors.join(",")},v=up.mockable(function(t,e){return up.render(w(t,e))}),w=function(t,e){var n,r,o;return e=C.options(e),t=up.fragment.get(t),t=h.closest(t,"form"),r=new up.OptionsParser(e,t),n=up.Params.fromForm(t),(o=k(t))&&(n.addField(o),e.method||(e.method=o.getAttribute("formmethod")),e.url||(e.url=o.getAttribute("formaction"))),n.addAll(e.params),e.params=n,r.string("url",{attr:"action","default":up.fragment.source(t)}),r.string("method",{attr:["up-method","data-method","method"],"default":"GET",normalize:C.normalizeMethod}),"GET"===e.method&&(e.url=up.Params.stripURL(e.url)),r.string("failTarget",{"default":up.fragment.toTarget(t)}),e.guardEvent||(e.guardEvent=up.event.build("up:form:submit",{log:"Submitting form"})),C.assign(e,up.link.followOptions(t,e)),e},up.on("up:click",b,function(t,e){var n;if((n=h.closest(e,"form"))&&d(n))return e.focus()}),m=function(t){var e,n,r,o,i,s,u,a,l,p;return r=t,e=2<=arguments.length?O.call(arguments,1):[],r=h.list(r),o=C.flatMap(r,f),n=null!=(u=null!=(a=C.extractCallback(e))?a:y(r[0]))?u:up.fail("up.observe: No change callback given"),(s=C.extractOptions(e)).delay=null!=(l=null!=(p=s.delay)?p:h.numberAttr(r[0],"up-delay"))?l:c.observeDelay,(i=new up.FieldObserver(o,s,n)).start(),function(){return i.stop()}},y=function(t){var e;if(e=t.getAttribute("up-observe"))return new Function("value","name",e)},e=function(t,e){return m(t,e,function(){return v(t)})},r=function(t,e){var n,r;return n=l(t),C.isElementish(e.target)?up.fragment.toTarget(e.target):(r=e.target||t.getAttribute("up-validate")||n.getAttribute("up-validate"))?r:h.matches(t,"form")?up.fragment.toTarget(t):s(t,e)||up.fail("Could not find validation target for %o (tried defaults %o)",t,c.validateTargets)},s=function(t,e){var n;return n=up.layer.get(t),C.findResult(c.validateTargets,function(t){if(up.fragment.get(t,C.merge(e,{layer:n})))return t})},_=function(t,e){return t=up.fragment.get(t),(e=C.options(e)).navigate=!1,e.origin=t,e.history=!1,e.target=r(t,e),e.focus="keep",e.fail=!1,e.headers||(e.headers={}),e.headers[up.protocol.headerize("validate")]=t.getAttribute("name")||":unknown",e.guardEvent=up.event.build("up:form:validate",{field:t,log:"Validating form"}),v(t,e)},L=function(t){var e,n,r,o,i,s;return o=i=void 0,h.matches(t,"input[type=checkbox]")?t.checked?(i=t.value,o=":checked"):o=":unchecked":h.matches(t,"input[type=radio]")?(n=l(t),r=t.getAttribute("name"),(e=n.querySelector("input[type=radio]"+h.attributeSelector("name",r)+":checked"))?(o=":checked",i=e.value):o=":unchecked"):i=t.value,s=[],C.isPresent(i)?(s.push(i),s.push(":present")):s.push(":blank"),C.isPresent(o)&&s.push(o),s},S=function(t,e){var n,r,o,i;return null==e&&(e={}),i=null!=(o=e.target)?o:t.getAttribute("up-switch"),r=l(t),i||up.fail("No switch target given for %o",t),n=L(t),C.each(h.all(r,i),function(t){return E(t,n)})},E=up.mockable(function(t,e){var n,r,o;return e||(e=L(i(t))),(n=t.getAttribute("up-hide-for"))?(n=C.splitValues(n),r=0===C.intersect(e,n).length):(o=(o=t.getAttribute("up-show-for"))?C.splitValues(o):[":present",":checked"],r=0<C.intersect(e,o).length),h.toggle(t,r),t.classList.add("up-switched")}),i=function(n){var t,e;return t=l(n),e=h.all(t,"[up-switch]"),C.find(e,function(t){var e;return e=t.getAttribute("up-switch"),h.matches(n,e)})||up.fail("Could not find [up-switch] field for %o",n)},l=function(t){return t.form||h.closest(t,"form, "+up.layer.anySelector())},u=function(){var t;if((t=document.activeElement)&&h.matches(t,o()))return t},d=function(t){return t=up.fragment.get(t),h.matches(t,a())&&!p(t)},p=function(t){return h.matches(t,c.noSubmitSelectors.join(","))},up.on("submit",a,function(t,e){if(!t.defaultPrevented&&!p(e))return"function"==typeof n&&n(),up.event.halt(t),up.log.muteUncriticalRejection(v(e))}),up.on("change","[up-validate]",function(t){var e;return e=f(t.target)[0],n=C.abortableMicrotask(function(){return up.log.muteUncriticalRejection(_(e))})}),up.compiler("[up-switch]",function(t){return S(t)}),up.on("change","[up-switch]",function(t,e){return S(e)}),up.compiler("[up-show-for]:not(.up-switched), [up-hide-for]:not(.up-switched)",function(t){return E(t)}),up.compiler("[up-observe]",function(t){return m(t)}),up.compiler("[up-autosubmit]",function(t){return e(t)}),up.on("up:framework:reset",g),{config:c,submit:v,submitOptions:w,isSubmittable:d,observe:m,validate:_,autosubmit:e,fieldSelector:o,fields:f,focusedField:u,switchTarget:E}),up.submit=up.form.submit,up.observe=up.form.observe,up.autosubmit=up.form.autosubmit,up.validate=up.form.validate}.call(this),function(){var e,o,i,t,u,a,n,r,l,s,p,c,h,f,d,m,y,g,v,b;up.feedback=(m=up.util,a=up.element,u=new up.Config(function(){return{currentClasses:["up-current"],navSelectors:["[up-nav]","nav"]}}),h=function(){return u.reset()},e="up-active",o="a, [up-href]",s=function(){return u.navSelectors.join(",")},p=function(t){if(t)return m.normalizeURL(t,{stripTrailingSlash:!0})},l=function(t){return t.upFeedbackURLs||(t.upFeedbackURLs=new up.LinkFeedbackURLs(t))},y=function(t){var e,n;return e={layer:up.layer.get(t)},up.fragment.closest(t,s(),e)?(n=up.fragment.subtree(t,o,e),v(n,e)):b(t,e)},b=function(t,e){var n,r;return r=up.fragment.subtree(t,s(),e),n=m.flatMap(r,function(t){return a.subtree(t,o)}),v(n,e)},r=function(t){return t.feedbackLocation||t.location},v=function(t,e){var n,s;if(null==e&&(e={}),t.length)return n=e.layer||up.layer.get(t[0]),(s=r(n))?m.each(t,function(t){var e,n,r,o,i;for(r=l(t).isCurrent(s),n=0,o=(i=u.currentClasses).length;n<o;n++)e=i[n],a.toggleClass(t,e,r);return a.toggleAttr(t,"aria-current","page",r)}):void 0},n=function(t){return a.ancestor(t,o)||t},f=function(t){return n(t).classList.add(e)},d=function(t){return n(t).classList.remove(e)},i=function(t,e){var n;return f(t),n=e(),m.always(n,function(){return d(t)}),n},t=function(t,e){var n,r;return(r=t.feedback)&&(n=m.isBoolean(r)?t.origin:r),n?(n=up.fragment.get(n),i(n,e)):e()},g=function(t){var e,n;if(n=t.feedbackLocation,e=p(t.location),!n||n!==e)return t.feedbackLocation=e,b(t.element,{layer:t})},c=function(){var t;if((t=up.layer.front).showsLiveHistory())return g(t)},up.on("up:location:changed",function(){return c()}),up.on("up:fragment:inserted",function(t,e){return y(e)}),up.on("up:layer:location:changed",function(t){return g(t.layer)}),up.on("up:framework:reset",h),{config:u,start:f,stop:d,around:i,aroundForOptions:t,normalizeURL:p})}.call(this),function(){var p,c,t,e,h,n,r,f;up.radio=(f=up.util,c=up.element,p=new up.Config(function(){return{hungrySelectors:["[up-hungry]"],pollInterval:3e4,pollEnabled:"auto"}}),e=function(){return p.reset()},t=function(){return p.hungrySelectors.join(",")},n=function(t,e){var n,r,o,i,s,u,a,l;return null==e&&(e={}),i=null!=(u=null!=(a=e.interval)?a:c.numberAttr(t,"up-interval"))?u:p.pollInterval,l=!1,s=null,e.onQueued=function(t){return s=t},r=function(){if(!l)return h(t)?f.always(up.reload(t,e),o):(up.puts("[up-poll]","Polling is disabled"),o(Math.min(1e4,i)))},o=function(t){if(null==t&&(t=i),!l)return setTimeout(r,t)},n=function(){return l=!0,null!=s?s.abort():void 0},up.on(t,"up:poll:stop",n),o(),n},r=function(t){return up.emit(t,"up:poll:stop")},h=function(t){var e,n;return"auto"===(n=f.evalOption(p.pollEnabled,t))?!document.hidden&&!up.network.shouldReduceRequests()&&(null!=(e=up.layer.get(t))&&"function"==typeof e.isFront?e.isFront():void 0):n},up.compiler("[up-poll]",n),up.on("up:framework:reset",e),{config:p,hungrySelector:t,startPolling:n,stopPolling:r})}.call(this),function(){var r,o,t;up.rails=(t=up.util,r=up.element,o=function(){var t;return window._rails_loaded||window.Rails||(null!=(t=window.jQuery)?t.rails:void 0)},t.each(["method","confirm"],function(t){var e,n;return e="data-"+t,n="up-"+t,up.macro("a["+e+"]",function(t){if(o()&&up.link.isFollowable(t))return r.setMissingAttr(t,n,t.getAttribute(e)),t.removeAttribute(e)})}))}.call(this),function(){up.framework.boot()}.call(this);
|
data/lib/unpoly/tasks.rb
DELETED
@@ -1,55 +0,0 @@
|
|
1
|
-
require 'unpoly/rails/version'
|
2
|
-
|
3
|
-
module Unpoly
|
4
|
-
module Tasks
|
5
|
-
SPROCKETS_MANIFESTS = %w(
|
6
|
-
unpoly.js
|
7
|
-
unpoly.css
|
8
|
-
unpoly-migrate.js
|
9
|
-
unpoly-bootstrap3.js
|
10
|
-
unpoly-bootstrap3.css
|
11
|
-
unpoly-bootstrap4.js
|
12
|
-
unpoly-bootstrap4.css
|
13
|
-
unpoly-bootstrap5.js
|
14
|
-
unpoly-bootstrap5.css
|
15
|
-
)
|
16
|
-
|
17
|
-
SPROCKETS_SOURCES = %w(lib/assets/javascripts lib/assets/stylesheets)
|
18
|
-
|
19
|
-
SPROCKETS_OUTPUT_FOLDER = 'dist'
|
20
|
-
|
21
|
-
NPM_MANIFEST = 'package.json'
|
22
|
-
|
23
|
-
# VISIBLE_TASKS = %w(
|
24
|
-
# publish:build
|
25
|
-
# publish:clean
|
26
|
-
# publish:commit
|
27
|
-
# publish:release
|
28
|
-
# publish:all
|
29
|
-
# )
|
30
|
-
|
31
|
-
module_function
|
32
|
-
|
33
|
-
def pre_release?
|
34
|
-
Unpoly::Rails::VERSION =~ /rc|beta|pre|alpha/
|
35
|
-
end
|
36
|
-
|
37
|
-
def gem_version
|
38
|
-
version = Unpoly::Rails::VERSION
|
39
|
-
if pre_release?
|
40
|
-
version = version.sub(/-/, '.pre.')
|
41
|
-
end
|
42
|
-
version
|
43
|
-
end
|
44
|
-
|
45
|
-
def dist_paths
|
46
|
-
Dir["#{SPROCKETS_OUTPUT_FOLDER}/**/*.{js,css}"]
|
47
|
-
end
|
48
|
-
|
49
|
-
def run(command)
|
50
|
-
system(command) or raise "Error running command: #{command}"
|
51
|
-
end
|
52
|
-
|
53
|
-
extend self
|
54
|
-
end
|
55
|
-
end
|