define([
'jquery',
'/common/common-util.js',
'/common/common-hash.js',
'/common/common-interface.js',
'/common/common-ui-elements.js',
'/common/inner/common-modal.js',
'/common/hyperscript.js',
'/customize/messages.js',
'/bower_components/nthen/index.js',
], function ($, Util, Hash, UI, UIElements, Modal, h,
Messages, nThen) {
var Properties = {};
var getPadProperties = function (Env, data, opts, _cb) {
var cb = Util.once(Util.mkAsync(_cb));
var common = Env.common;
opts = opts || {};
var $d = $('
');
if (!data) { return void cb(void 0, $d); }
data = Util.clone(data);
var privateData = common.getMetadataMgr().getPrivateData();
if (privateData.propChannels) {
var p = privateData.propChannels;
data.channel = data.channel || p.channel;
data.answersChannel = data.answersChannel || p.answersChannel;
data.rtChannel = data.rtChannel || p.rtChannel;
data.lastVersion = data.lastVersion || p.lastVersion;
data.lastCpHash = data.lastCpHash || p.lastCpHash;
}
if (data.channel) {
$('