PageSourceSearch

https://ziwipets.jp/wp-content/themes/ZIWI/files/js/js_4IWVQB2Pv60zx0Wv7AJRyH2HqD68adx0LruJ8O81O0s.js

js ziwipets.jp collected 2026-10-06 08:49:19 UTC 15,298 bytes, 445 lines download raw bytes

1var _____WB$wombat$assign$function_____=function(name){return (globalThis._wb_wombat && globalThis._wb_wombat.local_init && globalThis._wb_wombat.local_init(name))||globalThis[name];};if(!globalThis.__WB_pmw){globalThis.__WB_pmw=function(obj){this.__WB_source=obj;return this;}}{
2let window = _____WB$wombat$assign$function_____("window");
3let self = _____WB$wombat$assign$function_____("self");
4let document = _____WB$wombat$assign$function_____("document");
5let location = _____WB$wombat$assign$function_____("location");
6let top = _____WB$wombat$assign$function_____("top");
7let parent = _____WB$wombat$assign$function_____("parent");
8let frames = _____WB$wombat$assign$function_____("frames");
9let opener = _____WB$wombat$assign$function_____("opener");
10/**
11 * @file
12 * equalheights module javascript settings.
13 */
14(function($) {
15  Drupal.behaviors.equalHeightsModule = {
16    attach: function (context, settings) {
17      if (Drupal.settings.equalHeightsModule) {
18        var eqClass = Drupal.settings.equalHeightsModule.classes;
19      }
20      if (eqClass) {
21        equalHeightsTrigger();
22        $(window).bind('resize', function () {
23          equalHeightsTrigger();
24        });
25      }
26      function equalHeightsTrigger() {
27        $.each(eqClass, function(eqClass, setting) {
28          var target = $(setting.selector);
29          var minHeight = setting.minheight;
30          var maxHeight = setting.maxheight;
31          var overflow = setting.overflow;
32          target.css('height', '');
33          target.css('overflow', '');
34
35          // Disable equalheights not matching the mediaquery
36          var mediaQuery = setting.mediaquery;
37          var matchMedia = window.matchMedia;
38          if (mediaQuery) {
39            if (matchMedia && !matchMedia(mediaQuery).matches) {
40                return;
41              } else {
42                equalHeightsLoad(target, minHeight, maxHeight, overflow);
43              }
44            } else {
45              equalHeightsLoad(target,minHeight, maxHeight, overflow);
46          }
47        });
48      }
49      function equalHeightsLoad(target, minHeight, maxHeight, overflow) {
50          // disable imagesloaded for IE<=8
51          var imagesLoadedIE8 = Drupal.settings.equalHeightsModule.imagesloaded_ie8;
52          if (imagesLoadedIE8 && window.attachEvent && !window.addEventListener) {
53              target.equalHeights(minHeight, maxHeight).css('overflow', overflow);
54          } else {
55          // imagesloaded library checks if all images are loaded before callback
56           target.imagesLoaded({
57           callback: function($images, $proper, $broken) {
58             this.equalHeights(minHeight, maxHeight).css('overflow', overflow)
59           }
60          });
61          }
62      }
63
64    }
65  }
66})(jQuery);
67;
68/*
69--------------------------------------------------------------------------
70(c) 2007 Lawrence Akka
71 - jquery version of the spamspan code (c) 2006 SpamSpan (www.spamspan.com)
72
73This program is distributed under the terms of the GNU General Public
74Licence version 2, available at http://www.gnu.org/licenses/gpl.txt
75--------------------------------------------------------------------------
76*/
77
78(function ($) { //Standard drupal jQuery wrapper.  See http://drupal.org/update/modules/6/7#javascript_compatibility
79// load SpamSpan
80Drupal.behaviors.spamspan = {
81  attach: function(context, settings) {
82    // get each span with class spamspan
83    $("span.spamspan", context).each(function (index) {
84      // Replace each <spam class="t"></spam> with .
85      if ($('span.t', this).length) {
86        $('span.t', this).replaceWith('.');
87      }
88      
89      // For each selected span, set mail to the relevant value, removing spaces
90      var _mail = ($("span.u", this).text() +
91        "@" +
92        $("span.d", this).text())
93        .replace(/\s+/g, '');
94
95      // Build the mailto URI
96      var _mailto = "mailto:" + _mail;
97      if ($('span.h', this).length) {
98        // Find the header text, and remove the round brackets from the start and end
99        var _headerText = $("span.h", this).text().replace(/^ ?\((.*)\) ?$/, "$1");
100        // split into individual headers, and return as an array of header=value pairs
101        var _headers = $.map(_headerText.split(/, /), function (n, i) {
102          return (n.replace(/: /, "="));
103        });
104
105        var _headerstring = _headers.join('&');
106        _mailto += _headerstring ? ("?" + _headerstring) : '';
107      }
108
109      // Find the anchor content, and remove the round brackets from the start and end
110      var _anchorContent = $("span.a", this).html();
111      if (_anchorContent) {
112        _anchorContent = _anchorContent.replace(/^ ?\((.*)\) ?$/, "$1");
113      }
114
115      // create the <a> element, and replace the original span contents
116
117      //check for extra <a> attributes
118      var _attributes = $("span.e", this).html();
119      var _tag = "<a></a>";
120      if (_attributes) {
121        _tag = "<a " + _attributes.replace("<!--", "").replace("-->", "") + "></a>";
122      }
123
124      $(this).after(
125        $(_tag)
126          .attr("href", _mailto)
127          .html(_anchorContent ? _anchorContent : _mail)
128          .addClass("spamspan")
129      ).remove();
130    });
131  }
132};
133}) (jQuery);;
134/**
135 * @file
136 * Views Slideshow Xtra Javascript.
137 */
138(function ($) {
139  Drupal.behaviors.viewsSlideshowXtraOverlay = {
140    attach: function (context) {
141
142      // Return if there are no vsx elements on the page
143      if ($('.views-slideshow-xtra-overlay').length == 0) {
144        return;
145      }
146
147	  // Hide all overlays if there is more than one slide.
148	  if($(".views_slideshow_cycle_slide").length > 1) {
149		  $('.views-slideshow-xtra-overlay-row').hide();
150	  }
151	  
152      var pageX = 0, pageY = 0, timeout;
153
154      // Modify the slideshow(s) that have a vsx overlay.
155      $('.views_slideshow_main').each(function() {
156        var slideshowMain = $(this);
157
158        // Get the view for this slideshow
159        var view = slideshowMain.closest('.view');
160
161        // Process the view if it has at least one overlay.
162        if ($('.views-slideshow-xtra-overlay', view).length > 0) {
163
164          // Get the View ID and Display ID so we can get the settings.
165          var viewClasses = classList(view);
166
167          $.each( viewClasses, function(index, item) {
168            // We need this code because the id of the element selected will be something like:
169            // "views_slideshow_cycle_main_views_slideshow_xtra_example-page"
170            // We don't want to reference the string "cycle" in our code, and there is not a way to
171            // get the "View ID - Display ID" substring from the id string, unless the string "cycle"
172            // is referenced in a string manipulation function.
173
174            // Get the View ID
175            if((/^view-id-/).test(item)) {
176              viewId = item.substring('view-id-'.length);
177            }
178
179            // Get the Display ID
180            if((/^view-display-id-/).test(item)) {
181              viewDisplayId = item.substring('view-display-id-'.length);
182            }
183
184          });
185
186          if(typeof viewId != "undefined") {
187
188            // Get the settings.
189            var settings = Drupal.settings.viewsSlideshowXtraOverlay[viewId + '-' + viewDisplayId];
190
191            // Set Pause after mouse movement setting.
192            if (settings.hasOwnProperty('pauseAfterMouseMove')) {
193              var pauseAfterMouseMove = settings.pauseAfterMouseMove;
194              if (pauseAfterMouseMove > 0) {
195                $(this).mousemove(function(e) {
196                  if (pageX - e.pageX > 5 || pageY - e.pageY > 5) {
197                    Drupal.viewsSlideshow.action({ "action": 'pause', "slideshowID": viewId + '-' + viewDisplayId });
198                    clearTimeout(timeout);
199                    timeout = setTimeout(function() {
200                        Drupal.viewsSlideshow.action({ "action": 'play', "slideshowID": viewId + '-' + viewDisplayId });
201                        }, 2000);
202                  }
203                  pageX = e.pageX;
204                  pageY = e.pageY;
205                });
206              }
207            }
208
209          }
210
211          // Process the overlay(s).
212          $('.views-slideshow-xtra-overlay:not(.views-slideshow-xtra-overlay-processed)', view).addClass('views-sli
212deshow-xtra-overlay-processed').each(function() {
213              // Remove the overlay html from the dom
214              var overlayHTML = $(this).detach();
215              // Attach the overlay to the slideshow main div.
216              $(overlayHTML).appendTo(slideshowMain);
217          });
218
219        }
220
221      });
222    }
223  };
224
225  Drupal.viewsSlideshowXtraOverlay = Drupal.viewsSlideshowXtraOverlay || {};
226
227  Drupal.viewsSlideshowXtraOverlay.transitionBegin = function (options) {
228
229    // Hide all overlays for all slides.
230    $('#views_slideshow_cycle_main_' + options.slideshowID + ' .views-slideshow-xtra-overlay-row').hide();
231
232    // Show the overlays for the current slide.
233    $('#views_slideshow_cycle_main_' + options.slideshowID + ' [id^="views-slideshow-xtra-overlay-"]' + ' .views-slideshow-xtra-overlay-row-' + options.slideNum).each(function() {
234
235      // Get the overlay settings.
236      var overlay = $(this);
237      var overlayContainerId = overlay.parent().attr('id');
238      var settings = Drupal.settings.viewsSlideshowXtraOverlay[overlayContainerId];
239
240      // Fade in or show overlay with optional delay.
241      setTimeout(function() {
242        if(settings.overlayFadeIn) {
243          overlay.fadeIn(settings.overlayFadeIn);
244        } else {
245          overlay.show();
246        }
247      },
248        settings.overlayDelay
249      );
250
251      // Fade out overlay with optional delay.
252      if(settings.overlayFadeOut) {
253        setTimeout(function() {
254          overlay.fadeOut(settings.overlayFadeOut);
255        },
256        settings.overlayFadeOutDelay
257        );
258      }
259
260    });
261  };
262
263  function classList(elem){
264    var classList = elem.attr('class').split(/\s+/);
265     var classes = new Array(classList.length);
266     $.each( classList, function(index, item){
267         classes[index] = item;
268     });
269
270     return classes;
271  }
272
273})(jQuery);
274;
275(function ($) {
276
277/**
278 * A progressbar object. Initialized with the given id. Must be inserted into
279 * the DOM afterwards through progressBar.element.
280 *
281 * method is the function which will perform the HTTP request to get the
282 * progress bar state. Either "GET" or "POST".
283 *
284 * e.g. pb = new progressBar('myProgressBar');
285 *      some_element.appendChild(pb.element);
286 */
287Drupal.progressBar = function (id, updateCallback, method, errorCallback) {
288  var pb = this;
289  this.id = id;
290  this.method = method || 'GET';
291  this.updateCallback = updateCallback;
292  this.errorCallback = errorCallback;
293
294  // The WAI-ARIA setting aria-live="polite" will announce changes after users
295  // have completed their current activity and not interrupt the screen reader.
296  this.element = $('<div class="progress" aria-live="polite"></div>').attr('id', id);
297  this.element.html('<div class="bar"><div class="filled"></div></div>' +
298                    '<div class="percentage"></div>' +
299                    '<div class="message">&nbsp;</div>');
300};
301
302/**
303 * Set the percentage and status message for the progressbar.
304 */
305Drupal.progressBar.prototype.setProgress = function (percentage, message) {
306  if (percentage >= 0 && percentage <= 100) {
307    $('div.filled', this.element).css('width', percentage + '%');
308    $('div.percentage', this.element).html(percentage + '%');
309  }
310  $('div.message', this.element).html(message);
311  if (this.updateCallback) {
312    this.updateCallback(percentage, message, this);
313  }
314};
315
316/**
317 * Start monitoring progress via Ajax.
318 */
319Drupal.progressBar.prototype.startMonitoring = function (uri, delay) {
320  this.delay = delay;
321  this.uri = uri;
322  this.sendPing();
323};
324
325/**
326 * Stop monitoring progress via Ajax.
327 */
328Drupal.progressBar.prototype.stopMonitoring = function () {
329  clearTimeout(this.timer);
330  // This allows monitoring to be stopped from within the callback.
331  this.uri = null;
332};
333
334/**
335 * Request progress data from server.
336 */
337Drupal.progressBar.prototype.sendPing = function () {
338  if (this.timer) {
339    clearTimeout(this.timer);
340  }
341  if (this.uri) {
342    var pb = this;
343    // When doing a post request, you need non-null data. Otherwise a
344    // HTTP 411 or HTTP 406 (with Apache mod_security) error may result.
345    $.ajax({
346      type: this.method,
347      url: this.uri,
348      data: '',
349      dataType: 'json',
350      success: function (progress) {
351        // Display errors.
352        if (progress.status == 0) {
353          pb.displayError(progress.data);
354          return;
355        }
356        // Update display.
357        pb.setProgress(progress.percentage, progress.message);
358        // Schedule next timer.
359        pb.timer = setTimeout(function () { pb.sendPing(); }, pb.delay);
360      },
361      error: function (xmlhttp) {
362        pb.displayError(Drupal.ajaxError(xmlhttp, pb.uri));
363      }
364    });
365  }
366};
367
368/**
369 * Display errors on the page.
370 */
371Drupal.progressBar.prototype.displayError = function (string) {
372  var error = $('<div class="messages error"></div>').html(string);
373  $(this.element).before(error).hide();
374
375  if (this.errorCallback) {
376    this.errorCallback(this);
377  }
378};
379
380})(jQuery);
381;
382(function ($, Drupal, window, document, undefined) {
383  Drupal.behaviors.ziwipeakAjaxAddCart = {
384    attach: function (context, settings) {
385   // by passing the $ you can code using the $ alias for jQuery
386
387	
388	$( ".side-bar-toggler, .close-cart-popup" ).once().on("click", function(e) {
389		const sidebar = document.querySelector('.sidebar.right.bar.expand');
390		sidebar.classList.remove('expand');
391                $('div').remove('.sidebar-wrapper-new');
392		 e.preventDefault();
393		return false;
394	});
395     if ($( "input[name='is_mobile_device']").val()) {
396          $('.shuffle-shipping-preview a').parent().siblings('div, fieldset').hide();
397          
398     }
399     $('.shuffle-shipping-preview a').once().on("click", function(e) {
400        
401        var _class = $(this).attr('class');
402        if (_class.indexOf('up') !== -1) {
403            $(this).removeClass('up');
404            $(this).addClass('down');
405            $(this).find('span').text(Drupal.t('Show order summary'));
406        }
407        else {
408           $(this).removeClass('down');
409            $(this).addClass('up');
410           $(this).find('span').text(Drupal.t('Hide order summary'));
411        }
412        
413        $(this).parent().siblings('div, fieldset').toggle();
414    })
415	$( ".open-cart-popup").once().on("click", function(e) {
416
417		const sidebar = document.querySelector('.sidebar.right.bar');
418                $('body').append('<div class="sidebar-wrapper-new"></div>');
419                sidebar.classList.add('expand');
420 		e.preventDefault();
421		return false;
422	});
423	
424	$(".number-btn").once().on("click", function(e) {
425
426            var $button = $(this);
427            var oldValue = parseInt($button.parent().find("input").val());
428            var newVal;
429
430            if ($button.find('a').attr('class') === "add-qty") {
431              newVal = oldValue + 1;
432            } else {
433              // Don't allow decrementing below one
434              newVal = (oldValue > 1) ? oldValue - 1 : 1;
435            }
436
437            $button.parent().find("input").val(newVal);
438            e.preventDefault();
439		  return false;
440	});
441  }
442  };
443})(jQuery, Drupal, this, this.document);					;
444
445}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.