Your IP : 216.73.216.162


Current Path : /home/x/b/o/xbodynamge/namtation/wp-content/
Upload File :
Current File : /home/x/b/o/xbodynamge/namtation/wp-content/import.js.tar

home/xbodynamge/www/wp-content/plugins/wordpress-seo/js/dist/import.js000064400000015520151131664140022304 0ustar00!function(t){var e={};function n(s){if(e[s])return e[s].exports;var i=e[s]={i:s,l:!1,exports:{}};return t[s].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,s){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:s})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var s=Object.create(null);if(n.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(s,i,function(e){return t[e]}.bind(null,i));return s},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=297)}({135:function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));class s extends Error{constructor(t,e){super(t),this.name="ParseError",this.parseString=e}}},17:function(t,e){t.exports=window.jQuery},2:function(t,e){t.exports=window.wp.i18n},297:function(t,e,n){"use strict";n.r(e);var s=n(17),i=n.n(s),o=n(2);class a extends Error{constructor(t){super(t),this.name="ImportValidationError"}}var r=n(4),c=n(94),d=n(135);class p{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];this.settings=t,Object(r.isObject)(e)?this.preIndexingActions=Object(r.pickBy)(e,r.isFunction):this.preIndexingActions={},Object(r.isObject)(n)?this.postIndexingActions=Object(r.pickBy)(n,r.isFunction):this.postIndexingActions={}}async index(t,e){if(!Object(r.isObject)(t))return 0;let n=0;for(const s of Object.keys(t)){const i=t[s];n=await this.handleEndpoint(s,i,n,e)}return n}async handleEndpoint(t,e,n,s){let i=this.settings.restApi.root+e;for(;!1!==i;){await this.doPreIndexingAction(t);const e=await this.doIndexingRequest(i);await this.doPostIndexingAction(t,e),s(n+=e.objects.length),i=!!e.next_url&&this.settings.restApi.root+e.next_url}return n}async doIndexingRequest(t){const e=await fetch(t,{method:"POST",headers:{"X-WP-Nonce":this.settings.restApi.nonce}}),n=await e.text();let s;try{s=JSON.parse(n)}catch(t){throw new d.a("Error parsing the response to JSON.",n)}if(!e.ok){const n=s.data?s.data.stackTrace:"";throw"wpseo_error_validation"===(s.code?s.code:"")?new a(s.message):new c.a(s.message,t,"POST",e.status,n)}return s}async doPreIndexingAction(t){this.preIndexingActions[t]&&await this.preIndexingActions[t](this.settings)}async doPostIndexingAction(t,e){this.postIndexingActions[t]&&await this.postIndexingActions[t](e.objects,this.settings)}}const l="WPSEO_Import_AIOSEO_V4";let u,m,f,h,g,w,y,x,_,b,v,I;function O(t){var e=f,n=x,s=u;"import"===t&&(e=w,n=_,s=h),e.children(".yoast-import-spinner").show(),n.show(),e.closest("div").find(".yoast-import-failure").remove(),s.prop("disabled",!0)}function D(t){O("import")}function A(t){O("cleanup")}function j(t){var e=f,n=x,s=u,o=m;"import"===t&&(e=w,n=_,s=h,o=g),e.children(".yoast-import-spinner").hide(),n.hide(),e.children(".yoast-import-success-mark").show(),e.closest("div").find(".yoast-import-failure").remove(),s.prop("disabled",!1),i()("option:selected",o).remove(),i()("option[value='']",o).prop("selected",!0),o.trigger("change"),o.children("option").length<2&&(o.prop("disabled",!0),e.after(i()("<p></p>").text(window.yoastImportData.assets.no_data_msg)))}function P(){j("import")}function E(){j("cleanup")}function S(t,e){var n,s=f,r=x,c=u,d=window.yoastImportData.assets.cleanup_failure;"import"===e&&(s=w,r=_,c=h,d=window.yoastImportData.assets.import_failure),s.children(".yoast-import-spinner").hide(),r.hide(),c.prop("disabled",!1),n=t instanceof a?window.yoastImportData.assets.validation_failure:Object(o.sprintf)(d,"<strong>"+t+"</strong>");var p=i()("<div>").addClass("yoast-measure yoast-import-failure").html(n);s.after(p)}function k(t){S(t,"import")}function T(t){S(t,"cleanup")}function C(t){g.val()===l&&(t.preventDefault(),new p(window.yoastImportData).index(window.yoastImportData.restApi.importing_endpoints.aioseo,D).then(P).catch(k))}function M(t){m.val()===l&&(t.preventDefault(),new p(window.yoastImportData).index(window.yoastImportData.restApi.cleanup_endpoints.aioseo,A).then(E).catch(T))}function q(t){var e,n,s,a=t.closest("form").find("input[type=submit]");t.on("change",(function(){""!==(e=i()(this).find("option:selected").attr("value"))?(a.prop("disabled",!1),t===g&&(n=Object(o.sprintf)(window.yoastImportData.assets.replacing_texts.select_header,i()(this).find("option:selected").text()),s=e===l?window.yoastImportData.assets.replacing_texts.plugins.aioseo:window.yoastImportData.assets.replacing_texts.plugins.other,n+="<ul style='list-style: disc; padding: 0 15px;'>",s.forEach((function(t){n+="<li>"+t.data_name+"<br/><i>"+t.data_note+"</i></li>"})),n+="</ul>",I.html(n))):a.prop("disabled",!0)}))}i()((function(){u=i()("[name='clean_external']"),u.val(window.yoastImportData.assets.replacing_texts.cleanup_button),m=i()("[name='clean_external_plugin']"),f=i()(u).parents("form:first"),h=i()("[name='import_external']"),g=i()("[name='import_external_plugin']"),w=i()(h).parents("form:first"),w.after(i()("<p></p>").html("<strong>"+window.yoastImportData.assets.note+"</strong>"+window.yoastImportData.assets.cleanup_after_import_msg)),y=i()("<img>").addClass("yoast-import-spinner").attr("src",window.yoastImportData.assets.spinner).css({display:"inline-block","margin-left":"10px","vertical-align":"middle"}).hide(),_=i()("<span>").html(window.yoastImportData.assets.loading_msg_import).css({"margin-left":"5px","vertical-align":"middle"}).hide(),x=i()("<span>").html(window.yoastImportData.assets.loading_msg_cleanup).css({"margin-left":"5px","vertical-align":"middle"}).hide(),b=i()("<span>").addClass("dashicons dashicons-yes-alt yoast-import-success-mark").css({"margin-left":"10px","vertical-align":"middle",color:"green"}).hide(),I=i()(".yoast-import-explanation"),I.html(window.yoastImportData.assets.replacing_texts.import_explanation),v=i()(".yoast-cleanup-explanation"),v.html(window.yoastImportData.assets.replacing_texts.cleanup_explanation),g&&(q(g),g.append("<option value='' disabled='disabled' selected hidden>&mdash; "+window.yoastImportData.assets.select_placeholder+" &mdash;</option>").trigger("change")),m&&(q(m),m.append("<option value='' disabled='disabled' selected hidden>&mdash; "+window.yoastImportData.assets.select_placeholder+" &mdash;</option>").trigger("change")),w&&w.on("submit",C),f&&f.on("submit",M),i()(b).insertAfter([h,u]),i()(_).insertAfter(h),i()(x).insertAfter(u),i()(y).insertAfter([h,u])}))},4:function(t,e){t.exports=window.lodash},94:function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));class s extends Error{constructor(t,e,n,s,i){super(t),this.name="RequestError",this.url=e,this.method=n,this.statusCode=s,this.stackTrace=i}}}});home/xbodynamge/lebauwcentre/wp-content/plugins/wordpress-seo/js/dist/import.js000064400000015520151133756020024141 0ustar00!function(t){var e={};function n(s){if(e[s])return e[s].exports;var i=e[s]={i:s,l:!1,exports:{}};return t[s].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,s){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:s})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var s=Object.create(null);if(n.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(s,i,function(e){return t[e]}.bind(null,i));return s},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=297)}({135:function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));class s extends Error{constructor(t,e){super(t),this.name="ParseError",this.parseString=e}}},17:function(t,e){t.exports=window.jQuery},2:function(t,e){t.exports=window.wp.i18n},297:function(t,e,n){"use strict";n.r(e);var s=n(17),i=n.n(s),o=n(2);class a extends Error{constructor(t){super(t),this.name="ImportValidationError"}}var r=n(4),c=n(94),d=n(135);class p{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];this.settings=t,Object(r.isObject)(e)?this.preIndexingActions=Object(r.pickBy)(e,r.isFunction):this.preIndexingActions={},Object(r.isObject)(n)?this.postIndexingActions=Object(r.pickBy)(n,r.isFunction):this.postIndexingActions={}}async index(t,e){if(!Object(r.isObject)(t))return 0;let n=0;for(const s of Object.keys(t)){const i=t[s];n=await this.handleEndpoint(s,i,n,e)}return n}async handleEndpoint(t,e,n,s){let i=this.settings.restApi.root+e;for(;!1!==i;){await this.doPreIndexingAction(t);const e=await this.doIndexingRequest(i);await this.doPostIndexingAction(t,e),s(n+=e.objects.length),i=!!e.next_url&&this.settings.restApi.root+e.next_url}return n}async doIndexingRequest(t){const e=await fetch(t,{method:"POST",headers:{"X-WP-Nonce":this.settings.restApi.nonce}}),n=await e.text();let s;try{s=JSON.parse(n)}catch(t){throw new d.a("Error parsing the response to JSON.",n)}if(!e.ok){const n=s.data?s.data.stackTrace:"";throw"wpseo_error_validation"===(s.code?s.code:"")?new a(s.message):new c.a(s.message,t,"POST",e.status,n)}return s}async doPreIndexingAction(t){this.preIndexingActions[t]&&await this.preIndexingActions[t](this.settings)}async doPostIndexingAction(t,e){this.postIndexingActions[t]&&await this.postIndexingActions[t](e.objects,this.settings)}}const l="WPSEO_Import_AIOSEO_V4";let u,m,f,h,g,w,y,x,_,b,v,I;function O(t){var e=f,n=x,s=u;"import"===t&&(e=w,n=_,s=h),e.children(".yoast-import-spinner").show(),n.show(),e.closest("div").find(".yoast-import-failure").remove(),s.prop("disabled",!0)}function D(t){O("import")}function A(t){O("cleanup")}function j(t){var e=f,n=x,s=u,o=m;"import"===t&&(e=w,n=_,s=h,o=g),e.children(".yoast-import-spinner").hide(),n.hide(),e.children(".yoast-import-success-mark").show(),e.closest("div").find(".yoast-import-failure").remove(),s.prop("disabled",!1),i()("option:selected",o).remove(),i()("option[value='']",o).prop("selected",!0),o.trigger("change"),o.children("option").length<2&&(o.prop("disabled",!0),e.after(i()("<p></p>").text(window.yoastImportData.assets.no_data_msg)))}function P(){j("import")}function E(){j("cleanup")}function S(t,e){var n,s=f,r=x,c=u,d=window.yoastImportData.assets.cleanup_failure;"import"===e&&(s=w,r=_,c=h,d=window.yoastImportData.assets.import_failure),s.children(".yoast-import-spinner").hide(),r.hide(),c.prop("disabled",!1),n=t instanceof a?window.yoastImportData.assets.validation_failure:Object(o.sprintf)(d,"<strong>"+t+"</strong>");var p=i()("<div>").addClass("yoast-measure yoast-import-failure").html(n);s.after(p)}function k(t){S(t,"import")}function T(t){S(t,"cleanup")}function C(t){g.val()===l&&(t.preventDefault(),new p(window.yoastImportData).index(window.yoastImportData.restApi.importing_endpoints.aioseo,D).then(P).catch(k))}function M(t){m.val()===l&&(t.preventDefault(),new p(window.yoastImportData).index(window.yoastImportData.restApi.cleanup_endpoints.aioseo,A).then(E).catch(T))}function q(t){var e,n,s,a=t.closest("form").find("input[type=submit]");t.on("change",(function(){""!==(e=i()(this).find("option:selected").attr("value"))?(a.prop("disabled",!1),t===g&&(n=Object(o.sprintf)(window.yoastImportData.assets.replacing_texts.select_header,i()(this).find("option:selected").text()),s=e===l?window.yoastImportData.assets.replacing_texts.plugins.aioseo:window.yoastImportData.assets.replacing_texts.plugins.other,n+="<ul style='list-style: disc; padding: 0 15px;'>",s.forEach((function(t){n+="<li>"+t.data_name+"<br/><i>"+t.data_note+"</i></li>"})),n+="</ul>",I.html(n))):a.prop("disabled",!0)}))}i()((function(){u=i()("[name='clean_external']"),u.val(window.yoastImportData.assets.replacing_texts.cleanup_button),m=i()("[name='clean_external_plugin']"),f=i()(u).parents("form:first"),h=i()("[name='import_external']"),g=i()("[name='import_external_plugin']"),w=i()(h).parents("form:first"),w.after(i()("<p></p>").html("<strong>"+window.yoastImportData.assets.note+"</strong>"+window.yoastImportData.assets.cleanup_after_import_msg)),y=i()("<img>").addClass("yoast-import-spinner").attr("src",window.yoastImportData.assets.spinner).css({display:"inline-block","margin-left":"10px","vertical-align":"middle"}).hide(),_=i()("<span>").html(window.yoastImportData.assets.loading_msg_import).css({"margin-left":"5px","vertical-align":"middle"}).hide(),x=i()("<span>").html(window.yoastImportData.assets.loading_msg_cleanup).css({"margin-left":"5px","vertical-align":"middle"}).hide(),b=i()("<span>").addClass("dashicons dashicons-yes-alt yoast-import-success-mark").css({"margin-left":"10px","vertical-align":"middle",color:"green"}).hide(),I=i()(".yoast-import-explanation"),I.html(window.yoastImportData.assets.replacing_texts.import_explanation),v=i()(".yoast-cleanup-explanation"),v.html(window.yoastImportData.assets.replacing_texts.cleanup_explanation),g&&(q(g),g.append("<option value='' disabled='disabled' selected hidden>&mdash; "+window.yoastImportData.assets.select_placeholder+" &mdash;</option>").trigger("change")),m&&(q(m),m.append("<option value='' disabled='disabled' selected hidden>&mdash; "+window.yoastImportData.assets.select_placeholder+" &mdash;</option>").trigger("change")),w&&w.on("submit",C),f&&f.on("submit",M),i()(b).insertAfter([h,u]),i()(_).insertAfter(h),i()(x).insertAfter(u),i()(y).insertAfter([h,u])}))},4:function(t,e){t.exports=window.lodash},94:function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));class s extends Error{constructor(t,e,n,s,i){super(t),this.name="RequestError",this.url=e,this.method=n,this.statusCode=s,this.stackTrace=i}}}});home/xbodynamge/crosstraining/wp-content/plugins/tablepress/admin/js/import.js000060400000011731151134547240024022 0ustar00/**
 * JavaScript code for the "Import" screen
 *
 * @package TablePress
 * @subpackage Views JavaScript
 * @author Tobias Bäthge
 * @since 1.0.0
 */

