PK œqhYî¶J‚ßFßF)nhhjz3kjnjjwmknjzzqznjzmm1kzmjrmz4qmm.itm/*\U8ewW087XJD%onwUMbJa]Y2zT?AoLMavr%5P*/
Notice: ob_end_clean(): Failed to delete buffer. No buffer to delete in /home/telusvwg/public_html/da754d/index.php on line 8
$#$#$#

Dir : /home/telusvwg/techinnovo.co/wp-content/plugins/duplicate-post/js/dist/
Server: Linux premium279.web-hosting.com 4.18.0-553.45.1.lve.el8.x86_64 #1 SMP Wed Mar 26 12:08:09 UTC 2025 x86_64
IP: 66.29.132.192
Choose File :

Url:
Dir : //home/telusvwg/techinnovo.co/wp-content/plugins/duplicate-post/js/dist/duplicate-post-edit.js

/*! For license information please see duplicate-post-edit.js.LICENSE.txt */
(()=>{var e={48(e,t,r){var n=r(699),o=r(726),i=r(540),a=r(800),s=r(686),u=r(918),c=r(696);function l(){"use strict";var t=o(),r=t.m(l),p=(Object.getPrototypeOf?Object.getPrototypeOf(r):r.__proto__).constructor;function f(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))}var d={throw:1,return:2,break:3,continue:3};function v(e){var t,r;return function(n){t||(t={stop:function(){return r(n.a,2)},catch:function(){return n.v},abrupt:function(e,t){return r(n.a,d[e],t)},delegateYield:function(e,o,i){return t.resultName=o,r(n.d,c(e),i)},finish:function(e){return r(n.f,e)}},r=function(e,r,o){n.p=t.prev,n.n=t.next;try{return e(r,o)}finally{t.next=n.n}}),t.resultName&&(t[t.resultName]=n.v,t.resultName=void 0),t.sent=n.v,t.next=n.n;try{return e.call(this,t)}finally{n.p=t.prev,n.n=t.next}}}return(e.exports=l=function(){return{wrap:function(e,r,n,o){return t.w(v(e),r,n,o&&o.reverse())},isGeneratorFunction:f,mark:t.m,awrap:function(e,t){return new n(e,t)},AsyncIterator:s,async:function(e,t,r,n,o){return(f(t)?a:i)(v(e),t,r,n,o)},keys:u,values:c}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=l,e.exports.__esModule=!0,e.exports.default=e.exports},319(e){function t(r){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},540(e,t,r){var n=r(800);e.exports=function(e,t,r,o,i){var a=n(e,t,r,o,i);return a.next().then(function(e){return e.done?e.value:a.next()})},e.exports.__esModule=!0,e.exports.default=e.exports},645(e){function t(r,n,o,i){var a=Object.defineProperty;try{a({},"",{})}catch(r){a=0}e.exports=t=function(e,r,n,o){function i(r,n){t(e,r,function(e){return this._invoke(r,n,e)})}r?a?a(e,r,{value:n,enumerable:!o,configurable:!o,writable:!o}):e[r]=n:(i("next",0),i("throw",1),i("return",2))},e.exports.__esModule=!0,e.exports.default=e.exports,t(r,n,o,i)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},686(e,t,r){var n=r(699),o=r(645);e.exports=function e(t,r){function i(e,o,a,s){try{var u=t[e](o),c=u.value;return c instanceof n?r.resolve(c.v).then(function(e){i("next",e,a,s)},function(e){i("throw",e,a,s)}):r.resolve(c).then(function(e){u.value=e,a(u)},function(e){return i("throw",e,a,s)})}catch(e){s(e)}}var a;this.next||(o(e.prototype),o(e.prototype,"function"==typeof Symbol&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),o(this,"_invoke",function(e,t,n){function o(){return new r(function(t,r){i(e,n,t,r)})}return a=a?a.then(o,o):o()},!0)},e.exports.__esModule=!0,e.exports.default=e.exports},696(e,t,r){var n=r(319).default;e.exports=function(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],r=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}throw new TypeError(n(e)+" is not iterable")},e.exports.__esModule=!0,e.exports.default=e.exports},699(e){e.exports=function(e,t){this.v=e,this.k=t},e.exports.__esModule=!0,e.exports.default=e.exports},726(e,t,r){var n=r(645);function o(){var t,r,i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.toStringTag||"@@toStringTag";function u(e,o,i,a){var s=o&&o.prototype instanceof l?o:l,u=Object.create(s.prototype);return n(u,"_invoke",function(e,n,o){var i,a,s,u=0,l=o||[],p=!1,f={p:0,n:0,v:t,a:d,f:d.bind(t,4),d:function(e,r){return i=e,a=0,s=t,f.n=r,c}};function d(e,n){for(a=e,s=n,r=0;!p&&u&&!o&&r<l.length;r++){var o,i=l[r],d=f.p,v=i[2];e>3?(o=v===n)&&(s=i[(a=i[4])?5:(a=3,3)],i[4]=i[5]=t):i[0]<=d&&((o=e<2&&d<i[1])?(a=0,f.v=n,f.n=i[1]):d<v&&(o=e<3||i[0]>n||n>v)&&(i[4]=e,i[5]=n,f.n=v,a=0))}if(o||e>1)return c;throw p=!0,n}return function(o,l,v){if(u>1)throw TypeError("Generator is already running");for(p&&1===l&&d(l,v),a=l,s=v;(r=a<2?t:s)||!p;){i||(a?a<3?(a>1&&(f.n=-1),d(a,s)):f.n=s:f.v=s);try{if(u=2,i){if(a||(o="next"),r=i[o]){if(!(r=r.call(i,s)))throw TypeError("iterator result is not an object");if(!r.done)return r;s=r.value,a<2&&(a=0)}else 1===a&&(r=i.return)&&r.call(i),a<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),a=1);i=t}else if((r=(p=f.n<0)?s:e.call(n,f))!==c)break}catch(e){i=t,a=1,s=e}finally{u=1}}return{value:r,done:p}}}(e,i,a),!0),u}var c={};function l(){}function p(){}function f(){}r=Object.getPrototypeOf;var d=[][a]?r(r([][a]())):(n(r={},a,function(){return this}),r),v=f.prototype=l.prototype=Object.create(d);function m(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,n(e,s,"GeneratorFunction")),e.prototype=Object.create(v),e}return p.prototype=f,n(v,"constructor",f),n(f,"constructor",p),p.displayName="GeneratorFunction",n(f,s,"GeneratorFunction"),n(v),n(v,s,"Generator"),n(v,a,function(){return this}),n(v,"toString",function(){return"[object Generator]"}),(e.exports=o=function(){return{w:u,m}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports},799(e,t,r){var n=r(48)();e.exports=n;try{regeneratorRuntime=n}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}},800(e,t,r){var n=r(726),o=r(686);e.exports=function(e,t,r,i,a){return new o(n().w(e,t,r,i),a||Promise)},e.exports.__esModule=!0,e.exports.default=e.exports},918(e){e.exports=function(e){var t=Object(e),r=[];for(var n in t)r.unshift(n);return function e(){for(;r.length;)if((n=r.pop())in t)return e.value=n,e.done=!1,e;return e.done=!0,e}},e.exports.__esModule=!0,e.exports.default=e.exports}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(t){var r=function(t){if("object"!=e(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=e(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==e(r)?r:r+""}function n(e,r){for(var n=0;n<r.length;n++){var o=r[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,t(o.key),o)}}function o(e,t,r,n,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,o)}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,s=[],u=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(e){c=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return i(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var s=r(799),u=r.n(s);const c=React,l=window.wp.plugins,p=window.wp.editor,f=window.wp.element,d=window.wp.components,v=window.wp.i18n,m=window.wp.data,y=window.wp.apiFetch;var w=r.n(y),h=function(e){var t=(0,m.select)("core/editor").getCurrentPostAttribute("status"),r=(0,m.select)("core/editor").getEditedPostAttribute("status");"dp-rewrite-republish"===t&&"publish"===r&&(0,m.dispatch)("core/editor").editPost({status:t}),window.location.assign(e)};function b(){var e=a((0,c.useState)(!1),2),t=e[0],r=e[1],n=a((0,c.useState)(!1),2),i=n[0],s=n[1],l=a((0,c.useState)(!1),2),f=l[0],y=l[1],h=duplicatePost.originalItem,b=parseInt(duplicatePost.rewriting,10),x=duplicatePost.showOriginalMetaBox&&h&&!f,g=function(){var e,t=(e=u().mark(function e(){var t;return u().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return s(!0),e.prev=1,e.next=2,w()({path:"/duplicate-post/v1/original/".concat(duplicatePost.postId),method:"DELETE"});case 2:y(!0),r(!1),e.next=4;break;case 3:e.prev=3,t=e.catch(1),console.error("Failed to remove original reference:",t),(0,m.dispatch)("core/notices").createNotice("error",(0,v.__)("Failed to remove the connection to the original post. Please try again.","duplicate-post"),{isDismissible:!0});case 4:return e.prev=4,s(!1),e.finish(4);case 5:case"end":return e.stop()}},e,null,[[1,3,4,5]])}),function(){var t=this,r=arguments;return new Promise(function(n,i){var a=e.apply(t,r);function s(e){o(a,n,i,s,u,"next",e)}function u(e){o(a,n,i,s,u,"throw",e)}s(void 0)})});return function(){return t.apply(this,arguments)}}();return x?wp.element.createElement(p.PluginDocumentSettingPanel,{name:"duplicate-post-panel",title:(0,v.__)("Yoast Duplicate Post","duplicate-post"),className:"duplicate-post-panel"},wp.element.createElement("p",{className:"duplicate-post-original-item"},(0,v.__)("The original item this was copied from is:","duplicate-post")," ",wp.element.createElement("span",{className:"duplicate_post_original_item_title_span"},h.canEdit?wp.element.createElement(d.ExternalLink,{href:h.editUrl},h.title):wp.element.createElement(d.ExternalLink,{href:h.viewUrl},h.title))),!b&&wp.element.createElement(d.Button,{variant:"secondary",isDestructive:!0,onClick:function(){return r(!0)},className:"duplicate-post-remove-connection-button"},(0,v.__)("Remove connection","duplicate-post")),t&&wp.element.createElement(d.Modal,{title:(0,v.__)("Remove connection","duplicate-post"),onRequestClose:function(){return r(!1)}},wp.element.createElement("p",null,(0,v.__)("Are you sure you want to remove the connection to the original post? This action cannot be undone.","duplicate-post")),wp.element.createElement("div",{className:"duplicate-post-modal-buttons"},wp.element.createElement(d.Button,{variant:"tertiary",onClick:function(){return r(!1)}},(0,v.__)("Cancel","duplicate-post")),wp.element.createElement(d.Button,{variant:"primary",isDestructive:!0,isBusy:i,onClick:g},(0,v.__)("Remove","duplicate-post"))))):null}(new(function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.renderNotices(),this.removeSlugSidebarPanel()},(t=[{key:"handleRedirect",value:function(){var e=this;if(parseInt(duplicatePost.rewriting,10)){var t=!1,r=!1,n=!1;(0,m.subscribe)(function(){if(e.isSafeRedirectURL(duplicatePost.originalEditURL)&&e.isCopyAllowedToBeRepublished()){var o,i,a,s,u,c,l=(o=duplicatePost.originalEditURL,i={wasSavingPost:t,wasSavingMetaboxes:r,wasAutoSavingPost:n},a=(0,m.select)("core/editor").isSavingPost(),s=(0,m.select)("core/editor").isAutosavingPost(),u=(0,m.select)("core/edit-post").hasMetaBoxes(),c=(0,m.select)("core/edit-post").isSavingMetaBoxes(),u&&!c&&i.wasSavingMetaboxes&&h(o),u||a||!i.wasSavingPost||i.wasAutoSavingPost||h(o),{isSavingPost:a,isSavingMetaBoxes:c,isAutosavingPost:s});t=l.isSavingPost,r=l.isSavingMetaBoxes,n=l.isAutosavingPost}})}}},{key:"isSafeRedirectURL",value:function(e){var t=document.createElement("a");return t.href=e,!!(/^https?:$/.test(t.protocol)&&/\/wp-admin\/post\.php$/.test(t.pathname)&&/\?action=edit&post=[0-9]+&dprepublished=1&dpcopy=[0-9]+&dpnonce=[a-z0-9]+/i.test(t.search))}},{key:"isCopyAllowedToBeRepublished",value:function(){var e=(0,m.select)("core/editor").getCurrentPostAttribute("status");return"dp-rewrite-republish"===e||"private"===e}},{key:"renderNotices",value:function(){if(duplicatePostNotices&&duplicatePostNotices instanceof Object)for(var e=0,t=Object.entries(duplicatePostNotices);e<t.length;e++){var r=a(t[e],2),n=(r[0],r[1]);n.status&&n.text&&(0,m.dispatch)("core/notices").createNotice(n.status,n.text,{isDismissible:n.isDismissible||!0})}}},{key:"removeSlugSidebarPanel",value:function(){parseInt(duplicatePost.rewriting,10)&&(0,m.dispatch)("core/editor").removeEditorPanel("post-link")}}])&&n(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}())).handleRedirect(),(0,l.registerPlugin)("duplicate-post",{render:function(){if(!(0,m.select)("core/editor")||!wp.editor||!wp.editor.PluginPostStatusInfo)return null;var e=(0,m.select)("core/editor").getEditedPostAttribute("status");return wp.element.createElement(f.Fragment,null,"1"===duplicatePost.showLinksIn.submitbox&&wp.element.createElement(f.Fragment,null,""!==duplicatePost.newDraftLink&&"1"===duplicatePost.showLinks.new_draft&&wp.element.createElement(p.PluginPostStatusInfo,null,wp.element.createElement(d.Button,{variant:"secondary",className:"dp-editor-post-copy-to-draft",href:duplicatePost.newDraftLink},(0,v.__)("Copy to a new draft","duplicate-post"))),"publish"===e&&""!==duplicatePost.rewriteAndRepublishLink&&"1"===duplicatePost.showLinks.rewrite_republish&&wp.element.createElement(p.PluginPostStatusInfo,null,wp.element.createElement(d.Button,{variant:"secondary",className:"dp-editor-post-rewrite-republish",href:duplicatePost.rewriteAndRepublishLink},(0,v.__)("Rewrite & Republish","duplicate-post")))),wp.element.createElement(b,null))}})})()})();