diff --git a/Phraseanet-production-client/dist/production.js b/Phraseanet-production-client/dist/production.js index 9c19d6b5d6..b046e67fd1 100644 --- a/Phraseanet-production-client/dist/production.js +++ b/Phraseanet-production-client/dist/production.js @@ -44,7 +44,7 @@ var _dialog = __webpack_require__(2); var _dialog2 = _interopRequireDefault(_dialog); -var _user = __webpack_require__(52); +var _user = __webpack_require__(53); var _user2 = _interopRequireDefault(_user); @@ -47020,6 +47020,122 @@ module.exports = { "use strict"; +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _lodash = __webpack_require__(4); + +var _lodash2 = _interopRequireDefault(_lodash); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +var FieldCollection = function () { + function FieldCollection(fieldsList) { + _classCallCheck(this, FieldCollection); + + this.fields = fieldsList; + } + + _createClass(FieldCollection, [{ + key: 'getFields', + value: function getFields() { + return this.fields; + } + }, { + key: 'getFieldOptionsById', + value: function getFieldOptionsById(meta_struct_id) { + /*var name = this.fields[meta_struct_id].name; + var label = this.fields[meta_struct_id].label; + var multi = ; + var required = this.fields[meta_struct_id].required; + var readonly = this.fields[meta_struct_id].readonly; + var maxLength = this.fields[meta_struct_id].maxLength; + var minLength = this.fields[meta_struct_id].minLength; + var type = this.fields[meta_struct_id].type; + var separator = this.fields[meta_struct_id].separator; + var vocabularyControl = this.fields[meta_struct_id].vocabularyControl || null; + var vocabularyRestricted = this.fields[meta_struct_id].vocabularyRestricted || null;*/ + + return { + multi: this.fields[meta_struct_id].multi, + required: this.fields[meta_struct_id].required, + readonly: this.fields[meta_struct_id].readonly, + maxLength: this.fields[meta_struct_id].maxLength, + minLength: this.fields[meta_struct_id].minLength, + type: this.fields[meta_struct_id].type, + separator: this.fields[meta_struct_id].separator, + vocabularyControl: this.fields[meta_struct_id].vocabularyControl || null, + vocabularyRestricted: this.fields[meta_struct_id].vocabularyRestricted || null + }; + } + }, { + key: 'setActiveField', + value: function setActiveField(metaStructId) { + this.metaStructId = metaStructId; + } + }, { + key: 'getActiveFieldIndex', + value: function getActiveFieldIndex() { + return this.metaStructId === undefined ? '?' : this.metaStructId; + } + }, { + key: 'getActiveField', + value: function getActiveField() { + return this.fields[this.getActiveFieldIndex()]; + } + }, { + key: 'getFieldByIndex', + value: function getFieldByIndex() { + var id = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + + if (this.fields[id] !== undefined) { + return this.fields[id]; + } + return false; + } + }, { + key: 'getFieldByName', + value: function getFieldByName(fieldName) { + var foundField = false; + for (var field in this.fields) { + if (this.fields[field].name === fieldName) { + foundField = this.fields[field]; + } + } + return foundField; + } + }, { + key: 'getFieldStatus', + value: function getFieldStatus() { + var id = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + } + }, { + key: 'updateField', + value: function updateField(id, data) { + if (this.fields[id] !== undefined) { + this.fields[id] = (0, _lodash2.default)(this.fields[id], data); + return this.fields[id]; + } + } + }]); + + return FieldCollection; +}(); + +exports.default = FieldCollection; + +/***/ }), +/* 53 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + Object.defineProperty(exports, "__esModule", { value: true }); @@ -47070,7 +47186,7 @@ function setPref(name, value) { exports.default = { setPref: setPref }; /***/ }), -/* 53 */ +/* 54 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -47082,7 +47198,7 @@ module.exports = Function.prototype.bind || implementation; /***/ }), -/* 54 */ +/* 55 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -47126,7 +47242,7 @@ module.exports = function isCallable(value) { /***/ }), -/* 55 */ +/* 56 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -47151,7 +47267,7 @@ var m2ts = __webpack_require__(183); var AdtsStream = __webpack_require__(185); var H264Stream = __webpack_require__(186).H264Stream; var AacStream = __webpack_require__(188); -var isLikelyAacData = __webpack_require__(56).isLikelyAacData; +var isLikelyAacData = __webpack_require__(57).isLikelyAacData; // constants var AUDIO_PROPERTIES = [ @@ -48234,7 +48350,7 @@ module.exports = { /***/ }), -/* 56 */ +/* 57 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -48412,7 +48528,7 @@ module.exports = { /***/ }), -/* 57 */ +/* 58 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -49621,122 +49737,6 @@ var leafletMap = function leafletMap(services) { exports.default = leafletMap; -/***/ }), -/* 58 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -var _lodash = __webpack_require__(4); - -var _lodash2 = _interopRequireDefault(_lodash); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -var FieldCollection = function () { - function FieldCollection(fieldsList) { - _classCallCheck(this, FieldCollection); - - this.fields = fieldsList; - } - - _createClass(FieldCollection, [{ - key: 'getFields', - value: function getFields() { - return this.fields; - } - }, { - key: 'getFieldOptionsById', - value: function getFieldOptionsById(meta_struct_id) { - /*var name = this.fields[meta_struct_id].name; - var label = this.fields[meta_struct_id].label; - var multi = ; - var required = this.fields[meta_struct_id].required; - var readonly = this.fields[meta_struct_id].readonly; - var maxLength = this.fields[meta_struct_id].maxLength; - var minLength = this.fields[meta_struct_id].minLength; - var type = this.fields[meta_struct_id].type; - var separator = this.fields[meta_struct_id].separator; - var vocabularyControl = this.fields[meta_struct_id].vocabularyControl || null; - var vocabularyRestricted = this.fields[meta_struct_id].vocabularyRestricted || null;*/ - - return { - multi: this.fields[meta_struct_id].multi, - required: this.fields[meta_struct_id].required, - readonly: this.fields[meta_struct_id].readonly, - maxLength: this.fields[meta_struct_id].maxLength, - minLength: this.fields[meta_struct_id].minLength, - type: this.fields[meta_struct_id].type, - separator: this.fields[meta_struct_id].separator, - vocabularyControl: this.fields[meta_struct_id].vocabularyControl || null, - vocabularyRestricted: this.fields[meta_struct_id].vocabularyRestricted || null - }; - } - }, { - key: 'setActiveField', - value: function setActiveField(metaStructId) { - this.metaStructId = metaStructId; - } - }, { - key: 'getActiveFieldIndex', - value: function getActiveFieldIndex() { - return this.metaStructId === undefined ? '?' : this.metaStructId; - } - }, { - key: 'getActiveField', - value: function getActiveField() { - return this.fields[this.getActiveFieldIndex()]; - } - }, { - key: 'getFieldByIndex', - value: function getFieldByIndex() { - var id = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; - - if (this.fields[id] !== undefined) { - return this.fields[id]; - } - return false; - } - }, { - key: 'getFieldByName', - value: function getFieldByName(fieldName) { - var foundField = false; - for (var field in this.fields) { - if (this.fields[field].name === fieldName) { - foundField = this.fields[field]; - } - } - return foundField; - } - }, { - key: 'getFieldStatus', - value: function getFieldStatus() { - var id = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; - } - }, { - key: 'updateField', - value: function updateField(id, data) { - if (this.fields[id] !== undefined) { - this.fields[id] = (0, _lodash2.default)(this.fields[id], data); - return this.fields[id]; - } - } - }]); - - return FieldCollection; -}(); - -exports.default = FieldCollection; - /***/ }), /* 59 */ /***/ (function(module, exports, __webpack_require__) { @@ -54337,7 +54337,7 @@ module.exports = defineProperties; "use strict"; -var bind = __webpack_require__(53); +var bind = __webpack_require__(54); var ES = __webpack_require__(153); var replace = bind.call(Function.call, String.prototype.replace); @@ -57377,7 +57377,8 @@ var RangeCollection = function (_Component) { handlePositions: [], selected: false, image: { - src: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFkAAAAyCAYAAAA3OHc2AAAAuElEQVR4Xu3UwQkAIAwEwdh/0Qr2kH2NBWRhODwzc8dbFTiQV33/ccj7xpADY8iQC4Gg4U+GHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgEiQftoTIBhrHr1wAAAABJRU5ErkJggg==', + // src: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFkAAAAyCAYAAAA3OHc2AAAAuElEQVR4Xu3UwQkAIAwEwdh/0Qr2kH2NBWRhODwzc8dbFTiQV33/ccj7xpADY8iQC4Gg4U+GHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgEiQftoTIBhrHr1wAAAABJRU5ErkJggg==', + src: '', width: 89, height: 50 }, @@ -57571,26 +57572,27 @@ var RangeCollection = function (_Component) { }; _this.exportRangesData = function (rangeData) { - var title = _this.settings.translations.alertTitle; - var message = _this.settings.translations.updateTitle; + // var title = this.settings.translations.alertTitle; + // var message = this.settings.translations.updateTitle; var services = _this.settings.services; - _jquery2.default.ajax({ - type: 'POST', - url: _this.settings.baseUrl + 'prod/tools/metadata/save/', - data: { - databox_id: _this.settings.databoxId, - record_id: _this.settings.recordId, - meta_struct_id: _this.settings.meta_struct_id, - value: rangeData - }, - success: function success(data) { - if (!data.success) { - humane.error(data.message); - } else { - humane.info(message); - } - } - }); + // do not save on metadata + // $.ajax({ + // type: 'POST', + // url: `${this.settings.baseUrl}prod/tools/metadata/save/`, + // data: { + // databox_id: this.settings.databoxId, + // record_id: this.settings.recordId, + // meta_struct_id: this.settings.meta_struct_id, + // value: rangeData + // }, + // success: function (data) { + // if (!data.success) { + // humane.error(data.message); + // } else { + // humane.info(message); + // } + // } + // }); }; _this.settings = settings; @@ -73717,7 +73719,7 @@ var _geonameDatasource = __webpack_require__(196); var _geonameDatasource2 = _interopRequireDefault(_geonameDatasource); -var _mapbox = __webpack_require__(57); +var _mapbox = __webpack_require__(58); var _mapbox2 = _interopRequireDefault(_mapbox); @@ -73729,7 +73731,7 @@ var _recordCollection = __webpack_require__(248); var _recordCollection2 = _interopRequireDefault(_recordCollection); -var _fieldCollection = __webpack_require__(58); +var _fieldCollection = __webpack_require__(52); var _fieldCollection2 = _interopRequireDefault(_fieldCollection); @@ -101689,7 +101691,7 @@ module.exports = function (headers) { "use strict"; -var bind = __webpack_require__(53); +var bind = __webpack_require__(54); var define = __webpack_require__(80); var implementation = __webpack_require__(81); @@ -101957,7 +101959,7 @@ var $isFinite = __webpack_require__(156); var sign = __webpack_require__(157); var mod = __webpack_require__(158); -var IsCallable = __webpack_require__(54); +var IsCallable = __webpack_require__(55); var toPrimitive = __webpack_require__(159); var has = __webpack_require__(161); @@ -102419,7 +102421,7 @@ var toStr = Object.prototype.toString; var isPrimitive = __webpack_require__(160); -var isCallable = __webpack_require__(54); +var isCallable = __webpack_require__(55); // https://es5.github.io/#x8.12 var ES5internalSlots = { @@ -102468,7 +102470,7 @@ module.exports = function isPrimitive(value) { "use strict"; -var bind = __webpack_require__(53); +var bind = __webpack_require__(54); module.exports = bind.call(Function.call, Object.prototype.hasOwnProperty); @@ -102497,7 +102499,7 @@ module.exports = function shimStringTrim() { "use strict"; -var isCallable = __webpack_require__(54); +var isCallable = __webpack_require__(55); var toStr = Object.prototype.toString; var hasOwnProperty = Object.prototype.hasOwnProperty; @@ -109651,9 +109653,9 @@ module.exports = { module.exports = { generator: __webpack_require__(83), probe: __webpack_require__(50), - Transmuxer: __webpack_require__(55).Transmuxer, - AudioSegmentStream: __webpack_require__(55).AudioSegmentStream, - VideoSegmentStream: __webpack_require__(55).VideoSegmentStream, + Transmuxer: __webpack_require__(56).Transmuxer, + AudioSegmentStream: __webpack_require__(56).AudioSegmentStream, + VideoSegmentStream: __webpack_require__(56).VideoSegmentStream, CaptionParser: __webpack_require__(189) }; @@ -111813,7 +111815,7 @@ module.exports = ExpGolomb; */ var Stream = __webpack_require__(22); -var aacUtils = __webpack_require__(56); +var aacUtils = __webpack_require__(57); // Constants var AacStream; @@ -113244,7 +113246,7 @@ var StreamTypes = __webpack_require__(46); var handleRollover = __webpack_require__(86).handleRollover; var probe = {}; probe.ts = __webpack_require__(192); -probe.aac = __webpack_require__(56); +probe.aac = __webpack_require__(57); var @@ -123339,7 +123341,7 @@ Object.defineProperty(exports, "__esModule", { var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); -var _fieldCollection = __webpack_require__(58); +var _fieldCollection = __webpack_require__(52); var _fieldCollection2 = _interopRequireDefault(_fieldCollection); @@ -126266,7 +126268,7 @@ var _videojsFlash = __webpack_require__(75); var _videojsFlash2 = _interopRequireDefault(_videojsFlash); -var _fieldCollection = __webpack_require__(58); +var _fieldCollection = __webpack_require__(52); var _fieldCollection2 = _interopRequireDefault(_fieldCollection); @@ -128681,7 +128683,7 @@ var _emitter = __webpack_require__(16); var _emitter2 = _interopRequireDefault(_emitter); -var _mapbox = __webpack_require__(57); +var _mapbox = __webpack_require__(58); var _mapbox2 = _interopRequireDefault(_mapbox); @@ -129515,6 +129517,10 @@ var _video = __webpack_require__(12); var _video2 = _interopRequireDefault(_video); +var _fieldCollection = __webpack_require__(52); + +var _fieldCollection2 = _interopRequireDefault(_fieldCollection); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var hotkeys = __webpack_require__(107); @@ -129555,6 +129561,26 @@ var videoPreviewPlayer = function videoPreviewPlayer(services, datas) { // options.services = params.services; options.preferences = initData.preferences; + if (initData.videoEditorConfig !== null) { + options.seekBackwardStep = initData.videoEditorConfig.seekBackwardStep; + options.seekForwardStep = initData.videoEditorConfig.seekForwardStep; + options.playbackRates = initData.videoEditorConfig.playbackRates === undefined ? [1, 2, 3] : initData.videoEditorConfig.playbackRates; + options.vttFieldValue = false; + options.ChapterVttFieldName = initData.videoEditorConfig.ChapterVttFieldName === undefined ? false : initData.videoEditorConfig.ChapterVttFieldName; + } + + // get default videoTextTrack value + if (options.ChapterVttFieldName !== false) { + var fieldCollection = new _fieldCollection2.default(initData.T_fields); + var vttField = fieldCollection.getFieldByName(options.ChapterVttFieldName); + if (vttField !== false) { + if (vttField._value.VideoTextTrackChapters != undefined) { + options.vttFieldValue = vttField._value.VideoTextTrackChapters[0]; + } + options.meta_struct_id = vttField.id; + } + } + dispose(); render(initData); }; @@ -129927,10 +129953,10 @@ var plugin = function plugin(options) { this.ready(function () { /*resize video*/ - var videoChapterH = (0, _jquery2.default)('#rangeExtractor').height(); - (0, _jquery2.default)('#rangeExtractor .video-player-container').css('max-height', videoChapterH); - (0, _jquery2.default)('#rangeExtractor .range-collection-container').css('height', videoChapterH - 100); - (0, _jquery2.default)('#rangeExtractor .video-range-editor-container').css('max-height', videoChapterH).css('overflow', 'hidden'); + var videoChapterH = (0, _jquery2.default)('#phraseanet-video-preview').height(); + (0, _jquery2.default)('#phraseanet-video-preview .video-player-container').css('max-height', videoChapterH); + (0, _jquery2.default)('#phraseanet-video-preview .range-collection-container').css('height', videoChapterH - 100); + (0, _jquery2.default)('#phraseanet-video-preview .video-range-editor-container').css('max-height', videoChapterH).css('overflow', 'hidden'); _this.setVTT(); @@ -133402,7 +133428,7 @@ var _resultInfos = __webpack_require__(98); var _resultInfos2 = _interopRequireDefault(_resultInfos); -var _user = __webpack_require__(52); +var _user = __webpack_require__(53); var _user2 = _interopRequireDefault(_user); @@ -133605,7 +133631,7 @@ var _underscore = __webpack_require__(1); var _underscore2 = _interopRequireDefault(_underscore); -var _user = __webpack_require__(52); +var _user = __webpack_require__(53); var _user2 = _interopRequireDefault(_user); @@ -134297,7 +134323,7 @@ var _dialog = __webpack_require__(2); var _dialog2 = _interopRequireDefault(_dialog); -var _mapbox = __webpack_require__(57); +var _mapbox = __webpack_require__(58); var _mapbox2 = _interopRequireDefault(_mapbox); diff --git a/Phraseanet-production-client/dist/production.min.js b/Phraseanet-production-client/dist/production.min.js index 9c19d6b5d6..b046e67fd1 100644 --- a/Phraseanet-production-client/dist/production.min.js +++ b/Phraseanet-production-client/dist/production.min.js @@ -44,7 +44,7 @@ var _dialog = __webpack_require__(2); var _dialog2 = _interopRequireDefault(_dialog); -var _user = __webpack_require__(52); +var _user = __webpack_require__(53); var _user2 = _interopRequireDefault(_user); @@ -47020,6 +47020,122 @@ module.exports = { "use strict"; +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _lodash = __webpack_require__(4); + +var _lodash2 = _interopRequireDefault(_lodash); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +var FieldCollection = function () { + function FieldCollection(fieldsList) { + _classCallCheck(this, FieldCollection); + + this.fields = fieldsList; + } + + _createClass(FieldCollection, [{ + key: 'getFields', + value: function getFields() { + return this.fields; + } + }, { + key: 'getFieldOptionsById', + value: function getFieldOptionsById(meta_struct_id) { + /*var name = this.fields[meta_struct_id].name; + var label = this.fields[meta_struct_id].label; + var multi = ; + var required = this.fields[meta_struct_id].required; + var readonly = this.fields[meta_struct_id].readonly; + var maxLength = this.fields[meta_struct_id].maxLength; + var minLength = this.fields[meta_struct_id].minLength; + var type = this.fields[meta_struct_id].type; + var separator = this.fields[meta_struct_id].separator; + var vocabularyControl = this.fields[meta_struct_id].vocabularyControl || null; + var vocabularyRestricted = this.fields[meta_struct_id].vocabularyRestricted || null;*/ + + return { + multi: this.fields[meta_struct_id].multi, + required: this.fields[meta_struct_id].required, + readonly: this.fields[meta_struct_id].readonly, + maxLength: this.fields[meta_struct_id].maxLength, + minLength: this.fields[meta_struct_id].minLength, + type: this.fields[meta_struct_id].type, + separator: this.fields[meta_struct_id].separator, + vocabularyControl: this.fields[meta_struct_id].vocabularyControl || null, + vocabularyRestricted: this.fields[meta_struct_id].vocabularyRestricted || null + }; + } + }, { + key: 'setActiveField', + value: function setActiveField(metaStructId) { + this.metaStructId = metaStructId; + } + }, { + key: 'getActiveFieldIndex', + value: function getActiveFieldIndex() { + return this.metaStructId === undefined ? '?' : this.metaStructId; + } + }, { + key: 'getActiveField', + value: function getActiveField() { + return this.fields[this.getActiveFieldIndex()]; + } + }, { + key: 'getFieldByIndex', + value: function getFieldByIndex() { + var id = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + + if (this.fields[id] !== undefined) { + return this.fields[id]; + } + return false; + } + }, { + key: 'getFieldByName', + value: function getFieldByName(fieldName) { + var foundField = false; + for (var field in this.fields) { + if (this.fields[field].name === fieldName) { + foundField = this.fields[field]; + } + } + return foundField; + } + }, { + key: 'getFieldStatus', + value: function getFieldStatus() { + var id = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + } + }, { + key: 'updateField', + value: function updateField(id, data) { + if (this.fields[id] !== undefined) { + this.fields[id] = (0, _lodash2.default)(this.fields[id], data); + return this.fields[id]; + } + } + }]); + + return FieldCollection; +}(); + +exports.default = FieldCollection; + +/***/ }), +/* 53 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + Object.defineProperty(exports, "__esModule", { value: true }); @@ -47070,7 +47186,7 @@ function setPref(name, value) { exports.default = { setPref: setPref }; /***/ }), -/* 53 */ +/* 54 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -47082,7 +47198,7 @@ module.exports = Function.prototype.bind || implementation; /***/ }), -/* 54 */ +/* 55 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -47126,7 +47242,7 @@ module.exports = function isCallable(value) { /***/ }), -/* 55 */ +/* 56 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -47151,7 +47267,7 @@ var m2ts = __webpack_require__(183); var AdtsStream = __webpack_require__(185); var H264Stream = __webpack_require__(186).H264Stream; var AacStream = __webpack_require__(188); -var isLikelyAacData = __webpack_require__(56).isLikelyAacData; +var isLikelyAacData = __webpack_require__(57).isLikelyAacData; // constants var AUDIO_PROPERTIES = [ @@ -48234,7 +48350,7 @@ module.exports = { /***/ }), -/* 56 */ +/* 57 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -48412,7 +48528,7 @@ module.exports = { /***/ }), -/* 57 */ +/* 58 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -49621,122 +49737,6 @@ var leafletMap = function leafletMap(services) { exports.default = leafletMap; -/***/ }), -/* 58 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -var _lodash = __webpack_require__(4); - -var _lodash2 = _interopRequireDefault(_lodash); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -var FieldCollection = function () { - function FieldCollection(fieldsList) { - _classCallCheck(this, FieldCollection); - - this.fields = fieldsList; - } - - _createClass(FieldCollection, [{ - key: 'getFields', - value: function getFields() { - return this.fields; - } - }, { - key: 'getFieldOptionsById', - value: function getFieldOptionsById(meta_struct_id) { - /*var name = this.fields[meta_struct_id].name; - var label = this.fields[meta_struct_id].label; - var multi = ; - var required = this.fields[meta_struct_id].required; - var readonly = this.fields[meta_struct_id].readonly; - var maxLength = this.fields[meta_struct_id].maxLength; - var minLength = this.fields[meta_struct_id].minLength; - var type = this.fields[meta_struct_id].type; - var separator = this.fields[meta_struct_id].separator; - var vocabularyControl = this.fields[meta_struct_id].vocabularyControl || null; - var vocabularyRestricted = this.fields[meta_struct_id].vocabularyRestricted || null;*/ - - return { - multi: this.fields[meta_struct_id].multi, - required: this.fields[meta_struct_id].required, - readonly: this.fields[meta_struct_id].readonly, - maxLength: this.fields[meta_struct_id].maxLength, - minLength: this.fields[meta_struct_id].minLength, - type: this.fields[meta_struct_id].type, - separator: this.fields[meta_struct_id].separator, - vocabularyControl: this.fields[meta_struct_id].vocabularyControl || null, - vocabularyRestricted: this.fields[meta_struct_id].vocabularyRestricted || null - }; - } - }, { - key: 'setActiveField', - value: function setActiveField(metaStructId) { - this.metaStructId = metaStructId; - } - }, { - key: 'getActiveFieldIndex', - value: function getActiveFieldIndex() { - return this.metaStructId === undefined ? '?' : this.metaStructId; - } - }, { - key: 'getActiveField', - value: function getActiveField() { - return this.fields[this.getActiveFieldIndex()]; - } - }, { - key: 'getFieldByIndex', - value: function getFieldByIndex() { - var id = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; - - if (this.fields[id] !== undefined) { - return this.fields[id]; - } - return false; - } - }, { - key: 'getFieldByName', - value: function getFieldByName(fieldName) { - var foundField = false; - for (var field in this.fields) { - if (this.fields[field].name === fieldName) { - foundField = this.fields[field]; - } - } - return foundField; - } - }, { - key: 'getFieldStatus', - value: function getFieldStatus() { - var id = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; - } - }, { - key: 'updateField', - value: function updateField(id, data) { - if (this.fields[id] !== undefined) { - this.fields[id] = (0, _lodash2.default)(this.fields[id], data); - return this.fields[id]; - } - } - }]); - - return FieldCollection; -}(); - -exports.default = FieldCollection; - /***/ }), /* 59 */ /***/ (function(module, exports, __webpack_require__) { @@ -54337,7 +54337,7 @@ module.exports = defineProperties; "use strict"; -var bind = __webpack_require__(53); +var bind = __webpack_require__(54); var ES = __webpack_require__(153); var replace = bind.call(Function.call, String.prototype.replace); @@ -57377,7 +57377,8 @@ var RangeCollection = function (_Component) { handlePositions: [], selected: false, image: { - src: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFkAAAAyCAYAAAA3OHc2AAAAuElEQVR4Xu3UwQkAIAwEwdh/0Qr2kH2NBWRhODwzc8dbFTiQV33/ccj7xpADY8iQC4Gg4U+GHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgEiQftoTIBhrHr1wAAAABJRU5ErkJggg==', + // src: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFkAAAAyCAYAAAA3OHc2AAAAuElEQVR4Xu3UwQkAIAwEwdh/0Qr2kH2NBWRhODwzc8dbFTiQV33/ccj7xpADY8iQC4Gg4U+GHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgEiQftoTIBhrHr1wAAAABJRU5ErkJggg==', + src: '', width: 89, height: 50 }, @@ -57571,26 +57572,27 @@ var RangeCollection = function (_Component) { }; _this.exportRangesData = function (rangeData) { - var title = _this.settings.translations.alertTitle; - var message = _this.settings.translations.updateTitle; + // var title = this.settings.translations.alertTitle; + // var message = this.settings.translations.updateTitle; var services = _this.settings.services; - _jquery2.default.ajax({ - type: 'POST', - url: _this.settings.baseUrl + 'prod/tools/metadata/save/', - data: { - databox_id: _this.settings.databoxId, - record_id: _this.settings.recordId, - meta_struct_id: _this.settings.meta_struct_id, - value: rangeData - }, - success: function success(data) { - if (!data.success) { - humane.error(data.message); - } else { - humane.info(message); - } - } - }); + // do not save on metadata + // $.ajax({ + // type: 'POST', + // url: `${this.settings.baseUrl}prod/tools/metadata/save/`, + // data: { + // databox_id: this.settings.databoxId, + // record_id: this.settings.recordId, + // meta_struct_id: this.settings.meta_struct_id, + // value: rangeData + // }, + // success: function (data) { + // if (!data.success) { + // humane.error(data.message); + // } else { + // humane.info(message); + // } + // } + // }); }; _this.settings = settings; @@ -73717,7 +73719,7 @@ var _geonameDatasource = __webpack_require__(196); var _geonameDatasource2 = _interopRequireDefault(_geonameDatasource); -var _mapbox = __webpack_require__(57); +var _mapbox = __webpack_require__(58); var _mapbox2 = _interopRequireDefault(_mapbox); @@ -73729,7 +73731,7 @@ var _recordCollection = __webpack_require__(248); var _recordCollection2 = _interopRequireDefault(_recordCollection); -var _fieldCollection = __webpack_require__(58); +var _fieldCollection = __webpack_require__(52); var _fieldCollection2 = _interopRequireDefault(_fieldCollection); @@ -101689,7 +101691,7 @@ module.exports = function (headers) { "use strict"; -var bind = __webpack_require__(53); +var bind = __webpack_require__(54); var define = __webpack_require__(80); var implementation = __webpack_require__(81); @@ -101957,7 +101959,7 @@ var $isFinite = __webpack_require__(156); var sign = __webpack_require__(157); var mod = __webpack_require__(158); -var IsCallable = __webpack_require__(54); +var IsCallable = __webpack_require__(55); var toPrimitive = __webpack_require__(159); var has = __webpack_require__(161); @@ -102419,7 +102421,7 @@ var toStr = Object.prototype.toString; var isPrimitive = __webpack_require__(160); -var isCallable = __webpack_require__(54); +var isCallable = __webpack_require__(55); // https://es5.github.io/#x8.12 var ES5internalSlots = { @@ -102468,7 +102470,7 @@ module.exports = function isPrimitive(value) { "use strict"; -var bind = __webpack_require__(53); +var bind = __webpack_require__(54); module.exports = bind.call(Function.call, Object.prototype.hasOwnProperty); @@ -102497,7 +102499,7 @@ module.exports = function shimStringTrim() { "use strict"; -var isCallable = __webpack_require__(54); +var isCallable = __webpack_require__(55); var toStr = Object.prototype.toString; var hasOwnProperty = Object.prototype.hasOwnProperty; @@ -109651,9 +109653,9 @@ module.exports = { module.exports = { generator: __webpack_require__(83), probe: __webpack_require__(50), - Transmuxer: __webpack_require__(55).Transmuxer, - AudioSegmentStream: __webpack_require__(55).AudioSegmentStream, - VideoSegmentStream: __webpack_require__(55).VideoSegmentStream, + Transmuxer: __webpack_require__(56).Transmuxer, + AudioSegmentStream: __webpack_require__(56).AudioSegmentStream, + VideoSegmentStream: __webpack_require__(56).VideoSegmentStream, CaptionParser: __webpack_require__(189) }; @@ -111813,7 +111815,7 @@ module.exports = ExpGolomb; */ var Stream = __webpack_require__(22); -var aacUtils = __webpack_require__(56); +var aacUtils = __webpack_require__(57); // Constants var AacStream; @@ -113244,7 +113246,7 @@ var StreamTypes = __webpack_require__(46); var handleRollover = __webpack_require__(86).handleRollover; var probe = {}; probe.ts = __webpack_require__(192); -probe.aac = __webpack_require__(56); +probe.aac = __webpack_require__(57); var @@ -123339,7 +123341,7 @@ Object.defineProperty(exports, "__esModule", { var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); -var _fieldCollection = __webpack_require__(58); +var _fieldCollection = __webpack_require__(52); var _fieldCollection2 = _interopRequireDefault(_fieldCollection); @@ -126266,7 +126268,7 @@ var _videojsFlash = __webpack_require__(75); var _videojsFlash2 = _interopRequireDefault(_videojsFlash); -var _fieldCollection = __webpack_require__(58); +var _fieldCollection = __webpack_require__(52); var _fieldCollection2 = _interopRequireDefault(_fieldCollection); @@ -128681,7 +128683,7 @@ var _emitter = __webpack_require__(16); var _emitter2 = _interopRequireDefault(_emitter); -var _mapbox = __webpack_require__(57); +var _mapbox = __webpack_require__(58); var _mapbox2 = _interopRequireDefault(_mapbox); @@ -129515,6 +129517,10 @@ var _video = __webpack_require__(12); var _video2 = _interopRequireDefault(_video); +var _fieldCollection = __webpack_require__(52); + +var _fieldCollection2 = _interopRequireDefault(_fieldCollection); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var hotkeys = __webpack_require__(107); @@ -129555,6 +129561,26 @@ var videoPreviewPlayer = function videoPreviewPlayer(services, datas) { // options.services = params.services; options.preferences = initData.preferences; + if (initData.videoEditorConfig !== null) { + options.seekBackwardStep = initData.videoEditorConfig.seekBackwardStep; + options.seekForwardStep = initData.videoEditorConfig.seekForwardStep; + options.playbackRates = initData.videoEditorConfig.playbackRates === undefined ? [1, 2, 3] : initData.videoEditorConfig.playbackRates; + options.vttFieldValue = false; + options.ChapterVttFieldName = initData.videoEditorConfig.ChapterVttFieldName === undefined ? false : initData.videoEditorConfig.ChapterVttFieldName; + } + + // get default videoTextTrack value + if (options.ChapterVttFieldName !== false) { + var fieldCollection = new _fieldCollection2.default(initData.T_fields); + var vttField = fieldCollection.getFieldByName(options.ChapterVttFieldName); + if (vttField !== false) { + if (vttField._value.VideoTextTrackChapters != undefined) { + options.vttFieldValue = vttField._value.VideoTextTrackChapters[0]; + } + options.meta_struct_id = vttField.id; + } + } + dispose(); render(initData); }; @@ -129927,10 +129953,10 @@ var plugin = function plugin(options) { this.ready(function () { /*resize video*/ - var videoChapterH = (0, _jquery2.default)('#rangeExtractor').height(); - (0, _jquery2.default)('#rangeExtractor .video-player-container').css('max-height', videoChapterH); - (0, _jquery2.default)('#rangeExtractor .range-collection-container').css('height', videoChapterH - 100); - (0, _jquery2.default)('#rangeExtractor .video-range-editor-container').css('max-height', videoChapterH).css('overflow', 'hidden'); + var videoChapterH = (0, _jquery2.default)('#phraseanet-video-preview').height(); + (0, _jquery2.default)('#phraseanet-video-preview .video-player-container').css('max-height', videoChapterH); + (0, _jquery2.default)('#phraseanet-video-preview .range-collection-container').css('height', videoChapterH - 100); + (0, _jquery2.default)('#phraseanet-video-preview .video-range-editor-container').css('max-height', videoChapterH).css('overflow', 'hidden'); _this.setVTT(); @@ -133402,7 +133428,7 @@ var _resultInfos = __webpack_require__(98); var _resultInfos2 = _interopRequireDefault(_resultInfos); -var _user = __webpack_require__(52); +var _user = __webpack_require__(53); var _user2 = _interopRequireDefault(_user); @@ -133605,7 +133631,7 @@ var _underscore = __webpack_require__(1); var _underscore2 = _interopRequireDefault(_underscore); -var _user = __webpack_require__(52); +var _user = __webpack_require__(53); var _user2 = _interopRequireDefault(_user); @@ -134297,7 +134323,7 @@ var _dialog = __webpack_require__(2); var _dialog2 = _interopRequireDefault(_dialog); -var _mapbox = __webpack_require__(57); +var _mapbox = __webpack_require__(58); var _mapbox2 = _interopRequireDefault(_mapbox); diff --git a/Phraseanet-production-client/src/components/record/recordPreview/rangePlugin/index.js b/Phraseanet-production-client/src/components/record/recordPreview/rangePlugin/index.js index 3f8ed7ae56..f8634a11de 100644 --- a/Phraseanet-production-client/src/components/record/recordPreview/rangePlugin/index.js +++ b/Phraseanet-production-client/src/components/record/recordPreview/rangePlugin/index.js @@ -307,11 +307,10 @@ const plugin = function (options) { this.ready(() => { /*resize video*/ - var videoChapterH = $('#rangeExtractor').height(); - $('#rangeExtractor .video-player-container').css('max-height', videoChapterH); - $('#rangeExtractor .range-collection-container').css('height', videoChapterH - 100); - $('#rangeExtractor .video-range-editor-container').css('max-height', videoChapterH).css('overflow','hidden'); - + var videoChapterH = $('#phraseanet-video-preview').height(); + $('#phraseanet-video-preview .video-player-container').css('max-height', videoChapterH); + $('#phraseanet-video-preview .range-collection-container').css('height', videoChapterH - 100); + $('#phraseanet-video-preview .video-range-editor-container').css('max-height', videoChapterH).css('overflow','hidden'); this.setVTT(); diff --git a/Phraseanet-production-client/src/components/record/recordPreview/rangePlugin/rangeCollection.js b/Phraseanet-production-client/src/components/record/recordPreview/rangePlugin/rangeCollection.js index 2624d5a031..f4adfffef6 100644 --- a/Phraseanet-production-client/src/components/record/recordPreview/rangePlugin/rangeCollection.js +++ b/Phraseanet-production-client/src/components/record/recordPreview/rangePlugin/rangeCollection.js @@ -22,7 +22,8 @@ class RangeCollection extends Component { handlePositions: [], selected: false, image: { - src: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFkAAAAyCAYAAAA3OHc2AAAAuElEQVR4Xu3UwQkAIAwEwdh/0Qr2kH2NBWRhODwzc8dbFTiQV33/ccj7xpADY8iQC4Gg4U+GHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgEiQftoTIBhrHr1wAAAABJRU5ErkJggg==', + // src: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFkAAAAyCAYAAAA3OHc2AAAAuElEQVR4Xu3UwQkAIAwEwdh/0Qr2kH2NBWRhODwzc8dbFTiQV33/ccj7xpADY8iQC4Gg4U+GHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgECUuGHAgEiQftoTIBhrHr1wAAAABJRU5ErkJggg==', + src: '', width: 89, height: 50 }, @@ -476,26 +477,27 @@ ${JSON.stringify(exportableData)} } exportRangesData = (rangeData) => { - var title = this.settings.translations.alertTitle; - var message = this.settings.translations.updateTitle; + // var title = this.settings.translations.alertTitle; + // var message = this.settings.translations.updateTitle; var services = this.settings.services; - $.ajax({ - type: 'POST', - url: `${this.settings.baseUrl}prod/tools/metadata/save/`, - data: { - databox_id: this.settings.databoxId, - record_id: this.settings.recordId, - meta_struct_id: this.settings.meta_struct_id, - value: rangeData - }, - success: function (data) { - if (!data.success) { - humane.error(data.message); - } else { - humane.info(message); - } - } - }); + // do not save on metadata + // $.ajax({ + // type: 'POST', + // url: `${this.settings.baseUrl}prod/tools/metadata/save/`, + // data: { + // databox_id: this.settings.databoxId, + // record_id: this.settings.recordId, + // meta_struct_id: this.settings.meta_struct_id, + // value: rangeData + // }, + // success: function (data) { + // if (!data.success) { + // humane.error(data.message); + // } else { + // humane.info(message); + // } + // } + // }); }; } diff --git a/Phraseanet-production-client/src/components/record/recordPreview/videoPreviewPlayer.js b/Phraseanet-production-client/src/components/record/recordPreview/videoPreviewPlayer.js index 91944bf5db..ac667c615e 100644 --- a/Phraseanet-production-client/src/components/record/recordPreview/videoPreviewPlayer.js +++ b/Phraseanet-production-client/src/components/record/recordPreview/videoPreviewPlayer.js @@ -3,6 +3,7 @@ import $ from 'jquery'; import rangePlugin from './rangePlugin/index'; let hotkeys = require('videojs-hotkeys'); import videojs from 'video.js'; +import FieldCollection from "../recordEditor/models/fieldCollection"; // require('video.js').default; const videoPreviewPlayer = (services, datas, activeTab = false) => { @@ -35,6 +36,26 @@ const videoPreviewPlayer = (services, datas, activeTab = false) => { // options.services = params.services; options.preferences = initData.preferences; + if (initData.videoEditorConfig !== null) { + options.seekBackwardStep = initData.videoEditorConfig.seekBackwardStep; + options.seekForwardStep = initData.videoEditorConfig.seekForwardStep; + options.playbackRates = initData.videoEditorConfig.playbackRates === undefined ? [1, 2, 3] : initData.videoEditorConfig.playbackRates; + options.vttFieldValue = false; + options.ChapterVttFieldName = initData.videoEditorConfig.ChapterVttFieldName === undefined ? false : initData.videoEditorConfig.ChapterVttFieldName; + } + + // get default videoTextTrack value + if (options.ChapterVttFieldName !== false) { + var fieldCollection = new FieldCollection(initData.T_fields); + let vttField = fieldCollection.getFieldByName(options.ChapterVttFieldName); + if (vttField !== false) { + if(vttField._value.VideoTextTrackChapters != undefined) { + options.vttFieldValue = vttField._value.VideoTextTrackChapters[0]; + } + options.meta_struct_id = vttField.id; + } + } + dispose(); render(initData); }; diff --git a/lib/Alchemy/Phrasea/Controller/Prod/RecordController.php b/lib/Alchemy/Phrasea/Controller/Prod/RecordController.php index b14585bba4..f1c52ed22a 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/RecordController.php +++ b/lib/Alchemy/Phrasea/Controller/Prod/RecordController.php @@ -164,6 +164,22 @@ public function getRecord(Request $request) } } + $JSFields = []; + + foreach ($record->getDatabox()->get_meta_structure() as $meta) { + /** @var \databox_field $meta */ + $fields[] = $meta; + + /** @Ignore */ + $JSFields[$meta->get_id()] = [ + 'id' => $meta->get_id(), + 'name' => $meta->get_name(), + '_value' => $record->getCaption([$meta->get_name()]), + ]; + + + } + $previewConfig = [ "isVideo" => ($record->getType() == 'video'), "databaseId" => $record->getBaseId(), @@ -174,6 +190,7 @@ public function getRecord(Request $request) "type" => $record->getType(), "sources" => $sources ], + "T_fields" => $JSFields, "preferences" => [ "overlapChapters" => $this->app['settings']->getUserSetting($this->getAuthenticatedUser(), 'overlapChapters') ]