jpscontracting/html_site/assets/scripts/isotope.min.js

3 lines
71 KiB
JavaScript
Raw Normal View History

(function(t){"use strict";function e(t){return RegExp("(^|\\s+)"+t+"(\\s+|$)")}function i(t,e){var i=o(t,e)?r:n;i(t,e)}var o,n,r;"classList"in document.documentElement?(o=function(t,e){return t.classList.contains(e)},n=function(t,e){t.classList.add(e)},r=function(t,e){t.classList.remove(e)}):(o=function(t,i){return e(i).test(t.className)},n=function(t,e){o(t,e)||(t.className=t.className+" "+e)},r=function(t,i){t.className=t.className.replace(e(i)," ")});var s={hasClass:o,addClass:n,removeClass:r,toggleClass:i,has:o,add:n,remove:r,toggle:i};"function"==typeof define&&define.amd?define(s):"object"==typeof exports?module.exports=s:t.classie=s})(window),function(t){"use strict";function e(e){var i=t.event;return i.target=i.target||i.srcElement||e,i}var i=document.documentElement,o=function(){};i.addEventListener?o=function(t,e,i){t.addEventListener(e,i,!1)}:i.attachEvent&&(o=function(t,i,o){t[i+o]=o.handleEvent?function(){var i=e(t);o.handleEvent.call(o,i)}:function(){var i=e(t);o.call(t,i)},t.attachEvent("on"+i,t[i+o])});var n=function(){};i.removeEventListener?n=function(t,e,i){t.removeEventListener(e,i,!1)}:i.detachEvent&&(n=function(t,e,i){t.detachEvent("on"+e,t[e+i]);try{delete t[e+i]}catch(o){t[e+i]=void 0}});var r={bind:o,unbind:n};"function"==typeof define&&define.amd?define(r):"object"==typeof exports?module.exports=r:t.eventie=r}(this),function(t){"use strict";function e(t){"function"==typeof t&&(e.isReady?t():r.push(t))}function i(t){var i="readystatechange"===t.type&&"complete"!==n.readyState;if(!e.isReady&&!i){e.isReady=!0;for(var o=0,s=r.length;s>o;o++){var a=r[o];a()}}}function o(o){return o.bind(n,"DOMContentLoaded",i),o.bind(n,"readystatechange",i),o.bind(t,"load",i),e}var n=t.document,r=[];e.isReady=!1,"function"==typeof define&&define.amd?(e.isReady="function"==typeof requirejs,define(["eventie/eventie"],o)):t.docReady=o(t.eventie)}(this),function(t){"use strict";function e(t){if(t){if("string"==typeof o[t])return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var e,n=0,r=i.length;r>n;n++)if(e=i[n]+t,"string"==typeof o[e])return e}}var i="Webkit Moz ms Ms O".split(" "),o=document.documentElement.style;"function"==typeof define&&define.amd?define(function(){return e}):"object"==typeof exports?module.exports=e:t.getStyleProperty=e}(window),function(t){"use strict";function e(t){var e=parseFloat(t),i=-1===t.indexOf("%")&&!isNaN(e);return i&&e}function i(){for(var t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},e=0,i=s.length;i>e;e++){var o=s[e];t[o]=0}return t}function o(t){function o(t){if("string"==typeof t&&(t=document.querySelector(t)),t&&"object"==typeof t&&t.nodeType){var o=r(t);if("none"===o.display)return i();var n={};n.width=t.offsetWidth,n.height=t.offsetHeight;for(var c=n.isBorderBox=!(!h||!o[h]||"border-box"!==o[h]),p=0,f=s.length;f>p;p++){var l=s[p],d=o[l];d=a(t,d);var m=parseFloat(d);n[l]=isNaN(m)?0:m}var y=n.paddingLeft+n.paddingRight,g=n.paddingTop+n.paddingBottom,v=n.marginLeft+n.marginRight,b=n.marginTop+n.marginBottom,w=n.borderLeftWidth+n.borderRightWidth,x=n.borderTopWidth+n.borderBottomWidth,I=c&&u,_=e(o.width);_!==!1&&(n.width=_+(I?0:y+w));var L=e(o.height);return L!==!1&&(n.height=L+(I?0:g+x)),n.innerWidth=n.width-(y+w),n.innerHeight=n.height-(g+x),n.outerWidth=n.width+v,n.outerHeight=n.height+b,n}}function a(t,e){if(n||-1===e.indexOf("%"))return e;var i=t.style,o=i.left,r=t.runtimeStyle,s=r&&r.left;return s&&(r.left=t.currentStyle.left),i.left=e,e=i.pixelLeft,i.left=o,s&&(r.left=s),e}var u,h=t("boxSizing");return function(){if(h){var t=document.createElement("div");t.style.width="200px",t.style.padding="1px 2px 3px 4px",t.style.borderStyle="solid",t.style.borderWidth="1px 2px 3px 4px",t.style[h]="border-box";var i=document.body||document.documentElement;i.appendChild(t);var o=r(t);u=200===e(o.width),i.removeChild(t)}}(),o}var n=t.getComputedStyle,r=n?function(t){return n(t,null)}:function(t){return t.currentStyle},s=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWi
for(var e in c.modes)this._initLayoutMode(e)},f.prototype.reloadItems=function(){this.itemGUID=0,t.prototype.reloadItems.call(this)},f.prototype._itemize=function(){for(var e=t.prototype._itemize.apply(this,arguments),i=0,o=e.length;o>i;i++){var n=e[i];n.id=this.itemGUID++}return this._updateItemsSortData(e),e},f.prototype._initLayoutMode=function(t){var i=c.modes[t],o=this.options[t]||{};this.options[t]=i.options?e(i.options,o):o,this.modes[t]=new i(this)},f.prototype.layout=function(){return!this._isLayoutInited&&this.options.isInitLayout?(this.arrange(),void 0):(this._layout(),void 0)},f.prototype._layout=function(){var t=this._getIsInstant();this._resetLayout(),this._manageStamps(),this.layoutItems(this.filteredItems,t),this._isLayoutInited=!0},f.prototype.arrange=function(t){this.option(t),this._getIsInstant(),this.filteredItems=this._filter(this.items),this._sort(),this._layout()},f.prototype._init=f.prototype.arrange,f.prototype._getIsInstant=function(){var t=void 0!==this.options.isLayoutInstant?this.options.isLayoutInstant:!this._isLayoutInited;return this._isInstant=t,t},f.prototype._filter=function(t){function e(){p.reveal(n),p.hide(r)}var i=this.options.filter;i=i||"*";for(var o=[],n=[],r=[],s=this._getFilterTest(i),a=0,u=t.length;u>a;a++){var h=t[a];if(!h.isIgnored){var c=s(h);c&&o.push(h),c&&h.isHidden?n.push(h):c||h.isHidden||r.push(h)}}var p=this;return this._isInstant?this._noTransition(e):e(),o},f.prototype._getFilterTest=function(t){return s&&this.options.isJQueryFiltering?function(e){return s(e.element).is(t)}:"function"==typeof t?function(e){return t(e.element)}:function(e){return r(e.element,t)}},f.prototype.updateSortData=function(t){this._getSorters(),t=o(t);var e=this.getItems(t);e=e.length?e:this.items,this._updateItemsSortData(e)},f.prototype._getSorters=function(){var t=this.options.getSortData;for(var e in t){var i=t[e];this._sorters[e]=l(i)}},f.prototype._updateItemsSortData=function(t){for(var e=0,i=t.length;i>e;e++){var o=t[e];o.updateSortData()}};var l=function(){function t(t){if("string"!=typeof t)return t;var i=a(t).split(" "),o=i[0],n=o.match(/^\[(.+)\]$/),r=n&&n[1],s=e(r,o),u=f.sortDataParsers[i[1]];return t=u?function(t){return t&&u(s(t))}:function(t){return t&&s(t)}}function e(t,e){var i;return i=t?function(e){return e.getAttribute(t)}:function(t){var i=t.querySelector(e);return i&&h(i)}}return t}();f.sortDataParsers={parseInt:function(t){return parseInt(t,10)},parseFloat:function(t){return parseFloat(t)}},f.prototype._sort=function(){var t=this.options.sortBy;if(t){var e=[].concat.apply(t,this.sortHistory),i=p(e,this.options.sortAscending);this.filteredItems.sort(i),t!==this.sortHistory[0]&&this.sortHistory.unshift(t)}},f.prototype._mode=function(){var t=this.options.layoutMode,e=this.modes[t];if(!e)throw Error("No layout mode: "+t);return e.options=this.options[t],e},f.prototype._resetLayout=function(){t.prototype._resetLayout.call(this),this._mode()._resetLayout()},f.prototype._getItemLayoutPosition=function(t){return this._mode()._getItemLayoutPosition(t)},f.prototype._manageStamp=function(t){this._mode()._manageStamp(t)},f.prototype._getContainerSize=function(){return this._mode()._getContainerSize()},f.prototype.needsResizeLayout=function(){return this._mode().needsResizeLayout()},f.prototype.appended=function(t){var e=this.addItems(t);if(e.length){var i=this._filterRevealAdded(e);this.filteredItems=this.filteredItems.concat(i)}},f.prototype.prepended=function(t){var e=this._itemize(t);if(e.length){var i=this.items.slice(0);this.items=e.concat(i),this._resetLayout(),this._manageStamps();var o=this._filterRevealAdded(e);this.layoutItems(i),this.filteredItems=o.concat(this.filteredItems)}},f.prototype._filterRevealAdded=function(t){var e=this._noTransition(function(){return this._filter(t)});return this.layoutItems(e,!0),this.reveal(e),t},f.prototype.insert=function(t){var e=this.addItems(t);if(e.length){var i,o,n=e.length;for(i=0;n>i;i++)o=e[i],this.element.appendChild(o.element);var r=this._filter(e);for(this._noTransition(function(){this.hide(r)}),i=0;n>i;i++)e[i].isLayoutIn
var i="$container.isotope({ "+t+": "+e+" })";i=hljs.highlight("js",i).value,this.html(i)},n.prototype.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},n.prototype.onscroll=function(){var e=t.pageYOffset>=this.originalY;e!==this.isFixed&&(classie.toggle(this.element,"is-fixed"),this.isFixed=e)},r(n,"onscroll",50)}(window,jQuery),function(t){"use strict";var e=t.ID,i=getStyleProperty("transition"),o={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"otransitionend",transition:"transitionend"}[i];e.appendix=function(){(function(){var t=$("#animate-item-size .isotope").isotope({masonry:{columnWidth:60}});t.on("click",".item",function(){$(this).toggleClass("is-expanded"),t.isotope("layout")})})(),function(){var t=$("#animate-item-size-responsive .isotope").isotope({itemSelector:".item",masonry:{columnWidth:".grid-sizer"}});t.on("click",".item-content",function(){var e=this,n=getSize(e);e.style[i]="none",e.style.width=n.width+"px",e.style.height=n.height+"px";var r=e.parentNode;classie.toggleClass(r,"is-expanded");var s=e.offsetWidth;if(e.style[i]="",i){var a=function(){e.style.width="",e.style.height="",e.removeEventListener(o,a,!1)};e.addEventListener(o,a,!1)}var u=getSize(r);e.style.width=u.width+"px",e.style.height=u.height+"px",s=null,t.isotope("layout")})}()}}(window),function(t,e){"use strict";function i(){var t=new Date,e=t.getMinutes();e=10>e?"0"+e:e;var i=t.getSeconds();return i=10>i?"0"+i:i,[t.getHours(),e,i].join(":")}function o(t){n.notify(t+" at "+i(),!0)}var n=t.ID;n.events=function(){(function(){var t=e("#layout-complete-demo .isotope").isotope({masonry:{columnWidth:50}});t.isotope("on","layoutComplete",function(t,e){o("Isotope layout completed on "+e.length+" items")}),t.on("click",".mini-item",function(){e(this).toggleClass("gigante"),t.isotope("layout")})})(),function(){var t=e("#remove-complete-demo .isotope").isotope({masonry:{columnWidth:50}});t.isotope("on","removeComplete",function(t,e){o("Removed "+e.length+" items")}),t.on("click",".mini-item",function(){t.isotope("remove",this).isotope("layout")})}()}}(window,jQuery),function(t,e){"use strict";var i=t.ID;i.filtering=function(){(function(){var t=e("#filtering-demo .isotope").isotope({itemSelector:".element-item",layoutMode:"fitRows",transitionDuration:"0.6s"}),i={numberGreaterThan50:function(){var t=e(this).find(".number").text();return parseInt(t,10)>50},ium:function(){var t=e(this).find(".name").text();return t.match(/ium$/)}},o={numberGreaterThan50:"function() {\n var number = $(this).find('.number').text();\n return parseInt( number, 10 ) > 50;\n}",ium:"function() {\n var name = $(this).find('.name').text();\n return name.match( /ium$/ );\n}"},n=e("#filtering-demo .code-display code");e("#filtering-demo .button-group").on("click","button",function(){var r=e(this).attr("data-filter"),s=i[r]||r,a=o[r]||r;t.isotope({filter:s}),n.displayIsotopeCode("filter",a)})})(),function(){var t=e("#combination-filters-demo"),i=t.find(".isotope").isotope({itemSelector:".color-shape",columnWidth:80,transitionDuration:"0.6s"}),o=t.find("pre code"),n={};t.on("click",".button",function(){var t=e(this),r=t.parents(".button-group"),s=r.attr("data-filter-group");n[s]=t.attr("data-filter");var a="";for(var u in n)a+=n[u];i.isotope({filter:a}),o.displayIsotopeCode("filter",a)})}()}}(window,jQuery),function(t,e){"use strict";var i=t.ID;i.index=function(){(function(){var t=e("#hero .isotope").isotope({itemSelector:".element-item",layoutMode:"fitRows",transitionDuration:"0.6s",getSortData:{name:".name",symbol:".symbol",number:".number parseInt",category:"[data-category]",weight:function(t){var i=e(t).find(".weight").text();return parseFloat(i.replace(/[\(\)]/g,""))}}}),i={numberGreaterThan50:function(){var t=e(this).find(".number").text();return parseInt(t,10)>50},ium:function(){var t=e(this).find(".name").text();return t.match(/ium$/)}},o={numberGreaterThan50:"function() {\n var number = $(this).find('.number').text();\n return parseInt( number, 10 ) > 50;\n}",ium:"function() {\n var name = $(this).find('.name').text();\n