{I" class:ETI"ProcessedAsset; FI"logical_path; TI"&foundation/foundation.clearing.js; FI" pathname; TI"…/Users/aaron/.rvm/gems/ruby-2.1.4@push_type/gems/foundation-rails-5.4.5.0/vendor/assets/javascripts/foundation/foundation.clearing.js; FI"content_type; TI"application/javascript; TI" mtime; Tl+ ‚TI"length; TiÛAI"digest; TI"%4bafa90231e3062dba5ed820d98d90ff; FI"source; TI"ÛA;(function ($, window, document, undefined) { 'use strict'; Foundation.libs.clearing = { name : 'clearing', version: '5.4.5', settings : { templates : { viewing : '×' + '
' }, // comma delimited list of selectors that, on click, will close clearing, // add 'div.clearing-blackout, div.visible-img' to close on background click close_selectors : '.clearing-close, div.clearing-blackout', // Default to the entire li element. open_selectors : '', // Image will be skipped in carousel. skip_selector : '', touch_label : '', // event initializers and locks init : false, locked : false }, init : function (scope, method, options) { var self = this; Foundation.inherit(this, 'throttle image_loaded'); this.bindings(method, options); if (self.S(this.scope).is('[' + this.attr_name() + ']')) { this.assemble(self.S('li', this.scope)); } else { self.S('[' + this.attr_name() + ']', this.scope).each(function () { self.assemble(self.S('li', this)); }); } }, events : function (scope) { var self = this, S = self.S, $scroll_container = $('.scroll-container'); if ($scroll_container.length > 0) { this.scope = $scroll_container; } S(this.scope) .off('.clearing') .on('click.fndtn.clearing', 'ul[' + this.attr_name() + '] li ' + this.settings.open_selectors, function (e, current, target) { var current = current || S(this), target = target || current, next = current.next('li'), settings = current.closest('[' + self.attr_name() + ']').data(self.attr_name(true) + '-init'), image = S(e.target); e.preventDefault(); if (!settings) { self.init(); settings = current.closest('[' + self.attr_name() + ']').data(self.attr_name(true) + '-init'); } // if clearing is open and the current image is // clicked, go to the next image in sequence if (target.hasClass('visible') && current[0] === target[0] && next.length > 0 && self.is_open(current)) { target = next; image = S('img', target); } // set current and target to the clicked li if not otherwise defined. self.open(image, current, target); self.update_paddles(target); }) .on('click.fndtn.clearing', '.clearing-main-next', function (e) { self.nav(e, 'next') }) .on('click.fndtn.clearing', '.clearing-main-prev', function (e) { self.nav(e, 'prev') }) .on('click.fndtn.clearing', this.settings.close_selectors, function (e) { Foundation.libs.clearing.close(e, this) }); $(document).on('keydown.fndtn.clearing', function (e) { self.keydown(e) }); S(window).off('.clearing').on('resize.fndtn.clearing', function () { self.resize() }); this.swipe_events(scope); }, swipe_events : function (scope) { var self = this, S = self.S; S(this.scope) .on('touchstart.fndtn.clearing', '.visible-img', function(e) { if (!e.touches) { e = e.originalEvent; } var data = { start_page_x: e.touches[0].pageX, start_page_y: e.touches[0].pageY, start_time: (new Date()).getTime(), delta_x: 0, is_scrolling: undefined }; S(this).data('swipe-transition', data); e.stopPropagation(); }) .on('touchmove.fndtn.clearing', '.visible-img', function(e) { if (!e.touches) { e = e.originalEvent; } // Ignore pinch/zoom events if(e.touches.length > 1 || e.scale && e.scale !== 1) return; var data = S(this).data('swipe-transition'); if (typeof data === 'undefined') { data = {}; } data.delta_x = e.touches[0].pageX - data.start_page_x; if (Foundation.rtl) { data.delta_x = -data.delta_x; } if (typeof data.is_scrolling === 'undefined') { data.is_scrolling = !!( data.is_scrolling || Math.abs(data.delta_x) < Math.abs(e.touches[0].pageY - data.start_page_y) ); } if (!data.is_scrolling && !data.active) { e.preventDefault(); var direction = (data.delta_x < 0) ? 'next' : 'prev'; data.active = true; self.nav(e, direction); } }) .on('touchend.fndtn.clearing', '.visible-img', function(e) { S(this).data('swipe-transition', {}); e.stopPropagation(); }); }, assemble : function ($li) { var $el = $li.parent(); if ($el.parent().hasClass('carousel')) { return; } $el.after(''); var grid = $el.detach(), grid_outerHTML = ''; if (grid[0] == null) { return; } else { grid_outerHTML = grid[0].outerHTML; } var holder = this.S('#foundationClearingHolder'), settings = $el.data(this.attr_name(true) + '-init'), data = { grid: '