/* global alert, tablepress_import */

jQuery( document ).ready( function( $ ) {

	'use strict';

	/**
	 * Show select box for table to replace only if needed
	 *
	 * @since 1.0.0
	 */
	$( '#row-import-type' ).on( 'change', 'input', function() {
		$( '#tables-import-existing-table' ).prop( 'disabled', ( 'replace' !== $(this).val() && 'append' !== $(this).val() ) );
	} )
	.find( 'input:checked' ).change();

	/**
	 * Show only the import source field that was selected with the radio button
	 *
	 * @since 1.0.0
	 */
	$( '#row-import-source' ).on( 'change', 'input', function() {
		$( '#row-import-source-file-upload, #row-import-source-url, #row-import-source-server, #row-import-source-form-field' ).hide();
		$( '#row-import-source-' + $(this).val() ).show();
	} )
	.find( 'input:checked' ).change();

	/**
	 * Show only the WP-Table Reloaded import source field that was selected with the radio button
	 *
	 * @since 1.0.0
	 */
	$( '#row-import-wp-table-reloaded-source' ).on( 'change', 'input', function() {
		$( '#row-import-wp-table-reloaded-source-dump-file, #row-import-wp-table-reloaded-source-db' ).hide();
		$( '#row-import-wp-table-reloaded-source-' + $(this).val() ).show();
	} )
	.find( 'input:checked' ).change();

	/**
	 * Select correct value in import format dropdown on file select
	 *
	 * @since 1.0.0
	 */
	$( '#tables-import-file-upload, #tables-import-url, #tables-import-server' ).on( 'change', function( event ) {
		var path = $(this).val(),
			filename_start,
			extension_start,
			filename = path,
			extension = 'csv';

		// default extension: CSV for file upload and server, HTML for URL
		if ( 'tables-import-url' === event.target.id ) {
			extension = 'html';
		}
		// determine filename from full path
		filename_start = path.lastIndexOf( '\\' );
		if ( -1 !== filename_start ) { // Windows-based path
			filename = path.substr( filename_start + 1 );
		} else {
			filename_start = path.lastIndexOf( '/' );
			if ( -1 !== filename_start ) { // Windows-based path
				filename = path.substr( filename_start + 1 );
			}
		}
		// determine extension from filename
		extension_start = filename.lastIndexOf( '.' );
		if ( -1 !== extension_start ) {
			extension = filename.substr( extension_start + 1 ).toLowerCase();
		}

		// allow .htm for HTML as well
		if ( 'htm' === extension ) {
			extension = 'html';
		}

		// Don't change the format for ZIP archives
		if ( 'zip' === extension ) {
			return;
		}

		$( '#tables-import-format' ).val( extension );
	} );

	/**
	 * Check, whether inputs are valid
	 *
	 * @since 1.0.0
	 */
	$( '#tablepress-page' ).find( 'form' ).on( 'submit.tablepress', function( /* event */ ) {
		var import_source = $( '#row-import-source' ).find( 'input:checked' ).val(),
			selected_import_source_field = $( '#tables-import-' + import_source ).get(0),
			valid_form = true,
			import_type = $( '#row-import-type' ).find( 'input:checked' ).val();

		/* the value of the selected import source field must be set/changed from the default */
		if ( selected_import_source_field.defaultValue === selected_import_source_field.value ) {
			$( selected_import_source_field )
				.addClass( 'invalid' )
				.one( 'change', function() { $(this).removeClass( 'invalid' ); } )
				.focus().select();
			valid_form = false;
		}

		/* if replace or append is selected, a table must be selected */
		if ( 'replace' === import_type || 'append' === import_type ) {
			if ( '' === $( '#tables-import-existing-table' ).val() ) {
				$( '#row-import-type' )
					.one( 'change', 'input', function() { $( '#tables-import-existing-table' ).removeClass( 'invalid' ); } );
				$( '#tables-import-existing-table' )
					.addClass( 'invalid' )
					.one( 'change', function() { $(this).removeClass( 'invalid' ); } )
					.focus().select();
				valid_form = false;
			}
		}

		if ( ! valid_form ) {
			return false;
		}
		// at this point, the form is valid and will be submitted
	} );

	/**
	 * Remove form validation check if "Import from WP-Table Reloaded" button is clicked
	 *
	 * @since 1.0.0
	 */
	$( '#tablepress-page' ).find( '#submit_wp_table_reloaded_import' ).on( 'click', function() {
		$( '#tablepress-page' ).find( 'form' ).off( 'submit.tablepress' );

		/* File upload must have a file, if Dump File is selected as the source */
		if ( $( '#import-wp-table-reloaded-source-dump-file' ).prop( 'checked' ) && '' === $( '#tables-import-wp-table-reloaded-dump-file' ).val() ) {
			$( '#tables-import-wp-table-reloaded-dump-file' )
				.addClass( 'invalid' )
				.one( 'change', function() { $(this).removeClass( 'invalid' ); } )
				.focus().select();
			return false;
		}

		/* At least one checkbox must be check, to have something imported */
		if ( ! $( '#import-wp-table-reloaded-tables' ).prop( 'checked' ) && ! $( '#import-wp-table-reloaded-css' ).prop( 'checked' ) ) {
			alert( tablepress_import.error_wp_table_reloaded_nothing_selected );
			return false;
		}

	} );

} );
home/xbodynamge/crosstraining/wp-content/plugins/wordpress-seo/js/dist/import.js000064400000015520151140575120024344 0ustar00!function(t){var e={};function n(s){if(e[s])return e[s].exports;var i=e[s]={i:s,l:!1,exports:{}};return t[s].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,s){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:s})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var s=Object.create(null);if(n.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(s,i,function(e){return t[e]}.bind(null,i));return s},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=297)}({135:function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));class s extends Error{constructor(t,e){super(t),this.name="ParseError",this.parseString=e}}},17:function(t,e){t.exports=window.jQuery},2:function(t,e){t.exports=window.wp.i18n},297:function(t,e,n){"use strict";n.r(e);var s=n(17),i=n.n(s),o=n(2);class a extends Error{constructor(t){super(t),this.name="ImportValidationError"}}var r=n(4),c=n(94),d=n(135);class p{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];this.settings=t,Object(r.isObject)(e)?this.preIndexingActions=Object(r.pickBy)(e,r.isFunction):this.preIndexingActions={},Object(r.isObject)(n)?this.postIndexingActions=Object(r.pickBy)(n,r.isFunction):this.postIndexingActions={}}async index(t,e){if(!Object(r.isObject)(t))return 0;let n=0;for(const s of Object.keys(t)){const i=t[s];n=await this.handleEndpoint(s,i,n,e)}return n}async handleEndpoint(t,e,n,s){let i=this.settings.restApi.root+e;for(;!1!==i;){await this.doPreIndexingAction(t);const e=await this.doIndexingRequest(i);await this.doPostIndexingAction(t,e),s(n+=e.objects.length),i=!!e.next_url&&this.settings.restApi.root+e.next_url}return n}async doIndexingRequest(t){const e=await fetch(t,{method:"POST",headers:{"X-WP-Nonce":this.settings.restApi.nonce}}),n=await e.text();let s;try{s=JSON.parse(n)}catch(t){throw new d.a("Error parsing the response to JSON.",n)}if(!e.ok){const n=s.data?s.data.stackTrace:"";throw"wpseo_error_validation"===(s.code?s.code:"")?new a(s.message):new c.a(s.message,t,"POST",e.status,n)}return s}async doPreIndexingAction(t){this.preIndexingActions[t]&&await this.preIndexingActions[t](this.settings)}async doPostIndexingAction(t,e){this.postIndexingActions[t]&&await this.postIndexingActions[t](e.objects,this.settings)}}const l="WPSEO_Import_AIOSEO_V4";let u,m,f,h,g,w,y,x,_,b,v,I;function O(t){var e=f,n=x,s=u;"import"===t&&(e=w,n=_,s=h),e.children(".yoast-import-spinner").show(),n.show(),e.closest("div").find(".yoast-import-failure").remove(),s.prop("disabled",!0)}function D(t){O("import")}function A(t){O("cleanup")}function j(t){var e=f,n=x,s=u,o=m;"import"===t&&(e=w,n=_,s=h,o=g),e.children(".yoast-import-spinner").hide(),n.hide(),e.children(".yoast-import-success-mark").show(),e.closest("div").find(".yoast-import-failure").remove(),s.prop("disabled",!1),i()("option:selected",o).remove(),i()("option[value='']",o).prop("selected",!0),o.trigger("change"),o.children("option").length<2&&(o.prop("disabled",!0),e.after(i()("<p></p>").text(window.yoastImportData.assets.no_data_msg)))}function P(){j("import")}function E(){j("cleanup")}function S(t,e){var n,s=f,r=x,c=u,d=window.yoastImportData.assets.cleanup_failure;"import"===e&&(s=w,r=_,c=h,d=window.yoastImportData.assets.import_failure),s.children(".yoast-import-spinner").hide(),r.hide(),c.prop("disabled",!1),n=t instanceof a?window.yoastImportData.assets.validation_failure:Object(o.sprintf)(d,"<strong>"+t+"</strong>");var p=i()("<div>").addClass("yoast-measure yoast-import-failure").html(n);s.after(p)}function k(t){S(t,"import")}function T(t){S(t,"cleanup")}function C(t){g.val()===l&&(t.preventDefault(),new p(window.yoastImportData).index(window.yoastImportData.restApi.importing_endpoints.aioseo,D).then(P).catch(k))}function M(t){m.val()===l&&(t.preventDefault(),new p(window.yoastImportData).index(window.yoastImportData.restApi.cleanup_endpoints.aioseo,A).then(E).catch(T))}function q(t){var e,n,s,a=t.closest("form").find("input[type=submit]");t.on("change",(function(){""!==(e=i()(this).find("option:selected").attr("value"))?(a.prop("disabled",!1),t===g&&(n=Object(o.sprintf)(window.yoastImportData.assets.replacing_texts.select_header,i()(this).find("option:selected").text()),s=e===l?window.yoastImportData.assets.replacing_texts.plugins.aioseo:window.yoastImportData.assets.replacing_texts.plugins.other,n+="<ul style='list-style: disc; padding: 0 15px;'>",s.forEach((function(t){n+="<li>"+t.data_name+"<br/><i>"+t.data_note+"</i></li>"})),n+="</ul>",I.html(n))):a.prop("disabled",!0)}))}i()((function(){u=i()("[name='clean_external']"),u.val(window.yoastImportData.assets.replacing_texts.cleanup_button),m=i()("[name='clean_external_plugin']"),f=i()(u).parents("form:first"),h=i()("[name='import_external']"),g=i()("[name='import_external_plugin']"),w=i()(h).parents("form:first"),w.after(i()("<p></p>").html("<strong>"+window.yoastImportData.assets.note+"</strong>"+window.yoastImportData.assets.cleanup_after_import_msg)),y=i()("<img>").addClass("yoast-import-spinner").attr("src",window.yoastImportData.assets.spinner).css({display:"inline-block","margin-left":"10px","vertical-align":"middle"}).hide(),_=i()("<span>").html(window.yoastImportData.assets.loading_msg_import).css({"margin-left":"5px","vertical-align":"middle"}).hide(),x=i()("<span>").html(window.yoastImportData.assets.loading_msg_cleanup).css({"margin-left":"5px","vertical-align":"middle"}).hide(),b=i()("<span>").addClass("dashicons dashicons-yes-alt yoast-import-success-mark").css({"margin-left":"10px","vertical-align":"middle",color:"green"}).hide(),I=i()(".yoast-import-explanation"),I.html(window.yoastImportData.assets.replacing_texts.import_explanation),v=i()(".yoast-cleanup-explanation"),v.html(window.yoastImportData.assets.replacing_texts.cleanup_explanation),g&&(q(g),g.append("<option value='' disabled='disabled' selected hidden>&mdash; "+window.yoastImportData.assets.select_placeholder+" &mdash;</option>").trigger("change")),m&&(q(m),m.append("<option value='' disabled='disabled' selected hidden>&mdash; "+window.yoastImportData.assets.select_placeholder+" &mdash;</option>").trigger("change")),w&&w.on("submit",C),f&&f.on("submit",M),i()(b).insertAfter([h,u]),i()(_).insertAfter(h),i()(x).insertAfter(u),i()(y).insertAfter([h,u])}))},4:function(t,e){t.exports=window.lodash},94:function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));class s extends Error{constructor(t,e,n,s,i){super(t),this.name="RequestError",this.url=e,this.method=n,this.statusCode=s,this.stackTrace=i}}}});home/xbodynamge/dev/wp-content/plugins/tablepress/admin/js/import.js000064400000011731151142746310021715 0ustar00/**
 * JavaScript code for the "Import" screen
 *
 * @package TablePress
 * @subpackage Views JavaScript
 * @author Tobias Bäthge
 * @since 1.0.0
 */

