%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/bitrix/www/bitrix/js/main/imageeditor/js/provider/
Upload File :
Create Path :
Current File : //home/bitrix/www/bitrix/js/main/imageeditor/js/provider/unsplash.min.js

(function(){"use strict";BX.namespace("BX.UI.ImageEditorProvider");var t=PhotoEditorSDK.UI.DesktopUI.Library.Provider;var r=PhotoEditorSDK.UI.DesktopUI.Library.Category;var e=PhotoEditorSDK.UI.DesktopUI.Library.Image;BX.UI.ImageEditorProvider.Unsplash=function(){t.apply(this,arguments);this.data=null};BX.UI.ImageEditorProvider.Unsplash.prototype={constructor:BX.UI.ImageEditorProvider.Unsplash,__proto__:t.prototype,_loadData:function(){if(this.data){return Promise.resolve(this.data)}return this._loadJSON("http://d3czpaw5gb5xgh.cloudfront.net/v4/unsplash.json").then(function(t){this.data=t;return t}.bind(this))},getCategories:function(){return this._loadData().then(function(t){return t.categories.map(function(t){return new r({name:t.name,coverImage:t.coverImage})})})},searchImages:function(t){return this._loadData().then(function(r){return r.images.filter(function(r){var e=t.split(/\s+/);for(var o=0;o<e.length;o++){var a=e[o];var n=new RegExp(a,"i");if(!n.test(r.title)){return false}}return true}).map(function(t){return new e(t)})})}}})();

Zerion Mini Shell 1.0