(window.webpackJsonp=window.webpackJsonp||[]).push([[106],{tDOR:function(t,e,r){"use strict";r.r(e);var n=function(){var t=this.$createElement;return(this._self._c||t)("link-experiment-form",{attrs:{"available-experiments":this.availableExperiments,platform:this.platform,loading:this.loading},on:{cancel:this.quitForm,validate:this.updatePlatformExperiments}})};n._withStripped=!0;r("pNMO"),r("4Brf"),r("0oug"),r("TeQF"),r("4mDm"),r("2B1R"),r("ToJy"),r("sMBO"),r("uL8W"),r("eoL8"),r("5DmW"),r("NBAS"),r("ExoC"),r("07d7"),r("5s+n"),r("p532"),r("SuFq"),r("PKPk"),r("3bBZ");var o=r("alyU"),i=r("lBeq"),a=r("hl6n"),u=r("KZrk"),l=r("G0B5");function c(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function f(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function p(t,e,r){return e=s(e),function(t,e){if(e&&("object"===d(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){return!1}}()?Reflect.construct(e,r||[],s(t).constructor):e.apply(t,r))}function s(t){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function m(t,e){return(m=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function d(t){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var b=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":d(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},y=function(t){function e(){var t;return c(this,e),(t=p(this,e,arguments)).platform=null,t.availableExperiments=[],t.rollbackRoute=u.nb,t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&m(t,e)}(e,t),r=e,(n=[{key:"updateData",value:function(){var t=this;this.loading=!0,Promise.all([this.experimentProvider.getAll({site:this.$store.getters["navigation/getActiveRoleSite"].siteIri,pagination:!1}).then((function(e){return Promise.all(t.platform.experiments).then((function(r){t.availableExperiments=e.result.sort((function(t,e){return t.name.localeCompare(e.name)})),r.length>0&&(t.availableExperiments=t.availableExperiments.filter((function(t){return t.individualUP===r[0].individualUP})))}))})),this.platformProvider.getByIri(this.platformIri).then((function(e){return t.platform=e}))]).finally((function(){return t.loading=!1}))}},{key:"updatePlatformExperiments",value:function(t){var e=this;this.loading=!0,this.platform.experimentIris.length>0||t.length>1?this.$router.push({name:u.t,query:{objectIri:this.platformIri,mode:a.a.PLACE_EXPERIMENT,experimentIris:t.map((function(t){return t.iri}))}}):Promise.all(t.map((function(t){return e.designService.linkExperimentToPlatform(t.iri,e.platformIri)}))).then((function(){return e.quitForm()})).finally((function(){return e.loading=!1}))}},{key:"quitForm",value:function(){this.$store.getters["navigation/getPreviousRoute"].name===u.t?this.$router.back():this.$router.push({name:this.rollbackRoute})}}])&&f(r.prototype,n),o&&f(r,o),r;var r,n,o}(o.a);b([Object(l.b)()],y.prototype,"experimentProvider",void 0),b([Object(l.b)()],y.prototype,"platformProvider",void 0),b([Object(l.b)()],y.prototype,"designService",void 0),b([Object(l.d)()],y.prototype,"platformIri",void 0),b([Object(l.h)("platformIri",{immediate:!0})],y.prototype,"updateData",null);var h=y=b([Object(l.a)({components:{LinkExperimentForm:i.a}})],y),v=r("KHd+"),g=Object(v.a)(h,n,[],!1,null,"3eb97ffe",null);g.options.__file="assets/webapp/components/modules/design/editors/LinkExperimentEditor.vue";e.default=g.exports}}]);