HEX
Server: Apache/2.4.65 (Debian)
System: Linux kubikelcreative 5.10.0-35-amd64 #1 SMP Debian 5.10.237-1 (2025-05-19) x86_64
User: www-data (33)
PHP: 8.4.13
Disabled: NONE
Upload Files
File: /var/www/Gosurya/WP2/wp-content/themes/my-listing/assets/dist/single-listing.js
!function(t){"function"==typeof define&&define.amd?define("singleListing",t):t()}(function(){"use strict";var r,t,d,a,s,n,e,i,o;MyListing.Helpers.css_escape=function(t){if(0==arguments.length)throw new TypeError("`CSS.escape` requires an argument.");for(var e,i=String(t),n=i.length,a=-1,s="",o=i.charCodeAt(0);++a<n;)0!=(e=i.charCodeAt(a))?s+=1<=e&&e<=31||127==e||0==a&&48<=e&&e<=57||1==a&&48<=e&&e<=57&&45==o?"\\"+e.toString(16)+" ":(0!=a||1!=n||45!=e)&&(128<=e||45==e||95==e||48<=e&&e<=57||65<=e&&e<=90||97<=e&&e<=122)?i.charAt(a):"\\"+i.charAt(a):s+="�";return s},jQuery(function(n){var t={postid:n("#case27-post-id").val(),authid:n("#case27-author-id").val()};function a(e){!function(t){t.contents.hide(),t.pagination.hide(),t.loader.show()}(e),n.ajax({url:CASE27.mylisting_ajax_url+"&action=get_related_listings",type:"GET",dataType:"json",data:{listing_id:t.postid,page:e.page,field_key:e.field_key},success:function(t){e.contents.html(t.html),e.pagination.html(t.pagination),e.menu_spinner.hide(),e.counter.html(t.formatted_count).removeClass("hide"),function(t){t.loader.hide(),t.contents.fadeIn(150),t.pagination.fadeIn(150)}(e),setTimeout(function(){jQuery(".lf-background-carousel").owlCarousel({margin:20,items:1,loop:!0}),jQuery('[data-toggle="tooltip"]').tooltip({trigger:"hover"})},10)}})}n(".toggle-tab-type-related_listings").each(function(t,e){var i={};i.menu=n(this),i.id=i.menu.data("section-id"),i.section=n("#listing_tab_"+i.id),i.field_key=i.menu.data("options").field_key,i.loader=i.section.find(".tab-loader"),i.contents=i.section.find(".tab-contents"),i.pagination=i.section.find(".tab-pagination"),i.counter=i.menu.find(".items-counter"),i.menu_spinner=i.menu.find(".tab-spinner"),i.page=0,a(i),i.pagination.on("click","a",function(t){t.preventDefault(),i.page=parseInt(n(this).data("page"),10)-1,a(i)})})}),jQuery(function(n){var t={postid:n("#case27-post-id").val(),authid:n("#case27-author-id").val()};function a(e){!function(t){t.contents.hide(),t.pagination.hide(),t.loader.show()}(e),n.ajax({url:CASE27.ajax_url+"?action=mylisting_get_products&security="+CASE27.ajax_nonce,type:"POST",dataType:"json",data:{products:e.products,page:e.page,author_id:t.authid},success:function(t){e.contents.html(t.html),e.pagination.html(t.pagination),e.counter.html(t.formatted_count),function(t){t.loader.hide(),t.contents.fadeIn(150),t.pagination.fadeIn(150)}(e)}})}n(".toggle-tab-type-store").each(function(t,e){var i={};i.menu=n(this),i.id=i.menu.data("section-id"),i.section=n("#listing_tab_"+i.id),i.loader=i.section.find(".store-loader"),i.contents=i.section.find(".store-contents"),i.pagination=i.section.find(".store-pagination"),i.counter=i.menu.find(".items-counter"),i.products=i.menu.data("options").products,i.page=0,a(i),i.pagination.on("click","a",function(t){t.preventDefault(),i.page=parseInt(n(this).data("page"),10)-1,a(i)})})}),r=jQuery,t=r(".add-to-i-cal"),d=r("#case27-post-id").val(),t.on("click",function(t){t.preventDefault();var e=r(this),i=e.data("event-id"),n=e.parents(".event-dates-timeline"),a=n.data("field"),s=n.data("count"),o=n.data("past-count"),l={listing_id:d,eventindex:i,eventField:a,eventCount:s,eventPastCount:o};r.post(CASE27.mylisting_ajax_url+"&action=download_ical_calendar&security="+CASE27.ajax_nonce,l,function(t){if(t.data){var e=new Blob([t.data],{type:"text/Calendar"}),i=t.name+".ics";if(document.documentMode)window.navigator.msSaveBlob(e,i);else{var n=(window.URL||window.webkitURL).createObjectURL(e),a=r("<a />");a.attr("download",i),a.attr("href",n),r("body").append(a),a[0].click(),r("body").remove(a)}}else alert("Please try again.")})}),a=jQuery,s=a(".listing-tab-toggle").first().data("section-id"),a(".listing-tab-toggle").on("click",function(t){t.preventDefault(),a(".profile-menu li.active").removeClass("active"),a(this).parent().addClass("active");var e=a(".listing-tab.tab-active"),i=a(this).data("section-id"),n=a(".listing-tab#listing_tab_"+MyListing.Helpers.css_escape(i));if(e.attr("id")==="listing_tab_"+i)return e.addClass("tab-same"),void setTimeout(function(){e.removeClass("tab-same")},100);e.addClass("tab-hiding"),setTimeout(function(){e.removeClass("tab-active tab-hiding").addClass("tab-hidden"),n.addClass("tab-showing"),setTimeout(function(){n.removeClass("tab-hidden tab-showing").addClass("tab-active").trigger("mylisting:single:tab-switched"),jQuery(document).trigger("mylisting/single:tab-switched")},25)},200),!0!==MyListing.isListingPreview&&history.replaceState(null,null,s===i?" ":"#"+i)}),(n=jQuery)(".qa-internal-link a").on("click",function(t){var e=n(this).attr("href"),i=n('.listing-tab-toggle[data-section-id="'+MyListing.Helpers.css_escape(e.substring(1))+'"]');i.length&&i.click()}),e=jQuery,i=window.location.hash.substr(1),o=e(".listing-tab-toggle#listing_tab_"+MyListing.Helpers.css_escape(i)+"_toggle"),i.length&&o.length?o.first().click():e(".listing-tab-toggle").first().click(),function(t){t(".listing-tab.tab-layout-masonry").on("mylisting:single:tab-switched",function(){if(!t(this).hasClass("pre-init"))return t(this).find(".listing-tab-grid").isotope("layout");t(this).removeClass("pre-init").find(".listing-tab-grid").isotope(t("body").hasClass("rtl")?{originLeft:!1}:{})});var i=MyListing.Helpers.debounce(function(){t(".listing-tab.tab-layout-masonry:not(.pre-init) .listing-tab-grid").isotope("layout")},100);t(".listing-tab.tab-layout-masonry .grid-item").each(function(t,e){new ResizeSensor(e,i)})}(jQuery),jQuery(function(s){!function(){if(s("#report-listing-modal").length){var e=s("#report-listing-modal"),i=e.find(".validation-message"),n=s("#case27-post-id").val();e.find(".report-submit").on("click",function(t){t.preventDefault(),i.hide(),e.find(".sign-in-box").addClass("cts-processing-login"),s.ajax({url:CASE27.ajax_url+"?action=report_listing&security="+CASE27.ajax_nonce,type:"POST",dataType:"json",data:{listing_id:n,content:e.find(".report-content").val()},success:function(t){e.find(".sign-in-box").removeClass("cts-processing-login"),"error"===t.status&&i.html("<em>"+t.message+"</em>").show(),"success"===t.status&&e.find(".report-wrapper").html('<div class="submit-message"><em>'+t.message+"</em></div>")}})})}}(),s(".comments-list .comment .review-galleries .gallery-item img").on("click",function(t){t.preventDefault();var i=[],n=this,a=0;s(this).parents(".review-galleries").find(".gallery-item img").each(function(t,e){if(!e.dataset.fullSizeSrc||!e.dataset.fullSizeWidth||!e.dataset.fullSizeHeight)return!1;e.dataset.fullWidth=e.dataset.fullSizeWidth,e.dataset.fullHeight=e.dataset.fullSizeHeight,i.push({src:e.dataset.fullSizeSrc,w:e.dataset.fullWidth||0,h:e.dataset.fullHeight||0,el:e}),e==n&&(a=t)}),new MyListing.PhotoSwipe(i,a)})}),function(){var e=document.querySelector(".listing-main-info"),i=document.querySelector(".main-info-desktop"),n=document.querySelector(".main-info-mobile"),t=window.matchMedia("(max-width: 1200px)");if(e&&i&&n){t.matches&&n.appendChild(e);var a=function(t){t.matches?n.appendChild(e):i.appendChild(e)};"function"==typeof t.addEventListener?t.addEventListener("change",a):t.addListener(a)}}(),jQuery(function(s){var o=s("#case27-post-id").val();s(".comments-list-wrapper").each(function(t,e){var i=(e=s(e)).data("current-page"),n=e.data("page-count"),a=1<i?"lower":"upper";e.on("click",".nav-links .load-more",function(t){t.preventDefault(),"upper"==a?i++:i--,e.addClass("loading-comments"),s.get(CASE27.mylisting_ajax_url,{action:"list_comments",page:i,post_id:o,page_count:n,direction:a},function(t){"string"==typeof t&&('<ul class="comments-list"></ul>'===t||t.length<10?e.find(".nav-links .load-more").hide():e.find("ul.comments-list").append(s(t).children())),e.removeClass("loading-comments"),("lower"==a&&i<=1||"upper"==a&&n<=i)&&e.find(".nav-links .load-more").hide()})})})}),jQuery(function(e){e(".hide-notification").click(function(t){t.preventDefault(),e(t.target).parents(".listing-notifications").hide()})})});