/* global alert, tablepress_import */

jQuery( document ).ready( function( $ ) {

	'use strict';

	/**
	 * Show select box for table to replace only if needed
	 *
	 * @since 1.0.0
	 */
	$( '#row-import-type' ).on( 'change', 'input', function() {
		$( '#tables-import-existing-table' ).prop( 'disabled', ( 'replace' !== $(this).val() && 'append' !== $(this).val() ) );
	} )
	.find( 'input:checked' ).change();

	/**
	 * Show only the import source field that was selected with the radio button
	 *
	 * @since 1.0.0
	 */
	$( '#row-import-source' ).on( 'change', 'input', function() {
		$( '#row-import-source-file-upload, #row-import-source-url, #row-import-source-server, #row-import-source-form-field' ).hide();
		$( '#row-import-source-' + $(this).val() ).show();
	} )
	.find( 'input:checked' ).change();

	/**
	 * Show only the WP-Table Reloaded import source field that was selected with the radio button
	 *
	 * @since 1.0.0
	 */
	$( '#row-import-wp-table-reloaded-source' ).on( 'change', 'input', function() {
		$( '#row-import-wp-table-reloaded-source-dump-file, #row-import-wp-table-reloaded-source-db' ).hide();
		$( '#row-import-wp-table-reloaded-source-' + $(this).val() ).show();
	} )
	.find( 'input:checked' ).change();

	/**
	 * Select correct value in import format dropdown on file select
	 *
	 * @since 1.0.0
	 */
	$( '#tables-import-file-upload, #tables-import-url, #tables-import-server' ).on( 'change', function( event ) {
		var path = $(this).val(),
			filename_start,
			extension_start,
			filename = path,
			extension = 'csv';

		// default extension: CSV for file upload and server, HTML for URL
		if ( 'tables-import-url' === event.target.id ) {
			extension = 'html';
		}
		// determine filename from full path
		filename_start = path.lastIndexOf( '\\' );
		if ( -1 !== filename_start ) { // Windows-based path
			filename = path.substr( filename_start + 1 );
		} else {
			filename_start = path.lastIndexOf( '/' );
			if ( -1 !== filename_start ) { // Windows-based path
				filename = path.substr( filename_start + 1 );
			}
		}
		// determine extension from filename
		extension_start = filename.lastIndexOf( '.' );
		if ( -1 !== extension_start ) {
			extension = filename.substr( extension_start + 1 ).toLowerCase();
		}

		// allow .htm for HTML as well
		if ( 'htm' === extension ) {
			extension = 'html';
		}

		// Don't change the format for ZIP archives
		if ( 'zip' === extension ) {
			return;
		}

		$( '#tables-import-format' ).val( extension );
	} );

	/**
	 * Check, whether inputs are valid
	 *
	 * @since 1.0.0
	 */
	$( '#tablepress-page' ).find( 'form' ).on( 'submit.tablepress', function( /* event */ ) {
		var import_source = $( '#row-import-source' ).find( 'input:checked' ).val(),
			selected_import_source_field = $( '#tables-import-' + import_source ).get(0),
			valid_form = true,
			import_type = $( '#row-import-type' ).find( 'input:checked' ).val();

		/* the value of the selected import source field must be set/changed from the default */
		if ( selected_import_source_field.defaultValue === selected_import_source_field.value ) {
			$( selected_import_source_field )
				.addClass( 'invalid' )
				.one( 'change', function() { $(this).removeClass( 'invalid' ); } )
				.focus().select();
			valid_form = false;
		}

		/* if replace or append is selected, a table must be selected */
		if ( 'replace' === import_type || 'append' === import_type ) {
			if ( '' === $( '#tables-import-existing-table' ).val() ) {
				$( '#row-import-type' )
					.one( 'change', 'input', function() { $( '#tables-import-existing-table' ).removeClass( 'invalid' ); } );
				$( '#tables-import-existing-table' )
					.addClass( 'invalid' )
					.one( 'change', function() { $(this).removeClass( 'invalid' ); } )
					.focus().select();
				valid_form = false;
			}
		}

		if ( ! valid_form ) {
			return false;
		}
		// at this point, the form is valid and will be submitted
	} );

	/**
	 * Remove form validation check if "Import from WP-Table Reloaded" button is clicked
	 *
	 * @since 1.0.0
	 */
	$( '#tablepress-page' ).find( '#submit_wp_table_reloaded_import' ).on( 'click', function() {
		$( '#tablepress-page' ).find( 'form' ).off( 'submit.tablepress' );

		/* File upload must have a file, if Dump File is selected as the source */
		if ( $( '#import-wp-table-reloaded-source-dump-file' ).prop( 'checked' ) && '' === $( '#tables-import-wp-table-reloaded-dump-file' ).val() ) {
			$( '#tables-import-wp-table-reloaded-dump-file' )
				.addClass( 'invalid' )
				.one( 'change', function() { $(this).removeClass( 'invalid' ); } )
				.focus().select();
			return false;
		}

		/* At least one checkbox must be check, to have something imported */
		if ( ! $( '#import-wp-table-reloaded-tables' ).prop( 'checked' ) && ! $( '#import-wp-table-reloaded-css' ).prop( 'checked' ) ) {
			alert( tablepress_import.error_wp_table_reloaded_nothing_selected );
			return false;
		}

	} );

} );
home/xbodynamge/www/wp-content/plugins/tablepress/admin/js/import.js000064400000011731151147004040021753 0ustar00/**
 * JavaScript code for the "Import" screen
 *
 * @package TablePress
 * @subpackage Views JavaScript
 * @author Tobias Bäthge
 * @since 1.0.0
 */

