File Editor
Directories:
.. (Back)
Files:
cdp-bulk.min.js
cdp-global.min.js
cdp-gutenberg.min.js
cdp-icPagination.min.js
cdp-modal.min.js
cdp-select.min.js
cdp-user.min.js
cdp.min.js
cdp.tooltip.min.js
Create New File
Create
Edit File: cdp.min.js
function cdp_tooltips_update_content(){if(jQuery("select").cdpNiceSelect("update"),!(void 0!==jQuery.cdp&&void 0!==jQuery.cdp.isPremium)||!jQuery.cdp.isPremium()){jQuery(".cdp-premium-in-select").find('.option[data-value="premium"]').addClass("cdp-tooltip-premium disabled"),jQuery(".cdp-option-premium").find('.option[data-value="3"]').addClass("cdp-tooltip-premium disabled"),$prems=jQuery(".cdp-tooltip-premium");for(let t=0;t<$prems.length;t++){let e=$prems[t],c=-15;isNaN(parseInt(jQuery(e).attr("data-top")))||(c=parseInt(jQuery(e).attr("data-top"))),jQuery(e).cdptipster({delay:10,debug:!1,delayTouch:[100,200],interactive:!0,distance:c,side:"top",content:cdpJS.strPremFeatureHtml,contentAsHTML:!0,maxWidth:290,theme:["cdptipster-noir","cdptipster-noir-customized","cdp-tooltip-premium-css"],repositionOnScroll:!0})}jQuery(".cdp-tooltip-premium-dc").cdptipster({delay:10,debug:!1,delayTouch:[100,200],interactive:!0,distance:3,side:"top",content:cdpJS.strPremFeatureHtml,contentAsHTML:!0,maxWidth:290,theme:["cdptipster-noir","cdptipster-noir-customized","cdp-tooltip-premium-css"],repositionOnScroll:!0})}}function cdp_totally_know_what_i_am_doing(t){if("really"!=t)return cdpJS.strAreYouSure;console.log(cdpJS.strYouAreCrazy);let e=jQuery;e("#cdp-purl").val();e.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",nonce:cdpGlobalJS.ajaxNonce,f:"debug_function"}).done(t=>{console.log(t),console.log(cdpJS.strDebugOutputEnd)})}jQuery(document).ready(function(t){t("#cdp-purl").val();let e=null,c="default",o=null,i=null,d=null,n=null,p=null,s=null,a=null,l=!1;const r=void 0!==t.cdp&&void 0!==t.cdp.isPremium;function u(e=null,c=!1){let o=this;"string"==typeof e&&(o=`.${e}`),0!=c&&(o=c),$parent=t(t(o).parents(".cdp-collapsible")[0]),$arrow=$parent.find(".cdp-arrow"),$body=$parent.find(".cdp-collapsible-content"),$title=$parent.find(".cdp-collapsible-title"),$titles=t(".cdp-collapsible-title"),group=$parent.attr("data-cdp-group"),height=$body.prop("scrollHeight"),$oArrows=t(`.cdp-collapsible[data-cdp-group="${group}"]`).not($parent).find(".cdp-arrow"),$oBodies=t(`.cdp-collapsible[data-cdp-group="${group}"]`).not($parent).find(".cdp-collapsible-content"),$body.hasClass("cdp-active")?($body.removeClass("cdp-active"),$titles.removeClass("cdp-active"),$oBodies.removeClass("cdp-active"),$arrow.removeClass("cdp-arrow-down").addClass("cdp-arrow-left"),$body.css({"max-height":""})):($titles.removeClass("cdp-active"),$body.addClass("cdp-active"),$title.addClass("cdp-active"),$oBodies.removeClass("cdp-active"),$arrow.removeClass("cdp-arrow-left").addClass("cdp-arrow-down"),$oArrows.removeClass("cdp-arrow-down").addClass("cdp-arrow-left"),$body.css({"max-height":`${height+30}px`}),$oBodies.css({"max-height":""}))}function m(){let e=t(".cdp-names-prefix").text(),c=t(".cdp-names-suffix").text(),o={year:(i=new Date).getFullYear(),month:("0"+(i.getMonth()+1)).slice(-2),day:i.getDate()<=9?"0"+i.getDate():i.getDate(),hour:i.getHours()<=9?"0"+i.getHours():i.getHours(),minute:i.getMinutes()<=9?"0"+i.getMinutes():i.getMinutes(),second:i.getSeconds()<=9?"0"+i.getSeconds():i.getSeconds(),week:i.getDay()};var i;let d="(blank)"==t(".cdp-togglable-name-b").text()?"":cdpJS.strTogglableName,n=`${e.trim()} ${d} ${c.trim()}`;n=n.replace(/\[Counter\]/g,"2");let p=t(".cdp-date-picked").val();"1"==p?n=n.replace(/\[CurrentDate\]/g,`${o.month}/${o.day}/${o.year}`):"2"==p?n=n.replace(/\[CurrentDate\]/g,`${o.day}/${o.month}/${o.year}`):"3"==p&&function(e){let c=t(".cdp-custom-date-picking").val();t.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",nonce:cdpGlobalJS.ajaxNonce,f:"get_formatted_time",format:c}).done(t=>{e(t)}).fail(()=>{e(!1)})}(e=>{n=n.replace(/\[CurrentDate\]/g,`${e}`),t(".cdp-example-name").text(n),n=(n=n.replace(/\[CurrentTime\]/g,`${o.hour}:${o.minute}:${o.second}`)).replace(/\s+/gim," "),t(".cdp-example-name").text(n)}),"3"!=p&&(n=(n=n.replace(/\[CurrentTime\]/g,`${o.hour}:${o.minute}:${o.second}`)).replace(/\s+/gim," "),t(".cdp-example-name").text(n))}function h(e=""){before=t(e).html(),text=t(e).html(),$picks=['<div class="cdp-name-box-small cdp-drag" data-cdp-val="0" contenteditable="false"><i class="cdp-novis">[</i>Counter<i class="cdp-novis">]</i></div>','<div class="cdp-name-box-small cdp-drag" data-cdp-val="1" contenteditable="false"><i class="cdp-novis">[</i>CurrentTime<i class="cdp-novis">]</i></div>','<div class="cdp-name-box-small cdp-drag" data-cdp-val="2" contenteditable="false"><i class="cdp-novis">[</i>CurrentDate<i class="cdp-novis">]</i></div>'],text=text.replace(/\[Counter\]/g,$picks[0]),text=text.replace(/\[CurrentDate\]/g,$picks[2]),text=text.replace(/\[CurrentTime\]/g,$picks[1]),text!=before&&t(e).html(text)}function f(){val=t('.cdp-other-options[name="after_copy"]').val(),2==val?t(".cdp-if-edit-page-selected").show(300):t(".cdp-if-edit-page-selected").is(":hidden")||t(".cdp-if-edit-page-selected").hide(300),setTimeout(()=>{jQuery(".cdp-oth-section").css({"max-height":""}),jQuery(".cdp-oth-section").css({"max-height":jQuery(".cdp-oth-section").height()})},310)}function g(o=!1){let i=t(this).attr("data-cdp-btn");1==o&&(i="copy-quick");let d=["copy-quick","copy-custom","copy-custom-link"],n=t(".cdp-modal-checkboxes").find(".cdp-input-dynamic");if(d.includes(i)){let o={type:i};if(i==d[0]){if(o.times=t(".cdp-modal-input-times-tooltip").val(),o.site=t('.cdp-input-dynamic[name="tooltip-which-site-first"]').val(),o.profile=t('.cdp-input-dynamic[name="tooltip-which-profile-first"]').val(),o.swap="2"==t(".cdp-swap").val()?"true":"false",!o.profile||"custom"==o.profile)return t.cdpNotification("warning","Please select settings for this copy."),void _()}else if(i==d[1]||i==d[2]){t("#cdp-copy-modal-global").is(":visible")?($select=t('.cdp-input-dynamic[name="tooltip-which-profile-second-modal"]'),o.site=t('.cdp-input-dynamic[name="tooltip-which-site-second-modal"]').val(),o.profile=t('.cdp-input-dynamic[name="tooltip-which-profile-second-modal"]').val()):(o.site=t('.cdp-input-dynamic[name="tooltip-which-site-second"]').val(),o.profile=t('.cdp-input-dynamic[name="tooltip-which-profile-second"]').val()),o.times=t('.cdp-modal-input-times[name="tooltip-which-times-second"]').val(),o.swap="2"==t(".cdp-swap").val()?"true":"false",o.custom={};for(let e=0;e<n.length;++e)o.custom[t(n[e]).attr("name")]=t(n[e]).is(":checked");o.custom.taxonomy=o.custom.cdp_taxonomy,delete o.custom.cdp_taxonomy}if(isNaN(parseInt(o.times))||parseInt(o.times)<=0)return void t.cdpNotification("warning",cdpJS.strCopyNumIssue);let p=["clear","alloptions","custom","custom_named","null","undefined",null,void 0];o.profile&&!p.includes(o.profile)||(o.profile=c),L(),function(e=(()=>{})){window.onbeforeunload=(()=>cdpJS.strCopyInProgress),$e=t(".cdp-copy-loader-overlay"),$e.is(":hidden")&&($e.show(),$e.animate({opacity:1},300,function(){e(!0)}))}(()=>{t.ajax({type:"POST",url:ajaxurl,data:{action:"cdp_action_handling",token:"cdp",f:"copy_post",nonce:cdpGlobalJS.ajaxNonce,origin:"tooltip",id:[e],data:o},timeout:0}).done(function(e){_(),t.isJsonString(e)&&(e=t.cdpParse(e)),"error"==e.status?t.cdpNotification("error",cdpJS.strCopyPostIssue):i==d[2]||void 0!==e.link&&e.link.length>0?"pConv"==e.link?(t.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",nonce:cdpGlobalJS.ajaxNonce,f:"delete_success_img"}),"-28"==t(".cdp-copy-alert-success").position().top&&t(".cdp-copy-alert-success").animate({top:"32px",opacity:1},300),setTimeout(()=>{"32"==t(".cdp-copy-alert-success").position().top&&t(".cdp-copy-alert-success").animate({top:"-28px",opacity:0},300)},3e3),t("#cdp_notice_error_modal").length>0&&(t("#cdp_notice_error_modal").show(),t("#cdp_notice_error_modal").fadeIn(300),t("#cdp_notice_error_modal").animate({opacity:1},500),t("#cdp_notice_error_modal .cdp_notice_content").animate({opacity:1,top:"50%"},500))):window.location.href=e.link:location.reload()}).fail(function(e){t.cdpNotification("error",cdpJS.strCopyPostIssueConsInfo),_(),console.log(e),console.log(e.responseText)})})}else t.cdpNotification(cdpJS.strTooltipBtnIssue)}function v(e,o=!1){let i=["clear","alloptions","custom","custom_named","null","undefined",null,void 0],d=t('.cdp-input-dynamic[name="tooltip-which-profile-second"]'),n=t('.cdp-input-dynamic[name="tooltip-which-profile-second-modal"]'),p=d,s=!1;t("#cdp-copy-modal-global").is(":visible")&&(p=n,s=!0);let a=t(".cdp-modal-checkboxes").find(".cdp-input-dynamic:not(:disabled)"),l=t(".cdp-modal-checkboxes").find(".cdp-input-dynamic"),r=p.val();0==e&&0!=o&&(r=o),"custom_named"==r?p.val("custom_named"):void 0===r||"custom"==r||null==r||void 0==r?p.val("custom"):"clear"==r?(0!=e&&e.preventDefault(),l.prop("checked",!1),p.val("custom_named")):"alloptions"==r?(0!=e&&e.preventDefault(),a.prop("checked",!0),p.val("custom_named")):!i.includes(r)&&r.length>=1?b(r,function(e){for(let c in e)"object"!=typeof c&&t(`.cdp-input-dynamic[name="${c}"]`).prop("checked",y(e[c]))}):(0!=e&&e.preventDefault(),t.cdpNotification("warning",cdpJS.strSelectedProfIssue)),0==e&&p.val(r),i.includes(r)||(c=r,s?d.val(r):n.val(r)),cdp_tooltips_update_content()}function y(t){return"string"==typeof t&&"true"==t.trim().toLowerCase()}function b(e="default",c){t.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",nonce:cdpGlobalJS.ajaxNonce,f:"get_settings",profile:e}).done(e=>{if(t.isJsonString(e)&&(e=t.cdpParse(e)),e.status&&"error_no_exists"==e.status){t.cdpNotification("warning",cdpJS.strSelectedProfEmpty);let e={},o=t(".cdp-modal-option-r");for(let c=0;c<o.length;c++)e[t(o[c]).attr("name")]=t(o[c]).is(":checked");c(!1)}else c(e)}).fail(e=>{t.cdpNotification("error",cdpJS.strSelectedProfGetIssue),console.log(cdpJS.strConsLogErr),console.log(e),console.log("––––––––––––––––––––––––––"),c(!1)})}function x(){t(this).attr("class");let e=parseInt(t(this).val());e<=0&&(e=1),e>9999&&(e=9999),isNaN(e)&&(e=1),e||(e=1),t(".cdp-modal-input-times").val(e),t(".cdp-modal-input-times-tooltip").val(e),e>50?(t(".cdp-error-span-tooltip").show(300),t(".cdp-tooltip-before").attr("style","height: calc(225px - 20px - 16px) !important")):(t(".cdp-error-span-tooltip").hide(300),t(".cdp-tooltip-before").attr("style","")),e>1?(t(".cdp-multiple-tooltip-count").animate({opacity:1},200),t('.cdp-tooltip-btn-copy[data-cdp-btn="copy-custom-link"]').hide()):(t(".cdp-multiple-tooltip-count").animate({opacity:0},200),t('.cdp-tooltip-btn-copy[data-cdp-btn="copy-custom-link"]').show()),setTimeout(()=>{O()},310)}function _(e=(()=>{})){window.onbeforeunload=null,$e=t(".cdp-copy-loader-overlay"),$e.is(":hidden")||$e.animate({opacity:0},300,function(){$e.hide(),e(!0)})}function w(){let e=t(".cdp-profile-selected").val();var c,o;b(e,i=>{if(t.isJsonString(i)||"object"==typeof i){"object"!=typeof i&&(i=JSON.parse(i));let d=["usmplugin","yoast","woo"];for(k in i)"names"==k?(t(".cdp-names-prefix").html(i[k].prefix),t(".cdp-names-suffix").html(i[k].suffix),"3"!=i[k].format||r||(i[k].format="1"),t(".cdp-date-picked").val(i[k].format),t(".cdp-custom-date-picking").val(i[k].custom)):(!d.includes(k)||d.includes(k)&&r&&t.cdp.isPremium())&&t(`.cdp-data-set[data-cdp-opt="${k}"]`).prop("checked","true"==i[k]);cdp_tooltips_update_content(),m(),f(),r&&t.cdp.isPremium()&&t.cdp.premium.detectChangeOfCustom(),j(),h(".cdp-names-prefix"),h(".cdp-names-suffix"),c=e,o=(()=>{}),t.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",nonce:cdpGlobalJS.ajaxNonce,f:"set_default_profile",selection:c}).done(t=>{o(t)}).fail(()=>{o(!1)})}else t.cdpNotification("warning",cdpJS.strServerDataIssue)})}function $(){if("0"==t("#cdp-d-table-pagi-ilosc-wynikow").text())return;let e=t(".cdp-input-d-id").length,c=t(".cdp-input-d-id:checked").length;c==e?t(".cdp-d-select-all").text("Deselect all"):t(".cdp-d-select-all").text("Select all"),t(".cdp-t-d-ct").text(c),$visible=t(".cdp-input-d-id:visible").length,$visible_checked=t(".cdp-input-d-id:checked:visible").length,$visible==$visible_checked?t(".cdp-d-checkbox-all").prop("checked",!0):t(".cdp-d-checkbox-all").prop("checked",!1),function(){let e=t(".cdp-input-d-id").parents("tr"),c=t(".cdp-input-d-id:checked").parents("tr");e.removeClass("cdp-del"),c.addClass("cdp-del")}()}function S(e){t.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",nonce:cdpGlobalJS.ajaxNonce,f:"give_me_current_tasks"}).done(c=>{t.isJsonString(c)&&(c=t.cdpParse(c)),"success"==c.status&&e(c.tasks)})}function C(e){let c=0,o=+new Date/1e3,i=t(".cdp-dd-item");for(let o=0;o<i.length;++o){e[t(i[o]).attr("data-token")]||t(i[o]).remove(),c++}for(task in e){let i=e[task],d=t(t(`.cdp-dd-item[data-token="${task}"]`)[0]);if(0==i.done){if(d.hasClass("cdp-dd-ud"))continue;{d.remove();let e=o-i.done>=86400;t(".cdp-dd-undone-list").append(I(i.shown,task,e,i.f)),c++}}else{if(d.hasClass("cdp-dd-d"))continue;d.remove(),t(".cdp-dd-done-list").append(D(i.data,i.shown,task,i.f)),c++}}(c>0||0==i.length)&&function(){let e=t(".cdp-dd-item").length,c=t(".cdp-dd-d").length,o=t(".cdp-dd-ud").length;c<=0?(t(".cdp-done-notis, .cdp-done-notis").addClass("cdp-noti-hide"),t(".cdp-done-hr, .cdp-done-notis").hide()):(t(".cdp-done-notis, .cdp-done-notis").removeClass("cdp-noti-hide"),t(".cdp-done-hr, .cdp-done-notis").show()),o<=0?(t(".cdp-undone-notis, .cdp-undone-notis").addClass("cdp-noti-hide"),t(".cdp-undone-hr, .cdp-undone-notis").hide()):(t(".cdp-undone-notis, .cdp-undone-notis").removeClass("cdp-noti-hide"),t(".cdp-undone-hr, .cdp-undone-notis").show()),e<=0?t(".cdp-admin-bar-noti").addClass("cdp-noti-hide"):t(".cdp-admin-bar-noti").removeClass("cdp-noti-hide"),t(".cdp-notis-counter").text(t(".cdp-bnew-notis").length)}()}function j(){$trs=t(".cdp-table tbody.cdp-ff-b1").find("tr");for(let e=0;e<$trs.length;e++){let c=t($trs[e]);c.find("input").is(":checked")?c.addClass("cdp-selected-tr-opt"):c.removeClass("cdp-selected-tr-opt")}}function J(e){if(t(".cdp-modal").is(":visible"))return;let c=window;0!=t("#wpbody").scrollTop()&&(c="#wpbody");let o=t(c).scrollTop()+2;o<=0&&(o=2),"click"!=e.type&&t(".cdp-nice-select, .cdp-nice-select .list").css({transition:"all 0s"}),t(".cdp-nice-select .list").css({"margin-top":`${-o}px`}),t("#cdpp-af-author").length>0&&(t(".ui-autocomplete").css({top:`${t("#cdpp-af-author").offset().top+40}px`}),t(".cdp-cool-datepicker").css({top:`${t(".cdpp-input-a").offset().top+40}px`})),clearTimeout(n),n=setTimeout(()=>{t(".cdp-cdp-nice-select .list").css({transition:""})},100),clearTimeout(d),d=setTimeout(()=>{let o=t(c).scrollTop()+2;o<=0&&(o=2),"click"!=e.type&&t(".cdp-nice-select .list").css({transition:"all 0s !important"}),t(".cdp-nice-select .list").css({"margin-top":`${-o}px`}),t("#cdpp-af-author").length>0&&(t(".ui-autocomplete").css({top:`${t("#cdpp-af-author").offset().top+40}px`}),t(".cdp-cool-datepicker").css({top:`${t(".cdpp-input-a").offset().top+40}px`})),clearTimeout(n),n=setTimeout(()=>{t(".cdp-nice-select .list").css({transition:""})},100)},100)}function T(){let e=t('.cdp-d-option[name="cdp-d-b-title"]').is(":checked"),c=t('.cdp-d-option[name="cdp-d-b-slug"]').is(":checked");e||c?t(".cdp-no-empty-text").html(cdpJS.strIncludingHtml):t(".cdp-no-empty-text").html(cdpJS.strIncludingHtml2)}function N(e){e.preventDefault(),$parent=t(this).parents(".cdp-collapsible"),$col=t(t($parent[0]).find(".cdp-collapsible-title")[0]),u("true",$col)}t(".cdp-intro-button").on("click",function(){let e=t(".cdp-intro").height();t(".cdp-intro").css({height:e+"px"}),t(".cdp-intro").animate({opacity:0,height:0},300,function(){t(".cdp-intro").hide(10),t("#cdp-never-intro").is(":checked")&&t.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",f:"no_intro",nonce:cdpGlobalJS.ajaxNonce}).done(e=>{"error"==e&&t.cdpNotification("error",cdpJS.strIntroSaveIssue)}).fail(e=>{t.cdpNotification("error",cdpJS.strIntroSaveIssue2)})}),t(".cdp-s-i-a").show(),t(".cdp-s-i-a").animate({opacity:1},300)}),t(".cdp-save-options").on("click",function(){let e=t(".cdp-data-set"),c=t(".cdp-other-inputs"),o=t(".cdp-profile-selected").val(),i=t(".cdp-names-prefix").text().replace(/\s+/g," ").trim(),d=t(".cdp-names-suffix").text().replace(/\s+/g," ").trim(),n={names:{prefix:i,suffix:d,format:t(".cdp-date-picked").val(),custom:t(".cdp-custom-date-picking").val(),display:t(t(`option[value="${t(".cdp-profile-selected").val()}"]`)[0]).text()}},p={afterCopy:t('.cdp-other-options[name="after_copy"]').val(),postConverter:t('.cdp-other-options[name="post_converter"]').val(),others:{}},s={},a=t(".cdp-other-roles");for(let e=0;e<a.length;e++)s[t(a[e]).attr("name")]=t(a[e]).is(":checked");p.roles=s;for(let c=0;c<e.length;c++)n[t(e[c]).attr("data-cdp-opt")]=!!t(e[c]).is(":checked");for(let e=0;e<c.length;e++)p.others[t(c[e]).attr("name")]=!!t(c[e]).is(":checked");t.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",nonce:cdpGlobalJS.ajaxNonce,f:"save_options",options:n,profile:o,entire:p}).done(e=>{"success"==e?t.cdpNotification("success",cdpJS.strSettingsSaved,2e3):"error"==e?t.cdpNotification("error",cdpJS.strSettingsSaveIssue):t.cdpNotification("success",cdpJS.strSettingsSaved,2e3)}).fail(e=>{t.cdpNotification("error",cdpJS.strSettingsSaveIssue2),console.log(e)})}),t("#cdp-show-into-again").on("click",function(){t.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",f:"intro_again",nonce:cdpGlobalJS.ajaxNonce}).done(e=>{"error"==e&&t.cdpNotification("error",cdpJS.strIntroUpdateIssue)}).fail(e=>{t.cdpNotification("error",cdpJS.strIntroUpdateIssue2)}),t(".cdp-s-i-a").animate({opacity:0},300,function(){t(".cdp-s-i-a").hide()}),function(){t(".cdp-intro").show().css({height:""});let e=t(".cdp-intro").height();t(".cdp-intro").css({height:"0px"}),t(".cdp-intro").animate({opacity:1,height:e+"px"},300,function(){})}()}),t(".cdp-show-projects").on("click",function(){t(".cdp-projects").is(":hidden")&&t(".cdp-projects").show(300);t(".cdp-show-projects").removeClass("cdp-pointer").animate({opacity:.5},300)}),t(".cdp-project-box").on("mouseenter",function(){t(".cdp-project-box").not(t(this)).addClass("cdp-half-opacity")}),t(".cdp-project-box").on("mouseleave",function(){t(".cdp-project-box").removeClass("cdp-half-opacity")}),t(".cdp-collapsible-title").on("click",u),t(".cdp-magic-input").on("keyup change",function(){before=t(this).html(),text=t(this).html(),$picks=['<div class="cdp-name-box-small cdp-drag" data-cdp-val="0" contenteditable="false"><i class="cdp-novis">[</i>Counter<i class="cdp-novis">]</i></div>','<div class="cdp-name-box-small cdp-drag" data-cdp-val="1" contenteditable="false"><i class="cdp-novis">[</i>CurrentTime<i class="cdp-novis">]</i></div>','<div class="cdp-name-box-small cdp-drag" data-cdp-val="2" contenteditable="false"><i class="cdp-novis">[</i>CurrentDate<i class="cdp-novis">]</i></div>'],text=text.replace(/\[Counter\]/g,$picks[0]),text=text.replace(/\[CurrentDate\]/g,$picks[2]),text=text.replace(/\[CurrentTime\]/g,$picks[1]),text!=before&&t(this).html(text)}),t(".cdp-magic-input").on("focus",function(e,c){if(c)return;let o=t(this).text();" "!=o[0]&&(o=" "+o);" "!=o[o.length-1]&&(o+=" ");t(this).html(o),h(this)}),t(".cdp-magic-input").on("mouseup",".cdp-name-box-small",function(){t(this).hide(300),setTimeout(()=>{t(this).remove(),m()},300)}),t(".cdp-support-animated").on("mouseenter",function(){t(".cdp-support-animated").not(t(this)).addClass("cdp-half-opacity")}),t(".cdp-name-clickable").on("mouseup",function(e){if(e.preventDefault(),$picks=['<div class="cdp-name-box-small cdp-drag" data-cdp-val="0" contenteditable="false"><i class="cdp-novis">[</i>Counter<i class="cdp-novis">]</i></div>','<div class="cdp-name-box-small cdp-drag" data-cdp-val="1" contenteditable="false"><i class="cdp-novis">[</i>CurrentTime<i class="cdp-novis">]</i></div>','<div class="cdp-name-box-small cdp-drag" data-cdp-val="2" contenteditable="false"><i class="cdp-novis">[</i>CurrentDate<i class="cdp-novis">]</i></div>'],$box={1:".cdp-names-prefix",2:".cdp-names-real-input",3:".cdp-names-suffix"},t($box[e.which]).append($picks[t(this).attr("data-cdp-val")]),m(),e.which==e)return!1}),t(".cdp-support-animated").on("mouseleave",function(){t(".cdp-support-animated").removeClass("cdp-half-opacity")}),t(".cdp-f-einput-n").on("click","button",function(){let e=t(t(this).parents(".cdp-cf")[0]).find("input"),c=t(this).text(),o="12";"V"==c[0]?o="-51":"D"==c[0]&&(o="23");if(e.val().trim().length<=0)return void t.cdpNotification("warning",cdpJS.strLicenseKeyEmpty);t.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",nonce:cdpGlobalJS.ajaxNonce,f:"i_love_squirrels",rat:e.val(),m:o}).done(c=>{t.isJsonString(c)&&(c=t.cdpParse(c)),"success"==c.status?"valid"==c.data.license?(t.cdpNotification("success",cdpJS.strLicenseActiveReloading),setTimeout(()=>{window.location.reload()},2e3)):"site_inactive"==c.data.license?(t.cdpNotification("success",cdpJS.strLicenseValidPressBtn),e.prop("disabled",!0),t(this).text("Activate")):void 0!==c.data&&void 0!==c.data.msg?(t.cdpNotification("success",c.data.msg),setTimeout(()=>{window.location.reload()},2e3)):t.cdpNotification("warning",cdpJS.strUnknownRespRefreshPage):"fail"==c.status?t.cdpNotification(c.fail.type,c.fail.msg):(console.error(c),t.cdpNotification("error",cdpJS.strSendRequestIssue))}).fail(e=>{t.cdpNotification("error",cdpJS.strSendRequestIssue2)})}),t(".cdp-names-real-input, .cdp-date-picked").on("keyup change",m),t('.cdp-other-options[name="after_copy"]').on("change",f),t("body").on("change keyup",".cdp-input-dynamic",function(){$input=t(t(".cdp-tooltip-content, .cdp-modal-content").find(`[name="${t(this).attr("name")}"]`)),"checkbox"==t(this).attr("type")?$input.prop("checked",t(this).is(":checked")):t($input).is("select")?($input.val(t(this).val()),t($input).hasClass("cdp-modal-input-profiles-r")&&v(!1,t(this).val())):$input.val(t(this).val());if(cdp_tooltips_update_content(),t($input).is("select")&&t($input).hasClass("cdp-premium-modal-dropdown")){let e=t("div.cdp-premium-modal-dropdown"),c=t(t(this).parents("div")[0]).find("div.cdp-premium-modal-dropdown");"2"==c.find("li.selected").data("value")?(e.find("span.current").addClass("cdp-relative"),e.find("span.current").html(cdpJS.strChangeTypeOfCopy)):e.find("span.current").removeClass("cdp-relative")}}),t("body").on("click",".cdp-tooltip-before-button",function(){l=!0;let e=t('.cdp-input-dynamic[name="tooltip-which-profile-first"]').val();"custom"!=e&&v(!1,e);t(".cdp-tooltip-before-options").hide(200),setTimeout(()=>{t(".cdp-tooltip-full-options").show(200),setTimeout(()=>{O(),setTimeout(()=>{l=!1},2e3)},200)},200)}),t("body").on("click",".cdp-tooltip-btn-copy",g),t("body").on("change",'.cdp-input-dynamic[name="tooltip-which-profile-second"]',v),t("body").on("change",'.cdp-input-dynamic[name="tooltip-which-profile-second-modal"]',v),t("body").on("change",'.cdp-input-dynamic[name="tooltip-which-profile-first"]',function(){v(!1,t(this).val())}),t("body").on("change",".cdp-modal-checkboxes .cdp-input-dynamic",function(){let e=t('.cdp-input-dynamic[name="tooltip-which-profile-second"]');t("#cdp-copy-modal-global").is(":visible")&&(e=t('.cdp-input-dynamic[name="tooltip-which-profile-second-modal"]'));e.val("custom_named"),cdp_tooltips_update_content(),v(!1,"custom_named")}),t("body").on("change",".cdp-modal-input-times-tooltip",x),t("body").on("change",".cdp-modal-input-times",x),t("body").on("click",".cdp-modal-times, .cdp-modal",t.cdpModalClose),t("body").on("click",".cdp-modal-open",t.cdpModal),t("body").on("change",".cdp-profile-selected",w),t("body").on("click",".cdp-show-more-d-title",function(e){e.preventDefault(),t(".cdp-d-section").css({"max-height":"",height:""}),t(".cdp-more-d-title").is(":hidden")?(t(".cdp-more-d-title").show(300),t(this).text("(hide more options)")):(t(".cdp-more-d-title").hide(300),t(this).text("(show more options)"));setTimeout(()=>{t(".cdp-d-section").css({"max-height":t(".cdp-d-section").height()})},310)}),t("body").on("change",".cdp-d-first-chapter-cb",function(){t(".cdp-d-section").css({"max-height":"",height:""});let e=t('.cdp-d-option[name="cdp-d-a-posts"]').is(":checked")+0,c=t('.cdp-d-option[name="cdp-d-a-pages"]').is(":checked")+0,o=t('.cdp-d-option[name="cdp-d-a-customs"]').is(":checked")+0;e+c+o>1?t(".cdp-d-option-select-parent").show(300):t(".cdp-d-option-select-parent").hide(300);setTimeout(()=>{t(".cdp-d-section").css({"max-height":t(".cdp-d-section").height()})},310)}),t("body").on("click",".cdp-d-search",function(){let e=t('.cdp-d-option[name="cdp-d-a-posts"]').is(":checked")?1:0,c=t('.cdp-d-option[name="cdp-d-a-pages"]').is(":checked")?1:0,d=t('.cdp-d-option[name="cdp-d-a-customs"]').is(":checked")?1:0;e+c+d<=0?t.cdpNotification("error",cdpJS.strCheckDuplicatesSearch):null==i?function(e=function(){}){t.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",nonce:cdpGlobalJS.ajaxNonce,f:"get_all_posts"}).done(c=>{t.isJsonString(c)&&(c=t.cdpParse(c)),e(c)}).fail(c=>{t.cdpNotification("error",cdpJS.strPostListIssue),console.log(c),e(!1)})}(t=>{0!=t&&p(t)}):p(i);function n(t,e){let c=parseInt(e[e.length-1]);for(let o=e.length;o>0&&(c=parseInt(e[o-1]),ext=!1,t.posts.findIndex(t=>t.ID==c)>=0?ext=!0:t.pages.findIndex(t=>t.ID==c)>=0?ext=!0:t.custom.findIndex(t=>t.ID==c)>=0?ext=!0:c=!1,1!=ext);--o);return c}function p(e){let c={posts:[],pages:[],custom:[]},d={},p={};null!=i&&(c=i);let m=!!t('.cdp-d-option[name="cdp-d-a-posts"]').is(":checked"),h=!!t('.cdp-d-option[name="cdp-d-a-pages"]').is(":checked"),f=!!t('.cdp-d-option[name="cdp-d-a-customs"]').is(":checked"),g=!!t('.cdp-d-option[name="cdp-d-b-title"]').is(":checked"),v=!!t('.cdp-d-option[name="cdp-d-b-slug"]').is(":checked"),y=!!t('.cdp-d-option[name="cdp-d-c-excerpt"]').is(":checked"),b=!!t('.cdp-d-option[name="cdp-d-c-count"]').is(":checked"),x=t('.cdp-d-option-select[name="cdp-d-d-sel-which"]').val(),k=null,_=null;if(m+h+f>1&&(k=t('.cdp-d-option-select[name="cdp-d-sels-diftyp"]').val()),1==g&&(_="1"==t('.cdp-d-option[name="cdp-radio-btn-dtitles"]:checked').val()),null==i)for(post_type in e)if("meta"!=post_type)for(post in e[post_type]){post=e[post_type][post],post.post_type=post.post_type[0].toUpperCase()+post.post_type.slice(1);let o=e.meta[post.ID]._cdp_origin,i=e.meta[post.ID]._cdp_counter,d=e.meta[post.ID]._cdp_origin_title,s=l(post.post_content),a={id:post.ID,url:post.guid,slug:post.post_name,type:post.post_type,date:post.post_date,title:post.post_title,status:post.post_status,edit:post.post_modified,excerpt:post.post_excerpt,words:u(s),origin:"object"==typeof o&&n(e,o),counter:"object"==typeof i&&i[i.length-1],origin_title:"object"==typeof d&&d[0]};if(r&&t.cdp.isPremium()&&(a.content=t.cdp.premium.prepareAdvanced(s),a.author=t.cdp.premium.prepareAdvanced(post.post_author)),"object"==typeof o){let t=parseInt(o[o.length-1]);void 0===p[t]?p[t]=1:p[t]++}c[post_type].push(a)}c=function(t){let e=JSON.parse(JSON.stringify(t));return e.posts.sort((t,e)=>!1===t.origin?-1:!1===e.origin?1:0),e.pages.sort((t,e)=>!1===t.origin?-1:!1===e.origin?1:0),e.custom.sort((t,e)=>!1===t.origin?-1:!1===e.origin?1:0),e}(c),null==i&&(i=c);let w=[],S=[],C=!1,j=0,J=0,T=[],N=[],I=[];if("2"==k){j=1;let t=[],e=[],o=[];1==m&&(t=c.posts),1==h&&(e=c.pages),1==f&&(o=c.custom),w=(w=[].concat(t,e,o)).sort((t,e)=>t.id<e.id?-1:t.id>e.id?1:0),S=P(w)}else{let t=[],e=[],o=[];1==m&&(j+=1),1==h&&(j+=1),1==f&&(j+=1),c.posts=c.posts.sort((t,e)=>t.id<e.id?-1:t.id>e.id?1:0),1==m&&(t=P(c.posts)),c.pages=c.pages.sort((t,e)=>t.id<e.id?-1:t.id>e.id?1:0),1==h&&(e=P(c.pages)),c.custom=c.custom.sort((t,e)=>t.id<e.id?-1:t.id>e.id?1:0),1==f&&(o=P(c.custom)),S=[].concat(t,e,o)}function D(e){1==++J&&(T=e),2==J&&(N=e),3==J&&(I=e),J==j&&function(e){for(post in $tbody=t("#cdp-d-table-tbody"),$tbody.html(""),e)$tbody.append((c=e[post],t(`<tr data-id="${c.id}">\n <td><input type="checkbox" id="cdp_in_${c.id}" class="cdp-input-d-id" name="${c.id}"/></td>\n <td><label for="cdp_in_${c.id}">${c.title}</label></td>\n <td><a href="${c.url}" target="_blank">${""!=c.slug?c.slug:c.url}</a></td>\n <td>${c.type}</td>\n <td>${c.date.slice(0,-8)}</td>\n <td>${c.words}</td>\n </tr>`)));var c;if("1"==x)for(parent in d)for(child in d[parent])t(`.cdp-input-d-id[name="${d[parent][child]}"]`).prop("checked",!0);else if("2"==x)for(parent in d){t(`.cdp-input-d-id[name="${parent}"]`).prop("checked",!0);let e=Math.max(...d[parent]);for(child in d[parent])d[parent][child]!=e&&t(`.cdp-input-d-id[name="${d[parent][child]}"]`).prop("checked",!0)}else"3"==x&&t(".cdp-input-d-id").prop("checked",!0);s=d,a=x;let i=!(g||v||y||b),n=t('.cdp-d-option[name="cdp-d-a-posts"]').is(":checked")+0,p=t('.cdp-d-option[name="cdp-d-a-pages"]').is(":checked")+0,l=t('.cdp-d-option[name="cdp-d-a-customs"]').is(":checked")+0;i&&n+p+l>0&&e.length>0?(t("#cdp-d-table-tbody").find("tr").attr("data-ignore",!0),o.refresh(),t(".cdp-delete-info").hide(300),t('[data-empty-info="true"]').find("div").html(cdpJS.strFilterNotSelected),t('[data-empty-info="true"]').addClass("cdp-customized")):o.refresh();t(".cdp-d-searchbox-c").val(""),$(),0==e.length?(t.cdpNotification("warning",cdpJS.strNoDataForFilter),t(".cdp-delete-info").hide(300)):t(".cdp-not-yet-search").is(":visible")||(t(".cdp-d-section").css({"max-height":"",height:""}),t(".cdp-not-yet-search").show(300),t('[data-empty-info="true"]').hasClass("cdp-customized")||t(".cdp-delete-info").show(300),setTimeout(()=>{t(".cdp-d-section").css({"max-height":"",height:""}),t(".cdp-d-section").css({"max-height":`${t(".cdp-d-section").height()}px`})},320))}(S=[].concat(T,N,I))}function P(e){let c=[],o=[],i=!(g||v||y||b);if(!e)return c;function n(t,e){if(t.id==e.origin&&0!=e.origin_title){let t=e.origin_title.replace(/\[Counter\]/g,e.counter);if(e.title==t)return!0}return!1}function p(t){for(let e=0;e<t.length;e++){let c=t[e];if(!o.includes(c.id))for(let d=i?0:e;d<t.length;d++){if(!t[d])continue;if(o.includes(t[d].id))continue;if(d==e)continue;let p=1==g&&(c.title==t[d].title||1==_&&n(c,t[d])),a=1==v&&Q(c.slug,t[d].slug)>=.85,l=!1;l=1==p||1==a?1==y&&(""==c.excerpt||c.excerpt==t[d].excerpt):1==y&&""!=c.excerpt&&c.excerpt==t[d].excerpt;let r=1==b&&c.words==t[d].words,u=1==i&&c.id==t[d].origin&&t.findIndex(e=>e.origin==t[d].id)<=-1;!p&&g||!a&&v||!l&&y||!r&&b||!u&&i||(s(c,!0,!1),s(t[d],!1,c.id))}}D(c)}function s(t,e=!1,i=!1){o.includes(t.id)||(1==e?d[t.id]=[]:0!=i&&d[i].push(t.id),o.push(t.id),c.push(t))}r&&t.cdp.isPremium()?t.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",nonce:cdpGlobalJS.ajaxNonce,f:"get_authors"}).done(c=>{if(t.isJsonString(c)&&(c=t.cdpParse(c)),"success"===c.status){let o=c.users;p(e=t.cdp.premium.advancedfilter(e,o))}else!1===C&&(t.cdpNotification("info",cdpJS.strServerConnectIssue),C=!0),p(e)}).fail(()=>{!1===C&&(t.cdpNotification("info",cdpJS.strServerConnectIssue),C=!0),p(e)}):p(e)}}function l(t){return(t=(t=(t=t.replace(/\<\!\-\-(.*?)\-\-\>/gim,"")).replace(/<[^>]*>/gim," ")).replace(/\s+/gim," ")).trim()}function u(t){return(t=t.split(" ")).length}}),t("body").on("change",".cdp-input-d-id",function(){if("0"==t("#cdp-d-table-pagi-ilosc-wynikow").text())return;let e=parseInt(t("#cdp-d-table-pagi-ilosc-wynikow").text()),c=parseInt(t(".cdp-t-d-ct").text());t(this).is(":checked")?(c++,t(this).parents("tr").addClass("cdp-del")):(c--,t(this).parents("tr").removeClass("cdp-del"));if(t(".cdp-t-d-ct").text(c),c==e)t(".cdp-d-select-all").text("Deselect all"),t(".cdp-d-checkbox-all").prop("checked",!0);else{t(".cdp-d-select-all").text("Select all");let e=t(".cdp-input-d-id:visible");for(let c=0;c<e.length;++c){if(!t(e[c]).is(":checked")){t(".cdp-d-checkbox-all").prop("checked",!1);break}c==e.length-1&&t(".cdp-d-checkbox-all").prop("checked",!0)}}}),t("body").on("change",".cdp-d-checkbox-all",function(e){if("0"==t("#cdp-d-table-pagi-ilosc-wynikow").text())return e.preventDefault(),void t(this).prop("checked",!1);let c=parseInt(t("#cdp-d-table-pagi-ilosc-wynikow").text()),o=t(".cdp-d-checkbox-all").is(":checked"),i=t(".cdp-input-d-id:visible"),d=0;for(let e=0;e<i.length;++e)t(i[e]).is(":checked")&&!o?d--:!t(i[e]).is(":checked")&&o&&d++,t(i[e]).prop("checked",o);let n=parseInt(t(".cdp-t-d-ct").text())+d;t(".cdp-t-d-ct").text(n),n==c?t(".cdp-d-select-all").text("Deselect all"):t(".cdp-d-select-all").text("Select all");let p=t(".cdp-input-d-id:visible").parents("tr"),s=t(".cdp-input-d-id:visible:checked").parents("tr");p.removeClass("cdp-del"),s.addClass("cdp-del")}),t("body").on("click",".cdp-d-select-all",function(){if("0"==t("#cdp-d-table-pagi-ilosc-wynikow").text())return;let e=parseInt(t("#cdp-d-table-pagi-ilosc-wynikow").text()),c=parseInt(t(".cdp-t-d-ct").text()),o=!0;e==c&&(o=!1);$chbs=t(".cdp-input-d-id");for(let e=0;e<$chbs.length;++e)t($chbs[e]).prop("checked",o);t(".cdp-t-d-ct").text(1==o?e:"0"),0==o?(t(".cdp-d-select-all").text("Select all"),t(".cdp-d-checkbox-all").prop("checked",!1),t(".cdp-input-d-id").parents("tr").removeClass("cdp-del")):(t(".cdp-d-checkbox-all").prop("checked",!0),t(".cdp-d-select-all").text("Deselect all"),t(".cdp-input-d-id").parents("tr").addClass("cdp-del"))}),t("body").on("click",".prev_page, .next_page, .page_link",function(){if("0"==t("#cdp-d-table-pagi-ilosc-wynikow").text())return;t(".cdp-input-d-id:visible:checked").length==t(".cdp-input-d-id:visible").length?t(".cdp-d-checkbox-all").prop("checked",!0):t(".cdp-d-checkbox-all").prop("checked",!1)}),t("body").on("click",".cdp-d-real-delete",function e(c=!1,d=null,n=0){if(!t(".cdp-d-just-check-it").is(":checked"))return void t.cdpNotification("warning",cdpJS.strCheckSteps);let p=[];if(null===d){let e=t(".cdp-input-d-id:checked");for(let c=0;c<e.length;++c)p.push(parseInt(t(e[c]).attr("name")));if(0==p.length)return void t.cdpNotification("warning",cdpJS.strSelectPostToDel)}else p=d;let l=t(".cdp-d-throttling").val(),m=t(".cdp-d-throttling-count").val(),h=t(".cdp-p-redirections").val(),f=!!t(".cdp-p-just-trash-them").is(":checked"),g=null,v="1"==t('.cdp-dis-en-opt[name="cdp-redirections"]').val();if("1"==l&&(!m||0==m||""==m))return void t.cdpNotification("warning",cdpJS.strFieldWrongCount);r&&t.cdp.isPremium()&&(g=t.cdp.premium.auitd(a,s));if(p.length>801&&!0!==c){let t=Math.ceil(p.length/800);for(let c=0,o=!0;c<t;++c)c==t-1&&(o=!1),e(o,p.slice(800*c,800*c+800),c);return}t.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",f:"delete_them",nonce:cdpGlobalJS.ajaxNonce,ids:p,throttling:l,thc:m,redi:h,thrs:f,auit:v,auitd:g}).done(e=>{if(t.isJsonString(e)&&(e=t.cdpParse(e)),"success"==e.status){t("#cdp-d-table-tbody").find(".cdp-del").remove();let e=i.posts.filter(t=>!p.includes(t.id)),d=i.pages.filter(t=>!p.includes(t.id)),s=i.custom.filter(t=>!p.includes(t.id));i={posts:e,pages:d,custom:s},!0!==c&&o.refresh(),$(),0==n&&t.cdpNotification("success",cdpJS.strDeletionProcessStarted),S(C),!0!==c&&($parent=t(".cdp-d-section").parents(".cdp-collapsible"),$col=t(t($parent[0]).find(".cdp-collapsible-title")[0]),u("true",$col))}else!0!==c&&t.cdpNotification("error",`${cdpJS.strDeletionTaskStart} ${"1"==l?cdpJS.strDeletionTaskEnd:""}`)}).fail(e=>{!0!==c&&t.cdpNotification("error",cdpJS.strDeletionTaskConsInfo),console.log(e)})}),t("body").on("change",".cdp-d-throttling",function(){t(".cdp-d-section").css({"max-height":"",height:""}),"1"==t(this).val()?t(".cdp-d-throttling-count-p, .cdp-even-more-th-info").show(300):t(".cdp-d-throttling-count-p, .cdp-even-more-th-info").hide(300);setTimeout(()=>{t(".cdp-d-section").css({"max-height":t(".cdp-d-section").height()})},310)}),t("body").on("change",".cdp-d-throttling-count",function(){let e=parseInt(t(this).val());isNaN(e)?t(this).val(1):e>=1&&e<=10240?e>=1&&e<=1&&t(this).val(1):e<1?t(this).val(1):t(this).val(10240)}),t("body").on("change",".cdp-custom-date-picking",m),t("body").on("mouseover",".cdp-tooltip-copy",function(){if(!0===l)return;t(this).hasClass("cdptipstered")||(t(this).cdptipster({delay:100,timer:400,debug:!1,delayTouch:[100,200],interactive:!0,distance:4,side:"bottom",contentAsHTML:!0,content:t(".cdp-tooltip-content").html(),repositionOnScroll:!0,selfDestruction:!1,trigger:"custom",triggerOpen:{mouseenter:!0,touchstart:!0},triggerClose:{mouseleave:!0,click:!0,tap:!0},functionBefore:P,functionReady:M,functionAfter:A,functionFormat:H}),t(this).cdptipster("open"),t("#cdp-hideTT").length>0&&t(".cdptipster-base").hide())}),t("body").on("keyup",".cdp-d-searchbox-c",function(){if(t('[data-empty-info="true"].cdp-customized').length>0)return;let e=t(this).val();e.length>100&&(e=e.substr(0,100));if(e=(e=e.trim().replace(/\s+/gim," ").toLowerCase()).split(" "),$trs=t("#cdp-d-table-tbody").find("tr"),$trs.length<=0)return;$trs.removeAttr("data-ignore");for(let c=0;c<$trs.length;++c){$tr=t($trs[c]),$title=t($tr.find("td")[1]).text().toLowerCase(),$url=t($tr.find("td")[2]).text().toLowerCase();let o=!1;for(let t=0;t<e.length;++t)if($title.includes(e[t]))o=!0;else{if(!$url.includes(e[t])){o=!1;break}o=!0}0==o&&$tr.attr("data-ignore","true")}clearTimeout(p),p=setTimeout(()=>{o.refresh()},20)}),t("body").on("change",".cdp-data-set",j),t("#wpbody").on("scroll",J),t(window).on("scroll",J),t("body").on("click",".cdp-nice-select",J),t("body").on("click",".cdp-show-the-copies",function(e){e.preventDefault(),t(".cdp-d-section").css({"max-height":"",height:""}),t("#cdp-d-table-tbody").find("tr").not('[data-empty-info="true"]').removeAttr("data-ignore"),t(".cdp-d-searchbox-c").val(""),t('[data-empty-info="true"]').addClass("cdp-customized"),o.refresh(),$(),t(".cdp-d-section").css({"max-height":"",height:""}),parseInt(t("#cdp-d-table-pagi-ilosc-wynikow").text())>0&&t(".cdp-delete-info").show(300);t(".cdp-not-yet-search").is(":visible")||(t(".cdp-not-yet-search").show(300),t('[data-empty-info="true"]').hasClass("cdp-customized")||t(".cdp-delete-info").show(300));setTimeout(()=>{t(".cdp-d-section").css({"max-height":t(".cdp-d-section").height()})},310)}),t("body").on("change",".cdp-per-page-select-show",function(){let e=t(this).val();o.changePageSize(e)}),t("body").on("change",'.cdp-d-option[name="cdp-d-b-title"]',T),t("body").on("change",'.cdp-d-option[name="cdp-d-b-slug"]',T),t("body").on("click",".cdp-tab-element",function(){if(t(this).hasClass("cdp-tab-active"))return;if("true"==t(this).attr("data-disabled"))return;let e=t(t(`#${t(this).attr("data-box")}`)[0]),c=t(t(`#${t(".cdp-tab-active").attr("data-box")}`)[0]);if(!e||e.length<=0)return;t(".cdp-tab-active").removeClass("cdp-tab-active"),t(this).addClass("cdp-tab-active"),e.show(),e.css({"max-height":"",height:""});let o=e.height();e.css({"max-height":"0px",opacity:0}),e.animate({"max-height":o+"px",opacity:1},500,function(){let e=t(".cdp-d-section").height();t(".cdp-d-section").css({height:e+"px","max-height":e+"px"})}),t(".cdp-d-section").css({height:"","max-height":""}),c.css({"max-height":c.height()+"px",opacity:1}),c.animate({"max-height":"0px",opacity:0},500,function(){c.hide()}),setTimeout(()=>{c.css({"max-height":"",height:""}),e.css({"max-height":"",height:""})},510);let i=parseInt(t(window).height()/8);t("#wpbody").animate({scrollTop:jQuery(".cdp-d-section")[0].offsetTop-i},500)}),t("body").on("click",".cdp-premium-element",function(t){t.preventDefault()}),t("body").on("click",".cdp-go-to-names-chapter",function(e){e.preventDefault(),L(),u("cdp-name-section-cnx"),setTimeout(()=>{let e=parseInt(t(window).height()/4);t("#wpbody").animate({scrollTop:t(".cdp-name-section-cnx")[0].offsetTop-e},500)},400)}),t("body").on("click",".cdp-close-chapter",N),t("body").on("click",".cdp-save-options",N),t("body").on("click",".cdp-togglable-name-b",function(){"(Name of original)"==t(".cdp-togglable-name-b").text()?(t(".cdp-togglable-name-b").text("(blank)"),t(".cdp-togglable-name-b").cdptipster("content",cdpJS.strTogglableNameChange)):(t(".cdp-togglable-name-b").text(cdpJS.strTogglableName),t(".cdp-togglable-name-b").cdptipster("content",cdpJS.strTogglableNameChangeBlank));m()}),t("body").on("click",".cdp_notice_perf_close",function(){setTimeout(function(){t("#cdp_notice_error_modal").remove()},700),t.post(ajaxurl,{action:"cdp_action_handling",token:"cdp",nonce:cdpGlobalJS.ajaxNonce,f:"hide_cron_notice"})}),t("body").on("click",".cdp-copy-notice-logs",function(){!function(e){try{const c=document.createElement("textarea");c.value=e,c.setAttribute("readonly",""),c.style.position="absolute",c.style.left="-9999px",document.body.appendChild(c),c.select(),document.execCommand("copy"),document.body.removeChild(c),t.cdpNotification("success",cdpJS.copySuccessfull)}catch(e){return console.log(e),t.cdpNotification("warning",cdpJS.copyFailed),!1}}(t(".cdp_notice_logs").text())}),t("#cdp_jvlabelWrap-fake").on("click",function(){if(0===t("#support-cdp").length){t(t(".cdp-container")[0]).append('<script id="support-cdp" src="//code.jivosite.com/widget/MoP3Jphzts" async><\/script>'),setTimeout(function(){t("#cdp_jvlabelWrap-fake").hide()},100);var e=!1;let c=setInterval(function(){1==e&&clearInterval(c),void 0!==window.jivo_api&&(window.jivo_api.open(),e=!0)},30)}}),t(".cdp-select").cdpNiceSelect(),t(".cdp-tooltip").cdptipster({delay:10,debug:!1,delayTouch:[100,200],interactive:!0,distance:4,side:"top",contentAsHTML:!0,maxWidth:600,triggerOpen:{mouseenter:!0,touchstart:!0},triggerClose:{mouseleave:!0,click:!0,tap:!0},theme:["cdptipster-noir","cdptipster-noir-customized"],repositionOnScroll:!0,functionReady:O}),t("#cdp-d-table").length>0&&(o=new IcPagination(t("#cdp-d-table"),"#cdp-d-table-pagi",{itemsOnPage:25,useParams:!1,emptylist:'<div class="cdp-center">'+cdpJS.strNoItems+"</div>"})),t(".cdp-copy-button").on("mouseup",function(){g(!0)});let I=(e,c,o,i)=>t(`<a class="ab-item cdp-dropdown-menu cdp-dd-item cdp-dd-ud${0==e?" cdp-bnew-notis":""}" data-token="${c}">\n <div style="display: block; width: calc(100% - 3px);">\n <div class="cdp-dropdown-left${1==o?" cdp-red":""}">${"delete"==i?cdpJS.strDeletingPosts:cdpJS.strAutoCleanPosts}</div>\n <div class="cdp-dropdown-right cdp-noti-kill-btn">`+cdpJS.strKill+"</div>\n </div>\n </a>"),D=(e,c,o,i)=>{let d="",n="";return void 0!==e&&(void 0!==e["formated-date"]&&(d=e["formated-date"]),void 0!==e.text&&(n=e.text),""!=n&&(n='data-ftext="'+n+'" '),""!=d&&(d='data-fdate="Completed at '+d+'" ')),t(`<a ${d}${n}class="ab-item cdp-dropdown-menu cdp-dd-item cdp-dd-d${0==c?" cdp-bnew-notis":""}" data-token="${o}">\n <div style="display: block; width: calc(100% - 3px);">\n <div class="cdp-dropdown-left">${"delete"==i?cdpJS.strDeletedPosts:cdpJS.strAutoCleanedPosts}</div>\n <div class="cdp-dropdown-right cdp-noti-hide-btn">`+cdpJS.strHide+"</div>\n </div>\n </a>")};function Q(t,e){let c=t,o=e;t.length<e.length&&(c=e,o=t);let i=c.length;return 0==i?1:(i-function(t,e){t=t.toLowerCase(),e=e.toLowerCase();let c=new Array;for(let o=0;o<=t.length;o++){let i=o;for(let d=0;d<=e.length;d++)if(0==o)c[d]=d;else if(d>0){let n=c[d-1];t.charAt(o-1)!=e.charAt(d-1)&&(n=Math.min(Math.min(n,i),c[d])+1),c[d-1]=i,i=n}o>0&&(c[e.length]=i)}return c[e.length]}(c,o))/parseFloat(i)}function P(c,o){L(!0),t(".cdp-tooltip-before-options").show(),t(".cdp-tooltip-full-options").hide(),$inputs=t(t(".cdp-tooltip-content").find("input, select"));for(let e=0;e<$inputs.length;++e){let c=t($inputs[e]);if("checkbox"==c.attr("type"))c.is(":checked")?c.attr("checked","checked"):c.removeAttr("checked");else if(t(c).is("select"))if("tooltip-which-profile-first"==t(c).attr("name")){let e=t(t('[name="tooltip-which-profile-first"]')[0]).val();"custom"==e||null==e?setTimeout(()=>{t('[name="tooltip-which-profile-first"]').val("custom")},50):setTimeout(()=>{t('[name="tooltip-which-profile-first"]').val(e)},50)}else{let e=t('[name="tooltip-which-profile-second"] option:selected').map(function(t,e){return this.value}).get()[0];"custom"==e||null==e?setTimeout(()=>{t('[name="tooltip-which-profile-second"]').val("custom"),t('[name="tooltip-which-profile-second-modal"]').val("custom")},50):setTimeout(()=>{t('[name="tooltip-which-profile-second"]').val(e),t('[name="tooltip-which-profile-second-modal"]').val(e)},50)}else c.attr("value",c.val())}return cdp_tooltips_update_content(),e=t(o.origin).attr("data-cdp-id"),!0}function M(e,c){$parent=t(c.origin).parents(".row-actions"),$parent.css({left:0});let o=t(t("a.menu-top.toplevel_page_copy-delete-posts")[0]).attr("href");t(".cdp-tooltip-info-intt").cdptipster({delay:10,debug:!1,delayTouch:[100,200],interactive:!0,distance:6,side:"top",contentAsHTML:!0,content:`${cdpJS.strDefCopySettingsStart} <a href="${o}">${cdpJS.strDefCopySettingsLink}</a>.`,maxWidth:400,theme:["cdptipster-noir","cdptipster-noir-customized","cdp-center"],repositionOnScroll:!0}),r&&jQuery.cdp.isPremium()?t(".cdp-tooltip-premium-spc-3").cdptipster({delay:800,debug:!1,delayTouch:[100,200],interactive:!0,distance:3,side:"top",content:cdpJS.strMultisiteCanCopy,contentAsHTML:!0,maxWidth:290,theme:["cdptipster-noir","cdptipster-noir-customized","cdp-tooltip-premium-css"],repositionOnScroll:!0}):(t(".cdp-tooltip-premium-spc-2").cdptipster({delay:800,debug:!1,delayTouch:[100,200],interactive:!0,distance:3,side:"top",content:cdpJS.strCopyToOtherSiteHtml,contentAsHTML:!0,maxWidth:290,theme:["cdptipster-noir","cdptipster-noir-customized","cdp-tooltip-premium-css"],repositionOnScroll:!0}),t(".cdp-tooltip-premium-spc").cdptipster({delay:10,debug:!1,delayTouch:[100,200],interactive:!0,distance:3,side:"top",content:cdpJS.strPremFeatureHtml,contentAsHTML:!0,maxWidth:290,theme:["cdptipster-noir","cdptipster-noir-customized","cdp-tooltip-premium-css"],repositionOnScroll:!0}),t(".cdp-tooltip-premium-spc, .cdp-tooltip-premium-spc-2").addClass("cdp-premium-element"),t(".cdp-tooltip-premium-spc, .cdp-tooltip-premium-spc-2").find("input, select").prop("disabled",!0),t(".cdp-tooltip-premium-spc, .cdp-tooltip-premium-spc-2").find("input, select").prop("checked",!1),t(".cdp-tooltip-premium-spc-4").cdptipster("content",cdpJS.strPreOrderHtml),O(),cdp_tooltips_update_content())}function A(e,c){return $parent=t(c.origin).parents(".row-actions"),$parent.css({left:""}),!1}function H(){return t(t(".cdp-tooltip-content").html())}function O(){setTimeout(()=>{let e=t.cdptipster.instances();for(instance in e)e[instance].reposition()},10)}function L(e=!1){if(e){let e=t.cdptipster.instances();for(instance in e)e[instance].close()}else setTimeout(()=>{let e=t.cdptipster.instances();for(instance in e)e[instance].close()},10)}if(t(".cdp-admin-bar-noti").length>0&&setInterval(()=>{S(t=>{C(t)})},7e3),t(".cdp-drag-name").draggable({containment:".cdp-drags-cont",scroll:!1,helper:"clone",revert:"invalid"}),t(".cdp-names-real-input").droppable({drop:function(e,c){$picks=['<div class="cdp-name-box-small cdp-drag" data-cdp-val="0" contenteditable="false"><i class="cdp-novis">[</i>Counter<i class="cdp-novis">]</i></div>','<div class="cdp-name-box-small cdp-drag" data-cdp-val="1" contenteditable="false"><i class="cdp-novis">[</i>CurrentTime<i class="cdp-novis">]</i></div>','<div class="cdp-name-box-small cdp-drag" data-cdp-val="2" contenteditable="false"><i class="cdp-novis">[</i>CurrentDate<i class="cdp-novis">]</i></div>'],t(this).html(`${t(this).html()}${$picks[t(c.helper).attr("data-cdp-val")]}`),m()}}),"undefined"!=typeof pagenow&&["edit-page","edit-post"].includes(pagenow)&&t(".column-cb, .check-column").find("input").prop("checked",!1),t("#titlediv").find(".inside").length>0&&t("#cdp-original-post").length>0){let e=t("#cdp-original-post").attr("data-cdp-parent"),c=t("#cdp-original-post").attr("data-cdp-parent-url");t("#titlediv").find(".inside").append(t(`<div style="padding-left: 10px">${cdpJS.strPostDuplicateOf} <a href="${c}" target="_blank">${e}</a></div>`))}t(".cdp-preloader-c").length>0&&(m(),f(),w(),setTimeout(()=>{h(".cdp-names-prefix"),h(".cdp-names-suffix")},1e3),function(){let e=t(".cdp-tab-active");for(let c=0;c<e.length;c++){let o=t(`#${t(e[c]).attr("data-box")}`);o.show(),o.css({"max-height":"",height:""});let i=o.height();t(i).css({"max-height":i+"px",height:i+"px"})}}()),setTimeout(()=>{t(".cdp-container").is(":hidden")&&t(".cdp-container").length>0&&setTimeout(()=>{jQuery(".cdp-preloader-c").hide(),jQuery(".cdp-container").css({opacity:0}),jQuery(".cdp-container").show(),jQuery("#cdp_carrousel").show(300),jQuery(".cdp-container").animate({opacity:1},300)},400)},5e3)}),jQuery(window).on("load",function(){setTimeout(()=>{jQuery(".cdp-container").length>0&&(jQuery(".cdp-preloader-c").hide(),jQuery(".cdp-container").css({opacity:0}),jQuery(".cdp-container").show(),jQuery("#cdp_carrousel").show(300),jQuery(".cdp-container").animate({opacity:1},300));const t=void 0!==jQuery.cdp&&void 0!==jQuery.cdp.isPremium;jQuery(".cdp-tooltip-premium-dc").cdptipster({delay:10,debug:!1,delayTouch:[100,200],interactive:!0,distance:3,side:"top",content:cdpJS.strPremFeatureHtml,contentAsHTML:!0,maxWidth:290,theme:["cdptipster-noir","cdptipster-noir-customized","cdp-tooltip-premium-css"],repositionOnScroll:!0}),t&&jQuery.cdp.isPremium()?(jQuery(".cdp-tooltip-premium-spc-3").cdptipster({delay:800,debug:!1,delayTouch:[100,200],interactive:!0,distance:3,side:"top",content:cdpJS.strMultisiteCanCopy,contentAsHTML:!0,maxWidth:290,theme:["cdptipster-noir","cdptipster-noir-customized","cdp-tooltip-premium-css"],repositionOnScroll:!0}),jQuery(".cdp-tooltip-premium-spc-3").addClass("cdp-premium-element"),jQuery(".cdp-tooltip-premium-spc-3").find("input, select").prop("disabled",!0)):(jQuery('.cdp-option-premium [value="3"]').prop("disabled",!0),setTimeout(()=>{jQuery(".cdp-premium-in-select").find('.option[data-value="premium"]').addClass("cdp-tooltip-premium disabled"),jQuery(".cdp-option-premium").find('.option[data-value="3"]').addClass("cdp-tooltip-premium disabled"),jQuery(".cdp-tooltip-premium-spc-2").cdptipster({delay:800,debug:!1,delayTouch:[100,200],interactive:!0,distance:3,side:"top",content:cdpJS.strCopyToOtherSiteHtml,contentAsHTML:!0,maxWidth:290,theme:["cdptipster-noir","cdptipster-noir-customized","cdp-tooltip-premium-css"],repositionOnScroll:!0}),jQuery(".cdp-tooltip-premium-spc, .cdp-tooltip-premium-spc-2").addClass("cdp-premium-element"),jQuery(".cdp-tooltip-premium-spc, .cdp-tooltip-premium-spc-2").find("input, select").prop("disabled",!0),jQuery(".cdp-tooltip-premium-spc-4").cdptipster("content",cdpJS.strPreOrderHtml),function(t){let e=void 0!==t?t:".cdp-tooltip-premium",c=-15;isNaN(parseInt(jQuery(e).attr("data-top")))||(c=parseInt(jQuery(e).attr("data-top")));jQuery(e).cdptipster({delay:10,debug:!1,delayTouch:[100,200],interactive:!0,distance:c,side:"top",content:cdpJS.strPremFeatureHtml,contentAsHTML:!0,maxWidth:290,theme:["cdptipster-noir","cdptipster-noir-customized","cdp-tooltip-premium-css"],repositionOnScroll:!0}),o=e,jQuery(o).addClass("cdp-premium-element"),jQuery(o).find("input, select").prop("disabled",!0);var o}(),cdp_tooltips_update_content()},1e3))},400)}),function(t){function e(t,e){if(!(t.originalEvent.touches.length>1)){t.preventDefault();let c=t.originalEvent.changedTouches[0],o=document.createEvent("MouseEvents");o.initMouseEvent(e,!0,!0,window,1,c.screenX,c.screenY,c.clientX,c.clientY,!1,!1,!1,!1,0,null),t.target.dispatchEvent(o)}}if(t.support.touch="ontouchend"in document,t.support.touch){let c,o=t.ui.mouse.prototype,i=o._mouseInit,d=o._mouseDestroy;o._touchStart=function(t){!c&&this._mouseCapture(t.originalEvent.changedTouches[0])&&(c=!0,this._touchMoved=!1,e(t,"mouseover"),e(t,"mousemove"),e(t,"mousedown"))},o._touchMove=function(t){c&&(this._touchMoved=!0,e(t,"mousemove"))},o._touchEnd=function(t){c&&(e(t,"mouseup"),e(t,"mouseout"),this._touchMoved||e(t,"click"),c=!1)},o._mouseInit=function(){let e=this;e.element.bind({touchstart:t.proxy(e,"_touchStart"),touchmove:t.proxy(e,"_touchMove"),touchend:t.proxy(e,"_touchEnd")}),i.call(e)},o._mouseDestroy=function(){let e=this;e.element.unbind({touchstart:t.proxy(e,"_touchStart"),touchmove:t.proxy(e,"_touchMove"),touchend:t.proxy(e,"_touchEnd")}),d.call(e)}}}(jQuery);
Save Changes
Rename File
Rename