@clickview/library-editor 1.1.27-dev.1 → 1.1.27-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/css/library-editor-app.css +7 -0
- package/dist/en.json +1 -1
- package/dist/scripts/0-50fae6c404.chunk.js +1 -0
- package/dist/scripts/1-35adeca043.chunk.js +1 -0
- package/dist/scripts/10-e3de119a32.chunk.js +1 -0
- package/dist/scripts/{11-9f5f0c25dc.chunk.js → 11-c1c04528d4.chunk.js} +1 -1
- package/dist/scripts/12-fdb4fd076b.chunk.js +1 -0
- package/dist/scripts/13-b71e7a002a.chunk.js +1 -0
- package/dist/scripts/14-be81c6b0a6.chunk.js +1 -0
- package/dist/scripts/15-bbe23da473.chunk.js +1 -0
- package/dist/scripts/{16-0971cabfc8.chunk.js → 16-45b853d9bc.chunk.js} +1 -1
- package/dist/scripts/{17-f364868870.chunk.js → 17-17e648d740.chunk.js} +1 -1
- package/dist/scripts/{2-cd7f1d10b5.chunk.js → 2-0c5c3204bb.chunk.js} +1 -1
- package/dist/scripts/20-fc03a8058d.chunk.js +1 -0
- package/dist/scripts/21-bf788bdc47.chunk.js +1 -0
- package/dist/scripts/22-c309ac8872.chunk.js +1 -0
- package/dist/scripts/23-4e4a6eef7f.chunk.js +1 -0
- package/dist/scripts/24-3dbcc6079d.chunk.js +1 -0
- package/dist/scripts/25-8f6c37473c.chunk.js +1 -0
- package/dist/scripts/26-e7665934ea.chunk.js +1 -0
- package/dist/scripts/27-ece4a707c2.chunk.js +1 -0
- package/dist/scripts/28-f7b0b6ca0a.chunk.js +1 -0
- package/dist/scripts/29-7b0d55eef4.chunk.js +1 -0
- package/dist/scripts/{3-4694b66aa5.chunk.js → 3-c977fc76a1.chunk.js} +1 -1
- package/dist/scripts/30-07198d4b80.chunk.js +1 -0
- package/dist/scripts/31-558e4b9448.chunk.js +1 -0
- package/dist/scripts/{32-a1543ffe27.chunk.js → 32-66bedea19f.chunk.js} +1 -1
- package/dist/scripts/{33-9685703df6.chunk.js → 33-1c0a05f5ad.chunk.js} +1 -1
- package/dist/scripts/34-0261454401.chunk.js +1 -0
- package/dist/scripts/35-80afabad2f.chunk.js +1 -0
- package/dist/scripts/36-0945816998.chunk.js +1 -0
- package/dist/scripts/{37-80589d542e.chunk.js → 37-f9eaead96b.chunk.js} +1 -1
- package/dist/scripts/{38-7e88534f67.chunk.js → 38-ee287180e0.chunk.js} +1 -1
- package/dist/scripts/{39-99824f3b64.chunk.js → 39-875e8edab4.chunk.js} +1 -1
- package/dist/scripts/{4-ad1e4b43da.chunk.js → 4-30febbcd74.chunk.js} +1 -1
- package/dist/scripts/{40-dbfd665c74.chunk.js → 40-9e6fe972eb.chunk.js} +1 -1
- package/dist/scripts/{41-25fbac3d17.chunk.js → 41-8e127683ef.chunk.js} +1 -1
- package/dist/scripts/42-26e2b69676.chunk.js +1 -0
- package/dist/scripts/{43-5ef29feb2c.chunk.js → 43-cd5d61f503.chunk.js} +1 -1
- package/dist/scripts/{44-223f602431.chunk.js → 44-50adae17aa.chunk.js} +1 -1
- package/dist/scripts/{45-344492a36f.chunk.js → 45-d6cc086a40.chunk.js} +1 -1
- package/dist/scripts/{46-9ca7afd6a4.chunk.js → 46-c3131aa1a1.chunk.js} +1 -1
- package/dist/scripts/{47-ac0c9c5ce1.chunk.js → 47-53cc918c2d.chunk.js} +1 -1
- package/dist/scripts/{48-6bf590b9a0.chunk.js → 48-e37164e96c.chunk.js} +1 -1
- package/dist/scripts/49-f18c7b7f2d.chunk.js +1 -0
- package/dist/scripts/5-ae2739be4b.chunk.js +1 -0
- package/dist/scripts/{50-30ba08212e.chunk.js → 50-77cc32280d.chunk.js} +1 -1
- package/dist/scripts/{51-828972defb.chunk.js → 51-718582f5a0.chunk.js} +1 -1
- package/dist/scripts/{52-b2acf3e742.chunk.js → 52-8bab7f4183.chunk.js} +1 -1
- package/dist/scripts/{53-5d6ea94871.chunk.js → 53-051f6fefda.chunk.js} +1 -1
- package/dist/scripts/{54-2d8bd6fde0.chunk.js → 54-54ab674027.chunk.js} +1 -1
- package/dist/scripts/{55-4a8d360746.chunk.js → 55-5620cb1984.chunk.js} +1 -1
- package/dist/scripts/{56-ad12ebab5f.chunk.js → 56-d515b7881b.chunk.js} +1 -1
- package/dist/scripts/{57-53b89c2ef0.chunk.js → 57-34cc7eeda7.chunk.js} +1 -1
- package/dist/scripts/{58-b246abe78c.chunk.js → 58-095cc86c38.chunk.js} +1 -1
- package/dist/scripts/{59-19290686e0.chunk.js → 59-88d4d70542.chunk.js} +1 -1
- package/dist/scripts/6-64fc0b404b.chunk.js +1 -0
- package/dist/scripts/{60-0c075e7b5c.chunk.js → 60-8e040e4d8f.chunk.js} +1 -1
- package/dist/scripts/{61-2725bbfab2.chunk.js → 61-9acfcad39c.chunk.js} +1 -1
- package/dist/scripts/{62-472d10a18e.chunk.js → 62-ab4cf2e18e.chunk.js} +1 -1
- package/dist/scripts/{63-7d00e50441.chunk.js → 63-be24981a1c.chunk.js} +1 -1
- package/dist/scripts/{64-1b42f78644.chunk.js → 64-2acf78f1d5.chunk.js} +1 -1
- package/dist/scripts/{65-14af88c745.chunk.js → 65-37aed4a31d.chunk.js} +1 -1
- package/dist/scripts/{66-bc274df13a.chunk.js → 66-bb4cde602a.chunk.js} +1 -1
- package/dist/scripts/{67-d1edef09d6.chunk.js → 67-04c0737fd2.chunk.js} +1 -1
- package/dist/scripts/{68-52468201b9.chunk.js → 68-436667d096.chunk.js} +1 -1
- package/dist/scripts/{69-b681e9a99c.chunk.js → 69-4dd38a6827.chunk.js} +1 -1
- package/dist/scripts/{7-2807a666bc.chunk.js → 7-5194b748c8.chunk.js} +1 -1
- package/dist/scripts/{70-d4018838a9.chunk.js → 70-d52ccba56d.chunk.js} +1 -1
- package/dist/scripts/{71-29cce07c7f.chunk.js → 71-b7f95045b5.chunk.js} +1 -1
- package/dist/scripts/{72-6f83214b8d.chunk.js → 72-b1eb475df0.chunk.js} +1 -1
- package/dist/scripts/{8-8f44e8bfc4.chunk.js → 8-d2d772bc05.chunk.js} +1 -1
- package/dist/scripts/9-160db7db67.chunk.js +1 -0
- package/dist/scripts/bundle-0eadf8a695.min.js +8 -0
- package/dist/scripts/bundles.json +2 -2
- package/dist/scripts/polyfills-292fbd05c8.min.js +1 -0
- package/package.json +4 -4
- package/dist/css/1.chunk.css.map +0 -1
- package/dist/css/10.chunk.css.map +0 -1
- package/dist/css/11.chunk.css +0 -137
- package/dist/css/11.chunk.css.map +0 -1
- package/dist/css/12.chunk.css.map +0 -1
- package/dist/css/13.chunk.css.map +0 -1
- package/dist/css/14.chunk.css.map +0 -1
- package/dist/css/16.chunk.css.map +0 -1
- package/dist/css/17.chunk.css.map +0 -1
- package/dist/css/18.chunk.css +0 -20
- package/dist/css/18.chunk.css.map +0 -1
- package/dist/css/2.chunk.css +0 -145
- package/dist/css/2.chunk.css.map +0 -1
- package/dist/css/21.chunk.css.map +0 -1
- package/dist/css/22.chunk.css.map +0 -1
- package/dist/css/23.chunk.css.map +0 -1
- package/dist/css/25.chunk.css.map +0 -1
- package/dist/css/26.chunk.css.map +0 -1
- package/dist/css/28.chunk.css.map +0 -1
- package/dist/css/29.chunk.css.map +0 -1
- package/dist/css/3.chunk.css.map +0 -1
- package/dist/css/30.chunk.css.map +0 -1
- package/dist/css/31.chunk.css.map +0 -1
- package/dist/css/32.chunk.css.map +0 -1
- package/dist/css/33.chunk.css.map +0 -1
- package/dist/css/34.chunk.css +0 -21
- package/dist/css/34.chunk.css.map +0 -1
- package/dist/css/35.chunk.css +0 -20
- package/dist/css/35.chunk.css.map +0 -1
- package/dist/css/36.chunk.css +0 -14
- package/dist/css/36.chunk.css.map +0 -1
- package/dist/css/37.chunk.css.map +0 -1
- package/dist/css/38.chunk.css.map +0 -1
- package/dist/css/40.chunk.css.map +0 -1
- package/dist/css/41.chunk.css.map +0 -1
- package/dist/css/42.chunk.css.map +0 -1
- package/dist/css/43.chunk.css.map +0 -1
- package/dist/css/44.chunk.css.map +0 -1
- package/dist/css/45.chunk.css.map +0 -1
- package/dist/css/46.chunk.css.map +0 -1
- package/dist/css/47.chunk.css.map +0 -1
- package/dist/css/48.chunk.css.map +0 -1
- package/dist/css/49.chunk.css +0 -35
- package/dist/css/49.chunk.css.map +0 -1
- package/dist/css/50.chunk.css.map +0 -1
- package/dist/css/51.chunk.css.map +0 -1
- package/dist/css/52.chunk.css +0 -66
- package/dist/css/52.chunk.css.map +0 -1
- package/dist/css/55.chunk.css.map +0 -1
- package/dist/css/56.chunk.css.map +0 -1
- package/dist/css/58.chunk.css.map +0 -1
- package/dist/css/59.chunk.css.map +0 -1
- package/dist/css/6.chunk.css.map +0 -1
- package/dist/css/60.chunk.css +0 -18
- package/dist/css/60.chunk.css.map +0 -1
- package/dist/css/62.chunk.css.map +0 -1
- package/dist/css/63.chunk.css +0 -170
- package/dist/css/63.chunk.css.map +0 -1
- package/dist/css/67.chunk.css +0 -78
- package/dist/css/67.chunk.css.map +0 -1
- package/dist/css/68.chunk.css +0 -17
- package/dist/css/68.chunk.css.map +0 -1
- package/dist/css/69.chunk.css +0 -17
- package/dist/css/69.chunk.css.map +0 -1
- package/dist/css/7.chunk.css.map +0 -1
- package/dist/css/70.chunk.css +0 -23
- package/dist/css/70.chunk.css.map +0 -1
- package/dist/css/71.chunk.css +0 -40
- package/dist/css/71.chunk.css.map +0 -1
- package/dist/css/72.chunk.css +0 -16
- package/dist/css/72.chunk.css.map +0 -1
- package/dist/css/73.chunk.css +0 -37
- package/dist/css/73.chunk.css.map +0 -1
- package/dist/css/74.chunk.css +0 -29
- package/dist/css/74.chunk.css.map +0 -1
- package/dist/css/75.chunk.css +0 -6
- package/dist/css/75.chunk.css.map +0 -1
- package/dist/css/76.chunk.css +0 -6
- package/dist/css/76.chunk.css.map +0 -1
- package/dist/css/8.chunk.css.map +0 -1
- package/dist/css/library-editor-app.css.map +0 -1
- package/dist/libs/analytics/src/Analytics.d.ts +0 -10
- package/dist/libs/analytics/src/AnalyticsHelper.d.ts +0 -30
- package/dist/libs/analytics/src/AnalyticsService.d.ts +0 -52
- package/dist/libs/analytics/src/clients/BaseAnalyticsClient.d.ts +0 -24
- package/dist/libs/analytics/src/clients/CollectionApiClient.d.ts +0 -48
- package/dist/libs/analytics/src/clients/DebuggerClient.d.ts +0 -7
- package/dist/libs/analytics/src/clients/GoogleAnalyticsClient.d.ts +0 -22
- package/dist/libs/analytics/src/constants/ApplicationOptionsKey.d.ts +0 -1
- package/dist/libs/analytics/src/constants/CountryRegionMapping.d.ts +0 -7
- package/dist/libs/analytics/src/constants/EventFirehose.d.ts +0 -4
- package/dist/libs/analytics/src/constants/GlobalChannels.d.ts +0 -3
- package/dist/libs/analytics/src/constants/Regions.d.ts +0 -6
- package/dist/libs/analytics/src/constants/Services.d.ts +0 -4
- package/dist/libs/analytics/src/enrichers/BaseAnalyticsEnricher.d.ts +0 -19
- package/dist/libs/analytics/src/enrichers/CoreContextEnricher.d.ts +0 -22
- package/dist/libs/analytics/src/enrichers/UserDataEnricher.d.ts +0 -10
- package/dist/libs/analytics/src/enums/CountryCode.d.ts +0 -5
- package/dist/libs/analytics/src/enums/RegionName.d.ts +0 -5
- package/dist/libs/analytics/src/interfaces/AnalyticsTypes.d.ts +0 -317
- package/dist/libs/analytics/src/interfaces/Config.d.ts +0 -3
- package/dist/libs/analytics/src/interfaces/Folder.d.ts +0 -3
- package/dist/libs/analytics/src/interfaces/HashObject.d.ts +0 -3
- package/dist/libs/analytics/src/interfaces/Owner.d.ts +0 -3
- package/dist/libs/analytics/src/interfaces/Playlist.d.ts +0 -3
- package/dist/libs/analytics/src/interfaces/Rating.d.ts +0 -4
- package/dist/libs/analytics/src/interfaces/Region.d.ts +0 -5
- package/dist/libs/analytics/src/interfaces/RegionalUrl.d.ts +0 -5
- package/dist/libs/analytics/src/interfaces/Resource.d.ts +0 -5
- package/dist/libs/analytics/src/interfaces/Series.d.ts +0 -3
- package/dist/libs/analytics/src/interfaces/Subtitle.d.ts +0 -4
- package/dist/libs/analytics/src/interfaces/User.d.ts +0 -17
- package/dist/libs/analytics/src/interfaces/VersionData.d.ts +0 -4
- package/dist/libs/analytics/src/interfaces/Video.d.ts +0 -16
- package/dist/libs/analytics/src/interfaces/index.d.ts +0 -15
- package/dist/libs/analytics/src/interfaces/primitives/BaseObject.d.ts +0 -7
- package/dist/libs/analytics/src/models/AnalyticsEvent.d.ts +0 -49
- package/dist/libs/analytics/src/models/CollectionEvent.d.ts +0 -61
- package/dist/libs/analytics/src/services/ContextService.d.ts +0 -19
- package/dist/libs/analytics/src/transport/EventTransport.d.ts +0 -39
- package/dist/libs/analytics/src/utils/CollectionApiClientHelper.d.ts +0 -6
- package/dist/libs/analytics/src/utils/DataFormatHelper.d.ts +0 -14
- package/dist/libs/analytics/src/utils/EventWhitelistHelper.d.ts +0 -19
- package/dist/libs/analytics/src/utils/ObjectFormatHelper.d.ts +0 -5
- package/dist/libs/analytics/src/utils/TypeHelper.d.ts +0 -4
- package/dist/libs/analytics/src/utils/UploadDataFormatHelper.d.ts +0 -10
- package/dist/libs/analytics/src/utils/UrlHelper.d.ts +0 -3
- package/dist/libs/analytics/src/utils/UserAgentHelper.d.ts +0 -10
- package/dist/libs/analytics/src/utils/VideoAnalyticsTracker.d.ts +0 -51
- package/dist/libs/analytics/src/utils/VideoDataFormatHelper.d.ts +0 -42
- package/dist/libs/common/src/backbone/constants/BehaviorChannels.d.ts +0 -5
- package/dist/libs/common/src/backbone/constants/Caches.d.ts +0 -3
- package/dist/libs/common/src/backbone/constants/CommonChannels.d.ts +0 -5
- package/dist/libs/common/src/backbone/constants/CommonServices.d.ts +0 -4
- package/dist/libs/common/src/backbone/constants/DataProviders.d.ts +0 -4
- package/dist/libs/common/src/backbone/constants/Webplayer.d.ts +0 -65
- package/dist/libs/common/src/backbone/core/AppLink.d.ts +0 -37
- package/dist/libs/common/src/backbone/core/BaseAppRouter.d.ts +0 -103
- package/dist/libs/common/src/backbone/core/BaseApplication.d.ts +0 -76
- package/dist/libs/common/src/backbone/core/BaseBehavior.d.ts +0 -6
- package/dist/libs/common/src/backbone/core/BaseCollection.d.ts +0 -7
- package/dist/libs/common/src/backbone/core/BaseCollectionView.d.ts +0 -16
- package/dist/libs/common/src/backbone/core/BaseError.d.ts +0 -18
- package/dist/libs/common/src/backbone/core/BaseLayoutView.d.ts +0 -11
- package/dist/libs/common/src/backbone/core/BaseModel.d.ts +0 -27
- package/dist/libs/common/src/backbone/core/BaseNestedModel.d.ts +0 -21
- package/dist/libs/common/src/backbone/core/BaseService.d.ts +0 -10
- package/dist/libs/common/src/backbone/core/BaseView.d.ts +0 -131
- package/dist/libs/common/src/backbone/core/EventNames.d.ts +0 -16
- package/dist/libs/common/src/backbone/core/LayoutService.d.ts +0 -31
- package/dist/libs/common/src/backbone/core/ListenToRadio.d.ts +0 -3
- package/dist/libs/common/src/backbone/core/LocationUtils.d.ts +0 -23
- package/dist/libs/common/src/backbone/core/Middleware.d.ts +0 -10
- package/dist/libs/common/src/backbone/core/Shell.d.ts +0 -79
- package/dist/libs/common/src/backbone/core/Types.d.ts +0 -12
- package/dist/libs/common/src/backbone/core/index.d.ts +0 -18
- package/dist/libs/common/src/backbone/enums/DataServiceErrorType.d.ts +0 -8
- package/dist/libs/common/src/backbone/enums/HttpVerbs.d.ts +0 -6
- package/dist/libs/common/src/backbone/errors/DevError.d.ts +0 -4
- package/dist/libs/common/src/backbone/errors/NotImplementedError.d.ts +0 -5
- package/dist/libs/common/src/backbone/index.d.ts +0 -2
- package/dist/libs/common/src/backbone/interfaces/BaseCollectionIdentifier.d.ts +0 -19
- package/dist/libs/common/src/backbone/interfaces/ChainableDataService.d.ts +0 -9
- package/dist/libs/common/src/backbone/interfaces/DataCache.d.ts +0 -8
- package/dist/libs/common/src/backbone/interfaces/DataProvider.d.ts +0 -15
- package/dist/libs/common/src/backbone/interfaces/DataServiceError.d.ts +0 -7
- package/dist/libs/common/src/backbone/interfaces/DataServiceRequests.d.ts +0 -218
- package/dist/libs/common/src/backbone/interfaces/Pagination.d.ts +0 -33
- package/dist/libs/common/src/backbone/interfaces/StickitBinding.d.ts +0 -38
- package/dist/libs/common/src/backbone/interfaces/Xhr.d.ts +0 -9
- package/dist/libs/common/src/backbone/interfaces/index.d.ts +0 -9
- package/dist/libs/common/src/backbone/runtime/InputValidation.d.ts +0 -2
- package/dist/libs/common/src/backbone/services/BaseAlertService.d.ts +0 -69
- package/dist/libs/common/src/backbone/services/BaseDataService.d.ts +0 -82
- package/dist/libs/common/src/backbone/services/EnvironmentVariables.d.ts +0 -13
- package/dist/libs/common/src/backbone/services/InstanceManager.d.ts +0 -33
- package/dist/libs/common/src/backbone/services/LanguageService.d.ts +0 -22
- package/dist/libs/common/src/backbone/services/ViewModelService.d.ts +0 -68
- package/dist/libs/common/src/backbone/services/caches/FifoMemoryCache.d.ts +0 -20
- package/dist/libs/common/src/backbone/services/data-providers/AjaxDataProvider.d.ts +0 -31
- package/dist/libs/common/src/backbone/services/data-providers/SignalRDataProvider.d.ts +0 -46
- package/dist/libs/common/src/backbone/utils/ConcurrencyHelper.d.ts +0 -13
- package/dist/libs/common/src/backbone/utils/DataServiceErrorHelper.d.ts +0 -2
- package/dist/libs/common/src/backbone/utils/FunctionHelper.d.ts +0 -8
- package/dist/libs/common/src/backbone/utils/LocalStorageHelper.d.ts +0 -58
- package/dist/libs/common/src/backbone/utils/UrlHelper.d.ts +0 -14
- package/dist/libs/common/src/backbone/utils/UserAgentHelper.d.ts +0 -7
- package/dist/libs/common/src/react/flight/enums/RequestStatus.d.ts +0 -6
- package/dist/libs/common/src/react/flight/enums/index.d.ts +0 -1
- package/dist/libs/common/src/react/flight/interfaces/FlightState.d.ts +0 -22
- package/dist/libs/common/src/react/flight/interfaces/NormalizeOptions.d.ts +0 -4
- package/dist/libs/common/src/react/flight/interfaces/Request.d.ts +0 -29
- package/dist/libs/common/src/react/flight/interfaces/UpdateStateOptions.d.ts +0 -15
- package/dist/libs/common/src/react/interfaces/ApplicationData.d.ts +0 -3
- package/dist/libs/common/src/react/interfaces/ApplicationState.d.ts +0 -8
- package/dist/libs/common/src/react/interfaces/BaseReducerActions.d.ts +0 -4
- package/dist/libs/common/src/react/interfaces/HashObject.d.ts +0 -3
- package/dist/libs/common/src/react/interfaces/index.d.ts +0 -4
- package/dist/libs/common/src/react/utils/FetchHelper.d.ts +0 -50
- package/dist/libs/common/src/react/utils/ObjectHelper.d.ts +0 -10
- package/dist/libs/common/src/react/utils/TextHelper.d.ts +0 -9
- package/dist/libs/shared/src/apps/notifications/collections/NotificationCollection.d.ts +0 -9
- package/dist/libs/shared/src/apps/notifications/components/notification-items/notification-item/NotificationItemComponent.d.ts +0 -23
- package/dist/libs/shared/src/apps/notifications/components/notification-list/NotificationListComponent.d.ts +0 -26
- package/dist/libs/shared/src/apps/notifications/components/notification-status/NotificationStatusComponent.d.ts +0 -15
- package/dist/libs/shared/src/apps/notifications/enums/AppLinkReferrer.d.ts +0 -3
- package/dist/libs/shared/src/apps/notifications/enums/NotificationActions.d.ts +0 -3
- package/dist/libs/shared/src/apps/notifications/enums/NotificationAlertType.d.ts +0 -7
- package/dist/libs/shared/src/apps/notifications/enums/NotificationAppLinkModules.d.ts +0 -7
- package/dist/libs/shared/src/apps/notifications/enums/NotificationModules.d.ts +0 -4
- package/dist/libs/shared/src/apps/notifications/enums/NotificationStatus.d.ts +0 -5
- package/dist/libs/shared/src/apps/notifications/enums/NotificationType.d.ts +0 -16
- package/dist/libs/shared/src/apps/notifications/interfaces/NotificationCollectionRequest.d.ts +0 -5
- package/dist/libs/shared/src/apps/notifications/interfaces/index.d.ts +0 -1
- package/dist/libs/shared/src/apps/notifications/models/Notification.d.ts +0 -6
- package/dist/libs/shared/src/apps/notifications/services/NotificationDataService.d.ts +0 -14
- package/dist/libs/shared/src/apps/notifications/services/NotificationService.d.ts +0 -33
- package/dist/libs/shared/src/apps/notifications/services/NotificationSocketService.d.ts +0 -8
- package/dist/libs/shared/src/apps/notifications/services/data-providers/NotificationsSocketDataProvider.d.ts +0 -4
- package/dist/libs/shared/src/apps/notifications/utils/NotificationAppLinkHelper.d.ts +0 -10
- package/dist/libs/shared/src/apps/notifications/utils/NotificationsHelper.d.ts +0 -18
- package/dist/libs/shared/src/apps/notifications/views/header/NotificationHeaderView.d.ts +0 -16
- package/dist/libs/shared/src/apps/notifications/views/notifications/NotificationsView.d.ts +0 -27
- package/dist/libs/shared/src/apps/notifications/views/popover/NotificationsPopoverView.d.ts +0 -34
- package/dist/libs/shared/src/apps/search/components/confirm-selection/ConfirmSelectionComponent.d.ts +0 -12
- package/dist/libs/shared/src/apps/search/components/instant-search/classification/ClassificationSearchResultComponent.d.ts +0 -17
- package/dist/libs/shared/src/apps/search/components/instant-search/index.d.ts +0 -5
- package/dist/libs/shared/src/apps/search/components/instant-search/recent-search/RecentSearchResultComponent.d.ts +0 -15
- package/dist/libs/shared/src/apps/search/components/instant-search/series/SeriesSearchResultComponent.d.ts +0 -14
- package/dist/libs/shared/src/apps/search/components/instant-search/tag/TagSearchResultComponent.d.ts +0 -9
- package/dist/libs/shared/src/apps/search/components/instant-search/video-result/VideoSearchResultComponent.d.ts +0 -18
- package/dist/libs/shared/src/apps/search/components/search-context/SearchContextComponent.d.ts +0 -18
- package/dist/libs/shared/src/apps/search/components/search-tips/SearchTipsComponent.d.ts +0 -11
- package/dist/libs/shared/src/apps/search/constants/TypeaheadConfiguration.d.ts +0 -12
- package/dist/libs/shared/src/apps/search/enums/FilterTypes.d.ts +0 -14
- package/dist/libs/shared/src/apps/search/enums/SearchQueryType.d.ts +0 -18
- package/dist/libs/shared/src/apps/search/enums/SearchTypes.d.ts +0 -8
- package/dist/libs/shared/src/apps/search/interfaces/SearchTypes.d.ts +0 -26
- package/dist/libs/shared/src/apps/search/interfaces/index.d.ts +0 -1
- package/dist/libs/shared/src/apps/search/services/ContextualSearchService.d.ts +0 -34
- package/dist/libs/shared/src/apps/search/utils/InstantSearchHelper.d.ts +0 -22
- package/dist/libs/shared/src/apps/search/utils/RecentSearchHelper.d.ts +0 -12
- package/dist/libs/shared/src/apps/search/utils/SearchHelper.d.ts +0 -5
- package/dist/libs/shared/src/apps/search/utils/TypeaheadHelper.d.ts +0 -75
- package/dist/libs/shared/src/apps/search/views/search-bar/SearchBarView.d.ts +0 -110
- package/dist/libs/shared/src/apps/search/views/search-bar/templates/index.d.ts +0 -9
- package/dist/libs/shared/src/apps/upload/collections/PendingItemsCollection.d.ts +0 -8
- package/dist/libs/shared/src/apps/upload/constants/UploadConstants.d.ts +0 -39
- package/dist/libs/shared/src/apps/upload/enums/FileLifestyle.d.ts +0 -4
- package/dist/libs/shared/src/apps/upload/enums/PendingItemStatus.d.ts +0 -5
- package/dist/libs/shared/src/apps/upload/errors/file-type/FileTypeError.d.ts +0 -15
- package/dist/libs/shared/src/apps/upload/errors/internet-connectivity/InternetConnectivityError.d.ts +0 -7
- package/dist/libs/shared/src/apps/upload/services/BasePendingItemsService.d.ts +0 -26
- package/dist/libs/shared/src/apps/upload/services/DropzoneWrapper.d.ts +0 -30
- package/dist/libs/shared/src/apps/upload/services/UploadService.d.ts +0 -66
- package/dist/libs/shared/src/apps/upload/utils/FileExtensionsHelper.d.ts +0 -9
- package/dist/libs/shared/src/apps/upload/utils/PendingItemsHelper.d.ts +0 -9
- package/dist/libs/shared/src/constants/AppVariables.d.ts +0 -5
- package/dist/libs/shared/src/constants/BootstrapKeys.d.ts +0 -8
- package/dist/libs/shared/src/constants/CacheDurations.d.ts +0 -4
- package/dist/libs/shared/src/constants/DataPrefixes.d.ts +0 -12
- package/dist/libs/shared/src/constants/RadioChannels.d.ts +0 -20
- package/dist/libs/shared/src/constants/SharedServices.d.ts +0 -25
- package/dist/libs/shared/src/enums/ClassificationType.d.ts +0 -4
- package/dist/libs/shared/src/enums/CountryCode.d.ts +0 -5
- package/dist/libs/shared/src/enums/CurationStatus.d.ts +0 -12
- package/dist/libs/shared/src/enums/CurriculumType.d.ts +0 -6
- package/dist/libs/shared/src/enums/CustomerType.d.ts +0 -11
- package/dist/libs/shared/src/enums/GlanceFormat.d.ts +0 -3
- package/dist/libs/shared/src/enums/Images.d.ts +0 -26
- package/dist/libs/shared/src/enums/LibraryType.d.ts +0 -5
- package/dist/libs/shared/src/enums/MasterObjectTypes.d.ts +0 -8
- package/dist/libs/shared/src/enums/MediaQueries.d.ts +0 -20
- package/dist/libs/shared/src/enums/ObjectOwnerType.d.ts +0 -4
- package/dist/libs/shared/src/enums/ObjectStatus.d.ts +0 -5
- package/dist/libs/shared/src/enums/PartialLoading.d.ts +0 -4
- package/dist/libs/shared/src/enums/PlayerMediaType.d.ts +0 -5
- package/dist/libs/shared/src/enums/PlaylistPrivacy.d.ts +0 -5
- package/dist/libs/shared/src/enums/PresentationType.d.ts +0 -4
- package/dist/libs/shared/src/enums/ResourceFileType.d.ts +0 -9
- package/dist/libs/shared/src/enums/SettingKind.d.ts +0 -4
- package/dist/libs/shared/src/enums/SettingName.d.ts +0 -17
- package/dist/libs/shared/src/enums/SubtitleExtractionOptions.d.ts +0 -4
- package/dist/libs/shared/src/enums/ThemeType.d.ts +0 -3
- package/dist/libs/shared/src/enums/UploadInteractionType.d.ts +0 -4
- package/dist/libs/shared/src/enums/UserGroup.d.ts +0 -5
- package/dist/libs/shared/src/enums/UserRole.d.ts +0 -15
- package/dist/libs/shared/src/enums/VideoOrigin.d.ts +0 -14
- package/dist/libs/shared/src/enums/WidgetContents.d.ts +0 -10
- package/dist/libs/shared/src/errors/primitives/AlertError.d.ts +0 -4
- package/dist/libs/shared/src/errors/primitives/DialogError.d.ts +0 -9
- package/dist/libs/shared/src/errors/primitives/ErrorPageError.d.ts +0 -7
- package/dist/libs/shared/src/images/svg/ImportedSvgs.d.ts +0 -87
- package/dist/libs/shared/src/images/svg/actions/index.d.ts +0 -24
- package/dist/libs/shared/src/images/svg/arrows/index.d.ts +0 -9
- package/dist/libs/shared/src/images/svg/index.d.ts +0 -2
- package/dist/libs/shared/src/images/svg/objects/index.d.ts +0 -36
- package/dist/libs/shared/src/images/svg/player/index.d.ts +0 -14
- package/dist/libs/shared/src/images/svg/settings.d.ts +0 -1
- package/dist/libs/shared/src/images/svg/status/index.d.ts +0 -13
- package/dist/libs/shared/src/interfaces/AppLinkWithLabel.d.ts +0 -5
- package/dist/libs/shared/src/interfaces/DialogOptions.d.ts +0 -13
- package/dist/libs/shared/src/interfaces/ImageUrls.d.ts +0 -16
- package/dist/libs/shared/src/interfaces/QueryParams.d.ts +0 -3
- package/dist/libs/shared/src/interfaces/RegionalUrl.d.ts +0 -5
- package/dist/libs/shared/src/interfaces/WidgetContext.d.ts +0 -9
- package/dist/libs/shared/src/interfaces/app-variables/BaseNotificationsAppVariables.d.ts +0 -16
- package/dist/libs/shared/src/interfaces/app-variables/BaseSearchAppVariables.d.ts +0 -17
- package/dist/libs/shared/src/interfaces/app-variables/index.d.ts +0 -2
- package/dist/libs/shared/src/interfaces/collections/AudienceCollection.d.ts +0 -4
- package/dist/libs/shared/src/interfaces/collections/CategoryCollection.d.ts +0 -4
- package/dist/libs/shared/src/interfaces/collections/ClassificationCollection.d.ts +0 -4
- package/dist/libs/shared/src/interfaces/collections/ClassroomCollection.d.ts +0 -4
- package/dist/libs/shared/src/interfaces/collections/ClassroomGroupCollection.d.ts +0 -4
- package/dist/libs/shared/src/interfaces/collections/ClipCollection.d.ts +0 -4
- package/dist/libs/shared/src/interfaces/collections/CompanyCollection.d.ts +0 -3
- package/dist/libs/shared/src/interfaces/collections/CustomerCollection.d.ts +0 -4
- package/dist/libs/shared/src/interfaces/collections/FolderCollection.d.ts +0 -4
- package/dist/libs/shared/src/interfaces/collections/InteractiveCollection.d.ts +0 -4
- package/dist/libs/shared/src/interfaces/collections/LibraryCollection.d.ts +0 -4
- package/dist/libs/shared/src/interfaces/collections/LinkCollection.d.ts +0 -4
- package/dist/libs/shared/src/interfaces/collections/PersonCollection.d.ts +0 -3
- package/dist/libs/shared/src/interfaces/collections/PlaylistCollection.d.ts +0 -4
- package/dist/libs/shared/src/interfaces/collections/PresentationAudienceCollection.d.ts +0 -4
- package/dist/libs/shared/src/interfaces/collections/ResourceCollection.d.ts +0 -3
- package/dist/libs/shared/src/interfaces/collections/SeriesCollection.d.ts +0 -4
- package/dist/libs/shared/src/interfaces/collections/SubtitleCollection.d.ts +0 -3
- package/dist/libs/shared/src/interfaces/collections/TagCollection.d.ts +0 -4
- package/dist/libs/shared/src/interfaces/collections/UserCollection.d.ts +0 -3
- package/dist/libs/shared/src/interfaces/collections/VideoCollection.d.ts +0 -4
- package/dist/libs/shared/src/interfaces/collections/VideoHistoryCollection.d.ts +0 -4
- package/dist/libs/shared/src/interfaces/collections/WidgetCollection.d.ts +0 -3
- package/dist/libs/shared/src/interfaces/collections/index.d.ts +0 -25
- package/dist/libs/shared/src/interfaces/collections/primitives/BasePaginatedCollection.d.ts +0 -7
- package/dist/libs/shared/src/interfaces/collections/primitives/index.d.ts +0 -1
- package/dist/libs/shared/src/interfaces/index.d.ts +0 -13
- package/dist/libs/shared/src/interfaces/models/Audience.d.ts +0 -3
- package/dist/libs/shared/src/interfaces/models/Avatar.d.ts +0 -3
- package/dist/libs/shared/src/interfaces/models/Banner.d.ts +0 -3
- package/dist/libs/shared/src/interfaces/models/Category.d.ts +0 -3
- package/dist/libs/shared/src/interfaces/models/Channel.d.ts +0 -3
- package/dist/libs/shared/src/interfaces/models/Classification.d.ts +0 -21
- package/dist/libs/shared/src/interfaces/models/Classroom.d.ts +0 -4
- package/dist/libs/shared/src/interfaces/models/ClassroomGroup.d.ts +0 -18
- package/dist/libs/shared/src/interfaces/models/Clip.d.ts +0 -8
- package/dist/libs/shared/src/interfaces/models/Company.d.ts +0 -3
- package/dist/libs/shared/src/interfaces/models/Config.d.ts +0 -13
- package/dist/libs/shared/src/interfaces/models/Cover.d.ts +0 -3
- package/dist/libs/shared/src/interfaces/models/Curriculum.d.ts +0 -18
- package/dist/libs/shared/src/interfaces/models/Customer.d.ts +0 -6
- package/dist/libs/shared/src/interfaces/models/EntitySetting.d.ts +0 -9
- package/dist/libs/shared/src/interfaces/models/FileUpload.d.ts +0 -20
- package/dist/libs/shared/src/interfaces/models/Folder.d.ts +0 -7
- package/dist/libs/shared/src/interfaces/models/Following.d.ts +0 -4
- package/dist/libs/shared/src/interfaces/models/Glance.d.ts +0 -9
- package/dist/libs/shared/src/interfaces/models/Group.d.ts +0 -3
- package/dist/libs/shared/src/interfaces/models/HeroBanner.d.ts +0 -3
- package/dist/libs/shared/src/interfaces/models/Image.d.ts +0 -7
- package/dist/libs/shared/src/interfaces/models/InteractiveMetadata.d.ts +0 -14
- package/dist/libs/shared/src/interfaces/models/Language.d.ts +0 -4
- package/dist/libs/shared/src/interfaces/models/LanguageConfig.d.ts +0 -5
- package/dist/libs/shared/src/interfaces/models/Library.d.ts +0 -5
- package/dist/libs/shared/src/interfaces/models/Link.d.ts +0 -4
- package/dist/libs/shared/src/interfaces/models/Organisation.d.ts +0 -3
- package/dist/libs/shared/src/interfaces/models/Pdf.d.ts +0 -4
- package/dist/libs/shared/src/interfaces/models/Person.d.ts +0 -3
- package/dist/libs/shared/src/interfaces/models/PlayerViewKey.d.ts +0 -3
- package/dist/libs/shared/src/interfaces/models/Playlist.d.ts +0 -14
- package/dist/libs/shared/src/interfaces/models/Poster.d.ts +0 -3
- package/dist/libs/shared/src/interfaces/models/Presentation.d.ts +0 -6
- package/dist/libs/shared/src/interfaces/models/PresentationAudience.d.ts +0 -6
- package/dist/libs/shared/src/interfaces/models/Rating.d.ts +0 -5
- package/dist/libs/shared/src/interfaces/models/Resource.d.ts +0 -17
- package/dist/libs/shared/src/interfaces/models/Restriction.d.ts +0 -6
- package/dist/libs/shared/src/interfaces/models/Season.d.ts +0 -4
- package/dist/libs/shared/src/interfaces/models/Series.d.ts +0 -10
- package/dist/libs/shared/src/interfaces/models/Share.d.ts +0 -9
- package/dist/libs/shared/src/interfaces/models/Subject.d.ts +0 -13
- package/dist/libs/shared/src/interfaces/models/Subtitle.d.ts +0 -7
- package/dist/libs/shared/src/interfaces/models/Tag.d.ts +0 -3
- package/dist/libs/shared/src/interfaces/models/TallPoster.d.ts +0 -3
- package/dist/libs/shared/src/interfaces/models/Theme.d.ts +0 -14
- package/dist/libs/shared/src/interfaces/models/Thumbnail.d.ts +0 -6
- package/dist/libs/shared/src/interfaces/models/User.d.ts +0 -64
- package/dist/libs/shared/src/interfaces/models/UserChannel.d.ts +0 -7
- package/dist/libs/shared/src/interfaces/models/Video.d.ts +0 -34
- package/dist/libs/shared/src/interfaces/models/VideoHistory.d.ts +0 -12
- package/dist/libs/shared/src/interfaces/models/Widget.d.ts +0 -16
- package/dist/libs/shared/src/interfaces/models/YearGroup.d.ts +0 -5
- package/dist/libs/shared/src/interfaces/models/index.d.ts +0 -57
- package/dist/libs/shared/src/interfaces/models/interactive/ActionableItem.d.ts +0 -6
- package/dist/libs/shared/src/interfaces/models/interactive/Interaction.d.ts +0 -16
- package/dist/libs/shared/src/interfaces/models/interactive/InteractionType.d.ts +0 -7
- package/dist/libs/shared/src/interfaces/models/interactive/InteractionTypeId.d.ts +0 -8
- package/dist/libs/shared/src/interfaces/models/interactive/Interactive.d.ts +0 -7
- package/dist/libs/shared/src/interfaces/models/interactive/Timepoint.d.ts +0 -9
- package/dist/libs/shared/src/interfaces/models/interactive/index.d.ts +0 -6
- package/dist/libs/shared/src/interfaces/models/interactive.d.ts +0 -9
- package/dist/libs/shared/src/interfaces/models/primitives/BaseObject.d.ts +0 -8
- package/dist/libs/shared/src/interfaces/models/primitives/VirtualObject.d.ts +0 -5
- package/dist/libs/shared/src/interfaces/models/primitives/index.d.ts +0 -2
- package/dist/libs/shared/src/interfaces/props/ViewProps.d.ts +0 -8
- package/dist/libs/shared/src/interfaces/props/index.d.ts +0 -1
- package/dist/libs/shared/src/interfaces/requests/CreateOrUpdateClipRequest.d.ts +0 -6
- package/dist/libs/shared/src/interfaces/requests/CreateViewKeyRequest.d.ts +0 -3
- package/dist/libs/shared/src/interfaces/requests/ReorderRequest.d.ts +0 -12
- package/dist/libs/shared/src/interfaces/requests/UpdateObjectChannel.d.ts +0 -3
- package/dist/libs/shared/src/interfaces/requests/UpdateObjectRating.d.ts +0 -3
- package/dist/libs/shared/src/interfaces/requests/UpdateResourceRequest.d.ts +0 -3
- package/dist/libs/shared/src/interfaces/requests/UpdateVideoRequest.d.ts +0 -9
- package/dist/libs/shared/src/interfaces/requests/index.d.ts +0 -7
- package/dist/libs/shared/src/interfaces/services/BaseConfigDataService.d.ts +0 -5
- package/dist/libs/shared/src/interfaces/services/BaseLibraryDataService.d.ts +0 -10
- package/dist/libs/shared/src/interfaces/services/BaseSeriesDataService.d.ts +0 -4
- package/dist/libs/shared/src/interfaces/services/BaseSettingsDataService.d.ts +0 -7
- package/dist/libs/shared/src/interfaces/services/BaseUserDataService.d.ts +0 -6
- package/dist/libs/shared/src/interfaces/services/BaseVideoDataService.d.ts +0 -5
- package/dist/libs/shared/src/interfaces/services/BaseVideoUploadDataService.d.ts +0 -8
- package/dist/libs/shared/src/interfaces/services/index.d.ts +0 -7
- package/dist/libs/shared/src/legacy/behaviors/empty-state/EmptyStateBehavior.d.ts +0 -22
- package/dist/libs/shared/src/legacy/behaviors/file-drop/FileDropBehavior.d.ts +0 -19
- package/dist/libs/shared/src/legacy/behaviors/file-drop/FileDropHelper.d.ts +0 -4
- package/dist/libs/shared/src/legacy/behaviors/file-drop/FileDropMaskBehavior.d.ts +0 -19
- package/dist/libs/shared/src/legacy/behaviors/file-select/FileSelectBehavior.d.ts +0 -16
- package/dist/libs/shared/src/legacy/behaviors/popover/PopoverBehavior.d.ts +0 -40
- package/dist/libs/shared/src/legacy/behaviors/tooltip/TooltipBehavior.d.ts +0 -26
- package/dist/libs/shared/src/legacy/components/empty-state/EmptyStateComponent.d.ts +0 -24
- package/dist/libs/shared/src/legacy/components/file-select/FileSelectComponent.d.ts +0 -29
- package/dist/libs/shared/src/legacy/components/file-uploads/FileUploadComponent.d.ts +0 -15
- package/dist/libs/shared/src/legacy/components/pagination/PaginationComponent.d.ts +0 -29
- package/dist/libs/shared/src/legacy/components/resource-item/ResourceItemComponent.d.ts +0 -22
- package/dist/libs/shared/src/legacy/components/subtitle-item/SubtitleItemComponent.d.ts +0 -17
- package/dist/libs/shared/src/legacy/components/thumbnail/ThumbnailComponent.d.ts +0 -35
- package/dist/libs/shared/src/legacy/constants/empty-state-components/EmptyStateComponents.d.ts +0 -6
- package/dist/libs/shared/src/legacy/enums/EmptyState.d.ts +0 -3
- package/dist/libs/shared/src/legacy/enums/SortType.d.ts +0 -7
- package/dist/libs/shared/src/legacy/errors/too-many-files/TooManyFilesError.d.ts +0 -7
- package/dist/libs/shared/src/legacy/errors/too-many-resources/TooManyResourcesError.d.ts +0 -8
- package/dist/libs/shared/src/legacy/errors/too-many-subtitles/TooManySubtitlesError.d.ts +0 -8
- package/dist/libs/shared/src/legacy/interfaces/CollectionIdentifier.d.ts +0 -7
- package/dist/libs/shared/src/legacy/interfaces/index.d.ts +0 -1
- package/dist/libs/shared/src/legacy/utils/EmptyStateHelper.d.ts +0 -4
- package/dist/libs/shared/src/legacy/utils/LangHelper.d.ts +0 -5
- package/dist/libs/shared/src/services/ContextService.d.ts +0 -38
- package/dist/libs/shared/src/services/LanguageDataService.d.ts +0 -7
- package/dist/libs/shared/src/services/UserDataService.d.ts +0 -24
- package/dist/libs/shared/src/utils/DurationHelper.d.ts +0 -7
- package/dist/libs/shared/src/utils/EmbedHelper.d.ts +0 -8
- package/dist/libs/shared/src/utils/ImageHelper.d.ts +0 -32
- package/dist/libs/shared/src/utils/LibraryDataServiceHelper.d.ts +0 -13
- package/dist/libs/shared/src/utils/MaskHelper.d.ts +0 -15
- package/dist/libs/shared/src/utils/SubtitleHelper.d.ts +0 -9
- package/dist/libs/shared/src/utils/SvgHelper.d.ts +0 -18
- package/dist/libs/shared/src/utils/TextHelper.d.ts +0 -3
- package/dist/libs/shared/src/utils/VideoDetailsHelper.d.ts +0 -12
- package/dist/projects/library-editor/src/app.d.ts +0 -244
- package/dist/projects/library-editor/src/apps/content-updates/ContentUpdatesApplication.d.ts +0 -18
- package/dist/projects/library-editor/src/apps/content-updates/collections/SubjectCollection.d.ts +0 -5
- package/dist/projects/library-editor/src/apps/content-updates/collections/VideoGroupCollection.d.ts +0 -5
- package/dist/projects/library-editor/src/apps/content-updates/collections/index.d.ts +0 -2
- package/dist/projects/library-editor/src/apps/content-updates/components/awaiting-review-header/AwaitingReviewHeaderComponent.d.ts +0 -14
- package/dist/projects/library-editor/src/apps/content-updates/components/content-updates-header/ContentUpdatesHeaderComponent.d.ts +0 -19
- package/dist/projects/library-editor/src/apps/content-updates/components/content-updates-left-nav/ContentUpdatesLeftNavComponent.d.ts +0 -18
- package/dist/projects/library-editor/src/apps/content-updates/components/index.d.ts +0 -6
- package/dist/projects/library-editor/src/apps/content-updates/components/past-releases-filters/PastReleasesFiltersComponent.d.ts +0 -20
- package/dist/projects/library-editor/src/apps/content-updates/components/past-releases-header/PastReleasesHeaderComponent.d.ts +0 -24
- package/dist/projects/library-editor/src/apps/content-updates/components/video-group-list/VideoGroupListComponent.d.ts +0 -37
- package/dist/projects/library-editor/src/apps/content-updates/enums/PastReleaseFilterType.d.ts +0 -5
- package/dist/projects/library-editor/src/apps/content-updates/enums/ReleaseDateType.d.ts +0 -6
- package/dist/projects/library-editor/src/apps/content-updates/enums/index.d.ts +0 -2
- package/dist/projects/library-editor/src/apps/content-updates/models/Subject.d.ts +0 -3
- package/dist/projects/library-editor/src/apps/content-updates/models/VideoGroup.d.ts +0 -7
- package/dist/projects/library-editor/src/apps/content-updates/models/index.d.ts +0 -2
- package/dist/projects/library-editor/src/apps/content-updates/services/ContentUpdatesDataService.d.ts +0 -18
- package/dist/projects/library-editor/src/apps/content-updates/services/index.d.ts +0 -1
- package/dist/projects/library-editor/src/apps/content-updates/utils/Constants.d.ts +0 -33
- package/dist/projects/library-editor/src/apps/content-updates/utils/ContentUpdatesHelper.d.ts +0 -7
- package/dist/projects/library-editor/src/apps/content-updates/utils/PastReleasesHelper.d.ts +0 -3
- package/dist/projects/library-editor/src/apps/content-updates/utils/index.d.ts +0 -3
- package/dist/projects/library-editor/src/apps/content-updates/views/add-to-library/AddToLibraryView.d.ts +0 -47
- package/dist/projects/library-editor/src/apps/content-updates/views/awaiting-review/AwaitingReviewView.d.ts +0 -36
- package/dist/projects/library-editor/src/apps/content-updates/views/disable-review/DisableReviewView.d.ts +0 -26
- package/dist/projects/library-editor/src/apps/content-updates/views/generate-past-releases-pdf/GeneratePastReleasesPdfView.d.ts +0 -41
- package/dist/projects/library-editor/src/apps/content-updates/views/past-releases/PastReleasesView.d.ts +0 -55
- package/dist/projects/library-editor/src/apps/dashboard/DashboardApplication.d.ts +0 -9
- package/dist/projects/library-editor/src/apps/dashboard/components/dashboard-action-tile/DashboardActionTileComponent.d.ts +0 -20
- package/dist/projects/library-editor/src/apps/dashboard/components/dashboard-info-tile/DashboardInfoTileComponent.d.ts +0 -7
- package/dist/projects/library-editor/src/apps/dashboard/components/dashboard-notifications/DashboardNotificationsComponents.d.ts +0 -15
- package/dist/projects/library-editor/src/apps/dashboard/components/dashboard-tile-container/DashboardTileContainerComponent.d.ts +0 -11
- package/dist/projects/library-editor/src/apps/dashboard/components/dashboard-tile-list/DashboardTileListComponent.d.ts +0 -14
- package/dist/projects/library-editor/src/apps/dashboard/components/index.d.ts +0 -9
- package/dist/projects/library-editor/src/apps/dashboard/views/DashboardView.d.ts +0 -38
- package/dist/projects/library-editor/src/apps/default/DefaultApplication.d.ts +0 -21
- package/dist/projects/library-editor/src/apps/default/views/dev-error/DevErrorView.d.ts +0 -11
- package/dist/projects/library-editor/src/apps/default/views/error-view/ErrorView.d.ts +0 -12
- package/dist/projects/library-editor/src/apps/default/views/not-found/NotFoundView.d.ts +0 -11
- package/dist/projects/library-editor/src/apps/index.d.ts +0 -16
- package/dist/projects/library-editor/src/apps/library-editor/LibraryEditorApplication.d.ts +0 -46
- package/dist/projects/library-editor/src/apps/library-editor/behaviors/draggable-folder/DraggableFolderBehavior.d.ts +0 -9
- package/dist/projects/library-editor/src/apps/library-editor/behaviors/draggable-video/DraggableVideoBehavior.d.ts +0 -24
- package/dist/projects/library-editor/src/apps/library-editor/behaviors/droppable/DroppableBehavior.d.ts +0 -19
- package/dist/projects/library-editor/src/apps/library-editor/behaviors/index.d.ts +0 -3
- package/dist/projects/library-editor/src/apps/library-editor/behaviors/shared/DragOptions.d.ts +0 -3
- package/dist/projects/library-editor/src/apps/library-editor/behaviors/shared/DraggableItemComponent.d.ts +0 -15
- package/dist/projects/library-editor/src/apps/library-editor/behaviors/shared/index.d.ts +0 -5
- package/dist/projects/library-editor/src/apps/library-editor/components/add-links/AddLinksComponent.d.ts +0 -31
- package/dist/projects/library-editor/src/apps/library-editor/components/banner/BannerComponent.d.ts +0 -19
- package/dist/projects/library-editor/src/apps/library-editor/components/chapter-form/ChapterFormComponent.d.ts +0 -66
- package/dist/projects/library-editor/src/apps/library-editor/components/chapter-list/ChapterComponentCollection.d.ts +0 -25
- package/dist/projects/library-editor/src/apps/library-editor/components/chapter-list/ChapterItemComponent.d.ts +0 -37
- package/dist/projects/library-editor/src/apps/library-editor/components/chapters/ChaptersComponent.d.ts +0 -21
- package/dist/projects/library-editor/src/apps/library-editor/components/concatenate-request/ConcatenateRequestComponent.d.ts +0 -24
- package/dist/projects/library-editor/src/apps/library-editor/components/customer-logo/CustomerLogoComponent.d.ts +0 -19
- package/dist/projects/library-editor/src/apps/library-editor/components/edit-image/EditImageComponent.d.ts +0 -28
- package/dist/projects/library-editor/src/apps/library-editor/components/edit-images-wrapper/EditImagesWrapperComponent.d.ts +0 -24
- package/dist/projects/library-editor/src/apps/library-editor/components/edit-links/LinkItemComponent.d.ts +0 -16
- package/dist/projects/library-editor/src/apps/library-editor/components/edit-links/VideoLinksComponent.d.ts +0 -23
- package/dist/projects/library-editor/src/apps/library-editor/components/edit-thumbnail/EditThumbnailComponent.d.ts +0 -22
- package/dist/projects/library-editor/src/apps/library-editor/components/edit-video/EditVideoDetailsComponent.d.ts +0 -48
- package/dist/projects/library-editor/src/apps/library-editor/components/edit-video-tabs/EditVideoTabsComponent.d.ts +0 -24
- package/dist/projects/library-editor/src/apps/library-editor/components/expandable-tag-list/ExpandableTagListComponent.d.ts +0 -26
- package/dist/projects/library-editor/src/apps/library-editor/components/file-uploads/FileUploadsComponentCollection.d.ts +0 -13
- package/dist/projects/library-editor/src/apps/library-editor/components/folder-actions/FolderActionsDropdownComponent.d.ts +0 -18
- package/dist/projects/library-editor/src/apps/library-editor/components/folder-details/FolderDetailsComponent.d.ts +0 -35
- package/dist/projects/library-editor/src/apps/library-editor/components/folder-select/FolderSelectComponent.d.ts +0 -41
- package/dist/projects/library-editor/src/apps/library-editor/components/language-select/LanguageSelectComponent.d.ts +0 -28
- package/dist/projects/library-editor/src/apps/library-editor/components/language-select/LanguageSelectTypeaheadHelper.d.ts +0 -6
- package/dist/projects/library-editor/src/apps/library-editor/components/left-nav-libraries/LeftNavLibrariesComponent.d.ts +0 -45
- package/dist/projects/library-editor/src/apps/library-editor/components/library-actions/LibraryActionsComponent.d.ts +0 -26
- package/dist/projects/library-editor/src/apps/library-editor/components/library-folders/LibraryFolderListComponent.d.ts +0 -31
- package/dist/projects/library-editor/src/apps/library-editor/components/library-select/LibrarySelectComponent.d.ts +0 -27
- package/dist/projects/library-editor/src/apps/library-editor/components/save/SaveComponent.d.ts +0 -33
- package/dist/projects/library-editor/src/apps/library-editor/components/sort-select/SortSelectComponent.d.ts +0 -29
- package/dist/projects/library-editor/src/apps/library-editor/components/sub-folders/SubFolderComponent.d.ts +0 -15
- package/dist/projects/library-editor/src/apps/library-editor/components/sub-folders/SubFoldersComponent.d.ts +0 -9
- package/dist/projects/library-editor/src/apps/library-editor/components/suggest-edit/SuggestEditComponent.d.ts +0 -31
- package/dist/projects/library-editor/src/apps/library-editor/components/tag-list/TagComponentCollection.d.ts +0 -21
- package/dist/projects/library-editor/src/apps/library-editor/components/tag-list/TagItemComponent.d.ts +0 -28
- package/dist/projects/library-editor/src/apps/library-editor/components/tags/TagsComponent.d.ts +0 -30
- package/dist/projects/library-editor/src/apps/library-editor/components/video-collection-actions/VideoCollectionActionsComponent.d.ts +0 -25
- package/dist/projects/library-editor/src/apps/library-editor/components/video-header/VideoHeaderComponent.d.ts +0 -23
- package/dist/projects/library-editor/src/apps/library-editor/components/video-list-header/VideoListHeaderComponent.d.ts +0 -34
- package/dist/projects/library-editor/src/apps/library-editor/components/video-resources/VideoResourcesComponent.d.ts +0 -46
- package/dist/projects/library-editor/src/apps/library-editor/components/video-sidebar-info/VideoSidebarInfoComponent.d.ts +0 -26
- package/dist/projects/library-editor/src/apps/library-editor/components/video-subtitles/VideoSubtitlesComponent.d.ts +0 -29
- package/dist/projects/library-editor/src/apps/library-editor/constants/CheckboxTypes.d.ts +0 -5
- package/dist/projects/library-editor/src/apps/library-editor/constants/EditVideoBackButtonBlacklist.d.ts +0 -1
- package/dist/projects/library-editor/src/apps/library-editor/constants/EditVideoBackButtonKey.d.ts +0 -1
- package/dist/projects/library-editor/src/apps/library-editor/constants/LibraryEditorActions.d.ts +0 -18
- package/dist/projects/library-editor/src/apps/library-editor/constants/LibraryEditorRadioChannels.d.ts +0 -3
- package/dist/projects/library-editor/src/apps/library-editor/constants/MetadataTypes.d.ts +0 -32
- package/dist/projects/library-editor/src/apps/library-editor/constants/VideoCollectionTypes.d.ts +0 -3
- package/dist/projects/library-editor/src/apps/library-editor/constants/index.d.ts +0 -7
- package/dist/projects/library-editor/src/apps/library-editor/enums/MediaConcatenateStatus.d.ts +0 -8
- package/dist/projects/library-editor/src/apps/library-editor/enums/TagBehavior.d.ts +0 -6
- package/dist/projects/library-editor/src/apps/library-editor/enums/TagOrientation.d.ts +0 -4
- package/dist/projects/library-editor/src/apps/library-editor/enums/VideoCollectionSource.d.ts +0 -4
- package/dist/projects/library-editor/src/apps/library-editor/enums/index.d.ts +0 -4
- package/dist/projects/library-editor/src/apps/library-editor/errors/folder-empty/FolderEmptyError.d.ts +0 -8
- package/dist/projects/library-editor/src/apps/library-editor/errors/folder-max-depth/FolderMaxDepthError.d.ts +0 -7
- package/dist/projects/library-editor/src/apps/library-editor/errors/folder-not-empty/FolderNotEmptyError.d.ts +0 -7
- package/dist/projects/library-editor/src/apps/library-editor/errors/folder-not-found/FolderNotFound.d.ts +0 -6
- package/dist/projects/library-editor/src/apps/library-editor/errors/forbidden-folder/ForbiddenFolderError.d.ts +0 -6
- package/dist/projects/library-editor/src/apps/library-editor/errors/forbidden-video/ForbiddenVideoError.d.ts +0 -6
- package/dist/projects/library-editor/src/apps/library-editor/errors/image-dimensions-too-small/ImageDimensionsTooSmallError.d.ts +0 -9
- package/dist/projects/library-editor/src/apps/library-editor/errors/index.d.ts +0 -13
- package/dist/projects/library-editor/src/apps/library-editor/errors/library-has-subscribers/LibraryHasSubscribersError.d.ts +0 -7
- package/dist/projects/library-editor/src/apps/library-editor/errors/library-not-empty/LibraryNotEmptyError.d.ts +0 -7
- package/dist/projects/library-editor/src/apps/library-editor/errors/max-custom-libraries/MaxCustomLibrariesError.d.ts +0 -9
- package/dist/projects/library-editor/src/apps/library-editor/errors/series-not-found/SeriesNotFoundError.d.ts +0 -6
- package/dist/projects/library-editor/src/apps/library-editor/errors/video-not-found/VideoNotFoundError.d.ts +0 -6
- package/dist/projects/library-editor/src/apps/library-editor/errors/video-write-permission/VideoWritePermissionError.d.ts +0 -6
- package/dist/projects/library-editor/src/apps/library-editor/models/ChapterConcatenateRequest.d.ts +0 -3
- package/dist/projects/library-editor/src/apps/library-editor/models/index.d.ts +0 -1
- package/dist/projects/library-editor/src/apps/library-editor/services/ChapterDataService.d.ts +0 -15
- package/dist/projects/library-editor/src/apps/library-editor/services/CompanyDataService.d.ts +0 -7
- package/dist/projects/library-editor/src/apps/library-editor/services/ExportDataService.d.ts +0 -11
- package/dist/projects/library-editor/src/apps/library-editor/services/FieldsDataService.d.ts +0 -12
- package/dist/projects/library-editor/src/apps/library-editor/services/FolderDragDropService.d.ts +0 -27
- package/dist/projects/library-editor/src/apps/library-editor/services/LibraryDataService.d.ts +0 -65
- package/dist/projects/library-editor/src/apps/library-editor/services/LinkDataService.d.ts +0 -14
- package/dist/projects/library-editor/src/apps/library-editor/services/PersonDataService.d.ts +0 -7
- package/dist/projects/library-editor/src/apps/library-editor/services/RatingsDataService.d.ts +0 -7
- package/dist/projects/library-editor/src/apps/library-editor/services/ResourceDataService.d.ts +0 -13
- package/dist/projects/library-editor/src/apps/library-editor/services/SeriesDataService.d.ts +0 -16
- package/dist/projects/library-editor/src/apps/library-editor/services/SubtitleDataService.d.ts +0 -11
- package/dist/projects/library-editor/src/apps/library-editor/services/TagDataService.d.ts +0 -9
- package/dist/projects/library-editor/src/apps/library-editor/services/VideoDataService.d.ts +0 -45
- package/dist/projects/library-editor/src/apps/library-editor/services/VideoDragDropService.d.ts +0 -26
- package/dist/projects/library-editor/src/apps/library-editor/utils/AddToLibraryCacheHelper.d.ts +0 -4
- package/dist/projects/library-editor/src/apps/library-editor/utils/ChapterHelper.d.ts +0 -18
- package/dist/projects/library-editor/src/apps/library-editor/utils/DownloadHelper.d.ts +0 -3
- package/dist/projects/library-editor/src/apps/library-editor/utils/EditVideoHelpers.d.ts +0 -93
- package/dist/projects/library-editor/src/apps/library-editor/utils/FolderValidation.d.ts +0 -2
- package/dist/projects/library-editor/src/apps/library-editor/utils/LanguageValidation.d.ts +0 -2
- package/dist/projects/library-editor/src/apps/library-editor/utils/LibraryValidation.d.ts +0 -2
- package/dist/projects/library-editor/src/apps/library-editor/utils/UploadVideoValidation.d.ts +0 -2
- package/dist/projects/library-editor/src/apps/library-editor/utils/VideoDetailsHelper.d.ts +0 -17
- package/dist/projects/library-editor/src/apps/library-editor/utils/index.d.ts +0 -8
- package/dist/projects/library-editor/src/apps/library-editor/views/add-to-exchange/AddToExchangeView.d.ts +0 -34
- package/dist/projects/library-editor/src/apps/library-editor/views/banner-upload/BannerUploadView.d.ts +0 -32
- package/dist/projects/library-editor/src/apps/library-editor/views/delete-folder/DeleteFolderView.d.ts +0 -28
- package/dist/projects/library-editor/src/apps/library-editor/views/delete-library/DeleteLibraryView.d.ts +0 -23
- package/dist/projects/library-editor/src/apps/library-editor/views/delete-videos/DeleteVideosView.d.ts +0 -29
- package/dist/projects/library-editor/src/apps/library-editor/views/edit-chapters/EditChaptersView.d.ts +0 -71
- package/dist/projects/library-editor/src/apps/library-editor/views/edit-folder-images/EditFolderImagesView.d.ts +0 -51
- package/dist/projects/library-editor/src/apps/library-editor/views/edit-library/RenameLibraryView.d.ts +0 -29
- package/dist/projects/library-editor/src/apps/library-editor/views/edit-link/EditLinkView.d.ts +0 -30
- package/dist/projects/library-editor/src/apps/library-editor/views/edit-resource/EditResourceView.d.ts +0 -34
- package/dist/projects/library-editor/src/apps/library-editor/views/edit-resources/EditResourcesView.d.ts +0 -92
- package/dist/projects/library-editor/src/apps/library-editor/views/edit-video/EditVideoView.d.ts +0 -125
- package/dist/projects/library-editor/src/apps/library-editor/views/generate-pdf/GeneratePdfView.d.ts +0 -35
- package/dist/projects/library-editor/src/apps/library-editor/views/left-navigation/LeftNavigationView.d.ts +0 -33
- package/dist/projects/library-editor/src/apps/library-editor/views/library/LibraryView.d.ts +0 -31
- package/dist/projects/library-editor/src/apps/library-editor/views/move-folder/MoveFolderView.d.ts +0 -44
- package/dist/projects/library-editor/src/apps/library-editor/views/move-video/MoveVideoView.d.ts +0 -50
- package/dist/projects/library-editor/src/apps/library-editor/views/new-folder/NewFolderView.d.ts +0 -44
- package/dist/projects/library-editor/src/apps/library-editor/views/new-library/NewLibraryView.d.ts +0 -26
- package/dist/projects/library-editor/src/apps/library-editor/views/no-library/NoLibraryView.d.ts +0 -10
- package/dist/projects/library-editor/src/apps/library-editor/views/publish-library/PublishLibraryView.d.ts +0 -19
- package/dist/projects/library-editor/src/apps/library-editor/views/rename-folder/RenameFolderView.d.ts +0 -39
- package/dist/projects/library-editor/src/apps/library-editor/views/suggest-an-edit/SuggestAnEditView.d.ts +0 -58
- package/dist/projects/library-editor/src/apps/library-editor/views/thumbnail-upload/ThumbnailUploadView.d.ts +0 -34
- package/dist/projects/library-editor/src/apps/library-editor/views/video-collection/VideoCollectionView.d.ts +0 -105
- package/dist/projects/library-editor/src/apps/library-editor/views/video-details/VideoDetailsView.d.ts +0 -46
- package/dist/projects/library-editor/src/apps/migration-wizard/MigrationWizardApplication.d.ts +0 -45
- package/dist/projects/library-editor/src/apps/migration-wizard/collections/HomeFolderCollection.d.ts +0 -6
- package/dist/projects/library-editor/src/apps/migration-wizard/collections/SmartSelectVideoCollection.d.ts +0 -5
- package/dist/projects/library-editor/src/apps/migration-wizard/collections/index.d.ts +0 -1
- package/dist/projects/library-editor/src/apps/migration-wizard/components/banner/BannerComponent.d.ts +0 -18
- package/dist/projects/library-editor/src/apps/migration-wizard/components/empty-video-list/EmptyVideoListComponent.d.ts +0 -14
- package/dist/projects/library-editor/src/apps/migration-wizard/components/errored-video-actions/ErroredVideoActionsComponent.d.ts +0 -22
- package/dist/projects/library-editor/src/apps/migration-wizard/components/errored-video-footer/ErroredVideoFooterComponent.d.ts +0 -21
- package/dist/projects/library-editor/src/apps/migration-wizard/components/errored-video-item/ErroredVideoItemComponent.d.ts +0 -30
- package/dist/projects/library-editor/src/apps/migration-wizard/components/errored-video-list/ErroredVideoListComponent.d.ts +0 -12
- package/dist/projects/library-editor/src/apps/migration-wizard/components/errored-video-metadata/ErroredVideoMetadataComponent.d.ts +0 -8
- package/dist/projects/library-editor/src/apps/migration-wizard/components/errored-video-preview/ErroredVideoPreviewComponent.d.ts +0 -17
- package/dist/projects/library-editor/src/apps/migration-wizard/components/generate-report/GenerateReportComponent.d.ts +0 -25
- package/dist/projects/library-editor/src/apps/migration-wizard/components/generate-report-button/GenerateReportButtonComponent.d.ts +0 -10
- package/dist/projects/library-editor/src/apps/migration-wizard/components/index.d.ts +0 -13
- package/dist/projects/library-editor/src/apps/migration-wizard/components/migration-video-item/MigrationVideoItemComponent.d.ts +0 -30
- package/dist/projects/library-editor/src/apps/migration-wizard/components/progress-bar/ProgressBarComponent.d.ts +0 -19
- package/dist/projects/library-editor/src/apps/migration-wizard/components/progress-circle/ProgressCircleComponent.d.ts +0 -20
- package/dist/projects/library-editor/src/apps/migration-wizard/components/search-bar/SearchBarComponent.d.ts +0 -19
- package/dist/projects/library-editor/src/apps/migration-wizard/components/selected-video-item/SelectedVideoItemComponent.d.ts +0 -9
- package/dist/projects/library-editor/src/apps/migration-wizard/components/sorting-row/SortingRowComponent.d.ts +0 -35
- package/dist/projects/library-editor/src/apps/migration-wizard/components/status-bar/StatusBarComponent.d.ts +0 -28
- package/dist/projects/library-editor/src/apps/migration-wizard/components/video-list/VideoListCollection.d.ts +0 -36
- package/dist/projects/library-editor/src/apps/migration-wizard/components/video-list-collection/VideoListCollectionComponent.d.ts +0 -16
- package/dist/projects/library-editor/src/apps/migration-wizard/contants/MigrationErrorActions.d.ts +0 -4
- package/dist/projects/library-editor/src/apps/migration-wizard/contants/MigrationViewModels.d.ts +0 -4
- package/dist/projects/library-editor/src/apps/migration-wizard/enums/CloudSyncStatus.d.ts +0 -12
- package/dist/projects/library-editor/src/apps/migration-wizard/enums/FinalisationTaskStatus.d.ts +0 -5
- package/dist/projects/library-editor/src/apps/migration-wizard/enums/FinalisationType.d.ts +0 -6
- package/dist/projects/library-editor/src/apps/migration-wizard/enums/LocalOption.d.ts +0 -4
- package/dist/projects/library-editor/src/apps/migration-wizard/enums/MigrationOption.d.ts +0 -7
- package/dist/projects/library-editor/src/apps/migration-wizard/enums/MigrationReportType.d.ts +0 -6
- package/dist/projects/library-editor/src/apps/migration-wizard/enums/SortField.d.ts +0 -5
- package/dist/projects/library-editor/src/apps/migration-wizard/enums/ValidationResult.d.ts +0 -32
- package/dist/projects/library-editor/src/apps/migration-wizard/enums/ValidationResultErrorType.d.ts +0 -5
- package/dist/projects/library-editor/src/apps/migration-wizard/enums/VideoMigrationStatus.d.ts +0 -5
- package/dist/projects/library-editor/src/apps/migration-wizard/enums/index.d.ts +0 -7
- package/dist/projects/library-editor/src/apps/migration-wizard/errors/already-migrated/AlreadyMigratedError.d.ts +0 -6
- package/dist/projects/library-editor/src/apps/migration-wizard/errors/backup-progress/BackupProgressError.d.ts +0 -8
- package/dist/projects/library-editor/src/apps/migration-wizard/errors/index.d.ts +0 -6
- package/dist/projects/library-editor/src/apps/migration-wizard/errors/migration-finalisation/MigrationFinalisationError.d.ts +0 -8
- package/dist/projects/library-editor/src/apps/migration-wizard/errors/migration-progress/MigrationProgressError.d.ts +0 -8
- package/dist/projects/library-editor/src/apps/migration-wizard/errors/smart-migration-api-call/SmartMigrationApiCallError.d.ts +0 -9
- package/dist/projects/library-editor/src/apps/migration-wizard/filters/MigrationFilters.d.ts +0 -8
- package/dist/projects/library-editor/src/apps/migration-wizard/filters/index.d.ts +0 -1
- package/dist/projects/library-editor/src/apps/migration-wizard/interfaces/SelectedVideos.d.ts +0 -7
- package/dist/projects/library-editor/src/apps/migration-wizard/models/BackupToolBuild.d.ts +0 -3
- package/dist/projects/library-editor/src/apps/migration-wizard/models/CustomerMetadata.d.ts +0 -9
- package/dist/projects/library-editor/src/apps/migration-wizard/models/FinalisationTask.d.ts +0 -3
- package/dist/projects/library-editor/src/apps/migration-wizard/models/HomeFolder.d.ts +0 -8
- package/dist/projects/library-editor/src/apps/migration-wizard/models/MigrationOptions.d.ts +0 -3
- package/dist/projects/library-editor/src/apps/migration-wizard/models/SelectedVideo.d.ts +0 -3
- package/dist/projects/library-editor/src/apps/migration-wizard/models/SmartSelectVideo.d.ts +0 -4
- package/dist/projects/library-editor/src/apps/migration-wizard/models/VideoCount.d.ts +0 -3
- package/dist/projects/library-editor/src/apps/migration-wizard/models/index.d.ts +0 -8
- package/dist/projects/library-editor/src/apps/migration-wizard/services/FolderCacheService.d.ts +0 -22
- package/dist/projects/library-editor/src/apps/migration-wizard/services/LocalOptionsService.d.ts +0 -10
- package/dist/projects/library-editor/src/apps/migration-wizard/services/MigrationVideoDataService.d.ts +0 -56
- package/dist/projects/library-editor/src/apps/migration-wizard/services/SelectedVideoService.d.ts +0 -19
- package/dist/projects/library-editor/src/apps/migration-wizard/utils/FolderHelper.d.ts +0 -8
- package/dist/projects/library-editor/src/apps/migration-wizard/utils/KeyContactHelper.d.ts +0 -6
- package/dist/projects/library-editor/src/apps/migration-wizard/utils/MigrationErrorHelper.d.ts +0 -3
- package/dist/projects/library-editor/src/apps/migration-wizard/utils/MigrationHelper.d.ts +0 -41
- package/dist/projects/library-editor/src/apps/migration-wizard/utils/MigrationRadioChannels.d.ts +0 -4
- package/dist/projects/library-editor/src/apps/migration-wizard/utils/MigrationWarningsSvgs.d.ts +0 -3
- package/dist/projects/library-editor/src/apps/migration-wizard/utils/ReportHelper.d.ts +0 -9
- package/dist/projects/library-editor/src/apps/migration-wizard/utils/VideoHelper.d.ts +0 -29
- package/dist/projects/library-editor/src/apps/migration-wizard/views/current-section-header/CurrentSectionHeaderView.d.ts +0 -28
- package/dist/projects/library-editor/src/apps/migration-wizard/views/generate-csv-report/GenerateCsvReportView.d.ts +0 -27
- package/dist/projects/library-editor/src/apps/migration-wizard/views/migration-error/MigrationErrorView.d.ts +0 -40
- package/dist/projects/library-editor/src/apps/migration-wizard/views/migration-progress/MigrationProgressView.d.ts +0 -32
- package/dist/projects/library-editor/src/apps/migration-wizard/views/publish-library-banner/PublishLibraryBannerView.d.ts +0 -30
- package/dist/projects/library-editor/src/apps/migration-wizard/views/publish-library-complete/PublishLibraryCompleteView.d.ts +0 -15
- package/dist/projects/library-editor/src/apps/migration-wizard/views/publish-library-progress/PublishLibraryProgressView.d.ts +0 -18
- package/dist/projects/library-editor/src/apps/migration-wizard/views/publisher-backup/PublisherBackupView.d.ts +0 -19
- package/dist/projects/library-editor/src/apps/migration-wizard/views/publisher-backup-complete/PublisherBackupCompleteView.d.ts +0 -23
- package/dist/projects/library-editor/src/apps/migration-wizard/views/publisher-backup-progress/PublisherBackupProgressView.d.ts +0 -23
- package/dist/projects/library-editor/src/apps/migration-wizard/views/publisher-backup-welcome/PublisherBackupWelcomeView.d.ts +0 -19
- package/dist/projects/library-editor/src/apps/migration-wizard/views/remigrate-video/RemigrateVideoView.d.ts +0 -32
- package/dist/projects/library-editor/src/apps/migration-wizard/views/selected-videos/SelectedVideosView.d.ts +0 -32
- package/dist/projects/library-editor/src/apps/migration-wizard/views/show-video-popup/ShowPublisherVideoPopupView.d.ts +0 -26
- package/dist/projects/library-editor/src/apps/migration-wizard/views/smart-migration/SmartMigrationView.d.ts +0 -58
- package/dist/projects/library-editor/src/apps/migration-wizard/views/start/StartView.d.ts +0 -40
- package/dist/projects/library-editor/src/apps/migration-wizard/views/videos-added/VideosAddedView.d.ts +0 -24
- package/dist/projects/library-editor/src/apps/notifications/NotificationsApplication.d.ts +0 -11
- package/dist/projects/library-editor/src/apps/notifications/constants/NotificationsAppVariables.d.ts +0 -8
- package/dist/projects/library-editor/src/apps/notifications/constants/index.d.ts +0 -0
- package/dist/projects/library-editor/src/apps/notifications/utils/Constants.d.ts +0 -3
- package/dist/projects/library-editor/src/apps/notifications/utils/NotificationsHelper.d.ts +0 -10
- package/dist/projects/library-editor/src/apps/notifications/utils/index.d.ts +0 -2
- package/dist/projects/library-editor/src/apps/search/SearchApplication.d.ts +0 -16
- package/dist/projects/library-editor/src/apps/search/collections/FilterCollection.d.ts +0 -9
- package/dist/projects/library-editor/src/apps/search/collections/OptionCollection.d.ts +0 -5
- package/dist/projects/library-editor/src/apps/search/collections/index.d.ts +0 -2
- package/dist/projects/library-editor/src/apps/search/components/filters/FiltersComponent.d.ts +0 -27
- package/dist/projects/library-editor/src/apps/search/components/filters/filter-button-list/FilterButtonItemComponent.d.ts +0 -37
- package/dist/projects/library-editor/src/apps/search/components/filters/filter-button-list/FilterButtonListComponent.d.ts +0 -19
- package/dist/projects/library-editor/src/apps/search/components/filters/filter-button-list/index.d.ts +0 -2
- package/dist/projects/library-editor/src/apps/search/components/filters/filter-list/FilterItemComponent.d.ts +0 -17
- package/dist/projects/library-editor/src/apps/search/components/filters/filter-list/FilterListComponent.d.ts +0 -24
- package/dist/projects/library-editor/src/apps/search/components/filters/filter-options/FilterOptionsComponent.d.ts +0 -34
- package/dist/projects/library-editor/src/apps/search/components/filters/filter-options/bool-filter-options/BoolFilterOptionsComponent.d.ts +0 -15
- package/dist/projects/library-editor/src/apps/search/components/filters/filter-options/duration-filter-options/DurationFilterOptionListComponent.d.ts +0 -27
- package/dist/projects/library-editor/src/apps/search/components/filters/filter-options/filter-option-list/FilterOptionItemComponent.d.ts +0 -19
- package/dist/projects/library-editor/src/apps/search/components/filters/filter-options/filter-option-list/FilterOptionsListComponent.d.ts +0 -21
- package/dist/projects/library-editor/src/apps/search/components/filters/filter-options/index.d.ts +0 -7
- package/dist/projects/library-editor/src/apps/search/components/filters/filter-options/range-filter-options/RangeFilterOptionListComponent.d.ts +0 -23
- package/dist/projects/library-editor/src/apps/search/components/filters/filter-options/tag-filter-options/TagFilterOptionsComponent.d.ts +0 -27
- package/dist/projects/library-editor/src/apps/search/components/filters/filter-options/tag-filter-options/TagFilterOptionsListComponent.d.ts +0 -19
- package/dist/projects/library-editor/src/apps/search/components/filters/index.d.ts +0 -3
- package/dist/projects/library-editor/src/apps/search/components/filters/more-filters-button/MoreFiltersButtonComponent.d.ts +0 -42
- package/dist/projects/library-editor/src/apps/search/components/results/SearchResultsComponent.d.ts +0 -22
- package/dist/projects/library-editor/src/apps/search/components/search-header/SearchHeaderComponent.d.ts +0 -11
- package/dist/projects/library-editor/src/apps/search/constants/SearchRadioChannels.d.ts +0 -3
- package/dist/projects/library-editor/src/apps/search/constants/index.d.ts +0 -1
- package/dist/projects/library-editor/src/apps/search/models/Filter.d.ts +0 -8
- package/dist/projects/library-editor/src/apps/search/models/Option.d.ts +0 -4
- package/dist/projects/library-editor/src/apps/search/models/Query.d.ts +0 -3
- package/dist/projects/library-editor/src/apps/search/models/SearchAppVariables.d.ts +0 -7
- package/dist/projects/library-editor/src/apps/search/models/index.d.ts +0 -3
- package/dist/projects/library-editor/src/apps/search/services/SearchDataService.d.ts +0 -12
- package/dist/projects/library-editor/src/apps/search/services/index.d.ts +0 -1
- package/dist/projects/library-editor/src/apps/search/utils/Constants.d.ts +0 -28
- package/dist/projects/library-editor/src/apps/search/utils/Enums.d.ts +0 -23
- package/dist/projects/library-editor/src/apps/search/utils/FilterHelper.d.ts +0 -2
- package/dist/projects/library-editor/src/apps/search/utils/FilterLabelGenerators.d.ts +0 -2
- package/dist/projects/library-editor/src/apps/search/utils/FilterQueryGenerators.d.ts +0 -2
- package/dist/projects/library-editor/src/apps/search/utils/FilterRouteQueryParamGenerators.d.ts +0 -2
- package/dist/projects/library-editor/src/apps/search/utils/SearchHelper.d.ts +0 -11
- package/dist/projects/library-editor/src/apps/search/utils/index.d.ts +0 -4
- package/dist/projects/library-editor/src/apps/search/views/search/SearchView.d.ts +0 -57
- package/dist/projects/library-editor/src/apps/staff-requests/StaffRequestsApplication.d.ts +0 -15
- package/dist/projects/library-editor/src/apps/staff-requests/collections/StaffRequestCollection.d.ts +0 -5
- package/dist/projects/library-editor/src/apps/staff-requests/collections/StaffRequestMessageCollection.d.ts +0 -5
- package/dist/projects/library-editor/src/apps/staff-requests/collections/index.d.ts +0 -2
- package/dist/projects/library-editor/src/apps/staff-requests/components/staff-request-actions/StaffRequestActionsComponent.d.ts +0 -42
- package/dist/projects/library-editor/src/apps/staff-requests/components/staff-request-details/StaffRequestDetailsComponent.d.ts +0 -30
- package/dist/projects/library-editor/src/apps/staff-requests/components/staff-request-list/StaffRequestListComponent.d.ts +0 -29
- package/dist/projects/library-editor/src/apps/staff-requests/enums/StaffRequestStatus.d.ts +0 -5
- package/dist/projects/library-editor/src/apps/staff-requests/enums/index.d.ts +0 -1
- package/dist/projects/library-editor/src/apps/staff-requests/models/StaffRequest.d.ts +0 -18
- package/dist/projects/library-editor/src/apps/staff-requests/models/StaffRequestMessage.d.ts +0 -7
- package/dist/projects/library-editor/src/apps/staff-requests/models/index.d.ts +0 -2
- package/dist/projects/library-editor/src/apps/staff-requests/services/StaffRequestDataService.d.ts +0 -14
- package/dist/projects/library-editor/src/apps/staff-requests/services/index.d.ts +0 -1
- package/dist/projects/library-editor/src/apps/staff-requests/utils/StaffRequestApprovalValidation.d.ts +0 -2
- package/dist/projects/library-editor/src/apps/staff-requests/utils/StaffRequestRejectionValidation.d.ts +0 -2
- package/dist/projects/library-editor/src/apps/staff-requests/utils/index.d.ts +0 -2
- package/dist/projects/library-editor/src/apps/staff-requests/views/approve-staff-request/ApproveStaffRequestView.d.ts +0 -34
- package/dist/projects/library-editor/src/apps/staff-requests/views/reject-staff-request/RejectStaffRequestView.d.ts +0 -34
- package/dist/projects/library-editor/src/apps/staff-requests/views/staff-requests/StaffRequestsView.d.ts +0 -44
- package/dist/projects/library-editor/src/apps/upload/UploadApplication.d.ts +0 -23
- package/dist/projects/library-editor/src/apps/upload/components/index.d.ts +0 -7
- package/dist/projects/library-editor/src/apps/upload/components/processing-progress/ProcessProgressComponentCollection.d.ts +0 -38
- package/dist/projects/library-editor/src/apps/upload/components/progress-info/ProgressInfoComponent.d.ts +0 -10
- package/dist/projects/library-editor/src/apps/upload/components/upload-actions/UploadActionsComponent.d.ts +0 -21
- package/dist/projects/library-editor/src/apps/upload/components/upload-folder-select/UploadFolderSelectComponent.d.ts +0 -35
- package/dist/projects/library-editor/src/apps/upload/components/upload-progress/UploadProgressComponent.d.ts +0 -10
- package/dist/projects/library-editor/src/apps/upload/components/upload-video/UploadVideoComponent.d.ts +0 -48
- package/dist/projects/library-editor/src/apps/upload/components/upload-video/UploadVideoComponentCollection.d.ts +0 -20
- package/dist/projects/library-editor/src/apps/upload/components/upload-video-options/UploadVideoOptionsComponent.d.ts +0 -18
- package/dist/projects/library-editor/src/apps/upload/errors/index.d.ts +0 -1
- package/dist/projects/library-editor/src/apps/upload/errors/no-libraries-upload/NoLibrariesUploadError.d.ts +0 -7
- package/dist/projects/library-editor/src/apps/upload/services/ImageUploadDataService.d.ts +0 -8
- package/dist/projects/library-editor/src/apps/upload/services/PendingItemsService.d.ts +0 -7
- package/dist/projects/library-editor/src/apps/upload/services/VideoUploadDataService.d.ts +0 -17
- package/dist/projects/library-editor/src/apps/upload/services/VideoUploadService.d.ts +0 -8
- package/dist/projects/library-editor/src/apps/upload/services/index.d.ts +0 -5
- package/dist/projects/library-editor/src/apps/upload/views/file-select/FileSelectView.d.ts +0 -25
- package/dist/projects/library-editor/src/apps/upload/views/progress-summary/ProgressSummaryView.d.ts +0 -18
- package/dist/projects/library-editor/src/apps/upload/views/upload-button/UploadButtonView.d.ts +0 -26
- package/dist/projects/library-editor/src/apps/upload/views/upload-complete/UploadCompleteView.d.ts +0 -14
- package/dist/projects/library-editor/src/apps/upload/views/upload-videos/UploadVideosView.d.ts +0 -64
- package/dist/projects/library-editor/src/apps/video-access/VideoAccessApplication.d.ts +0 -12
- package/dist/projects/library-editor/src/apps/video-access/views/restricted-video-list/RestrictedVideoListView.d.ts +0 -34
- package/dist/projects/library-editor/src/polyfills.d.ts +0 -2
- package/dist/projects/library-editor/src/shared/alerts/VideoAlerts.d.ts +0 -9
- package/dist/projects/library-editor/src/shared/alerts/index.d.ts +0 -1
- package/dist/projects/library-editor/src/shared/behaviors/backbone-validation/BackboneValidationBehavior.d.ts +0 -14
- package/dist/projects/library-editor/src/shared/behaviors/image-select-behavior/ImageSelectBehavior.d.ts +0 -23
- package/dist/projects/library-editor/src/shared/behaviors/index.d.ts +0 -6
- package/dist/projects/library-editor/src/shared/behaviors/lazy-load/LazyLoadBehavior.d.ts +0 -31
- package/dist/projects/library-editor/src/shared/behaviors/lock-layout-file-drop/LockLayoutFileDropBehavior.d.ts +0 -7
- package/dist/projects/library-editor/src/shared/behaviors/popup/PopupBehavior.d.ts +0 -65
- package/dist/projects/library-editor/src/shared/behaviors/stickit/StickitBehavior.d.ts +0 -6
- package/dist/projects/library-editor/src/shared/collections/ChannelCollection.d.ts +0 -6
- package/dist/projects/library-editor/src/shared/collections/ChapterCollection.d.ts +0 -7
- package/dist/projects/library-editor/src/shared/collections/DirectorCollection.d.ts +0 -6
- package/dist/projects/library-editor/src/shared/collections/DistributorCollection.d.ts +0 -6
- package/dist/projects/library-editor/src/shared/collections/FieldsCollection.d.ts +0 -5
- package/dist/projects/library-editor/src/shared/collections/FolderCollection.d.ts +0 -7
- package/dist/projects/library-editor/src/shared/collections/InteractivesCollection.d.ts +0 -6
- package/dist/projects/library-editor/src/shared/collections/LibraryCollection.d.ts +0 -7
- package/dist/projects/library-editor/src/shared/collections/LinkCollection.d.ts +0 -6
- package/dist/projects/library-editor/src/shared/collections/LocalCacheDeviceCollection.d.ts +0 -5
- package/dist/projects/library-editor/src/shared/collections/LocalCacheDownloadCollection.d.ts +0 -5
- package/dist/projects/library-editor/src/shared/collections/MetadataCollection.d.ts +0 -4
- package/dist/projects/library-editor/src/shared/collections/ProducerCollection.d.ts +0 -6
- package/dist/projects/library-editor/src/shared/collections/ProductionCompanyCollection.d.ts +0 -6
- package/dist/projects/library-editor/src/shared/collections/RatingCollection.d.ts +0 -4
- package/dist/projects/library-editor/src/shared/collections/ResourceCollection.d.ts +0 -6
- package/dist/projects/library-editor/src/shared/collections/RestrictedObjectCollection.d.ts +0 -5
- package/dist/projects/library-editor/src/shared/collections/RestrictionCollection.d.ts +0 -5
- package/dist/projects/library-editor/src/shared/collections/SeasonCollection.d.ts +0 -6
- package/dist/projects/library-editor/src/shared/collections/SettingsCollection.d.ts +0 -5
- package/dist/projects/library-editor/src/shared/collections/SubtitleCollection.d.ts +0 -6
- package/dist/projects/library-editor/src/shared/collections/TagCollection.d.ts +0 -6
- package/dist/projects/library-editor/src/shared/collections/VideoCollection.d.ts +0 -6
- package/dist/projects/library-editor/src/shared/components/alert/AlertComponentCollection.d.ts +0 -11
- package/dist/projects/library-editor/src/shared/components/alert/AlertItemComponent.d.ts +0 -44
- package/dist/projects/library-editor/src/shared/components/breadcrumbs/BreadcrumbComponentCollection.d.ts +0 -18
- package/dist/projects/library-editor/src/shared/components/breadcrumbs/BreadcrumbsComponent.d.ts +0 -27
- package/dist/projects/library-editor/src/shared/components/bulk-video-actions/BulkVideoActionsComponent.d.ts +0 -26
- package/dist/projects/library-editor/src/shared/components/checkbox/BulkCheckboxComponent.d.ts +0 -27
- package/dist/projects/library-editor/src/shared/components/checkbox/CheckboxComponent.d.ts +0 -25
- package/dist/projects/library-editor/src/shared/components/clear-button/ClearButtonComponent.d.ts +0 -18
- package/dist/projects/library-editor/src/shared/components/date-picker/DatePickerComponent.d.ts +0 -47
- package/dist/projects/library-editor/src/shared/components/dialog/DialogView.d.ts +0 -22
- package/dist/projects/library-editor/src/shared/components/dropdown/DropdownButtonComponent.d.ts +0 -36
- package/dist/projects/library-editor/src/shared/components/dropdown/DropdownComponentCollection.d.ts +0 -38
- package/dist/projects/library-editor/src/shared/components/dropdown/DropdownItemComponent.d.ts +0 -57
- package/dist/projects/library-editor/src/shared/components/edit-video/edit-additional-info/EditAdditionalInfoComponent.d.ts +0 -38
- package/dist/projects/library-editor/src/shared/components/edit-video/edit-basic-info/EditBasicInfoComponent.d.ts +0 -32
- package/dist/projects/library-editor/src/shared/components/edit-video/edit-broadcast/EditBroadcastComponent.d.ts +0 -22
- package/dist/projects/library-editor/src/shared/components/edit-video/edit-broadcast/ToggleBroadcastComponent.d.ts +0 -24
- package/dist/projects/library-editor/src/shared/components/edit-video/edit-production-info/EditProductionInfoComponent.d.ts +0 -61
- package/dist/projects/library-editor/src/shared/components/edit-video/edit-season-info/EditSeasonInfoComponent.d.ts +0 -33
- package/dist/projects/library-editor/src/shared/components/edit-video/extra-info/ExtraInfoComponent.d.ts +0 -16
- package/dist/projects/library-editor/src/shared/components/edit-video/extra-info/ExtraInfoItemComponent.d.ts +0 -17
- package/dist/projects/library-editor/src/shared/components/edit-video/select-rating/SelectRatingCollectionComponent.d.ts +0 -17
- package/dist/projects/library-editor/src/shared/components/edit-video/select-rating/SelectRatingComponent.d.ts +0 -40
- package/dist/projects/library-editor/src/shared/components/edit-video/select-rating/SelectRatingItemComponent.d.ts +0 -20
- package/dist/projects/library-editor/src/shared/components/fields/FieldsComponent.d.ts +0 -9
- package/dist/projects/library-editor/src/shared/components/image-cropper/ImageCropperComponent.d.ts +0 -34
- package/dist/projects/library-editor/src/shared/components/left-nav/LeftNavComponent.d.ts +0 -31
- package/dist/projects/library-editor/src/shared/components/left-nav/LeftNavNodeComponent.d.ts +0 -48
- package/dist/projects/library-editor/src/shared/components/page-footer/PageFooterComponent.d.ts +0 -15
- package/dist/projects/library-editor/src/shared/components/page-header/PageHeaderComponent.d.ts +0 -25
- package/dist/projects/library-editor/src/shared/components/partial-loading/PartialLoadingComponent.d.ts +0 -16
- package/dist/projects/library-editor/src/shared/components/partial-loading/PartialLoadingComponentCollection.d.ts +0 -20
- package/dist/projects/library-editor/src/shared/components/partial-loading/index.d.ts +0 -2
- package/dist/projects/library-editor/src/shared/components/resizing-text-area/ResizingTextAreaComponent.d.ts +0 -23
- package/dist/projects/library-editor/src/shared/components/screenrights-disclaimer/ScreenrightsDisclaimerComponent.d.ts +0 -18
- package/dist/projects/library-editor/src/shared/components/select/SelectComponent.d.ts +0 -54
- package/dist/projects/library-editor/src/shared/components/spinner-button/SpinnerButtonComponent.d.ts +0 -73
- package/dist/projects/library-editor/src/shared/components/tabs/TabsComponent.d.ts +0 -28
- package/dist/projects/library-editor/src/shared/components/top-navigation/TopNavigationComponentCollection.d.ts +0 -29
- package/dist/projects/library-editor/src/shared/components/tree-dropdown/TreeDropdownComponent.d.ts +0 -32
- package/dist/projects/library-editor/src/shared/components/typeahead-input/SearchTypeaheadComponent.d.ts +0 -74
- package/dist/projects/library-editor/src/shared/components/typeahead-input/templates/index.d.ts +0 -4
- package/dist/projects/library-editor/src/shared/components/typeahead-list/TypeaheadListComponent.d.ts +0 -33
- package/dist/projects/library-editor/src/shared/components/user-options-dropdown/UserOptionsDropdownComponent.d.ts +0 -20
- package/dist/projects/library-editor/src/shared/components/video-actions/VideoActionComponentCollection.d.ts +0 -31
- package/dist/projects/library-editor/src/shared/components/video-actions/VideoActionsComponent.d.ts +0 -42
- package/dist/projects/library-editor/src/shared/components/video-basic-info/VideoBasicInfoComponent.d.ts +0 -33
- package/dist/projects/library-editor/src/shared/components/video-description/VideoDescriptionComponent.d.ts +0 -33
- package/dist/projects/library-editor/src/shared/components/video-item/VideoItemComponent.d.ts +0 -58
- package/dist/projects/library-editor/src/shared/components/video-item/index.d.ts +0 -4
- package/dist/projects/library-editor/src/shared/components/video-item/utils/VideoItemBehaviors.d.ts +0 -4
- package/dist/projects/library-editor/src/shared/components/video-item/utils/VideoItemComponentHelper.d.ts +0 -8
- package/dist/projects/library-editor/src/shared/components/video-item/utils/VideoItemComponentTypes.d.ts +0 -16
- package/dist/projects/library-editor/src/shared/components/video-item/utils/VideoItemComponents.d.ts +0 -7
- package/dist/projects/library-editor/src/shared/components/video-item/utils/index.d.ts +0 -3
- package/dist/projects/library-editor/src/shared/components/video-item/video-item-actions/base/VideoItemActionsComponent.d.ts +0 -23
- package/dist/projects/library-editor/src/shared/components/video-item/video-item-actions/index.d.ts +0 -4
- package/dist/projects/library-editor/src/shared/components/video-item/video-item-actions/video-item-processing-actions/VideoItemProcessingActionsComponent.d.ts +0 -25
- package/dist/projects/library-editor/src/shared/components/video-item/video-item-actions/video-item-review-actions/VideoItemReviewActionsComponent.d.ts +0 -26
- package/dist/projects/library-editor/src/shared/components/video-item/video-item-actions/video-item-video-access-actions/VideoItemVideoAccessActionsComponent.d.ts +0 -22
- package/dist/projects/library-editor/src/shared/components/video-item/video-item-metadata/base/VideoItemMetadataComponent.d.ts +0 -24
- package/dist/projects/library-editor/src/shared/components/video-item/video-item-metadata/index.d.ts +0 -9
- package/dist/projects/library-editor/src/shared/components/video-item/video-item-metadata/video-item-awaiting-review-metadata/VideoItemAwaitingReviewMetadataComponent.d.ts +0 -22
- package/dist/projects/library-editor/src/shared/components/video-item/video-item-metadata/video-item-badges/VideoItemBadgesComponent.d.ts +0 -20
- package/dist/projects/library-editor/src/shared/components/video-item/video-item-metadata/video-item-past-releases-metadata/VideoItemPastReleasesMetadataComponent.d.ts +0 -25
- package/dist/projects/library-editor/src/shared/components/video-item/video-item-metadata/video-item-processing-metadata/VideoItemProcessingMetadataComponent.d.ts +0 -19
- package/dist/projects/library-editor/src/shared/components/video-item/video-item-metadata/video-item-search-metadata/VideoItemSearchMetadataComponent.d.ts +0 -22
- package/dist/projects/library-editor/src/shared/components/video-item/video-item-metadata/video-item-series/VideoItemSeriesComponent.d.ts +0 -22
- package/dist/projects/library-editor/src/shared/components/video-item/video-item-metadata/video-item-video-access-metadata/VideoItemVideoAccessMetadataComponent.d.ts +0 -27
- package/dist/projects/library-editor/src/shared/components/video-item/video-item-metadata/video-sources-metadata/VideoSourcesMetadataComponent.d.ts +0 -22
- package/dist/projects/library-editor/src/shared/components/video-item-preview/VideoItemPreviewComponent.d.ts +0 -37
- package/dist/projects/library-editor/src/shared/components/video-list/VideoListComponent.d.ts +0 -44
- package/dist/projects/library-editor/src/shared/components/video-preview/VideoPreviewComponent.d.ts +0 -30
- package/dist/projects/library-editor/src/shared/components/web-player/WebPlayerComponent.d.ts +0 -53
- package/dist/projects/library-editor/src/shared/constants/Actions.d.ts +0 -99
- package/dist/projects/library-editor/src/shared/constants/BootstrapKeys.d.ts +0 -9
- package/dist/projects/library-editor/src/shared/constants/CacheDurations.d.ts +0 -4
- package/dist/projects/library-editor/src/shared/constants/DataPrefixes.d.ts +0 -91
- package/dist/projects/library-editor/src/shared/constants/DataServiceErrors.d.ts +0 -4
- package/dist/projects/library-editor/src/shared/constants/EventNames.d.ts +0 -16
- package/dist/projects/library-editor/src/shared/constants/FolderTreeIds.d.ts +0 -4
- package/dist/projects/library-editor/src/shared/constants/FormattedCustomerSettingNames.d.ts +0 -3
- package/dist/projects/library-editor/src/shared/constants/ImageSizes.d.ts +0 -11
- package/dist/projects/library-editor/src/shared/constants/ImageUrls.d.ts +0 -19
- package/dist/projects/library-editor/src/shared/constants/LayoutRegions.d.ts +0 -16
- package/dist/projects/library-editor/src/shared/constants/Layouts.d.ts +0 -3
- package/dist/projects/library-editor/src/shared/constants/LazyLoadBrowserSupport.d.ts +0 -7
- package/dist/projects/library-editor/src/shared/constants/MarketingSiteArticles.d.ts +0 -3
- package/dist/projects/library-editor/src/shared/constants/Misc.d.ts +0 -5
- package/dist/projects/library-editor/src/shared/constants/OnlineUrls.d.ts +0 -4
- package/dist/projects/library-editor/src/shared/constants/PartialLoadingComponents.d.ts +0 -10
- package/dist/projects/library-editor/src/shared/constants/RadioChannels.d.ts +0 -62
- package/dist/projects/library-editor/src/shared/constants/Search.d.ts +0 -24
- package/dist/projects/library-editor/src/shared/constants/Services.d.ts +0 -62
- package/dist/projects/library-editor/src/shared/constants/SupportArticles.d.ts +0 -3
- package/dist/projects/library-editor/src/shared/constants/Webplayer.d.ts +0 -4
- package/dist/projects/library-editor/src/shared/constants/WithStatements.d.ts +0 -9
- package/dist/projects/library-editor/src/shared/constants/empty-state-components/EmptyStateComponents.d.ts +0 -6
- package/dist/projects/library-editor/src/shared/constants/index.d.ts +0 -25
- package/dist/projects/library-editor/src/shared/enums/CitationType.d.ts +0 -6
- package/dist/projects/library-editor/src/shared/enums/CustomerRegions.d.ts +0 -5
- package/dist/projects/library-editor/src/shared/enums/EmptyStates.d.ts +0 -16
- package/dist/projects/library-editor/src/shared/enums/FileIdType.d.ts +0 -5
- package/dist/projects/library-editor/src/shared/enums/ImageType.d.ts +0 -5
- package/dist/projects/library-editor/src/shared/enums/MasterType.d.ts +0 -4
- package/dist/projects/library-editor/src/shared/enums/PartialLoading.d.ts +0 -38
- package/dist/projects/library-editor/src/shared/enums/RestrictedObjectType.d.ts +0 -4
- package/dist/projects/library-editor/src/shared/enums/SchoolTypes.d.ts +0 -17
- package/dist/projects/library-editor/src/shared/enums/SharedResourcePrivacy.d.ts +0 -5
- package/dist/projects/library-editor/src/shared/enums/SortTypes.d.ts +0 -10
- package/dist/projects/library-editor/src/shared/enums/StaffRequestOption.d.ts +0 -9
- package/dist/projects/library-editor/src/shared/enums/TimeType.d.ts +0 -4
- package/dist/projects/library-editor/src/shared/enums/UserRole.d.ts +0 -10
- package/dist/projects/library-editor/src/shared/enums/YearGroups.d.ts +0 -19
- package/dist/projects/library-editor/src/shared/enums/index.d.ts +0 -15
- package/dist/projects/library-editor/src/shared/errors/authentication/AuthenticationError.d.ts +0 -8
- package/dist/projects/library-editor/src/shared/errors/customer-setting/CustomerSettingError.d.ts +0 -8
- package/dist/projects/library-editor/src/shared/errors/email-not-verified/EmailNotVerifiedError.d.ts +0 -8
- package/dist/projects/library-editor/src/shared/errors/forbidden-access/ForbiddenAccessError.d.ts +0 -11
- package/dist/projects/library-editor/src/shared/errors/index.d.ts +0 -8
- package/dist/projects/library-editor/src/shared/errors/local-cache-device-not-found/LocalCacheDeviceNotFoundError.d.ts +0 -7
- package/dist/projects/library-editor/src/shared/errors/no-beta-access/NoBetaAccessError.d.ts +0 -8
- package/dist/projects/library-editor/src/shared/errors/not-found/NotFoundError.d.ts +0 -5
- package/dist/projects/library-editor/src/shared/errors/old-version/OldVersionError.d.ts +0 -8
- package/dist/projects/library-editor/src/shared/filters/BetaAccessFilter.d.ts +0 -3
- package/dist/projects/library-editor/src/shared/filters/CustomerSettingsFilter.d.ts +0 -8
- package/dist/projects/library-editor/src/shared/filters/RoleFilter.d.ts +0 -4
- package/dist/projects/library-editor/src/shared/filters/VerifiedEmailFilter.d.ts +0 -3
- package/dist/projects/library-editor/src/shared/filters/index.d.ts +0 -4
- package/dist/projects/library-editor/src/shared/index.d.ts +0 -9
- package/dist/projects/library-editor/src/shared/interfaces/LibraryFoldersIdentifier.d.ts +0 -5
- package/dist/projects/library-editor/src/shared/interfaces/RecentVideoCollectionIdentifier.d.ts +0 -20
- package/dist/projects/library-editor/src/shared/interfaces/RecentVideoSubjectCollectionIdentifier.d.ts +0 -16
- package/dist/projects/library-editor/src/shared/interfaces/VideoCollectionIdentifier.d.ts +0 -5
- package/dist/projects/library-editor/src/shared/interfaces/index.d.ts +0 -4
- package/dist/projects/library-editor/src/shared/layouts/index.d.ts +0 -1
- package/dist/projects/library-editor/src/shared/layouts/manage-layout/ManageLayoutView.d.ts +0 -49
- package/dist/projects/library-editor/src/shared/models/Avatar.d.ts +0 -3
- package/dist/projects/library-editor/src/shared/models/Banner.d.ts +0 -3
- package/dist/projects/library-editor/src/shared/models/Channel.d.ts +0 -3
- package/dist/projects/library-editor/src/shared/models/Chapter.d.ts +0 -3
- package/dist/projects/library-editor/src/shared/models/Company.d.ts +0 -3
- package/dist/projects/library-editor/src/shared/models/Config.d.ts +0 -3
- package/dist/projects/library-editor/src/shared/models/Customer.d.ts +0 -3
- package/dist/projects/library-editor/src/shared/models/Director.d.ts +0 -3
- package/dist/projects/library-editor/src/shared/models/DisabledSpinnerModel.d.ts +0 -5
- package/dist/projects/library-editor/src/shared/models/Distributor.d.ts +0 -3
- package/dist/projects/library-editor/src/shared/models/Folder.d.ts +0 -14
- package/dist/projects/library-editor/src/shared/models/Image.d.ts +0 -3
- package/dist/projects/library-editor/src/shared/models/Interactives.d.ts +0 -3
- package/dist/projects/library-editor/src/shared/models/LanguageConfig.d.ts +0 -7
- package/dist/projects/library-editor/src/shared/models/Library.d.ts +0 -10
- package/dist/projects/library-editor/src/shared/models/Link.d.ts +0 -3
- package/dist/projects/library-editor/src/shared/models/LocalCacheDevice.d.ts +0 -3
- package/dist/projects/library-editor/src/shared/models/LocalCacheDownload.d.ts +0 -3
- package/dist/projects/library-editor/src/shared/models/Logo.d.ts +0 -3
- package/dist/projects/library-editor/src/shared/models/Metadata.d.ts +0 -3
- package/dist/projects/library-editor/src/shared/models/Owner.d.ts +0 -3
- package/dist/projects/library-editor/src/shared/models/Person.d.ts +0 -3
- package/dist/projects/library-editor/src/shared/models/Phrases.d.ts +0 -3
- package/dist/projects/library-editor/src/shared/models/Playlist.d.ts +0 -3
- package/dist/projects/library-editor/src/shared/models/Producer.d.ts +0 -3
- package/dist/projects/library-editor/src/shared/models/ProductionCompany.d.ts +0 -3
- package/dist/projects/library-editor/src/shared/models/Rating.d.ts +0 -3
- package/dist/projects/library-editor/src/shared/models/Resource.d.ts +0 -3
- package/dist/projects/library-editor/src/shared/models/RestrictedObject.d.ts +0 -3
- package/dist/projects/library-editor/src/shared/models/Restriction.d.ts +0 -3
- package/dist/projects/library-editor/src/shared/models/Season.d.ts +0 -3
- package/dist/projects/library-editor/src/shared/models/Series.d.ts +0 -7
- package/dist/projects/library-editor/src/shared/models/Setting.d.ts +0 -3
- package/dist/projects/library-editor/src/shared/models/SharedResource.d.ts +0 -3
- package/dist/projects/library-editor/src/shared/models/Subtitle.d.ts +0 -3
- package/dist/projects/library-editor/src/shared/models/Tag.d.ts +0 -3
- package/dist/projects/library-editor/src/shared/models/Thumbnail.d.ts +0 -3
- package/dist/projects/library-editor/src/shared/models/User.d.ts +0 -10
- package/dist/projects/library-editor/src/shared/models/Video.d.ts +0 -49
- package/dist/projects/library-editor/src/shared/services/AlertService.d.ts +0 -15
- package/dist/projects/library-editor/src/shared/services/ConfigDataService.d.ts +0 -23
- package/dist/projects/library-editor/src/shared/services/CustomerDataService.d.ts +0 -7
- package/dist/projects/library-editor/src/shared/services/DownloadProxyDataServices.d.ts +0 -8
- package/dist/projects/library-editor/src/shared/services/IntercomService.d.ts +0 -6
- package/dist/projects/library-editor/src/shared/services/LocalCacheDataService.d.ts +0 -12
- package/dist/projects/library-editor/src/shared/services/NavigationLockService.d.ts +0 -16
- package/dist/projects/library-editor/src/shared/services/PageTitleService.d.ts +0 -8
- package/dist/projects/library-editor/src/shared/services/PageVisibilityService.d.ts +0 -14
- package/dist/projects/library-editor/src/shared/services/PartialLoadingService.d.ts +0 -10
- package/dist/projects/library-editor/src/shared/services/RestrictedVideoDataService.d.ts +0 -15
- package/dist/projects/library-editor/src/shared/services/SettingsDataService.d.ts +0 -16
- package/dist/projects/library-editor/src/shared/services/UserDataService.d.ts +0 -20
- package/dist/projects/library-editor/src/shared/services/VideoMixinService.d.ts +0 -18
- package/dist/projects/library-editor/src/shared/utils/BulkCheckboxHelper.d.ts +0 -18
- package/dist/projects/library-editor/src/shared/utils/CancelProcessingHelper.d.ts +0 -4
- package/dist/projects/library-editor/src/shared/utils/CollectionHelper.d.ts +0 -10
- package/dist/projects/library-editor/src/shared/utils/DialogHelper.d.ts +0 -9
- package/dist/projects/library-editor/src/shared/utils/DurationHelper.d.ts +0 -7
- package/dist/projects/library-editor/src/shared/utils/FolderTreeHelpers.d.ts +0 -36
- package/dist/projects/library-editor/src/shared/utils/ImageHelper.d.ts +0 -32
- package/dist/projects/library-editor/src/shared/utils/LazyLoadHelper.d.ts +0 -4
- package/dist/projects/library-editor/src/shared/utils/LocalCacheHelper.d.ts +0 -7
- package/dist/projects/library-editor/src/shared/utils/PartialLoadingHelper.d.ts +0 -6
- package/dist/projects/library-editor/src/shared/utils/PermissionsHelper.d.ts +0 -13
- package/dist/projects/library-editor/src/shared/utils/RadioChannelHelper.d.ts +0 -11
- package/dist/projects/library-editor/src/shared/utils/RatingHelper.d.ts +0 -5
- package/dist/projects/library-editor/src/shared/utils/RestrictedAccessHelper.d.ts +0 -13
- package/dist/projects/library-editor/src/shared/utils/SettingsHelper.d.ts +0 -9
- package/dist/projects/library-editor/src/shared/utils/SortHelper.d.ts +0 -16
- package/dist/projects/library-editor/src/shared/utils/SpinnerHelper.d.ts +0 -19
- package/dist/projects/library-editor/src/shared/utils/SubtitleLanguageValidation.d.ts +0 -6
- package/dist/projects/library-editor/src/shared/utils/TabHelper.d.ts +0 -9
- package/dist/projects/library-editor/src/shared/utils/TextHelper.d.ts +0 -9
- package/dist/projects/library-editor/src/shared/utils/TimeHelper.d.ts +0 -20
- package/dist/projects/library-editor/src/shared/utils/VideoHelper.d.ts +0 -11
- package/dist/projects/library-editor/src/shared/utils/index.d.ts +0 -23
- package/dist/projects/library-editor/src/shared/utils/search/RawSearchHelper.d.ts +0 -25
- package/dist/projects/library-editor/src/shared/utils/search/index.d.ts +0 -1
- package/dist/projects/library-editor/src/shared/utils/search/raw-search-components/add-new/AddNewSuggestion.d.ts +0 -12
- package/dist/projects/library-editor/src/shared/utils/search/raw-search-components/index.d.ts +0 -1
- package/dist/projects/library-editor/src/shared/utils/search/raw-search-templates/index.d.ts +0 -5
- package/dist/projects/library-editor/src/shared/views/download-to-local-cache/DownloadToLocalCacheView.d.ts +0 -28
- package/dist/projects/library-editor/src/shared/views/download-video/DownloadVideoView.d.ts +0 -18
- package/dist/projects/library-editor/src/shared/views/restrict-access/RestrictAccessComponent.d.ts +0 -7
- package/dist/projects/library-editor/src/shared/views/restrict-access/RestrictAccessGroupComponent.d.ts +0 -24
- package/dist/projects/library-editor/src/shared/views/restrict-access/RestrictAccessView.d.ts +0 -67
- package/dist/projects/library-editor/src/shared/views/share/ShareView.d.ts +0 -48
- package/dist/projects/library-editor/src/shared/views/top-navigation/TopNavigationView.d.ts +0 -35
- package/dist/projects/library-editor/src/shared/views/user-options/UserOptionsView.d.ts +0 -18
- package/dist/projects/library-editor/src/startup/ConsoleOutput.d.ts +0 -3
- package/dist/projects/library-editor/src/startup/RegisterAjaxMiddleware.d.ts +0 -3
- package/dist/projects/library-editor/src/startup/RegisterAnalytics.d.ts +0 -3
- package/dist/projects/library-editor/src/startup/RegisterApplicationVariables.d.ts +0 -3
- package/dist/projects/library-editor/src/startup/RegisterApplications.d.ts +0 -3
- package/dist/projects/library-editor/src/startup/RegisterCaches.d.ts +0 -3
- package/dist/projects/library-editor/src/startup/RegisterDataProviders.d.ts +0 -3
- package/dist/projects/library-editor/src/startup/RegisterDataServices.d.ts +0 -3
- package/dist/projects/library-editor/src/startup/RegisterErrorHandlers.d.ts +0 -3
- package/dist/projects/library-editor/src/startup/RegisterHandlebarsHelpers.d.ts +0 -3
- package/dist/projects/library-editor/src/startup/RegisterLayouts.d.ts +0 -3
- package/dist/projects/library-editor/src/startup/RegisterRuntimeEnvironment.d.ts +0 -3
- package/dist/projects/library-editor/src/startup/RegisterServices.d.ts +0 -3
- package/dist/projects/library-editor/src/startup/RegisterViewDataExtensions.d.ts +0 -15
- package/dist/projects/library-editor/src/startup/index.d.ts +0 -14
- package/dist/projects/library-editor/src/styles/index.d.ts +0 -1
- package/dist/projects/library-editor/typings/libs/LazyLoad.d.ts +0 -26
- package/dist/scripts/0-e25d47c666.chunk.js +0 -1
- package/dist/scripts/0.chunk.js +0 -1039
- package/dist/scripts/0.chunk.js.map +0 -1
- package/dist/scripts/1-620c685eee.chunk.js +0 -1
- package/dist/scripts/1.chunk.js +0 -442
- package/dist/scripts/1.chunk.js.map +0 -1
- package/dist/scripts/10-3baf058564.chunk.js +0 -1
- package/dist/scripts/10.chunk.js +0 -820
- package/dist/scripts/10.chunk.js.map +0 -1
- package/dist/scripts/11.chunk.js +0 -4091
- package/dist/scripts/11.chunk.js.map +0 -1
- package/dist/scripts/12-b460ad405e.chunk.js +0 -1
- package/dist/scripts/12.chunk.js +0 -555
- package/dist/scripts/12.chunk.js.map +0 -1
- package/dist/scripts/13-89b3a0aebb.chunk.js +0 -1
- package/dist/scripts/13.chunk.js +0 -380
- package/dist/scripts/13.chunk.js.map +0 -1
- package/dist/scripts/14-670309ef33.chunk.js +0 -1
- package/dist/scripts/14.chunk.js +0 -2386
- package/dist/scripts/14.chunk.js.map +0 -1
- package/dist/scripts/15-39010184ed.chunk.js +0 -1
- package/dist/scripts/15.chunk.js +0 -314
- package/dist/scripts/15.chunk.js.map +0 -1
- package/dist/scripts/16.chunk.js +0 -1290
- package/dist/scripts/16.chunk.js.map +0 -1
- package/dist/scripts/17.chunk.js +0 -381
- package/dist/scripts/17.chunk.js.map +0 -1
- package/dist/scripts/18.chunk.js +0 -393
- package/dist/scripts/18.chunk.js.map +0 -1
- package/dist/scripts/19.chunk.js +0 -364
- package/dist/scripts/19.chunk.js.map +0 -1
- package/dist/scripts/2.chunk.js +0 -523
- package/dist/scripts/2.chunk.js.map +0 -1
- package/dist/scripts/20-42dc06da39.chunk.js +0 -1
- package/dist/scripts/20.chunk.js +0 -317
- package/dist/scripts/20.chunk.js.map +0 -1
- package/dist/scripts/21-05615559be.chunk.js +0 -1
- package/dist/scripts/21.chunk.js +0 -531
- package/dist/scripts/21.chunk.js.map +0 -1
- package/dist/scripts/22-70b4c18dd2.chunk.js +0 -1
- package/dist/scripts/22.chunk.js +0 -354
- package/dist/scripts/22.chunk.js.map +0 -1
- package/dist/scripts/23-3166dfeef5.chunk.js +0 -1
- package/dist/scripts/23.chunk.js +0 -604
- package/dist/scripts/23.chunk.js.map +0 -1
- package/dist/scripts/24-6fbd14025b.chunk.js +0 -1
- package/dist/scripts/24.chunk.js +0 -318
- package/dist/scripts/24.chunk.js.map +0 -1
- package/dist/scripts/25-3d067b8b9a.chunk.js +0 -1
- package/dist/scripts/25.chunk.js +0 -365
- package/dist/scripts/25.chunk.js.map +0 -1
- package/dist/scripts/26-468305820a.chunk.js +0 -1
- package/dist/scripts/26.chunk.js +0 -442
- package/dist/scripts/26.chunk.js.map +0 -1
- package/dist/scripts/27-d03a99658e.chunk.js +0 -1
- package/dist/scripts/27.chunk.js +0 -3630
- package/dist/scripts/27.chunk.js.map +0 -1
- package/dist/scripts/28-f3f43a3001.chunk.js +0 -1
- package/dist/scripts/28.chunk.js +0 -3172
- package/dist/scripts/28.chunk.js.map +0 -1
- package/dist/scripts/29-268278d2ac.chunk.js +0 -1
- package/dist/scripts/29.chunk.js +0 -3090
- package/dist/scripts/29.chunk.js.map +0 -1
- package/dist/scripts/3.chunk.js +0 -845
- package/dist/scripts/3.chunk.js.map +0 -1
- package/dist/scripts/30-694b0a0d4b.chunk.js +0 -1
- package/dist/scripts/30.chunk.js +0 -1851
- package/dist/scripts/30.chunk.js.map +0 -1
- package/dist/scripts/31-4c542c18dc.chunk.js +0 -1
- package/dist/scripts/31.chunk.js +0 -958
- package/dist/scripts/31.chunk.js.map +0 -1
- package/dist/scripts/32.chunk.js +0 -1239
- package/dist/scripts/32.chunk.js.map +0 -1
- package/dist/scripts/33.chunk.js +0 -971
- package/dist/scripts/33.chunk.js.map +0 -1
- package/dist/scripts/34-eb9f6709b3.chunk.js +0 -1
- package/dist/scripts/34.chunk.js +0 -990
- package/dist/scripts/34.chunk.js.map +0 -1
- package/dist/scripts/35-1ff49137e7.chunk.js +0 -1
- package/dist/scripts/35.chunk.js +0 -518
- package/dist/scripts/35.chunk.js.map +0 -1
- package/dist/scripts/36-9e89154ca2.chunk.js +0 -1
- package/dist/scripts/36.chunk.js +0 -335
- package/dist/scripts/36.chunk.js.map +0 -1
- package/dist/scripts/37.chunk.js +0 -236
- package/dist/scripts/37.chunk.js.map +0 -1
- package/dist/scripts/38.chunk.js +0 -315
- package/dist/scripts/38.chunk.js.map +0 -1
- package/dist/scripts/39.chunk.js +0 -107
- package/dist/scripts/39.chunk.js.map +0 -1
- package/dist/scripts/4.chunk.js +0 -335
- package/dist/scripts/4.chunk.js.map +0 -1
- package/dist/scripts/40.chunk.js +0 -2493
- package/dist/scripts/40.chunk.js.map +0 -1
- package/dist/scripts/41.chunk.js +0 -1782
- package/dist/scripts/41.chunk.js.map +0 -1
- package/dist/scripts/42-9f757567db.chunk.js +0 -1
- package/dist/scripts/42.chunk.js +0 -2327
- package/dist/scripts/42.chunk.js.map +0 -1
- package/dist/scripts/43.chunk.js +0 -1206
- package/dist/scripts/43.chunk.js.map +0 -1
- package/dist/scripts/44.chunk.js +0 -2245
- package/dist/scripts/44.chunk.js.map +0 -1
- package/dist/scripts/45.chunk.js +0 -1065
- package/dist/scripts/45.chunk.js.map +0 -1
- package/dist/scripts/46.chunk.js +0 -655
- package/dist/scripts/46.chunk.js.map +0 -1
- package/dist/scripts/47.chunk.js +0 -736
- package/dist/scripts/47.chunk.js.map +0 -1
- package/dist/scripts/48.chunk.js +0 -994
- package/dist/scripts/48.chunk.js.map +0 -1
- package/dist/scripts/49-8e3e782ffb.chunk.js +0 -1
- package/dist/scripts/49.chunk.js +0 -761
- package/dist/scripts/49.chunk.js.map +0 -1
- package/dist/scripts/5-b236603e85.chunk.js +0 -1
- package/dist/scripts/5.chunk.js +0 -15
- package/dist/scripts/5.chunk.js.map +0 -1
- package/dist/scripts/50.chunk.js +0 -530
- package/dist/scripts/50.chunk.js.map +0 -1
- package/dist/scripts/51.chunk.js +0 -932
- package/dist/scripts/51.chunk.js.map +0 -1
- package/dist/scripts/52.chunk.js +0 -408
- package/dist/scripts/52.chunk.js.map +0 -1
- package/dist/scripts/53.chunk.js +0 -756
- package/dist/scripts/53.chunk.js.map +0 -1
- package/dist/scripts/54.chunk.js +0 -681
- package/dist/scripts/54.chunk.js.map +0 -1
- package/dist/scripts/55.chunk.js +0 -645
- package/dist/scripts/55.chunk.js.map +0 -1
- package/dist/scripts/56.chunk.js +0 -346
- package/dist/scripts/56.chunk.js.map +0 -1
- package/dist/scripts/57.chunk.js +0 -422
- package/dist/scripts/57.chunk.js.map +0 -1
- package/dist/scripts/58.chunk.js +0 -437
- package/dist/scripts/58.chunk.js.map +0 -1
- package/dist/scripts/59.chunk.js +0 -342
- package/dist/scripts/59.chunk.js.map +0 -1
- package/dist/scripts/6-6fb543aa78.chunk.js +0 -1
- package/dist/scripts/6.chunk.js +0 -484
- package/dist/scripts/6.chunk.js.map +0 -1
- package/dist/scripts/60.chunk.js +0 -254
- package/dist/scripts/60.chunk.js.map +0 -1
- package/dist/scripts/61.chunk.js +0 -408
- package/dist/scripts/61.chunk.js.map +0 -1
- package/dist/scripts/62.chunk.js +0 -142
- package/dist/scripts/62.chunk.js.map +0 -1
- package/dist/scripts/63.chunk.js +0 -147
- package/dist/scripts/63.chunk.js.map +0 -1
- package/dist/scripts/64.chunk.js +0 -439
- package/dist/scripts/64.chunk.js.map +0 -1
- package/dist/scripts/65.chunk.js +0 -582
- package/dist/scripts/65.chunk.js.map +0 -1
- package/dist/scripts/66.chunk.js +0 -442
- package/dist/scripts/66.chunk.js.map +0 -1
- package/dist/scripts/67.chunk.js +0 -295
- package/dist/scripts/67.chunk.js.map +0 -1
- package/dist/scripts/68.chunk.js +0 -165
- package/dist/scripts/68.chunk.js.map +0 -1
- package/dist/scripts/69.chunk.js +0 -248
- package/dist/scripts/69.chunk.js.map +0 -1
- package/dist/scripts/7.chunk.js +0 -309
- package/dist/scripts/7.chunk.js.map +0 -1
- package/dist/scripts/70.chunk.js +0 -207
- package/dist/scripts/70.chunk.js.map +0 -1
- package/dist/scripts/71.chunk.js +0 -237
- package/dist/scripts/71.chunk.js.map +0 -1
- package/dist/scripts/72.chunk.js +0 -331
- package/dist/scripts/72.chunk.js.map +0 -1
- package/dist/scripts/73.chunk.js +0 -404
- package/dist/scripts/73.chunk.js.map +0 -1
- package/dist/scripts/74.chunk.js +0 -301
- package/dist/scripts/74.chunk.js.map +0 -1
- package/dist/scripts/75.chunk.js +0 -231
- package/dist/scripts/75.chunk.js.map +0 -1
- package/dist/scripts/76.chunk.js +0 -157
- package/dist/scripts/76.chunk.js.map +0 -1
- package/dist/scripts/77.chunk.js +0 -307
- package/dist/scripts/77.chunk.js.map +0 -1
- package/dist/scripts/78.chunk.js +0 -249
- package/dist/scripts/78.chunk.js.map +0 -1
- package/dist/scripts/79.chunk.js +0 -282
- package/dist/scripts/79.chunk.js.map +0 -1
- package/dist/scripts/8.chunk.js +0 -307
- package/dist/scripts/8.chunk.js.map +0 -1
- package/dist/scripts/80.chunk.js +0 -308
- package/dist/scripts/80.chunk.js.map +0 -1
- package/dist/scripts/81.chunk.js +0 -366
- package/dist/scripts/81.chunk.js.map +0 -1
- package/dist/scripts/82.chunk.js +0 -314
- package/dist/scripts/82.chunk.js.map +0 -1
- package/dist/scripts/83.chunk.js +0 -328
- package/dist/scripts/83.chunk.js.map +0 -1
- package/dist/scripts/84.chunk.js +0 -313
- package/dist/scripts/84.chunk.js.map +0 -1
- package/dist/scripts/85.chunk.js +0 -291
- package/dist/scripts/85.chunk.js.map +0 -1
- package/dist/scripts/86.chunk.js +0 -119
- package/dist/scripts/86.chunk.js.map +0 -1
- package/dist/scripts/87.chunk.js +0 -219
- package/dist/scripts/87.chunk.js.map +0 -1
- package/dist/scripts/88.chunk.js +0 -194
- package/dist/scripts/88.chunk.js.map +0 -1
- package/dist/scripts/89.chunk.js +0 -522
- package/dist/scripts/89.chunk.js.map +0 -1
- package/dist/scripts/9-b8f9ea66c4.chunk.js +0 -1
- package/dist/scripts/9.chunk.js +0 -222
- package/dist/scripts/9.chunk.js.map +0 -1
- package/dist/scripts/90.chunk.js +0 -337
- package/dist/scripts/90.chunk.js.map +0 -1
- package/dist/scripts/91.chunk.js +0 -131
- package/dist/scripts/91.chunk.js.map +0 -1
- package/dist/scripts/92.chunk.js +0 -266
- package/dist/scripts/92.chunk.js.map +0 -1
- package/dist/scripts/bundle-f28b86bf5b.min.js +0 -8
- package/dist/scripts/bundle.js +0 -67206
- package/dist/scripts/bundle.js.map +0 -1
- package/dist/scripts/polyfills-1d2233ebcc.min.js +0 -1
- package/dist/scripts/polyfills.js +0 -14866
- package/dist/scripts/polyfills.js.map +0 -1
package/dist/scripts/27.chunk.js
DELETED
|
@@ -1,3630 +0,0 @@
|
|
|
1
|
-
(window["webpackJsonp_clickview_library_editor"] = window["webpackJsonp_clickview_library_editor"] || []).push([[27],{
|
|
2
|
-
|
|
3
|
-
/***/ "../../../node_modules/cropperjs/dist/cropper.js":
|
|
4
|
-
/*!*******************************************************************************!*\
|
|
5
|
-
!*** C:/ClickView/front-end/clickview/node_modules/cropperjs/dist/cropper.js ***!
|
|
6
|
-
\*******************************************************************************/
|
|
7
|
-
/*! no static exports found */
|
|
8
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
9
|
-
|
|
10
|
-
/*!
|
|
11
|
-
* Cropper.js v1.5.6
|
|
12
|
-
* https://fengyuanchen.github.io/cropperjs
|
|
13
|
-
*
|
|
14
|
-
* Copyright 2015-present Chen Fengyuan
|
|
15
|
-
* Released under the MIT license
|
|
16
|
-
*
|
|
17
|
-
* Date: 2019-10-04T04:33:48.372Z
|
|
18
|
-
*/
|
|
19
|
-
|
|
20
|
-
(function (global, factory) {
|
|
21
|
-
true ? module.exports = factory() :
|
|
22
|
-
undefined;
|
|
23
|
-
}(this, function () { 'use strict';
|
|
24
|
-
|
|
25
|
-
function _typeof(obj) {
|
|
26
|
-
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
27
|
-
_typeof = function (obj) {
|
|
28
|
-
return typeof obj;
|
|
29
|
-
};
|
|
30
|
-
} else {
|
|
31
|
-
_typeof = function (obj) {
|
|
32
|
-
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
return _typeof(obj);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
function _classCallCheck(instance, Constructor) {
|
|
40
|
-
if (!(instance instanceof Constructor)) {
|
|
41
|
-
throw new TypeError("Cannot call a class as a function");
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
function _defineProperties(target, props) {
|
|
46
|
-
for (var i = 0; i < props.length; i++) {
|
|
47
|
-
var descriptor = props[i];
|
|
48
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
49
|
-
descriptor.configurable = true;
|
|
50
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
51
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
function _createClass(Constructor, protoProps, staticProps) {
|
|
56
|
-
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
57
|
-
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
58
|
-
return Constructor;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
function _defineProperty(obj, key, value) {
|
|
62
|
-
if (key in obj) {
|
|
63
|
-
Object.defineProperty(obj, key, {
|
|
64
|
-
value: value,
|
|
65
|
-
enumerable: true,
|
|
66
|
-
configurable: true,
|
|
67
|
-
writable: true
|
|
68
|
-
});
|
|
69
|
-
} else {
|
|
70
|
-
obj[key] = value;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
return obj;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
function ownKeys(object, enumerableOnly) {
|
|
77
|
-
var keys = Object.keys(object);
|
|
78
|
-
|
|
79
|
-
if (Object.getOwnPropertySymbols) {
|
|
80
|
-
var symbols = Object.getOwnPropertySymbols(object);
|
|
81
|
-
if (enumerableOnly) symbols = symbols.filter(function (sym) {
|
|
82
|
-
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
83
|
-
});
|
|
84
|
-
keys.push.apply(keys, symbols);
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
return keys;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
function _objectSpread2(target) {
|
|
91
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
92
|
-
var source = arguments[i] != null ? arguments[i] : {};
|
|
93
|
-
|
|
94
|
-
if (i % 2) {
|
|
95
|
-
ownKeys(source, true).forEach(function (key) {
|
|
96
|
-
_defineProperty(target, key, source[key]);
|
|
97
|
-
});
|
|
98
|
-
} else if (Object.getOwnPropertyDescriptors) {
|
|
99
|
-
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
100
|
-
} else {
|
|
101
|
-
ownKeys(source).forEach(function (key) {
|
|
102
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
103
|
-
});
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
return target;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
function _toConsumableArray(arr) {
|
|
111
|
-
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread();
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
function _arrayWithoutHoles(arr) {
|
|
115
|
-
if (Array.isArray(arr)) {
|
|
116
|
-
for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];
|
|
117
|
-
|
|
118
|
-
return arr2;
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
function _iterableToArray(iter) {
|
|
123
|
-
if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter);
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
function _nonIterableSpread() {
|
|
127
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance");
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
var IS_BROWSER = typeof window !== 'undefined' && typeof window.document !== 'undefined';
|
|
131
|
-
var WINDOW = IS_BROWSER ? window : {};
|
|
132
|
-
var IS_TOUCH_DEVICE = IS_BROWSER ? 'ontouchstart' in WINDOW.document.documentElement : false;
|
|
133
|
-
var HAS_POINTER_EVENT = IS_BROWSER ? 'PointerEvent' in WINDOW : false;
|
|
134
|
-
var NAMESPACE = 'cropper'; // Actions
|
|
135
|
-
|
|
136
|
-
var ACTION_ALL = 'all';
|
|
137
|
-
var ACTION_CROP = 'crop';
|
|
138
|
-
var ACTION_MOVE = 'move';
|
|
139
|
-
var ACTION_ZOOM = 'zoom';
|
|
140
|
-
var ACTION_EAST = 'e';
|
|
141
|
-
var ACTION_WEST = 'w';
|
|
142
|
-
var ACTION_SOUTH = 's';
|
|
143
|
-
var ACTION_NORTH = 'n';
|
|
144
|
-
var ACTION_NORTH_EAST = 'ne';
|
|
145
|
-
var ACTION_NORTH_WEST = 'nw';
|
|
146
|
-
var ACTION_SOUTH_EAST = 'se';
|
|
147
|
-
var ACTION_SOUTH_WEST = 'sw'; // Classes
|
|
148
|
-
|
|
149
|
-
var CLASS_CROP = "".concat(NAMESPACE, "-crop");
|
|
150
|
-
var CLASS_DISABLED = "".concat(NAMESPACE, "-disabled");
|
|
151
|
-
var CLASS_HIDDEN = "".concat(NAMESPACE, "-hidden");
|
|
152
|
-
var CLASS_HIDE = "".concat(NAMESPACE, "-hide");
|
|
153
|
-
var CLASS_INVISIBLE = "".concat(NAMESPACE, "-invisible");
|
|
154
|
-
var CLASS_MODAL = "".concat(NAMESPACE, "-modal");
|
|
155
|
-
var CLASS_MOVE = "".concat(NAMESPACE, "-move"); // Data keys
|
|
156
|
-
|
|
157
|
-
var DATA_ACTION = "".concat(NAMESPACE, "Action");
|
|
158
|
-
var DATA_PREVIEW = "".concat(NAMESPACE, "Preview"); // Drag modes
|
|
159
|
-
|
|
160
|
-
var DRAG_MODE_CROP = 'crop';
|
|
161
|
-
var DRAG_MODE_MOVE = 'move';
|
|
162
|
-
var DRAG_MODE_NONE = 'none'; // Events
|
|
163
|
-
|
|
164
|
-
var EVENT_CROP = 'crop';
|
|
165
|
-
var EVENT_CROP_END = 'cropend';
|
|
166
|
-
var EVENT_CROP_MOVE = 'cropmove';
|
|
167
|
-
var EVENT_CROP_START = 'cropstart';
|
|
168
|
-
var EVENT_DBLCLICK = 'dblclick';
|
|
169
|
-
var EVENT_TOUCH_START = IS_TOUCH_DEVICE ? 'touchstart' : 'mousedown';
|
|
170
|
-
var EVENT_TOUCH_MOVE = IS_TOUCH_DEVICE ? 'touchmove' : 'mousemove';
|
|
171
|
-
var EVENT_TOUCH_END = IS_TOUCH_DEVICE ? 'touchend touchcancel' : 'mouseup';
|
|
172
|
-
var EVENT_POINTER_DOWN = HAS_POINTER_EVENT ? 'pointerdown' : EVENT_TOUCH_START;
|
|
173
|
-
var EVENT_POINTER_MOVE = HAS_POINTER_EVENT ? 'pointermove' : EVENT_TOUCH_MOVE;
|
|
174
|
-
var EVENT_POINTER_UP = HAS_POINTER_EVENT ? 'pointerup pointercancel' : EVENT_TOUCH_END;
|
|
175
|
-
var EVENT_READY = 'ready';
|
|
176
|
-
var EVENT_RESIZE = 'resize';
|
|
177
|
-
var EVENT_WHEEL = 'wheel';
|
|
178
|
-
var EVENT_ZOOM = 'zoom'; // Mime types
|
|
179
|
-
|
|
180
|
-
var MIME_TYPE_JPEG = 'image/jpeg'; // RegExps
|
|
181
|
-
|
|
182
|
-
var REGEXP_ACTIONS = /^e|w|s|n|se|sw|ne|nw|all|crop|move|zoom$/;
|
|
183
|
-
var REGEXP_DATA_URL = /^data:/;
|
|
184
|
-
var REGEXP_DATA_URL_JPEG = /^data:image\/jpeg;base64,/;
|
|
185
|
-
var REGEXP_TAG_NAME = /^img|canvas$/i; // Misc
|
|
186
|
-
// Inspired by the default width and height of a canvas element.
|
|
187
|
-
|
|
188
|
-
var MIN_CONTAINER_WIDTH = 200;
|
|
189
|
-
var MIN_CONTAINER_HEIGHT = 100;
|
|
190
|
-
|
|
191
|
-
var DEFAULTS = {
|
|
192
|
-
// Define the view mode of the cropper
|
|
193
|
-
viewMode: 0,
|
|
194
|
-
// 0, 1, 2, 3
|
|
195
|
-
// Define the dragging mode of the cropper
|
|
196
|
-
dragMode: DRAG_MODE_CROP,
|
|
197
|
-
// 'crop', 'move' or 'none'
|
|
198
|
-
// Define the initial aspect ratio of the crop box
|
|
199
|
-
initialAspectRatio: NaN,
|
|
200
|
-
// Define the aspect ratio of the crop box
|
|
201
|
-
aspectRatio: NaN,
|
|
202
|
-
// An object with the previous cropping result data
|
|
203
|
-
data: null,
|
|
204
|
-
// A selector for adding extra containers to preview
|
|
205
|
-
preview: '',
|
|
206
|
-
// Re-render the cropper when resize the window
|
|
207
|
-
responsive: true,
|
|
208
|
-
// Restore the cropped area after resize the window
|
|
209
|
-
restore: true,
|
|
210
|
-
// Check if the current image is a cross-origin image
|
|
211
|
-
checkCrossOrigin: true,
|
|
212
|
-
// Check the current image's Exif Orientation information
|
|
213
|
-
checkOrientation: true,
|
|
214
|
-
// Show the black modal
|
|
215
|
-
modal: true,
|
|
216
|
-
// Show the dashed lines for guiding
|
|
217
|
-
guides: true,
|
|
218
|
-
// Show the center indicator for guiding
|
|
219
|
-
center: true,
|
|
220
|
-
// Show the white modal to highlight the crop box
|
|
221
|
-
highlight: true,
|
|
222
|
-
// Show the grid background
|
|
223
|
-
background: true,
|
|
224
|
-
// Enable to crop the image automatically when initialize
|
|
225
|
-
autoCrop: true,
|
|
226
|
-
// Define the percentage of automatic cropping area when initializes
|
|
227
|
-
autoCropArea: 0.8,
|
|
228
|
-
// Enable to move the image
|
|
229
|
-
movable: true,
|
|
230
|
-
// Enable to rotate the image
|
|
231
|
-
rotatable: true,
|
|
232
|
-
// Enable to scale the image
|
|
233
|
-
scalable: true,
|
|
234
|
-
// Enable to zoom the image
|
|
235
|
-
zoomable: true,
|
|
236
|
-
// Enable to zoom the image by dragging touch
|
|
237
|
-
zoomOnTouch: true,
|
|
238
|
-
// Enable to zoom the image by wheeling mouse
|
|
239
|
-
zoomOnWheel: true,
|
|
240
|
-
// Define zoom ratio when zoom the image by wheeling mouse
|
|
241
|
-
wheelZoomRatio: 0.1,
|
|
242
|
-
// Enable to move the crop box
|
|
243
|
-
cropBoxMovable: true,
|
|
244
|
-
// Enable to resize the crop box
|
|
245
|
-
cropBoxResizable: true,
|
|
246
|
-
// Toggle drag mode between "crop" and "move" when click twice on the cropper
|
|
247
|
-
toggleDragModeOnDblclick: true,
|
|
248
|
-
// Size limitation
|
|
249
|
-
minCanvasWidth: 0,
|
|
250
|
-
minCanvasHeight: 0,
|
|
251
|
-
minCropBoxWidth: 0,
|
|
252
|
-
minCropBoxHeight: 0,
|
|
253
|
-
minContainerWidth: 200,
|
|
254
|
-
minContainerHeight: 100,
|
|
255
|
-
// Shortcuts of events
|
|
256
|
-
ready: null,
|
|
257
|
-
cropstart: null,
|
|
258
|
-
cropmove: null,
|
|
259
|
-
cropend: null,
|
|
260
|
-
crop: null,
|
|
261
|
-
zoom: null
|
|
262
|
-
};
|
|
263
|
-
|
|
264
|
-
var TEMPLATE = '<div class="cropper-container" touch-action="none">' + '<div class="cropper-wrap-box">' + '<div class="cropper-canvas"></div>' + '</div>' + '<div class="cropper-drag-box"></div>' + '<div class="cropper-crop-box">' + '<span class="cropper-view-box"></span>' + '<span class="cropper-dashed dashed-h"></span>' + '<span class="cropper-dashed dashed-v"></span>' + '<span class="cropper-center"></span>' + '<span class="cropper-face"></span>' + '<span class="cropper-line line-e" data-cropper-action="e"></span>' + '<span class="cropper-line line-n" data-cropper-action="n"></span>' + '<span class="cropper-line line-w" data-cropper-action="w"></span>' + '<span class="cropper-line line-s" data-cropper-action="s"></span>' + '<span class="cropper-point point-e" data-cropper-action="e"></span>' + '<span class="cropper-point point-n" data-cropper-action="n"></span>' + '<span class="cropper-point point-w" data-cropper-action="w"></span>' + '<span class="cropper-point point-s" data-cropper-action="s"></span>' + '<span class="cropper-point point-ne" data-cropper-action="ne"></span>' + '<span class="cropper-point point-nw" data-cropper-action="nw"></span>' + '<span class="cropper-point point-sw" data-cropper-action="sw"></span>' + '<span class="cropper-point point-se" data-cropper-action="se"></span>' + '</div>' + '</div>';
|
|
265
|
-
|
|
266
|
-
/**
|
|
267
|
-
* Check if the given value is not a number.
|
|
268
|
-
*/
|
|
269
|
-
|
|
270
|
-
var isNaN = Number.isNaN || WINDOW.isNaN;
|
|
271
|
-
/**
|
|
272
|
-
* Check if the given value is a number.
|
|
273
|
-
* @param {*} value - The value to check.
|
|
274
|
-
* @returns {boolean} Returns `true` if the given value is a number, else `false`.
|
|
275
|
-
*/
|
|
276
|
-
|
|
277
|
-
function isNumber(value) {
|
|
278
|
-
return typeof value === 'number' && !isNaN(value);
|
|
279
|
-
}
|
|
280
|
-
/**
|
|
281
|
-
* Check if the given value is a positive number.
|
|
282
|
-
* @param {*} value - The value to check.
|
|
283
|
-
* @returns {boolean} Returns `true` if the given value is a positive number, else `false`.
|
|
284
|
-
*/
|
|
285
|
-
|
|
286
|
-
var isPositiveNumber = function isPositiveNumber(value) {
|
|
287
|
-
return value > 0 && value < Infinity;
|
|
288
|
-
};
|
|
289
|
-
/**
|
|
290
|
-
* Check if the given value is undefined.
|
|
291
|
-
* @param {*} value - The value to check.
|
|
292
|
-
* @returns {boolean} Returns `true` if the given value is undefined, else `false`.
|
|
293
|
-
*/
|
|
294
|
-
|
|
295
|
-
function isUndefined(value) {
|
|
296
|
-
return typeof value === 'undefined';
|
|
297
|
-
}
|
|
298
|
-
/**
|
|
299
|
-
* Check if the given value is an object.
|
|
300
|
-
* @param {*} value - The value to check.
|
|
301
|
-
* @returns {boolean} Returns `true` if the given value is an object, else `false`.
|
|
302
|
-
*/
|
|
303
|
-
|
|
304
|
-
function isObject(value) {
|
|
305
|
-
return _typeof(value) === 'object' && value !== null;
|
|
306
|
-
}
|
|
307
|
-
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
308
|
-
/**
|
|
309
|
-
* Check if the given value is a plain object.
|
|
310
|
-
* @param {*} value - The value to check.
|
|
311
|
-
* @returns {boolean} Returns `true` if the given value is a plain object, else `false`.
|
|
312
|
-
*/
|
|
313
|
-
|
|
314
|
-
function isPlainObject(value) {
|
|
315
|
-
if (!isObject(value)) {
|
|
316
|
-
return false;
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
try {
|
|
320
|
-
var _constructor = value.constructor;
|
|
321
|
-
var prototype = _constructor.prototype;
|
|
322
|
-
return _constructor && prototype && hasOwnProperty.call(prototype, 'isPrototypeOf');
|
|
323
|
-
} catch (error) {
|
|
324
|
-
return false;
|
|
325
|
-
}
|
|
326
|
-
}
|
|
327
|
-
/**
|
|
328
|
-
* Check if the given value is a function.
|
|
329
|
-
* @param {*} value - The value to check.
|
|
330
|
-
* @returns {boolean} Returns `true` if the given value is a function, else `false`.
|
|
331
|
-
*/
|
|
332
|
-
|
|
333
|
-
function isFunction(value) {
|
|
334
|
-
return typeof value === 'function';
|
|
335
|
-
}
|
|
336
|
-
var slice = Array.prototype.slice;
|
|
337
|
-
/**
|
|
338
|
-
* Convert array-like or iterable object to an array.
|
|
339
|
-
* @param {*} value - The value to convert.
|
|
340
|
-
* @returns {Array} Returns a new array.
|
|
341
|
-
*/
|
|
342
|
-
|
|
343
|
-
function toArray(value) {
|
|
344
|
-
return Array.from ? Array.from(value) : slice.call(value);
|
|
345
|
-
}
|
|
346
|
-
/**
|
|
347
|
-
* Iterate the given data.
|
|
348
|
-
* @param {*} data - The data to iterate.
|
|
349
|
-
* @param {Function} callback - The process function for each element.
|
|
350
|
-
* @returns {*} The original data.
|
|
351
|
-
*/
|
|
352
|
-
|
|
353
|
-
function forEach(data, callback) {
|
|
354
|
-
if (data && isFunction(callback)) {
|
|
355
|
-
if (Array.isArray(data) || isNumber(data.length)
|
|
356
|
-
/* array-like */
|
|
357
|
-
) {
|
|
358
|
-
toArray(data).forEach(function (value, key) {
|
|
359
|
-
callback.call(data, value, key, data);
|
|
360
|
-
});
|
|
361
|
-
} else if (isObject(data)) {
|
|
362
|
-
Object.keys(data).forEach(function (key) {
|
|
363
|
-
callback.call(data, data[key], key, data);
|
|
364
|
-
});
|
|
365
|
-
}
|
|
366
|
-
}
|
|
367
|
-
|
|
368
|
-
return data;
|
|
369
|
-
}
|
|
370
|
-
/**
|
|
371
|
-
* Extend the given object.
|
|
372
|
-
* @param {*} target - The target object to extend.
|
|
373
|
-
* @param {*} args - The rest objects for merging to the target object.
|
|
374
|
-
* @returns {Object} The extended object.
|
|
375
|
-
*/
|
|
376
|
-
|
|
377
|
-
var assign = Object.assign || function assign(target) {
|
|
378
|
-
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
379
|
-
args[_key - 1] = arguments[_key];
|
|
380
|
-
}
|
|
381
|
-
|
|
382
|
-
if (isObject(target) && args.length > 0) {
|
|
383
|
-
args.forEach(function (arg) {
|
|
384
|
-
if (isObject(arg)) {
|
|
385
|
-
Object.keys(arg).forEach(function (key) {
|
|
386
|
-
target[key] = arg[key];
|
|
387
|
-
});
|
|
388
|
-
}
|
|
389
|
-
});
|
|
390
|
-
}
|
|
391
|
-
|
|
392
|
-
return target;
|
|
393
|
-
};
|
|
394
|
-
var REGEXP_DECIMALS = /\.\d*(?:0|9){12}\d*$/;
|
|
395
|
-
/**
|
|
396
|
-
* Normalize decimal number.
|
|
397
|
-
* Check out {@link http://0.30000000000000004.com/}
|
|
398
|
-
* @param {number} value - The value to normalize.
|
|
399
|
-
* @param {number} [times=100000000000] - The times for normalizing.
|
|
400
|
-
* @returns {number} Returns the normalized number.
|
|
401
|
-
*/
|
|
402
|
-
|
|
403
|
-
function normalizeDecimalNumber(value) {
|
|
404
|
-
var times = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100000000000;
|
|
405
|
-
return REGEXP_DECIMALS.test(value) ? Math.round(value * times) / times : value;
|
|
406
|
-
}
|
|
407
|
-
var REGEXP_SUFFIX = /^width|height|left|top|marginLeft|marginTop$/;
|
|
408
|
-
/**
|
|
409
|
-
* Apply styles to the given element.
|
|
410
|
-
* @param {Element} element - The target element.
|
|
411
|
-
* @param {Object} styles - The styles for applying.
|
|
412
|
-
*/
|
|
413
|
-
|
|
414
|
-
function setStyle(element, styles) {
|
|
415
|
-
var style = element.style;
|
|
416
|
-
forEach(styles, function (value, property) {
|
|
417
|
-
if (REGEXP_SUFFIX.test(property) && isNumber(value)) {
|
|
418
|
-
value = "".concat(value, "px");
|
|
419
|
-
}
|
|
420
|
-
|
|
421
|
-
style[property] = value;
|
|
422
|
-
});
|
|
423
|
-
}
|
|
424
|
-
/**
|
|
425
|
-
* Check if the given element has a special class.
|
|
426
|
-
* @param {Element} element - The element to check.
|
|
427
|
-
* @param {string} value - The class to search.
|
|
428
|
-
* @returns {boolean} Returns `true` if the special class was found.
|
|
429
|
-
*/
|
|
430
|
-
|
|
431
|
-
function hasClass(element, value) {
|
|
432
|
-
return element.classList ? element.classList.contains(value) : element.className.indexOf(value) > -1;
|
|
433
|
-
}
|
|
434
|
-
/**
|
|
435
|
-
* Add classes to the given element.
|
|
436
|
-
* @param {Element} element - The target element.
|
|
437
|
-
* @param {string} value - The classes to be added.
|
|
438
|
-
*/
|
|
439
|
-
|
|
440
|
-
function addClass(element, value) {
|
|
441
|
-
if (!value) {
|
|
442
|
-
return;
|
|
443
|
-
}
|
|
444
|
-
|
|
445
|
-
if (isNumber(element.length)) {
|
|
446
|
-
forEach(element, function (elem) {
|
|
447
|
-
addClass(elem, value);
|
|
448
|
-
});
|
|
449
|
-
return;
|
|
450
|
-
}
|
|
451
|
-
|
|
452
|
-
if (element.classList) {
|
|
453
|
-
element.classList.add(value);
|
|
454
|
-
return;
|
|
455
|
-
}
|
|
456
|
-
|
|
457
|
-
var className = element.className.trim();
|
|
458
|
-
|
|
459
|
-
if (!className) {
|
|
460
|
-
element.className = value;
|
|
461
|
-
} else if (className.indexOf(value) < 0) {
|
|
462
|
-
element.className = "".concat(className, " ").concat(value);
|
|
463
|
-
}
|
|
464
|
-
}
|
|
465
|
-
/**
|
|
466
|
-
* Remove classes from the given element.
|
|
467
|
-
* @param {Element} element - The target element.
|
|
468
|
-
* @param {string} value - The classes to be removed.
|
|
469
|
-
*/
|
|
470
|
-
|
|
471
|
-
function removeClass(element, value) {
|
|
472
|
-
if (!value) {
|
|
473
|
-
return;
|
|
474
|
-
}
|
|
475
|
-
|
|
476
|
-
if (isNumber(element.length)) {
|
|
477
|
-
forEach(element, function (elem) {
|
|
478
|
-
removeClass(elem, value);
|
|
479
|
-
});
|
|
480
|
-
return;
|
|
481
|
-
}
|
|
482
|
-
|
|
483
|
-
if (element.classList) {
|
|
484
|
-
element.classList.remove(value);
|
|
485
|
-
return;
|
|
486
|
-
}
|
|
487
|
-
|
|
488
|
-
if (element.className.indexOf(value) >= 0) {
|
|
489
|
-
element.className = element.className.replace(value, '');
|
|
490
|
-
}
|
|
491
|
-
}
|
|
492
|
-
/**
|
|
493
|
-
* Add or remove classes from the given element.
|
|
494
|
-
* @param {Element} element - The target element.
|
|
495
|
-
* @param {string} value - The classes to be toggled.
|
|
496
|
-
* @param {boolean} added - Add only.
|
|
497
|
-
*/
|
|
498
|
-
|
|
499
|
-
function toggleClass(element, value, added) {
|
|
500
|
-
if (!value) {
|
|
501
|
-
return;
|
|
502
|
-
}
|
|
503
|
-
|
|
504
|
-
if (isNumber(element.length)) {
|
|
505
|
-
forEach(element, function (elem) {
|
|
506
|
-
toggleClass(elem, value, added);
|
|
507
|
-
});
|
|
508
|
-
return;
|
|
509
|
-
} // IE10-11 doesn't support the second parameter of `classList.toggle`
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
if (added) {
|
|
513
|
-
addClass(element, value);
|
|
514
|
-
} else {
|
|
515
|
-
removeClass(element, value);
|
|
516
|
-
}
|
|
517
|
-
}
|
|
518
|
-
var REGEXP_CAMEL_CASE = /([a-z\d])([A-Z])/g;
|
|
519
|
-
/**
|
|
520
|
-
* Transform the given string from camelCase to kebab-case
|
|
521
|
-
* @param {string} value - The value to transform.
|
|
522
|
-
* @returns {string} The transformed value.
|
|
523
|
-
*/
|
|
524
|
-
|
|
525
|
-
function toParamCase(value) {
|
|
526
|
-
return value.replace(REGEXP_CAMEL_CASE, '$1-$2').toLowerCase();
|
|
527
|
-
}
|
|
528
|
-
/**
|
|
529
|
-
* Get data from the given element.
|
|
530
|
-
* @param {Element} element - The target element.
|
|
531
|
-
* @param {string} name - The data key to get.
|
|
532
|
-
* @returns {string} The data value.
|
|
533
|
-
*/
|
|
534
|
-
|
|
535
|
-
function getData(element, name) {
|
|
536
|
-
if (isObject(element[name])) {
|
|
537
|
-
return element[name];
|
|
538
|
-
}
|
|
539
|
-
|
|
540
|
-
if (element.dataset) {
|
|
541
|
-
return element.dataset[name];
|
|
542
|
-
}
|
|
543
|
-
|
|
544
|
-
return element.getAttribute("data-".concat(toParamCase(name)));
|
|
545
|
-
}
|
|
546
|
-
/**
|
|
547
|
-
* Set data to the given element.
|
|
548
|
-
* @param {Element} element - The target element.
|
|
549
|
-
* @param {string} name - The data key to set.
|
|
550
|
-
* @param {string} data - The data value.
|
|
551
|
-
*/
|
|
552
|
-
|
|
553
|
-
function setData(element, name, data) {
|
|
554
|
-
if (isObject(data)) {
|
|
555
|
-
element[name] = data;
|
|
556
|
-
} else if (element.dataset) {
|
|
557
|
-
element.dataset[name] = data;
|
|
558
|
-
} else {
|
|
559
|
-
element.setAttribute("data-".concat(toParamCase(name)), data);
|
|
560
|
-
}
|
|
561
|
-
}
|
|
562
|
-
/**
|
|
563
|
-
* Remove data from the given element.
|
|
564
|
-
* @param {Element} element - The target element.
|
|
565
|
-
* @param {string} name - The data key to remove.
|
|
566
|
-
*/
|
|
567
|
-
|
|
568
|
-
function removeData(element, name) {
|
|
569
|
-
if (isObject(element[name])) {
|
|
570
|
-
try {
|
|
571
|
-
delete element[name];
|
|
572
|
-
} catch (error) {
|
|
573
|
-
element[name] = undefined;
|
|
574
|
-
}
|
|
575
|
-
} else if (element.dataset) {
|
|
576
|
-
// #128 Safari not allows to delete dataset property
|
|
577
|
-
try {
|
|
578
|
-
delete element.dataset[name];
|
|
579
|
-
} catch (error) {
|
|
580
|
-
element.dataset[name] = undefined;
|
|
581
|
-
}
|
|
582
|
-
} else {
|
|
583
|
-
element.removeAttribute("data-".concat(toParamCase(name)));
|
|
584
|
-
}
|
|
585
|
-
}
|
|
586
|
-
var REGEXP_SPACES = /\s\s*/;
|
|
587
|
-
|
|
588
|
-
var onceSupported = function () {
|
|
589
|
-
var supported = false;
|
|
590
|
-
|
|
591
|
-
if (IS_BROWSER) {
|
|
592
|
-
var once = false;
|
|
593
|
-
|
|
594
|
-
var listener = function listener() {};
|
|
595
|
-
|
|
596
|
-
var options = Object.defineProperty({}, 'once', {
|
|
597
|
-
get: function get() {
|
|
598
|
-
supported = true;
|
|
599
|
-
return once;
|
|
600
|
-
},
|
|
601
|
-
|
|
602
|
-
/**
|
|
603
|
-
* This setter can fix a `TypeError` in strict mode
|
|
604
|
-
* {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Getter_only}
|
|
605
|
-
* @param {boolean} value - The value to set
|
|
606
|
-
*/
|
|
607
|
-
set: function set(value) {
|
|
608
|
-
once = value;
|
|
609
|
-
}
|
|
610
|
-
});
|
|
611
|
-
WINDOW.addEventListener('test', listener, options);
|
|
612
|
-
WINDOW.removeEventListener('test', listener, options);
|
|
613
|
-
}
|
|
614
|
-
|
|
615
|
-
return supported;
|
|
616
|
-
}();
|
|
617
|
-
/**
|
|
618
|
-
* Remove event listener from the target element.
|
|
619
|
-
* @param {Element} element - The event target.
|
|
620
|
-
* @param {string} type - The event type(s).
|
|
621
|
-
* @param {Function} listener - The event listener.
|
|
622
|
-
* @param {Object} options - The event options.
|
|
623
|
-
*/
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
function removeListener(element, type, listener) {
|
|
627
|
-
var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
628
|
-
var handler = listener;
|
|
629
|
-
type.trim().split(REGEXP_SPACES).forEach(function (event) {
|
|
630
|
-
if (!onceSupported) {
|
|
631
|
-
var listeners = element.listeners;
|
|
632
|
-
|
|
633
|
-
if (listeners && listeners[event] && listeners[event][listener]) {
|
|
634
|
-
handler = listeners[event][listener];
|
|
635
|
-
delete listeners[event][listener];
|
|
636
|
-
|
|
637
|
-
if (Object.keys(listeners[event]).length === 0) {
|
|
638
|
-
delete listeners[event];
|
|
639
|
-
}
|
|
640
|
-
|
|
641
|
-
if (Object.keys(listeners).length === 0) {
|
|
642
|
-
delete element.listeners;
|
|
643
|
-
}
|
|
644
|
-
}
|
|
645
|
-
}
|
|
646
|
-
|
|
647
|
-
element.removeEventListener(event, handler, options);
|
|
648
|
-
});
|
|
649
|
-
}
|
|
650
|
-
/**
|
|
651
|
-
* Add event listener to the target element.
|
|
652
|
-
* @param {Element} element - The event target.
|
|
653
|
-
* @param {string} type - The event type(s).
|
|
654
|
-
* @param {Function} listener - The event listener.
|
|
655
|
-
* @param {Object} options - The event options.
|
|
656
|
-
*/
|
|
657
|
-
|
|
658
|
-
function addListener(element, type, listener) {
|
|
659
|
-
var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
660
|
-
var _handler = listener;
|
|
661
|
-
type.trim().split(REGEXP_SPACES).forEach(function (event) {
|
|
662
|
-
if (options.once && !onceSupported) {
|
|
663
|
-
var _element$listeners = element.listeners,
|
|
664
|
-
listeners = _element$listeners === void 0 ? {} : _element$listeners;
|
|
665
|
-
|
|
666
|
-
_handler = function handler() {
|
|
667
|
-
delete listeners[event][listener];
|
|
668
|
-
element.removeEventListener(event, _handler, options);
|
|
669
|
-
|
|
670
|
-
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
671
|
-
args[_key2] = arguments[_key2];
|
|
672
|
-
}
|
|
673
|
-
|
|
674
|
-
listener.apply(element, args);
|
|
675
|
-
};
|
|
676
|
-
|
|
677
|
-
if (!listeners[event]) {
|
|
678
|
-
listeners[event] = {};
|
|
679
|
-
}
|
|
680
|
-
|
|
681
|
-
if (listeners[event][listener]) {
|
|
682
|
-
element.removeEventListener(event, listeners[event][listener], options);
|
|
683
|
-
}
|
|
684
|
-
|
|
685
|
-
listeners[event][listener] = _handler;
|
|
686
|
-
element.listeners = listeners;
|
|
687
|
-
}
|
|
688
|
-
|
|
689
|
-
element.addEventListener(event, _handler, options);
|
|
690
|
-
});
|
|
691
|
-
}
|
|
692
|
-
/**
|
|
693
|
-
* Dispatch event on the target element.
|
|
694
|
-
* @param {Element} element - The event target.
|
|
695
|
-
* @param {string} type - The event type(s).
|
|
696
|
-
* @param {Object} data - The additional event data.
|
|
697
|
-
* @returns {boolean} Indicate if the event is default prevented or not.
|
|
698
|
-
*/
|
|
699
|
-
|
|
700
|
-
function dispatchEvent(element, type, data) {
|
|
701
|
-
var event; // Event and CustomEvent on IE9-11 are global objects, not constructors
|
|
702
|
-
|
|
703
|
-
if (isFunction(Event) && isFunction(CustomEvent)) {
|
|
704
|
-
event = new CustomEvent(type, {
|
|
705
|
-
detail: data,
|
|
706
|
-
bubbles: true,
|
|
707
|
-
cancelable: true
|
|
708
|
-
});
|
|
709
|
-
} else {
|
|
710
|
-
event = document.createEvent('CustomEvent');
|
|
711
|
-
event.initCustomEvent(type, true, true, data);
|
|
712
|
-
}
|
|
713
|
-
|
|
714
|
-
return element.dispatchEvent(event);
|
|
715
|
-
}
|
|
716
|
-
/**
|
|
717
|
-
* Get the offset base on the document.
|
|
718
|
-
* @param {Element} element - The target element.
|
|
719
|
-
* @returns {Object} The offset data.
|
|
720
|
-
*/
|
|
721
|
-
|
|
722
|
-
function getOffset(element) {
|
|
723
|
-
var box = element.getBoundingClientRect();
|
|
724
|
-
return {
|
|
725
|
-
left: box.left + (window.pageXOffset - document.documentElement.clientLeft),
|
|
726
|
-
top: box.top + (window.pageYOffset - document.documentElement.clientTop)
|
|
727
|
-
};
|
|
728
|
-
}
|
|
729
|
-
var location = WINDOW.location;
|
|
730
|
-
var REGEXP_ORIGINS = /^(\w+:)\/\/([^:/?#]*):?(\d*)/i;
|
|
731
|
-
/**
|
|
732
|
-
* Check if the given URL is a cross origin URL.
|
|
733
|
-
* @param {string} url - The target URL.
|
|
734
|
-
* @returns {boolean} Returns `true` if the given URL is a cross origin URL, else `false`.
|
|
735
|
-
*/
|
|
736
|
-
|
|
737
|
-
function isCrossOriginURL(url) {
|
|
738
|
-
var parts = url.match(REGEXP_ORIGINS);
|
|
739
|
-
return parts !== null && (parts[1] !== location.protocol || parts[2] !== location.hostname || parts[3] !== location.port);
|
|
740
|
-
}
|
|
741
|
-
/**
|
|
742
|
-
* Add timestamp to the given URL.
|
|
743
|
-
* @param {string} url - The target URL.
|
|
744
|
-
* @returns {string} The result URL.
|
|
745
|
-
*/
|
|
746
|
-
|
|
747
|
-
function addTimestamp(url) {
|
|
748
|
-
var timestamp = "timestamp=".concat(new Date().getTime());
|
|
749
|
-
return url + (url.indexOf('?') === -1 ? '?' : '&') + timestamp;
|
|
750
|
-
}
|
|
751
|
-
/**
|
|
752
|
-
* Get transforms base on the given object.
|
|
753
|
-
* @param {Object} obj - The target object.
|
|
754
|
-
* @returns {string} A string contains transform values.
|
|
755
|
-
*/
|
|
756
|
-
|
|
757
|
-
function getTransforms(_ref) {
|
|
758
|
-
var rotate = _ref.rotate,
|
|
759
|
-
scaleX = _ref.scaleX,
|
|
760
|
-
scaleY = _ref.scaleY,
|
|
761
|
-
translateX = _ref.translateX,
|
|
762
|
-
translateY = _ref.translateY;
|
|
763
|
-
var values = [];
|
|
764
|
-
|
|
765
|
-
if (isNumber(translateX) && translateX !== 0) {
|
|
766
|
-
values.push("translateX(".concat(translateX, "px)"));
|
|
767
|
-
}
|
|
768
|
-
|
|
769
|
-
if (isNumber(translateY) && translateY !== 0) {
|
|
770
|
-
values.push("translateY(".concat(translateY, "px)"));
|
|
771
|
-
} // Rotate should come first before scale to match orientation transform
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
if (isNumber(rotate) && rotate !== 0) {
|
|
775
|
-
values.push("rotate(".concat(rotate, "deg)"));
|
|
776
|
-
}
|
|
777
|
-
|
|
778
|
-
if (isNumber(scaleX) && scaleX !== 1) {
|
|
779
|
-
values.push("scaleX(".concat(scaleX, ")"));
|
|
780
|
-
}
|
|
781
|
-
|
|
782
|
-
if (isNumber(scaleY) && scaleY !== 1) {
|
|
783
|
-
values.push("scaleY(".concat(scaleY, ")"));
|
|
784
|
-
}
|
|
785
|
-
|
|
786
|
-
var transform = values.length ? values.join(' ') : 'none';
|
|
787
|
-
return {
|
|
788
|
-
WebkitTransform: transform,
|
|
789
|
-
msTransform: transform,
|
|
790
|
-
transform: transform
|
|
791
|
-
};
|
|
792
|
-
}
|
|
793
|
-
/**
|
|
794
|
-
* Get the max ratio of a group of pointers.
|
|
795
|
-
* @param {string} pointers - The target pointers.
|
|
796
|
-
* @returns {number} The result ratio.
|
|
797
|
-
*/
|
|
798
|
-
|
|
799
|
-
function getMaxZoomRatio(pointers) {
|
|
800
|
-
var pointers2 = _objectSpread2({}, pointers);
|
|
801
|
-
|
|
802
|
-
var ratios = [];
|
|
803
|
-
forEach(pointers, function (pointer, pointerId) {
|
|
804
|
-
delete pointers2[pointerId];
|
|
805
|
-
forEach(pointers2, function (pointer2) {
|
|
806
|
-
var x1 = Math.abs(pointer.startX - pointer2.startX);
|
|
807
|
-
var y1 = Math.abs(pointer.startY - pointer2.startY);
|
|
808
|
-
var x2 = Math.abs(pointer.endX - pointer2.endX);
|
|
809
|
-
var y2 = Math.abs(pointer.endY - pointer2.endY);
|
|
810
|
-
var z1 = Math.sqrt(x1 * x1 + y1 * y1);
|
|
811
|
-
var z2 = Math.sqrt(x2 * x2 + y2 * y2);
|
|
812
|
-
var ratio = (z2 - z1) / z1;
|
|
813
|
-
ratios.push(ratio);
|
|
814
|
-
});
|
|
815
|
-
});
|
|
816
|
-
ratios.sort(function (a, b) {
|
|
817
|
-
return Math.abs(a) < Math.abs(b);
|
|
818
|
-
});
|
|
819
|
-
return ratios[0];
|
|
820
|
-
}
|
|
821
|
-
/**
|
|
822
|
-
* Get a pointer from an event object.
|
|
823
|
-
* @param {Object} event - The target event object.
|
|
824
|
-
* @param {boolean} endOnly - Indicates if only returns the end point coordinate or not.
|
|
825
|
-
* @returns {Object} The result pointer contains start and/or end point coordinates.
|
|
826
|
-
*/
|
|
827
|
-
|
|
828
|
-
function getPointer(_ref2, endOnly) {
|
|
829
|
-
var pageX = _ref2.pageX,
|
|
830
|
-
pageY = _ref2.pageY;
|
|
831
|
-
var end = {
|
|
832
|
-
endX: pageX,
|
|
833
|
-
endY: pageY
|
|
834
|
-
};
|
|
835
|
-
return endOnly ? end : _objectSpread2({
|
|
836
|
-
startX: pageX,
|
|
837
|
-
startY: pageY
|
|
838
|
-
}, end);
|
|
839
|
-
}
|
|
840
|
-
/**
|
|
841
|
-
* Get the center point coordinate of a group of pointers.
|
|
842
|
-
* @param {Object} pointers - The target pointers.
|
|
843
|
-
* @returns {Object} The center point coordinate.
|
|
844
|
-
*/
|
|
845
|
-
|
|
846
|
-
function getPointersCenter(pointers) {
|
|
847
|
-
var pageX = 0;
|
|
848
|
-
var pageY = 0;
|
|
849
|
-
var count = 0;
|
|
850
|
-
forEach(pointers, function (_ref3) {
|
|
851
|
-
var startX = _ref3.startX,
|
|
852
|
-
startY = _ref3.startY;
|
|
853
|
-
pageX += startX;
|
|
854
|
-
pageY += startY;
|
|
855
|
-
count += 1;
|
|
856
|
-
});
|
|
857
|
-
pageX /= count;
|
|
858
|
-
pageY /= count;
|
|
859
|
-
return {
|
|
860
|
-
pageX: pageX,
|
|
861
|
-
pageY: pageY
|
|
862
|
-
};
|
|
863
|
-
}
|
|
864
|
-
/**
|
|
865
|
-
* Get the max sizes in a rectangle under the given aspect ratio.
|
|
866
|
-
* @param {Object} data - The original sizes.
|
|
867
|
-
* @param {string} [type='contain'] - The adjust type.
|
|
868
|
-
* @returns {Object} The result sizes.
|
|
869
|
-
*/
|
|
870
|
-
|
|
871
|
-
function getAdjustedSizes(_ref4) // or 'cover'
|
|
872
|
-
{
|
|
873
|
-
var aspectRatio = _ref4.aspectRatio,
|
|
874
|
-
height = _ref4.height,
|
|
875
|
-
width = _ref4.width;
|
|
876
|
-
var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'contain';
|
|
877
|
-
var isValidWidth = isPositiveNumber(width);
|
|
878
|
-
var isValidHeight = isPositiveNumber(height);
|
|
879
|
-
|
|
880
|
-
if (isValidWidth && isValidHeight) {
|
|
881
|
-
var adjustedWidth = height * aspectRatio;
|
|
882
|
-
|
|
883
|
-
if (type === 'contain' && adjustedWidth > width || type === 'cover' && adjustedWidth < width) {
|
|
884
|
-
height = width / aspectRatio;
|
|
885
|
-
} else {
|
|
886
|
-
width = height * aspectRatio;
|
|
887
|
-
}
|
|
888
|
-
} else if (isValidWidth) {
|
|
889
|
-
height = width / aspectRatio;
|
|
890
|
-
} else if (isValidHeight) {
|
|
891
|
-
width = height * aspectRatio;
|
|
892
|
-
}
|
|
893
|
-
|
|
894
|
-
return {
|
|
895
|
-
width: width,
|
|
896
|
-
height: height
|
|
897
|
-
};
|
|
898
|
-
}
|
|
899
|
-
/**
|
|
900
|
-
* Get the new sizes of a rectangle after rotated.
|
|
901
|
-
* @param {Object} data - The original sizes.
|
|
902
|
-
* @returns {Object} The result sizes.
|
|
903
|
-
*/
|
|
904
|
-
|
|
905
|
-
function getRotatedSizes(_ref5) {
|
|
906
|
-
var width = _ref5.width,
|
|
907
|
-
height = _ref5.height,
|
|
908
|
-
degree = _ref5.degree;
|
|
909
|
-
degree = Math.abs(degree) % 180;
|
|
910
|
-
|
|
911
|
-
if (degree === 90) {
|
|
912
|
-
return {
|
|
913
|
-
width: height,
|
|
914
|
-
height: width
|
|
915
|
-
};
|
|
916
|
-
}
|
|
917
|
-
|
|
918
|
-
var arc = degree % 90 * Math.PI / 180;
|
|
919
|
-
var sinArc = Math.sin(arc);
|
|
920
|
-
var cosArc = Math.cos(arc);
|
|
921
|
-
var newWidth = width * cosArc + height * sinArc;
|
|
922
|
-
var newHeight = width * sinArc + height * cosArc;
|
|
923
|
-
return degree > 90 ? {
|
|
924
|
-
width: newHeight,
|
|
925
|
-
height: newWidth
|
|
926
|
-
} : {
|
|
927
|
-
width: newWidth,
|
|
928
|
-
height: newHeight
|
|
929
|
-
};
|
|
930
|
-
}
|
|
931
|
-
/**
|
|
932
|
-
* Get a canvas which drew the given image.
|
|
933
|
-
* @param {HTMLImageElement} image - The image for drawing.
|
|
934
|
-
* @param {Object} imageData - The image data.
|
|
935
|
-
* @param {Object} canvasData - The canvas data.
|
|
936
|
-
* @param {Object} options - The options.
|
|
937
|
-
* @returns {HTMLCanvasElement} The result canvas.
|
|
938
|
-
*/
|
|
939
|
-
|
|
940
|
-
function getSourceCanvas(image, _ref6, _ref7, _ref8) {
|
|
941
|
-
var imageAspectRatio = _ref6.aspectRatio,
|
|
942
|
-
imageNaturalWidth = _ref6.naturalWidth,
|
|
943
|
-
imageNaturalHeight = _ref6.naturalHeight,
|
|
944
|
-
_ref6$rotate = _ref6.rotate,
|
|
945
|
-
rotate = _ref6$rotate === void 0 ? 0 : _ref6$rotate,
|
|
946
|
-
_ref6$scaleX = _ref6.scaleX,
|
|
947
|
-
scaleX = _ref6$scaleX === void 0 ? 1 : _ref6$scaleX,
|
|
948
|
-
_ref6$scaleY = _ref6.scaleY,
|
|
949
|
-
scaleY = _ref6$scaleY === void 0 ? 1 : _ref6$scaleY;
|
|
950
|
-
var aspectRatio = _ref7.aspectRatio,
|
|
951
|
-
naturalWidth = _ref7.naturalWidth,
|
|
952
|
-
naturalHeight = _ref7.naturalHeight;
|
|
953
|
-
var _ref8$fillColor = _ref8.fillColor,
|
|
954
|
-
fillColor = _ref8$fillColor === void 0 ? 'transparent' : _ref8$fillColor,
|
|
955
|
-
_ref8$imageSmoothingE = _ref8.imageSmoothingEnabled,
|
|
956
|
-
imageSmoothingEnabled = _ref8$imageSmoothingE === void 0 ? true : _ref8$imageSmoothingE,
|
|
957
|
-
_ref8$imageSmoothingQ = _ref8.imageSmoothingQuality,
|
|
958
|
-
imageSmoothingQuality = _ref8$imageSmoothingQ === void 0 ? 'low' : _ref8$imageSmoothingQ,
|
|
959
|
-
_ref8$maxWidth = _ref8.maxWidth,
|
|
960
|
-
maxWidth = _ref8$maxWidth === void 0 ? Infinity : _ref8$maxWidth,
|
|
961
|
-
_ref8$maxHeight = _ref8.maxHeight,
|
|
962
|
-
maxHeight = _ref8$maxHeight === void 0 ? Infinity : _ref8$maxHeight,
|
|
963
|
-
_ref8$minWidth = _ref8.minWidth,
|
|
964
|
-
minWidth = _ref8$minWidth === void 0 ? 0 : _ref8$minWidth,
|
|
965
|
-
_ref8$minHeight = _ref8.minHeight,
|
|
966
|
-
minHeight = _ref8$minHeight === void 0 ? 0 : _ref8$minHeight;
|
|
967
|
-
var canvas = document.createElement('canvas');
|
|
968
|
-
var context = canvas.getContext('2d');
|
|
969
|
-
var maxSizes = getAdjustedSizes({
|
|
970
|
-
aspectRatio: aspectRatio,
|
|
971
|
-
width: maxWidth,
|
|
972
|
-
height: maxHeight
|
|
973
|
-
});
|
|
974
|
-
var minSizes = getAdjustedSizes({
|
|
975
|
-
aspectRatio: aspectRatio,
|
|
976
|
-
width: minWidth,
|
|
977
|
-
height: minHeight
|
|
978
|
-
}, 'cover');
|
|
979
|
-
var width = Math.min(maxSizes.width, Math.max(minSizes.width, naturalWidth));
|
|
980
|
-
var height = Math.min(maxSizes.height, Math.max(minSizes.height, naturalHeight)); // Note: should always use image's natural sizes for drawing as
|
|
981
|
-
// imageData.naturalWidth === canvasData.naturalHeight when rotate % 180 === 90
|
|
982
|
-
|
|
983
|
-
var destMaxSizes = getAdjustedSizes({
|
|
984
|
-
aspectRatio: imageAspectRatio,
|
|
985
|
-
width: maxWidth,
|
|
986
|
-
height: maxHeight
|
|
987
|
-
});
|
|
988
|
-
var destMinSizes = getAdjustedSizes({
|
|
989
|
-
aspectRatio: imageAspectRatio,
|
|
990
|
-
width: minWidth,
|
|
991
|
-
height: minHeight
|
|
992
|
-
}, 'cover');
|
|
993
|
-
var destWidth = Math.min(destMaxSizes.width, Math.max(destMinSizes.width, imageNaturalWidth));
|
|
994
|
-
var destHeight = Math.min(destMaxSizes.height, Math.max(destMinSizes.height, imageNaturalHeight));
|
|
995
|
-
var params = [-destWidth / 2, -destHeight / 2, destWidth, destHeight];
|
|
996
|
-
canvas.width = normalizeDecimalNumber(width);
|
|
997
|
-
canvas.height = normalizeDecimalNumber(height);
|
|
998
|
-
context.fillStyle = fillColor;
|
|
999
|
-
context.fillRect(0, 0, width, height);
|
|
1000
|
-
context.save();
|
|
1001
|
-
context.translate(width / 2, height / 2);
|
|
1002
|
-
context.rotate(rotate * Math.PI / 180);
|
|
1003
|
-
context.scale(scaleX, scaleY);
|
|
1004
|
-
context.imageSmoothingEnabled = imageSmoothingEnabled;
|
|
1005
|
-
context.imageSmoothingQuality = imageSmoothingQuality;
|
|
1006
|
-
context.drawImage.apply(context, [image].concat(_toConsumableArray(params.map(function (param) {
|
|
1007
|
-
return Math.floor(normalizeDecimalNumber(param));
|
|
1008
|
-
}))));
|
|
1009
|
-
context.restore();
|
|
1010
|
-
return canvas;
|
|
1011
|
-
}
|
|
1012
|
-
var fromCharCode = String.fromCharCode;
|
|
1013
|
-
/**
|
|
1014
|
-
* Get string from char code in data view.
|
|
1015
|
-
* @param {DataView} dataView - The data view for read.
|
|
1016
|
-
* @param {number} start - The start index.
|
|
1017
|
-
* @param {number} length - The read length.
|
|
1018
|
-
* @returns {string} The read result.
|
|
1019
|
-
*/
|
|
1020
|
-
|
|
1021
|
-
function getStringFromCharCode(dataView, start, length) {
|
|
1022
|
-
var str = '';
|
|
1023
|
-
length += start;
|
|
1024
|
-
|
|
1025
|
-
for (var i = start; i < length; i += 1) {
|
|
1026
|
-
str += fromCharCode(dataView.getUint8(i));
|
|
1027
|
-
}
|
|
1028
|
-
|
|
1029
|
-
return str;
|
|
1030
|
-
}
|
|
1031
|
-
var REGEXP_DATA_URL_HEAD = /^data:.*,/;
|
|
1032
|
-
/**
|
|
1033
|
-
* Transform Data URL to array buffer.
|
|
1034
|
-
* @param {string} dataURL - The Data URL to transform.
|
|
1035
|
-
* @returns {ArrayBuffer} The result array buffer.
|
|
1036
|
-
*/
|
|
1037
|
-
|
|
1038
|
-
function dataURLToArrayBuffer(dataURL) {
|
|
1039
|
-
var base64 = dataURL.replace(REGEXP_DATA_URL_HEAD, '');
|
|
1040
|
-
var binary = atob(base64);
|
|
1041
|
-
var arrayBuffer = new ArrayBuffer(binary.length);
|
|
1042
|
-
var uint8 = new Uint8Array(arrayBuffer);
|
|
1043
|
-
forEach(uint8, function (value, i) {
|
|
1044
|
-
uint8[i] = binary.charCodeAt(i);
|
|
1045
|
-
});
|
|
1046
|
-
return arrayBuffer;
|
|
1047
|
-
}
|
|
1048
|
-
/**
|
|
1049
|
-
* Transform array buffer to Data URL.
|
|
1050
|
-
* @param {ArrayBuffer} arrayBuffer - The array buffer to transform.
|
|
1051
|
-
* @param {string} mimeType - The mime type of the Data URL.
|
|
1052
|
-
* @returns {string} The result Data URL.
|
|
1053
|
-
*/
|
|
1054
|
-
|
|
1055
|
-
function arrayBufferToDataURL(arrayBuffer, mimeType) {
|
|
1056
|
-
var chunks = []; // Chunk Typed Array for better performance (#435)
|
|
1057
|
-
|
|
1058
|
-
var chunkSize = 8192;
|
|
1059
|
-
var uint8 = new Uint8Array(arrayBuffer);
|
|
1060
|
-
|
|
1061
|
-
while (uint8.length > 0) {
|
|
1062
|
-
// XXX: Babel's `toConsumableArray` helper will throw error in IE or Safari 9
|
|
1063
|
-
// eslint-disable-next-line prefer-spread
|
|
1064
|
-
chunks.push(fromCharCode.apply(null, toArray(uint8.subarray(0, chunkSize))));
|
|
1065
|
-
uint8 = uint8.subarray(chunkSize);
|
|
1066
|
-
}
|
|
1067
|
-
|
|
1068
|
-
return "data:".concat(mimeType, ";base64,").concat(btoa(chunks.join('')));
|
|
1069
|
-
}
|
|
1070
|
-
/**
|
|
1071
|
-
* Get orientation value from given array buffer.
|
|
1072
|
-
* @param {ArrayBuffer} arrayBuffer - The array buffer to read.
|
|
1073
|
-
* @returns {number} The read orientation value.
|
|
1074
|
-
*/
|
|
1075
|
-
|
|
1076
|
-
function resetAndGetOrientation(arrayBuffer) {
|
|
1077
|
-
var dataView = new DataView(arrayBuffer);
|
|
1078
|
-
var orientation; // Ignores range error when the image does not have correct Exif information
|
|
1079
|
-
|
|
1080
|
-
try {
|
|
1081
|
-
var littleEndian;
|
|
1082
|
-
var app1Start;
|
|
1083
|
-
var ifdStart; // Only handle JPEG image (start by 0xFFD8)
|
|
1084
|
-
|
|
1085
|
-
if (dataView.getUint8(0) === 0xFF && dataView.getUint8(1) === 0xD8) {
|
|
1086
|
-
var length = dataView.byteLength;
|
|
1087
|
-
var offset = 2;
|
|
1088
|
-
|
|
1089
|
-
while (offset + 1 < length) {
|
|
1090
|
-
if (dataView.getUint8(offset) === 0xFF && dataView.getUint8(offset + 1) === 0xE1) {
|
|
1091
|
-
app1Start = offset;
|
|
1092
|
-
break;
|
|
1093
|
-
}
|
|
1094
|
-
|
|
1095
|
-
offset += 1;
|
|
1096
|
-
}
|
|
1097
|
-
}
|
|
1098
|
-
|
|
1099
|
-
if (app1Start) {
|
|
1100
|
-
var exifIDCode = app1Start + 4;
|
|
1101
|
-
var tiffOffset = app1Start + 10;
|
|
1102
|
-
|
|
1103
|
-
if (getStringFromCharCode(dataView, exifIDCode, 4) === 'Exif') {
|
|
1104
|
-
var endianness = dataView.getUint16(tiffOffset);
|
|
1105
|
-
littleEndian = endianness === 0x4949;
|
|
1106
|
-
|
|
1107
|
-
if (littleEndian || endianness === 0x4D4D
|
|
1108
|
-
/* bigEndian */
|
|
1109
|
-
) {
|
|
1110
|
-
if (dataView.getUint16(tiffOffset + 2, littleEndian) === 0x002A) {
|
|
1111
|
-
var firstIFDOffset = dataView.getUint32(tiffOffset + 4, littleEndian);
|
|
1112
|
-
|
|
1113
|
-
if (firstIFDOffset >= 0x00000008) {
|
|
1114
|
-
ifdStart = tiffOffset + firstIFDOffset;
|
|
1115
|
-
}
|
|
1116
|
-
}
|
|
1117
|
-
}
|
|
1118
|
-
}
|
|
1119
|
-
}
|
|
1120
|
-
|
|
1121
|
-
if (ifdStart) {
|
|
1122
|
-
var _length = dataView.getUint16(ifdStart, littleEndian);
|
|
1123
|
-
|
|
1124
|
-
var _offset;
|
|
1125
|
-
|
|
1126
|
-
var i;
|
|
1127
|
-
|
|
1128
|
-
for (i = 0; i < _length; i += 1) {
|
|
1129
|
-
_offset = ifdStart + i * 12 + 2;
|
|
1130
|
-
|
|
1131
|
-
if (dataView.getUint16(_offset, littleEndian) === 0x0112
|
|
1132
|
-
/* Orientation */
|
|
1133
|
-
) {
|
|
1134
|
-
// 8 is the offset of the current tag's value
|
|
1135
|
-
_offset += 8; // Get the original orientation value
|
|
1136
|
-
|
|
1137
|
-
orientation = dataView.getUint16(_offset, littleEndian); // Override the orientation with its default value
|
|
1138
|
-
|
|
1139
|
-
dataView.setUint16(_offset, 1, littleEndian);
|
|
1140
|
-
break;
|
|
1141
|
-
}
|
|
1142
|
-
}
|
|
1143
|
-
}
|
|
1144
|
-
} catch (error) {
|
|
1145
|
-
orientation = 1;
|
|
1146
|
-
}
|
|
1147
|
-
|
|
1148
|
-
return orientation;
|
|
1149
|
-
}
|
|
1150
|
-
/**
|
|
1151
|
-
* Parse Exif Orientation value.
|
|
1152
|
-
* @param {number} orientation - The orientation to parse.
|
|
1153
|
-
* @returns {Object} The parsed result.
|
|
1154
|
-
*/
|
|
1155
|
-
|
|
1156
|
-
function parseOrientation(orientation) {
|
|
1157
|
-
var rotate = 0;
|
|
1158
|
-
var scaleX = 1;
|
|
1159
|
-
var scaleY = 1;
|
|
1160
|
-
|
|
1161
|
-
switch (orientation) {
|
|
1162
|
-
// Flip horizontal
|
|
1163
|
-
case 2:
|
|
1164
|
-
scaleX = -1;
|
|
1165
|
-
break;
|
|
1166
|
-
// Rotate left 180°
|
|
1167
|
-
|
|
1168
|
-
case 3:
|
|
1169
|
-
rotate = -180;
|
|
1170
|
-
break;
|
|
1171
|
-
// Flip vertical
|
|
1172
|
-
|
|
1173
|
-
case 4:
|
|
1174
|
-
scaleY = -1;
|
|
1175
|
-
break;
|
|
1176
|
-
// Flip vertical and rotate right 90°
|
|
1177
|
-
|
|
1178
|
-
case 5:
|
|
1179
|
-
rotate = 90;
|
|
1180
|
-
scaleY = -1;
|
|
1181
|
-
break;
|
|
1182
|
-
// Rotate right 90°
|
|
1183
|
-
|
|
1184
|
-
case 6:
|
|
1185
|
-
rotate = 90;
|
|
1186
|
-
break;
|
|
1187
|
-
// Flip horizontal and rotate right 90°
|
|
1188
|
-
|
|
1189
|
-
case 7:
|
|
1190
|
-
rotate = 90;
|
|
1191
|
-
scaleX = -1;
|
|
1192
|
-
break;
|
|
1193
|
-
// Rotate left 90°
|
|
1194
|
-
|
|
1195
|
-
case 8:
|
|
1196
|
-
rotate = -90;
|
|
1197
|
-
break;
|
|
1198
|
-
|
|
1199
|
-
default:
|
|
1200
|
-
}
|
|
1201
|
-
|
|
1202
|
-
return {
|
|
1203
|
-
rotate: rotate,
|
|
1204
|
-
scaleX: scaleX,
|
|
1205
|
-
scaleY: scaleY
|
|
1206
|
-
};
|
|
1207
|
-
}
|
|
1208
|
-
|
|
1209
|
-
var render = {
|
|
1210
|
-
render: function render() {
|
|
1211
|
-
this.initContainer();
|
|
1212
|
-
this.initCanvas();
|
|
1213
|
-
this.initCropBox();
|
|
1214
|
-
this.renderCanvas();
|
|
1215
|
-
|
|
1216
|
-
if (this.cropped) {
|
|
1217
|
-
this.renderCropBox();
|
|
1218
|
-
}
|
|
1219
|
-
},
|
|
1220
|
-
initContainer: function initContainer() {
|
|
1221
|
-
var element = this.element,
|
|
1222
|
-
options = this.options,
|
|
1223
|
-
container = this.container,
|
|
1224
|
-
cropper = this.cropper;
|
|
1225
|
-
addClass(cropper, CLASS_HIDDEN);
|
|
1226
|
-
removeClass(element, CLASS_HIDDEN);
|
|
1227
|
-
var containerData = {
|
|
1228
|
-
width: Math.max(container.offsetWidth, Number(options.minContainerWidth) || 200),
|
|
1229
|
-
height: Math.max(container.offsetHeight, Number(options.minContainerHeight) || 100)
|
|
1230
|
-
};
|
|
1231
|
-
this.containerData = containerData;
|
|
1232
|
-
setStyle(cropper, {
|
|
1233
|
-
width: containerData.width,
|
|
1234
|
-
height: containerData.height
|
|
1235
|
-
});
|
|
1236
|
-
addClass(element, CLASS_HIDDEN);
|
|
1237
|
-
removeClass(cropper, CLASS_HIDDEN);
|
|
1238
|
-
},
|
|
1239
|
-
// Canvas (image wrapper)
|
|
1240
|
-
initCanvas: function initCanvas() {
|
|
1241
|
-
var containerData = this.containerData,
|
|
1242
|
-
imageData = this.imageData;
|
|
1243
|
-
var viewMode = this.options.viewMode;
|
|
1244
|
-
var rotated = Math.abs(imageData.rotate) % 180 === 90;
|
|
1245
|
-
var naturalWidth = rotated ? imageData.naturalHeight : imageData.naturalWidth;
|
|
1246
|
-
var naturalHeight = rotated ? imageData.naturalWidth : imageData.naturalHeight;
|
|
1247
|
-
var aspectRatio = naturalWidth / naturalHeight;
|
|
1248
|
-
var canvasWidth = containerData.width;
|
|
1249
|
-
var canvasHeight = containerData.height;
|
|
1250
|
-
|
|
1251
|
-
if (containerData.height * aspectRatio > containerData.width) {
|
|
1252
|
-
if (viewMode === 3) {
|
|
1253
|
-
canvasWidth = containerData.height * aspectRatio;
|
|
1254
|
-
} else {
|
|
1255
|
-
canvasHeight = containerData.width / aspectRatio;
|
|
1256
|
-
}
|
|
1257
|
-
} else if (viewMode === 3) {
|
|
1258
|
-
canvasHeight = containerData.width / aspectRatio;
|
|
1259
|
-
} else {
|
|
1260
|
-
canvasWidth = containerData.height * aspectRatio;
|
|
1261
|
-
}
|
|
1262
|
-
|
|
1263
|
-
var canvasData = {
|
|
1264
|
-
aspectRatio: aspectRatio,
|
|
1265
|
-
naturalWidth: naturalWidth,
|
|
1266
|
-
naturalHeight: naturalHeight,
|
|
1267
|
-
width: canvasWidth,
|
|
1268
|
-
height: canvasHeight
|
|
1269
|
-
};
|
|
1270
|
-
canvasData.left = (containerData.width - canvasWidth) / 2;
|
|
1271
|
-
canvasData.top = (containerData.height - canvasHeight) / 2;
|
|
1272
|
-
canvasData.oldLeft = canvasData.left;
|
|
1273
|
-
canvasData.oldTop = canvasData.top;
|
|
1274
|
-
this.canvasData = canvasData;
|
|
1275
|
-
this.limited = viewMode === 1 || viewMode === 2;
|
|
1276
|
-
this.limitCanvas(true, true);
|
|
1277
|
-
this.initialImageData = assign({}, imageData);
|
|
1278
|
-
this.initialCanvasData = assign({}, canvasData);
|
|
1279
|
-
},
|
|
1280
|
-
limitCanvas: function limitCanvas(sizeLimited, positionLimited) {
|
|
1281
|
-
var options = this.options,
|
|
1282
|
-
containerData = this.containerData,
|
|
1283
|
-
canvasData = this.canvasData,
|
|
1284
|
-
cropBoxData = this.cropBoxData;
|
|
1285
|
-
var viewMode = options.viewMode;
|
|
1286
|
-
var aspectRatio = canvasData.aspectRatio;
|
|
1287
|
-
var cropped = this.cropped && cropBoxData;
|
|
1288
|
-
|
|
1289
|
-
if (sizeLimited) {
|
|
1290
|
-
var minCanvasWidth = Number(options.minCanvasWidth) || 0;
|
|
1291
|
-
var minCanvasHeight = Number(options.minCanvasHeight) || 0;
|
|
1292
|
-
|
|
1293
|
-
if (viewMode > 1) {
|
|
1294
|
-
minCanvasWidth = Math.max(minCanvasWidth, containerData.width);
|
|
1295
|
-
minCanvasHeight = Math.max(minCanvasHeight, containerData.height);
|
|
1296
|
-
|
|
1297
|
-
if (viewMode === 3) {
|
|
1298
|
-
if (minCanvasHeight * aspectRatio > minCanvasWidth) {
|
|
1299
|
-
minCanvasWidth = minCanvasHeight * aspectRatio;
|
|
1300
|
-
} else {
|
|
1301
|
-
minCanvasHeight = minCanvasWidth / aspectRatio;
|
|
1302
|
-
}
|
|
1303
|
-
}
|
|
1304
|
-
} else if (viewMode > 0) {
|
|
1305
|
-
if (minCanvasWidth) {
|
|
1306
|
-
minCanvasWidth = Math.max(minCanvasWidth, cropped ? cropBoxData.width : 0);
|
|
1307
|
-
} else if (minCanvasHeight) {
|
|
1308
|
-
minCanvasHeight = Math.max(minCanvasHeight, cropped ? cropBoxData.height : 0);
|
|
1309
|
-
} else if (cropped) {
|
|
1310
|
-
minCanvasWidth = cropBoxData.width;
|
|
1311
|
-
minCanvasHeight = cropBoxData.height;
|
|
1312
|
-
|
|
1313
|
-
if (minCanvasHeight * aspectRatio > minCanvasWidth) {
|
|
1314
|
-
minCanvasWidth = minCanvasHeight * aspectRatio;
|
|
1315
|
-
} else {
|
|
1316
|
-
minCanvasHeight = minCanvasWidth / aspectRatio;
|
|
1317
|
-
}
|
|
1318
|
-
}
|
|
1319
|
-
}
|
|
1320
|
-
|
|
1321
|
-
var _getAdjustedSizes = getAdjustedSizes({
|
|
1322
|
-
aspectRatio: aspectRatio,
|
|
1323
|
-
width: minCanvasWidth,
|
|
1324
|
-
height: minCanvasHeight
|
|
1325
|
-
});
|
|
1326
|
-
|
|
1327
|
-
minCanvasWidth = _getAdjustedSizes.width;
|
|
1328
|
-
minCanvasHeight = _getAdjustedSizes.height;
|
|
1329
|
-
canvasData.minWidth = minCanvasWidth;
|
|
1330
|
-
canvasData.minHeight = minCanvasHeight;
|
|
1331
|
-
canvasData.maxWidth = Infinity;
|
|
1332
|
-
canvasData.maxHeight = Infinity;
|
|
1333
|
-
}
|
|
1334
|
-
|
|
1335
|
-
if (positionLimited) {
|
|
1336
|
-
if (viewMode > (cropped ? 0 : 1)) {
|
|
1337
|
-
var newCanvasLeft = containerData.width - canvasData.width;
|
|
1338
|
-
var newCanvasTop = containerData.height - canvasData.height;
|
|
1339
|
-
canvasData.minLeft = Math.min(0, newCanvasLeft);
|
|
1340
|
-
canvasData.minTop = Math.min(0, newCanvasTop);
|
|
1341
|
-
canvasData.maxLeft = Math.max(0, newCanvasLeft);
|
|
1342
|
-
canvasData.maxTop = Math.max(0, newCanvasTop);
|
|
1343
|
-
|
|
1344
|
-
if (cropped && this.limited) {
|
|
1345
|
-
canvasData.minLeft = Math.min(cropBoxData.left, cropBoxData.left + (cropBoxData.width - canvasData.width));
|
|
1346
|
-
canvasData.minTop = Math.min(cropBoxData.top, cropBoxData.top + (cropBoxData.height - canvasData.height));
|
|
1347
|
-
canvasData.maxLeft = cropBoxData.left;
|
|
1348
|
-
canvasData.maxTop = cropBoxData.top;
|
|
1349
|
-
|
|
1350
|
-
if (viewMode === 2) {
|
|
1351
|
-
if (canvasData.width >= containerData.width) {
|
|
1352
|
-
canvasData.minLeft = Math.min(0, newCanvasLeft);
|
|
1353
|
-
canvasData.maxLeft = Math.max(0, newCanvasLeft);
|
|
1354
|
-
}
|
|
1355
|
-
|
|
1356
|
-
if (canvasData.height >= containerData.height) {
|
|
1357
|
-
canvasData.minTop = Math.min(0, newCanvasTop);
|
|
1358
|
-
canvasData.maxTop = Math.max(0, newCanvasTop);
|
|
1359
|
-
}
|
|
1360
|
-
}
|
|
1361
|
-
}
|
|
1362
|
-
} else {
|
|
1363
|
-
canvasData.minLeft = -canvasData.width;
|
|
1364
|
-
canvasData.minTop = -canvasData.height;
|
|
1365
|
-
canvasData.maxLeft = containerData.width;
|
|
1366
|
-
canvasData.maxTop = containerData.height;
|
|
1367
|
-
}
|
|
1368
|
-
}
|
|
1369
|
-
},
|
|
1370
|
-
renderCanvas: function renderCanvas(changed, transformed) {
|
|
1371
|
-
var canvasData = this.canvasData,
|
|
1372
|
-
imageData = this.imageData;
|
|
1373
|
-
|
|
1374
|
-
if (transformed) {
|
|
1375
|
-
var _getRotatedSizes = getRotatedSizes({
|
|
1376
|
-
width: imageData.naturalWidth * Math.abs(imageData.scaleX || 1),
|
|
1377
|
-
height: imageData.naturalHeight * Math.abs(imageData.scaleY || 1),
|
|
1378
|
-
degree: imageData.rotate || 0
|
|
1379
|
-
}),
|
|
1380
|
-
naturalWidth = _getRotatedSizes.width,
|
|
1381
|
-
naturalHeight = _getRotatedSizes.height;
|
|
1382
|
-
|
|
1383
|
-
var width = canvasData.width * (naturalWidth / canvasData.naturalWidth);
|
|
1384
|
-
var height = canvasData.height * (naturalHeight / canvasData.naturalHeight);
|
|
1385
|
-
canvasData.left -= (width - canvasData.width) / 2;
|
|
1386
|
-
canvasData.top -= (height - canvasData.height) / 2;
|
|
1387
|
-
canvasData.width = width;
|
|
1388
|
-
canvasData.height = height;
|
|
1389
|
-
canvasData.aspectRatio = naturalWidth / naturalHeight;
|
|
1390
|
-
canvasData.naturalWidth = naturalWidth;
|
|
1391
|
-
canvasData.naturalHeight = naturalHeight;
|
|
1392
|
-
this.limitCanvas(true, false);
|
|
1393
|
-
}
|
|
1394
|
-
|
|
1395
|
-
if (canvasData.width > canvasData.maxWidth || canvasData.width < canvasData.minWidth) {
|
|
1396
|
-
canvasData.left = canvasData.oldLeft;
|
|
1397
|
-
}
|
|
1398
|
-
|
|
1399
|
-
if (canvasData.height > canvasData.maxHeight || canvasData.height < canvasData.minHeight) {
|
|
1400
|
-
canvasData.top = canvasData.oldTop;
|
|
1401
|
-
}
|
|
1402
|
-
|
|
1403
|
-
canvasData.width = Math.min(Math.max(canvasData.width, canvasData.minWidth), canvasData.maxWidth);
|
|
1404
|
-
canvasData.height = Math.min(Math.max(canvasData.height, canvasData.minHeight), canvasData.maxHeight);
|
|
1405
|
-
this.limitCanvas(false, true);
|
|
1406
|
-
canvasData.left = Math.min(Math.max(canvasData.left, canvasData.minLeft), canvasData.maxLeft);
|
|
1407
|
-
canvasData.top = Math.min(Math.max(canvasData.top, canvasData.minTop), canvasData.maxTop);
|
|
1408
|
-
canvasData.oldLeft = canvasData.left;
|
|
1409
|
-
canvasData.oldTop = canvasData.top;
|
|
1410
|
-
setStyle(this.canvas, assign({
|
|
1411
|
-
width: canvasData.width,
|
|
1412
|
-
height: canvasData.height
|
|
1413
|
-
}, getTransforms({
|
|
1414
|
-
translateX: canvasData.left,
|
|
1415
|
-
translateY: canvasData.top
|
|
1416
|
-
})));
|
|
1417
|
-
this.renderImage(changed);
|
|
1418
|
-
|
|
1419
|
-
if (this.cropped && this.limited) {
|
|
1420
|
-
this.limitCropBox(true, true);
|
|
1421
|
-
}
|
|
1422
|
-
},
|
|
1423
|
-
renderImage: function renderImage(changed) {
|
|
1424
|
-
var canvasData = this.canvasData,
|
|
1425
|
-
imageData = this.imageData;
|
|
1426
|
-
var width = imageData.naturalWidth * (canvasData.width / canvasData.naturalWidth);
|
|
1427
|
-
var height = imageData.naturalHeight * (canvasData.height / canvasData.naturalHeight);
|
|
1428
|
-
assign(imageData, {
|
|
1429
|
-
width: width,
|
|
1430
|
-
height: height,
|
|
1431
|
-
left: (canvasData.width - width) / 2,
|
|
1432
|
-
top: (canvasData.height - height) / 2
|
|
1433
|
-
});
|
|
1434
|
-
setStyle(this.image, assign({
|
|
1435
|
-
width: imageData.width,
|
|
1436
|
-
height: imageData.height
|
|
1437
|
-
}, getTransforms(assign({
|
|
1438
|
-
translateX: imageData.left,
|
|
1439
|
-
translateY: imageData.top
|
|
1440
|
-
}, imageData))));
|
|
1441
|
-
|
|
1442
|
-
if (changed) {
|
|
1443
|
-
this.output();
|
|
1444
|
-
}
|
|
1445
|
-
},
|
|
1446
|
-
initCropBox: function initCropBox() {
|
|
1447
|
-
var options = this.options,
|
|
1448
|
-
canvasData = this.canvasData;
|
|
1449
|
-
var aspectRatio = options.aspectRatio || options.initialAspectRatio;
|
|
1450
|
-
var autoCropArea = Number(options.autoCropArea) || 0.8;
|
|
1451
|
-
var cropBoxData = {
|
|
1452
|
-
width: canvasData.width,
|
|
1453
|
-
height: canvasData.height
|
|
1454
|
-
};
|
|
1455
|
-
|
|
1456
|
-
if (aspectRatio) {
|
|
1457
|
-
if (canvasData.height * aspectRatio > canvasData.width) {
|
|
1458
|
-
cropBoxData.height = cropBoxData.width / aspectRatio;
|
|
1459
|
-
} else {
|
|
1460
|
-
cropBoxData.width = cropBoxData.height * aspectRatio;
|
|
1461
|
-
}
|
|
1462
|
-
}
|
|
1463
|
-
|
|
1464
|
-
this.cropBoxData = cropBoxData;
|
|
1465
|
-
this.limitCropBox(true, true); // Initialize auto crop area
|
|
1466
|
-
|
|
1467
|
-
cropBoxData.width = Math.min(Math.max(cropBoxData.width, cropBoxData.minWidth), cropBoxData.maxWidth);
|
|
1468
|
-
cropBoxData.height = Math.min(Math.max(cropBoxData.height, cropBoxData.minHeight), cropBoxData.maxHeight); // The width/height of auto crop area must large than "minWidth/Height"
|
|
1469
|
-
|
|
1470
|
-
cropBoxData.width = Math.max(cropBoxData.minWidth, cropBoxData.width * autoCropArea);
|
|
1471
|
-
cropBoxData.height = Math.max(cropBoxData.minHeight, cropBoxData.height * autoCropArea);
|
|
1472
|
-
cropBoxData.left = canvasData.left + (canvasData.width - cropBoxData.width) / 2;
|
|
1473
|
-
cropBoxData.top = canvasData.top + (canvasData.height - cropBoxData.height) / 2;
|
|
1474
|
-
cropBoxData.oldLeft = cropBoxData.left;
|
|
1475
|
-
cropBoxData.oldTop = cropBoxData.top;
|
|
1476
|
-
this.initialCropBoxData = assign({}, cropBoxData);
|
|
1477
|
-
},
|
|
1478
|
-
limitCropBox: function limitCropBox(sizeLimited, positionLimited) {
|
|
1479
|
-
var options = this.options,
|
|
1480
|
-
containerData = this.containerData,
|
|
1481
|
-
canvasData = this.canvasData,
|
|
1482
|
-
cropBoxData = this.cropBoxData,
|
|
1483
|
-
limited = this.limited;
|
|
1484
|
-
var aspectRatio = options.aspectRatio;
|
|
1485
|
-
|
|
1486
|
-
if (sizeLimited) {
|
|
1487
|
-
var minCropBoxWidth = Number(options.minCropBoxWidth) || 0;
|
|
1488
|
-
var minCropBoxHeight = Number(options.minCropBoxHeight) || 0;
|
|
1489
|
-
var maxCropBoxWidth = limited ? Math.min(containerData.width, canvasData.width, canvasData.width + canvasData.left, containerData.width - canvasData.left) : containerData.width;
|
|
1490
|
-
var maxCropBoxHeight = limited ? Math.min(containerData.height, canvasData.height, canvasData.height + canvasData.top, containerData.height - canvasData.top) : containerData.height; // The min/maxCropBoxWidth/Height must be less than container's width/height
|
|
1491
|
-
|
|
1492
|
-
minCropBoxWidth = Math.min(minCropBoxWidth, containerData.width);
|
|
1493
|
-
minCropBoxHeight = Math.min(minCropBoxHeight, containerData.height);
|
|
1494
|
-
|
|
1495
|
-
if (aspectRatio) {
|
|
1496
|
-
if (minCropBoxWidth && minCropBoxHeight) {
|
|
1497
|
-
if (minCropBoxHeight * aspectRatio > minCropBoxWidth) {
|
|
1498
|
-
minCropBoxHeight = minCropBoxWidth / aspectRatio;
|
|
1499
|
-
} else {
|
|
1500
|
-
minCropBoxWidth = minCropBoxHeight * aspectRatio;
|
|
1501
|
-
}
|
|
1502
|
-
} else if (minCropBoxWidth) {
|
|
1503
|
-
minCropBoxHeight = minCropBoxWidth / aspectRatio;
|
|
1504
|
-
} else if (minCropBoxHeight) {
|
|
1505
|
-
minCropBoxWidth = minCropBoxHeight * aspectRatio;
|
|
1506
|
-
}
|
|
1507
|
-
|
|
1508
|
-
if (maxCropBoxHeight * aspectRatio > maxCropBoxWidth) {
|
|
1509
|
-
maxCropBoxHeight = maxCropBoxWidth / aspectRatio;
|
|
1510
|
-
} else {
|
|
1511
|
-
maxCropBoxWidth = maxCropBoxHeight * aspectRatio;
|
|
1512
|
-
}
|
|
1513
|
-
} // The minWidth/Height must be less than maxWidth/Height
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
cropBoxData.minWidth = Math.min(minCropBoxWidth, maxCropBoxWidth);
|
|
1517
|
-
cropBoxData.minHeight = Math.min(minCropBoxHeight, maxCropBoxHeight);
|
|
1518
|
-
cropBoxData.maxWidth = maxCropBoxWidth;
|
|
1519
|
-
cropBoxData.maxHeight = maxCropBoxHeight;
|
|
1520
|
-
}
|
|
1521
|
-
|
|
1522
|
-
if (positionLimited) {
|
|
1523
|
-
if (limited) {
|
|
1524
|
-
cropBoxData.minLeft = Math.max(0, canvasData.left);
|
|
1525
|
-
cropBoxData.minTop = Math.max(0, canvasData.top);
|
|
1526
|
-
cropBoxData.maxLeft = Math.min(containerData.width, canvasData.left + canvasData.width) - cropBoxData.width;
|
|
1527
|
-
cropBoxData.maxTop = Math.min(containerData.height, canvasData.top + canvasData.height) - cropBoxData.height;
|
|
1528
|
-
} else {
|
|
1529
|
-
cropBoxData.minLeft = 0;
|
|
1530
|
-
cropBoxData.minTop = 0;
|
|
1531
|
-
cropBoxData.maxLeft = containerData.width - cropBoxData.width;
|
|
1532
|
-
cropBoxData.maxTop = containerData.height - cropBoxData.height;
|
|
1533
|
-
}
|
|
1534
|
-
}
|
|
1535
|
-
},
|
|
1536
|
-
renderCropBox: function renderCropBox() {
|
|
1537
|
-
var options = this.options,
|
|
1538
|
-
containerData = this.containerData,
|
|
1539
|
-
cropBoxData = this.cropBoxData;
|
|
1540
|
-
|
|
1541
|
-
if (cropBoxData.width > cropBoxData.maxWidth || cropBoxData.width < cropBoxData.minWidth) {
|
|
1542
|
-
cropBoxData.left = cropBoxData.oldLeft;
|
|
1543
|
-
}
|
|
1544
|
-
|
|
1545
|
-
if (cropBoxData.height > cropBoxData.maxHeight || cropBoxData.height < cropBoxData.minHeight) {
|
|
1546
|
-
cropBoxData.top = cropBoxData.oldTop;
|
|
1547
|
-
}
|
|
1548
|
-
|
|
1549
|
-
cropBoxData.width = Math.min(Math.max(cropBoxData.width, cropBoxData.minWidth), cropBoxData.maxWidth);
|
|
1550
|
-
cropBoxData.height = Math.min(Math.max(cropBoxData.height, cropBoxData.minHeight), cropBoxData.maxHeight);
|
|
1551
|
-
this.limitCropBox(false, true);
|
|
1552
|
-
cropBoxData.left = Math.min(Math.max(cropBoxData.left, cropBoxData.minLeft), cropBoxData.maxLeft);
|
|
1553
|
-
cropBoxData.top = Math.min(Math.max(cropBoxData.top, cropBoxData.minTop), cropBoxData.maxTop);
|
|
1554
|
-
cropBoxData.oldLeft = cropBoxData.left;
|
|
1555
|
-
cropBoxData.oldTop = cropBoxData.top;
|
|
1556
|
-
|
|
1557
|
-
if (options.movable && options.cropBoxMovable) {
|
|
1558
|
-
// Turn to move the canvas when the crop box is equal to the container
|
|
1559
|
-
setData(this.face, DATA_ACTION, cropBoxData.width >= containerData.width && cropBoxData.height >= containerData.height ? ACTION_MOVE : ACTION_ALL);
|
|
1560
|
-
}
|
|
1561
|
-
|
|
1562
|
-
setStyle(this.cropBox, assign({
|
|
1563
|
-
width: cropBoxData.width,
|
|
1564
|
-
height: cropBoxData.height
|
|
1565
|
-
}, getTransforms({
|
|
1566
|
-
translateX: cropBoxData.left,
|
|
1567
|
-
translateY: cropBoxData.top
|
|
1568
|
-
})));
|
|
1569
|
-
|
|
1570
|
-
if (this.cropped && this.limited) {
|
|
1571
|
-
this.limitCanvas(true, true);
|
|
1572
|
-
}
|
|
1573
|
-
|
|
1574
|
-
if (!this.disabled) {
|
|
1575
|
-
this.output();
|
|
1576
|
-
}
|
|
1577
|
-
},
|
|
1578
|
-
output: function output() {
|
|
1579
|
-
this.preview();
|
|
1580
|
-
dispatchEvent(this.element, EVENT_CROP, this.getData());
|
|
1581
|
-
}
|
|
1582
|
-
};
|
|
1583
|
-
|
|
1584
|
-
var preview = {
|
|
1585
|
-
initPreview: function initPreview() {
|
|
1586
|
-
var element = this.element,
|
|
1587
|
-
crossOrigin = this.crossOrigin;
|
|
1588
|
-
var preview = this.options.preview;
|
|
1589
|
-
var url = crossOrigin ? this.crossOriginUrl : this.url;
|
|
1590
|
-
var alt = element.alt || 'The image to preview';
|
|
1591
|
-
var image = document.createElement('img');
|
|
1592
|
-
|
|
1593
|
-
if (crossOrigin) {
|
|
1594
|
-
image.crossOrigin = crossOrigin;
|
|
1595
|
-
}
|
|
1596
|
-
|
|
1597
|
-
image.src = url;
|
|
1598
|
-
image.alt = alt;
|
|
1599
|
-
this.viewBox.appendChild(image);
|
|
1600
|
-
this.viewBoxImage = image;
|
|
1601
|
-
|
|
1602
|
-
if (!preview) {
|
|
1603
|
-
return;
|
|
1604
|
-
}
|
|
1605
|
-
|
|
1606
|
-
var previews = preview;
|
|
1607
|
-
|
|
1608
|
-
if (typeof preview === 'string') {
|
|
1609
|
-
previews = element.ownerDocument.querySelectorAll(preview);
|
|
1610
|
-
} else if (preview.querySelector) {
|
|
1611
|
-
previews = [preview];
|
|
1612
|
-
}
|
|
1613
|
-
|
|
1614
|
-
this.previews = previews;
|
|
1615
|
-
forEach(previews, function (el) {
|
|
1616
|
-
var img = document.createElement('img'); // Save the original size for recover
|
|
1617
|
-
|
|
1618
|
-
setData(el, DATA_PREVIEW, {
|
|
1619
|
-
width: el.offsetWidth,
|
|
1620
|
-
height: el.offsetHeight,
|
|
1621
|
-
html: el.innerHTML
|
|
1622
|
-
});
|
|
1623
|
-
|
|
1624
|
-
if (crossOrigin) {
|
|
1625
|
-
img.crossOrigin = crossOrigin;
|
|
1626
|
-
}
|
|
1627
|
-
|
|
1628
|
-
img.src = url;
|
|
1629
|
-
img.alt = alt;
|
|
1630
|
-
/**
|
|
1631
|
-
* Override img element styles
|
|
1632
|
-
* Add `display:block` to avoid margin top issue
|
|
1633
|
-
* Add `height:auto` to override `height` attribute on IE8
|
|
1634
|
-
* (Occur only when margin-top <= -height)
|
|
1635
|
-
*/
|
|
1636
|
-
|
|
1637
|
-
img.style.cssText = 'display:block;' + 'width:100%;' + 'height:auto;' + 'min-width:0!important;' + 'min-height:0!important;' + 'max-width:none!important;' + 'max-height:none!important;' + 'image-orientation:0deg!important;"';
|
|
1638
|
-
el.innerHTML = '';
|
|
1639
|
-
el.appendChild(img);
|
|
1640
|
-
});
|
|
1641
|
-
},
|
|
1642
|
-
resetPreview: function resetPreview() {
|
|
1643
|
-
forEach(this.previews, function (element) {
|
|
1644
|
-
var data = getData(element, DATA_PREVIEW);
|
|
1645
|
-
setStyle(element, {
|
|
1646
|
-
width: data.width,
|
|
1647
|
-
height: data.height
|
|
1648
|
-
});
|
|
1649
|
-
element.innerHTML = data.html;
|
|
1650
|
-
removeData(element, DATA_PREVIEW);
|
|
1651
|
-
});
|
|
1652
|
-
},
|
|
1653
|
-
preview: function preview() {
|
|
1654
|
-
var imageData = this.imageData,
|
|
1655
|
-
canvasData = this.canvasData,
|
|
1656
|
-
cropBoxData = this.cropBoxData;
|
|
1657
|
-
var cropBoxWidth = cropBoxData.width,
|
|
1658
|
-
cropBoxHeight = cropBoxData.height;
|
|
1659
|
-
var width = imageData.width,
|
|
1660
|
-
height = imageData.height;
|
|
1661
|
-
var left = cropBoxData.left - canvasData.left - imageData.left;
|
|
1662
|
-
var top = cropBoxData.top - canvasData.top - imageData.top;
|
|
1663
|
-
|
|
1664
|
-
if (!this.cropped || this.disabled) {
|
|
1665
|
-
return;
|
|
1666
|
-
}
|
|
1667
|
-
|
|
1668
|
-
setStyle(this.viewBoxImage, assign({
|
|
1669
|
-
width: width,
|
|
1670
|
-
height: height
|
|
1671
|
-
}, getTransforms(assign({
|
|
1672
|
-
translateX: -left,
|
|
1673
|
-
translateY: -top
|
|
1674
|
-
}, imageData))));
|
|
1675
|
-
forEach(this.previews, function (element) {
|
|
1676
|
-
var data = getData(element, DATA_PREVIEW);
|
|
1677
|
-
var originalWidth = data.width;
|
|
1678
|
-
var originalHeight = data.height;
|
|
1679
|
-
var newWidth = originalWidth;
|
|
1680
|
-
var newHeight = originalHeight;
|
|
1681
|
-
var ratio = 1;
|
|
1682
|
-
|
|
1683
|
-
if (cropBoxWidth) {
|
|
1684
|
-
ratio = originalWidth / cropBoxWidth;
|
|
1685
|
-
newHeight = cropBoxHeight * ratio;
|
|
1686
|
-
}
|
|
1687
|
-
|
|
1688
|
-
if (cropBoxHeight && newHeight > originalHeight) {
|
|
1689
|
-
ratio = originalHeight / cropBoxHeight;
|
|
1690
|
-
newWidth = cropBoxWidth * ratio;
|
|
1691
|
-
newHeight = originalHeight;
|
|
1692
|
-
}
|
|
1693
|
-
|
|
1694
|
-
setStyle(element, {
|
|
1695
|
-
width: newWidth,
|
|
1696
|
-
height: newHeight
|
|
1697
|
-
});
|
|
1698
|
-
setStyle(element.getElementsByTagName('img')[0], assign({
|
|
1699
|
-
width: width * ratio,
|
|
1700
|
-
height: height * ratio
|
|
1701
|
-
}, getTransforms(assign({
|
|
1702
|
-
translateX: -left * ratio,
|
|
1703
|
-
translateY: -top * ratio
|
|
1704
|
-
}, imageData))));
|
|
1705
|
-
});
|
|
1706
|
-
}
|
|
1707
|
-
};
|
|
1708
|
-
|
|
1709
|
-
var events = {
|
|
1710
|
-
bind: function bind() {
|
|
1711
|
-
var element = this.element,
|
|
1712
|
-
options = this.options,
|
|
1713
|
-
cropper = this.cropper;
|
|
1714
|
-
|
|
1715
|
-
if (isFunction(options.cropstart)) {
|
|
1716
|
-
addListener(element, EVENT_CROP_START, options.cropstart);
|
|
1717
|
-
}
|
|
1718
|
-
|
|
1719
|
-
if (isFunction(options.cropmove)) {
|
|
1720
|
-
addListener(element, EVENT_CROP_MOVE, options.cropmove);
|
|
1721
|
-
}
|
|
1722
|
-
|
|
1723
|
-
if (isFunction(options.cropend)) {
|
|
1724
|
-
addListener(element, EVENT_CROP_END, options.cropend);
|
|
1725
|
-
}
|
|
1726
|
-
|
|
1727
|
-
if (isFunction(options.crop)) {
|
|
1728
|
-
addListener(element, EVENT_CROP, options.crop);
|
|
1729
|
-
}
|
|
1730
|
-
|
|
1731
|
-
if (isFunction(options.zoom)) {
|
|
1732
|
-
addListener(element, EVENT_ZOOM, options.zoom);
|
|
1733
|
-
}
|
|
1734
|
-
|
|
1735
|
-
addListener(cropper, EVENT_POINTER_DOWN, this.onCropStart = this.cropStart.bind(this));
|
|
1736
|
-
|
|
1737
|
-
if (options.zoomable && options.zoomOnWheel) {
|
|
1738
|
-
addListener(cropper, EVENT_WHEEL, this.onWheel = this.wheel.bind(this), {
|
|
1739
|
-
passive: false,
|
|
1740
|
-
capture: true
|
|
1741
|
-
});
|
|
1742
|
-
}
|
|
1743
|
-
|
|
1744
|
-
if (options.toggleDragModeOnDblclick) {
|
|
1745
|
-
addListener(cropper, EVENT_DBLCLICK, this.onDblclick = this.dblclick.bind(this));
|
|
1746
|
-
}
|
|
1747
|
-
|
|
1748
|
-
addListener(element.ownerDocument, EVENT_POINTER_MOVE, this.onCropMove = this.cropMove.bind(this));
|
|
1749
|
-
addListener(element.ownerDocument, EVENT_POINTER_UP, this.onCropEnd = this.cropEnd.bind(this));
|
|
1750
|
-
|
|
1751
|
-
if (options.responsive) {
|
|
1752
|
-
addListener(window, EVENT_RESIZE, this.onResize = this.resize.bind(this));
|
|
1753
|
-
}
|
|
1754
|
-
},
|
|
1755
|
-
unbind: function unbind() {
|
|
1756
|
-
var element = this.element,
|
|
1757
|
-
options = this.options,
|
|
1758
|
-
cropper = this.cropper;
|
|
1759
|
-
|
|
1760
|
-
if (isFunction(options.cropstart)) {
|
|
1761
|
-
removeListener(element, EVENT_CROP_START, options.cropstart);
|
|
1762
|
-
}
|
|
1763
|
-
|
|
1764
|
-
if (isFunction(options.cropmove)) {
|
|
1765
|
-
removeListener(element, EVENT_CROP_MOVE, options.cropmove);
|
|
1766
|
-
}
|
|
1767
|
-
|
|
1768
|
-
if (isFunction(options.cropend)) {
|
|
1769
|
-
removeListener(element, EVENT_CROP_END, options.cropend);
|
|
1770
|
-
}
|
|
1771
|
-
|
|
1772
|
-
if (isFunction(options.crop)) {
|
|
1773
|
-
removeListener(element, EVENT_CROP, options.crop);
|
|
1774
|
-
}
|
|
1775
|
-
|
|
1776
|
-
if (isFunction(options.zoom)) {
|
|
1777
|
-
removeListener(element, EVENT_ZOOM, options.zoom);
|
|
1778
|
-
}
|
|
1779
|
-
|
|
1780
|
-
removeListener(cropper, EVENT_POINTER_DOWN, this.onCropStart);
|
|
1781
|
-
|
|
1782
|
-
if (options.zoomable && options.zoomOnWheel) {
|
|
1783
|
-
removeListener(cropper, EVENT_WHEEL, this.onWheel, {
|
|
1784
|
-
passive: false,
|
|
1785
|
-
capture: true
|
|
1786
|
-
});
|
|
1787
|
-
}
|
|
1788
|
-
|
|
1789
|
-
if (options.toggleDragModeOnDblclick) {
|
|
1790
|
-
removeListener(cropper, EVENT_DBLCLICK, this.onDblclick);
|
|
1791
|
-
}
|
|
1792
|
-
|
|
1793
|
-
removeListener(element.ownerDocument, EVENT_POINTER_MOVE, this.onCropMove);
|
|
1794
|
-
removeListener(element.ownerDocument, EVENT_POINTER_UP, this.onCropEnd);
|
|
1795
|
-
|
|
1796
|
-
if (options.responsive) {
|
|
1797
|
-
removeListener(window, EVENT_RESIZE, this.onResize);
|
|
1798
|
-
}
|
|
1799
|
-
}
|
|
1800
|
-
};
|
|
1801
|
-
|
|
1802
|
-
var handlers = {
|
|
1803
|
-
resize: function resize() {
|
|
1804
|
-
var options = this.options,
|
|
1805
|
-
container = this.container,
|
|
1806
|
-
containerData = this.containerData;
|
|
1807
|
-
var minContainerWidth = Number(options.minContainerWidth) || MIN_CONTAINER_WIDTH;
|
|
1808
|
-
var minContainerHeight = Number(options.minContainerHeight) || MIN_CONTAINER_HEIGHT;
|
|
1809
|
-
|
|
1810
|
-
if (this.disabled || containerData.width <= minContainerWidth || containerData.height <= minContainerHeight) {
|
|
1811
|
-
return;
|
|
1812
|
-
}
|
|
1813
|
-
|
|
1814
|
-
var ratio = container.offsetWidth / containerData.width; // Resize when width changed or height changed
|
|
1815
|
-
|
|
1816
|
-
if (ratio !== 1 || container.offsetHeight !== containerData.height) {
|
|
1817
|
-
var canvasData;
|
|
1818
|
-
var cropBoxData;
|
|
1819
|
-
|
|
1820
|
-
if (options.restore) {
|
|
1821
|
-
canvasData = this.getCanvasData();
|
|
1822
|
-
cropBoxData = this.getCropBoxData();
|
|
1823
|
-
}
|
|
1824
|
-
|
|
1825
|
-
this.render();
|
|
1826
|
-
|
|
1827
|
-
if (options.restore) {
|
|
1828
|
-
this.setCanvasData(forEach(canvasData, function (n, i) {
|
|
1829
|
-
canvasData[i] = n * ratio;
|
|
1830
|
-
}));
|
|
1831
|
-
this.setCropBoxData(forEach(cropBoxData, function (n, i) {
|
|
1832
|
-
cropBoxData[i] = n * ratio;
|
|
1833
|
-
}));
|
|
1834
|
-
}
|
|
1835
|
-
}
|
|
1836
|
-
},
|
|
1837
|
-
dblclick: function dblclick() {
|
|
1838
|
-
if (this.disabled || this.options.dragMode === DRAG_MODE_NONE) {
|
|
1839
|
-
return;
|
|
1840
|
-
}
|
|
1841
|
-
|
|
1842
|
-
this.setDragMode(hasClass(this.dragBox, CLASS_CROP) ? DRAG_MODE_MOVE : DRAG_MODE_CROP);
|
|
1843
|
-
},
|
|
1844
|
-
wheel: function wheel(event) {
|
|
1845
|
-
var _this = this;
|
|
1846
|
-
|
|
1847
|
-
var ratio = Number(this.options.wheelZoomRatio) || 0.1;
|
|
1848
|
-
var delta = 1;
|
|
1849
|
-
|
|
1850
|
-
if (this.disabled) {
|
|
1851
|
-
return;
|
|
1852
|
-
}
|
|
1853
|
-
|
|
1854
|
-
event.preventDefault(); // Limit wheel speed to prevent zoom too fast (#21)
|
|
1855
|
-
|
|
1856
|
-
if (this.wheeling) {
|
|
1857
|
-
return;
|
|
1858
|
-
}
|
|
1859
|
-
|
|
1860
|
-
this.wheeling = true;
|
|
1861
|
-
setTimeout(function () {
|
|
1862
|
-
_this.wheeling = false;
|
|
1863
|
-
}, 50);
|
|
1864
|
-
|
|
1865
|
-
if (event.deltaY) {
|
|
1866
|
-
delta = event.deltaY > 0 ? 1 : -1;
|
|
1867
|
-
} else if (event.wheelDelta) {
|
|
1868
|
-
delta = -event.wheelDelta / 120;
|
|
1869
|
-
} else if (event.detail) {
|
|
1870
|
-
delta = event.detail > 0 ? 1 : -1;
|
|
1871
|
-
}
|
|
1872
|
-
|
|
1873
|
-
this.zoom(-delta * ratio, event);
|
|
1874
|
-
},
|
|
1875
|
-
cropStart: function cropStart(event) {
|
|
1876
|
-
var buttons = event.buttons,
|
|
1877
|
-
button = event.button;
|
|
1878
|
-
|
|
1879
|
-
if (this.disabled // Handle mouse event and pointer event and ignore touch event
|
|
1880
|
-
|| (event.type === 'mousedown' || event.type === 'pointerdown' && event.pointerType === 'mouse') && ( // No primary button (Usually the left button)
|
|
1881
|
-
isNumber(buttons) && buttons !== 1 || isNumber(button) && button !== 0 // Open context menu
|
|
1882
|
-
|| event.ctrlKey)) {
|
|
1883
|
-
return;
|
|
1884
|
-
}
|
|
1885
|
-
|
|
1886
|
-
var options = this.options,
|
|
1887
|
-
pointers = this.pointers;
|
|
1888
|
-
var action;
|
|
1889
|
-
|
|
1890
|
-
if (event.changedTouches) {
|
|
1891
|
-
// Handle touch event
|
|
1892
|
-
forEach(event.changedTouches, function (touch) {
|
|
1893
|
-
pointers[touch.identifier] = getPointer(touch);
|
|
1894
|
-
});
|
|
1895
|
-
} else {
|
|
1896
|
-
// Handle mouse event and pointer event
|
|
1897
|
-
pointers[event.pointerId || 0] = getPointer(event);
|
|
1898
|
-
}
|
|
1899
|
-
|
|
1900
|
-
if (Object.keys(pointers).length > 1 && options.zoomable && options.zoomOnTouch) {
|
|
1901
|
-
action = ACTION_ZOOM;
|
|
1902
|
-
} else {
|
|
1903
|
-
action = getData(event.target, DATA_ACTION);
|
|
1904
|
-
}
|
|
1905
|
-
|
|
1906
|
-
if (!REGEXP_ACTIONS.test(action)) {
|
|
1907
|
-
return;
|
|
1908
|
-
}
|
|
1909
|
-
|
|
1910
|
-
if (dispatchEvent(this.element, EVENT_CROP_START, {
|
|
1911
|
-
originalEvent: event,
|
|
1912
|
-
action: action
|
|
1913
|
-
}) === false) {
|
|
1914
|
-
return;
|
|
1915
|
-
} // This line is required for preventing page zooming in iOS browsers
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
event.preventDefault();
|
|
1919
|
-
this.action = action;
|
|
1920
|
-
this.cropping = false;
|
|
1921
|
-
|
|
1922
|
-
if (action === ACTION_CROP) {
|
|
1923
|
-
this.cropping = true;
|
|
1924
|
-
addClass(this.dragBox, CLASS_MODAL);
|
|
1925
|
-
}
|
|
1926
|
-
},
|
|
1927
|
-
cropMove: function cropMove(event) {
|
|
1928
|
-
var action = this.action;
|
|
1929
|
-
|
|
1930
|
-
if (this.disabled || !action) {
|
|
1931
|
-
return;
|
|
1932
|
-
}
|
|
1933
|
-
|
|
1934
|
-
var pointers = this.pointers;
|
|
1935
|
-
event.preventDefault();
|
|
1936
|
-
|
|
1937
|
-
if (dispatchEvent(this.element, EVENT_CROP_MOVE, {
|
|
1938
|
-
originalEvent: event,
|
|
1939
|
-
action: action
|
|
1940
|
-
}) === false) {
|
|
1941
|
-
return;
|
|
1942
|
-
}
|
|
1943
|
-
|
|
1944
|
-
if (event.changedTouches) {
|
|
1945
|
-
forEach(event.changedTouches, function (touch) {
|
|
1946
|
-
// The first parameter should not be undefined (#432)
|
|
1947
|
-
assign(pointers[touch.identifier] || {}, getPointer(touch, true));
|
|
1948
|
-
});
|
|
1949
|
-
} else {
|
|
1950
|
-
assign(pointers[event.pointerId || 0] || {}, getPointer(event, true));
|
|
1951
|
-
}
|
|
1952
|
-
|
|
1953
|
-
this.change(event);
|
|
1954
|
-
},
|
|
1955
|
-
cropEnd: function cropEnd(event) {
|
|
1956
|
-
if (this.disabled) {
|
|
1957
|
-
return;
|
|
1958
|
-
}
|
|
1959
|
-
|
|
1960
|
-
var action = this.action,
|
|
1961
|
-
pointers = this.pointers;
|
|
1962
|
-
|
|
1963
|
-
if (event.changedTouches) {
|
|
1964
|
-
forEach(event.changedTouches, function (touch) {
|
|
1965
|
-
delete pointers[touch.identifier];
|
|
1966
|
-
});
|
|
1967
|
-
} else {
|
|
1968
|
-
delete pointers[event.pointerId || 0];
|
|
1969
|
-
}
|
|
1970
|
-
|
|
1971
|
-
if (!action) {
|
|
1972
|
-
return;
|
|
1973
|
-
}
|
|
1974
|
-
|
|
1975
|
-
event.preventDefault();
|
|
1976
|
-
|
|
1977
|
-
if (!Object.keys(pointers).length) {
|
|
1978
|
-
this.action = '';
|
|
1979
|
-
}
|
|
1980
|
-
|
|
1981
|
-
if (this.cropping) {
|
|
1982
|
-
this.cropping = false;
|
|
1983
|
-
toggleClass(this.dragBox, CLASS_MODAL, this.cropped && this.options.modal);
|
|
1984
|
-
}
|
|
1985
|
-
|
|
1986
|
-
dispatchEvent(this.element, EVENT_CROP_END, {
|
|
1987
|
-
originalEvent: event,
|
|
1988
|
-
action: action
|
|
1989
|
-
});
|
|
1990
|
-
}
|
|
1991
|
-
};
|
|
1992
|
-
|
|
1993
|
-
var change = {
|
|
1994
|
-
change: function change(event) {
|
|
1995
|
-
var options = this.options,
|
|
1996
|
-
canvasData = this.canvasData,
|
|
1997
|
-
containerData = this.containerData,
|
|
1998
|
-
cropBoxData = this.cropBoxData,
|
|
1999
|
-
pointers = this.pointers;
|
|
2000
|
-
var action = this.action;
|
|
2001
|
-
var aspectRatio = options.aspectRatio;
|
|
2002
|
-
var left = cropBoxData.left,
|
|
2003
|
-
top = cropBoxData.top,
|
|
2004
|
-
width = cropBoxData.width,
|
|
2005
|
-
height = cropBoxData.height;
|
|
2006
|
-
var right = left + width;
|
|
2007
|
-
var bottom = top + height;
|
|
2008
|
-
var minLeft = 0;
|
|
2009
|
-
var minTop = 0;
|
|
2010
|
-
var maxWidth = containerData.width;
|
|
2011
|
-
var maxHeight = containerData.height;
|
|
2012
|
-
var renderable = true;
|
|
2013
|
-
var offset; // Locking aspect ratio in "free mode" by holding shift key
|
|
2014
|
-
|
|
2015
|
-
if (!aspectRatio && event.shiftKey) {
|
|
2016
|
-
aspectRatio = width && height ? width / height : 1;
|
|
2017
|
-
}
|
|
2018
|
-
|
|
2019
|
-
if (this.limited) {
|
|
2020
|
-
minLeft = cropBoxData.minLeft;
|
|
2021
|
-
minTop = cropBoxData.minTop;
|
|
2022
|
-
maxWidth = minLeft + Math.min(containerData.width, canvasData.width, canvasData.left + canvasData.width);
|
|
2023
|
-
maxHeight = minTop + Math.min(containerData.height, canvasData.height, canvasData.top + canvasData.height);
|
|
2024
|
-
}
|
|
2025
|
-
|
|
2026
|
-
var pointer = pointers[Object.keys(pointers)[0]];
|
|
2027
|
-
var range = {
|
|
2028
|
-
x: pointer.endX - pointer.startX,
|
|
2029
|
-
y: pointer.endY - pointer.startY
|
|
2030
|
-
};
|
|
2031
|
-
|
|
2032
|
-
var check = function check(side) {
|
|
2033
|
-
switch (side) {
|
|
2034
|
-
case ACTION_EAST:
|
|
2035
|
-
if (right + range.x > maxWidth) {
|
|
2036
|
-
range.x = maxWidth - right;
|
|
2037
|
-
}
|
|
2038
|
-
|
|
2039
|
-
break;
|
|
2040
|
-
|
|
2041
|
-
case ACTION_WEST:
|
|
2042
|
-
if (left + range.x < minLeft) {
|
|
2043
|
-
range.x = minLeft - left;
|
|
2044
|
-
}
|
|
2045
|
-
|
|
2046
|
-
break;
|
|
2047
|
-
|
|
2048
|
-
case ACTION_NORTH:
|
|
2049
|
-
if (top + range.y < minTop) {
|
|
2050
|
-
range.y = minTop - top;
|
|
2051
|
-
}
|
|
2052
|
-
|
|
2053
|
-
break;
|
|
2054
|
-
|
|
2055
|
-
case ACTION_SOUTH:
|
|
2056
|
-
if (bottom + range.y > maxHeight) {
|
|
2057
|
-
range.y = maxHeight - bottom;
|
|
2058
|
-
}
|
|
2059
|
-
|
|
2060
|
-
break;
|
|
2061
|
-
|
|
2062
|
-
default:
|
|
2063
|
-
}
|
|
2064
|
-
};
|
|
2065
|
-
|
|
2066
|
-
switch (action) {
|
|
2067
|
-
// Move crop box
|
|
2068
|
-
case ACTION_ALL:
|
|
2069
|
-
left += range.x;
|
|
2070
|
-
top += range.y;
|
|
2071
|
-
break;
|
|
2072
|
-
// Resize crop box
|
|
2073
|
-
|
|
2074
|
-
case ACTION_EAST:
|
|
2075
|
-
if (range.x >= 0 && (right >= maxWidth || aspectRatio && (top <= minTop || bottom >= maxHeight))) {
|
|
2076
|
-
renderable = false;
|
|
2077
|
-
break;
|
|
2078
|
-
}
|
|
2079
|
-
|
|
2080
|
-
check(ACTION_EAST);
|
|
2081
|
-
width += range.x;
|
|
2082
|
-
|
|
2083
|
-
if (width < 0) {
|
|
2084
|
-
action = ACTION_WEST;
|
|
2085
|
-
width = -width;
|
|
2086
|
-
left -= width;
|
|
2087
|
-
}
|
|
2088
|
-
|
|
2089
|
-
if (aspectRatio) {
|
|
2090
|
-
height = width / aspectRatio;
|
|
2091
|
-
top += (cropBoxData.height - height) / 2;
|
|
2092
|
-
}
|
|
2093
|
-
|
|
2094
|
-
break;
|
|
2095
|
-
|
|
2096
|
-
case ACTION_NORTH:
|
|
2097
|
-
if (range.y <= 0 && (top <= minTop || aspectRatio && (left <= minLeft || right >= maxWidth))) {
|
|
2098
|
-
renderable = false;
|
|
2099
|
-
break;
|
|
2100
|
-
}
|
|
2101
|
-
|
|
2102
|
-
check(ACTION_NORTH);
|
|
2103
|
-
height -= range.y;
|
|
2104
|
-
top += range.y;
|
|
2105
|
-
|
|
2106
|
-
if (height < 0) {
|
|
2107
|
-
action = ACTION_SOUTH;
|
|
2108
|
-
height = -height;
|
|
2109
|
-
top -= height;
|
|
2110
|
-
}
|
|
2111
|
-
|
|
2112
|
-
if (aspectRatio) {
|
|
2113
|
-
width = height * aspectRatio;
|
|
2114
|
-
left += (cropBoxData.width - width) / 2;
|
|
2115
|
-
}
|
|
2116
|
-
|
|
2117
|
-
break;
|
|
2118
|
-
|
|
2119
|
-
case ACTION_WEST:
|
|
2120
|
-
if (range.x <= 0 && (left <= minLeft || aspectRatio && (top <= minTop || bottom >= maxHeight))) {
|
|
2121
|
-
renderable = false;
|
|
2122
|
-
break;
|
|
2123
|
-
}
|
|
2124
|
-
|
|
2125
|
-
check(ACTION_WEST);
|
|
2126
|
-
width -= range.x;
|
|
2127
|
-
left += range.x;
|
|
2128
|
-
|
|
2129
|
-
if (width < 0) {
|
|
2130
|
-
action = ACTION_EAST;
|
|
2131
|
-
width = -width;
|
|
2132
|
-
left -= width;
|
|
2133
|
-
}
|
|
2134
|
-
|
|
2135
|
-
if (aspectRatio) {
|
|
2136
|
-
height = width / aspectRatio;
|
|
2137
|
-
top += (cropBoxData.height - height) / 2;
|
|
2138
|
-
}
|
|
2139
|
-
|
|
2140
|
-
break;
|
|
2141
|
-
|
|
2142
|
-
case ACTION_SOUTH:
|
|
2143
|
-
if (range.y >= 0 && (bottom >= maxHeight || aspectRatio && (left <= minLeft || right >= maxWidth))) {
|
|
2144
|
-
renderable = false;
|
|
2145
|
-
break;
|
|
2146
|
-
}
|
|
2147
|
-
|
|
2148
|
-
check(ACTION_SOUTH);
|
|
2149
|
-
height += range.y;
|
|
2150
|
-
|
|
2151
|
-
if (height < 0) {
|
|
2152
|
-
action = ACTION_NORTH;
|
|
2153
|
-
height = -height;
|
|
2154
|
-
top -= height;
|
|
2155
|
-
}
|
|
2156
|
-
|
|
2157
|
-
if (aspectRatio) {
|
|
2158
|
-
width = height * aspectRatio;
|
|
2159
|
-
left += (cropBoxData.width - width) / 2;
|
|
2160
|
-
}
|
|
2161
|
-
|
|
2162
|
-
break;
|
|
2163
|
-
|
|
2164
|
-
case ACTION_NORTH_EAST:
|
|
2165
|
-
if (aspectRatio) {
|
|
2166
|
-
if (range.y <= 0 && (top <= minTop || right >= maxWidth)) {
|
|
2167
|
-
renderable = false;
|
|
2168
|
-
break;
|
|
2169
|
-
}
|
|
2170
|
-
|
|
2171
|
-
check(ACTION_NORTH);
|
|
2172
|
-
height -= range.y;
|
|
2173
|
-
top += range.y;
|
|
2174
|
-
width = height * aspectRatio;
|
|
2175
|
-
} else {
|
|
2176
|
-
check(ACTION_NORTH);
|
|
2177
|
-
check(ACTION_EAST);
|
|
2178
|
-
|
|
2179
|
-
if (range.x >= 0) {
|
|
2180
|
-
if (right < maxWidth) {
|
|
2181
|
-
width += range.x;
|
|
2182
|
-
} else if (range.y <= 0 && top <= minTop) {
|
|
2183
|
-
renderable = false;
|
|
2184
|
-
}
|
|
2185
|
-
} else {
|
|
2186
|
-
width += range.x;
|
|
2187
|
-
}
|
|
2188
|
-
|
|
2189
|
-
if (range.y <= 0) {
|
|
2190
|
-
if (top > minTop) {
|
|
2191
|
-
height -= range.y;
|
|
2192
|
-
top += range.y;
|
|
2193
|
-
}
|
|
2194
|
-
} else {
|
|
2195
|
-
height -= range.y;
|
|
2196
|
-
top += range.y;
|
|
2197
|
-
}
|
|
2198
|
-
}
|
|
2199
|
-
|
|
2200
|
-
if (width < 0 && height < 0) {
|
|
2201
|
-
action = ACTION_SOUTH_WEST;
|
|
2202
|
-
height = -height;
|
|
2203
|
-
width = -width;
|
|
2204
|
-
top -= height;
|
|
2205
|
-
left -= width;
|
|
2206
|
-
} else if (width < 0) {
|
|
2207
|
-
action = ACTION_NORTH_WEST;
|
|
2208
|
-
width = -width;
|
|
2209
|
-
left -= width;
|
|
2210
|
-
} else if (height < 0) {
|
|
2211
|
-
action = ACTION_SOUTH_EAST;
|
|
2212
|
-
height = -height;
|
|
2213
|
-
top -= height;
|
|
2214
|
-
}
|
|
2215
|
-
|
|
2216
|
-
break;
|
|
2217
|
-
|
|
2218
|
-
case ACTION_NORTH_WEST:
|
|
2219
|
-
if (aspectRatio) {
|
|
2220
|
-
if (range.y <= 0 && (top <= minTop || left <= minLeft)) {
|
|
2221
|
-
renderable = false;
|
|
2222
|
-
break;
|
|
2223
|
-
}
|
|
2224
|
-
|
|
2225
|
-
check(ACTION_NORTH);
|
|
2226
|
-
height -= range.y;
|
|
2227
|
-
top += range.y;
|
|
2228
|
-
width = height * aspectRatio;
|
|
2229
|
-
left += cropBoxData.width - width;
|
|
2230
|
-
} else {
|
|
2231
|
-
check(ACTION_NORTH);
|
|
2232
|
-
check(ACTION_WEST);
|
|
2233
|
-
|
|
2234
|
-
if (range.x <= 0) {
|
|
2235
|
-
if (left > minLeft) {
|
|
2236
|
-
width -= range.x;
|
|
2237
|
-
left += range.x;
|
|
2238
|
-
} else if (range.y <= 0 && top <= minTop) {
|
|
2239
|
-
renderable = false;
|
|
2240
|
-
}
|
|
2241
|
-
} else {
|
|
2242
|
-
width -= range.x;
|
|
2243
|
-
left += range.x;
|
|
2244
|
-
}
|
|
2245
|
-
|
|
2246
|
-
if (range.y <= 0) {
|
|
2247
|
-
if (top > minTop) {
|
|
2248
|
-
height -= range.y;
|
|
2249
|
-
top += range.y;
|
|
2250
|
-
}
|
|
2251
|
-
} else {
|
|
2252
|
-
height -= range.y;
|
|
2253
|
-
top += range.y;
|
|
2254
|
-
}
|
|
2255
|
-
}
|
|
2256
|
-
|
|
2257
|
-
if (width < 0 && height < 0) {
|
|
2258
|
-
action = ACTION_SOUTH_EAST;
|
|
2259
|
-
height = -height;
|
|
2260
|
-
width = -width;
|
|
2261
|
-
top -= height;
|
|
2262
|
-
left -= width;
|
|
2263
|
-
} else if (width < 0) {
|
|
2264
|
-
action = ACTION_NORTH_EAST;
|
|
2265
|
-
width = -width;
|
|
2266
|
-
left -= width;
|
|
2267
|
-
} else if (height < 0) {
|
|
2268
|
-
action = ACTION_SOUTH_WEST;
|
|
2269
|
-
height = -height;
|
|
2270
|
-
top -= height;
|
|
2271
|
-
}
|
|
2272
|
-
|
|
2273
|
-
break;
|
|
2274
|
-
|
|
2275
|
-
case ACTION_SOUTH_WEST:
|
|
2276
|
-
if (aspectRatio) {
|
|
2277
|
-
if (range.x <= 0 && (left <= minLeft || bottom >= maxHeight)) {
|
|
2278
|
-
renderable = false;
|
|
2279
|
-
break;
|
|
2280
|
-
}
|
|
2281
|
-
|
|
2282
|
-
check(ACTION_WEST);
|
|
2283
|
-
width -= range.x;
|
|
2284
|
-
left += range.x;
|
|
2285
|
-
height = width / aspectRatio;
|
|
2286
|
-
} else {
|
|
2287
|
-
check(ACTION_SOUTH);
|
|
2288
|
-
check(ACTION_WEST);
|
|
2289
|
-
|
|
2290
|
-
if (range.x <= 0) {
|
|
2291
|
-
if (left > minLeft) {
|
|
2292
|
-
width -= range.x;
|
|
2293
|
-
left += range.x;
|
|
2294
|
-
} else if (range.y >= 0 && bottom >= maxHeight) {
|
|
2295
|
-
renderable = false;
|
|
2296
|
-
}
|
|
2297
|
-
} else {
|
|
2298
|
-
width -= range.x;
|
|
2299
|
-
left += range.x;
|
|
2300
|
-
}
|
|
2301
|
-
|
|
2302
|
-
if (range.y >= 0) {
|
|
2303
|
-
if (bottom < maxHeight) {
|
|
2304
|
-
height += range.y;
|
|
2305
|
-
}
|
|
2306
|
-
} else {
|
|
2307
|
-
height += range.y;
|
|
2308
|
-
}
|
|
2309
|
-
}
|
|
2310
|
-
|
|
2311
|
-
if (width < 0 && height < 0) {
|
|
2312
|
-
action = ACTION_NORTH_EAST;
|
|
2313
|
-
height = -height;
|
|
2314
|
-
width = -width;
|
|
2315
|
-
top -= height;
|
|
2316
|
-
left -= width;
|
|
2317
|
-
} else if (width < 0) {
|
|
2318
|
-
action = ACTION_SOUTH_EAST;
|
|
2319
|
-
width = -width;
|
|
2320
|
-
left -= width;
|
|
2321
|
-
} else if (height < 0) {
|
|
2322
|
-
action = ACTION_NORTH_WEST;
|
|
2323
|
-
height = -height;
|
|
2324
|
-
top -= height;
|
|
2325
|
-
}
|
|
2326
|
-
|
|
2327
|
-
break;
|
|
2328
|
-
|
|
2329
|
-
case ACTION_SOUTH_EAST:
|
|
2330
|
-
if (aspectRatio) {
|
|
2331
|
-
if (range.x >= 0 && (right >= maxWidth || bottom >= maxHeight)) {
|
|
2332
|
-
renderable = false;
|
|
2333
|
-
break;
|
|
2334
|
-
}
|
|
2335
|
-
|
|
2336
|
-
check(ACTION_EAST);
|
|
2337
|
-
width += range.x;
|
|
2338
|
-
height = width / aspectRatio;
|
|
2339
|
-
} else {
|
|
2340
|
-
check(ACTION_SOUTH);
|
|
2341
|
-
check(ACTION_EAST);
|
|
2342
|
-
|
|
2343
|
-
if (range.x >= 0) {
|
|
2344
|
-
if (right < maxWidth) {
|
|
2345
|
-
width += range.x;
|
|
2346
|
-
} else if (range.y >= 0 && bottom >= maxHeight) {
|
|
2347
|
-
renderable = false;
|
|
2348
|
-
}
|
|
2349
|
-
} else {
|
|
2350
|
-
width += range.x;
|
|
2351
|
-
}
|
|
2352
|
-
|
|
2353
|
-
if (range.y >= 0) {
|
|
2354
|
-
if (bottom < maxHeight) {
|
|
2355
|
-
height += range.y;
|
|
2356
|
-
}
|
|
2357
|
-
} else {
|
|
2358
|
-
height += range.y;
|
|
2359
|
-
}
|
|
2360
|
-
}
|
|
2361
|
-
|
|
2362
|
-
if (width < 0 && height < 0) {
|
|
2363
|
-
action = ACTION_NORTH_WEST;
|
|
2364
|
-
height = -height;
|
|
2365
|
-
width = -width;
|
|
2366
|
-
top -= height;
|
|
2367
|
-
left -= width;
|
|
2368
|
-
} else if (width < 0) {
|
|
2369
|
-
action = ACTION_SOUTH_WEST;
|
|
2370
|
-
width = -width;
|
|
2371
|
-
left -= width;
|
|
2372
|
-
} else if (height < 0) {
|
|
2373
|
-
action = ACTION_NORTH_EAST;
|
|
2374
|
-
height = -height;
|
|
2375
|
-
top -= height;
|
|
2376
|
-
}
|
|
2377
|
-
|
|
2378
|
-
break;
|
|
2379
|
-
// Move canvas
|
|
2380
|
-
|
|
2381
|
-
case ACTION_MOVE:
|
|
2382
|
-
this.move(range.x, range.y);
|
|
2383
|
-
renderable = false;
|
|
2384
|
-
break;
|
|
2385
|
-
// Zoom canvas
|
|
2386
|
-
|
|
2387
|
-
case ACTION_ZOOM:
|
|
2388
|
-
this.zoom(getMaxZoomRatio(pointers), event);
|
|
2389
|
-
renderable = false;
|
|
2390
|
-
break;
|
|
2391
|
-
// Create crop box
|
|
2392
|
-
|
|
2393
|
-
case ACTION_CROP:
|
|
2394
|
-
if (!range.x || !range.y) {
|
|
2395
|
-
renderable = false;
|
|
2396
|
-
break;
|
|
2397
|
-
}
|
|
2398
|
-
|
|
2399
|
-
offset = getOffset(this.cropper);
|
|
2400
|
-
left = pointer.startX - offset.left;
|
|
2401
|
-
top = pointer.startY - offset.top;
|
|
2402
|
-
width = cropBoxData.minWidth;
|
|
2403
|
-
height = cropBoxData.minHeight;
|
|
2404
|
-
|
|
2405
|
-
if (range.x > 0) {
|
|
2406
|
-
action = range.y > 0 ? ACTION_SOUTH_EAST : ACTION_NORTH_EAST;
|
|
2407
|
-
} else if (range.x < 0) {
|
|
2408
|
-
left -= width;
|
|
2409
|
-
action = range.y > 0 ? ACTION_SOUTH_WEST : ACTION_NORTH_WEST;
|
|
2410
|
-
}
|
|
2411
|
-
|
|
2412
|
-
if (range.y < 0) {
|
|
2413
|
-
top -= height;
|
|
2414
|
-
} // Show the crop box if is hidden
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
if (!this.cropped) {
|
|
2418
|
-
removeClass(this.cropBox, CLASS_HIDDEN);
|
|
2419
|
-
this.cropped = true;
|
|
2420
|
-
|
|
2421
|
-
if (this.limited) {
|
|
2422
|
-
this.limitCropBox(true, true);
|
|
2423
|
-
}
|
|
2424
|
-
}
|
|
2425
|
-
|
|
2426
|
-
break;
|
|
2427
|
-
|
|
2428
|
-
default:
|
|
2429
|
-
}
|
|
2430
|
-
|
|
2431
|
-
if (renderable) {
|
|
2432
|
-
cropBoxData.width = width;
|
|
2433
|
-
cropBoxData.height = height;
|
|
2434
|
-
cropBoxData.left = left;
|
|
2435
|
-
cropBoxData.top = top;
|
|
2436
|
-
this.action = action;
|
|
2437
|
-
this.renderCropBox();
|
|
2438
|
-
} // Override
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
forEach(pointers, function (p) {
|
|
2442
|
-
p.startX = p.endX;
|
|
2443
|
-
p.startY = p.endY;
|
|
2444
|
-
});
|
|
2445
|
-
}
|
|
2446
|
-
};
|
|
2447
|
-
|
|
2448
|
-
var methods = {
|
|
2449
|
-
// Show the crop box manually
|
|
2450
|
-
crop: function crop() {
|
|
2451
|
-
if (this.ready && !this.cropped && !this.disabled) {
|
|
2452
|
-
this.cropped = true;
|
|
2453
|
-
this.limitCropBox(true, true);
|
|
2454
|
-
|
|
2455
|
-
if (this.options.modal) {
|
|
2456
|
-
addClass(this.dragBox, CLASS_MODAL);
|
|
2457
|
-
}
|
|
2458
|
-
|
|
2459
|
-
removeClass(this.cropBox, CLASS_HIDDEN);
|
|
2460
|
-
this.setCropBoxData(this.initialCropBoxData);
|
|
2461
|
-
}
|
|
2462
|
-
|
|
2463
|
-
return this;
|
|
2464
|
-
},
|
|
2465
|
-
// Reset the image and crop box to their initial states
|
|
2466
|
-
reset: function reset() {
|
|
2467
|
-
if (this.ready && !this.disabled) {
|
|
2468
|
-
this.imageData = assign({}, this.initialImageData);
|
|
2469
|
-
this.canvasData = assign({}, this.initialCanvasData);
|
|
2470
|
-
this.cropBoxData = assign({}, this.initialCropBoxData);
|
|
2471
|
-
this.renderCanvas();
|
|
2472
|
-
|
|
2473
|
-
if (this.cropped) {
|
|
2474
|
-
this.renderCropBox();
|
|
2475
|
-
}
|
|
2476
|
-
}
|
|
2477
|
-
|
|
2478
|
-
return this;
|
|
2479
|
-
},
|
|
2480
|
-
// Clear the crop box
|
|
2481
|
-
clear: function clear() {
|
|
2482
|
-
if (this.cropped && !this.disabled) {
|
|
2483
|
-
assign(this.cropBoxData, {
|
|
2484
|
-
left: 0,
|
|
2485
|
-
top: 0,
|
|
2486
|
-
width: 0,
|
|
2487
|
-
height: 0
|
|
2488
|
-
});
|
|
2489
|
-
this.cropped = false;
|
|
2490
|
-
this.renderCropBox();
|
|
2491
|
-
this.limitCanvas(true, true); // Render canvas after crop box rendered
|
|
2492
|
-
|
|
2493
|
-
this.renderCanvas();
|
|
2494
|
-
removeClass(this.dragBox, CLASS_MODAL);
|
|
2495
|
-
addClass(this.cropBox, CLASS_HIDDEN);
|
|
2496
|
-
}
|
|
2497
|
-
|
|
2498
|
-
return this;
|
|
2499
|
-
},
|
|
2500
|
-
|
|
2501
|
-
/**
|
|
2502
|
-
* Replace the image's src and rebuild the cropper
|
|
2503
|
-
* @param {string} url - The new URL.
|
|
2504
|
-
* @param {boolean} [hasSameSize] - Indicate if the new image has the same size as the old one.
|
|
2505
|
-
* @returns {Cropper} this
|
|
2506
|
-
*/
|
|
2507
|
-
replace: function replace(url) {
|
|
2508
|
-
var hasSameSize = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
2509
|
-
|
|
2510
|
-
if (!this.disabled && url) {
|
|
2511
|
-
if (this.isImg) {
|
|
2512
|
-
this.element.src = url;
|
|
2513
|
-
}
|
|
2514
|
-
|
|
2515
|
-
if (hasSameSize) {
|
|
2516
|
-
this.url = url;
|
|
2517
|
-
this.image.src = url;
|
|
2518
|
-
|
|
2519
|
-
if (this.ready) {
|
|
2520
|
-
this.viewBoxImage.src = url;
|
|
2521
|
-
forEach(this.previews, function (element) {
|
|
2522
|
-
element.getElementsByTagName('img')[0].src = url;
|
|
2523
|
-
});
|
|
2524
|
-
}
|
|
2525
|
-
} else {
|
|
2526
|
-
if (this.isImg) {
|
|
2527
|
-
this.replaced = true;
|
|
2528
|
-
}
|
|
2529
|
-
|
|
2530
|
-
this.options.data = null;
|
|
2531
|
-
this.uncreate();
|
|
2532
|
-
this.load(url);
|
|
2533
|
-
}
|
|
2534
|
-
}
|
|
2535
|
-
|
|
2536
|
-
return this;
|
|
2537
|
-
},
|
|
2538
|
-
// Enable (unfreeze) the cropper
|
|
2539
|
-
enable: function enable() {
|
|
2540
|
-
if (this.ready && this.disabled) {
|
|
2541
|
-
this.disabled = false;
|
|
2542
|
-
removeClass(this.cropper, CLASS_DISABLED);
|
|
2543
|
-
}
|
|
2544
|
-
|
|
2545
|
-
return this;
|
|
2546
|
-
},
|
|
2547
|
-
// Disable (freeze) the cropper
|
|
2548
|
-
disable: function disable() {
|
|
2549
|
-
if (this.ready && !this.disabled) {
|
|
2550
|
-
this.disabled = true;
|
|
2551
|
-
addClass(this.cropper, CLASS_DISABLED);
|
|
2552
|
-
}
|
|
2553
|
-
|
|
2554
|
-
return this;
|
|
2555
|
-
},
|
|
2556
|
-
|
|
2557
|
-
/**
|
|
2558
|
-
* Destroy the cropper and remove the instance from the image
|
|
2559
|
-
* @returns {Cropper} this
|
|
2560
|
-
*/
|
|
2561
|
-
destroy: function destroy() {
|
|
2562
|
-
var element = this.element;
|
|
2563
|
-
|
|
2564
|
-
if (!element[NAMESPACE]) {
|
|
2565
|
-
return this;
|
|
2566
|
-
}
|
|
2567
|
-
|
|
2568
|
-
element[NAMESPACE] = undefined;
|
|
2569
|
-
|
|
2570
|
-
if (this.isImg && this.replaced) {
|
|
2571
|
-
element.src = this.originalUrl;
|
|
2572
|
-
}
|
|
2573
|
-
|
|
2574
|
-
this.uncreate();
|
|
2575
|
-
return this;
|
|
2576
|
-
},
|
|
2577
|
-
|
|
2578
|
-
/**
|
|
2579
|
-
* Move the canvas with relative offsets
|
|
2580
|
-
* @param {number} offsetX - The relative offset distance on the x-axis.
|
|
2581
|
-
* @param {number} [offsetY=offsetX] - The relative offset distance on the y-axis.
|
|
2582
|
-
* @returns {Cropper} this
|
|
2583
|
-
*/
|
|
2584
|
-
move: function move(offsetX) {
|
|
2585
|
-
var offsetY = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : offsetX;
|
|
2586
|
-
var _this$canvasData = this.canvasData,
|
|
2587
|
-
left = _this$canvasData.left,
|
|
2588
|
-
top = _this$canvasData.top;
|
|
2589
|
-
return this.moveTo(isUndefined(offsetX) ? offsetX : left + Number(offsetX), isUndefined(offsetY) ? offsetY : top + Number(offsetY));
|
|
2590
|
-
},
|
|
2591
|
-
|
|
2592
|
-
/**
|
|
2593
|
-
* Move the canvas to an absolute point
|
|
2594
|
-
* @param {number} x - The x-axis coordinate.
|
|
2595
|
-
* @param {number} [y=x] - The y-axis coordinate.
|
|
2596
|
-
* @returns {Cropper} this
|
|
2597
|
-
*/
|
|
2598
|
-
moveTo: function moveTo(x) {
|
|
2599
|
-
var y = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : x;
|
|
2600
|
-
var canvasData = this.canvasData;
|
|
2601
|
-
var changed = false;
|
|
2602
|
-
x = Number(x);
|
|
2603
|
-
y = Number(y);
|
|
2604
|
-
|
|
2605
|
-
if (this.ready && !this.disabled && this.options.movable) {
|
|
2606
|
-
if (isNumber(x)) {
|
|
2607
|
-
canvasData.left = x;
|
|
2608
|
-
changed = true;
|
|
2609
|
-
}
|
|
2610
|
-
|
|
2611
|
-
if (isNumber(y)) {
|
|
2612
|
-
canvasData.top = y;
|
|
2613
|
-
changed = true;
|
|
2614
|
-
}
|
|
2615
|
-
|
|
2616
|
-
if (changed) {
|
|
2617
|
-
this.renderCanvas(true);
|
|
2618
|
-
}
|
|
2619
|
-
}
|
|
2620
|
-
|
|
2621
|
-
return this;
|
|
2622
|
-
},
|
|
2623
|
-
|
|
2624
|
-
/**
|
|
2625
|
-
* Zoom the canvas with a relative ratio
|
|
2626
|
-
* @param {number} ratio - The target ratio.
|
|
2627
|
-
* @param {Event} _originalEvent - The original event if any.
|
|
2628
|
-
* @returns {Cropper} this
|
|
2629
|
-
*/
|
|
2630
|
-
zoom: function zoom(ratio, _originalEvent) {
|
|
2631
|
-
var canvasData = this.canvasData;
|
|
2632
|
-
ratio = Number(ratio);
|
|
2633
|
-
|
|
2634
|
-
if (ratio < 0) {
|
|
2635
|
-
ratio = 1 / (1 - ratio);
|
|
2636
|
-
} else {
|
|
2637
|
-
ratio = 1 + ratio;
|
|
2638
|
-
}
|
|
2639
|
-
|
|
2640
|
-
return this.zoomTo(canvasData.width * ratio / canvasData.naturalWidth, null, _originalEvent);
|
|
2641
|
-
},
|
|
2642
|
-
|
|
2643
|
-
/**
|
|
2644
|
-
* Zoom the canvas to an absolute ratio
|
|
2645
|
-
* @param {number} ratio - The target ratio.
|
|
2646
|
-
* @param {Object} pivot - The zoom pivot point coordinate.
|
|
2647
|
-
* @param {Event} _originalEvent - The original event if any.
|
|
2648
|
-
* @returns {Cropper} this
|
|
2649
|
-
*/
|
|
2650
|
-
zoomTo: function zoomTo(ratio, pivot, _originalEvent) {
|
|
2651
|
-
var options = this.options,
|
|
2652
|
-
canvasData = this.canvasData;
|
|
2653
|
-
var width = canvasData.width,
|
|
2654
|
-
height = canvasData.height,
|
|
2655
|
-
naturalWidth = canvasData.naturalWidth,
|
|
2656
|
-
naturalHeight = canvasData.naturalHeight;
|
|
2657
|
-
ratio = Number(ratio);
|
|
2658
|
-
|
|
2659
|
-
if (ratio >= 0 && this.ready && !this.disabled && options.zoomable) {
|
|
2660
|
-
var newWidth = naturalWidth * ratio;
|
|
2661
|
-
var newHeight = naturalHeight * ratio;
|
|
2662
|
-
|
|
2663
|
-
if (dispatchEvent(this.element, EVENT_ZOOM, {
|
|
2664
|
-
ratio: ratio,
|
|
2665
|
-
oldRatio: width / naturalWidth,
|
|
2666
|
-
originalEvent: _originalEvent
|
|
2667
|
-
}) === false) {
|
|
2668
|
-
return this;
|
|
2669
|
-
}
|
|
2670
|
-
|
|
2671
|
-
if (_originalEvent) {
|
|
2672
|
-
var pointers = this.pointers;
|
|
2673
|
-
var offset = getOffset(this.cropper);
|
|
2674
|
-
var center = pointers && Object.keys(pointers).length ? getPointersCenter(pointers) : {
|
|
2675
|
-
pageX: _originalEvent.pageX,
|
|
2676
|
-
pageY: _originalEvent.pageY
|
|
2677
|
-
}; // Zoom from the triggering point of the event
|
|
2678
|
-
|
|
2679
|
-
canvasData.left -= (newWidth - width) * ((center.pageX - offset.left - canvasData.left) / width);
|
|
2680
|
-
canvasData.top -= (newHeight - height) * ((center.pageY - offset.top - canvasData.top) / height);
|
|
2681
|
-
} else if (isPlainObject(pivot) && isNumber(pivot.x) && isNumber(pivot.y)) {
|
|
2682
|
-
canvasData.left -= (newWidth - width) * ((pivot.x - canvasData.left) / width);
|
|
2683
|
-
canvasData.top -= (newHeight - height) * ((pivot.y - canvasData.top) / height);
|
|
2684
|
-
} else {
|
|
2685
|
-
// Zoom from the center of the canvas
|
|
2686
|
-
canvasData.left -= (newWidth - width) / 2;
|
|
2687
|
-
canvasData.top -= (newHeight - height) / 2;
|
|
2688
|
-
}
|
|
2689
|
-
|
|
2690
|
-
canvasData.width = newWidth;
|
|
2691
|
-
canvasData.height = newHeight;
|
|
2692
|
-
this.renderCanvas(true);
|
|
2693
|
-
}
|
|
2694
|
-
|
|
2695
|
-
return this;
|
|
2696
|
-
},
|
|
2697
|
-
|
|
2698
|
-
/**
|
|
2699
|
-
* Rotate the canvas with a relative degree
|
|
2700
|
-
* @param {number} degree - The rotate degree.
|
|
2701
|
-
* @returns {Cropper} this
|
|
2702
|
-
*/
|
|
2703
|
-
rotate: function rotate(degree) {
|
|
2704
|
-
return this.rotateTo((this.imageData.rotate || 0) + Number(degree));
|
|
2705
|
-
},
|
|
2706
|
-
|
|
2707
|
-
/**
|
|
2708
|
-
* Rotate the canvas to an absolute degree
|
|
2709
|
-
* @param {number} degree - The rotate degree.
|
|
2710
|
-
* @returns {Cropper} this
|
|
2711
|
-
*/
|
|
2712
|
-
rotateTo: function rotateTo(degree) {
|
|
2713
|
-
degree = Number(degree);
|
|
2714
|
-
|
|
2715
|
-
if (isNumber(degree) && this.ready && !this.disabled && this.options.rotatable) {
|
|
2716
|
-
this.imageData.rotate = degree % 360;
|
|
2717
|
-
this.renderCanvas(true, true);
|
|
2718
|
-
}
|
|
2719
|
-
|
|
2720
|
-
return this;
|
|
2721
|
-
},
|
|
2722
|
-
|
|
2723
|
-
/**
|
|
2724
|
-
* Scale the image on the x-axis.
|
|
2725
|
-
* @param {number} scaleX - The scale ratio on the x-axis.
|
|
2726
|
-
* @returns {Cropper} this
|
|
2727
|
-
*/
|
|
2728
|
-
scaleX: function scaleX(_scaleX) {
|
|
2729
|
-
var scaleY = this.imageData.scaleY;
|
|
2730
|
-
return this.scale(_scaleX, isNumber(scaleY) ? scaleY : 1);
|
|
2731
|
-
},
|
|
2732
|
-
|
|
2733
|
-
/**
|
|
2734
|
-
* Scale the image on the y-axis.
|
|
2735
|
-
* @param {number} scaleY - The scale ratio on the y-axis.
|
|
2736
|
-
* @returns {Cropper} this
|
|
2737
|
-
*/
|
|
2738
|
-
scaleY: function scaleY(_scaleY) {
|
|
2739
|
-
var scaleX = this.imageData.scaleX;
|
|
2740
|
-
return this.scale(isNumber(scaleX) ? scaleX : 1, _scaleY);
|
|
2741
|
-
},
|
|
2742
|
-
|
|
2743
|
-
/**
|
|
2744
|
-
* Scale the image
|
|
2745
|
-
* @param {number} scaleX - The scale ratio on the x-axis.
|
|
2746
|
-
* @param {number} [scaleY=scaleX] - The scale ratio on the y-axis.
|
|
2747
|
-
* @returns {Cropper} this
|
|
2748
|
-
*/
|
|
2749
|
-
scale: function scale(scaleX) {
|
|
2750
|
-
var scaleY = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : scaleX;
|
|
2751
|
-
var imageData = this.imageData;
|
|
2752
|
-
var transformed = false;
|
|
2753
|
-
scaleX = Number(scaleX);
|
|
2754
|
-
scaleY = Number(scaleY);
|
|
2755
|
-
|
|
2756
|
-
if (this.ready && !this.disabled && this.options.scalable) {
|
|
2757
|
-
if (isNumber(scaleX)) {
|
|
2758
|
-
imageData.scaleX = scaleX;
|
|
2759
|
-
transformed = true;
|
|
2760
|
-
}
|
|
2761
|
-
|
|
2762
|
-
if (isNumber(scaleY)) {
|
|
2763
|
-
imageData.scaleY = scaleY;
|
|
2764
|
-
transformed = true;
|
|
2765
|
-
}
|
|
2766
|
-
|
|
2767
|
-
if (transformed) {
|
|
2768
|
-
this.renderCanvas(true, true);
|
|
2769
|
-
}
|
|
2770
|
-
}
|
|
2771
|
-
|
|
2772
|
-
return this;
|
|
2773
|
-
},
|
|
2774
|
-
|
|
2775
|
-
/**
|
|
2776
|
-
* Get the cropped area position and size data (base on the original image)
|
|
2777
|
-
* @param {boolean} [rounded=false] - Indicate if round the data values or not.
|
|
2778
|
-
* @returns {Object} The result cropped data.
|
|
2779
|
-
*/
|
|
2780
|
-
getData: function getData() {
|
|
2781
|
-
var rounded = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
2782
|
-
var options = this.options,
|
|
2783
|
-
imageData = this.imageData,
|
|
2784
|
-
canvasData = this.canvasData,
|
|
2785
|
-
cropBoxData = this.cropBoxData;
|
|
2786
|
-
var data;
|
|
2787
|
-
|
|
2788
|
-
if (this.ready && this.cropped) {
|
|
2789
|
-
data = {
|
|
2790
|
-
x: cropBoxData.left - canvasData.left,
|
|
2791
|
-
y: cropBoxData.top - canvasData.top,
|
|
2792
|
-
width: cropBoxData.width,
|
|
2793
|
-
height: cropBoxData.height
|
|
2794
|
-
};
|
|
2795
|
-
var ratio = imageData.width / imageData.naturalWidth;
|
|
2796
|
-
forEach(data, function (n, i) {
|
|
2797
|
-
data[i] = n / ratio;
|
|
2798
|
-
});
|
|
2799
|
-
|
|
2800
|
-
if (rounded) {
|
|
2801
|
-
// In case rounding off leads to extra 1px in right or bottom border
|
|
2802
|
-
// we should round the top-left corner and the dimension (#343).
|
|
2803
|
-
var bottom = Math.round(data.y + data.height);
|
|
2804
|
-
var right = Math.round(data.x + data.width);
|
|
2805
|
-
data.x = Math.round(data.x);
|
|
2806
|
-
data.y = Math.round(data.y);
|
|
2807
|
-
data.width = right - data.x;
|
|
2808
|
-
data.height = bottom - data.y;
|
|
2809
|
-
}
|
|
2810
|
-
} else {
|
|
2811
|
-
data = {
|
|
2812
|
-
x: 0,
|
|
2813
|
-
y: 0,
|
|
2814
|
-
width: 0,
|
|
2815
|
-
height: 0
|
|
2816
|
-
};
|
|
2817
|
-
}
|
|
2818
|
-
|
|
2819
|
-
if (options.rotatable) {
|
|
2820
|
-
data.rotate = imageData.rotate || 0;
|
|
2821
|
-
}
|
|
2822
|
-
|
|
2823
|
-
if (options.scalable) {
|
|
2824
|
-
data.scaleX = imageData.scaleX || 1;
|
|
2825
|
-
data.scaleY = imageData.scaleY || 1;
|
|
2826
|
-
}
|
|
2827
|
-
|
|
2828
|
-
return data;
|
|
2829
|
-
},
|
|
2830
|
-
|
|
2831
|
-
/**
|
|
2832
|
-
* Set the cropped area position and size with new data
|
|
2833
|
-
* @param {Object} data - The new data.
|
|
2834
|
-
* @returns {Cropper} this
|
|
2835
|
-
*/
|
|
2836
|
-
setData: function setData(data) {
|
|
2837
|
-
var options = this.options,
|
|
2838
|
-
imageData = this.imageData,
|
|
2839
|
-
canvasData = this.canvasData;
|
|
2840
|
-
var cropBoxData = {};
|
|
2841
|
-
|
|
2842
|
-
if (this.ready && !this.disabled && isPlainObject(data)) {
|
|
2843
|
-
var transformed = false;
|
|
2844
|
-
|
|
2845
|
-
if (options.rotatable) {
|
|
2846
|
-
if (isNumber(data.rotate) && data.rotate !== imageData.rotate) {
|
|
2847
|
-
imageData.rotate = data.rotate;
|
|
2848
|
-
transformed = true;
|
|
2849
|
-
}
|
|
2850
|
-
}
|
|
2851
|
-
|
|
2852
|
-
if (options.scalable) {
|
|
2853
|
-
if (isNumber(data.scaleX) && data.scaleX !== imageData.scaleX) {
|
|
2854
|
-
imageData.scaleX = data.scaleX;
|
|
2855
|
-
transformed = true;
|
|
2856
|
-
}
|
|
2857
|
-
|
|
2858
|
-
if (isNumber(data.scaleY) && data.scaleY !== imageData.scaleY) {
|
|
2859
|
-
imageData.scaleY = data.scaleY;
|
|
2860
|
-
transformed = true;
|
|
2861
|
-
}
|
|
2862
|
-
}
|
|
2863
|
-
|
|
2864
|
-
if (transformed) {
|
|
2865
|
-
this.renderCanvas(true, true);
|
|
2866
|
-
}
|
|
2867
|
-
|
|
2868
|
-
var ratio = imageData.width / imageData.naturalWidth;
|
|
2869
|
-
|
|
2870
|
-
if (isNumber(data.x)) {
|
|
2871
|
-
cropBoxData.left = data.x * ratio + canvasData.left;
|
|
2872
|
-
}
|
|
2873
|
-
|
|
2874
|
-
if (isNumber(data.y)) {
|
|
2875
|
-
cropBoxData.top = data.y * ratio + canvasData.top;
|
|
2876
|
-
}
|
|
2877
|
-
|
|
2878
|
-
if (isNumber(data.width)) {
|
|
2879
|
-
cropBoxData.width = data.width * ratio;
|
|
2880
|
-
}
|
|
2881
|
-
|
|
2882
|
-
if (isNumber(data.height)) {
|
|
2883
|
-
cropBoxData.height = data.height * ratio;
|
|
2884
|
-
}
|
|
2885
|
-
|
|
2886
|
-
this.setCropBoxData(cropBoxData);
|
|
2887
|
-
}
|
|
2888
|
-
|
|
2889
|
-
return this;
|
|
2890
|
-
},
|
|
2891
|
-
|
|
2892
|
-
/**
|
|
2893
|
-
* Get the container size data.
|
|
2894
|
-
* @returns {Object} The result container data.
|
|
2895
|
-
*/
|
|
2896
|
-
getContainerData: function getContainerData() {
|
|
2897
|
-
return this.ready ? assign({}, this.containerData) : {};
|
|
2898
|
-
},
|
|
2899
|
-
|
|
2900
|
-
/**
|
|
2901
|
-
* Get the image position and size data.
|
|
2902
|
-
* @returns {Object} The result image data.
|
|
2903
|
-
*/
|
|
2904
|
-
getImageData: function getImageData() {
|
|
2905
|
-
return this.sized ? assign({}, this.imageData) : {};
|
|
2906
|
-
},
|
|
2907
|
-
|
|
2908
|
-
/**
|
|
2909
|
-
* Get the canvas position and size data.
|
|
2910
|
-
* @returns {Object} The result canvas data.
|
|
2911
|
-
*/
|
|
2912
|
-
getCanvasData: function getCanvasData() {
|
|
2913
|
-
var canvasData = this.canvasData;
|
|
2914
|
-
var data = {};
|
|
2915
|
-
|
|
2916
|
-
if (this.ready) {
|
|
2917
|
-
forEach(['left', 'top', 'width', 'height', 'naturalWidth', 'naturalHeight'], function (n) {
|
|
2918
|
-
data[n] = canvasData[n];
|
|
2919
|
-
});
|
|
2920
|
-
}
|
|
2921
|
-
|
|
2922
|
-
return data;
|
|
2923
|
-
},
|
|
2924
|
-
|
|
2925
|
-
/**
|
|
2926
|
-
* Set the canvas position and size with new data.
|
|
2927
|
-
* @param {Object} data - The new canvas data.
|
|
2928
|
-
* @returns {Cropper} this
|
|
2929
|
-
*/
|
|
2930
|
-
setCanvasData: function setCanvasData(data) {
|
|
2931
|
-
var canvasData = this.canvasData;
|
|
2932
|
-
var aspectRatio = canvasData.aspectRatio;
|
|
2933
|
-
|
|
2934
|
-
if (this.ready && !this.disabled && isPlainObject(data)) {
|
|
2935
|
-
if (isNumber(data.left)) {
|
|
2936
|
-
canvasData.left = data.left;
|
|
2937
|
-
}
|
|
2938
|
-
|
|
2939
|
-
if (isNumber(data.top)) {
|
|
2940
|
-
canvasData.top = data.top;
|
|
2941
|
-
}
|
|
2942
|
-
|
|
2943
|
-
if (isNumber(data.width)) {
|
|
2944
|
-
canvasData.width = data.width;
|
|
2945
|
-
canvasData.height = data.width / aspectRatio;
|
|
2946
|
-
} else if (isNumber(data.height)) {
|
|
2947
|
-
canvasData.height = data.height;
|
|
2948
|
-
canvasData.width = data.height * aspectRatio;
|
|
2949
|
-
}
|
|
2950
|
-
|
|
2951
|
-
this.renderCanvas(true);
|
|
2952
|
-
}
|
|
2953
|
-
|
|
2954
|
-
return this;
|
|
2955
|
-
},
|
|
2956
|
-
|
|
2957
|
-
/**
|
|
2958
|
-
* Get the crop box position and size data.
|
|
2959
|
-
* @returns {Object} The result crop box data.
|
|
2960
|
-
*/
|
|
2961
|
-
getCropBoxData: function getCropBoxData() {
|
|
2962
|
-
var cropBoxData = this.cropBoxData;
|
|
2963
|
-
var data;
|
|
2964
|
-
|
|
2965
|
-
if (this.ready && this.cropped) {
|
|
2966
|
-
data = {
|
|
2967
|
-
left: cropBoxData.left,
|
|
2968
|
-
top: cropBoxData.top,
|
|
2969
|
-
width: cropBoxData.width,
|
|
2970
|
-
height: cropBoxData.height
|
|
2971
|
-
};
|
|
2972
|
-
}
|
|
2973
|
-
|
|
2974
|
-
return data || {};
|
|
2975
|
-
},
|
|
2976
|
-
|
|
2977
|
-
/**
|
|
2978
|
-
* Set the crop box position and size with new data.
|
|
2979
|
-
* @param {Object} data - The new crop box data.
|
|
2980
|
-
* @returns {Cropper} this
|
|
2981
|
-
*/
|
|
2982
|
-
setCropBoxData: function setCropBoxData(data) {
|
|
2983
|
-
var cropBoxData = this.cropBoxData;
|
|
2984
|
-
var aspectRatio = this.options.aspectRatio;
|
|
2985
|
-
var widthChanged;
|
|
2986
|
-
var heightChanged;
|
|
2987
|
-
|
|
2988
|
-
if (this.ready && this.cropped && !this.disabled && isPlainObject(data)) {
|
|
2989
|
-
if (isNumber(data.left)) {
|
|
2990
|
-
cropBoxData.left = data.left;
|
|
2991
|
-
}
|
|
2992
|
-
|
|
2993
|
-
if (isNumber(data.top)) {
|
|
2994
|
-
cropBoxData.top = data.top;
|
|
2995
|
-
}
|
|
2996
|
-
|
|
2997
|
-
if (isNumber(data.width) && data.width !== cropBoxData.width) {
|
|
2998
|
-
widthChanged = true;
|
|
2999
|
-
cropBoxData.width = data.width;
|
|
3000
|
-
}
|
|
3001
|
-
|
|
3002
|
-
if (isNumber(data.height) && data.height !== cropBoxData.height) {
|
|
3003
|
-
heightChanged = true;
|
|
3004
|
-
cropBoxData.height = data.height;
|
|
3005
|
-
}
|
|
3006
|
-
|
|
3007
|
-
if (aspectRatio) {
|
|
3008
|
-
if (widthChanged) {
|
|
3009
|
-
cropBoxData.height = cropBoxData.width / aspectRatio;
|
|
3010
|
-
} else if (heightChanged) {
|
|
3011
|
-
cropBoxData.width = cropBoxData.height * aspectRatio;
|
|
3012
|
-
}
|
|
3013
|
-
}
|
|
3014
|
-
|
|
3015
|
-
this.renderCropBox();
|
|
3016
|
-
}
|
|
3017
|
-
|
|
3018
|
-
return this;
|
|
3019
|
-
},
|
|
3020
|
-
|
|
3021
|
-
/**
|
|
3022
|
-
* Get a canvas drawn the cropped image.
|
|
3023
|
-
* @param {Object} [options={}] - The config options.
|
|
3024
|
-
* @returns {HTMLCanvasElement} - The result canvas.
|
|
3025
|
-
*/
|
|
3026
|
-
getCroppedCanvas: function getCroppedCanvas() {
|
|
3027
|
-
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
3028
|
-
|
|
3029
|
-
if (!this.ready || !window.HTMLCanvasElement) {
|
|
3030
|
-
return null;
|
|
3031
|
-
}
|
|
3032
|
-
|
|
3033
|
-
var canvasData = this.canvasData;
|
|
3034
|
-
var source = getSourceCanvas(this.image, this.imageData, canvasData, options); // Returns the source canvas if it is not cropped.
|
|
3035
|
-
|
|
3036
|
-
if (!this.cropped) {
|
|
3037
|
-
return source;
|
|
3038
|
-
}
|
|
3039
|
-
|
|
3040
|
-
var _this$getData = this.getData(),
|
|
3041
|
-
initialX = _this$getData.x,
|
|
3042
|
-
initialY = _this$getData.y,
|
|
3043
|
-
initialWidth = _this$getData.width,
|
|
3044
|
-
initialHeight = _this$getData.height;
|
|
3045
|
-
|
|
3046
|
-
var ratio = source.width / Math.floor(canvasData.naturalWidth);
|
|
3047
|
-
|
|
3048
|
-
if (ratio !== 1) {
|
|
3049
|
-
initialX *= ratio;
|
|
3050
|
-
initialY *= ratio;
|
|
3051
|
-
initialWidth *= ratio;
|
|
3052
|
-
initialHeight *= ratio;
|
|
3053
|
-
}
|
|
3054
|
-
|
|
3055
|
-
var aspectRatio = initialWidth / initialHeight;
|
|
3056
|
-
var maxSizes = getAdjustedSizes({
|
|
3057
|
-
aspectRatio: aspectRatio,
|
|
3058
|
-
width: options.maxWidth || Infinity,
|
|
3059
|
-
height: options.maxHeight || Infinity
|
|
3060
|
-
});
|
|
3061
|
-
var minSizes = getAdjustedSizes({
|
|
3062
|
-
aspectRatio: aspectRatio,
|
|
3063
|
-
width: options.minWidth || 0,
|
|
3064
|
-
height: options.minHeight || 0
|
|
3065
|
-
}, 'cover');
|
|
3066
|
-
|
|
3067
|
-
var _getAdjustedSizes = getAdjustedSizes({
|
|
3068
|
-
aspectRatio: aspectRatio,
|
|
3069
|
-
width: options.width || (ratio !== 1 ? source.width : initialWidth),
|
|
3070
|
-
height: options.height || (ratio !== 1 ? source.height : initialHeight)
|
|
3071
|
-
}),
|
|
3072
|
-
width = _getAdjustedSizes.width,
|
|
3073
|
-
height = _getAdjustedSizes.height;
|
|
3074
|
-
|
|
3075
|
-
width = Math.min(maxSizes.width, Math.max(minSizes.width, width));
|
|
3076
|
-
height = Math.min(maxSizes.height, Math.max(minSizes.height, height));
|
|
3077
|
-
var canvas = document.createElement('canvas');
|
|
3078
|
-
var context = canvas.getContext('2d');
|
|
3079
|
-
canvas.width = normalizeDecimalNumber(width);
|
|
3080
|
-
canvas.height = normalizeDecimalNumber(height);
|
|
3081
|
-
context.fillStyle = options.fillColor || 'transparent';
|
|
3082
|
-
context.fillRect(0, 0, width, height);
|
|
3083
|
-
var _options$imageSmoothi = options.imageSmoothingEnabled,
|
|
3084
|
-
imageSmoothingEnabled = _options$imageSmoothi === void 0 ? true : _options$imageSmoothi,
|
|
3085
|
-
imageSmoothingQuality = options.imageSmoothingQuality;
|
|
3086
|
-
context.imageSmoothingEnabled = imageSmoothingEnabled;
|
|
3087
|
-
|
|
3088
|
-
if (imageSmoothingQuality) {
|
|
3089
|
-
context.imageSmoothingQuality = imageSmoothingQuality;
|
|
3090
|
-
} // https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.drawImage
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
var sourceWidth = source.width;
|
|
3094
|
-
var sourceHeight = source.height; // Source canvas parameters
|
|
3095
|
-
|
|
3096
|
-
var srcX = initialX;
|
|
3097
|
-
var srcY = initialY;
|
|
3098
|
-
var srcWidth;
|
|
3099
|
-
var srcHeight; // Destination canvas parameters
|
|
3100
|
-
|
|
3101
|
-
var dstX;
|
|
3102
|
-
var dstY;
|
|
3103
|
-
var dstWidth;
|
|
3104
|
-
var dstHeight;
|
|
3105
|
-
|
|
3106
|
-
if (srcX <= -initialWidth || srcX > sourceWidth) {
|
|
3107
|
-
srcX = 0;
|
|
3108
|
-
srcWidth = 0;
|
|
3109
|
-
dstX = 0;
|
|
3110
|
-
dstWidth = 0;
|
|
3111
|
-
} else if (srcX <= 0) {
|
|
3112
|
-
dstX = -srcX;
|
|
3113
|
-
srcX = 0;
|
|
3114
|
-
srcWidth = Math.min(sourceWidth, initialWidth + srcX);
|
|
3115
|
-
dstWidth = srcWidth;
|
|
3116
|
-
} else if (srcX <= sourceWidth) {
|
|
3117
|
-
dstX = 0;
|
|
3118
|
-
srcWidth = Math.min(initialWidth, sourceWidth - srcX);
|
|
3119
|
-
dstWidth = srcWidth;
|
|
3120
|
-
}
|
|
3121
|
-
|
|
3122
|
-
if (srcWidth <= 0 || srcY <= -initialHeight || srcY > sourceHeight) {
|
|
3123
|
-
srcY = 0;
|
|
3124
|
-
srcHeight = 0;
|
|
3125
|
-
dstY = 0;
|
|
3126
|
-
dstHeight = 0;
|
|
3127
|
-
} else if (srcY <= 0) {
|
|
3128
|
-
dstY = -srcY;
|
|
3129
|
-
srcY = 0;
|
|
3130
|
-
srcHeight = Math.min(sourceHeight, initialHeight + srcY);
|
|
3131
|
-
dstHeight = srcHeight;
|
|
3132
|
-
} else if (srcY <= sourceHeight) {
|
|
3133
|
-
dstY = 0;
|
|
3134
|
-
srcHeight = Math.min(initialHeight, sourceHeight - srcY);
|
|
3135
|
-
dstHeight = srcHeight;
|
|
3136
|
-
}
|
|
3137
|
-
|
|
3138
|
-
var params = [srcX, srcY, srcWidth, srcHeight]; // Avoid "IndexSizeError"
|
|
3139
|
-
|
|
3140
|
-
if (dstWidth > 0 && dstHeight > 0) {
|
|
3141
|
-
var scale = width / initialWidth;
|
|
3142
|
-
params.push(dstX * scale, dstY * scale, dstWidth * scale, dstHeight * scale);
|
|
3143
|
-
} // All the numerical parameters should be integer for `drawImage`
|
|
3144
|
-
// https://github.com/fengyuanchen/cropper/issues/476
|
|
3145
|
-
|
|
3146
|
-
|
|
3147
|
-
context.drawImage.apply(context, [source].concat(_toConsumableArray(params.map(function (param) {
|
|
3148
|
-
return Math.floor(normalizeDecimalNumber(param));
|
|
3149
|
-
}))));
|
|
3150
|
-
return canvas;
|
|
3151
|
-
},
|
|
3152
|
-
|
|
3153
|
-
/**
|
|
3154
|
-
* Change the aspect ratio of the crop box.
|
|
3155
|
-
* @param {number} aspectRatio - The new aspect ratio.
|
|
3156
|
-
* @returns {Cropper} this
|
|
3157
|
-
*/
|
|
3158
|
-
setAspectRatio: function setAspectRatio(aspectRatio) {
|
|
3159
|
-
var options = this.options;
|
|
3160
|
-
|
|
3161
|
-
if (!this.disabled && !isUndefined(aspectRatio)) {
|
|
3162
|
-
// 0 -> NaN
|
|
3163
|
-
options.aspectRatio = Math.max(0, aspectRatio) || NaN;
|
|
3164
|
-
|
|
3165
|
-
if (this.ready) {
|
|
3166
|
-
this.initCropBox();
|
|
3167
|
-
|
|
3168
|
-
if (this.cropped) {
|
|
3169
|
-
this.renderCropBox();
|
|
3170
|
-
}
|
|
3171
|
-
}
|
|
3172
|
-
}
|
|
3173
|
-
|
|
3174
|
-
return this;
|
|
3175
|
-
},
|
|
3176
|
-
|
|
3177
|
-
/**
|
|
3178
|
-
* Change the drag mode.
|
|
3179
|
-
* @param {string} mode - The new drag mode.
|
|
3180
|
-
* @returns {Cropper} this
|
|
3181
|
-
*/
|
|
3182
|
-
setDragMode: function setDragMode(mode) {
|
|
3183
|
-
var options = this.options,
|
|
3184
|
-
dragBox = this.dragBox,
|
|
3185
|
-
face = this.face;
|
|
3186
|
-
|
|
3187
|
-
if (this.ready && !this.disabled) {
|
|
3188
|
-
var croppable = mode === DRAG_MODE_CROP;
|
|
3189
|
-
var movable = options.movable && mode === DRAG_MODE_MOVE;
|
|
3190
|
-
mode = croppable || movable ? mode : DRAG_MODE_NONE;
|
|
3191
|
-
options.dragMode = mode;
|
|
3192
|
-
setData(dragBox, DATA_ACTION, mode);
|
|
3193
|
-
toggleClass(dragBox, CLASS_CROP, croppable);
|
|
3194
|
-
toggleClass(dragBox, CLASS_MOVE, movable);
|
|
3195
|
-
|
|
3196
|
-
if (!options.cropBoxMovable) {
|
|
3197
|
-
// Sync drag mode to crop box when it is not movable
|
|
3198
|
-
setData(face, DATA_ACTION, mode);
|
|
3199
|
-
toggleClass(face, CLASS_CROP, croppable);
|
|
3200
|
-
toggleClass(face, CLASS_MOVE, movable);
|
|
3201
|
-
}
|
|
3202
|
-
}
|
|
3203
|
-
|
|
3204
|
-
return this;
|
|
3205
|
-
}
|
|
3206
|
-
};
|
|
3207
|
-
|
|
3208
|
-
var AnotherCropper = WINDOW.Cropper;
|
|
3209
|
-
|
|
3210
|
-
var Cropper =
|
|
3211
|
-
/*#__PURE__*/
|
|
3212
|
-
function () {
|
|
3213
|
-
/**
|
|
3214
|
-
* Create a new Cropper.
|
|
3215
|
-
* @param {Element} element - The target element for cropping.
|
|
3216
|
-
* @param {Object} [options={}] - The configuration options.
|
|
3217
|
-
*/
|
|
3218
|
-
function Cropper(element) {
|
|
3219
|
-
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
3220
|
-
|
|
3221
|
-
_classCallCheck(this, Cropper);
|
|
3222
|
-
|
|
3223
|
-
if (!element || !REGEXP_TAG_NAME.test(element.tagName)) {
|
|
3224
|
-
throw new Error('The first argument is required and must be an <img> or <canvas> element.');
|
|
3225
|
-
}
|
|
3226
|
-
|
|
3227
|
-
this.element = element;
|
|
3228
|
-
this.options = assign({}, DEFAULTS, isPlainObject(options) && options);
|
|
3229
|
-
this.cropped = false;
|
|
3230
|
-
this.disabled = false;
|
|
3231
|
-
this.pointers = {};
|
|
3232
|
-
this.ready = false;
|
|
3233
|
-
this.reloading = false;
|
|
3234
|
-
this.replaced = false;
|
|
3235
|
-
this.sized = false;
|
|
3236
|
-
this.sizing = false;
|
|
3237
|
-
this.init();
|
|
3238
|
-
}
|
|
3239
|
-
|
|
3240
|
-
_createClass(Cropper, [{
|
|
3241
|
-
key: "init",
|
|
3242
|
-
value: function init() {
|
|
3243
|
-
var element = this.element;
|
|
3244
|
-
var tagName = element.tagName.toLowerCase();
|
|
3245
|
-
var url;
|
|
3246
|
-
|
|
3247
|
-
if (element[NAMESPACE]) {
|
|
3248
|
-
return;
|
|
3249
|
-
}
|
|
3250
|
-
|
|
3251
|
-
element[NAMESPACE] = this;
|
|
3252
|
-
|
|
3253
|
-
if (tagName === 'img') {
|
|
3254
|
-
this.isImg = true; // e.g.: "img/picture.jpg"
|
|
3255
|
-
|
|
3256
|
-
url = element.getAttribute('src') || '';
|
|
3257
|
-
this.originalUrl = url; // Stop when it's a blank image
|
|
3258
|
-
|
|
3259
|
-
if (!url) {
|
|
3260
|
-
return;
|
|
3261
|
-
} // e.g.: "http://example.com/img/picture.jpg"
|
|
3262
|
-
|
|
3263
|
-
|
|
3264
|
-
url = element.src;
|
|
3265
|
-
} else if (tagName === 'canvas' && window.HTMLCanvasElement) {
|
|
3266
|
-
url = element.toDataURL();
|
|
3267
|
-
}
|
|
3268
|
-
|
|
3269
|
-
this.load(url);
|
|
3270
|
-
}
|
|
3271
|
-
}, {
|
|
3272
|
-
key: "load",
|
|
3273
|
-
value: function load(url) {
|
|
3274
|
-
var _this = this;
|
|
3275
|
-
|
|
3276
|
-
if (!url) {
|
|
3277
|
-
return;
|
|
3278
|
-
}
|
|
3279
|
-
|
|
3280
|
-
this.url = url;
|
|
3281
|
-
this.imageData = {};
|
|
3282
|
-
var element = this.element,
|
|
3283
|
-
options = this.options;
|
|
3284
|
-
|
|
3285
|
-
if (!options.rotatable && !options.scalable) {
|
|
3286
|
-
options.checkOrientation = false;
|
|
3287
|
-
} // Only IE10+ supports Typed Arrays
|
|
3288
|
-
|
|
3289
|
-
|
|
3290
|
-
if (!options.checkOrientation || !window.ArrayBuffer) {
|
|
3291
|
-
this.clone();
|
|
3292
|
-
return;
|
|
3293
|
-
} // Detect the mime type of the image directly if it is a Data URL
|
|
3294
|
-
|
|
3295
|
-
|
|
3296
|
-
if (REGEXP_DATA_URL.test(url)) {
|
|
3297
|
-
// Read ArrayBuffer from Data URL of JPEG images directly for better performance
|
|
3298
|
-
if (REGEXP_DATA_URL_JPEG.test(url)) {
|
|
3299
|
-
this.read(dataURLToArrayBuffer(url));
|
|
3300
|
-
} else {
|
|
3301
|
-
// Only a JPEG image may contains Exif Orientation information,
|
|
3302
|
-
// the rest types of Data URLs are not necessary to check orientation at all.
|
|
3303
|
-
this.clone();
|
|
3304
|
-
}
|
|
3305
|
-
|
|
3306
|
-
return;
|
|
3307
|
-
} // 1. Detect the mime type of the image by a XMLHttpRequest.
|
|
3308
|
-
// 2. Load the image as ArrayBuffer for reading orientation if its a JPEG image.
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
var xhr = new XMLHttpRequest();
|
|
3312
|
-
var clone = this.clone.bind(this);
|
|
3313
|
-
this.reloading = true;
|
|
3314
|
-
this.xhr = xhr; // 1. Cross origin requests are only supported for protocol schemes:
|
|
3315
|
-
// http, https, data, chrome, chrome-extension.
|
|
3316
|
-
// 2. Access to XMLHttpRequest from a Data URL will be blocked by CORS policy
|
|
3317
|
-
// in some browsers as IE11 and Safari.
|
|
3318
|
-
|
|
3319
|
-
xhr.onabort = clone;
|
|
3320
|
-
xhr.onerror = clone;
|
|
3321
|
-
xhr.ontimeout = clone;
|
|
3322
|
-
|
|
3323
|
-
xhr.onprogress = function () {
|
|
3324
|
-
// Abort the request directly if it not a JPEG image for better performance
|
|
3325
|
-
if (xhr.getResponseHeader('content-type') !== MIME_TYPE_JPEG) {
|
|
3326
|
-
xhr.abort();
|
|
3327
|
-
}
|
|
3328
|
-
};
|
|
3329
|
-
|
|
3330
|
-
xhr.onload = function () {
|
|
3331
|
-
_this.read(xhr.response);
|
|
3332
|
-
};
|
|
3333
|
-
|
|
3334
|
-
xhr.onloadend = function () {
|
|
3335
|
-
_this.reloading = false;
|
|
3336
|
-
_this.xhr = null;
|
|
3337
|
-
}; // Bust cache when there is a "crossOrigin" property to avoid browser cache error
|
|
3338
|
-
|
|
3339
|
-
|
|
3340
|
-
if (options.checkCrossOrigin && isCrossOriginURL(url) && element.crossOrigin) {
|
|
3341
|
-
url = addTimestamp(url);
|
|
3342
|
-
}
|
|
3343
|
-
|
|
3344
|
-
xhr.open('GET', url);
|
|
3345
|
-
xhr.responseType = 'arraybuffer';
|
|
3346
|
-
xhr.withCredentials = element.crossOrigin === 'use-credentials';
|
|
3347
|
-
xhr.send();
|
|
3348
|
-
}
|
|
3349
|
-
}, {
|
|
3350
|
-
key: "read",
|
|
3351
|
-
value: function read(arrayBuffer) {
|
|
3352
|
-
var options = this.options,
|
|
3353
|
-
imageData = this.imageData; // Reset the orientation value to its default value 1
|
|
3354
|
-
// as some iOS browsers will render image with its orientation
|
|
3355
|
-
|
|
3356
|
-
var orientation = resetAndGetOrientation(arrayBuffer);
|
|
3357
|
-
var rotate = 0;
|
|
3358
|
-
var scaleX = 1;
|
|
3359
|
-
var scaleY = 1;
|
|
3360
|
-
|
|
3361
|
-
if (orientation > 1) {
|
|
3362
|
-
// Generate a new URL which has the default orientation value
|
|
3363
|
-
this.url = arrayBufferToDataURL(arrayBuffer, MIME_TYPE_JPEG);
|
|
3364
|
-
|
|
3365
|
-
var _parseOrientation = parseOrientation(orientation);
|
|
3366
|
-
|
|
3367
|
-
rotate = _parseOrientation.rotate;
|
|
3368
|
-
scaleX = _parseOrientation.scaleX;
|
|
3369
|
-
scaleY = _parseOrientation.scaleY;
|
|
3370
|
-
}
|
|
3371
|
-
|
|
3372
|
-
if (options.rotatable) {
|
|
3373
|
-
imageData.rotate = rotate;
|
|
3374
|
-
}
|
|
3375
|
-
|
|
3376
|
-
if (options.scalable) {
|
|
3377
|
-
imageData.scaleX = scaleX;
|
|
3378
|
-
imageData.scaleY = scaleY;
|
|
3379
|
-
}
|
|
3380
|
-
|
|
3381
|
-
this.clone();
|
|
3382
|
-
}
|
|
3383
|
-
}, {
|
|
3384
|
-
key: "clone",
|
|
3385
|
-
value: function clone() {
|
|
3386
|
-
var element = this.element,
|
|
3387
|
-
url = this.url;
|
|
3388
|
-
var crossOrigin = element.crossOrigin;
|
|
3389
|
-
var crossOriginUrl = url;
|
|
3390
|
-
|
|
3391
|
-
if (this.options.checkCrossOrigin && isCrossOriginURL(url)) {
|
|
3392
|
-
if (!crossOrigin) {
|
|
3393
|
-
crossOrigin = 'anonymous';
|
|
3394
|
-
} // Bust cache when there is not a "crossOrigin" property (#519)
|
|
3395
|
-
|
|
3396
|
-
|
|
3397
|
-
crossOriginUrl = addTimestamp(url);
|
|
3398
|
-
}
|
|
3399
|
-
|
|
3400
|
-
this.crossOrigin = crossOrigin;
|
|
3401
|
-
this.crossOriginUrl = crossOriginUrl;
|
|
3402
|
-
var image = document.createElement('img');
|
|
3403
|
-
|
|
3404
|
-
if (crossOrigin) {
|
|
3405
|
-
image.crossOrigin = crossOrigin;
|
|
3406
|
-
}
|
|
3407
|
-
|
|
3408
|
-
image.src = crossOriginUrl || url;
|
|
3409
|
-
image.alt = element.alt || 'The image to crop';
|
|
3410
|
-
this.image = image;
|
|
3411
|
-
image.onload = this.start.bind(this);
|
|
3412
|
-
image.onerror = this.stop.bind(this);
|
|
3413
|
-
addClass(image, CLASS_HIDE);
|
|
3414
|
-
element.parentNode.insertBefore(image, element.nextSibling);
|
|
3415
|
-
}
|
|
3416
|
-
}, {
|
|
3417
|
-
key: "start",
|
|
3418
|
-
value: function start() {
|
|
3419
|
-
var _this2 = this;
|
|
3420
|
-
|
|
3421
|
-
var image = this.image;
|
|
3422
|
-
image.onload = null;
|
|
3423
|
-
image.onerror = null;
|
|
3424
|
-
this.sizing = true; // Match all browsers that use WebKit as the layout engine in iOS devices,
|
|
3425
|
-
// such as Safari for iOS, Chrome for iOS, and in-app browsers.
|
|
3426
|
-
|
|
3427
|
-
var isIOSWebKit = WINDOW.navigator && /(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(WINDOW.navigator.userAgent);
|
|
3428
|
-
|
|
3429
|
-
var done = function done(naturalWidth, naturalHeight) {
|
|
3430
|
-
assign(_this2.imageData, {
|
|
3431
|
-
naturalWidth: naturalWidth,
|
|
3432
|
-
naturalHeight: naturalHeight,
|
|
3433
|
-
aspectRatio: naturalWidth / naturalHeight
|
|
3434
|
-
});
|
|
3435
|
-
_this2.sizing = false;
|
|
3436
|
-
_this2.sized = true;
|
|
3437
|
-
|
|
3438
|
-
_this2.build();
|
|
3439
|
-
}; // Most modern browsers (excepts iOS WebKit)
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
if (image.naturalWidth && !isIOSWebKit) {
|
|
3443
|
-
done(image.naturalWidth, image.naturalHeight);
|
|
3444
|
-
return;
|
|
3445
|
-
}
|
|
3446
|
-
|
|
3447
|
-
var sizingImage = document.createElement('img');
|
|
3448
|
-
var body = document.body || document.documentElement;
|
|
3449
|
-
this.sizingImage = sizingImage;
|
|
3450
|
-
|
|
3451
|
-
sizingImage.onload = function () {
|
|
3452
|
-
done(sizingImage.width, sizingImage.height);
|
|
3453
|
-
|
|
3454
|
-
if (!isIOSWebKit) {
|
|
3455
|
-
body.removeChild(sizingImage);
|
|
3456
|
-
}
|
|
3457
|
-
};
|
|
3458
|
-
|
|
3459
|
-
sizingImage.src = image.src; // iOS WebKit will convert the image automatically
|
|
3460
|
-
// with its orientation once append it into DOM (#279)
|
|
3461
|
-
|
|
3462
|
-
if (!isIOSWebKit) {
|
|
3463
|
-
sizingImage.style.cssText = 'left:0;' + 'max-height:none!important;' + 'max-width:none!important;' + 'min-height:0!important;' + 'min-width:0!important;' + 'opacity:0;' + 'position:absolute;' + 'top:0;' + 'z-index:-1;';
|
|
3464
|
-
body.appendChild(sizingImage);
|
|
3465
|
-
}
|
|
3466
|
-
}
|
|
3467
|
-
}, {
|
|
3468
|
-
key: "stop",
|
|
3469
|
-
value: function stop() {
|
|
3470
|
-
var image = this.image;
|
|
3471
|
-
image.onload = null;
|
|
3472
|
-
image.onerror = null;
|
|
3473
|
-
image.parentNode.removeChild(image);
|
|
3474
|
-
this.image = null;
|
|
3475
|
-
}
|
|
3476
|
-
}, {
|
|
3477
|
-
key: "build",
|
|
3478
|
-
value: function build() {
|
|
3479
|
-
if (!this.sized || this.ready) {
|
|
3480
|
-
return;
|
|
3481
|
-
}
|
|
3482
|
-
|
|
3483
|
-
var element = this.element,
|
|
3484
|
-
options = this.options,
|
|
3485
|
-
image = this.image; // Create cropper elements
|
|
3486
|
-
|
|
3487
|
-
var container = element.parentNode;
|
|
3488
|
-
var template = document.createElement('div');
|
|
3489
|
-
template.innerHTML = TEMPLATE;
|
|
3490
|
-
var cropper = template.querySelector(".".concat(NAMESPACE, "-container"));
|
|
3491
|
-
var canvas = cropper.querySelector(".".concat(NAMESPACE, "-canvas"));
|
|
3492
|
-
var dragBox = cropper.querySelector(".".concat(NAMESPACE, "-drag-box"));
|
|
3493
|
-
var cropBox = cropper.querySelector(".".concat(NAMESPACE, "-crop-box"));
|
|
3494
|
-
var face = cropBox.querySelector(".".concat(NAMESPACE, "-face"));
|
|
3495
|
-
this.container = container;
|
|
3496
|
-
this.cropper = cropper;
|
|
3497
|
-
this.canvas = canvas;
|
|
3498
|
-
this.dragBox = dragBox;
|
|
3499
|
-
this.cropBox = cropBox;
|
|
3500
|
-
this.viewBox = cropper.querySelector(".".concat(NAMESPACE, "-view-box"));
|
|
3501
|
-
this.face = face;
|
|
3502
|
-
canvas.appendChild(image); // Hide the original image
|
|
3503
|
-
|
|
3504
|
-
addClass(element, CLASS_HIDDEN); // Inserts the cropper after to the current image
|
|
3505
|
-
|
|
3506
|
-
container.insertBefore(cropper, element.nextSibling); // Show the image if is hidden
|
|
3507
|
-
|
|
3508
|
-
if (!this.isImg) {
|
|
3509
|
-
removeClass(image, CLASS_HIDE);
|
|
3510
|
-
}
|
|
3511
|
-
|
|
3512
|
-
this.initPreview();
|
|
3513
|
-
this.bind();
|
|
3514
|
-
options.initialAspectRatio = Math.max(0, options.initialAspectRatio) || NaN;
|
|
3515
|
-
options.aspectRatio = Math.max(0, options.aspectRatio) || NaN;
|
|
3516
|
-
options.viewMode = Math.max(0, Math.min(3, Math.round(options.viewMode))) || 0;
|
|
3517
|
-
addClass(cropBox, CLASS_HIDDEN);
|
|
3518
|
-
|
|
3519
|
-
if (!options.guides) {
|
|
3520
|
-
addClass(cropBox.getElementsByClassName("".concat(NAMESPACE, "-dashed")), CLASS_HIDDEN);
|
|
3521
|
-
}
|
|
3522
|
-
|
|
3523
|
-
if (!options.center) {
|
|
3524
|
-
addClass(cropBox.getElementsByClassName("".concat(NAMESPACE, "-center")), CLASS_HIDDEN);
|
|
3525
|
-
}
|
|
3526
|
-
|
|
3527
|
-
if (options.background) {
|
|
3528
|
-
addClass(cropper, "".concat(NAMESPACE, "-bg"));
|
|
3529
|
-
}
|
|
3530
|
-
|
|
3531
|
-
if (!options.highlight) {
|
|
3532
|
-
addClass(face, CLASS_INVISIBLE);
|
|
3533
|
-
}
|
|
3534
|
-
|
|
3535
|
-
if (options.cropBoxMovable) {
|
|
3536
|
-
addClass(face, CLASS_MOVE);
|
|
3537
|
-
setData(face, DATA_ACTION, ACTION_ALL);
|
|
3538
|
-
}
|
|
3539
|
-
|
|
3540
|
-
if (!options.cropBoxResizable) {
|
|
3541
|
-
addClass(cropBox.getElementsByClassName("".concat(NAMESPACE, "-line")), CLASS_HIDDEN);
|
|
3542
|
-
addClass(cropBox.getElementsByClassName("".concat(NAMESPACE, "-point")), CLASS_HIDDEN);
|
|
3543
|
-
}
|
|
3544
|
-
|
|
3545
|
-
this.render();
|
|
3546
|
-
this.ready = true;
|
|
3547
|
-
this.setDragMode(options.dragMode);
|
|
3548
|
-
|
|
3549
|
-
if (options.autoCrop) {
|
|
3550
|
-
this.crop();
|
|
3551
|
-
}
|
|
3552
|
-
|
|
3553
|
-
this.setData(options.data);
|
|
3554
|
-
|
|
3555
|
-
if (isFunction(options.ready)) {
|
|
3556
|
-
addListener(element, EVENT_READY, options.ready, {
|
|
3557
|
-
once: true
|
|
3558
|
-
});
|
|
3559
|
-
}
|
|
3560
|
-
|
|
3561
|
-
dispatchEvent(element, EVENT_READY);
|
|
3562
|
-
}
|
|
3563
|
-
}, {
|
|
3564
|
-
key: "unbuild",
|
|
3565
|
-
value: function unbuild() {
|
|
3566
|
-
if (!this.ready) {
|
|
3567
|
-
return;
|
|
3568
|
-
}
|
|
3569
|
-
|
|
3570
|
-
this.ready = false;
|
|
3571
|
-
this.unbind();
|
|
3572
|
-
this.resetPreview();
|
|
3573
|
-
this.cropper.parentNode.removeChild(this.cropper);
|
|
3574
|
-
removeClass(this.element, CLASS_HIDDEN);
|
|
3575
|
-
}
|
|
3576
|
-
}, {
|
|
3577
|
-
key: "uncreate",
|
|
3578
|
-
value: function uncreate() {
|
|
3579
|
-
if (this.ready) {
|
|
3580
|
-
this.unbuild();
|
|
3581
|
-
this.ready = false;
|
|
3582
|
-
this.cropped = false;
|
|
3583
|
-
} else if (this.sizing) {
|
|
3584
|
-
this.sizingImage.onload = null;
|
|
3585
|
-
this.sizing = false;
|
|
3586
|
-
this.sized = false;
|
|
3587
|
-
} else if (this.reloading) {
|
|
3588
|
-
this.xhr.onabort = null;
|
|
3589
|
-
this.xhr.abort();
|
|
3590
|
-
} else if (this.image) {
|
|
3591
|
-
this.stop();
|
|
3592
|
-
}
|
|
3593
|
-
}
|
|
3594
|
-
/**
|
|
3595
|
-
* Get the no conflict cropper class.
|
|
3596
|
-
* @returns {Cropper} The cropper class.
|
|
3597
|
-
*/
|
|
3598
|
-
|
|
3599
|
-
}], [{
|
|
3600
|
-
key: "noConflict",
|
|
3601
|
-
value: function noConflict() {
|
|
3602
|
-
window.Cropper = AnotherCropper;
|
|
3603
|
-
return Cropper;
|
|
3604
|
-
}
|
|
3605
|
-
/**
|
|
3606
|
-
* Change the default options.
|
|
3607
|
-
* @param {Object} options - The new default options.
|
|
3608
|
-
*/
|
|
3609
|
-
|
|
3610
|
-
}, {
|
|
3611
|
-
key: "setDefaults",
|
|
3612
|
-
value: function setDefaults(options) {
|
|
3613
|
-
assign(DEFAULTS, isPlainObject(options) && options);
|
|
3614
|
-
}
|
|
3615
|
-
}]);
|
|
3616
|
-
|
|
3617
|
-
return Cropper;
|
|
3618
|
-
}();
|
|
3619
|
-
|
|
3620
|
-
assign(Cropper.prototype, render, preview, events, handlers, change, methods);
|
|
3621
|
-
|
|
3622
|
-
return Cropper;
|
|
3623
|
-
|
|
3624
|
-
}));
|
|
3625
|
-
|
|
3626
|
-
|
|
3627
|
-
/***/ })
|
|
3628
|
-
|
|
3629
|
-
}]);
|
|
3630
|
-
//# sourceMappingURL=27.chunk.js.map
|