/* global alert, tablepress_import */

jQuery( document ).ready( function( $ ) {

	'use strict';

	/**
	 * Show select box for table to replace only if needed
	 *
	 * @since 1.0.0
	 */
	$( '#row-import-type' ).on( 'change', 'input', function() {
		$( '#tables-import-existing-table' ).prop( 'disabled', ( 'replace' !== $(this).val() && 'append' !== $(this).val() ) );
	} )
	.find( 'input:checked' ).change();

	/**
	 * Show only the import source field that was selected with the radio button
	 *
	 * @since 1.0.0
	 */
	$( '#row-import-source' ).on( 'change', 'input', function() {
		$( '#row-import-source-file-upload, #row-import-source-url, #row-import-source-server, #row-import-source-form-field' ).hide();
		$( '#row-import-source-' + $(this).val() ).show();
	} )
	.find( 'input:checked' ).change();

	/**
	 * Show only the WP-Table Reloaded import source field that was selected with the radio button
	 *
	 * @since 1.0.0
	 */
	$( '#row-import-wp-table-reloaded-source' ).on( 'change', 'input', function() {
		$( '#row-import-wp-table-reloaded-source-dump-file, #row-import-wp-table-reloaded-source-db' ).hide();
		$( '#row-import-wp-table-reloaded-source-' + $(this).val() ).show();
	} )
	.find( 'input:checked' ).change();

	/**
	 * Select correct value in import format dropdown on file select
	 *
	 * @since 1.0.0
	 */
	$( '#tables-import-file-upload, #tables-import-url, #tables-import-server' ).on( 'change', function( event ) {
		var path = $(this).val(),
			filename_start,
			extension_start,
			filename = path,
			extension = 'csv';

		// default extension: CSV for file upload and server, HTML for URL
		if ( 'tables-import-url' === event.target.id ) {
			extension = 'html';
		}
		// determine filename from full path
		filename_start = path.lastIndexOf( '\\' );
		if ( -1 !== filename_start ) { // Windows-based path
			filename = path.substr( filename_start + 1 );
		} else {
			filename_start = path.lastIndexOf( '/' );
			if ( -1 !== filename_start ) { // Windows-based path
				filename = path.substr( filename_start + 1 );
			}
		}
		// determine extension from filename
		extension_start = filename.lastIndexOf( '.' );
		if ( -1 !== extension_start ) {
			extension = filename.substr( extension_start + 1 ).toLowerCase();
		}

		// allow .htm for HTML as well
		if ( 'htm' === extension ) {
			extension = 'html';
		}

		// Don't change the format for ZIP archives
		if ( 'zip' === extension ) {
			return;
		}

		$( '#tables-import-format' ).val( extension );
	} );

	/**
	 * Check, whether inputs are valid
	 *
	 * @since 1.0.0
	 */
	$( '#tablepress-page' ).find( 'form' ).on( 'submit.tablepress', function( /* event */ ) {
		var import_source = $( '#row-import-source' ).find( 'input:checked' ).val(),
			selected_import_source_field = $( '#tables-import-' + import_source ).get(0),
			valid_form = true,
			import_type = $( '#row-import-type' ).find( 'input:checked' ).val();

		/* the value of the selected import source field must be set/changed from the default */
		if ( selected_import_source_field.defaultValue === selected_import_source_field.value ) {
			$( selected_import_source_field )
				.addClass( 'invalid' )
				.one( 'change', function() { $(this).removeClass( 'invalid' ); } )
				.focus().select();
			valid_form = false;
		}

		/* if replace or append is selected, a table must be selected */
		if ( 'replace' === import_type || 'append' === import_type ) {
			if ( '' === $( '#tables-import-existing-table' ).val() ) {
				$( '#row-import-type' )
					.one( 'change', 'input', function() { $( '#tables-import-existing-table' ).removeClass( 'invalid' ); } );
				$( '#tables-import-existing-table' )
					.addClass( 'invalid' )
					.one( 'change', function() { $(this).removeClass( 'invalid' ); } )
					.focus().select();
				valid_form = false;
			}
		}

		if ( ! valid_form ) {
			return false;
		}
		// at this point, the form is valid and will be submitted
	} );

	/**
	 * Remove form validation check if "Import from WP-Table Reloaded" button is clicked
	 *
	 * @since 1.0.0
	 */
	$( '#tablepress-page' ).find( '#submit_wp_table_reloaded_import' ).on( 'click', function() {
		$( '#tablepress-page' ).find( 'form' ).off( 'submit.tablepress' );

		/* File upload must have a file, if Dump File is selected as the source */
		if ( $( '#import-wp-table-reloaded-source-dump-file' ).prop( 'checked' ) && '' === $( '#tables-import-wp-table-reloaded-dump-file' ).val() ) {
			$( '#tables-import-wp-table-reloaded-dump-file' )
				.addClass( 'invalid' )
				.one( 'change', function() { $(this).removeClass( 'invalid' ); } )
				.focus().select();
			return false;
		}

		/* At least one checkbox must be check, to have something imported */
		if ( ! $( '#import-wp-table-reloaded-tables' ).prop( 'checked' ) && ! $( '#import-wp-table-reloaded-css' ).prop( 'checked' ) ) {
			alert( tablepress_import.error_wp_table_reloaded_nothing_selected );
			return false;
		}

	} );

} );
home/xbodynamge/lebauwcentre/wp-content/plugins/tablepress/admin/js/import.js000064400000011731151147007570023622 0ustar00/**
 * JavaScript code for the "Import" screen
 *
 * @package TablePress
 * @subpackage Views JavaScript
 * @author Tobias Bäthge
 * @since 1.0.0
 */

