unpoly-rails 0.26.0 → 0.26.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7039fd337b09cb3538de1a1d83b253689ff0cad7
4
- data.tar.gz: e757bc24a9379ab5d9b6a6e9884718d75bf94ed5
3
+ metadata.gz: 4bf438ea806a10fac37c4d06794546ddea121fc1
4
+ data.tar.gz: 4ca0ea2271bbdc1db21d389ac4b05aaa8ce40f9c
5
5
  SHA512:
6
- metadata.gz: 4f11fe51e4a7541923d428336b6166b4d2c3a43d00da245731048e89d50edd15fe3bf8bad05724629ce249c8f5c08b7aea62b76a5e0f0c6aa9867793a7ebf76b
7
- data.tar.gz: 82190a7430b26ce7e0c73fd0b177c36931dd7344e7e48054aa05adb83b74dc32566b75a8efa171c6096aef856a762f40d594658ecf58e214335b6f7a30ea4973
6
+ metadata.gz: 7a88ade924fbe442f3a295c9c8e0a2f149d90c02f33c478d800fed4e681efb2019923fb31ac155f6d270f07480e159d6f3cc360b09c909c810731fd1878a0a77
7
+ data.tar.gz: 33a712c327c6b1cee3947e1f714b267cb1eb6cc359f4571013b6f56ae818b97b945d7b07cd9589b9b33e5e8ecf837ef455c5b456b2fbea70fd2240fff80fe569
data/CHANGELOG.md CHANGED
@@ -5,6 +5,7 @@ All notable changes to this project will be documented in this file.
5
5
  This project mostly adheres to [Semantic Versioning](http://semver.org/).
6
6
 
7
7
 
8
+
8
9
  Unreleased
9
10
  ----------
10
11
 
@@ -14,6 +15,14 @@ Unreleased
14
15
  ### Breaking changes
15
16
 
16
17
 
18
+ 0.26.1
19
+ ------
20
+
21
+ ### Breaking changes
22
+
23
+ - When inserting a page fragment with a `<script src="...">` tag, the linked Javascript is no longer loaded and executed. Inline scripts will still be executed. You can configure this behavior using the new [`up.flow.config`](/up.flow.config) property.
24
+
25
+
17
26
 
18
27
  0.26.0
19
28
  ------
@@ -0,0 +1,19 @@
1
+ What don't I like at the current logging behavior:
2
+
3
+ - The grouping doesn't work as well as I hoped
4
+ - Errors get lost
5
+ - Groups are always visible!
6
+
7
+ Also generally about debugging:
8
+
9
+ - The red .up-error box truncates the message
10
+
11
+
12
+ Ideas
13
+ -----
14
+
15
+ - Wait for printing a group until I know if there has been an error in this frame
16
+ - Make .up-error a scrollable box that shows the full error messages
17
+ - Make all logging opt-in
18
+
19
+
data/dist/unpoly.js CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  (function() {
7
7
  window.up = {
8
- version: "0.26.0"
8
+ version: "0.26.1"
9
9
  };
10
10
 
11
11
  }).call(this);
@@ -2976,9 +2976,16 @@ This improves jQuery's [`on`](http://api.jquery.com/on/) in multiple ways:
2976
2976
  Logging
2977
2977
  =======
2978
2978
 
2979
- Elaborate wrappers around `window.console`.
2980
- Should only used internally since they prefix `ᴜᴘ` to each
2981
- printed message.
2979
+ Unpoly can print debugging information to the developer console, e.g.:
2980
+
2981
+ - Which [events](/up.bus) are called
2982
+ - When we're [making requests to the network](/up.proxy)
2983
+ - Which [compilers](/up.syntax) are applied to which elements
2984
+
2985
+ You can activate logging by calling [`up.log.enable()`](/up.log.enable).
2986
+ The output can be configured using the [`up.log.config`](/up.log.config) property.
2987
+
2988
+ @class up.log
2982
2989
  */
2983
2990
 
2984
2991
  (function() {
@@ -3129,9 +3136,9 @@ printed message.
3129
3136
  /**
3130
3137
  Prevents future Unpoly events from printing vast amounts of debugging information to the developer console.
3131
3138
 
3132
- Errors will still be printed.
3139
+ Errors will still be printed, even with logging disabled.
3133
3140
 
3134
- @function up.log.enable
3141
+ @function up.log.disable
3135
3142
  @stable
3136
3143
  */
3137
3144
  disable = function() {
@@ -4553,8 +4560,27 @@ are based on this module.
4553
4560
 
4554
4561
  (function() {
4555
4562
  up.flow = (function($) {
4556
- var autofocus, destroy, emitFragmentInserted, emitFragmentKept, extract, findKeepPlan, findOldFragment, first, hello, isRealElement, oldFragmentNotFound, parseImplantSteps, parseResponse, processResponse, reload, replace, resolveSelector, setSource, source, swapElements, transferKeepableElements, u, updateHistory;
4563
+ var autofocus, config, destroy, emitFragmentInserted, emitFragmentKept, extract, filterScripts, findKeepPlan, findOldFragment, first, hello, isRealElement, oldFragmentNotFound, parseImplantSteps, parseResponse, processResponse, reload, replace, reset, resolveSelector, setSource, source, swapElements, transferKeepableElements, u, updateHistory;
4557
4564
  u = up.util;
4565
+
4566
+ /**
4567
+ Configures defaults for fragment insertion.
4568
+
4569
+ @property up.flow.config
4570
+ @param {Boolean} [options.runInlineScripts=true]
4571
+ Whether inline `<script>` tags inside inserted HTML fragments will be executed.
4572
+ @param {Boolean} [options.runLinkedScripts=false]
4573
+ Whether `<script src='...'>` tags inside inserted HTML fragments will fetch and execute
4574
+ the linked Javascript file.
4575
+ @stable
4576
+ */
4577
+ config = u.config({
4578
+ runInlineScripts: true,
4579
+ runLinkedScripts: false
4580
+ });
4581
+ reset = function() {
4582
+ return config.reset();
4583
+ };
4558
4584
  setSource = function(element, sourceUrl) {
4559
4585
  var $element;
4560
4586
  $element = $(element);
@@ -4899,6 +4925,7 @@ are based on this module.
4899
4925
  $old = findOldFragment(step.selector, options);
4900
4926
  $new = (ref1 = response.find(step.selector)) != null ? ref1.first() : void 0;
4901
4927
  if ($old && $new) {
4928
+ filterScripts($new, options);
4902
4929
  swapPromise = swapElements($old, $new, step.pseudoClass, step.transition, options);
4903
4930
  return swapPromises.push(swapPromise);
4904
4931
  }
@@ -4925,6 +4952,25 @@ are based on this module.
4925
4952
  return u.error(message, selector);
4926
4953
  }
4927
4954
  };
4955
+ filterScripts = function($element, options) {
4956
+ var $script, $scripts, isInline, isLinked, j, len, results, runInlineScripts, runLinkedScripts, script;
4957
+ runInlineScripts = u.option(options.runInlineScripts, config.runInlineScripts);
4958
+ runLinkedScripts = u.option(options.runLinkedScripts, config.runLinkedScripts);
4959
+ $scripts = u.findWithSelf($element, 'script');
4960
+ results = [];
4961
+ for (j = 0, len = $scripts.length; j < len; j++) {
4962
+ script = $scripts[j];
4963
+ $script = $(script);
4964
+ isLinked = u.isPresent($script.attr('src'));
4965
+ isInline = !isLinked;
4966
+ if (!((isLinked && runLinkedScripts) || (isInline && runInlineScripts))) {
4967
+ results.push($script.remove());
4968
+ } else {
4969
+ results.push(void 0);
4970
+ }
4971
+ }
4972
+ return results;
4973
+ };
4928
4974
  parseResponse = function(html, options) {
4929
4975
  var htmlElement;
4930
4976
  htmlElement = u.createElementFromHtml(html);
@@ -5424,6 +5470,7 @@ are based on this module.
5424
5470
  setSource($body, up.browser.url());
5425
5471
  return hello($body);
5426
5472
  });
5473
+ up.on('up:framework:reset', reset);
5427
5474
  return {
5428
5475
  knife: eval(typeof Knife !== "undefined" && Knife !== null ? Knife.point : void 0),
5429
5476
  replace: replace,
@@ -5433,7 +5480,8 @@ are based on this module.
5433
5480
  first: first,
5434
5481
  source: source,
5435
5482
  resolveSelector: resolveSelector,
5436
- hello: hello
5483
+ hello: hello,
5484
+ config: config
5437
5485
  };
5438
5486
  })(jQuery);
5439
5487
 
@@ -6474,7 +6522,7 @@ the user performs the click.
6474
6522
  };
6475
6523
 
6476
6524
  /**
6477
- This event is [emitted]/(up.emit) when [AJAX requests](/up.ajax)
6525
+ This event is [emitted](/up.emit) when [AJAX requests](/up.ajax)
6478
6526
  are taking long to finish.
6479
6527
 
6480
6528
  By default Unpoly will wait 300 ms for an AJAX request to finish
@@ -7131,7 +7179,10 @@ Read on
7131
7179
  or never use the cache (`false`)
7132
7180
  or make an educated guess (`undefined`).
7133
7181
  @param [up-history]
7134
- Set this to `'false'` to prevent the current URL from being updated.
7182
+ Whether to push an entry to the browser history when following the link.
7183
+
7184
+ Set this to `'false'` to prevent the URL bar from being updated.
7185
+ Set this to a URL string to update the history with the given URL.
7135
7186
  @stable
7136
7187
  */
7137
7188
  onAction('[up-target]', function($link) {
@@ -7192,8 +7243,11 @@ Read on
7192
7243
  @param {String} [up-confirm]
7193
7244
  A message that will be displayed in a cancelable confirmation dialog
7194
7245
  before the link is followed.
7195
- @param [up-history]
7196
- Set this to `'false'` to prevent the current URL from being updated.
7246
+ @param {String} [up-history]
7247
+ Whether to push an entry to the browser history when following the link.
7248
+
7249
+ Set this to `'false'` to prevent the URL bar from being updated.
7250
+ Set this to a URL string to update the history with the given URL.
7197
7251
  @param [up-restore-scroll='false']
7198
7252
  Whether to restore the scroll position of all viewports
7199
7253
  within the response.
@@ -7404,7 +7458,7 @@ open dialogs with sub-forms, etc. all without losing form state.
7404
7458
  Successful form submissions will add a history entry and change the browser's
7405
7459
  location bar if the form either uses the `GET` method or the response redirected
7406
7460
  to another page (this requires the `unpoly-rails` gem).
7407
- If want to prevent history changes in any case, set this to `false`.
7461
+ If you want to prevent history changes in any case, set this to `false`.
7408
7462
  If you pass a `String`, it is used as the URL for the browser history.
7409
7463
  @param {String} [options.transition='none']
7410
7464
  The transition to use when a successful form submission updates the `options.target` selector.
@@ -7893,7 +7947,13 @@ open dialogs with sub-forms, etc. all without losing form state.
7893
7947
  @param {String} [up-fail-transition]
7894
7948
  The animation to use when the form is replaced after a failed submission.
7895
7949
  @param [up-history]
7896
- Set this to `'false'` to prevent the current URL from being updated.
7950
+ Whether to push a browser history entry after a successful form submission.
7951
+
7952
+ By default the form's target URL is used. If the form redirects to another URL,
7953
+ the redirect target will be used.
7954
+
7955
+ Set this to `'false'` to prevent the URL bar from being updated.
7956
+ Set this to a URL string to update the history with the given URL.
7897
7957
  @param {String} [up-method]
7898
7958
  The HTTP method to be used to submit the form (`get`, `post`, `put`, `delete`, `patch`).
7899
7959
  Alternately you can use an attribute `data-method`
@@ -8667,6 +8727,12 @@ To disable this behavior, give the opening link an `up-sticky` attribute:
8667
8727
  @param [up-sticky]
8668
8728
  If set to `true`, the popup remains
8669
8729
  open even if the page changes in the background.
8730
+ @param {String} [up-history='false']
8731
+ Whether to push an entry to the browser history for the popup's source URL.
8732
+
8733
+ Set this to `'false'` to prevent the URL bar from being updated.
8734
+ Set this to a URL string to update the history with the given URL.
8735
+
8670
8736
  @stable
8671
8737
  */
8672
8738
  up.link.onAction('[up-popup]', function($link) {
@@ -9423,8 +9489,11 @@ To disable this behavior, give the opening link an `up-sticky` attribute:
9423
9489
  @param {String} [up-width]
9424
9490
  The width of the dialog in pixels.
9425
9491
  By [default](/up.modal.config) the dialog will grow to fit its contents.
9426
- @param {String} [up-history="true"]
9427
- Whether to add a browser history entry for the modal's source URL.
9492
+ @param {String} [up-history]
9493
+ Whether to push an entry to the browser history for the modal's source URL.
9494
+
9495
+ Set this to `'false'` to prevent the URL bar from being updated.
9496
+ Set this to a URL string to update the history with the given URL.
9428
9497
 
9429
9498
  @stable
9430
9499
  */
data/dist/unpoly.min.js CHANGED
@@ -1,3 +1,3 @@
1
- (function(){window.up={version:"0.26.0"}}).call(this),function(){var e=[].slice;up.util=function(t){var n,r,o,u,i,a,s,l,c,p,f,d,m,h,v,g,y,b,w,k,S,x,D,P,A,$,E,T,C,F,O,U,R,_,M,j,K,I,L,N,z,W,q,H,Q,V,J,B,X,G,Y,Z,et,tt,nt,rt,ot,ut,it,at,st,lt,ct,pt,ft,dt,mt,ht,vt,gt,yt,bt,wt,kt,St,xt,Dt,Pt,At,$t,Et,Tt,Ct,Ft,Ot,Ut,Rt,_t,Mt,jt,Kt,It,Lt,Nt,zt,Wt,qt,Ht,Qt,Vt,Jt,Bt,Xt,Gt,Yt,Zt;return ht=t.noop,lt=function(t){var n,r;return n=void 0,r=!1,function(){var o;return o=1<=arguments.length?e.call(arguments,0):[],r?n:(r=!0,n=t.apply(null,o))}},et=function(e,t){return t=t.toString(),(""===t||"80"===t)&&"http:"===e||"443"===t&&"https:"===e},gt=function(e,t){var n,r,o;return n=Pt(e),r=n.protocol+"//"+n.hostname,et(n.protocol,n.port)||(r+=":"+n.port),o=n.pathname,"/"!==o[0]&&(o="/"+o),(null!=t?t.stripTrailingSlash:void 0)===!0&&(o=o.replace(/\/$/,"")),r+=o,(null!=t?t.hash:void 0)===!0&&(r+=n.hash),(null!=t?t.search:void 0)!==!1&&(r+=n.search),r},Pt=function(e){var n;return n=null,tt(e)?(n=t("<a>").attr({href:e}).get(0),j(n.hostname)&&(n.href=n.href)):n=Jt(e),n},vt=function(e){return e?e.toUpperCase():"GET"},n=function(e){var n,r,o,u,i,a,s,l,c,p,f,d,m,h,v,g;for(v=e.split(/[ >]/),o=null,f=c=0,m=v.length;m>c;f=++c){for(a=v[f],i=a.match(/(^|\.|\#)[A-Za-z0-9\-_]+/g),g="div",u=[],p=null,d=0,h=i.length;h>d;d++)switch(s=i[d],s[0]){case".":u.push(s.substr(1));break;case"#":p=s.substr(1);break;default:g=s}l="<"+g,u.length&&(l+=' class="'+u.join(" ")+'"'),p&&(l+=' id="'+p+'"'),l+=">",n=t(l),r&&n.appendTo(r),0===f&&(o=n),r=n}return o},g=function(e,t){var n;return n=document.createElement(e),Y(t)&&(n.innerHTML=t),n},r=function(e,t){var r;return null==t&&(t=document.body),r=n(e),r.addClass("up-placeholder"),r.appendTo(t),r},Lt=function(e){var n,r,o,u,i,a,s,l,c;if(n=t(e),l=void 0,up.puts("Creating selector from element %o",n.get(0)),c=Et(n.attr("up-id")))l="[up-id='"+c+"']";else if(u=Et(n.attr("id")))l="#"+u;else if(s=Et(n.attr("name")))l="[name='"+s+"']";else if(r=Et(mt(n)))for(l="",o=0,a=r.length;a>o;o++)i=r[o],l+="."+i;else l=n.prop("tagName").toLowerCase();return l},mt=function(e){var t,n;return t=e.attr("class")||"",n=t.split(" "),It(n,function(e){return Y(e)&&!e.match(/^up-/)})},y=function(e){var t,n,r,o,u,i,a,s,l,c,p,f;return l=function(e){return"<"+e+"(?: [^>]*)?>"},i=function(e){return"</"+e+">"},t="(?:.|\\n)*?",u=function(e){return"("+e+")"},f=new RegExp(l("head")+t+l("title")+u(t)+i("title")+t+i("body"),"i"),o=new RegExp(l("body")+u(t)+i("body"),"i"),(r=e.match(o))?(s=document.createElement("html"),n=g("body",r[1]),s.appendChild(n),(p=e.match(f))&&(a=g("head"),s.appendChild(a),c=g("title",p[1]),a.appendChild(c)),s):g("div",e)},$=t.extend,Vt=t.trim,S=function(e,t){var n,r,o,u,i;for(i=[],r=n=0,u=e.length;u>n;r=++n)o=e[r],i.push(t(o,r));return i},at=S,qt=function(e,t){var n,r,o,u;for(u=[],r=n=0,o=e-1;o>=0?o>=n:n>=o;r=o>=0?++n:--n)u.push(t(r));return u},B=function(e){return null===e},nt=function(e){return void 0===e},I=function(e){return!nt(e)},J=function(e){return nt(e)||B(e)},H=function(e){return!J(e)},j=function(e){return J(e)||G(e)&&0===Object.keys(e).length||0===e.length},Et=function(e,t){return null==t&&(t=Y),t(e)?e:void 0},Y=function(e){return!j(e)},q=function(e){return"function"==typeof e},tt=function(e){return"string"==typeof e},X=function(e){return"number"==typeof e},Q=function(e){return"object"==typeof e&&!!e},G=function(e){return Q(e)||"function"==typeof e},N=function(e){return!(!e||1!==e.nodeType)},V=function(e){return e instanceof jQuery},Z=function(e){return G(e)&&q(e.then)},K=function(e){return Z(e)&&q(e.resolve)},M=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},W=function(e){return up.browser.canFormData()&&e instanceof FormData},Qt=function(e){return Array.prototype.slice.call(e)},h=function(e){return M(e)?e.slice():$({},e)},Jt=function(e){return V(e)?e.get(0):e},ct=function(){var t;return t=1<=arguments.length?e.call(arguments,0):[],$.apply(null,[{}].concat(e.call(t)))},Dt=function(e,t){var n,r,o,u;if(o=e?h(e):{},t)for(r in t)n=t[r],u=o[r],H(u)?G(n)&&G(u)&&(o[r]=Dt(u,n)):o[r]=n;return o},xt=function(){var t;return t=1<=arguments.length?e.call(arguments,0):[],w(t,H)},w=function(e,t){var n,r,o,u;for(u=void 0,r=0,o=e.length;o>r;r++)if(n=e[r],t(n)){u=n;break}return u},a=function(e,t){var n,r,o,u;for(u=!1,r=0,o=e.length;o>r;r++)if(n=e[r],t(n)){u=!0;break}return u},i=function(e,t){var n,r,o,u;for(u=!0,r=0,o=e.length;o>r;r++)if(n=e[r],!t(n)){u=!1;break}return u},f=function(e){return It(e,H)},Bt=function(e){var t;return t={},It(e,function(e){return t.hasOwnProperty(e)?!1:t[e]=!0})},It=function(e,t){var n;return n=[],S(e,function(e){return t(e)?n.push(e):void 0}),n},Ct=function(e,t){return It(e,function(e){return!t(e)})},_=function(e,t){return It(e,function(e){return m(t,e)})},Tt=function(){var t,n,r,o;return t=arguments[0],r=2<=arguments.length?e.call(arguments,1):[],o=function(){var e,o,u;for(u=[],e=0,o=r.length;o>e;e++)n=r[e],u.push(t.attr(n));return u}(),w(o,Y)},zt=function(e,t){return e>0?setTimeout(t,e):t()},dt=function(e){return setTimeout(e,0)},ut=function(e){return e[e.length-1]},p=function(){var e;return e=document.documentElement,{width:e.clientWidth,height:e.clientHeight}},Kt=lt(function(){var e,n,r;return e=t("<div>").css({position:"absolute",top:"0",left:"0",width:"50px",height:"50px",overflowY:"scroll"}),e.appendTo(document.body),n=e.get(0),r=n.offsetWidth-n.clientWidth,e.remove(),r}),k=function(){var e,n,r,o,u,i;return n=document.body,e=t(n),i=document.documentElement,r=e.css("overflow-y"),u="scroll"===r,o="hidden"===r,u||!o&&i.scrollHeight>i.clientHeight},wt=function(t){var n;return n=void 0,function(){var r;return r=1<=arguments.length?e.call(arguments,0):[],null!=t&&(n=t.apply(null,r)),t=void 0,n}},Wt=function(e,t,n){var r,o;return o=e.css(Object.keys(t)),e.css(t),r=function(){return e.css(o)},n?(n(),r()):wt(r)},O=function(e){var t,n;return n=e.css(["transform","-webkit-transform"]),j(n)||"none"===n.transform?(t=function(){return e.css(n)},e.css({transform:"translateZ(0)","-webkit-transform":"translateZ(0)"})):t=function(){},t},U=function(e){return e=Jt(e),e.offsetHeight},b=function(e,n,r){var u,i,a,s,l,c,p,f;return u=t(e),r=Dt(r,{duration:300,delay:0,easing:"ease"}),i=t.Deferred(),p=Object.keys(n),l={"transition-property":p.join(", "),"transition-duration":r.duration+"ms","transition-delay":r.delay+"ms","transition-timing-function":r.easing},a=u.css(Object.keys(l)),u.addClass("up-animating"),c=function(){return u.removeClass("up-animating"),u.off("transitionend",s)},s=function(e){var t;return t=e.originalEvent.propertyName,m(p,t)?(i.resolve(),c()):void 0},u.on("transitionend",s),i.then(c),f=O(u),u.css(l),u.css(n),u.data(o,i),i.then(function(){var e;return u.removeData(o),f(),u.css({transition:"none"}),e=!("none"===a["transition-property"]||"all"===a["transition-property"]&&"0"===a["transition-duration"][0]),e?(U(u),u.css(a)):void 0}),i},o="up-animation-deferred",C=function(e){return t(e).each(function(){var e;return(e=At(this,o))?e.resolve():void 0})},st=function(e,n){var r,o,u,i,a,s;return n=Dt(n,{relative:!1,inner:!1,full:!1}),n.relative?n.relative===!0?a=e.position():(r=t(n.relative),s=e.offset(),r.is(document)?a=s:(i=r.offset(),a={left:s.left-i.left,top:s.top-i.top})):a=e.offset(),u={left:a.left,top:a.top},n.inner?(u.width=e.width(),u.height=e.height()):(u.width=e.outerWidth(),u.height=e.outerHeight()),n.full&&(o=up.layout.viewportOf(e),u.right=o.width()-(u.left+u.width),u.bottom=o.height()-(u.top+u.height)),u},v=function(e,t){var n,r,o,u,i;for(u=e.get(0).attributes,i=[],r=0,o=u.length;o>r;r++)n=u[r],i.push(n.specified?t.attr(n.name,n.value):void 0);return i},T=function(e,t){return e.find(t).addBack(t)},P=function(e){return 27===e.keyCode},m=function(e,t){return e.indexOf(t)>=0},c=function(e,t){var n;switch(n=e.attr(t)){case"false":return!1;case"true":return!0;case"":return!0;default:return n}},it=function(e){return e.getResponseHeader("X-Up-Location")},Ht=function(e){return e.getResponseHeader("X-Up-Title")},pt=function(e){return e.getResponseHeader("X-Up-Method")},kt=function(){var t,n,r,o,u,i;for(o=arguments[0],u=2<=arguments.length?e.call(arguments,1):[],t={},n=0,r=u.length;r>n;n++)i=u[n],o.hasOwnProperty(i)&&(t[i]=o[i]);return t},A=function(){var t,n,r,o,u,i;for(o=arguments[0],u=2<=arguments.length?e.call(arguments,1):[],t=h(o),n=0,r=u.length;r>n;n++)i=u[n],delete t[i];return t},rt=function(e){return!(e.metaKey||e.shiftKey||e.ctrlKey)},ot=function(e){var t;return t=nt(e.button)||0===e.button,t&&rt(e)},Mt=function(){var e;return e=t.Deferred(),e.resolve(),e},jt=function(){return Mt().promise()},Xt=function(){return t.Deferred()},Gt=function(){return Xt().promise()},yt=function(){return t()},_t=function(){var n,r;return n=1<=arguments.length?e.call(arguments,0):[],r=t.when.apply(t,[Mt()].concat(e.call(n))),r.resolve=lt(function(){return S(n,function(e){return e.resolve()})}),r},Nt=function(e,t){var n,r,o;r=[];for(n in t)o=t[n],r.push(J(e.attr(n))?e.attr(n,o):void 0);return r},Ft=function(e,t){var n;return n=e.indexOf(t),n>=0?(e.splice(n,1),t):void 0},ft=function(e){var n,r,o,u,i,s,l;for(i={},l=[],r=[],o=0,u=e.length;u>o;o++)s=e[o],tt(s)?l.push(s):r.push(s);return i.parsed=r,l.length&&(n=l.join(", "),i.parsed.push(n)),i.select=function(){return i.find(void 0)},i.find=function(e){var n,r,o,u,a,s;for(r=yt(),a=i.parsed,o=0,u=a.length;u>o;o++)s=a[o],n=e?e.find(s):t(s),r=r.add(n);return r},i.findWithSelf=function(e){var t;return t=i.find(e),i.doesMatch(e)&&(t=t.add(e)),t},i.doesMatch=function(e){var n;return n=t(e),a(i.parsed,function(e){return n.is(e)})},i.seekUp=function(e){var n,r,o;for(o=t(e),n=o,r=void 0;n.length;){if(i.doesMatch(n)){r=n;break}n=n.parent()}return r||yt()},i},l=function(t){var n,r,o,u,i,a,s,l,c,p,f,d,m,v,g;return null==t&&(t={}),v=void 0,d=function(e){return function(){var n;return n=t[e],X(n)?n:q(n)?n():void 0}},p=d("size"),o=d("expiry"),f=function(e){return t.key?t.key(e):e.toString()},i=function(){return 0!==p()&&0!==o()},r=function(){return v={}},r(),l=function(){var n;return n=1<=arguments.length?e.call(arguments,0):[],t.logPrefix?(n[0]="["+t.logPrefix+"] "+n[0],up.puts.apply(up,n)):void 0},s=function(){return Object.keys(v)},c=function(){var e,t,n,r;return r=h(s()),e=p(),e&&r.length>=e&&(t=null,n=null,S(r,function(e){var r,o;return r=v[e],o=r.timestamp,!n||n>o?(t=e,n=o):void 0}),t)?delete v[t]:void 0},n=function(e,t){var n;return n=u(e,{silent:!0}),I(n)?m(t,n):void 0},g=function(){return(new Date).valueOf()},m=function(e,t){var n;return i()?(c(),n=f(e),v[n]={timestamp:g(),value:t}):void 0},Ft=function(e){var t;return t=f(e),delete v[t]},a=function(e){var t,n;return t=o(),t?(n=g()-e.timestamp,t>n):!0},u=function(e,t){var n,r;return null==t&&(t={}),r=f(e),(n=v[r])?a(n)?(t.silent||l("Cache hit for '%s'",e),n.value):(t.silent||l("Discarding stale cache entry for '%s'",e),void Ft(e)):void(t.silent||l("Cache miss for '%s'",e))},{alias:n,get:u,set:m,remove:Ft,clear:r,keys:s}},d=function(e){var t;return null==e&&(e={}),t={},t.reset=function(){return $(t,e)},t.reset(),Object.preventExtensions(t),t},Yt=function(e){var t,n;return e=Jt(e),t=e.parentNode,n=Qt(e.childNodes),S(n,function(n){return t.insertBefore(n,e)}),t.removeChild(e)},bt=function(e){var t,n;for(t=void 0;(e=e.parent())&&e.length;)if(n=e.css("position"),"absolute"===n||"relative"===n||e.is("body")){t=e;break}return t},z=function(e){var n,r;for(n=t(e);;){if(r=n.css("position"),"fixed"===r)return!0;if(n=n.parent(),0===n.length||n.is(document))return!1}},F=function(e,n){var r,o,u,i;return r=t(e),o=bt(r),u=r.position(),i=o.offset(),r.css({position:"absolute",left:u.left-i.left,top:u.top-i.top+n.scrollTop(),right:"",bottom:""})},Ot=function(e){var t,n,r,o,u,i,a;if(W(e))return up.error("Cannot convert FormData into an array");for(i=Ut(e),t=[],a=i.split("&"),n=0,r=a.length;r>n;n++)u=a[n],Y(u)&&(o=u.split("="),t.push({name:decodeURIComponent(o[0]),value:decodeURIComponent(o[1])}));return t},Ut=function(e){var n;return W(e)?up.error("Cannot convert FormData into a query string"):Y(e)?(n=t.param(e),n=n.replace(/\+/g,"%20")):""},Rt=function(e){var n,r;return n=t(e),r=n.find("input[type=file]").length,r&&up.browser.canFormData()?new FormData(n.get(0)):n.serializeArray()},s=function(e,t,n){var r;return W(e)?e.append(t,n):M(e)?e.push({name:t,value:n}):G(e)?e[t]=n:(tt(e)||J(e))&&(r=Ut([{name:t,value:n}]),e=Y(e)?[e,r].join("&"):r),e},x=function(){var n,r,o,u;throw n=1<=arguments.length?e.call(arguments,0):[],(o=up.log).error.apply(o,n),Zt().then(function(){var r,o,u,i;return r=Et(t(".up-error"))||t('<div class="up-error"></div>').prependTo("body"),u=function(e){return"<span class='up-error-variable'>"+D(e)+"</span>"},o=(i=up.browser).sprintfWithFormattedArgs.apply(i,[u].concat(e.call(n))),r.html(o)}),r=(u=up.browser).sprintf.apply(u,n),new Error(r)},u={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"},D=function(e){return e.replace(/[&<>"]/g,function(e){return u[e]})},$t=function(e,t){var n;return n=e[t],delete e[t],n},At=function(e,n){var r,o;return r=t(e),o=r.data(n),r.removeData(n),o},E=function(e){var t;return t=ut(e),Q(t)&&!V(t)?e.pop():{}},St=function(e){var n;return n=t(e).css("opacity"),H(n)?parseFloat(n):void 0},Zt=lt(function(){var e;return t.isReady?jt():(e=t.Deferred(),t(function(){return e.resolve()}),e.promise())}),R=function(e){return e},L=function(e){return e=Jt(e),!jQuery.contains(document.documentElement,e)},{isDetached:L,requestDataAsArray:Ot,requestDataAsQuery:Ut,appendRequestData:s,requestDataFromForm:Rt,offsetParent:bt,fixedToAbsolute:F,isFixed:z,presentAttr:Tt,createElement:g,parseUrl:Pt,normalizeUrl:gt,normalizeMethod:vt,createElementFromHtml:y,$createElementFromSelector:n,$createPlaceholder:r,selectorForElement:Lt,extend:$,copy:h,merge:ct,options:Dt,option:xt,error:x,each:S,map:at,times:qt,any:a,all:i,detect:w,select:It,reject:Ct,intersect:_,compact:f,uniq:Bt,last:ut,isNull:B,isDefined:I,isUndefined:nt,isGiven:H,isMissing:J,isPresent:Y,isBlank:j,presence:Et,isObject:G,isFunction:q,isString:tt,isNumber:X,isElement:N,isJQuery:V,isPromise:Z,isDeferred:K,isHash:Q,isArray:M,isFormData:W,isUnmodifiedKeyEvent:rt,isUnmodifiedMouseEvent:ot,nullJQuery:yt,unJQuery:Jt,setTimer:zt,nextFrame:dt,measure:st,temporaryCss:Wt,cssAnimate:b,finishCssAnimate:C,forceCompositing:O,forceRepaint:U,escapePressed:P,copyAttributes:v,findWithSelf:T,contains:m,toArray:Qt,castedAttr:c,locationFromXhr:it,titleFromXhr:Ht,methodFromXhr:pt,clientSize:p,only:kt,except:A,trim:Vt,unresolvableDeferred:Xt,unresolvablePromise:Gt,resolvedPromise:jt,resolvedDeferred:Mt,resolvableWhen:_t,setMissingAttrs:Nt,remove:Ft,memoize:lt,scrollbarWidth:Kt,documentHasVerticalScrollbar:k,config:d,cache:l,unwrapElement:Yt,multiSelector:ft,error:x,pluckData:At,pluckKey:$t,extractOptions:E,isDetached:L,noop:ht,opacity:St,whenReady:Zt,identity:R,escapeHtml:D}}($),up.error=up.util.error}.call(this),function(){var e=[].slice;up.browser=function(t){var n,r,o,u,i,a,s,l,c,p,f,d,m,h,v,g,y,b,w,k,S;return k=up.util,h=function(e,n){var r,o,u,i,a;return null==n&&(n={}),i=k.option(n.method,"get").toLowerCase(),"get"===i?(a=k.requestDataAsQuery(n.data),a&&(e=e+"?"+a),location.href=e):(r=t("<form method='post' action='"+e+"'></form>"),o=function(e){var n;return n=t('<input type="hidden">'),n.attr(e.name,e.value),n.appendTo(r)},o({name:up.proxy.config.wrapMethodParam,value:i}),(u=up.rails.csrfField())&&o(u),k.each(k.requestDataAsArray(n.data),o),r.hide().appendTo("body"),r.submit())},g=function(){var t,n,r;return r=arguments[0],t=2<=arguments.length?e.call(arguments,1):[],k.isDefined(console[r])||(r="log"),i()?"function"==typeof console[r]?console[r].apply(console,t):void 0:(n=y.apply(null,t),"function"==typeof console[r]?console[r](n):void 0)},n=/\%[odisf]/g,w=function(e){var n,r,o,u,i,a,s,l,c;if(a=100,o="",k.isString(e))l=e.replace(/[\n\r\t ]+/g," "),l=l.replace(/^[\n\r\t ]+/,""),l=l.replace(/[\n\r\t ]$/,""),l='"'+l+'"',o='"';else if(k.isUndefined(e))l="undefined";else if(k.isNumber(e)||k.isFunction(e))l=e.toString();else if(k.isArray(e))l="["+k.map(e,w).join(", ")+"]",o="]";else if(k.isJQuery(e))l="$("+k.map(e,w).join(", ")+")",o=")";else if(k.isElement(e)){for(n=t(e),l="<"+e.tagName.toLowerCase(),s=["id","name","class"],u=0,i=s.length;i>u;u++)r=s[u],(c=n.attr(r))&&(l+=" "+r+'="'+c+'"');l+=">",o=">"}else l=JSON.stringify(e);return l.length>a&&(l=l.substr(0,a)+" \u2026",l+=o),l},y=function(){var t,n;return n=arguments[0],t=2<=arguments.length?e.call(arguments,1):[],b.apply(null,[k.identity,n].concat(e.call(t)))},b=function(){var t,r,o,u;return r=arguments[0],u=arguments[1],t=3<=arguments.length?e.call(arguments,2):[],o=0,u.replace(n,function(){var e;return e=t[o],e=r(w(e)),o+=1,e})},S=function(){return location.href},p=k.memoize(function(){return k.isUndefined(document.addEventListener)}),f=k.memoize(function(){return p()||-1!==navigator.appVersion.indexOf("MSIE 9.")}),a=k.memoize(function(){return k.isDefined(history.pushState)&&"get"===l()}),r=k.memoize(function(){return"transition"in document.documentElement.style}),u=k.memoize(function(){return"oninput"in document.createElement("input")}),o=k.memoize(function(){return!!window.FormData}),i=k.memoize(function(){return!f()}),d=k.memoize(function(){var e,n,r,o;return o=t.fn.jquery,r=o.split("."),e=parseInt(r[0]),n=parseInt(r[1]),e>=2||1===e&&n>=9}),v=function(e){var t,n;return n=null!=(t=document.cookie.match(new RegExp(e+"=(\\w+)")))?t[1]:void 0,k.isPresent(n)&&(document.cookie=e+"=; expires=Thu, 01-Jan-70 00:00:01 GMT; path=/"),n},s=function(e){return e.preload||k.isBlank(e.confirm)||window.confirm(e.confirm)?k.resolvedPromise():k.unresolvablePromise()},l=k.memoize(function(){return(v("_up_request_method")||"get").toLowerCase()}),m=function(){return!p()&&d()},c=function(){return console.group||(console.group=function(){var t;return t=1<=arguments.length?e.call(arguments,0):[],g.apply(null,["group"].concat(e.call(t)))}),console.groupCollapsed||(console.groupCollapsed=function(){var t;return t=1<=arguments.length?e.call(arguments,0):[],g.apply(null,["groupCollapsed"].concat(e.call(t)))}),console.groupEnd||(console.groupEnd=function(){var t;return t=1<=arguments.length?e.call(arguments,0):[],g.apply(null,["groupEnd"].concat(e.call(t)))})},{url:S,loadPage:h,confirm:s,canPushState:a,canCssTransition:r,canInputEvent:u,canFormData:o,canLogSubstitution:i,isSupported:m,installPolyfills:c,puts:g,sprintf:y,sprintfWithFormattedArgs:b}}(jQuery)}.call(this),function(){var slice=[].slice;up.bus=function($){var boot,emit,emitReset,forgetUpDescription,live,liveUpDescriptions,logEmission,nextUpDescriptionNumber,nobodyPrevents,onEscape,rememberUpDescription,restoreSnapshot,snapshot,u,unbind,upDescriptionNumber,upDescriptionToJqueryDescription,upListenerToJqueryListener;return u=up.util,liveUpDescriptions={},nextUpDescriptionNumber=0,upListenerToJqueryListener=function(e){return function(t){var n;return n=t.$element||$(this),e.apply(n.get(0),[t,n,up.syntax.data(n)])}},upDescriptionToJqueryDescription=function(e,t){var n,r,o;return n=u.copy(e),o=n.pop(),r=void 0,t?(r=upListenerToJqueryListener(o),o._asJqueryListener=r,o._descriptionNumber=++nextUpDescriptionNumber):(r=o._asJqueryListener,r||u.error("up.off: The event listener %o was never registered through up.on")),n.push(r),n},live=function(){var e,t,n;return n=1<=arguments.length?slice.call(arguments,0):[],up.browser.isSupported()?(e=upDescriptionToJqueryDescription(n,!0),rememberUpDescription(n),(t=$(document)).on.apply(t,e),function(){return unbind.apply(null,n)}):function(){}},unbind=function(){var e,t,n;return n=1<=arguments.length?slice.call(arguments,0):[],e=upDescriptionToJqueryDescription(n,!1),forgetUpDescription(n),(t=$(document)).off.apply(t,e)},rememberUpDescription=function(e){var t;return t=upDescriptionNumber(e),liveUpDescriptions[t]=e},forgetUpDescription=function(e){var t;return t=upDescriptionNumber(e),delete liveUpDescriptions[t]},upDescriptionNumber=function(e){return u.last(e)._descriptionNumber},emit=function(e,t){var n,r;return null==t&&(t={}),r=$.Event(e,t),(n=t.$element)?delete t.$element:n=$(document),logEmission(e,t),n.trigger(r),r},logEmission=function(e,t){var n,r,o;return t.hasOwnProperty("message")?(n=t.message,delete t.message,u.isArray(n)?(o=n,n=o[0],r=2<=o.length?slice.call(o,1):[]):r=[],n?u.isPresent(t)?up.puts.apply(up,[n+" (%s (%o))"].concat(slice.call(r),[e],[t])):up.puts.apply(up,[n+" (%s)"].concat(slice.call(r),[e])):void 0):u.isPresent(t)?up.puts("Emitted event %s (%o)",e,t):up.puts("Emitted event %s",e)},nobodyPrevents=function(){var e,t;return e=1<=arguments.length?slice.call(arguments,0):[],t=emit.apply(null,e),t.isDefaultPrevented()?(up.puts("An observer prevented the event %s",e[0]),!1):!0},onEscape=function(e){return live("keydown","body",function(t){return u.escapePressed(t)?e(t):void 0})},snapshot=function(){var e,t,n,r;for(r=[],t=0,n=liveUpDescriptions.length;n>t;t++)e=liveUpDescriptions[t],r.push(e.isDefault=!0);return r},restoreSnapshot=function(){var e,t,n,r,o;for(t=u.reject(liveUpDescriptions,function(e){return e.isDefault}),o=[],n=0,r=t.length;r>n;n++)e=t[n],o.push(unbind.apply(null,e));return o},emitReset=function(){return emit("up:framework:reset",{message:"Resetting framework"})},boot=function(){return up.browser.isSupported()?(up.browser.installPolyfills(),emit("up:framework:boot",{message:"Booting framework"}),emit("up:framework:booted",{message:"Framework booted"}),u.nextFrame(function(){return u.whenReady().then(function(){return emit("up:app:boot",{message:"Booting user application"}),emit("up:app:booted",{message:"User application booted"})})})):void 0},live("up:framework:booted",snapshot),live("up:framework:reset",restoreSnapshot),{knife:eval("undefined"!=typeof Knife&&null!==Knife?Knife.point:void 0),on:live,off:unbind,emit:emit,nobodyPrevents:nobodyPrevents,onEscape:onEscape,emitReset:emitReset,boot:boot}}(jQuery),up.on=up.bus.on,up.off=up.bus.off,up.emit=up.bus.emit,up.reset=up.bus.emitReset,up.boot=up.bus.boot}.call(this),function(){var e=[].slice;up.log=function(){var t,n,r,o,u,i,a,s,l,c,p,f;return p=up.util,t=p.config({prefix:"[UP] ",enabled:!1,collapse:!1}),c=function(){return t.reset()},a=function(e){return""+t.prefix+e},n=function(){var n,r,o;return r=arguments[0],n=2<=arguments.length?e.call(arguments,1):[],t.enabled&&r?(o=up.browser).puts.apply(o,["debug",a(r)].concat(e.call(n))):void 0},l=function(){var n,r,o;return r=arguments[0],n=2<=arguments.length?e.call(arguments,1):[],t.enabled&&r?(o=up.browser).puts.apply(o,["log",a(r)].concat(e.call(n))):void 0},f=function(){var n,r,o;return r=arguments[0],n=2<=arguments.length?e.call(arguments,1):[],t.enabled&&r?(o=up.browser).puts.apply(o,["warn",a(r)].concat(e.call(n))):void 0},i=function(){var n,r,o,u,i;if(o=arguments[0],n=2<=arguments.length?e.call(arguments,1):[],r=n.pop(),!t.enabled||!o)return r();i=t.collapse?"groupCollapsed":"group",(u=up.browser).puts.apply(u,[i,a(o)].concat(e.call(n)));try{return r()}finally{o&&console.groupEnd()}},u=function(){var t,n,r;return n=arguments[0],t=2<=arguments.length?e.call(arguments,1):[],n?(r=up.browser).puts.apply(r,["error",a(n)].concat(e.call(t))):void 0},s=function(){var e;return e=" __ _____ ___ ___ / /_ __\n"+("/ // / _ \\/ _ \\/ _ \\/ / // / "+up.version+"\n")+"\\___/_//_/ .__/\\___/_/\\_. / \n / / / /\n\n",e+=t.enabled?"Call `up.log.disable()` to disable debugging output.":"Call `up.log.enable()` to enable debugging output.",up.browser.puts("log",e)},up.on("up:framework:boot",s),up.on("up:framework:reset",c),o=function(){return t.enabled=!0},r=function(){return t.enabled=!1},{puts:l,debug:n,error:u,warn:f,group:i,config:t,enable:o,disable:r}}(jQuery),up.puts=up.log.puts}.call(this),function(){var e=[].slice;up.syntax=function(t){var n,r,o,u,i,a,s,l,c,p,f,d,m,h,v,g;return g=up.util,n="up-destructable",r="up-destructors",c=[],m=[],l=function(){var t;return t=1<=arguments.length?e.call(arguments,0):[],f.apply(null,[c].concat(e.call(t)))},d=function(){var t;return t=1<=arguments.length?e.call(arguments,0):[],f.apply(null,[m].concat(e.call(t)))},i=function(){var t,n,r,o;return o=arguments[0],t=2<=arguments.length?e.call(arguments,1):[],n=t.pop(),r=g.options(t[0],{priority:0}),"first"===r.priority?r.priority=Number.POSITIVE_INFINITY:"last"===r.priority&&(r.priority=Number.NEGATIVE_INFINITY),{selector:o,callback:n,priority:r.priority,batch:r.batch,keep:r.keep}},f=function(){var t,n,r,o,u;if(u=arguments[0],t=2<=arguments.length?e.call(arguments,1):[],up.browser.isSupported()){for(r=i.apply(null,t),n=0;(o=u[n])&&o.priority>=r.priority;)n+=1;return u.splice(n,0,r)}},u=function(e,t,n){var r,u;return up.puts(e.isDefault?void 0:"Compiling '%s' on %o",e.selector,n),e.keep&&(u=g.isString(e.keep)?e.keep:"",t.attr("up-keep",u)),r=e.callback.apply(n,[t,p(t)]),g.isFunction(r)?o(t,r):void 0},o=function(e,t){var o;return e.addClass(n),o=e.data(r)||[],o.push(t),e.data(r,o)},s=function(e,n){var r;return n=g.options(n),r=t(n.skip),up.log.group("Compiling fragment %o",e.get(0),function(){var n,o,i,a,s,p;for(s=[m,c],p=[],o=0,i=s.length;i>o;o++)a=s[o],p.push(function(){var o,i,s;for(s=[],o=0,i=a.length;i>o;o++)l=a[o],n=g.findWithSelf(e,l.selector),n=n.filter(function(){var e;return e=t(this),g.all(r,function(t){return 0===e.closest(t).length})}),s.push(n.length?up.log.group(l.isDefault?void 0:"Compiling '%s' on %d element(s)",l.selector,n.length,function(){return l.batch?u(l,n,n.get()):n.each(function(){return u(l,t(this),this)})}):void 0);return s}());return p})},a=function(e){return g.findWithSelf(e,"."+n).each(function(){var e,o,u,i,a;for(e=t(this),u=e.data(r),i=0,a=u.length;a>i;i++)(o=u[i])();return e.removeData(r),e.removeClass(n)})},p=function(e){var n,r;return n=t(e),r=n.attr("up-data"),g.isString(r)&&""!==g.trim(r)?JSON.parse(r):{}},v=function(){var e;return e=function(e){return e.isDefault=!0},g.each(c,e),g.each(m,e)},h=function(){var e;return e=function(e){return e.isDefault},c=g.select(c,e),m=g.select(m,e)},up.on("up:framework:booted",v),up.on("up:framework:reset",h),{compiler:l,macro:d,compile:s,clean:a,data:p}}(jQuery),up.compiler=up.syntax.compiler,up.macro=up.syntax.macro,up.ready=function(){return up.util.error("up.ready no longer exists. Please use up.hello instead.")},up.awaken=function(){return up.util.error("up.awaken no longer exists. Please use up.compiler instead.")}}.call(this),function(){up.history=function(e){var t,n,r,o,u,i,a,s,l,c,p,f,d,m,h,v;return v=up.util,n=v.config({popTargets:["body"],restoreScroll:!0}),c=void 0,i=void 0,m=function(){return n.reset(),c=void 0,i=void 0},a=function(e){return v.normalizeUrl(e,{hash:!0})},r=function(){return a(up.browser.url())},o=function(e){return a(e)===r()},s=function(e){return i&&(c=i,i=void 0),i=e},d=function(e,t){return u("replace",e,t)},p=function(e,t){return up.puts("Current location is now %s",e),u("push",e,t)},u=function(e,n,u){var i,a;return u=v.options(u,{force:!1}),u.force||!o(n)?up.browser.canPushState()?(i=e+"State",a=t(),window.history[i](a,"",n),s(r())):v.error("This browser doesn't support history.pushState"):void 0},t=function(){return{fromUp:!0}},h=function(e){var t;return(null!=e?e.fromUp:void 0)?(t=r(),up.log.group("Restoring URL %s",t,function(){var e;return e=n.popTargets.join(", "),up.replace(e,t,{history:!1,title:!0,reveal:!1,transition:"none",saveScroll:!1,restoreScroll:n.restoreScroll})})):up.puts("Ignoring a state not pushed by Unpoly (%o)",e)},l=function(e){return up.log.group("History state popped to URL %s",r(),function(){var t;return s(r()),up.layout.saveScroll({url:c}),t=e.originalEvent.state,h(t)})},up.browser.canPushState()&&(f=function(){return e(window).on("popstate",l),d(r(),{force:!0})},"undefined"!=typeof jasmine&&null!==jasmine?f():setTimeout(f,100)),up.compiler("[up-back]",function(e){return v.isPresent(c)?(v.setMissingAttrs(e,{"up-href":c,"up-restore-scroll":""}),e.removeAttr("up-back"),up.link.makeFollowable(e)):void 0}),up.on("up:framework:reset",m),{config:n,defaults:function(){return v.error("up.history.defaults(...) no longer exists. Set values on he up.history.config property instead.")},push:p,replace:d,url:r,previousUrl:function(){return c},normalizeUrl:a}}(jQuery)}.call(this),function(){var slice=[].slice;up.layout=function($){var SCROLL_PROMISE_KEY,anchoredRight,config,finishScrolling,fixedChildren,lastScrollTops,measureObstruction,reset,restoreScroll,reveal,revealOrRestoreScroll,saveScroll,scroll,scrollTops,u,viewportOf,viewportSelector,viewports,viewportsWithin;return u=up.util,config=u.config({duration:0,viewports:[document,".up-modal-viewport","[up-viewport]"],fixedTop:["[up-fixed~=top]"],fixedBottom:["[up-fixed~=bottom]"],anchoredRight:["[up-anchored~=right]","[up-fixed~=top]","[up-fixed~=bottom]","[up-fixed~=right]"],snap:50,substance:150,easing:"swing"}),lastScrollTops=u.cache({size:30,key:up.history.normalizeUrl}),reset=function(){return config.reset(),lastScrollTops.clear()},SCROLL_PROMISE_KEY="up-scroll-promise",scroll=function(e,t,n){var r,o,i,a,s;return r=$(e),n=u.options(n),i=u.option(n.duration,config.duration),a=u.option(n.easing,config.easing),finishScrolling(r),i>0?(o=$.Deferred(),r.data(SCROLL_PROMISE_KEY,o),o.then(function(){return r.removeData(SCROLL_PROMISE_KEY),r.finish()}),s={scrollTop:t},r.get(0)===document&&(r=$("html, body")),r.animate(s,{duration:i,easing:a,complete:function(){return o.resolve()}}),o):(r.scrollTop(t),u.resolvedDeferred())},finishScrolling=function(e){return $(e).each(function(){var e;return(e=$(this).data(SCROLL_PROMISE_KEY))?e.resolve():void 0})},anchoredRight=function(){return u.multiSelector(config.anchoredRight).select()},measureObstruction=function(){var e,t,n,r;return n=function(e,t){var n,r;return n=$(e),r=n.css(t),u.isPresent(r)||u.error("Fixed element %o must have a CSS attribute %s",n.get(0),t),parseInt(r)+n.height()},t=function(){var e,t,o,u;for(o=$(config.fixedTop.join(", ")),u=[],e=0,t=o.length;t>e;e++)r=o[e],u.push(n(r,"top"));return u}(),e=function(){var e,t,o,u;for(o=$(config.fixedBottom.join(", ")),u=[],e=0,t=o.length;t>e;e++)r=o[e],u.push(n(r,"bottom"));return u}(),{top:Math.max.apply(Math,[0].concat(slice.call(t))),bottom:Math.max.apply(Math,[0].concat(slice.call(e)))}},reveal=function(e,t){var n,r,o,i,a,s,l,c,p,f,d,m,h,v;return n=$(e),up.puts("Revealing fragment %o",e.get(0)),t=u.options(t),r=t.viewport?$(t.viewport):viewportOf(n),m=u.option(t.snap,config.snap),v=r.is(document),h=v?u.clientSize().height:r.height(),p=r.scrollTop(),s=p,c=void 0,l=void 0,v?(l=measureObstruction(),c=0):(l={top:0,bottom:0},c=p),f=function(){return s+l.top},d=function(){return s+h-l.bottom-1},o=u.measure(n,{relative:r}),i=o.top+c,a=i+Math.min(o.height,config.substance)-1,a>d()&&(s+=a-d()),(i<f()||t.top)&&(s=i-l.top),m>s&&(s=0),s!==p?scroll(r,s,t):u.resolvedDeferred()},viewportSelector=function(){return u.multiSelector(config.viewports)},viewportOf=function(e,t){var n,r;return null==t&&(t={}),n=$(e),r=viewportSelector().seekUp(n),0===r.length&&t.strict!==!1&&u.error("Could not find viewport for %o",n),r},viewportsWithin=function(e){var t;return t=$(e),viewportSelector().findWithSelf(t)},viewports=function(){return viewportSelector().select()},scrollTops=function(){var e,t,n,r,o,u,i;for(u={},o=config.viewports,t=0,r=o.length;r>t;t++)i=o[t],e=$(i),e.length&&(n=i,i===document&&(n="document"),u[n]=e.scrollTop());return u},fixedChildren=function(e){var t,n;return null==e&&(e=void 0),e||(e=document.body),n=$(e),t=n.find("[up-fixed]"),u.isPresent(config.fixedTop)&&(t=t.add(n.find(config.fixedTop.join(", ")))),u.isPresent(config.fixedBottom)&&(t=t.add(n.find(config.fixedBottom.join(", ")))),t},saveScroll=function(e){var t,n;return null==e&&(e={}),n=u.option(e.url,up.history.url()),t=u.option(e.tops,scrollTops()),up.puts("Saving scroll positions for URL %s (%o)",n,t),lastScrollTops.set(n,t)},restoreScroll=function(e){var t,n,r,o,i;return null==e&&(e={}),i=up.history.url(),r=void 0,e.around?(n=viewportsWithin(e.around),t=viewportOf(e.around),r=t.add(n)):r=viewports(),o=lastScrollTops.get(i),up.log.group("Restoring scroll positions for URL %s to %o",i,o,function(){var e,t,n,i;for(t in o)i=o[t],n="document"===t?document:t,e=r.filter(n),scroll(e,i,{duration:0});return u.resolvedDeferred()})},revealOrRestoreScroll=function(e,t){var n,r,o,i;return n=$(e),t.restoreScroll?restoreScroll({around:n}):t.reveal?(t.source&&(i=u.parseUrl(t.source),i.hash&&"#"!==i.hash&&(o=i.hash.substr(1),r=u.findWithSelf(n,"#"+o+", a[name='"+o+"']"),r.length&&(n=r))),reveal(n)):u.resolvedDeferred()},up.on("up:framework:reset",reset),{knife:eval("undefined"!=typeof Knife&&null!==Knife?Knife.point:void 0),reveal:reveal,scroll:scroll,finishScrolling:finishScrolling,config:config,defaults:function(){return u.error("up.layout.defaults(...) no longer exists. Set values on he up.layout.config property instead.")},viewportOf:viewportOf,viewportsWithin:viewportsWithin,viewports:viewports,scrollTops:scrollTops,saveScroll:saveScroll,restoreScroll:restoreScroll,revealOrRestoreScroll:revealOrRestoreScroll,anchoredRight:anchoredRight,fixedChildren:fixedChildren}
2
- }(jQuery),up.scroll=up.layout.scroll,up.reveal=up.layout.reveal}.call(this),function(){up.flow=function($){var autofocus,destroy,emitFragmentInserted,emitFragmentKept,extract,findKeepPlan,findOldFragment,first,hello,isRealElement,oldFragmentNotFound,parseImplantSteps,parseResponse,processResponse,reload,replace,resolveSelector,setSource,source,swapElements,transferKeepableElements,u,updateHistory;return u=up.util,setSource=function(e,t){var n;return n=$(e),u.isPresent(t)&&(t=u.normalizeUrl(t)),n.attr("up-source",t)},source=function(e){var t;return t=$(e).closest("[up-source]"),u.presence(t.attr("up-source"))||up.browser.url()},resolveSelector=function(e,t){var n,r;return u.isString(e)?(r=e,u.contains(r,"&")&&(t?(n=u.selectorForElement(t),r=r.replace(/\&/,n)):u.error("Found origin reference (%s) in selector %s, but options.origin is missing","&",r))):r=u.selectorForElement(e),r},replace=function(e,t,n){var r,o,i,a,s,l;return up.puts("Replacing %s from %s (%o)",e,t,n),n=u.options(n),l=resolveSelector(e,n.origin),r=u.option(n.failTarget,"body"),r=resolveSelector(r,n.origin),up.browser.canPushState()||n.history===!1?(s={url:t,method:n.method,data:n.data,target:l,failTarget:r,cache:n.cache,preload:n.preload,headers:n.headers},a=up.ajax(s),i=function(e,r,o){return processResponse(!0,l,t,s,o,n)},o=function(e){return processResponse(!1,r,t,s,e,n)},a=a.then(i,o)):(n.preload||up.browser.loadPage(t,u.only(n,"method","data")),u.unresolvablePromise())},processResponse=function(e,t,n,r,o,i){var a,s,l,c;return i.method=u.normalizeMethod(u.option(u.methodFromXhr(o),i.method)),i.title=u.option(u.titleFromXhr(o),i.title),i.title===!1||u.isString(i.title)||i.history===!1&&i.title!==!0||(i.title=u.titleFromXhr(o)),a="GET"===i.method,(c=u.locationFromXhr(o))?(n=c,e&&up.proxy.isCachable(r)&&(s={url:n,method:u.methodFromXhr(o),target:t},up.proxy.alias(r,s))):a&&(l=u.requestDataAsQuery(i.data))&&(n=n+"?"+l),e?a?(i.history===!1||u.isString(i.history)||(i.history=n),i.source===!1||u.isString(i.source)||(i.source=n)):(u.isString(i.history)||(i.history=!1),u.isString(i.source)||(i.source="keep")):(i.transition=i.failTransition,i.failTransition=void 0,a?(i.history!==!1&&(i.history=n),i.source!==!1&&(i.source=n)):(i.source="keep",i.history=!1)),i.preload?u.resolvedPromise():extract(t,o.responseText,i)},extract=function(e,t,n){return up.log.group("Extracting %s from %d bytes of HTML",e,null!=t?t.length:void 0,function(){var r,o,i;return n=u.options(n,{historyMethod:"push",requireMatch:!0,keep:!0}),i=resolveSelector(e,n.origin),o=parseResponse(t,n),n.title||(n.title=o.title()),n.saveScroll!==!1&&up.layout.saveScroll(),r=u.resolvedPromise(),n.beforeSwap&&(r=r.then(n.beforeSwap)),r=r.then(function(){return updateHistory(n)}),r=r.then(function(){var e,t,r,u,a;for(a=[],r=parseImplantSteps(i,n),e=0,t=r.length;t>e;e++)u=r[e],up.log.group("Updating %s",u.selector,function(){var e,t,r,i;return t=findOldFragment(u.selector,n),e=null!=(r=o.find(u.selector))?r.first():void 0,t&&e?(i=swapElements(t,e,u.pseudoClass,u.transition,n),a.push(i)):void 0});return $.when.apply($,a)}),n.afterSwap&&(r=r.then(n.afterSwap)),r})},findOldFragment=function(e,t){return first(".up-popup "+e)||first(".up-modal "+e)||first(e)||oldFragmentNotFound(e,t)},oldFragmentNotFound=function(e,t){var n;return t.requireMatch?(n="Could not find selector %s in current body HTML","#"===n[0]&&(n+=" (avoid using IDs)"),u.error(n,e)):void 0},parseResponse=function(e,t){var n;return n=u.createElementFromHtml(e),{title:function(){var e;return null!=(e=n.querySelector("title"))?e.textContent:void 0},find:function(r){var o;return(o=$.find(r,n)[0])?$(o):t.requireMatch?u.error("Could not find selector %s in response %o",r,e):void 0}}},updateHistory=function(e){return e.title&&(document.title=e.title),e.history?up.history[e.historyMethod](e.history):void 0},swapElements=function(e,t,n,r,o){var i,a,s,l;return r||(r="none"),"keep"===o.source&&(o=u.merge(o,{source:source(e)})),up.motion.finish(e),n?(i=t.contents().wrap('<span class="up-insertion"></span>').parent(),"before"===n?e.prepend(i):e.append(i),hello(i.children(),o),s=up.layout.revealOrRestoreScroll(i,o),s=s.then(function(){return up.animate(i,r,o)}),s=s.then(function(){return u.unwrapElement(i)})):(a=findKeepPlan(e,t,o))?(emitFragmentKept(a),s=u.resolvedPromise()):(l=function(){return o.keepPlans=transferKeepableElements(e,t,o),e.is("body")?(up.syntax.clean(e),e.replaceWith(t)):t.insertBefore(e),o.source!==!1&&setSource(t,o.source),autofocus(t),hello(t,o),up.morph(e,t,r,o)},s=destroy(e,{animation:l})),s},transferKeepableElements=function(e,t,n){var r,o,i,a,s,l,c,p;if(a=[],n.keep)for(p=e.find("[up-keep]"),i=0,l=p.length;l>i;i++)s=p[i],r=$(s),(c=findKeepPlan(r,t,u.merge(n,{descendantsOnly:!0})))&&(o=r.clone(),r.replaceWith(o),c.$newElement.replaceWith(r),a.push(c));return a},findKeepPlan=function(e,t,n){var r,o,i,a,s;return n.keep&&(r=e,(s=u.castedAttr(r,"up-keep"))&&(u.isString(s)||(s="&"),s=resolveSelector(s,r),o=n.descendantsOnly?t.find(s):u.findWithSelf(t,s),o=o.first(),o.length&&o.is("[up-keep]")&&(i={$element:r,$newElement:o,newData:up.syntax.data(o)},a=u.merge(i,{message:["Keeping element %o",r.get(0)]}),up.bus.nobodyPrevents("up:fragment:keep",a))))?i:void 0},parseImplantSteps=function(e,t){var n,r,o,i,a,s,l,c,p,f,d,m;for(d=t.transition||t.animation||"none",n=/\ *,\ */,r=e.split(n),m=u.isString(m)?d.split(n):[d],l=[],o=i=0,a=r.length;a>i;o=++i)c=r[o],p=c.match(/^(.+?)(?:\:(before|after))?$/),p||u.error('Could not parse selector atom "%s"',c),e=p[1],"html"===e&&(e="body"),s=p[2],f=m[o]||u.last(m),l.push({selector:e,pseudoClass:s,transition:f});return l},hello=function(e,t){var n,r,o,i,a,s;for(n=$(e),t=u.options(t,{keepPlans:[]}),o=[],s=t.keepPlans,r=0,i=s.length;i>r;r++)a=s[r],emitFragmentKept(a),o.push(a.$element);return up.syntax.compile(n,{skip:o}),emitFragmentInserted(n,t),n},emitFragmentInserted=function(e,t){var n;return n=$(e),up.emit("up:fragment:inserted",{$element:n,message:["Inserted fragment %o",n.get(0)],origin:t.origin})},emitFragmentKept=function(e){var t;return t=u.merge(e,{message:["Kept fragment %o",e.$element.get(0)]}),up.emit("up:fragment:kept",t)},autofocus=function(e){var t,n;return n="[autofocus]:last",t=u.findWithSelf(e,n),t.length&&t.get(0)!==document.activeElement?t.focus():void 0},isRealElement=function(e){var t;return t=".up-ghost, .up-destroying",0===e.closest(t).length},first=function(e){var t,n,r,o,i,a;for(o=void 0,o=u.isString(e)?$(e).get():e,n=void 0,i=0,a=o.length;a>i;i++)if(r=o[i],t=$(r),isRealElement(t)){n=t;break}return n},destroy=function(e,t){var n,r,o,i,a;return n=$(e),n.is(".up-placeholder, .up-tooltip, .up-modal, .up-popup")||(i=["Destroying fragment %o",n.get(0)],a=["Destroyed fragment %o",n.get(0)]),0===n.length?u.resolvedDeferred():up.bus.nobodyPrevents("up:fragment:destroy",{$element:n,message:i})?(t=u.options(t,{animation:!1}),r=up.motion.animateOptions(t),n.addClass("up-destroying"),u.isPresent(t.url)&&up.history.push(t.url),u.isPresent(t.title)&&(document.title=t.title),o=u.presence(t.animation,u.isDeferred)||up.motion.animate(n,t.animation,r),o.then(function(){return up.syntax.clean(n),up.emit("up:fragment:destroyed",{$element:n,message:a}),n.remove()}),o):$.Deferred()},reload=function(e,t){var n;return t=u.options(t,{cache:!1}),n=t.url||source(e),replace(e,n,t)},up.on("up:app:boot",function(){var e;return e=$(document.body),setSource(e,up.browser.url()),hello(e)}),{knife:eval("undefined"!=typeof Knife&&null!==Knife?Knife.point:void 0),replace:replace,reload:reload,destroy:destroy,extract:extract,first:first,source:source,resolveSelector:resolveSelector,hello:hello}}(jQuery),up.replace=up.flow.replace,up.extract=up.flow.extract,up.reload=up.flow.reload,up.destroy=up.flow.destroy,up.first=up.flow.first,up.hello=up.flow.hello}.call(this),function(){var e=[].slice;up.motion=function(t){var n,r,o,u,i,a,s,l,c,p,f,d,m,h,v,g,y,b,w,k,S,x,D,P,A,$,E,T;return E=up.util,a={},c={},A={},p={},l=E.config({duration:300,delay:0,easing:"ease",enabled:!0}),k=function(){return a=E.copy(c),A=E.copy(p),l.reset()},v=function(){return l.enabled&&up.browser.canCssTransition()},o=function(e,n,r){var i;return i=t(e),m(i),r=u(r),"none"===n||n===!1?b():E.isFunction(n)?s(n(i,r),n):E.isString(n)?o(i,d(n),r):E.isHash(n)?v()?E.cssAnimate(i,n,r):(i.css(n),E.resolvedDeferred()):E.error("Unknown animation type for %o",n)},u=function(){var t,n,r,o,u;return n=1<=arguments.length?e.call(arguments,0):[],u=n.shift()||{},t=E.isJQuery(n[0])?n.shift():E.nullJQuery(),o=E.isObject(n[0])?n.shift():{},r={},r.easing=E.option(u.easing,E.presentAttr(t,"up-easing"),o.easing,l.easing),r.duration=Number(E.option(u.duration,E.presentAttr(t,"up-duration"),o.duration,l.duration)),r.delay=Number(E.option(u.delay,E.presentAttr(t,"up-delay"),o.delay,l.delay)),r},d=function(e){return a[e]||E.error("Unknown animation %o",e)},r="up-ghosting-deferred",n="up-ghosting",T=function(e,t,o,u){var i,a,s,l,c,p,f,d;return o.copy===!1||e.is(".up-ghost")||t.is(".up-ghost")?u(e,t):(p=void 0,l=void 0,f=void 0,c=void 0,a=up.layout.viewportOf(e),i=e.add(t),E.temporaryCss(t,{display:"none"},function(){return p=w(e,a),f=a.scrollTop()}),E.temporaryCss(e,{display:"none"},function(){return up.layout.revealOrRestoreScroll(t,o),l=w(t,a),c=a.scrollTop()}),p.moveTop(c-f),e.hide(),d=E.temporaryCss(t,{opacity:"0"}),s=u(p.$ghost,l.$ghost),i.data(r,s),i.addClass(n),s.then(function(){return i.removeData(r),i.removeClass(n),d(),p.$bounds.remove(),l.$bounds.remove()}),s)},m=function(e){var r,o,u;return null==e&&(e=".up-animating"),o=t(e),r=E.findWithSelf(o,".up-animating"),E.finishCssAnimate(r),u=E.findWithSelf(o,"."+n),h(u)},h=function(e){return e.each(function(){var e,n;return e=t(this),(n=E.pluckData(e,r))?n.resolve():void 0})},s=function(e,t){return E.isDeferred(e)?e:E.error("Did not return a promise with .then and .resolve methods: %o",t)},y=function(e,n,r,i){var l,c;return"none"===r&&(r=!1),i=E.options(i),c=t(e),l=t(n),f(c,r),f(l,r),up.log.group(r?"Morphing %o to %o (using %s, %o)":void 0,c.get(0),l.get(0),r,i,function(){var e,t,n,p;return t=E.only(i,"reveal","restoreScroll","source"),t=E.extend(t,u(i)),v()?(m(c),m(l),r?(e=a[r])?(x(c,l,t),o(l,e,t)):(p=E.presence(r,E.isFunction)||A[r])?T(c,l,t,function(e,n){var o;return o=p(e,n,t),s(o,r)}):E.isString(r)&&r.indexOf("/")>=0?(n=r.split("/"),p=function(e,t,r){return S(o(e,n[0],r),o(t,n[1],r))},y(c,l,p,t)):E.error("Unknown transition %o",r):x(c,l,t)):x(c,l,t)})},f=function(e,t){var n;return t&&0===e.parents("body").length?(n=e.get(0),E.error("Can't morph a <%s> element (%o)",n.tagName,n)):void 0},x=function(e,t,n){return e.hide(),up.layout.revealOrRestoreScroll(t,n)},w=function(e,n){var r,o,u,i,a,s,l,c,p;for(i=E.measure(e,{relative:!0,inner:!0}),u=e.clone(),u.find("script").remove(),u.css({position:"static"===e.css("position")?"static":"relative",top:"",right:"",bottom:"",left:"",width:"100%",height:"100%"}),u.addClass("up-ghost"),r=t('<div class="up-bounds"></div>'),r.css({position:"absolute"}),r.css(i),p=i.top,c=function(e){return 0!==e?(p+=e,r.css({top:p})):void 0},u.appendTo(r),r.insertBefore(e),c(e.offset().top-u.offset().top),o=up.layout.fixedChildren(u),s=0,l=o.length;l>s;s++)a=o[s],E.fixedToAbsolute(a,n);return{$ghost:u,$bounds:r,moveTop:c}},P=function(e,t){return A[e]=t},i=function(e,t){return a[e]=t},D=function(){return c=E.copy(a),p=E.copy(A)},S=E.resolvableWhen,b=E.resolvedDeferred,g=function(e){return e===!1||"none"===e||e===b},i("none",b),i("fade-in",function(e,t){return e.css({opacity:0}),o(e,{opacity:1},t)}),i("fade-out",function(e,t){return e.css({opacity:1}),o(e,{opacity:0},t)}),$=function(e,t){return{transform:"translate("+e+"px, "+t+"px)"}},i("move-to-top",function(e,t){var n,r;return n=E.measure(e),r=n.top+n.height,e.css($(0,0)),o(e,$(0,-r),t)}),i("move-from-top",function(e,t){var n,r;return n=E.measure(e),r=n.top+n.height,e.css($(0,-r)),o(e,$(0,0),t)}),i("move-to-bottom",function(e,t){var n,r;return n=E.measure(e),r=E.clientSize().height-n.top,e.css($(0,0)),o(e,$(0,r),t)}),i("move-from-bottom",function(e,t){var n,r;return n=E.measure(e),r=E.clientSize().height-n.top,e.css($(0,r)),o(e,$(0,0),t)}),i("move-to-left",function(e,t){var n,r;return n=E.measure(e),r=n.left+n.width,e.css($(0,0)),o(e,$(-r,0),t)}),i("move-from-left",function(e,t){var n,r;return n=E.measure(e),r=n.left+n.width,e.css($(-r,0)),o(e,$(0,0),t)}),i("move-to-right",function(e,t){var n,r;return n=E.measure(e),r=E.clientSize().width-n.left,e.css($(0,0)),o(e,$(r,0),t)}),i("move-from-right",function(e,t){var n,r;return n=E.measure(e),r=E.clientSize().width-n.left,e.css($(r,0)),o(e,$(0,0),t)}),i("roll-down",function(e,t){var n,r,u;return r=e.height(),u=E.temporaryCss(e,{height:"0px",overflow:"hidden"}),n=o(e,{height:r+"px"},t),n.then(u),n}),P("none",b),P("move-left",function(e,t,n){return S(o(e,"move-to-left",n),o(t,"move-from-right",n))}),P("move-right",function(e,t,n){return S(o(e,"move-to-right",n),o(t,"move-from-left",n))}),P("move-up",function(e,t,n){return S(o(e,"move-to-top",n),o(t,"move-from-bottom",n))}),P("move-down",function(e,t,n){return S(o(e,"move-to-bottom",n),o(t,"move-from-top",n))}),P("cross-fade",function(e,t,n){return S(o(e,"fade-out",n),o(t,"fade-in",n))}),up.on("up:framework:booted",D),up.on("up:framework:reset",k),{morph:y,animate:o,animateOptions:u,finish:m,transition:P,animation:i,config:l,isEnabled:v,defaults:function(){return E.error("up.motion.defaults(...) no longer exists. Set values on he up.motion.config property instead.")},none:b,when:S,prependCopy:w,isNone:g}}(jQuery),up.transition=up.motion.transition,up.animation=up.motion.animation,up.morph=up.motion.morph,up.animate=up.motion.animate}.call(this),function(){var e=[].slice;up.proxy=function(t){var n,r,o,u,i,a,s,l,c,p,f,d,m,h,v,g,y,b,w,k,S,x,D,P,A,$,E,T,C,F,O,U,R,_;return _=up.util,n=void 0,P=void 0,O=void 0,S=void 0,U=void 0,$=[],p=_.config({slowDelay:300,preloadDelay:75,cacheSize:70,cacheExpiry:3e5,maxRequests:4,wrapMethods:["PATCH","PUT","DELETE"],wrapMethodParam:"_method",safeMethods:["GET","OPTIONS","HEAD"]}),i=function(e){return k(e),[e.url,e.method,_.requestDataAsQuery(e.data),e.target].join("|")},u=_.cache({size:function(){return p.cacheSize},expiry:function(){return p.cacheExpiry},key:i}),f=function(e){var t,n,r,o,i,a,s;if(e=k(e),m(e))for(n=[e],"html"!==e.target&&(a=_.merge(e,{target:"html"}),n.push(a),"body"!==e.target&&(i=_.merge(e,{target:"body"}),n.push(i))),r=0,o=n.length;o>r;r++)if(t=n[r],s=u.get(t))return s},a=function(){return clearTimeout(P),P=null},s=function(){return clearTimeout(O),O=null},T=function(){return n=null,a(),s(),S=0,p.reset(),u.clear(),U=!1,$=[]},T(),k=function(e){return e._normalized||(e.method=_.normalizeMethod(e.method),e.url&&(e.url=_.normalizeUrl(e.url)),e.target||(e.target="body"),e._normalized=!0),e},r=function(){var t,n,r,o,u,i,a;return t=1<=arguments.length?e.call(arguments,0):[],o=_.extractOptions(t),_.isGiven(t[0])&&(o.url=t[0]),n=o.cache===!0,r=o.cache===!1,a=_.only(o,"url","method","data","target","headers","_normalized"),a=k(a),u=!0,h(a)||n?(i=f(a))&&!r?(up.puts("Re-using cached response for %s %s",a.method,a.url),u="pending"===i.state()):(i=b(a),F(a,i),i.fail(function(){return E(a)})):(c(),i=b(a)),u&&!o.preload&&(w(),i.always(y)),console.groupEnd(),i},m=function(e){return!_.isFormData(e.data)},v=function(){return 0===S},d=function(){return S>0},w=function(){var e,t;return t=v(),S+=1,t?(e=function(){return d()?(up.emit("up:proxy:slow",{message:"Proxy is busy"}),U=!0):void 0},O=_.setTimer(p.slowDelay,e)):void 0},y=function(){return S-=1,v()&&U?(up.emit("up:proxy:recover",{message:"Proxy is idle"}),U=!1):void 0},b=function(e){return S<p.maxRequests?g(e):A(e)},A=function(e){var n,r;return up.puts("Queuing request for %s %s",e.method,e.url),n=t.Deferred(),r={deferred:n,request:e},$.push(r),n.promise()},g=function(e){var n;return up.emit("up:proxy:load",_.merge(e,{message:["Loading %s %s",e.method,e.url]})),e=_.copy(e),e.headers||(e.headers={}),e.headers["X-Up-Target"]=e.target,_.contains(p.wrapMethods,e.method)&&(e.data=_.appendRequestData(e.data,p.wrapMethodParam,e.method),e.method="POST"),_.isFormData(e.data)&&(e.contentType=!1,e.processData=!1),n=t.ajax(e),n.done(function(t,n,r){return C(e,r)}),n.fail(function(t){return C(e,t)}),n},C=function(e,t){var n;return up.emit("up:proxy:received",_.merge(e,{message:["Server responded with %s %s (%d bytes)",t.status,t.statusText,null!=(n=t.responseText)?n.length:void 0]})),x()},x=function(){var t,n;(t=$.shift())&&(n=g(t.request),n.done(function(){var n,r;return n=1<=arguments.length?e.call(arguments,0):[],(r=t.deferred).resolve.apply(r,n)}),n.fail(function(){var n,r;return n=1<=arguments.length?e.call(arguments,0):[],(r=t.deferred).reject.apply(r,n)}))},o=u.alias,F=u.set,E=u.remove,c=u.clear,h=function(e){return k(e),_.contains(p.safeMethods,e.method)},l=function(e){var t,r;return r=parseInt(_.presentAttr(e,"up-delay"))||p.preloadDelay,e.is(n)?void 0:(n=e,a(),t=function(){return D(e),n=null},R(t,r))},R=function(e,t){return P=setTimeout(e,t)},D=function(e,n){var r,o;return r=t(e),n=_.options(n),o=up.link.followMethod(r,n),h({method:o})?up.log.group("Preloading link %o",r,function(){return n.preload=!0,up.follow(r,n)}):(up.puts("Won't preload %o due to unsafe method %s",r,o),_.resolvedPromise())},up.on("mouseover mousedown touchstart","[up-preload]",function(e,t){return up.link.childClicked(e,t)?void 0:l(t)}),up.on("up:framework:reset",T),{preload:D,ajax:r,get:f,alias:o,clear:c,remove:E,isIdle:v,isBusy:d,isCachable:m,config:p,defaults:function(){return _.error("up.proxy.defaults(...) no longer exists. Set values on he up.proxy.config property instead.")}}}(jQuery),up.ajax=up.proxy.ajax}.call(this),function(){up.link=function($){var allowDefault,childClicked,follow,followMethod,followVariantSelectors,isFollowable,makeFollowable,onAction,shouldProcessLinkEvent,u,visit;return u=up.util,visit=function(e,t){var n;return t=u.options(t),n=u.option(t.target,"body"),up.replace(n,e,t)},follow=function(e,t){var n,r,o;return n=$(e),t=u.options(t),o=u.option(n.attr("up-href"),n.attr("href")),r=u.option(t.target,n.attr("up-target"),"body"),t.failTarget=u.option(t.failTarget,n.attr("up-fail-target"),"body"),t.transition=u.option(t.transition,u.castedAttr(n,"up-transition"),"none"),t.failTransition=u.option(t.failTransition,u.castedAttr(n,"up-fail-transition"),"none"),t.history=u.option(t.history,u.castedAttr(n,"up-history")),t.reveal=u.option(t.reveal,u.castedAttr(n,"up-reveal"),!0),t.cache=u.option(t.cache,u.castedAttr(n,"up-cache")),t.restoreScroll=u.option(t.restoreScroll,u.castedAttr(n,"up-restore-scroll")),t.method=followMethod(n,t),t.origin=u.option(t.origin,n),t.confirm=u.option(t.confirm,n.attr("up-confirm")),t=u.merge(t,up.motion.animateOptions(t,n)),up.browser.confirm(t).then(function(){return up.replace(r,o,t)})},followMethod=function(e,t){var n;return n=$(e),t=u.options(t),u.option(t.method,n.attr("up-method"),n.attr("data-method"),"get").toUpperCase()},childClicked=function(e,t){var n,r;return n=$(e.target),r=n.closest("a, [up-href]"),r.length&&t.find(r).length},shouldProcessLinkEvent=function(e,t){return u.isUnmodifiedMouseEvent(e)&&!childClicked(e,t)},followVariantSelectors=[],allowDefault=function(){},onAction=function(e,t){var n;return followVariantSelectors.push(e),n=function(e){return up.navigation.withActiveMark(e,{enlarge:!0},function(){return t(e)})},up.on("click","a"+e+", [up-href]"+e,function(e,t){return shouldProcessLinkEvent(e,t)?t.is("[up-instant]")?e.preventDefault():(e.preventDefault(),n(t)):allowDefault(e)}),up.on("mousedown","a"+e+"[up-instant], [up-href]"+e+"[up-instant]",function(e,t){return shouldProcessLinkEvent(e,t)?(e.preventDefault(),n(t)):void 0})},isFollowable=function(e){return u.any(followVariantSelectors,function(t){return e.is(t)})},makeFollowable=function(e){var t;return t=$(e),isFollowable(t)?void 0:t.attr("up-follow","")},onAction("[up-target]",function(e){return follow(e)}),onAction("[up-follow]",function(e){return follow(e)}),up.macro("[up-dash]",{priority:"last"},function(e){var t,n;return n=u.castedAttr(e,"up-dash"),e.removeAttr("up-dash"),t={"up-preload":"","up-instant":""},n===!0?makeFollowable(e):t["up-target"]=n,u.setMissingAttrs(e,t)}),up.macro("[up-expand]",{priority:"last"},function(e){var t,n,r,o,i,a,s,l,c,p;if(t=e.find("a, [up-href]"),(c=e.attr("up-expand"))&&(t=t.filter(c)),i=t.get(0)){for(p=/^up-/,s={},s["up-href"]=$(i).attr("href"),l=i.attributes,r=0,o=l.length;o>r;r++)n=l[r],a=n.name,a.match(p)&&(s[a]=n.value);return u.setMissingAttrs(e,s),e.removeAttr("up-expand"),makeFollowable(e)}}),{knife:eval("undefined"!=typeof Knife&&null!==Knife?Knife.point:void 0),visit:visit,follow:follow,makeFollowable:makeFollowable,shouldProcessLinkEvent:shouldProcessLinkEvent,childClicked:childClicked,followMethod:followMethod,onAction:onAction}}(jQuery),up.visit=up.link.visit,up.follow=up.link.follow}.call(this),function(){var slice=[].slice;up.form=function($){var autosubmit,config,currentValuesForSwitch,observe,observeForm,reset,resolveValidateTarget,submit,switchTargets,u,validate;return u=up.util,config=u.config({validateTargets:["[up-fieldset]:has(&)","fieldset:has(&)","label:has(&)","form:has(&)"],fields:[":input"],observeDelay:0}),reset=function(){return config.reset()},submit=function(e,t){var n,r,o,i,a,s,l;return n=$(e).closest("form"),t=u.options(t),s=u.option(t.target,n.attr("up-target"),"body"),l=u.option(t.url,n.attr("action"),up.browser.url()),t.failTarget=u.option(t.failTarget,n.attr("up-fail-target"))||u.selectorForElement(n),t.history=u.option(t.history,u.castedAttr(n,"up-history"),!0),t.transition=u.option(t.transition,u.castedAttr(n,"up-transition"),"none"),t.failTransition=u.option(t.failTransition,u.castedAttr(n,"up-fail-transition"),"none"),t.method=u.option(t.method,n.attr("up-method"),n.attr("data-method"),n.attr("method"),"post").toUpperCase(),t.headers=u.option(t.headers,{}),t.reveal=u.option(t.reveal,u.castedAttr(n,"up-reveal"),!0),t.cache=u.option(t.cache,u.castedAttr(n,"up-cache")),t.restoreScroll=u.option(t.restoreScroll,u.castedAttr(n,"up-restore-scroll")),t.origin=u.option(t.origin,n),t.data=up.util.requestDataFromForm(n),t=u.merge(t,up.motion.animateOptions(t,n)),i=n.find("input[type=file]").length,r=!i||u.isFormData(t.data),o=up.browser.canPushState()||t.history===!1,t.validate&&(t.headers||(t.headers={}),t.headers["X-Up-Validate"]=t.validate,!r)?u.unresolvablePromise():(up.navigation.markActive(n),r&&o?(a=up.replace(s,l,t),a.always(function(){return up.navigation.unmarkActive(n)}),a):(n.get(0).submit(),u.unresolvablePromise()))},observe=function(){var $element,args,callback,callbackArg,callbackPromise,callbackTimer,changeEvents,check,clearTimer,delay,knownValue,nextCallback,options,rawCallback,runNextCallback,selectorOrElement;return selectorOrElement=arguments[0],args=2<=arguments.length?slice.call(arguments,1):[],options={},callbackArg=void 0,1===args.length&&(callbackArg=args[0]),args.length>1&&(options=u.options(args[0]),callbackArg=args[1]),$element=$(selectorOrElement),options=u.options(options),delay=u.option($element.attr("up-delay"),options.delay,config.observeDelay),delay=parseInt(delay),callback=null,u.isGiven(options.change)&&u.error("up.observe now takes the change callback as the last argument"),rawCallback=u.option(u.presentAttr($element,"up-observe"),callbackArg),callback=u.isString(rawCallback)?function(value,$field){return eval(rawCallback)}:rawCallback||u.error("up.observe: No change callback given"),$element.is("form")?observeForm($element,options,callback):(knownValue=null,callbackTimer=null,callbackPromise=u.resolvedPromise(),nextCallback=null,runNextCallback=function(){var e;return nextCallback?(e=nextCallback(),nextCallback=null,e):void 0},check=function(){var e,t,n;return n=$element.val(),t=u.isNull(knownValue),knownValue===n||(knownValue=n,t)?void 0:(clearTimer(),nextCallback=function(){return callback.apply($element.get(0),[n,$element])},e=function(){return callbackPromise.then(function(){var e;return e=runNextCallback(),callbackPromise=u.isPromise(e)?e:u.resolvedPromise()})},u.setTimer(delay,e))},clearTimer=function(){return clearTimeout(callbackTimer)},changeEvents=up.browser.canInputEvent()?"input change":"input change keypress paste cut click propertychange",$element.on(changeEvents,check),check(),function(){return $element.off(changeEvents,check),clearTimer()})},observeForm=function(e,t,n){var r,o;return r=u.multiSelector(config.fields).find(e),o=u.map(r,function(e){return observe(e,n)}),function(){var e,t,n,r;for(r=[],t=0,n=o.length;n>t;t++)e=o[t],r.push(e());return r}},autosubmit=function(e,t){return observe(e,t,function(e,t){var n;return n=t.closest("form"),up.navigation.withActiveMark(t,function(){return submit(n)})})},resolveValidateTarget=function(e,t){var n;return n=u.option(t.target,e.attr("up-validate")),u.isBlank(n)&&(n||(n=u.detect(config.validateTargets,function(n){var r;return r=up.flow.resolveSelector(n,t.origin),e.closest(r).length}))),u.isBlank(n)&&u.error("Could not find default validation target for %o (tried ancestors %o)",e.get(0),config.validateTargets),u.isString(n)||(n=u.selectorForElement(n)),n},validate=function(e,t){var n,r,o;return n=$(e),t=u.options(t),t.origin=n,t.target=resolveValidateTarget(n,t),t.failTarget=t.target,t.history=!1,t.headers=u.option(t.headers,{}),t.validate=n.attr("name")||"__none__",t=u.merge(t,up.motion.animateOptions(t,n)),r=n.closest("form"),o=up.submit(r,t)},currentValuesForSwitch=function(e){var t,n,r;return r=void 0,e.is("input[type=checkbox]")?r=e.is(":checked")?[":checked",":present",e.val()]:[":unchecked",":blank"]:e.is("input[type=radio]")?(t=e.closest("form, body").find("input[type='radio'][name='"+e.attr("name")+"']:checked"),r=t.length?[":checked",":present",t.val()]:[":unchecked",":blank"]):(n=e.val(),r=u.isPresent(n)?[":present",n]:[":blank"]),r},currentValuesForSwitch=function(e){var t,n,r,o;return e.is("input[type=checkbox]")?e.is(":checked")?(r=e.val(),n=":checked"):n=":unchecked":e.is("input[type=radio]")?(t=e.closest("form, body").find("input[type='radio'][name='"+e.attr("name")+"']:checked"),t.length?(n=":checked",r=t.val()):n=":unchecked"):r=e.val(),o=[],u.isPresent(r)?(o.push(r),o.push(":present")):o.push(":blank"),u.isPresent(n)&&o.push(n),o},switchTargets=function(e,t){var n,r,o;return n=$(e),t=u.options(t),o=u.option(t.target,n.attr("up-switch")),u.isPresent(o)||u.error("No switch target given for %o",n.get(0)),r=currentValuesForSwitch(n),$(o).each(function(){var e,t,n,o;return e=$(this),(t=e.attr("up-hide-for"))?(t=t.split(" "),n=0===u.intersect(r,t).length):(o=(o=e.attr("up-show-for"))?o.split(" "):[":present",":checked"],n=u.intersect(r,o).length>0),e.toggle(n)})},up.on("submit","form[up-target]",function(e,t){return e.preventDefault(),submit(t)}),up.on("change","[up-validate]",function(e,t){return validate(t)}),up.on("change","[up-switch]",function(e,t){return switchTargets(t)}),up.compiler("[up-switch]",function(e){return switchTargets(e)}),up.compiler("[up-observe]",function(e){return observe(e)}),up.compiler("[up-autosubmit]",function(e){return autosubmit(e)}),up.on("up:framework:reset",reset),{knife:eval("undefined"!=typeof Knife&&null!==Knife?Knife.point:void 0),config:config,submit:submit,observe:observe,validate:validate,switchTargets:switchTargets}}(jQuery),up.submit=up.form.submit,up.observe=up.form.observe,up.autosubmit=up.form.autosubmit,up.validate=up.form.validate}.call(this),function(){up.popup=function($){var attach,autoclose,close,config,contains,coveredUrl,createFrame,currentUrl,discardHistory,ensureInViewport,isOpen,reset,setPosition,u;return u=up.util,currentUrl=void 0,coveredUrl=function(){return $(".up-popup").attr("up-covered-url")},config=u.config({openAnimation:"fade-in",closeAnimation:"fade-out",openDuration:null,closeDuration:null,openEasing:null,closeEasing:null,position:"bottom-right",history:!1}),reset=function(){return close({animation:!1}),config.reset()},setPosition=function(e,t){var n,r,o;return o=u.measure(e,{full:!0}),r=function(){switch(t){case"bottom-right":return{right:o.right,top:o.top+o.height};case"bottom-left":return{left:o.left,top:o.top+o.height};case"top-right":return{right:o.right,bottom:o.top};case"top-left":return{left:o.left,bottom:o.top};default:return u.error("Unknown position option '%s'",t)}}(),u.isFixed(e)&&(r.position="fixed"),n=$(".up-popup"),n.attr("up-position",t),n.css(r),ensureInViewport(n)},ensureInViewport=function(e){var t,n,r,o,i,a,s;if(n=u.measure(e,{full:!0}),r=null,o=null,n.right<0&&(r=-n.right),n.bottom<0&&(o=-n.bottom),n.left<0&&(r=n.left),n.top<0&&(o=n.top),r&&((i=parseInt(e.css("left")))?e.css("left",i-r):(a=parseInt(e.css("right")))&&e.css("right",a+r)),o){if(s=parseInt(e.css("top")))return e.css("top",s-o);if(t=parseInt(e.css("bottom")))return e.css("bottom",t+o)}},discardHistory=function(){var e;return e=$(".up-popup"),e.removeAttr("up-covered-url"),e.removeAttr("up-covered-title")},createFrame=function(e,t){var n;return n=u.resolvedPromise(),isOpen()&&(n=n.then(function(){return close()})),n=n.then(function(){var n;return n=u.$createElementFromSelector(".up-popup"),t.sticky&&n.attr("up-sticky",""),n.attr("up-covered-url",up.browser.url()),n.attr("up-covered-title",document.title),u.$createPlaceholder(e,n),n.appendTo(document.body),n})},isOpen=function(){return $(".up-popup").length>0},attach=function(e,t){var n,r,o,i,a;return n=$(e),n.length||u.error("Cannot attach popup to non-existing element %o",e),t=u.options(t),a=u.option(u.pluckKey(t,"url"),n.attr("up-href"),n.attr("href")),o=u.option(u.pluckKey(t,"html")),i=u.option(u.pluckKey(t,"target"),n.attr("up-popup"),"body"),t.position=u.option(t.position,n.attr("up-position"),config.position),t.animation=u.option(t.animation,n.attr("up-animation"),config.openAnimation),t.sticky=u.option(t.sticky,u.castedAttr(n,"up-sticky"),config.sticky),t.history=up.browser.canPushState()?u.option(t.history,u.castedAttr(n,"up-history"),config.history):!1,t.confirm=u.option(t.confirm,n.attr("up-confirm")),r=up.motion.animateOptions(t,n,{duration:config.openDuration,easing:config.openEasing}),up.browser.confirm(t).then(function(){var e,s;return up.bus.nobodyPrevents("up:popup:open",{url:a,message:"Opening popup"})?(t.beforeSwap=function(){return createFrame(i,t)},e=u.merge(t,{animation:!1}),s=o?up.extract(i,o,e):up.replace(i,a,e),s=s.then(function(){return setPosition(n,t.position)}),s=s.then(function(){return up.animate($(".up-popup"),t.animation,r)}),s=s.then(function(){return up.emit("up:popup:opened",{message:"Popup opened"})})):u.unresolvablePromise()})},close=function(e){var t,n,r;return t=$(".up-popup"),t.length?up.bus.nobodyPrevents("up:popup:close",{$element:t})?(e=u.options(e,{animation:config.closeAnimation,url:t.attr("up-covered-url"),title:t.attr("up-covered-title")}),n=up.motion.animateOptions(e,{duration:config.closeDuration,easing:config.closeEasing}),u.extend(e,n),currentUrl=void 0,r=up.destroy(t,e),r=r.then(function(){return up.emit("up:popup:closed",{message:"Popup closed"})})):u.unresolvablePromise():u.resolvedPromise()},autoclose=function(){return $(".up-popup").is("[up-sticky]")?void 0:(discardHistory(),close())},contains=function(e){var t;return t=$(e),t.closest(".up-popup").length>0},up.link.onAction("[up-popup]",function(e){return e.is(".up-current")?close():attach(e)}),up.on("click","body",function(e){var t;return t=$(e.target),t.closest(".up-popup").length||t.closest("[up-popup]").length?void 0:close()}),up.on("up:fragment:inserted",function(e,t){var n;if(contains(t)){if(n=t.attr("up-source"))return currentUrl=n}else if(contains(e.origin))return autoclose()}),up.bus.onEscape(function(){return close()}),up.on("click","[up-close]",function(e,t){return t.closest(".up-popup").length?(close(),e.preventDefault()):void 0}),up.on("up:framework:reset",reset),{knife:eval("undefined"!=typeof Knife&&null!==Knife?Knife.point:void 0),attach:attach,close:close,url:function(){return currentUrl},coveredUrl:coveredUrl,config:config,defaults:function(){return u.error("up.popup.defaults(...) no longer exists. Set values on he up.popup.config property instead.")},contains:contains,open:function(){return up.error("up.popup.open no longer exists. Please use up.popup.attach instead.")},source:function(){return up.error("up.popup.source no longer exists. Please use up.popup.url instead.")},isOpen:isOpen}}(jQuery)}.call(this),function(){up.modal=function($){var animate,autoclose,close,config,contains,coveredUrl,createFrame,currentFlavor,currentUrl,discardHistory,extract,flavor,flavorDefault,flavorOverrides,follow,isOpen,markAsAnimating,open,reset,shiftElements,templateHtml,u,unshiftElements,unshifters,visit;return u=up.util,config=u.config({maxWidth:null,minWidth:null,width:null,height:null,history:!0,openAnimation:"fade-in",closeAnimation:"fade-out",openDuration:null,closeDuration:null,openEasing:null,closeEasing:null,backdropOpenAnimation:"fade-in",backdropCloseAnimation:"fade-out",closeLabel:"\xd7",flavors:{"default":{}},template:function(){return'<div class="up-modal">\n <div class="up-modal-backdrop"></div>\n <div class="up-modal-viewport">\n <div class="up-modal-dialog">\n <div class="up-modal-content"></div>\n <div class="up-modal-close" up-close>'+flavorDefault("closeLabel")+"</div>\n </div>\n </div>\n</div>"
3
- }}),currentUrl=void 0,currentFlavor=void 0,coveredUrl=function(){return $(".up-modal").attr("up-covered-url")},reset=function(){return close({animation:!1}),currentUrl=void 0,currentFlavor=void 0,config.reset()},templateHtml=function(){var e;return e=flavorDefault("template"),u.isFunction(e)?e(config):e},discardHistory=function(){var e;return e=$(".up-modal"),e.removeAttr("up-covered-url"),e.removeAttr("up-covered-title")},createFrame=function(e,t){var n;return n=u.resolvedPromise(),isOpen()&&(n=n.then(function(){return close()})),n=n.then(function(){var n,r,o;return currentFlavor=t.flavor,o=$(templateHtml()),o.attr("up-flavor",currentFlavor),t.sticky&&o.attr("up-sticky",""),o.attr("up-covered-url",up.browser.url()),o.attr("up-covered-title",document.title),r=o.find(".up-modal-dialog"),u.isPresent(t.width)&&r.css("width",t.width),u.isPresent(t.maxWidth)&&r.css("max-width",t.maxWidth),u.isPresent(t.height)&&r.css("height",t.height),n=o.find(".up-modal-content"),u.$createPlaceholder(e,n),o.appendTo(document.body)})},unshifters=[],shiftElements=function(){var e,t,n,r,o;if(!(unshifters.length>0))return u.documentHasVerticalScrollbar()?(e=$("body"),r=u.scrollbarWidth(),t=parseInt(e.css("padding-right")),n=r+t,o=u.temporaryCss(e,{"padding-right":n+"px","overflow-y":"hidden"}),unshifters.push(o),up.layout.anchoredRight().each(function(){var e,t,n,o;return e=$(this),t=parseInt(e.css("right")),n=r+t,o=u.temporaryCss(e,{right:n}),unshifters.push(o)})):void 0},unshiftElements=function(){var e,t;for(e=[];t=unshifters.pop();)e.push(t());return e},isOpen=function(){return $(".up-modal").length>0},follow=function(e,t){return t=u.options(t),t.$link=$(e),open(t)},visit=function(e,t){return t=u.options(t),t.url=e,open(t)},extract=function(e,t,n){return n=u.options(n),n.html=t,n.history=u.option(n.history,!1),n.target=e,open(n)},open=function(e){var t,n,r,o,i;return e=u.options(e),t=u.option(u.pluckKey(e,"$link"),u.nullJQuery()),i=u.option(u.pluckKey(e,"url"),t.attr("up-href"),t.attr("href")),r=u.option(u.pluckKey(e,"html")),o=u.option(u.pluckKey(e,"target"),t.attr("up-modal"),"body"),e.flavor=u.option(e.flavor,t.attr("up-flavor")),e.width=u.option(e.width,t.attr("up-width"),flavorDefault("width",e.flavor)),e.maxWidth=u.option(e.maxWidth,t.attr("up-max-width"),flavorDefault("maxWidth",e.flavor)),e.height=u.option(e.height,t.attr("up-height"),flavorDefault("height")),e.animation=u.option(e.animation,t.attr("up-animation"),flavorDefault("openAnimation",e.flavor)),e.backdropAnimation=u.option(e.backdropAnimation,t.attr("up-backdrop-animation"),flavorDefault("backdropOpenAnimation",e.flavor)),e.sticky=u.option(e.sticky,u.castedAttr(t,"up-sticky"),flavorDefault("sticky",e.flavor)),e.confirm=u.option(e.confirm,t.attr("up-confirm")),n=up.motion.animateOptions(e,t,{duration:flavorDefault("openDuration",e.flavor),easing:flavorDefault("openEasing",e.flavor)}),e.history=u.option(e.history,u.castedAttr(t,"up-history"),flavorDefault("history",e.flavor)),up.browser.canPushState()||(e.history=!1),up.browser.confirm(e).then(function(){var t,a;return up.bus.nobodyPrevents("up:modal:open",{url:i,message:"Opening modal"})?(e.beforeSwap=function(){return createFrame(o,e)},t=u.merge(e,{animation:!1}),a=r?up.extract(o,r,t):up.replace(o,i,t),a=a.then(function(){return shiftElements()}),a=a.then(function(){return animate(e.animation,e.backdropAnimation,n)}),a=a.then(function(){return up.emit("up:modal:opened",{message:"Modal opened"})})):u.unresolvablePromise()})},close=function(e){var t,n,r,o,i;return e=u.options(e),t=$(".up-modal"),t.length?up.bus.nobodyPrevents("up:modal:close",{$element:t,message:"Closing modal"})?(i=u.option(e.animation,flavorDefault("closeAnimation")),r=u.option(e.backdropAnimation,flavorDefault("backdropCloseAnimation")),n=up.motion.animateOptions(e,{duration:flavorDefault("closeDuration"),easing:flavorDefault("closeEasing")}),o=u.resolvedPromise(),o=o.then(function(){return animate(i,r,n)}),o=o.then(function(){var n;return n=u.options(u.except(e,"animation","duration","easing","delay"),{url:t.attr("up-covered-url"),title:t.attr("up-covered-title")}),currentUrl=void 0,up.destroy(t,n)}),o=o.then(function(){return unshiftElements(),currentFlavor=void 0,up.emit("up:modal:closed",{message:"Modal closed"})})):u.unresolvablePromise():u.resolvedPromise()},markAsAnimating=function(e){return null==e&&(e=!0),$(".up-modal").toggleClass("up-modal-animating",e)},animate=function(e,t,n){var r;return up.motion.isNone(e)?u.resolvedPromise():(markAsAnimating(),r=$.when(up.animate($(".up-modal-viewport"),e,n),up.animate($(".up-modal-backdrop"),t,n)),r=r.then(function(){return markAsAnimating(!1)}))},autoclose=function(){return $(".up-modal").is("[up-sticky]")?void 0:(discardHistory(),close())},contains=function(e){var t;return t=$(e),t.closest(".up-modal").length>0},flavor=function(e,t){return null==t&&(t={}),u.extend(flavorOverrides(e),t)},flavorOverrides=function(e){var t;return(t=config.flavors)[e]||(t[e]={})},flavorDefault=function(e,t){var n;return null==t&&(t=currentFlavor),t&&(n=flavorOverrides(t)[e]),u.isMissing(n)&&(n=config[e]),n},up.link.onAction("[up-modal]",function(e){return follow(e)}),up.on("click","body",function(e){var t;return t=$(e.target),t.closest(".up-modal-dialog").length||t.closest("[up-modal]").length?void 0:close()}),up.on("up:fragment:inserted",function(e,t){var n;if(contains(t)){if(n=t.attr("up-source"))return currentUrl=n}else if(!up.popup.contains(t)&&contains(e.origin))return autoclose()}),up.bus.onEscape(function(){return close()}),up.on("click","[up-close]",function(e,t){return t.closest(".up-modal").length?(close(),e.preventDefault()):void 0}),up.on("up:framework:reset",reset),{knife:eval("undefined"!=typeof Knife&&null!==Knife?Knife.point:void 0),visit:visit,follow:follow,extract:extract,open:function(){return up.error("up.modal.open no longer exists. Please use either up.modal.follow or up.modal.visit.")},close:close,url:function(){return currentUrl},coveredUrl:coveredUrl,config:config,defaults:function(){return u.error("up.modal.defaults(...) no longer exists. Set values on he up.modal.config property instead.")},contains:contains,source:function(){return up.error("up.modal.source no longer exists. Please use up.popup.url instead.")},isOpen:isOpen,flavor:flavor}}(jQuery)}.call(this),function(){up.tooltip=function(e){var t,n,r,o,u,i,a;return a=up.util,r=a.config({position:"top",openAnimation:"fade-in",closeAnimation:"fade-out"}),u=function(){return n({animation:!1}),r.reset()},i=function(e,t,n){var r,o,u;return o=a.measure(e),u=a.measure(t),r=function(){switch(n){case"top":return{left:o.left+.5*(o.width-u.width),top:o.top-u.height};case"left":return{left:o.left-u.width,top:o.top+.5*(o.height-u.height)};case"right":return{left:o.left+o.width,top:o.top+.5*(o.height-u.height)};case"bottom":return{left:o.left+.5*(o.width-u.width),top:o.top+o.height};default:return a.error("Unknown position option '%s'",n)}}(),t.attr("up-position",n),t.css(r)},o=function(e){var t;return t=a.$createElementFromSelector(".up-tooltip"),a.isGiven(e.text)?t.text(e.text):t.html(e.html),t.appendTo(document.body),t},t=function(t,u){var s,l,c,p,f,d,m;return null==u&&(u={}),s=e(t),f=a.option(u.html,s.attr("up-tooltip-html")),m=a.option(u.text,s.attr("up-tooltip")),d=a.option(u.position,s.attr("up-position"),r.position),p=a.option(u.animation,a.castedAttr(s,"up-animation"),r.openAnimation),c=up.motion.animateOptions(u,s),n(),l=o({text:m,html:f}),i(s,l,d),up.animate(l,p,c)},n=function(t){var n;return n=e(".up-tooltip"),n.length?(t=a.options(t,{animation:r.closeAnimation}),t=a.merge(t,up.motion.animateOptions(t)),up.destroy(n,t)):void 0},up.compiler("[up-tooltip], [up-tooltip-html]",function(e){return e.on("mouseenter",function(){return t(e)}),e.on("mouseleave",function(){return n()})}),up.on("click","body",function(){return n()}),up.on("up:framework:reset",n),up.bus.onEscape(function(){return n()}),up.on("up:framework:reset",u),{attach:t,close:n,open:function(){return a.error("up.tooltip.open no longer exists. Use up.tooltip.attach instead.")}}}(jQuery)}.call(this),function(){var e=[].slice;up.navigation=function(t){var n,r,o,u,i,a,s,l,c,p,f,d,m,h;return f=up.util,o=f.config({currentClasses:["up-current"]}),c=function(){return o.reset()},u=function(){var e;return e=o.currentClasses,e=e.concat(["up-current"]),e=f.uniq(e),e.join(" ")},n="up-active",r="a, [up-href]",l=function(e){return f.isPresent(e)?f.normalizeUrl(e,{search:!1,stripTrailingSlash:!0}):void 0},p=function(e){var t,n,r,o,u,i,a,s,c,p;for(s=[],i=["href","up-href","up-alias"],n=0,o=i.length;o>n;n++)if(t=i[n],c=f.presentAttr(e,t))for(p="up-alias"===t?c.split(" "):[c],r=0,u=p.length;u>r;r++)a=p[r],"#"!==a&&(a=l(a),s.push(a));return s},m=function(e){var t,n,r,o;return e=f.compact(e),r=function(e){return"*"===e.substr(-1)?n(e.slice(0,-1)):t(e)},t=function(t){return f.contains(e,t)},n=function(t){return f.detect(e,function(e){return 0===e.indexOf(t)})},o=function(e){return f.detect(e,r)},{matchesAny:o}},a=function(){var e,n;return e=m([l(up.browser.url()),l(up.modal.url()),l(up.modal.coveredUrl()),l(up.popup.url()),l(up.popup.coveredUrl())]),n=u(),f.each(t(r),function(r){var o,u;return o=t(r),u=p(o),e.matchesAny(u)?o.addClass(n):o.hasClass(n)&&0===o.closest(".up-destroying").length?o.removeClass(n):void 0})},i=function(e,n){var o;return o=t(e),n=f.options(n,{enlarge:!1}),n.enlarge?f.presence(o.parent(r))||o:o},s=function(e,t){var r;return r=i(e,t),r.addClass(n)},d=function(e,t){var r;return r=i(e,t),r.removeClass(n)},h=function(){var n,r,o,u,i,a;return u=arguments[0],r=2<=arguments.length?e.call(arguments,1):[],o=r.pop(),i=f.options(r.pop()),n=t(u),s(n,i),a=o(),f.isPromise(a)?a.always(function(){return d(n,i)}):up.warn("Expected block to return a promise, but got %o",a),a},up.on("up:fragment:inserted",function(){return a()}),up.on("up:fragment:destroyed",function(e,t){return t.is(".up-modal, .up-popup")?a():void 0}),up.on("up:framework:reset",c),{config:o,defaults:function(){return f.error("up.navigation.defaults(...) no longer exists. Set values on he up.navigation.config property instead.")},markActive:s,unmarkActive:d,withActiveMark:h}}(jQuery)}.call(this),function(){up.rails=function(e){var t,n,r,o;return r=up.util,o=function(e){return e.is("[up-follow], [up-target], [up-modal], [up-popup]")},n=function(){return r.isGiven(e.rails)},r.each(["method","confirm"],function(e){var t,u;return t="data-"+e,u="up-"+e,up.compiler("["+t+"]",function(e){var i;return n()&&o(e)?(i={},i[u]=e.attr(t),r.setMissingAttrs(e,i),e.removeAttr(t)):void 0})}),t=function(){return n()?{name:e.rails.csrfParam(),value:e.rails.csrfToken()}:void 0},{csrfField:t,isRails:n}}(jQuery)}.call(this),function(){up.boot()}.call(this);
1
+ (function(){window.up={version:"0.26.1"}}).call(this),function(){var e=[].slice;up.util=function(t){var n,r,o,u,i,a,s,l,c,p,f,d,m,h,v,g,y,b,w,k,S,x,D,P,$,A,E,T,C,F,O,U,R,_,M,j,K,I,L,N,W,z,q,H,Q,V,J,B,X,G,Y,Z,et,tt,nt,rt,ot,ut,it,at,st,lt,ct,pt,ft,dt,mt,ht,vt,gt,yt,bt,wt,kt,St,xt,Dt,Pt,$t,At,Et,Tt,Ct,Ft,Ot,Ut,Rt,_t,Mt,jt,Kt,It,Lt,Nt,Wt,zt,qt,Ht,Qt,Vt,Jt,Bt,Xt,Gt,Yt,Zt;return ht=t.noop,lt=function(t){var n,r;return n=void 0,r=!1,function(){var o;return o=1<=arguments.length?e.call(arguments,0):[],r?n:(r=!0,n=t.apply(null,o))}},et=function(e,t){return t=t.toString(),(""===t||"80"===t)&&"http:"===e||"443"===t&&"https:"===e},gt=function(e,t){var n,r,o;return n=Pt(e),r=n.protocol+"//"+n.hostname,et(n.protocol,n.port)||(r+=":"+n.port),o=n.pathname,"/"!==o[0]&&(o="/"+o),(null!=t?t.stripTrailingSlash:void 0)===!0&&(o=o.replace(/\/$/,"")),r+=o,(null!=t?t.hash:void 0)===!0&&(r+=n.hash),(null!=t?t.search:void 0)!==!1&&(r+=n.search),r},Pt=function(e){var n;return n=null,tt(e)?(n=t("<a>").attr({href:e}).get(0),j(n.hostname)&&(n.href=n.href)):n=Jt(e),n},vt=function(e){return e?e.toUpperCase():"GET"},n=function(e){var n,r,o,u,i,a,s,l,c,p,f,d,m,h,v,g;for(v=e.split(/[ >]/),o=null,f=c=0,m=v.length;m>c;f=++c){for(a=v[f],i=a.match(/(^|\.|\#)[A-Za-z0-9\-_]+/g),g="div",u=[],p=null,d=0,h=i.length;h>d;d++)switch(s=i[d],s[0]){case".":u.push(s.substr(1));break;case"#":p=s.substr(1);break;default:g=s}l="<"+g,u.length&&(l+=' class="'+u.join(" ")+'"'),p&&(l+=' id="'+p+'"'),l+=">",n=t(l),r&&n.appendTo(r),0===f&&(o=n),r=n}return o},g=function(e,t){var n;return n=document.createElement(e),Y(t)&&(n.innerHTML=t),n},r=function(e,t){var r;return null==t&&(t=document.body),r=n(e),r.addClass("up-placeholder"),r.appendTo(t),r},Lt=function(e){var n,r,o,u,i,a,s,l,c;if(n=t(e),l=void 0,up.puts("Creating selector from element %o",n.get(0)),c=Et(n.attr("up-id")))l="[up-id='"+c+"']";else if(u=Et(n.attr("id")))l="#"+u;else if(s=Et(n.attr("name")))l="[name='"+s+"']";else if(r=Et(mt(n)))for(l="",o=0,a=r.length;a>o;o++)i=r[o],l+="."+i;else l=n.prop("tagName").toLowerCase();return l},mt=function(e){var t,n;return t=e.attr("class")||"",n=t.split(" "),It(n,function(e){return Y(e)&&!e.match(/^up-/)})},y=function(e){var t,n,r,o,u,i,a,s,l,c,p,f;return l=function(e){return"<"+e+"(?: [^>]*)?>"},i=function(e){return"</"+e+">"},t="(?:.|\\n)*?",u=function(e){return"("+e+")"},f=new RegExp(l("head")+t+l("title")+u(t)+i("title")+t+i("body"),"i"),o=new RegExp(l("body")+u(t)+i("body"),"i"),(r=e.match(o))?(s=document.createElement("html"),n=g("body",r[1]),s.appendChild(n),(p=e.match(f))&&(a=g("head"),s.appendChild(a),c=g("title",p[1]),a.appendChild(c)),s):g("div",e)},A=t.extend,Vt=t.trim,S=function(e,t){var n,r,o,u,i;for(i=[],r=n=0,u=e.length;u>n;r=++n)o=e[r],i.push(t(o,r));return i},at=S,qt=function(e,t){var n,r,o,u;for(u=[],r=n=0,o=e-1;o>=0?o>=n:n>=o;r=o>=0?++n:--n)u.push(t(r));return u},B=function(e){return null===e},nt=function(e){return void 0===e},I=function(e){return!nt(e)},J=function(e){return nt(e)||B(e)},H=function(e){return!J(e)},j=function(e){return J(e)||G(e)&&0===Object.keys(e).length||0===e.length},Et=function(e,t){return null==t&&(t=Y),t(e)?e:void 0},Y=function(e){return!j(e)},q=function(e){return"function"==typeof e},tt=function(e){return"string"==typeof e},X=function(e){return"number"==typeof e},Q=function(e){return"object"==typeof e&&!!e},G=function(e){return Q(e)||"function"==typeof e},N=function(e){return!(!e||1!==e.nodeType)},V=function(e){return e instanceof jQuery},Z=function(e){return G(e)&&q(e.then)},K=function(e){return Z(e)&&q(e.resolve)},M=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},z=function(e){return up.browser.canFormData()&&e instanceof FormData},Qt=function(e){return Array.prototype.slice.call(e)},h=function(e){return M(e)?e.slice():A({},e)},Jt=function(e){return V(e)?e.get(0):e},ct=function(){var t;return t=1<=arguments.length?e.call(arguments,0):[],A.apply(null,[{}].concat(e.call(t)))},Dt=function(e,t){var n,r,o,u;if(o=e?h(e):{},t)for(r in t)n=t[r],u=o[r],H(u)?G(n)&&G(u)&&(o[r]=Dt(u,n)):o[r]=n;return o},xt=function(){var t;return t=1<=arguments.length?e.call(arguments,0):[],w(t,H)},w=function(e,t){var n,r,o,u;for(u=void 0,r=0,o=e.length;o>r;r++)if(n=e[r],t(n)){u=n;break}return u},a=function(e,t){var n,r,o,u;for(u=!1,r=0,o=e.length;o>r;r++)if(n=e[r],t(n)){u=!0;break}return u},i=function(e,t){var n,r,o,u;for(u=!0,r=0,o=e.length;o>r;r++)if(n=e[r],!t(n)){u=!1;break}return u},f=function(e){return It(e,H)},Bt=function(e){var t;return t={},It(e,function(e){return t.hasOwnProperty(e)?!1:t[e]=!0})},It=function(e,t){var n;return n=[],S(e,function(e){return t(e)?n.push(e):void 0}),n},Ct=function(e,t){return It(e,function(e){return!t(e)})},_=function(e,t){return It(e,function(e){return m(t,e)})},Tt=function(){var t,n,r,o;return t=arguments[0],r=2<=arguments.length?e.call(arguments,1):[],o=function(){var e,o,u;for(u=[],e=0,o=r.length;o>e;e++)n=r[e],u.push(t.attr(n));return u}(),w(o,Y)},Wt=function(e,t){return e>0?setTimeout(t,e):t()},dt=function(e){return setTimeout(e,0)},ut=function(e){return e[e.length-1]},p=function(){var e;return e=document.documentElement,{width:e.clientWidth,height:e.clientHeight}},Kt=lt(function(){var e,n,r;return e=t("<div>").css({position:"absolute",top:"0",left:"0",width:"50px",height:"50px",overflowY:"scroll"}),e.appendTo(document.body),n=e.get(0),r=n.offsetWidth-n.clientWidth,e.remove(),r}),k=function(){var e,n,r,o,u,i;return n=document.body,e=t(n),i=document.documentElement,r=e.css("overflow-y"),u="scroll"===r,o="hidden"===r,u||!o&&i.scrollHeight>i.clientHeight},wt=function(t){var n;return n=void 0,function(){var r;return r=1<=arguments.length?e.call(arguments,0):[],null!=t&&(n=t.apply(null,r)),t=void 0,n}},zt=function(e,t,n){var r,o;return o=e.css(Object.keys(t)),e.css(t),r=function(){return e.css(o)},n?(n(),r()):wt(r)},O=function(e){var t,n;return n=e.css(["transform","-webkit-transform"]),j(n)||"none"===n.transform?(t=function(){return e.css(n)},e.css({transform:"translateZ(0)","-webkit-transform":"translateZ(0)"})):t=function(){},t},U=function(e){return e=Jt(e),e.offsetHeight},b=function(e,n,r){var u,i,a,s,l,c,p,f;return u=t(e),r=Dt(r,{duration:300,delay:0,easing:"ease"}),i=t.Deferred(),p=Object.keys(n),l={"transition-property":p.join(", "),"transition-duration":r.duration+"ms","transition-delay":r.delay+"ms","transition-timing-function":r.easing},a=u.css(Object.keys(l)),u.addClass("up-animating"),c=function(){return u.removeClass("up-animating"),u.off("transitionend",s)},s=function(e){var t;return t=e.originalEvent.propertyName,m(p,t)?(i.resolve(),c()):void 0},u.on("transitionend",s),i.then(c),f=O(u),u.css(l),u.css(n),u.data(o,i),i.then(function(){var e;return u.removeData(o),f(),u.css({transition:"none"}),e=!("none"===a["transition-property"]||"all"===a["transition-property"]&&"0"===a["transition-duration"][0]),e?(U(u),u.css(a)):void 0}),i},o="up-animation-deferred",C=function(e){return t(e).each(function(){var e;return(e=$t(this,o))?e.resolve():void 0})},st=function(e,n){var r,o,u,i,a,s;return n=Dt(n,{relative:!1,inner:!1,full:!1}),n.relative?n.relative===!0?a=e.position():(r=t(n.relative),s=e.offset(),r.is(document)?a=s:(i=r.offset(),a={left:s.left-i.left,top:s.top-i.top})):a=e.offset(),u={left:a.left,top:a.top},n.inner?(u.width=e.width(),u.height=e.height()):(u.width=e.outerWidth(),u.height=e.outerHeight()),n.full&&(o=up.layout.viewportOf(e),u.right=o.width()-(u.left+u.width),u.bottom=o.height()-(u.top+u.height)),u},v=function(e,t){var n,r,o,u,i;for(u=e.get(0).attributes,i=[],r=0,o=u.length;o>r;r++)n=u[r],i.push(n.specified?t.attr(n.name,n.value):void 0);return i},T=function(e,t){return e.find(t).addBack(t)},P=function(e){return 27===e.keyCode},m=function(e,t){return e.indexOf(t)>=0},c=function(e,t){var n;switch(n=e.attr(t)){case"false":return!1;case"true":return!0;case"":return!0;default:return n}},it=function(e){return e.getResponseHeader("X-Up-Location")},Ht=function(e){return e.getResponseHeader("X-Up-Title")},pt=function(e){return e.getResponseHeader("X-Up-Method")},kt=function(){var t,n,r,o,u,i;for(o=arguments[0],u=2<=arguments.length?e.call(arguments,1):[],t={},n=0,r=u.length;r>n;n++)i=u[n],o.hasOwnProperty(i)&&(t[i]=o[i]);return t},$=function(){var t,n,r,o,u,i;for(o=arguments[0],u=2<=arguments.length?e.call(arguments,1):[],t=h(o),n=0,r=u.length;r>n;n++)i=u[n],delete t[i];return t},rt=function(e){return!(e.metaKey||e.shiftKey||e.ctrlKey)},ot=function(e){var t;return t=nt(e.button)||0===e.button,t&&rt(e)},Mt=function(){var e;return e=t.Deferred(),e.resolve(),e},jt=function(){return Mt().promise()},Xt=function(){return t.Deferred()},Gt=function(){return Xt().promise()},yt=function(){return t()},_t=function(){var n,r;return n=1<=arguments.length?e.call(arguments,0):[],r=t.when.apply(t,[Mt()].concat(e.call(n))),r.resolve=lt(function(){return S(n,function(e){return e.resolve()})}),r},Nt=function(e,t){var n,r,o;r=[];for(n in t)o=t[n],r.push(J(e.attr(n))?e.attr(n,o):void 0);return r},Ft=function(e,t){var n;return n=e.indexOf(t),n>=0?(e.splice(n,1),t):void 0},ft=function(e){var n,r,o,u,i,s,l;for(i={},l=[],r=[],o=0,u=e.length;u>o;o++)s=e[o],tt(s)?l.push(s):r.push(s);return i.parsed=r,l.length&&(n=l.join(", "),i.parsed.push(n)),i.select=function(){return i.find(void 0)},i.find=function(e){var n,r,o,u,a,s;for(r=yt(),a=i.parsed,o=0,u=a.length;u>o;o++)s=a[o],n=e?e.find(s):t(s),r=r.add(n);return r},i.findWithSelf=function(e){var t;return t=i.find(e),i.doesMatch(e)&&(t=t.add(e)),t},i.doesMatch=function(e){var n;return n=t(e),a(i.parsed,function(e){return n.is(e)})},i.seekUp=function(e){var n,r,o;for(o=t(e),n=o,r=void 0;n.length;){if(i.doesMatch(n)){r=n;break}n=n.parent()}return r||yt()},i},l=function(t){var n,r,o,u,i,a,s,l,c,p,f,d,m,v,g;return null==t&&(t={}),v=void 0,d=function(e){return function(){var n;return n=t[e],X(n)?n:q(n)?n():void 0}},p=d("size"),o=d("expiry"),f=function(e){return t.key?t.key(e):e.toString()},i=function(){return 0!==p()&&0!==o()},r=function(){return v={}},r(),l=function(){var n;return n=1<=arguments.length?e.call(arguments,0):[],t.logPrefix?(n[0]="["+t.logPrefix+"] "+n[0],up.puts.apply(up,n)):void 0},s=function(){return Object.keys(v)},c=function(){var e,t,n,r;return r=h(s()),e=p(),e&&r.length>=e&&(t=null,n=null,S(r,function(e){var r,o;return r=v[e],o=r.timestamp,!n||n>o?(t=e,n=o):void 0}),t)?delete v[t]:void 0},n=function(e,t){var n;return n=u(e,{silent:!0}),I(n)?m(t,n):void 0},g=function(){return(new Date).valueOf()},m=function(e,t){var n;return i()?(c(),n=f(e),v[n]={timestamp:g(),value:t}):void 0},Ft=function(e){var t;return t=f(e),delete v[t]},a=function(e){var t,n;return t=o(),t?(n=g()-e.timestamp,t>n):!0},u=function(e,t){var n,r;return null==t&&(t={}),r=f(e),(n=v[r])?a(n)?(t.silent||l("Cache hit for '%s'",e),n.value):(t.silent||l("Discarding stale cache entry for '%s'",e),void Ft(e)):void(t.silent||l("Cache miss for '%s'",e))},{alias:n,get:u,set:m,remove:Ft,clear:r,keys:s}},d=function(e){var t;return null==e&&(e={}),t={},t.reset=function(){return A(t,e)},t.reset(),Object.preventExtensions(t),t},Yt=function(e){var t,n;return e=Jt(e),t=e.parentNode,n=Qt(e.childNodes),S(n,function(n){return t.insertBefore(n,e)}),t.removeChild(e)},bt=function(e){var t,n;for(t=void 0;(e=e.parent())&&e.length;)if(n=e.css("position"),"absolute"===n||"relative"===n||e.is("body")){t=e;break}return t},W=function(e){var n,r;for(n=t(e);;){if(r=n.css("position"),"fixed"===r)return!0;if(n=n.parent(),0===n.length||n.is(document))return!1}},F=function(e,n){var r,o,u,i;return r=t(e),o=bt(r),u=r.position(),i=o.offset(),r.css({position:"absolute",left:u.left-i.left,top:u.top-i.top+n.scrollTop(),right:"",bottom:""})},Ot=function(e){var t,n,r,o,u,i,a;if(z(e))return up.error("Cannot convert FormData into an array");for(i=Ut(e),t=[],a=i.split("&"),n=0,r=a.length;r>n;n++)u=a[n],Y(u)&&(o=u.split("="),t.push({name:decodeURIComponent(o[0]),value:decodeURIComponent(o[1])}));return t},Ut=function(e){var n;return z(e)?up.error("Cannot convert FormData into a query string"):Y(e)?(n=t.param(e),n=n.replace(/\+/g,"%20")):""},Rt=function(e){var n,r;return n=t(e),r=n.find("input[type=file]").length,r&&up.browser.canFormData()?new FormData(n.get(0)):n.serializeArray()},s=function(e,t,n){var r;return z(e)?e.append(t,n):M(e)?e.push({name:t,value:n}):G(e)?e[t]=n:(tt(e)||J(e))&&(r=Ut([{name:t,value:n}]),e=Y(e)?[e,r].join("&"):r),e},x=function(){var n,r,o,u;throw n=1<=arguments.length?e.call(arguments,0):[],(o=up.log).error.apply(o,n),Zt().then(function(){var r,o,u,i;return r=Et(t(".up-error"))||t('<div class="up-error"></div>').prependTo("body"),u=function(e){return"<span class='up-error-variable'>"+D(e)+"</span>"},o=(i=up.browser).sprintfWithFormattedArgs.apply(i,[u].concat(e.call(n))),r.html(o)}),r=(u=up.browser).sprintf.apply(u,n),new Error(r)},u={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"},D=function(e){return e.replace(/[&<>"]/g,function(e){return u[e]})},At=function(e,t){var n;return n=e[t],delete e[t],n},$t=function(e,n){var r,o;return r=t(e),o=r.data(n),r.removeData(n),o},E=function(e){var t;return t=ut(e),Q(t)&&!V(t)?e.pop():{}},St=function(e){var n;return n=t(e).css("opacity"),H(n)?parseFloat(n):void 0},Zt=lt(function(){var e;return t.isReady?jt():(e=t.Deferred(),t(function(){return e.resolve()}),e.promise())}),R=function(e){return e},L=function(e){return e=Jt(e),!jQuery.contains(document.documentElement,e)},{isDetached:L,requestDataAsArray:Ot,requestDataAsQuery:Ut,appendRequestData:s,requestDataFromForm:Rt,offsetParent:bt,fixedToAbsolute:F,isFixed:W,presentAttr:Tt,createElement:g,parseUrl:Pt,normalizeUrl:gt,normalizeMethod:vt,createElementFromHtml:y,$createElementFromSelector:n,$createPlaceholder:r,selectorForElement:Lt,extend:A,copy:h,merge:ct,options:Dt,option:xt,error:x,each:S,map:at,times:qt,any:a,all:i,detect:w,select:It,reject:Ct,intersect:_,compact:f,uniq:Bt,last:ut,isNull:B,isDefined:I,isUndefined:nt,isGiven:H,isMissing:J,isPresent:Y,isBlank:j,presence:Et,isObject:G,isFunction:q,isString:tt,isNumber:X,isElement:N,isJQuery:V,isPromise:Z,isDeferred:K,isHash:Q,isArray:M,isFormData:z,isUnmodifiedKeyEvent:rt,isUnmodifiedMouseEvent:ot,nullJQuery:yt,unJQuery:Jt,setTimer:Wt,nextFrame:dt,measure:st,temporaryCss:zt,cssAnimate:b,finishCssAnimate:C,forceCompositing:O,forceRepaint:U,escapePressed:P,copyAttributes:v,findWithSelf:T,contains:m,toArray:Qt,castedAttr:c,locationFromXhr:it,titleFromXhr:Ht,methodFromXhr:pt,clientSize:p,only:kt,except:$,trim:Vt,unresolvableDeferred:Xt,unresolvablePromise:Gt,resolvedPromise:jt,resolvedDeferred:Mt,resolvableWhen:_t,setMissingAttrs:Nt,remove:Ft,memoize:lt,scrollbarWidth:Kt,documentHasVerticalScrollbar:k,config:d,cache:l,unwrapElement:Yt,multiSelector:ft,error:x,pluckData:$t,pluckKey:At,extractOptions:E,isDetached:L,noop:ht,opacity:St,whenReady:Zt,identity:R,escapeHtml:D}}($),up.error=up.util.error}.call(this),function(){var e=[].slice;up.browser=function(t){var n,r,o,u,i,a,s,l,c,p,f,d,m,h,v,g,y,b,w,k,S;return k=up.util,h=function(e,n){var r,o,u,i,a;return null==n&&(n={}),i=k.option(n.method,"get").toLowerCase(),"get"===i?(a=k.requestDataAsQuery(n.data),a&&(e=e+"?"+a),location.href=e):(r=t("<form method='post' action='"+e+"'></form>"),o=function(e){var n;return n=t('<input type="hidden">'),n.attr(e.name,e.value),n.appendTo(r)},o({name:up.proxy.config.wrapMethodParam,value:i}),(u=up.rails.csrfField())&&o(u),k.each(k.requestDataAsArray(n.data),o),r.hide().appendTo("body"),r.submit())},g=function(){var t,n,r;return r=arguments[0],t=2<=arguments.length?e.call(arguments,1):[],k.isDefined(console[r])||(r="log"),i()?"function"==typeof console[r]?console[r].apply(console,t):void 0:(n=y.apply(null,t),"function"==typeof console[r]?console[r](n):void 0)},n=/\%[odisf]/g,w=function(e){var n,r,o,u,i,a,s,l,c;if(a=100,o="",k.isString(e))l=e.replace(/[\n\r\t ]+/g," "),l=l.replace(/^[\n\r\t ]+/,""),l=l.replace(/[\n\r\t ]$/,""),l='"'+l+'"',o='"';else if(k.isUndefined(e))l="undefined";else if(k.isNumber(e)||k.isFunction(e))l=e.toString();else if(k.isArray(e))l="["+k.map(e,w).join(", ")+"]",o="]";else if(k.isJQuery(e))l="$("+k.map(e,w).join(", ")+")",o=")";else if(k.isElement(e)){for(n=t(e),l="<"+e.tagName.toLowerCase(),s=["id","name","class"],u=0,i=s.length;i>u;u++)r=s[u],(c=n.attr(r))&&(l+=" "+r+'="'+c+'"');l+=">",o=">"}else l=JSON.stringify(e);return l.length>a&&(l=l.substr(0,a)+" \u2026",l+=o),l},y=function(){var t,n;return n=arguments[0],t=2<=arguments.length?e.call(arguments,1):[],b.apply(null,[k.identity,n].concat(e.call(t)))},b=function(){var t,r,o,u;return r=arguments[0],u=arguments[1],t=3<=arguments.length?e.call(arguments,2):[],o=0,u.replace(n,function(){var e;return e=t[o],e=r(w(e)),o+=1,e})},S=function(){return location.href},p=k.memoize(function(){return k.isUndefined(document.addEventListener)}),f=k.memoize(function(){return p()||-1!==navigator.appVersion.indexOf("MSIE 9.")}),a=k.memoize(function(){return k.isDefined(history.pushState)&&"get"===l()}),r=k.memoize(function(){return"transition"in document.documentElement.style}),u=k.memoize(function(){return"oninput"in document.createElement("input")}),o=k.memoize(function(){return!!window.FormData}),i=k.memoize(function(){return!f()}),d=k.memoize(function(){var e,n,r,o;return o=t.fn.jquery,r=o.split("."),e=parseInt(r[0]),n=parseInt(r[1]),e>=2||1===e&&n>=9}),v=function(e){var t,n;return n=null!=(t=document.cookie.match(new RegExp(e+"=(\\w+)")))?t[1]:void 0,k.isPresent(n)&&(document.cookie=e+"=; expires=Thu, 01-Jan-70 00:00:01 GMT; path=/"),n},s=function(e){return e.preload||k.isBlank(e.confirm)||window.confirm(e.confirm)?k.resolvedPromise():k.unresolvablePromise()},l=k.memoize(function(){return(v("_up_request_method")||"get").toLowerCase()}),m=function(){return!p()&&d()},c=function(){return console.group||(console.group=function(){var t;return t=1<=arguments.length?e.call(arguments,0):[],g.apply(null,["group"].concat(e.call(t)))}),console.groupCollapsed||(console.groupCollapsed=function(){var t;return t=1<=arguments.length?e.call(arguments,0):[],g.apply(null,["groupCollapsed"].concat(e.call(t)))}),console.groupEnd||(console.groupEnd=function(){var t;return t=1<=arguments.length?e.call(arguments,0):[],g.apply(null,["groupEnd"].concat(e.call(t)))})},{url:S,loadPage:h,confirm:s,canPushState:a,canCssTransition:r,canInputEvent:u,canFormData:o,canLogSubstitution:i,isSupported:m,installPolyfills:c,puts:g,sprintf:y,sprintfWithFormattedArgs:b}}(jQuery)}.call(this),function(){var slice=[].slice;up.bus=function($){var boot,emit,emitReset,forgetUpDescription,live,liveUpDescriptions,logEmission,nextUpDescriptionNumber,nobodyPrevents,onEscape,rememberUpDescription,restoreSnapshot,snapshot,u,unbind,upDescriptionNumber,upDescriptionToJqueryDescription,upListenerToJqueryListener;return u=up.util,liveUpDescriptions={},nextUpDescriptionNumber=0,upListenerToJqueryListener=function(e){return function(t){var n;return n=t.$element||$(this),e.apply(n.get(0),[t,n,up.syntax.data(n)])}},upDescriptionToJqueryDescription=function(e,t){var n,r,o;return n=u.copy(e),o=n.pop(),r=void 0,t?(r=upListenerToJqueryListener(o),o._asJqueryListener=r,o._descriptionNumber=++nextUpDescriptionNumber):(r=o._asJqueryListener,r||u.error("up.off: The event listener %o was never registered through up.on")),n.push(r),n},live=function(){var e,t,n;return n=1<=arguments.length?slice.call(arguments,0):[],up.browser.isSupported()?(e=upDescriptionToJqueryDescription(n,!0),rememberUpDescription(n),(t=$(document)).on.apply(t,e),function(){return unbind.apply(null,n)}):function(){}},unbind=function(){var e,t,n;return n=1<=arguments.length?slice.call(arguments,0):[],e=upDescriptionToJqueryDescription(n,!1),forgetUpDescription(n),(t=$(document)).off.apply(t,e)},rememberUpDescription=function(e){var t;return t=upDescriptionNumber(e),liveUpDescriptions[t]=e},forgetUpDescription=function(e){var t;return t=upDescriptionNumber(e),delete liveUpDescriptions[t]},upDescriptionNumber=function(e){return u.last(e)._descriptionNumber},emit=function(e,t){var n,r;return null==t&&(t={}),r=$.Event(e,t),(n=t.$element)?delete t.$element:n=$(document),logEmission(e,t),n.trigger(r),r},logEmission=function(e,t){var n,r,o;return t.hasOwnProperty("message")?(n=t.message,delete t.message,u.isArray(n)?(o=n,n=o[0],r=2<=o.length?slice.call(o,1):[]):r=[],n?u.isPresent(t)?up.puts.apply(up,[n+" (%s (%o))"].concat(slice.call(r),[e],[t])):up.puts.apply(up,[n+" (%s)"].concat(slice.call(r),[e])):void 0):u.isPresent(t)?up.puts("Emitted event %s (%o)",e,t):up.puts("Emitted event %s",e)},nobodyPrevents=function(){var e,t;return e=1<=arguments.length?slice.call(arguments,0):[],t=emit.apply(null,e),t.isDefaultPrevented()?(up.puts("An observer prevented the event %s",e[0]),!1):!0},onEscape=function(e){return live("keydown","body",function(t){return u.escapePressed(t)?e(t):void 0})},snapshot=function(){var e,t,n,r;for(r=[],t=0,n=liveUpDescriptions.length;n>t;t++)e=liveUpDescriptions[t],r.push(e.isDefault=!0);return r},restoreSnapshot=function(){var e,t,n,r,o;for(t=u.reject(liveUpDescriptions,function(e){return e.isDefault}),o=[],n=0,r=t.length;r>n;n++)e=t[n],o.push(unbind.apply(null,e));return o},emitReset=function(){return emit("up:framework:reset",{message:"Resetting framework"})},boot=function(){return up.browser.isSupported()?(up.browser.installPolyfills(),emit("up:framework:boot",{message:"Booting framework"}),emit("up:framework:booted",{message:"Framework booted"}),u.nextFrame(function(){return u.whenReady().then(function(){return emit("up:app:boot",{message:"Booting user application"}),emit("up:app:booted",{message:"User application booted"})})})):void 0},live("up:framework:booted",snapshot),live("up:framework:reset",restoreSnapshot),{knife:eval("undefined"!=typeof Knife&&null!==Knife?Knife.point:void 0),on:live,off:unbind,emit:emit,nobodyPrevents:nobodyPrevents,onEscape:onEscape,emitReset:emitReset,boot:boot}}(jQuery),up.on=up.bus.on,up.off=up.bus.off,up.emit=up.bus.emit,up.reset=up.bus.emitReset,up.boot=up.bus.boot}.call(this),function(){var e=[].slice;up.log=function(){var t,n,r,o,u,i,a,s,l,c,p,f;return p=up.util,t=p.config({prefix:"[UP] ",enabled:!1,collapse:!1}),c=function(){return t.reset()},a=function(e){return""+t.prefix+e},n=function(){var n,r,o;return r=arguments[0],n=2<=arguments.length?e.call(arguments,1):[],t.enabled&&r?(o=up.browser).puts.apply(o,["debug",a(r)].concat(e.call(n))):void 0},l=function(){var n,r,o;return r=arguments[0],n=2<=arguments.length?e.call(arguments,1):[],t.enabled&&r?(o=up.browser).puts.apply(o,["log",a(r)].concat(e.call(n))):void 0},f=function(){var n,r,o;return r=arguments[0],n=2<=arguments.length?e.call(arguments,1):[],t.enabled&&r?(o=up.browser).puts.apply(o,["warn",a(r)].concat(e.call(n))):void 0},i=function(){var n,r,o,u,i;if(o=arguments[0],n=2<=arguments.length?e.call(arguments,1):[],r=n.pop(),!t.enabled||!o)return r();i=t.collapse?"groupCollapsed":"group",(u=up.browser).puts.apply(u,[i,a(o)].concat(e.call(n)));try{return r()}finally{o&&console.groupEnd()}},u=function(){var t,n,r;return n=arguments[0],t=2<=arguments.length?e.call(arguments,1):[],n?(r=up.browser).puts.apply(r,["error",a(n)].concat(e.call(t))):void 0},s=function(){var e;return e=" __ _____ ___ ___ / /_ __\n"+("/ // / _ \\/ _ \\/ _ \\/ / // / "+up.version+"\n")+"\\___/_//_/ .__/\\___/_/\\_. / \n / / / /\n\n",e+=t.enabled?"Call `up.log.disable()` to disable debugging output.":"Call `up.log.enable()` to enable debugging output.",up.browser.puts("log",e)},up.on("up:framework:boot",s),up.on("up:framework:reset",c),o=function(){return t.enabled=!0},r=function(){return t.enabled=!1},{puts:l,debug:n,error:u,warn:f,group:i,config:t,enable:o,disable:r}}(jQuery),up.puts=up.log.puts}.call(this),function(){var e=[].slice;up.syntax=function(t){var n,r,o,u,i,a,s,l,c,p,f,d,m,h,v,g;return g=up.util,n="up-destructable",r="up-destructors",c=[],m=[],l=function(){var t;return t=1<=arguments.length?e.call(arguments,0):[],f.apply(null,[c].concat(e.call(t)))},d=function(){var t;return t=1<=arguments.length?e.call(arguments,0):[],f.apply(null,[m].concat(e.call(t)))},i=function(){var t,n,r,o;return o=arguments[0],t=2<=arguments.length?e.call(arguments,1):[],n=t.pop(),r=g.options(t[0],{priority:0}),"first"===r.priority?r.priority=Number.POSITIVE_INFINITY:"last"===r.priority&&(r.priority=Number.NEGATIVE_INFINITY),{selector:o,callback:n,priority:r.priority,batch:r.batch,keep:r.keep}},f=function(){var t,n,r,o,u;if(u=arguments[0],t=2<=arguments.length?e.call(arguments,1):[],up.browser.isSupported()){for(r=i.apply(null,t),n=0;(o=u[n])&&o.priority>=r.priority;)n+=1;return u.splice(n,0,r)}},u=function(e,t,n){var r,u;return up.puts(e.isDefault?void 0:"Compiling '%s' on %o",e.selector,n),e.keep&&(u=g.isString(e.keep)?e.keep:"",t.attr("up-keep",u)),r=e.callback.apply(n,[t,p(t)]),g.isFunction(r)?o(t,r):void 0},o=function(e,t){var o;return e.addClass(n),o=e.data(r)||[],o.push(t),e.data(r,o)},s=function(e,n){var r;return n=g.options(n),r=t(n.skip),up.log.group("Compiling fragment %o",e.get(0),function(){var n,o,i,a,s,p;for(s=[m,c],p=[],o=0,i=s.length;i>o;o++)a=s[o],p.push(function(){var o,i,s;for(s=[],o=0,i=a.length;i>o;o++)l=a[o],n=g.findWithSelf(e,l.selector),n=n.filter(function(){var e;return e=t(this),g.all(r,function(t){return 0===e.closest(t).length})}),s.push(n.length?up.log.group(l.isDefault?void 0:"Compiling '%s' on %d element(s)",l.selector,n.length,function(){return l.batch?u(l,n,n.get()):n.each(function(){return u(l,t(this),this)})}):void 0);return s}());return p})},a=function(e){return g.findWithSelf(e,"."+n).each(function(){var e,o,u,i,a;for(e=t(this),u=e.data(r),i=0,a=u.length;a>i;i++)(o=u[i])();return e.removeData(r),e.removeClass(n)})},p=function(e){var n,r;return n=t(e),r=n.attr("up-data"),g.isString(r)&&""!==g.trim(r)?JSON.parse(r):{}},v=function(){var e;return e=function(e){return e.isDefault=!0},g.each(c,e),g.each(m,e)},h=function(){var e;return e=function(e){return e.isDefault},c=g.select(c,e),m=g.select(m,e)},up.on("up:framework:booted",v),up.on("up:framework:reset",h),{compiler:l,macro:d,compile:s,clean:a,data:p}}(jQuery),up.compiler=up.syntax.compiler,up.macro=up.syntax.macro,up.ready=function(){return up.util.error("up.ready no longer exists. Please use up.hello instead.")},up.awaken=function(){return up.util.error("up.awaken no longer exists. Please use up.compiler instead.")}}.call(this),function(){up.history=function(e){var t,n,r,o,u,i,a,s,l,c,p,f,d,m,h,v;return v=up.util,n=v.config({popTargets:["body"],restoreScroll:!0}),c=void 0,i=void 0,m=function(){return n.reset(),c=void 0,i=void 0},a=function(e){return v.normalizeUrl(e,{hash:!0})},r=function(){return a(up.browser.url())},o=function(e){return a(e)===r()},s=function(e){return i&&(c=i,i=void 0),i=e},d=function(e,t){return u("replace",e,t)},p=function(e,t){return up.puts("Current location is now %s",e),u("push",e,t)},u=function(e,n,u){var i,a;return u=v.options(u,{force:!1}),u.force||!o(n)?up.browser.canPushState()?(i=e+"State",a=t(),window.history[i](a,"",n),s(r())):v.error("This browser doesn't support history.pushState"):void 0},t=function(){return{fromUp:!0}},h=function(e){var t;return(null!=e?e.fromUp:void 0)?(t=r(),up.log.group("Restoring URL %s",t,function(){var e;return e=n.popTargets.join(", "),up.replace(e,t,{history:!1,title:!0,reveal:!1,transition:"none",saveScroll:!1,restoreScroll:n.restoreScroll})})):up.puts("Ignoring a state not pushed by Unpoly (%o)",e)},l=function(e){return up.log.group("History state popped to URL %s",r(),function(){var t;return s(r()),up.layout.saveScroll({url:c}),t=e.originalEvent.state,h(t)})},up.browser.canPushState()&&(f=function(){return e(window).on("popstate",l),d(r(),{force:!0})},"undefined"!=typeof jasmine&&null!==jasmine?f():setTimeout(f,100)),up.compiler("[up-back]",function(e){return v.isPresent(c)?(v.setMissingAttrs(e,{"up-href":c,"up-restore-scroll":""}),e.removeAttr("up-back"),up.link.makeFollowable(e)):void 0}),up.on("up:framework:reset",m),{config:n,defaults:function(){return v.error("up.history.defaults(...) no longer exists. Set values on he up.history.config property instead.")},push:p,replace:d,url:r,previousUrl:function(){return c},normalizeUrl:a}}(jQuery)}.call(this),function(){var slice=[].slice;up.layout=function($){var SCROLL_PROMISE_KEY,anchoredRight,config,finishScrolling,fixedChildren,lastScrollTops,measureObstruction,reset,restoreScroll,reveal,revealOrRestoreScroll,saveScroll,scroll,scrollTops,u,viewportOf,viewportSelector,viewports,viewportsWithin;return u=up.util,config=u.config({duration:0,viewports:[document,".up-modal-viewport","[up-viewport]"],fixedTop:["[up-fixed~=top]"],fixedBottom:["[up-fixed~=bottom]"],anchoredRight:["[up-anchored~=right]","[up-fixed~=top]","[up-fixed~=bottom]","[up-fixed~=right]"],snap:50,substance:150,easing:"swing"}),lastScrollTops=u.cache({size:30,key:up.history.normalizeUrl}),reset=function(){return config.reset(),lastScrollTops.clear()},SCROLL_PROMISE_KEY="up-scroll-promise",scroll=function(e,t,n){var r,o,i,a,s;return r=$(e),n=u.options(n),i=u.option(n.duration,config.duration),a=u.option(n.easing,config.easing),finishScrolling(r),i>0?(o=$.Deferred(),r.data(SCROLL_PROMISE_KEY,o),o.then(function(){return r.removeData(SCROLL_PROMISE_KEY),r.finish()}),s={scrollTop:t},r.get(0)===document&&(r=$("html, body")),r.animate(s,{duration:i,easing:a,complete:function(){return o.resolve()}}),o):(r.scrollTop(t),u.resolvedDeferred())},finishScrolling=function(e){return $(e).each(function(){var e;return(e=$(this).data(SCROLL_PROMISE_KEY))?e.resolve():void 0})},anchoredRight=function(){return u.multiSelector(config.anchoredRight).select()},measureObstruction=function(){var e,t,n,r;return n=function(e,t){var n,r;return n=$(e),r=n.css(t),u.isPresent(r)||u.error("Fixed element %o must have a CSS attribute %s",n.get(0),t),parseInt(r)+n.height()},t=function(){var e,t,o,u;for(o=$(config.fixedTop.join(", ")),u=[],e=0,t=o.length;t>e;e++)r=o[e],u.push(n(r,"top"));return u}(),e=function(){var e,t,o,u;for(o=$(config.fixedBottom.join(", ")),u=[],e=0,t=o.length;t>e;e++)r=o[e],u.push(n(r,"bottom"));return u}(),{top:Math.max.apply(Math,[0].concat(slice.call(t))),bottom:Math.max.apply(Math,[0].concat(slice.call(e)))}},reveal=function(e,t){var n,r,o,i,a,s,l,c,p,f,d,m,h,v;return n=$(e),up.puts("Revealing fragment %o",e.get(0)),t=u.options(t),r=t.viewport?$(t.viewport):viewportOf(n),m=u.option(t.snap,config.snap),v=r.is(document),h=v?u.clientSize().height:r.height(),p=r.scrollTop(),s=p,c=void 0,l=void 0,v?(l=measureObstruction(),c=0):(l={top:0,bottom:0},c=p),f=function(){return s+l.top},d=function(){return s+h-l.bottom-1},o=u.measure(n,{relative:r}),i=o.top+c,a=i+Math.min(o.height,config.substance)-1,a>d()&&(s+=a-d()),(i<f()||t.top)&&(s=i-l.top),m>s&&(s=0),s!==p?scroll(r,s,t):u.resolvedDeferred()},viewportSelector=function(){return u.multiSelector(config.viewports)},viewportOf=function(e,t){var n,r;return null==t&&(t={}),n=$(e),r=viewportSelector().seekUp(n),0===r.length&&t.strict!==!1&&u.error("Could not find viewport for %o",n),r},viewportsWithin=function(e){var t;return t=$(e),viewportSelector().findWithSelf(t)},viewports=function(){return viewportSelector().select()},scrollTops=function(){var e,t,n,r,o,u,i;for(u={},o=config.viewports,t=0,r=o.length;r>t;t++)i=o[t],e=$(i),e.length&&(n=i,i===document&&(n="document"),u[n]=e.scrollTop());return u},fixedChildren=function(e){var t,n;return null==e&&(e=void 0),e||(e=document.body),n=$(e),t=n.find("[up-fixed]"),u.isPresent(config.fixedTop)&&(t=t.add(n.find(config.fixedTop.join(", ")))),u.isPresent(config.fixedBottom)&&(t=t.add(n.find(config.fixedBottom.join(", ")))),t},saveScroll=function(e){var t,n;return null==e&&(e={}),n=u.option(e.url,up.history.url()),t=u.option(e.tops,scrollTops()),up.puts("Saving scroll positions for URL %s (%o)",n,t),lastScrollTops.set(n,t)},restoreScroll=function(e){var t,n,r,o,i;return null==e&&(e={}),i=up.history.url(),r=void 0,e.around?(n=viewportsWithin(e.around),t=viewportOf(e.around),r=t.add(n)):r=viewports(),o=lastScrollTops.get(i),up.log.group("Restoring scroll positions for URL %s to %o",i,o,function(){var e,t,n,i;for(t in o)i=o[t],n="document"===t?document:t,e=r.filter(n),scroll(e,i,{duration:0});return u.resolvedDeferred()})},revealOrRestoreScroll=function(e,t){var n,r,o,i;return n=$(e),t.restoreScroll?restoreScroll({around:n}):t.reveal?(t.source&&(i=u.parseUrl(t.source),i.hash&&"#"!==i.hash&&(o=i.hash.substr(1),r=u.findWithSelf(n,"#"+o+", a[name='"+o+"']"),r.length&&(n=r))),reveal(n)):u.resolvedDeferred()},up.on("up:framework:reset",reset),{knife:eval("undefined"!=typeof Knife&&null!==Knife?Knife.point:void 0),reveal:reveal,scroll:scroll,finishScrolling:finishScrolling,config:config,defaults:function(){return u.error("up.layout.defaults(...) no longer exists. Set values on he up.layout.config property instead.")},viewportOf:viewportOf,viewportsWithin:viewportsWithin,viewports:viewports,scrollTops:scrollTops,saveScroll:saveScroll,restoreScroll:restoreScroll,revealOrRestoreScroll:revealOrRestoreScroll,anchoredRight:anchoredRight,fixedChildren:fixedChildren}
2
+ }(jQuery),up.scroll=up.layout.scroll,up.reveal=up.layout.reveal}.call(this),function(){up.flow=function($){var autofocus,config,destroy,emitFragmentInserted,emitFragmentKept,extract,filterScripts,findKeepPlan,findOldFragment,first,hello,isRealElement,oldFragmentNotFound,parseImplantSteps,parseResponse,processResponse,reload,replace,reset,resolveSelector,setSource,source,swapElements,transferKeepableElements,u,updateHistory;return u=up.util,config=u.config({runInlineScripts:!0,runLinkedScripts:!1}),reset=function(){return config.reset()},setSource=function(e,t){var n;return n=$(e),u.isPresent(t)&&(t=u.normalizeUrl(t)),n.attr("up-source",t)},source=function(e){var t;return t=$(e).closest("[up-source]"),u.presence(t.attr("up-source"))||up.browser.url()},resolveSelector=function(e,t){var n,r;return u.isString(e)?(r=e,u.contains(r,"&")&&(t?(n=u.selectorForElement(t),r=r.replace(/\&/,n)):u.error("Found origin reference (%s) in selector %s, but options.origin is missing","&",r))):r=u.selectorForElement(e),r},replace=function(e,t,n){var r,o,i,a,s,l;return up.puts("Replacing %s from %s (%o)",e,t,n),n=u.options(n),l=resolveSelector(e,n.origin),r=u.option(n.failTarget,"body"),r=resolveSelector(r,n.origin),up.browser.canPushState()||n.history===!1?(s={url:t,method:n.method,data:n.data,target:l,failTarget:r,cache:n.cache,preload:n.preload,headers:n.headers},a=up.ajax(s),i=function(e,r,o){return processResponse(!0,l,t,s,o,n)},o=function(e){return processResponse(!1,r,t,s,e,n)},a=a.then(i,o)):(n.preload||up.browser.loadPage(t,u.only(n,"method","data")),u.unresolvablePromise())},processResponse=function(e,t,n,r,o,i){var a,s,l,c;return i.method=u.normalizeMethod(u.option(u.methodFromXhr(o),i.method)),i.title=u.option(u.titleFromXhr(o),i.title),i.title===!1||u.isString(i.title)||i.history===!1&&i.title!==!0||(i.title=u.titleFromXhr(o)),a="GET"===i.method,(c=u.locationFromXhr(o))?(n=c,e&&up.proxy.isCachable(r)&&(s={url:n,method:u.methodFromXhr(o),target:t},up.proxy.alias(r,s))):a&&(l=u.requestDataAsQuery(i.data))&&(n=n+"?"+l),e?a?(i.history===!1||u.isString(i.history)||(i.history=n),i.source===!1||u.isString(i.source)||(i.source=n)):(u.isString(i.history)||(i.history=!1),u.isString(i.source)||(i.source="keep")):(i.transition=i.failTransition,i.failTransition=void 0,a?(i.history!==!1&&(i.history=n),i.source!==!1&&(i.source=n)):(i.source="keep",i.history=!1)),i.preload?u.resolvedPromise():extract(t,o.responseText,i)},extract=function(e,t,n){return up.log.group("Extracting %s from %d bytes of HTML",e,null!=t?t.length:void 0,function(){var r,o,i;return n=u.options(n,{historyMethod:"push",requireMatch:!0,keep:!0}),i=resolveSelector(e,n.origin),o=parseResponse(t,n),n.title||(n.title=o.title()),n.saveScroll!==!1&&up.layout.saveScroll(),r=u.resolvedPromise(),n.beforeSwap&&(r=r.then(n.beforeSwap)),r=r.then(function(){return updateHistory(n)}),r=r.then(function(){var e,t,r,u,a;for(a=[],r=parseImplantSteps(i,n),e=0,t=r.length;t>e;e++)u=r[e],up.log.group("Updating %s",u.selector,function(){var e,t,r,i;return t=findOldFragment(u.selector,n),e=null!=(r=o.find(u.selector))?r.first():void 0,t&&e?(filterScripts(e,n),i=swapElements(t,e,u.pseudoClass,u.transition,n),a.push(i)):void 0});return $.when.apply($,a)}),n.afterSwap&&(r=r.then(n.afterSwap)),r})},findOldFragment=function(e,t){return first(".up-popup "+e)||first(".up-modal "+e)||first(e)||oldFragmentNotFound(e,t)},oldFragmentNotFound=function(e,t){var n;return t.requireMatch?(n="Could not find selector %s in current body HTML","#"===n[0]&&(n+=" (avoid using IDs)"),u.error(n,e)):void 0},filterScripts=function(e,t){var n,r,o,i,a,s,l,c,p,f;for(c=u.option(t.runInlineScripts,config.runInlineScripts),p=u.option(t.runLinkedScripts,config.runLinkedScripts),r=u.findWithSelf(e,"script"),l=[],a=0,s=r.length;s>a;a++)f=r[a],n=$(f),i=u.isPresent(n.attr("src")),o=!i,l.push(i&&p||o&&c?void 0:n.remove());return l},parseResponse=function(e,t){var n;return n=u.createElementFromHtml(e),{title:function(){var e;return null!=(e=n.querySelector("title"))?e.textContent:void 0},find:function(r){var o;return(o=$.find(r,n)[0])?$(o):t.requireMatch?u.error("Could not find selector %s in response %o",r,e):void 0}}},updateHistory=function(e){return e.title&&(document.title=e.title),e.history?up.history[e.historyMethod](e.history):void 0},swapElements=function(e,t,n,r,o){var i,a,s,l;return r||(r="none"),"keep"===o.source&&(o=u.merge(o,{source:source(e)})),up.motion.finish(e),n?(i=t.contents().wrap('<span class="up-insertion"></span>').parent(),"before"===n?e.prepend(i):e.append(i),hello(i.children(),o),s=up.layout.revealOrRestoreScroll(i,o),s=s.then(function(){return up.animate(i,r,o)}),s=s.then(function(){return u.unwrapElement(i)})):(a=findKeepPlan(e,t,o))?(emitFragmentKept(a),s=u.resolvedPromise()):(l=function(){return o.keepPlans=transferKeepableElements(e,t,o),e.is("body")?(up.syntax.clean(e),e.replaceWith(t)):t.insertBefore(e),o.source!==!1&&setSource(t,o.source),autofocus(t),hello(t,o),up.morph(e,t,r,o)},s=destroy(e,{animation:l})),s},transferKeepableElements=function(e,t,n){var r,o,i,a,s,l,c,p;if(a=[],n.keep)for(p=e.find("[up-keep]"),i=0,l=p.length;l>i;i++)s=p[i],r=$(s),(c=findKeepPlan(r,t,u.merge(n,{descendantsOnly:!0})))&&(o=r.clone(),r.replaceWith(o),c.$newElement.replaceWith(r),a.push(c));return a},findKeepPlan=function(e,t,n){var r,o,i,a,s;return n.keep&&(r=e,(s=u.castedAttr(r,"up-keep"))&&(u.isString(s)||(s="&"),s=resolveSelector(s,r),o=n.descendantsOnly?t.find(s):u.findWithSelf(t,s),o=o.first(),o.length&&o.is("[up-keep]")&&(i={$element:r,$newElement:o,newData:up.syntax.data(o)},a=u.merge(i,{message:["Keeping element %o",r.get(0)]}),up.bus.nobodyPrevents("up:fragment:keep",a))))?i:void 0},parseImplantSteps=function(e,t){var n,r,o,i,a,s,l,c,p,f,d,m;for(d=t.transition||t.animation||"none",n=/\ *,\ */,r=e.split(n),m=u.isString(m)?d.split(n):[d],l=[],o=i=0,a=r.length;a>i;o=++i)c=r[o],p=c.match(/^(.+?)(?:\:(before|after))?$/),p||u.error('Could not parse selector atom "%s"',c),e=p[1],"html"===e&&(e="body"),s=p[2],f=m[o]||u.last(m),l.push({selector:e,pseudoClass:s,transition:f});return l},hello=function(e,t){var n,r,o,i,a,s;for(n=$(e),t=u.options(t,{keepPlans:[]}),o=[],s=t.keepPlans,r=0,i=s.length;i>r;r++)a=s[r],emitFragmentKept(a),o.push(a.$element);return up.syntax.compile(n,{skip:o}),emitFragmentInserted(n,t),n},emitFragmentInserted=function(e,t){var n;return n=$(e),up.emit("up:fragment:inserted",{$element:n,message:["Inserted fragment %o",n.get(0)],origin:t.origin})},emitFragmentKept=function(e){var t;return t=u.merge(e,{message:["Kept fragment %o",e.$element.get(0)]}),up.emit("up:fragment:kept",t)},autofocus=function(e){var t,n;return n="[autofocus]:last",t=u.findWithSelf(e,n),t.length&&t.get(0)!==document.activeElement?t.focus():void 0},isRealElement=function(e){var t;return t=".up-ghost, .up-destroying",0===e.closest(t).length},first=function(e){var t,n,r,o,i,a;for(o=void 0,o=u.isString(e)?$(e).get():e,n=void 0,i=0,a=o.length;a>i;i++)if(r=o[i],t=$(r),isRealElement(t)){n=t;break}return n},destroy=function(e,t){var n,r,o,i,a;return n=$(e),n.is(".up-placeholder, .up-tooltip, .up-modal, .up-popup")||(i=["Destroying fragment %o",n.get(0)],a=["Destroyed fragment %o",n.get(0)]),0===n.length?u.resolvedDeferred():up.bus.nobodyPrevents("up:fragment:destroy",{$element:n,message:i})?(t=u.options(t,{animation:!1}),r=up.motion.animateOptions(t),n.addClass("up-destroying"),u.isPresent(t.url)&&up.history.push(t.url),u.isPresent(t.title)&&(document.title=t.title),o=u.presence(t.animation,u.isDeferred)||up.motion.animate(n,t.animation,r),o.then(function(){return up.syntax.clean(n),up.emit("up:fragment:destroyed",{$element:n,message:a}),n.remove()}),o):$.Deferred()},reload=function(e,t){var n;return t=u.options(t,{cache:!1}),n=t.url||source(e),replace(e,n,t)},up.on("up:app:boot",function(){var e;return e=$(document.body),setSource(e,up.browser.url()),hello(e)}),up.on("up:framework:reset",reset),{knife:eval("undefined"!=typeof Knife&&null!==Knife?Knife.point:void 0),replace:replace,reload:reload,destroy:destroy,extract:extract,first:first,source:source,resolveSelector:resolveSelector,hello:hello,config:config}}(jQuery),up.replace=up.flow.replace,up.extract=up.flow.extract,up.reload=up.flow.reload,up.destroy=up.flow.destroy,up.first=up.flow.first,up.hello=up.flow.hello}.call(this),function(){var e=[].slice;up.motion=function(t){var n,r,o,u,i,a,s,l,c,p,f,d,m,h,v,g,y,b,w,k,S,x,D,P,$,A,E,T;return E=up.util,a={},c={},$={},p={},l=E.config({duration:300,delay:0,easing:"ease",enabled:!0}),k=function(){return a=E.copy(c),$=E.copy(p),l.reset()},v=function(){return l.enabled&&up.browser.canCssTransition()},o=function(e,n,r){var i;return i=t(e),m(i),r=u(r),"none"===n||n===!1?b():E.isFunction(n)?s(n(i,r),n):E.isString(n)?o(i,d(n),r):E.isHash(n)?v()?E.cssAnimate(i,n,r):(i.css(n),E.resolvedDeferred()):E.error("Unknown animation type for %o",n)},u=function(){var t,n,r,o,u;return n=1<=arguments.length?e.call(arguments,0):[],u=n.shift()||{},t=E.isJQuery(n[0])?n.shift():E.nullJQuery(),o=E.isObject(n[0])?n.shift():{},r={},r.easing=E.option(u.easing,E.presentAttr(t,"up-easing"),o.easing,l.easing),r.duration=Number(E.option(u.duration,E.presentAttr(t,"up-duration"),o.duration,l.duration)),r.delay=Number(E.option(u.delay,E.presentAttr(t,"up-delay"),o.delay,l.delay)),r},d=function(e){return a[e]||E.error("Unknown animation %o",e)},r="up-ghosting-deferred",n="up-ghosting",T=function(e,t,o,u){var i,a,s,l,c,p,f,d;return o.copy===!1||e.is(".up-ghost")||t.is(".up-ghost")?u(e,t):(p=void 0,l=void 0,f=void 0,c=void 0,a=up.layout.viewportOf(e),i=e.add(t),E.temporaryCss(t,{display:"none"},function(){return p=w(e,a),f=a.scrollTop()}),E.temporaryCss(e,{display:"none"},function(){return up.layout.revealOrRestoreScroll(t,o),l=w(t,a),c=a.scrollTop()}),p.moveTop(c-f),e.hide(),d=E.temporaryCss(t,{opacity:"0"}),s=u(p.$ghost,l.$ghost),i.data(r,s),i.addClass(n),s.then(function(){return i.removeData(r),i.removeClass(n),d(),p.$bounds.remove(),l.$bounds.remove()}),s)},m=function(e){var r,o,u;return null==e&&(e=".up-animating"),o=t(e),r=E.findWithSelf(o,".up-animating"),E.finishCssAnimate(r),u=E.findWithSelf(o,"."+n),h(u)},h=function(e){return e.each(function(){var e,n;return e=t(this),(n=E.pluckData(e,r))?n.resolve():void 0})},s=function(e,t){return E.isDeferred(e)?e:E.error("Did not return a promise with .then and .resolve methods: %o",t)},y=function(e,n,r,i){var l,c;return"none"===r&&(r=!1),i=E.options(i),c=t(e),l=t(n),f(c,r),f(l,r),up.log.group(r?"Morphing %o to %o (using %s, %o)":void 0,c.get(0),l.get(0),r,i,function(){var e,t,n,p;return t=E.only(i,"reveal","restoreScroll","source"),t=E.extend(t,u(i)),v()?(m(c),m(l),r?(e=a[r])?(x(c,l,t),o(l,e,t)):(p=E.presence(r,E.isFunction)||$[r])?T(c,l,t,function(e,n){var o;return o=p(e,n,t),s(o,r)}):E.isString(r)&&r.indexOf("/")>=0?(n=r.split("/"),p=function(e,t,r){return S(o(e,n[0],r),o(t,n[1],r))},y(c,l,p,t)):E.error("Unknown transition %o",r):x(c,l,t)):x(c,l,t)})},f=function(e,t){var n;return t&&0===e.parents("body").length?(n=e.get(0),E.error("Can't morph a <%s> element (%o)",n.tagName,n)):void 0},x=function(e,t,n){return e.hide(),up.layout.revealOrRestoreScroll(t,n)},w=function(e,n){var r,o,u,i,a,s,l,c,p;for(i=E.measure(e,{relative:!0,inner:!0}),u=e.clone(),u.find("script").remove(),u.css({position:"static"===e.css("position")?"static":"relative",top:"",right:"",bottom:"",left:"",width:"100%",height:"100%"}),u.addClass("up-ghost"),r=t('<div class="up-bounds"></div>'),r.css({position:"absolute"}),r.css(i),p=i.top,c=function(e){return 0!==e?(p+=e,r.css({top:p})):void 0},u.appendTo(r),r.insertBefore(e),c(e.offset().top-u.offset().top),o=up.layout.fixedChildren(u),s=0,l=o.length;l>s;s++)a=o[s],E.fixedToAbsolute(a,n);return{$ghost:u,$bounds:r,moveTop:c}},P=function(e,t){return $[e]=t},i=function(e,t){return a[e]=t},D=function(){return c=E.copy(a),p=E.copy($)},S=E.resolvableWhen,b=E.resolvedDeferred,g=function(e){return e===!1||"none"===e||e===b},i("none",b),i("fade-in",function(e,t){return e.css({opacity:0}),o(e,{opacity:1},t)}),i("fade-out",function(e,t){return e.css({opacity:1}),o(e,{opacity:0},t)}),A=function(e,t){return{transform:"translate("+e+"px, "+t+"px)"}},i("move-to-top",function(e,t){var n,r;return n=E.measure(e),r=n.top+n.height,e.css(A(0,0)),o(e,A(0,-r),t)}),i("move-from-top",function(e,t){var n,r;return n=E.measure(e),r=n.top+n.height,e.css(A(0,-r)),o(e,A(0,0),t)}),i("move-to-bottom",function(e,t){var n,r;return n=E.measure(e),r=E.clientSize().height-n.top,e.css(A(0,0)),o(e,A(0,r),t)}),i("move-from-bottom",function(e,t){var n,r;return n=E.measure(e),r=E.clientSize().height-n.top,e.css(A(0,r)),o(e,A(0,0),t)}),i("move-to-left",function(e,t){var n,r;return n=E.measure(e),r=n.left+n.width,e.css(A(0,0)),o(e,A(-r,0),t)}),i("move-from-left",function(e,t){var n,r;return n=E.measure(e),r=n.left+n.width,e.css(A(-r,0)),o(e,A(0,0),t)}),i("move-to-right",function(e,t){var n,r;return n=E.measure(e),r=E.clientSize().width-n.left,e.css(A(0,0)),o(e,A(r,0),t)}),i("move-from-right",function(e,t){var n,r;return n=E.measure(e),r=E.clientSize().width-n.left,e.css(A(r,0)),o(e,A(0,0),t)}),i("roll-down",function(e,t){var n,r,u;return r=e.height(),u=E.temporaryCss(e,{height:"0px",overflow:"hidden"}),n=o(e,{height:r+"px"},t),n.then(u),n}),P("none",b),P("move-left",function(e,t,n){return S(o(e,"move-to-left",n),o(t,"move-from-right",n))}),P("move-right",function(e,t,n){return S(o(e,"move-to-right",n),o(t,"move-from-left",n))}),P("move-up",function(e,t,n){return S(o(e,"move-to-top",n),o(t,"move-from-bottom",n))}),P("move-down",function(e,t,n){return S(o(e,"move-to-bottom",n),o(t,"move-from-top",n))}),P("cross-fade",function(e,t,n){return S(o(e,"fade-out",n),o(t,"fade-in",n))}),up.on("up:framework:booted",D),up.on("up:framework:reset",k),{morph:y,animate:o,animateOptions:u,finish:m,transition:P,animation:i,config:l,isEnabled:v,defaults:function(){return E.error("up.motion.defaults(...) no longer exists. Set values on he up.motion.config property instead.")},none:b,when:S,prependCopy:w,isNone:g}}(jQuery),up.transition=up.motion.transition,up.animation=up.motion.animation,up.morph=up.motion.morph,up.animate=up.motion.animate}.call(this),function(){var e=[].slice;up.proxy=function(t){var n,r,o,u,i,a,s,l,c,p,f,d,m,h,v,g,y,b,w,k,S,x,D,P,$,A,E,T,C,F,O,U,R,_;return _=up.util,n=void 0,P=void 0,O=void 0,S=void 0,U=void 0,A=[],p=_.config({slowDelay:300,preloadDelay:75,cacheSize:70,cacheExpiry:3e5,maxRequests:4,wrapMethods:["PATCH","PUT","DELETE"],wrapMethodParam:"_method",safeMethods:["GET","OPTIONS","HEAD"]}),i=function(e){return k(e),[e.url,e.method,_.requestDataAsQuery(e.data),e.target].join("|")},u=_.cache({size:function(){return p.cacheSize},expiry:function(){return p.cacheExpiry},key:i}),f=function(e){var t,n,r,o,i,a,s;if(e=k(e),m(e))for(n=[e],"html"!==e.target&&(a=_.merge(e,{target:"html"}),n.push(a),"body"!==e.target&&(i=_.merge(e,{target:"body"}),n.push(i))),r=0,o=n.length;o>r;r++)if(t=n[r],s=u.get(t))return s},a=function(){return clearTimeout(P),P=null},s=function(){return clearTimeout(O),O=null},T=function(){return n=null,a(),s(),S=0,p.reset(),u.clear(),U=!1,A=[]},T(),k=function(e){return e._normalized||(e.method=_.normalizeMethod(e.method),e.url&&(e.url=_.normalizeUrl(e.url)),e.target||(e.target="body"),e._normalized=!0),e},r=function(){var t,n,r,o,u,i,a;return t=1<=arguments.length?e.call(arguments,0):[],o=_.extractOptions(t),_.isGiven(t[0])&&(o.url=t[0]),n=o.cache===!0,r=o.cache===!1,a=_.only(o,"url","method","data","target","headers","_normalized"),a=k(a),u=!0,h(a)||n?(i=f(a))&&!r?(up.puts("Re-using cached response for %s %s",a.method,a.url),u="pending"===i.state()):(i=b(a),F(a,i),i.fail(function(){return E(a)})):(c(),i=b(a)),u&&!o.preload&&(w(),i.always(y)),console.groupEnd(),i},m=function(e){return!_.isFormData(e.data)},v=function(){return 0===S},d=function(){return S>0},w=function(){var e,t;return t=v(),S+=1,t?(e=function(){return d()?(up.emit("up:proxy:slow",{message:"Proxy is busy"}),U=!0):void 0},O=_.setTimer(p.slowDelay,e)):void 0},y=function(){return S-=1,v()&&U?(up.emit("up:proxy:recover",{message:"Proxy is idle"}),U=!1):void 0},b=function(e){return S<p.maxRequests?g(e):$(e)},$=function(e){var n,r;return up.puts("Queuing request for %s %s",e.method,e.url),n=t.Deferred(),r={deferred:n,request:e},A.push(r),n.promise()},g=function(e){var n;return up.emit("up:proxy:load",_.merge(e,{message:["Loading %s %s",e.method,e.url]})),e=_.copy(e),e.headers||(e.headers={}),e.headers["X-Up-Target"]=e.target,_.contains(p.wrapMethods,e.method)&&(e.data=_.appendRequestData(e.data,p.wrapMethodParam,e.method),e.method="POST"),_.isFormData(e.data)&&(e.contentType=!1,e.processData=!1),n=t.ajax(e),n.done(function(t,n,r){return C(e,r)}),n.fail(function(t){return C(e,t)}),n},C=function(e,t){var n;return up.emit("up:proxy:received",_.merge(e,{message:["Server responded with %s %s (%d bytes)",t.status,t.statusText,null!=(n=t.responseText)?n.length:void 0]})),x()},x=function(){var t,n;(t=A.shift())&&(n=g(t.request),n.done(function(){var n,r;return n=1<=arguments.length?e.call(arguments,0):[],(r=t.deferred).resolve.apply(r,n)}),n.fail(function(){var n,r;return n=1<=arguments.length?e.call(arguments,0):[],(r=t.deferred).reject.apply(r,n)}))},o=u.alias,F=u.set,E=u.remove,c=u.clear,h=function(e){return k(e),_.contains(p.safeMethods,e.method)},l=function(e){var t,r;return r=parseInt(_.presentAttr(e,"up-delay"))||p.preloadDelay,e.is(n)?void 0:(n=e,a(),t=function(){return D(e),n=null},R(t,r))},R=function(e,t){return P=setTimeout(e,t)},D=function(e,n){var r,o;return r=t(e),n=_.options(n),o=up.link.followMethod(r,n),h({method:o})?up.log.group("Preloading link %o",r,function(){return n.preload=!0,up.follow(r,n)}):(up.puts("Won't preload %o due to unsafe method %s",r,o),_.resolvedPromise())},up.on("mouseover mousedown touchstart","[up-preload]",function(e,t){return up.link.childClicked(e,t)?void 0:l(t)}),up.on("up:framework:reset",T),{preload:D,ajax:r,get:f,alias:o,clear:c,remove:E,isIdle:v,isBusy:d,isCachable:m,config:p,defaults:function(){return _.error("up.proxy.defaults(...) no longer exists. Set values on he up.proxy.config property instead.")}}}(jQuery),up.ajax=up.proxy.ajax}.call(this),function(){up.link=function($){var allowDefault,childClicked,follow,followMethod,followVariantSelectors,isFollowable,makeFollowable,onAction,shouldProcessLinkEvent,u,visit;return u=up.util,visit=function(e,t){var n;return t=u.options(t),n=u.option(t.target,"body"),up.replace(n,e,t)},follow=function(e,t){var n,r,o;return n=$(e),t=u.options(t),o=u.option(n.attr("up-href"),n.attr("href")),r=u.option(t.target,n.attr("up-target"),"body"),t.failTarget=u.option(t.failTarget,n.attr("up-fail-target"),"body"),t.transition=u.option(t.transition,u.castedAttr(n,"up-transition"),"none"),t.failTransition=u.option(t.failTransition,u.castedAttr(n,"up-fail-transition"),"none"),t.history=u.option(t.history,u.castedAttr(n,"up-history")),t.reveal=u.option(t.reveal,u.castedAttr(n,"up-reveal"),!0),t.cache=u.option(t.cache,u.castedAttr(n,"up-cache")),t.restoreScroll=u.option(t.restoreScroll,u.castedAttr(n,"up-restore-scroll")),t.method=followMethod(n,t),t.origin=u.option(t.origin,n),t.confirm=u.option(t.confirm,n.attr("up-confirm")),t=u.merge(t,up.motion.animateOptions(t,n)),up.browser.confirm(t).then(function(){return up.replace(r,o,t)})},followMethod=function(e,t){var n;return n=$(e),t=u.options(t),u.option(t.method,n.attr("up-method"),n.attr("data-method"),"get").toUpperCase()},childClicked=function(e,t){var n,r;return n=$(e.target),r=n.closest("a, [up-href]"),r.length&&t.find(r).length},shouldProcessLinkEvent=function(e,t){return u.isUnmodifiedMouseEvent(e)&&!childClicked(e,t)},followVariantSelectors=[],allowDefault=function(){},onAction=function(e,t){var n;return followVariantSelectors.push(e),n=function(e){return up.navigation.withActiveMark(e,{enlarge:!0},function(){return t(e)})},up.on("click","a"+e+", [up-href]"+e,function(e,t){return shouldProcessLinkEvent(e,t)?t.is("[up-instant]")?e.preventDefault():(e.preventDefault(),n(t)):allowDefault(e)}),up.on("mousedown","a"+e+"[up-instant], [up-href]"+e+"[up-instant]",function(e,t){return shouldProcessLinkEvent(e,t)?(e.preventDefault(),n(t)):void 0})},isFollowable=function(e){return u.any(followVariantSelectors,function(t){return e.is(t)})},makeFollowable=function(e){var t;return t=$(e),isFollowable(t)?void 0:t.attr("up-follow","")},onAction("[up-target]",function(e){return follow(e)}),onAction("[up-follow]",function(e){return follow(e)}),up.macro("[up-dash]",{priority:"last"},function(e){var t,n;return n=u.castedAttr(e,"up-dash"),e.removeAttr("up-dash"),t={"up-preload":"","up-instant":""},n===!0?makeFollowable(e):t["up-target"]=n,u.setMissingAttrs(e,t)}),up.macro("[up-expand]",{priority:"last"},function(e){var t,n,r,o,i,a,s,l,c,p;if(t=e.find("a, [up-href]"),(c=e.attr("up-expand"))&&(t=t.filter(c)),i=t.get(0)){for(p=/^up-/,s={},s["up-href"]=$(i).attr("href"),l=i.attributes,r=0,o=l.length;o>r;r++)n=l[r],a=n.name,a.match(p)&&(s[a]=n.value);return u.setMissingAttrs(e,s),e.removeAttr("up-expand"),makeFollowable(e)}}),{knife:eval("undefined"!=typeof Knife&&null!==Knife?Knife.point:void 0),visit:visit,follow:follow,makeFollowable:makeFollowable,shouldProcessLinkEvent:shouldProcessLinkEvent,childClicked:childClicked,followMethod:followMethod,onAction:onAction}}(jQuery),up.visit=up.link.visit,up.follow=up.link.follow}.call(this),function(){var slice=[].slice;up.form=function($){var autosubmit,config,currentValuesForSwitch,observe,observeForm,reset,resolveValidateTarget,submit,switchTargets,u,validate;return u=up.util,config=u.config({validateTargets:["[up-fieldset]:has(&)","fieldset:has(&)","label:has(&)","form:has(&)"],fields:[":input"],observeDelay:0}),reset=function(){return config.reset()},submit=function(e,t){var n,r,o,i,a,s,l;return n=$(e).closest("form"),t=u.options(t),s=u.option(t.target,n.attr("up-target"),"body"),l=u.option(t.url,n.attr("action"),up.browser.url()),t.failTarget=u.option(t.failTarget,n.attr("up-fail-target"))||u.selectorForElement(n),t.history=u.option(t.history,u.castedAttr(n,"up-history"),!0),t.transition=u.option(t.transition,u.castedAttr(n,"up-transition"),"none"),t.failTransition=u.option(t.failTransition,u.castedAttr(n,"up-fail-transition"),"none"),t.method=u.option(t.method,n.attr("up-method"),n.attr("data-method"),n.attr("method"),"post").toUpperCase(),t.headers=u.option(t.headers,{}),t.reveal=u.option(t.reveal,u.castedAttr(n,"up-reveal"),!0),t.cache=u.option(t.cache,u.castedAttr(n,"up-cache")),t.restoreScroll=u.option(t.restoreScroll,u.castedAttr(n,"up-restore-scroll")),t.origin=u.option(t.origin,n),t.data=up.util.requestDataFromForm(n),t=u.merge(t,up.motion.animateOptions(t,n)),i=n.find("input[type=file]").length,r=!i||u.isFormData(t.data),o=up.browser.canPushState()||t.history===!1,t.validate&&(t.headers||(t.headers={}),t.headers["X-Up-Validate"]=t.validate,!r)?u.unresolvablePromise():(up.navigation.markActive(n),r&&o?(a=up.replace(s,l,t),a.always(function(){return up.navigation.unmarkActive(n)}),a):(n.get(0).submit(),u.unresolvablePromise()))},observe=function(){var $element,args,callback,callbackArg,callbackPromise,callbackTimer,changeEvents,check,clearTimer,delay,knownValue,nextCallback,options,rawCallback,runNextCallback,selectorOrElement;return selectorOrElement=arguments[0],args=2<=arguments.length?slice.call(arguments,1):[],options={},callbackArg=void 0,1===args.length&&(callbackArg=args[0]),args.length>1&&(options=u.options(args[0]),callbackArg=args[1]),$element=$(selectorOrElement),options=u.options(options),delay=u.option($element.attr("up-delay"),options.delay,config.observeDelay),delay=parseInt(delay),callback=null,u.isGiven(options.change)&&u.error("up.observe now takes the change callback as the last argument"),rawCallback=u.option(u.presentAttr($element,"up-observe"),callbackArg),callback=u.isString(rawCallback)?function(value,$field){return eval(rawCallback)}:rawCallback||u.error("up.observe: No change callback given"),$element.is("form")?observeForm($element,options,callback):(knownValue=null,callbackTimer=null,callbackPromise=u.resolvedPromise(),nextCallback=null,runNextCallback=function(){var e;return nextCallback?(e=nextCallback(),nextCallback=null,e):void 0},check=function(){var e,t,n;return n=$element.val(),t=u.isNull(knownValue),knownValue===n||(knownValue=n,t)?void 0:(clearTimer(),nextCallback=function(){return callback.apply($element.get(0),[n,$element])},e=function(){return callbackPromise.then(function(){var e;return e=runNextCallback(),callbackPromise=u.isPromise(e)?e:u.resolvedPromise()})},u.setTimer(delay,e))},clearTimer=function(){return clearTimeout(callbackTimer)},changeEvents=up.browser.canInputEvent()?"input change":"input change keypress paste cut click propertychange",$element.on(changeEvents,check),check(),function(){return $element.off(changeEvents,check),clearTimer()})},observeForm=function(e,t,n){var r,o;return r=u.multiSelector(config.fields).find(e),o=u.map(r,function(e){return observe(e,n)}),function(){var e,t,n,r;for(r=[],t=0,n=o.length;n>t;t++)e=o[t],r.push(e());return r}},autosubmit=function(e,t){return observe(e,t,function(e,t){var n;return n=t.closest("form"),up.navigation.withActiveMark(t,function(){return submit(n)})})},resolveValidateTarget=function(e,t){var n;return n=u.option(t.target,e.attr("up-validate")),u.isBlank(n)&&(n||(n=u.detect(config.validateTargets,function(n){var r;return r=up.flow.resolveSelector(n,t.origin),e.closest(r).length}))),u.isBlank(n)&&u.error("Could not find default validation target for %o (tried ancestors %o)",e.get(0),config.validateTargets),u.isString(n)||(n=u.selectorForElement(n)),n},validate=function(e,t){var n,r,o;return n=$(e),t=u.options(t),t.origin=n,t.target=resolveValidateTarget(n,t),t.failTarget=t.target,t.history=!1,t.headers=u.option(t.headers,{}),t.validate=n.attr("name")||"__none__",t=u.merge(t,up.motion.animateOptions(t,n)),r=n.closest("form"),o=up.submit(r,t)},currentValuesForSwitch=function(e){var t,n,r;return r=void 0,e.is("input[type=checkbox]")?r=e.is(":checked")?[":checked",":present",e.val()]:[":unchecked",":blank"]:e.is("input[type=radio]")?(t=e.closest("form, body").find("input[type='radio'][name='"+e.attr("name")+"']:checked"),r=t.length?[":checked",":present",t.val()]:[":unchecked",":blank"]):(n=e.val(),r=u.isPresent(n)?[":present",n]:[":blank"]),r},currentValuesForSwitch=function(e){var t,n,r,o;return e.is("input[type=checkbox]")?e.is(":checked")?(r=e.val(),n=":checked"):n=":unchecked":e.is("input[type=radio]")?(t=e.closest("form, body").find("input[type='radio'][name='"+e.attr("name")+"']:checked"),t.length?(n=":checked",r=t.val()):n=":unchecked"):r=e.val(),o=[],u.isPresent(r)?(o.push(r),o.push(":present")):o.push(":blank"),u.isPresent(n)&&o.push(n),o},switchTargets=function(e,t){var n,r,o;return n=$(e),t=u.options(t),o=u.option(t.target,n.attr("up-switch")),u.isPresent(o)||u.error("No switch target given for %o",n.get(0)),r=currentValuesForSwitch(n),$(o).each(function(){var e,t,n,o;return e=$(this),(t=e.attr("up-hide-for"))?(t=t.split(" "),n=0===u.intersect(r,t).length):(o=(o=e.attr("up-show-for"))?o.split(" "):[":present",":checked"],n=u.intersect(r,o).length>0),e.toggle(n)})},up.on("submit","form[up-target]",function(e,t){return e.preventDefault(),submit(t)}),up.on("change","[up-validate]",function(e,t){return validate(t)}),up.on("change","[up-switch]",function(e,t){return switchTargets(t)}),up.compiler("[up-switch]",function(e){return switchTargets(e)}),up.compiler("[up-observe]",function(e){return observe(e)}),up.compiler("[up-autosubmit]",function(e){return autosubmit(e)}),up.on("up:framework:reset",reset),{knife:eval("undefined"!=typeof Knife&&null!==Knife?Knife.point:void 0),config:config,submit:submit,observe:observe,validate:validate,switchTargets:switchTargets}}(jQuery),up.submit=up.form.submit,up.observe=up.form.observe,up.autosubmit=up.form.autosubmit,up.validate=up.form.validate}.call(this),function(){up.popup=function($){var attach,autoclose,close,config,contains,coveredUrl,createFrame,currentUrl,discardHistory,ensureInViewport,isOpen,reset,setPosition,u;return u=up.util,currentUrl=void 0,coveredUrl=function(){return $(".up-popup").attr("up-covered-url")},config=u.config({openAnimation:"fade-in",closeAnimation:"fade-out",openDuration:null,closeDuration:null,openEasing:null,closeEasing:null,position:"bottom-right",history:!1}),reset=function(){return close({animation:!1}),config.reset()},setPosition=function(e,t){var n,r,o;return o=u.measure(e,{full:!0}),r=function(){switch(t){case"bottom-right":return{right:o.right,top:o.top+o.height};case"bottom-left":return{left:o.left,top:o.top+o.height};case"top-right":return{right:o.right,bottom:o.top};case"top-left":return{left:o.left,bottom:o.top};default:return u.error("Unknown position option '%s'",t)}}(),u.isFixed(e)&&(r.position="fixed"),n=$(".up-popup"),n.attr("up-position",t),n.css(r),ensureInViewport(n)},ensureInViewport=function(e){var t,n,r,o,i,a,s;if(n=u.measure(e,{full:!0}),r=null,o=null,n.right<0&&(r=-n.right),n.bottom<0&&(o=-n.bottom),n.left<0&&(r=n.left),n.top<0&&(o=n.top),r&&((i=parseInt(e.css("left")))?e.css("left",i-r):(a=parseInt(e.css("right")))&&e.css("right",a+r)),o){if(s=parseInt(e.css("top")))return e.css("top",s-o);if(t=parseInt(e.css("bottom")))return e.css("bottom",t+o)}},discardHistory=function(){var e;return e=$(".up-popup"),e.removeAttr("up-covered-url"),e.removeAttr("up-covered-title")},createFrame=function(e,t){var n;return n=u.resolvedPromise(),isOpen()&&(n=n.then(function(){return close()})),n=n.then(function(){var n;return n=u.$createElementFromSelector(".up-popup"),t.sticky&&n.attr("up-sticky",""),n.attr("up-covered-url",up.browser.url()),n.attr("up-covered-title",document.title),u.$createPlaceholder(e,n),n.appendTo(document.body),n})},isOpen=function(){return $(".up-popup").length>0},attach=function(e,t){var n,r,o,i,a;return n=$(e),n.length||u.error("Cannot attach popup to non-existing element %o",e),t=u.options(t),a=u.option(u.pluckKey(t,"url"),n.attr("up-href"),n.attr("href")),o=u.option(u.pluckKey(t,"html")),i=u.option(u.pluckKey(t,"target"),n.attr("up-popup"),"body"),t.position=u.option(t.position,n.attr("up-position"),config.position),t.animation=u.option(t.animation,n.attr("up-animation"),config.openAnimation),t.sticky=u.option(t.sticky,u.castedAttr(n,"up-sticky"),config.sticky),t.history=up.browser.canPushState()?u.option(t.history,u.castedAttr(n,"up-history"),config.history):!1,t.confirm=u.option(t.confirm,n.attr("up-confirm")),r=up.motion.animateOptions(t,n,{duration:config.openDuration,easing:config.openEasing}),up.browser.confirm(t).then(function(){var e,s;return up.bus.nobodyPrevents("up:popup:open",{url:a,message:"Opening popup"})?(t.beforeSwap=function(){return createFrame(i,t)},e=u.merge(t,{animation:!1}),s=o?up.extract(i,o,e):up.replace(i,a,e),s=s.then(function(){return setPosition(n,t.position)}),s=s.then(function(){return up.animate($(".up-popup"),t.animation,r)}),s=s.then(function(){return up.emit("up:popup:opened",{message:"Popup opened"})})):u.unresolvablePromise()})},close=function(e){var t,n,r;return t=$(".up-popup"),t.length?up.bus.nobodyPrevents("up:popup:close",{$element:t})?(e=u.options(e,{animation:config.closeAnimation,url:t.attr("up-covered-url"),title:t.attr("up-covered-title")}),n=up.motion.animateOptions(e,{duration:config.closeDuration,easing:config.closeEasing}),u.extend(e,n),currentUrl=void 0,r=up.destroy(t,e),r=r.then(function(){return up.emit("up:popup:closed",{message:"Popup closed"})})):u.unresolvablePromise():u.resolvedPromise()},autoclose=function(){return $(".up-popup").is("[up-sticky]")?void 0:(discardHistory(),close())},contains=function(e){var t;return t=$(e),t.closest(".up-popup").length>0},up.link.onAction("[up-popup]",function(e){return e.is(".up-current")?close():attach(e)}),up.on("click","body",function(e){var t;return t=$(e.target),t.closest(".up-popup").length||t.closest("[up-popup]").length?void 0:close()}),up.on("up:fragment:inserted",function(e,t){var n;if(contains(t)){if(n=t.attr("up-source"))return currentUrl=n}else if(contains(e.origin))return autoclose()}),up.bus.onEscape(function(){return close()}),up.on("click","[up-close]",function(e,t){return t.closest(".up-popup").length?(close(),e.preventDefault()):void 0}),up.on("up:framework:reset",reset),{knife:eval("undefined"!=typeof Knife&&null!==Knife?Knife.point:void 0),attach:attach,close:close,url:function(){return currentUrl},coveredUrl:coveredUrl,config:config,defaults:function(){return u.error("up.popup.defaults(...) no longer exists. Set values on he up.popup.config property instead.")},contains:contains,open:function(){return up.error("up.popup.open no longer exists. Please use up.popup.attach instead.")},source:function(){return up.error("up.popup.source no longer exists. Please use up.popup.url instead.")
3
+ },isOpen:isOpen}}(jQuery)}.call(this),function(){up.modal=function($){var animate,autoclose,close,config,contains,coveredUrl,createFrame,currentFlavor,currentUrl,discardHistory,extract,flavor,flavorDefault,flavorOverrides,follow,isOpen,markAsAnimating,open,reset,shiftElements,templateHtml,u,unshiftElements,unshifters,visit;return u=up.util,config=u.config({maxWidth:null,minWidth:null,width:null,height:null,history:!0,openAnimation:"fade-in",closeAnimation:"fade-out",openDuration:null,closeDuration:null,openEasing:null,closeEasing:null,backdropOpenAnimation:"fade-in",backdropCloseAnimation:"fade-out",closeLabel:"\xd7",flavors:{"default":{}},template:function(){return'<div class="up-modal">\n <div class="up-modal-backdrop"></div>\n <div class="up-modal-viewport">\n <div class="up-modal-dialog">\n <div class="up-modal-content"></div>\n <div class="up-modal-close" up-close>'+flavorDefault("closeLabel")+"</div>\n </div>\n </div>\n</div>"}}),currentUrl=void 0,currentFlavor=void 0,coveredUrl=function(){return $(".up-modal").attr("up-covered-url")},reset=function(){return close({animation:!1}),currentUrl=void 0,currentFlavor=void 0,config.reset()},templateHtml=function(){var e;return e=flavorDefault("template"),u.isFunction(e)?e(config):e},discardHistory=function(){var e;return e=$(".up-modal"),e.removeAttr("up-covered-url"),e.removeAttr("up-covered-title")},createFrame=function(e,t){var n;return n=u.resolvedPromise(),isOpen()&&(n=n.then(function(){return close()})),n=n.then(function(){var n,r,o;return currentFlavor=t.flavor,o=$(templateHtml()),o.attr("up-flavor",currentFlavor),t.sticky&&o.attr("up-sticky",""),o.attr("up-covered-url",up.browser.url()),o.attr("up-covered-title",document.title),r=o.find(".up-modal-dialog"),u.isPresent(t.width)&&r.css("width",t.width),u.isPresent(t.maxWidth)&&r.css("max-width",t.maxWidth),u.isPresent(t.height)&&r.css("height",t.height),n=o.find(".up-modal-content"),u.$createPlaceholder(e,n),o.appendTo(document.body)})},unshifters=[],shiftElements=function(){var e,t,n,r,o;if(!(unshifters.length>0))return u.documentHasVerticalScrollbar()?(e=$("body"),r=u.scrollbarWidth(),t=parseInt(e.css("padding-right")),n=r+t,o=u.temporaryCss(e,{"padding-right":n+"px","overflow-y":"hidden"}),unshifters.push(o),up.layout.anchoredRight().each(function(){var e,t,n,o;return e=$(this),t=parseInt(e.css("right")),n=r+t,o=u.temporaryCss(e,{right:n}),unshifters.push(o)})):void 0},unshiftElements=function(){var e,t;for(e=[];t=unshifters.pop();)e.push(t());return e},isOpen=function(){return $(".up-modal").length>0},follow=function(e,t){return t=u.options(t),t.$link=$(e),open(t)},visit=function(e,t){return t=u.options(t),t.url=e,open(t)},extract=function(e,t,n){return n=u.options(n),n.html=t,n.history=u.option(n.history,!1),n.target=e,open(n)},open=function(e){var t,n,r,o,i;return e=u.options(e),t=u.option(u.pluckKey(e,"$link"),u.nullJQuery()),i=u.option(u.pluckKey(e,"url"),t.attr("up-href"),t.attr("href")),r=u.option(u.pluckKey(e,"html")),o=u.option(u.pluckKey(e,"target"),t.attr("up-modal"),"body"),e.flavor=u.option(e.flavor,t.attr("up-flavor")),e.width=u.option(e.width,t.attr("up-width"),flavorDefault("width",e.flavor)),e.maxWidth=u.option(e.maxWidth,t.attr("up-max-width"),flavorDefault("maxWidth",e.flavor)),e.height=u.option(e.height,t.attr("up-height"),flavorDefault("height")),e.animation=u.option(e.animation,t.attr("up-animation"),flavorDefault("openAnimation",e.flavor)),e.backdropAnimation=u.option(e.backdropAnimation,t.attr("up-backdrop-animation"),flavorDefault("backdropOpenAnimation",e.flavor)),e.sticky=u.option(e.sticky,u.castedAttr(t,"up-sticky"),flavorDefault("sticky",e.flavor)),e.confirm=u.option(e.confirm,t.attr("up-confirm")),n=up.motion.animateOptions(e,t,{duration:flavorDefault("openDuration",e.flavor),easing:flavorDefault("openEasing",e.flavor)}),e.history=u.option(e.history,u.castedAttr(t,"up-history"),flavorDefault("history",e.flavor)),up.browser.canPushState()||(e.history=!1),up.browser.confirm(e).then(function(){var t,a;return up.bus.nobodyPrevents("up:modal:open",{url:i,message:"Opening modal"})?(e.beforeSwap=function(){return createFrame(o,e)},t=u.merge(e,{animation:!1}),a=r?up.extract(o,r,t):up.replace(o,i,t),a=a.then(function(){return shiftElements()}),a=a.then(function(){return animate(e.animation,e.backdropAnimation,n)}),a=a.then(function(){return up.emit("up:modal:opened",{message:"Modal opened"})})):u.unresolvablePromise()})},close=function(e){var t,n,r,o,i;return e=u.options(e),t=$(".up-modal"),t.length?up.bus.nobodyPrevents("up:modal:close",{$element:t,message:"Closing modal"})?(i=u.option(e.animation,flavorDefault("closeAnimation")),r=u.option(e.backdropAnimation,flavorDefault("backdropCloseAnimation")),n=up.motion.animateOptions(e,{duration:flavorDefault("closeDuration"),easing:flavorDefault("closeEasing")}),o=u.resolvedPromise(),o=o.then(function(){return animate(i,r,n)}),o=o.then(function(){var n;return n=u.options(u.except(e,"animation","duration","easing","delay"),{url:t.attr("up-covered-url"),title:t.attr("up-covered-title")}),currentUrl=void 0,up.destroy(t,n)}),o=o.then(function(){return unshiftElements(),currentFlavor=void 0,up.emit("up:modal:closed",{message:"Modal closed"})})):u.unresolvablePromise():u.resolvedPromise()},markAsAnimating=function(e){return null==e&&(e=!0),$(".up-modal").toggleClass("up-modal-animating",e)},animate=function(e,t,n){var r;return up.motion.isNone(e)?u.resolvedPromise():(markAsAnimating(),r=$.when(up.animate($(".up-modal-viewport"),e,n),up.animate($(".up-modal-backdrop"),t,n)),r=r.then(function(){return markAsAnimating(!1)}))},autoclose=function(){return $(".up-modal").is("[up-sticky]")?void 0:(discardHistory(),close())},contains=function(e){var t;return t=$(e),t.closest(".up-modal").length>0},flavor=function(e,t){return null==t&&(t={}),u.extend(flavorOverrides(e),t)},flavorOverrides=function(e){var t;return(t=config.flavors)[e]||(t[e]={})},flavorDefault=function(e,t){var n;return null==t&&(t=currentFlavor),t&&(n=flavorOverrides(t)[e]),u.isMissing(n)&&(n=config[e]),n},up.link.onAction("[up-modal]",function(e){return follow(e)}),up.on("click","body",function(e){var t;return t=$(e.target),t.closest(".up-modal-dialog").length||t.closest("[up-modal]").length?void 0:close()}),up.on("up:fragment:inserted",function(e,t){var n;if(contains(t)){if(n=t.attr("up-source"))return currentUrl=n}else if(!up.popup.contains(t)&&contains(e.origin))return autoclose()}),up.bus.onEscape(function(){return close()}),up.on("click","[up-close]",function(e,t){return t.closest(".up-modal").length?(close(),e.preventDefault()):void 0}),up.on("up:framework:reset",reset),{knife:eval("undefined"!=typeof Knife&&null!==Knife?Knife.point:void 0),visit:visit,follow:follow,extract:extract,open:function(){return up.error("up.modal.open no longer exists. Please use either up.modal.follow or up.modal.visit.")},close:close,url:function(){return currentUrl},coveredUrl:coveredUrl,config:config,defaults:function(){return u.error("up.modal.defaults(...) no longer exists. Set values on he up.modal.config property instead.")},contains:contains,source:function(){return up.error("up.modal.source no longer exists. Please use up.popup.url instead.")},isOpen:isOpen,flavor:flavor}}(jQuery)}.call(this),function(){up.tooltip=function(e){var t,n,r,o,u,i,a;return a=up.util,r=a.config({position:"top",openAnimation:"fade-in",closeAnimation:"fade-out"}),u=function(){return n({animation:!1}),r.reset()},i=function(e,t,n){var r,o,u;return o=a.measure(e),u=a.measure(t),r=function(){switch(n){case"top":return{left:o.left+.5*(o.width-u.width),top:o.top-u.height};case"left":return{left:o.left-u.width,top:o.top+.5*(o.height-u.height)};case"right":return{left:o.left+o.width,top:o.top+.5*(o.height-u.height)};case"bottom":return{left:o.left+.5*(o.width-u.width),top:o.top+o.height};default:return a.error("Unknown position option '%s'",n)}}(),t.attr("up-position",n),t.css(r)},o=function(e){var t;return t=a.$createElementFromSelector(".up-tooltip"),a.isGiven(e.text)?t.text(e.text):t.html(e.html),t.appendTo(document.body),t},t=function(t,u){var s,l,c,p,f,d,m;return null==u&&(u={}),s=e(t),f=a.option(u.html,s.attr("up-tooltip-html")),m=a.option(u.text,s.attr("up-tooltip")),d=a.option(u.position,s.attr("up-position"),r.position),p=a.option(u.animation,a.castedAttr(s,"up-animation"),r.openAnimation),c=up.motion.animateOptions(u,s),n(),l=o({text:m,html:f}),i(s,l,d),up.animate(l,p,c)},n=function(t){var n;return n=e(".up-tooltip"),n.length?(t=a.options(t,{animation:r.closeAnimation}),t=a.merge(t,up.motion.animateOptions(t)),up.destroy(n,t)):void 0},up.compiler("[up-tooltip], [up-tooltip-html]",function(e){return e.on("mouseenter",function(){return t(e)}),e.on("mouseleave",function(){return n()})}),up.on("click","body",function(){return n()}),up.on("up:framework:reset",n),up.bus.onEscape(function(){return n()}),up.on("up:framework:reset",u),{attach:t,close:n,open:function(){return a.error("up.tooltip.open no longer exists. Use up.tooltip.attach instead.")}}}(jQuery)}.call(this),function(){var e=[].slice;up.navigation=function(t){var n,r,o,u,i,a,s,l,c,p,f,d,m,h;return f=up.util,o=f.config({currentClasses:["up-current"]}),c=function(){return o.reset()},u=function(){var e;return e=o.currentClasses,e=e.concat(["up-current"]),e=f.uniq(e),e.join(" ")},n="up-active",r="a, [up-href]",l=function(e){return f.isPresent(e)?f.normalizeUrl(e,{search:!1,stripTrailingSlash:!0}):void 0},p=function(e){var t,n,r,o,u,i,a,s,c,p;for(s=[],i=["href","up-href","up-alias"],n=0,o=i.length;o>n;n++)if(t=i[n],c=f.presentAttr(e,t))for(p="up-alias"===t?c.split(" "):[c],r=0,u=p.length;u>r;r++)a=p[r],"#"!==a&&(a=l(a),s.push(a));return s},m=function(e){var t,n,r,o;return e=f.compact(e),r=function(e){return"*"===e.substr(-1)?n(e.slice(0,-1)):t(e)},t=function(t){return f.contains(e,t)},n=function(t){return f.detect(e,function(e){return 0===e.indexOf(t)})},o=function(e){return f.detect(e,r)},{matchesAny:o}},a=function(){var e,n;return e=m([l(up.browser.url()),l(up.modal.url()),l(up.modal.coveredUrl()),l(up.popup.url()),l(up.popup.coveredUrl())]),n=u(),f.each(t(r),function(r){var o,u;return o=t(r),u=p(o),e.matchesAny(u)?o.addClass(n):o.hasClass(n)&&0===o.closest(".up-destroying").length?o.removeClass(n):void 0})},i=function(e,n){var o;return o=t(e),n=f.options(n,{enlarge:!1}),n.enlarge?f.presence(o.parent(r))||o:o},s=function(e,t){var r;return r=i(e,t),r.addClass(n)},d=function(e,t){var r;return r=i(e,t),r.removeClass(n)},h=function(){var n,r,o,u,i,a;return u=arguments[0],r=2<=arguments.length?e.call(arguments,1):[],o=r.pop(),i=f.options(r.pop()),n=t(u),s(n,i),a=o(),f.isPromise(a)?a.always(function(){return d(n,i)}):up.warn("Expected block to return a promise, but got %o",a),a},up.on("up:fragment:inserted",function(){return a()}),up.on("up:fragment:destroyed",function(e,t){return t.is(".up-modal, .up-popup")?a():void 0}),up.on("up:framework:reset",c),{config:o,defaults:function(){return f.error("up.navigation.defaults(...) no longer exists. Set values on he up.navigation.config property instead.")},markActive:s,unmarkActive:d,withActiveMark:h}}(jQuery)}.call(this),function(){up.rails=function(e){var t,n,r,o;return r=up.util,o=function(e){return e.is("[up-follow], [up-target], [up-modal], [up-popup]")},n=function(){return r.isGiven(e.rails)},r.each(["method","confirm"],function(e){var t,u;return t="data-"+e,u="up-"+e,up.compiler("["+t+"]",function(e){var i;return n()&&o(e)?(i={},i[u]=e.attr(t),r.setMissingAttrs(e,i),e.removeAttr(t)):void 0})}),t=function(){return n()?{name:e.rails.csrfParam(),value:e.rails.csrfToken()}:void 0},{csrfField:t,isRails:n}}(jQuery)}.call(this),function(){up.boot()}.call(this);
@@ -14,6 +14,24 @@ up.flow = (($) ->
14
14
 
15
15
  u = up.util
16
16
 
17
+ ###*
18
+ Configures defaults for fragment insertion.
19
+
20
+ @property up.flow.config
21
+ @param {Boolean} [options.runInlineScripts=true]
22
+ Whether inline `<script>` tags inside inserted HTML fragments will be executed.
23
+ @param {Boolean} [options.runLinkedScripts=false]
24
+ Whether `<script src='...'>` tags inside inserted HTML fragments will fetch and execute
25
+ the linked Javascript file.
26
+ @stable
27
+ ###
28
+ config = u.config
29
+ runInlineScripts: true
30
+ runLinkedScripts: false
31
+
32
+ reset = ->
33
+ config.reset()
34
+
17
35
  setSource = (element, sourceUrl) ->
18
36
  $element = $(element)
19
37
  sourceUrl = u.normalizeUrl(sourceUrl) if u.isPresent(sourceUrl)
@@ -323,6 +341,7 @@ up.flow = (($) ->
323
341
  $old = findOldFragment(step.selector, options)
324
342
  $new = response.find(step.selector)?.first()
325
343
  if $old && $new
344
+ filterScripts($new, options)
326
345
  swapPromise = swapElements($old, $new, step.pseudoClass, step.transition, options)
327
346
  swapPromises.push(swapPromise)
328
347
  # Delay all further links in the promise chain until all fragments have been swapped
@@ -330,7 +349,6 @@ up.flow = (($) ->
330
349
  promise = promise.then(options.afterSwap) if options.afterSwap
331
350
  promise
332
351
 
333
-
334
352
  findOldFragment = (selector, options) ->
335
353
  # Prefer to replace fragments in an open popup or modal
336
354
  first(".up-popup #{selector}") ||
@@ -345,6 +363,17 @@ up.flow = (($) ->
345
363
  message += ' (avoid using IDs)'
346
364
  u.error(message, selector)
347
365
 
366
+ filterScripts = ($element, options) ->
367
+ runInlineScripts = u.option(options.runInlineScripts, config.runInlineScripts)
368
+ runLinkedScripts = u.option(options.runLinkedScripts, config.runLinkedScripts)
369
+ $scripts = u.findWithSelf($element, 'script')
370
+ for script in $scripts
371
+ $script = $(script)
372
+ isLinked = u.isPresent($script.attr('src'))
373
+ isInline = not isLinked
374
+ unless (isLinked && runLinkedScripts) || (isInline && runInlineScripts)
375
+ $script.remove()
376
+
348
377
  parseResponse = (html, options) ->
349
378
  # jQuery cannot construct transient elements that contain <html> or <body> tags
350
379
  htmlElement = u.createElementFromHtml(html)
@@ -814,6 +843,8 @@ up.flow = (($) ->
814
843
  setSource($body, up.browser.url())
815
844
  hello($body)
816
845
 
846
+ up.on 'up:framework:reset', reset
847
+
817
848
  knife: eval(Knife?.point)
818
849
  replace: replace
819
850
  reload: reload
@@ -823,6 +854,7 @@ up.flow = (($) ->
823
854
  source: source
824
855
  resolveSelector: resolveSelector
825
856
  hello: hello
857
+ config: config
826
858
 
827
859
  )(jQuery)
828
860
 
@@ -76,7 +76,7 @@ up.form = (($) ->
76
76
  Successful form submissions will add a history entry and change the browser's
77
77
  location bar if the form either uses the `GET` method or the response redirected
78
78
  to another page (this requires the `unpoly-rails` gem).
79
- If want to prevent history changes in any case, set this to `false`.
79
+ If you want to prevent history changes in any case, set this to `false`.
80
80
  If you pass a `String`, it is used as the URL for the browser history.
81
81
  @param {String} [options.transition='none']
82
82
  The transition to use when a successful form submission updates the `options.target` selector.
@@ -543,7 +543,13 @@ up.form = (($) ->
543
543
  @param {String} [up-fail-transition]
544
544
  The animation to use when the form is replaced after a failed submission.
545
545
  @param [up-history]
546
- Set this to `'false'` to prevent the current URL from being updated.
546
+ Whether to push a browser history entry after a successful form submission.
547
+
548
+ By default the form's target URL is used. If the form redirects to another URL,
549
+ the redirect target will be used.
550
+
551
+ Set this to `'false'` to prevent the URL bar from being updated.
552
+ Set this to a URL string to update the history with the given URL.
547
553
  @param {String} [up-method]
548
554
  The HTTP method to be used to submit the form (`get`, `post`, `put`, `delete`, `patch`).
549
555
  Alternately you can use an attribute `data-method`
@@ -332,7 +332,10 @@ up.link = (($) ->
332
332
  or never use the cache (`false`)
333
333
  or make an educated guess (`undefined`).
334
334
  @param [up-history]
335
- Set this to `'false'` to prevent the current URL from being updated.
335
+ Whether to push an entry to the browser history when following the link.
336
+
337
+ Set this to `'false'` to prevent the URL bar from being updated.
338
+ Set this to a URL string to update the history with the given URL.
336
339
  @stable
337
340
  ###
338
341
  onAction '[up-target]', ($link) ->
@@ -392,8 +395,11 @@ up.link = (($) ->
392
395
  @param {String} [up-confirm]
393
396
  A message that will be displayed in a cancelable confirmation dialog
394
397
  before the link is followed.
395
- @param [up-history]
396
- Set this to `'false'` to prevent the current URL from being updated.
398
+ @param {String} [up-history]
399
+ Whether to push an entry to the browser history when following the link.
400
+
401
+ Set this to `'false'` to prevent the URL bar from being updated.
402
+ Set this to a URL string to update the history with the given URL.
397
403
  @param [up-restore-scroll='false']
398
404
  Whether to restore the scroll position of all viewports
399
405
  within the response.
@@ -2,9 +2,16 @@
2
2
  Logging
3
3
  =======
4
4
 
5
- Elaborate wrappers around `window.console`.
6
- Should only used internally since they prefix `ᴜᴘ` to each
7
- printed message.
5
+ Unpoly can print debugging information to the developer console, e.g.:
6
+
7
+ - Which [events](/up.bus) are called
8
+ - When we're [making requests to the network](/up.proxy)
9
+ - Which [compilers](/up.syntax) are applied to which elements
10
+
11
+ You can activate logging by calling [`up.log.enable()`](/up.log.enable).
12
+ The output can be configured using the [`up.log.config`](/up.log.config) property.
13
+
14
+ @class up.log
8
15
  ###
9
16
  up.log = (($) ->
10
17
 
@@ -130,9 +137,9 @@ up.log = (($) ->
130
137
  ###*
131
138
  Prevents future Unpoly events from printing vast amounts of debugging information to the developer console.
132
139
 
133
- Errors will still be printed.
140
+ Errors will still be printed, even with logging disabled.
134
141
 
135
- @function up.log.enable
142
+ @function up.log.disable
136
143
  @stable
137
144
  ###
138
145
  disable = ->
@@ -56,7 +56,7 @@ To disable this behavior, give the opening link an `up-sticky` attribute:
56
56
  <a href="/settings" up-modal=".options" up-sticky>Settings</a>
57
57
 
58
58
 
59
- @class up.modal
59
+ @class up.modal
60
60
  ###
61
61
  up.modal = (($) ->
62
62
 
@@ -621,8 +621,11 @@ up.modal = (($) ->
621
621
  @param {String} [up-width]
622
622
  The width of the dialog in pixels.
623
623
  By [default](/up.modal.config) the dialog will grow to fit its contents.
624
- @param {String} [up-history="true"]
625
- Whether to add a browser history entry for the modal's source URL.
624
+ @param {String} [up-history]
625
+ Whether to push an entry to the browser history for the modal's source URL.
626
+
627
+ Set this to `'false'` to prevent the URL bar from being updated.
628
+ Set this to a URL string to update the history with the given URL.
626
629
 
627
630
  @stable
628
631
  ###
@@ -367,6 +367,12 @@ up.popup = (($) ->
367
367
  @param [up-sticky]
368
368
  If set to `true`, the popup remains
369
369
  open even if the page changes in the background.
370
+ @param {String} [up-history='false']
371
+ Whether to push an entry to the browser history for the popup's source URL.
372
+
373
+ Set this to `'false'` to prevent the URL bar from being updated.
374
+ Set this to a URL string to update the history with the given URL.
375
+
370
376
  @stable
371
377
  ###
372
378
  up.link.onAction('[up-popup]', ($link) ->
@@ -283,7 +283,7 @@ up.proxy = (($) ->
283
283
  slowDelayTimer = u.setTimer(config.slowDelay, emission)
284
284
 
285
285
  ###*
286
- This event is [emitted]/(up.emit) when [AJAX requests](/up.ajax)
286
+ This event is [emitted](/up.emit) when [AJAX requests](/up.ajax)
287
287
  are taking long to finish.
288
288
 
289
289
  By default Unpoly will wait 300 ms for an AJAX request to finish
@@ -4,6 +4,6 @@ module Unpoly
4
4
  # The current version of the unpoly-rails gem.
5
5
  # This version number is also used for releases of the Unpoly
6
6
  # frontend code.
7
- VERSION = '0.26.0'
7
+ VERSION = '0.26.1'
8
8
  end
9
9
  end
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- unpoly-rails (0.26.0)
4
+ unpoly-rails (0.26.1)
5
5
  rails (>= 3)
6
6
 
7
7
  GEM
@@ -306,32 +306,117 @@ describe 'up.flow', ->
306
306
  expect($('.after')).toHaveText('old-afternew-after')
307
307
  done()
308
308
 
309
- it 'executes only those script-tags in the response that get inserted into the DOM', (done) ->
310
- window.scriptTagExecuted = jasmine.createSpy('scriptTagExecuted')
309
+ describe 'execution of script tags', ->
311
310
 
312
- @responseText =
313
- """
314
- <div class="before">
315
- new-before
316
- <script type="text/javascript">
317
- window.scriptTagExecuted('before')
318
- </script>
319
- </div>
320
- <div class="middle">
321
- new-middle
322
- <script type="text/javascript">
323
- window.scriptTagExecuted('middle')
324
- </script>
325
- </div>
326
- """
311
+ beforeEach ->
312
+ window.scriptTagExecuted = jasmine.createSpy('scriptTagExecuted')
327
313
 
328
- promise = up.replace('.middle', '/path')
329
- @respond()
314
+ describe 'inline scripts', ->
315
+
316
+ it 'executes only those script-tags in the response that get inserted into the DOM', (done) ->
317
+ @responseText =
318
+ """
319
+ <div class="before">
320
+ new-before
321
+ <script type="text/javascript">
322
+ window.scriptTagExecuted('before')
323
+ </script>
324
+ </div>
325
+ <div class="middle">
326
+ new-middle
327
+ <script type="text/javascript">
328
+ window.scriptTagExecuted('middle')
329
+ </script>
330
+ </div>
331
+ """
332
+
333
+ promise = up.replace('.middle', '/path')
334
+ @respond()
335
+
336
+ promise.then ->
337
+ expect(window.scriptTagExecuted).not.toHaveBeenCalledWith('before')
338
+ expect(window.scriptTagExecuted).toHaveBeenCalledWith('middle')
339
+ done()
340
+
341
+ it 'does not execute script-tags if up.flow.config.runInlineScripts is set to false', (done) ->
342
+ up.flow.config.runInlineScripts = false
343
+
344
+ @responseText = """
345
+ <div class="middle">
346
+ new-middle
347
+ <script type="text/javascript">
348
+ window.scriptTagExecuted()
349
+ </script>
350
+ </div>
351
+ """
352
+
353
+ promise = up.replace('.middle', '/path')
354
+ @respond()
355
+
356
+ promise.then ->
357
+ expect(window.scriptTagExecuted).not.toHaveBeenCalled()
358
+ done()
359
+
360
+ describe 'linked scripts', ->
361
+
362
+ beforeEach ->
363
+ # Add a cache-buster to each path so the browser cache is guaranteed to be irrelevant
364
+ @linkedScriptPath = "/assets/fixtures/linked_script.js?cache-buster=#{Math.random().toString()}"
365
+
366
+ it 'does not execute linked scripts to prevent re-inclusion of javascript inserted before the closing body tag', (done) ->
367
+ @responseText = """
368
+ <div class="middle">
369
+ new-middle
370
+ <script type="text/javascript" src="#{@linkedScriptPath}">
371
+ alert("inside")
372
+ </script>
373
+ </div>
374
+ """
375
+
376
+ promise = up.replace('.middle', '/path')
377
+ @respond()
378
+
379
+ promise.then =>
380
+
381
+ # Must respond to this request, since jQuery makes them async: false
382
+ if u.contains(@lastRequest().url, 'linked_script')
383
+ @respondWith('window.scriptTagExecuted()')
384
+
385
+ # Now wait for jQuery to parse out <script> tags and fetch the linked scripts.
386
+ # This actually happens with jasmine_ajax's fake XHR object.
387
+ u.nextFrame =>
388
+ expect(jasmine.Ajax.requests.count()).toEqual(1)
389
+ expect(@lastRequest().url).not.toContain('linked_script')
390
+ expect(window.scriptTagExecuted).not.toHaveBeenCalled()
391
+ done()
392
+
393
+ it 'does execute linked scripts if up.flow.config.runLinkedScripts is set to true', (done) ->
394
+ up.flow.config.runLinkedScripts = true
395
+
396
+ @responseText = """
397
+ <div class="middle">
398
+ new-middle
399
+ <script type="text/javascript" src='#{@linkedScriptPath}'>
400
+ </script>
401
+ </div>
402
+ """
403
+
404
+ promise = up.replace('.middle', '/path')
405
+ @respond()
406
+
407
+ promise.then =>
408
+
409
+ # Must respond to this request, since jQuery makes them async: false
410
+ if u.contains(@lastRequest().url, 'linked_script')
411
+ @respondWith('window.scriptTagExecuted()')
412
+
413
+ # Now wait for jQuery to parse out <script> tags and fetch the linked scripts.
414
+ # This actually happens with jasmine_ajax's fake XHR object.
415
+ u.nextFrame =>
416
+ expect(jasmine.Ajax.requests.count()).toEqual(2)
417
+ expect(@lastRequest().url).toContain('linked_script')
418
+ done()
330
419
 
331
- promise.then ->
332
- expect(window.scriptTagExecuted).not.toHaveBeenCalledWith('before')
333
- expect(window.scriptTagExecuted).toHaveBeenCalledWith('middle')
334
- done()
335
420
 
336
421
  describe 'with { restoreScroll: true } option', ->
337
422
 
@@ -31,11 +31,11 @@ describe 'up.history', ->
31
31
 
32
32
  it 'does not set an up-href attribute if there is no previous URL'
33
33
 
34
- describeFallback 'canPushState', ->
34
+ describeFallback 'canPushState', ->
35
35
 
36
- it 'does not change the element', ->
37
- $element = up.hello(affix('a[href="/three"][up-back]').text('text'))
38
- expect($element.attr('up-href')).toBeUndefined()
36
+ it 'does not change the element', ->
37
+ $element = up.hello(affix('a[href="/three"][up-back]').text('text'))
38
+ expect($element.attr('up-href')).toBeUndefined()
39
39
 
40
40
  describe 'scroll restauration', ->
41
41
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: unpoly-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.26.0
4
+ version: 0.26.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Henning Koch
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-03 00:00:00.000000000 Z
11
+ date: 2016-06-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -78,6 +78,7 @@ files:
78
78
  - design/homepage.txt
79
79
  - design/positioning.txt
80
80
  - design/rename.txt
81
+ - design/unpoly errors.txt
81
82
  - dist/unpoly-bootstrap3.css
82
83
  - dist/unpoly-bootstrap3.js
83
84
  - dist/unpoly-bootstrap3.min.css