Build mobile apps with simple HTML, CSS, and JS components. http://goratchet.com/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12 lines
12 KiB

/*!
* =====================================================
* Ratchet v2.0.2 (http://goratchet.com)
10 years ago
* Copyright 2015 Connor Sears
* Licensed under MIT (https://github.com/twbs/ratchet/blob/master/LICENSE)
*
* v2.0.2 designed by @connors.
* =====================================================
*/
9 years ago
!function(){"use strict";window.CustomEvent||(window.CustomEvent=function(a,b){var c=document.createEvent("CustomEvent");return c.initCustomEvent(a,b.bubbles,b.cancelable,b.detail),c}),"undefined"==typeof window.RATCHET&&(window.RATCHET={}),window.RATCHET.getBrowserCapabilities=function(){var a=window.getComputedStyle(document.documentElement,""),b=(Array.prototype.slice.call(a).join("").match(/-(moz|webkit|ms)-/)||""===a.OLink&&["","o"])[1];return{prefix:"-"+b+"-",transform:b[0].toUpperCase()+b.substr(1)+"Transform"}}(),window.RATCHET.getTransitionEnd=function(){var a=document.createElement("ratchet"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return b[c];return b.transition}()}(),!function(){"use strict";var a=new CustomEvent("modalOpen",{bubbles:!0,cancelable:!0}),b=new CustomEvent("modalClose",{bubbles:!0,cancelable:!0}),c=function(a){for(var b,c=document.querySelectorAll("a");a&&a!==document;a=a.parentNode)for(b=c.length;b--;)if(c[b]===a)return a},d=function(a){var b=c(a.target);return b&&b.hash?document.querySelector(b.hash):void 0};window.addEventListener("touchend",function(c){var e=d(c);if(e&&e.classList.contains("modal")){var f=a;e.classList.contains("active")&&(f=b),e.dispatchEvent(f),e.classList.toggle("active"),c.preventDefault()}})}(),!function(){"use strict";var a,b=function(a){for(var b,c=document.querySelectorAll("a");a&&a!==document;a=a.parentNode)for(b=c.length;b--;)if(c[b]===a)return a},c=function(){a.style.display="none",a.removeEventListener(window.RATCHET.getTransitionEnd,c)},d=function(){var b=document.createElement("div");return b.classList.add("backdrop"),b.addEventListener("touchend",function(){a.addEventListener(window.RATCHET.getTransitionEnd,c),a.classList.remove("visible"),a.parentNode.removeChild(d)}),b}(),e=function(c){var d=b(c.target);if(d&&d.hash&&!(d.hash.indexOf("/")>0)){try{a=document.querySelector(d.hash)}catch(e){a=null}if(null!==a&&a&&a.classList.contains("popover"))return a}},f=function(a){var b=e(a);b&&(b.style.display="block",b.offsetHeight,b.classList.add("visible"),b.parentNode.appendChild(d))};window.addEventListener("touchend",f)}(),!function(){"use strict";function a(){f[p.id]=document.body.cloneNode(!0)}var b,c=function(){},d=20,e=sessionStorage,f={},g={"slide-in":"slide-out","slide-out":"slide-in",fade:"fade"},h={bartab:".bar-tab",barnav:".bar-nav",barfooter:".bar-footer",barheadersecondary:".bar-header-secondary"},i=function(a,b){p.id=a.id,b&&(a=l(a.id)),e[a.id]=JSON.stringify(a),window.history.replaceState(a.id,a.title,a.url)},j=function(){var a=p.id,b=JSON.parse(e.cacheForwardStack||"[]"),c=JSON.parse(e.cacheBackStack||"[]");for(c.push(a);b.length;)delete e[b.shift()];for(;c.length>d;)delete e[c.shift()];l(p.id).url&&window.history.pushState(null,"",l(p.id).url),e.cacheForwardStack=JSON.stringify(b),e.cacheBackStack=JSON.stringify(c)},k=function(a,b){var c="forward"===b,d=JSON.parse(e.cacheForwardStack||"[]"),f=JSON.parse(e.cacheBackStack||"[]"),g=c?f:d,h=c?d:f;p.id&&g.push(p.id),h.pop(),e.cacheForwardStack=JSON.stringify(d),e.cacheBackStack=JSON.stringify(f)},l=function(a){return JSON.parse(e[a]||null)||{}},m=function(a){var c=u(a.target);if(!(!c||a.which>1||a.metaKey||a.ctrlKey||b||location.protocol!==c.protocol||location.host!==c.host||!c.hash&&/#/.test(c.href)||c.hash&&c.href.replace(c.hash,"")===location.href.replace(location.hash,"")||"push"===c.getAttribute("data-ignore")))return c},n=function(a){var b=m(a);b&&(a.preventDefault(),p({url:b.href,hash:b.hash,timeout:b.getAttribute("data-timeout"),transition:b.getAttribute("data-transition")}))},o=function(a){var b,c,d,i,j,m,n,o,q=a.state;if(q&&e[q]){if(j=p.id<q?"forward":"back",k(q,j),d=l(q),i=f[q],d.title&&(document.title=d.title),"back"===j?(n=JSON.parse("back"===j?e.cacheForwardStack:e.cacheBackStack),o=l(n[n.length-1])):o=d,"back"===j&&!o.id)return p.id=q;if(m="back"===j?g[o.transition]:o.transition,!i)return p({id:d.id,url:d.url,title:d.title,timeout:d.timeout,transition
//# sourceMappingURL=ratchet.min.js.map