/* global alert, tablepress_import */

jQuery( document ).ready( function( $ ) {

	'use strict';

	/**
	 * Show select box for table to replace only if needed
	 *
	 * @since 1.0.0
	 */
	$( '#row-import-type' ).on( 'change', 'input', function() {
		$( '#tables-import-existing-table' ).prop( 'disabled', ( 'replace' !== $(this).val() && 'append' !== $(this).val() ) );
	} )
	.find( 'input:checked' ).change();

	/**
	 * Show only the import source field that was selected with the radio button
	 *
	 * @since 1.0.0
	 */
	$( '#row-import-source' ).on( 'change', 'input', function() {
		$( '#row-import-source-file-upload, #row-import-source-url, #row-import-source-server, #row-import-source-form-field' ).hide();
		$( '#row-import-source-' + $(this).val() ).show();
	} )
	.find( 'input:checked' ).change();

	/**
	 * Show only the WP-Table Reloaded import source field that was selected with the radio button
	 *
	 * @since 1.0.0
	 */
	$( '#row-import-wp-table-reloaded-source' ).on( 'change', 'input', function() {
		$( '#row-import-wp-table-reloaded-source-dump-file, #row-import-wp-table-reloaded-source-db' ).hide();
		$( '#row-import-wp-table-reloaded-source-' + $(this).val() ).show();
	} )
	.find( 'input:checked' ).change();

	/**
	 * Select correct value in import format dropdown on file select
	 *
	 * @since 1.0.0
	 */
	$( '#tables-import-file-upload, #tables-import-url, #tables-import-server' ).on( 'change', function( event ) {
		var path = $(this).val(),
			filename_start,
			extension_start,
			filename = path,
			extension = 'csv';

		// default extension: CSV for file upload and server, HTML for URL
		if ( 'tables-import-url' === event.target.id ) {
			extension = 'html';
		}
		// determine filename from full path
		filename_start = path.lastIndexOf( '\\' );
		if ( -1 !== filename_start ) { // Windows-based path
			filename = path.substr( filename_start + 1 );
		} else {
			filename_start = path.lastIndexOf( '/' );
			if ( -1 !== filename_start ) { // Windows-based path
				filename = path.substr( filename_start + 1 );
			}
		}
		// determine extension from filename
		extension_start = filename.lastIndexOf( '.' );
		if ( -1 !== extension_start ) {
			extension = filename.substr( extension_start + 1 ).toLowerCase();
		}

		// allow .htm for HTML as well
		if ( 'htm' === extension ) {
			extension = 'html';
		}

		// Don't change the format for ZIP archives
		if ( 'zip' === extension ) {
			return;
		}

		$( '#tables-import-format' ).val( extension );
	} );

	/**
	 * Check, whether inputs are valid
	 *
	 * @since 1.0.0
	 */
	$( '#tablepress-page' ).find( 'form' ).on( 'submit.tablepress', function( /* event */ ) {
		var import_source = $( '#row-import-source' ).find( 'input:checked' ).val(),
			selected_import_source_field = $( '#tables-import-' + import_source ).get(0),
			valid_form = true,
			import_type = $( '#row-import-type' ).find( 'input:checked' ).val();

		/* the value of the selected import source field must be set/changed from the default */
		if ( selected_import_source_field.defaultValue === selected_import_source_field.value ) {
			$( selected_import_source_field )
				.addClass( 'invalid' )
				.one( 'change', function() { $(this).removeClass( 'invalid' ); } )
				.focus().select();
			valid_form = false;
		}

		/* if replace or append is selected, a table must be selected */
		if ( 'replace' === import_type || 'append' === import_type ) {
			if ( '' === $( '#tables-import-existing-table' ).val() ) {
				$( '#row-import-type' )
					.one( 'change', 'input', function() { $( '#tables-import-existing-table' ).removeClass( 'invalid' ); } );
				$( '#tables-import-existing-table' )
					.addClass( 'invalid' )
					.one( 'change', function() { $(this).removeClass( 'invalid' ); } )
					.focus().select();
				valid_form = false;
			}
		}

		if ( ! valid_form ) {
			return false;
		}
		// at this point, the form is valid and will be submitted
	} );

	/**
	 * Remove form validation check if "Import from WP-Table Reloaded" button is clicked
	 *
	 * @since 1.0.0
	 */
	$( '#tablepress-page' ).find( '#submit_wp_table_reloaded_import' ).on( 'click', function() {
		$( '#tablepress-page' ).find( 'form' ).off( 'submit.tablepress' );

		/* File upload must have a file, if Dump File is selected as the source */
		if ( $( '#import-wp-table-reloaded-source-dump-file' ).prop( 'checked' ) && '' === $( '#tables-import-wp-table-reloaded-dump-file' ).val() ) {
			$( '#tables-import-wp-table-reloaded-dump-file' )
				.addClass( 'invalid' )
				.one( 'change', function() { $(this).removeClass( 'invalid' ); } )
				.focus().select();
			return false;
		}

		/* At least one checkbox must be check, to have something imported */
		if ( ! $( '#import-wp-table-reloaded-tables' ).prop( 'checked' ) && ! $( '#import-wp-table-reloaded-css' ).prop( 'checked' ) ) {
			alert( tablepress_import.error_wp_table_reloaded_nothing_selected );
			return false;
		}

	} );

} );
home/xbodynamge/namtation/wp-content/plugins/tablepress/admin/js/import.js000064400000011731151150321400023115 0ustar00/**
 * JavaScript code for the "Import" screen
 *
 * @package TablePress
 * @subpackage Views JavaScript
 * @author Tobias Bäthge
 * @since 1.0.0
 */

