HEX
Server: nginx/1.18.0
System: Linux iZj6c1ieg2jrpk1z5tzi19Z 6.3.9-1.el7.elrepo.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jun 21 22:18:40 EDT 2023 x86_64
User: www (1001)
PHP: 8.2.4
Disabled: passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
Upload Files
File: /www/wwwroot/www.cytocare.cn/wp-content/plugins/wpforms-lite/assets/js/admin/builder/templates.js
/* global WPForms, jQuery, Map, wpforms_builder, wpforms_builder_providers, _ */

var WPForms = window.WPForms || {};
WPForms.Admin = WPForms.Admin || {};
WPForms.Admin.Builder = WPForms.Admin.Builder || {};

WPForms.Admin.Builder.Templates = WPForms.Admin.Builder.Templates || ( function( document, window, $ ) {
	'use strict';

	/**
	 * Private functions and properties.
	 *
	 * @since 1.4.8
	 *
	 * @type {Object}
	 */
	var __private = {

		/**
		 * All templating functions for providers are stored here in a Map.
		 * Key is a template name, value - Underscore.js templating function.
		 *
		 * @since 1.4.8
		 *
		 * @type {Map}
		 */
		previews: new Map(),
	};

	/**
	 * Public functions and properties.
	 *
	 * @since 1.4.8
	 *
	 * @type {Object}
	 */
	var app = {

		/**
		 * Start the engine. DOM is not ready yet, use only to init something.
		 *
		 * @since 1.4.8
		 */
		init: function() {

			// Do that when DOM is ready.
			$( app.ready );
		},

		/**
		 * DOM is fully loaded.
		 *
		 * @since 1.4.8
		 */
		ready: function() {

			$( '#wpforms-panel-providers' ).trigger( 'WPForms.Admin.Builder.Templates.ready' );
		},

		/**
		 * Register and compile all templates.
		 * All data is saved in a Map.
		 *
		 * @since 1.4.8
		 *
		 * @param {string[]} templates Array of template names.
		 */
		add: function( templates ) {

			templates.forEach( function( template ) {
				if ( typeof template === 'string' ) {
					__private.previews.set( template, wp.template( template ) );
				}
			} );
		},

		/**
		 * Get a templating function (to compile later with data).
		 *
		 * @since 1.4.8
		 *
		 * @param {string} template ID of a template to retrieve from a cache.
		 *
		 * @returns {*} A callable that after compiling will always return a string.
		 */
		get: function( template ) {

			var preview = __private.previews.get( template );

			if ( typeof preview !== 'undefined' ) {
				return preview;
			}

			return function() {
				return '';
			};
		},

	};

	// Provide access to public functions/properties.
	return app;

} )( document, window, jQuery );

// Initialize.
WPForms.Admin.Builder.Templates.init();