cty-mui-core 1.0.40 → 1.0.41

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.
Files changed (67) hide show
  1. package/components/camera.js +7 -8
  2. package/components/cty-camera-photo.js +1 -1
  3. package/components/cty-media-capture.js +3 -6
  4. package/components/cty-record.js +1 -1
  5. package/components/cty-segment-slides.js +3 -1
  6. package/components/video-capture.js +1 -1
  7. package/dist/cjs/cty-camera-photo.cjs.entry.js +1 -1
  8. package/dist/cjs/cty-camera_2.cjs.entry.js +6 -8
  9. package/dist/cjs/cty-media-capture.cjs.entry.js +4 -7
  10. package/dist/cjs/cty-mui.cjs.js +1 -1
  11. package/dist/cjs/cty-record.cjs.entry.js +1 -1
  12. package/dist/cjs/cty-segment-slides.cjs.entry.js +2 -1
  13. package/dist/cjs/index.cjs.js +1 -1
  14. package/dist/cjs/loader.cjs.js +1 -1
  15. package/dist/cjs/{video-capture-BO4sLa1e.js → video-capture-CzRkzdTQ.js} +1 -1
  16. package/dist/collection/components/camera/camera.js +26 -8
  17. package/dist/collection/components/camera-photo/camera-photo.js +1 -1
  18. package/dist/collection/components/media-capture/media-capture.js +3 -6
  19. package/dist/collection/components/record/record.js +1 -1
  20. package/dist/collection/components/segment-slides/segment-slides.js +26 -1
  21. package/dist/collection/utils/native/video-capture.js +1 -1
  22. package/dist/cty-mui/cty-mui.esm.js +1 -1
  23. package/dist/cty-mui/index.esm.js +1 -1
  24. package/dist/cty-mui/{p-0c4881aa.system.entry.js → p-01209ee4.system.entry.js} +1 -1
  25. package/dist/cty-mui/{p-a68cdc7f.system.entry.js → p-1aefb4ae.system.entry.js} +1 -1
  26. package/dist/cty-mui/p-2823d286.entry.js +1 -0
  27. package/dist/cty-mui/p-53bbf0f2.entry.js +1 -0
  28. package/dist/cty-mui/{p-a337c7a9.system.entry.js → p-62bc50b2.system.entry.js} +1 -1
  29. package/dist/cty-mui/p-73fd4dc6.system.entry.js +1 -0
  30. package/dist/cty-mui/p-7ff05ecc.entry.js +1 -0
  31. package/dist/cty-mui/p-Cegbc1c7.system.js +1 -1
  32. package/dist/cty-mui/{p-CPg00410.system.js → p-CzcPp1ts.system.js} +1 -1
  33. package/dist/cty-mui/p-c6aac4c9.entry.js +1 -0
  34. package/dist/cty-mui/p-e57f36cd.entry.js +1 -0
  35. package/dist/cty-mui/{p-5d4ba642.system.entry.js → p-ea19acc4.system.entry.js} +1 -1
  36. package/dist/docs.json +76 -8
  37. package/dist/esm/cty-camera-photo.entry.js +1 -1
  38. package/dist/esm/cty-camera_2.entry.js +6 -8
  39. package/dist/esm/cty-media-capture.entry.js +4 -7
  40. package/dist/esm/cty-mui.js +1 -1
  41. package/dist/esm/cty-record.entry.js +1 -1
  42. package/dist/esm/cty-segment-slides.entry.js +2 -1
  43. package/dist/esm/index.js +1 -1
  44. package/dist/esm/loader.js +1 -1
  45. package/dist/esm/{video-capture-B83C8hW9.js → video-capture-0OPsBqGv.js} +1 -1
  46. package/dist/esm-es5/cty-camera-photo.entry.js +1 -1
  47. package/dist/esm-es5/cty-camera_2.entry.js +1 -1
  48. package/dist/esm-es5/cty-media-capture.entry.js +1 -1
  49. package/dist/esm-es5/cty-mui.js +1 -1
  50. package/dist/esm-es5/cty-record.entry.js +1 -1
  51. package/dist/esm-es5/cty-segment-slides.entry.js +1 -1
  52. package/dist/esm-es5/index.js +1 -1
  53. package/dist/esm-es5/loader.js +1 -1
  54. package/dist/types/components/camera/camera.d.ts +1 -0
  55. package/dist/types/components/segment-slides/segment-slides.d.ts +1 -0
  56. package/dist/types/components.d.ts +4 -0
  57. package/dist/types/utils/native/camera-preview.d.ts +1 -0
  58. package/package.json +1 -1
  59. package/dist/cty-mui/p-6ff6ece0.entry.js +0 -1
  60. package/dist/cty-mui/p-94e99338.system.entry.js +0 -1
  61. package/dist/cty-mui/p-aeb79634.entry.js +0 -1
  62. package/dist/cty-mui/p-ccc21f2e.entry.js +0 -1
  63. package/dist/cty-mui/p-ced85d3d.entry.js +0 -1
  64. package/dist/cty-mui/p-e3653feb.entry.js +0 -1
  65. /package/dist/cty-mui/{p-CnG0E7wf.js → p-14Xxxqjd.js} +0 -0
  66. /package/dist/cty-mui/{p-B0tecevi.system.js → p-BaJIoBSd.system.js} +0 -0
  67. /package/dist/esm-es5/{video-capture-B83C8hW9.js → video-capture-0OPsBqGv.js} +0 -0