/* global alert, tablepress_import */

jQuery( document ).ready( function( $ ) {

	'use strict';

	/**
	 * Show select box for table to replace only if needed
	 *
	 * @since 1.0.0
	 */
	$( '#row-import-type' ).on( 'change', 'input', function() {
		$( '#tables-import-existing-table' ).prop( 'disabled', ( 'replace' !== $(this).val() && 'append' !== $(this).val() ) );
	} )
	.find( 'input:checked' ).change();

	/**
	 * Show only the import source field that was selected with the radio button
	 *
	 * @since 1.0.0
	 */
	$( '#row-import-source' ).on( 'change', 'input', function() {
		$( '#row-import-source-file-upload, #row-import-source-url, #row-import-source-server, #row-import-source-form-field' ).hide();
		$( '#row-import-source-' + $(this).val() ).show();
	} )
	.find( 'input:checked' ).change();

	/**
	 * Show only the WP-Table Reloaded import source field that was selected with the radio button
	 *
	 * @since 1.0.0
	 */
	$( '#row-import-wp-table-reloaded-source' ).on( 'change', 'input', function() {
		$( '#row-import-wp-table-reloaded-source-dump-file, #row-import-wp-table-reloaded-source-db' ).hide();
		$( '#row-import-wp-table-reloaded-source-' + $(this).val() ).show();
	} )
	.find( 'input:checked' ).change();

	/**
	 * Select correct value in import format dropdown on file select
	 *
	 * @since 1.0.0
	 */
	$( '#tables-import-file-upload, #tables-import-url, #tables-import-server' ).on( 'change', function( event ) {
		var path = $(this).val(),
			filename_start,
			extension_start,
			filename = path,
			extension = 'csv';

		// default extension: CSV for file upload and server, HTML for URL
		if ( 'tables-import-url' === event.target.id ) {
			extension = 'html';
		}
		// determine filename from full path
		filename_start = path.lastIndexOf( '\\' );
		if ( -1 !== filename_start ) { // Windows-based path
			filename = path.substr( filename_start + 1 );
		} else {
			filename_start = path.lastIndexOf( '/' );
			if ( -1 !== filename_start ) { // Windows-based path
				filename = path.substr( filename_start + 1 );
			}
		}
		// determine extension from filename
		extension_start = filename.lastIndexOf( '.' );
		if ( -1 !== extension_start ) {
			extension = filename.substr( extension_start + 1 ).toLowerCase();
		}

		// allow .htm for HTML as well
		if ( 'htm' === extension ) {
			extension = 'html';
		}

		// Don't change the format for ZIP archives
		if ( 'zip' === extension ) {
			return;
		}

		$( '#tables-import-format' ).val( extension );
	} );

	/**
	 * Check, whether inputs are valid
	 *
	 * @since 1.0.0
	 */
	$( '#tablepress-page' ).find( 'form' ).on( 'submit.tablepress', function( /* event */ ) {
		var import_source = $( '#row-import-source' ).find( 'input:checked' ).val(),
			selected_import_source_field = $( '#tables-import-' + import_source ).get(0),
			valid_form = true,
			import_type = $( '#row-import-type' ).find( 'input:checked' ).val();

		/* the value of the selected import source field must be set/changed from the default */
		if ( selected_import_source_field.defaultValue === selected_import_source_field.value ) {
			$( selected_import_source_field )
				.addClass( 'invalid' )
				.one( 'change', function() { $(this).removeClass( 'invalid' ); } )
				.focus().select();
			valid_form = false;
		}

		/* if replace or append is selected, a table must be selected */
		if ( 'replace' === import_type || 'append' === import_type ) {
			if ( '' === $( '#tables-import-existing-table' ).val() ) {
				$( '#row-import-type' )
					.one( 'change', 'input', function() { $( '#tables-import-existing-table' ).removeClass( 'invalid' ); } );
				$( '#tables-import-existing-table' )
					.addClass( 'invalid' )
					.one( 'change', function() { $(this).removeClass( 'invalid' ); } )
					.focus().select();
				valid_form = false;
			}
		}

		if ( ! valid_form ) {
			return false;
		}
		// at this point, the form is valid and will be submitted
	} );

	/**
	 * Remove form validation check if "Import from WP-Table Reloaded" button is clicked
	 *
	 * @since 1.0.0
	 */
	$( '#tablepress-page' ).find( '#submit_wp_table_reloaded_import' ).on( 'click', function() {
		$( '#tablepress-page' ).find( 'form' ).off( 'submit.tablepress' );

		/* File upload must have a file, if Dump File is selected as the source */
		if ( $( '#import-wp-table-reloaded-source-dump-file' ).prop( 'checked' ) && '' === $( '#tables-import-wp-table-reloaded-dump-file' ).val() ) {
			$( '#tables-import-wp-table-reloaded-dump-file' )
				.addClass( 'invalid' )
				.one( 'change', function() { $(this).removeClass( 'invalid' ); } )
				.focus().select();
			return false;
		}

		/* At least one checkbox must be check, to have something imported */
		if ( ! $( '#import-wp-table-reloaded-tables' ).prop( 'checked' ) && ! $( '#import-wp-table-reloaded-css' ).prop( 'checked' ) ) {
			alert( tablepress_import.error_wp_table_reloaded_nothing_selected );
			return false;
		}

	} );

} );
home/xbodynamge/namtation/wp-content/plugins/wordpress-seo/js/dist/import.js000064400000015520151150341650023451 0ustar00!function(t){var e={};function n(s){if(e[s])return e[s].exports;var i=e[s]={i:s,l:!1,exports:{}};return t[s].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,s){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:s})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var s=Object.create(null);if(n.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(s,i,function(e){return t[e]}.bind(null,i));return s},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=297)}({135:function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));class s extends Error{constructor(t,e){super(t),this.name="ParseError",this.parseString=e}}},17:function(t,e){t.exports=window.jQuery},2:function(t,e){t.exports=window.wp.i18n},297:function(t,e,n){"use strict";n.r(e);var s=n(17),i=n.n(s),o=n(2);class a extends Error{constructor(t){super(t),this.name="ImportValidationError"}}var r=n(4),c=n(94),d=n(135);class p{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];this.settings=t,Object(r.isObject)(e)?this.preIndexingActions=Object(r.pickBy)(e,r.isFunction):this.preIndexingActions={},Object(r.isObject)(n)?this.postIndexingActions=Object(r.pickBy)(n,r.isFunction):this.postIndexingActions={}}async index(t,e){if(!Object(r.isObject)(t))return 0;let n=0;for(const s of Object.keys(t)){const i=t[s];n=await this.handleEndpoint(s,i,n,e)}return n}async handleEndpoint(t,e,n,s){let i=this.settings.restApi.root+e;for(;!1!==i;){await this.doPreIndexingAction(t);const e=await this.doIndexingRequest(i);await this.doPostIndexingAction(t,e),s(n+=e.objects.length),i=!!e.next_url&&this.settings.restApi.root+e.next_url}return n}async doIndexingRequest(t){const e=await fetch(t,{method:"POST",headers:{"X-WP-Nonce":this.settings.restApi.nonce}}),n=await e.text();let s;try{s=JSON.parse(n)}catch(t){throw new d.a("Error parsing the response to JSON.",n)}if(!e.ok){const n=s.data?s.data.stackTrace:"";throw"wpseo_error_validation"===(s.code?s.code:"")?new a(s.message):new c.a(s.message,t,"POST",e.status,n)}return s}async doPreIndexingAction(t){this.preIndexingActions[t]&&await this.preIndexingActions[t](this.settings)}async doPostIndexingAction(t,e){this.postIndexingActions[t]&&await this.postIndexingActions[t](e.objects,this.settings)}}const l="WPSEO_Import_AIOSEO_V4";let u,m,f,h,g,w,y,x,_,b,v,I;function O(t){var e=f,n=x,s=u;"import"===t&&(e=w,n=_,s=h),e.children(".yoast-import-spinner").show(),n.show(),e.closest("div").find(".yoast-import-failure").remove(),s.prop("disabled",!0)}function D(t){O("import")}function A(t){O("cleanup")}function j(t){var e=f,n=x,s=u,o=m;"import"===t&&(e=w,n=_,s=h,o=g),e.children(".yoast-import-spinner").hide(),n.hide(),e.children(".yoast-import-success-mark").show(),e.closest("div").find(".yoast-import-failure").remove(),s.prop("disabled",!1),i()("option:selected",o).remove(),i()("option[value='']",o).prop("selected",!0),o.trigger("change"),o.children("option").length<2&&(o.prop("disabled",!0),e.after(i()("<p></p>").text(window.yoastImportData.assets.no_data_msg)))}function P(){j("import")}function E(){j("cleanup")}function S(t,e){var n,s=f,r=x,c=u,d=window.yoastImportData.assets.cleanup_failure;"import"===e&&(s=w,r=_,c=h,d=window.yoastImportData.assets.import_failure),s.children(".yoast-import-spinner").hide(),r.hide(),c.prop("disabled",!1),n=t instanceof a?window.yoastImportData.assets.validation_failure:Object(o.sprintf)(d,"<strong>"+t+"</strong>");var p=i()("<div>").addClass("yoast-measure yoast-import-failure").html(n);s.after(p)}function k(t){S(t,"import")}function T(t){S(t,"cleanup")}function C(t){g.val()===l&&(t.preventDefault(),new p(window.yoastImportData).index(window.yoastImportData.restApi.importing_endpoints.aioseo,D).then(P).catch(k))}function M(t){m.val()===l&&(t.preventDefault(),new p(window.yoastImportData).index(window.yoastImportData.restApi.cleanup_endpoints.aioseo,A).then(E).catch(T))}function q(t){var e,n,s,a=t.closest("form").find("input[type=submit]");t.on("change",(function(){""!==(e=i()(this).find("option:selected").attr("value"))?(a.prop("disabled",!1),t===g&&(n=Object(o.sprintf)(window.yoastImportData.assets.replacing_texts.select_header,i()(this).find("option:selected").text()),s=e===l?window.yoastImportData.assets.replacing_texts.plugins.aioseo:window.yoastImportData.assets.replacing_texts.plugins.other,n+="<ul style='list-style: disc; padding: 0 15px;'>",s.forEach((function(t){n+="<li>"+t.data_name+"<br/><i>"+t.data_note+"</i></li>"})),n+="</ul>",I.html(n))):a.prop("disabled",!0)}))}i()((function(){u=i()("[name='clean_external']"),u.val(window.yoastImportData.assets.replacing_texts.cleanup_button),m=i()("[name='clean_external_plugin']"),f=i()(u).parents("form:first"),h=i()("[name='import_external']"),g=i()("[name='import_external_plugin']"),w=i()(h).parents("form:first"),w.after(i()("<p></p>").html("<strong>"+window.yoastImportData.assets.note+"</strong>"+window.yoastImportData.assets.cleanup_after_import_msg)),y=i()("<img>").addClass("yoast-import-spinner").attr("src",window.yoastImportData.assets.spinner).css({display:"inline-block","margin-left":"10px","vertical-align":"middle"}).hide(),_=i()("<span>").html(window.yoastImportData.assets.loading_msg_import).css({"margin-left":"5px","vertical-align":"middle"}).hide(),x=i()("<span>").html(window.yoastImportData.assets.loading_msg_cleanup).css({"margin-left":"5px","vertical-align":"middle"}).hide(),b=i()("<span>").addClass("dashicons dashicons-yes-alt yoast-import-success-mark").css({"margin-left":"10px","vertical-align":"middle",color:"green"}).hide(),I=i()(".yoast-import-explanation"),I.html(window.yoastImportData.assets.replacing_texts.import_explanation),v=i()(".yoast-cleanup-explanation"),v.html(window.yoastImportData.assets.replacing_texts.cleanup_explanation),g&&(q(g),g.append("<option value='' disabled='disabled' selected hidden>&mdash; "+window.yoastImportData.assets.select_placeholder+" &mdash;</option>").trigger("change")),m&&(q(m),m.append("<option value='' disabled='disabled' selected hidden>&mdash; "+window.yoastImportData.assets.select_placeholder+" &mdash;</option>").trigger("change")),w&&w.on("submit",C),f&&f.on("submit",M),i()(b).insertAfter([h,u]),i()(_).insertAfter(h),i()(x).insertAfter(u),i()(y).insertAfter([h,u])}))},4:function(t,e){t.exports=window.lodash},94:function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));class s extends Error{constructor(t,e,n,s,i){super(t),this.name="RequestError",this.url=e,this.method=n,this.statusCode=s,this.stackTrace=i}}}});