@@ -38,6 +38,7 @@ const Camera = /*@__PURE__*/ proxyCustomElement(class Camera extends HTMLElement
38
38
  this.quality = 85;
39
39
  this.includeThumb = true;
40
40
  this.thumbWidth = 120;
41
+ this.saveToLibrary = true;
41
42
  this.file = true;
42
43
  this.max = 9;
43
44
  this.flipText = '翻转';
@@ -177,12 +178,12 @@ const Camera = /*@__PURE__*/ proxyCustomElement(class Camera extends HTMLElement
177
178
  return cameraPreview.setZoom(idx === 0 ? 0 : Math.min(zoom, maxZoom));
178
179
  }
179
180
  async takePhoto() {
180
- const { quality, width, height, includeThumb, thumbWidth, file, max, pictures } = this;
181
+ const { quality, width, height, includeThumb, thumbWidth, saveToLibrary, file, max, pictures } = this;
181
182
  if (max > 0 && pictures.length >= max || this.currentPhotoMode === 'single' && this.pictures.length > 0 || this.isTakingPhoto) {
182
183
  return;
183
184
  }
184
185
  this.isTakingPhoto = true;
185
- const data = await cameraPreview.takePicture({ width, height, quality, includeThumb, thumbWidth });
186
+ const data = await cameraPreview.takePicture({ width, height, quality, includeThumb, thumbWidth, saveToLibrary });
186
187
  let uri = '';
187
188
  let thumbnail = '';
188
189
  if (data && typeof data === 'object') {
@@ -287,12 +288,9 @@ const Camera = /*@__PURE__*/ proxyCustomElement(class Camera extends HTMLElement
287
288
  if (item.action == 'permission') {
288
289
  try {
289
290
  await cameraPreview.openAppSettings();
290
- this.permissionAlertVisible = false;
291
- this.initCamera();
292
- }
293
- catch (error) {
294
- this.closePermissionAlert(event);
295
291
  }
292
+ catch (error) { }
293
+ this.closePermissionAlert(event);
296
294
  }
297
295
  }
298
296
  closePermissionAlert(e) {
@@ -302,7 +300,7 @@ const Camera = /*@__PURE__*/ proxyCustomElement(class Camera extends HTMLElement
302
300
  }
303
301
  render() {
304
302
  const { title, closeIcon, flash, flipText, flashText, ratioText, ratios, ratioIndex, zoomIndex, zooms, mode, singleText, multipleText, currentPhotoMode, confirmIcon, confirmText, deleteIcon, pictures, showImageViewer, imageViewerIndex, touchZoom, currentZoom } = this;
305
- return (h(Host, { key: '87e30447a2f8f3d4bac90a5997486e525b0d86e1', class: "cty-camera", onClick: (e) => e.stopPropagation() }, h("cty-nav-bar", { key: 'f887682109a7b57792b40a0c3c0e5c43c3afbb02', title: title, type: "clear" }, h("slot", { key: 'd24bb63c23f0d38cc5c3537a846f398a325c33a3', name: "header-start", slot: "start" }, !!closeIcon && h("ion-button", { key: '012ee12b016e8986a2177b8c0547d4e244c679ee', class: "cty-camera__close", onClick: () => this.close() }, h("cty-icon", { key: '384c34680e0d51bf8348c5547342d262e047d1df', class: "cty-camera__close-icon", name: closeIcon })))), h("div", { key: '98125d2cb9e431fa398a5d137d996d549af63174', class: "cty-camera-main", onTouchStart: (e) => this.touchstart(e), onTouchMove: (e) => this.touchmove(e), onTouchEnd: (e) => this.touchend(e) }, h("div", { key: 'b8793b12764a555aa271534721832149654678b3', class: "cty-camera-widgets", part: "widgets" }, !!flipText && h("button", { key: 'eb561af5de2dfe02360b5b0c081ac16d42372c4d', class: "cty-button-native cty-camera-widget", part: "widget", onClick: () => this.flipCamera() }, h("cty-icon", { key: '3a1497d2620db2bae124c03ec11e2ccd720cbf56', class: "cty-camera-widget__icon", name: "cty-flip" }), !!flipText && h("span", { key: 'bec3462b8f19889c2b905783fded221830f31f83', class: "cty-camera-widget__text" }, flipText)), !!flashText && h("button", { key: 'd6cf0bedde3a1c909c24d5b89c7f526bbe433490', class: "cty-button-native cty-camera-widget", part: "widget", onClick: () => this.toggleFlash() }, h("cty-icon", { key: '2756a11d15f5d00390632e76afb787edc9544a83', class: "cty-camera-widget__icon", name: flash ? 'cty-flash-on' : 'cty-flash-off' }), !!flashText && h("span", { key: '9db63417dbd15b3ba719ff930f78cc44ac8c9ab0', class: "cty-camera-widget__text" }, flashText)), !!ratioText && h("button", { key: '128f64704c198af7c5087361f820af40c92d5136', class: "cty-button-native cty-camera-widget", part: "ratio", onClick: () => this.ratioChange() }, h("span", { key: 'e9ee33ffe7a3b560538945b6d7d493e46d278353', class: "cty-camera-widget__ratio flex-center" }, ratios[ratioIndex]), !!ratioText && h("span", { key: 'b9f7018443944c94dc679bdcbd0247138f377680', class: "cty-camera-widget__text" }, ratioText)))), h("div", { key: 'c19ee27e399fc263add8ef85a3d59b5492d25e4e', class: "cty-camera-controls safe-area-bottom-padding" }, mode == 'both' && pictures.length <= 0 && h("div", { key: 'a89f4f51757cf84994596a30344f883e873f621b', class: "cty-camera-controls__mode flex-center", part: "mode" }, h("button", { key: '58f7beb5e4e36e0d16be5ee6a72bc7cfe843a3f3', class: { 'cty-button-native cty-camera-controls__mode-button': true, 'cty-camera-controls__mode-button__active': currentPhotoMode === 'single' }, onClick: () => this.currentPhotoMode = 'single' }, singleText), h("button", { key: '09797fed9e2d0e4214312cd71504e8c42ce5aada', class: { 'cty-button-native cty-camera-controls__mode-button': true, 'cty-camera-controls__mode-button__active': currentPhotoMode === 'multiple' }, onClick: () => this.currentPhotoMode = 'multiple' }, multipleText)), h("slot", { key: 'a93b960673912c178b703d01028b927701390f4b', name: "zooms" }, !touchZoom && zooms.length > 0 && h("div", { key: '92311e8a921f3d898fe9dde4f0354018154e62a6', class: "cty-camera-controls__zooms flex-center", part: "zooms" }, zooms.map((item, idx) => (h("div", { class: { 'cty-camera-controls__zoom-item flex-center': true, 'cty-camera-controls__zoom-item__active': zoomIndex === idx }, onClick: () => this.setZoom(idx) }, h("span", { class: "cty-camera-controls__zoom-text flex-center" }, item, "X"))))), touchZoom && h("div", { key: '71840ea2f3c1efd39e0a483cc4176e2084c436b2', class: "cty-camera-controls__zooms flex-center", part: "zooms" }, h("div", { key: '8f21de0ab8c632262136fa2deae33541ff33205c', class: { 'cty-camera-controls__zoom-item flex-center cty-camera-controls__zoom-item__active': true }, onClick: () => this.resetZoom() }, h("span", { key: 'dd5c8774153e8d4afee69cfd619aeb58b7aaeafb', class: "cty-camera-controls__zoom-text flex-center" }, currentZoom, "X")))), h("div", { key: 'e77fe2fe8d383a0b0db0eabc953a06e14927372d', class: "cty-camera-controls__main flex-center" }, h("div", { key: '0b2b0ed9a73e1d97b65f33db00b645eecd02c855', class: "cty-camera-controls__main-left flex-center" }), h("div", { key: 'c82c3e5738c34465e0c881c652d03e207f1c4378', class: "cty-camera-controls__take-photo flex-center" }, h("button", { key: '6eb38e93d6435a566d215d1e020caf9651d017b9', class: "cty-button-native cty-camera-controls__take-photo-button", part: "take-photo", onClick: () => this.takePhoto() })), h("div", { key: 'f7162a2065e1bafe8e5ee3fb5b7f9956d2f47bca', class: "cty-camera-controls__main-confirm flex-center" }, currentPhotoMode !== 'single' && pictures.length > 0 && !!deleteIcon && h("button", { key: '406107a0fe9d3b64bf25b9decfd04442731b6e94', class: "cty-camera-controls__main-delete cty-button-native flex-column-center", onClick: () => this.deleteLastPicture() }, h("cty-icon", { key: '4fe35fa4aa7d56cc313ae1529e48c7fe9cdddb67', class: "cty-camera-controls__main-delete-icon", name: deleteIcon })), currentPhotoMode !== 'single' && pictures.length > 0 && h("button", { key: '21db9978e8e95983ecdbb1ca644bfa5bbd5250b3', class: "cty-button-native flex-column-center", onClick: () => this.confirm() }, h("cty-icon", { key: '1299292a88b81bad67007ee04a0688c3d753cc1a', class: "cty-camera-controls__main-confirm-icon", name: confirmIcon }), confirmText && h("span", { key: 'a472a97e3a5511a43812fb7a44508151e514e4b3', class: "cty-camera-controls__main-confirm-text" }, confirmText)))), h("slot", { key: '2f928fef43a074b195de928f60ea4425f6030c3f', name: "images" }, h("div", { key: 'ec3dea052f155c830b328b69759447172a2f85a1', class: "cty-camera-controls__images flex-align-center" }, currentPhotoMode !== 'single' && pictures.map((item, idx) => (h("div", { class: "cty-camera-controls__image", onClick: () => this.toImageViewer(idx) }, h("img", { class: 'cty-camera-controls__image-img', src: item.thumbnail || item.url }), h("button", { class: "cty-button-native", onClick: (e) => this.deletePicture(e, idx) }, h("cty-icon", { class: "cty-camera-controls__image-delete", name: closeOutline })))))))), showImageViewer && h("cty-image-viewer", { key: '41f862a4f8686499086de808c2b7d1bf3df45af3', images: pictures.map(item => item.url), initialSlide: imageViewerIndex, overlayIndex: 100, backdropDismiss: false, closeable: false, onCtyDismiss: (e) => this.closeImageViewer(e) }, currentPhotoMode !== 'multiple' && h("div", { key: '1d0432f45263db6276d5d921f928414377b513e8', class: "cty-camera-viewer__single flex-center-between", slot: "pager" }, h("button", { key: 'ac4919e6a40e2db191ab96b57c0ae95aa6dfcb68', class: "cty-camera-viewer__single-close cty-button-native", onClick: (event) => this.closeSingleImageViewer(event) }, h("cty-icon", { key: '30aef1dc5108f2f617c590b99fb835d059dc1900', name: "cty-close2" })), h("button", { key: 'c83ea114924d5d4e32a23a94c2a483784bdecab8', class: "cty-camera-viewer__single-confirm cty-button-native", onClick: () => this.confirm() }, h("cty-icon", { key: '866d451495aef92120d8876742cb02b2c32f4122', name: "cty-tick" }))), currentPhotoMode !== 'multiple' && h("i", { key: '9070e8f341360e0d6801d56664f679d7dd18184d', slot: "close" })), this.permissionAlertVisible && h("cty-permission-alert", { key: '30055b9ae7772684312ca90a7076545edfb476db', title: this.permissionAlertTitle, content: this.permissionAlertContent, buttons: this.permissionAlertbuttons, onCtyDismiss: (e) => this.closePermissionAlert(e), onCtyTap: (e) => this.toOpenAppSetting(e) }), h("ion-toast", { key: '3121cd6124ab8f92835655e6636d87d8d8200b2d', "is-open": this.isToastOpen, message: this.toastContent, duration: 2000, position: 'middle' })));
303
+ return (h(Host, { key: 'bb83ee1726feef5c84057c7723892d43f93c898c', class: "cty-camera", onClick: (e) => e.stopPropagation() }, h("cty-nav-bar", { key: '7f13f48d4ed2de835c0cd6a045268080d5c1b43e', title: title, type: "clear" }, h("slot", { key: 'fbc7dceb192a03a24396ca3be62c6c9f53825292', name: "header-start", slot: "start" }, !!closeIcon && h("ion-button", { key: 'fbf1536e049bec42259893653081110a2a1958f5', class: "cty-camera__close", onClick: () => this.close() }, h("cty-icon", { key: 'f34a507791bab61880f1f053a0e7ff5176c295dd', class: "cty-camera__close-icon", name: closeIcon })))), h("div", { key: '8277b267a0671f64c217e25d7b2669e8f9eeb1d8', class: "cty-camera-main", onTouchStart: (e) => this.touchstart(e), onTouchMove: (e) => this.touchmove(e), onTouchEnd: (e) => this.touchend(e) }, h("div", { key: '9b64b1fca0ad1bf01fe6cd383ff469e5fe9a1243', class: "cty-camera-widgets", part: "widgets" }, !!flipText && h("button", { key: 'cada5f233a4b755c00360641c0971309f310ef02', class: "cty-button-native cty-camera-widget", part: "widget", onClick: () => this.flipCamera() }, h("cty-icon", { key: 'af24b7d537825729e046aba6564c4f9e988983d4', class: "cty-camera-widget__icon", name: "cty-flip" }), !!flipText && h("span", { key: 'faa5b6ffb51768edc8e7d0bccddf33eb3531e466', class: "cty-camera-widget__text" }, flipText)), !!flashText && h("button", { key: '9addc710c3ff9fa7fe5e2dca9d7080a5b48821f4', class: "cty-button-native cty-camera-widget", part: "widget", onClick: () => this.toggleFlash() }, h("cty-icon", { key: 'b352d50ee12ffe92498e0c0a3c950a3cfc835b17', class: "cty-camera-widget__icon", name: flash ? 'cty-flash-on' : 'cty-flash-off' }), !!flashText && h("span", { key: '15daf94ee7856595ebfd0427275c30136a21085c', class: "cty-camera-widget__text" }, flashText)), !!ratioText && h("button", { key: '5d9ac7d3112165332b415636ca1f66cea5b4b576', class: "cty-button-native cty-camera-widget", part: "ratio", onClick: () => this.ratioChange() }, h("span", { key: 'adc545b141ae4cafe0ad0ee4b3f961617185bf50', class: "cty-camera-widget__ratio flex-center" }, ratios[ratioIndex]), !!ratioText && h("span", { key: 'ec406cf9e24e5a22fe81ad446b6217d27811cd82', class: "cty-camera-widget__text" }, ratioText)))), h("div", { key: '24080708dbaa7b58eff5fac1477b8bf2556aabf5', class: "cty-camera-controls safe-area-bottom-padding" }, mode == 'both' && pictures.length <= 0 && h("div", { key: '2856de71e0a012616e0fd5b634d32d6f51d817c1', class: "cty-camera-controls__mode flex-center", part: "mode" }, h("button", { key: '689ba86505b49126c6794858e00903926744f4c5', class: { 'cty-button-native cty-camera-controls__mode-button': true, 'cty-camera-controls__mode-button__active': currentPhotoMode === 'single' }, onClick: () => this.currentPhotoMode = 'single' }, singleText), h("button", { key: '78b37ce3691d31241f25226165ed539f93f45fb8', class: { 'cty-button-native cty-camera-controls__mode-button': true, 'cty-camera-controls__mode-button__active': currentPhotoMode === 'multiple' }, onClick: () => this.currentPhotoMode = 'multiple' }, multipleText)), h("slot", { key: '321e3e6c93cb0c0474fd18811dc58c8e9553e99a', name: "zooms" }, !touchZoom && zooms.length > 0 && h("div", { key: '5633dfbc4a605ab9650d225b6ac81fb8a6549759', class: "cty-camera-controls__zooms flex-center", part: "zooms" }, zooms.map((item, idx) => (h("div", { class: { 'cty-camera-controls__zoom-item flex-center': true, 'cty-camera-controls__zoom-item__active': zoomIndex === idx }, onClick: () => this.setZoom(idx) }, h("span", { class: "cty-camera-controls__zoom-text flex-center" }, item, "X"))))), touchZoom && h("div", { key: 'ceeaa663f2c0af94ee6a9e7396ac6fca0969fa8b', class: "cty-camera-controls__zooms flex-center", part: "zooms" }, h("div", { key: 'eb7f380ce6b4fa09ece885f4b644258346417fa9', class: { 'cty-camera-controls__zoom-item flex-center cty-camera-controls__zoom-item__active': true }, onClick: () => this.resetZoom() }, h("span", { key: '54935930412f8a827d56735da55e02caeb272c65', class: "cty-camera-controls__zoom-text flex-center" }, currentZoom, "X")))), h("div", { key: '429b787c541081536061362da6eb4055a402d90c', class: "cty-camera-controls__main flex-center" }, h("div", { key: 'da4502d5cba1ef557847ceda031ef12757637134', class: "cty-camera-controls__main-left flex-center" }), h("div", { key: '32faefbc45c3a6101f12048e7e498c47dd7aec26', class: "cty-camera-controls__take-photo flex-center" }, h("button", { key: '62b7db4847e099acdfdebbad0b6fd8e933b089cf', class: "cty-button-native cty-camera-controls__take-photo-button", part: "take-photo", onClick: () => this.takePhoto() })), h("div", { key: '368c5af68ee1c0da60afe16eb0faca9ec8e56561', class: "cty-camera-controls__main-confirm flex-center" }, currentPhotoMode !== 'single' && pictures.length > 0 && !!deleteIcon && h("button", { key: 'a7867e322531dd4bd2597915e14fbb469f0b9a58', class: "cty-camera-controls__main-delete cty-button-native flex-column-center", onClick: () => this.deleteLastPicture() }, h("cty-icon", { key: '355bd21f2feb8c790dcdb1e52301257b7d3ccdef', class: "cty-camera-controls__main-delete-icon", name: deleteIcon })), currentPhotoMode !== 'single' && pictures.length > 0 && h("button", { key: 'd577f40fe7ba3cc3f38defec443357fc2c3fc7fe', class: "cty-button-native flex-column-center", onClick: () => this.confirm() }, h("cty-icon", { key: '67599611fbcc9c5bb292e4d2d4fe7d93dbf6e274', class: "cty-camera-controls__main-confirm-icon", name: confirmIcon }), confirmText && h("span", { key: 'b592907eb84e2d6c255c252e5bbd50533c737c47', class: "cty-camera-controls__main-confirm-text" }, confirmText)))), h("slot", { key: '6dbc7b9d6ed47f647c561ed1a1e7ff621dfe635e', name: "images" }, h("div", { key: '5428de1571189999e306abd4115487a681360e79', class: "cty-camera-controls__images flex-align-center" }, currentPhotoMode !== 'single' && pictures.map((item, idx) => (h("div", { class: "cty-camera-controls__image", onClick: () => this.toImageViewer(idx) }, h("img", { class: 'cty-camera-controls__image-img', src: item.thumbnail || item.url }), h("button", { class: "cty-button-native", onClick: (e) => this.deletePicture(e, idx) }, h("cty-icon", { class: "cty-camera-controls__image-delete", name: closeOutline })))))))), showImageViewer && h("cty-image-viewer", { key: 'd42a638850e04f7920176fd63af812034ab754a6', images: pictures.map(item => item.url), initialSlide: imageViewerIndex, overlayIndex: 100, backdropDismiss: false, closeable: false, onCtyDismiss: (e) => this.closeImageViewer(e) }, currentPhotoMode !== 'multiple' && h("div", { key: '2dc441f65a66d38d271c390bc2fb1ebaa26c52f5', class: "cty-camera-viewer__single flex-center-between", slot: "pager" }, h("button", { key: '8c80910fb2d0ef00c828f0eec19d9c50309d2dca', class: "cty-camera-viewer__single-close cty-button-native", onClick: (event) => this.closeSingleImageViewer(event) }, h("cty-icon", { key: '3c606131b6693c04957d4114d4cf757a1df5453a', name: "cty-close2" })), h("button", { key: '56e9915d1224049cc9d48d7aa3a875d66a47c50a', class: "cty-camera-viewer__single-confirm cty-button-native", onClick: () => this.confirm() }, h("cty-icon", { key: '895c32f1f067760c15ac82ce0c1f31db069daa82', name: "cty-tick" }))), currentPhotoMode !== 'multiple' && h("i", { key: '5b4a7c8cc661e11127804aad19204cd4abdbb6dc', slot: "close" })), this.permissionAlertVisible && h("cty-permission-alert", { key: '87f6eac68fd015a6a1902a1cda5d546cabea9e3b', part: "permission-alert", title: this.permissionAlertTitle, content: this.permissionAlertContent, buttons: this.permissionAlertbuttons, onCtyDismiss: (e) => this.closePermissionAlert(e), onCtyTap: (e) => this.toOpenAppSetting(e) }), h("ion-toast", { key: '7fe4417cee38fe17e86cc52ddda0f09a3270b38e', "is-open": this.isToastOpen, message: this.toastContent, duration: 2000, position: 'middle' })));
306
304
  }
307
305
  get el() { return this; }
308
306
  static get style() { return cameraCss; }
@@ -317,6 +315,7 @@ const Camera = /*@__PURE__*/ proxyCustomElement(class Camera extends HTMLElement
317
315
  "quality": [2],
318
316
  "includeThumb": [4, "include-thumb"],
319
317
  "thumbWidth": [2, "thumb-width"],
318
+ "saveToLibrary": [4, "save-to-library"],
320
319
  "file": [4],
321
320
  "max": [2],
322
321
  "flipText": [1, "flip-text"],
@@ -271,7 +271,7 @@ const CameraPhoto = /*@__PURE__*/ proxyCustomElement(class CameraPhoto extends H
271
271
  this.permissionAlertVisible = false;
272
272
  }
273
273
  render() {
274
- return (h(Host, { key: '6626fa119a9c343df0fd6175c16c0a9cd18b6bf2', class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { 'overlay-hidden': true, 'cty-pos-cover': this.overlay }), style: { zIndex: `${20000 + this.overlayIndex}` } }, h("cty-action-sheet", { key: 'b88a31483aaee47dad3969a616eb74945d199447', class: "cty-camera-photo", animated: false, overlayIndex: 1, backdropDismiss: this.backdropDismiss, title: this.title, closeable: this.closeable, closeIcon: this.closeIcon, cancelText: this.cancelText, options: this.options, onCtyDismiss: () => this.dismiss(), onCtyTap: e => this._buttonClick(e) }), this.showCropImage && (h("cty-backdrop", { key: '83e30b75f98f48e69e97898c6b95e835e519f999', backdropDismiss: false }, h("cty-crop-image", { key: 'e382a18a7c8d9b212f01843d78a1000112e5d486', url: this.clipImage, cancelText: this.clipCancelText, confirmText: this.clipCconfirmText, imageWidth: this.clipImageWidth, imageBackground: this.clipImageBg, maxScale: this.clipMaxScale, minScale: this.clipMinScale, suffix: this.clipImageSuffix, quality: this.clipImageQuality, onCtyCancel: () => this._doCropCancel(), onCtyConfirm: (e) => this._doCropConfirm(e) }))), this.showPermissionPurpose && h("cty-permission-purpose", { key: '55dd946e9896839ccd7930b1b3e0573429e29dc1', description: this.permissionDescription }), this.continuous && this.showCameraPreview && h("cty-camera", Object.assign({ key: '67729d43a590b8630169bd1daac1117f1f41641c' }, this.cameraProps, { onCtyDismiss: () => this.showCameraPreview = false, onCtyConfirm: (e) => this.continuousConfirm(e) })), this.permissionAlertVisible && h("cty-permission-alert", { key: '2fe87f4d37895f5187e1f86723fd2e34dc38e2b9', title: this.permissionAlertTitle, content: this.permissionAlertContent, buttons: this.permissionAlertbuttons, onCtyDismiss: (e) => this.closePermissionAlert(e), onCtyTap: (e) => this.toOpenAppSetting(e) }), h("ion-toast", { key: '7a30b6c1e4314cd092bef5c313bff43449fd12ee', "is-open": this.isToastOpen, message: this.toastContent, duration: 2000, position: 'middle' })));
274
+ return (h(Host, { key: '6626fa119a9c343df0fd6175c16c0a9cd18b6bf2', class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { 'overlay-hidden': true, 'cty-pos-cover': this.overlay }), style: { zIndex: `${20000 + this.overlayIndex}` } }, h("cty-action-sheet", { key: 'b88a31483aaee47dad3969a616eb74945d199447', class: "cty-camera-photo", animated: false, overlayIndex: 1, backdropDismiss: this.backdropDismiss, title: this.title, closeable: this.closeable, closeIcon: this.closeIcon, cancelText: this.cancelText, options: this.options, onCtyDismiss: () => this.dismiss(), onCtyTap: e => this._buttonClick(e) }), this.showCropImage && (h("cty-backdrop", { key: '83e30b75f98f48e69e97898c6b95e835e519f999', backdropDismiss: false }, h("cty-crop-image", { key: 'e382a18a7c8d9b212f01843d78a1000112e5d486', url: this.clipImage, cancelText: this.clipCancelText, confirmText: this.clipCconfirmText, imageWidth: this.clipImageWidth, imageBackground: this.clipImageBg, maxScale: this.clipMaxScale, minScale: this.clipMinScale, suffix: this.clipImageSuffix, quality: this.clipImageQuality, onCtyCancel: () => this._doCropCancel(), onCtyConfirm: (e) => this._doCropConfirm(e) }))), this.showPermissionPurpose && h("cty-permission-purpose", { key: '55dd946e9896839ccd7930b1b3e0573429e29dc1', description: this.permissionDescription }), this.continuous && this.showCameraPreview && h("cty-camera", Object.assign({ key: '67729d43a590b8630169bd1daac1117f1f41641c' }, this.cameraProps, { onCtyDismiss: () => this.showCameraPreview = false, onCtyConfirm: (e) => this.continuousConfirm(e) })), this.permissionAlertVisible && h("cty-permission-alert", { key: '64742e62f0a6172a8533e68d815f9ab2a084cf32', part: "permission-alert", title: this.permissionAlertTitle, content: this.permissionAlertContent, buttons: this.permissionAlertbuttons, onCtyDismiss: (e) => this.closePermissionAlert(e), onCtyTap: (e) => this.toOpenAppSetting(e) }), h("ion-toast", { key: 'c5b814ec61ba275fe28c5fc49160955914756a68', "is-open": this.isToastOpen, message: this.toastContent, duration: 2000, position: 'middle' })));
275
275
  }
276
276
  get el() { return this; }
277
277
  static get watchers() { return {
@@ -133,12 +133,9 @@ const MediaCapture = /*@__PURE__*/ proxyCustomElement(class MediaCapture extends
133
133
  if (item.action == 'permission') {
134
134
  try {
135
135
  await videoCapture.openAppSettings();
136
- this.permissionAlertVisible = false;
137
- this.initVideoCapture();
138
- }
139
- catch (error) {
140
- this.closePermissionAlert(event);
141
136
  }
137
+ catch (error) { }
138
+ this.closePermissionAlert(event);
142
139
  }
143
140
  }
144
141
  closePermissionAlert(e) {
@@ -148,7 +145,7 @@ const MediaCapture = /*@__PURE__*/ proxyCustomElement(class MediaCapture extends
148
145
  }
149
146
  render() {
150
147
  const captureDuration = secondsToVehicle(this.captureDuration);
151
- return (h(Host, { key: 'dea0fde2e775dac71b8d627fbf72502ce8b01ac6', class: { 'cty-media-capture': true, 'cty-media-captured': this.isCaptured } }, h("div", { key: '639152bb0476a2577a91268088efd50d251c3962', class: "cty-media-capture__header" }, h("button", { key: 'a2246e49b5e58c4623b1e2d65c7d14e216be179f', onClick: () => this.doHeaderAction(), class: "cty-button-native" }, h("cty-icon", { key: 'a47c9b4f70a9ffa317e6ed165ed05098eba5198f', class: "cty-capture__close-icon", name: this.isCaptured ? this.revocationIcon : this.closeIcon })), this.captureTime && (this.isCaptured || this.capturing) && (h("span", { key: '0bd480dc6ba6963ac65c14c55b6d7d242a1b79e2', class: { 'cty-media-capture__time': true, 'cty-media-capture__time-active': this.capturing } }, captureDuration))), this.isCaptured && (h("video", { key: '9bb3ad454c63e53d6acd2968b2281a5c152a9390', ref: el => (this.videoEl = el), class: "cty-media-capture__video", autoplay: this.autoplay, loop: this.loop, poster: this.poster, src: this.videoFileUrl, playsinline: true, "webkit-playsinline": true, controls: this.controls, onClick: e => this.toggleVideo(e) })), h("div", { key: '90101389dea8e43c50dddf98c6cea75f8d324bd9', class: "cty-media-capture__footer flex-center" }, !this.isCaptured && (h("button", { key: '71f330777cdabab5829a2dbcf703ba3a40d99647', class: "cty-media-capture__switch cty-button-native", onClick: () => this.doCapture() }, h("span", { key: '6957cf9034bd74ea7ae4653557f417b2c934ee81', class: { 'cty-media-capture__status': true, 'cty-media-capture__status-active': this.capturing } }))), this.isCaptured && (h("button", { key: 'f508c7bb4cca833a13b1cfe3957a10114c92377e', class: "cty-media-capture__confirm cty-button-native", onClick: () => this.confirm() }, this.confirmText))), h("slot", { key: 'f5f99097bc702e82912865d500172f4a88966623' }), this.permissionAlertVisible && h("cty-permission-alert", { key: '07ce58f2409b15db1621343acec4a7938cc87474', title: this.permissionAlertTitle, content: this.permissionAlertContent, buttons: this.permissionAlertbuttons, onCtyDismiss: (e) => this.closePermissionAlert(e), onCtyTap: (e) => this.toOpenAppSetting(e) })));
148
+ return (h(Host, { key: '4b705601c4835f377f498ccef4aa73def22e382f', class: { 'cty-media-capture': true, 'cty-media-captured': this.isCaptured } }, h("div", { key: '871a7976fddfeaf2628fc8fbb2a3817f94fcf4a2', class: "cty-media-capture__header" }, h("button", { key: '59d1523a1fd0b327ef692fd6fa8215082c4d8175', onClick: () => this.doHeaderAction(), class: "cty-button-native" }, h("cty-icon", { key: '4161681003123afdcd8eb3ed85f501537600ec38', class: "cty-capture__close-icon", name: this.isCaptured ? this.revocationIcon : this.closeIcon })), this.captureTime && (this.isCaptured || this.capturing) && (h("span", { key: 'c931e29933072af3e98bc951a045f53dacc99be7', class: { 'cty-media-capture__time': true, 'cty-media-capture__time-active': this.capturing } }, captureDuration))), this.isCaptured && (h("video", { key: '9ca6fb5d35649aa20e1cfb0841ef3fa464f9cfb1', ref: el => (this.videoEl = el), class: "cty-media-capture__video", autoplay: this.autoplay, loop: this.loop, poster: this.poster, src: this.videoFileUrl, playsinline: true, "webkit-playsinline": true, controls: this.controls, onClick: e => this.toggleVideo(e) })), h("div", { key: '0e3befcf4ccad80ad79a47f2e0a7d6996258e596', class: "cty-media-capture__footer flex-center" }, !this.isCaptured && (h("button", { key: '2e693471aa9003dded388e69e451bc22745166d7', class: "cty-media-capture__switch cty-button-native", onClick: () => this.doCapture() }, h("span", { key: '073ad032797cd8f2f4b5282fc3a0cb69babf5541', class: { 'cty-media-capture__status': true, 'cty-media-capture__status-active': this.capturing } }))), this.isCaptured && (h("button", { key: 'b712578f4606178f125da347e3c93957a7b28cdc', class: "cty-media-capture__confirm cty-button-native", onClick: () => this.confirm() }, this.confirmText))), h("slot", { key: 'a08be5f30932b8c2173fda281047d1e31e6b881a' }), this.permissionAlertVisible && h("cty-permission-alert", { key: '2a5d0a9a7a3e7386f6730035e696dc10d05cd26c', part: "permission-alert", title: this.permissionAlertTitle, content: this.permissionAlertContent, buttons: this.permissionAlertbuttons, onCtyDismiss: (e) => this.closePermissionAlert(e), onCtyTap: (e) => this.toOpenAppSetting(e) })));
152
149
  }
153
150
  get el() { return this; }
154
151
  static get style() { return mediaCaptureCss; }
@@ -291,7 +291,7 @@ const Record = /*@__PURE__*/ proxyCustomElement(class Record extends HTMLElement
291
291
  this.permissionAlertVisible = false;
292
292
  }
293
293
  render() {
294
- return (h(Host, { key: '43324ef68b0f2e8d1a9ce076112c87432df17213', class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { 'overlay-hidden cty-pos-cover': true }), style: { zIndex: `${20000 + this.overlayIndex}` } }, h("cty-backdrop", { key: '45ebeab107e3af77c58e3680b8dad93b299de623', position: "bottom", backdropDismiss: this.backdropDismiss, onCtyDismiss: () => this.dismiss() }, h("div", { key: 'd215b46f4de67b97979831404e9bb708a0b4fffe', class: "cty-record safe-area-bottom-padding flex-center-column", onClick: (e) => e.stopPropagation() }, h("slot", { key: 'b4b9ea9cfc0956436174eb43957f0d13217ec549', name: "header" }), this.closeable && (h("div", { key: 'a5ca9aadbc15f2d8e69b26acad63e4b9cb19cc37', class: "cty-record__close", onClick: () => this.handleCloseRecord() }, h("cty-icon", { key: 'ef0fa355dea771b315667761c4a0ea304ad90364', name: closeOutline }))), h("p", { key: 'bd67297dfaafcadb7f77816f1bfcf1231a59dea6', class: "cty-record__desc" }, this.recordDescription), h("p", { key: '327aa0fa2fa70dc70a9e8c91f481ddff0dd930dd', class: "cty-record__time" }, this.recordDuration), h("div", { key: 'a3f5acd54fda613ec1dbb70428dfbb64a34cc579', class: "cty-record__main flex-align-end-center" }, this.recorded && (h("button", { key: 'f6a65afcbcd1f395765df9ce2629dd4b53593f84', class: "cty-record__redo flex-column-center cty-button-native", onClick: () => this.restartRecording() }, h("cty-icon", { key: '4530c67455c3d551c16cba6a0a081a4cf9e22809', name: "cty-redo", class: "flex-center" }), h("span", { key: '4940cdee4266b61742b23ae60c78fc62c07cb09c' }, "\u91CD\u5F55"))), !this.recording && (h("button", { key: '54e3efce63bd0cdd1e96777252571e1c8945cdaa', class: "cty-record__button cty-button-native", onClick: () => this.handleRecordAction() }, !this.auditioning && !this.recorded && h("cty-icon", { key: '4cb49678c931c4f806a3e2c54b398fa0b62e56b8', name: "cty-record" }), this.auditioning && this.recorded && h("cty-icon", { key: '6ccc9e0e3a35a7a0daa50af3e2fcac2e81e44be2', name: "cty-pause" }), !this.auditioning && this.recorded && h("cty-icon", { key: 'aea60df70839e471250802a87682c293e9f9ea55', name: "cty-play" }))), this.recording && (h("div", { key: '719d50881292e5555acf44bb2047bb84d32ee3e7', class: "cty-record__recording flex-center", onClick: () => this.stopRecording() }, h("cty-circle", { key: '744b19f125e415686936d1af242ad96b7ad6508c', rate: (this.recordSecond / this.maxSeconds) * 100, width: this.circleWidth, color: this.circleColor }), h("cty-icon", { key: 'ef31ac9b11abad0f5d989c1647ce6203961cb84e', name: "cty-pause" }))), this.recorded && (h("button", { key: '50466c6883029528186cada3bb0c4a2d0bef71bf', class: "cty-record__yes flex-column-center cty-button-native", onClick: () => this.confirmRecording() }, h("cty-icon", { key: 'd5d2b82dcf94217659140b802237449ebeeddd87', name: "cty-yes", class: "flex-center" }), h("span", { key: '2a71ba3edecc390e8e246ed396665ece96154ed4' }, "\u786E\u5B9A")))), !this.auditioning && !this.recorded && !this.recording && h("p", { key: 'd10af2a0a94fed05752d36d90433e2e779253ae1', class: "cty-record__send" }, "\u4EC5\u53D1\u9001\u8BED\u97F3"), (this.auditioning || this.recorded || this.recording) && h("p", { key: '926937f8eb05e802b790d76e93936c95d1692695', class: "cty-record__status" }, this.recordState))), h("ion-toast", { key: '4590611480e2b27ecd1e0c8ac0719924252948a9', isOpen: this.toastOptions.isOpen, message: this.toastOptions.message, duration: 2000, position: "middle", onIonToastWillDismiss: () => (this.toastOptions.isOpen = false) }), this.showWarning && h("cty-alert", { key: 'bdfe00993cdb88a3a4f63292610e56b4cc6dbbf6', title: "\u53D6\u6D88\u5F55\u97F3", content: "\u786E\u5B9A\u53D6\u6D88\u672C\u6761\u5F55\u97F3\uFF1F", buttons: ['取消', '确定'], overlayIndex: 1, onCtyTap: e => this.handleAlertAction(e) }, h("button", { key: 'e34d25e615d06fde71388d50ebb0ddc47be989a9', slot: "close", class: "cty--record__alert-close cty-button-native", onClick: () => this.showWarning = false }, h("cty-icon", { key: '4c4fe78dd1011901e763bbf41cb6e40409ce70e1', name: "cty-close2" }))), this.permissionAlertVisible && h("cty-permission-alert", { key: 'dcc1d21b7b7db47a4019e87483bcc42e18ed1fe9', title: this.permissionAlertTitle, content: this.permissionAlertContent, buttons: this.permissionAlertbuttons, onCtyDismiss: (e) => this.closePermissionAlert(e), onCtyTap: (e) => this.toOpenAppSetting(e) })));
294
+ return (h(Host, { key: '43324ef68b0f2e8d1a9ce076112c87432df17213', class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { 'overlay-hidden cty-pos-cover': true }), style: { zIndex: `${20000 + this.overlayIndex}` } }, h("cty-backdrop", { key: '45ebeab107e3af77c58e3680b8dad93b299de623', position: "bottom", backdropDismiss: this.backdropDismiss, onCtyDismiss: () => this.dismiss() }, h("div", { key: 'd215b46f4de67b97979831404e9bb708a0b4fffe', class: "cty-record safe-area-bottom-padding flex-center-column", onClick: (e) => e.stopPropagation() }, h("slot", { key: 'b4b9ea9cfc0956436174eb43957f0d13217ec549', name: "header" }), this.closeable && (h("div", { key: 'a5ca9aadbc15f2d8e69b26acad63e4b9cb19cc37', class: "cty-record__close", onClick: () => this.handleCloseRecord() }, h("cty-icon", { key: 'ef0fa355dea771b315667761c4a0ea304ad90364', name: closeOutline }))), h("p", { key: 'bd67297dfaafcadb7f77816f1bfcf1231a59dea6', class: "cty-record__desc" }, this.recordDescription), h("p", { key: '327aa0fa2fa70dc70a9e8c91f481ddff0dd930dd', class: "cty-record__time" }, this.recordDuration), h("div", { key: 'a3f5acd54fda613ec1dbb70428dfbb64a34cc579', class: "cty-record__main flex-align-end-center" }, this.recorded && (h("button", { key: 'f6a65afcbcd1f395765df9ce2629dd4b53593f84', class: "cty-record__redo flex-column-center cty-button-native", onClick: () => this.restartRecording() }, h("cty-icon", { key: '4530c67455c3d551c16cba6a0a081a4cf9e22809', name: "cty-redo", class: "flex-center" }), h("span", { key: '4940cdee4266b61742b23ae60c78fc62c07cb09c' }, "\u91CD\u5F55"))), !this.recording && (h("button", { key: '54e3efce63bd0cdd1e96777252571e1c8945cdaa', class: "cty-record__button cty-button-native", onClick: () => this.handleRecordAction() }, !this.auditioning && !this.recorded && h("cty-icon", { key: '4cb49678c931c4f806a3e2c54b398fa0b62e56b8', name: "cty-record" }), this.auditioning && this.recorded && h("cty-icon", { key: '6ccc9e0e3a35a7a0daa50af3e2fcac2e81e44be2', name: "cty-pause" }), !this.auditioning && this.recorded && h("cty-icon", { key: 'aea60df70839e471250802a87682c293e9f9ea55', name: "cty-play" }))), this.recording && (h("div", { key: '719d50881292e5555acf44bb2047bb84d32ee3e7', class: "cty-record__recording flex-center", onClick: () => this.stopRecording() }, h("cty-circle", { key: '744b19f125e415686936d1af242ad96b7ad6508c', rate: (this.recordSecond / this.maxSeconds) * 100, width: this.circleWidth, color: this.circleColor }), h("cty-icon", { key: 'ef31ac9b11abad0f5d989c1647ce6203961cb84e', name: "cty-pause" }))), this.recorded && (h("button", { key: '50466c6883029528186cada3bb0c4a2d0bef71bf', class: "cty-record__yes flex-column-center cty-button-native", onClick: () => this.confirmRecording() }, h("cty-icon", { key: 'd5d2b82dcf94217659140b802237449ebeeddd87', name: "cty-yes", class: "flex-center" }), h("span", { key: '2a71ba3edecc390e8e246ed396665ece96154ed4' }, "\u786E\u5B9A")))), !this.auditioning && !this.recorded && !this.recording && h("p", { key: 'd10af2a0a94fed05752d36d90433e2e779253ae1', class: "cty-record__send" }, "\u4EC5\u53D1\u9001\u8BED\u97F3"), (this.auditioning || this.recorded || this.recording) && h("p", { key: '926937f8eb05e802b790d76e93936c95d1692695', class: "cty-record__status" }, this.recordState))), h("ion-toast", { key: '4590611480e2b27ecd1e0c8ac0719924252948a9', isOpen: this.toastOptions.isOpen, message: this.toastOptions.message, duration: 2000, position: "middle", onIonToastWillDismiss: () => (this.toastOptions.isOpen = false) }), this.showWarning && h("cty-alert", { key: 'bdfe00993cdb88a3a4f63292610e56b4cc6dbbf6', title: "\u53D6\u6D88\u5F55\u97F3", content: "\u786E\u5B9A\u53D6\u6D88\u672C\u6761\u5F55\u97F3\uFF1F", buttons: ['取消', '确定'], overlayIndex: 1, onCtyTap: e => this.handleAlertAction(e) }, h("button", { key: 'e34d25e615d06fde71388d50ebb0ddc47be989a9', slot: "close", class: "cty--record__alert-close cty-button-native", onClick: () => this.showWarning = false }, h("cty-icon", { key: '4c4fe78dd1011901e763bbf41cb6e40409ce70e1', name: "cty-close2" }))), this.permissionAlertVisible && h("cty-permission-alert", { key: 'd202830e71c289c27f13c9fffba8b2d4aa292889', part: "permission-alert", title: this.permissionAlertTitle, content: this.permissionAlertContent, buttons: this.permissionAlertbuttons, onCtyDismiss: (e) => this.closePermissionAlert(e), onCtyTap: (e) => this.toOpenAppSetting(e) })));
295
295
  }
296
296
  get el() { return this; }
297
297
  static get watchers() { return {
@@ -21,6 +21,7 @@ const SegmentSlides = /*@__PURE__*/ proxyCustomElement(class SegmentSlides exten
21
21
  this.layout = 'icon-hide';
22
22
  this.observer = true;
23
23
  this.observerParents = true;
24
+ this.swiperAttrs = {};
24
25
  this._slideValue = 0;
25
26
  this._segments = [];
26
27
  this._top = '';
@@ -67,7 +68,7 @@ const SegmentSlides = /*@__PURE__*/ proxyCustomElement(class SegmentSlides exten
67
68
  return this.slidesEl.swiper;
68
69
  }
69
70
  render() {
70
- return (h(Host, { key: 'd57bb2adf2db683a57db6c0ab0ec363287b93108', class: "cty-segment-slides" }, h("ion-segment", { key: '853398f61a1f62efc454e703e2ccc8d686947789', part: "segment", class: "cty-segment-slides__segment", value: this._slideValue, onIonChange: (e) => this.segmentChanged(e), mode: "md", style: { 'top': this._top } }, h("slot", { key: '2b37890e9c5b68c5781739308d98161fb501dc77', name: 'segments' }), this._segments.map((item, idx) => h("ion-segment-button", { part: "segment-button", value: idx, layout: this.layout, class: "cty-segment-slides__segment-button" }, item[this._segmentProps['label']] && h("span", { class: "cty-segment-slides__segment-label" }, item[this._segmentProps['label']]), item[this._segmentProps['icon']] && h("cty-icon", { name: item[this._segmentProps['icon']], class: "cty-segment-slides__segment-icon" }), h("slot", { name: 'segment-button' + idx })))), h("swiper-container", { key: 'c2776d7956c14886074ba5b88f93769d0b1e88f1', part: "container", class: "cty-segment-slides__swiper-container", ref: (el) => this.slidesEl = el, observer: this.observer, observerParents: this.observerParents, resistanceRatio: '0', autoHeight: this.autoHeight, onSwiperslidechangetransitionstart: () => this.slideChange() }, this._segments.map((_, idx) => h("swiper-slide", { part: "slide", class: "cty-segment-slides__swiper-slide" }, h("slot", { name: 'content' + idx }))))));
71
+ return (h(Host, { key: 'dac01b0e399fe6888b3028b42f226a62ac066632', class: "cty-segment-slides" }, h("ion-segment", { key: '97b449e41655ebc75aa323ed5c7c7db47b8d0816', part: "segment", class: "cty-segment-slides__segment", value: this._slideValue, onIonChange: (e) => this.segmentChanged(e), mode: "md", style: { 'top': this._top } }, h("slot", { key: '6ba4c2144f9bf51c52ce8bd1f534084c8fa3bd1b', name: 'segments' }), this._segments.map((item, idx) => h("ion-segment-button", { part: "segment-button", value: idx, layout: this.layout, class: "cty-segment-slides__segment-button" }, item[this._segmentProps['label']] && h("span", { class: "cty-segment-slides__segment-label" }, item[this._segmentProps['label']]), item[this._segmentProps['icon']] && h("cty-icon", { name: item[this._segmentProps['icon']], class: "cty-segment-slides__segment-icon" }), h("slot", { name: 'segment-button' + idx })))), h("swiper-container", Object.assign({ key: 'c2128d0ff3197fdfb15db197bd1f6bbe615f8b72', part: "container", class: "cty-segment-slides__swiper-container", ref: (el) => this.slidesEl = el, observer: this.observer, observerParents: this.observerParents, resistanceRatio: '0', autoHeight: this.autoHeight, onSwiperslidechangetransitionstart: () => this.slideChange() }, this.swiperAttrs), this._segments.map((_, idx) => h("swiper-slide", { part: "slide", class: "cty-segment-slides__swiper-slide" }, h("slot", { name: 'content' + idx }))))));
71
72
  }
72
73
  get el() { return this; }
73
74
  static get watchers() { return {
@@ -83,6 +84,7 @@ const SegmentSlides = /*@__PURE__*/ proxyCustomElement(class SegmentSlides exten
83
84
  "layout": [1],
84
85
  "observer": [4],
85
86
  "observerParents": [4, "observer-parents"],
87
+ "swiperAttrs": [16, "swiper-attrs"],
86
88
  "_slideValue": [32],
87
89
  "_segments": [32],
88
90
  "_top": [32],
@@ -79,7 +79,7 @@ class CTYVideoCapture {
79
79
  return reject('Video capture plugin is not available.');
80
80
  }
81
81
  try {
82
- //不能把resolve作为startVideoCapture的第一个参数
82
+ //不能把resolve作为stopVideoCapture的第一个参数
83
83
  this._videoCapturePlugin.stopVideoCapture(() => { }, reject);
84
84
  resolve();
85
85
  }
@@ -260,7 +260,7 @@ const CameraPhoto = class {
260
260
  this.permissionAlertVisible = false;
261
261
  }
262
262
  render() {
263
- return (index.h(index.Host, { key: '6626fa119a9c343df0fd6175c16c0a9cd18b6bf2', class: Object.assign(Object.assign({}, theme.getClassMap(this.cssClass)), { 'overlay-hidden': true, 'cty-pos-cover': this.overlay }), style: { zIndex: `${20000 + this.overlayIndex}` } }, index.h("cty-action-sheet", { key: 'b88a31483aaee47dad3969a616eb74945d199447', class: "cty-camera-photo", animated: false, overlayIndex: 1, backdropDismiss: this.backdropDismiss, title: this.title, closeable: this.closeable, closeIcon: this.closeIcon, cancelText: this.cancelText, options: this.options, onCtyDismiss: () => this.dismiss(), onCtyTap: e => this._buttonClick(e) }), this.showCropImage && (index.h("cty-backdrop", { key: '83e30b75f98f48e69e97898c6b95e835e519f999', backdropDismiss: false }, index.h("cty-crop-image", { key: 'e382a18a7c8d9b212f01843d78a1000112e5d486', url: this.clipImage, cancelText: this.clipCancelText, confirmText: this.clipCconfirmText, imageWidth: this.clipImageWidth, imageBackground: this.clipImageBg, maxScale: this.clipMaxScale, minScale: this.clipMinScale, suffix: this.clipImageSuffix, quality: this.clipImageQuality, onCtyCancel: () => this._doCropCancel(), onCtyConfirm: (e) => this._doCropConfirm(e) }))), this.showPermissionPurpose && index.h("cty-permission-purpose", { key: '55dd946e9896839ccd7930b1b3e0573429e29dc1', description: this.permissionDescription }), this.continuous && this.showCameraPreview && index.h("cty-camera", Object.assign({ key: '67729d43a590b8630169bd1daac1117f1f41641c' }, this.cameraProps, { onCtyDismiss: () => this.showCameraPreview = false, onCtyConfirm: (e) => this.continuousConfirm(e) })), this.permissionAlertVisible && index.h("cty-permission-alert", { key: '2fe87f4d37895f5187e1f86723fd2e34dc38e2b9', title: this.permissionAlertTitle, content: this.permissionAlertContent, buttons: this.permissionAlertbuttons, onCtyDismiss: (e) => this.closePermissionAlert(e), onCtyTap: (e) => this.toOpenAppSetting(e) }), index.h("ion-toast", { key: '7a30b6c1e4314cd092bef5c313bff43449fd12ee', "is-open": this.isToastOpen, message: this.toastContent, duration: 2000, position: 'middle' })));
263
+ return (index.h(index.Host, { key: '6626fa119a9c343df0fd6175c16c0a9cd18b6bf2', class: Object.assign(Object.assign({}, theme.getClassMap(this.cssClass)), { 'overlay-hidden': true, 'cty-pos-cover': this.overlay }), style: { zIndex: `${20000 + this.overlayIndex}` } }, index.h("cty-action-sheet", { key: 'b88a31483aaee47dad3969a616eb74945d199447', class: "cty-camera-photo", animated: false, overlayIndex: 1, backdropDismiss: this.backdropDismiss, title: this.title, closeable: this.closeable, closeIcon: this.closeIcon, cancelText: this.cancelText, options: this.options, onCtyDismiss: () => this.dismiss(), onCtyTap: e => this._buttonClick(e) }), this.showCropImage && (index.h("cty-backdrop", { key: '83e30b75f98f48e69e97898c6b95e835e519f999', backdropDismiss: false }, index.h("cty-crop-image", { key: 'e382a18a7c8d9b212f01843d78a1000112e5d486', url: this.clipImage, cancelText: this.clipCancelText, confirmText: this.clipCconfirmText, imageWidth: this.clipImageWidth, imageBackground: this.clipImageBg, maxScale: this.clipMaxScale, minScale: this.clipMinScale, suffix: this.clipImageSuffix, quality: this.clipImageQuality, onCtyCancel: () => this._doCropCancel(), onCtyConfirm: (e) => this._doCropConfirm(e) }))), this.showPermissionPurpose && index.h("cty-permission-purpose", { key: '55dd946e9896839ccd7930b1b3e0573429e29dc1', description: this.permissionDescription }), this.continuous && this.showCameraPreview && index.h("cty-camera", Object.assign({ key: '67729d43a590b8630169bd1daac1117f1f41641c' }, this.cameraProps, { onCtyDismiss: () => this.showCameraPreview = false, onCtyConfirm: (e) => this.continuousConfirm(e) })), this.permissionAlertVisible && index.h("cty-permission-alert", { key: '64742e62f0a6172a8533e68d815f9ab2a084cf32', part: "permission-alert", title: this.permissionAlertTitle, content: this.permissionAlertContent, buttons: this.permissionAlertbuttons, onCtyDismiss: (e) => this.closePermissionAlert(e), onCtyTap: (e) => this.toOpenAppSetting(e) }), index.h("ion-toast", { key: 'c5b814ec61ba275fe28c5fc49160955914756a68', "is-open": this.isToastOpen, message: this.toastContent, duration: 2000, position: 'middle' })));
264
264
  }
265
265
  get el() { return index.getElement(this); }
266
266
  static get watchers() { return {
@@ -29,6 +29,7 @@ const Camera = class {
29
29
  this.quality = 85;
30
30
  this.includeThumb = true;
31
31
  this.thumbWidth = 120;
32
+ this.saveToLibrary = true;
32
33
  this.file = true;
33
34
  this.max = 9;
34
35
  this.flipText = '翻转';
@@ -168,12 +169,12 @@ const Camera = class {
168
169
  return cameraPreview.cameraPreview.setZoom(idx === 0 ? 0 : Math.min(zoom, maxZoom));
169
170
  }
170
171
  async takePhoto() {
171
- const { quality, width, height, includeThumb, thumbWidth, file, max, pictures } = this;
172
+ const { quality, width, height, includeThumb, thumbWidth, saveToLibrary, file, max, pictures } = this;
172
173
  if (max > 0 && pictures.length >= max || this.currentPhotoMode === 'single' && this.pictures.length > 0 || this.isTakingPhoto) {
173
174
  return;
174
175
  }
175
176
  this.isTakingPhoto = true;
176
- const data = await cameraPreview.cameraPreview.takePicture({ width, height, quality, includeThumb, thumbWidth });
177
+ const data = await cameraPreview.cameraPreview.takePicture({ width, height, quality, includeThumb, thumbWidth, saveToLibrary });
177
178
  let uri = '';
178
179
  let thumbnail = '';
179
180
  if (data && typeof data === 'object') {
@@ -278,12 +279,9 @@ const Camera = class {
278
279
  if (item.action == 'permission') {
279
280
  try {
280
281
  await cameraPreview.cameraPreview.openAppSettings();
281
- this.permissionAlertVisible = false;
282
- this.initCamera();
283
- }
284
- catch (error) {
285
- this.closePermissionAlert(event);
286
282
  }
283
+ catch (error) { }
284
+ this.closePermissionAlert(event);
287
285
  }
288
286
  }
289
287
  closePermissionAlert(e) {
@@ -293,7 +291,7 @@ const Camera = class {
293
291
  }
294
292
  render() {
295
293
  const { title, closeIcon, flash, flipText, flashText, ratioText, ratios, ratioIndex, zoomIndex, zooms, mode, singleText, multipleText, currentPhotoMode, confirmIcon, confirmText, deleteIcon, pictures, showImageViewer, imageViewerIndex, touchZoom, currentZoom } = this;
296
- return (index.h(index.Host, { key: '87e30447a2f8f3d4bac90a5997486e525b0d86e1', class: "cty-camera", onClick: (e) => e.stopPropagation() }, index.h("cty-nav-bar", { key: 'f887682109a7b57792b40a0c3c0e5c43c3afbb02', title: title, type: "clear" }, index.h("slot", { key: 'd24bb63c23f0d38cc5c3537a846f398a325c33a3', name: "header-start", slot: "start" }, !!closeIcon && index.h("ion-button", { key: '012ee12b016e8986a2177b8c0547d4e244c679ee', class: "cty-camera__close", onClick: () => this.close() }, index.h("cty-icon", { key: '384c34680e0d51bf8348c5547342d262e047d1df', class: "cty-camera__close-icon", name: closeIcon })))), index.h("div", { key: '98125d2cb9e431fa398a5d137d996d549af63174', class: "cty-camera-main", onTouchStart: (e) => this.touchstart(e), onTouchMove: (e) => this.touchmove(e), onTouchEnd: (e) => this.touchend(e) }, index.h("div", { key: 'b8793b12764a555aa271534721832149654678b3', class: "cty-camera-widgets", part: "widgets" }, !!flipText && index.h("button", { key: 'eb561af5de2dfe02360b5b0c081ac16d42372c4d', class: "cty-button-native cty-camera-widget", part: "widget", onClick: () => this.flipCamera() }, index.h("cty-icon", { key: '3a1497d2620db2bae124c03ec11e2ccd720cbf56', class: "cty-camera-widget__icon", name: "cty-flip" }), !!flipText && index.h("span", { key: 'bec3462b8f19889c2b905783fded221830f31f83', class: "cty-camera-widget__text" }, flipText)), !!flashText && index.h("button", { key: 'd6cf0bedde3a1c909c24d5b89c7f526bbe433490', class: "cty-button-native cty-camera-widget", part: "widget", onClick: () => this.toggleFlash() }, index.h("cty-icon", { key: '2756a11d15f5d00390632e76afb787edc9544a83', class: "cty-camera-widget__icon", name: flash ? 'cty-flash-on' : 'cty-flash-off' }), !!flashText && index.h("span", { key: '9db63417dbd15b3ba719ff930f78cc44ac8c9ab0', class: "cty-camera-widget__text" }, flashText)), !!ratioText && index.h("button", { key: '128f64704c198af7c5087361f820af40c92d5136', class: "cty-button-native cty-camera-widget", part: "ratio", onClick: () => this.ratioChange() }, index.h("span", { key: 'e9ee33ffe7a3b560538945b6d7d493e46d278353', class: "cty-camera-widget__ratio flex-center" }, ratios[ratioIndex]), !!ratioText && index.h("span", { key: 'b9f7018443944c94dc679bdcbd0247138f377680', class: "cty-camera-widget__text" }, ratioText)))), index.h("div", { key: 'c19ee27e399fc263add8ef85a3d59b5492d25e4e', class: "cty-camera-controls safe-area-bottom-padding" }, mode == 'both' && pictures.length <= 0 && index.h("div", { key: 'a89f4f51757cf84994596a30344f883e873f621b', class: "cty-camera-controls__mode flex-center", part: "mode" }, index.h("button", { key: '58f7beb5e4e36e0d16be5ee6a72bc7cfe843a3f3', class: { 'cty-button-native cty-camera-controls__mode-button': true, 'cty-camera-controls__mode-button__active': currentPhotoMode === 'single' }, onClick: () => this.currentPhotoMode = 'single' }, singleText), index.h("button", { key: '09797fed9e2d0e4214312cd71504e8c42ce5aada', class: { 'cty-button-native cty-camera-controls__mode-button': true, 'cty-camera-controls__mode-button__active': currentPhotoMode === 'multiple' }, onClick: () => this.currentPhotoMode = 'multiple' }, multipleText)), index.h("slot", { key: 'a93b960673912c178b703d01028b927701390f4b', name: "zooms" }, !touchZoom && zooms.length > 0 && index.h("div", { key: '92311e8a921f3d898fe9dde4f0354018154e62a6', class: "cty-camera-controls__zooms flex-center", part: "zooms" }, zooms.map((item, idx) => (index.h("div", { class: { 'cty-camera-controls__zoom-item flex-center': true, 'cty-camera-controls__zoom-item__active': zoomIndex === idx }, onClick: () => this.setZoom(idx) }, index.h("span", { class: "cty-camera-controls__zoom-text flex-center" }, item, "X"))))), touchZoom && index.h("div", { key: '71840ea2f3c1efd39e0a483cc4176e2084c436b2', class: "cty-camera-controls__zooms flex-center", part: "zooms" }, index.h("div", { key: '8f21de0ab8c632262136fa2deae33541ff33205c', class: { 'cty-camera-controls__zoom-item flex-center cty-camera-controls__zoom-item__active': true }, onClick: () => this.resetZoom() }, index.h("span", { key: 'dd5c8774153e8d4afee69cfd619aeb58b7aaeafb', class: "cty-camera-controls__zoom-text flex-center" }, currentZoom, "X")))), index.h("div", { key: 'e77fe2fe8d383a0b0db0eabc953a06e14927372d', class: "cty-camera-controls__main flex-center" }, index.h("div", { key: '0b2b0ed9a73e1d97b65f33db00b645eecd02c855', class: "cty-camera-controls__main-left flex-center" }), index.h("div", { key: 'c82c3e5738c34465e0c881c652d03e207f1c4378', class: "cty-camera-controls__take-photo flex-center" }, index.h("button", { key: '6eb38e93d6435a566d215d1e020caf9651d017b9', class: "cty-button-native cty-camera-controls__take-photo-button", part: "take-photo", onClick: () => this.takePhoto() })), index.h("div", { key: 'f7162a2065e1bafe8e5ee3fb5b7f9956d2f47bca', class: "cty-camera-controls__main-confirm flex-center" }, currentPhotoMode !== 'single' && pictures.length > 0 && !!deleteIcon && index.h("button", { key: '406107a0fe9d3b64bf25b9decfd04442731b6e94', class: "cty-camera-controls__main-delete cty-button-native flex-column-center", onClick: () => this.deleteLastPicture() }, index.h("cty-icon", { key: '4fe35fa4aa7d56cc313ae1529e48c7fe9cdddb67', class: "cty-camera-controls__main-delete-icon", name: deleteIcon })), currentPhotoMode !== 'single' && pictures.length > 0 && index.h("button", { key: '21db9978e8e95983ecdbb1ca644bfa5bbd5250b3', class: "cty-button-native flex-column-center", onClick: () => this.confirm() }, index.h("cty-icon", { key: '1299292a88b81bad67007ee04a0688c3d753cc1a', class: "cty-camera-controls__main-confirm-icon", name: confirmIcon }), confirmText && index.h("span", { key: 'a472a97e3a5511a43812fb7a44508151e514e4b3', class: "cty-camera-controls__main-confirm-text" }, confirmText)))), index.h("slot", { key: '2f928fef43a074b195de928f60ea4425f6030c3f', name: "images" }, index.h("div", { key: 'ec3dea052f155c830b328b69759447172a2f85a1', class: "cty-camera-controls__images flex-align-center" }, currentPhotoMode !== 'single' && pictures.map((item, idx) => (index.h("div", { class: "cty-camera-controls__image", onClick: () => this.toImageViewer(idx) }, index.h("img", { class: 'cty-camera-controls__image-img', src: item.thumbnail || item.url }), index.h("button", { class: "cty-button-native", onClick: (e) => this.deletePicture(e, idx) }, index.h("cty-icon", { class: "cty-camera-controls__image-delete", name: index$1.closeOutline })))))))), showImageViewer && index.h("cty-image-viewer", { key: '41f862a4f8686499086de808c2b7d1bf3df45af3', images: pictures.map(item => item.url), initialSlide: imageViewerIndex, overlayIndex: 100, backdropDismiss: false, closeable: false, onCtyDismiss: (e) => this.closeImageViewer(e) }, currentPhotoMode !== 'multiple' && index.h("div", { key: '1d0432f45263db6276d5d921f928414377b513e8', class: "cty-camera-viewer__single flex-center-between", slot: "pager" }, index.h("button", { key: 'ac4919e6a40e2db191ab96b57c0ae95aa6dfcb68', class: "cty-camera-viewer__single-close cty-button-native", onClick: (event) => this.closeSingleImageViewer(event) }, index.h("cty-icon", { key: '30aef1dc5108f2f617c590b99fb835d059dc1900', name: "cty-close2" })), index.h("button", { key: 'c83ea114924d5d4e32a23a94c2a483784bdecab8', class: "cty-camera-viewer__single-confirm cty-button-native", onClick: () => this.confirm() }, index.h("cty-icon", { key: '866d451495aef92120d8876742cb02b2c32f4122', name: "cty-tick" }))), currentPhotoMode !== 'multiple' && index.h("i", { key: '9070e8f341360e0d6801d56664f679d7dd18184d', slot: "close" })), this.permissionAlertVisible && index.h("cty-permission-alert", { key: '30055b9ae7772684312ca90a7076545edfb476db', title: this.permissionAlertTitle, content: this.permissionAlertContent, buttons: this.permissionAlertbuttons, onCtyDismiss: (e) => this.closePermissionAlert(e), onCtyTap: (e) => this.toOpenAppSetting(e) }), index.h("ion-toast", { key: '3121cd6124ab8f92835655e6636d87d8d8200b2d', "is-open": this.isToastOpen, message: this.toastContent, duration: 2000, position: 'middle' })));
294
+ return (index.h(index.Host, { key: 'bb83ee1726feef5c84057c7723892d43f93c898c', class: "cty-camera", onClick: (e) => e.stopPropagation() }, index.h("cty-nav-bar", { key: '7f13f48d4ed2de835c0cd6a045268080d5c1b43e', title: title, type: "clear" }, index.h("slot", { key: 'fbc7dceb192a03a24396ca3be62c6c9f53825292', name: "header-start", slot: "start" }, !!closeIcon && index.h("ion-button", { key: 'fbf1536e049bec42259893653081110a2a1958f5', class: "cty-camera__close", onClick: () => this.close() }, index.h("cty-icon", { key: 'f34a507791bab61880f1f053a0e7ff5176c295dd', class: "cty-camera__close-icon", name: closeIcon })))), index.h("div", { key: '8277b267a0671f64c217e25d7b2669e8f9eeb1d8', class: "cty-camera-main", onTouchStart: (e) => this.touchstart(e), onTouchMove: (e) => this.touchmove(e), onTouchEnd: (e) => this.touchend(e) }, index.h("div", { key: '9b64b1fca0ad1bf01fe6cd383ff469e5fe9a1243', class: "cty-camera-widgets", part: "widgets" }, !!flipText && index.h("button", { key: 'cada5f233a4b755c00360641c0971309f310ef02', class: "cty-button-native cty-camera-widget", part: "widget", onClick: () => this.flipCamera() }, index.h("cty-icon", { key: 'af24b7d537825729e046aba6564c4f9e988983d4', class: "cty-camera-widget__icon", name: "cty-flip" }), !!flipText && index.h("span", { key: 'faa5b6ffb51768edc8e7d0bccddf33eb3531e466', class: "cty-camera-widget__text" }, flipText)), !!flashText && index.h("button", { key: '9addc710c3ff9fa7fe5e2dca9d7080a5b48821f4', class: "cty-button-native cty-camera-widget", part: "widget", onClick: () => this.toggleFlash() }, index.h("cty-icon", { key: 'b352d50ee12ffe92498e0c0a3c950a3cfc835b17', class: "cty-camera-widget__icon", name: flash ? 'cty-flash-on' : 'cty-flash-off' }), !!flashText && index.h("span", { key: '15daf94ee7856595ebfd0427275c30136a21085c', class: "cty-camera-widget__text" }, flashText)), !!ratioText && index.h("button", { key: '5d9ac7d3112165332b415636ca1f66cea5b4b576', class: "cty-button-native cty-camera-widget", part: "ratio", onClick: () => this.ratioChange() }, index.h("span", { key: 'adc545b141ae4cafe0ad0ee4b3f961617185bf50', class: "cty-camera-widget__ratio flex-center" }, ratios[ratioIndex]), !!ratioText && index.h("span", { key: 'ec406cf9e24e5a22fe81ad446b6217d27811cd82', class: "cty-camera-widget__text" }, ratioText)))), index.h("div", { key: '24080708dbaa7b58eff5fac1477b8bf2556aabf5', class: "cty-camera-controls safe-area-bottom-padding" }, mode == 'both' && pictures.length <= 0 && index.h("div", { key: '2856de71e0a012616e0fd5b634d32d6f51d817c1', class: "cty-camera-controls__mode flex-center", part: "mode" }, index.h("button", { key: '689ba86505b49126c6794858e00903926744f4c5', class: { 'cty-button-native cty-camera-controls__mode-button': true, 'cty-camera-controls__mode-button__active': currentPhotoMode === 'single' }, onClick: () => this.currentPhotoMode = 'single' }, singleText), index.h("button", { key: '78b37ce3691d31241f25226165ed539f93f45fb8', class: { 'cty-button-native cty-camera-controls__mode-button': true, 'cty-camera-controls__mode-button__active': currentPhotoMode === 'multiple' }, onClick: () => this.currentPhotoMode = 'multiple' }, multipleText)), index.h("slot", { key: '321e3e6c93cb0c0474fd18811dc58c8e9553e99a', name: "zooms" }, !touchZoom && zooms.length > 0 && index.h("div", { key: '5633dfbc4a605ab9650d225b6ac81fb8a6549759', class: "cty-camera-controls__zooms flex-center", part: "zooms" }, zooms.map((item, idx) => (index.h("div", { class: { 'cty-camera-controls__zoom-item flex-center': true, 'cty-camera-controls__zoom-item__active': zoomIndex === idx }, onClick: () => this.setZoom(idx) }, index.h("span", { class: "cty-camera-controls__zoom-text flex-center" }, item, "X"))))), touchZoom && index.h("div", { key: 'ceeaa663f2c0af94ee6a9e7396ac6fca0969fa8b', class: "cty-camera-controls__zooms flex-center", part: "zooms" }, index.h("div", { key: 'eb7f380ce6b4fa09ece885f4b644258346417fa9', class: { 'cty-camera-controls__zoom-item flex-center cty-camera-controls__zoom-item__active': true }, onClick: () => this.resetZoom() }, index.h("span", { key: '54935930412f8a827d56735da55e02caeb272c65', class: "cty-camera-controls__zoom-text flex-center" }, currentZoom, "X")))), index.h("div", { key: '429b787c541081536061362da6eb4055a402d90c', class: "cty-camera-controls__main flex-center" }, index.h("div", { key: 'da4502d5cba1ef557847ceda031ef12757637134', class: "cty-camera-controls__main-left flex-center" }), index.h("div", { key: '32faefbc45c3a6101f12048e7e498c47dd7aec26', class: "cty-camera-controls__take-photo flex-center" }, index.h("button", { key: '62b7db4847e099acdfdebbad0b6fd8e933b089cf', class: "cty-button-native cty-camera-controls__take-photo-button", part: "take-photo", onClick: () => this.takePhoto() })), index.h("div", { key: '368c5af68ee1c0da60afe16eb0faca9ec8e56561', class: "cty-camera-controls__main-confirm flex-center" }, currentPhotoMode !== 'single' && pictures.length > 0 && !!deleteIcon && index.h("button", { key: 'a7867e322531dd4bd2597915e14fbb469f0b9a58', class: "cty-camera-controls__main-delete cty-button-native flex-column-center", onClick: () => this.deleteLastPicture() }, index.h("cty-icon", { key: '355bd21f2feb8c790dcdb1e52301257b7d3ccdef', class: "cty-camera-controls__main-delete-icon", name: deleteIcon })), currentPhotoMode !== 'single' && pictures.length > 0 && index.h("button", { key: 'd577f40fe7ba3cc3f38defec443357fc2c3fc7fe', class: "cty-button-native flex-column-center", onClick: () => this.confirm() }, index.h("cty-icon", { key: '67599611fbcc9c5bb292e4d2d4fe7d93dbf6e274', class: "cty-camera-controls__main-confirm-icon", name: confirmIcon }), confirmText && index.h("span", { key: 'b592907eb84e2d6c255c252e5bbd50533c737c47', class: "cty-camera-controls__main-confirm-text" }, confirmText)))), index.h("slot", { key: '6dbc7b9d6ed47f647c561ed1a1e7ff621dfe635e', name: "images" }, index.h("div", { key: '5428de1571189999e306abd4115487a681360e79', class: "cty-camera-controls__images flex-align-center" }, currentPhotoMode !== 'single' && pictures.map((item, idx) => (index.h("div", { class: "cty-camera-controls__image", onClick: () => this.toImageViewer(idx) }, index.h("img", { class: 'cty-camera-controls__image-img', src: item.thumbnail || item.url }), index.h("button", { class: "cty-button-native", onClick: (e) => this.deletePicture(e, idx) }, index.h("cty-icon", { class: "cty-camera-controls__image-delete", name: index$1.closeOutline })))))))), showImageViewer && index.h("cty-image-viewer", { key: 'd42a638850e04f7920176fd63af812034ab754a6', images: pictures.map(item => item.url), initialSlide: imageViewerIndex, overlayIndex: 100, backdropDismiss: false, closeable: false, onCtyDismiss: (e) => this.closeImageViewer(e) }, currentPhotoMode !== 'multiple' && index.h("div", { key: '2dc441f65a66d38d271c390bc2fb1ebaa26c52f5', class: "cty-camera-viewer__single flex-center-between", slot: "pager" }, index.h("button", { key: '8c80910fb2d0ef00c828f0eec19d9c50309d2dca', class: "cty-camera-viewer__single-close cty-button-native", onClick: (event) => this.closeSingleImageViewer(event) }, index.h("cty-icon", { key: '3c606131b6693c04957d4114d4cf757a1df5453a', name: "cty-close2" })), index.h("button", { key: '56e9915d1224049cc9d48d7aa3a875d66a47c50a', class: "cty-camera-viewer__single-confirm cty-button-native", onClick: () => this.confirm() }, index.h("cty-icon", { key: '895c32f1f067760c15ac82ce0c1f31db069daa82', name: "cty-tick" }))), currentPhotoMode !== 'multiple' && index.h("i", { key: '5b4a7c8cc661e11127804aad19204cd4abdbb6dc', slot: "close" })), this.permissionAlertVisible && index.h("cty-permission-alert", { key: '87f6eac68fd015a6a1902a1cda5d546cabea9e3b', part: "permission-alert", title: this.permissionAlertTitle, content: this.permissionAlertContent, buttons: this.permissionAlertbuttons, onCtyDismiss: (e) => this.closePermissionAlert(e), onCtyTap: (e) => this.toOpenAppSetting(e) }), index.h("ion-toast", { key: '7fe4417cee38fe17e86cc52ddda0f09a3270b38e', "is-open": this.isToastOpen, message: this.toastContent, duration: 2000, position: 'middle' })));
297
295
  }
298
296
  get el() { return index.getElement(this); }
299
297
  };
@@ -2,7 +2,7 @@
2
2
 
3
3
  var index = require('./index-DCK462Hl.js');
4
4
  var statusBar = require('./status-bar-1jhnFEuR.js');
5
- var videoCapture = require('./video-capture-BO4sLa1e.js');
5
+ var videoCapture = require('./video-capture-CzRkzdTQ.js');
6
6
  var index$1 = require('./index-DASUhQA3.js');
7
7
  require('./config-Bn2x7PFv.js');
8
8
  require('./format-BSDO5P-c.js');
@@ -134,12 +134,9 @@ const MediaCapture = class {
134
134
  if (item.action == 'permission') {
135
135
  try {
136
136
  await videoCapture.videoCapture.openAppSettings();
137
- this.permissionAlertVisible = false;
138
- this.initVideoCapture();
139
- }
140
- catch (error) {
141
- this.closePermissionAlert(event);
142
137
  }
138
+ catch (error) { }
139
+ this.closePermissionAlert(event);
143
140
  }
144
141
  }
145
142
  closePermissionAlert(e) {
@@ -149,7 +146,7 @@ const MediaCapture = class {
149
146
  }
150
147
  render() {
151
148
  const captureDuration = statusBar.secondsToVehicle(this.captureDuration);
152
- return (index.h(index.Host, { key: 'dea0fde2e775dac71b8d627fbf72502ce8b01ac6', class: { 'cty-media-capture': true, 'cty-media-captured': this.isCaptured } }, index.h("div", { key: '639152bb0476a2577a91268088efd50d251c3962', class: "cty-media-capture__header" }, index.h("button", { key: 'a2246e49b5e58c4623b1e2d65c7d14e216be179f', onClick: () => this.doHeaderAction(), class: "cty-button-native" }, index.h("cty-icon", { key: 'a47c9b4f70a9ffa317e6ed165ed05098eba5198f', class: "cty-capture__close-icon", name: this.isCaptured ? this.revocationIcon : this.closeIcon })), this.captureTime && (this.isCaptured || this.capturing) && (index.h("span", { key: '0bd480dc6ba6963ac65c14c55b6d7d242a1b79e2', class: { 'cty-media-capture__time': true, 'cty-media-capture__time-active': this.capturing } }, captureDuration))), this.isCaptured && (index.h("video", { key: '9bb3ad454c63e53d6acd2968b2281a5c152a9390', ref: el => (this.videoEl = el), class: "cty-media-capture__video", autoplay: this.autoplay, loop: this.loop, poster: this.poster, src: this.videoFileUrl, playsinline: true, "webkit-playsinline": true, controls: this.controls, onClick: e => this.toggleVideo(e) })), index.h("div", { key: '90101389dea8e43c50dddf98c6cea75f8d324bd9', class: "cty-media-capture__footer flex-center" }, !this.isCaptured && (index.h("button", { key: '71f330777cdabab5829a2dbcf703ba3a40d99647', class: "cty-media-capture__switch cty-button-native", onClick: () => this.doCapture() }, index.h("span", { key: '6957cf9034bd74ea7ae4653557f417b2c934ee81', class: { 'cty-media-capture__status': true, 'cty-media-capture__status-active': this.capturing } }))), this.isCaptured && (index.h("button", { key: 'f508c7bb4cca833a13b1cfe3957a10114c92377e', class: "cty-media-capture__confirm cty-button-native", onClick: () => this.confirm() }, this.confirmText))), index.h("slot", { key: 'f5f99097bc702e82912865d500172f4a88966623' }), this.permissionAlertVisible && index.h("cty-permission-alert", { key: '07ce58f2409b15db1621343acec4a7938cc87474', title: this.permissionAlertTitle, content: this.permissionAlertContent, buttons: this.permissionAlertbuttons, onCtyDismiss: (e) => this.closePermissionAlert(e), onCtyTap: (e) => this.toOpenAppSetting(e) })));
149
+ return (index.h(index.Host, { key: '4b705601c4835f377f498ccef4aa73def22e382f', class: { 'cty-media-capture': true, 'cty-media-captured': this.isCaptured } }, index.h("div", { key: '871a7976fddfeaf2628fc8fbb2a3817f94fcf4a2', class: "cty-media-capture__header" }, index.h("button", { key: '59d1523a1fd0b327ef692fd6fa8215082c4d8175', onClick: () => this.doHeaderAction(), class: "cty-button-native" }, index.h("cty-icon", { key: '4161681003123afdcd8eb3ed85f501537600ec38', class: "cty-capture__close-icon", name: this.isCaptured ? this.revocationIcon : this.closeIcon })), this.captureTime && (this.isCaptured || this.capturing) && (index.h("span", { key: 'c931e29933072af3e98bc951a045f53dacc99be7', class: { 'cty-media-capture__time': true, 'cty-media-capture__time-active': this.capturing } }, captureDuration))), this.isCaptured && (index.h("video", { key: '9ca6fb5d35649aa20e1cfb0841ef3fa464f9cfb1', ref: el => (this.videoEl = el), class: "cty-media-capture__video", autoplay: this.autoplay, loop: this.loop, poster: this.poster, src: this.videoFileUrl, playsinline: true, "webkit-playsinline": true, controls: this.controls, onClick: e => this.toggleVideo(e) })), index.h("div", { key: '0e3befcf4ccad80ad79a47f2e0a7d6996258e596', class: "cty-media-capture__footer flex-center" }, !this.isCaptured && (index.h("button", { key: '2e693471aa9003dded388e69e451bc22745166d7', class: "cty-media-capture__switch cty-button-native", onClick: () => this.doCapture() }, index.h("span", { key: '073ad032797cd8f2f4b5282fc3a0cb69babf5541', class: { 'cty-media-capture__status': true, 'cty-media-capture__status-active': this.capturing } }))), this.isCaptured && (index.h("button", { key: 'b712578f4606178f125da347e3c93957a7b28cdc', class: "cty-media-capture__confirm cty-button-native", onClick: () => this.confirm() }, this.confirmText))), index.h("slot", { key: 'a08be5f30932b8c2173fda281047d1e31e6b881a' }), this.permissionAlertVisible && index.h("cty-permission-alert", { key: '2a5d0a9a7a3e7386f6730035e696dc10d05cd26c', part: "permission-alert", title: this.permissionAlertTitle, content: this.permissionAlertContent, buttons: this.permissionAlertbuttons, onCtyDismiss: (e) => this.closePermissionAlert(e), onCtyTap: (e) => this.toOpenAppSetting(e) })));
153
150
  }
154
151
  get el() { return index.getElement(this); }
155
152
  };